@wangeditor-next/editor 5.6.49 → 5.6.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/src/config/interface.d.ts +5 -0
- package/dist/core/src/editor/dom-editor.d.ts +1 -0
- package/dist/core/src/editor/interface.d.ts +4 -1
- package/dist/core/src/render/text/renderText.d.ts +1 -1
- package/dist/core/src/text-area/TextArea.d.ts +3 -0
- package/dist/core/src/text-area/helpers.d.ts +7 -3
- package/dist/core/src/utils/sanitize-html.d.ts +5 -0
- package/dist/core/src/utils/weak-maps.d.ts +2 -0
- package/dist/index.js +3 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wangEditor={})}(this,function(e){"use strict";var t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}function C(){return n?t:(n=1,t=function(e){try{return!!e()}catch(e){return!0}})}function D(){if(o)return r;o=1;var e=C();return r=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function S(){if(a)return i;a=1;var e=D(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return i=e?r:function(e){return function(){return n.apply(e,arguments)}},i}function A(){if(u)return s;u=1;var e=S(),t=e({}.toString),n=e("".slice);return s=function(e){return n(t(e),8,-1)}}function x(){if(c)return l;c=1;var e=S(),t=C(),n=A(),r=Object,o=e("".split);return l=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function T(){return f?d:(f=1,d=function(e){return null==e})}function O(){if(h)return p;h=1;var e=T(),t=TypeError;return p=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(v)return g;v=1;var e=x(),t=O();return g=function(n){return e(t(n))}}function B(){if(y)return m;y=1;var e=function(e){return e&&e.Math===Math&&e};return m=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof m&&m)||function(){return this}()||Function("return this")()}var k,F,P,I,_,R,L,M,j,H,z,$,U,V,W,G,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie,ae={exports:{}};function se(){return F?k:(F=1,k=!1)}function ue(){if(I)return P;I=1;var e=B(),t=Object.defineProperty;return P=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function le(){if(_)return ae.exports;_=1;var e=se(),t=B(),n=ue(),r="__core-js_shared__",o=ae.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ae.exports}function ce(){if(L)return R;L=1;var e=le();return R=function(t,n){return e[t]||(e[t]=n||{})}}function de(){if(j)return M;j=1;var e=O(),t=Object;return M=function(n){return t(e(n))}}function fe(){if(z)return H;z=1;var e=S(),t=de(),n=e({}.hasOwnProperty);return H=Object.hasOwn||function(e,r){return n(t(e),r)}}function pe(){if(U)return $;U=1;var e=S(),t=0,n=Math.random(),r=e(1.1.toString);return $=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function he(){if(q)return G;q=1;var e,t,n=B(),r=function(){if(W)return V;W=1;var e=B().navigator,t=e&&e.userAgent;return V=t?String(t):""}(),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]),G=t}function ge(){if(Y)return K;Y=1;var e=he(),t=C(),n=B().String;return K=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),K}function ve(){if(Z)return X;Z=1;var e=ge();return X=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function me(){if(Q)return J;Q=1;var e=B(),t=ce(),n=fe(),r=pe(),o=ge(),i=ve(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return J=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function ye(){if(te)return ee;te=1;var e="object"==typeof document&&document.all;return ee=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function be(){if(re)return ne;re=1;var e=ye();return ne=function(t){return"object"==typeof t?null!==t:e(t)}}function Ee(){if(ie)return oe;ie=1;var e=be(),t=String,n=TypeError;return oe=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var we,Ce,De,Se,Ae={};function xe(){if(Ce)return we;Ce=1;var e=C();return we=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Te(){if(Se)return De;Se=1;var e=xe(),t=C();return De=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var Oe,Ne,Be,ke,Fe,Pe,Ie,_e,Re,Le,Me,je,He,ze,$e,Ue,Ve,We,Ge,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,pt,ht,gt,vt,mt,yt,bt,Et,wt,Ct,Dt,St,At,xt,Tt,Ot,Nt,Bt,kt,Ft,Pt,It,_t,Rt,Lt,Mt={};function jt(){if(Ne)return Oe;Ne=1;var e=B(),t=be(),n=e.document,r=t(n)&&t(n.createElement);return Oe=function(e){return r?n.createElement(e):{}}}function Ht(){if(ke)return Be;ke=1;var e=xe(),t=C(),n=jt();return Be=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function zt(){if(Pe)return Fe;Pe=1;var e=D(),t=Function.prototype.call;return Fe=e?t.bind(t):function(){return t.apply(t,arguments)},Fe}function $t(){if(_e)return Ie;_e=1;var e=B(),t=ye();return Ie=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ie}function Ut(){if(Le)return Re;Le=1;var e=S();return Re=e({}.isPrototypeOf)}function Vt(){if(je)return Me;je=1;var e=$t(),t=ye(),n=Ut(),r=ve(),o=Object;return Me=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Wt(){if(ze)return He;ze=1;var e=String;return He=function(t){try{return e(t)}catch(e){return"Object"}}}function Gt(){if(Ue)return $e;Ue=1;var e=ye(),t=Wt(),n=TypeError;return $e=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function qt(){if(We)return Ve;We=1;var e=Gt(),t=T();return Ve=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ve}function Kt(){if(Ye)return Ke;Ye=1;var e=zt(),t=be(),n=Vt(),r=qt(),o=function(){if(qe)return Ge;qe=1;var e=zt(),t=ye(),n=be(),r=TypeError;return Ge=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")},Ge}(),i=me(),a=TypeError,s=i("toPrimitive");return Ke=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 Yt(){if(Ze)return Xe;Ze=1;var e=Kt(),t=Vt();return Xe=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Xt(){if(Je)return Mt;Je=1;var e=xe(),t=Ht(),n=Te(),r=Ee(),o=Yt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Mt.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},Mt}function Zt(){if(nt)return tt;nt=1;var e=function(){if(et)return Qe;et=1;var e=Math.ceil,t=Math.floor;return Qe=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Qe}();return tt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Jt(){if(at)return it;at=1;var e=Zt(),t=Math.min;return it=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Qt(){if(ut)return st;ut=1;var e=Jt();return st=function(t){return e(t.length)}}function en(){if(ct)return lt;ct=1;var e=N(),t=function(){if(ot)return rt;ot=1;var e=Zt(),t=Math.max,n=Math.min;return rt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},rt}(),n=Qt(),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 lt={includes:r(!0),indexOf:r(!1)}}function tn(){return ft?dt:(ft=1,dt={})}function nn(){if(ht)return pt;ht=1;var e=S(),t=fe(),n=N(),r=en().indexOf,o=tn(),i=e([].push);return pt=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},pt}function rn(){return vt?gt:(vt=1,gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function on(){if(bt)return Ae;bt=1;var e=xe(),t=Te(),n=Xt(),r=Ee(),o=N(),i=function(){if(yt)return mt;yt=1;var e=nn(),t=rn();return mt=Object.keys||function(n){return e(n,t)},mt}();return Ae.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},Ae}function an(){if(Dt)return Ct;Dt=1;var e=ce(),t=pe(),n=e("keys");return Ct=function(e){return n[e]||(n[e]=t(e))}}function sn(){if(At)return St;At=1;var e,t=Ee(),n=on(),r=rn(),o=tn(),i=function(){if(wt)return Et;wt=1;var e=$t();return Et=e("document","documentElement")}(),a=jt(),s=an(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(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(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete h[u][r[s]];return h()};return o[c]=!0,St=Object.create||function(e,r){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},St}function un(){return Nt?Ot:(Nt=1,Ot={})}function ln(){return Pt?Ft:(Pt=1,Ft=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function cn(){if(_t)return It;_t=1;var e=xe(),t=Xt(),n=ln();return It=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function dn(){if(Lt)return Rt;Lt=1;var e,t,n,r=function(){if(kt)return Bt;kt=1;var e=B(),t=ye(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=be(),a=cn(),s=fe(),u=le(),l=an(),c=tn(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);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 Rt={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 f("Incompatible receiver, "+e+" required");return r}}}}var fn,pn,hn={},gn={};function vn(){if(pn)return hn;pn=1;var e=xe(),t=zt(),n=function(){if(fn)return gn;fn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return gn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,gn}(),r=ln(),o=N(),i=Yt(),a=fe(),s=Ht(),u=Object.getOwnPropertyDescriptor;return hn.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])},hn}var mn,yn,bn,En,wn,Cn,Dn,Sn={exports:{}};function An(){if(yn)return mn;yn=1;var e=xe(),t=fe(),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 mn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function xn(){if(En)return bn;En=1;var e=S(),t=ye(),n=le(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),bn=n.inspectSource}function Tn(){if(wn)return Sn.exports;wn=1;var e=S(),t=C(),n=ye(),r=fe(),o=xe(),i=An().CONFIGURABLE,a=xn(),s=dn(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),h=e([].join),g=o&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Sn.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Sn.exports}function On(){if(Dn)return Cn;Dn=1;var e=ye(),t=Xt(),n=Tn(),r=ue();return Cn=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},Cn}var Nn,Bn={};var kn,Fn,Pn,In,_n,Rn,Ln,Mn,jn,Hn,zn,$n,Un,Vn,Wn,Gn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,lr,cr={};function dr(){if(Pn)return Fn;Pn=1;var e=$t(),t=S(),n=function(){if(Nn)return Bn;Nn=1;var e=nn(),t=rn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(kn||(kn=1,cr.f=Object.getOwnPropertySymbols),cr),o=Ee(),i=t([].concat);return Fn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},Fn}function fr(){if(_n)return In;_n=1;var e=fe(),t=dr(),n=vn(),r=Xt();return In=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},In}function pr(){if(jn)return Mn;jn=1;var e=B(),t=vn().f,n=cn(),r=On(),o=ue(),i=fr(),a=function(){if(Ln)return Rn;Ln=1;var e=C(),t=ye(),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 Rn=r}();return Mn=function(s,u){var l,c,d,f,p,h=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(g?c:h+(v?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,s)}}}function hr(){if(Un)return $n;Un=1;var e=fe(),t=ye(),n=de(),r=an(),o=function(){if(zn)return Hn;zn=1;var e=C();return Hn=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Hn}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return $n=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},$n}function gr(){if(Wn)return Vn;Wn=1;var e,t,n,r=C(),o=ye(),i=be(),a=sn(),s=hr(),u=On(),l=me(),c=se(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Vn={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function vr(){if(qn)return Gn;qn=1;var e=Xt().f,t=fe(),n=me()("toStringTag");return Gn=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function mr(){if(tr)return er;tr=1;var e=function(){if(Qn)return Jn;Qn=1;var e=be();return Jn=function(t){return e(t)||null===t}}(),t=String,n=TypeError;return er=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function yr(){if(rr)return nr;rr=1;var e=function(){if(Zn)return Xn;Zn=1;var e=S(),t=Gt();return Xn=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=be(),n=O(),r=mr();return nr=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),nr}function br(){if(ir)return or;ir=1;var e=pr(),t=zt(),n=se(),r=An(),o=ye(),i=function(){if(Yn)return Kn;Yn=1;var e=gr().IteratorPrototype,t=sn(),n=ln(),r=vr(),o=un(),i=function(){return this};return Kn=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}}(),a=hr(),s=yr(),u=vr(),l=cn(),c=On(),d=me(),f=un(),p=gr(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",C=function(){return this};return or=function(r,d,p,D,S,A,x){i(p,d,D);var T,O,N,B=function(e){if(e===S&&_)return _;if(!m&&e&&e in P)return P[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,P=r.prototype,I=P[y]||P["@@iterator"]||S&&P[S],_=!m&&I||B(S),R="Array"===d&&P.entries||I;if(R&&(T=a(R.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,C)),u(T,k,!0,!0),n&&(f[k]=C)),h&&S===E&&I&&I.name!==E&&(!n&&g?l(P,"name",E):(F=!0,_=function(){return t(I,this)})),S)if(O={values:B(E),keys:A?_:B(b),entries:B(w)},x)for(N in O)(m||F||!(N in P))&&c(P,N,O[N]);else e({target:d,proto:!0,forced:m||F},O);return n&&!x||P[y]===_||c(P,y,_,{name:S}),f[d]=_,O}}function Er(){return sr?ar:(sr=1,ar=function(e,t){return{value:e,done:t}})}function wr(){if(lr)return ur;lr=1;var e=N(),t=function(){if(Tt)return xt;Tt=1;var e=me(),t=sn(),n=Xt().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),xt=function(e){o[r][e]=!0}}(),n=un(),r=dn(),o=Xt().f,i=br(),a=Er(),s=se(),u=xe(),l="Array Iterator",c=r.set,d=r.getterFor(l);ur=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(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 f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return ur}wr();var Cr,Dr,Sr,Ar,xr,Tr,Or,Nr={};function Br(){if(Dr)return Cr;Dr=1;var e={};return e[me()("toStringTag")]="z",Cr="[object z]"===String(e)}function kr(){if(Ar)return Sr;Ar=1;var e=Br(),t=ye(),n=A(),r=me()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Sr=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},Sr}!function(){if(Or)return Nr;Or=1;var e=Br(),t=On(),n=function(){if(Tr)return xr;Tr=1;var e=Br(),t=kr();return xr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var Fr,Pr,Ir,_r,Rr,Lr,Mr,jr,Hr,zr,$r,Ur,Vr,Wr={};function Gr(){if(Pr)return Fr;Pr=1;var e=kr(),t=String;return Fr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function qr(){if(_r)return Ir;_r=1;var e=Ee();return Ir=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 Kr(){if(Ur)return $r;Ur=1;var e,t,n=zt(),r=S(),o=Gr(),i=qr(),a=function(){if(Lr)return Rr;Lr=1;var e=C(),t=B().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 Rr={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),s=ce(),u=sn(),l=dn().get,c=function(){if(jr)return Mr;jr=1;var e=C(),t=B().RegExp;return Mr=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),d=function(){if(zr)return Hr;zr=1;var e=C(),t=B().RegExp;return Hr=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})}(),f=s("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,w=void 0!==/()??/.exec("")[1];return(b||w||E||c||d)&&(h=function(e){var t,r,a,s,c,d,C,D=this,S=l(D),A=o(e),x=S.raw;if(x)return x.lastIndex=D.lastIndex,t=n(h,x,A),D.lastIndex=x.lastIndex,t;var T=S.groups,O=E&&D.sticky,N=n(i,D),B=D.source,k=0,F=A;if(O&&(N=m(N,"y",""),-1===v(N,"g")&&(N+="g"),F=y(A,D.lastIndex),D.lastIndex>0&&(!D.multiline||D.multiline&&"\n"!==g(A,D.lastIndex-1))&&(B="(?: "+B+")",F=" "+F,k++),r=new RegExp("^(?:"+B+")",N)),w&&(r=new RegExp("^"+B+"$(?!\\s)",N)),b&&(a=D.lastIndex),s=n(p,O?r:D,F),O?s?(s.input=y(s.input,k),s[0]=y(s[0],k),s.index=D.lastIndex,D.lastIndex+=s[0].length):D.lastIndex=0:b&&s&&(D.lastIndex=D.global?s.index+s[0].length:a),w&&s&&s.length>1&&n(f,s[0],r,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s&&T)for(s.groups=d=u(null),c=0;c<T.length;c++)d[(C=T[c])[0]]=s[C[1]];return s}),$r=h}function Yr(){if(Vr)return Wr;Vr=1;var e=pr(),t=Kr();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Wr}Yr();var Xr,Zr,Jr,Qr={};function eo(){if(Zr)return Xr;Zr=1;var e=S(),t=Zt(),n=Gr(),r=O(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Xr={codeAt:s(!1),charAt:s(!0)}}!function(){if(Jr)return Qr;Jr=1;var e=eo().charAt,t=Gr(),n=dn(),r=br(),o=Er(),i="String Iterator",a=n.set,s=n.getterFor(i);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))})}();var to,no,ro,oo,io,ao,so,uo,lo,co,fo,po={};function ho(){if(oo)return ro;oo=1;var e=eo().charAt;return ro=function(t,n,r){return n+(r?e(t,n).length:1)},ro}function go(){if(uo)return so;uo=1;var e=zt(),t=fe(),n=Ut(),r=function(){if(ao)return io;ao=1;var e=B(),t=C(),n=e.RegExp,r=!t(function(){var e=!0;try{n(".","d")}catch(t){e=!1}var t={},r="",o=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==o||r!==o});return io={correct:r}}(),o=qr(),i=RegExp.prototype;return so=r.correct?function(e){return e.flags}:function(a){return r.correct||!n(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(fo)return po;fo=1;var e=zt(),t=S(),n=function(){if(no)return to;no=1,Yr();var e=zt(),t=On(),n=Kr(),r=C(),o=me(),i=cn(),a=o("species"),s=RegExp.prototype;return to=function(u,l,c,d){var f=o(u),p=!r(function(){var e={};return e[f]=function(){return 7},7!==""[u](e)}),h=p&&!r(function(){var e=!1,t=/a/;if("split"===u){var n={};n[a]=function(){return t},(t={constructor:n,flags:""})[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](""),!e});if(!p||!h||c){var g=/./[f],v=l(f,""[u],function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?p&&!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,f,v[1])}d&&i(s[f],"sham",!0)},to}(),r=Ee(),o=be(),i=Jt(),a=Gr(),s=O(),u=qt(),l=ho(),c=go(),d=function(){if(co)return lo;co=1;var e=zt(),t=Ee(),n=ye(),r=A(),o=Kr(),i=TypeError;return lo=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")},lo}(),f=t("".indexOf);n("match",function(t,n,p){return[function(n){var r=s(this),i=o(n)?u(n,t):void 0;return i?e(i,n,r):new RegExp(n)[t](a(r))},function(e){var t=r(this),o=a(e),s=p(n,t,o);if(s.done)return s.value;var u=a(c(t));if(-1===f(u,"g"))return d(t,o);var h=-1!==f(u,"u");t.lastIndex=0;for(var g,v=[],m=0;null!==(g=d(t,o));){var y=a(g[0]);v[m]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),h)),m++}return 0===m?null:v}]})}();var vo,mo,yo,bo,Eo,wo,Co,Do,So,Ao,xo,To,Oo,No,Bo,ko,Fo,Po,Io,_o,Ro,Lo,Mo,jo,Ho,zo,$o,Uo={},Vo={};function Wo(){if(mo)return vo;mo=1;var e=be(),t=cn();return vo=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},vo}function Go(){if(Do)return Co;Do=1;var e=cn(),t=function(){if(bo)return yo;bo=1;var e=S(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return yo=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(wo)return Eo;wo=1;var e=C(),t=ln();return Eo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),r=Error.captureStackTrace;return Co=function(o,i,a,s){n&&(r?r(o,i):e(o,"stack",t(a,s)))},Co}function qo(){if(To)return xo;To=1;var e=function(){if(Ao)return So;Ao=1;var e=A(),t=S();return So=function(n){if("Function"===e(n))return t(n)}}(),t=Gt(),n=D(),r=e(e.bind);return xo=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},xo}function Ko(){if(No)return Oo;No=1;var e=me(),t=un(),n=e("iterator"),r=Array.prototype;return Oo=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Yo(){if(ko)return Bo;ko=1;var e=kr(),t=qt(),n=T(),r=un(),o=me()("iterator");return Bo=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Xo(){if(Po)return Fo;Po=1;var e=zt(),t=Gt(),n=Ee(),r=Wt(),o=Yo(),i=TypeError;return Fo=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")},Fo}function Zo(){if(_o)return Io;_o=1;var e=zt(),t=Ee(),n=qt();return Io=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},Io}function Jo(){if(Lo)return Ro;Lo=1;var e=qo(),t=zt(),n=Ee(),r=Wt(),o=Ko(),i=Qt(),a=Ut(),s=Xo(),u=Yo(),l=Zo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Ro=function(p,h,g){var v,m,y,b,E,w,C,D=g&&g.that,S=!(!g||!g.AS_ENTRIES),A=!(!g||!g.IS_RECORD),x=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),O=e(h,D),N=function(e){return v&&l(v,"normal"),new d(!0,e)},B=function(e){return S?(n(e),T?O(e[0],e[1],N):O(e[0],e[1])):T?O(e,N):O(e)};if(A)v=p.iterator;else if(x)v=p;else{if(!(m=u(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=B(p[y]))&&a(f,E))return E;return new d(!1)}v=s(p,m)}for(w=A?p.next:v.next;!(C=t(w,v)).done;){try{E=B(C.value)}catch(e){l(v,"throw",e)}if("object"==typeof E&&E&&a(f,E))return E}return new d(!1)},Ro}function Qo(){if(jo)return Mo;jo=1;var e=Gr();return Mo=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Mo}function ei(){return zo||(zo=1,function(){if(Ho)return Vo;Ho=1;var e=pr(),t=Ut(),n=hr(),r=yr(),o=fr(),i=sn(),a=cn(),s=ln(),u=Wo(),l=Go(),c=Jo(),d=Qo(),f=me()("toStringTag"),p=Error,h=[].push,g=function(e,o){var s,m=t(v,this);r?s=r(new p,m?n(this):v):(s=m?this:i(v),a(s,f,"Error")),void 0!==o&&a(s,"message",d(o)),l(s,g,s.stack,1),arguments.length>2&&u(s,arguments[2]);var y=[];return c(e,h,{that:y}),a(s,"errors",y),s};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),Uo}$o||($o=1,ei());var ti,ni,ri={};ni||(ni=1,function(){if(ti)return ri;ti=1;var e=pr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var oi,ii,ai,si,ui,li,ci={};function di(){return ii?oi:(ii=1,oi={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 fi(){if(si)return ai;si=1;var e=jt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ai=t===Object.prototype?void 0:t}if(function(){if(ui)return ci;ui=1;var e=B(),t=di(),n=fi(),r=wr(),o=cn(),i=vr(),a=me()("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")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}pi(),hi()}else global&&(null===(li=global.navigator)||void 0===li?void 0:li.userAgent.match("QQBrowser"))&&(pi(),hi());function pi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function hi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var gi,vi,mi,yi,bi,Ei,wi,Ci,Di,Si,Ai,xi,Ti,Oi,Ni,Bi,ki={};function Fi(){if(vi)return gi;vi=1;var e=function(e){return e&&e.Math===Math&&e};return gi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof gi&&gi)||function(){return this}()||Function("return this")()}function Pi(){return yi?mi:(yi=1,mi=function(e){try{return!!e()}catch(e){return!0}})}function Ii(){return Ei?bi:(Ei=1,bi=!Pi()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function _i(){if(Ci)return wi;Ci=1;var e=Ii(),t=Function.prototype,n=t.apply,r=t.call;return wi="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),wi}function Ri(){if(Si)return Di;Si=1;var e=Ii(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Di=e?r:function(e){return function(){return n.apply(e,arguments)}},Di}function Li(){if(xi)return Ai;xi=1;var e=Ri(),t=e({}.toString),n=e("".slice);return Ai=function(e){return n(t(e),8,-1)}}function Mi(){if(Oi)return Ti;Oi=1;var e=Li(),t=Ri();return Ti=function(n){if("Function"===e(n))return t(n)}}function ji(){if(Bi)return Ni;Bi=1;var e="object"==typeof document&&document.all;return Ni=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var Hi,zi,$i,Ui,Vi={};function Wi(){return zi?Hi:(zi=1,Hi=!Pi()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Gi(){if(Ui)return $i;Ui=1;var e=Ii(),t=Function.prototype.call;return $i=e?t.bind(t):function(){return t.apply(t,arguments)},$i}var qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,la,ca,da,fa,pa,ha,ga,va,ma,ya,ba,Ea,wa,Ca,Da,Sa,Aa,xa,Ta,Oa,Na,Ba={};function ka(){if(qi)return Ba;qi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Ba.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Ba}function Fa(){return Yi?Ki:(Yi=1,Ki=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Pa(){if(Zi)return Xi;Zi=1;var e=Ri(),t=Pi(),n=Li(),r=Object,o=e("".split);return Xi=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Ia(){return Qi?Ji:(Qi=1,Ji=function(e){return null==e})}function _a(){if(ta)return ea;ta=1;var e=Ia(),t=TypeError;return ea=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function Ra(){if(ra)return na;ra=1;var e=Pa(),t=_a();return na=function(n){return e(t(n))}}function La(){if(ia)return oa;ia=1;var e=ji();return oa=function(t){return"object"==typeof t?null!==t:e(t)}}function Ma(){return sa?aa:(sa=1,aa={})}function ja(){if(la)return ua;la=1;var e=Ma(),t=Fi(),n=ji(),r=function(e){return n(e)?e:void 0};return ua=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},ua}function Ha(){return da?ca:(da=1,ca=Ri()({}.isPrototypeOf))}function za(){if(pa)return fa;pa=1;var e=Fi().navigator,t=e&&e.userAgent;return fa=t?String(t):""}function $a(){if(ga)return ha;ga=1;var e,t,n=Fi(),r=za(),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]),ha=t}function Ua(){if(ma)return va;ma=1;var e=$a(),t=Pi(),n=Fi().String;return va=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),va}function Va(){return ba?ya:(ba=1,ya=Ua()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Wa(){if(wa)return Ea;wa=1;var e=ja(),t=ji(),n=Ha(),r=Object;return Ea=Va()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function Ga(){if(Da)return Ca;Da=1;var e=String;return Ca=function(t){try{return e(t)}catch(e){return"Object"}}}function qa(){if(Aa)return Sa;Aa=1;var e=ji(),t=Ga(),n=TypeError;return Sa=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Ka(){if(Ta)return xa;Ta=1;var e=qa(),t=Ia();return xa=function(n,r){var o=n[r];return t(o)?void 0:e(o)},xa}function Ya(){if(Na)return Oa;Na=1;var e=Gi(),t=ji(),n=La(),r=TypeError;return Oa=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")},Oa}var Xa,Za,Ja,Qa,es,ts,ns,rs,os,is,as,ss,us,ls,cs,ds,fs,ps,hs,gs,vs,ms,ys,bs,Es,ws,Cs,Ds,Ss={exports:{}};function As(){return Za?Xa:(Za=1,Xa=!0)}function xs(){if(Qa)return Ja;Qa=1;var e=Fi(),t=Object.defineProperty;return Ja=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Ts(){if(es)return Ss.exports;es=1;var e=As(),t=Fi(),n=xs(),r="__core-js_shared__",o=Ss.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ss.exports}function Os(){if(ns)return ts;ns=1;var e=Ts();return ts=function(t,n){return e[t]||(e[t]=n||{})}}function Ns(){if(os)return rs;os=1;var e=_a(),t=Object;return rs=function(n){return t(e(n))}}function Bs(){if(as)return is;as=1;var e=Ri(),t=Ns(),n=e({}.hasOwnProperty);return is=Object.hasOwn||function(e,r){return n(t(e),r)}}function ks(){if(us)return ss;us=1;var e=Ri(),t=0,n=Math.random(),r=e(1.1.toString);return ss=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function Fs(){if(cs)return ls;cs=1;var e=Fi(),t=Os(),n=Bs(),r=ks(),o=Ua(),i=Va(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return ls=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Ps(){if(fs)return ds;fs=1;var e=Gi(),t=La(),n=Wa(),r=Ka(),o=Ya(),i=TypeError,a=Fs()("toPrimitive");return ds=function(s,u){if(!t(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function Is(){if(hs)return ps;hs=1;var e=Ps(),t=Wa();return ps=function(n){var r=e(n,"string");return t(r)?r:r+""}}function _s(){if(vs)return gs;vs=1;var e=Fi(),t=La(),n=e.document,r=t(n)&&t(n.createElement);return gs=function(e){return r?n.createElement(e):{}}}function Rs(){if(ys)return ms;ys=1;var e=Wi(),t=Pi(),n=_s();return ms=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ls(){if(bs)return Vi;bs=1;var e=Wi(),t=Gi(),n=ka(),r=Fa(),o=Ra(),i=Is(),a=Bs(),s=Rs(),u=Object.getOwnPropertyDescriptor;return Vi.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])},Vi}function Ms(){if(ws)return Es;ws=1;var e=Pi(),t=ji(),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 Es=r}function js(){if(Ds)return Cs;Ds=1;var e=Mi(),t=qa(),n=Ii(),r=e(e.bind);return Cs=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},Cs}var Hs,zs,$s,Us,Vs,Ws,Gs,qs,Ks,Ys,Xs,Zs,Js,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,lu,cu,du,fu,pu,hu,gu,vu,mu,yu,bu,Eu,wu,Cu,Du,Su={};function Au(){return zs?Hs:(zs=1,Hs=Wi()&&Pi()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function xu(){if(Us)return $s;Us=1;var e=La(),t=String,n=TypeError;return $s=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function Tu(){if(Vs)return Su;Vs=1;var e=Wi(),t=Rs(),n=Au(),r=xu(),o=Is(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Su.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},Su}function Ou(){if(Gs)return Ws;Gs=1;var e=Wi(),t=Tu(),n=Fa();return Ws=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Nu(){if(Ks)return qs;Ks=1;var e=Fi(),t=_i(),n=Mi(),r=ji(),o=Ls().f,i=Ms(),a=Ma(),s=js(),u=Ou(),l=Bs(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return qs=function(t,d){var f,p,h,g,v,m,y,b,E,w=t.target,C=t.global,D=t.stat,S=t.proto,A=C?e:D?e[w]:e[w]&&e[w].prototype,x=C?a:a[w]||u(a,w,{})[w],T=x.prototype;for(g in d)p=!(f=i(C?g:w+(D?".":"#")+g,t.forced))&&A&&l(A,g),m=x[g],p&&(y=t.dontCallGetSet?(E=o(A,g))&&E.value:A[g]),v=p&&y?y:d[g],(f||S||typeof m!=typeof v)&&(b=t.bind&&p?s(v,e):t.wrap&&p?c(v):S&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(x,g,b),S&&(l(a,h=w+"Prototype")||u(a,h,{}),u(a[h],g,v),t.real&&T&&(f||!T[g])&&u(T,g,v)))}}function Bu(){if(Xs)return Ys;Xs=1;var e=Li();return Ys=Array.isArray||function(t){return"Array"===e(t)}}function ku(){if(Js)return Zs;Js=1;var e=Math.ceil,t=Math.floor;return Zs=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Zs}function Fu(){if(eu)return Qs;eu=1;var e=ku();return Qs=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Pu(){if(nu)return tu;nu=1;var e=Fu(),t=Math.min;return tu=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Iu(){if(ou)return ru;ou=1;var e=Pu();return ru=function(t){return e(t.length)}}function _u(){if(au)return iu;au=1;var e=TypeError;return iu=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function Ru(){if(uu)return su;uu=1;var e=Wi(),t=Tu(),n=Fa();return su=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function Lu(){if(cu)return lu;cu=1;var e={};return e[Fs()("toStringTag")]="z",lu="[object z]"===String(e)}function Mu(){if(fu)return du;fu=1;var e=Lu(),t=ji(),n=Li(),r=Fs()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return du=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},du}function ju(){if(hu)return pu;hu=1;var e=Ri(),t=ji(),n=Ts(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),pu=n.inspectSource}function Hu(){if(vu)return gu;vu=1;var e=Ri(),t=Pi(),n=ji(),r=Mu(),o=ja(),i=ju(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=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 f.sham=!0,gu=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function zu(){if(yu)return mu;yu=1;var e=Bu(),t=Hu(),n=La(),r=Fs()("species"),o=Array;return mu=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},mu}function $u(){if(Eu)return bu;Eu=1;var e=zu();return bu=function(t,n){return new(e(t))(0===n?0:n)}}function Uu(){if(Cu)return wu;Cu=1;var e=Pi(),t=Fs(),n=$a(),r=t("species");return wu=function(t){return n>=51||!e(function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo})},wu}var Vu,Wu,Gu={},qu={};function Ku(){if(Wu)return Vu;Wu=1;var e=Mu(),t=String;return Vu=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Yu,Xu,Zu,Ju,Qu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,dl,fl,pl,hl={};function gl(){if(Xu)return Yu;Xu=1;var e=Fu(),t=Math.max,n=Math.min;return Yu=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Yu}function vl(){if(Ju)return Zu;Ju=1;var e=Ra(),t=gl(),n=Iu(),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 Zu={includes:r(!0),indexOf:r(!1)}}function ml(){return el?Qu:(el=1,Qu={})}function yl(){if(nl)return tl;nl=1;var e=Ri(),t=Bs(),n=Ra(),r=vl().indexOf,o=ml(),i=e([].push);return tl=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},tl}function bl(){return ol?rl:(ol=1,rl=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function El(){if(al)return il;al=1;var e=yl(),t=bl();return il=Object.keys||function(n){return e(n,t)},il}function wl(){if(sl)return hl;sl=1;var e=Wi(),t=Au(),n=Tu(),r=xu(),o=Ra(),i=El();return hl.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},hl}function Cl(){return ll?ul:(ll=1,ul=ja()("document","documentElement"))}function Dl(){if(dl)return cl;dl=1;var e=Os(),t=ks(),n=e("keys");return cl=function(e){return n[e]||(n[e]=t(e))}}function Sl(){if(pl)return fl;pl=1;var e,t=xu(),n=wl(),r=bl(),o=ml(),i=Cl(),a=_s(),s="prototype",u="script",l=Dl()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},f=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?f(e):(n=a("iframe"),o="java"+u+":",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):f(e);for(var l=r.length;l--;)delete p[s][r[l]];return p()};return o[l]=!0,fl=Object.create||function(e,r){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},fl}var Al,xl={};function Tl(){if(Al)return xl;Al=1;var e=yl(),t=bl().concat("length","prototype");return xl.f=Object.getOwnPropertyNames||function(n){return e(n,t)},xl}var Ol,Nl,Bl,kl={};function Fl(){return Nl?Ol:(Nl=1,Ol=Ri()([].slice))}function Pl(){if(Bl)return kl;Bl=1;var e=Li(),t=Ra(),n=Tl().f,r=Fl(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return kl.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},kl}var Il,_l,Rl,Ll,Ml,jl={};function Hl(){return Il||(Il=1,jl.f=Object.getOwnPropertySymbols),jl}function zl(){if(Rl)return _l;Rl=1;var e=Ou();return _l=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function $l(){if(Ml)return Ll;Ml=1;var e=Tu();return Ll=function(t,n,r){return e.f(t,n,r)}}var Ul,Vl,Wl,Gl,ql,Kl,Yl,Xl,Zl,Jl,Ql,ec,tc,nc,rc,oc,ic={};function ac(){if(Ul)return ic;Ul=1;var e=Fs();return ic.f=e,ic}function sc(){if(Wl)return Vl;Wl=1;var e=Ma(),t=Bs(),n=ac(),r=Tu().f;return Vl=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function uc(){if(ql)return Gl;ql=1;var e=Gi(),t=ja(),n=Fs(),r=zl();return Gl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=n("toPrimitive");i&&!i[s]&&r(i,s,function(t){return e(a,this)},{arity:1})}}function lc(){if(Yl)return Kl;Yl=1;var e=Lu(),t=Mu();return Kl=e?{}.toString:function(){return"[object "+t(this)+"]"}}function cc(){if(Zl)return Xl;Zl=1;var e=Lu(),t=Tu().f,n=Ou(),r=Bs(),o=lc(),i=Fs()("toStringTag");return Xl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&n(c,"toString",o))}}function dc(){if(Ql)return Jl;Ql=1;var e=Fi(),t=ji(),n=e.WeakMap;return Jl=t(n)&&/native code/.test(String(n))}function fc(){if(tc)return ec;tc=1;var e,t,n,r=dc(),o=Fi(),i=La(),a=Ou(),s=Bs(),u=Ts(),l=Dl(),c=ml(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);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 ec={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 f("Incompatible receiver, "+e+" required");return r}}}}function pc(){if(rc)return nc;rc=1;var e=js(),t=Ri(),n=Pa(),r=Ns(),o=Iu(),i=$u(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),w=n(E),C=o(w),D=e(g,v),S=0,A=m||i,x=s?A(h,C):u||f?A(h,0):void 0;C>S;S++)if((p||S in w)&&(b=D(y=w[S],S,E),t))if(s)x[S]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return nc={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}var hc,gc,vc,mc={};function yc(){return gc?hc:(gc=1,hc=Ua()&&!!Symbol.for&&!!Symbol.keyFor)}var bc,Ec={};var wc,Cc,Dc,Sc,Ac,xc,Tc,Oc={};function Nc(){if(Cc)return wc;Cc=1;var e=La(),t=fc().get;return wc=function(n){if(!e(n))return!1;var r=t(n);return!!r&&"RawJSON"===r.type},wc}function Bc(){if(Sc)return Dc;Sc=1;var e=Ri(),t=Bs(),n=SyntaxError,r=parseInt,o=String.fromCharCode,i=e("".charAt),a=e("".slice),s=e(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return Dc=function(e,d){for(var f=!0,p="";d<e.length;){var h=i(e,d);if("\\"===h){var g=a(e,d,d+2);if(t(u,g))p+=u[g],d+=2;else{if("\\u"!==g)throw new n('Unknown escape sequence: "'+g+'"');var v=a(e,d+=2,d+4);if(!s(l,v))throw new n("Bad Unicode escape at: "+d);p+=o(r(v,16)),d+=4}}else{if('"'===h){f=!1,d++;break}if(s(c,h))throw new n("Bad control character in string literal at: "+d);p+=h,d++}}if(f)throw new n("Unterminated string at: "+d);return{value:p,end:d}},Dc}function kc(){return xc?Ac:(xc=1,Ac=!Pi()(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))}var Fc,Pc,Ic={};function _c(){return Pc||(Pc=1,function(){if(oc)return qu;oc=1;var e=Nu(),t=Fi(),n=Gi(),r=Ri(),o=As(),i=Wi(),a=Ua(),s=Pi(),u=Bs(),l=Ha(),c=xu(),d=Ra(),f=Is(),p=Ku(),h=Fa(),g=Sl(),v=El(),m=Tl(),y=Pl(),b=Hl(),E=Ls(),w=Tu(),C=wl(),D=ka(),S=zl(),A=$l(),x=Os(),T=Dl(),O=ml(),N=ks(),B=Fs(),k=ac(),F=sc(),P=uc(),I=cc(),_=fc(),R=pc().forEach,L=T("hidden"),M="Symbol",j="prototype",H=_.set,z=_.getterFor(M),$=Object[j],U=t.Symbol,V=U&&U[j],W=t.RangeError,G=t.TypeError,q=t.QObject,K=E.f,Y=w.f,X=y.f,Z=D.f,J=r([].push),Q=x("symbols"),ee=x("op-symbols"),te=x("wks"),ne=!q||!q[j]||!q[j].findChild,re=function(e,t,n){var r=K($,t);r&&delete $[t],Y(e,t,n),r&&e!==$&&Y($,t,r)},oe=i&&s(function(){return 7!==g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a})?re:Y,ie=function(e,t){var n=Q[e]=g(V);return H(n,{type:M,tag:e,description:t}),i||(n.description=t),n},ae=function(e,t,n){e===$&&ae(ee,t,n),c(e);var r=f(t);return c(n),u(Q,r)?(n.enumerable?(u(e,L)&&e[L][r]&&(e[L][r]=!1),n=g(n,{enumerable:h(0,!1)})):(u(e,L)||Y(e,L,h(1,g(null))),e[L][r]=!0),oe(e,r,n)):Y(e,r,n)},se=function(e,t){c(e);var r=d(t),o=v(r).concat(de(r));return R(o,function(t){i&&!n(ue,r,t)||ae(e,t,r[t])}),e},ue=function(e){var t=f(e),r=n(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(r||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||r)},le=function(e,t){var n=d(e),r=f(t);if(n!==$||!u(Q,r)||u(ee,r)){var o=K(n,r);return!o||!u(Q,r)||u(n,L)&&n[L][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),n=[];return R(t,function(e){u(Q,e)||u(O,e)||J(n,e)}),n},de=function(e){var t=e===$,n=X(t?ee:d(e)),r=[];return R(n,function(e){!u(Q,e)||t&&!u($,e)||J(r,Q[e])}),r};a||(U=function(){if(l(V,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=N(e),o=function(e){var i=void 0===this?t:this;i===$&&n(o,ee,e),u(i,L)&&u(i[L],r)&&(i[L][r]=!1);var a=h(1,e);try{oe(i,r,a)}catch(e){if(!(e instanceof W))throw e;re(i,r,a)}};return i&&ne&&oe($,r,{configurable:!0,set:o}),ie(r,e)},S(V=U[j],"toString",function(){return z(this).tag}),S(U,"withoutSetter",function(e){return ie(N(e),e)}),D.f=ue,w.f=ae,C.f=se,E.f=le,m.f=y.f=ce,b.f=de,k.f=function(e){return ie(B(e),e)},i&&(A(V,"description",{configurable:!0,get:function(){return z(this).description}}),o||S($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:U}),R(v(te),function(e){F(e)}),e({target:M,stat:!0,forced:!a},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!i},{create:function(e,t){return void 0===t?g(e):se(g(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ce}),P(),I(U,M),O[L]=!0}(),function(){if(vc)return mc;vc=1;var e=Nu(),t=ja(),n=Bs(),r=Ku(),o=Os(),i=yc(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=r(e);if(n(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(bc)return Ec;bc=1;var e=Nu(),t=Bs(),n=Wa(),r=Ga(),o=Os(),i=yc(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!n(e))throw new TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Tc)return Oc;Tc=1;var e=Nu(),t=ja(),n=_i(),r=Gi(),o=Ri(),i=Pi(),a=Bu(),s=ji(),u=Nc(),l=Wa(),c=Li(),d=Ku(),f=Fl(),p=Bc(),h=ks(),g=Ua(),v=kc(),m=String,y=t("JSON","stringify"),b=o(/./.exec),E=o("".charAt),w=o("".charCodeAt),C=o("".replace),D=o("".slice),S=o([].push),A=o(1.1.toString),x=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,O=/^[\uDC00-\uDFFF]$/,N=h(),B=N.length,k=!g||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),F=i(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),P=k?function(e,t){var o=f(arguments),i=_(t);if(s(i)||void 0!==e&&!l(e))return o[1]=function(e,t){if(s(i)&&(t=r(i,this,m(e),t)),!l(t))return t},n(y,null,o)}:y,I=function(e,t,n){var r=E(n,t-1),o=E(n,t+1);return b(T,e)&&!b(O,o)||b(O,e)&&!b(T,r)?"\\u"+A(w(e,0),16):e},_=function(e){if(s(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];"string"==typeof o?S(n,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||S(n,d(o))}var i=n.length,u=!0;return function(e,t){if(u)return u=!1,t;if(a(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}};y&&e({target:"JSON",stat:!0,arity:3,forced:k||F||!v},{stringify:function(e,t,n){var o=_(t),i=[],a=P(e,function(e,t){var n=s(o)?r(o,this,m(e),t):t;return!v&&u(n)?N+(S(i,n.rawJSON)-1):n},n);if("string"!=typeof a)return a;if(F&&(a=C(a,x,I)),v)return a;for(var l="",c=a.length,d=0;d<c;d++){var f=E(a,d);if('"'===f){var h=p(a,++d).end-1,g=D(a,d,h);l+=D(g,0,B)===N?i[D(g,B)]:'"'+g+'"',d=h}else l+=f}return l}})}(),function(){if(Fc)return Ic;Fc=1;var e=Nu(),t=Ua(),n=Pi(),r=Hl(),o=Ns();e({target:"Object",stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(o(e)):[]}})}()),Gu}var Rc,Lc={};function Mc(){return Rc||(Rc=1,sc()("asyncDispose")),Lc}var jc;var Hc,zc={};function $c(){return Hc||(Hc=1,sc()("dispose")),zc}var Uc;var Vc;var Wc,Gc={};function qc(){return Wc||(Wc=1,sc()("iterator")),Gc}var Kc;var Yc;var Xc;var Zc;var Jc;var Qc;var ed,td={};var nd,rd={};var od;var id,ad,sd,ud={};function ld(){return sd?ad:(sd=1,function(){if(Du)return ki;Du=1;var e=Nu(),t=Pi(),n=Bu(),r=La(),o=Ns(),i=Iu(),a=_u(),s=Ru(),u=$u(),l=Uu(),c=Fs(),d=$a(),f=c("isConcatSpreadable"),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),h=function(e){if(!r(e))return!1;var t=e[f];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!p||!l("concat")},{concat:function(e){var t,n,r,l,c,d=o(this),f=u(d,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(h(c=-1===t?d:arguments[t]))for(l=i(c),a(p+l),n=0;n<l;n++,p++)n in c&&s(f,p,c[n]);else a(p+1),s(f,p++,c);return f.length=p,f}})}(),_c(),Mc(),jc||(jc=1,sc()("asyncIterator")),$c(),Uc||(Uc=1,sc()("hasInstance")),Vc||(Vc=1,sc()("isConcatSpreadable")),qc(),Kc||(Kc=1,sc()("match")),Yc||(Yc=1,sc()("matchAll")),Xc||(Xc=1,sc()("replace")),Zc||(Zc=1,sc()("search")),Jc||(Jc=1,sc()("species")),Qc||(Qc=1,sc()("split")),function(){if(ed)return td;ed=1;var e=sc(),t=uc();e("toPrimitive"),t()}(),function(){if(nd)return rd;nd=1;var e=ja(),t=sc(),n=cc();t("toStringTag"),n(e("Symbol"),"Symbol")}(),od||(od=1,sc()("unscopables")),function(){if(id)return ud;id=1;var e=Fi();cc()(e.JSON,"JSON",!0)}(),ad=Ma().Symbol)}var cd,dd,fd,pd,hd,gd,vd,md,yd,bd,Ed,wd,Cd,Dd,Sd,Ad,xd,Td,Od,Nd,Bd,kd,Fd,Pd,Id,_d,Rd,Ld,Md,jd,Hd,zd,$d,Ud={};function Vd(){return dd?cd:(dd=1,cd=function(){})}function Wd(){return pd?fd:(pd=1,fd={})}function Gd(){if(gd)return hd;gd=1;var e=Wi(),t=Bs(),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 hd={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function qd(){return md||(md=1,vd=!Pi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),vd}function Kd(){if(bd)return yd;bd=1;var e=Bs(),t=ji(),n=Ns(),r=Dl(),o=qd(),i=r("IE_PROTO"),a=Object,s=a.prototype;return yd=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},yd}function Yd(){if(wd)return Ed;wd=1;var e,t,n,r=Pi(),o=ji(),i=La(),a=Sl(),s=Kd(),u=zl(),l=Fs(),c=As(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Ed={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Xd(){if(Dd)return Cd;Dd=1;var e=Yd().IteratorPrototype,t=Sl(),n=Fa(),r=cc(),o=Wd(),i=function(){return this};return Cd=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 Zd(){if(Ad)return Sd;Ad=1;var e=Ri(),t=qa();return Sd=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}function Jd(){if(Td)return xd;Td=1;var e=La();return xd=function(t){return e(t)||null===t}}function Qd(){if(Nd)return Od;Nd=1;var e=Jd(),t=String,n=TypeError;return Od=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function ef(){if(kd)return Bd;kd=1;var e=Zd(),t=La(),n=_a(),r=Qd();return Bd=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),Bd}function tf(){if(Pd)return Fd;Pd=1;var e=Nu(),t=Gi(),n=As(),r=Gd(),o=ji(),i=Xd(),a=Kd(),s=ef(),u=cc(),l=Ou(),c=zl(),d=Fs(),f=Wd(),p=Yd(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",C=function(){return this};return Fd=function(r,d,p,D,S,A,x){i(p,d,D);var T,O,N,B=function(e){if(e===S&&_)return _;if(!m&&e&&e in P)return P[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,P=r.prototype,I=P[y]||P["@@iterator"]||S&&P[S],_=!m&&I||B(S),R="Array"===d&&P.entries||I;if(R&&(T=a(R.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,C)),u(T,k,!0,!0),n&&(f[k]=C)),h&&S===E&&I&&I.name!==E&&(!n&&g?l(P,"name",E):(F=!0,_=function(){return t(I,this)})),S)if(O={values:B(E),keys:A?_:B(b),entries:B(w)},x)for(N in O)(m||F||!(N in P))&&c(P,N,O[N]);else e({target:d,proto:!0,forced:m||F},O);return n&&!x||P[y]===_||c(P,y,_,{name:S}),f[d]=_,O}}function nf(){return _d?Id:(_d=1,Id=function(e,t){return{value:e,done:t}})}function rf(){if(Ld)return Rd;Ld=1;var e=Ra(),t=Vd(),n=Wd(),r=fc(),o=Tu().f,i=tf(),a=nf(),s=As(),u=Wi(),l="Array Iterator",c=r.set,d=r.getterFor(l);Rd=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(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 f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return Rd}function of(){return jd?Md:(jd=1,Md={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 af(){if(Hd)return Ud;Hd=1,rf();var e=of(),t=Fi(),n=cc(),r=Wd();for(var o in e)n(t[o],o),r[o]=r.Array;return Ud}function sf(){if($d)return zd;$d=1;var e=ld();return af(),zd=e}var uf,lf={};var cf;var df;var ff,pf,hf;function gf(){if(hf)return pf;hf=1;var e=sf();return function(){if(uf)return lf;uf=1;var e=Fs(),t=Tu().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),cf||(cf=1,Mc()),df||(df=1,$c()),ff||(ff=1,sc()("metadata")),pf=e}var vf,mf,yf;function bf(){if(mf)return vf;mf=1;var e=ja(),t=Ri(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return vf=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var Ef,wf,Cf;function Df(){if(wf)return Ef;wf=1;for(var e=Os(),t=ja(),n=Ri(),r=Wa(),o=Fs(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=n(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var p=d[c];r(i[p])&&o(p)}catch(e){}return Ef=function(e){if(a&&a(e))return!0;try{for(var t=u(e),n=0,r=s(l),o=r.length;n<o;n++)if(l[r[n]]==t)return!0}catch(e){}return!1},Ef}var Sf;var Af;var xf;var Tf;var Of;var Nf;var Bf;var kf,Ff,Pf,If,_f;function Rf(){if(Pf)return Ff;Pf=1;var e=gf();return yf||(yf=1,Nu()({target:"Symbol",stat:!0},{isRegisteredSymbol:bf()})),Cf||(Cf=1,Nu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Df()})),Sf||(Sf=1,sc()("customMatcher")),Af||(Af=1,sc()("observable")),xf||(xf=1,Nu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:bf()})),Tf||(Tf=1,Nu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Df()})),Of||(Of=1,sc()("matcher")),Nf||(Nf=1,sc()("metadataKey")),Bf||(Bf=1,sc()("patternMatch")),kf||(kf=1,sc()("replaceAll")),Ff=e}function Lf(){return _f?If:(_f=1,If=Rf())}var Mf,jf,Hf,zf,$f,Uf,Vf,Wf,Gf,qf,Kf,Yf,Xf,Zf=E(Lf()),Jf={};function Qf(){if(jf)return Mf;jf=1;var e=Ri(),t=Fu(),n=Ku(),r=_a(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Mf={codeAt:s(!1),charAt:s(!0)}}function ep(){return $f?zf:($f=1,rf(),function(){if(Hf)return Jf;Hf=1;var e=Qf().charAt,t=Ku(),n=fc(),r=tf(),o=nf(),i="String Iterator",a=n.set,s=n.getterFor(i);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))})}(),qc(),zf=ac().f("iterator"))}function tp(){if(Vf)return Uf;Vf=1;var e=ep();return af(),Uf=e}function np(){return Gf?Wf:(Gf=1,Wf=tp())}function rp(){return Kf?qf:(Kf=1,qf=np())}function op(){return Xf?Yf:(Xf=1,Yf=rp())}var ip=E(op());function ap(e){return ap="function"==typeof Zf&&"symbol"==typeof ip?function(e){return typeof e}:function(e){return e&&"function"==typeof Zf&&e.constructor===Zf&&e!==Zf.prototype?"symbol":typeof e},ap(e)}var sp,up={};if(function(){if(sp)return up;sp=1;var e=pr(),t=C(),n=N(),r=vn().f,o=xe();e({target:"Object",stat:!0,forced:!o||t(function(){r(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":ap(global))){var lp=Object.getOwnPropertyDescriptor(global,"window");global.window&&!lp.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}var cp,dp={},fp={};function pp(){if(cp)return fp;
|
|
2
|
-
/*!
|
|
3
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
|
-
* Released under the MIT License.
|
|
7
|
-
*/
|
|
8
|
-
function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return cp=1,Object.defineProperty(fp,"__esModule",{value:!0}),fp.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},fp}var hp,gp,vp,mp={exports:{}},yp={};function bp(){if(hp)return yp;function e(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(e){return"'"+e+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(e){return!!e&&!!e[G]}function n(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===K}(e)||Array.isArray(e)||!!e[W]||!!(null===(t=e.constructor)||void 0===t?void 0:t[W])||l(e)||c(e))}function r(e,t,n){void 0===n&&(n=!1),0===o(e)?(n?Object.keys:Y)(e).forEach(function(r){n&&"symbol"==typeof r||t(r,e[r],e)}):e.forEach(function(n,r){return t(r,n,e)})}function o(e){var t=e[G];return t?t.t>3?t.t-4:t.t:Array.isArray(e)?1:l(e)?2:c(e)?3:0}function i(e,t){return 2===o(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a(e,t){return 2===o(e)?e.get(t):e[t]}function s(e,t,n){var r=o(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function l(e){return z&&e instanceof Map}function c(e){return $&&e instanceof Set}function d(e){return e.i||e.u}function f(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X(e);delete t[G];for(var n=Y(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function p(e,i){return void 0===i&&(i=!1),g(e)||t(e)||!n(e)||(o(e)>1&&(e.set=e.add=e.clear=e.delete=h),Object.freeze(e),i&&r(e,function(e,t){return p(t,!0)},!0)),e}function h(){e(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(t){var n=Z[t];return n||e(18,t),n}function m(e,t){Z[e]||(Z[e]=t)}function y(){return j}function b(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function E(e){w(e),e.p.forEach(D),e.p=null}function w(e){e===j&&(j=e.l)}function C(e){return j={p:[],l:j,h:e,_:!0,m:0}}function D(e){var t=e[G];0===t.t||1===t.t?t.j():t.O=!0}function S(t,r){r.m=r.p.length;var o=r.p[0],i=void 0!==t&&t!==o;return r.h.S||v("ES5").P(r,t,i),i?(o[G].g&&(E(r),e(4)),n(t)&&(t=A(r,t),r.l||T(r,t)),r.o&&v("Patches").M(o[G].u,t,r.o,r.v)):t=A(r,o,[]),E(r),r.o&&r.s(r.o,r.v),t!==V?t:void 0}function A(e,t,n){if(g(t))return t;var o=t[G];if(!o)return r(t,function(r,i){return x(e,o,t,r,i,n)},!0),t;if(o.A!==e)return t;if(!o.g)return T(e,o.u,!0),o.u;if(!o.R){o.R=!0,o.A.m--;var i=4===o.t||5===o.t?o.i=f(o.k):o.i,a=i,s=!1;3===o.t&&(a=new Set(i),i.clear(),s=!0),r(a,function(t,r){return x(e,o,i,t,r,n,s)}),T(e,i,!1),n&&e.o&&v("Patches").F(o,n,e.o,e.v)}return o.i}function x(e,r,o,a,u,l,c){if(t(u)){var d=A(e,u,l&&r&&3!==r.t&&!i(r.N,a)?l.concat(a):void 0);if(s(o,a,d),!t(d))return;e._=!1}else c&&o.add(u);if(n(u)&&!g(u)){if(!e.h.D&&e.m<1)return;A(e,u),r&&r.A.l||T(e,u)}}function T(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e._&&p(t,n)}function O(e,t){var n=e[G];return(n?d(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function B(e){e.g||(e.g=!0,e.l&&B(e.l))}function k(e){e.i||(e.i=f(e.u))}function F(e,t,n){var r=l(t)?v("MapSet").K(t,n):c(t)?v("MapSet").$(t,n):e.S?function(e,t){var n=Array.isArray(e),r={t:n?1:0,A:t?t.A:y(),g:!1,R:!1,N:{},l:t,u:e,k:null,i:null,j:null,C:!1},o=r,i=J;n&&(o=[r],i=Q);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):v("ES5").I(t,n);return(n?n.A:y()).p.push(r),r}function P(i){return t(i)||e(22,i),function e(t){if(!n(t))return t;var i,u=t[G],l=o(t);if(u){if(!u.g&&(u.t<4||!v("ES5").J(u)))return u.u;u.R=!0,i=I(t,l),u.R=!1}else i=I(t,l);return r(i,function(t,n){u&&a(u.u,t)===n||s(i,t,e(n))}),3===l?new Set(i):i}(i)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f(e)}function _(){function e(e,t){var n=s[e];return n?n.enumerable=t:s[e]=n={configurable:!0,enumerable:t,get:function(){return J.get(this[G],e)},set:function(t){J.set(this[G],e,t)}},n}function n(e){for(var t=e.length-1;t>=0;t--){var n=e[t][G];if(!n.g)switch(n.t){case 5:a(n)&&B(n);break;case 4:o(n)&&B(n)}}}function o(e){for(var t=e.u,n=e.k,r=Y(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==G){var s=t[a];if(void 0===s&&!i(t,a))return!0;var l=n[a],c=l&&l[G];if(c?c.u!==s:!u(l,s))return!0}}var d=!!t[G];return r.length!==Y(t).length+(d?0:1)}function a(e){var t=e.k;if(t.length!==e.u.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var s={};m("ES5",{I:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=X(n);delete i[G];for(var a=Y(i),s=0;s<a.length;s++){var u=a[s];i[u]=e(u,t||!!i[u].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={t:r?5:4,A:n?n.A:y(),g:!1,R:!1,N:{},l:n,u:t,k:o,i:null,O:!1,C:!1};return Object.defineProperty(o,G,{value:i,writable:!0}),o},P:function(e,o,s){s?t(o)&&o[G].A===e&&n(e.p):(e.o&&function e(t){if(t&&"object"==typeof t){var n=t[G];if(n){var o=n.u,s=n.k,u=n.N,l=n.t;if(4===l)r(s,function(t){t!==G&&(void 0!==o[t]||i(o,t)?u[t]||e(s[t]):(u[t]=!0,B(n)))}),r(o,function(e){void 0!==s[e]||i(s,e)||(u[e]=!1,B(n))});else if(5===l){if(a(n)&&(B(n),u.length=!0),s.length<o.length)for(var c=s.length;c<o.length;c++)u[c]=!1;else for(var d=o.length;d<s.length;d++)u[d]=!0;for(var f=Math.min(s.length,o.length),p=0;p<f;p++)s.hasOwnProperty(p)||(u[p]=!0),void 0===u[p]&&e(s[p])}}}}(e.p[0]),n(e.p))},J:function(e){return 4===e.t?o(e):a(e)}})}function R(){function s(e){if(!n(e))return e;if(Array.isArray(e))return e.map(s);if(l(e))return new Map(Array.from(e.entries()).map(function(e){return[e[0],s(e[1])]}));if(c(e))return new Set(Array.from(e).map(s));var t=Object.create(Object.getPrototypeOf(e));for(var r in e)t[r]=s(e[r]);return i(e,W)&&(t[W]=e[W]),t}function u(e){return t(e)?s(e):e}var d="add";m("Patches",{W:function(t,n){return n.forEach(function(n){for(var r=n.path,i=n.op,u=t,l=0;l<r.length-1;l++){var c=o(u),f=r[l];"string"!=typeof f&&"number"!=typeof f&&(f=""+f),0!==c&&1!==c||"__proto__"!==f&&"constructor"!==f||e(24),"function"==typeof u&&"prototype"===f&&e(24),"object"!=typeof(u=a(u,f))&&e(15,r.join("/"))}var p=o(u),h=s(n.value),g=r[r.length-1];switch(i){case"replace":switch(p){case 2:return u.set(g,h);case 3:e(16);default:return u[g]=h}case d:switch(p){case 1:return"-"===g?u.push(h):u.splice(g,0,h);case 2:return u.set(g,h);case 3:return u.add(h);default:return u[g]=h}case"remove":switch(p){case 1:return u.splice(g,1);case 2:return u.delete(g);case 3:return u.delete(n.value);default:return delete u[g]}default:e(17,i)}}),t},F:function(e,t,n,o){switch(e.t){case 0:case 4:case 2:return function(e,t,n,o){var s=e.u,l=e.i;r(e.N,function(e,r){var c=a(s,e),f=a(l,e),p=r?i(s,e)?"replace":d:"remove";if(c!==f||"replace"!==p){var h=t.concat(e);n.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:f}),o.push(p===d?{op:"remove",path:h}:"remove"===p?{op:d,path:h,value:u(c)}:{op:"replace",path:h,value:u(c)})}})}(e,t,n,o);case 5:case 1:return function(e,t,n,r){var o=e.u,i=e.N,a=e.i;if(a.length<o.length){var s=[a,o];o=s[0],a=s[1];var l=[r,n];n=l[0],r=l[1]}for(var c=0;c<o.length;c++)if(i[c]&&a[c]!==o[c]){var f=t.concat([c]);n.push({op:"replace",path:f,value:u(a[c])}),r.push({op:"replace",path:f,value:u(o[c])})}for(var p=o.length;p<a.length;p++){var h=t.concat([p]);n.push({op:d,path:h,value:u(a[p])})}o.length<a.length&&r.push({op:"replace",path:t.concat(["length"]),value:o.length})}(e,t,n,o);case 3:return function(e,t,n,r){var o=e.u,i=e.i,a=0;o.forEach(function(e){if(!i.has(e)){var o=t.concat([a]);n.push({op:"remove",path:o,value:e}),r.unshift({op:d,path:o,value:e})}a++}),a=0,i.forEach(function(e){if(!o.has(e)){var i=t.concat([a]);n.push({op:d,path:i,value:e}),r.unshift({op:"remove",path:i,value:e})}a++})}(e,t,n,o)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===V?void 0:t}),r.push({op:"replace",path:[],value:e})}})}function L(){function t(e,t){function n(){this.constructor=e}s(e,t),e.prototype=(n.prototype=t.prototype,new n)}function o(e){e.i||(e.N=new Map,e.i=new Map(e.u))}function i(e){e.i||(e.i=new Set,e.u.forEach(function(t){if(n(t)){var r=F(e.A.h,t,e);e.p.set(t,r),e.i.add(r)}else e.i.add(t)}))}function a(t){t.O&&e(3,JSON.stringify(d(t)))}var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},u=function(){function e(e,t){return this[G]={t:2,l:t,A:t?t.A:y(),g:!1,R:!1,i:void 0,N:void 0,u:e,k:this,C:!1,O:!1},this}t(e,Map);var i=e.prototype;return Object.defineProperty(i,"size",{get:function(){return d(this[G]).size}}),i.has=function(e){return d(this[G]).has(e)},i.set=function(e,t){var n=this[G];return a(n),d(n).has(e)&&d(n).get(e)===t||(o(n),B(n),n.N.set(e,!0),n.i.set(e,t),n.N.set(e,!0)),this},i.delete=function(e){if(!this.has(e))return!1;var t=this[G];return a(t),o(t),B(t),t.u.has(e)?t.N.set(e,!1):t.N.delete(e),t.i.delete(e),!0},i.clear=function(){var e=this[G];a(e),d(e).size&&(o(e),B(e),e.N=new Map,r(e.u,function(t){e.N.set(t,!1)}),e.i.clear())},i.forEach=function(e,t){var n=this;d(this[G]).forEach(function(r,o){e.call(t,n.get(o),o,n)})},i.get=function(e){var t=this[G];a(t);var r=d(t).get(e);if(t.R||!n(r))return r;if(r!==t.u.get(e))return r;var i=F(t.A.h,r,t);return o(t),t.i.set(e,i),i},i.keys=function(){return d(this[G]).keys()},i.values=function(){var e,t=this,n=this.keys();return(e={})[q]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},i.entries=function(){var e,t=this,n=this.keys();return(e={})[q]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},i[q]=function(){return this.entries()},e}(),l=function(){function e(e,t){return this[G]={t:3,l:t,A:t?t.A:y(),g:!1,R:!1,i:void 0,u:e,k:this,p:new Map,O:!1,C:!1},this}t(e,Set);var n=e.prototype;return Object.defineProperty(n,"size",{get:function(){return d(this[G]).size}}),n.has=function(e){var t=this[G];return a(t),t.i?!!t.i.has(e)||!(!t.p.has(e)||!t.i.has(t.p.get(e))):t.u.has(e)},n.add=function(e){var t=this[G];return a(t),this.has(e)||(i(t),B(t),t.i.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[G];return a(t),i(t),B(t),t.i.delete(e)||!!t.p.has(e)&&t.i.delete(t.p.get(e))},n.clear=function(){var e=this[G];a(e),d(e).size&&(i(e),B(e),e.i.clear())},n.values=function(){var e=this[G];return a(e),i(e),e.i.values()},n.entries=function(){var e=this[G];return a(e),i(e),e.i.entries()},n.keys=function(){return this.values()},n[q]=function(){return this.values()},n.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},e}();m("MapSet",{K:function(e,t){return new u(e,t)},$:function(e,t){return new l(e,t)}})}var M;hp=1,Object.defineProperty(yp,"__esModule",{value:!0});var j,H="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),z="undefined"!=typeof Map,$="undefined"!=typeof Set,U="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=H?Symbol.for("immer-nothing"):((M={})["immer-nothing"]=!0,M),W=H?Symbol.for("immer-draftable"):"__$immer_draftable",G=H?Symbol.for("immer-state"):"__$immer_state",q="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",K=""+Object.prototype.constructor,Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Z={},J={get:function(e,t){if(t===G)return e;var r=d(e);if(!i(r,t))return function(e,t,n){var r,o=N(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,r,t);var o=r[t];return e.R||!n(o)?o:o===O(e.u,t)?(k(e),e.i[t]=F(e.A.h,o,e)):o},has:function(e,t){return t in d(e)},ownKeys:function(e){return Reflect.ownKeys(d(e))},set:function(e,t,n){var r=N(d(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.g){var o=O(d(e),t),a=null==o?void 0:o[G];if(a&&a.u===n)return e.i[t]=n,e.N[t]=!1,!0;if(u(n,o)&&(void 0!==n||i(e.u,t)))return!0;k(e),B(e)}return e.i[t]===n&&(void 0!==n||t in e.i)||Number.isNaN(n)&&Number.isNaN(e.i[t])||(e.i[t]=n,e.N[t]=!0),!0},deleteProperty:function(e,t){return void 0!==O(e.u,t)||t in e.u?(e.N[t]=!1,k(e),B(e)):delete e.N[t],e.i&&delete e.i[t],!0},getOwnPropertyDescriptor:function(e,t){var n=d(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.t||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){e(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.u)},setPrototypeOf:function(){e(12)}},Q={};r(J,function(e,t){Q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Q.deleteProperty=function(e,t){return Q.set.call(this,e,t,void 0)},Q.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var ee=function(){function r(t){var r=this;this.S=U,this.D=!0,this.produce=function(t,o,i){if("function"==typeof t&&"function"!=typeof o){var a=o;o=t;var s=r;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return s.produce(e,function(e){var n;return(n=o).call.apply(n,[t,e].concat(r))})}}var u;if("function"!=typeof o&&e(6),void 0!==i&&"function"!=typeof i&&e(7),n(t)){var l=C(r),c=F(r,t,void 0),d=!0;try{u=o(c),d=!1}finally{d?E(l):w(l)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then(function(e){return b(l,i),S(e,l)},function(e){throw E(l),e}):(b(l,i),S(u,l))}if(!t||"object"!=typeof t){if(void 0===(u=o(t))&&(u=t),u===V&&(u=void 0),r.D&&p(u,!0),i){var f=[],h=[];v("Patches").M(t,u,f,h),i(f,h)}return u}e(21,t)},this.produceWithPatches=function(e,t){if("function"==typeof e)return function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return r.produceWithPatches(t,function(t){return e.apply(void 0,[t].concat(o))})};var n,o,i=r.produce(e,t,function(e,t){n=e,o=t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(function(e){return[e,n,o]}):[i,n,o]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=r.prototype;return o.createDraft=function(r){n(r)||e(8),t(r)&&(r=P(r));var o=C(this),i=F(this,r,void 0);return i[G].C=!0,w(o),i},o.finishDraft=function(e,t){var n=(e&&e[G]).A;return b(n,t),S(void 0,n)},o.setAutoFreeze=function(e){this.D=e},o.setUseProxies=function(t){t&&!U&&e(20),this.S=t},o.applyPatches=function(e,n){var r;for(r=n.length-1;r>=0;r--){var o=n[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(n=n.slice(r+1));var i=v("Patches").W;return t(e)?i(e,n):this.produce(e,function(e){return i(e,n)})},r}(),te=new ee,ne=te.produce,re=te.produceWithPatches.bind(te),oe=te.setAutoFreeze.bind(te),ie=te.setUseProxies.bind(te),ae=te.applyPatches.bind(te),se=te.createDraft.bind(te),ue=te.finishDraft.bind(te);return yp.Immer=ee,yp.applyPatches=ae,yp.castDraft=function(e){return e},yp.castImmutable=function(e){return e},yp.createDraft=se,yp.current=P,yp.default=ne,yp.enableAllPlugins=function(){_(),L(),R()},yp.enableES5=_,yp.enableMapSet=L,yp.enablePatches=R,yp.finishDraft=ue,yp.freeze=p,yp.immerable=W,yp.isDraft=t,yp.isDraftable=n,yp.nothing=V,yp.original=function(n){return t(n)||e(23,n),n[G].u},yp.produce=ne,yp.produceWithPatches=re,yp.setAutoFreeze=oe,yp.setUseProxies=ie,yp}function Ep(){return gp||(gp=1,mp.exports=bp()),mp.exports}function wp(){if(vp)return dp;vp=1,Object.defineProperty(dp,"__esModule",{value:!0});var e=pp(),t=Ep();function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r(function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0});n(o);var i=r(function(e){e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0});n(i);var a=r(function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0});n(a);var s=r(function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0});n(s);var u=r(function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0});n(u);var l=n(r(function(e){e.exports=function(e){return i(e)||a(e)||s(e)||u()},e.exports.default=e.exports,e.exports.__esModule=!0})),c=r(function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0});n(c);var d=r(function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0});n(d);var f=r(function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0});n(f);var p=r(function(e){e.exports=function(e,t){return c(e)||d(e,t)||s(e,t)||f()},e.exports.default=e.exports,e.exports.__esModule=!0}),h=n(p),g=n(r(function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})),v=new WeakMap,m=new WeakMap,y=new WeakMap,b=new WeakMap,E=new WeakMap,w=new WeakMap,C=new WeakMap;function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function A(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=r(function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0});n(T);var O=r(function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=T(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0}),N=n(O);function B(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F,P=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!n,o=n?j(e):e,i=F.None,a=F.None,s=0,u=null,l=B(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,d=c.codePointAt(0);if(!d)break;var f=Z(c,d),p=h(r?[a,f]:[f,i],2);if(i=p[0],a=p[1],J(i,F.ZWJ)&&J(a,F.ExtPict)&&!ne(r?e.substring(0,s):e.substring(0,e.length-s)))break;if(J(i,F.RI)&&J(a,F.RI)&&!(u=null!==u?!u:!!r||oe(e.substring(0,e.length-s))))break;if(i!==F.None&&a!==F.None&&ee(i,a))break;s+=c.length}}catch(e){l.e(e)}finally{l.f()}return s||1},I=/\s/,_=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,R=/['\u2018\u2019]/,L=function(e,t,n){if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},M=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(I.test(t))return!1;if(R.test(t)){var o=P(n,r),i=L(n,o,r),a=h(i,2);if(e(a[0],a[1],r))return!0}return!_.test(t)},j=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(z(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(H(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},H=function(e){return e>=55296&&e<=56319},z=function(e){return e>=56320&&e<=57343};!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(F||(F={}));var $=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,U=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,V=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,W=/^[\u1100-\u115F\uA960-\uA97C]$/,G=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,q=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,K=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Y=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,X=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Z=function(e,t){var n=F.Any;return-1!==e.search($)&&(n|=F.Extend),8205===t&&(n|=F.ZWJ),t>=127462&&t<=127487&&(n|=F.RI),-1!==e.search(U)&&(n|=F.Prepend),-1!==e.search(V)&&(n|=F.SpacingMark),-1!==e.search(W)&&(n|=F.L),-1!==e.search(G)&&(n|=F.V),-1!==e.search(q)&&(n|=F.T),-1!==e.search(K)&&(n|=F.LV),-1!==e.search(Y)&&(n|=F.LVT),-1!==e.search(X)&&(n|=F.ExtPict),n};function J(e,t){return 0!==(e&t)}var Q=[[F.L,F.L|F.V|F.LV|F.LVT],[F.LV|F.V,F.V|F.T],[F.LVT|F.T,F.T],[F.Any,F.Extend|F.ZWJ],[F.Any,F.SpacingMark],[F.Prepend,F.Any],[F.ZWJ,F.ExtPict],[F.RI,F.RI]];function ee(e,t){return-1===Q.findIndex(function(n){return J(e,n[0])&&J(t,n[1])})}var te=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,ne=function(e){return-1!==e.search(te)},re=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,oe=function(e){var t=e.match(re);return null!==t&&t[0].length/2%2==1},ie=function(t){return e.isPlainObject(t)&&Ce.isNodeList(t.children)&&!he.isEditor(t)},ae={isAncestor:function(t){return e.isPlainObject(t)&&Ce.isNodeList(t.children)},isElement:ie,isElementList:function(e){return Array.isArray(e)&&e.every(function(e){return ae.isElement(e)})},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return ie(e)&&e[n]===t},matches:function(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},se=["text"],ue=["text"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function de(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fe(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pe=new WeakMap,he={above:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.voids,r=void 0!==n&&n,o=t.mode,i=void 0===o?"lowest":o,a=t.at,s=void 0===a?e.selection:a,u=t.match;if(s){var l,c=he.path(e,s),d="lowest"===i,f=de(he.levels(e,{at:c,voids:r,match:u,reverse:d}));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(!We.isText(g)&&!xe.equals(c,v))return[g,v]}}catch(e){f.e(e)}finally{f.f()}}},addMark:function(e,t,n){e.addMark(t,n)},after:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.point(e,t,{edge:"end"}),focus:he.end(e,[])},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},before:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.start(e,[]),focus:he.point(e,t,{edge:"start"})},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i,reverse:!0})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteBackward(n)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteForward(n)},deleteFragment:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,n=void 0===t?"forward":t;e.deleteFragment(n)},edges:function(e,t){return[he.start(e,t),he.end(e,t)]},end:function(e,t){return he.point(e,t,{edge:"end"})},first:function(e,t){var n=he.path(e,t,{edge:"start"});return he.node(e,n)},fragment:function(e,t){var n=he.range(e,t),r=Ce.fragment(e,n);return r},hasBlocks:function(e,t){return t.children.some(function(t){return he.isBlock(e,t)})},hasInlines:function(e,t){return t.children.some(function(t){return We.isText(t)||he.isInline(e,t)})},hasTexts:function(e,t){return t.children.every(function(e){return We.isText(e)})},insertBreak:function(e){e.insertBreak()},insertSoftBreak:function(e){e.insertSoftBreak()},insertFragment:function(e,t){e.insertFragment(t)},insertNode:function(e,t){e.insertNode(t)},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return ae.isElement(t)&&!e.isInline(t)},isEditor:function(t){var n=pe.get(t);if(void 0!==n)return n;if(!e.isPlainObject(t))return!1;var r="function"==typeof t.addMark&&"function"==typeof t.apply&&"function"==typeof t.deleteBackward&&"function"==typeof t.deleteForward&&"function"==typeof t.deleteFragment&&"function"==typeof t.insertBreak&&"function"==typeof t.insertSoftBreak&&"function"==typeof t.insertFragment&&"function"==typeof t.insertNode&&"function"==typeof t.insertText&&"function"==typeof t.isInline&&"function"==typeof t.isVoid&&"function"==typeof t.normalizeNode&&"function"==typeof t.onChange&&"function"==typeof t.removeMark&&"function"==typeof t.getDirtyPaths&&(null===t.marks||e.isPlainObject(t.marks))&&(null===t.selection||Ie.isRange(t.selection))&&Ce.isNodeList(t.children)&&Ae.isOperationList(t.operations);return pe.set(t,r),r},isEnd:function(e,t,n){var r=he.end(e,n);return Be.equals(t,r)},isEdge:function(e,t,n){return he.isStart(e,t,n)||he.isEnd(e,t,n)},isEmpty:function(e,t){var n=t.children,r=h(n,1)[0];return 0===n.length||1===n.length&&We.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:function(e,t){return ae.isElement(t)&&e.isInline(t)},isNormalizing:function(e){var t=b.get(e);return void 0===t||t},isStart:function(e,t,n){if(0!==t.offset)return!1;var r=he.start(e,n);return Be.equals(t,r)},isVoid:function(e,t){return ae.isElement(t)&&e.isVoid(t)},last:function(e,t){var n=he.path(e,t,{edge:"end"});return he.node(e,n)},leaf:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n);return[Ce.leaf(e,r),r]},levels:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.reverse,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=function(){return!0}),r){var l,c=[],d=he.path(e,r),f=de(Ce.levels(e,d));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(u(g,v)&&(c.push([g,v]),!s&&he.isVoid(e,g)))break}}catch(e){f.e(e)}finally{f.f()}i&&c.reverse(),yield*c}},marks:function(e){var t=e.marks,n=e.selection;if(!n)return null;if(t)return t;if(Ie.isExpanded(n)){var r=he.nodes(e,{match:We.isText}),o=h(r,1)[0];if(o){var i=h(o,1)[0];return i.text,N(i,se)}return{}}var a=n.anchor,s=a.path,u=he.leaf(e,s),l=h(u,1)[0];if(0===a.offset){var c=he.previous(e,{at:s,match:We.isText}),d=he.above(e,{match:function(t){return he.isBlock(e,t)}});if(c&&d){var f=h(c,2),p=f[0],g=f[1],v=h(d,2)[1];xe.isAncestor(v,g)&&(l=p)}}var m=l;return m.text,N(m,ue)},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.after(e,u,{voids:i});if(l){var c=he.last(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},node:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=Ce.get(e,r);return[o,r]},nodes:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"all":o,a=t.universal,s=void 0!==a&&a,u=t.reverse,l=void 0!==u&&u,c=t.voids,d=void 0!==c&&c,f=t.match;if(f||(f=function(){return!0}),r){var p,g;if(ve.isSpan(r))p=r[0],g=r[1];else{var v=he.path(e,r,{edge:"start"}),m=he.path(e,r,{edge:"end"});p=l?m:v,g=l?v:m}var y,b,E=Ce.nodes(e,{reverse:l,from:p,to:g,pass:function(t){var n=h(t,1)[0];return!d&&he.isVoid(e,n)}}),w=[],C=de(E);try{for(C.s();!(b=C.n()).done;){var D=h(b.value,2),S=D[0],A=D[1],x=y&&0===xe.compare(A,y[1]);if("highest"!==i||!x)if(f(S,A))if("lowest"===i&&x)y=[S,A];else{var T="lowest"===i?y:[S,A];T&&(s?w.push(T):yield T),y=[S,A]}else if(s&&!x&&We.isText(S))return}}catch(e){C.e(e)}finally{C.f()}"lowest"===i&&y&&(s?w.push(y):yield y),s&&(yield*w)}},normalize:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t,r=function(e){return v.get(e)||[]},o=function(e){var t=r(e).pop(),n=t.join(",");return function(e){return m.get(e)||new Set}(e).delete(n),t};if(he.isNormalizing(e)){if(n){var i=Array.from(Ce.nodes(e),function(e){return h(e,2)[1]}),a=new Set(i.map(function(e){return e.join(",")}));v.set(e,i),m.set(e,a)}0!==r(e).length&&he.withoutNormalizing(e,function(){var t,n=de(r(e));try{for(n.s();!(t=n.n()).done;){var i=t.value;if(Ce.has(e,i)){var a=he.node(e,i),s=h(a,2),u=s[0];s[1];ae.isElement(u)&&0===u.children.length&&e.normalizeNode(a)}}}catch(e){n.e(e)}finally{n.f()}for(var l=42*r(e).length,c=0;0!==r(e).length;){if(c>l)throw new Error("\n Could not completely normalize the editor after ".concat(l," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var d=o(e);if(Ce.has(e,d)){var f=he.node(e,d);e.normalizeNode(f)}c++}})}},parent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=xe.parent(r);return he.node(e,o)},path:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.depth,o=n.edge;if(xe.isPath(t))if("start"===o){var i=Ce.first(e,t);t=h(i,2)[1]}else if("end"===o){var a=Ce.last(e,t);t=h(a,2)[1]}return Ie.isRange(t)&&(t="start"===o?Ie.start(t):"end"===o?Ie.end(t):xe.common(t.anchor.path,t.focus.path)),Be.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:function(e,t){return Ce.has(e,t)},pathRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pathRefs(e).delete(r),r.current=null,t}};return he.pathRefs(e).add(r),r},pathRefs:function(e){var t=E.get(e);return t||(t=new Set,E.set(e,t)),t},point:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,r=void 0===n?"start":n;if(xe.isPath(t)){var o;if("end"===r){var i=Ce.last(e,t);o=h(i,2)[1]}else{var a=Ce.first(e,t);o=h(a,2)[1]}var s=Ce.get(e,o);if(!We.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(Ie.isRange(t)){var u=Ie.edges(t),l=h(u,2),c=l[0],d=l[1];return"start"===r?c:d}return t},pointRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pointRefs(e).delete(r),r.current=null,t}};return he.pointRefs(e).add(r),r},pointRefs:function(e){var t=w.get(e);return t||(t=new Set,w.set(e,t)),t},positions:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,s=void 0!==a&&a,u=t.voids,l=void 0!==u&&u;if(r){var c,d=he.range(e,r),f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=s?v:g,y=!1,b="",E=0,w=0,C=0,D=de(he.nodes(e,{at:r,reverse:s,voids:l}));try{for(D.s();!(c=D.n()).done;){var S=h(c.value,2),A=S[0],x=S[1];if(ae.isElement(A)){if(!l&&e.isVoid(A)){yield he.start(e,x);continue}if(e.isInline(A))continue;if(he.hasInlines(e,A)){var T=xe.isAncestor(x,v.path)?v:he.end(e,x),O=xe.isAncestor(x,g.path)?g:he.start(e,x);b=he.string(e,{anchor:O,focus:T},{voids:l}),y=!0}}if(We.isText(A)){var N=xe.equals(x,m.path);for(N?(w=s?m.offset:A.text.length-m.offset,C=m.offset):(w=A.text.length,C=s?w:0),(N||y||"offset"===i)&&(yield{path:x,offset:C},y=!1);;){if(0===E){if(""===b)break;E=B(b,i,s),b=L(b,E,s)[1]}if(C=s?C-E:C+E,(w-=E)<0){E=-w;break}E=0,yield{path:x,offset:C}}}}}catch(e){D.e(e)}finally{D.f()}}function B(e,t,n){return"character"===t?P(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=P(e,t),i=L(e,o,t),a=h(i,2),s=a[0],u=a[1];if(M(s,u,t))r=!0,n+=o;else{if(r)break;n+=o}e=u}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.before(e,u,{voids:i});if(l){var c=he.first(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{reverse:!0,at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},range:function(e,t,n){return Ie.isRange(t)&&!n?t:{anchor:he.start(e,t),focus:he.end(e,n||t)}},rangeRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.rangeRefs(e).delete(r),r.current=null,t}};return he.rangeRefs(e).add(r),r},rangeRefs:function(e){var t=C.get(e);return t||(t=new Set,C.set(e,t)),t},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){b.set(e,t)},start:function(e,t){return he.point(e,t,{edge:"start"})},string:function(e,t){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==r&&r,i=he.range(e,t),a=Ie.edges(i),s=h(a,2),u=s[0],l=s[1],c="",d=de(he.nodes(e,{at:i,match:We.isText,voids:o}));try{for(d.s();!(n=d.n()).done;){var f=h(n.value,2),p=f[0],g=f[1],v=p.text;xe.equals(g,l.path)&&(v=v.slice(0,l.offset)),xe.equals(g,u.path)&&(v=v.slice(u.offset)),c+=v}}catch(e){d.e(e)}finally{d.f()}return c},unhangRange:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,r=void 0!==n&&n,o=Ie.edges(t),i=h(o,2),a=i[0],s=i[1];if(0!==a.offset||0!==s.offset||Ie.isCollapsed(t))return t;var u,l=he.above(e,{at:s,match:function(t){return he.isBlock(e,t)}}),c=l?l[1]:[],d={anchor:he.start(e,a),focus:s},f=!0,p=de(he.nodes(e,{at:d,match:We.isText,reverse:!0,voids:r}));try{for(p.s();!(u=p.n()).done;){var g=h(u.value,2),v=g[0],m=g[1];if(f)f=!1;else if(""!==v.text||xe.isBefore(m,c)){s={path:m,offset:v.text.length};break}}}catch(e){p.e(e)}finally{p.f()}return{anchor:a,focus:s}},void:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return he.above(e,ce(ce({},t),{},{match:function(t){return he.isVoid(e,t)}}))},withoutNormalizing:function(e,t){var n=he.isNormalizing(e);he.setNormalizing(e,!1);try{t()}finally{he.setNormalizing(e,n)}he.normalize(e)}},ge={isLocation:function(e){return xe.isPath(e)||Be.isPoint(e)||Ie.isRange(e)}},ve={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(xe.isPath)}},me=["children"],ye=["text"];function be(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var we=new WeakMap,Ce={ancestor:function(e,t){var n=Ce.get(e,t);if(We.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Le.stringify(n)));return n},ancestors:function*(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.ancestors(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=[Ce.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}},child:function(e,t){if(We.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Le.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Le.stringify(e)));return n},children:function*(e,t){for(var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).reverse,r=void 0!==n&&n,o=Ce.ancestor(e,t),i=o.children,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=Ce.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}},common:function(e,t,n){var r=xe.common(t,n);return[Ce.get(e,r),r]},descendant:function(e,t){var n=Ce.get(e,t);if(he.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Le.stringify(n)));return n},descendants:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(Ce.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},elements:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(Ce.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];ae.isElement(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},extractProps:function(e){return ae.isAncestor(e)?(e.children,N(e,me)):(e.text,N(e,ye))},first:function(e,t){for(var n=t.slice(),r=Ce.get(e,n);r&&!We.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment:function(e,n){if(We.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Le.stringify(e)));var r=t.produce({children:e.children},function(e){var t,r=Ie.edges(n),o=h(r,2),i=o[0],a=o[1],s=Ce.nodes(e,{reverse:!0,pass:function(e){var t=h(e,2)[1];return!Ie.includes(n,t)}}),u=be(s);try{for(u.s();!(t=u.n()).done;){var l=h(t.value,2)[1];if(!Ie.includes(n,l)){var c=Ce.parent(e,l),d=l[l.length-1];c.children.splice(d,1)}if(xe.equals(l,a.path)){var f=Ce.leaf(e,l);f.text=f.text.slice(0,a.offset)}if(xe.equals(l,i.path)){var p=Ce.leaf(e,l);p.text=p.text.slice(i.offset)}}}catch(e){u.e(e)}finally{u.f()}he.isEditor(e)&&(e.selection=null)});return r.children},get:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(We.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Le.stringify(e)));n=n.children[o]}return n},has:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(We.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode:function(e){return We.isText(e)||ae.isElement(e)||he.isEditor(e)},isNodeList:function(e){if(!Array.isArray(e))return!1;var t=we.get(e);if(void 0!==t)return t;var n=e.every(function(e){return Ce.isNode(e)});return we.set(e,n),n},last:function(e,t){for(var n=t.slice(),r=Ce.get(e,n);r&&!We.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf:function(e,t){var n=Ce.get(e,t);if(!We.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Le.stringify(n)));return n},levels:function*(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.levels(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=Ce.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}},matches:function(e,t){return ae.isElement(e)&&ae.isElementProps(t)&&ae.matches(e,t)||We.isText(e)&&We.isTextProps(t)&&We.matches(e,t)},nodes:function*(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pass,r=t.reverse,o=void 0!==r&&r,i=t.from,a=void 0===i?[]:i,s=t.to,u=new Set,l=[],c=e;!s||!(o?xe.isBefore(l,s):xe.isAfter(l,s));)if(u.has(c)||(yield[c,l]),u.has(c)||We.isText(c)||0===c.children.length||null!=n&&!1!==n([c,l])){if(0===l.length)break;if(!o){var d=xe.next(l);if(Ce.has(e,d)){l=d,c=Ce.get(e,l);continue}}if(o&&0!==l[l.length-1])l=xe.previous(l),c=Ce.get(e,l);else l=xe.parent(l),c=Ce.get(e,l),u.add(c)}else{u.add(c);var f=o?c.children.length-1:0;xe.isAncestor(l,a)&&(f=a[l.length]),l=l.concat(f),c=Ce.get(e,l)}},parent:function(e,t){var n=xe.parent(t),r=Ce.get(e,n);if(We.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:function(e){return We.isText(e)?e.text:e.children.map(Ce.string).join("")},texts:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(Ce.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];We.isText(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}};function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ae={isNodeOperation:function(e){return Ae.isOperation(e)&&e.type.endsWith("_node")},isOperation:function(t){if(!e.isPlainObject(t))return!1;switch(t.type){case"insert_node":case"remove_node":return xe.isPath(t.path)&&Ce.isNode(t.node);case"insert_text":case"remove_text":return"number"==typeof t.offset&&"string"==typeof t.text&&xe.isPath(t.path);case"merge_node":return"number"==typeof t.position&&xe.isPath(t.path)&&e.isPlainObject(t.properties);case"move_node":return xe.isPath(t.path)&&xe.isPath(t.newPath);case"set_node":return xe.isPath(t.path)&&e.isPlainObject(t.properties)&&e.isPlainObject(t.newProperties);case"set_selection":return null===t.properties&&Ie.isRange(t.newProperties)||null===t.newProperties&&Ie.isRange(t.properties)||e.isPlainObject(t.properties)&&e.isPlainObject(t.newProperties);case"split_node":return xe.isPath(t.path)&&"number"==typeof t.position&&e.isPlainObject(t.properties);default:return!1}},isOperationList:function(e){return Array.isArray(e)&&e.every(function(e){return Ae.isOperation(e)})},isSelectionOperation:function(e){return Ae.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation:function(e){return Ae.isOperation(e)&&e.type.endsWith("_text")},inverse:function(e){switch(e.type){case"insert_node":return Se(Se({},e),{},{type:"remove_node"});case"insert_text":return Se(Se({},e),{},{type:"remove_text"});case"merge_node":return Se(Se({},e),{},{type:"split_node",path:xe.previous(e.path)});case"move_node":var t=e.newPath,n=e.path;if(xe.equals(t,n))return e;if(xe.isSibling(n,t))return Se(Se({},e),{},{path:t,newPath:n});var r=xe.transform(n,e),o=xe.transform(xe.next(n),e);return Se(Se({},e),{},{path:r,newPath:o});case"remove_node":return Se(Se({},e),{},{type:"insert_node"});case"remove_text":return Se(Se({},e),{},{type:"insert_text"});case"set_node":var i=e.properties,a=e.newProperties;return Se(Se({},e),{},{properties:a,newProperties:i});case"set_selection":var s=e.properties,u=e.newProperties;return Se(Se({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return Se(Se({},e),{},{type:"merge_node",path:xe.next(e.path)})}}},xe={ancestors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.reverse,r=void 0!==n&&n,o=xe.levels(e,t);return o=r?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i>a},endsAt:function(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return xe.equals(r,o)},endsBefore:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i<a},equals:function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})},hasPrevious:function(e){return e[e.length-1]>0},isAfter:function(e,t){return 1===xe.compare(e,t)},isAncestor:function(e,t){return e.length<t.length&&0===xe.compare(e,t)},isBefore:function(e,t){return-1===xe.compare(e,t)},isChild:function(e,t){return e.length===t.length+1&&0===xe.compare(e,t)},isCommon:function(e,t){return e.length<=t.length&&0===xe.compare(e,t)},isDescendant:function(e,t){return e.length>t.length&&0===xe.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===xe.compare(e,t)},isPath:function(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])},isSibling:function(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&xe.equals(n,r)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next:function(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath:function(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent:function(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous:function(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative:function(e,t){if(!xe.isAncestor(t,e)&&!xe.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,function(t){var o=r.affinity,i=void 0===o?"forward":o;if(e&&0!==(null==e?void 0:e.length)){if(null===t)return null;switch(n.type){case"insert_node":var a=n.path;(xe.equals(a,t)||xe.endsBefore(a,t)||xe.isAncestor(a,t))&&(t[a.length-1]+=1);break;case"remove_node":var s=n.path;if(xe.equals(s,t)||xe.isAncestor(s,t))return null;xe.endsBefore(s,t)&&(t[s.length-1]-=1);break;case"merge_node":var u=n.path,l=n.position;xe.equals(u,t)||xe.endsBefore(u,t)?t[u.length-1]-=1:xe.isAncestor(u,t)&&(t[u.length-1]-=1,t[u.length]+=l);break;case"split_node":var c=n.path,d=n.position;if(xe.equals(c,t)){if("forward"===i)t[t.length-1]+=1;else if("backward"!==i)return null}else xe.endsBefore(c,t)?t[c.length-1]+=1:xe.isAncestor(c,t)&&e[c.length]>=d&&(t[c.length-1]+=1,t[c.length]-=d);break;case"move_node":var f=n.path,p=n.newPath;if(xe.equals(f,p))return;if(xe.isAncestor(f,t)||xe.equals(f,t)){var h=p.slice();return xe.endsBefore(f,p)&&f.length<p.length&&(h[f.length-1]-=1),h.concat(t.slice(f.length))}xe.isSibling(f,p)&&(xe.isAncestor(p,t)||xe.equals(p,t))?xe.endsBefore(f,t)?t[f.length-1]-=1:t[f.length-1]+=1:xe.endsBefore(p,t)||xe.equals(p,t)||xe.isAncestor(p,t)?(xe.endsBefore(f,t)&&(t[f.length-1]-=1),t[p.length-1]+=1):xe.endsBefore(f,t)&&(xe.equals(p,t)&&(t[p.length-1]+=1),t[f.length-1]-=1)}}})}},Te={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=xe.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}};function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Be={compare:function(e,t){var n=xe.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:function(e,t){return 1===Be.compare(e,t)},isBefore:function(e,t){return-1===Be.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&xe.equals(e.path,t.path)},isPoint:function(t){return e.isPlainObject(t)&&"number"==typeof t.offset&&xe.isPath(t.path)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,function(e){if(null===e)return null;var t=r.affinity,o=void 0===t?"forward":t,i=e.path,a=e.offset;switch(n.type){case"insert_node":case"move_node":e.path=xe.transform(i,n,r);break;case"insert_text":xe.equals(n.path,i)&&(n.offset<a||n.offset===a&&"forward"===o)&&(e.offset+=n.text.length);break;case"merge_node":xe.equals(n.path,i)&&(e.offset+=n.position),e.path=xe.transform(i,n,r);break;case"remove_text":xe.equals(n.path,i)&&n.offset<=a&&(e.offset-=Math.min(a-n.offset,n.text.length));break;case"remove_node":if(xe.equals(n.path,i)||xe.isAncestor(n.path,i))return null;e.path=xe.transform(i,n,r);break;case"split_node":if(xe.equals(n.path,i)){if(n.position===a&&null==o)return null;(n.position<a||n.position===a&&"forward"===o)&&(e.offset-=n.position,e.path=xe.transform(i,n,Ne(Ne({},r),{},{affinity:"forward"})))}else e.path=xe.transform(i,n,r)}})}},ke={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Be.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Fe=["anchor","focus"];function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Ie={edges:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=e.anchor,o=e.focus;return Ie.isBackward(e)===n?[r,o]:[o,r]},end:function(e){var t=Ie.edges(e),n=h(t,2)[1];return n},equals:function(e,t){return Be.equals(e.anchor,t.anchor)&&Be.equals(e.focus,t.focus)},includes:function(e,t){if(Ie.isRange(t)){if(Ie.includes(e,t.anchor)||Ie.includes(e,t.focus))return!0;var n=Ie.edges(e),r=h(n,2),o=r[0],i=r[1],a=Ie.edges(t),s=h(a,2),u=s[0],l=s[1];return Be.isBefore(o,u)&&Be.isAfter(i,l)}var c=Ie.edges(e),d=h(c,2),f=d[0],p=d[1],g=!1,v=!1;return Be.isPoint(t)?(g=Be.compare(t,f)>=0,v=Be.compare(t,p)<=0):(g=xe.compare(t,f.path)>=0,v=xe.compare(t,p.path)<=0),g&&v},intersection:function(e,t){e.anchor,e.focus;var n=N(e,Fe),r=Ie.edges(e),o=h(r,2),i=o[0],a=o[1],s=Ie.edges(t),u=h(s,2),l=u[0],c=u[1],d=Be.isBefore(i,l)?l:i,f=Be.isBefore(a,c)?a:c;return Be.isBefore(f,d)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({anchor:d,focus:f},n)},isBackward:function(e){var t=e.anchor,n=e.focus;return Be.isAfter(t,n)},isCollapsed:function(e){var t=e.anchor,n=e.focus;return Be.equals(t,n)},isExpanded:function(e){return!Ie.isCollapsed(e)},isForward:function(e){return!Ie.isBackward(e)},isRange:function(t){return e.isPlainObject(t)&&Be.isPoint(t.anchor)&&Be.isPoint(t.focus)},points:function*(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start:function(e){var t=Ie.edges(e),n=h(t,1)[0];return n},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,function(e){if(null===e)return null;var t,o,i=r.affinity,a=void 0===i?"inward":i;if("inward"===a){var s=Ie.isCollapsed(e);Ie.isForward(e)?(t="forward",o=s?t:"backward"):(t="backward",o=s?t:"forward")}else"outward"===a?Ie.isForward(e)?(t="backward",o="forward"):(t="forward",o="backward"):(t=a,o=a);var u=Be.transform(e.anchor,n,{affinity:t}),l=Be.transform(e.focus,n,{affinity:o});if(!u||!l)return null;e.anchor=u,e.focus=l})}},_e={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Ie.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Re=void 0,Le={setScrubber:function(e){Re=e},stringify:function(e){return JSON.stringify(e,Re)}},Me=function t(n,r){for(var o in n){var i=n[o],a=r[o];if(e.isPlainObject(i)&&e.isPlainObject(a)){if(!t(i,a))return!1}else if(Array.isArray(i)&&Array.isArray(a)){if(i.length!==a.length)return!1;for(var s=0;s<i.length;s++)if(i[s]!==a[s])return!1}else if(i!==a)return!1}for(var u in r)if(void 0===n[u]&&void 0!==r[u])return!1;return!0},je=["text"],He=["anchor","focus"];function ze(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return $e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $e(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var We={equals:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loose,r=void 0!==n&&n;function o(e){return e.text,N(e,je)}return Me(r?o(e):e,r?o(t):t)},isText:function(t){return e.isPlainObject(t)&&"string"==typeof t.text},isTextList:function(e){return Array.isArray(e)&&e.every(function(e){return We.isText(e)})},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations:function(e,t){var n,r=[Ve({},e)],o=ze(t);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,s=(a.anchor,a.focus,N(a,He)),u=Ie.edges(a),l=h(u,2),c=l[0],d=l[1],f=[],p=0,g=c.offset,v=d.offset,m=ze(r);try{for(m.s();!(i=m.n()).done;){var y=i.value,b=y.text.length,E=p;if(p+=b,g<=E&&p<=v)Object.assign(y,s),f.push(y);else if(g!==v&&(g===p||v===E)||g>p||v<E||v===E&&0!==E)f.push(y);else{var w=y,C=void 0,D=void 0;if(v<p){var S=v-E;D=Ve(Ve({},w),{},{text:w.text.slice(S)}),w=Ve(Ve({},w),{},{text:w.text.slice(0,S)})}if(g>E){var A=g-E;C=Ve(Ve({},w),{},{text:w.text.slice(0,A)}),w=Ve(Ve({},w),{},{text:w.text.slice(A)})}Object.assign(w,s),C&&f.push(C),f.push(w),D&&f.push(D)}}}catch(e){m.e(e)}finally{m.f()}r=f}}catch(e){o.e(e)}finally{o.f()}return r}};function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ke(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ye(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xe={transform:function(e,n){e.children=t.createDraft(e.children);var r=e.selection&&t.createDraft(e.selection);try{r=function(e,t,n){switch(n.type){case"insert_node":var r=n.path,o=n.node,i=Ce.parent(e,r),a=r[r.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t){var s,u=Ke(Ie.points(t));try{for(u.s();!(s=u.n()).done;){var c=h(s.value,2),d=c[0];t[c[1]]=Be.transform(d,n)}}catch(e){u.e(e)}finally{u.f()}}break;case"insert_text":var f=n.path,p=n.offset,g=n.text;if(0===g.length)break;var v=Ce.leaf(e,f),m=v.text.slice(0,p),y=v.text.slice(p);if(v.text=m+g+y,t){var b,E=Ke(Ie.points(t));try{for(E.s();!(b=E.n()).done;){var w=h(b.value,2),C=w[0];t[w[1]]=Be.transform(C,n)}}catch(e){E.e(e)}finally{E.f()}}break;case"merge_node":var D=n.path,S=Ce.get(e,D),A=xe.previous(D),x=Ce.get(e,A),T=Ce.parent(e,D),O=D[D.length-1];if(We.isText(S)&&We.isText(x))x.text+=S.text;else{if(We.isText(S)||We.isText(x))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(Le.stringify(S)," ").concat(Le.stringify(x)));var N;(N=x.children).push.apply(N,l(S.children))}if(T.children.splice(O,1),t){var B,k=Ke(Ie.points(t));try{for(k.s();!(B=k.n()).done;){var F=h(B.value,2),P=F[0];t[F[1]]=Be.transform(P,n)}}catch(e){k.e(e)}finally{k.f()}}break;case"move_node":var I=n.path,_=n.newPath;if(xe.isAncestor(I,_))throw new Error("Cannot move a path [".concat(I,"] to new path [").concat(_,"] because the destination is inside itself."));var R=Ce.get(e,I),L=Ce.parent(e,I),M=I[I.length-1];L.children.splice(M,1);var j=xe.transform(I,n),H=Ce.get(e,xe.parent(j)),z=j[j.length-1];if(H.children.splice(z,0,R),t){var $,U=Ke(Ie.points(t));try{for(U.s();!($=U.n()).done;){var V=h($.value,2),W=V[0];t[V[1]]=Be.transform(W,n)}}catch(e){U.e(e)}finally{U.f()}}break;case"remove_node":var G=n.path,q=G[G.length-1];if(Ce.parent(e,G).children.splice(q,1),t){var K,Y=Ke(Ie.points(t));try{for(Y.s();!(K=Y.n()).done;){var X=h(K.value,2),Z=X[0],J=X[1],Q=Be.transform(Z,n);if(null!=t&&null!=Q)t[J]=Q;else{var ee,te=void 0,ne=void 0,re=Ke(Ce.texts(e));try{for(re.s();!(ee=re.n()).done;){var oe=h(ee.value,2),ie=oe[0],ae=oe[1];if(-1!==xe.compare(ae,G)){ne=[ie,ae];break}te=[ie,ae]}}catch(e){re.e(e)}finally{re.f()}var se=!1;te&&ne&&(se=xe.equals(ne[1],G)?!xe.hasPrevious(ne[1]):xe.common(te[1],G).length<xe.common(ne[1],G).length),te&&!se?(Z.path=te[1],Z.offset=te[0].text.length):ne?(Z.path=ne[1],Z.offset=0):t=null}}}catch(e){Y.e(e)}finally{Y.f()}}break;case"remove_text":var ue=n.path,le=n.offset,ce=n.text;if(0===ce.length)break;var de=Ce.leaf(e,ue),fe=de.text.slice(0,le),pe=de.text.slice(le+ce.length);if(de.text=fe+pe,t){var he,ge=Ke(Ie.points(t));try{for(ge.s();!(he=ge.n()).done;){var ve=h(he.value,2),me=ve[0];t[ve[1]]=Be.transform(me,n)}}catch(e){ge.e(e)}finally{ge.f()}}break;case"set_node":var ye=n.path,be=n.properties,Ee=n.newProperties;if(0===ye.length)throw new Error("Cannot set properties on the root node!");var we=Ce.get(e,ye);for(var De in Ee){if("children"===De||"text"===De)throw new Error('Cannot set the "'.concat(De,'" property of nodes!'));var Se=Ee[De];null==Se?delete we[De]:we[De]=Se}for(var Ae in be)Ee.hasOwnProperty(Ae)||delete we[Ae];break;case"set_selection":var Te=n.newProperties;if(null==Te)t=Te;else{if(null==t){if(!Ie.isRange(Te))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Le.stringify(Te)," when there is no current selection."));t=qe({},Te)}for(var Oe in Te){var Ne=Te[Oe];if(null==Ne){if("anchor"===Oe||"focus"===Oe)throw new Error('Cannot remove the "'.concat(Oe,'" selection property'));delete t[Oe]}else t[Oe]=Ne}}break;case"split_node":var ke=n.path,Fe=n.position,Pe=n.properties;if(0===ke.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(ke,"] because the root node cannot be split."));var _e,Re=Ce.get(e,ke),Me=Ce.parent(e,ke),je=ke[ke.length-1];if(We.isText(Re)){var He=Re.text.slice(0,Fe),ze=Re.text.slice(Fe);Re.text=He,_e=qe(qe({},Pe),{},{text:ze})}else{var $e=Re.children.slice(0,Fe),Ue=Re.children.slice(Fe);Re.children=$e,_e=qe(qe({},Pe),{},{children:Ue})}if(Me.children.splice(je+1,0,_e),t){var Ve,Ge=Ke(Ie.points(t));try{for(Ge.s();!(Ve=Ge.n()).done;){var Ye=h(Ve.value,2),Xe=Ye[0];t[Ye[1]]=Be.transform(Xe,n)}}catch(e){Ge.e(e)}finally{Ge.f()}}}return t}(e,r,n)}finally{e.children=t.finishDraft(e.children),e.selection=r?t.isDraft(r)?t.finishDraft(r):r:null}}},Ze=["text"],Je=["children"];function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nt(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rt={insertNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.mode,u=void 0===s?"lowest":s,l=n.at,c=n.match,d=n.select;if(Ce.isNode(t)&&(t=[t]),0!==t.length){var f=h(t,1)[0];if(l||(l=e.selection?e.selection:e.children.length>0?he.end(e,[]):[0],d=!0),null==d&&(d=!1),Ie.isRange(l))if(o||(l=he.unhangRange(e,l)),Ie.isCollapsed(l))l=l.anchor;else{var p=Ie.edges(l),g=h(p,2)[1],v=he.pointRef(e,g);gt.delete(e,{at:l}),l=v.unref()}if(Be.isPoint(l)){null==c&&(c=We.isText(f)?function(e){return We.isText(e)}:e.isInline(f)?function(t){return We.isText(t)||he.isInline(e,t)}:function(t){return he.isBlock(e,t)});var m=he.nodes(e,{at:l.path,match:c,mode:u,voids:a}),y=h(m,1)[0];if(!y)return;var b=h(y,2)[1],E=he.pathRef(e,b),w=he.isEnd(e,l,b);gt.splitNodes(e,{at:l,match:c,mode:u,voids:a});var C=E.unref();l=w?xe.next(C):C}var D=xe.parent(l),S=l[l.length-1];if(a||!he.void(e,{at:D})){var A,x=tt(t);try{for(x.s();!(A=x.n()).done;){var T=A.value,O=D.concat(S);S++,e.apply({type:"insert_node",path:O,node:T}),l=xe.next(l)}}catch(e){x.e(e)}finally{x.f()}if(l=xe.previous(l),d){var N=he.end(e,l);N&>.select(e,N)}}}})},liftNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,function(){var n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=xe.isPath(r)?at(e,r):function(t){return he.isBlock(e,t)}),r)for(var l=he.nodes(e,{at:r,match:u,mode:i,voids:s}),c=Array.from(l,function(t){var n=h(t,2)[1];return he.pathRef(e,n)}),d=0,f=c;d<f.length;d++){var p=f[d].unref();if(p.length<2)throw new Error("Cannot lift node at a path [".concat(p,"] because it has a depth of less than `2`."));var g=he.node(e,xe.parent(p)),v=h(g,2),m=v[0],y=v[1],b=p[p.length-1],E=m.children.length;if(1===E){var w=xe.next(y);gt.moveNodes(e,{at:p,to:w,voids:s}),gt.removeNodes(e,{at:y,voids:s})}else if(0===b)gt.moveNodes(e,{at:p,to:y,voids:s});else if(b===E-1){var C=xe.next(y);gt.moveNodes(e,{at:p,to:C,voids:s})}else{var D=xe.next(p),S=xe.next(y);gt.splitNodes(e,{at:D,voids:s}),gt.moveNodes(e,{at:p,to:S,voids:s})}}})},mergeNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,function(){var n=t.match,r=t.at,o=void 0===r?e.selection:r,i=t.hanging,a=void 0!==i&&i,s=t.voids,u=void 0!==s&&s,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==n)if(xe.isPath(o)){var d=he.parent(e,o),f=h(d,1)[0];n=function(e){return f.children.includes(e)}}else n=function(t){return he.isBlock(e,t)};if(!a&&Ie.isRange(o)&&(o=he.unhangRange(e,o)),Ie.isRange(o))if(Ie.isCollapsed(o))o=o.anchor;else{var p=Ie.edges(o),g=h(p,2)[1],v=he.pointRef(e,g);gt.delete(e,{at:o}),o=v.unref(),null==t.at&>.select(e,o)}var m=he.nodes(e,{at:o,match:n,voids:u,mode:c}),y=h(m,1)[0],b=he.previous(e,{at:o,match:n,voids:u,mode:c});if(y&&b){var E=h(y,2),w=E[0],C=E[1],D=h(b,2),S=D[0],A=D[1];if(0!==C.length&&0!==A.length){var x,T,O=xe.next(A),B=xe.common(C,A),k=xe.isSibling(C,A),F=Array.from(he.levels(e,{at:C}),function(e){return h(e,1)[0]}).slice(B.length).slice(0,-1),P=he.above(e,{at:C,mode:"highest",match:function(t){return F.includes(t)&&ot(e,t)}}),I=P&&he.pathRef(e,P[1]);if(We.isText(w)&&We.isText(S)){w.text;var _=N(w,Ze);T=S.text.length,x=_}else{if(!ae.isElement(w)||!ae.isElement(S))throw new Error("Cannot merge the node at path [".concat(C,"] with the previous sibling because it is not the same kind: ").concat(Le.stringify(w)," ").concat(Le.stringify(S)));w.children;var R=N(w,Je);T=S.children.length,x=R}k||gt.moveNodes(e,{at:C,to:O,voids:u}),I&>.removeNodes(e,{at:I.current,voids:u}),ae.isElement(S)&&he.isEmpty(e,S)||We.isText(S)&&""===S.text&&0!==A[A.length-1]?gt.removeNodes(e,{at:A,voids:u}):e.apply({type:"merge_node",path:O,position:T,properties:x}),I&&I.unref()}}}})},moveNodes:function(e,t){he.withoutNormalizing(e,function(){var n=t.to,r=t.at,o=void 0===r?e.selection:r,i=t.mode,a=void 0===i?"lowest":i,s=t.voids,u=void 0!==s&&s,l=t.match;if(o){null==l&&(l=xe.isPath(o)?at(e,o):function(t){return he.isBlock(e,t)});for(var c=he.pathRef(e,n),d=he.nodes(e,{at:o,match:l,mode:a,voids:u}),f=Array.from(d,function(t){var n=h(t,2)[1];return he.pathRef(e,n)}),p=0,g=f;p<g.length;p++){var v=g[p].unref(),m=c.current;0!==v.length&&e.apply({type:"move_node",path:v,newPath:m}),c.current&&xe.isSibling(m,v)&&xe.isAfter(m,v)&&(c.current=xe.next(c.current))}c.unref()}})},removeNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,function(){var n=t.hanging,r=void 0!==n&&n,o=t.voids,i=void 0!==o&&o,a=t.mode,s=void 0===a?"lowest":a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?at(e,l):function(t){return he.isBlock(e,t)}),!r&&Ie.isRange(l)&&(l=he.unhangRange(e,l));for(var d=he.nodes(e,{at:l,match:c,mode:s,voids:i}),f=Array.from(d,function(t){var n=h(t,2)[1];return he.pathRef(e,n)}),p=0,g=f;p<g.length;p++){var v=g[p].unref();if(v){var m=he.node(e,v),y=h(m,1)[0];e.apply({type:"remove_node",path:v,node:y})}}}})},setNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,function(){var r=n.match,o=n.at,i=void 0===o?e.selection:o,a=n.compare,s=n.merge,u=n.hanging,l=void 0!==u&&u,c=n.mode,d=void 0===c?"lowest":c,f=n.split,p=void 0!==f&&f,g=n.voids,v=void 0!==g&&g;if(i){if(null==r&&(r=xe.isPath(i)?at(e,i):function(t){return he.isBlock(e,t)}),!l&&Ie.isRange(i)&&(i=he.unhangRange(e,i)),p&&Ie.isRange(i)){if(Ie.isCollapsed(i)&&he.leaf(e,i.anchor)[0].text.length>0)return;var m=he.rangeRef(e,i,{affinity:"inward"}),y=Ie.edges(i),b=h(y,2),E=b[0],w=b[1],C="lowest"===d?"lowest":"highest",D=he.isEnd(e,w,w.path);gt.splitNodes(e,{at:w,match:r,mode:C,voids:v,always:!D});var S=he.isStart(e,E,E.path);gt.splitNodes(e,{at:E,match:r,mode:C,voids:v,always:!S}),i=m.unref(),null==n.at&>.select(e,i)}a||(a=function(e,t){return e!==t});var A,x=tt(he.nodes(e,{at:i,match:r,mode:d,voids:v}));try{for(x.s();!(A=x.n()).done;){var T=h(A.value,2),O=T[0],N=T[1],B={},k={};if(0!==N.length){var F=!1;for(var P in t)"children"!==P&&"text"!==P&&a(t[P],O[P])&&(F=!0,O.hasOwnProperty(P)&&(B[P]=O[P]),s?null!=t[P]&&(k[P]=s(O[P],t[P])):null!=t[P]&&(k[P]=t[P]));F&&e.apply({type:"set_node",path:N,properties:B,newProperties:k})}}}catch(e){x.e(e)}finally{x.f()}}})},splitNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s,l=t.height,c=void 0===l?0:l,d=t.always,f=void 0!==d&&d;if(null==a&&(a=function(t){return he.isBlock(e,t)}),Ie.isRange(u)&&(u=it(e,u)),xe.isPath(u)){var p=u,g=he.point(e,p),v=he.parent(e,p),m=h(v,1)[0];a=function(e){return e===m},c=g.path.length-p.length+1,u=g,f=!0}if(u){var y,b=he.pointRef(e,u,{affinity:"backward"});try{var E=he.nodes(e,{at:u,match:a,mode:r,voids:i}),w=h(E,1)[0];if(!w)return;var C=he.void(e,{at:u,mode:"highest"});if(!i&&C){var D=h(C,2),S=D[0],A=D[1];if(ae.isElement(S)&&e.isInline(S)){var x=he.after(e,A);if(!x){var T=xe.next(A);gt.insertNodes(e,{text:""},{at:T,voids:i}),x=he.point(e,T)}u=x,f=!0}c=u.path.length-A.length+1,f=!0}y=he.pointRef(e,u);var O,N=u.path.length-c,B=h(w,2)[1],k=u.path.slice(0,N),F=0===c?u.offset:u.path[N]+0,P=tt(he.levels(e,{at:k,reverse:!0,voids:i}));try{for(P.s();!(O=P.n()).done;){var I=h(O.value,2),_=I[0],R=I[1],L=!1;if(R.length<B.length||0===R.length||!i&&he.isVoid(e,_))break;var M=b.current,j=he.isEnd(e,M,R);if(f||!b||!he.isEdge(e,M,R)){L=!0;var H=Ce.extractProps(_);e.apply({type:"split_node",path:R,position:F,properties:H})}F=R[R.length-1]+(L||j?1:0)}}catch(e){P.e(e)}finally{P.f()}if(null==t.at){var z=y.current||he.end(e,[]);gt.select(e,z)}}finally{var $;b.unref(),null===($=y)||void 0===$||$.unref()}}})},unsetNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r,o={},i=tt(t);try{for(i.s();!(r=i.n()).done;){o[r.value]=null}}catch(e){i.e(e)}finally{i.f()}gt.setNodes(e,o,n)},unwrapNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.split,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?at(e,l):function(t){return he.isBlock(e,t)}),xe.isPath(l)&&(l=he.range(e,l));var d,f=Ie.isRange(l)?he.rangeRef(e,l):null,p=he.nodes(e,{at:l,match:c,mode:r,voids:s}),g=Array.from(p,function(t){var n=h(t,2)[1];return he.pathRef(e,n)}).reverse(),v=tt(g);try{var m=function(){var t=d.value.unref(),n=he.node(e,t),r=h(n,1)[0],o=he.range(e,t);i&&f&&(o=Ie.intersection(f.current,o)),gt.liftNodes(e,{at:o,match:function(e){return ae.isAncestor(r)&&r.children.includes(e)},voids:s})};for(v.s();!(d=v.n()).done;)m()}catch(e){v.e(e)}finally{v.f()}f&&f.unref()}})},wrapNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,function(){var r=n.mode,o=void 0===r?"lowest":r,i=n.split,a=void 0!==i&&i,s=n.voids,u=void 0!==s&&s,l=n.match,c=n.at,d=void 0===c?e.selection:c;if(d){if(null==l&&(l=xe.isPath(d)?at(e,d):e.isInline(t)?function(t){return he.isInline(e,t)||We.isText(t)}:function(t){return he.isBlock(e,t)}),a&&Ie.isRange(d)){var f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=he.rangeRef(e,d,{affinity:"inward"});gt.splitNodes(e,{at:v,match:l,voids:u}),gt.splitNodes(e,{at:g,match:l,voids:u}),d=m.unref(),null==n.at&>.select(e,d)}for(var y=Array.from(he.nodes(e,{at:d,match:e.isInline(t)?function(t){return he.isBlock(e,t)}:function(e){return he.isEditor(e)},mode:"lowest",voids:u})),b=0,E=y;b<E.length;b++){var w=h(E[b],2)[1],C=Ie.isRange(d)?Ie.intersection(d,he.range(e,w)):d;if(C){var D=Array.from(he.nodes(e,{at:C,match:l,mode:o,voids:u}));if(D.length>0){var S=function(){var n=h(D,1)[0],r=D[D.length-1],o=h(n,2)[1],i=h(r,2)[1];if(0===o.length&&0===i.length)return"continue";var a=xe.equals(o,i)?xe.parent(o):xe.common(o,i),s=he.range(e,o,i),l=he.node(e,a),c=h(l,1)[0],d=a.length+1,f=xe.next(i.slice(0,d)),p=et(et({},t),{},{children:[]});gt.insertNodes(e,p,{at:f,voids:u}),gt.moveNodes(e,{at:s,match:function(e){return ae.isAncestor(c)&&c.children.includes(e)},to:f.concat(0),voids:u})}();if("continue"===S)continue}}}}})}},ot=function e(t,n){if(ae.isElement(n)){var r=n;return!!he.isVoid(t,n)||1===r.children.length&&e(t,r.children[0])}return!he.isEditor(n)},it=function(e,t){if(Ie.isCollapsed(t))return t.anchor;var n=Ie.edges(t),r=h(n,2)[1],o=he.pointRef(e,r);return gt.delete(e,{at:t}),o.unref()},at=function(e,t){var n=he.node(e,t),r=h(n,1)[0];return function(e){return e===r}};function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lt={collapse:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).edge,n=void 0===t?"anchor":t,r=e.selection;if(r)if("anchor"===n)gt.select(e,r.anchor);else if("focus"===n)gt.select(e,r.focus);else if("start"===n){var o=Ie.edges(r),i=h(o,1)[0];gt.select(e,i)}else if("end"===n){var a=Ie.edges(r),s=h(a,2)[1];gt.select(e,s)}},deselect:function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.selection,r=t.distance,o=void 0===r?1:r,i=t.unit,a=void 0===i?"character":i,s=t.reverse,u=void 0!==s&&s,l=t.edge,c=void 0===l?null:l;if(n){"start"===c&&(c=Ie.isBackward(n)?"focus":"anchor"),"end"===c&&(c=Ie.isBackward(n)?"anchor":"focus");var d=n.anchor,f=n.focus,p={distance:o,unit:a},h={};if(null==c||"anchor"===c){var g=u?he.before(e,d,p):he.after(e,d,p);g&&(h.anchor=g)}if(null==c||"focus"===c){var v=u?he.before(e,f,p):he.after(e,f,p);v&&(h.focus=v)}gt.setSelection(e,h)}},select:function(e,t){var n=e.selection;if(t=he.range(e,t),n)gt.setSelection(e,t);else{if(!Ie.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Le.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=n.edge,i=void 0===o?"both":o;if(r){"start"===i&&(i=Ie.isBackward(r)?"focus":"anchor"),"end"===i&&(i=Ie.isBackward(r)?"anchor":"focus");var a=r.anchor,s=r.focus,u="anchor"===i?a:s;gt.setSelection(e,g({},"anchor"===i?"anchor":"focus",ut(ut({},u),t)))}},setSelection:function(e,t){var n=e.selection,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!Be.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!Be.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}};function ct(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dt(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ft={delete:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,function(){var n=t.reverse,r=void 0!==n&&n,o=t.unit,i=void 0===o?"character":o,a=t.distance,s=void 0===a?1:a,u=t.voids,l=void 0!==u&&u,c=t.at,d=void 0===c?e.selection:c,f=t.hanging,p=void 0!==f&&f;if(d){var g=!1;if(Ie.isRange(d)&&Ie.isCollapsed(d)&&(g=!0,d=d.anchor),Be.isPoint(d)){var v=he.void(e,{at:d,mode:"highest"});if(!l&&v){d=h(v,2)[1]}else{var m={unit:i,distance:s};d={anchor:d,focus:r?he.before(e,d,m)||he.start(e,[]):he.after(e,d,m)||he.end(e,[])},p=!0}}if(xe.isPath(d))gt.removeNodes(e,{at:d,voids:l});else if(!Ie.isCollapsed(d)){if(!p){var y=Ie.edges(d),b=h(y,2)[1],E=he.end(e,[]);Be.equals(b,E)||(d=he.unhangRange(e,d,{voids:l}))}var w=Ie.edges(d),C=h(w,2),D=C[0],S=C[1],A=he.above(e,{match:function(t){return he.isBlock(e,t)},at:D,voids:l}),x=he.above(e,{match:function(t){return he.isBlock(e,t)},at:S,voids:l}),T=A&&x&&!xe.equals(A[1],x[1]),O=xe.equals(D.path,S.path),N=l?null:he.void(e,{at:D,mode:"highest"}),B=l?null:he.void(e,{at:S,mode:"highest"});if(N){var k=he.before(e,D);k&&A&&xe.isAncestor(A[1],k.path)&&(D=k)}if(B){var F=he.after(e,S);F&&x&&xe.isAncestor(x[1],F.path)&&(S=F)}var P,I,_=[],R=ct(he.nodes(e,{at:d,voids:l}));try{for(R.s();!(I=R.n()).done;){var L=I.value,M=h(L,2),j=M[0],H=M[1];P&&0===xe.compare(H,P)||(!l&&he.isVoid(e,j)||!xe.isCommon(H,D.path)&&!xe.isCommon(H,S.path))&&(_.push(L),P=H)}}catch(e){R.e(e)}finally{R.f()}var z=Array.from(_,function(t){var n=h(t,2)[1];return he.pathRef(e,n)}),$=he.pointRef(e,D),U=he.pointRef(e,S),V="";if(!O&&!N){var W=$.current,G=he.leaf(e,W),q=h(G,1)[0],K=W.path,Y=D.offset,X=q.text.slice(Y);X.length>0&&(e.apply({type:"remove_text",path:K,offset:Y,text:X}),V=X)}for(var Z=0,J=z;Z<J.length;Z++){var Q=J[Z].unref();gt.removeNodes(e,{at:Q,voids:l})}if(!B){var ee=U.current,te=he.leaf(e,ee),ne=h(te,1)[0],re=ee.path,oe=O?D.offset:0,ie=ne.text.slice(oe,S.offset);ie.length>0&&(e.apply({type:"remove_text",path:re,offset:oe,text:ie}),V=ie)}!O&&T&&U.current&&$.current&>.mergeNodes(e,{at:U.current,hanging:!0,voids:l}),g&&r&&"character"===i&&V.length>1&&V.match(/[\u0E00-\u0E7F]+/)&>.insertText(e,V.slice(0,V.length-s));var ae=$.unref(),se=U.unref(),ue=r?ae||se:se||ae;null==t.at&&ue&>.select(e,ue)}}})},insertFragment:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.at,u=void 0===s?e.selection:s;if(t.length&&u){if(Ie.isRange(u))if(o||(u=he.unhangRange(e,u)),Ie.isCollapsed(u))u=u.anchor;else{var l=Ie.edges(u),c=h(l,2)[1];if(!a&&he.void(e,{at:c}))return;var d=he.pointRef(e,c);gt.delete(e,{at:u}),u=d.unref()}else xe.isPath(u)&&(u=he.start(e,u));if(a||!he.void(e,{at:u})){var f=he.above(e,{at:u,match:function(t){return he.isInline(e,t)},mode:"highest",voids:a});if(f){var p=h(f,2)[1];if(he.isEnd(e,u,p))u=he.after(e,p);else if(he.isStart(e,u,p)){u=he.before(e,p)}}var g,v=he.above(e,{match:function(t){return he.isBlock(e,t)},at:u,voids:a}),m=h(v,2)[1],y=he.isStart(e,u,m),b=he.isEnd(e,u,m),E=y&&b,w=!y||y&&b,C=!b,D=Ce.first({children:t},[]),S=h(D,2)[1],A=Ce.last({children:t},[]),x=h(A,2)[1],T=[],O=function(t){var n=h(t,2),r=n[0],o=n[1];return!(0===o.length)&&(!!E||!(w&&xe.isAncestor(o,S)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r))&&!(C&&xe.isAncestor(o,x)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r)))},N=ct(Ce.nodes({children:t},{pass:O}));try{for(N.s();!(g=N.n()).done;){var B=g.value;O(B)&&T.push(B)}}catch(e){N.e(e)}finally{N.f()}for(var k=[],F=[],P=[],I=!0,_=!1,R=0,L=T;R<L.length;R++){var M=h(L[R],1)[0];ae.isElement(M)&&!e.isInline(M)?(I=!1,_=!0,F.push(M)):I?k.push(M):P.push(M)}var j=he.nodes(e,{at:u,match:function(t){return We.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),H=h(j,1)[0],z=h(H,2)[1],$=he.isStart(e,u,z),U=he.isEnd(e,u,z),V=he.pathRef(e,b&&!P.length?xe.next(m):m),W=he.pathRef(e,U?xe.next(z):z);gt.splitNodes(e,{at:u,match:function(t){return _?he.isBlock(e,t):We.isText(t)||he.isInline(e,t)},mode:_?"lowest":"highest",always:_&&(!y||k.length>0)&&(!b||P.length>0),voids:a});var G,q=he.pathRef(e,!$||$&&U?xe.next(z):z);if(gt.insertNodes(e,k,{at:q.current,match:function(t){return We.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),E&&!k.length&&F.length&&!P.length&>.delete(e,{at:m,voids:a}),gt.insertNodes(e,F,{at:V.current,match:function(t){return he.isBlock(e,t)},mode:"lowest",voids:a}),gt.insertNodes(e,P,{at:W.current,match:function(t){return We.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),!n.at)if(P.length>0&&W.current?G=xe.previous(W.current):F.length>0&&V.current?G=xe.previous(V.current):q.current&&(G=xe.previous(q.current)),G){var K=he.end(e,G);gt.select(e,K)}q.unref(),V.unref(),W.unref()}}})},insertText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,function(){var r=n.voids,o=void 0!==r&&r,i=n.at,a=void 0===i?e.selection:i;if(a){if(xe.isPath(a)&&(a=he.range(e,a)),Ie.isRange(a))if(Ie.isCollapsed(a))a=a.anchor;else{var s=Ie.end(a);if(!o&&he.void(e,{at:s}))return;var u=Ie.start(a),l=he.pointRef(e,u),c=he.pointRef(e,s);gt.delete(e,{at:a,voids:o});var d=l.unref(),f=c.unref();a=d||f,gt.setSelection(e,{anchor:a,focus:a})}if(o||!he.void(e,{at:a})){var p=a,h=p.path,g=p.offset;t.length>0&&e.apply({type:"insert_text",path:h,offset:g,text:t})}}})}};function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gt=ht(ht(ht(ht({},Xe),rt),lt),ft);return dp.Editor=he,dp.Element=ae,dp.Location=ge,dp.Node=Ce,dp.Operation=Ae,dp.Path=xe,dp.PathRef=Te,dp.Point=Be,dp.PointRef=ke,dp.Range=Ie,dp.RangeRef=_e,dp.Scrubber=Le,dp.Span=ve,dp.Text=We,dp.Transforms=gt,dp.createEditor=function(){var e={children:[],operations:[],selection:null,marks:null,isInline:function(){return!1},isVoid:function(){return!1},onChange:function(){},apply:function(t){var n,r=A(he.pathRefs(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;Te.transform(o,t)}}catch(e){r.e(e)}finally{r.f()}var i,a=A(he.pointRefs(e));try{for(a.s();!(i=a.n()).done;){var s=i.value;ke.transform(s,t)}}catch(e){a.e(e)}finally{a.f()}var u,l=A(he.rangeRefs(e));try{for(l.s();!(u=l.n()).done;){var c=u.value;_e.transform(c,t)}}catch(e){l.e(e)}finally{l.f()}var d,f,p=v.get(e)||[],h=m.get(e)||new Set,g=function(e){if(e){var t=e.join(",");f.has(t)||(f.add(t),d.push(e))}};if(xe.operationCanTransformPath(t)){d=[],f=new Set;var b,E=A(p);try{for(E.s();!(b=E.n()).done;){var w=b.value;g(xe.transform(w,t))}}catch(e){E.e(e)}finally{E.f()}}else d=p,f=h;var C,D=A(e.getDirtyPaths(t));try{for(D.s();!(C=D.n()).done;){g(C.value)}}catch(e){D.e(e)}finally{D.f()}v.set(e,d),m.set(e,f),gt.transform(e,t),e.operations.push(t),he.normalize(e),"set_selection"===t.type&&(e.marks=null),y.get(e)||(y.set(e,!0),Promise.resolve().then(function(){y.set(e,!1),e.onChange(),e.operations=[]}))},addMark:function(t,n){var r=e.selection;if(r)if(Ie.isExpanded(r))gt.setNodes(e,g({},t,n),{match:We.isText,split:!0});else{var o=S(S({},he.marks(e)||{}),{},g({},t,n));e.marks=o,y.get(e)||e.onChange()}},deleteBackward:function(t){var n=e.selection;n&&Ie.isCollapsed(n)&>.delete(e,{unit:t,reverse:!0})},deleteForward:function(t){var n=e.selection;n&&Ie.isCollapsed(n)&>.delete(e,{unit:t})},deleteFragment:function(t){var n=e.selection;n&&Ie.isExpanded(n)&>.delete(e,{reverse:"backward"===t})},getFragment:function(){var t=e.selection;return t?Ce.fragment(e,t):[]},insertBreak:function(){gt.splitNodes(e,{always:!0})},insertSoftBreak:function(){gt.splitNodes(e,{always:!0})},insertFragment:function(t){gt.insertFragment(e,t)},insertNode:function(t){gt.insertNodes(e,t)},insertText:function(t){var n=e.selection,r=e.marks;if(n){if(r){var o=S({text:t},r);gt.insertNodes(e,o)}else gt.insertText(e,t);e.marks=null}},normalizeNode:function(t){var n=h(t,2),r=n[0],o=n[1];if(!We.isText(r))if(ae.isElement(r)&&0===r.children.length){gt.insertNodes(e,{text:""},{at:o.concat(0),voids:!0})}else for(var i=!he.isEditor(r)&&(ae.isElement(r)&&(e.isInline(r)||0===r.children.length||We.isText(r.children[0])||e.isInline(r.children[0]))),a=0,s=0;s<r.children.length;s++,a++){var u=Ce.get(e,o);if(!We.isText(u)){var l=r.children[s],c=u.children[a-1],d=s===r.children.length-1;if((We.isText(l)||ae.isElement(l)&&e.isInline(l))!==i)gt.removeNodes(e,{at:o.concat(a),voids:!0}),a--;else if(ae.isElement(l)){if(e.isInline(l))if(null!=c&&We.isText(c)){if(d){gt.insertNodes(e,{text:""},{at:o.concat(a+1),voids:!0}),a++}}else{gt.insertNodes(e,{text:""},{at:o.concat(a),voids:!0}),a++}}else null!=c&&We.isText(c)&&(We.equals(l,c,{loose:!0})?(gt.mergeNodes(e,{at:o.concat(a),voids:!0}),a--):""===c.text?(gt.removeNodes(e,{at:o.concat(a-1),voids:!0}),a--):""===l.text&&(gt.removeNodes(e,{at:o.concat(a),voids:!0}),a--))}}},removeMark:function(t){var n=e.selection;if(n)if(Ie.isExpanded(n))gt.unsetNodes(e,t,{match:We.isText,split:!0});else{var r=S({},he.marks(e)||{});delete r[t],e.marks=r,y.get(e)||e.onChange()}},getDirtyPaths:function(e){switch(e.type){case"insert_text":case"remove_text":case"set_node":var t=e.path;return xe.levels(t);case"insert_node":var n=e.node,r=e.path,o=xe.levels(r),i=We.isText(n)?[]:Array.from(Ce.nodes(n),function(e){var t=h(e,2)[1];return r.concat(t)});return[].concat(l(o),l(i));case"merge_node":var a=e.path,s=xe.ancestors(a),u=xe.previous(a);return[].concat(l(s),[u]);case"move_node":var c=e.path,d=e.newPath;if(xe.equals(c,d))return[];var f,p=[],g=[],v=A(xe.ancestors(c));try{for(v.s();!(f=v.n()).done;){var m=f.value,y=xe.transform(m,e);p.push(y)}}catch(e){v.e(e)}finally{v.f()}var b,E=A(xe.ancestors(d));try{for(E.s();!(b=E.n()).done;){var w=b.value,C=xe.transform(w,e);g.push(C)}}catch(e){E.e(e)}finally{E.f()}var D=g[g.length-1],S=d[d.length-1],x=D.concat(S);return[].concat(p,g,[x]);case"remove_node":var T=e.path,O=xe.ancestors(T);return l(O);case"split_node":var N=e.path,B=xe.levels(N),k=xe.next(N);return[].concat(l(B),[k]);default:return[]}}};return e},dp}var Cp,Dp=wp(),Sp={};function Ap(){if(Cp)return Sp;Cp=1;var e=pp(),t=wp(),n={isHistory:function(n){return e.isPlainObject(n)&&Array.isArray(n.redos)&&Array.isArray(n.undos)&&(0===n.redos.length||t.Operation.isOperationList(n.redos[0].operations))&&(0===n.undos.length||t.Operation.isOperationList(n.undos[0].operations))}},r=new WeakMap,o=new WeakMap,i=new WeakMap,a={isHistoryEditor:function(e){return n.isHistory(e.history)&&t.Editor.isEditor(e)},isMerging:function(e){return i.get(e)},isSaving:function(e){return o.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=a.isMerging(e);i.set(e,!0),t(),i.set(e,n)},withoutMerging:function(e,t){var n=a.isMerging(e);i.set(e,!1),t(),i.set(e,n)},withoutSaving:function(e,t){var n=a.isSaving(e);o.set(e,!1),t(),o.set(e,n)}};function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(e,n){return!(!n||"insert_text"!==e.type||"insert_text"!==n.type||e.offset!==n.offset+n.text.length||!t.Path.equals(e.path,n.path))||!(!n||"remove_text"!==e.type||"remove_text"!==n.type||e.offset+e.text.length!==n.offset||!t.Path.equals(e.path,n.path))},c=function(e,t){return"set_selection"!==e.type};return Sp.HISTORY=r,Sp.History=n,Sp.HistoryEditor=a,Sp.MERGING=i,Sp.SAVING=o,Sp.withHistory=function(e){var n=e,r=n.apply;return n.history={undos:[],redos:[]},n.redo=function(){var e=n.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore),a.withoutSaving(n,function(){t.Editor.withoutNormalizing(n,function(){var e,t=s(o.operations);try{for(t.s();!(e=t.n()).done;){var r=e.value;n.apply(r)}}catch(e){t.e(e)}finally{t.f()}})}),e.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var e=n.history,r=e.undos;if(r.length>0){var o=r[r.length-1];a.withoutSaving(n,function(){t.Editor.withoutNormalizing(n,function(){var e,r=s(o.operations.map(t.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;n.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore)})}),n.writeHistory("redos",o),e.undos.pop()}},n.apply=function(e){var t=n.operations,o=n.history,i=o.undos,s=i[i.length-1],u=s&&s.operations[s.operations.length-1],d=a.isSaving(n),f=a.isMerging(n);if(null==d&&(d=c(e)),d){if(null==f&&(f=null!=s&&(0!==t.length||l(e,u))),s&&f)s.operations.push(e);else{var p={operations:[e],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},n.writeHistory=function(e,t){n.history[e].push(t)},n},Sp}var xp=Ap(),Tp=function(e,t){return Tp=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])},Tp(e,t)};function Op(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}Tp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Np=function(){return Np=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},Np.apply(this,arguments)};function Bp(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 kp(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)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 i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}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 Fp(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 Pp(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 Ip(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 _p(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Fp(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var Rp,Lp={exports:{}};var Mp,jp,Hp=(Rp||(Rp=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",E="[object DataView]",w="[object Float32Array]",C="[object Float64Array]",D="[object Int8Array]",S="[object Int16Array]",A="[object Int32Array]",x="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",N="[object Uint32Array]",B=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,P={};P[o]=P["[object Array]"]=P[y]=P[E]=P[i]=P[a]=P[w]=P[C]=P[D]=P[S]=P[A]=P[l]=P[c]=P[d]=P[p]=P[h]=P[g]=P[v]=P[x]=P[T]=P[O]=P[N]=!0,P["[object Error]"]=P[s]=P[m]=!1;var I="object"==typeof b&&b&&b.Object===Object&&b,_="object"==typeof self&&self&&self.Object===Object&&self,R=I||_||Function("return this")(),L=t&&!t.nodeType&&t,M=L&&e&&!e.nodeType&&e,j=M&&M.exports===L;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=R["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?R.Buffer:void 0,re=R.Symbol,oe=R.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),fe=Le(R,"DataView"),pe=Le(R,"Map"),he=Le(R,"Promise"),ge=Le(R,"Set"),ve=Le(R,"WeakMap"),me=Le(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),we=$e(ge),Ce=$e(ve),De=re?re.prototype:void 0,Se=De?De.valueOf:void 0;function Ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){this.__data__=new xe(e)}function Ne(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,b){var k;if(r&&(k=m?r(e,f,m,b):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var I=je(e),_=I==s||I==u;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(I==d||I==o||_&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(_?{}:e),!t)return function(e,t){return _e(e,Me(e),t)}(e,function(e,t){return e&&_e(t,Ye(t),e)}(k,e))}else{if(!P[I])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case y:return Ie(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case C:case D:case S:case A:case x:case T:case O:case N:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,B.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Se?Object(Se.call(e)):{}}(e)}}(e,I,Fe,t)}}b||(b=new Oe);var R=b.get(e);if(R)return R;if(b.set(e,k),!F)var L=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(L||e,function(o,i){L&&(o=e[i=o]),Be(k,i,Fe(o,t,n,r,i,e,b))}),k}function Pe(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function _e(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Be(n,a,e[a])}return n}function Re(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}Ae.prototype.clear=function(){this.__data__=me?me(null):{}},Ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ae.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Ae.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Ae.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return ke(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Te.prototype.clear=function(){this.__data__={hash:new Ae,map:new(pe||xe),string:new Ae}},Te.prototype.delete=function(e){return Re(this,e).delete(e)},Te.prototype.get=function(e){return Re(this,e).get(e)},Te.prototype.has=function(e){return Re(this,e).has(e)},Te.prototype.set=function(e,t){return Re(this,e).set(e,t),this},Oe.prototype.clear=function(){this.__data__=new xe},Oe.prototype.delete=function(e){return this.__data__.delete(e)},Oe.prototype.get=function(e){return this.__data__.get(e)},Oe.prototype.has=function(e){return this.__data__.has(e)},Oe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Te(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case we:return h;case Ce:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Ne(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(Lp,Lp.exports)),Lp.exports),zp=E(Hp);var $p=function(){if(jp)return Mp;jp=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,w)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function w(e){return E(e)?p(e):m(e)}function C(e){return e}return Mp=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:C)}}(),Up=E($p),Vp={};var Wp="created",Gp="destroyed",qp="change",Kp="scroll",Yp="fullscreen",Xp="unFullScreen",Zp="modalOrPanelShow",Jp="modalOrPanelHide",Qp={};function eh(e,t){var n=e.key,r=e.factory,o=e.config,i=Np(Np({},o),t||{});if(null!=Qp[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Qp[n]=r,function(e,t){null!=t&&(Vp[e]=t)}(n,i)}var th=new WeakMap,nh=new WeakMap,rh=new WeakMap,oh=new WeakMap,ih=new WeakMap,ah=new WeakMap,sh=new WeakMap,uh=new WeakMap,lh=new WeakMap,ch=new WeakMap,dh=new WeakMap,fh=new WeakMap,ph=new WeakMap,hh=new WeakMap,gh=new WeakMap,vh=new WeakMap,mh=new WeakMap,yh=new WeakMap,bh=new WeakMap,Eh=new WeakMap,wh=new WeakMap,Ch=new WeakMap,Dh=new WeakMap,Sh=new WeakMap,Ah=new WeakMap,xh=new WeakMap,Th=new WeakMap,Oh=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Qp)e.push(t);return e},t.getConfig=function(){var e=ch.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},Nh=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function Bh(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function kh(e={},t={}){Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:Bh(t[n])&&Bh(e[n])&&Object.keys(t[n]).length>0&&kh(e[n],t[n])})}const Fh={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Ph(){const e="undefined"!=typeof document?document:{};return kh(e,Fh),e}const Ih={document:Fh,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function _h(){const e="undefined"!=typeof window?window:{};return kh(e,Ih),e}class Rh extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function Lh(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Lh(e)):t.push(e)}),t}function Mh(e,t){return Array.prototype.filter.call(e,t)}function jh(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Hh(e,t){const n=_h(),r=Ph();let o=[];if(!t&&e instanceof Rh)return e;if(!e)return new Rh(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=r.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)o.push(t.childNodes[e])}else o=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof Rh)return e;o=e}return new Rh(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(o))}function zh(...e){const t=Lh(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function $h(...e){const t=Lh(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function Uh(...e){const t=Lh(e.map(e=>e.split(" ")));return Mh(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function Vh(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this}function Wh(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function Gh(e,t){let n;if(void 0===t){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];const t=n.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)n=this[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this}function qh(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const n in e.dataset)t[n]=e.dataset[n];else for(let n=0;n<e.attributes.length;n+=1){const r=e.attributes[n];r.name.indexOf("data-")>=0&&(t[jh(r.name.split("data-")[1])]=r.value)}for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function Kh(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n<e.selectedOptions.length;n+=1)t.push(e.selectedOptions[n].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const n=this[t];if(Array.isArray(e)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let t=0;t<n.options.length;t+=1)n.options[t].selected=e.indexOf(n.options[t].value)>=0;else n.value=e}return this}function Yh(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),Hh(t).is(n))r.apply(t,o);else{const e=Hh(t).parents();for(let t=0;t<e.length;t+=1)Hh(e[t]).is(n)&&r.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const s=t.split(" ");let u;for(let e=0;e<this.length;e+=1){const t=this[e];if(n)for(u=0;u<s.length;u+=1){const e=s[u];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:i}),t.addEventListener(e,i,o)}else for(u=0;u<s.length;u+=1){const e=s[u];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function Xh(...e){let[t,n,r,o]=e;"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const i=t.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const i=this[e];let a;if(!n&&i.dom7Listeners?a=i.dom7Listeners[t]:n&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function Zh(){const e=_h();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Jh(){const e=_h();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function Qh(){if(this.length>0){const e=_h(),t=Ph(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-i,left:r.left+u-a}}return null}function eg(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function tg(){const e=_h();for(let t=0;t<this.length;t+=1){const n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function ng(e,t){const n=_h();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function rg(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this}function og(e){return Hh(Mh(this,e))}function ig(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function ag(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function sg(e){const t=_h(),n=Ph(),r=this[0];let o,i;if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(o=Hh(e),i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof Rh){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}return!1}function ug(...e){let t;const n=Ph();for(let r=0;r<e.length;r+=1){t=e[r];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const r=n.createElement("div");for(r.innerHTML=t;r.firstChild;)this[e].appendChild(r.firstChild)}else if(t instanceof Rh)for(let n=0;n<t.length;n+=1)this[e].appendChild(t[n]);else this[e].appendChild(t)}return this}function lg(e){const t=Ph();let n,r;for(n=0;n<this.length;n+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,r=o.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof Rh)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function cg(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?Hh(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return Hh(t)}function dg(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?Hh(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return Hh(t)}function fg(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return Hh(t)}function pg(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!Hh(r[n]).is(e)||t.push(r[n])}return Hh(t)}function hg(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function gg(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this}Hh.fn=Rh.prototype;const vg="resize scroll".split(" ");function mg(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)vg.indexOf(e)<0&&(e in this[t]?this[t][e]():Hh(this[t]).trigger(e));return this}return this.on(e,...t)}}const yg=mg("click"),bg=mg("focus"),Eg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let wg=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Cg(e){Promise.resolve().then(e)}var Dg,Sg=function(e){return Object.prototype.toString.call(e)};ng&&(Hh.fn.css=ng),ug&&(Hh.fn.append=ug),zh&&(Hh.fn.addClass=zh),$h&&(Hh.fn.removeClass=$h),Uh&&(Hh.fn.hasClass=Uh),Yh&&(Hh.fn.on=Yh),bg&&(Hh.fn.focus=bg),Vh&&(Hh.fn.attr=Vh),Wh&&(Hh.fn.removeAttr=Wh),eg&&(Hh.fn.hide=eg),tg&&(Hh.fn.show=tg),Qh&&(Hh.fn.offset=Qh),Zh&&(Hh.fn.width=Zh),Jh&&(Hh.fn.height=Jh),cg&&(Hh.fn.parent=cg),dg&&(Hh.fn.parents=dg),sg&&(Hh.fn.is=sg),qh&&(Hh.fn.dataset=qh),Kh&&(Hh.fn.val=Kh),ag&&(Hh.fn.text=ag),ig&&(Hh.fn.html=ig),pg&&(Hh.fn.children=pg),hg&&(Hh.fn.remove=hg),fg&&(Hh.fn.find=fg),rg&&(Hh.fn.each=rg),gg&&(Hh.fn.empty=gg),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"}(Dg||(Dg={}));var Ag=/\[object HTML([A-Z][a-z]*)*Element\]/,xg=function(e){return Ag.test(Sg(e))},Tg=function(e){return null!=e&&"number"==typeof e.nodeType},Og=function(e){return Tg(e)&&e.nodeType===Dg.COMMENT_NODE},Ng=function(e){return Tg(e)&&e.nodeType===Dg.ELEMENT_NODE},Bg=function(e){return"[object Selection]"===Sg(e)},kg=function(e){return Tg(e)&&e.nodeType===Dg.TEXT_NODE},Fg=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},Pg=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(Og(o)||Ng(o)&&0===o.childNodes.length||Ng(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]},Ig=function(e,t,n){return Pp(Pg(e,t,n),1)[0]},_g=function(e){var t,n,r="";if(kg(e)&&e.nodeValue)return e.nodeValue;if(Ng(e)){try{for(var o=Fp(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=_g(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 Rg(e,t){if(!xg(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;kg(o)?t(o,e):[Dg.ELEMENT_NODE,Dg.DOCUMENT_NODE,Dg.DOCUMENT_FRAGMENT_NODE].includes(i)&&Rg(o,t)}}function Lg(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Dg.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Mg=new RegExp(String.fromCharCode(160),"g");function jg(e){return e.replace(Mg," ")}var Hg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],zg=[];var $g=[];var Ug={};function Vg(e,t){var n=e.length;if(n){var r=e[n-1];if(Dp.Text.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function Wg(e,t,n){return{type:"paragraph",children:[{text:Hh(e).text().replace(/\s+/gm," ")}]}}function Gg(e,t){var n=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(Ng(e)){if("BR"===e.nodeName)return void(Vg(n,"\n")||n.push({text:"\n"}));var r=Kg(Hh(e),t);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}else if(kg(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=jg(o),Vg(n,o)||n.push({text:o}))}}),n)}(e,t),r=function(e){for(var t in Ug)if(e[0].matches(t))return Ug[t];return Wg}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach(function(r){Dp.Editor.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),$g.forEach(function(n){r=n(e[0],r,t)}))}),o}function qg(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(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=jg(n)};return $g.forEach(function(n){r=n(e[0],r,t)}),r}function Kg(e,t){zg.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=Hh(r(e[0])))});var n=Lg(e);if("span"===n){if(e.attr("data-w-e-type"))return Gg(e,t);var r=e.find("img, a").length>0;if(e[0].childNodes.length>1||r){var o=e[0].childNodes,i=function(e,t){var n={text:""};return $g.forEach(function(r){n=r(e[0],n,t)}),n}(Hh(e[0]),t);return Array.from(o).flatMap(function(e){var n=function(e,t,n){var r=e[0];if(Ng(r)){var o=Kg(e,n);return delete t.text,Array.isArray(o)?o.map(function(e){return Np(Np({},t),e)}):[Np(Np({},t),o)]}if(Og(r))return null;var i=kg(r)?{text:r.textContent||""}:qg(e,n);return[Np(Np({},t),i)]}(Hh(e),i,t);return n||[]})}return qg(e,t)}if("code"===n)return"pre"===Lg(e.parent())?Gg(e,t):qg(e,t);if(Hg.includes(n)){if(e[0].childNodes.length>0&&e[0].childNodes[0].nodeType!==Node.TEXT_NODE){o=e[0].childNodes;return Np(Np({},Kg(Hh(o[0]),t)),qg(e,t))}return qg(e,t)}return Gg(e,t)}function Yg(e,t,n){var r=Hh(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(Gp,function(){r.removeAttr(t)}),!1)}function Xg(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=Hh("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach(function(t){var r=Kg(Hh(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}function Zg(e,t){return"w-e-element-".concat(e,"-").concat(t)}var Jg=[];var Qg,ev,tv={};function nv(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function rv(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=Dp.Editor.isVoid(t,e),s="";a||(s=i.map(function(e){return vv(e,t)}).join(""));var u=function(e){return tv[e]||nv}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||Jg.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var ov=function(){if(ev)return Qg;ev=1;var e=9007199254740991,t="[object Arguments]",n="[object Map]",r="[object Promise]",o="[object Set]",i="[object WeakMap]",a="[object DataView]",s=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l="\\ud800-\\udfff",c="\\u0300-\\u036f\\ufe20-\\ufe23",d="\\u20d0-\\u20f0",f="\\ufe0e\\ufe0f",p="["+l+"]",h="["+c+d+"]",g="\\ud83c[\\udffb-\\udfff]",v="[^"+l+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",w="(?:"+h+"|"+g+")"+"?",C="["+f+"]?",D=C+w+("(?:"+E+"(?:"+[v,m,y].join("|")+")"+C+w+")*"),S="(?:"+[v+h+"?",h,m,y,p].join("|")+")",A=RegExp(g+"(?="+g+")|"+S+D,"g"),x=RegExp("["+E+l+c+d+f+"]"),T="object"==typeof b&&b&&b.Object===Object&&b,O="object"==typeof self&&self&&self.Object===Object&&self,N=T||O||Function("return this")();function B(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,function(t){return e[t]})}function k(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function F(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function P(e){return function(e){return x.test(e)}(e)?function(e){return e.match(A)||[]}(e):function(e){return e.split("")}(e)}var I,_,R=Function.prototype,L=Object.prototype,M=N["__core-js_shared__"],j=function(){var e=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),H=R.toString,z=L.hasOwnProperty,$=L.toString,U=RegExp("^"+H.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=N.Symbol,W=V?V.iterator:void 0,G=L.propertyIsEnumerable,q=(I=Object.keys,_=Object,function(e){return I(_(e))}),K=se(N,"DataView"),Y=se(N,"Map"),X=se(N,"Promise"),Z=se(N,"Set"),J=se(N,"WeakMap"),Q=ce(K),ee=ce(Y),te=ce(X),ne=ce(Z),re=ce(J);function oe(e,n){var r=de(e)||function(e){return function(e){return ge(e)&&fe(e)}(e)&&z.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!z.call(e,a)||i&&("length"==a||le(a,o))||r.push(a);return r}function ie(e){if(!he(e)||function(e){return!!j&&j in e}(e))return!1;var t=pe(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?U:s;return t.test(ce(e))}function ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||L,t!==r)return q(e);var t,n,r,o=[];for(var i in Object(e))z.call(e,i)&&"constructor"!=i&&o.push(i);return o}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(n)?n:void 0}var ue=function(e){return $.call(e)};function le(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<n}function ce(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(K&&ue(new K(new ArrayBuffer(1)))!=a||Y&&ue(new Y)!=n||X&&ue(X.resolve())!=r||Z&&ue(new Z)!=o||J&&ue(new J)!=i)&&(ue=function(e){var t=$.call(e),s="[object Object]"==t?e.constructor:void 0,u=s?ce(s):void 0;if(u)switch(u){case Q:return a;case ee:return n;case te:return r;case ne:return o;case re:return i}return t});var de=Array.isArray;function fe(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!pe(t)}function pe(e){var t=he(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function he(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function ve(e){return e?B(e,function(e){return fe(e)?oe(e):ae(e)}(e)):[]}return Qg=function(e){if(!e)return[];if(fe(e))return function(e){return"string"==typeof e||!de(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?P(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(W&&e[W])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[W]());var t=ue(e);return(t==n?k:t==o?F:ve)(e)},Qg}(),iv=E(ov),av=0,sv=function(){this.id="".concat(av++)},uv="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),lv="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),cv="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),dv="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),fv="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),pv="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),hv=!fv&&!dv&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,gv={getWindow:function(e){var t=Dh.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=Ch.get(t);return n||(n=new sv,Ch.set(t,n)),n},setNewKey:function(e){var t=new sv;Ch.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=mh.get(r);if(null==o){if(Dp.Editor.isEditor(r))return n;break}var i=vh.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=gv.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==Sg(n)&&!function(e){return"[object ShadowRoot]"===Sg(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return mh.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=gv.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[gv.findPath(e,t)[0]];return Dp.Node.get(e,n)},toDOMNode:function(e,t){var n;if(Dp.Editor.isEditor(t))n=yh.get(e);else{var r=gv.findKey(e,t);n=Eh.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=gv.toDOMNode(e,e);try{r=Ng(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=Dp.Range.isBackward(t),i=gv.toDOMPoint(e,n),a=Dp.Range.isCollapsed(t)?i:gv.toDOMPoint(e,r),s=gv.getWindow(e).document.createRange(),u=Pp(o?a:i,2),l=u[0],c=u[1],d=Pp(o?i:a,2),f=d[0],p=d[1],h=!!(Ng(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(Ng(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=Pp(Dp.Editor.node(e,t.path),1)[0],a=gv.toDOMNode(e,i);Dp.Editor.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=Fp(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=Ng(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?bh.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=gv.toSlateNode(e,t.target),s=gv.findPath(e,a);if(Dp.Editor.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=Dp.Editor.point(e,s,{edge:l?"start":"end"}),d=l?Dp.Editor.before(e,c):Dp.Editor.after(e,c);if(d)return Dp.Editor.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return gv.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((Bg(t)?t.anchorNode:t.startContainer)&&(Bg(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=pv&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=gv.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:gv.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l});if(!d)return null;var f={anchor:c,focus:d};return Dp.Range.isExpanded(f)&&Dp.Range.isForward(f)&&Ng(i)&&Dp.Editor.void(e,{at:f.focus,mode:"highest"})&&(f=Dp.Editor.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=Pp(o?t:function(e){var t,n=Pp(e,2),r=n[0],o=n[1];if(Ng(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=Pp(Pg(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Ng(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Ig(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),s=a[0],u=a[1],l=s.parentNode,c=null,d=0;if(l){var f=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null,g=gv.getWindow(e);if(p&&g.document.createRange){c=p.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();Ip(Ip([],Pp(iv(m.querySelectorAll("[data-slate-zero-width]"))),!1),Pp(iv(m.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),d=m.textContent.length,h=c}else f&&((p=f.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),d=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach(function(e){d-=e.textContent.length})):d=1);h&&d===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||lv&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var y=gv.toSlateNode(e,c);return{path:gv.findPath(e,y),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return Dp.Editor.hasPath(e,n.path)&&Dp.Editor.hasPath(e,r.path)},getNodeType:function(e){return Dp.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return Dp.Node.string(e)}).join("")},getSelectedElems:function(e){var t,n,r=[],o=Dp.Editor.nodes(e,{universal:!0});try{for(var i=Fp(o),a=i.next();!a.done;a=i.next()){var s=Pp(a.value,1)[0];Dp.Element.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Pp(Dp.Editor.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Pp(Dp.Editor.nodes(e,{match:function(e){return Dp.Text.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=Pp(Dp.Editor.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&Pp(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(Dp.Editor.isEnd(e,n.anchor,t)||Dp.Editor.isEnd(e,n.focus,t))},getTextarea:function(e){var t=th.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return oh.get(e)||null},getHoverbar:function(e){return ah.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 t,n,r,o,i=gv.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=Fp(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!kg(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=Dp.Editor.nodes(e,{match:function(t){return!(!Dp.Element.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=Fp(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];Rg(gv.toDOMNode(e,h),function(e,t){var n=Hh(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.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 t,n,r=Dp.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=Fp(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(Dp.Range.isExpanded(t))return!1;var n=gv.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=Dp.Editor.node(e,t);if(null==n)return!1;var r=Pp(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function vv(e,t){return Dp.Element.isElement(e)?rv(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," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=gv.getParentsNodes(t,e).some(function(e){return"pre"===gv.getNodeType(e)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=gv.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return Jg.forEach(function(t){return r=t(e,r)}),r}(e,t)}var mv=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},yv=function(e,t,n){var r=gv.toDOMRange(e,t).getBoundingClientRect(),o=gv.toDOMRange(e,n).getBoundingClientRect();return mv(r,o)&&mv(o,r)},bv=function(e,t){var n,r,o=[];try{for(var i=Fp(Dp.Editor.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=Pp(a.value,2),u=s[0],l=s[1],c=gv.findKey(e,u);o.push([l,c])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o};function Ev(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):Dp.Transforms.insertNodes(e,t,{mode:"highest"})}var wv,Cv,Dv,Sv,Av,xv,Tv,Ov,Nv,Bv,kv,Fv,Pv,Iv,_v,Rv,Lv,Mv,jv,Hv,zv,$v,Uv,Vv,Wv,Gv,qv,Kv,Yv,Xv,Zv,Jv,Qv,em,tm,nm,rm,om,im,am,sm=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,Ip([],Pp(bv(t,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,Ip([],Pp(bv(t,Dp.Path.parent(e.path))),!1));break;case"merge_node":var f=Dp.Path.previous(e.path);d.push.apply(d,Ip([],Pp(bv(t,f)),!1));break;case"move_node":var p=Dp.Path.common(Dp.Path.parent(e.path),Dp.Path.parent(e.newPath));d.push.apply(d,Ip([],Pp(bv(t,p)),!1));break;case"set_selection":(null===(a=null===(i=e.newProperties)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.path)&&(d.push.apply(d,Ip([],Pp(bv(t,null===(u=null===(s=e.newProperties)||void 0===s?void 0:s.focus)||void 0===u?void 0:u.path)),!1)),d.push.apply(d,Ip([],Pp(bv(t,null===(c=null===(l=e.properties)||void 0===l?void 0:l.focus)||void 0===c?void 0:c.path)),!1)))}o(e);try{for(var h=Fp(d),g=h.next();!g.done;g=h.next()){var v=Pp(g.value,2),m=v[0],y=v[1],b=Pp(Dp.Editor.node(t,m),1)[0];Ch.set(b,y),"type"in b&&(hh.has(b)&&hh.delete(b),gh.has(b)&&gh.delete(b))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&Dp.Range.isCollapsed(e.selection)){var r=Dp.Editor.above(e,{match:function(t){return Dp.Editor.isBlock(e,t)},at:e.selection});if(r){var o=Pp(r,2)[1],a=Dp.Editor.range(e,o,e.selection.anchor),s=function(e,t){var n=Dp.Editor.range(e,Dp.Range.end(t)),r=Array.from(Dp.Editor.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(yv(e,Dp.Editor.range(e,r[o]),n))return Dp.Editor.range(e,r[o],n);if(r.length<2)return Dp.Editor.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)yv(e,Dp.Editor.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return Dp.Editor.range(e,r[i],n)}(t,a);Dp.Range.isCollapsed(s)||Dp.Transforms.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&Ah.set(t,e),t.emit(qp),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,n=void 0===e?[]:e,r=t.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return n.map(function(e){var n=gv.getNodeType(e);if(o.includes(n))return vv(e,t);var r=gh.get(e);if(r)return r;var i=vv(e,t);return gh.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return Dp.Node.string(e)}).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":Dp.Editor.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=Dp.Editor.nodes(t,{at:[],universal:!0});try{for(var s=Fp(a),u=s.next();!u.done;u=s.next()){var l=Pp(u.value,1)[0];if(Dp.Element.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=gv.findKey(t,l),d=Zg(l.type,c.id);i.push(Np(Np({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!Dp.Element.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||Dp.Text.isText(a)&&""===a.text},t.clear=function(){Dp.Transforms.delete(t,{at:{anchor:Dp.Editor.start(t,[]),focus:Dp.Editor.end(t,[])}}),0===t.children.length&&Dp.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return gv.getParentNode(t,e)},t.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(e){var t=e.nodeName;return!!kg(e)||!!Ng(e)&&!Nh.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(gv.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach(function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(kg(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(Hg.includes(r.toLowerCase()))l=!0;else for(var c in Ug)if(u.matches(c)){l=!0;break}if(l){var d=Kg(Hh(u),t);return Array.isArray(d)?(d.forEach(function(e){return Ev(t,e)}),s+=1):(Ev(t,d),s+=1),void(gv.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!gv.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")}),s&&a&&gv.isEmptyPath(t,a)&&Dp.Transforms.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=Xg(t,null==e?"":e);if(Dp.Transforms.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(Dp.Editor.start(t,[]))}},t},um=1,lm=function(e){var t=e;return t.id="wangEditor-".concat(um),um+=1,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(gv.toDOMNode(t,t).focus({preventScroll:!0}),Sh.set(t,!0),e){var n=Dp.Editor.end(t,[]);Dp.Transforms.select(t,n)}else{var r=Ah.get(t);r?Dp.Transforms.select(t,r):Dp.Transforms.select(t,Dp.Editor.start(t,[]))}},t.isFocused=function(){return!!Sh.get(t)},t.blur=function(){gv.toDOMNode(t,t).blur(),Dp.Transforms.deselect(t),Sh.set(t,!1)},t.updateView=function(){gv.getTextarea(t).changeViewState();var e=gv.getToolbar(t);e&&e.changeToolbarState();var n=gv.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=gv.getTextarea(t);e.destroy(),th.delete(t),nh.delete(e);var n=gv.getToolbar(t);n&&(n.destroy(),oh.delete(t),rh.delete(n));var r=gv.getHoverbar(t);r&&(r.destroy(),ah.delete(t),ih.delete(r)),t.isDestroyed=!0,t.emit(Gp)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=Hh("#".concat(e));if(0!==r.length){var o=r[0];if(!gv.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=gv.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||gv.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=uh.get(t);null!=e&&e.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return gv.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=gv.getToolbar(t);n&&(e=n.$box);var r=gv.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit(Yp)}},t.unFullScreen=function(){if(t.isFullScreen){var e=gv.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit(Xp)},200)}},t.getEditableContainer=function(){return gv.getTextarea(t).$textAreaContainer[0]},t},cm={exports:{}},dm={exports:{}};function fm(){if(Cv)return wv;Cv=1;return wv=function(e){return null!=e}}function pm(){if(xv)return Av;xv=1;var e=function(){if(Sv)return Dv;Sv=1;var e=fm(),t={object:!0,function:!0,undefined:!0};return Dv=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Av=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function hm(){if(Bv)return Nv;Bv=1;var e=function(){if(Ov)return Tv;Ov=1;var e=pm();return Tv=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 Nv=function(r){return!!e(r)&&!t.test(n.call(r))}}function gm(){if(Mv)return Lv;Mv=1;var e=(Rv?_v:(Rv=1,_v=function(){}))();return Lv=function(t){return t!==e&&null!==t},Lv}function vm(){return $v||($v=1,zv=(Iv?Pv:(Iv=1,Pv=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(Hv)return jv;Hv=1;var e=gm(),t=Object.keys;return jv=function(n){return t(e(n)?Object(n):n)}}()),zv}function mm(){if(Gv)return Wv;Gv=1;var e=vm(),t=function(){if(Vv)return Uv;Vv=1;var e=gm();return Uv=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return Wv=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},Wv}function ym(){return Kv?qv:(Kv=1,qv=(Fv||(Fv=1,kv=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")}),kv)()?Object.assign:mm())}function bm(){return nm||(nm=1,tm=function(){if(Jv)return Zv;Jv=1;var e="razdwatrzy";return Zv=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(em)return Qv;em=1;var e=String.prototype.indexOf;return Qv=function(t){return e.call(this,t,arguments[1])>-1},Qv}()),tm}function Em(){if(rm)return dm.exports;rm=1;var e=fm(),t=hm(),n=ym(),r=function(){if(Xv)return Yv;Xv=1;var e=gm(),t=Array.prototype.forEach,n=Object.create;return Yv=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},Yv}(),o=bm(),i=dm.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,d;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),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},dm.exports}var wm=(am||(am=1,function(e,t){var n,r,o,i,a,s,u,l=Em(),c=im?om:(im=1,om=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(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},r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},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},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)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.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];d.call(o,this,i)}},a={on:n,once:r,off:o,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?p(u):g(Object(e),s)},t.methods=a}(cm,cm.exports)),cm.exports),Cm=E(wm);function Dm(e){var t=xh.get(e);return null==t&&(t=Cm(),xh.set(e,t)),t}var Sm=new WeakMap;function Am(e,t){var n=Sm.get(e);null==n&&(n=new Set,Sm.set(e,n)),n.add(t)}var xm=function(e){var t=e;return t.on=function(e,n){var r=Dm(t);if(r.on(e,n),"destroyed"===e&&Am(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Am(t,o)}},t.once=function(e,n){Dm(t).once(e,n)},t.off=function(e,n){Dm(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Dm(t);if(o.emit.apply(o,Ip([e],Pp(n),!1)),"destroyed"===e){var i=function(e){return Sm.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){Sm.set(e,new Set)}(t)}},t},Tm=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=Pp(Dp.Range.edges(n),2),o=r[0],i=r[1],a=Dp.Editor.void(t,{at:o.path}),s=Dp.Editor.void(t,{at:i.path});if(!Dp.Range.isCollapsed(n)||a){var u=gv.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var d=Pp(s,1)[0],f=u.cloneRange(),p=gv.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),kg(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",_g(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var n,r,o=e.getData("application/x-slate-fragment");if(o){var i=decodeURIComponent(window.atob(o)),a=JSON.parse(i);t.insertFragment(a)}else{var s=e.getData("text/plain"),u=e.getData("text/html");if(u)t.dangerouslyInsertHtml(u);else if(s){var l=s.split(/\n\r|\r\n|\r|\n/),c=!1;try{for(var d=Fp(l),f=d.next();!f.done;f=d.next()){var p=f.value,h=gv.getLeftLengthOfMaxLength(t);c&&h>0&&Dp.Transforms.splitNodes(t,{always:!0}),t.insertText(p),c=!0}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}}},t},Om=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=gv.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=gv.getLeftLengthOfMaxLength(t);if(!(n<=0))n<Dp.Node.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(gv.getLeftLengthOfMaxLength(t)<Dp.Node.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=gv.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?kg(t)?e+(t.textContent||""):Ng(t)?Nh.has(n.toLowerCase())?e:e+(t.textContent||""):e:e},"").length||i(e,n)}}else i(e,n)},t};function Nm(e){var t=gv.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Bm(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=Nm(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=gv.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;var c={},d=l.top-o,f=l.left-i;if(f>a/2){var p=a-f;c.right="".concat(p+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var h=s-d;c.bottom="".concat(h+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 km(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=Dp.Element.isElement(t)&&e.isVoid(t),i=Dp.Element.isElement(t)&&e.isInline(t),a=wh.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(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===Dg.ELEMENT_NODE){var i=o.toLowerCase();if(Eg.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}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=Nm(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,w=l-v;if("bar"===n)return b.left="".concat(w,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?w>(m-d)/2?b.right="".concat(m-w+5,"px"):b.left="".concat(w+d+5,"px"):b.left="20px":b.left="".concat(w,"px"),o)(C=E)<0&&(C=0),b.top="".concat(C,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var C;(C=E+c)<0&&(C=0),b.top="".concat(C+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Fm(e,t){Cg(function(){var n=Nm(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,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-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=h+d-a)>0){var E=t.css("left"),w=parseInt(E.toString(),10)-r;w<0&&(w=0),t.css("left","".concat(w,"px"))}if(g.indexOf("right")>=0&&c<0){var C=t.css("right"),D=parseInt(C.toString(),10)-Math.abs(c);t.css("right","".concat(D,"px"))}}})}var Pm,Im,_m=function(e){var t=e;return t.select=function(e){Dp.Transforms.select(t,e)},t.deselect=function(){var n=t.selection,r=gv.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&Dp.Transforms.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||Dp.Transforms.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Ah.get(t);null!=e&&(t.focus(),Dp.Transforms.select(t,e))},t.getSelectionPosition=function(){return Bm(t)},t.getNodePosition=function(e){return km(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=Pp(Dp.Range.edges(e),2),r=n[0],o=n[1],i=Pp(Dp.Editor.edges(t,[]),2),a=i[0],s=i[1];return!(!Dp.Point.equals(r,a)||!Dp.Point.equals(o,s))},t.selectAll=function(){var e=Dp.Editor.start(t,[]),n=Dp.Editor.end(t,[]);Dp.Transforms.select(t,{anchor:e,focus:n})},t};var Rm=function(){if(Im)return Pm;Im=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof b&&b&&b.Object===Object&&b,a="object"==typeof self&&self&&self.Object===Object&&self,s=i||a||Function("return this")(),u=Object.prototype.toString,l=Math.max,c=Math.min,d=function(){return s.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(i){if("number"==typeof i)return i;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(i))return NaN;if(f(i)){var a="function"==typeof i.valueOf?i.valueOf():i;i=f(a)?a+"":a}if("string"!=typeof i)return 0===i?i:+i;i=i.replace(e,"");var s=n.test(i);return s||r.test(i)?o(i.slice(2),s?2:8):t.test(i)?NaN:+i}return Pm=function(e,t,n){var r,o,i,a,s,u,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,h=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-h>=i}function E(){var e=d();if(b(e))return w(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?c(n,i-(e-h)):n}(e))}function w(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function C(){var e=d(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return h=e,s=setTimeout(E,t),g?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=p(t)||0,f(n)&&(g=!!n.leading,i=(v="maxWait"in n)?l(p(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==s&&clearTimeout(s),h=0,r=u=o=s=void 0},C.flush=function(){return void 0===s?a:w(d())},C},Pm}(),Lm=E(Rm);const Mm=e=>"string"==typeof e,jm=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Hm=e=>null==e?"":""+e,zm=/###/g,$m=e=>e&&e.indexOf("###")>-1?e.replace(zm,"."):e,Um=e=>!e||Mm(e),Vm=(e,t,n)=>{const r=Mm(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Um(e))return{};const t=$m(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Um(e)?{}:{obj:e,k:$m(r[o])}},Wm=(e,t,n)=>{const{obj:r,k:o}=Vm(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=Vm(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Vm(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},Gm=(e,t)=>{const{obj:n,k:r}=Vm(e,t);if(n)return n[r]},qm=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Mm(e[r])||e[r]instanceof String||Mm(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):qm(e[r],t[r],n):e[r]=t[r]);return e},Km=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ym={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Xm=e=>Mm(e)?e.replace(/[&<>"'\/]/g,e=>Ym[e]):e;const Zm=[" ",",","?","!",";"],Jm=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),Qm=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},ey=e=>e&&e.replace("_","-"),ty={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 ny{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||ty,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:(Mm(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ny(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ny(this.logger,e)}}var ry=new ny;class oy{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])})}}}class iy extends oy{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):Mm(n)&&o?a.push(...n.split(o)):a.push(n)));const s=Gm(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&Mm(n)?Qm(this.data&&this.data[e]&&this.data[e][t],n,o):s}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),Wm(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)(Mm(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=Gm(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?qm(s,n,o):s={...s,...n},Wm(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 ay={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 sy={};class uy extends oy{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=ry.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=Zm.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=Jm.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:Mm(o)?[o]: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{key:e,namespaces:Mm(o)?[o]: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 d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!Mm(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(v&&d&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||Mm(g)&&Array.isArray(d))if(v&&Mm(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&!Mm(t.count),f=uy.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=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${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),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=f&&r!==d?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,d)};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))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}else{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(f,d,{...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(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}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=Mm(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&&!Mm(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=Mm(a)?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=ay.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 Mm(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&&!Mm(a.count),d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(Mm(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!sy[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(sy[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.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!!!")),p.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)),d&&i.push(u+t)),f){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)),d&&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&&!Mm(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 ly=e=>e.charAt(0).toUpperCase()+e.slice(1);class cy{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ry.create("languageUtils")}getScriptPartFromCode(e){if(!(e=ey(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=ey(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Mm(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}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]=ly(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]=ly(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=ly(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)),Mm(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 Mm(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))):Mm(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let dy=[{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}],fy={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 py=["v1","v2","v3"],hy=["v4"],gy={zero:0,one:1,two:2,few:3,many:4,other:5};class vy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=ry.create("pluralResolver"),this.options.compatibilityJSON&&!hy.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 dy.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:fy[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()){const n=ey("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];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}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)=>gy[e]-gy[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!py.includes(this.options.compatibilityJSON)}}const my=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=Gm(e,n);return void 0!==r?r:Gm(t,n)})(e,t,n);return!i&&o&&Mm(n)&&(i=Qm(e,n,r),void 0===i&&(i=Qm(t,n,r))),i},yy=e=>e.replace(/\$/g,"$$$$");class by{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=ry.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:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:Xm,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Km(o):i||"{{",this.suffix=a?Km(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?Km(d):f||Km("$t("),this.nestingSuffix=p?Km(p):h||Km(")"),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=my(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(my(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,d=[{regex:this.regexpUnescape,safeValue:e=>yy(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?yy(this.escape(e)):yy(e)}];return d.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=Mm(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 Mm(i)||this.useRawValueToEscape||(i=Hm(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&&!Mm(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&&!Mm(r))return r;Mm(r)||(r=Hm(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 Ey=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(ey(r),o),t[a]=s),s(n)}};class wy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=ry.create("formatter"),this.options=e,this.formats={number:Ey((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:Ey((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:Ey((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:Ey((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:Ey((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ey(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 Cy extends oy{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=ry.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}=Vm(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();Mm(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Mm(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 Dy=()=>({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]),Mm(e[1])&&(t.defaultValue=e[1]),Mm(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}}),Sy=e=>(Mm(e.ns)&&(e.ns=[e.ns]),Mm(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Mm(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ay=()=>{};class xy extends oy{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=Sy(e),this.services={},this.logger=ry,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&&(Mm(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Dy();this.options={...r,...this.options,...Sy(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?ry.init(o(this.modules.logger),this.options):ry.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=wy);const n=new cy(this.options);this.store=new iy(this.options.resources,this.options);const i=this.services;i.logger=ry,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new vy(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 by(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Cy(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 uy(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=Ay),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=jm(),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]:Ay;const n=Mm(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=jm();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=Ay),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&&ay.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=jm();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=Mm(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 Mm(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=jm();return this.options.ns?(Mm(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=jm();Mm(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 cy(Dy());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 xy(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]:Ay;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new xy(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 iy(this.store.data,r),o.services.resourceStore=o.store),o.translator=new uy(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 Ty=xy.createInstance();Ty.createInstance=xy.createInstance,Ty.createInstance,Ty.dir,Ty.init,Ty.loadResources,Ty.reloadResources,Ty.use,Ty.changeLanguage,Ty.getFixedT,Ty.t,Ty.exists,Ty.setDefaultNamespace,Ty.hasLoadedNamespace,Ty.loadNamespaces,Ty.loadLanguages;var Oy="translation";function Ny(e,t){Ty.addResourceBundle(e,Oy,t,!0,!0)}function By(e){return Ty.on("languageChanged",e),function(){return Ty.off("languageChanged",e)}}Ty.init({lng:"zh-CN",resources:{}});var ky=Ty.t.bind(Ty);function Fy(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&&Fy(t)}}function Py(){return Hh('<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 Iy(){return Hh('<div class="w-e-bar-divider"></div>')}function _y(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=uv?"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 Ry=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Hh('<div class="w-e-bar-item"></div>'),this.$button=Hh('<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,d=this.$button;if(c){var f=Hh(c);Fy(f),d.append(f)}else d.text(a);_y(d,c,a,u,n),n&&c&&d.append(Hh('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),Cg(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),Yy(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=Yy(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=Yy(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=Yy(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=Yy(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=Hh(n);Fy(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=Yy(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&_y(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Ly=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Op(t,e),t.prototype.onButtonClick=function(){},t}(Ry),My=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=uh.get(e);null==t&&(t=new Set,uh.set(e,t)),t.add(this),lh.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=lh.get(this);e&&e.emit(Zp,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=lh.get(this);e&&e.emit(Jp)}},e}(),jy=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=Hh('<div class="w-e-drop-panel"></div>'),n}return Op(t,e),t.prototype.genSelfElem=function(){return null},t}(My),Hy=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=Py();o.$button.append(i)}return o}return Op(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=Yy(this);if(null==this.dropPanel){var n=new jy(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}(Ry),zy=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=Hh('<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 Op(t,e),t.prototype.genSelfElem=function(){var e=this,t=Hh('<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=lh.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}(My);function $y(e,t,n){var r=Hh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Hh('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function Uy(e,t){var n=Hh('<div class="button-container"></div>'),r=Hh('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var Vy=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=Hh("body"),o.modal=null,o.menu=n,o}return Op(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=Yy(this),t=this.menu.getModalPositionNode(e);return Dp.Element.isElement(t)?km(e,t,"modal"):Bm(e)},t.prototype.handleModal=function(){var e=Yy(this),t=this.menu;if(null==this.modal){var n=new zy(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=Yy(this),r=this.menu;if(null!=r.getModalContentElem){var o=gv.getTextarea(n),i=gv.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||Fm(n,e.$elem),setTimeout(function(){n.blur()})}},t}(Ry);var Wy=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=Hh('<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 Op(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=Hh("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=Hh('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=Hh('<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(Hh('<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}(My);var Gy=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Hh('<div class="w-e-bar-item"></div>'),this.$button=Hh('<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 d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),_y(d,u,i,c,n),this.$elem.append(d),this.menu=t,Cg(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),Yy(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=Yy(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new Wy(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=Hh(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=Yy(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=Yy(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=Py();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=Yy(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}(),qy=function(){function e(e){this.$elem=Hh('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=Hh('<div class="w-e-bar-item-menus-container"></div>'),this.$button=Hh('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=Hh(n);Fy(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=Py();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){Hh(e).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),Ky=new WeakMap;function Yy(e){var t=sh.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function Xy(e,t,n){void 0===n&&(n=!1);var r=Ky.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new Hy(e,t,n):a?new Vy(e,t,n):new Ly(e,t,n)}if("select"===o&&(r=new Gy(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return Ky.set(t,r),r}function Zy(e,t){var n=e.selection;return null!=n&&(!Dp.Range.isCollapsed(n)&&(!gv.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})&&!!Dp.Text.isText(t)))}var Jy,Qy,eb=function(){function e(){var e=this;this.$elem=Hh('<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=Lm(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,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&Dp.Element.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!Dp.Editor.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),Cg(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),gv.getTextarea(t).$textAreaContainer.append(n),t.on(qp,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(Kp,r),t.on(Yp,r),t.on(Xp,r)}),this.lngListen=By(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;Cg(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=Iy();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=Qp[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=Xy(e,r);this.hoverbarItems.push(a),sh.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),Dp.Element.isElement(e)){var r=km(t,e,"bar");return n.css(r),void Fm(t,n)}if(Dp.Text.isText(e)){r=Bm(t);return n.css(r),void Fm(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 t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return gv.checkNodeType(t,o)},c=Pp(Dp.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=ih.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=Zy),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=gv.findPath(null,e),r=gv.findPath(null,t);return Dp.Path.equals(n,r)},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}();function tb(){if(Qy)return Jy;Qy=1;var e="Expected a function",t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof b&&b&&b.Object===Object&&b,s="object"==typeof self&&self&&self.Object===Object&&self,u=a||s||Function("return this")(),l=Object.prototype.toString,c=Math.max,d=Math.min,f=function(){return u.Date.now()};function p(t,n,r){var o,i,a,s,u,l,p=0,v=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,p=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||m&&e-p>=a}function w(){var e=f();if(E(e))return C(e);u=setTimeout(w,function(e){var t=n-(e-l);return m?d(t,a-(e-p)):t}(e))}function C(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function D(){var e=f(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return p=e,u=setTimeout(w,n),v?b(e):s}(l);if(m)return u=setTimeout(w,n),b(l)}return void 0===u&&(u=setTimeout(w,n)),s}return n=g(n)||0,h(r)&&(v=!!r.leading,a=(m="maxWait"in r)?c(g(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),D.cancel=function(){void 0!==u&&clearTimeout(u),p=0,o=l=i=u=void 0},D.flush=function(){return void 0===u?s:C(f())},D}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||o.test(e)?i(e.slice(2),s?2:8):n.test(e)?NaN:+e}return Jy=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return h(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),p(t,n,{leading:o,maxWait:n,trailing:i})}}var nb=E(tb());function rb(e,t){return Tg(t)&&gv.hasDOMNode(e,t,{editable:!0})}function ob(e,t){if(e.getConfig().readOnly)return!1;var n=ib(e,t)&&gv.toSlateNode(e,t);return Dp.Editor.isVoid(e,n)}function ib(e,t){return Tg(t)&&gv.hasDOMNode(e,t)}const ab=e=>"object"==typeof e&&null!=e&&1===e.nodeType,sb=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,ub=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return sb(n.overflowY,t)||sb(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},lb=(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,cb=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},db=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!ab(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;ab(h)&&d(h);){if(h=cb(h),h===f){p.push(h);break}null!=h&&h===document.body&&ub(h)&&!ub(document.documentElement)||null!=h&&ub(h,c)&&p.push(h)}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:E,top:w,right:C,bottom:D,left:S}=e.getBoundingClientRect(),{top:A,right:x,bottom:T,left:O}=(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 N="start"===s||"nearest"===s?w-A:"end"===s?D+T:w+b/2-A+T,B="center"===u?S+E/2-O+x:"end"===u?C+x:S-O;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&S>=0&&D<=v&&C<=g&&(t===f&&!ub(t)||w>=o&&D<=l&&S>=c&&C<=i))return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),A=parseInt(d.borderTopWidth,10),x=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10);let O=0,F=0;const P="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-A-T:0,_="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)O="start"===s?N:"end"===s?N-v:"nearest"===s?lb(y,y+v,v,A,T,y+N,y+N+b,b):N-v/2,F="start"===u?B:"center"===u?B-g/2:"end"===u?B-g:lb(m,m+g,g,h,x,m+B,m+B+E,E),O=Math.max(0,O+y),F=Math.max(0,F+m);else{O="start"===s?N-o-A:"end"===s?N-l+T+I:"nearest"===s?lb(o,l,n,A,T+I,N,N+b,b):N-(o+n/2)+I/2,F="start"===u?B-c-h:"center"===u?B-(c+r/2)+P/2:"end"===u?B-i+x+P:lb(c,i,r,h,x+P,B,B+E,E);const{scrollLeft:e,scrollTop:a}=t;O=0===R?0:Math.max(0,Math.min(a+O/R,t.scrollHeight-n/R+I)),F=0===_?0:Math.max(0,Math.min(e+F/_,t.scrollWidth-r/_+P)),N+=a-O,B+=e-F}k.push({el:t,top:O,left:F})}return k};function fb(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(db(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of db(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function pb(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=gv.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=yh.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=gv.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&Dp.Range.equals(l,r)){var c=!0;if(Dp.Range.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||gv.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&gv.toDOMRange(t,r);if(g){Dp.Range.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){var m=g.getBoundingClientRect.bind(g)();0===m.top&&0===m.right&&0===m.bottom&&0===m.left&&0===m.height&&0===m.width||(v.getBoundingClientRect=g.getBoundingClientRect.bind(g));var y=document.body;fb(v,{scrollMode:"if-needed",boundary:o.scroll&&s.parentElement||y,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&lv&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=gv.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var hb=new WeakMap,gb=new WeakMap;var vb,mb={};var yb=function(){if(vb)return mb;vb=1,Object.defineProperty(mb,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return a(e,t)}),o=function(e){return r.some(function(t){return s(t,e)})};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return mb.default=i,mb.isHotkey=i,mb.isCodeHotkey=function(e,t){return i(e,t)},mb.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},mb.parseHotkey=a,mb.compareHotkey=s,mb.toKeyCode=u,mb.toKeyName=l,mb}(),bb={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"},Eb={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"},wb={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Cb=function(e){var t=bb[e],n=Eb[e],r=wb[e],o=t&&yb.isKeyHotkey(t),i=n&&yb.isKeyHotkey(n),a=r&&yb.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(uv&&i&&i(e))||!(uv||!a||!a(e)))}},Db={isBold:Cb("bold"),isCompose:Cb("compose"),isMoveBackward:Cb("moveBackward"),isMoveForward:Cb("moveForward"),isDeleteBackward:Cb("deleteBackward"),isDeleteForward:Cb("deleteForward"),isDeleteLineBackward:Cb("deleteLineBackward"),isDeleteLineForward:Cb("deleteLineForward"),isDeleteWordBackward:Cb("deleteWordBackward"),isDeleteWordForward:Cb("deleteWordForward"),isExtendBackward:Cb("extendBackward"),isExtendForward:Cb("extendForward"),isExtendLineBackward:Cb("extendLineBackward"),isExtendLineForward:Cb("extendLineForward"),isItalic:Cb("italic"),isMoveLineBackward:Cb("moveLineBackward"),isMoveLineForward:Cb("moveLineForward"),isMoveWordBackward:Cb("moveWordBackward"),isMoveWordForward:Cb("moveWordForward"),isRedo:Cb("redo"),isSplitBlock:Cb("splitBlock"),isTransposeCharacter:Cb("transposeCharacter"),isUndo:Cb("undo"),isTab:Cb("tab"),isSelectAll:Cb("selectAll")};function Sb(e){e.preventDefault()}var Ab={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(hv&&!o&&rb(n,r.target)){var i=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=Pp(r.getTargetRanges(),1)[0];if(u){var l=gv.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});i&&Dp.Range.equals(i,l)||Dp.Transforms.select(n,l)}}if(i&&Dp.Range.isExpanded(i)){var c=gv.getSelectedElems(n),d="table"===c[0].type,f="table-cell"!==c[c.length-1].type;if(d&&f)return;if(a.startsWith("delete")){var p=a.endsWith("Backward")?"backward":"forward";return void Dp.Editor.deleteFragment(n,{direction:p})}}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":Dp.Editor.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":Dp.Editor.deleteForward(n);break;case"deleteContentBackward":Dp.Editor.deleteBackward(n);break;case"deleteEntireSoftLine":Dp.Editor.deleteBackward(n,{unit:"line"}),Dp.Editor.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":Dp.Editor.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":Dp.Editor.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":Dp.Editor.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":Dp.Editor.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":Dp.Editor.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":Dp.Editor.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":Dp.Editor.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!Th.get(n))break;"[object DataTransfer]"===Sg(s)?n.insertData(s):"string"==typeof s&&Dp.Editor.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&rb(n,r.target)){var a=gv.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===gv.toDOMNode(n,n)||Ng(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Tg(s)&&gv.hasDOMNode(n,s)){var u=gv.toSlateNode(n,s);if(Dp.Element.isElement(u)&&!n.isVoid(u))return}if(cv){var l=a.getSelection();null==l||l.removeAllRanges()}Sh.delete(n)}}}},focus:function(e,t,n){var r=gv.toDOMNode(n,n),o=gv.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,lv&&e.target!==r?r.focus():Sh.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&ib(n,e.target)&&Tg(e.target)){var r=gv.toSlateNode(n,e.target),o=gv.findPath(n,r);if(Dp.Editor.hasPath(n,o))if(Dp.Node.get(n,o)===r){var i=Dp.Editor.start(n,o),a=Dp.Editor.end(n,o),s=Dp.Editor.void(n,{at:i}),u=Dp.Editor.void(n,{at:a});if(s&&u&&Dp.Path.equals(s[1],u[1])){var l=Dp.Editor.range(n,i);Dp.Transforms.select(n,l)}}}},compositionstart:function(e,t,n){if(rb(n,e.target)){var r=n.selection;if(r&&Dp.Range.isExpanded(r)&&(Dp.Editor.deleteFragment(n),Promise.resolve().then(function(){pb(t,n,!0)})),n.selection){var o=gv.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";hb.set(n,i),gb.set(n,o)}t.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)}(t,n)}},compositionend:function(e,t,n){var r=e;if(rb(n,r.target)){t.isComposing=!1;var o=n.selection;if(null!=o){(pv||lv)&&gv.cleanExposedTexNodeInSelectionBlock(n);for(var i=Dp.Range.isBackward(o)?o.focus:o.anchor,a=Pp(Dp.Editor.node(n,[i.path[0]]),1)[0],s=0;s<i.path.length;s+=1){var u=Pp(Dp.Editor.node(n,i.path.slice(0,s+1)),1)[0];if(Dp.Element.isElement(u)&&((cv||lv)&&"link"===u.type||"code"===u.type)){gv.setNewKey(a);break}}var l=r.data;if(l){if(n.getConfig().maxLength){var c=gv.getLeftLengthOfMaxLength(n);if(c<l.length){var d=gv.toDOMRange(n,o);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=hb.get(n)||""),c>0&&Dp.Editor.insertText(n,l.slice(0,c)),t.changeViewState()}else Dp.Editor.insertText(n,l)}else{var f=gv.findDocumentOrShadowRoot(n).getSelection();f&&function(e,t){if(Dp.Range.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=Dp.Editor.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=Dp.Editor.node(e,a);if(Dp.Text.isText(s[0])&&Dp.Text.isText(o[0]))return!0}}}(n,o)&&(n.selection=gv.toSlateRange(n,f,{exactMatch:!1,suppressThrow:!1})),Dp.Editor.insertText(n,l)}cv||setTimeout(function(){var e=n.selection;if(null!=e){var t=gb.get(n);if(null!=t)gv.toDOMRange(n,e).startContainer!==t&&(t.textContent=hb.get(n)||"")}})}}}},compositionupdate:function(e,t,n){rb(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&rb(n,r.target)){if(function(e,t){var n=oh.get(e),r=n&&n.getMenus(),o=ah.get(e),i=o&&o.getMenus(),a=Np(Np({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&yb.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),Db.isTab(r))return Sb(r),void n.handleTab();if(Db.isRedo(r))return Sb(r),void("function"==typeof n.redo&&n.redo());if(Db.isUndo(r))return Sb(r),void("function"==typeof n.undo&&n.undo());if(Db.isMoveLineBackward(r))return Sb(r),void Dp.Transforms.move(n,{unit:"line",reverse:!0});if(Db.isMoveLineForward(r))return Sb(r),void Dp.Transforms.move(n,{unit:"line"});if(Db.isExtendLineBackward(r))return Sb(r),void Dp.Transforms.move(n,{unit:"line",edge:"focus",reverse:!0});if(Db.isExtendLineForward(r))return Sb(r),void Dp.Transforms.move(n,{unit:"line",edge:"focus"});if(Db.isMoveBackward(r))return Sb(r),void(o&&Dp.Range.isCollapsed(o)?Dp.Transforms.move(n,{reverse:!0}):Dp.Transforms.collapse(n,{edge:"start"}));if(Db.isMoveForward(r))return Sb(r),void(o&&Dp.Range.isCollapsed(o)?Dp.Transforms.move(n):Dp.Transforms.collapse(n,{edge:"end"}));if(Db.isMoveWordBackward(r))return Sb(r),o&&Dp.Range.isExpanded(o)&&Dp.Transforms.collapse(n,{edge:"focus"}),void Dp.Transforms.move(n,{unit:"word",reverse:!0});if(Db.isMoveWordForward(r))return Sb(r),o&&Dp.Range.isExpanded(o)&&Dp.Transforms.collapse(n,{edge:"focus"}),void Dp.Transforms.move(n,{unit:"word"});if(Db.isSelectAll(r))return Sb(r),void n.selectAll();if(hv){if((pv||cv)&&o&&(Db.isDeleteBackward(r)||Db.isDeleteForward(r))&&Dp.Range.isCollapsed(o)){var i=Dp.Node.parent(n,o.anchor.path);if(Dp.Element.isElement(i)&&Dp.Editor.isVoid(n,i)&&Dp.Editor.isInline(n,i))return r.preventDefault(),void Dp.Transforms.delete(n,{unit:"block"})}}else{if(Db.isBold(r)||Db.isItalic(r)||Db.isTransposeCharacter(r))return void Sb(r);if(Db.isSplitBlock(r))return Sb(r),void Dp.Editor.insertBreak(n);if(Db.isDeleteBackward(r))return Sb(r),void(o&&Dp.Range.isExpanded(o)?Dp.Editor.deleteFragment(n,{direction:"backward"}):Dp.Editor.deleteBackward(n));if(Db.isDeleteForward(r))return Sb(r),void(o&&Dp.Range.isExpanded(o)?Dp.Editor.deleteFragment(n,{direction:"forward"}):Dp.Editor.deleteForward(n));if(Db.isDeleteLineBackward(r))return Sb(r),void(o&&Dp.Range.isExpanded(o)?Dp.Editor.deleteFragment(n,{direction:"backward"}):Dp.Editor.deleteBackward(n,{unit:"line"}));if(Db.isDeleteLineForward(r))return Sb(r),void(o&&Dp.Range.isExpanded(o)?Dp.Editor.deleteFragment(n,{direction:"forward"}):Dp.Editor.deleteForward(n,{unit:"line"}));if(Db.isDeleteWordBackward(r))return Sb(r),void(o&&Dp.Range.isExpanded(o)?Dp.Editor.deleteFragment(n,{direction:"backward"}):Dp.Editor.deleteBackward(n,{unit:"word"}));if(Db.isDeleteWordForward(r))return Sb(r),void(o&&Dp.Range.isExpanded(o)?Dp.Editor.deleteFragment(n,{direction:"forward"}):Dp.Editor.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!hv&&!n.getConfig().readOnly&&rb(n,e.target)){e.preventDefault();var r=e.key;Dp.Editor.insertText(n,r)}},copy:function(e,t,n){var r=e;if(rb(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(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),rb(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(Dp.Range.isExpanded(o))Dp.Editor.deleteFragment(n);else{var a=Dp.Node.parent(n,o.anchor.path);Dp.Editor.isVoid(n,a)&&Dp.Transforms.delete(n)}}},paste:function(e,t,n){Th.set(n,!0);var r=e;if(!n.getConfig().readOnly&&rb(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void Th.set(n,!1);if(cv||!hv||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(ib(n,e.target)){var r=gv.toSlateNode(n,e.target);Dp.Editor.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(ib(n,r.target)&&!n.getConfig().readOnly){var o=gv.toSlateNode(n,r.target),i=gv.findPath(n,o);if(Dp.Editor.isVoid(n,o)||Dp.Editor.void(n,{at:i,voids:!0})){var a=Dp.Editor.range(n,i);Dp.Transforms.select(n,a)}var s=r.dataTransfer;if(null!=s)gv.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&ib(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&ib(n,r.target)&&null!=o&&!(hv&&cv&&o.files.length>0)){r.preventDefault();var i=n.selection,a=gv.findEventRange(n,r);Dp.Transforms.select(n,a),t.isDraggingInternally&&(i&&Dp.Transforms.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function xb(e){if(Tb(e)){for(;e&&Tb(e);){e=Ob(e).parent}return null!=e?e:null}return e.parentNode}function Tb(e){return 11===e.nodeType}function Ob(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const Nb={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return Ob(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(Tb(e)){let t=e;for(;t&&Tb(t);){t=Ob(t).parent}e=null!=t?t:e}Tb(t)&&(t=Ob(t,e)),n&&Tb(n)&&(n=Ob(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Tb(t)&&(t=Ob(t,e)),e.appendChild(t)},parentNode:xb,nextSibling:function(e){var t;if(Tb(e)){const n=Ob(e),r=xb(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:Tb};function Bb(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const kb=Array.isArray;function Fb(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}const Pb=Bb("",{},[],void 0,void 0);function Ib(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,s=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&s}function _b(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const Rb=["create","update","remove","destroy","pre","post"];function Lb(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=Nb;for(const t of Rb)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return Bb(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return Bb(void 0,{},[],void 0,e)}function s(e,t){return function(){if(0===--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function u(e,t){var n,i,a;let s;const l=e.data,c=null==l?void 0:l.hook;null===(n=null==c?void 0:c.init)||void 0===n||n.call(c,e);const d=e.children,f=e.sel;if("!"===f)null!==(i=e.text)&&void 0!==i||(e.text=""),e.elm=o.createComment(e.text);else if(""===f)e.elm=o.createTextNode(e.text);else if(void 0!==f){const n=f.indexOf("#"),i=f.indexOf(".",n),p=n>0?n:f.length,h=i>0?i:f.length,g=-1!==n||-1!==i?f.slice(0,Math.min(p,h)):f,v=null==l?void 0:l.ns,m=void 0===v?o.createElement(g,l):o.createElementNS(v,g,l);for(e.elm=m,p<h&&m.setAttribute("id",f.slice(p+1,h)),i>0&&m.setAttribute("class",f.slice(h+1).replace(/\./g," ")),s=0;s<r.create.length;++s)r.create[s](Pb,e);if(!Fb(e.text)||kb(d)&&0!==d.length||o.appendChild(m,o.createTextNode(e.text)),kb(d))for(s=0;s<d.length;++s){const e=d[s];null!=e&&o.appendChild(m,u(e,t))}void 0!==c&&(null===(a=c.create)||void 0===a||a.call(c,Pb,e),void 0!==c.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,n,r,i,a){for(;r<=i;++r){const i=n[r];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,n;const o=e.data;if(void 0!==o){null===(n=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<r.destroy.length;++t)r.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&c(n)}}}function d(e,t,n,i){for(var a,u;n<=i;++n){let i;const l=t[n];if(null!=l)if(void 0!==l.sel){c(l),i=r.remove.length+1;const e=s(l.elm,i);for(let t=0;t<r.remove.length;++t)r.remove[t](l,e);const t=null===(u=null===(a=null==l?void 0:l.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;void 0!==t?t(l,e):e()}else l.children?(c(l),d(e,l.children,0,l.children.length-1)):o.removeChild(e,l.elm)}}function f(e,t,n){var i,a,s,c,p,h,g,v;const m=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==m?void 0:m.prepatch)||void 0===a||a.call(m,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||void 0!==t.text&&t.text!==e.text){null!==(s=t.data)&&void 0!==s||(t.data={}),null!==(c=e.data)&&void 0!==c||(e.data={});for(let n=0;n<r.update.length;++n)r.update[n](e,t);null===(g=null===(h=null===(p=t.data)||void 0===p?void 0:p.hook)||void 0===h?void 0:h.update)||void 0===g||g.call(h,e,t)}const b=e.children,E=t.children;void 0===t.text?void 0!==b&&void 0!==E?b!==E&&function(e,t,n,r){let i,a,s,c,p=0,h=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],E=n[y];for(;p<=g&&h<=y;)null==v?v=t[++p]:null==m?m=t[--g]:null==b?b=n[++h]:null==E?E=n[--y]:Ib(v,b)?(f(v,b,r),v=t[++p],b=n[++h]):Ib(m,E)?(f(m,E,r),m=t[--g],E=n[--y]):Ib(v,E)?(f(v,E,r),o.insertBefore(e,v.elm,o.nextSibling(m.elm)),v=t[++p],E=n[--y]):Ib(m,b)?(f(m,b,r),o.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++h]):(void 0===i&&(i=_b(t,p,g)),a=i[b.key],void 0===a?(o.insertBefore(e,u(b,r),v.elm),b=n[++h]):void 0===i[E.key]?(o.insertBefore(e,u(E,r),o.nextSibling(m.elm)),E=n[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,r),v.elm):(f(s,b,r),t[a]=void 0,o.insertBefore(e,s.elm,v.elm)),b=n[++h]));h<=y&&(c=null==n[y+1]?null:n[y+1].elm,l(e,c,n,h,y,r)),p<=g&&d(e,t,p,g)}(y,b,E,n):void 0!==E?(void 0!==e.text&&o.setTextContent(y,""),l(y,null,E,0,E.length-1,n)):void 0!==b?d(y,b,0,b.length-1):void 0!==e.text&&o.setTextContent(y,""):e.text!==t.text&&(void 0!==b&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(v=null==m?void 0:m.postpatch)||void 0===v||v.call(m,e,t)}return function(e,t){let n,s,l;const c=[];for(n=0;n<r.pre.length;++n)r.pre[n]();for(!function(e,t){return e.isElement(t)}(o,e)?function(e,t){return e.isDocumentFragment(t)}(o,e)&&(e=a(e)):e=i(e),Ib(e,t)?f(e,t,c):(s=e.elm,l=o.parentNode(s),u(t,c),null!==l&&(o.insertBefore(l,t.elm,o.nextSibling(s)),d(l,[e],0,0))),n=0;n<c.length;++n)c[n].data.hook.insert(c[n]);for(n=0;n<r.post.length;++n)r.post[n]();return t}}function Mb(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e];if("string"==typeof n)continue;const r=n.data;void 0!==r&&Mb(r,n.children,n.sel)}}function jb(e,t,n){let r,o,i,a={};if(void 0!==n?(null!==t&&(a=t),kb(n)?r=n:Fb(n)?o=n.toString():n&&n.sel&&(r=[n])):null!=t&&(kb(t)?r=t:Fb(t)?o=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(i=0;i<r.length;++i)Fb(r[i])&&(r[i]=Bb(void 0,void 0,void 0,r[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||Mb(a,r,e),Bb(e,a,r,o,void 0)}function Hb(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?109===n.charCodeAt(1)?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,e):r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const zb={create:Hb,update:Hb};function $b(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const Ub={create:$b,update:$b},Vb=/[A-Z]/g;function Wb(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)r in i||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(Vb,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(Vb,"-$&").toLowerCase(),i[r]))}const Gb={create:Wb,update:Wb};function qb(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)qb(e[r],t,n)}function Kb(e,t){const n=e.type,r=t.data.on;r&&r[n]&&qb(r[n],t,e)}function Yb(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){Kb(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const Xb={create:Yb,update:Yb,destroy:Yb};function Zb(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const Jb={create:Zb,update:Zb},Qb="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let eE=!1;function tE(e,t,n){var r;r=()=>{e[t]=n},Qb(()=>{Qb(r)})}function nE(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)r in a||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||tE(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const rE={pre:function(){eE=!1},create:nE,update:nE,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;eE||(e.elm.offsetLeft,eE=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",e=>{e.target===o&&--s,0===s&&t()})}};function oE(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?oE(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(Bb(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function iE(e,t,...n){const r=oE(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?jb(e,t,r[0].text):jb(e,t,r)}var aE=[];var sE,uE,lE={};function cE(e,t,n){return iE(n.isInline(e)?"span":"div",null,t)}function dE(e,t){var n,r=gv.findKey(t,e),o=t.isInline(e),i=Dp.Editor.isVoid(t,e),a=Zg(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return lE[e]||cE}(u);n=i?null:c.map(function(n,r){return gE(n,r,e,t)});var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=Pp(Dp.Node.texts(e),1),g=Pp(h[0],1)[0],v=iE(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},gE(g,0,e,t));f=iE(p,{style:{position:"relative"}},f,v),vh.set(g,0),mh.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return aE.forEach(function(r){n=r(e,t)}),n}(e,f)),Cg(function(){var t=Fg(a);null!=t&&(Eh.set(r,t),wh.set(e,t),bh.set(t,e))}),f}function fE(e,t){return void 0===t&&(t=!1),iE("span",{"data-slate-string":!0},t?e+"\n":e)}function pE(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),iE("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?iE("br",null):null)}function hE(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=gv.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=gv.findPath(n,e),s=o([e,a]),u=Dp.Text.decorations(e,s),l=u.map(function(r,o){var i=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=gv.findPath(o,n),s=Dp.Path.parent(a);if(Dp.Editor.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?pE(Dp.Node.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==Dp.Editor.string(o,s)?""===i?pE():t&&"\n"===i.slice(-1)?fE(i,!0):fE(i):pE(0,!0)}(r,o===u.length-1,e,t,n);return i=function(e,t){var n=t;return aE.forEach(function(t){n=t(e,n)}),n}(r,i),iE("span",{"data-slate-leaf":!0},i)}),c=(i=r.id,"w-e-text-".concat(i)),d=iE("span",{"data-slate-node":"text",id:c,key:r.id},l);return Cg(function(){var t=Fg(c);null!=t&&(Eh.set(r,t),wh.set(e,t),bh.set(t,e))}),d}function gE(e,t,n,r){return vh.set(e,t),mh.set(e,n),Dp.Element.isElement(e)?dE(e,r):hE(e,n,r)}var vE=function(){if(uE)return sE;uE=1;var e,t="[object Symbol]",n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o="\\ud800-\\udfff",i="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="['’]",p="["+o+"]",h="["+d+"]",g="["+i+a+"]",v="\\d+",m="["+s+"]",y="["+u+"]",E="[^"+o+d+v+s+u+l+"]",w="\\ud83c[\\udffb-\\udfff]",C="[^"+o+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+l+"]",x="\\u200d",T="(?:"+y+"|"+E+")",O="(?:"+A+"|"+E+")",N="(?:['’](?:d|ll|m|re|s|t|ve))?",B="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:"+g+"|"+w+")"+"?",F="["+c+"]?",P=F+k+("(?:"+x+"(?:"+[C,D,S].join("|")+")"+F+k+")*"),I="(?:"+[m,D,S].join("|")+")"+P,_="(?:"+[C+g+"?",g,D,S,p].join("|")+")",R=RegExp(f,"g"),L=RegExp(g,"g"),M=RegExp(w+"(?="+w+")|"+_+P,"g"),j=RegExp([A+"?"+y+"+"+N+"(?="+[h,A,"$"].join("|")+")",O+"+"+B+"(?="+[h,A+T,"$"].join("|")+")",A+"?"+T+"+"+N,A+"+"+B,v,I].join("|"),"g"),H=RegExp("["+x+o+i+a+c+"]"),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$="object"==typeof b&&b&&b.Object===Object&&b,U="object"==typeof self&&self&&self.Object===Object&&self,V=$||U||Function("return this")(),W=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function G(e){return H.test(e)}function q(e){return G(e)?function(e){return e.match(M)||[]}(e):function(e){return e.split("")}(e)}var K=Object.prototype.toString,Y=V.Symbol,X=Y?Y.prototype:void 0,Z=X?X.toString:void 0;function J(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&K.call(e)==t}(e))return Z?Z.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}function Q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function ee(e){return null==e?"":J(e)}var te,ne,re=(te=function(e,t,n){return t=t.toLowerCase(),e+(n?oe(ee(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=ee(e),void 0===t?function(e){return z.test(e)}(e)?function(e){return e.match(j)||[]}(e):function(e){return e.match(n)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(r,W).replace(L,"")}(e).replace(R,"")),te,"")}),oe=(ne="toUpperCase",function(e){var t=G(e=ee(e))?q(e):void 0,n=t?t[0]:e.charAt(0),r=t?Q(t,1).join(""):e.slice(1);return n[ne]()+r});return sE=re}(),mE=E(vE);var yE=["props","attrs","style","dataset","on","hook"];function bE(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(!yE.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=mE(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&&bE(e)})}function EE(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),jb("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map(function(e,n){if(hh.has(e)){var r=hh.get(e);if(r){var o=Pp(r,2),i=o[0],a=o[1];if(a)return i!==n&&(vh.set(e,n),hh.set(e,[n,a])),a}}var s=gE(e,n,t,t);bE(s);var u=t.getConfig().skipCacheTypes,l=void 0===u?["list-item"]:u;return Dp.Element.isElement(e)&&l.includes(e.type)||hh.set(e,[n,s]),s});var d=dh.get(e);if(null==d&&(d=!0),d){var f=function(e){return Hh('<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(f),e.$textArea=f,r=f[0],(h=Lb([Ub,Jb,rE,Gb,Xb,zb]))(r,l),dh.set(e,!1),fh.set(e,h)}else{var p=ph.get(e),h=fh.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Fg(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Dh.set(t,v)}yh.set(t,r),wh.set(t,r),bh.set(r,t),ph.set(e,l)}}var wE=1,CE=function(){function e(e){var t=this;this.id=wE++,this.$textArea=null,this.$progressBar=Hh('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=Hh('<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=nb(function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||o)){var i=gv.findDocumentOrShadowRoot(t),a=i.activeElement,s=gv.toDOMNode(t,t),u=i.getSelection();if(a!==s)return Sh.delete(t),void Dp.Transforms.deselect(t);if(e.latestElement=a,Sh.set(t,!0),!u)return Dp.Transforms.deselect(t);var l=u.anchorNode,c=u.focusNode,d=rb(t,l)||ob(t,l),f=rb(t,c)||ob(t,c);if(d&&f){var p=gv.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!1});Dp.Transforms.select(t,p)}}}(t,e)},100);var n=Hh(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=Hh('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=Hh('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Cg(function(){var e=t.editorInstance,o=gv.getWindow(e);o.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on(Gp,function(){o.document.removeEventListener("selectionchange",t.onDOMSelectionChange)}),r.on("click",function(){return e.hidePanelOrModal()}),e.on(qp,t.changeViewState.bind(t));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(qp,function(){return a(e)}),s||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(qp,t.changeMaxLengthInfo.bind(t)),t.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=nh.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(Up(Ab,function(n,o){t.on(o,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",nb(function(){r.emit(Kp)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(qp,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})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-gv.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.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)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;EE(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=Hh('<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),Cg(function(){pb(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function DE(e,t,n,r){if(vh.set(e,t),mh.set(e,n),Dp.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,n){return DE(t,n,e,r)}),Dp.Editor.isVoid(r,e)){var i=Pp(Dp.Node.texts(e),1),a=Pp(i[0],1)[0];vh.set(a,0),mh.set(a,e)}}}var SE={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};function AE(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,l=function(e){return[Tm,lm,Oh,sm,_m,xm,Om,xp.withHistory].reduce(function(e,t){return t(e)},e)}(Dp.createEditor());if(n&&function(e,t){return Yg(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=zp(Vp),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return Up(t,function(e,t){n[t]=Np(Np({},e),o[t]||{})}),delete e.MENU_CONF,Np({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);ch.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach(function(e){l=e(l)}),function(e,t){var n=t.html,r=t.content;null!=n?e.children=Xg(e,n):r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new CE(n);th.set(l,p),nh.set(p,l),p.changeViewState(),Cg(function(){var e=p.$scroll;null!=e&&e.height()<300&&console.warn("".concat(SE.zh,"\n").concat(SE.en),{element:e,height:e.height()})});var h=void 0;Object.keys(f).length>0&&(h=new eb,ih.set(h,l),ah.set(l,h)),l.on(qp,function(){l.hidePanelOrModal()}),l.on(Kp,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return DE(e,t,l,l)});var g=c.onCreated,v=c.onDestroyed;return g&&l.on(Wp,function(){return g(l)}),v&&l.on(Gp,function(){return v(l)}),Cg(function(){return l.emit(Wp)}),l}var xE=function(){function e(e,t){var n=this;this.$toolbar=Hh('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=Lm(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=Hh(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),Cg(function(){n.initToolbar(),n.lngListen=By(function(){return n.initToolbar()}),n.getEditorInstance().on(qp,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,c=zp(i),d=[];d=Array.isArray(s)?s:[s];var f=0;d.forEach(function(e){var t=e.index+f;if(e.replaceFn&&c[t]){var n=e.replaceFn(c[t]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[t]=n}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,n){c.splice(t+n,0,e)}),f+=e.keys.length)});var p=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),h=p.length;p.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=Iy();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 qy(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 qy,o=this.menus,i=o[e];if(null==i){var a=Qp[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=Xy(e,i,r);(this.toolbarItems.push(u),sh.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=rh.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 TE(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 Yg(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=Np({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new xE(n,i);return rh.set(a,e),oh.set(e,a),a}var OE,NE,BE,kE,FE,PE={exports:{}},IE={};function _E(){if(BE)return IE;BE=1,Object.defineProperty(IE,"__esModule",{value:!0}),IE.justErrorsLogger=IE.debugLogger=void 0;const e=function(){if(NE)return OE;function e(e){return e<10?`0${e}`:e.toString()}return NE=1,OE=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};IE.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return IE.debugLogger=n,IE}function RE(){if(FE)return kE;FE=1;return kE={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},kE}var LE,ME,jE,HE,zE,$E,UE,VE,WE,GE,qE,KE,YE,XE,ZE,JE,QE,ew,tw,nw,rw,ow,iw,aw,sw,uw,lw,cw,dw,fw,pw,hw={};function gw(){return ME?LE:(ME=1,LE=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function vw(){if(HE)return jE;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return HE=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},jE=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},jE}function mw(){if(UE)return hw;UE=1,Object.defineProperty(hw,"__esModule",{value:!0}),hw.defaultOptions=hw.RestrictionError=hw.Restricter=void 0;const e=gw(),t=function(){if($E)return zE;$E=1;var e=vw(),t=/[\/\+\.]/;return zE=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();hw.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}hw.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return hw.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter(e=>!e.isGhost);if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some(e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce((e,t)=>e+t.size,r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},hw}function yw(){if(WE)return VE;return WE=1,VE=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function bw(){if(qE)return GE;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}qE=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=yw();function o(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wangEditor={})}(this,function(e){"use strict";var t,n,r,o,i,a,u,s,l,c,f,d,p,h,g,v,m,y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}function C(){return n?t:(n=1,t=function(e){try{return!!e()}catch(e){return!0}})}function D(){if(o)return r;o=1;var e=C();return r=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function A(){if(a)return i;a=1;var e=D(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return i=e?r:function(e){return function(){return n.apply(e,arguments)}},i}function S(){if(s)return u;s=1;var e=A(),t=e({}.toString),n=e("".slice);return u=function(e){return n(t(e),8,-1)}}function x(){if(c)return l;c=1;var e=A(),t=C(),n=S(),r=Object,o=e("".split);return l=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function O(){return d?f:(d=1,f=function(e){return null==e})}function T(){if(h)return p;h=1;var e=O(),t=TypeError;return p=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(v)return g;v=1;var e=x(),t=T();return g=function(n){return e(t(n))}}function B(){if(y)return m;y=1;var e=function(e){return e&&e.Math===Math&&e};return m=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof m&&m)||function(){return this}()||Function("return this")()}var k,F,I,P,R,_,L,M,j,H,z,$,U,V,W,G,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie,ae={exports:{}};function ue(){return F?k:(F=1,k=!1)}function se(){if(P)return I;P=1;var e=B(),t=Object.defineProperty;return I=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function le(){if(R)return ae.exports;R=1;var e=ue(),t=B(),n=se(),r="__core-js_shared__",o=ae.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ae.exports}function ce(){if(L)return _;L=1;var e=le();return _=function(t,n){return e[t]||(e[t]=n||{})}}function fe(){if(j)return M;j=1;var e=T(),t=Object;return M=function(n){return t(e(n))}}function de(){if(z)return H;z=1;var e=A(),t=fe(),n=e({}.hasOwnProperty);return H=Object.hasOwn||function(e,r){return n(t(e),r)}}function pe(){if(U)return $;U=1;var e=A(),t=0,n=Math.random(),r=e(1.1.toString);return $=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function he(){if(q)return G;q=1;var e,t,n=B(),r=function(){if(W)return V;W=1;var e=B().navigator,t=e&&e.userAgent;return V=t?String(t):""}(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,u=a&&a.v8;return u&&(t=(e=u.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]),G=t}function ge(){if(Y)return K;Y=1;var e=he(),t=C(),n=B().String;return K=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),K}function ve(){if(Z)return X;Z=1;var e=ge();return X=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function me(){if(Q)return J;Q=1;var e=B(),t=ce(),n=de(),r=pe(),o=ge(),i=ve(),a=e.Symbol,u=t("wks"),s=i?a.for||a:a&&a.withoutSetter||r;return J=function(e){return n(u,e)||(u[e]=o&&n(a,e)?a[e]:s("Symbol."+e)),u[e]}}function ye(){if(te)return ee;te=1;var e="object"==typeof document&&document.all;return ee=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function be(){if(re)return ne;re=1;var e=ye();return ne=function(t){return"object"==typeof t?null!==t:e(t)}}function Ee(){if(ie)return oe;ie=1;var e=be(),t=String,n=TypeError;return oe=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var we,Ce,De,Ae,Se={};function xe(){if(Ce)return we;Ce=1;var e=C();return we=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Oe(){if(Ae)return De;Ae=1;var e=xe(),t=C();return De=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var Te,Ne,Be,ke,Fe,Ie,Pe,Re,_e,Le,Me,je,He,ze,$e,Ue,Ve,We,Ge,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,ut,st,lt,ct,ft,dt,pt,ht,gt,vt,mt,yt,bt,Et,wt,Ct,Dt,At,St,xt,Ot,Tt,Nt,Bt,kt,Ft,It,Pt,Rt,_t,Lt,Mt={};function jt(){if(Ne)return Te;Ne=1;var e=B(),t=be(),n=e.document,r=t(n)&&t(n.createElement);return Te=function(e){return r?n.createElement(e):{}}}function Ht(){if(ke)return Be;ke=1;var e=xe(),t=C(),n=jt();return Be=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function zt(){if(Ie)return Fe;Ie=1;var e=D(),t=Function.prototype.call;return Fe=e?t.bind(t):function(){return t.apply(t,arguments)},Fe}function $t(){if(Re)return Pe;Re=1;var e=B(),t=ye();return Pe=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Pe}function Ut(){if(Le)return _e;Le=1;var e=A();return _e=e({}.isPrototypeOf)}function Vt(){if(je)return Me;je=1;var e=$t(),t=ye(),n=Ut(),r=ve(),o=Object;return Me=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Wt(){if(ze)return He;ze=1;var e=String;return He=function(t){try{return e(t)}catch(e){return"Object"}}}function Gt(){if(Ue)return $e;Ue=1;var e=ye(),t=Wt(),n=TypeError;return $e=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function qt(){if(We)return Ve;We=1;var e=Gt(),t=O();return Ve=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ve}function Kt(){if(Ye)return Ke;Ye=1;var e=zt(),t=be(),n=Vt(),r=qt(),o=function(){if(qe)return Ge;qe=1;var e=zt(),t=ye(),n=be(),r=TypeError;return Ge=function(o,i){var a,u;if("string"===i&&t(a=o.toString)&&!n(u=e(a,o)))return u;if(t(a=o.valueOf)&&!n(u=e(a,o)))return u;if("string"!==i&&t(a=o.toString)&&!n(u=e(a,o)))return u;throw new r("Can't convert object to primitive value")},Ge}(),i=me(),a=TypeError,u=i("toPrimitive");return Ke=function(i,s){if(!t(i)||n(i))return i;var l,c=r(i,u);if(c){if(void 0===s&&(s="default"),l=e(c,i,s),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===s&&(s="number"),o(i,s)}}function Yt(){if(Ze)return Xe;Ze=1;var e=Kt(),t=Vt();return Xe=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Xt(){if(Je)return Mt;Je=1;var e=xe(),t=Ht(),n=Oe(),r=Ee(),o=Yt(),i=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s="enumerable",l="configurable",c="writable";return Mt.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=u(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:s in n?n[s]:i[s],writable:!1})}return a(e,t,n)}:a:function(e,n,u){if(r(e),n=o(n),r(u),t)try{return a(e,n,u)}catch(e){}if("get"in u||"set"in u)throw new i("Accessors not supported");return"value"in u&&(e[n]=u.value),e},Mt}function Zt(){if(nt)return tt;nt=1;var e=function(){if(et)return Qe;et=1;var e=Math.ceil,t=Math.floor;return Qe=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Qe}();return tt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Jt(){if(at)return it;at=1;var e=Zt(),t=Math.min;return it=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Qt(){if(st)return ut;st=1;var e=Jt();return ut=function(t){return e(t.length)}}function en(){if(ct)return lt;ct=1;var e=N(),t=function(){if(ot)return rt;ot=1;var e=Zt(),t=Math.max,n=Math.min;return rt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},rt}(),n=Qt(),r=function(r){return function(o,i,a){var u=e(o),s=n(u);if(0===s)return!r&&-1;var l,c=t(a,s);if(r&&i!=i){for(;s>c;)if((l=u[c++])!=l)return!0}else for(;s>c;c++)if((r||c in u)&&u[c]===i)return r||c||0;return!r&&-1}};return lt={includes:r(!0),indexOf:r(!1)}}function tn(){return dt?ft:(dt=1,ft={})}function nn(){if(ht)return pt;ht=1;var e=A(),t=de(),n=N(),r=en().indexOf,o=tn(),i=e([].push);return pt=function(e,a){var u,s=n(e),l=0,c=[];for(u in s)!t(o,u)&&t(s,u)&&i(c,u);for(;a.length>l;)t(s,u=a[l++])&&(~r(c,u)||i(c,u));return c},pt}function rn(){return vt?gt:(vt=1,gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function on(){if(bt)return Se;bt=1;var e=xe(),t=Oe(),n=Xt(),r=Ee(),o=N(),i=function(){if(yt)return mt;yt=1;var e=nn(),t=rn();return mt=Object.keys||function(n){return e(n,t)},mt}();return Se.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,u=o(t),s=i(t),l=s.length,c=0;l>c;)n.f(e,a=s[c++],u[a]);return e},Se}function an(){if(Dt)return Ct;Dt=1;var e=ce(),t=pe(),n=e("keys");return Ct=function(e){return n[e]||(n[e]=t(e))}}function un(){if(St)return At;St=1;var e,t=Ee(),n=on(),r=rn(),o=tn(),i=function(){if(wt)return Et;wt=1;var e=$t();return Et=e("document","documentElement")}(),a=jt(),u=an(),s="prototype",l="script",c=u("IE_PROTO"),f=function(){},d=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(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):p(e);for(var u=r.length;u--;)delete h[s][r[u]];return h()};return o[c]=!0,At=Object.create||function(e,r){var o;return null!==e?(f[s]=t(e),o=new f,f[s]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},At}function sn(){return Nt?Tt:(Nt=1,Tt={})}function ln(){return It?Ft:(It=1,Ft=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function cn(){if(Rt)return Pt;Rt=1;var e=xe(),t=Xt(),n=ln();return Pt=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function fn(){if(Lt)return _t;Lt=1;var e,t,n,r=function(){if(kt)return Bt;kt=1;var e=B(),t=ye(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=be(),a=cn(),u=de(),s=le(),l=an(),c=tn(),f="Object already initialized",d=o.TypeError,p=o.WeakMap;if(r||s.state){var h=s.state||(s.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new d(f);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(u(e,g))throw new d(f);return t.facade=e,a(e,g,t),t},t=function(e){return u(e,g)?e[g]:{}},n=function(e){return u(e,g)}}return _t={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}}}}var dn,pn,hn={},gn={};function vn(){if(pn)return hn;pn=1;var e=xe(),t=zt(),n=function(){if(dn)return gn;dn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return gn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,gn}(),r=ln(),o=N(),i=Yt(),a=de(),u=Ht(),s=Object.getOwnPropertyDescriptor;return hn.f=e?s:function(e,l){if(e=o(e),l=i(l),u)try{return s(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},hn}var mn,yn,bn,En,wn,Cn,Dn,An={exports:{}};function Sn(){if(yn)return mn;yn=1;var e=xe(),t=de(),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 mn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function xn(){if(En)return bn;En=1;var e=A(),t=ye(),n=le(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),bn=n.inspectSource}function On(){if(wn)return An.exports;wn=1;var e=A(),t=C(),n=ye(),r=de(),o=xe(),i=Sn().CONFIGURABLE,a=xn(),u=fn(),s=u.enforce,l=u.get,c=String,f=Object.defineProperty,d=e("".slice),p=e("".replace),h=e([].join),g=o&&!t(function(){return 8!==f(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=An.exports=function(e,t,n){"Symbol("===d(c(t),0,7)&&(t="["+p(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=s(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),An.exports}function Tn(){if(Dn)return Cn;Dn=1;var e=ye(),t=Xt(),n=On(),r=se();return Cn=function(o,i,a,u){u||(u={});var s=u.enumerable,l=void 0!==u.name?u.name:i;if(e(a)&&n(a,l,u),u.global)s?o[i]=a:r(i,a);else{try{u.unsafe?o[i]&&(s=!0):delete o[i]}catch(e){}s?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return o},Cn}var Nn,Bn={};var kn,Fn,In,Pn,Rn,_n,Ln,Mn,jn,Hn,zn,$n,Un,Vn,Wn,Gn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,ur,sr,lr,cr={};function fr(){if(In)return Fn;In=1;var e=$t(),t=A(),n=function(){if(Nn)return Bn;Nn=1;var e=nn(),t=rn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(kn||(kn=1,cr.f=Object.getOwnPropertySymbols),cr),o=Ee(),i=t([].concat);return Fn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},Fn}function dr(){if(Rn)return Pn;Rn=1;var e=de(),t=fr(),n=vn(),r=Xt();return Pn=function(o,i,a){for(var u=t(i),s=r.f,l=n.f,c=0;c<u.length;c++){var f=u[c];e(o,f)||a&&e(a,f)||s(o,f,l(i,f))}},Pn}function pr(){if(jn)return Mn;jn=1;var e=B(),t=vn().f,n=cn(),r=Tn(),o=se(),i=dr(),a=function(){if(Ln)return _n;Ln=1;var e=C(),t=ye(),n=/#|\.prototype\./,r=function(n,r){var s=i[o(n)];return s===u||s!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",u=r.POLYFILL="P";return _n=r}();return Mn=function(u,s){var l,c,f,d,p,h=u.target,g=u.global,v=u.stat;if(l=g?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in s){if(d=s[c],f=u.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(g?c:h+(v?".":"#")+c,u.forced)&&void 0!==f){if(typeof d==typeof f)continue;i(d,f)}(u.sham||f&&f.sham)&&n(d,"sham",!0),r(l,c,d,u)}}}function hr(){if(Un)return $n;Un=1;var e=de(),t=ye(),n=fe(),r=an(),o=function(){if(zn)return Hn;zn=1;var e=C();return Hn=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Hn}(),i=r("IE_PROTO"),a=Object,u=a.prototype;return $n=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var s=o.constructor;return t(s)&&o instanceof s?s.prototype:o instanceof a?u:null},$n}function gr(){if(Wn)return Vn;Wn=1;var e,t,n,r=C(),o=ye(),i=be(),a=un(),u=hr(),s=Tn(),l=me(),c=ue(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(t=u(u(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])||s(e,f,function(){return this}),Vn={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:d}}function vr(){if(qn)return Gn;qn=1;var e=Xt().f,t=de(),n=me()("toStringTag");return Gn=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function mr(){if(tr)return er;tr=1;var e=function(){if(Qn)return Jn;Qn=1;var e=be();return Jn=function(t){return e(t)||null===t}}(),t=String,n=TypeError;return er=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function yr(){if(rr)return nr;rr=1;var e=function(){if(Zn)return Xn;Zn=1;var e=A(),t=Gt();return Xn=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=be(),n=T(),r=mr();return nr=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),nr}function br(){if(ir)return or;ir=1;var e=pr(),t=zt(),n=ue(),r=Sn(),o=ye(),i=function(){if(Yn)return Kn;Yn=1;var e=gr().IteratorPrototype,t=un(),n=ln(),r=vr(),o=sn(),i=function(){return this};return Kn=function(a,u,s,l){var c=u+" Iterator";return a.prototype=t(e,{next:n(+!l,s)}),r(a,c,!1,!0),o[c]=i,a}}(),a=hr(),u=yr(),s=vr(),l=cn(),c=Tn(),f=me(),d=sn(),p=gr(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",E="values",w="entries",C=function(){return this};return or=function(r,f,p,D,A,S,x){i(p,f,D);var O,T,N,B=function(e){if(e===A&&R)return R;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=f+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],R=!m&&P||B(A),_="Array"===f&&I.entries||P;if(_&&(O=a(_.call(new r)))!==Object.prototype&&O.next&&(n||a(O)===v||(u?u(O,v):o(O[y])||c(O,y,C)),s(O,k,!0,!0),n&&(d[k]=C)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,R=function(){return t(P,this)})),A)if(T={values:B(E),keys:S?R:B(b),entries:B(w)},x)for(N in T)(m||F||!(N in I))&&c(I,N,T[N]);else e({target:f,proto:!0,forced:m||F},T);return n&&!x||I[y]===R||c(I,y,R,{name:A}),d[f]=R,T}}function Er(){return ur?ar:(ur=1,ar=function(e,t){return{value:e,done:t}})}function wr(){if(lr)return sr;lr=1;var e=N(),t=function(){if(Ot)return xt;Ot=1;var e=me(),t=un(),n=Xt().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),xt=function(e){o[r][e]=!0}}(),n=sn(),r=fn(),o=Xt().f,i=br(),a=Er(),u=ue(),s=xe(),l="Array Iterator",c=r.set,f=r.getterFor(l);sr=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"),!u&&s&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(e){}return sr}wr();var Cr,Dr,Ar,Sr,xr,Or,Tr,Nr={};function Br(){if(Dr)return Cr;Dr=1;var e={};return e[me()("toStringTag")]="z",Cr="[object z]"===String(e)}function kr(){if(Sr)return Ar;Sr=1;var e=Br(),t=ye(),n=S(),r=me()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Ar=e?n:function(e){var a,u,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(u=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?u:i?n(a):"Object"===(s=n(a))&&t(a.callee)?"Arguments":s},Ar}!function(){if(Tr)return Nr;Tr=1;var e=Br(),t=Tn(),n=function(){if(Or)return xr;Or=1;var e=Br(),t=kr();return xr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var Fr,Ir,Pr,Rr,_r,Lr,Mr,jr,Hr,zr,$r,Ur,Vr,Wr={};function Gr(){if(Ir)return Fr;Ir=1;var e=kr(),t=String;return Fr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function qr(){if(Rr)return Pr;Rr=1;var e=Ee();return Pr=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 Kr(){if(Ur)return $r;Ur=1;var e,t,n=zt(),r=A(),o=Gr(),i=qr(),a=function(){if(Lr)return _r;Lr=1;var e=C(),t=B().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 _r={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),u=ce(),s=un(),l=fn().get,c=function(){if(jr)return Mr;jr=1;var e=C(),t=B().RegExp;return Mr=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),f=function(){if(zr)return Hr;zr=1;var e=C(),t=B().RegExp;return Hr=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})}(),d=u("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,w=void 0!==/()??/.exec("")[1],D=function(e,t){for(var n=e.groups=s(null),r=0;r<t.length;r++){var o=t[r];n[o[0]]=e[o[1]]}};return(b||w||E||c||f)&&(h=function(e){var t,r,a,u=this,s=l(u),c=o(e),f=s.raw;if(f)return f.lastIndex=u.lastIndex,t=n(h,f,c),u.lastIndex=f.lastIndex,t&&s.groups&&D(t,s.groups),t;var C=s.groups,A=E&&u.sticky,S=n(i,u),x=u.source,O=0,T=c;if(A){S=m(S,"y",""),-1===v(S,"g")&&(S+="g"),T=y(c,u.lastIndex);var N=u.lastIndex>0&&g(c,u.lastIndex-1);u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==N&&"\r"!==N&&"\u2028"!==N&&"\u2029"!==N)&&(x="(?: (?:"+x+"))",T=" "+T,O++),r=new RegExp("^(?:"+x+")",S)}w&&(r=new RegExp("^"+x+"$(?!\\s)",S)),b&&(a=u.lastIndex);var B=n(p,A?r:u,T);return A?B?(B.input=c,B[0]=y(B[0],O),B.index=u.lastIndex,u.lastIndex+=B[0].length):u.lastIndex=0:b&&B&&(u.lastIndex=u.global?B.index+B[0].length:a),w&&B&&B.length>1&&n(d,B[0],r,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(B[e]=void 0)}),B&&C&&D(B,C),B}),$r=h}function Yr(){if(Vr)return Wr;Vr=1;var e=pr(),t=Kr();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Wr}Yr();var Xr,Zr,Jr,Qr={};function eo(){if(Zr)return Xr;Zr=1;var e=A(),t=Zt(),n=Gr(),r=T(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),u=function(e){return function(u,s){var l,c,f=n(r(u)),d=t(s),p=f.length;return d<0||d>=p?e?"":void 0:(l=i(f,d))<55296||l>56319||d+1===p||(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 Xr={codeAt:u(!1),charAt:u(!0)}}!function(){if(Jr)return Qr;Jr=1;var e=eo().charAt,t=Gr(),n=fn(),r=br(),o=Er(),i="String Iterator",a=n.set,u=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=u(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))})}();var to,no,ro,oo,io,ao,uo,so,lo,co,fo,po={};function ho(){if(oo)return ro;oo=1;var e=eo().charAt;return ro=function(t,n,r){return n+(r&&e(t,n).length||1)},ro}function go(){if(so)return uo;so=1;var e=zt(),t=de(),n=Ut(),r=function(){if(ao)return io;ao=1;var e=B(),t=C(),n=e.RegExp,r=!t(function(){var e=!0;try{n(".","d")}catch(t){e=!1}var t={},r="",o=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var u in e&&(a.hasIndices="d"),a)i(u,a[u]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==o||r!==o});return io={correct:r}}(),o=qr(),i=RegExp.prototype;return uo=r.correct?function(e){return e.flags}:function(a){return r.correct||!n(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(fo)return po;fo=1;var e=zt(),t=A(),n=function(){if(no)return to;no=1,Yr();var e=zt(),t=Tn(),n=Kr(),r=C(),o=me(),i=cn(),a=o("species"),u=RegExp.prototype;return to=function(s,l,c,f){var d=o(s),p=!r(function(){var e={};return e[d]=function(){return 7},7!==""[s](e)}),h=p&&!r(function(){var e=!1,t=/a/;if("split"===s){var n={};n[a]=function(){return t},(t={constructor:n,flags:""})[d]=/./[d]}return t.exec=function(){return e=!0,null},t[d](""),!e});if(!p||!h||c){var g=/./[d],v=l(d,""[s],function(t,r,o,i,a){var s=r.exec;return s===n||s===u.exec?p&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}});t(String.prototype,s,v[0]),t(u,d,v[1])}f&&i(u[d],"sham",!0)},to}(),r=Ee(),o=be(),i=Jt(),a=Gr(),u=T(),s=qt(),l=ho(),c=go(),f=function(){if(co)return lo;co=1;var e=zt(),t=Ee(),n=ye(),r=S(),o=Kr(),i=TypeError;return lo=function(a,u){var s=a.exec;if(n(s)){var l=e(s,a,u);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,u);throw new i("RegExp#exec called on incompatible receiver")},lo}(),d=t("".indexOf);n("match",function(t,n,p){return[function(n){var r=u(this),i=o(n)?s(n,t):void 0;return i?e(i,n,r):new RegExp(n)[t](a(r))},function(e){var t=r(this),o=a(e),u=p(n,t,o);if(u.done)return u.value;var s=a(c(t));if(!~d(s,"g"))return f(t,o);var h=!!~d(s,"u")||!!~d(s,"v");t.lastIndex=0;for(var g,v=[],m=0;null!==(g=f(t,o));){var y=a(g[0]);v[m]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),h)),m++}return 0===m?null:v}]})}();var vo,mo,yo,bo,Eo,wo,Co,Do,Ao,So,xo,Oo,To,No,Bo,ko,Fo,Io,Po,Ro,_o,Lo,Mo,jo,Ho,zo,$o,Uo={},Vo={};function Wo(){if(mo)return vo;mo=1;var e=be(),t=cn();return vo=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},vo}function Go(){if(Do)return Co;Do=1;var e=cn(),t=function(){if(bo)return yo;bo=1;var e=A(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return yo=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(wo)return Eo;wo=1;var e=C(),t=ln();return Eo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),r=Error.captureStackTrace;return Co=function(o,i,a,u){n&&(r?r(o,i):e(o,"stack",t(a,u)))},Co}function qo(){if(Oo)return xo;Oo=1;var e=function(){if(So)return Ao;So=1;var e=S(),t=A();return Ao=function(n){if("Function"===e(n))return t(n)}}(),t=Gt(),n=D(),r=e(e.bind);return xo=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},xo}function Ko(){if(No)return To;No=1;var e=me(),t=sn(),n=e("iterator"),r=Array.prototype;return To=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Yo(){if(ko)return Bo;ko=1;var e=kr(),t=qt(),n=O(),r=sn(),o=me()("iterator");return Bo=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Xo(){if(Io)return Fo;Io=1;var e=zt(),t=Gt(),n=Ee(),r=Wt(),o=Yo(),i=TypeError;return Fo=function(a,u){var s=arguments.length<2?o(a):u;if(t(s))return n(e(s,a));throw new i(r(a)+" is not iterable")},Fo}function Zo(){if(Ro)return Po;Ro=1;var e=zt(),t=Ee(),n=qt();return Po=function(r,o,i){var a,u;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){u=!0,a=e}if("throw"===o)throw i;if(u)throw a;return t(a),i},Po}function Jo(){if(Lo)return _o;Lo=1;var e=qo(),t=zt(),n=Ee(),r=Wt(),o=Ko(),i=Qt(),a=Ut(),u=Xo(),s=Yo(),l=Zo(),c=TypeError,f=function(e,t){this.stopped=e,this.result=t},d=f.prototype;return _o=function(p,h,g){var v,m,y,b,E,w,C,D=g&&g.that,A=!(!g||!g.AS_ENTRIES),S=!(!g||!g.IS_RECORD),x=!(!g||!g.IS_ITERATOR),O=!(!g||!g.INTERRUPTED),T=e(h,D),N=function(e){var t=v;return v=void 0,t&&l(t,"normal"),new f(!0,e)},B=function(e){return A?(n(e),O?T(e[0],e[1],N):T(e[0],e[1])):O?T(e,N):T(e)};if(S)v=p.iterator;else if(x)v=p;else{if(!(m=s(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=B(p[y]))&&a(d,E))return E;return new f(!1)}v=u(p,m)}for(w=S?p.next:v.next;!(C=t(w,v)).done;){var k=C.value;try{E=B(k)}catch(e){if(!v)throw e;l(v,"throw",e)}if("object"==typeof E&&E&&a(d,E))return E}return new f(!1)},_o}function Qo(){if(jo)return Mo;jo=1;var e=Gr();return Mo=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Mo}function ei(){return zo||(zo=1,function(){if(Ho)return Vo;Ho=1;var e=pr(),t=Ut(),n=hr(),r=yr(),o=dr(),i=un(),a=cn(),u=ln(),s=Wo(),l=Go(),c=Jo(),f=Qo(),d=me()("toStringTag"),p=Error,h=[].push,g=function(e,o){var u,m=t(v,this);r?u=r(new p,m?n(this):v):(u=m?this:i(v),a(u,d,"Error")),void 0!==o&&a(u,"message",f(o)),l(u,g,u.stack,1),arguments.length>2&&s(u,arguments[2]);var y=[];return c(e,h,{that:y}),a(u,"errors",y),u};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:u(1,g),message:u(1,""),name:u(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),Uo}$o||($o=1,ei());var ti,ni,ri={};ni||(ni=1,function(){if(ti)return ri;ti=1;var e=pr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var oi,ii,ai,ui,si,li,ci={};function fi(){return ii?oi:(ii=1,oi={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 di(){if(ui)return ai;ui=1;var e=jt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ai=t===Object.prototype?void 0:t}if(function(){if(si)return ci;si=1;var e=B(),t=fi(),n=di(),r=wr(),o=cn(),i=vr(),a=me()("iterator"),u=r.values,s=function(e,n){if(e){if(e[a]!==u)try{o(e,a,u)}catch(t){e[a]=u}if(i(e,n,!0),t[n])for(var s in r)if(e[s]!==r[s])try{o(e,s,r[s])}catch(t){e[s]=r[s]}}};for(var l in t)s(e[l]&&e[l].prototype,l);s(n,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}pi(),hi()}else global&&(null===(li=global.navigator)||void 0===li?void 0:li.userAgent.match("QQBrowser"))&&(pi(),hi());function pi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function hi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var gi,vi,mi,yi,bi,Ei,wi,Ci,Di,Ai,Si,xi,Oi,Ti,Ni,Bi,ki={};function Fi(){if(vi)return gi;vi=1;var e=function(e){return e&&e.Math===Math&&e};return gi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof gi&&gi)||function(){return this}()||Function("return this")()}function Ii(){return yi?mi:(yi=1,mi=function(e){try{return!!e()}catch(e){return!0}})}function Pi(){return Ei?bi:(Ei=1,bi=!Ii()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Ri(){if(Ci)return wi;Ci=1;var e=Pi(),t=Function.prototype,n=t.apply,r=t.call;return wi="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),wi}function _i(){if(Ai)return Di;Ai=1;var e=Pi(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Di=e?r:function(e){return function(){return n.apply(e,arguments)}},Di}function Li(){if(xi)return Si;xi=1;var e=_i(),t=e({}.toString),n=e("".slice);return Si=function(e){return n(t(e),8,-1)}}function Mi(){if(Ti)return Oi;Ti=1;var e=Li(),t=_i();return Oi=function(n){if("Function"===e(n))return t(n)}}function ji(){if(Bi)return Ni;Bi=1;var e="object"==typeof document&&document.all;return Ni=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var Hi,zi,$i,Ui,Vi={};function Wi(){return zi?Hi:(zi=1,Hi=!Ii()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Gi(){if(Ui)return $i;Ui=1;var e=Pi(),t=Function.prototype.call;return $i=e?t.bind(t):function(){return t.apply(t,arguments)},$i}var qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,ua,sa,la,ca,fa,da,pa,ha,ga,va,ma,ya,ba,Ea,wa,Ca,Da,Aa,Sa,xa,Oa,Ta,Na,Ba={};function ka(){if(qi)return Ba;qi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Ba.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Ba}function Fa(){return Yi?Ki:(Yi=1,Ki=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Ia(){if(Zi)return Xi;Zi=1;var e=_i(),t=Ii(),n=Li(),r=Object,o=e("".split);return Xi=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Pa(){return Qi?Ji:(Qi=1,Ji=function(e){return null==e})}function Ra(){if(ta)return ea;ta=1;var e=Pa(),t=TypeError;return ea=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function _a(){if(ra)return na;ra=1;var e=Ia(),t=Ra();return na=function(n){return e(t(n))}}function La(){if(ia)return oa;ia=1;var e=ji();return oa=function(t){return"object"==typeof t?null!==t:e(t)}}function Ma(){return ua?aa:(ua=1,aa={})}function ja(){if(la)return sa;la=1;var e=Ma(),t=Fi(),n=ji(),r=function(e){return n(e)?e:void 0};return sa=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},sa}function Ha(){return fa?ca:(fa=1,ca=_i()({}.isPrototypeOf))}function za(){if(pa)return da;pa=1;var e=Fi().navigator,t=e&&e.userAgent;return da=t?String(t):""}function $a(){if(ga)return ha;ga=1;var e,t,n=Fi(),r=za(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,u=a&&a.v8;return u&&(t=(e=u.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]),ha=t}function Ua(){if(ma)return va;ma=1;var e=$a(),t=Ii(),n=Fi().String;return va=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),va}function Va(){return ba?ya:(ba=1,ya=Ua()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Wa(){if(wa)return Ea;wa=1;var e=ja(),t=ji(),n=Ha(),r=Object;return Ea=Va()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function Ga(){if(Da)return Ca;Da=1;var e=String;return Ca=function(t){try{return e(t)}catch(e){return"Object"}}}function qa(){if(Sa)return Aa;Sa=1;var e=ji(),t=Ga(),n=TypeError;return Aa=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Ka(){if(Oa)return xa;Oa=1;var e=qa(),t=Pa();return xa=function(n,r){var o=n[r];return t(o)?void 0:e(o)},xa}function Ya(){if(Na)return Ta;Na=1;var e=Gi(),t=ji(),n=La(),r=TypeError;return Ta=function(o,i){var a,u;if("string"===i&&t(a=o.toString)&&!n(u=e(a,o)))return u;if(t(a=o.valueOf)&&!n(u=e(a,o)))return u;if("string"!==i&&t(a=o.toString)&&!n(u=e(a,o)))return u;throw new r("Can't convert object to primitive value")},Ta}var Xa,Za,Ja,Qa,eu,tu,nu,ru,ou,iu,au,uu,su,lu,cu,fu,du,pu,hu,gu,vu,mu,yu,bu,Eu,wu,Cu,Du,Au={exports:{}};function Su(){return Za?Xa:(Za=1,Xa=!0)}function xu(){if(Qa)return Ja;Qa=1;var e=Fi(),t=Object.defineProperty;return Ja=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Ou(){if(eu)return Au.exports;eu=1;var e=Su(),t=Fi(),n=xu(),r="__core-js_shared__",o=Au.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Au.exports}function Tu(){if(nu)return tu;nu=1;var e=Ou();return tu=function(t,n){return e[t]||(e[t]=n||{})}}function Nu(){if(ou)return ru;ou=1;var e=Ra(),t=Object;return ru=function(n){return t(e(n))}}function Bu(){if(au)return iu;au=1;var e=_i(),t=Nu(),n=e({}.hasOwnProperty);return iu=Object.hasOwn||function(e,r){return n(t(e),r)}}function ku(){if(su)return uu;su=1;var e=_i(),t=0,n=Math.random(),r=e(1.1.toString);return uu=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function Fu(){if(cu)return lu;cu=1;var e=Fi(),t=Tu(),n=Bu(),r=ku(),o=Ua(),i=Va(),a=e.Symbol,u=t("wks"),s=i?a.for||a:a&&a.withoutSetter||r;return lu=function(e){return n(u,e)||(u[e]=o&&n(a,e)?a[e]:s("Symbol."+e)),u[e]}}function Iu(){if(du)return fu;du=1;var e=Gi(),t=La(),n=Wa(),r=Ka(),o=Ya(),i=TypeError,a=Fu()("toPrimitive");return fu=function(u,s){if(!t(u)||n(u))return u;var l,c=r(u,a);if(c){if(void 0===s&&(s="default"),l=e(c,u,s),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===s&&(s="number"),o(u,s)}}function Pu(){if(hu)return pu;hu=1;var e=Iu(),t=Wa();return pu=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Ru(){if(vu)return gu;vu=1;var e=Fi(),t=La(),n=e.document,r=t(n)&&t(n.createElement);return gu=function(e){return r?n.createElement(e):{}}}function _u(){if(yu)return mu;yu=1;var e=Wi(),t=Ii(),n=Ru();return mu=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Lu(){if(bu)return Vi;bu=1;var e=Wi(),t=Gi(),n=ka(),r=Fa(),o=_a(),i=Pu(),a=Bu(),u=_u(),s=Object.getOwnPropertyDescriptor;return Vi.f=e?s:function(e,l){if(e=o(e),l=i(l),u)try{return s(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},Vi}function Mu(){if(wu)return Eu;wu=1;var e=Ii(),t=ji(),n=/#|\.prototype\./,r=function(n,r){var s=i[o(n)];return s===u||s!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",u=r.POLYFILL="P";return Eu=r}function ju(){if(Du)return Cu;Du=1;var e=Mi(),t=qa(),n=Pi(),r=e(e.bind);return Cu=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},Cu}var Hu,zu,$u,Uu,Vu,Wu,Gu,qu,Ku,Yu,Xu,Zu,Ju,Qu,es,ts,ns,rs,os,is,as,us,ss,ls,cs,fs,ds,ps,hs,gs,vs,ms,ys,bs,Es,ws,Cs,Ds,As,Ss,xs={};function Os(){return zu?Hu:(zu=1,Hu=Wi()&&Ii()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Ts(){if(Uu)return $u;Uu=1;var e=La(),t=String,n=TypeError;return $u=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function Ns(){if(Vu)return xs;Vu=1;var e=Wi(),t=_u(),n=Os(),r=Ts(),o=Pu(),i=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s="enumerable",l="configurable",c="writable";return xs.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=u(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:s in n?n[s]:i[s],writable:!1})}return a(e,t,n)}:a:function(e,n,u){if(r(e),n=o(n),r(u),t)try{return a(e,n,u)}catch(e){}if("get"in u||"set"in u)throw new i("Accessors not supported");return"value"in u&&(e[n]=u.value),e},xs}function Bs(){if(Gu)return Wu;Gu=1;var e=Wi(),t=Ns(),n=Fa();return Wu=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function ks(){if(Ku)return qu;Ku=1;var e=Fi(),t=Ri(),n=Mi(),r=ji(),o=Lu().f,i=Mu(),a=Ma(),u=ju(),s=Bs(),l=Bu(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return qu=function(t,f){var d,p,h,g,v,m,y,b,E,w=t.target,C=t.global,D=t.stat,A=t.proto,S=C?e:D?e[w]:e[w]&&e[w].prototype,x=C?a:a[w]||s(a,w,{})[w],O=x.prototype;for(g in f)p=!(d=i(C?g:w+(D?".":"#")+g,t.forced))&&S&&l(S,g),m=x[g],p&&(y=t.dontCallGetSet?(E=o(S,g))&&E.value:S[g]),v=p&&y?y:f[g],(d||A||typeof m!=typeof v)&&(b=t.bind&&p?u(v,e):t.wrap&&p?c(v):A&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&s(b,"sham",!0),s(x,g,b),A&&(l(a,h=w+"Prototype")||s(a,h,{}),s(a[h],g,v),t.real&&O&&(d||!O[g])&&s(O,g,v)))}}function Fs(){if(Xu)return Yu;Xu=1;var e=Li();return Yu=Array.isArray||function(t){return"Array"===e(t)}}function Is(){if(Ju)return Zu;Ju=1;var e=Math.ceil,t=Math.floor;return Zu=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Zu}function Ps(){if(es)return Qu;es=1;var e=Is();return Qu=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Rs(){if(ns)return ts;ns=1;var e=Ps(),t=Math.min;return ts=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function _s(){if(os)return rs;os=1;var e=Rs();return rs=function(t){return e(t.length)}}function Ls(){if(as)return is;as=1;var e=TypeError;return is=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}}function Ms(){if(ss)return us;ss=1;var e=Wi(),t=Ns(),n=Fa();return us=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function js(){if(cs)return ls;cs=1;var e=Wi(),t=Fs(),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 ls=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},ls}function Hs(){if(ds)return fs;ds=1;var e={};return e[Fu()("toStringTag")]="z",fs="[object z]"===String(e)}function zs(){if(hs)return ps;hs=1;var e=Hs(),t=ji(),n=Li(),r=Fu()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return ps=e?n:function(e){var a,u,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(u=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?u:i?n(a):"Object"===(s=n(a))&&t(a.callee)?"Arguments":s},ps}function $s(){if(vs)return gs;vs=1;var e=_i(),t=ji(),n=Ou(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),gs=n.inspectSource}function Us(){if(ys)return ms;ys=1;var e=_i(),t=Ii(),n=ji(),r=zs(),o=ja(),i=$s(),a=function(){},u=o("Reflect","construct"),s=/^\s*(?:class|function)\b/,l=e(s.exec),c=!s.test(a),f=function(e){if(!n(e))return!1;try{return u(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(s,i(e))}catch(e){return!0}};return d.sham=!0,ms=!u||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?d:f}function Vs(){if(Es)return bs;Es=1;var e=Fs(),t=Us(),n=La(),r=Fu()("species"),o=Array;return bs=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},bs}function Ws(){if(Cs)return ws;Cs=1;var e=Vs();return ws=function(t,n){return new(e(t))(0===n?0:n)}}function Gs(){if(As)return Ds;As=1;var e=Ii(),t=Fu(),n=$a(),r=t("species");return Ds=function(t){return n>=51||!e(function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Ds}var qs,Ks,Ys={},Xs={};function Zs(){if(Ks)return qs;Ks=1;var e=zs(),t=String;return qs=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Js,Qs,el,tl,nl,rl,ol,il,al,ul,sl,ll,cl,fl,dl,pl,hl,gl,vl,ml={};function yl(){if(Qs)return Js;Qs=1;var e=Ps(),t=Math.max,n=Math.min;return Js=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Js}function bl(){if(tl)return el;tl=1;var e=_a(),t=yl(),n=_s(),r=function(r){return function(o,i,a){var u=e(o),s=n(u);if(0===s)return!r&&-1;var l,c=t(a,s);if(r&&i!=i){for(;s>c;)if((l=u[c++])!=l)return!0}else for(;s>c;c++)if((r||c in u)&&u[c]===i)return r||c||0;return!r&&-1}};return el={includes:r(!0),indexOf:r(!1)}}function El(){return rl?nl:(rl=1,nl={})}function wl(){if(il)return ol;il=1;var e=_i(),t=Bu(),n=_a(),r=bl().indexOf,o=El(),i=e([].push);return ol=function(e,a){var u,s=n(e),l=0,c=[];for(u in s)!t(o,u)&&t(s,u)&&i(c,u);for(;a.length>l;)t(s,u=a[l++])&&(~r(c,u)||i(c,u));return c},ol}function Cl(){return ul?al:(ul=1,al=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Dl(){if(ll)return sl;ll=1;var e=wl(),t=Cl();return sl=Object.keys||function(n){return e(n,t)},sl}function Al(){if(cl)return ml;cl=1;var e=Wi(),t=Os(),n=Ns(),r=Ts(),o=_a(),i=Dl();return ml.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,u=o(t),s=i(t),l=s.length,c=0;l>c;)n.f(e,a=s[c++],u[a]);return e},ml}function Sl(){return dl?fl:(dl=1,fl=ja()("document","documentElement"))}function xl(){if(hl)return pl;hl=1;var e=Tu(),t=ku(),n=e("keys");return pl=function(e){return n[e]||(n[e]=t(e))}}function Ol(){if(vl)return gl;vl=1;var e,t=Ts(),n=Al(),r=Cl(),o=El(),i=Sl(),a=Ru(),u="prototype",s="script",l=xl()("IE_PROTO"),c=function(){},f=function(e){return"<"+s+">"+e+"</"+s+">"},d=function(e){e.write(f("")),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?d(e):(n=a("iframe"),o="java"+s+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):d(e);for(var l=r.length;l--;)delete p[u][r[l]];return p()};return o[l]=!0,gl=Object.create||function(e,r){var o;return null!==e?(c[u]=t(e),o=new c,c[u]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},gl}var Tl,Nl={};function Bl(){if(Tl)return Nl;Tl=1;var e=wl(),t=Cl().concat("length","prototype");return Nl.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Nl}var kl,Fl,Il,Pl={};function Rl(){return Fl?kl:(Fl=1,kl=_i()([].slice))}function _l(){if(Il)return Pl;Il=1;var e=Li(),t=_a(),n=Bl().f,r=Rl(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Pl.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},Pl}var Ll,Ml,jl,Hl,zl,$l={};function Ul(){return Ll||(Ll=1,$l.f=Object.getOwnPropertySymbols),$l}function Vl(){if(jl)return Ml;jl=1;var e=Bs();return Ml=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function Wl(){if(zl)return Hl;zl=1;var e=Ns();return Hl=function(t,n,r){return e.f(t,n,r)}}var Gl,ql,Kl,Yl,Xl,Zl,Jl,Ql,ec,tc,nc,rc,oc,ic,ac,uc,sc={};function lc(){if(Gl)return sc;Gl=1;var e=Fu();return sc.f=e,sc}function cc(){if(Kl)return ql;Kl=1;var e=Ma(),t=Bu(),n=lc(),r=Ns().f;return ql=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function fc(){if(Xl)return Yl;Xl=1;var e=Gi(),t=ja(),n=Fu(),r=Vl();return Yl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,u=n("toPrimitive");i&&!i[u]&&r(i,u,function(t){return e(a,this)},{arity:1})}}function dc(){if(Jl)return Zl;Jl=1;var e=Hs(),t=zs();return Zl=e?{}.toString:function(){return"[object "+t(this)+"]"}}function pc(){if(ec)return Ql;ec=1;var e=Hs(),t=Ns().f,n=Bs(),r=Bu(),o=dc(),i=Fu()("toStringTag");return Ql=function(a,u,s,l){var c=s?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:u}),l&&!e&&n(c,"toString",o))}}function hc(){if(nc)return tc;nc=1;var e=Fi(),t=ji(),n=e.WeakMap;return tc=t(n)&&/native code/.test(String(n))}function gc(){if(oc)return rc;oc=1;var e,t,n,r=hc(),o=Fi(),i=La(),a=Bs(),u=Bu(),s=Ou(),l=xl(),c=El(),f="Object already initialized",d=o.TypeError,p=o.WeakMap;if(r||s.state){var h=s.state||(s.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new d(f);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(u(e,g))throw new d(f);return t.facade=e,a(e,g,t),t},t=function(e){return u(e,g)?e[g]:{}},n=function(e){return u(e,g)}}return rc={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 vc(){if(ac)return ic;ac=1;var e=ju(),t=Ia(),n=Nu(),r=_s(),o=Ws(),i=Ms(),a=function(a){var u=1===a,s=2===a,l=3===a,c=4===a,f=6===a,d=7===a,p=5===a||f;return function(h,g,v){for(var m,y,b=n(h),E=t(b),w=r(E),C=e(g,v),D=0,A=0,S=u?o(h,w):s||d?o(h,0):void 0;w>D;D++)if((p||D in E)&&(y=C(m=E[D],D,b),a))if(u)i(S,D,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return D;case 2:i(S,A++,m)}else switch(a){case 4:return!1;case 7:i(S,A++,m)}return f?-1:l||c?c:S}};return ic={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}var mc,yc,bc,Ec={};function wc(){return yc?mc:(yc=1,mc=Ua()&&!!Symbol.for&&!!Symbol.keyFor)}var Cc,Dc={};var Ac,Sc,xc,Oc,Tc,Nc,Bc,kc={};function Fc(){if(Sc)return Ac;Sc=1;var e=La(),t=gc().get;return Ac=function(n){if(!e(n))return!1;var r=t(n);return!!r&&"RawJSON"===r.type},Ac}function Ic(){if(Oc)return xc;Oc=1;var e=_i(),t=Bu(),n=SyntaxError,r=parseInt,o=String.fromCharCode,i=e("".charAt),a=e("".slice),u=e(/./.exec),s={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return xc=function(e,f){for(var d=!0,p="";f<e.length;){var h=i(e,f);if("\\"===h){var g=a(e,f,f+2);if(t(s,g))p+=s[g],f+=2;else{if("\\u"!==g)throw new n('Unknown escape sequence: "'+g+'"');var v=a(e,f+=2,f+4);if(!u(l,v))throw new n("Bad Unicode escape at: "+f);p+=o(r(v,16)),f+=4}}else{if('"'===h){d=!1,f++;break}if(u(c,h))throw new n("Bad control character in string literal at: "+f);p+=h,f++}}if(d)throw new n("Unterminated string at: "+f);return{value:p,end:f}},xc}function Pc(){return Nc?Tc:(Nc=1,Tc=!Ii()(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))}var Rc,_c,Lc={};function Mc(){return _c||(_c=1,function(){if(uc)return Xs;uc=1;var e=ks(),t=Fi(),n=Gi(),r=_i(),o=Su(),i=Wi(),a=Ua(),u=Ii(),s=Bu(),l=Ha(),c=Ts(),f=_a(),d=Pu(),p=Zs(),h=Fa(),g=Ol(),v=Dl(),m=Bl(),y=_l(),b=Ul(),E=Lu(),w=Ns(),C=Al(),D=ka(),A=Vl(),S=Wl(),x=Tu(),O=xl(),T=El(),N=ku(),B=Fu(),k=lc(),F=cc(),I=fc(),P=pc(),R=gc(),_=vc().forEach,L=O("hidden"),M="Symbol",j="prototype",H=R.set,z=R.getterFor(M),$=Object[j],U=t.Symbol,V=U&&U[j],W=t.RangeError,G=t.TypeError,q=t.QObject,K=E.f,Y=w.f,X=y.f,Z=D.f,J=r([].push),Q=x("symbols"),ee=x("op-symbols"),te=x("wks"),ne=!q||!q[j]||!q[j].findChild,re=function(e,t,n){var r=K($,t);return r&&delete $[t],Y(e,t,n),r&&e!==$&&Y($,t,r),e},oe=i&&u(function(){return 7!==g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a})?re:Y,ie=function(e,t){var n=Q[e]=g(V);return H(n,{type:M,tag:e,description:t}),i||(n.description=t),n},ae=function(e,t,n){e===$&&ae(ee,t,n),c(e);var r=d(t);return c(n),s(Q,r)?(("enumerable"in n?!n.enumerable:!s(e,r)||s(e,L)&&e[L][r])?(s(e,L)||Y(e,L,h(1,g(null))),e[L][r]=!0):(s(e,L)&&e[L][r]&&(e[L][r]=!1),n=g(n,{enumerable:h(0,!1)})),oe(e,r,n)):Y(e,r,n)},ue=function(e,t){c(e);var r=f(t),o=v(r).concat(fe(r));return _(o,function(t){i&&!n(se,r,t)||ae(e,t,r[t])}),e},se=function(e){var t=d(e),r=n(Z,this,t);return!(this===$&&s(Q,t)&&!s(ee,t))&&(!(r||!s(this,t)||!s(Q,t)||s(this,L)&&this[L][t])||r)},le=function(e,t){var n=f(e),r=d(t);if(n!==$||!s(Q,r)||s(ee,r)){var o=K(n,r);return!o||!s(Q,r)||s(n,L)&&n[L][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(f(e)),n=[];return _(t,function(e){s(Q,e)||s(T,e)||J(n,e)}),n},fe=function(e){var t=e===$,n=X(t?ee:f(e)),r=[];return _(n,function(e){!s(Q,e)||t&&!s($,e)||J(r,Q[e])}),r};a||(U=function(){if(l(V,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=N(e),o=function(e){var i=void 0===this?t:this;i===$&&n(o,ee,e),s(i,L)&&s(i[L],r)&&(i[L][r]=!1);var a=h(1,e);try{oe(i,r,a)}catch(e){if(!(e instanceof W))throw e;re(i,r,a)}};return i&&ne&&oe($,r,{configurable:!0,set:o}),ie(r,e)},A(V=U[j],"toString",function(){return z(this).tag}),A(U,"withoutSetter",function(e){return ie(N(e),e)}),D.f=se,w.f=ae,C.f=ue,E.f=le,m.f=y.f=ce,b.f=fe,k.f=function(e){return ie(B(e),e)},i&&(S(V,"description",{configurable:!0,get:function(){return z(this).description}}),o||A($,"propertyIsEnumerable",se,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:U}),_(v(te),function(e){F(e)}),e({target:M,stat:!0,forced:!a},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!i},{create:function(e,t){return void 0===t?g(e):ue(g(e),t)},defineProperty:ae,defineProperties:ue,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ce}),I(),P(U,M),T[L]=!0}(),function(){if(bc)return Ec;bc=1;var e=ks(),t=ja(),n=Bu(),r=Zs(),o=Tu(),i=wc(),a=o("string-to-symbol-registry"),u=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=r(e);if(n(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,u[i]=o,i}})}(),function(){if(Cc)return Dc;Cc=1;var e=ks(),t=Bu(),n=Wa(),r=Ga(),o=Tu(),i=wc(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!n(e))throw new TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Bc)return kc;Bc=1;var e=ks(),t=ja(),n=Ri(),r=Gi(),o=_i(),i=Ii(),a=Fs(),u=ji(),s=Fc(),l=Wa(),c=Li(),f=Zs(),d=Rl(),p=Ic(),h=ku(),g=Ua(),v=Pc(),m=String,y=t("JSON","stringify"),b=o(/./.exec),E=o("".charAt),w=o("".charCodeAt),C=o("".replace),D=o("".slice),A=o([].push),S=o(1.1.toString),x=/[\uD800-\uDFFF]/g,O=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,N=h(),B=N.length,k=!g||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),F=i(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),I=k?function(e,t){var o=d(arguments),i=R(t);if(u(i)||void 0!==e&&!l(e))return o[1]=function(e,t){if(u(i)&&(t=r(i,this,m(e),t)),!l(t))return t},n(y,null,o)}:y,P=function(e,t,n){var r=E(n,t-1),o=E(n,t+1);return b(O,e)&&!b(T,o)||b(T,e)&&!b(O,r)?"\\u"+S(w(e,0),16):e},R=function(e){if(u(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];"string"==typeof o?A(n,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||A(n,f(o))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(a(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}};y&&e({target:"JSON",stat:!0,arity:3,forced:k||F||!v},{stringify:function(e,t,n){var o=R(t),i=[],a=I(e,function(e,t){var n=u(o)?r(o,this,m(e),t):t;return!v&&s(n)?N+(A(i,n.rawJSON)-1):n},n);if("string"!=typeof a)return a;if(F&&(a=C(a,x,P)),v)return a;for(var l="",c=a.length,f=0;f<c;f++){var d=E(a,f);if('"'===d){var h=p(a,++f).end-1,g=D(a,f,h);l+=D(g,0,B)===N?i[D(g,B)]:'"'+g+'"',f=h}else l+=d}return l}})}(),function(){if(Rc)return Lc;Rc=1;var e=ks(),t=Ua(),n=Ii(),r=Ul(),o=Nu();e({target:"Object",stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(o(e)):[]}})}()),Ys}var jc,Hc={};function zc(){return jc||(jc=1,cc()("asyncDispose")),Hc}var $c;var Uc,Vc={};function Wc(){return Uc||(Uc=1,cc()("dispose")),Vc}var Gc;var qc;var Kc,Yc={};function Xc(){return Kc||(Kc=1,cc()("iterator")),Yc}var Zc;var Jc;var Qc;var ef;var tf;var nf;var rf,of={};var af,uf={};var sf;var lf,cf,ff,df={};function pf(){return ff?cf:(ff=1,function(){if(Ss)return ki;Ss=1;var e=ks(),t=Ii(),n=Fs(),r=La(),o=Nu(),i=_s(),a=Ls(),u=Ms(),s=js(),l=Ws(),c=Gs(),f=Fu(),d=$a(),p=f("isConcatSpreadable"),h=d>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),g=function(e){if(!r(e))return!1;var t=e[p];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!c("concat")},{concat:function(e){var t,n,r,c,f,d=o(this),p=l(d,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(f=-1===t?d:arguments[t]))for(c=i(f),a(h+c),n=0;n<c;n++,h++)n in f&&u(p,h,f[n]);else a(h+1),u(p,h++,f);return s(p,h),p}})}(),Mc(),zc(),$c||($c=1,cc()("asyncIterator")),Wc(),Gc||(Gc=1,cc()("hasInstance")),qc||(qc=1,cc()("isConcatSpreadable")),Xc(),Zc||(Zc=1,cc()("match")),Jc||(Jc=1,cc()("matchAll")),Qc||(Qc=1,cc()("replace")),ef||(ef=1,cc()("search")),tf||(tf=1,cc()("species")),nf||(nf=1,cc()("split")),function(){if(rf)return of;rf=1;var e=cc(),t=fc();e("toPrimitive"),t()}(),function(){if(af)return uf;af=1;var e=ja(),t=cc(),n=pc();t("toStringTag"),n(e("Symbol"),"Symbol")}(),sf||(sf=1,cc()("unscopables")),function(){if(lf)return df;lf=1;var e=Fi();pc()(e.JSON,"JSON",!0)}(),cf=Ma().Symbol)}var hf,gf,vf,mf,yf,bf,Ef,wf,Cf,Df,Af,Sf,xf,Of,Tf,Nf,Bf,kf,Ff,If,Pf,Rf,_f,Lf,Mf,jf,Hf,zf,$f,Uf,Vf,Wf,Gf,qf={};function Kf(){return gf?hf:(gf=1,hf=function(){})}function Yf(){return mf?vf:(mf=1,vf={})}function Xf(){if(bf)return yf;bf=1;var e=Wi(),t=Bu(),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 yf={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Zf(){return wf||(wf=1,Ef=!Ii()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ef}function Jf(){if(Df)return Cf;Df=1;var e=Bu(),t=ji(),n=Nu(),r=xl(),o=Zf(),i=r("IE_PROTO"),a=Object,u=a.prototype;return Cf=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var s=o.constructor;return t(s)&&o instanceof s?s.prototype:o instanceof a?u:null},Cf}function Qf(){if(Sf)return Af;Sf=1;var e,t,n,r=Ii(),o=ji(),i=La(),a=Ol(),u=Jf(),s=Vl(),l=Fu(),c=Su(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(t=u(u(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])||s(e,f,function(){return this}),Af={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:d}}function ed(){if(Of)return xf;Of=1;var e=Qf().IteratorPrototype,t=Ol(),n=Fa(),r=pc(),o=Yf(),i=function(){return this};return xf=function(a,u,s,l){var c=u+" Iterator";return a.prototype=t(e,{next:n(+!l,s)}),r(a,c,!1,!0),o[c]=i,a}}function td(){if(Nf)return Tf;Nf=1;var e=_i(),t=qa();return Tf=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}function nd(){if(kf)return Bf;kf=1;var e=La();return Bf=function(t){return e(t)||null===t}}function rd(){if(If)return Ff;If=1;var e=nd(),t=String,n=TypeError;return Ff=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function od(){if(Rf)return Pf;Rf=1;var e=td(),t=La(),n=Ra(),r=rd();return Pf=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),Pf}function id(){if(Lf)return _f;Lf=1;var e=ks(),t=Gi(),n=Su(),r=Xf(),o=ji(),i=ed(),a=Jf(),u=od(),s=pc(),l=Bs(),c=Vl(),f=Fu(),d=Yf(),p=Qf(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",E="values",w="entries",C=function(){return this};return _f=function(r,f,p,D,A,S,x){i(p,f,D);var O,T,N,B=function(e){if(e===A&&R)return R;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=f+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],R=!m&&P||B(A),_="Array"===f&&I.entries||P;if(_&&(O=a(_.call(new r)))!==Object.prototype&&O.next&&(n||a(O)===v||(u?u(O,v):o(O[y])||c(O,y,C)),s(O,k,!0,!0),n&&(d[k]=C)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,R=function(){return t(P,this)})),A)if(T={values:B(E),keys:S?R:B(b),entries:B(w)},x)for(N in T)(m||F||!(N in I))&&c(I,N,T[N]);else e({target:f,proto:!0,forced:m||F},T);return n&&!x||I[y]===R||c(I,y,R,{name:A}),d[f]=R,T}}function ad(){return jf?Mf:(jf=1,Mf=function(e,t){return{value:e,done:t}})}function ud(){if(zf)return Hf;zf=1;var e=_a(),t=Kf(),n=Yf(),r=gc(),o=Ns().f,i=id(),a=ad(),u=Su(),s=Wi(),l="Array Iterator",c=r.set,f=r.getterFor(l);Hf=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"),!u&&s&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(e){}return Hf}function sd(){return Uf?$f:(Uf=1,$f={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 ld(){if(Vf)return qf;Vf=1,ud();var e=sd(),t=Fi(),n=pc(),r=Yf();for(var o in e)n(t[o],o),r[o]=r.Array;return qf}function cd(){if(Gf)return Wf;Gf=1;var e=pf();return ld(),Wf=e}var fd,dd={};var pd;var hd;var gd,vd,md;function yd(){if(md)return vd;md=1;var e=cd();return function(){if(fd)return dd;fd=1;var e=Fu(),t=Ns().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),pd||(pd=1,zc()),hd||(hd=1,Wc()),gd||(gd=1,cc()("metadata")),vd=e}var bd,Ed,wd;function Cd(){if(Ed)return bd;Ed=1;var e=ja(),t=_i(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return bd=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var Dd,Ad,Sd;function xd(){if(Ad)return Dd;Ad=1;for(var e=Tu(),t=ja(),n=_i(),r=Wa(),o=Fu(),i=t("Symbol"),a=i.isWellKnownSymbol,u=t("Object","getOwnPropertyNames"),s=n(i.prototype.valueOf),l=e("wks"),c=0,f=u(i),d=f.length;c<d;c++)try{var p=f[c];r(i[p])&&o(p)}catch(e){}return Dd=function(e){if(a&&a(e))return!0;try{for(var t=s(e),n=0,r=u(l),o=r.length;n<o;n++)if(l[r[n]]==t)return!0}catch(e){}return!1},Dd}var Od;var Td;var Nd;var Bd;var kd;var Fd;var Id;var Pd,Rd,_d,Ld,Md;function jd(){if(_d)return Rd;_d=1;var e=yd();return wd||(wd=1,ks()({target:"Symbol",stat:!0},{isRegisteredSymbol:Cd()})),Sd||(Sd=1,ks()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:xd()})),Od||(Od=1,cc()("customMatcher")),Td||(Td=1,cc()("observable")),Nd||(Nd=1,ks()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Cd()})),Bd||(Bd=1,ks()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:xd()})),kd||(kd=1,cc()("matcher")),Fd||(Fd=1,cc()("metadataKey")),Id||(Id=1,cc()("patternMatch")),Pd||(Pd=1,cc()("replaceAll")),Rd=e}function Hd(){return Md?Ld:(Md=1,Ld=jd())}var zd,$d,Ud,Vd,Wd,Gd,qd,Kd,Yd,Xd,Zd,Jd,Qd,ep=E(Hd()),tp={};function np(){if($d)return zd;$d=1;var e=_i(),t=Ps(),n=Zs(),r=Ra(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),u=function(e){return function(u,s){var l,c,f=n(r(u)),d=t(s),p=f.length;return d<0||d>=p?e?"":void 0:(l=i(f,d))<55296||l>56319||d+1===p||(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 zd={codeAt:u(!1),charAt:u(!0)}}function rp(){return Wd?Vd:(Wd=1,ud(),function(){if(Ud)return tp;Ud=1;var e=np().charAt,t=Zs(),n=gc(),r=id(),o=ad(),i="String Iterator",a=n.set,u=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=u(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))})}(),Xc(),Vd=lc().f("iterator"))}function op(){if(qd)return Gd;qd=1;var e=rp();return ld(),Gd=e}function ip(){return Yd?Kd:(Yd=1,Kd=op())}function ap(){return Zd?Xd:(Zd=1,Xd=ip())}function up(){return Qd?Jd:(Qd=1,Jd=ap())}var sp=E(up());function lp(e){return lp="function"==typeof ep&&"symbol"==typeof sp?function(e){return typeof e}:function(e){return e&&"function"==typeof ep&&e.constructor===ep&&e!==ep.prototype?"symbol":typeof e},lp(e)}var cp,fp={};if(function(){if(cp)return fp;cp=1;var e=pr(),t=C(),n=N(),r=vn().f,o=xe();e({target:"Object",stat:!0,forced:!o||t(function(){r(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":lp(global))){var dp=Object.getOwnPropertyDescriptor(global,"window");global.window&&!dp.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}var pp,hp={};function gp(){if(pp)return hp;pp=1;var e={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=y.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},t={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Fe.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},n={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=P.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,u=new WeakMap,s=new WeakMap,l=new WeakMap;function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function f(e,t){return e(t={exports:{}},t.exports),t.exports}var d=f(function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports});c(d);var p=f(function(e){e.exports=function(e){if(Array.isArray(e))return d(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(p);var h=f(function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(h);var g=f(function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports});c(g);var v=f(function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports});c(v);var m=c(f(function(e){e.exports=function(e){return p(e)||h(e)||g(e)||v()},e.exports.__esModule=!0,e.exports.default=e.exports})),y={ancestors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.reverse,r=void 0!==n&&n,o=y.levels(e,t);return o=r?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return y.equals(r,o)&&i>a},endsAt:function(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return y.equals(r,o)},endsBefore:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return y.equals(r,o)&&i<a},equals:function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})},hasPrevious:function(e){return e[e.length-1]>0},isAfter:function(e,t){return 1===y.compare(e,t)},isAncestor:function(e,t){return e.length<t.length&&0===y.compare(e,t)},isBefore:function(e,t){return-1===y.compare(e,t)},isChild:function(e,t){return e.length===t.length+1&&0===y.compare(e,t)},isCommon:function(e,t){return e.length<=t.length&&0===y.compare(e,t)},isDescendant:function(e,t){return e.length>t.length&&0===y.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===y.compare(e,t)},isPath:function(e){return Array.isArray(e)&&e.every(function(e){return"number"==typeof e})},isSibling:function(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&y.equals(n,r)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next:function(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath:function(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent:function(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous:function(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative:function(e,t){if(!y.isAncestor(t,e)&&!y.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var r=m(e),o=n.affinity,i=void 0===o?"forward":o;if(0===e.length)return r;switch(t.type){case"insert_node":var a=t.path;(y.equals(a,r)||y.endsBefore(a,r)||y.isAncestor(a,r))&&(r[a.length-1]+=1);break;case"remove_node":var u=t.path;if(y.equals(u,r)||y.isAncestor(u,r))return null;y.endsBefore(u,r)&&(r[u.length-1]-=1);break;case"merge_node":var s=t.path,l=t.position;y.equals(s,r)||y.endsBefore(s,r)?r[s.length-1]-=1:y.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=l);break;case"split_node":var c=t.path,f=t.position;if(y.equals(c,r)){if("forward"===i)r[r.length-1]+=1;else if("backward"!==i)return null}else y.endsBefore(c,r)?r[c.length-1]+=1:y.isAncestor(c,r)&&e[c.length]>=f&&(r[c.length-1]+=1,r[c.length]-=f);break;case"move_node":var d=t.path,p=t.newPath;if(y.equals(d,p))return r;if(y.isAncestor(d,r)||y.equals(d,r)){var h=p.slice();return y.endsBefore(d,p)&&d.length<p.length&&(h[d.length-1]-=1),h.concat(r.slice(d.length))}y.isSibling(d,p)&&(y.isAncestor(p,r)||y.equals(p,r))?y.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:y.endsBefore(p,r)||y.equals(p,r)||y.isAncestor(p,r)?(y.endsBefore(d,r)&&(r[d.length-1]-=1),r[p.length-1]+=1):y.endsBefore(d,r)&&(y.equals(p,r)&&(r[p.length-1]+=1),r[d.length-1]-=1)}return r}},b=f(function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}),E=c(b),w=f(function(e){var t=b.default;e.exports=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(w);var C=f(function(e){var t=b.default;e.exports=function(e){var n=w(e,"string");return"symbol"===t(n)?n:String(n)},e.exports.__esModule=!0,e.exports.default=e.exports});c(C);var D=c(f(function(e){e.exports=function(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports})),A=f(function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports});c(A);var S=f(function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],s=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}},e.exports.__esModule=!0,e.exports.default=e.exports});c(S);var x=f(function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports});c(x);var O=f(function(e){e.exports=function(e,t){return A(e)||S(e,t)||g(e,t)||x()},e.exports.__esModule=!0,e.exports.default=e.exports}),T=c(O),N=f(function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports});c(N);var B=f(function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=N(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports}),k=c(B),F=["anchor","focus"];function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var P={edges:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=e.anchor,o=e.focus;return P.isBackward(e)===n?[r,o]:[o,r]},end:function(e){var t=P.edges(e),n=T(t,2)[1];return n},equals:function(e,t){return Fe.equals(e.anchor,t.anchor)&&Fe.equals(e.focus,t.focus)},surrounds:function(e,t){var n=P.intersection(e,t);return!!n&&P.equals(n,t)},includes:function(e,t){if(Te.isRange(t)){if(P.includes(e,t.anchor)||P.includes(e,t.focus))return!0;var n=P.edges(e),r=T(n,2),o=r[0],i=r[1],a=P.edges(t),u=T(a,2),s=u[0],l=u[1];return Fe.isBefore(o,s)&&Fe.isAfter(i,l)}var c=P.edges(e),f=T(c,2),d=f[0],p=f[1],h=!1,g=!1;return Te.isPoint(t)?(h=Fe.compare(t,d)>=0,g=Fe.compare(t,p)<=0):(h=y.compare(t,d.path)>=0,g=y.compare(t,p.path)<=0),h&&g},intersection:function(e,t){e.anchor,e.focus;var n=k(e,F),r=P.edges(e),o=T(r,2),i=o[0],a=o[1],u=P.edges(t),s=T(u,2),l=s[0],c=s[1],f=Fe.isBefore(i,l)?l:i,d=Fe.isBefore(a,c)?a:c;return Fe.isBefore(d,f)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({anchor:f,focus:d},n)},isBackward:function(e){var t=e.anchor,n=e.focus;return Fe.isAfter(t,n)},isCollapsed:function(e){var t=e.anchor,n=e.focus;return Fe.equals(t,n)},isExpanded:function(e){return!P.isCollapsed(e)},isForward:function(e){return!P.isBackward(e)},isRange:function(e){return q(e)&&Fe.isPoint(e.anchor)&&Fe.isPoint(e.focus)},points:function*(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start:function(e){var t=P.edges(e),n=T(t,1)[0];return n},transform:function(e,t){if(null===e)return null;var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,i=void 0===o?"inward":o;if("inward"===i){var a=P.isCollapsed(e);P.isForward(e)?(n="forward",r=a?n:"backward"):(n="backward",r=a?n:"forward")}else"outward"===i?P.isForward(e)?(n="backward",r="forward"):(n="forward",r="backward"):(n=i,r=i);var u=Fe.transform(e.anchor,t,{affinity:n}),s=Fe.transform(e.focus,t,{affinity:r});return u&&s?{anchor:u,focus:s}:null}},R=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,n=void 0!==t&&t;return!!q(e)&&("function"!=typeof e.apply&&(n?U.isNodeList(e.children):Array.isArray(e.children)))},_={isAncestor:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,n=void 0!==t&&t;return q(e)&&U.isNodeList(e.children,{deep:n})},isElement:R,isElementList:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,n=void 0!==t&&t;return Array.isArray(e)&&e.every(function(e){return _.isElement(e,{deep:n})})},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return R(e)&&e[n]===t},matches:function(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},L=["text"],M=["children"];function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var U={ancestor:function(e,t){var n=U.get(e,t);if(U.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Pe.stringify(n)));return n},ancestors:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){var r,o=z(y.ancestors(t,n));try{for(o.s();!(r=o.n()).done;){var i=r.value,a=[U.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}}()},child:function(e,t){if(U.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Pe.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Pe.stringify(e)));return n},children:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var r=n.reverse,o=void 0!==r&&r,i=U.ancestor(e,t),a=i.children,u=o?a.length-1:0;o?u>=0:u<a.length;){var s=U.child(i,u),l=t.concat(u);yield[s,l],u=o?u-1:u+1}}()},common:function(e,t,n){var r=y.common(t,n);return[U.get(e,r),r]},descendant:function(e,t){var n=U.get(e,t);if(U.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Pe.stringify(n)));return n},descendants:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var n,r=z(U.nodes(e,t));try{for(r.s();!(n=r.n()).done;){var o=T(n.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}()},elements:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var n,r=z(U.nodes(e,t));try{for(r.s();!(n=r.n()).done;){var o=T(n.value,2),i=o[0],a=o[1];U.isElement(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}()},extractProps:function(e){return U.isText(e)?(e.text,k(e,L)):(e.children,k(e,M))},first:function(e,t){for(var n=t.slice(),r=U.get(e,n);r&&!U.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment:function(e,t){var n,r={children:e.children},o=P.edges(t),i=T(o,2),a=i[0],u=i[1],s=U.nodes(r,{reverse:!0,pass:function(e){var n=T(e,2)[1];return!P.includes(t,n)}}),l=z(s);try{var c=function(){var e=T(n.value,2)[1];if(!P.includes(t,e)){var o=e[e.length-1];Ke(r,y.parent(e),function(e){return Ge(e,o,1)})}y.equals(e,u.path)&&Ye(r,e,function(e){var t=e.text.slice(0,u.offset);return H(H({},e),{},{text:t})}),y.equals(e,a.path)&&Ye(r,e,function(e){var t=e.text.slice(a.offset);return H(H({},e),{},{text:t})})};for(l.s();!(n=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}return r.children},get:function(e,t){var n=U.getIf(e,t);if(void 0===n)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Pe.stringify(e)));return n},getIf:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(U.isText(n)||!n.children[o])return;n=n.children[o]}return n},has:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(U.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isAncestor:function(e){return!U.isText(e)},isEditor:function(e){return"function"==typeof e.apply},isElement:function(e){return Array.isArray(e.children)&&"function"!=typeof e.apply},isNode:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,n=void 0!==t&&t;return ze.isText(e)||_.isElement(e,{deep:n})||Oe.isEditor(e,{deep:n})},isNodeList:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,n=void 0!==t&&t;return Array.isArray(e)&&e.every(function(e){return U.isNode(e,{deep:n})})},isText:function(e){return"string"==typeof e.text},last:function(e,t){for(var n=t.slice(),r=U.get(e,n);r&&!U.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf:function(e,t){var n=U.get(e,t);if(!U.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Pe.stringify(n)));return n},levels:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){var r,o=z(y.levels(t,n));try{for(o.s();!(r=o.n()).done;){var i=r.value,a=U.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}}()},matches:function(e,t){return U.isElement(e)&&_.isElementProps(t)&&_.matches(e,t)||U.isText(e)&&ze.isTextProps(t)&&ze.matches(e,t)},nodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var n=t.pass,r=t.reverse,o=void 0!==r&&r,i=t.from,a=void 0===i?[]:i,u=t.to,s=new Set,l=[],c=e;!u||!(o?y.isBefore(l,u):y.isAfter(l,u));)if(s.has(c)||(yield[c,l]),s.has(c)||U.isText(c)||0===c.children.length||null!=n&&!1!==n([c,l])){if(0===l.length)break;if(!o){var f=y.next(l);if(U.has(e,f)){l=f,c=U.get(e,l);continue}}if(o&&0!==l[l.length-1])l=y.previous(l),c=U.get(e,l);else l=y.parent(l),c=U.get(e,l),s.add(c)}else{s.add(c);var d=o?c.children.length-1:0;y.isAncestor(l,a)&&(d=a[l.length]),l=l.concat(d),c=U.get(e,l)}}()},parent:function(e,t){var n=y.parent(t),r=U.get(e,n);if(U.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:function(e){return U.isText(e)?e.text:e.children.map(U.string).join("")},texts:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var n,r=z(U.nodes(e,t));try{for(r.s();!(n=r.n()).done;){var o=T(n.value,2),i=o[0],a=o[1];U.isText(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}()}};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var G={isNodeOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_node")},isOperation:function(e){if(!q(e))return!1;switch(e.type){case"insert_node":case"remove_node":return y.isPath(e.path)&&U.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&y.isPath(e.path);case"merge_node":return"number"==typeof e.position&&y.isPath(e.path)&&q(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"set_node":return y.isPath(e.path)&&q(e.properties)&&q(e.newProperties);case"set_selection":return null===e.properties&&P.isRange(e.newProperties)||null===e.newProperties&&P.isRange(e.properties)||q(e.properties)&&q(e.newProperties);case"split_node":return y.isPath(e.path)&&"number"==typeof e.position&&q(e.properties);default:return!1}},isOperationList:function(e){return Array.isArray(e)&&e.every(function(e){return G.isOperation(e)})},isSelectionOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_text")},inverse:function(e){switch(e.type){case"insert_node":return W(W({},e),{},{type:"remove_node"});case"insert_text":return W(W({},e),{},{type:"remove_text"});case"merge_node":return W(W({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":var t=e.newPath,n=e.path;if(y.equals(t,n))return e;if(y.isSibling(n,t))return W(W({},e),{},{path:t,newPath:n});var r=y.transform(n,e),o=y.transform(y.next(n),e);return W(W({},e),{},{path:r,newPath:o});case"remove_node":return W(W({},e),{},{type:"insert_node"});case"remove_text":return W(W({},e),{},{type:"insert_text"});case"set_node":var i=e.properties,a=e.newProperties;return W(W({},e),{},{properties:a,newProperties:i});case"set_selection":var u=e.properties,s=e.newProperties;return W(W({},e),{},null==u?{properties:s,newProperties:null}:null==s?{properties:null,newProperties:u}:{properties:s,newProperties:u});case"split_node":return W(W({},e),{},{type:"merge_node",path:y.next(e.path)})}}},q=function(e){return"object"===E(e)&&null!==e},K=function e(t,n){for(var r in t){var o=t[r],i=n[r];if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++)if(o[a]!==i[a])return!1}else if(q(o)&&q(i)){if(!e(o,i))return!1}else if(o!==i)return!1}for(var u in n)if(void 0===t[u]&&void 0!==n[u])return!1;return!0},Y=function(e){return e.selection?e.selection:e.children.length>0?Oe.end(e,[]):[0]},X=function(e,t){var n=Oe.node(e,t),r=T(n,1)[0];return function(e){return e===r}};function Z(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q,ee=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!n,o=n?ae(e):e,i=Q.None,a=Q.None,u=0,s=null,l=Z(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,f=c.codePointAt(0);if(!f)break;var d=ye(c,f),p=T(r?[a,d]:[d,i],2);if(i=p[0],a=p[1],be(i,Q.ZWJ)&&be(a,Q.ExtPict)&&!De(r?e.substring(0,u):e.substring(0,e.length-u)))break;if(be(i,Q.RI)&&be(a,Q.RI)&&!(s=null!==s?!s:!!r||Se(e.substring(0,e.length-u))))break;if(i!==Q.None&&a!==Q.None&&we(i,a))break;u+=c.length}}catch(e){l.e(e)}finally{l.f()}return u||1},te=/\s/,ne=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,re=/['\u2018\u2019]/,oe=function(e,t,n){if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},ie=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(te.test(t))return!1;if(re.test(t)){var o=ee(n,r),i=oe(n,o,r),a=T(i,2);if(e(a[0],a[1],r))return!0}return!ne.test(t)},ae=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(se(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(ue(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},ue=function(e){return e>=55296&&e<=56319},se=function(e){return e>=56320&&e<=57343};!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(Q||(Q={}));var le=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ce=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,fe=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,de=/^[\u1100-\u115F\uA960-\uA97C]$/,pe=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,he=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ge=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,ve=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,me=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,ye=function(e,t){var n=Q.Any;return-1!==e.search(le)&&(n|=Q.Extend),8205===t&&(n|=Q.ZWJ),t>=127462&&t<=127487&&(n|=Q.RI),-1!==e.search(ce)&&(n|=Q.Prepend),-1!==e.search(fe)&&(n|=Q.SpacingMark),-1!==e.search(de)&&(n|=Q.L),-1!==e.search(pe)&&(n|=Q.V),-1!==e.search(he)&&(n|=Q.T),-1!==e.search(ge)&&(n|=Q.LV),-1!==e.search(ve)&&(n|=Q.LVT),-1!==e.search(me)&&(n|=Q.ExtPict),n};function be(e,t){return 0!==(e&t)}var Ee=[[Q.L,Q.L|Q.V|Q.LV|Q.LVT],[Q.LV|Q.V,Q.V|Q.T],[Q.LVT|Q.T,Q.T],[Q.Any,Q.Extend|Q.ZWJ],[Q.Any,Q.SpacingMark],[Q.Prepend,Q.Any],[Q.ZWJ,Q.ExtPict],[Q.RI,Q.RI]];function we(e,t){return-1===Ee.findIndex(function(n){return be(e,n[0])&&be(t,n[1])})}var Ce=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,De=function(e){return-1!==e.search(Ce)},Ae=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Se=function(e){var t=e.match(Ae);return null!==t&&t[0].length/2%2==1},xe=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,n=void 0!==t&&t;if(!q(e))return!1;var r="function"==typeof e.above&&"function"==typeof e.addMark&&"function"==typeof e.after&&"function"==typeof e.apply&&"function"==typeof e.before&&"function"==typeof e.collapse&&"function"==typeof e.delete&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.deselect&&"function"==typeof e.edges&&"function"==typeof e.elementReadOnly&&"function"==typeof e.end&&"function"==typeof e.first&&"function"==typeof e.fragment&&"function"==typeof e.getDirtyPaths&&"function"==typeof e.getFragment&&"function"==typeof e.getMarks&&"function"==typeof e.hasBlocks&&"function"==typeof e.hasInlines&&"function"==typeof e.hasPath&&"function"==typeof e.hasTexts&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertNodes&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertText&&"function"==typeof e.isBlock&&"function"==typeof e.isEdge&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isEmpty&&"function"==typeof e.isEnd&&"function"==typeof e.isInline&&"function"==typeof e.isNormalizing&&"function"==typeof e.isSelectable&&"function"==typeof e.isStart&&"function"==typeof e.isVoid&&"function"==typeof e.last&&"function"==typeof e.leaf&&"function"==typeof e.levels&&"function"==typeof e.liftNodes&&"function"==typeof e.markableVoid&&"function"==typeof e.mergeNodes&&"function"==typeof e.move&&"function"==typeof e.moveNodes&&"function"==typeof e.next&&"function"==typeof e.node&&"function"==typeof e.nodes&&"function"==typeof e.normalize&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.parent&&"function"==typeof e.path&&"function"==typeof e.pathRef&&"function"==typeof e.pathRefs&&"function"==typeof e.point&&"function"==typeof e.pointRef&&"function"==typeof e.pointRefs&&"function"==typeof e.positions&&"function"==typeof e.previous&&"function"==typeof e.range&&"function"==typeof e.rangeRef&&"function"==typeof e.rangeRefs&&"function"==typeof e.removeMark&&"function"==typeof e.removeNodes&&"function"==typeof e.select&&"function"==typeof e.setNodes&&"function"==typeof e.setNormalizing&&"function"==typeof e.setPoint&&"function"==typeof e.setSelection&&"function"==typeof e.shouldMergeNodesRemovePrevNode&&"function"==typeof e.shouldNormalize&&"function"==typeof e.splitNodes&&"function"==typeof e.start&&"function"==typeof e.string&&"function"==typeof e.unhangRange&&"function"==typeof e.unsetNodes&&"function"==typeof e.unwrapNodes&&"function"==typeof e.void&&"function"==typeof e.withoutNormalizing&&"function"==typeof e.wrapNodes&&(null===e.marks||q(e.marks))&&(null===e.selection||P.isRange(e.selection))&&(n?U.isNodeList(e.children)&&G.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations));return r},Oe={above:function(e,t){return e.above(t)},addMark:function(e,t,n){e.addMark(t,n)},after:function(e,t,n){return e.after(t,n)},before:function(e,t,n){return e.before(t,n)},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteBackward(n)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteForward(n)},deleteFragment:function(e,t){e.deleteFragment(t)},edges:function(e,t){return e.edges(t)},elementReadOnly:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:function(e,t){return e.end(t)},first:function(e,t){return e.first(t)},fragment:function(e,t){return e.fragment(t)},hasBlocks:function(e,t){return e.hasBlocks(t)},hasInlines:function(e,t){return e.hasInlines(t)},hasPath:function(e,t){return e.hasPath(t)},hasTexts:function(e,t){return e.hasTexts(t)},insertBreak:function(e){e.insertBreak()},insertFragment:function(e,t,n){e.insertFragment(t,n)},insertNode:function(e,t){e.insertNode(t)},insertSoftBreak:function(e){e.insertSoftBreak()},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return e.isBlock(t)},isEdge:function(e,t,n){return e.isEdge(t,n)},isEditor:xe,isElementReadOnly:function(e,t){return e.isElementReadOnly(t)},isEmpty:function(e,t){return e.isEmpty(t)},isEnd:function(e,t,n){return e.isEnd(t,n)},isInline:function(e,t){return e.isInline(t)},isNormalizing:function(e){return e.isNormalizing()},isSelectable:function(e,t){return e.isSelectable(t)},isStart:function(e,t,n){return e.isStart(t,n)},isVoid:function(e,t){return e.isVoid(t)},last:function(e,t){return e.last(t)},leaf:function(e,t,n){return e.leaf(t,n)},levels:function(e,t){return e.levels(t)},marks:function(e){return e.getMarks()},next:function(e,t){return e.next(t)},node:function(e,t,n){return e.node(t,n)},nodes:function(e,t){return e.nodes(t)},normalize:function(e,t){e.normalize(t)},parent:function(e,t,n){return e.parent(t,n)},path:function(e,t,n){return e.path(t,n)},pathRef:function(e,t,n){return e.pathRef(t,n)},pathRefs:function(e){return e.pathRefs()},point:function(e,t,n){return e.point(t,n)},pointRef:function(e,t,n){return e.pointRef(t,n)},pointRefs:function(e){return e.pointRefs()},positions:function(e,t){return e.positions(t)},previous:function(e,t){return e.previous(t)},range:function(e,t,n){return e.range(t,n)},rangeRef:function(e,t,n){return e.rangeRef(t,n)},rangeRefs:function(e){return e.rangeRefs()},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){e.setNormalizing(t)},start:function(e,t){return e.start(t)},string:function(e,t,n){return e.string(t,n)},unhangRange:function(e,t,n){return e.unhangRange(t,n)},void:function(e,t){return e.void(t)},withoutNormalizing:function(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:function(e,t,n){return e.shouldMergeNodesRemovePrevNode(t,n)}},Te={isLocation:function(e){return y.isPath(e)||Fe.isPoint(e)||P.isRange(e)},isPath:function(e){return Array.isArray(e)},isPoint:function(e){return"offset"in e},isRange:function(e){return"anchor"in e},isSpan:function(e){return Array.isArray(e)&&Array.isArray(e[0])}},Ne={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(y.isPath)}};function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Fe={compare:function(e,t){var n=y.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:function(e,t){return 1===Fe.compare(e,t)},isBefore:function(e,t){return-1===Fe.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint:function(e){return q(e)&&"number"==typeof e.offset&&y.isPath(e.path)},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var r=n.affinity,o=void 0===r?"forward":r,i=e.path,a=e.offset;switch(t.type){case"insert_node":case"move_node":i=y.transform(i,t,n);break;case"insert_text":y.equals(t.path,i)&&(t.offset<a||t.offset===a&&"forward"===o)&&(a+=t.text.length);break;case"merge_node":y.equals(t.path,i)&&(a+=t.position),i=y.transform(i,t,n);break;case"remove_text":y.equals(t.path,i)&&t.offset<=a&&(a-=Math.min(a-t.offset,t.text.length));break;case"remove_node":if(y.equals(t.path,i)||y.isAncestor(t.path,i))return null;i=y.transform(i,t,n);break;case"split_node":if(y.equals(t.path,i)){if(t.position===a&&null==o)return null;(t.position<a||t.position===a&&"forward"===o)&&(a-=t.position,i=y.transform(i,t,ke(ke({},n),{},{affinity:"forward"})))}else i=y.transform(i,t,n);break;default:return e}return{path:i,offset:a}}},Ie=void 0,Pe={setScrubber:function(e){Ie=e},stringify:function(e){return JSON.stringify(e,Ie)}},Re=["text"],_e=["anchor","focus","merge"];function Le(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Me(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ze={equals:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loose,r=void 0!==n&&n;function o(e){return e.text,k(e,Re)}return K(r?o(e):e,r?o(t):t)},isText:function(e){return q(e)&&"string"==typeof e.text},isTextList:function(e){return Array.isArray(e)&&e.every(function(e){return ze.isText(e)})},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations:function(e,t){var n,r=[{leaf:He({},e)}],o=Le(t);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,u=(a.anchor,a.focus,a.merge),s=k(a,_e),l=P.edges(a),c=T(l,2),f=c[0],d=c[1],p=[],h=0,g=f.offset,v=d.offset,m=null!=u?u:Object.assign,y=Le(r);try{for(y.s();!(i=y.n()).done;){var b=i.value.leaf,E=b.text.length,w=h;if(h+=E,g<=w&&h<=v)m(b,s),p.push({leaf:b});else if(g!==v&&(g===h||v===w)||g>h||v<w||v===w&&0!==w)p.push({leaf:b});else{var C=b,D=void 0,A=void 0;if(v<h){var S=v-w;A={leaf:He(He({},C),{},{text:C.text.slice(S)})},C=He(He({},C),{},{text:C.text.slice(0,S)})}if(g>w){var x=g-w;D={leaf:He(He({},C),{},{text:C.text.slice(0,x)})},C=He(He({},C),{},{text:C.text.slice(x)})}m(C,s),D&&p.push(D),p.push({leaf:C}),A&&p.push(A)}}}catch(e){y.e(e)}finally{y.f()}r=p}}catch(e){o.e(e)}finally{o.f()}if(r.length>1){var O,N=0,B=Le(r.entries());try{for(B.s();!(O=B.n()).done;){var F=T(O.value,2),I=F[0],R=F[1],_=N,L=_+R.leaf.text.length,M={start:_,end:L};0===I&&(M.isFirst=!0),I===r.length-1&&(M.isLast=!0),R.position=M,N=L}}catch(e){B.e(e)}finally{B.f()}}return r}};function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ve=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return[].concat(m(e.slice(0,t)),r,m(e.slice(t)))},We=function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return[].concat(m(e.slice(0,t)),o,m(e.slice(t+n)))},Ge=We,qe=function(e,t,n){if(0===t.length)throw new Error("Cannot modify the editor");for(var r=U.get(e,t),o=t.slice(),i=n(r);o.length>1;){var a=o.pop(),u=U.get(e,o);i=Ue(Ue({},u),{},{children:We(u.children,a,1,i)})}var s=o.pop();e.children=We(e.children,s,1,i)},Ke=function(e,t,n){0===t.length?e.children=n(e.children):qe(e,t,function(e){if(U.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Pe.stringify(e)));return Ue(Ue({},e),{},{children:n(e.children)})})},Ye=function(e,t,n){return qe(e,t,function(e){if(!U.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Pe.stringify(e)));return n(e)})};function Xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var et={transform:function(e,t){var n=!1;switch(t.type){case"insert_node":var r=t.path,o=t.node;Ke(e,y.parent(r),function(e){var t=r[r.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));return Ve(e,t,o)}),n=!0;break;case"insert_text":var i=t.path,a=t.offset,u=t.text;if(0===u.length)break;Ye(e,i,function(e){var t=e.text.slice(0,a),n=e.text.slice(a);return Qe(Qe({},e),{},{text:t+u+n})}),n=!0;break;case"merge_node":var s=t.path,l=s[s.length-1],c=y.previous(s),f=c[c.length-1];Ke(e,y.parent(s),function(e){var t,n=e[l],r=e[f];if(U.isText(n)&&U.isText(r))t=Qe(Qe({},r),{},{text:r.text+n.text});else{if(!U.isElement(n)||!U.isElement(r))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(s,"] to nodes of different interfaces: ").concat(Pe.stringify(n)," ").concat(Pe.stringify(r)));t=Qe(Qe({},r),{},{children:r.children.concat(n.children)})}return We(e,f,2,t)}),n=!0;break;case"move_node":var d=t.path,p=t.newPath,h=d[d.length-1];if(y.isAncestor(d,p))throw new Error("Cannot move a path [".concat(d,"] to new path [").concat(p,"] because the destination is inside itself."));var g=U.get(e,d);Ke(e,y.parent(d),function(e){return Ge(e,h,1)});var v=y.transform(d,t),m=v[v.length-1];Ke(e,y.parent(v),function(e){return Ve(e,m,g)}),n=!0;break;case"remove_node":var b=t.path,E=b[b.length-1];if(Ke(e,y.parent(b),function(e){return Ge(e,E,1)}),e.selection){var w,C=Qe({},e.selection),D=Xe(P.points(C));try{for(D.s();!(w=D.n()).done;){var A=T(w.value,2),S=A[0],x=A[1],O=Fe.transform(S,t);if(null!=C&&null!=O)C[x]=O;else{var N,B=void 0,k=void 0,F=Xe(U.texts(e));try{for(F.s();!(N=F.n()).done;){var I=T(N.value,2),R=I[0],_=I[1];if(-1!==y.compare(_,b)){k=[R,_];break}B=[R,_]}}catch(e){F.e(e)}finally{F.f()}var L=!1;B&&k&&(L=!y.isSibling(B[1],b)&&(!!y.equals(k[1],b)||y.common(B[1],b).length<y.common(k[1],b).length)),B&&!L?C[x]={path:B[1],offset:B[0].text.length}:k?C[x]={path:k[1],offset:0}:C=null}}}catch(e){D.e(e)}finally{D.f()}C&&P.equals(C,e.selection)||(e.selection=C)}break;case"remove_text":var M=t.path,j=t.offset,H=t.text;if(0===H.length)break;Ye(e,M,function(e){var t=e.text.slice(0,j),n=e.text.slice(j+H.length);return Qe(Qe({},e),{},{text:t+n})}),n=!0;break;case"set_node":var z=t.path,$=t.properties,V=t.newProperties;if(0===z.length)throw new Error("Cannot set properties on the root node!");qe(e,z,function(e){var t=Qe({},e);for(var n in V){if("children"===n||"text"===n)throw new Error('Cannot set the "'.concat(n,'" property of nodes!'));var r=V[n];null==r?delete t[n]:t[n]=r}for(var o in $)V.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var W=t.newProperties;if(null==W){e.selection=null;break}if(null==e.selection){if(!W.anchor||!W.focus)throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Pe.stringify(W)," when there is no current selection."));e.selection=Qe({},W);break}var G=Qe({},e.selection);for(var q in W){var K=W[q];if(null==K){if("anchor"===q||"focus"===q)throw new Error('Cannot remove the "'.concat(q,'" selection property'));delete G[q]}else G[q]=K}e.selection=G;break;case"split_node":var Y=t.path,X=t.position,Z=t.properties,J=Y[Y.length-1];if(0===Y.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Y,"] because the root node cannot be split."));Ke(e,y.parent(Y),function(e){var t,n,r=e[J];if(U.isText(r)){var o=r.text.slice(0,X),i=r.text.slice(X);t=Qe(Qe({},r),{},{text:o}),n=Qe(Qe({},Z),{},{text:i})}else{var a=r.children.slice(0,X),u=r.children.slice(X);t=Qe(Qe({},r),{},{children:a}),n=Qe(Qe({},Z),{},{children:u})}return We(e,J,1,t,n)}),n=!0}if(n&&e.selection){var Q,ee=Qe({},e.selection),te=Xe(P.points(ee));try{for(te.s();!(Q=te.n()).done;){var ne=T(Q.value,2),re=ne[0];ee[ne[1]]=Fe.transform(re,t)}}catch(e){te.e(e)}finally{te.f()}P.equals(ee,e.selection)||(e.selection=ee)}}},tt={delete:function(e,t){e.delete(t)},insertFragment:function(e,t,n){e.insertFragment(t,n)},insertText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Oe.withoutNormalizing(e,function(){var r=n.voids,o=void 0!==r&&r,i=n.at,a=void 0===i?Y(e):i;if(Te.isPath(a)&&(a=Oe.range(e,a)),Te.isRange(a))if(P.isCollapsed(a))a=a.anchor;else{var u=P.end(a);if(!o&&Oe.void(e,{at:u}))return;var s=P.start(a),l=Oe.pointRef(e,s),c=Oe.pointRef(e,u);ot.delete(e,{at:a,voids:o});var f=l.unref(),d=c.unref();a=f||d,ot.setSelection(e,{anchor:a,focus:a})}if(!(!o&&Oe.void(e,{at:a})||Oe.elementReadOnly(e,{at:a}))){var p=a,h=p.path,g=p.offset;t.length>0&&e.apply({type:"insert_text",path:h,offset:g,text:t})}})}};function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ot=rt(rt(rt(rt({},et),{insertNodes:function(e,t,n){e.insertNodes(t,n)},liftNodes:function(e,t){e.liftNodes(t)},mergeNodes:function(e,t){e.mergeNodes(t)},moveNodes:function(e,t){e.moveNodes(t)},removeNodes:function(e,t){e.removeNodes(t)},setNodes:function(e,t,n){e.setNodes(t,n)},splitNodes:function(e,t){e.splitNodes(t)},unsetNodes:function(e,t,n){e.unsetNodes(t,n)},unwrapNodes:function(e,t){e.unwrapNodes(t)},wrapNodes:function(e,t,n){e.wrapNodes(t,n)}}),{collapse:function(e,t){e.collapse(t)},deselect:function(e){e.deselect()},move:function(e,t){e.move(t)},select:function(e,t){e.select(t)},setPoint:function(e,t,n){e.setPoint(t,n)},setSelection:function(e,t){e.setSelection(t)}}),tt),it=new WeakMap;function at(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ut(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function st(e,t,n){var i,a,u=r.get(e)||[],s=o.get(e)||new Set,l=function(e){if(e){var t=e.join(",");a.has(t)||(a.add(t),i.push(e))}};if(n){i=[],a=new Set;var c,f=at(u);try{for(f.s();!(c=f.n()).done;){l(n(c.value))}}catch(e){f.e(e)}finally{f.f()}}else i=u,a=s;var d,p=at(t);try{for(p.s();!(d=p.n()).done;){l(d.value)}}catch(e){p.e(e)}finally{p.f()}r.set(e,i),o.set(e,a)}function lt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ct(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ft=function(r,o){var a,u=lt(Oe.pathRefs(r));try{for(u.s();!(a=u.n()).done;){var s=a.value;e.transform(s,o)}}catch(e){u.e(e)}finally{u.f()}var l,c=lt(Oe.pointRefs(r));try{for(c.s();!(l=c.n()).done;){var f=l.value;t.transform(f,o)}}catch(e){c.e(e)}finally{c.f()}var d,p=lt(Oe.rangeRefs(r));try{for(p.s();!(d=p.n()).done;){var h=d.value;n.transform(h,o)}}catch(e){p.e(e)}finally{p.f()}if(!function(e){return it.get(e)||!1}(r)){var g=y.operationCanTransformPath(o)?function(e){return y.transform(e,o)}:void 0;st(r,r.getDirtyPaths(o),g)}ot.transform(r,o),r.operations.push(o),Oe.normalize(r,{operation:o}),"set_selection"===o.type&&(r.marks=null),i.get(r)||(i.set(r,!0),Promise.resolve().then(function(){i.set(r,!1),r.onChange({operation:o}),r.operations=[]}))};function dt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return pt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pt(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ht=function(e,t){switch(t.type){case"insert_text":case"remove_text":case"set_node":var n=t.path;return y.levels(n);case"insert_node":var r=t.node,o=t.path,i=y.levels(o),a=U.isText(r)?[]:Array.from(U.nodes(r),function(e){var t=T(e,2)[1];return o.concat(t)});return[].concat(m(i),m(a));case"merge_node":var u=t.path,s=y.ancestors(u),l=y.previous(u);return[].concat(m(s),[l]);case"move_node":var c=t.path,f=t.newPath;if(y.equals(c,f))return[];var d,p=[],h=[],g=dt(y.ancestors(c));try{for(g.s();!(d=g.n()).done;){var v=d.value,b=y.transform(v,t);p.push(b)}}catch(e){g.e(e)}finally{g.f()}var E,w=dt(y.ancestors(f));try{for(w.s();!(E=w.n()).done;){var C=E.value,D=y.transform(C,t);h.push(D)}}catch(e){w.e(e)}finally{w.f()}var A=h[h.length-1],S=f[f.length-1],x=A.concat(S);return[].concat(p,h,[x]);case"remove_node":var O=t.path,N=y.ancestors(O);return m(N);case"split_node":var B=t.path,k=y.levels(B),F=y.next(B);return[].concat(m(k),[F]);default:return[]}},gt=function(e){var t=e.selection;return t?U.fragment(e,t):[]},vt=function(e,t,n){var r=T(t,2),o=r[0],i=r[1];if(!U.isText(o)){"children"in o||(o.children=[]);var a=o;if(a!==e&&0===a.children.length){ot.insertNodes(e,{text:""},{at:i.concat(0),voids:!0}),a=U.get(e,i)}if(!(a===e)&&(e.isInline(a)||U.isText(a.children[0])||e.isInline(a.children[0])))for(var u=0;u<a.children.length;u++){var s=a.children[u],l=a.children[u-1];if(U.isText(s))null!=l&&U.isText(l)&&(""===s.text?(ot.removeNodes(e,{at:i.concat(u),voids:!0}),a=U.get(e,i),u--):""===l.text?(ot.removeNodes(e,{at:i.concat(u-1),voids:!0}),a=U.get(e,i),u--):ze.equals(s,l,{loose:!0})&&(ot.mergeNodes(e,{at:i.concat(u),voids:!0}),a=U.get(e,i),u--));else if(e.isInline(s)){if(null==l||!U.isText(l)){ot.insertNodes(e,{text:""},{at:i.concat(u),voids:!0}),a=U.get(e,i),u++}if(u===a.children.length-1){ot.insertNodes(e,{text:""},{at:i.concat(u+1),voids:!0}),a=U.get(e,i),u++}}else ot.unwrapNodes(e,{at:i.concat(u),voids:!0}),a=U.get(e,i),u--}else for(var c=0;c<a.children.length;c++){var f=a.children[c];(U.isText(f)||e.isInline(f))&&(null!=n&&n.fallbackElement?ot.wrapNodes(e,n.fallbackElement(),{at:i.concat(c),voids:!0}):ot.removeNodes(e,{at:i.concat(c),voids:!0}),a=U.get(e,i),c--)}}},mt=function(e,t){var n=t.iteration,r=42*t.initialDirtyPathsLength;if(n>r)throw new Error("Could not completely normalize the editor after ".concat(r," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.voids,r=void 0!==n&&n,o=t.mode,i=void 0===o?"lowest":o,a=t.at,u=void 0===a?e.selection:a,s=t.match;if(u){var l=Oe.path(e,u);if(!Te.isRange(u)||y.equals(u.focus.path,u.anchor.path)){if(0===l.length)return;l=y.parent(l)}var c="lowest"===i,f=Oe.levels(e,{at:l,voids:r,match:s,reverse:c});return T(f,1)[0]}};function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wt=function(e,t,n){var r=e.selection;if(r){var o=function(t,n){if(!U.isText(t))return!1;var r=Oe.parent(e,n),o=T(r,2),i=o[0];return o[1],!e.isVoid(i)||e.markableVoid(i)},a=P.isExpanded(r),u=!1;if(!a){var s=Oe.node(e,r),l=T(s,2),c=l[0],f=l[1];if(c&&o(c,f)){var d=Oe.parent(e,f),p=T(d,1)[0];u=p&&e.markableVoid(p)}}if(a||u)ot.setNodes(e,D({},t,n),{match:o,split:!0,voids:!0});else{var h=Et(Et({},Oe.marks(e)||{}),{},D({},t,n));e.marks=h,i.get(e)||e.onChange()}}};function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function At(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return St(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return St(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function St(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xt=function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:Oe.point(e,t,{edge:"end"}),focus:Oe.end(e,[])},a=o.distance,u=void 0===a?1:a,s=0,l=At(Oe.positions(e,Dt(Dt({},o),{},{at:i})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(s>u)break;0!==s&&(n=c),s++}}catch(e){l.e(e)}finally{l.f()}return n};function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bt(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kt=function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:Oe.start(e,[]),focus:Oe.point(e,t,{edge:"start"})},a=o.distance,u=void 0===a?1:a,s=0,l=Nt(Oe.positions(e,Tt(Tt({},o),{},{at:i,reverse:!0})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(s>u)break;0!==s&&(n=c),s++}}catch(e){l.e(e)}finally{l.f()}return n},Ft=function(e,t){var n=e.selection;n&&P.isCollapsed(n)&&ot.delete(e,{unit:t,reverse:!0})},It=function(e,t){var n=e.selection;n&&P.isCollapsed(n)&&ot.delete(e,{unit:t})},Pt=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,n=void 0===t?"forward":t,r=e.selection;r&&P.isExpanded(r)&&ot.delete(e,{reverse:"backward"===n})},Rt=function(e,t){return[Oe.start(e,t),Oe.end(e,t)]};function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Mt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Oe.above(e,Lt(Lt({},t),{},{match:function(t){return U.isElement(t)&&Oe.isElementReadOnly(e,t)}}))},jt=function(e,t){return Oe.point(e,t,{edge:"end"})},Ht=function(e,t){var n=Oe.path(e,t,{edge:"start"});return Oe.node(e,n)},zt=function(e,t){var n=Oe.range(e,t);return U.fragment(e,n)};function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Vt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Oe.above(e,Ut(Ut({},t),{},{match:function(t){return U.isElement(t)&&Oe.isVoid(e,t)}}))},Wt=function(e,t){return t.children.some(function(t){return U.isElement(t)&&Oe.isBlock(e,t)})},Gt=function(e,t){return t.children.some(function(t){return U.isText(t)||Oe.isInline(e,t)})},qt=function(e,t){return U.has(e,t)},Kt=function(e,t){return t.children.every(function(e){return U.isText(e)})},Yt=function(e){ot.splitNodes(e,{always:!0})},Xt=function(e,t,n){ot.insertNodes(e,t,n)},Zt=function(e){ot.splitNodes(e,{always:!0})};function Jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Qt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=e.marks;if(r){if(o){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({text:t},o);ot.insertNodes(e,i,{at:n.at,voids:n.voids})}else ot.insertText(e,t,n);e.marks=null}},en=function(e,t){return!e.isInline(t)},tn=function(e,t,n){return Oe.isStart(e,t,n)||Oe.isEnd(e,t,n)},nn=function(e,t){var n=t.children,r=T(n,1)[0];return 0===n.length||1===n.length&&U.isText(r)&&""===r.text&&!e.isVoid(t)},rn=function(e,t,n){var r=Oe.end(e,n);return Fe.equals(t,r)},on=function(e){var t=a.get(e);return void 0===t||t},an=function(e,t,n){if(0!==t.offset)return!1;var r=Oe.start(e,n);return Fe.equals(t,r)},un=function(e,t){var n=Oe.path(e,t,{edge:"end"});return Oe.node(e,n)},sn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Oe.path(e,t,n);return[U.leaf(e,r),r]};function ln(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var n=t.at,r=void 0===n?e.selection:n,o=t.reverse,i=void 0!==o&&o,a=t.voids,u=void 0!==a&&a,s=t.match;if(null==s&&(s=function(){return!0}),r){var l,c=[],f=Oe.path(e,r),d=ln(U.levels(e,f));try{for(d.s();!(l=d.n()).done;){var p=T(l.value,2),h=p[0],g=p[1];if(s(h,g)&&(c.push([h,g]),!u&&U.isElement(h)&&Oe.isVoid(e,h)))break}}catch(e){d.e(e)}finally{d.f()}i&&c.reverse(),yield*c}}()}var dn=["text"],pn=["text"],hn=function(e){var t=e.marks,n=e.selection;if(!n)return null;var r=n.anchor,o=n.focus;if(t)return t;if(P.isExpanded(n)){if(P.isBackward(n)){var i=[r,o];o=i[0],r=i[1]}if(Oe.isEnd(e,r,r.path)){var a=Oe.after(e,r);a&&(r=a)}var u=Oe.nodes(e,{match:U.isText,at:{anchor:r,focus:o}}),s=T(u,1)[0];if(s){var l=T(s,1)[0];return l.text,k(l,dn)}return{}}var c=r.path,f=Oe.leaf(e,c),d=T(f,1)[0];if(0===r.offset){var p=Oe.previous(e,{at:c,match:U.isText}),h=Oe.above(e,{match:function(t){return U.isElement(t)&&Oe.isVoid(e,t)&&e.markableVoid(t)}});if(!h){var g=Oe.above(e,{match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)}});if(p&&g){var v=T(p,2),m=v[0],b=v[1],E=T(g,2)[1];y.isAncestor(E,b)&&(d=m)}}}var w=d;return w.text,k(w,pn)},gn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,u=t.at,s=void 0===u?e.selection:u;if(s){var l=Oe.after(e,s,{voids:i});if(l){var c=Oe.last(e,[]),f=T(c,2)[1],d=[l.path,f];if(Te.isPath(s)&&0===s.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(Te.isPath(s)){var p=Oe.parent(e,s),h=T(p,1)[0];a=function(e){return h.children.includes(e)}}else a=function(){return!0};var g=Oe.nodes(e,{at:d,match:a,mode:r,voids:i}),v=T(g,1)[0];return v}}},vn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Oe.path(e,t,n),o=U.get(e,r);return[o,r]};function mn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"all":o,a=t.universal,u=void 0!==a&&a,s=t.reverse,l=void 0!==s&&s,c=t.voids,f=void 0!==c&&c,d=t.pass,p=t.match;if(p||(p=function(){return!0}),r){var h,g;if(Te.isSpan(r))h=r[0],g=r[1];else{var v=Oe.path(e,r,{edge:"start"}),m=Oe.path(e,r,{edge:"end"});h=l?m:v,g=l?v:m}var b,E,w=U.nodes(e,{reverse:l,from:h,to:g,pass:function(t){var n=T(t,2),r=n[0],o=n[1];return!(!d||!d([r,o]))||!!U.isElement(r)&&!(f||!Oe.isVoid(e,r)&&!Oe.isElementReadOnly(e,r))}}),C=[],D=mn(w);try{for(D.s();!(E=D.n()).done;){var A=T(E.value,2),S=A[0],x=A[1],O=b&&0===y.compare(x,b[1]);if("highest"!==i||!O)if(p(S,x))if("lowest"===i&&O)b=[S,x];else{var N="lowest"===i?b:[S,x];N&&(u?C.push(N):yield N),b=[S,x]}else if(u&&!O&&U.isText(S))return}}catch(e){D.e(e)}finally{D.f()}"lowest"===i&&b&&(u?C.push(b):yield b),u&&(yield*C)}}()}function En(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force,i=void 0!==n&&n,a=t.operation,u=function(e){return r.get(e)||[]},s=function(e){var t=u(e).pop(),n=t.join(",");return function(e){return o.get(e)||new Set}(e).delete(n),t};if(Oe.isNormalizing(e)){if(i){var l=Array.from(U.nodes(e),function(e){return T(e,2)[1]}),c=new Set(l.map(function(e){return e.join(",")}));r.set(e,l),o.set(e,c)}0!==u(e).length&&Oe.withoutNormalizing(e,function(){var t,n=En(u(e));try{for(n.s();!(t=n.n()).done;){var r=t.value;if(U.has(e,r)){var o=Oe.node(e,r),i=T(o,2),l=i[0];i[1];U.isElement(l)&&0===l.children.length&&e.normalizeNode(o,{operation:a})}}}catch(e){n.e(e)}finally{n.f()}for(var c=u(e),f=c.length,d=0;0!==c.length;){if(!e.shouldNormalize({dirtyPaths:c,iteration:d,initialDirtyPathsLength:f,operation:a}))return;var p=s(e);if(U.has(e,p)){var h=Oe.node(e,p);e.normalizeNode(h,{operation:a})}d++,c=u(e)}})}},Dn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Oe.path(e,t,n),o=y.parent(r);return Oe.node(e,o)},An=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return Oe.pathRefs(e).delete(r),r.current=null,t}};return Oe.pathRefs(e).add(r),r},Sn=function(e){var t=u.get(e);return t||(t=new Set,u.set(e,t)),t},xn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.depth,o=n.edge;if(Te.isPath(t))if("start"===o){var i=U.first(e,t);t=T(i,2)[1]}else if("end"===o){var a=U.last(e,t);t=T(a,2)[1]}return Te.isRange(t)&&(t="start"===o?P.start(t):"end"===o?P.end(t):y.common(t.anchor.path,t.focus.path)),Te.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},On=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return Oe.pointRefs(e).delete(r),r.current=null,t}};return Oe.pointRefs(e).add(r),r},Tn=function(e){var t=s.get(e);return t||(t=new Set,s.set(e,t)),t},Nn=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,r=void 0===n?"start":n;if(Te.isPath(t)){var o;if("end"===r){var i=U.last(e,t);o=T(i,2)[1]}else{var a=U.first(e,t);o=T(a,2)[1]}var u=U.get(e,o);if(!U.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?u.text.length:0}}if(Te.isRange(t)){var s=P.edges(t),l=T(s,2),c=l[0],f=l[1];return"start"===r?c:f}return t};function Bn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var n=t.at,r=void 0===n?e.selection:n,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,u=void 0!==a&&a,s=t.voids,l=void 0!==s&&s;if(r){var c,f=Oe.range(e,r),d=P.edges(f),p=T(d,2),h=p[0],g=p[1],v=u?g:h,m=!1,b="",E=0,w=0,C=0,D=[],A=Bn(Oe.nodes(e,{at:r,reverse:u,voids:l}));try{var S=function*(){var t=T(c.value,2),n=t[0],r=t[1],o=D.some(function(e){return y.isAncestor(e,r)});function*a(e){o||(yield e)}if(U.isElement(n)){if(!e.isSelectable(n)){if(D.push(r),u)return y.hasPrevious(r)&&(yield*a(Oe.end(e,y.previous(r)))),0;var s=y.next(r);return Oe.hasPath(e,s)&&(yield*a(Oe.start(e,s))),0}if(!l&&(e.isVoid(n)||e.isElementReadOnly(n)))return yield*a(Oe.start(e,r)),0;if(e.isInline(n))return 0;if(Oe.hasInlines(e,n)){var f=y.isAncestor(r,g.path)?g:Oe.end(e,r),d=y.isAncestor(r,h.path)?h:Oe.start(e,r);b=Oe.string(e,{anchor:d,focus:f},{voids:l}),m=!0}}if(U.isText(n)){var p=y.equals(r,v.path);for(p?(w=u?v.offset:n.text.length-v.offset,C=v.offset):(w=n.text.length,C=u?w:0),(p||m||"offset"===i)&&(yield*a({path:r,offset:C}),m=!1);;){if(0===E){if(""===b)break;E=x(b,i,u),b=oe(b,E,u)[1]}if(C=u?C-E:C+E,(w-=E)<0){E=-w;break}E=0,yield*a({path:r,offset:C})}}};for(A.s();!(c=A.n()).done;)yield*S()}catch(e){A.e(e)}finally{A.f()}}function x(e,t,n){return"character"===t?ee(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=ee(e,t),i=oe(e,o,t),a=T(i,2),u=a[0],s=a[1];if(ie(u,s,t))r=!0,n+=o;else{if(r)break;n+=o}e=s}return n}(e,n):"line"===t||"block"===t?e.length:1}}()}var In=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,u=t.at,s=void 0===u?e.selection:u;if(s){var l=Oe.before(e,s,{voids:i});if(l){var c=Oe.first(e,[]),f=T(c,2)[1],d=[l.path,f];if(Te.isPath(s)&&0===s.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(Te.isPath(s)){var p=Oe.parent(e,s),h=T(p,1)[0];a=function(e){return h.children.includes(e)}}else a=function(){return!0};var g=Oe.nodes(e,{reverse:!0,at:d,match:a,mode:r,voids:i}),v=T(g,1)[0];return v}}},Pn=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return Oe.rangeRefs(e).delete(r),r.current=null,t}};return Oe.rangeRefs(e).add(r),r},Rn=function(e){var t=l.get(e);return t||(t=new Set,l.set(e,t)),t},_n=function(e,t,n){return Te.isRange(t)&&!n?t:{anchor:Oe.start(e,t),focus:Oe.end(e,n||t)}};function Ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Mn=function(e,t){var n=e.selection;if(n){var r=function(t,n){if(!U.isText(t))return!1;var r=Oe.parent(e,n),o=T(r,2),i=o[0];return o[1],!e.isVoid(i)||e.markableVoid(i)},o=P.isExpanded(n),a=!1;if(!o){var u=Oe.node(e,n),s=T(u,2),l=s[0],c=s[1];if(l&&r(l,c)){var f=Oe.parent(e,c),d=T(f,1)[0];a=d&&e.markableVoid(d)}}if(o||a)ot.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{var p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ln(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},Oe.marks(e)||{});delete p[t],e.marks=p,i.get(e)||e.onChange()}}},jn=function(e,t){a.set(e,t)},Hn=function(e,t){return Oe.point(e,t,{edge:"start"})};function zn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return $n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $n(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Un=function(e,t){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==r&&r,i=Oe.range(e,t),a=P.edges(i),u=T(a,2),s=u[0],l=u[1],c="",f=zn(Oe.nodes(e,{at:i,match:U.isText,voids:o}));try{for(f.s();!(n=f.n()).done;){var d=T(n.value,2),p=d[0],h=d[1],g=p.text;y.equals(h,l.path)&&(g=g.slice(0,l.offset)),y.equals(h,s.path)&&(g=g.slice(s.offset)),c+=g}}catch(e){f.e(e)}finally{f.f()}return c};function Vn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gn=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,r=void 0!==n&&n,o=P.edges(t),i=T(o,2),a=i[0],u=i[1];if(0!==a.offset||0!==u.offset||P.isCollapsed(t)||y.hasPrevious(u.path))return t;var s,l=Oe.above(e,{at:u,match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)},voids:r}),c=l?l[1]:[],f={anchor:Oe.start(e,a),focus:u},d=!0,p=Vn(Oe.nodes(e,{at:f,match:U.isText,reverse:!0,voids:r}));try{for(p.s();!(s=p.n()).done;){var h=T(s.value,2),g=h[0],v=h[1];if(d)d=!1;else if(""!==g.text||y.isBefore(v,c)){u={path:v,offset:g.text.length};break}}}catch(e){p.e(e)}finally{p.f()}return{anchor:a,focus:u}},qn=function(e,t){var n=Oe.isNormalizing(e);Oe.setNormalizing(e,!1);try{t()}finally{Oe.setNormalizing(e,n)}Oe.normalize(e)},Kn=function(e,t,n){var r=T(t,2),o=r[0],i=r[1],a=T(n,2);return a[0],a[1],U.isElement(o)&&Oe.isEmpty(e,o)||U.isText(o)&&""===o.text&&0!==i[i.length-1]};function Yn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Zn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe.withoutNormalizing(e,function(){var n,r,o=t.reverse,i=void 0!==o&&o,a=t.unit,u=void 0===a?"character":a,s=t.distance,l=void 0===s?1:s,c=t.voids,f=void 0!==c&&c,d=t.at,p=void 0===d?e.selection:d,h=t.hanging,g=void 0!==h&&h;if(p){var v=!1;if(Te.isRange(p)&&P.isCollapsed(p)&&(v=!0,p=p.anchor),Te.isPoint(p)){var m=Oe.void(e,{at:p,mode:"highest"});if(!f&&m){p=T(m,2)[1]}else{var b={unit:u,distance:l};p={anchor:p,focus:i?Oe.before(e,p,b)||Oe.start(e,[]):Oe.after(e,p,b)||Oe.end(e,[])},g=!0}}if(Te.isPath(p))ot.removeNodes(e,{at:p,voids:f});else if(!P.isCollapsed(p)){if(!g){var E=P.edges(p),w=T(E,2)[1],C=Oe.end(e,[]);Fe.equals(w,C)||(p=Oe.unhangRange(e,p,{voids:f}))}var D=P.edges(p),A=T(D,2),S=A[0],x=A[1],O=Oe.above(e,{match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)},at:S,voids:f}),N=Oe.above(e,{match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)},at:x,voids:f}),B=O&&N&&!y.equals(O[1],N[1]),k=y.equals(S.path,x.path),F=f?null:null!==(n=Oe.void(e,{at:S,mode:"highest"}))&&void 0!==n?n:Oe.elementReadOnly(e,{at:S,mode:"highest"}),I=f?null:null!==(r=Oe.void(e,{at:x,mode:"highest"}))&&void 0!==r?r:Oe.elementReadOnly(e,{at:x,mode:"highest"});if(F){var R=Oe.before(e,S);R&&O&&y.isAncestor(O[1],R.path)&&(S=R)}if(I){var _=Oe.after(e,x);_&&N&&y.isAncestor(N[1],_.path)&&(x=_)}var L,M,j=[],H=Yn(Oe.nodes(e,{at:p,voids:f}));try{for(H.s();!(M=H.n()).done;){var z=M.value,$=T(z,2),V=$[0],W=$[1];L&&0===y.compare(W,L)||(!f&&U.isElement(V)&&(Oe.isVoid(e,V)||Oe.isElementReadOnly(e,V))||!y.isCommon(W,S.path)&&!y.isCommon(W,x.path))&&(j.push(z),L=W)}}catch(e){H.e(e)}finally{H.f()}var G=Array.from(j,function(t){var n=T(t,2)[1];return Oe.pathRef(e,n)}),q=Oe.pointRef(e,S),K=Oe.pointRef(e,x),Y="";if(!k&&!F){var X=q.current,Z=Oe.leaf(e,X),J=T(Z,1)[0],Q=X.path,ee=S.offset,te=J.text.slice(ee);te.length>0&&(e.apply({type:"remove_text",path:Q,offset:ee,text:te}),Y=te)}if(G.reverse().map(function(e){return e.unref()}).filter(function(e){return null!==e}).forEach(function(t){return ot.removeNodes(e,{at:t,voids:f})}),!I){var ne=K.current,re=Oe.leaf(e,ne),oe=T(re,1)[0],ie=ne.path,ae=k?S.offset:0,ue=oe.text.slice(ae,x.offset);ue.length>0&&(e.apply({type:"remove_text",path:ie,offset:ae,text:ue}),Y=ue)}!k&&B&&K.current&&q.current&&ot.mergeNodes(e,{at:K.current,hanging:!0,voids:f}),v&&i&&"character"===u&&Y.length>1&&Y.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&ot.insertText(e,Y.slice(0,Y.length-l));var se=q.unref(),le=K.unref(),ce=i?se||le:le||se;null==t.at&&ce&&ot.select(e,ce)}}})};function Jn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qn(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var er=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Oe.withoutNormalizing(e,function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,u=n.at,s=void 0===u?Y(e):u,l=n.batchDirty,c=void 0===l||l;if(t.length){if(Te.isRange(s))if(o||(s=Oe.unhangRange(e,s,{voids:a})),P.isCollapsed(s))s=s.anchor;else{var f=P.edges(s),d=T(f,2)[1];if(!a&&Oe.void(e,{at:d}))return;var p=Oe.pointRef(e,d);ot.delete(e,{at:s}),s=p.unref()}else Te.isPath(s)&&(s=Oe.start(e,s));if(a||!Oe.void(e,{at:s})){var h=Oe.above(e,{at:s,match:function(t){return U.isElement(t)&&Oe.isInline(e,t)},mode:"highest",voids:a});if(h){var g=T(h,2)[1];if(Oe.isEnd(e,s,g))s=Oe.after(e,g);else if(Oe.isStart(e,s,g)){s=Oe.before(e,g)}}var v,m=Oe.above(e,{match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)},at:s,voids:a}),b=T(m,2)[1],E=Oe.isStart(e,s,b),w=Oe.isEnd(e,s,b),C=E&&w,D=U.first({children:t},[]),A=T(D,2)[1],S=U.last({children:t},[]),x=T(S,2)[1],O=function(t){var n=T(t,2),r=n[0],o=n[1];return!(0===o.length)&&(!!C||!(!E&&y.isAncestor(o,A)&&U.isElement(r)&&!e.isVoid(r)&&!e.isInline(r))&&!(!w&&y.isAncestor(o,x)&&U.isElement(r)&&!e.isVoid(r)&&!e.isInline(r)))},N=!0,B=[],k=[],F=[],I=Jn(U.nodes({children:t},{pass:O}));try{for(I.s();!(v=I.n()).done;){var R=v.value,_=T(R,2),L=_[0],M=_[1];N&&U.isElement(L)&&!e.isInline(L)&&!y.isAncestor(M,A)&&(N=!1),O(R)&&(U.isElement(L)&&!e.isInline(L)?(N=!1,k.push(L)):N?B.push(L):F.push(L))}}catch(e){I.e(e)}finally{I.f()}var j=Oe.nodes(e,{at:s,match:function(t){return U.isText(t)||Oe.isInline(e,t)},mode:"highest",voids:a}),H=T(j,1)[0],z=T(H,2)[1],$=Oe.isStart(e,s,z),V=Oe.isEnd(e,s,z),W=Oe.pathRef(e,w&&!F.length?y.next(b):b),G=Oe.pathRef(e,V?y.next(z):z),q=F.length>0;ot.splitNodes(e,{at:s,match:function(t){return q?U.isElement(t)&&Oe.isBlock(e,t):U.isText(t)||Oe.isInline(e,t)},mode:q?"lowest":"highest",always:q&&(!E||B.length>0)&&(!w||F.length>0),voids:a});var K,X=Oe.pathRef(e,!$||$&&V?y.next(z):z);if(ot.insertNodes(e,B,{at:X.current,match:function(t){return U.isText(t)||Oe.isInline(e,t)},mode:"highest",voids:a,batchDirty:c}),C&&!B.length&&k.length&&!F.length&&ot.delete(e,{at:b,voids:a}),ot.insertNodes(e,k,{at:W.current,match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)},mode:"lowest",voids:a,batchDirty:c}),ot.insertNodes(e,F,{at:G.current,match:function(t){return U.isText(t)||Oe.isInline(e,t)},mode:"highest",voids:a,batchDirty:c}),!n.at)if(F.length>0&&G.current?K=y.previous(G.current):k.length>0&&W.current?K=y.previous(W.current):X.current&&(K=y.previous(X.current)),K){var Z=Oe.end(e,K);ot.select(e,Z)}X.unref(),W.unref(),G.unref()}}})},tr=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).edge,n=void 0===t?"anchor":t,r=e.selection;if(r)if("anchor"===n)ot.select(e,r.anchor);else if("focus"===n)ot.select(e,r.focus);else if("start"===n){var o=P.edges(r),i=T(o,1)[0];ot.select(e,i)}else if("end"===n){var a=P.edges(r),u=T(a,2)[1];ot.select(e,u)}},nr=function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},rr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.selection,r=t.distance,o=void 0===r?1:r,i=t.unit,a=void 0===i?"character":i,u=t.reverse,s=void 0!==u&&u,l=t.edge,c=void 0===l?null:l;if(n){"start"===c&&(c=P.isBackward(n)?"focus":"anchor"),"end"===c&&(c=P.isBackward(n)?"anchor":"focus");var f=n.anchor,d=n.focus,p={distance:o,unit:a},h={};if(null==c||"anchor"===c){var g=s?Oe.before(e,f,p):Oe.after(e,f,p);g&&(h.anchor=g)}if(null==c||"focus"===c){var v=s?Oe.before(e,d,p):Oe.after(e,d,p);v&&(h.focus=v)}ot.setSelection(e,h)}},or=function(e,t){var n=e.selection;if(t=Oe.range(e,t),n)ot.setSelection(e,t);else{if(!Te.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Pe.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}};function ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ar(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ur=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=n.edge,i=void 0===o?"both":o;if(r){"start"===i&&(i=P.isBackward(r)?"focus":"anchor"),"end"===i&&(i=P.isBackward(r)?"anchor":"focus");var a=r.anchor,u=r.focus,s="anchor"===i?a:u;ot.setSelection(e,D({},"anchor"===i?"anchor":"focus",ar(ar({},s),t)))}},sr=function(e,t){var n=e.selection,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!Fe.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!Fe.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}};function lr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cr(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Oe.withoutNormalizing(e,function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,u=n.mode,s=void 0===u?"lowest":u,l=n.batchDirty,c=void 0===l||l,f=n.at,d=n.match,p=n.select;if(U.isNode(t)&&(t=[t]),0!==t.length){var h=T(t,1)[0];if(f||(f=Y(e),!1!==p&&(p=!0)),null==p&&(p=!1),Te.isRange(f))if(o||(f=Oe.unhangRange(e,f,{voids:a})),P.isCollapsed(f))f=f.anchor;else{var g=P.edges(f),v=T(g,2)[1],b=Oe.pointRef(e,v);ot.delete(e,{at:f}),f=b.unref()}if(Te.isPoint(f)){null==d&&(d=U.isText(h)?function(e){return U.isText(e)}:e.isInline(h)?function(t){return U.isText(t)||Oe.isInline(e,t)}:function(t){return U.isElement(t)&&Oe.isBlock(e,t)});var E=Oe.nodes(e,{at:f.path,match:d,mode:s,voids:a}),w=T(E,1)[0];if(!w)return;var C=T(w,2)[1],D=Oe.pathRef(e,C),A=Oe.isEnd(e,f,C);ot.splitNodes(e,{at:f,match:d,mode:s,voids:a});var S=D.unref();f=A?y.next(S):S}var x=y.parent(f),O=f[f.length-1];if(a||!Oe.void(e,{at:x})){if(c){var N=[],B=y.levels(x);!function(e,t,n){var r=it.get(e)||!1;it.set(e,!0);try{t(),n()}finally{it.set(e,r)}}(e,function(){var n,r=lr(t);try{var o=function(){var t=n.value,r=x.concat(O);O++;var o={type:"insert_node",path:r,node:t};e.apply(o),f=y.next(f),N.push(o),U.isText(t)?B.push(r):B.push.apply(B,m(Array.from(U.nodes(t),function(e){var t=T(e,2)[1];return r.concat(t)})))};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}},function(){st(e,B,function(e){for(var t=e,n=0,r=N;n<r.length;n++){var o=r[n];if(y.operationCanTransformPath(o)&&!(t=y.transform(t,o)))return null}return t})})}else{var k,F=lr(t);try{for(F.s();!(k=F.n()).done;){var I=k.value,R=x.concat(O);O++,e.apply({type:"insert_node",path:R,node:I}),f=y.next(f)}}catch(e){F.e(e)}finally{F.f()}}if(f=y.previous(f),p){var _=Oe.end(e,f);_&&ot.select(e,_)}}}})},dr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe.withoutNormalizing(e,function(){var n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,u=void 0!==a&&a,s=t.match;if(r){null==s&&(s=Te.isPath(r)?X(e,r):function(t){return U.isElement(t)&&Oe.isBlock(e,t)});for(var l=Oe.nodes(e,{at:r,match:s,mode:i,voids:u}),c=Array.from(l,function(t){var n=T(t,2)[1];return Oe.pathRef(e,n)}),f=0,d=c;f<d.length;f++){var p=d[f].unref();if(p.length<2)throw new Error("Cannot lift node at a path [".concat(p,"] because it has a depth of less than `2`."));var h=Oe.node(e,y.parent(p)),g=T(h,2),v=g[0],m=g[1],b=p[p.length-1],E=v.children.length;if(1===E){var w=y.next(m);ot.moveNodes(e,{at:p,to:w,voids:u}),ot.removeNodes(e,{at:m,voids:u})}else if(0===b)ot.moveNodes(e,{at:p,to:m,voids:u});else if(b===E-1){var C=y.next(m);ot.moveNodes(e,{at:p,to:C,voids:u})}else{var D=y.next(p),A=y.next(m);ot.splitNodes(e,{at:D,voids:u}),ot.moveNodes(e,{at:p,to:A,voids:u})}}}})},pr=["text"],hr=["children"],gr=function e(t,n){return n!==t&&(U.isText(n)||Oe.isVoid(t,n)||1===n.children.length&&e(t,n.children[0]))},vr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe.withoutNormalizing(e,function(){var n=t.match,r=t.at,o=void 0===r?e.selection:r,i=t.hanging,a=void 0!==i&&i,u=t.voids,s=void 0!==u&&u,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==n)if(Te.isPath(o)){var f=Oe.parent(e,o),d=T(f,1)[0];n=function(e){return d.children.includes(e)}}else n=function(t){return U.isElement(t)&&Oe.isBlock(e,t)};if(!a&&Te.isRange(o)&&(o=Oe.unhangRange(e,o,{voids:s})),Te.isRange(o))if(P.isCollapsed(o))o=o.anchor;else{var p=P.edges(o),h=T(p,2)[1],g=Oe.pointRef(e,h);ot.delete(e,{at:o}),o=g.unref(),null==t.at&&ot.select(e,o)}var v=Oe.nodes(e,{at:o,match:n,voids:s,mode:c}),m=T(v,1)[0],b=Oe.previous(e,{at:o,match:n,voids:s,mode:c});if(m&&b){var E=T(m,2),w=E[0],C=E[1],D=T(b,2),A=D[0],S=D[1];if(0!==C.length&&0!==S.length){var x,O,N=y.next(S),B=y.common(C,S),F=y.isSibling(C,S),I=Array.from(Oe.levels(e,{at:C}),function(e){return T(e,1)[0]}).slice(B.length).slice(0,-1),R=Oe.above(e,{at:C,mode:"highest",match:function(t){return I.includes(t)&&gr(e,t)}}),_=R&&Oe.pathRef(e,R[1]);if(U.isText(w)&&U.isText(A)){w.text;var L=k(w,pr);O=A.text.length,x=L}else{if(!U.isElement(w)||!U.isElement(A))throw new Error("Cannot merge the node at path [".concat(C,"] with the previous sibling because it is not the same kind: ").concat(Pe.stringify(w)," ").concat(Pe.stringify(A)));w.children;var M=k(w,hr);O=A.children.length,x=M}F||ot.moveNodes(e,{at:C,to:N,voids:s}),_&&ot.removeNodes(e,{at:_.current,voids:s}),Oe.shouldMergeNodesRemovePrevNode(e,b,m)?ot.removeNodes(e,{at:S,voids:s}):e.apply({type:"merge_node",path:N,position:O,properties:x}),_&&_.unref()}}}})},mr=function(e,t){Oe.withoutNormalizing(e,function(){var n=t.to,r=t.at,o=void 0===r?e.selection:r,i=t.mode,a=void 0===i?"lowest":i,u=t.voids,s=void 0!==u&&u,l=t.match;if(o){null==l&&(l=Te.isPath(o)?X(e,o):function(t){return U.isElement(t)&&Oe.isBlock(e,t)});for(var c=Oe.pathRef(e,n),f=Oe.nodes(e,{at:o,match:l,mode:a,voids:s}),d=Array.from(f,function(t){var n=T(t,2)[1];return Oe.pathRef(e,n)}),p=0,h=d;p<h.length;p++){var g=h[p].unref(),v=c.current;0!==g.length&&e.apply({type:"move_node",path:g,newPath:v}),c.current&&y.isSibling(v,g)&&y.isAfter(v,g)&&(c.current=y.next(c.current))}c.unref()}})},yr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe.withoutNormalizing(e,function(){var n=t.hanging,r=void 0!==n&&n,o=t.voids,i=void 0!==o&&o,a=t.mode,u=void 0===a?"lowest":a,s=t.at,l=void 0===s?e.selection:s,c=t.match;if(l){null==c&&(c=Te.isPath(l)?X(e,l):function(t){return U.isElement(t)&&Oe.isBlock(e,t)}),!r&&Te.isRange(l)&&(l=Oe.unhangRange(e,l,{voids:i}));for(var f=Oe.nodes(e,{at:l,match:c,mode:u,voids:i}),d=Array.from(f,function(t){var n=T(t,2)[1];return Oe.pathRef(e,n)}),p=0,h=d;p<h.length;p++){var g=h[p].unref();if(g){var v=Oe.node(e,g),m=T(v,1)[0];e.apply({type:"remove_node",path:g,node:m})}}}})};function br(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Er(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Oe.withoutNormalizing(e,function(){var r=n.match,o=n.at,i=void 0===o?e.selection:o,a=n.compare,u=n.merge,s=n.hanging,l=void 0!==s&&s,c=n.mode,f=void 0===c?"lowest":c,d=n.split,p=void 0!==d&&d,h=n.voids,g=void 0!==h&&h;if(i){if(null==r&&(r=Te.isPath(i)?X(e,i):function(t){return U.isElement(t)&&Oe.isBlock(e,t)}),!l&&Te.isRange(i)&&(i=Oe.unhangRange(e,i,{voids:g})),p&&Te.isRange(i)){if(P.isCollapsed(i)&&Oe.leaf(e,i.anchor)[0].text.length>0)return;var v=Oe.rangeRef(e,i,{affinity:"inward"}),m=P.edges(i),y=T(m,2),b=y[0],E=y[1],w="lowest"===f?"lowest":"highest",C=Oe.isEnd(e,E,E.path);ot.splitNodes(e,{at:E,match:r,mode:w,voids:g,always:!C});var D=Oe.isStart(e,b,b.path);ot.splitNodes(e,{at:b,match:r,mode:w,voids:g,always:!D}),i=v.unref(),null==n.at&&ot.select(e,i)}a||(a=function(e,t){return e!==t});var A,S=br(Oe.nodes(e,{at:i,match:r,mode:f,voids:g}));try{for(S.s();!(A=S.n()).done;){var x=T(A.value,2),O=x[0],N=x[1],B={},k={};if(0!==N.length){var F=!1;for(var I in t)"children"!==I&&"text"!==I&&a(t[I],O[I])&&(F=!0,O.hasOwnProperty(I)&&(B[I]=O[I]),u?null!=t[I]&&(k[I]=u(O[I],t[I])):null!=t[I]&&(k[I]=t[I]));F&&e.apply({type:"set_node",path:N,properties:B,newProperties:k})}}}catch(e){S.e(e)}finally{S.f()}}})};function Cr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dr(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe.withoutNormalizing(e,function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,u=t.at,s=void 0===u?e.selection:u,l=t.height,c=void 0===l?0:l,f=t.always,d=void 0!==f&&f;if(s&&(null==a&&(a=function(t){return U.isElement(t)&&Oe.isBlock(e,t)}),!Te.isRange(s)||(s=function(e,t){if(P.isCollapsed(t))return t.anchor;var n=P.edges(t),r=T(n,2)[1],o=Oe.pointRef(e,r);return ot.delete(e,{at:t}),o.unref()}(e,s),s))){if(Te.isPath(s)){var p=s,h=Oe.point(e,p),g=Oe.parent(e,p),v=T(g,1)[0];a=function(e){return e===v},c=h.path.length-p.length+1,s=h,d=!0}var m,b=Oe.pointRef(e,s,{affinity:"backward"});try{var E=Oe.nodes(e,{at:s,match:a,mode:r,voids:i}),w=T(E,1)[0];if(!w)return;var C=Oe.void(e,{at:s,mode:"highest"});if(!i&&C){var D=T(C,2),A=D[0],S=D[1];if(e.isInline(A)){var x=Oe.after(e,S);if(!x){var O=y.next(S);ot.insertNodes(e,{text:""},{at:O,voids:i}),x=Oe.point(e,O)}s=x,d=!0}c=s.path.length-S.length+1,d=!0}m=Oe.pointRef(e,s);var N,B=s.path.length-c,k=T(w,2)[1],F=s.path.slice(0,B),I=0===c?s.offset:s.path[B]+0,R=Cr(Oe.levels(e,{at:F,reverse:!0,voids:i}));try{for(R.s();!(N=R.n()).done;){var _=T(N.value,2),L=_[0],M=_[1],j=!1;if(M.length<k.length||0===M.length||!i&&U.isElement(L)&&Oe.isVoid(e,L))break;var H=b.current,z=Oe.isEnd(e,H,M);if(d||!b||!Oe.isEdge(e,H,M)){j=!0;var $=U.extractProps(L);e.apply({type:"split_node",path:M,position:I,properties:$})}I=M[M.length-1]+(j||z?1:0)}}catch(e){R.e(e)}finally{R.f()}if(null==t.at){var V=m.current||Oe.end(e,[]);ot.select(e,V)}}finally{var W;b.unref(),null===(W=m)||void 0===W||W.unref()}}})};function Sr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return xr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xr(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Or=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r,o={},i=Sr(t);try{for(i.s();!(r=i.n()).done;){o[r.value]=null}}catch(e){i.e(e)}finally{i.f()}ot.setNodes(e,o,n)};function Tr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nr(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Br=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Oe.withoutNormalizing(e,function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.split,i=void 0!==o&&o,a=t.voids,u=void 0!==a&&a,s=t.at,l=void 0===s?e.selection:s,c=t.match;if(l){null==c&&(c=Te.isPath(l)?X(e,l):function(t){return U.isElement(t)&&Oe.isBlock(e,t)}),Te.isPath(l)&&(l=Oe.range(e,l));var f,d=Te.isRange(l)?Oe.rangeRef(e,l):null,p=Oe.nodes(e,{at:l,match:c,mode:r,voids:u}),h=Array.from(p,function(t){var n=T(t,2)[1];return Oe.pathRef(e,n)}).reverse(),g=Tr(h);try{var v=function(){var t=f.value.unref(),n=Oe.node(e,t),r=T(n,1)[0],o=Oe.range(e,t);i&&d&&(o=P.intersection(d.current,o)),ot.liftNodes(e,{at:o,match:function(e){return!U.isText(r)&&r.children.includes(e)},voids:u})};for(g.s();!(f=g.n()).done;)v()}catch(e){g.e(e)}finally{g.f()}d&&d.unref()}})};function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(n),!0).forEach(function(t){D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ir=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Oe.withoutNormalizing(e,function(){var r=n.mode,o=void 0===r?"lowest":r,i=n.split,a=void 0!==i&&i,u=n.voids,s=void 0!==u&&u,l=n.match,c=n.at,f=void 0===c?e.selection:c;if(f){if(null==l&&(l=Te.isPath(f)?X(e,f):e.isInline(t)?function(t){return U.isElement(t)&&Oe.isInline(e,t)||U.isText(t)}:function(t){return U.isElement(t)&&Oe.isBlock(e,t)}),a&&Te.isRange(f)){var d=P.edges(f),p=T(d,2),h=p[0],g=p[1],v=Oe.rangeRef(e,f,{affinity:"inward"}),m=function(t){var n=Oe.above(e,{at:t,match:function(t){return U.isElement(t)&&Oe.isBlock(e,t)}});return n&&Oe.isEdge(e,t,n[1])};ot.splitNodes(e,{at:g,match:l,voids:s,always:!m(g)}),ot.splitNodes(e,{at:h,match:l,voids:s,always:!m(h)}),f=v.unref(),null==n.at&&ot.select(e,f)}for(var b=Array.from(Oe.nodes(e,{at:f,match:e.isInline(t)?function(t){return U.isElement(t)&&Oe.isBlock(e,t)}:function(e){return U.isEditor(e)},mode:"lowest",voids:s})),E=function(){var n=T(C[w],2)[1],r=Te.isRange(f)?P.intersection(f,Oe.range(e,n)):f;if(!r)return 0;var i=Array.from(Oe.nodes(e,{at:r,match:l,mode:o,voids:s}));if(i.length>0){var a=i[0],u=i[i.length-1],c=T(a,2)[1],d=T(u,2)[1];if(0===c.length&&0===d.length)return 0;var p=y.equals(c,d)?y.parent(c):y.common(c,d),h=Oe.range(e,c,d),g=Oe.node(e,p),v=T(g,1)[0],m=p.length+1,b=y.next(d.slice(0,m)),E=Fr(Fr({},t),{},{children:[]});ot.insertNodes(e,E,{at:b,voids:s}),ot.moveNodes(e,{at:h,match:function(e){return!U.isText(v)&&v.children.includes(e)},to:b.concat(0),voids:s})}},w=0,C=b;w<C.length;w++)E()}})};return hp.Editor=Oe,hp.Element=_,hp.Location=Te,hp.Node=U,hp.Operation=G,hp.Path=y,hp.PathRef=e,hp.Point=Fe,hp.PointRef=t,hp.Range=P,hp.RangeRef=n,hp.Scrubber=Pe,hp.Span=Ne,hp.Text=ze,hp.Transforms=ot,hp.above=yt,hp.addMark=wt,hp.after=xt,hp.apply=ft,hp.before=kt,hp.collapse=tr,hp.createEditor=function(){var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:function(){return!1},isInline:function(){return!1},isSelectable:function(){return!0},isVoid:function(){return!1},markableVoid:function(){return!1},onChange:function(){},apply:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ft.apply(void 0,[e].concat(n))},addMark:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return wt.apply(void 0,[e].concat(n))},deleteBackward:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ft.apply(void 0,[e].concat(n))},deleteForward:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return It.apply(void 0,[e].concat(n))},deleteFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Pt.apply(void 0,[e].concat(n))},getFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gt.apply(void 0,[e].concat(n))},insertBreak:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yt.apply(void 0,[e].concat(n))},insertSoftBreak:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Zt.apply(void 0,[e].concat(n))},insertFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return er.apply(void 0,[e].concat(n))},insertNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Xt.apply(void 0,[e].concat(n))},insertText:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Qt.apply(void 0,[e].concat(n))},normalizeNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vt.apply(void 0,[e].concat(n))},removeMark:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Mn.apply(void 0,[e].concat(n))},getDirtyPaths:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ht.apply(void 0,[e].concat(n))},shouldNormalize:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mt.apply(void 0,[e].concat(n))},above:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yt.apply(void 0,[e].concat(n))},after:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return xt.apply(void 0,[e].concat(n))},before:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return kt.apply(void 0,[e].concat(n))},collapse:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tr.apply(void 0,[e].concat(n))},delete:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Zn.apply(void 0,[e].concat(n))},deselect:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return nr.apply(void 0,[e].concat(n))},edges:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Rt.apply(void 0,[e].concat(n))},elementReadOnly:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Mt.apply(void 0,[e].concat(n))},end:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return jt.apply(void 0,[e].concat(n))},first:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ht.apply(void 0,[e].concat(n))},fragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return zt.apply(void 0,[e].concat(n))},getMarks:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return hn.apply(void 0,[e].concat(n))},hasBlocks:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wt.apply(void 0,[e].concat(n))},hasInlines:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Gt.apply(void 0,[e].concat(n))},hasPath:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qt.apply(void 0,[e].concat(n))},hasTexts:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kt.apply(void 0,[e].concat(n))},insertNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fr.apply(void 0,[e].concat(n))},isBlock:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return en.apply(void 0,[e].concat(n))},isEdge:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tn.apply(void 0,[e].concat(n))},isEmpty:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return nn.apply(void 0,[e].concat(n))},isEnd:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rn.apply(void 0,[e].concat(n))},isNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return on.apply(void 0,[e].concat(n))},isStart:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return an.apply(void 0,[e].concat(n))},last:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return un.apply(void 0,[e].concat(n))},leaf:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sn.apply(void 0,[e].concat(n))},levels:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fn.apply(void 0,[e].concat(n))},liftNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return dr.apply(void 0,[e].concat(n))},mergeNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vr.apply(void 0,[e].concat(n))},move:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rr.apply(void 0,[e].concat(n))},moveNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mr.apply(void 0,[e].concat(n))},next:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gn.apply(void 0,[e].concat(n))},node:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vn.apply(void 0,[e].concat(n))},nodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bn.apply(void 0,[e].concat(n))},normalize:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Cn.apply(void 0,[e].concat(n))},parent:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Dn.apply(void 0,[e].concat(n))},path:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return xn.apply(void 0,[e].concat(n))},pathRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return An.apply(void 0,[e].concat(n))},pathRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Sn.apply(void 0,[e].concat(n))},point:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Nn.apply(void 0,[e].concat(n))},pointRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return On.apply(void 0,[e].concat(n))},pointRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Tn.apply(void 0,[e].concat(n))},positions:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Fn.apply(void 0,[e].concat(n))},previous:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return In.apply(void 0,[e].concat(n))},range:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _n.apply(void 0,[e].concat(n))},rangeRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Pn.apply(void 0,[e].concat(n))},rangeRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Rn.apply(void 0,[e].concat(n))},removeNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return yr.apply(void 0,[e].concat(n))},select:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return or.apply(void 0,[e].concat(n))},setNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return wr.apply(void 0,[e].concat(n))},setNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return jn.apply(void 0,[e].concat(n))},setPoint:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ur.apply(void 0,[e].concat(n))},setSelection:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sr.apply(void 0,[e].concat(n))},splitNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ar.apply(void 0,[e].concat(n))},start:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hn.apply(void 0,[e].concat(n))},string:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Un.apply(void 0,[e].concat(n))},unhangRange:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Gn.apply(void 0,[e].concat(n))},unsetNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Or.apply(void 0,[e].concat(n))},unwrapNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Br.apply(void 0,[e].concat(n))},void:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vt.apply(void 0,[e].concat(n))},withoutNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qn.apply(void 0,[e].concat(n))},wrapNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ir.apply(void 0,[e].concat(n))},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kn.apply(void 0,[e].concat(n))}};return e},hp.deleteBackward=Ft,hp.deleteForward=It,hp.deleteFragment=Pt,hp.deleteText=Zn,hp.deselect=nr,hp.edges=Rt,hp.elementReadOnly=Mt,hp.end=jt,hp.first=Ht,hp.fragment=zt,hp.getDirtyPaths=ht,hp.getFragment=gt,hp.getVoid=Vt,hp.hasBlocks=Wt,hp.hasInlines=Gt,hp.hasPath=qt,hp.hasTexts=Kt,hp.insertBreak=Yt,hp.insertFragment=er,hp.insertNode=Xt,hp.insertNodes=fr,hp.insertSoftBreak=Zt,hp.insertText=Qt,hp.isBlock=en,hp.isEdge=tn,hp.isEditor=xe,hp.isEmpty=nn,hp.isEnd=rn,hp.isNormalizing=on,hp.isObject=q,hp.isStart=an,hp.last=un,hp.leaf=sn,hp.levels=fn,hp.liftNodes=dr,hp.marks=hn,hp.mergeNodes=vr,hp.move=rr,hp.moveNodes=mr,hp.next=gn,hp.node=vn,hp.nodes=bn,hp.normalize=Cn,hp.normalizeNode=vt,hp.parent=Dn,hp.path=xn,hp.pathRef=An,hp.pathRefs=Sn,hp.point=Nn,hp.pointRef=On,hp.pointRefs=Tn,hp.positions=Fn,hp.previous=In,hp.range=_n,hp.rangeRef=Pn,hp.rangeRefs=Rn,hp.removeMark=Mn,hp.removeNodes=yr,hp.select=or,hp.setNodes=wr,hp.setNormalizing=jn,hp.setPoint=ur,hp.setSelection=sr,hp.shouldMergeNodesRemovePrevNode=Kn,hp.shouldNormalize=mt,hp.splitNodes=Ar,hp.start=Hn,hp.string=Un,hp.unhangRange=Gn,hp.unsetNodes=Or,hp.unwrapNodes=Br,hp.withoutNormalizing=qn,hp.wrapNodes=Ir,hp}var vp,mp=gp(),yp={};function bp(){if(vp)return yp;vp=1;var e=gp(),t={isHistory:function(t){return e.isObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||e.Operation.isOperationList(t.redos[0].operations))&&(0===t.undos.length||e.Operation.isOperationList(t.undos[0].operations))}},n=new WeakMap,r=new WeakMap,o=new WeakMap,i=new WeakMap,a={isHistoryEditor:function(n){return t.isHistory(n.history)&&e.Editor.isEditor(n)},isMerging:function(e){return o.get(e)},isSplittingOnce:function(e){return i.get(e)},setSplittingOnce:function(e,t){i.set(e,t)},isSaving:function(e){return r.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=a.isMerging(e);o.set(e,!0),t(),o.set(e,n)},withNewBatch:function(e,t){var n=a.isMerging(e);o.set(e,!0),i.set(e,!0),t(),o.set(e,n),i.delete(e)},withoutMerging:function(e,t){var n=a.isMerging(e);o.set(e,!1),t(),o.set(e,n)},withoutSaving:function(e,t){var n=a.isSaving(e);r.set(e,!1);try{t()}finally{r.set(e,n)}}};function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(t,n){return!(!n||"insert_text"!==t.type||"insert_text"!==n.type||t.offset!==n.offset+n.text.length||!e.Path.equals(t.path,n.path))||!(!n||"remove_text"!==t.type||"remove_text"!==n.type||t.offset+t.text.length!==n.offset||!e.Path.equals(t.path,n.path))},c=function(e,t){return"set_selection"!==e.type};return yp.HISTORY=n,yp.History=t,yp.HistoryEditor=a,yp.MERGING=o,yp.SAVING=r,yp.SPLITTING_ONCE=i,yp.withHistory=function(t){var n=t,r=n.apply;return n.history={undos:[],redos:[]},n.redo=function(){var t=n.history,r=t.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&e.Transforms.setSelection(n,o.selectionBefore),a.withoutSaving(n,function(){e.Editor.withoutNormalizing(n,function(){var e,t=u(o.operations);try{for(t.s();!(e=t.n()).done;){var r=e.value;n.apply(r)}}catch(e){t.e(e)}finally{t.f()}})}),t.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var t=n.history,r=t.undos;if(r.length>0){var o=r[r.length-1];a.withoutSaving(n,function(){e.Editor.withoutNormalizing(n,function(){var t,r=u(o.operations.map(e.Operation.inverse).reverse());try{for(r.s();!(t=r.n()).done;){var i=t.value;n.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&e.Transforms.setSelection(n,o.selectionBefore)})}),n.writeHistory("redos",o),t.undos.pop()}},n.apply=function(e){var t=n.operations,o=n.history,i=o.undos,u=i[i.length-1],s=u&&u.operations[u.operations.length-1],f=a.isSaving(n),d=a.isMerging(n);if(null==f&&(f=c(e)),f){if(null==d&&(d=null!=u&&(!!t.includes(s)||l(e,s))),a.isSplittingOnce(n)&&(d=!1,a.setSplittingOnce(n,void 0)),u&&d)u.operations.push(e);else{var p={operations:[e],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},n.writeHistory=function(e,t){n.history[e].push(t)},n},yp}var Ep=bp(),wp=function(e,t){return wp=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])},wp(e,t)};function Cp(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}wp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Dp=function(){return Dp=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},Dp.apply(this,arguments)};function Ap(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function Sp(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function xp(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 Op(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 Tp(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 Np(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=xp(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var Bp,kp={exports:{}};var Fp,Ip,Pp=(Bp||(Bp=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",u="[object Function]",s="[object GeneratorFunction]",l="[object Map]",c="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",E="[object DataView]",w="[object Float32Array]",C="[object Float64Array]",D="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",N="[object Uint32Array]",B=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[o]=I["[object Array]"]=I[y]=I[E]=I[i]=I[a]=I[w]=I[C]=I[D]=I[A]=I[S]=I[l]=I[c]=I[f]=I[p]=I[h]=I[g]=I[v]=I[x]=I[O]=I[T]=I[N]=!0,I["[object Error]"]=I[u]=I[m]=!1;var P="object"==typeof b&&b&&b.Object===Object&&b,R="object"==typeof self&&self&&self.Object===Object&&self,_=P||R||Function("return this")(),L=t&&!t.nodeType&&t,M=L&&e&&!e.nodeType&&e,j=M&&M.exports===L;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=_["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?_.Buffer:void 0,re=_.Symbol,oe=_.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,ue=Y.propertyIsEnumerable,se=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,fe=W(Object.keys,Object),de=Le(_,"DataView"),pe=Le(_,"Map"),he=Le(_,"Promise"),ge=Le(_,"Set"),ve=Le(_,"WeakMap"),me=Le(Object,"create"),ye=$e(de),be=$e(pe),Ee=$e(he),we=$e(ge),Ce=$e(ve),De=re?re.prototype:void 0,Ae=De?De.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){this.__data__=new xe(e)}function Ne(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!ue.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,d,m,b){var k;if(r&&(k=m?r(e,d,m,b):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var P=je(e),R=P==u||P==s;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(P==f||P==o||R&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(R?{}:e),!t)return function(e,t){return Re(e,Me(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(k,e))}else{if(!I[P])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case y:return Pe(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case C:case D:case A:case S:case x:case O:case T:case N:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,B.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,P,Fe,t)}}b||(b=new Te);var _=b.get(e);if(_)return _;if(b.set(e,k),!F)var L=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(L||e,function(o,i){L&&(o=e[i=o]),Be(k,i,Fe(o,t,n,r,i,e,b))}),k}function Ie(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Pe(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Be(n,a,e[a])}return n}function _e(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ie(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():se.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return ke(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||xe),string:new Se}},Oe.prototype.delete=function(e){return _e(this,e).delete(e)},Oe.prototype.get=function(e){return _e(this,e).get(e)},Oe.prototype.has=function(e){return _e(this,e).has(e)},Oe.prototype.set=function(e,t){return _e(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new xe},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Oe(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(de&&je(new de(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=d||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==f?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return d;case we:return h;case Ce:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==u||t==s}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Ne(e):function(e){if(!ze(e))return fe(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(kp,kp.exports)),kp.exports),Rp=E(Pp);var _p=function(){if(Ip)return Fp;Ip=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,u,s=Object.prototype,l=s.hasOwnProperty,c=s.toString,f=s.propertyIsEnumerable,d=(a=Object.keys,u=Object,function(e){return a(u(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!f.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,w)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var u=i[++r];if(!1===t(o[u],u,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||s,t!==r)return d(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function w(e){return E(e)?p(e):m(e)}function C(e){return e}return Fp=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:C)}}(),Lp=E(_p),Mp=new Set(["base","embed","math","meta","object","script","svg","template"]),jp=new Set(["href","poster","src","xlink:href"]),Hp=["java","script:"].join("");function zp(e,t,n){var r=function(e){return Array.from(e).filter(function(e){return e>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Hp)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==t&&"xlink:href"!==t&&(("img"===e||"poster"===t)&&r.startsWith("data:image/")))}function $p(e){if(void 0===e&&(e=""),!e)return"";var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach(function(e){var t=e.tagName.toLowerCase();Mp.has(t)?e.remove():Array.from(e.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||jp.has(r)&&!zp(t,r,o))&&e.removeAttribute(n.name)})}),t.body.innerHTML}var Up={};var Vp="created",Wp="destroyed",Gp="change",qp="scroll",Kp="fullscreen",Yp="unFullScreen",Xp="modalOrPanelShow",Zp="modalOrPanelHide",Jp={};function Qp(e,t){var n=e.key,r=e.factory,o=e.config,i=Dp(Dp({},o),t||{});if(null!=Jp[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Jp[n]=r,function(e,t){null!=t&&(Up[e]=t)}(n,i)}var eh=new WeakMap,th=new WeakMap,nh=new WeakMap,rh=new WeakMap,oh=new WeakMap,ih=new WeakMap,ah=new WeakMap,uh=new WeakMap,sh=new WeakMap,lh=new WeakMap,ch=new WeakMap,fh=new WeakMap,dh=new WeakMap,ph=new WeakMap,hh=new WeakMap,gh=new WeakMap,vh=new WeakMap,mh=new WeakMap,yh=new WeakMap,bh=new WeakMap,Eh=new WeakMap,wh=new WeakMap,Ch=new WeakMap,Dh=new WeakMap,Ah=new WeakMap,Sh=new WeakMap,xh=new WeakMap,Oh=new WeakMap,Th=new WeakMap,Nh=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Jp)e.push(t);return e},t.getConfig=function(){var e=lh.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},Bh=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function kh(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Fh(e={},t={}){Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:kh(t[n])&&kh(e[n])&&Object.keys(t[n]).length>0&&Fh(e[n],t[n])})}const Ih={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Ph(){const e="undefined"!=typeof document?document:{};return Fh(e,Ih),e}const Rh={document:Ih,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function _h(){const e="undefined"!=typeof window?window:{};return Fh(e,Rh),e}class Lh extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function Mh(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Mh(e)):t.push(e)}),t}function jh(e,t){return Array.prototype.filter.call(e,t)}function Hh(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function zh(e,t){const n=_h(),r=Ph();let o=[];if(!t&&e instanceof Lh)return e;if(!e)return new Lh(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=r.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)o.push(t.childNodes[e])}else o=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof Lh)return e;o=e}return new Lh(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(o))}function $h(...e){const t=Mh(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function Uh(...e){const t=Mh(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function Vh(...e){const t=Mh(e.map(e=>e.split(" ")));return jh(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function Wh(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this}function Gh(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function qh(e,t){let n;if(void 0===t){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];const t=n.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)n=this[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this}function Kh(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const n in e.dataset)t[n]=e.dataset[n];else for(let n=0;n<e.attributes.length;n+=1){const r=e.attributes[n];r.name.indexOf("data-")>=0&&(t[Hh(r.name.split("data-")[1])]=r.value)}for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function Yh(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n<e.selectedOptions.length;n+=1)t.push(e.selectedOptions[n].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const n=this[t];if(Array.isArray(e)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let t=0;t<n.options.length;t+=1)n.options[t].selected=e.indexOf(n.options[t].value)>=0;else n.value=e}return this}function Xh(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),zh(t).is(n))r.apply(t,o);else{const e=zh(t).parents();for(let t=0;t<e.length;t+=1)zh(e[t]).is(n)&&r.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const u=t.split(" ");let s;for(let e=0;e<this.length;e+=1){const t=this[e];if(n)for(s=0;s<u.length;s+=1){const e=u[s];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:i}),t.addEventListener(e,i,o)}else for(s=0;s<u.length;s+=1){const e=u[s];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function Zh(...e){let[t,n,r,o]=e;"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const i=t.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const i=this[e];let a;if(!n&&i.dom7Listeners?a=i.dom7Listeners[t]:n&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function Jh(){const e=_h();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Qh(){const e=_h();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function eg(){if(this.length>0){const e=_h(),t=Ph(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,u=n===e?e.scrollY:n.scrollTop,s=n===e?e.scrollX:n.scrollLeft;return{top:r.top+u-i,left:r.left+s-a}}return null}function tg(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function ng(){const e=_h();for(let t=0;t<this.length;t+=1){const n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function rg(e,t){const n=_h();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function og(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this}function ig(e){return zh(jh(this,e))}function ag(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function ug(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function sg(e){const t=_h(),n=Ph(),r=this[0];let o,i;if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(o=zh(e),i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof Lh){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}return!1}function lg(...e){let t;const n=Ph();for(let r=0;r<e.length;r+=1){t=e[r];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const r=n.createElement("div");for(r.innerHTML=t;r.firstChild;)this[e].appendChild(r.firstChild)}else if(t instanceof Lh)for(let n=0;n<t.length;n+=1)this[e].appendChild(t[n]);else this[e].appendChild(t)}return this}function cg(e){const t=Ph();let n,r;for(n=0;n<this.length;n+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,r=o.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof Lh)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function fg(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?zh(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return zh(t)}function dg(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?zh(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return zh(t)}function pg(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return zh(t)}function hg(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!zh(r[n]).is(e)||t.push(r[n])}return zh(t)}function gg(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function vg(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this}zh.fn=Lh.prototype;const mg="resize scroll".split(" ");function yg(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)mg.indexOf(e)<0&&(e in this[t]?this[t][e]():zh(this[t]).trigger(e));return this}return this.on(e,...t)}}const bg=yg("click"),Eg=yg("focus"),wg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Cg=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Dg(e){Promise.resolve().then(e)}function Ag(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}var Sg,xg=function(e){return Object.prototype.toString.call(e)},Og=globalThis.Node;rg&&(zh.fn.css=rg),lg&&(zh.fn.append=lg),$h&&(zh.fn.addClass=$h),Uh&&(zh.fn.removeClass=Uh),Vh&&(zh.fn.hasClass=Vh),Xh&&(zh.fn.on=Xh),Eg&&(zh.fn.focus=Eg),Wh&&(zh.fn.attr=Wh),Gh&&(zh.fn.removeAttr=Gh),tg&&(zh.fn.hide=tg),ng&&(zh.fn.show=ng),eg&&(zh.fn.offset=eg),Jh&&(zh.fn.width=Jh),Qh&&(zh.fn.height=Qh),fg&&(zh.fn.parent=fg),dg&&(zh.fn.parents=dg),sg&&(zh.fn.is=sg),Kh&&(zh.fn.dataset=Kh),Yh&&(zh.fn.val=Yh),ug&&(zh.fn.text=ug),ag&&(zh.fn.html=ag),hg&&(zh.fn.children=hg),gg&&(zh.fn.remove=gg),pg&&(zh.fn.find=pg),og&&(zh.fn.each=og),vg&&(zh.fn.empty=vg),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"}(Sg||(Sg={}));var Tg=/\[object HTML([A-Z][a-z]*)*Element\]/,Ng=function(e){return Tg.test(xg(e))},Bg=function(e){return null!=e&&"number"==typeof e.nodeType},kg=function(e){return Bg(e)&&e.nodeType===Sg.COMMENT_NODE},Fg=function(e){return Bg(e)&&e.nodeType===Sg.ELEMENT_NODE},Ig=function(e){return"[object Selection]"===xg(e)},Pg=function(e){return Bg(e)&&e.nodeType===Sg.TEXT_NODE},Rg=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},_g=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,u=!1;(kg(o)||Fg(o)&&0===o.childNodes.length||Fg(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!u);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(u=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},Lg=function(e,t,n){return Op(_g(e,t,n),1)[0]},Mg=function(e){var t,n,r="";if(Pg(e)&&e.nodeValue)return e.nodeValue;if(Fg(e)){try{for(var o=xp(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Mg(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var u=getComputedStyle(e).getPropertyValue("display");"block"!==u&&"list"!==u&&"table-row"!==u&&"BR"!==e.tagName||(r+="\n")}return r};function jg(e,t){if(!Ng(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;Pg(o)?t(o,e):[Sg.ELEMENT_NODE,Sg.DOCUMENT_NODE,Sg.DOCUMENT_FRAGMENT_NODE].includes(i)&&jg(o,t)}}function Hg(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Sg.ELEMENT_NODE?"":t.tagName.toLowerCase()}var zg=new RegExp(String.fromCharCode(160),"g");function $g(e){return e.replace(zg," ")}var Ug=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Vg=[];var Wg=[];var Gg={};function qg(e,t){var n=e.length;if(n){var r=e[n-1];if(mp.Text.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function Kg(e,t,n){return{type:"paragraph",children:[{text:zh(e).text().replace(/\s+/gm," ")}]}}function Yg(e,t){var n=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(Fg(e)){if("BR"===e.nodeName)return void(qg(n,"\n")||n.push({text:"\n"}));var r=ev(zh(e),t);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}else if(Pg(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=$g(o),qg(n,o)||n.push({text:o}))}}),n)}(e,t),r=function(e){for(var t in Gg)if(e[0].matches(t))return Gg[t];return Kg}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach(function(r){mp.Editor.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),Wg.forEach(function(n){r=n(e[0],r,t)}))}),o}function Xg(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var n=e[0].textContent||"",r={text:n=$g(n=Ag(n))};return Wg.forEach(function(n){r=n(e[0],r,t)}),r}function Zg(e,t){var n={text:""};return Wg.forEach(function(r){n=r(e[0],n,t)}),n}function Jg(e,t){var n=t.parentElement;return null==n?e:(null==n.closest("pre")&&(e=e.replace(/[\r\n\t]+/g,"")),e=$g(e=Ag(e)))}function Qg(e,t,n){var r=e[0];if(Fg(r)){var o=ev(e,n);return delete t.text,Array.isArray(o)?o.map(function(e){return Dp(Dp({},t),e)}):[Dp(Dp({},t),o)]}if(kg(r))return null;var i=Pg(r)?{text:Jg(r.textContent||"",r)}:Xg(e,n);return[Dp(Dp({},t),i)]}function ev(e,t){Vg.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=zh(r(e[0])))});var n=Hg(e);if("span"===n){if(e.attr("data-w-e-type"))return Yg(e,t);if((o=Array.from(e[0].childNodes)).some(function(e){return!Pg(e)&&!kg(e)})){var r=Zg(zh(e[0]),t);return o.flatMap(function(e){return Qg(zh(e),r,t)||[]})}return Xg(e,t)}if("code"===n)return"pre"===Hg(e.parent())?Yg(e,t):Xg(e,t);if(Ug.includes(n)){var o;if((o=Array.from(e[0].childNodes)).some(function(e){return!Pg(e)&&!kg(e)})){var i=Zg(zh(e[0]),t);return o.flatMap(function(e){return Qg(zh(e),i,t)||[]})}return Xg(e,t)}return Yg(e,t)}function tv(e,t,n){var r=zh(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(Wp,function(){r.removeAttr(t)}),!1)}function nv(e,t){void 0===t&&(t="");var n=[],r=e.getConfig().sanitizeHtml;""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join("")),t=r?r(t):t;var o=zh("<div>".concat(t,"</div>"));return Array.from(o.children()).forEach(function(t){var r=ev(zh(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}function rv(e,t){return"w-e-element-".concat(e,"-").concat(t)}var ov=[];var iv,av,uv={};function sv(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function lv(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=mp.Editor.isVoid(t,e),u="";a||(u=i.map(function(e){return Av(e,t)}).join(""));var s=function(e){return uv[e]||sv}(r),l=s(e,u,t),c="";if(c="string"==typeof l?l:l.html||"",a||ov.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var f=l.prefix,d=void 0===f?"":f,p=l.suffix,h=void 0===p?"":p;return d&&(c=d+c),h&&(c+=h),c}var cv=function(){if(av)return iv;av=1;var e=9007199254740991,t="[object Arguments]",n="[object Map]",r="[object Promise]",o="[object Set]",i="[object WeakMap]",a="[object DataView]",u=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,l="\\ud800-\\udfff",c="\\u0300-\\u036f\\ufe20-\\ufe23",f="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",p="["+l+"]",h="["+c+f+"]",g="\\ud83c[\\udffb-\\udfff]",v="[^"+l+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",w="(?:"+h+"|"+g+")"+"?",C="["+d+"]?",D=C+w+("(?:"+E+"(?:"+[v,m,y].join("|")+")"+C+w+")*"),A="(?:"+[v+h+"?",h,m,y,p].join("|")+")",S=RegExp(g+"(?="+g+")|"+A+D,"g"),x=RegExp("["+E+l+c+f+d+"]"),O="object"==typeof b&&b&&b.Object===Object&&b,T="object"==typeof self&&self&&self.Object===Object&&self,N=O||T||Function("return this")();function B(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,function(t){return e[t]})}function k(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function F(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function I(e){return function(e){return x.test(e)}(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var P,R,_=Function.prototype,L=Object.prototype,M=N["__core-js_shared__"],j=function(){var e=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),H=_.toString,z=L.hasOwnProperty,$=L.toString,U=RegExp("^"+H.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=N.Symbol,W=V?V.iterator:void 0,G=L.propertyIsEnumerable,q=(P=Object.keys,R=Object,function(e){return P(R(e))}),K=ue(N,"DataView"),Y=ue(N,"Map"),X=ue(N,"Promise"),Z=ue(N,"Set"),J=ue(N,"WeakMap"),Q=ce(K),ee=ce(Y),te=ce(X),ne=ce(Z),re=ce(J);function oe(e,n){var r=fe(e)||function(e){return function(e){return ge(e)&&de(e)}(e)&&z.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!z.call(e,a)||i&&("length"==a||le(a,o))||r.push(a);return r}function ie(e){if(!he(e)||function(e){return!!j&&j in e}(e))return!1;var t=pe(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?U:u;return t.test(ce(e))}function ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||L,t!==r)return q(e);var t,n,r,o=[];for(var i in Object(e))z.call(e,i)&&"constructor"!=i&&o.push(i);return o}function ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(n)?n:void 0}var se=function(e){return $.call(e)};function le(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||s.test(t))&&t>-1&&t%1==0&&t<n}function ce(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(K&&se(new K(new ArrayBuffer(1)))!=a||Y&&se(new Y)!=n||X&&se(X.resolve())!=r||Z&&se(new Z)!=o||J&&se(new J)!=i)&&(se=function(e){var t=$.call(e),u="[object Object]"==t?e.constructor:void 0,s=u?ce(u):void 0;if(s)switch(s){case Q:return a;case ee:return n;case te:return r;case ne:return o;case re:return i}return t});var fe=Array.isArray;function de(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!pe(t)}function pe(e){var t=he(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function he(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function ve(e){return e?B(e,function(e){return de(e)?oe(e):ae(e)}(e)):[]}return iv=function(e){if(!e)return[];if(de(e))return function(e){return"string"==typeof e||!fe(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?I(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(W&&e[W])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[W]());var t=se(e);return(t==n?k:t==o?F:ve)(e)},iv}(),fv=E(cv),dv=0,pv=function(){this.id="".concat(dv++)},hv="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),gv="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),vv="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),mv="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),yv="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),bv="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Ev=!yv&&!mv&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,wv=function(e,t){return Boolean(e.compareDocumentPosition(t)&Og.DOCUMENT_POSITION_PRECEDING)},Cv=function(e,t){return Boolean(e.compareDocumentPosition(t)&Og.DOCUMENT_POSITION_FOLLOWING)},Dv={getWindow:function(e){var t=Ch.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=wh.get(t);return n||(n=new pv,wh.set(t,n)),n},setNewKey:function(e){var t=new pv;wh.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=vh.get(r);if(null==o){if(mp.Editor.isEditor(r))return n;break}var i=gh.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=Dv.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==xg(n)&&!function(e){return"[object ShadowRoot]"===xg(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return vh.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=Dv.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[Dv.findPath(e,t)[0]];return mp.Node.get(e,n)},toDOMNode:function(e,t){var n;if(mp.Editor.isEditor(t))n=mh.get(e);else{var r=Dv.findKey(e,t);n=bh.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Dv.toDOMNode(e,e);try{r=Fg(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.closest('[contenteditable="false"]')===a||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=mp.Range.isBackward(t),i=Dv.toDOMPoint(e,n),a=mp.Range.isCollapsed(t)?i:Dv.toDOMPoint(e,r),u=Dv.getWindow(e).document.createRange(),s=Op(o?a:i,2),l=s[0],c=s[1],f=Op(o?i:a,2),d=f[0],p=f[1],h=!!(Fg(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(Fg(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(l,h?1:c),u.setEnd(d,g?1:p),u},toDOMPoint:function(e,t){var n,r,o,i=Op(mp.Editor.node(e,t.path),1)[0],a=Dv.toDOMNode(e,i);mp.Editor.void(e,{at:t})&&(t={path:t.path,offset:0});var u=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var l=xp(u),c=l.next();!c.done;c=l.next()){var f=c.value,d=f.childNodes[0];if(null!=d&&null!=d.textContent){var p=d.textContent.length,h=f.getAttribute("data-slate-length"),g=s+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[d,Math.min(p,Math.max(0,t.offset-s))];break}s=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=Fg(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?yh.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=Dv.toSlateNode(e,t.target),u=Dv.findPath(e,a);if(mp.Element.isElement(a)&&mp.Editor.isVoid(e,a)){var s=o.getBoundingClientRect(),l=e.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,c=mp.Editor.point(e,u,{edge:l?"start":"end"}),f=l?mp.Editor.before(e,c):mp.Editor.after(e,c);if(f)return mp.Editor.range(e,f)}var d=this.getWindow(e).document;if(d.caretRangeFromPoint)i=d.caretRangeFromPoint(n,r);else{var p=d.caretPositionFromPoint(n,r);p&&((i=d.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return Dv.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,u,s=n.exactMatch,l=n.suppressThrow;if((Ig(t)?t.anchorNode:t.startContainer)&&(Ig(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,u=bv&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,u=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=Dv.toSlatePoint(e,[r,o],{exactMatch:s,suppressThrow:l});if(!c)return null;var f=u?c:Dv.toSlatePoint(e,[i,a],{exactMatch:s,suppressThrow:l,searchDirection:wv(r,i)||r===i&&a<o?"forward":"backward"});if(!f)return null;var d={anchor:c,focus:f};return mp.Range.isExpanded(d)&&mp.Range.isForward(d)&&Fg(i)&&mp.Editor.void(e,{at:d.focus,mode:"highest"})&&(d=mp.Editor.unhangRange(e,d,{voids:!0})),d},toSlatePoint:function(e,t,n){var r,o,i,a=n.exactMatch,u=n.suppressThrow,s=Op(a?t:function(e){var t,n=Op(e,2),r=n[0],o=n[1];if(Fg(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=Op(_g(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Fg(r)&&r.childNodes.length;){var u=i?r.childNodes.length-1:0;r=Lg(r,u,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),l=s[0],c=s[1],f=l.parentNode,d=n.searchDirection,p=null,h=0;if(f){var g=Dv.toDOMNode(e,e),v=f.closest('[data-slate-void="true"]'),m=v&&g.contains(v)?v:null,y=f.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,E=f.closest("[data-slate-leaf]"),w=null,C=Dv.getWindow(e);if(E&&C.document.createRange){p=E.closest('[data-slate-node="text"]');var D=C.document.createRange();D.setStart(p,0),D.setEnd(l,c);var A=D.cloneContents();Tp(Tp([],Op(fv(A.querySelectorAll("[data-slate-zero-width]"))),!1),Op(fv(A.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),h=A.textContent.length,w=p}else if(m)(E=Array.from(m.querySelectorAll("[data-slate-leaf]")).find(function(t){return Dv.hasDOMNode(e,t)})||null)?(p=E.closest('[data-slate-node="text"]'),h=(w=E).textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(function(e){h-=e.textContent.length})):h=1;else if(b){var S=function(t){return t?Array.from(t.querySelectorAll("[data-slate-leaf]")).filter(function(t){return Dv.hasDOMNode(e,t)}):[]},x=b.closest('[data-slate-node="element"]');if("backward"===d||!d)for(var O=(N=Tp(Tp([],Op(S(null==x?void 0:x.previousElementSibling)),!1),Op(S(x)),!1)).length-1;O>=0;O-=1){var T=N[O];if(wv(b,T)){E=T,d="backward";break}}if(!(E||"forward"!==d&&d)){var N=Tp(Tp([],Op(S(x)),!1),Op(S(null==x?void 0:x.nextElementSibling)),!1);try{for(var B=xp(N),k=B.next();!k.done;k=B.next()){T=k.value;if(Cv(b,T)){E=T,d="forward";break}}}catch(e){r={error:e}}finally{try{k&&!k.done&&(o=B.return)&&o.call(B)}finally{if(r)throw r.error}}}E&&(p=E.closest('[data-slate-node="text"]'),w=E,"forward"===d?h=0:(h=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(function(e){h-=e.textContent.length})))}w&&h===w.textContent.length&&(f.hasAttribute("data-slate-zero-width")||gv&&(null===(i=w.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(h-=1)}if(!p){if(u)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var F,I=Dv.toSlateNode(e,p);try{F=Dv.findPath(e,I)}catch(e){if(u)return null;throw e}return{path:F,offset:h}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return mp.Editor.hasPath(e,n.path)&&mp.Editor.hasPath(e,r.path)},getNodeType:function(e){return mp.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return mp.Node.string(e)}).join("")},getSelectedElems:function(e){var t,n,r=[],o=mp.Editor.nodes(e,{universal:!0});try{for(var i=xp(o),a=i.next();!a.done;a=i.next()){var u=Op(a.value,1)[0];mp.Element.isElement(u)&&r.push(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Op(mp.Editor.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Op(mp.Editor.nodes(e,{match:function(e){return mp.Text.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=Op(mp.Editor.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&Op(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(mp.Editor.isEnd(e,n.anchor,t)||mp.Editor.isEnd(e,n.focus,t))},getTextarea:function(e){var t=eh.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return rh.get(e)||null},getHoverbar:function(e){return ih.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 t,n,r,o,i=Dv.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var u=xp(Array.from(a)),s=u.next();!s.done;s=u.next()){var l=s.value;if(!Pg(l))break;l.remove()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}var c=mp.Editor.nodes(e,{match:function(t){return!(!mp.Element.isElement(t)||e.isInline(t))},universal:!0});try{for(var f=xp(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(null!=p){var h=p[0];jg(Dv.toDOMNode(e,h),function(e,t){var n=zh(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.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 t,n,r=mp.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=xp(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(mp.Range.isExpanded(t))return!1;var n=Dv.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=mp.Editor.node(e,t);if(null==n)return!1;var r=Op(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function Av(e,t){return mp.Element.isElement(e)?lv(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," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=Dv.getParentsNodes(t,e).some(function(e){return"pre"===Dv.getNodeType(e)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=Dv.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return ov.forEach(function(t){return r=t(e,r)}),r}(e,t)}var Sv=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},xv=function(e,t,n){var r=Dv.toDOMRange(e,t).getBoundingClientRect(),o=Dv.toDOMRange(e,n).getBoundingClientRect();return Sv(r,o)&&Sv(o,r)},Ov=function(e,t){var n,r,o=[];try{for(var i=xp(mp.Editor.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var u=Op(a.value,2),s=u[0],l=u[1],c=Dv.findKey(e,s);o.push([l,c])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o};function Tv(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):mp.Transforms.insertNodes(e,t,{mode:"highest"})}var Nv,Bv,kv,Fv,Iv,Pv,Rv,_v,Lv,Mv,jv,Hv,zv,$v,Uv,Vv,Wv,Gv,qv,Kv,Yv,Xv,Zv,Jv,Qv,em,tm,nm,rm,om,im,am,um,sm,lm,cm,fm,dm,pm,hm,gm=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward,a=t.deleteFragment;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,u,s,l,c,f=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":f.push.apply(f,Tp([],Op(Ov(t,e.path)),!1));break;case"insert_node":case"remove_node":f.push.apply(f,Tp([],Op(Ov(t,mp.Path.parent(e.path))),!1));break;case"merge_node":var d=mp.Path.previous(e.path);f.push.apply(f,Tp([],Op(Ov(t,d)),!1));break;case"move_node":var p=mp.Path.common(mp.Path.parent(e.path),mp.Path.parent(e.newPath));f.push.apply(f,Tp([],Op(Ov(t,p)),!1));break;case"set_selection":(null===(a=null===(i=e.newProperties)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.path)&&(f.push.apply(f,Tp([],Op(Ov(t,null===(s=null===(u=e.newProperties)||void 0===u?void 0:u.focus)||void 0===s?void 0:s.path)),!1)),f.push.apply(f,Tp([],Op(Ov(t,null===(c=null===(l=e.properties)||void 0===l?void 0:l.focus)||void 0===c?void 0:c.path)),!1)))}o(e);try{for(var h=xp(f),g=h.next();!g.done;g=h.next()){var v=Op(g.value,2),m=v[0],y=v[1],b=Op(mp.Editor.node(t,m),1)[0];wh.set(b,y),"type"in b&&(ph.has(b)&&ph.delete(b),hh.has(b)&&hh.delete(b))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&mp.Range.isCollapsed(e.selection)){var r=mp.Editor.above(e,{match:function(t){return mp.Element.isElement(t)&&mp.Editor.isBlock(e,t)},at:e.selection});if(r){var o=Op(r,2)[1],a=mp.Editor.range(e,o,e.selection.anchor),u=function(e,t){var n=mp.Editor.range(e,mp.Range.end(t)),r=Array.from(mp.Editor.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(xv(e,mp.Editor.range(e,r[o]),n))return mp.Editor.range(e,r[o],n);if(r.length<2)return mp.Editor.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)xv(e,mp.Editor.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return mp.Editor.range(e,r[i],n)}(t,a);mp.Range.isCollapsed(u)||mp.Transforms.delete(e,{at:u})}}},t.deleteFragment=function(e){var n=function(e){var t=e.selection;if(null==t||mp.Range.isCollapsed(t))return!1;var n=Op(mp.Range.edges(t),2),r=n[0],o=n[1],i=Op(mp.Editor.edges(e,[]),2),a=i[0],u=i[1];return mp.Point.equals(r,a)&&mp.Point.equals(o,u)}(t);a(e),n&&(!function(e){var t=[{type:"paragraph",children:[{text:""}]}];mp.Editor.withoutNormalizing(e,function(){for(var n=e.children.length-1;n>=0;n-=1)mp.Transforms.removeNodes(e,{at:[n]});mp.Transforms.insertNodes(e,t,{at:[0]})})}(t),t.children.length>0&&mp.Transforms.select(t,mp.Editor.start(t,[])))},t.onChange=function(){var e=t.selection;null!=e&&Ah.set(t,e),t.emit(Gp),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,n=void 0===e?[]:e,r=t.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return n.map(function(e){var n=Dv.getNodeType(e);if(o.includes(n))return Av(e,t);var r=hh.get(e);if(r)return r;var i=Av(e,t);return hh.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return mp.Node.string(e)}).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":mp.Editor.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=mp.Editor.nodes(t,{at:[],universal:!0});try{for(var u=xp(a),s=u.next();!s.done;s=u.next()){var l=Op(s.value,1)[0];if(mp.Element.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=Dv.findKey(t,l),f=rv(l.type,c.id);i.push(Dp(Dp({},l),{id:f}))}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!mp.Element.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||mp.Text.isText(a)&&""===a.text},t.clear=function(){mp.Transforms.delete(t,{at:{anchor:mp.Editor.start(t,[]),focus:mp.Editor.end(t,[])}}),0!==t.children.length?function(e){var t=e.children[0];if(1===e.children.length&&mp.Element.isElement(t)&&("paragraph"!==t.type||""!==mp.Node.string(t))&&""===mp.Node.string(t)){var n=[{type:"paragraph",children:[{text:""}]}];mp.Editor.withoutNormalizing(e,function(){mp.Transforms.removeNodes(e,{at:[0]}),mp.Transforms.insertNodes(e,n,{at:[0]})})}}(t):mp.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return Dv.getParentNode(t,e)},t.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(e){var t=e.nodeName;return!!Pg(e)||!!Fg(e)&&!Bh.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(Dv.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var u=0;o.forEach(function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Pg(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var s=e,l=!1;if(Ug.includes(r.toLowerCase()))l=!0;else for(var c in Gg)if(s.matches(c)){l=!0;break}if(l){var f=ev(zh(s),t);return Array.isArray(f)?(f.forEach(function(e){return Tv(t,e)}),u+=1):(Tv(t,f),u+=1),void(Dv.isSelectedVoidNode(t)&&t.move(1))}var d=window.getComputedStyle(s).display;if(!Dv.isSelectedEmptyParagraph(t)&&d.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(s.innerHTML,!0)}else t.insertText("\n")}),u&&a&&Dv.isEmptyPath(t,a)&&mp.Transforms.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=nv(t,null==e?"":e);if(mp.Transforms.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(mp.Editor.start(t,[]))}},t},vm=1,mm=function(e){var t=e;return t.id="wangEditor-".concat(vm),vm+=1,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(Dv.toDOMNode(t,t).focus({preventScroll:!0}),Dh.set(t,!0),e){var n=mp.Editor.end(t,[]);mp.Transforms.select(t,n)}else{var r=Ah.get(t);r?mp.Transforms.select(t,r):mp.Transforms.select(t,mp.Editor.start(t,[]))}},t.isFocused=function(){return!!Dh.get(t)},t.blur=function(){Dv.toDOMNode(t,t).blur(),mp.Transforms.deselect(t),Dh.set(t,!1)},t.updateView=function(){Dv.getTextarea(t).changeViewState();var e=Dv.getToolbar(t);e&&e.changeToolbarState();var n=Dv.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=Dv.getTextarea(t);e.destroy(),eh.delete(t),th.delete(e);var n=Dv.getToolbar(t);n&&(n.destroy(),rh.delete(t),nh.delete(n));var r=Dv.getHoverbar(t);r&&(r.destroy(),ih.delete(t),oh.delete(r)),t.isDestroyed=!0,t.emit(Wp)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=zh("#".concat(e));if(0!==r.length){var o=r[0];if(!Dv.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=Dv.getTextarea(t),a=i.$textAreaContainer,u=i.$scroll,s=r.offset().top,l=a.offset().top;u[0].scrollBy({top:s-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||Dv.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=uh.get(t);null!=e&&e.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return Dv.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=Dv.getToolbar(t);n&&(e=n.$box);var r=Dv.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit(Kp)}},t.unFullScreen=function(){if(t.isFullScreen){var e=Dv.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit(Yp)},200)}},t.getEditableContainer=function(){return Dv.getTextarea(t).$textAreaContainer[0]},t},ym={exports:{}},bm={exports:{}};function Em(){if(Bv)return Nv;Bv=1;return Nv=function(e){return null!=e}}function wm(){if(Pv)return Iv;Pv=1;var e=function(){if(Fv)return kv;Fv=1;var e=Em(),t={object:!0,function:!0,undefined:!0};return kv=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Iv=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function Cm(){if(Mv)return Lv;Mv=1;var e=function(){if(_v)return Rv;_v=1;var e=wm();return Rv=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 Lv=function(r){return!!e(r)&&!t.test(n.call(r))}}function Dm(){if(Gv)return Wv;Gv=1;var e=(Vv?Uv:(Vv=1,Uv=function(){}))();return Wv=function(t){return t!==e&&null!==t},Wv}function Am(){return Xv||(Xv=1,Yv=($v?zv:($v=1,zv=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(Kv)return qv;Kv=1;var e=Dm(),t=Object.keys;return qv=function(n){return t(e(n)?Object(n):n)}}()),Yv}function Sm(){if(em)return Qv;em=1;var e=Am(),t=function(){if(Jv)return Zv;Jv=1;var e=Dm();return Zv=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return Qv=function(r,o){var i,a,u,s=n(arguments.length,2);for(r=Object(t(r)),u=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<s;++a)e(o=arguments[a]).forEach(u);if(void 0!==i)throw i;return r},Qv}function xm(){return nm?tm:(nm=1,tm=(Hv||(Hv=1,jv=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")}),jv)()?Object.assign:Sm())}function Om(){return cm||(cm=1,lm=function(){if(am)return im;am=1;var e="razdwatrzy";return im=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(sm)return um;sm=1;var e=String.prototype.indexOf;return um=function(t){return e.call(this,t,arguments[1])>-1},um}()),lm}function Tm(){if(fm)return bm.exports;fm=1;var e=Em(),t=Cm(),n=xm(),r=function(){if(om)return rm;om=1;var e=Dm(),t=Array.prototype.forEach,n=Object.create;return rm=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},rm}(),o=Om(),i=bm.exports=function(t,i){var a,u,s,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"),u=o.call(t,"e"),s=o.call(t,"w")):(a=s=!0,u=!1),c={value:i,configurable:a,enumerable:u,writable:s},l?n(r(l),c):c};return i.gs=function(i,a,u){var s,l,c,f;return"string"!=typeof i?(c=u,u=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(u)?t(u)||(c=u,u=void 0):u=void 0:(c=a,a=u=void 0):a=void 0,e(i)?(s=o.call(i,"c"),l=o.call(i,"e")):(s=!0,l=!1),f={get:a,set:u,configurable:s,enumerable:l},c?n(r(c),f):f},bm.exports}var Nm=(hm||(hm=1,function(e,t){var n,r,o,i,a,u,s,l=Tm(),c=pm?dm:(pm=1,dm=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),f=Function.prototype.apply,d=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(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},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},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},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,once:r,off:o,emit:i},u={on:l(n),once:l(r),off:l(o),emit:l(i)},s=g({},u),e.exports=t=function(e){return null==e?p(s):g(Object(e),u)},t.methods=a}(ym,ym.exports)),ym.exports),Bm=E(Nm);function km(e){var t=Sh.get(e);return null==t&&(t=Bm(),Sh.set(e,t)),t}var Fm=new WeakMap;function Im(e,t){var n=Fm.get(e);null==n&&(n=new Set,Fm.set(e,n)),n.add(t)}var Pm=function(e){var t=e;return t.on=function(e,n){var r=km(t);if(r.on(e,n),"destroyed"===e&&Im(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Im(t,o)}},t.once=function(e,n){km(t).once(e,n)},t.off=function(e,n){km(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=km(t);if(o.emit.apply(o,Tp([e],Op(n),!1)),"destroyed"===e){var i=function(e){return Fm.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){Fm.set(e,new Set)}(t)}},t};var Rm=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=Op(mp.Range.edges(n),2),o=r[0],i=r[1],a=mp.Editor.void(t,{at:o.path}),u=mp.Editor.void(t,{at:i.path});if(!mp.Range.isCollapsed(n)||a){var s=Dv.toDOMRange(t,n),l=s.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),u){var f=Op(u,1)[0],d=s.cloneRange(),p=Dv.toDOMNode(t,f);d.setEndAfter(p),l=d.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),Pg(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Mg(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var n=e.getData("application/x-slate-fragment");if(n){var r=decodeURIComponent(window.atob(n)),o=JSON.parse(r);t.insertFragment(o)}else{var i=e.getData("text/plain"),a=e.getData("text/html");if(a){var u=t.getConfig().sanitizeHtml;t.dangerouslyInsertHtml(u?u(a):a)}else if(i){if(!/[\r\n]/.test(i))return void t.insertText(i);var s=function(e){return e.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}})}(i);t.insertFragment(s)}}},t};function _m(e){return e.replace(/\n\r|\r\n|\r|\n/g,"").length}function Lm(e,t){var n,r;if(t<=0)return"";var o=t,i="";try{for(var a=xp(e),u=a.next();!u.done;u=a.next()){var s=u.value;if(/\r|\n/.test(s))i+=s;else{if(o<=0)break;i+=s,o-=1}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}var Mm=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=Dv.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=Dv.getLeftLengthOfMaxLength(t);if(!(n<=0))n<mp.Node.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(Dv.getLeftLengthOfMaxLength(t)<mp.Node.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=Dv.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=function(e,t){if(t<=0)return"";var n=document.createElement("div");n.innerHTML=e;var r=function(e){e.forEach(function(e){return e.remove()})},o=function(e){for(var n=Array.from(e.childNodes),i=0;i<n.length;i+=1){var a=n[i];if(Pg(a)){var u=a.textContent||"",s=_m(u);if(s<=t){t-=s;continue}return a.textContent=Lm(u,t),t=0,r(n.slice(i+1)),!1}if(Fg(a)){if(Bh.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return r(n.slice(i+1)),!1}else a.remove()}return t>0};return o(n),n.innerHTML}(e,r);o&&i(o,n)}}else i(e,n)},t};function jm(e){var t=Dv.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Hm(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=jm(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,u=r.height,s=Dv.toDOMRange(e,n).getClientRects(),l=s?s[0]:null;if(null==l)return t;var c={},f=l.top-o,d=l.left-i;if(d>a/2){var p=a-d;c.right="".concat(p+5,"px")}else c.left="".concat(d+5,"px");if(f>u/2){var h=u-f;c.bottom="".concat(h+5,"px")}else{var g=s[s.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function zm(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=mp.Element.isElement(t)&&e.isVoid(t),i=mp.Element.isElement(t)&&e.isInline(t),a=Eh.get(t);if(null==a)return r;var u=a.getBoundingClientRect(),s=u.top,l=u.left,c=u.height,f=u.width;if(o){var d=function(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===Sg.ELEMENT_NODE){var i=o.toLowerCase();if(wg.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],u=a.length;if(u)for(var s=u-1;s>=0;s-=1)t.push(a[s])}}return null}(a);if(null!=d){var p=d.getBoundingClientRect();s=p.top,c=p.height}}var h=jm(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=s-g,w=l-v;if("bar"===n)return b.left="".concat(w,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?w>(m-f)/2?b.right="".concat(m-w+5,"px"):b.left="".concat(w+f+5,"px"):b.left="20px":b.left="".concat(w,"px"),o)(C=E)<0&&(C=0),b.top="".concat(C,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var C;(C=E+c)<0&&(C=0),b.top="".concat(C+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function $m(e,t){Dg(function(){var n=jm(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,u=n.height,s=t.offset(),l=s.top,c=s.left,f=t.width(),d=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+d-u)>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=h+f-a)>0){var E=t.css("left"),w=parseInt(E.toString(),10)-r;w<0&&(w=0),t.css("left","".concat(w,"px"))}if(g.indexOf("right")>=0&&c<0){var C=t.css("right"),D=parseInt(C.toString(),10)-Math.abs(c);t.css("right","".concat(D,"px"))}}})}var Um,Vm,Wm=function(e){var t=e,n=t.select,r=t.deselect,o=t.move;return t.select=function(e){n(e)},t.deselect=function(){var e=t.selection,n=Dv.findDocumentOrShadowRoot(t).getSelection();n&&n.rangeCount>0&&n.removeAllRanges(),e&&r()},t.move=function(e,t){void 0===t&&(t=!1),"number"==typeof e?e&&(e<0||o({distance:e,unit:"character",reverse:t})):o(e)},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Ah.get(t);null!=e&&(t.focus(),n(e))},t.getSelectionPosition=function(){return Hm(t)},t.getNodePosition=function(e){return zm(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=Op(mp.Range.edges(e),2),r=n[0],o=n[1],i=Op(mp.Editor.edges(t,[]),2),a=i[0],u=i[1];return!(!mp.Point.equals(r,a)||!mp.Point.equals(o,u))},t.selectAll=function(){var e=mp.Editor.start(t,[]),r=mp.Editor.end(t,[]);n({anchor:e,focus:r})},t};var Gm=function(){if(Vm)return Um;Vm=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof b&&b&&b.Object===Object&&b,a="object"==typeof self&&self&&self.Object===Object&&self,u=i||a||Function("return this")(),s=Object.prototype.toString,l=Math.max,c=Math.min,f=function(){return u.Date.now()};function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(i){if("number"==typeof i)return i;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(i))return NaN;if(d(i)){var a="function"==typeof i.valueOf?i.valueOf():i;i=d(a)?a+"":a}if("string"!=typeof i)return 0===i?i:+i;i=i.replace(e,"");var u=n.test(i);return u||r.test(i)?o(i.slice(2),u?2:8):t.test(i)?NaN:+i}return Um=function(e,t,n){var r,o,i,a,u,s,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,h=t,a=e.apply(i,n)}function b(e){var n=e-s;return void 0===s||n>=t||n<0||v&&e-h>=i}function E(){var e=f();if(b(e))return w(e);u=setTimeout(E,function(e){var n=t-(e-s);return v?c(n,i-(e-h)):n}(e))}function w(e){return u=void 0,m&&r?y(e):(r=o=void 0,a)}function C(){var e=f(),n=b(e);if(r=arguments,o=this,s=e,n){if(void 0===u)return function(e){return h=e,u=setTimeout(E,t),g?y(e):a}(s);if(v)return u=setTimeout(E,t),y(s)}return void 0===u&&(u=setTimeout(E,t)),a}return t=p(t)||0,d(n)&&(g=!!n.leading,i=(v="maxWait"in n)?l(p(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==u&&clearTimeout(u),h=0,r=s=o=u=void 0},C.flush=function(){return void 0===u?a:w(f())},C},Um}(),qm=E(Gm);const Km=e=>"string"==typeof e,Ym=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Xm=e=>null==e?"":""+e,Zm=/###/g,Jm=e=>e&&e.indexOf("###")>-1?e.replace(Zm,"."):e,Qm=e=>!e||Km(e),ey=(e,t,n)=>{const r=Km(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Qm(e))return{};const t=Jm(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Qm(e)?{}:{obj:e,k:Jm(r[o])}},ty=(e,t,n)=>{const{obj:r,k:o}=ey(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),u=ey(e,a,Object);for(;void 0===u.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),u=ey(e,a,Object),u&&u.obj&&void 0!==u.obj[`${u.k}.${i}`]&&(u.obj=void 0);u.obj[`${u.k}.${i}`]=n},ny=(e,t)=>{const{obj:n,k:r}=ey(e,t);if(n)return n[r]},ry=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?Km(e[r])||e[r]instanceof String||Km(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ry(e[r],t[r],n):e[r]=t[r]);return e},oy=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var iy={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ay=e=>Km(e)?e.replace(/[&<>"'\/]/g,e=>iy[e]):e;const uy=[" ",",","?","!",";"],sy=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),ly=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},cy=e=>e&&e.replace("_","-"),fy={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 dy{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||fy,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:(Km(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new dy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new dy(this.logger,e)}}var py=new dy;class hy{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])})}}}class gy extends hy{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):Km(n)&&o?a.push(...n.split(o)):a.push(n)));const u=ny(this.data,a);return!u&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!u&&i&&Km(n)?ly(this.data&&this.data[e]&&this.data[e][t],n,o):u}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),ty(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)(Km(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 u=ny(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ry(u,n,o):u={...u,...n},ty(this.data,a,u),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 vy={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 my={};class yy extends hy{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=py.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=uy.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=sy.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:Km(o)?[o]: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{key:e,namespaces:Km(o)?[o]: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),u=a[a.length-1],s=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${u}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let f=c&&c.res;const d=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(f),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!Km(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||Km(g)&&Array.isArray(f))if(v&&Km(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&&!Km(t.count),d=yy.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(s,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(s,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||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",s,u,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,u,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,u,n,o,y,t),this.emit("missingKey",e,u,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=`${u}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}else{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?p: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}}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=Km(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(a){const t=e.match(this.interpolator.nestingRegexp);u=t&&t.length}let s=n.replace&&!Km(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);u<(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,u=Km(a)?[a]:a;return null!=e&&u&&u.length&&!1!==n.applyPostProcessor&&(e=vy.handle(u,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 Km(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const u=this.extractFromKey(e,a),s=u.key;n=s;let l=u.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!Km(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(Km(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!my[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(my[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.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!!!")),p.forEach(n=>{if(this.isValidLookup(t))return;o=n;const i=[s];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,s,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(s+e),a.ordinal&&0===e.indexOf(r)&&i.push(s+e.replace(r,this.options.pluralSeparator)),f&&i.push(s+t)),d){const n=`${s}${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 u;for(;u=i.pop();)this.isValidLookup(t)||(r=u,t=this.getResource(n,e,u,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&&!Km(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 by=e=>e.charAt(0).toUpperCase()+e.slice(1);class Ey{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=py.create("languageUtils")}getScriptPartFromCode(e){if(!(e=cy(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=cy(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Km(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}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]=by(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]=by(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=by(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)),Km(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 Km(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))):Km(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let wy=[{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}],Cy={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 Dy=["v1","v2","v3"],Ay=["v4"],Sy={zero:0,one:1,two:2,few:3,many:4,other:5};class xy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=py.create("pluralResolver"),this.options.compatibilityJSON&&!Ay.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 wy.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Cy[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()){const n=cy("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];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}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)=>Sy[e]-Sy[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!Dy.includes(this.options.compatibilityJSON)}}const Oy=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=ny(e,n);return void 0!==r?r:ny(t,n)})(e,t,n);return!i&&o&&Km(n)&&(i=ly(e,n,r),void 0===i&&(i=ly(t,n,r))),i},Ty=e=>e.replace(/\$/g,"$$$$");class Ny{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=py.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:u,formatSeparator:s,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:ay,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?oy(o):i||"{{",this.suffix=a?oy(a):u||"}}",this.formatSeparator=s||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?oy(f):d||oy("$t("),this.nestingSuffix=p?oy(p):h||oy(")"),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 u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Oy(t,u,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(Oy(t,u,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=>Ty(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ty(this.escape(e)):Ty(e)}];return f.forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=s(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i=Km(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 Km(i)||this.useRawValueToEscape||(i=Xm(i));const u=t.safeValue(i);if(e=e.replace(o[0],u),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),u=i.match(/"/g);(a&&a.length%2==0&&!u||u.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 u=[];o={...i},o=o.replace&&!Km(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let s=!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(),u=e,s=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!Km(r))return r;Km(r)||(r=Xm(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),s&&(r=u.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 By=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 u=t[a];return u||(u=e(cy(r),o),t[a]=u),u(n)}};class ky{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=py.create("formatter"),this.options=e,this.formats={number:By((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:By((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:By((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:By((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:By((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=By(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]||{},u=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,u,{...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 Fy extends hy{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=py.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={},u={};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===u[t]&&(u[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(u)}}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}=ey(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,u)=>{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&&u&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,u)},u=this.backend[n].bind(this.backend);if(2!==u.length)return u(e,t,a);try{const n=u(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();Km(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Km(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 u={...i,isUpdate:o},s=this.backend.create.bind(this.backend);if(s.length<6)try{let o;o=5===s.length?s(e,t,n,r,u):s(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 s(e,t,n,r,a,u)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const Iy=()=>({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]),Km(e[1])&&(t.defaultValue=e[1]),Km(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}}),Py=e=>(Km(e.ns)&&(e.ns=[e.ns]),Km(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Km(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ry=()=>{};class _y extends hy{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=Py(e),this.services={},this.logger=py,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&&(Km(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Iy();this.options={...r,...this.options,...Py(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?py.init(o(this.modules.logger),this.options):py.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=ky);const n=new Ey(this.options);this.store=new gy(this.options.resources,this.options);const i=this.services;i.logger=py,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new xy(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 Ny(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Fy(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 yy(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=Ry),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=Ym(),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]:Ry;const n=Km(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=Ym();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=Ry),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&&vy.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=Ym();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=Km(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,u=new Array(a>2?a-2:0),s=2;s<a;s++)u[s-2]=arguments[s];i=r.options.overloadTranslationOptionHandler([e,t].concat(u))}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 Km(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=Ym();return this.options.ns?(Km(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=Ym();Km(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 Ey(Iy());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 _y(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]:Ry;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new _y(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 gy(this.store.data,r),o.services.resourceStore=o.store),o.translator=new yy(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 Ly=_y.createInstance();Ly.createInstance=_y.createInstance,Ly.createInstance,Ly.dir,Ly.init,Ly.loadResources,Ly.reloadResources,Ly.use,Ly.changeLanguage,Ly.getFixedT,Ly.t,Ly.exists,Ly.setDefaultNamespace,Ly.hasLoadedNamespace,Ly.loadNamespaces,Ly.loadLanguages;var My="translation";function jy(e,t){Ly.addResourceBundle(e,My,t,!0,!0)}function Hy(e){return Ly.on("languageChanged",e),function(){return Ly.off("languageChanged",e)}}Ly.init({lng:"zh-CN",resources:{}});var zy=Ly.t.bind(Ly);function $y(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&&$y(t)}}function Uy(){return zh('<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 Vy(){return zh('<div class="w-e-bar-divider"></div>')}function Wy(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=hv?"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 Gy=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=zh('<div class="w-e-bar-item"></div>'),this.$button=zh('<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,u=t.hotkey,s=void 0===u?"":u,l=t.iconSvg,c=void 0===l?"":l,f=this.$button;if(c){var d=zh(c);$y(d),f.append(d)}else f.text(a);Wy(f,c,a,s,n),n&&c&&f.append(zh('<span class="title">'.concat(a,"</span>"))),i&&f.css("width","".concat(i,"px")),f.attr("data-menu-key",e),this.$elem.append(f),Dg(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),ib(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=ib(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=ib(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=ib(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=ib(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=zh(n);$y(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=ib(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&Wy(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),qy=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Cp(t,e),t.prototype.onButtonClick=function(){},t}(Gy),Ky=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=uh.get(e);null==t&&(t=new Set,uh.set(e,t)),t.add(this),sh.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=sh.get(this);e&&e.emit(Xp,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=sh.get(this);e&&e.emit(Zp)}},e}(),Yy=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=zh('<div class="w-e-drop-panel"></div>'),n}return Cp(t,e),t.prototype.genSelfElem=function(){return null},t}(Ky),Xy=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=Uy();o.$button.append(i)}return o}return Cp(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=ib(this);if(null==this.dropPanel){var n=new Yy(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,u=a.offset().left,s=a.parents(".w-e-bar");u-s.offset().left>=s.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(Gy),Zy=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=zh('<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 Cp(t,e),t.prototype.genSelfElem=function(){var e=this,t=zh('<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=sh.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}(Ky);function Jy(e,t,n){var r=zh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=zh('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function Qy(e,t){var n=zh('<div class="button-container"></div>'),r=zh('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var eb=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=zh("body"),o.modal=null,o.menu=n,o}return Cp(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=ib(this),t=this.menu.getModalPositionNode(e);return mp.Element.isElement(t)?zm(e,t,"modal"):Hm(e)},t.prototype.handleModal=function(){var e=ib(this),t=this.menu;if(null==this.modal){var n=new Zy(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=ib(this),r=this.menu;if(null!=r.getModalContentElem){var o=Dv.getTextarea(n),i=Dv.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,u=r.getModalContentElem(n);if(e.renderContent(u),a)e.setStyle({left:"0",right:"0"});else{var s=this.getPosition();e.setStyle(s)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||$m(n,e.$elem),setTimeout(function(){n.blur()})}},t}(Gy);var tb=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=zh('<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 Cp(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=zh("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=zh('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var u=zh('<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(u),a.addClass("selected")}a.append(zh('<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}(Ky);var nb=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=zh('<div class="w-e-bar-item"></div>'),this.$button=zh('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,u=t.iconSvg,s=void 0===u?"":u,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),Wy(f,s,i,c,n),this.$elem.append(f),this.menu=t,Dg(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),ib(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=ib(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new tb(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=zh(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=ib(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=ib(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=Uy();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=ib(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}(),rb=function(){function e(e){this.$elem=zh('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=zh('<div class="w-e-bar-item-menus-container"></div>'),this.$button=zh('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=zh(n);$y(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var u=Uy();i.append(u),o.append(i);var s=this.$container;o.append(s);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){zh(e).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),ob=new WeakMap;function ib(e){var t=ah.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function ab(e,t,n){void 0===n&&(n=!1);var r=ob.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new Xy(e,t,n):a?new eb(e,t,n):new qy(e,t,n)}if("select"===o&&(r=new nb(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return ob.set(t,r),r}function ub(e,t){var n=e.selection;return null!=n&&(!mp.Range.isCollapsed(n)&&(!Dv.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})&&!!mp.Text.isText(t)))}var sb,lb,cb=function(){function e(){var e=this;this.$elem=zh('<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=qm(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,u=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&mp.Element.isElement(o)&&t){var s=e.isSamePath(o,e.prevSelectedNode);if(!mp.Editor.isBlock(u,o)&&s)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),Dg(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),Dv.getTextarea(t).$textAreaContainer.append(n),t.on(Gp,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(qp,r),t.on(Kp,r),t.on(Yp,r)}),this.lngListen=Hy(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;Dg(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=Vy();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=Jp[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=ab(e,r);this.hoverbarItems.push(a),ah.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),mp.Element.isElement(e)){var r=zm(t,e,"bar");return n.css(r),void $m(t,n)}if(mp.Text.isText(e)){r=Hm(t);return n.css(r),void $m(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 t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,u=i.menuKeys,s=void 0===u?[]:u,l=a||function(e,t){return Dv.checkNodeType(t,o)},c=Op(mp.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),f=c[0];if(null!=f)return n=f[0],r=s,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=oh.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=ub),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=Dv.findPath(null,e),r=Dv.findPath(null,t);return mp.Path.equals(n,r)},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}();function fb(){if(lb)return sb;lb=1;var e="Expected a function",t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof b&&b&&b.Object===Object&&b,u="object"==typeof self&&self&&self.Object===Object&&self,s=a||u||Function("return this")(),l=Object.prototype.toString,c=Math.max,f=Math.min,d=function(){return s.Date.now()};function p(t,n,r){var o,i,a,u,s,l,p=0,v=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,p=e,u=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||m&&e-p>=a}function w(){var e=d();if(E(e))return C(e);s=setTimeout(w,function(e){var t=n-(e-l);return m?f(t,a-(e-p)):t}(e))}function C(e){return s=void 0,y&&o?b(e):(o=i=void 0,u)}function D(){var e=d(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===s)return function(e){return p=e,s=setTimeout(w,n),v?b(e):u}(l);if(m)return s=setTimeout(w,n),b(l)}return void 0===s&&(s=setTimeout(w,n)),u}return n=g(n)||0,h(r)&&(v=!!r.leading,a=(m="maxWait"in r)?c(g(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),D.cancel=function(){void 0!==s&&clearTimeout(s),p=0,o=l=i=s=void 0},D.flush=function(){return void 0===s?u:C(d())},D}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var u=r.test(e);return u||o.test(e)?i(e.slice(2),u?2:8):n.test(e)?NaN:+e}return sb=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return h(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),p(t,n,{leading:o,maxWait:n,trailing:i})}}var db=E(fb());function pb(e,t){return Bg(t)&&Dv.hasDOMNode(e,t,{editable:!0})}function hb(e,t){return Bg(t)&&Dv.hasDOMNode(e,t)}function gb(e,t){return pb(e,t)||function(e,t){if(e.getConfig().readOnly)return!1;var n=hb(e,t)&&Dv.toSlateNode(e,t);return!!n&&mp.Element.isElement(n)&&mp.Editor.isVoid(e,n)}(e,t)}const vb=e=>"object"==typeof e&&null!=e&&1===e.nodeType,mb=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,yb=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return mb(n.overflowY,t)||mb(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},bb=(e,t,n,r,o,i,a,u)=>i<e&&a>t||i>e&&a<t?0:i<=e&&u<=n||a>=t&&u>=n?i-e-r:a>t&&u<n||i<e&&u>n?a-t+o:0,Eb=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},wb=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:u,inline:s,boundary:l,skipOverflowHiddenElements:c}=t,f="function"==typeof l?l:e=>e!==l;if(!vb(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,p=[];let h=e;for(;vb(h)&&f(h);){if(h=Eb(h),h===d){p.push(h);break}null!=h&&h===document.body&&yb(h)&&!yb(document.documentElement)||null!=h&&yb(h,c)&&p.push(h)}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:E,top:w,right:C,bottom:D,left:A}=e.getBoundingClientRect(),{top:S,right:x,bottom:O,left:T}=(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 N="start"===u||"nearest"===u?w-S:"end"===u?D+O:w+b/2-S+O,B="center"===s?A+E/2-T+x:"end"===s?C+x:A-T;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&A>=0&&D<=v&&C<=g&&(t===d&&!yb(t)||w>=o&&D<=l&&A>=c&&C<=i))return k;const f=getComputedStyle(t),h=parseInt(f.borderLeftWidth,10),S=parseInt(f.borderTopWidth,10),x=parseInt(f.borderRightWidth,10),O=parseInt(f.borderBottomWidth,10);let T=0,F=0;const I="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-O:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,_="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(d===t)T="start"===u?N:"end"===u?N-v:"nearest"===u?bb(y,y+v,v,S,O,y+N,y+N+b,b):N-v/2,F="start"===s?B:"center"===s?B-g/2:"end"===s?B-g:bb(m,m+g,g,h,x,m+B,m+B+E,E),T=Math.max(0,T+y),F=Math.max(0,F+m);else{T="start"===u?N-o-S:"end"===u?N-l+O+P:"nearest"===u?bb(o,l,n,S,O+P,N,N+b,b):N-(o+n/2)+P/2,F="start"===s?B-c-h:"center"===s?B-(c+r/2)+I/2:"end"===s?B-i+x+I:bb(c,i,r,h,x+I,B,B+E,E);const{scrollLeft:e,scrollTop:a}=t;T=0===_?0:Math.max(0,Math.min(a+T/_,t.scrollHeight-n/_+P)),F=0===R?0:Math.max(0,Math.min(e+F/R,t.scrollWidth-r/R+I)),N+=a-T,B+=e-F}k.push({el:t,top:T,left:F})}return k};function Cb(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(wb(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of wb(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function Db(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=Dv.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var u=mh.get(t),s=!1;if(u.contains(i.anchorNode)&&u.contains(i.focusNode)&&(s=!0),a&&s&&r){var l=Dv.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&mp.Range.equals(l,r)){var c=!0;if(mp.Range.isCollapsed(r)){var f=i.anchorNode,d=i.anchorOffset;if(f===u){var p=u.childNodes,h=void 0;(h=p[d])&&h.matches("table")&&(c=!1),(h=p[d-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||Dv.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&Dv.toDOMRange(t,r);if(g){mp.Range.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){var m=g.getBoundingClientRect.bind(g)();0===m.top&&0===m.right&&0===m.bottom&&0===m.left&&0===m.height&&0===m.width||(v.getBoundingClientRect=g.getBoundingClientRect.bind(g));var y=document.body;Cb(v,{scrollMode:"if-needed",boundary:o.scroll&&u.parentElement||y,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&gv&&u.focus(),e.isUpdatingSelection=!1})}else t.selection=Dv.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Ab=new WeakMap,Sb=new WeakMap;var xb,Ob={};var Tb=function(){if(xb)return Ob;xb=1,Object.defineProperty(Ob,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return a(e,t)}),o=function(e){return r.some(function(t){return u(t,e)})};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},u=(e=e.replace("++","+add")).split("+"),c=u.length;for(var f in t)a[t[f]]=!1;var d=!0,p=!1,h=void 0;try{for(var g,v=u[Symbol.iterator]();!(d=(g=v.next()).done);d=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=s(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!d&&v.return&&v.return()}finally{if(p)throw h}}return a}function u(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function s(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return Ob.default=i,Ob.isHotkey=i,Ob.isCodeHotkey=function(e,t){return i(e,t)},Ob.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},Ob.parseHotkey=a,Ob.compareHotkey=u,Ob.toKeyCode=s,Ob.toKeyName=l,Ob}(),Nb={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"},Bb={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"},kb={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Fb=function(e){var t=Nb[e],n=Bb[e],r=kb[e],o=t&&Tb.isKeyHotkey(t),i=n&&Tb.isKeyHotkey(n),a=r&&Tb.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(hv&&i&&i(e))||!(hv||!a||!a(e)))}},Ib={isBold:Fb("bold"),isCompose:Fb("compose"),isMoveBackward:Fb("moveBackward"),isMoveForward:Fb("moveForward"),isDeleteBackward:Fb("deleteBackward"),isDeleteForward:Fb("deleteForward"),isDeleteLineBackward:Fb("deleteLineBackward"),isDeleteLineForward:Fb("deleteLineForward"),isDeleteWordBackward:Fb("deleteWordBackward"),isDeleteWordForward:Fb("deleteWordForward"),isExtendBackward:Fb("extendBackward"),isExtendForward:Fb("extendForward"),isExtendLineBackward:Fb("extendLineBackward"),isExtendLineForward:Fb("extendLineForward"),isItalic:Fb("italic"),isMoveLineBackward:Fb("moveLineBackward"),isMoveLineForward:Fb("moveLineForward"),isMoveWordBackward:Fb("moveWordBackward"),isMoveWordForward:Fb("moveWordForward"),isRedo:Fb("redo"),isSplitBlock:Fb("splitBlock"),isTransposeCharacter:Fb("transposeCharacter"),isUndo:Fb("undo"),isTab:Fb("tab"),isSelectAll:Fb("selectAll")};function Pb(e){e.preventDefault()}var Rb={beforeinput:function(e,t,n){var r,o=e,i=n.getConfig().readOnly;if(Ev&&!i&&pb(n,o.target)){null===(r=t.flushDOMSelectionChange)||void 0===r||r.call(t);var a=n.selection,u=o.inputType,s=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==u&&"deleteCompositionText"!==u){if(o.preventDefault(),!u.startsWith("delete")||u.startsWith("deleteBy")){var l=Op(o.getTargetRanges(),1)[0];if(l){var c=Dv.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});a&&mp.Range.equals(a,c)||mp.Transforms.select(n,c)}}if(a&&mp.Range.isExpanded(a)){var f=Dv.getSelectedElems(n),d="table"===f[0].type,p="table-cell"!==f[f.length-1].type;if(d&&p)return;if(u.startsWith("delete")){var h=u.endsWith("Backward")?"backward":"forward";return void mp.Editor.deleteFragment(n,{direction:h})}}switch(u){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":mp.Editor.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":mp.Editor.deleteForward(n);break;case"deleteContentBackward":mp.Editor.deleteBackward(n);break;case"deleteEntireSoftLine":mp.Editor.deleteBackward(n,{unit:"line"}),mp.Editor.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":mp.Editor.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":mp.Editor.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":mp.Editor.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":mp.Editor.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":mp.Editor.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":mp.Editor.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":mp.Editor.insertBreak(n);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===u&&(t.isComposing=!1,Oh.set(n,!0)),"insertFromPaste"===u&&!xh.get(n))break;"[object DataTransfer]"===xg(s)?n.insertData(s):"string"==typeof s&&mp.Editor.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&pb(n,r.target)){var a=Dv.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var u=r.relatedTarget;if(!(u===Dv.toDOMNode(n,n)||Fg(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Bg(u)&&Dv.hasDOMNode(n,u)){var s=Dv.toSlateNode(n,u);if(mp.Element.isElement(s)&&!n.isVoid(s))return}if(vv){var l=a.getSelection();null==l||l.removeAllRanges()}Dh.delete(n)}}}},focus:function(e,t,n){var r=Dv.toDOMNode(n,n),o=Dv.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,gv&&e.target!==r?r.focus():Dh.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&hb(n,e.target)&&Bg(e.target)){var r=Dv.toSlateNode(n,e.target),o=Dv.findPath(n,r);if(mp.Editor.hasPath(n,o))if(mp.Node.get(n,o)===r){var i=mp.Editor.start(n,o),a=mp.Editor.end(n,o),u=mp.Editor.void(n,{at:i}),s=mp.Editor.void(n,{at:a});if(u&&s&&mp.Path.equals(u[1],s[1])){var l=mp.Editor.range(n,i);mp.Transforms.select(n,l)}}}},compositionstart:function(e,t,n){if(pb(n,e.target)){Th.delete(n);var r=n.selection;if(r&&mp.Range.isExpanded(r)&&(mp.Editor.deleteFragment(n),Promise.resolve().then(function(){Db(t,n,!0)})),n.selection){var o=Dv.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";Ab.set(n,i),Sb.set(n,o)}t.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)}(t,n)}},compositionend:function(e,t,n){var r=e;if(pb(n,r.target)){t.isComposing=!1;var o=!0===Oh.get(n);if(o)Oh.delete(n),Th.delete(n);else{var i=Th.get(n);Th.delete(n),!i||n.selection&&mp.Range.equals(n.selection,i)||mp.Transforms.select(n,i)}var a=n.selection;if(null!=a){(bv||gv)&&Dv.cleanExposedTexNodeInSelectionBlock(n);for(var u=mp.Range.isBackward(a)?a.focus:a.anchor,s=Op(mp.Editor.node(n,[u.path[0]]),1)[0],l=0;l<u.path.length;l+=1){var c=Op(mp.Editor.node(n,u.path.slice(0,l+1)),1)[0];if(mp.Element.isElement(c)&&((vv||gv)&&"link"===c.type||"code"===c.type)){Dv.setNewKey(s);break}}var f=r.data;if(f&&!o){if(n.getConfig().maxLength){var d=Dv.getLeftLengthOfMaxLength(n);if(d<f.length){var p=Dv.toDOMRange(n,a);p.startContainer.nodeType===Node.TEXT_NODE&&(p.startContainer.textContent=Ab.get(n)||""),d>0&&mp.Editor.insertText(n,f.slice(0,d)),t.changeViewState()}else mp.Editor.insertText(n,f)}else{var h=Dv.findDocumentOrShadowRoot(n).getSelection();h&&function(e,t){if(mp.Range.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=mp.Editor.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var u=mp.Editor.node(e,a);if(mp.Text.isText(u[0])&&mp.Text.isText(o[0]))return!0}}}(n,a)&&(n.selection=Dv.toSlateRange(n,h,{exactMatch:!1,suppressThrow:!1})),mp.Editor.insertText(n,f)}vv||setTimeout(function(){var e=n.selection;if(null!=e){var t=Sb.get(n);if(null!=t)Dv.toDOMRange(n,e).startContainer!==t&&(t.textContent=Ab.get(n)||"")}})}}}},compositionupdate:function(e,t,n){pb(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&pb(n,r.target)){if(function(e,t){var n=rh.get(e),r=n&&n.getMenus(),o=ih.get(e),i=o&&o.getMenus(),a=Dp(Dp({},r),i);for(var u in a){var s=a[u],l=s.hotkey;if(l&&Tb.isHotkey(l,t)&&!s.isDisabled(e)){var c=s.getValue(e);s.exec(e,c)}}}(n,r),Ib.isTab(r))return Pb(r),void n.handleTab();if(Ib.isRedo(r))return Pb(r),void("function"==typeof n.redo&&n.redo());if(Ib.isUndo(r))return Pb(r),void("function"==typeof n.undo&&n.undo());if(Ib.isMoveLineBackward(r))return Pb(r),void mp.Transforms.move(n,{unit:"line",reverse:!0});if(Ib.isMoveLineForward(r))return Pb(r),void mp.Transforms.move(n,{unit:"line"});if(Ib.isExtendLineBackward(r))return Pb(r),void mp.Transforms.move(n,{unit:"line",edge:"focus",reverse:!0});if(Ib.isExtendLineForward(r))return Pb(r),void mp.Transforms.move(n,{unit:"line",edge:"focus"});if(Ib.isMoveBackward(r))return Pb(r),void(o&&mp.Range.isCollapsed(o)?mp.Transforms.move(n,{reverse:!0}):mp.Transforms.collapse(n,{edge:"start"}));if(Ib.isMoveForward(r))return Pb(r),void(o&&mp.Range.isCollapsed(o)?mp.Transforms.move(n):mp.Transforms.collapse(n,{edge:"end"}));if(Ib.isMoveWordBackward(r))return Pb(r),o&&mp.Range.isExpanded(o)&&mp.Transforms.collapse(n,{edge:"focus"}),void mp.Transforms.move(n,{unit:"word",reverse:!0});if(Ib.isMoveWordForward(r))return Pb(r),o&&mp.Range.isExpanded(o)&&mp.Transforms.collapse(n,{edge:"focus"}),void mp.Transforms.move(n,{unit:"word"});if(Ib.isSelectAll(r))return Pb(r),void n.selectAll();if(Ev){if((bv||vv)&&o&&(Ib.isDeleteBackward(r)||Ib.isDeleteForward(r))&&mp.Range.isCollapsed(o)){var i=mp.Node.parent(n,o.anchor.path);if(mp.Element.isElement(i)&&mp.Editor.isVoid(n,i)&&mp.Editor.isInline(n,i))return r.preventDefault(),void mp.Transforms.delete(n,{unit:"block"})}}else{if(Ib.isBold(r)||Ib.isItalic(r)||Ib.isTransposeCharacter(r))return void Pb(r);if(Ib.isSplitBlock(r))return Pb(r),void mp.Editor.insertBreak(n);if(Ib.isDeleteBackward(r))return Pb(r),void(o&&mp.Range.isExpanded(o)?mp.Editor.deleteFragment(n,{direction:"backward"}):mp.Editor.deleteBackward(n));if(Ib.isDeleteForward(r))return Pb(r),void(o&&mp.Range.isExpanded(o)?mp.Editor.deleteFragment(n,{direction:"forward"}):mp.Editor.deleteForward(n));if(Ib.isDeleteLineBackward(r))return Pb(r),void(o&&mp.Range.isExpanded(o)?mp.Editor.deleteFragment(n,{direction:"backward"}):mp.Editor.deleteBackward(n,{unit:"line"}));if(Ib.isDeleteLineForward(r))return Pb(r),void(o&&mp.Range.isExpanded(o)?mp.Editor.deleteFragment(n,{direction:"forward"}):mp.Editor.deleteForward(n,{unit:"line"}));if(Ib.isDeleteWordBackward(r))return Pb(r),void(o&&mp.Range.isExpanded(o)?mp.Editor.deleteFragment(n,{direction:"backward"}):mp.Editor.deleteBackward(n,{unit:"word"}));if(Ib.isDeleteWordForward(r))return Pb(r),void(o&&mp.Range.isExpanded(o)?mp.Editor.deleteFragment(n,{direction:"forward"}):mp.Editor.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!Ev&&!n.getConfig().readOnly&&pb(n,e.target)){e.preventDefault();var r=e.key;mp.Editor.insertText(n,r)}},copy:function(e,t,n){var r=e;if(pb(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(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),pb(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(mp.Range.isExpanded(o))mp.Editor.deleteFragment(n);else{var a=mp.Node.parent(n,o.anchor.path);mp.Element.isElement(a)&&mp.Editor.isVoid(n,a)&&mp.Transforms.delete(n)}}},paste:function(e,t,n){xh.set(n,!0);var r=e;if(!n.getConfig().readOnly&&pb(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return xh.set(n,!1),void r.preventDefault();if(vv||!Ev||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(hb(n,e.target)){var r=Dv.toSlateNode(n,e.target);mp.Element.isElement(r)&&mp.Editor.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(hb(n,r.target)&&!n.getConfig().readOnly){var o=Dv.toSlateNode(n,r.target),i=Dv.findPath(n,o);if(mp.Element.isElement(o)&&mp.Editor.isVoid(n,o)||mp.Editor.void(n,{at:i,voids:!0})){var a=mp.Editor.range(n,i);mp.Transforms.select(n,a)}var u=r.dataTransfer;if(null!=u)Dv.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(u))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&hb(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&hb(n,r.target)&&null!=o&&!(Ev&&vv&&o.files.length>0)){r.preventDefault();var i=n.selection,a=Dv.findEventRange(n,r);mp.Transforms.select(n,a),t.isDraggingInternally&&(i&&mp.Transforms.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function _b(e){if(Lb(e)){for(;e&&Lb(e);){e=Mb(e).parent}return null!=e?e:null}return e.parentNode}function Lb(e){return 11===e.nodeType}function Mb(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const jb={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return Mb(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(Lb(e)){let t=e;for(;t&&Lb(t);){t=Mb(t).parent}e=null!=t?t:e}Lb(t)&&(t=Mb(t,e)),n&&Lb(n)&&(n=Mb(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Lb(t)&&(t=Mb(t,e)),e.appendChild(t)},parentNode:_b,nextSibling:function(e){var t;if(Lb(e)){const n=Mb(e),r=_b(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:Lb};function Hb(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const zb=Array.isArray;function $b(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}const Ub=Hb("",{},[],void 0,void 0);function Vb(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,u=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&u}function Wb(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const Gb=["create","update","remove","destroy","pre","post"];function qb(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=jb;for(const t of Gb)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return Hb(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return Hb(void 0,{},[],void 0,e)}function u(e,t){return function(){if(0===--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function s(e,t){var n,i,a;let u;const l=e.data,c=null==l?void 0:l.hook;null===(n=null==c?void 0:c.init)||void 0===n||n.call(c,e);const f=e.children,d=e.sel;if("!"===d)null!==(i=e.text)&&void 0!==i||(e.text=""),e.elm=o.createComment(e.text);else if(""===d)e.elm=o.createTextNode(e.text);else if(void 0!==d){const n=d.indexOf("#"),i=d.indexOf(".",n),p=n>0?n:d.length,h=i>0?i:d.length,g=-1!==n||-1!==i?d.slice(0,Math.min(p,h)):d,v=null==l?void 0:l.ns,m=void 0===v?o.createElement(g,l):o.createElementNS(v,g,l);for(e.elm=m,p<h&&m.setAttribute("id",d.slice(p+1,h)),i>0&&m.setAttribute("class",d.slice(h+1).replace(/\./g," ")),u=0;u<r.create.length;++u)r.create[u](Ub,e);if(!$b(e.text)||zb(f)&&0!==f.length||o.appendChild(m,o.createTextNode(e.text)),zb(f))for(u=0;u<f.length;++u){const e=f[u];null!=e&&o.appendChild(m,s(e,t))}void 0!==c&&(null===(a=c.create)||void 0===a||a.call(c,Ub,e),void 0!==c.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,n,r,i,a){for(;r<=i;++r){const i=n[r];null!=i&&o.insertBefore(e,s(i,a),t)}}function c(e){var t,n;const o=e.data;if(void 0!==o){null===(n=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<r.destroy.length;++t)r.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&c(n)}}}function f(e,t,n,i){for(var a,s;n<=i;++n){let i;const l=t[n];if(null!=l)if(void 0!==l.sel){c(l),i=r.remove.length+1;const e=u(l.elm,i);for(let t=0;t<r.remove.length;++t)r.remove[t](l,e);const t=null===(s=null===(a=null==l?void 0:l.data)||void 0===a?void 0:a.hook)||void 0===s?void 0:s.remove;void 0!==t?t(l,e):e()}else l.children?(c(l),f(e,l.children,0,l.children.length-1)):o.removeChild(e,l.elm)}}function d(e,t,n){var i,a,u,c,p,h,g,v;const m=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==m?void 0:m.prepatch)||void 0===a||a.call(m,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||void 0!==t.text&&t.text!==e.text){null!==(u=t.data)&&void 0!==u||(t.data={}),null!==(c=e.data)&&void 0!==c||(e.data={});for(let n=0;n<r.update.length;++n)r.update[n](e,t);null===(g=null===(h=null===(p=t.data)||void 0===p?void 0:p.hook)||void 0===h?void 0:h.update)||void 0===g||g.call(h,e,t)}const b=e.children,E=t.children;void 0===t.text?void 0!==b&&void 0!==E?b!==E&&function(e,t,n,r){let i,a,u,c,p=0,h=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],E=n[y];for(;p<=g&&h<=y;)null==v?v=t[++p]:null==m?m=t[--g]:null==b?b=n[++h]:null==E?E=n[--y]:Vb(v,b)?(d(v,b,r),v=t[++p],b=n[++h]):Vb(m,E)?(d(m,E,r),m=t[--g],E=n[--y]):Vb(v,E)?(d(v,E,r),o.insertBefore(e,v.elm,o.nextSibling(m.elm)),v=t[++p],E=n[--y]):Vb(m,b)?(d(m,b,r),o.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++h]):(void 0===i&&(i=Wb(t,p,g)),a=i[b.key],void 0===a?(o.insertBefore(e,s(b,r),v.elm),b=n[++h]):void 0===i[E.key]?(o.insertBefore(e,s(E,r),o.nextSibling(m.elm)),E=n[--y]):(u=t[a],u.sel!==b.sel?o.insertBefore(e,s(b,r),v.elm):(d(u,b,r),t[a]=void 0,o.insertBefore(e,u.elm,v.elm)),b=n[++h]));h<=y&&(c=null==n[y+1]?null:n[y+1].elm,l(e,c,n,h,y,r)),p<=g&&f(e,t,p,g)}(y,b,E,n):void 0!==E?(void 0!==e.text&&o.setTextContent(y,""),l(y,null,E,0,E.length-1,n)):void 0!==b?f(y,b,0,b.length-1):void 0!==e.text&&o.setTextContent(y,""):e.text!==t.text&&(void 0!==b&&f(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(v=null==m?void 0:m.postpatch)||void 0===v||v.call(m,e,t)}return function(e,t){let n,u,l;const c=[];for(n=0;n<r.pre.length;++n)r.pre[n]();for(!function(e,t){return e.isElement(t)}(o,e)?function(e,t){return e.isDocumentFragment(t)}(o,e)&&(e=a(e)):e=i(e),Vb(e,t)?d(e,t,c):(u=e.elm,l=o.parentNode(u),s(t,c),null!==l&&(o.insertBefore(l,t.elm,o.nextSibling(u)),f(l,[e],0,0))),n=0;n<c.length;++n)c[n].data.hook.insert(c[n]);for(n=0;n<r.post.length;++n)r.post[n]();return t}}function Kb(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e];if("string"==typeof n)continue;const r=n.data;void 0!==r&&Kb(r,n.children,n.sel)}}function Yb(e,t,n){let r,o,i,a={};if(void 0!==n?(null!==t&&(a=t),zb(n)?r=n:$b(n)?o=n.toString():n&&n.sel&&(r=[n])):null!=t&&(zb(t)?r=t:$b(t)?o=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(i=0;i<r.length;++i)$b(r[i])&&(r[i]=Hb(void 0,void 0,void 0,r[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||Kb(a,r,e),Hb(e,a,r,o,void 0)}function Xb(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?109===n.charCodeAt(1)?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,e):r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const Zb={create:Xb,update:Xb};function Jb(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const Qb={create:Jb,update:Jb},eE=/[A-Z]/g;function tE(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)r in i||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(eE,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(eE,"-$&").toLowerCase(),i[r]))}const nE={create:tE,update:tE};function rE(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)rE(e[r],t,n)}function oE(e,t){const n=e.type,r=t.data.on;r&&r[n]&&rE(r[n],t,e)}function iE(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let u;if(n!==i){if(n&&r)if(i)for(u in n)i[u]||o.removeEventListener(u,r,!1);else for(u in n)o.removeEventListener(u,r,!1);if(i){const r=t.listener=e.listener||function e(t){oE(t,e.vnode)};if(r.vnode=t,n)for(u in i)n[u]||a.addEventListener(u,r,!1);else for(u in i)a.addEventListener(u,r,!1)}}}const aE={create:iE,update:iE,destroy:iE};function uE(e,t){let n,r,o;const i=t.elm;let a=e.data.props,u=t.data.props;if((a||u)&&a!==u)for(n in a=a||{},u=u||{},u)r=u[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const sE={create:uE,update:uE},lE="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let cE=!1;function fE(e,t,n){var r;r=()=>{e[t]=n},lE(()=>{lE(r)})}function dE(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const u="delayed"in i;for(r in i)r in a||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],u&&n===i.delayed[e]||fE(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const pE={pre:function(){cE=!1},create:dE,update:dE,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;cE||(e.elm.offsetLeft,cE=!0);const o=e.elm;let i=0;const a=n.remove;let u=0;const s=[];for(r in a)s.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==s.indexOf(l[i])&&u++;o.addEventListener("transitionend",e=>{e.target===o&&--u,0===u&&t()})}};function hE(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?hE(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(Hb(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function gE(e,t,...n){const r=hE(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?Yb(e,t,r[0].text):Yb(e,t,r)}var vE=[];var mE,yE,bE={};function EE(e,t,n){return gE(n.isInline(e)?"span":"div",null,t)}function wE(e,t){var n,r=Dv.findKey(t,e),o=t.isInline(e),i=mp.Editor.isVoid(t,e),a=rv(e.type,r.id),u={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},s=e.type,l=e.children,c=void 0===l?[]:l,f=function(e){return bE[e]||EE}(s);n=i?null:c.map(function(n,r){return SE(n,r,e,t)});var d=f(e,n,t);if(i){u["data-slate-void"]=!0;var p=o?"span":"div",h=Op(mp.Node.texts(e),1),g=Op(h[0],1)[0],v=gE(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},SE(g,0,e,t));d=gE(p,{style:{position:"relative"}},d,v),gh.set(g,0),vh.set(g,e)}return null==d.data&&(d.data={}),Object.assign(d.data,u),i||o||(d=function(e,t){var n=t;return vE.forEach(function(r){n=r(e,t)}),n}(e,d)),Dg(function(){var t=Rg(a);null!=t&&(bh.set(r,t),Eh.set(e,t),yh.set(t,e))}),d}function CE(e,t){return void 0===t&&(t=!1),gE("span",{"data-slate-string":!0},t?e+"\n":e)}function DE(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),gE("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?gE("br",null):null)}function AE(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=Dv.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=Dv.findPath(n,e),u=o([e,a]),s=mp.Text.decorations(e,u),l=s.map(function(r){var o,i,a,u=r.leaf,l=r.position,c=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=Dv.findPath(o,n),u=mp.Path.parent(a);if(mp.Editor.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?DE(mp.Node.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==mp.Editor.string(o,u)?""===i?DE():t&&"\n"===i.slice(-1)?CE(i,!0):CE(i):DE(0,!0)}(u,null!==(o=null==l?void 0:l.isLast)&&void 0!==o?o:1===s.length,e,t,n);return i=u,a=c,vE.forEach(function(e){a=e(i,a)}),gE("span",{"data-slate-leaf":!0},c=a)}),c=(i=r.id,"w-e-text-".concat(i)),f=gE("span",{"data-slate-node":"text",id:c,key:r.id},l);return Dg(function(){var t=Rg(c);null!=t&&(bh.set(r,t),Eh.set(e,t),yh.set(t,e))}),f}function SE(e,t,n,r){return gh.set(e,t),vh.set(e,n),mp.Element.isElement(e)?wE(e,r):AE(e,n,r)}var xE=function(){if(yE)return mE;yE=1;var e,t="[object Symbol]",n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o="\\ud800-\\udfff",i="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",u="\\u2700-\\u27bf",s="a-z\\xdf-\\xf6\\xf8-\\xff",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",f="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="['’]",p="["+o+"]",h="["+f+"]",g="["+i+a+"]",v="\\d+",m="["+u+"]",y="["+s+"]",E="[^"+o+f+v+u+s+l+"]",w="\\ud83c[\\udffb-\\udfff]",C="[^"+o+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",S="["+l+"]",x="\\u200d",O="(?:"+y+"|"+E+")",T="(?:"+S+"|"+E+")",N="(?:['’](?:d|ll|m|re|s|t|ve))?",B="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:"+g+"|"+w+")"+"?",F="["+c+"]?",I=F+k+("(?:"+x+"(?:"+[C,D,A].join("|")+")"+F+k+")*"),P="(?:"+[m,D,A].join("|")+")"+I,R="(?:"+[C+g+"?",g,D,A,p].join("|")+")",_=RegExp(d,"g"),L=RegExp(g,"g"),M=RegExp(w+"(?="+w+")|"+R+I,"g"),j=RegExp([S+"?"+y+"+"+N+"(?="+[h,S,"$"].join("|")+")",T+"+"+B+"(?="+[h,S+O,"$"].join("|")+")",S+"?"+O+"+"+N,S+"+"+B,v,P].join("|"),"g"),H=RegExp("["+x+o+i+a+c+"]"),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$="object"==typeof b&&b&&b.Object===Object&&b,U="object"==typeof self&&self&&self.Object===Object&&self,V=$||U||Function("return this")(),W=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function G(e){return H.test(e)}function q(e){return G(e)?function(e){return e.match(M)||[]}(e):function(e){return e.split("")}(e)}var K=Object.prototype.toString,Y=V.Symbol,X=Y?Y.prototype:void 0,Z=X?X.toString:void 0;function J(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&K.call(e)==t}(e))return Z?Z.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}function Q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function ee(e){return null==e?"":J(e)}var te,ne,re=(te=function(e,t,n){return t=t.toLowerCase(),e+(n?oe(ee(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=ee(e),void 0===t?function(e){return z.test(e)}(e)?function(e){return e.match(j)||[]}(e):function(e){return e.match(n)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(r,W).replace(L,"")}(e).replace(_,"")),te,"")}),oe=(ne="toUpperCase",function(e){var t=G(e=ee(e))?q(e):void 0,n=t?t[0]:e.charAt(0),r=t?Q(t,1).join(""):e.slice(1);return n[ne]()+r});return mE=re}(),OE=E(xE);var TE=["props","attrs","style","dataset","on","hook"];function NE(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(!TE.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=OE(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&&NE(e)})}function BE(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),u=a.readOnly,s=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),Yb("div#".concat(e),{props:{contentEditable:!t}})}(i,u),c=t.children||[];l.children=c.map(function(e,n){if(ph.has(e)){var r=ph.get(e);if(r){var o=Op(r,2),i=o[0],a=o[1];if(a)return i!==n&&(gh.set(e,n),ph.set(e,[n,a])),a}}var u=SE(e,n,t,t);NE(u);var s=t.getConfig().skipCacheTypes,l=void 0===s?["list-item"]:s;return mp.Element.isElement(e)&&l.includes(e.type)||ph.set(e,[n,u]),u});var f=ch.get(e);if(null==f&&(f=!0),f){var d=function(e){return zh('<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(d),e.$textArea=d,r=d[0],(h=qb([Qb,sE,pE,nE,aE,Zb]))(r,l),ch.set(e,!1),fh.set(e,h)}else{var p=dh.get(e),h=fh.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Rg(i))){var g;if((f?s:t.isFocused())&&r.focus({preventScroll:!0}),f){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Ch.set(t,v)}mh.set(t,r),Eh.set(t,r),yh.set(r,t),dh.set(e,l)}}var kE=1,FE=function(){function e(e){var t=this;this.selectionChangeRoot=null,this.id=kE++,this.$textArea=null,this.$progressBar=zh('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=zh('<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=db(function(e){var n=Fg(null==e?void 0:e.target)?e.target:null,r=null==n?void 0:n.tagName;if("INPUT"!==r&&"TEXTAREA"!==r){var o=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally,i=t.getConfig();if(!r&&!o){var a=Dv.findDocumentOrShadowRoot(t),u=a.activeElement,s=Dv.toDOMNode(t,t),l=a.getSelection();if(u!==s)return Dh.delete(t),void mp.Transforms.deselect(t);if(e.latestElement=u,Dh.set(t,!0),!l)return mp.Transforms.deselect(t);var c=l.anchorNode,f=l.focusNode,d=gb(t,c),p=hb(t,f);if(n){if(d&&p){var h=Dv.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0});Th.set(t,h)}}else d&&p?(h=Dv.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0}))&&mp.Transforms.select(t,h):i.readOnly&&mp.Transforms.deselect(t)}}(t,o)}},100);var n=zh(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=zh('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=zh('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Dg(function(){var e=t.editorInstance;t.bindSelectionChange(e),r.on("click",function(){return e.hidePanelOrModal()}),e.on(Gp,t.changeViewState.bind(t));var o=e.getConfig(),i=o.onChange,a=o.scroll;i&&e.on(Gp,function(){return i(e)}),a||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Gp,t.changeMaxLengthInfo.bind(t)),t.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=th.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindSelectionChange=function(e,t){var n=this;if(void 0===t&&(t=5),null==this.selectionChangeRoot&&!e.isDestroyed){try{var r=Dv.findDocumentOrShadowRoot(e);r.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=r}catch(r){if(t>0)return void setTimeout(function(){return n.bindSelectionChange(e,t-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}e.on(Wp,function(){var e;null===(e=n.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(Lp(Rb,function(n,o){t.on(o,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",db(function(){r.emit(qp)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(Gp,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})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-Dv.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.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)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;BE(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=zh('<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),Dg(function(){Db(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function IE(e,t,n,r){if(gh.set(e,t),vh.set(e,n),mp.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,n){return IE(t,n,e,r)}),mp.Editor.isVoid(r,e)){var i=Op(mp.Node.texts(e),1),a=Op(i[0],1)[0];gh.set(a,0),vh.set(a,e)}}}var PE={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};function RE(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,u=e.plugins,s=void 0===u?[]:u,l=function(e){return[Rm,mm,Nh,gm,Wm,Pm,Mm,Ep.withHistory].reduce(function(e,t){return t(e)},e)}(mp.createEditor());if(n&&function(e,t){return tv(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Rp(Up),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return Lp(t,function(e,t){n[t]=Dp(Dp({},e),o[t]||{})}),delete e.MENU_CONF,Dp({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},sanitizeHtml:$p,customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);lh.set(l,c);var f=c.hoverbarKeys,d=void 0===f?{}:f;if(s.forEach(function(e){l=e(l)}),function(e,t){var n=t.html,r=t.content;null!=n?e.children=nv(e,n):r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new FE(n);eh.set(l,p),th.set(p,l),p.changeViewState(),Dg(function(){var e=p.$scroll;null!=e&&e.height()<300&&console.warn("".concat(PE.zh,"\n").concat(PE.en),{element:e,height:e.height()})});var h=void 0;Object.keys(d).length>0&&(h=new cb,oh.set(h,l),ih.set(l,h)),l.on(Gp,function(){l.hidePanelOrModal()}),l.on(qp,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return IE(e,t,l,l)});var g=c.onCreated,v=c.onDestroyed;return g&&l.on(Vp,function(){return g(l)}),v&&l.on(Wp,function(){return v(l)}),Dg(function(){return l.emit(Vp)}),l}var _E=function(){function e(e,t){var n=this;this.$toolbar=zh('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=qm(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=zh(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),Dg(function(){n.initToolbar(),n.lngListen=Hy(function(){return n.initToolbar()}),n.getEditorInstance().on(Gp,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,u=void 0===a?{index:0,keys:[]}:a,s=r.excludeKeys,l=void 0===s?[]:s,c=Rp(i),f=[];f=Array.isArray(u)?u:[u];var d=0;f.forEach(function(e){var t=e.index+d;if(e.replaceFn&&c[t]){var n=e.replaceFn(c[t]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[t]=n}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,n){c.splice(t+n,0,e)}),d+=e.keys.length)});var p=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),h=p.length;p.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=Vy();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 rb(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,u=void 0===a?[]:a;i.forEach(function(e){u.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof rb,o=this.menus,i=o[e];if(null==i){var a=Jp[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 u=n.getMenuConfig(e);u&&void 0!==u.iconSvg&&(i.iconSvg=u.iconSvg);var s=ab(e,i,r);(this.toolbarItems.push(s),ah.set(s,n),r)?t.appendBarItem(s):t.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var e=nh.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 LE(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 tv(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=Dp({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new _E(n,i);return nh.set(a,e),rh.set(e,a),a}var ME,jE,HE,zE,$E,UE={exports:{}},VE={};function WE(){if(HE)return VE;HE=1,Object.defineProperty(VE,"__esModule",{value:!0}),VE.justErrorsLogger=VE.debugLogger=void 0;const e=function(){if(jE)return ME;function e(e){return e<10?`0${e}`:e.toString()}return jE=1,ME=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};VE.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return VE.debugLogger=n,VE}function GE(){if($E)return zE;$E=1;return zE={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},zE}var qE,KE,YE,XE,ZE,JE,QE,ew,tw,nw,rw,ow,iw,aw,uw,sw,lw,cw,fw,dw,pw,hw,gw,vw,mw,yw,bw,Ew,ww,Cw,Dw,Aw={};function Sw(){return KE?qE:(KE=1,qE=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function xw(){if(XE)return YE;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return XE=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},YE=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},YE}function Ow(){if(QE)return Aw;QE=1,Object.defineProperty(Aw,"__esModule",{value:!0}),Aw.defaultOptions=Aw.RestrictionError=Aw.Restricter=void 0;const e=Sw(),t=function(){if(JE)return ZE;JE=1;var e=xw(),t=/[\/\+\.]/;return ZE=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();Aw.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Aw.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return Aw.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:u,maxNumberOfFiles:s,allowedFileTypes:l}=this.getOpts().restrictions;if(s){const e=o.filter(e=>!e.isGhost);if(e.length+1>s)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:s})}`)}if(l){if(!l.some(e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(u&&null!=r.size){const t=o.reduce((e,t)=>e+t.size,r.size);if(t>u)throw new n(this.i18n("exceedsSize",{size:e(u),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},Aw}function Tw(){if(tw)return ew;return tw=1,ew=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function Nw(){if(rw)return nw;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}rw=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=Tw();function o(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
|
|
9
2
|
/**
|
|
10
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
11
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
@@ -16,7 +9,7 @@ function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return
|
|
|
16
9
|
* @param {string} phrase that needs interpolation, with placeholders
|
|
17
10
|
* @param {object} options with values that will be used to replace placeholders
|
|
18
11
|
* @returns {any[]} interpolated
|
|
19
|
-
*/function i(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),r=o(r,new RegExp(`%\\{${e}\\}`,"g"),i)}return r}var a=n("apply");function s(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}return GE=class{constructor(t){Object.defineProperty(this,a,{value:s}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},GE}function Ew(){return YE||(YE=1,KE=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,s){var u=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,s=i.length;for(;a<s;a++){var u=i[a];if("*"===u&&(n=n.concat(t[u])),2===o.length&&o[0]===u){n=n.concat(t[u]);break}}return n}(e);u.length&&function(e,t,n){var r=0,o=t.length;for(;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,u,[n,r,o,i,a,s])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function r(){n.apply(this,arguments),e.off(t,r)})},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),KE}function ww(){if(ZE)return XE;ZE=1;var e=0;function t(t){return"__private_"+e+++"_"+t}var n=t("publish");class r{constructor(){Object.defineProperty(this,n,{value:o}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},r={...this.state,...e};this.state=r,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,n)[n](t,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(e=>{e(...t)})}return r.VERSION="2.1.1",XE=function(){return new r}}function Cw(){if(QE)return JE;return QE=1,JE=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function Dw(){return tw?ew:(tw=1,ew={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function Sw(){if(pw)return fw;pw=1;var e=RE(),t=_E(),n=mw();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function s(e){return"__private_"+a+++"_"+e}const u=bw(),l=Ew(),c=tb(),d=ww(),f=function(){if(rw)return nw;rw=1;const e=Cw(),t=Dw();return nw=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=Cw(),h=function(){if(iw)return ow;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}return iw=1,ow=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(sw||(sw=1,aw=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),aw),v=lw?uw:(lw=1,uw=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=dw?cw:(dw=1,cw={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=s("plugins"),b=s("restricter"),E=s("storeUnsubscribe"),w=s("emitter"),C=s("preProcessors"),D=s("uploaders"),S=s("postProcessors"),A=s("informAndEmit"),x=s("checkRequiredMetaFieldsOnFile"),T=s("checkRequiredMetaFields"),O=s("assertNewUploadAllowed"),N=s("checkAndCreateFileStateObject"),B=s("startIfAutoProceed"),k=s("addListeners"),F=s("updateOnlineStatus"),P=s("createUpload"),I=s("getUpload"),_=s("removeUpload"),R=s("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class L{constructor(e){Object.defineProperty(this,R,{value:K}),Object.defineProperty(this,_,{value:q}),Object.defineProperty(this,I,{value:G}),Object.defineProperty(this,P,{value:W}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,B,{value:U}),Object.defineProperty(this,N,{value:$}),Object.defineProperty(this,O,{value:z}),Object.defineProperty(this,T,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,A,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,w,{writable:!0,value:l()}),Object.defineProperty(this,C,{writable:!0,value:new Set}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,S,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:d(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter(()=>this.opts,this.i18n),i(this,E)[E]=this.store.subscribe((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}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];i(this,w)[w].emit(e,...n)}on(e,t){return i(this,w)[w].on(e,t),this}once(e,t){return i(this,w)[w].once(e,t),this}off(e,t){return i(this,w)[w].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new u([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(e=>{e.setOptions()}),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,C)[C].add(e)}removePreProcessor(e){return i(this,C)[C].delete(e)}addPostProcessor(e){i(this,S)[S].add(e)}removePostProcessor(e){return i(this,S)[S].delete(e)}addUploader(e){i(this,D)[D].add(e)}removeUploader(e){return i(this,D)[D].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter(e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted}),i=r.filter(e=>!e.progress.uploadStarted),a=r.filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess),s=r.filter(e=>e.progress.uploadStarted),u=r.filter(e=>e.isPaused),l=r.filter(e=>e.progress.uploadComplete),c=r.filter(e=>e.error),d=o.filter(e=>!e.isPaused),f=r.filter(e=>e.progress.preprocess||e.progress.postprocess);return{newFiles:i,startedFiles:a,uploadStartedFiles:s,pausedFiles:u,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:100===t&&l.length===r.length&&0===f.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,O)[O](e);const{files:t}=this.getState();let n=i(this,N)[N](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,B)[B](),n.id}addFiles(e){i(this,O)[O]();const t={...this.getState().files},n=[],r=[];for(let o=0;o<e.length;o++)try{let r=i(this,N)[N](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)}),n.length>0&&i(this,B)[B](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function s(e){return void 0===a[e]}e.forEach(e=>{n[e]&&(a[e]=n[e],delete o[e])}),Object.keys(i).forEach(e=>{const t=r[e].fileIDs.filter(s);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}});const u={currentUploads:i,files:o};0===Object.keys(o).length&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const l=Object.keys(a);l.forEach(e=>{this.emit("file-removed",a[e],t)}),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!0};e[t]=n}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,P)[P](t,{forceAllowNewUpload:!0});return i(this,R)[R](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,P)[P]([e],{forceAllowNewUpload:!0});return i(this,R)[R](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter(e=>null!=e.progress.bytesTotal),n=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce((e,t)=>e+t.progress.bytesTotal,0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach(e=>{i+=e.progress.bytesUploaded}),n.forEach(e=>{i+=o*(e.progress.percentage||0)/100});let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find(t=>t.id===e);if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex(t=>t.id===e.id);-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,R)[R](e):(i(this,_)[_](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,P)[P](...arguments)}addResultData(e,t){if(!i(this,I)[I](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then(()=>i(this,b)[b].validateMinNumberOfFiles(t)).catch(e=>{throw i(this,A)[A](e),e}).then(()=>{if(!i(this,T)[T](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(e=>{throw e}).then(()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)});const o=i(this,P)[P](r);return i(this,R)[R](o)}).catch(e=>{throw this.emit("error",e),this.log(e,"error"),e}))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,A)[A](t,e),t}}function $(e,t){const r=f(t),o=v(r,t),a=p(o).extension,s=Boolean(t.isRemote),u=h({...t,type:r});if(this.checkIfFileAlreadyExists(u)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,A)[A](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:u,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(d,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(d=g);try{const t=Object.keys(e).map(t=>e[t]);i(this,b)[b].validate(d,t)}catch(e){throw i(this,A)[A](e,d),e}return d}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,A)[A](e)}else i(this,A)[A](n)}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,S)[S].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("preprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("postprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&i(this,x)[x](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function W(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function G(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,C)[C],...i(this,D)[D],...i(this,S)[S]];try{for(let i=r;i<o.length&&n;i++){const r=o[i],a={...n,step:i};this.setState({currentUploads:{...t,[e]:a}}),await r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw i(this,_)[_](e),t}if(n){n.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const r=n.fileIDs.map(e=>this.getFile(e)),o=r.filter(e=>!e.error),i=r.filter(e=>e.error);await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,_)[_](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return L.VERSION="2.3.4",fw=L}var Aw,xw,Tw,Ow,Nw,Bw,kw,Fw,Pw,Iw,_w,Rw,Lw,Mw={},jw=[],Hw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,zw=Array.isArray;function $w(e,t){for(var n in t)e[n]=t[n];return e}function Uw(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Vw(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Aw.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return Ww(e,a,r,o,null)}function Ww(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++Tw:o,__i:-1,__u:0};return null==o&&null!=xw.vnode&&xw.vnode(i),i}function Gw(e){return e.children}function qw(e,t){this.props=e,this.context=t}function Kw(e,t){if(null==t)return e.__?Kw(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Kw(e):null}function Yw(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Yw(e)}}function Xw(e){(!e.__d&&(e.__d=!0)&&Nw.push(e)&&!Zw.__r++||Bw!=xw.debounceRendering)&&((Bw=xw.debounceRendering)||kw)(Zw)}function Zw(){for(var e,t,n,r,o,i,a,s=1;Nw.length;)Nw.length>s&&Nw.sort(Fw),e=Nw.shift(),s=Nw.length,e.__d&&(n=void 0,r=void 0,o=(r=(t=e).__v).__e,i=[],a=[],t.__P&&((n=$w({},r)).__v=r.__v+1,xw.vnode&&xw.vnode(n),iC(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,null==o?Kw(r):o,!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,sC(i,n,a),r.__e=r.__=null,n.__e!=o&&Yw(n)));Zw.__r=0}function Jw(e,t,n,r,o,i,a,s,u,l,c){var d,f,p,h,g,v,m,y=r&&r.__k||jw,b=t.length;for(u=Qw(n,t,y,u,b),d=0;d<b;d++)null!=(p=n.__k[d])&&(f=-1==p.__i?Mw:y[p.__i]||Mw,p.__i=d,v=iC(e,p,f,o,i,a,s,u,l,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&cC(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==g&&null!=h&&(g=h),(m=!!(4&p.__u))||f.__k===p.__k?u=eC(p,u,e,m):"function"==typeof p.type&&void 0!==v?u=v:h&&(u=h.nextSibling),p.__u&=-7);return n.__e=g,u}function Qw(e,t,n,r,o){var i,a,s,u,l,c=n.length,d=c,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?(u=i+f,(a=e.__k[i]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?Ww(null,a,null,null,null):zw(a)?Ww(Gw,{children:a},null,null,null):null==a.constructor&&a.__b>0?Ww(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,-1!=(l=a.__i=tC(a,n,u,d))&&(d--,(s=n[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(o>c?f--:o<c&&f++),"function"!=typeof a.type&&(a.__u|=4)):l!=u&&(l==u-1?f--:l==u+1?f++:(l>u?f--:f++,a.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<c;i++)null!=(s=n[i])&&!(2&s.__u)&&(s.__e==r&&(r=Kw(s)),dC(s,s));return r}function eC(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=eC(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Kw(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function tC(e,t,n,r){var o,i,a,s=e.key,u=e.type,l=t[n],c=null!=l&&!(2&l.__u);if(null===l&&null==e.key||c&&s==l.key&&u==l.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(l=t[a=o>=0?o--:i++])&&!(2&l.__u)&&s==l.key&&u==l.type)return a;return-1}function nC(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Hw.test(t)?n:n+"px"}function rC(e,t,n,r,o){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||nC(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||nC(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(Pw,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Iw,e.addEventListener(t,i?Rw:_w,i)):e.removeEventListener(t,i?Rw:_w,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function oC(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Iw++;else if(t.t<n.u)return;return n(xw.event?xw.event(t):t)}}}function iC(e,t,n,r,o,i,a,s,u,l){var c,d,f,p,h,g,v,m,y,b,E,w,C,D,S,A,x,T=t.type;if(null!=t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),i=[s=t.__e=n.__e]),(c=xw.__b)&&c(t);e:if("function"==typeof T)try{if(m=t.props,y="prototype"in T&&T.prototype.render,b=(c=T.contextType)&&r[c.__c],E=c?b?b.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(y?t.__c=d=new T(m,E):(t.__c=d=new qw(m,E),d.constructor=T,d.render=fC),b&&b.sub(d),d.props=m,d.state||(d.state={}),d.context=E,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=$w({},d.__s)),$w(d.__s,T.getDerivedStateFromProps(m,d.__s))),p=d.props,h=d.state,d.__v=t,f)y&&null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==T.getDerivedStateFromProps&&m!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(m,E),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(m,d.__s,E)||t.__v==n.__v){for(t.__v!=n.__v&&(d.props=m,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(m,d.__s,E),y&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(p,h,g)})}if(d.context=E,d.props=m,d.__P=e,d.__e=!1,C=xw.__r,D=0,y){for(d.state=d.__s,d.__d=!1,C&&C(t),c=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do{d.__d=!1,C&&C(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++D<25);d.state=d.__s,null!=d.getChildContext&&(r=$w($w({},r),d.getChildContext())),y&&!f&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(p,h)),A=c,null!=c&&c.type===Gw&&null==c.key&&(A=uC(c.props.children)),s=Jw(e,zw(A)?A:[A],t,n,r,o,i,a,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),v&&(d.__E=d.__=null)}catch(e){if(t.__v=null,u||null!=i)if(e.then){for(t.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else{for(x=i.length;x--;)Uw(i[x]);aC(t)}else t.__e=n.__e,t.__k=n.__k,e.then||aC(t);xw.__e(e,t,n)}else null==i&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=lC(n.__e,t,n,r,o,i,a,u,l);return(c=xw.diffed)&&c(t),128&t.__u?void 0:s}function aC(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(aC)}function sC(e,t,n){for(var r=0;r<n.length;r++)cC(n[r],n[++r],n[++r]);xw.__c&&xw.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){xw.__e(e,t.__v)}})}function uC(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:zw(e)?e.map(uC):$w({},e)}function lC(e,t,n,r,o,i,a,s,u){var l,c,d,f,p,h,g,v=n.props,m=t.props,y=t.type;if("svg"==y?o="http://www.w3.org/2000/svg":"math"==y?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=i)for(l=0;l<i.length;l++)if((p=i[l])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,i[l]=null;break}if(null==e){if(null==y)return document.createTextNode(m);e=document.createElementNS(o,y,m.is&&m),s&&(xw.__m&&xw.__m(t,i),s=!1),i=null}if(null==y)v===m||s&&e.data==m||(e.data=m);else{if(i=i&&Aw.call(e.childNodes),v=n.props||Mw,!s&&null!=i)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],"children"==l);else if("dangerouslySetInnerHTML"==l)d=p;else if(!(l in m)){if("value"==l&&"defaultValue"in m||"checked"==l&&"defaultChecked"in m)continue;rC(e,l,null,p,o)}for(l in m)p=m[l],"children"==l?f=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?h=p:"checked"==l?g=p:s&&"function"!=typeof p||v[l]===p||rC(e,l,p,v[l],o);if(c)s||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),Jw("template"==t.type?e.content:e,zw(f)?f:[f],t,n,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":o,i,a,i?i[0]:n.__k&&Kw(n,0),s,u),null!=i)for(l=i.length;l--;)Uw(i[l]);s||(l="value","progress"==y&&null==h?e.removeAttribute("value"):null!=h&&(h!==e[l]||"progress"==y&&!h||"option"==y&&h!=v[l])&&rC(e,l,h,v[l],o),l="checked",null!=g&&g!=e[l]&&rC(e,l,g,v[l],o))}return e}function cC(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){xw.__e(e,n)}}function dC(e,t,n){var r,o;if(xw.unmount&&xw.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||cC(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){xw.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&dC(r[o],t,n||"function"!=typeof e.type);n||Uw(e.__e),e.__c=e.__=e.__e=void 0}function fC(e,t,n){return this.constructor(e,n)}function pC(e,t,n){var r,o,i,a;t==document&&(t=document.documentElement),xw.__&&xw.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],a=[],iC(t,e=(!r&&n||t).__k=Vw(Gw,null,[e]),o||Mw,Mw,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Aw.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),sC(i,e,a)}Aw=jw.slice,xw={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},Tw=0,Ow=function(e){return null!=e&&null==e.constructor},qw.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=$w({},this.state),"function"==typeof e&&(e=e($w({},n),this.props)),e&&$w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Xw(this))},qw.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Xw(this))},qw.prototype.render=Gw,Nw=[],kw="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Fw=function(e,t){return e.__v.__b-t.__v.__b},Zw.__r=0,Pw=/(PointerCapture)$|Capture$/i,Iw=0,_w=oC(!1),Rw=oC(!0),Lw=0;var hC,gC,vC,mC,yC,bC,EC,wC,CC,DC,SC,AC=Object.freeze({__proto__:null,Component:qw,Fragment:Gw,cloneElement:function(e,t,n){var r,o,i,a,s=$w({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&null!=a?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Aw.call(arguments,2):n),Ww(e.type,s,r||e.key,o||e.ref,null)},createContext:function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,Xw(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+Lw++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},createElement:Vw,createRef:function(){return{current:null}},h:Vw,hydrate:function e(t,n){pC(t,n,e)},get isValidElement(){return Ow},get options(){return xw},render:pC,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(zw(t)?t.some(function(t){e(t,n)}):n.push(t)),n}}),xC=w(AC);function TC(){if(mC)return vC;mC=1;const e=gC?hC:(gC=1,hC=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return vC=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function OC(){if(wC)return EC;wC=1;const e=bw();return EC=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function NC(){if(DC)return CC;DC=1;var e=xC;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=TC(),i=bC?yC:(bC=1,yC=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=OC();var s=r("updateUI");class u extends a{constructor(){super(...arguments),Object.defineProperty(this,s,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,s)[s]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=o,t||(t=Promise.resolve().then(()=>(t=null,e(...n)))),t}}(t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())}),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof u)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins(t=>{t instanceof e&&(c=t)})}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let d=`Invalid target option given to ${a}.`;throw d+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(d)}update(e){var n,r;null!=this.el&&(null==(n=(r=t(this,s))[s])||n.call(r,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}return CC=u}var BC,kC,FC,PC,IC,_C,RC,LC,MC,jC,HC=(SC||(SC=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=_E();e.exports=Sw();const r=NC();t.UIPlugin=r;const o=OC();t.BasePlugin=o;const i=Sw();t.Uppy=i;const a=NC(),s=OC();i.Uppy=i,i.UIPlugin=a,i.BasePlugin=s,i.debugLogger=n.debugLogger}(PE,PE.exports)),PE.exports),zC=E(HC),$C={};function UC(){if(kC)return BC;kC=1;class e extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}return BC=e}function VC(){if(jC)return MC;let e;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}jC=1;var n=0;function r(e){return"__private_"+n+++"_"+e}const o=function(){if(PC)return FC;PC=1;const e=UC();return FC=function(){return fetch(...arguments).catch(t=>{throw"AbortError"===t.name?t:new e(t)})},FC}(),i=function(){if(_C)return IC;_C=1;const e=yw();class t extends Error{constructor(t,n){void 0===n&&(n={}),super(t),this.cause=n.cause,this.cause&&e(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}return IC=t}(),a=function(){if(LC)return RC;LC=1;class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}return RC=e}();async function s(e){if(401===e.status)throw new a;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var u=r("companionHeaders"),l=r("getPostResponseFunc"),c=r("getUrl"),d=r("errorHandler");e=Symbol.for("uppy test: getCompanionHeaders");class f{constructor(e,n){Object.defineProperty(this,d,{value:h}),Object.defineProperty(this,c,{value:p}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,t(this,u)[u]=null==n?void 0:n.companionHeaders}setCompanionHeaders(e){t(this,u)[u]=e}[e](){return t(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...f.defaultHeaders,...t(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(t(this,c)[c](e),{method:"OPTIONS"}).then(e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map(e=>e.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then(e=>{let[t,n]=e;return Object.keys(n).forEach(e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])}),n})}get(e,n){return this.preflightAndHeaders(e).then(n=>o(t(this,c)[c](e),{method:"get",headers:n,credentials:this.opts.companionCookiesRule||"same-origin"})).then(t(this,l)[l](n)).then(s).catch(t(this,d)[d]("get",e))}post(e,n,r){const i="post";return this.preflightAndHeaders(e).then(r=>o(t(this,c)[c](e),{method:i,headers:r,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)})).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}delete(e,n,r){const i="delete";return this.preflightAndHeaders(e).then(t=>o(`${this.hostname}/${e}`,{method:i,headers:t,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null})).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}}function p(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function h(e,n){return r=>{var o;return null!=(o=r)&&o.isAuthError||(r=new i(`Could not ${e} ${t(this,c)[c](n)}`,{cause:r})),Promise.reject(r)}}return f.VERSION="2.2.2",f.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${f.VERSION}`},MC=f}var WC,GC,qC,KC,YC,XC,ZC,JC,QC={};function eD(){if(WC)return QC;return WC=1,Object.defineProperty(QC,"__esModule",{value:!0}),QC.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},QC.removeItem=function(e){return new Promise(t=>{localStorage.removeItem(e),t()})},QC.setItem=function(e,t){return new Promise(n=>{localStorage.setItem(e,t),n()})},QC}function tD(){if(JC)return $C;JC=1,Object.defineProperty($C,"__esModule",{value:!0}),$C.Socket=$C.SearchProvider=$C.RequestClient=$C.Provider=void 0;const e=VC();$C.RequestClient=e;const t=function(){if(qC)return GC;qC=1;var e=eD();const t=VC();return GC=class extends t{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}})}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then(e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(e=>{let[t]=e;return t})}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const e=n.companionAllowedHosts;if(!("string"==typeof e||Array.isArray(e)||e instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=e}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||e}},GC}();$C.Provider=t;const n=function(){if(YC)return KC;YC=1;const e=VC();return KC=class extends e{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}},KC}();$C.SearchProvider=n;const r=function(){if(ZC)return XC;let e,t;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}ZC=1;var r=0;function o(e){return"__private_"+r+++"_"+e}const i=Ew();var a=o("queued"),s=o("emitter"),u=o("isOpen"),l=o("socket"),c=o("handleMessage");return e=Symbol.for("uppy test: getSocket"),t=Symbol.for("uppy test: getQueued"),XC=class{constructor(e){Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,s,{writable:!0,value:i()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[e](){return n(this,l)[l]}[t](){return n(this,a)[a]}open(){n(this,l)[l]=new WebSocket(this.opts.target),n(this,l)[l].onopen=()=>{for(n(this,u)[u]=!0;n(this,a)[a].length>0&&n(this,u)[u];){const e=n(this,a)[a].shift();this.send(e.action,e.payload)}},n(this,l)[l].onclose=()=>{n(this,u)[u]=!1},n(this,l)[l].onmessage=n(this,c)[c]}close(){var e;null==(e=n(this,l)[l])||e.close()}send(e,t){n(this,u)[u]?n(this,l)[l].send(JSON.stringify({action:e,payload:t})):n(this,a)[a].push({action:e,payload:t})}on(e,t){n(this,s)[s].on(e,t)}emit(e,t){n(this,s)[s].emit(e,t)}once(e,t){n(this,s)[s].once(e,t)}},XC}();return $C.Socket=r,$C}var nD,rD,oD,iD,aD,sD,uD,lD,cD,dD,fD,pD,hD,gD,vD,mD,yD,bD={};function ED(){if(nD)return bD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}nD=1,Object.defineProperty(bD,"__esModule",{value:!0}),bD.internalRateLimitedQueue=bD.RateLimitedQueue=void 0;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("activeRequests"),o=n("queuedHandlers"),i=n("paused"),a=n("pauseTimer"),s=n("downLimit"),u=n("upperLimit"),l=n("rateLimitingTimer"),c=n("call"),d=n("queueNext"),f=n("next"),p=n("queue"),h=n("dequeue"),g=n("resume"),v=n("increaseLimit");function m(t){e(this,r)[r]+=1;let n,o=!1;try{n=t()}catch(t){throw e(this,r)[r]-=1,t}return{abort:()=>{o||(o=!0,e(this,r)[r]-=1,n(),e(this,d)[d]())},done:()=>{o||(o=!0,e(this,r)[r]-=1,e(this,d)[d]())}}}function y(){queueMicrotask(()=>e(this,f)[f]())}function b(){if(e(this,i)[i]||e(this,r)[r]>=this.limit)return;if(0===e(this,o)[o].length)return;const t=e(this,o)[o].shift(),n=e(this,c)[c](t.fn);t.abort=n.abort,t.done=n.done}function E(t,n){void 0===n&&(n={});const r={fn:t,priority:n.priority||0,abort:()=>{e(this,h)[h](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=e(this,o)[o].findIndex(e=>r.priority>e.priority);return-1===i?e(this,o)[o].push(r):e(this,o)[o].splice(i,0,r),r}function w(t){const n=e(this,o)[o].indexOf(t);-1!==n&&e(this,o)[o].splice(n,1)}bD.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,h,{value:w}),Object.defineProperty(this,p,{value:E}),Object.defineProperty(this,f,{value:b}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,c,{value:m}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,i,{writable:!0,value:!1}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,s,{writable:!0,value:1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(e(this,i)[i])e(this,l)[l]=setTimeout(e(this,v)[v],0);else{e(this,s)[s]=this.limit,this.limit=Math.ceil((e(this,u)[u]+e(this,s)[s])/2);for(let t=e(this,s)[s];t<=this.limit;t++)e(this,d)[d]();e(this,u)[u]-e(this,s)[s]>3?e(this,l)[l]=setTimeout(e(this,v)[v],2e3):e(this,s)[s]=Math.floor(e(this,s)[s]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,n){return!e(this,i)[i]&&e(this,r)[r]<this.limit?e(this,c)[c](t):e(this,p)[p](t,n)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const s=new Promise((r,i)=>{a=n.run(()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then(e=>{t?i(t):(a.done(),r(e))},e=>{t?i(t):(a.done(),i(e))}),()=>{t=new Error("Cancelled")}},t)});return s.abort=()=>{a.abort()},s}}resume(){e(this,i)[i]=!1,clearTimeout(e(this,a)[a]);for(let t=0;t<this.limit;t++)e(this,d)[d]()}pause(t){void 0===t&&(t=null),e(this,i)[i]=!0,clearTimeout(e(this,a)[a]),null!=t&&(e(this,a)[a]=setTimeout(e(this,g)[g],t))}rateLimit(t){clearTimeout(e(this,l)[l]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(e(this,u)[u]=this.limit-1,this.limit=e(this,s)[s],e(this,l)[l]=setTimeout(e(this,v)[v],t))}get isPaused(){return e(this,i)[i]}};const C=Symbol("__queue");return bD.internalRateLimitedQueue=C,bD}function wD(){return vD?gD:(vD=1,gD={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}})}var CD=function(){if(yD)return mD;yD=1;var e=RE(),t=tD(),n=ED();const r=OC(),o=function(){if(oD)return rD;oD=1;const e=tb();return rD=e(function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))},300,{leading:!0,trailing:!0})}(),i=aD?iD:(aD=1,iD=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}),a=uD?sD:(uD=1,sD=function(e){const t=[],n=[];function r(e){t.push(e)}function o(e){n.push(e)}return Promise.all(e.map(e=>e.then(r,o))).then(()=>({successful:t,failed:n}))}),s=function(){if(cD)return lD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}cD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("emitter"),o=n("events");return lD=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,n){return e(this,o)[o].push([t,n]),e(this,r)[r].on(t,n)}remove(){for(const[t,n]of e(this,o)[o].splice(0))e(this,r)[r].off(t,n)}}}(),u=function(){if(fD)return dD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}fD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("aliveTimer"),o=n("isDone"),i=n("onTimedOut"),a=n("timeout");return dD=class{constructor(t,n){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:!1}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),e(this,a)[a]=t,e(this,i)[i]=n}progress(){e(this,o)[o]||e(this,a)[a]>0&&(clearTimeout(e(this,r)[r]),e(this,r)[r]=setTimeout(e(this,i)[i],e(this,a)[a]))}done(){e(this,o)[o]||(clearTimeout(e(this,r)[r]),e(this,r)[r]=null,e(this,o)[o]=!0)}}}(),l=UC(),c=hD?pD:(hD=1,pD=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}),d=wD();function f(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),c(e)?(n=new l(n,e),n):(n.request=e,n)}function p(e){return e.data.slice(0,e.data.size,e.meta.type)}class h extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=d;const r={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(t){e.log(t)}return n},getResponseError(e,t){let n=new Error("Upload error");return c(t)&&(n=new l(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts={...r,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),n.internalRateLimitedQueue in this.opts?this.requests=this.opts[n.internalRateLimitedQueue]:this.requests=new n.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach(n=>{e.append(n,t[n])})}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=p(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach(e=>{const t=this.getOptions(e),r=p(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)}),n}upload(t,n,r){const o=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise((n,r)=>{this.uppy.emit("upload-started",t);const i=o.formData?this.createFormDataUpload(t,o):t.data,a=new XMLHttpRequest;let l;this.uploaderEvents[t.id]=new s(this.uppy);const c=new u(o.timeout,()=>{a.abort(),l.done();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-error",t,e),r(e)}),d=(0,e.nanoid)();a.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${d} started`)}),a.upload.addEventListener("progress",e=>{this.uppy.log(`[XHRUpload] ${d} progress: ${e.loaded} / ${e.total}`),c.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})}),a.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${d} finished`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),o.validateStatus(a.status,a.responseText,a)){const e=o.getResponseData(a.responseText,a),r=e[o.responseUrlFieldName],i={status:a.status,body:e,uploadURL:r};return this.uppy.emit("upload-success",t,i),r&&this.uppy.log(`Download ${t.name} from ${r}`),n(t)}const e=o.getResponseData(a.responseText,a),i=f(a,o.getResponseError(a.responseText,a)),s={status:a.status,body:e};return this.uppy.emit("upload-error",t,i,s),r(i)}),a.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${d} errored`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const e=f(a,o.getResponseError(a.responseText,a));return this.uppy.emit("upload-error",t,e),r(e)}),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),l=this.requests.run(()=>{this.uppy.emit("upload-started",t);const e=this.getOptions(t);return Object.keys(e.headers).forEach(t=>{a.setRequestHeader(t,e.headers[t])}),a.send(i),()=>{c.done(),a.abort()}}),this.onFileRemove(t.id,()=>{l.abort(),r(new Error("File removed"))}),this.onCancelAll(t.id,e=>{let{reason:t}=e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))})})}uploadRemote(e){const n=this.getOptions(e);return new Promise((r,a)=>{this.uppy.emit("upload-started",e);const u={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(e.meta)).forEach(t=>{u[t]=e.meta[t]});new(e.remote.providerOptions.provider?t.Provider:t.RequestClient)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:u,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then(u=>{const{token:l}=u,c=i(e.remote.companionUrl),d=new t.Socket({target:`${c}/api/${l}`,autoOpen:!1});let f;this.uploaderEvents[e.id]=new s(this.uppy),this.onFileRemove(e.id,()=>{d.send("cancel",{}),f.abort(),r(`upload ${e.id} was removed`)}),this.onCancelAll(e.id,function(t){let{reason:n}=void 0===t?{}:t;"user"===n&&(d.send("cancel",{}),f.abort()),r(`upload ${e.id} was canceled`)}),this.onRetry(e.id,()=>{d.send("pause",{}),d.send("resume",{})}),this.onRetryAll(e.id,()=>{d.send("pause",{}),d.send("resume",{})}),d.on("progress",t=>o(this,t,e)),d.on("success",t=>{const o=n.getResponseData(t.response.responseText,t.response),i=o[n.responseUrlFieldName],a={status:t.response.status,body:o,uploadURL:i};return this.uppy.emit("upload-success",e,a),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r()}),d.on("error",t=>{const r=t.response,o=r?n.getResponseError(r.responseText,r):Object.assign(new Error(t.error.message),{cause:t.error});this.uppy.emit("upload-error",e,o),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),a(o)}),f=this.requests.run(()=>(d.open(),e.isPaused&&d.send("pause",{}),()=>d.close()))}).catch(t=>{this.uppy.emit("upload-error",e,t),a(t)})})}uploadBundle(e){return new Promise((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),s=new XMLHttpRequest,l=t=>{e.forEach(e=>{this.uppy.emit("upload-error",e,t)})},c=new u(this.opts.timeout,()=>{s.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(e),n(e)});s.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),c.progress()}),s.upload.addEventListener("progress",t=>{c.progress(),t.lengthComputable&&e.forEach(e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})})}),s.addEventListener("load",r=>{if(c.done(),this.opts.validateStatus(r.target.status,s.responseText,s)){const n=this.opts.getResponseData(s.responseText,s),o={status:r.target.status,body:n};return e.forEach(e=>{this.uppy.emit("upload-success",e,o)}),t()}const o=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return o.request=s,l(o),n(o)}),s.addEventListener("error",()=>{c.done();const e=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return l(e),n(e)}),this.uppy.on("cancel-all",function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(c.done(),s.abort())}),s.open(o.toUpperCase(),r,!0),s.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(e=>{s.setRequestHeader(e,this.opts.headers[e])}),s.send(a),e.forEach(e=>{this.uppy.emit("upload-started",e)})})}uploadFiles(e){const t=e.map((t,n)=>{const r=parseInt(n,10)+1,o=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,o):this.upload(t,r,o)});return a(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",n=>{e===n.id&&t(n.id)})}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",()=>{this.uppy.getFile(e)&&t()})}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",function(){n.uppy.getFile(e)&&t(...arguments)})}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[n.internalRateLimitedQueue]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map(e=>this.uppy.getFile(e));if(this.opts.bundle){if(t.some(e=>e.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}return h.VERSION="2.1.3",mD=h}(),DD=E(CD);function SD(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,f=void 0!==d&&d,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,E=void 0===b?function(e){return e}:b,w=e.onSuccess,C=void 0===w?function(e,t){}:w,D=e.onError,S=void 0===D?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:D,A=e.onProgress,x=void 0===A?function(e){}:A;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var T=n;f&&(T=function(e,t){var n=Pp(e.split("#"),2),r=n[0],o=n[1],i=[];Up(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}(T,c));var O=new zC(Np({onBeforeUpload:E,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c},e.uppyConfig)).use(DD,Np({endpoint:T,headers:h,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:y},e.xhrConfig));return O.on("complete",function(e){var t=e.successful[0],n=t.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{C(t,o)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}}),O.on("progress",function(e){e<1||x(e)}),O.on("upload-error",function(e,t,n){try{S(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}}),O.on("restriction-failed",function(e,t){try{S(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}}),O}Ny("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),Ny("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var AD,xD,TD,OD,ND,BD,kD,FD,PD,ID,_D,RD,LD,MD,jD,HD={};function zD(){if(xD)return AD;xD=1;var e=A();return AD=Array.isArray||function(t){return"Array"===e(t)}}function $D(){if(OD)return TD;OD=1;var e=S(),t=C(),n=ye(),r=kr(),o=$t(),i=xn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=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 f.sham=!0,TD=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function UD(){if(BD)return ND;BD=1;var e=zD(),t=$D(),n=be(),r=me()("species"),o=Array;return ND=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},ND}function VD(){if(FD)return kD;FD=1;var e=UD();return kD=function(t,n){return new(e(t))(0===n?0:n)}}function WD(){if(RD)return _D;RD=1;var e=C();return _D=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})}}function GD(){if(MD)return LD;MD=1;var e=function(){if(ID)return PD;ID=1;var e=qo(),t=S(),n=x(),r=de(),o=Qt(),i=VD(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),w=n(E),C=o(w),D=e(g,v),S=0,A=m||i,x=s?A(h,C):u||f?A(h,0):void 0;C>S;S++)if((p||S in w)&&(b=D(y=w[S],S,E),t))if(s)x[S]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return PD={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}().forEach,t=WD()("forEach");return LD=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},LD}!function(){if(jD)return HD;jD=1;var e=B(),t=di(),n=fi(),r=GD(),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)}();Ny("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"},formatPainter:{title:"Format Painter"}}),Ny("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"},formatPainter:{title:"格式刷"}});var qD={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>".concat(t,"</blockquote>")}},KD='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',YD='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',XD='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',ZD=function(){function e(){this.title=ky("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!gv.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Pp(Dp.Editor.nodes(e,{match:function(e){var t=gv.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1);return!t[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";Dp.Transforms.setNodes(e,{type:n},{mode:"highest"})}},e}(),JD={key:"blockquote",factory:function(){return new ZD}};function QD(e){return 0===Hh("<div>".concat(e,"</div>")).children().filter(function(e){return"BR"!==e.tagName}).length}function eS(e){return 0===e.length?"":e[0].outerHTML}function tS(e){return e.length?e[0].tagName.toLowerCase():""}function nS(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}ng&&(Hh.fn.css=ng),ug&&(Hh.fn.append=ug),lg&&(Hh.fn.prepend=lg),zh&&(Hh.fn.addClass=zh),$h&&(Hh.fn.removeClass=$h),Uh&&(Hh.fn.hasClass=Uh),Yh&&(Hh.fn.on=Yh),Xh&&(Hh.fn.off=Xh),bg&&(Hh.fn.focus=bg),Vh&&(Hh.fn.attr=Vh),Wh&&(Hh.fn.removeAttr=Wh),eg&&(Hh.fn.hide=eg),tg&&(Hh.fn.show=tg),dg&&(Hh.fn.parents=dg),qh&&(Hh.fn.dataset=qh),Kh&&(Hh.fn.val=Kh),ag&&(Hh.fn.text=ag),ig&&(Hh.fn.html=ig),pg&&(Hh.fn.children=pg),hg&&(Hh.fn.remove=hg),fg&&(Hh.fn.find=fg),Zh&&(Hh.fn.width=Zh),Jh&&(Hh.fn.height=Jh),og&&(Hh.fn.filter=og),gg&&(Hh.fn.empty=gg);var rS={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e);return 0===(t=t.filter(function(e){return!!Dp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}};function oS(e){e.deleteBackward("character");Dp.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var iS={type:"blockquote",renderElem:function(e,t,n){return iE("blockquote",null,t)}},aS={renderElems:[iS],elemsToHtml:[qD],parseElemsHtml:[rS],menus:[JD],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(null==o)return t();var i=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"blockquote")},universal:!0}),1),a=i[0];if(!a)return t();var s=a[0];if(gv.getParentNode(e,s)){var u=gv.findPath(e,s),l=Dp.Editor.end(e,u);if(Dp.Point.equals(l,o.focus)){var c=Dp.Editor.last(e,l.path),d=Dp.Node.string(c[0]);if(d&&"\n"===d.slice(-1))return void oS(r)}n("\n")}else oS(r)},r}};var sS={type:"code",elemToHtml:function(e,t){return"<code>".concat(t,"</code>")}};var uS={type:"pre",elemToHtml:function(e,t){return"<pre>".concat(t,"</pre>")}},lS=function(){function e(){this.title=ky("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=gv.getSelectedNodeByType(e,"code");if(null==t)return null;var n=gv.getParentNode(e,t);return null==n||"pre"!==gv.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t){var n=e.getMenuConfig("codeSelectLang").codeLangs,r=(void 0===n?[]:n).find(function(e){return e.selected});return(null==r?void 0:r.value)||""}return t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=gv.getSelectedElems(e);return!!t.some(function(t){return e.isVoid(t)})||!t.some(function(e){var t=gv.getNodeType(e);return"pre"===t||"paragraph"===t})},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=Dp.Node.string(t);Dp.Transforms.removeNodes(e,{mode:"highest"});var r=n.split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}});Dp.Transforms.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,o=[],i=Dp.Editor.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=Fp(i),s=a.next();!s.done;s=a.next()){var u=Pp(s.value,1)[0];u&&o.push(Dp.Node.string(u))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}Dp.Transforms.removeNodes(e,{mode:"highest"});var l={type:"pre",children:[{type:"code",language:t,children:[{text:o.join("\n")}]}]};Dp.Transforms.insertNodes(e,l,{mode:"highest"})},e}();var cS={selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e);return 0===(t=t.filter(function(e){return"code"===gv.getNodeType(e)})).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(e){return"code"===gv.getNodeType(e)})}}};var dS={type:"pre",renderElem:function(e,t,n){return iE("pre",null,t)}},fS={type:"code",renderElem:function(e,t,n){return iE("code",null,t)}},pS={menus:[{key:"codeBlock",factory:function(){return new lS}}],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData,o=e.handleTab,i=e;return i.insertBreak=function(){var e=gv.getSelectedNodeByType(i,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=Dp.Node.string(e),o=n.anchor.offset,i=r.slice(0,o).split("\n"),a=i.length;return 0===a?"":i[a-1]}(e,i);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var o=r[0];return void i.insertText("\n".concat(o))}}i.insertText("\n")}else t()},e.handleTab=function(){var t=e.selection;if(t){var n=gv.getSelectedNodeByType(e,"code");if(n&&!Dp.Range.isCollapsed(t)){var r=Pp([t.anchor,t.focus].sort(function(e,t){return e.offset-t.offset}),2),i=r[0],a=r[1],s=n.children[0].text,u=s.split("\n"),l=s.slice(0,i.offset).split("\n").length-1,c=s.slice(0,a.offset).split("\n").length-1,d=u.map(function(e,t){return t>=l&&t<=c?" ".concat(e):e}),f=d.join("\n"),p={anchor:{path:i.path,offset:i.offset+2},focus:{path:a.path,offset:a.offset+2}};Dp.Transforms.insertText(e,f,{at:{anchor:{path:i.path,offset:0},focus:{path:a.path,offset:s.length}}}),Dp.Transforms.select(e,p)}else o()}},i.normalizeNode=function(e){var t=Pp(e,2),r=t[0],o=t[1],a=gv.getNodeType(r);("code"===a&&o.length<=1&&Dp.Transforms.setNodes(i,{type:"paragraph"},{at:o}),"pre"===a)&&(gv.isLastNode(i,r)&&Dp.Transforms.insertNodes(i,gv.genEmptyParagraph(),{at:[o[0]+1]}),"code"!==gv.getNodeType(r.children[0])&&(Dp.Transforms.unwrapNodes(i),Dp.Transforms.setNodes(i,{type:"paragraph"},{mode:"highest"})));return n([r,o])},i.insertData=function(e){if(null!=gv.getSelectedNodeByType(i,"code")){var t=e.getData("text/plain");Dp.Editor.insertText(i,t)}else r(e)},i},renderElems:[dS,fS],elemsToHtml:[sS,uS],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=Hh(e);if("code"!==tS(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:Hh(e)[0].textContent||""}]}}},cS]},hS=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=Dp.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Pp(Dp.Editor.nodes(e,{match:function(t){return"pre"===gv.getNodeType(t)||!!Dp.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=Hh('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var o=Hh(r).attr("data-value");"0"===o?Dp.Editor.removeMark(e,t):Dp.Editor.addMark(e,t,o)}}),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var o=this.getValue(e),i=e.getMenuConfig(t).colors;(void 0===i?[]:i).forEach(function(e){var t=Hh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=Hh('<li data-value="'.concat(e,'"></li>'));o===e&&n.addClass("active"),n.append(t),r.append(n)});var a="";"color"===t&&(a=ky("color.default")),"bgColor"===t&&(a=ky("color.clear"));var s=Hh('\n <li data-value="0" class="clear">\n '.concat('<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',"\n ").concat(a,"\n </li>\n "));return r.prepend(s),r[0]},e}(),gS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("color.bgColor"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',t.mark="bgColor",t}return Op(t,e),t}(hS),vS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("color.color"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',t.mark="color",t}return Op(t,e),t}(hS),mS=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"];var yS={selector:"font",preParseHtml:function(e){var t=Hh(e);if("font"!==tS(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}};function bS(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var ES={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&bS(i,{color:r}),o&&bS(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!Dp.Text.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((QD(t)||"span"!==tS(n=Hh(t)))&&(n=Hh("<span>".concat(t,"</span>"))),o&&n.css("color",o),i&&n.css("background-color",i),eS(n)):t},preParseHtml:[yS],parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Text.isText(t))return t;var o=t,i=nS(r,"color");i&&(o.color=i);var a=nS(r,"background-color");return a||(a=nS(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new vS},config:{colors:mS}},{key:"bgColor",factory:function(){return new gS},config:{colors:mS}}]},wS=function(){function e(){this.title=ky("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!Dp.Range.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];Dp.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(Dp.Editor.start(e,r))}},e}(),CS={menus:[{key:"enter",factory:function(){return new wS}}]};var DS={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},SS=function(){function e(){this.title=ky("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!gv.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=gv.getNodeType(t);return"table"===n||"pre"===n})},e.prototype.exec=function(e,t){gv.isSelectedEmptyParagraph(e)&&Dp.Transforms.removeNodes(e,{mode:"highest"}),Dp.Transforms.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}();var AS={renderElems:[{type:"divider",renderElem:function(e,t,n){return jb("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:gv.isNodeSelected(n,e)?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[jb("hr")])}}],elemsToHtml:[DS],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new SS}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=Pp(e,2),o=t[0],i=t[1];if("divider"!==gv.getNodeType(o))return n([o,i]);gv.isLastNode(r,o)&&Dp.Transforms.insertNodes(r,gv.genEmptyParagraph(),{at:[i[0]+1]})},r}};var xS=function(){function e(){this.title=ky("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Pp(Dp.Editor.nodes(e,{match:function(t){return"pre"===gv.getNodeType(t)||!!Dp.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=Hh('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=Hh(n).text();e.insertText(r)}}),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach(function(e){var t=Hh("<li>".concat(e,"</li>"));n.append(t)}),n[0]},e}(),TS={menus:[{key:"emotion",factory:function(){return new xS},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]};var OS=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=Dp.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Pp(Dp.Editor.nodes(e,{match:function(t){return"pre"===gv.getNodeType(t)||!!Dp.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),NS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("fontFamily.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',t.mark="fontFamily",t.selectPanelWidth=150,t}return Op(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:ky("fontFamily.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}});var o=this.getValue(e),i=!1;return t.forEach(function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0}),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}(OS),BS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return Op(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:ky("fontSize.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r})}});var o=this.getValue(e),i=!1;return t.forEach(function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0}),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}(OS);var kS={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"};var FS={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&bS(i,{fontSize:r}),o&&bS(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!Dp.Text.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((QD(t)||"span"!==tS(n=Hh(t)))&&(n=Hh("<span>".concat(t,"</span>"))),o&&n.css("font-size",o),i&&n.css("font-family",i),eS(n)):t},preParseHtml:[{selector:"font",preParseHtml:function(e){var t=Hh(e);if("font"!==tS(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",kS[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}}],parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Text.isText(t))return t;var o=t,i=nS(r,"font-size");i&&(o.fontSize=i);var a=nS(r,"font-family").replace(/"/g,"");return a&&(o.fontFamily=a),o},menus:[{key:"fontSize",factory:function(){return new BS},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new NS},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]};var PS=function(){function e(){this.title=ky("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(t){return e.attrs.isSelect},e.prototype.isDisabled=function(e){return!1},e.prototype.setFormatHtml=function(t){var n,r;if(t.getSelectionText().length){if(e.attrs.formatStyle){!function(e){var t=Dp.Editor.marks(e);t&&Object.keys(t).forEach(function(t){e.removeMark(t)})}(t);try{for(var o=Fp(Object.entries(e.attrs.formatStyle)),i=o.next();!i.done;i=o.next()){var a=Pp(i.value,2),s=a[0],u=a[1];t.addMark(s,u)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}e.attrs.formatStyle=null,e.attrs.isSelect=!1}},e.prototype.exec=function(t){e.attrs.isSelect?(e.attrs.isSelect=!1,e.attrs.formatStyle=null):t.getSelectionText().length&&(e.attrs.formatStyle=Dp.Editor.marks(t),e.attrs.isSelect=!0);t.blur(),t.focus()},e.attrs={isSelect:!1,formatStyle:null},e}();var IS={menus:[{key:"formatPainter",factory:function(){return new PS}}],editorPlugin:function(e){var t=new PS,n=e.onChange,r=e,o=function(){t.setFormatHtml(r),document.removeEventListener("mouseup",o)};return r.onChange=function(){n(),PS.attrs.isSelect&&(document.removeEventListener("mouseup",o),document.addEventListener("mouseup",o))},r}},_S=function(){function e(){this.title=ky("fullScreen.title"),this.iconSvg=XD,this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.getIcon=function(e){return e.isFullScreen?XD:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},e.prototype.getTitle=function(e){return e.isFullScreen?ky("fullScreen.title"):ky("fullScreen.cancelTitle")},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),RS={menus:[{key:"fullScreen",factory:function(){return new _S}}]};function LS(e){return function(t,n){return"<h".concat(e,">").concat(n,"</h").concat(e,">")}}var MS={type:"header1",elemToHtml:LS(1)},jS={type:"header2",elemToHtml:LS(2)},HS={type:"header3",elemToHtml:LS(3)},zS={type:"header4",elemToHtml:LS(4)},$S={type:"header5",elemToHtml:LS(5)},US={type:"header6",elemToHtml:LS(6)};function VS(e){var t=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.getNodeType(e).startsWith("header")},universal:!0}),1),n=t[0];if(null==n)return"paragraph";var r=Pp(n,1)[0];return gv.getNodeType(r)}function WS(e){if(null==e.selection)return!0;var t=Pp(Dp.Editor.nodes(e,{match:function(e){var t=gv.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1);return!t[0]}function GS(e,t){t&&Dp.Transforms.setNodes(e,{type:t})}var qS=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return VS(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return WS(e)},e.prototype.exec=function(e,t){var n=this.type;GS(e,t===n?"paragraph":n)},e}(),KS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="H1",t.type="header1",t}return Op(t,e),t}(qS),YS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="H2",t.type="header2",t}return Op(t,e),t}(qS),XS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="H3",t.type="header3",t}return Op(t,e),t}(qS),ZS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="H4",t.type="header4",t}return Op(t,e),t}(qS),JS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="H5",t.type="header5",t}return Op(t,e),t}(qS),QS=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="H6",t.type="header6",t}return Op(t,e),t}(qS),eA=function(){function e(){this.title=ky("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(e){var t=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:ky("header.text")}],n=this.getValue(e).toString();return t.forEach(function(e){e.value===n?e.selected=!0:e.selected=void 0}),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return VS(e)},e.prototype.isDisabled=function(e){return WS(e)},e.prototype.exec=function(e,t){GS(e,t.toString())},e}(),tA={key:"headerSelect",factory:function(){return new eA}},nA={key:"header1",factory:function(){return new KS}},rA={key:"header2",factory:function(){return new YS}},oA={key:"header3",factory:function(){return new XS}},iA={key:"header4",factory:function(){return new ZS}},aA={key:"header5",factory:function(){return new JS}},sA={key:"header6",factory:function(){return new QS}};function uA(e){return function(t,n,r){var o=Hh(t);return 0===(n=n.filter(function(e){return!!Dp.Text.isText(e)||!!r.isInline(e)})).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header".concat(e),children:n}}}var lA={selector:"h1:not([data-w-e-type])",parseElemHtml:uA(1)},cA={selector:"h2:not([data-w-e-type])",parseElemHtml:uA(2)},dA={selector:"h3:not([data-w-e-type])",parseElemHtml:uA(3)},fA={selector:"h4:not([data-w-e-type])",parseElemHtml:uA(4)},pA={selector:"h5:not([data-w-e-type])",parseElemHtml:uA(5)},hA={selector:"h6:not([data-w-e-type])",parseElemHtml:uA(6)};function gA(e){return function(t,n,r){return iE("h".concat(e),null,n)}}var vA={renderElems:[{type:"header1",renderElem:gA(1)},{type:"header2",renderElem:gA(2)},{type:"header3",renderElem:gA(3)},{type:"header4",renderElem:gA(4)},{type:"header5",renderElem:gA(5)},{type:"header6",renderElem:gA(6)}],elemsToHtml:[MS,jS,HS,zS,$S,US],parseElemsHtml:[lA,cA,dA,fA,pA,hA],menus:[tA,nA,rA,oA,iA,aA,sA],editorPlugin:function(e){var t=e.insertBreak,n=e;return n.insertBreak=function(){var r=Pp(Dp.Editor.nodes(n,{match:function(e){return gv.getNodeType(e).startsWith("header")},universal:!0}),1),o=r[0];if(o)if(gv.isSelectionAtLineEnd(e,o[1])){Dp.Transforms.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else t();else t()},n}};var mA={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=void 0===o?"":o,a=n.href,s=void 0===a?"":a,u=n.width,l=void 0===u?"":u,c=n.height,d=void 0===c?"":c,f=n.style,p=void 0===f?{}:f,h=p.width,g=void 0===h?"":h,v=p.height,m=void 0===v?"":v,y="";return g&&(y+="width: ".concat(g,";")),m&&(y+="height: ".concat(m,";")),'<img src="'.concat(r,'" alt="').concat(i,'" data-href="').concat(s,'" width="').concat(l,'" height="').concat(d,'" style="').concat(y,'"/>')}};var yA=function(){function e(){this.title=ky("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==gv.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||Dp.Transforms.removeNodes(e,{match:function(e){return gv.checkNodeType(e,"image")}})},e}();function bA(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(wg())}function EA(e){return e.replace(/</g,"<").replace(/>/g,">")}function wA(e){var t=e.selection;if(null==t)return!0;if(!Dp.Range.isCollapsed(t))return!0;var n=Pp(Dp.Editor.nodes(e,{match:function(t){var n=gv.getNodeType(t);return"code"===n||("pre"===n||("link"===n||("list-item"===n||(!!n.startsWith("header")||("blockquote"===n||!!Dp.Editor.isVoid(e,t))))))},universal:!0}),1);return!!n[0]}function CA(e,t,n){return Bp(this,arguments,void 0,function(e,t,n,r,o){var i,a;return void 0===r&&(r=""),void 0===o&&(o=""),kp(this,function(s){switch(s.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if("string"==typeof(a=s.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];s.label=2;case 2:return[2,!0]}})})}function DA(e,t,n){return Bp(this,void 0,void 0,function(){var r;return kp(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function SA(e,t){return Bp(this,arguments,void 0,function(e,t,n,r){var o,i,a;return void 0===n&&(n=""),void 0===r&&(r=""),kp(this,function(s){switch(s.label){case 0:return[4,CA("insertImage",e,t,n,r)];case 1:return s.sent()?[4,DA("insertImage",e,t)]:[2];case 2:return o=s.sent(),i={type:"image",src:EA(o),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),gv.getSelectedNodeByType(e,"image")&&e.move(1),wA(e)?[2]:(Dp.Transforms.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i),[2])}})})}function AA(){return bA("w-e-edit-image")}var xA=function(){function e(){this.title=ky("image.edit"),this.iconSvg=KD,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=AA(),this.altInputId=AA(),this.hrefInputId=AA(),this.buttonId=AA()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return gv.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||null==gv.getSelectedNodeByType(e,"image"))},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=this.getImageNode(e);if(null==s)throw new Error("Not found selected image node");var u=Pp($y(ky("image.src"),r),2),l=u[0],c=Hh(u[1]),d=Pp($y(ky("image.desc"),o),2),f=d[0],p=Hh(d[1]),h=Pp($y(ky("image.link"),i),2),g=h[0],v=Hh(h[1]),m=Pp(Uy(a,ky("common.ok")),1)[0];if(null==this.$content){var y=Hh("<div></div>");y.on("click","#".concat(a),function(n){n.preventDefault();var a=y.find("#".concat(r)).val(),s=y.find("#".concat(o)).val(),u=y.find("#".concat(i)).val();t.updateImage(e,a,s,u),e.hidePanelOrModal()}),this.$content=y}var b=this.$content;b.empty(),b.append(l),b.append(f),b.append(g),b.append(m);var E=s,w=E.src,C=E.alt,D=void 0===C?"":C,S=E.href,A=void 0===S?"":S;return c.val(w),p.val(D),v.val(A),setTimeout(function(){c.focus()}),b[0]},e.prototype.updateImage=function(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t){Bp(this,arguments,void 0,function(e,t,n,r,o){var i,a,s,u,l,c;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),kp(this,function(d){switch(d.label){case 0:return[4,CA("editImage",e,t,n,r)];case 1:return d.sent()?[4,DA("editImage",e,t)]:[2];case 2:return i=d.sent(),null==(a=gv.getSelectedNodeByType(e,"image"))||(s=a.style,u={src:i,alt:n,href:r,style:Np(Np({},void 0===s?{}:s),o)},Dp.Transforms.setNodes(e,u,{match:function(e){return gv.checkNodeType(e,"image")}}),l=gv.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l)),[2]}})})}(e,t,n,r,o))},e}();function TA(){return bA("w-e-insert-image")}var OA=function(){function e(){this.title=ky("image.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=TA(),this.heightInputId=TA(),this.buttonId=TA()}return e.prototype.getSelectedImageNode=function(e){return gv.getSelectedNodeByType(e,"image")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedImageNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Pp($y(ky("image.width"),n,"auto"),2),a=i[0],s=Hh(i[1]),u=Pp($y(ky("image.height"),r,"auto"),2),l=u[0],c=Hh(u[1]),d=Pp(Uy(o,ky("image.ok")),1)[0],f=this.getSelectedImageNode(e);if(null==this.$content){var p=Hh("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u=function(e){return/^\d+(\.\d+)?px$/.test(e)},l="auto",c="auto";a(o)?l=o:s(o)?l="".concat(parseInt(o,10),"px"):u(o)&&(l=o),a(i)?c=i:s(i)?c="".concat(parseInt(i,10),"px"):u(i)&&(c=i);var d=f.style,h=void 0===d?{}:d;e.restoreSelection();var g=Np(Np({},h),{style:{width:l,height:c}});Dp.Transforms.setNodes(e,g,{match:function(e){return gv.checkNodeType(e,"image")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"auto":m,b=v.height,E=void 0===b?"auto":b;return s.val(y),c.val(E),setTimeout(function(){s.focus()}),h[0]},e}();function NA(){return bA("w-e-insert-image")}var BA=function(){function e(){this.title=ky("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=NA(),this.altInputId=NA(),this.hrefInputId=NA(),this.buttonId=NA()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return wA(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=Pp($y(ky("image.src"),r),2),u=s[0],l=Hh(s[1]),c=Pp($y(ky("image.desc"),o),2),d=c[0],f=Hh(c[1]),p=Pp($y(ky("image.link"),i),2),h=p[0],g=Hh(p[1]),v=Pp(Uy(a,ky("common.ok")),1)[0];if(null==this.$content){var m=Hh("<div></div>");m.on("click","#".concat(a),function(n){n.preventDefault();var a=m.find("#".concat(r)).val().trim(),s=m.find("#".concat(o)).val().trim(),u=m.find("#".concat(i)).val().trim();t.insertImage(e,a,s,u),e.hidePanelOrModal()}),this.$content=m}var y=this.$content;return y.empty(),y.append(u),y.append(d),y.append(h),y.append(v),l.val(""),f.val(""),g.val(""),setTimeout(function(){l.focus()}),y[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||SA(e,t,n,r))},e}(),kA=function(){function e(){this.title=ky("image.viewLink"),this.iconSvg=YD,this.tag="button"}return e.prototype.getValue=function(e){var t=gv.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '".concat(t,"'"));window.open(t,"_blank")}},e}(),FA=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return gv.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=gv.getHoverbar(e);r&&r.hideAndClean();var o=n.style,i={style:Np(Np({},void 0===o?{}:o),{width:this.value,height:""})};Dp.Transforms.setNodes(e,i,{match:function(e){return gv.checkNodeType(e,"image")}})}}},e}(),PA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="30%",t.value="30%",t}return Op(t,e),t}(FA),IA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="50%",t.value="50%",t}return Op(t,e),t}(FA),_A=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title="100%",t.value="100%",t}return Op(t,e),t}(FA),RA={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}};function LA(e,t){var n=gv.findKey(e,t).id;return"w-e-image-container-".concat(n)}function MA(e,t,n,r){var o=Hh("body"),i=LA(e,t),a=r.width,s=r.height,u=0,l=0,c=0,d=0,f=!1,p=null;var h=nb(function(e){e.preventDefault();var t=e.clientX,n=l+(f?u-t:t-u),r=c*(n/l);n>d-6||null!=p&&(n<=15||r<=15||(p.css("width","".concat(n,"px")),p.css("height","".concat(r,"px"))))},100);function g(n){if(o.off("mousemove",h),null!=p){var r=p.width().toFixed(2),i=p.height().toFixed(2),a={style:Np(Np({},t.style),{width:"".concat(r,"px"),height:"".concat(i,"px")})};Dp.Transforms.setNodes(e,a,{at:gv.findPath(e,t)}),o.off("mouseup",g)}}function v(t,n){p=function(){var e=Hh("#".concat(i));if(0===e.length)throw new Error("Cannot find image container elem");return e}(),u=t,d=n;var r=p.find("img");if(0===r.length)throw new Error("Cannot find image elem");l=r.width(),c=r.height(),o.on("mousemove",h),o.on("mouseup",g);var a=gv.getHoverbar(e);a&&a.hideAndClean()}var m={};return a&&(m.width=a),s&&(m.height=s),m.boxShadow="0 0 0 1px #B4D5FF",iE("div",{id:i,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(n){var r=Hh(n.target);if(r.hasClass("w-e-image-dragger")){n.preventDefault(),(r.hasClass("left-top")||r.hasClass("left-bottom"))&&(f=!0);var o=gv.getParentNode(e,t);if(null!=o){var i=gv.toDOMNode(e,o),a=i.getBoundingClientRect?i.getBoundingClientRect():{width:0},s=window.getComputedStyle(i),u=parseFloat(s.paddingLeft),l=parseFloat(s.paddingRight),c=parseFloat(s.borderLeftWidth),d=parseFloat(s.borderRightWidth);v(n.clientX,a.width-u-l-c-d)}}}}},n,iE("div",{className:"w-e-image-dragger left-top"}),iE("div",{className:"w-e-image-dragger right-top"}),iE("div",{className:"w-e-image-dragger left-bottom"}),iE("div",{className:"w-e-image-dragger right-bottom"}))}var jA={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=void 0===i?"":i,s=r.href,u=void 0===s?"":s,l=r.style,c=void 0===l?{}:l,d=c.width,f=void 0===d?"":d,p=c.height,h=void 0===p?"":p,g=gv.isNodeSelected(n,e),v={maxWidth:"100%"};f&&(v.width="100%"),h&&(v.height="100%");var m=iE("img",{style:v,src:o,alt:a,"data-href":u}),y=n.isDisabled();return g&&!y?MA(n,e,m,{width:f,height:h}):function(e,t,n,r){var o=r.width,i=r.height,a={};return o&&(a.width=o),i&&(a.height=i),iE("div",{id:LA(e,t),style:a,className:"w-e-image-container"},n)}(n,e,m,{width:f,height:h})}},HA={renderElems:[jA],elemsToHtml:[mA],parseElemsHtml:[{selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:nS(r,"width"),height:nS(r,"height")},width:r.attr("width")||"",height:r.attr("height")||"",children:[{text:""}]}}}],menus:[{key:"insertImage",factory:function(){return new BA},config:RA},{key:"deleteImage",factory:function(){return new yA}},{key:"editImage",factory:function(){return new xA},config:RA},{key:"viewImageLink",factory:function(){return new kA}},{key:"imageWidth30",factory:function(){return new PA}},{key:"imageWidth50",factory:function(){return new IA}},{key:"imageWidth100",factory:function(){return new _A}},{key:"editorImageSizeMenu",factory:function(){return new OA}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid,r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},zA=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=Pp(Dp.Editor.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return null==n?"":Pp(n,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=Pp(Dp.Editor.nodes(e,{match:function(e){var t=gv.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e}(),$A=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return Op(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){Dp.Transforms.setNodes(e,{indent:null},{match:function(e){return Dp.Element.isElement(e)}})},t}(zA),UA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t.DEFAULT_INDENT_VALUE="2em",t}return Op(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.getIndentValue=function(e){var t=this.getMatchNode(e);if(!t)return this.DEFAULT_INDENT_VALUE;var n=t.children.filter(Dp.Text.isText)[0];if(!n||!n.fontSize)return this.DEFAULT_INDENT_VALUE;var r=n.fontSize,o=parseInt(n.fontSize,10),i=r.replace("".concat(o),"");return"".concat(2*o).concat(i)},t.prototype.exec=function(e,t){var n=this.getIndentValue(e);Dp.Transforms.setNodes(e,{indent:n},{match:function(e){return Dp.Element.isElement(e)},mode:"highest"})},t}(zA);var VA={renderStyle:function(e,t){if(!Dp.Element.isElement(e))return t;var n=e.indent,r=t;return n&&bS(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!Dp.Element.isElement(e))return t;var n=e.indent;if(!n)return t;var r=Hh(t);return r.css("text-indent",n),eS(r)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=Hh(e),n=nS(t,"padding-left");return/^[1-9]\d*em$/.test(n)&&t.css("text-indent","2em"),/^[1-9]\d*px$/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}}],parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Element.isElement(t))return t;var o=t,i=nS(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new UA}},{key:"delIndent",factory:function(){return new $A}}]},WA=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!gv.getSelectedElems(e).some(function(t){var n=t.type;return!(!Dp.Editor.isVoid(e,t)||!Dp.Editor.isBlock(e,t)||"video"===n)||!!["pre","code"].includes(n)})},e}(),GA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("justify.center"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return Op(t,e),t.prototype.exec=function(e,t){Dp.Transforms.setNodes(e,{textAlign:"center"},{match:function(t){return Dp.Element.isElement(t)&&!e.isInline(t)}})},t}(WA),qA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return Op(t,e),t.prototype.exec=function(e,t){Dp.Transforms.setNodes(e,{textAlign:"justify"},{match:function(t){return Dp.Element.isElement(t)&&!e.isInline(t)}})},t}(WA),KA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("justify.left"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return Op(t,e),t.prototype.exec=function(e,t){Dp.Transforms.setNodes(e,{textAlign:"left"},{match:function(t){return Dp.Element.isElement(t)&&!e.isInline(t)}})},t}(WA),YA=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("justify.right"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return Op(t,e),t.prototype.exec=function(e,t){Dp.Transforms.setNodes(e,{textAlign:"right"},{match:function(t){return Dp.Element.isElement(t)&&!e.isInline(t)}})},t}(WA);var XA={renderStyle:function(e,t){if(!Dp.Element.isElement(e))return t;var n=e.textAlign,r=t;return n&&bS(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!Dp.Element.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=Hh(t);return r.css("text-align",n),eS(r)},parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Element.isElement(t))return t;var o=t,i=nS(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new KA}},{key:"justifyRight",factory:function(){return new YA}},{key:"justifyCenter",factory:function(){return new GA}},{key:"justifyJustify",factory:function(){return new qA}}]};var ZA=function(){function e(){this.title=ky("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:ky("lineHeight.default"),value:""}),r.forEach(function(e){t.push({text:e,value:e})});var o=this.getValue(e);return t.forEach(function(e){e.value===o?e.selected=!0:e.selected=void 0}),t},e.prototype.getMatchNode=function(e){var t=Pp(Dp.Editor.nodes(e,{match:function(e){var t=gv.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":Dp.Element.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){Dp.Transforms.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}();var JA={renderStyle:function(e,t){if(!Dp.Element.isElement(e))return t;var n=e.lineHeight,r=t;return n&&bS(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!Dp.Element.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=Hh(t);return r.css("line-height",n),eS(r)},parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Element.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===i?[]:i,s=nS(r,"line-height");return s&&a.includes(s)&&(o.lineHeight=s),o},menus:[{key:"lineHeight",factory:function(){return new ZA},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]};var QA={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target,i=void 0===o?"_blank":o;return'<a href="'.concat(r,'" target="').concat(i,'">').concat(t,"</a>")}};function ex(e,t,n,r){return Bp(this,void 0,void 0,function(){var o,i;return kp(this,function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if("string"==typeof(i=a.sent()))return t.alert(i,"error"),[2,!1];if(null==i)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function tx(e,t,n){return Bp(this,void 0,void 0,function(){var r;return kp(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function nx(e){return null==e.selection||!!gv.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)})}function rx(e,t){return{type:"link",url:EA(e),children:t?[{text:t}]:[]}}function ox(e,t,n){return Bp(this,void 0,void 0,function(){var r,o,i,a,s;return kp(this,function(u){switch(u.label){case 0:return n?(t||(t=n),e.restoreSelection(),nx(e)?[2]:[4,ex("insertLink",e,t,n)]):[2];case 1:return u.sent()?[4,tx("insertLink",e,n)]:[2];case 2:if(r=u.sent(),null==(o=e.selection))return[2];if(Dp.Range.isCollapsed(o)){if((a=gv.getLeftLengthOfMaxLength(e))<=0)return[2];e.insertText(" "),a<t.length+1&&(t=t.slice(0,a-1)),s=rx(r,t),Dp.Transforms.insertNodes(e,s),e.insertFragment([{text:" "}])}else if((i=Dp.Editor.string(e,o))!==t){if((a=gv.getLeftLengthOfMaxLength(e))<=0)return[2];a<i.length-t.length&&(t=t.slice(0,a)),e.deleteFragment(),s=rx(r,t),Dp.Transforms.insertNodes(e,s)}else s=rx(r),Dp.Transforms.wrapNodes(e,s,{split:!0}),Dp.Transforms.collapse(e,{edge:"end"});return[2]}})})}function ix(){return bA("w-e-update-link")}var ax=function(){function e(){this.title=ky("link.edit"),this.iconSvg=KD,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=ix(),this.buttonId=ix()}return e.prototype.getSelectedLinkElem=function(e){var t=gv.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return gv.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=Pp($y(ky("link.url"),t),2),o=r[0],i=Hh(r[1]),a=Pp(Uy(n,ky("common.ok")),1)[0];if(null==this.$content){var s=Hh("<div></div>");s.on("click","#".concat(n),function(n){n.preventDefault(),e.restoreSelection();var r=gv.getSelectedNodeByType(e,"link"),o=r?Dp.Node.string(r):"",i=s.find("#".concat(t)).val();!function(e,t,n){Bp(this,void 0,void 0,function(){var r,o;return kp(this,function(i){switch(i.label){case 0:return n?[4,ex("editLink",e,t,n)]:[2];case 1:return i.sent()?[4,tx("editLink",e,n)]:[2];case 2:return r=i.sent(),o={url:EA(r)},Dp.Transforms.setNodes(e,o,{match:function(e){return gv.checkNodeType(e,"link")}}),[2]}})})}(e,o,i),e.hidePanelOrModal()}),this.$content=s}var u=this.$content;u.empty(),u.append(o),u.append(a);var l=this.getValue(e);return i.val(l),setTimeout(function(){i.focus()}),u[0]},e}();function sx(){return bA("w-e-insert-link")}var ux=function(){function e(){this.title=ky("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=sx(),this.urlInputId=sx(),this.buttonId=sx()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return nx(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,o=n.urlInputId,i=n.buttonId,a=Pp($y(ky("link.text"),r),2),s=a[0],u=Hh(a[1]),l=Pp($y(ky("link.url"),o),2),c=l[0],d=Hh(l[1]),f=Pp(Uy(i,ky("common.ok")),1)[0];if(null==this.$content){var p=Hh("<div></div>");p.on("click","#".concat(i),function(t){t.preventDefault();var n=p.find("#".concat(r)).val(),i=p.find("#".concat(o)).val();ox(e,n,i),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(s),h.append(c),h.append(f),null==t||Dp.Range.isCollapsed(t))u.val("");else{var g=Dp.Editor.string(e,t);u.val(g)}return d.val(""),setTimeout(function(){u.focus()}),h[0]},e}(),lx=function(){function e(){this.title=ky("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==gv.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||Dp.Transforms.unwrapNodes(e,{match:function(e){return gv.checkNodeType(e,"link")}})},e}(),cx=function(){function e(){this.title=ky("link.view"),this.iconSvg=YD,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=gv.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '".concat(t,"'"));window.open(t,"_blank")}},e}(),dx={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},fx={key:"insertLink",factory:function(){return new ux},config:dx},px={key:"editLink",factory:function(){return new ax},config:dx},hx={key:"unLink",factory:function(){return new lx}},gx={key:"viewLink",factory:function(){return new cx}};var vx,mx,yx={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e);return 0===(t=t.filter(function(e){return!!Dp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};var bx=E(function(){if(mx)return vx;mx=1,vx=function(r){if("string"!=typeof r)return!1;var o=r.match(e);if(!o)return!1;var i=o[1];if(!i)return!1;if(t.test(i)||n.test(i))return!0;return!1};var e=/^(?:\w+:)?\/\/(\S+)$/,t=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;return vx}());var Ex={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target;return iE("a",{href:o,target:void 0===i?"_blank":i},t)}},wx={renderElems:[Ex],elemsToHtml:[QA],parseElemsHtml:[yx],menus:[fx,px,hx,gx],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode,o=e;return o.isInline=function(e){return"link"===e.type||t(e)},o.insertData=function(e){var t=e.getData("text/plain");if(bx(t)){if(/<img[^>]+>/.test(e.getData("text/html")))n(e);else if(!nx(o)){var r=o.selection;if(null!=r){var i=Dp.Editor.string(o,r);ox(o,i,t)}}}else n(e)},o.normalizeNode=function(e){var t=Pp(e,2),n=t[0],i=t[1];return"link"!==gv.getNodeType(n)?r([n,i]):""===Dp.Node.string(n)?Dp.Transforms.removeNodes(o,{at:i}):r([n,i])},o}};var Cx={selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e);return 0===(t=t.filter(function(e){return!!Dp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}};function Dx(e){var t=Pp(Dp.Editor.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1),n=t[0];if(null==n)return!1;var r=n[0];if(!Dp.Element.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==Dp.Node.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!Dp.Text.isText(i[0])&&(Dp.Transforms.setNodes(e,{type:"paragraph"}),!0)}var Sx={type:"paragraph",renderElem:function(e,t,n){return iE("p",null,t)}},Ax={renderElems:[Sx],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>".concat(t,"</p>")}}],parseElemsHtml:[Cx],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward,r=e;return r.deleteBackward=function(e){Dx(r)||t(e)},r.deleteForward=function(e){Dx(r)||n(e)},r}};function xx(e,t){if(null==e.selection)return!0;var n=Pp(Dp.Editor.nodes(e,{match:function(t){return"pre"===gv.getNodeType(t)||!!Dp.Editor.isVoid(e,t)},universal:!0}),1);return!!n[0]}function Tx(e,t){Object.keys(t).forEach(function(t){"text"!==t&&Dp.Editor.removeMark(e,t)})}var Ox=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=Dp.Editor.marks(e);if(n)return n[t];var r=Pp(Dp.Editor.nodes(e,{match:function(e){return!0===e[t]}}),1);return!!r[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return xx(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach(function(t){return e.removeMark(t)}))},e}(),Nx=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="bold",t.title=ky("textStyle.bold"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',t.hotkey="mod+b",t}return Op(t,e),t}(Ox),Bx=function(){function e(){this.title=ky("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return xx(e)},e.prototype.exec=function(e,t){var n,r,o=Dp.Editor.nodes(e,{match:function(e){return Dp.Text.isText(e)},universal:!0});try{for(var i=Fp(o),a=i.next();!a.done;a=i.next()){Tx(e,a.value[0])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e}(),kx=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="code",t.title=ky("textStyle.code"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',t.hotkey="mod+e",t}return Op(t,e),t}(Ox),Fx=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="italic",t.title=ky("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return Op(t,e),t}(Ox),Px=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=ky("textStyle.sub"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return Op(t,e),t}(Ox),Ix=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=ky("textStyle.sup"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return Op(t,e),t}(Ox),_x=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="through",t.title=ky("textStyle.through"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',t.hotkey="mod+shift+x",t}return Op(t,e),t}(Ox),Rx=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.mark="underline",t.title=ky("textStyle.underline"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',t.hotkey="mod+u",t}return Op(t,e),t}(Ox);function Lx(e,t){return 0!==e.length&&(!!e[0].matches(t)||e.find(t).length>0)}function Mx(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline,s=r.code,u=r.through,l=r.sub,c=r.sup;return o&&(n="<strong>".concat(n,"</strong>")),s&&(n="<code>".concat(n,"</code>")),i&&(n="<em>".concat(n,"</em>")),a&&(n="<u>".concat(n,"</u>")),u&&(n="<s>".concat(n,"</s>")),l&&(n="<sub>".concat(n,"</sub>")),c&&(n="<sup>".concat(n,"</sup>")),n}var jx={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,s=n.through,u=n.sub,l=n.sup,c=t;return r&&(c=iE("strong",null,c)),a&&(c=iE("code",null,c)),o&&(c=iE("em",null,c)),i&&(c=iE("u",null,c)),s&&(c=iE("s",null,c)),u&&(c=iE("sub",null,c)),l&&(c=iE("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new Nx}},{key:"underline",factory:function(){return new Rx}},{key:"italic",factory:function(){return new Fx}},{key:"through",factory:function(){return new _x}},{key:"code",factory:function(){return new kx}},{key:"sub",factory:function(){return new Px}},{key:"sup",factory:function(){return new Ix}},{key:"clearStyle",factory:function(){return new Bx}}],styleToHtml:function(e,t){if(!Dp.Text.isText(e))return t;if(QD(t))return Mx(e,t);var n=Hh(t),r=n.html();return r=Mx(e,r),n.html(r),eS(n)},parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Text.isText(t))return t;var o=t;return Lx(r,"b,strong")&&(o.bold=!0),Lx(r,"i,em")&&(o.italic=!0),Lx(r,"u")&&(o.underline=!0),Lx(r,"s,strike")&&(o.through=!0),Lx(r,"sub")&&(o.sub=!0),Lx(r,"sup")&&(o.sup=!0),Lx(r,"code")&&(o.code=!0),o}};var Hx={type:"todo",elemToHtml:function(e,t){var n=e.checked;return'<div data-w-e-type="todo"><input type="checkbox" disabled '.concat(n?"checked":"",">").concat(t,"</div>")}},zx=function(){function e(){this.title=ky("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!gv.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!gv.getSelectedElems(e).some(function(t){if(Dp.Editor.isVoid(e,t)&&Dp.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)})},e.prototype.exec=function(e,t){var n=this.isActive(e);Dp.Transforms.setNodes(e,{type:n?"paragraph":"todo"})},e}();var $x={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=Hh(e);0===(t=t.filter(function(e){return!!Dp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(o=!0),{type:"todo",checked:o,children:t}}};var Ux={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=iE("div",{style:{margin:"5px 0"}},iE("span",{contentEditable:!1,style:{marginRight:"0.5em"}},iE("input",{type:"checkbox",checked:e.checked,disabled:r,on:{change:function(t){var r=gv.findPath(n,e),o={checked:t.target.checked};Dp.Transforms.setNodes(n,o,{at:r})}}})),iE("span",null,t));return o}},Vx={renderElems:[Ux],elemsToHtml:[Hx],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=Hh(e).find("li"),n=Hh('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML+=t[0].innerHTML,n[0]}}],parseElemsHtml:[$x],menus:[{key:"todo",factory:function(){return new zx}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&Dp.Range.isCollapsed(r)){var o=gv.getSelectedNodeByType(e,"todo");if(o&&0===Dp.Node.string(o).length)return void Dp.Transforms.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},Wx=function(){function e(){this.title=ky("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),Gx=function(){function e(){this.title=ky("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),qx=[jx,ES,FS,VA,XA,JA,HA,AS,TS,wx,pS,aS,vA,Ax,Vx,IS,{menus:[{key:"redo",factory:function(){return new Wx}},{key:"undo",factory:function(){return new Gx}}]},RS,CS];Ny("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),Ny("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var Kx=new WeakMap;function Yx(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];Dp.Text.isText(i)&&(t=i)}return null==t?"":t.color||""}function Xx(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=gv.findPath(e,t);;){if(0===a.length||0===a[a.length-1])return null;a=Dp.Path.previous(a);var s=Dp.Editor.node(e,a);if(!s)return null;var u=Pp(s,1)[0],l=u.level,c=void 0===l?0:l;if(gv.getNodeType(u)!==r)return null;if(c===i)return u}}function Zx(e,t,n){var r=Xx(e,t,n);return!!r&&r.ordered===t.ordered}var Jx=[];var Qx={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=Kx.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=gv.findPath(t,e);if(0===u[0])return s+1;var l=Dp.Path.previous(u),c=Dp.Editor.node(t,l);if(!c)return 0;var d=Pp(c,1)[0];if(gv.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?Zx(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),Jx.push(i);var u=function(e){var t=Kx.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=gv.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=Dp.Path.next(u),c=Dp.Editor.node(t,l);if(!c)return 0;var d=Pp(c,1)[0];if(gv.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?Zx(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=Jx.pop();r+="</".concat(l,">")}var c=Yx(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},eT=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return gv.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!gv.getSelectedElems(e).some(function(t){if(Dp.Editor.isVoid(e,t)&&Dp.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})},e.prototype.exec=function(e,t){this.isActive(e)?Dp.Transforms.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):Dp.Transforms.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),tT=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.ordered=!1,t.title=ky("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return Op(t,e),t}(eT),nT=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.ordered=!0,t.title=ky("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return Op(t,e),t}(eT),rT={key:"bulletedList",factory:function(){return new tT}},oT={key:"numberedList",factory:function(){return new nT}};function iT(e){return e.length?e[0].tagName.toLowerCase():""}ug&&(Hh.fn.append=ug),Vh&&(Hh.fn.attr=Vh),cg&&(Hh.fn.parent=cg);var aT={selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e);0===(t=t.filter(function(e){return!!Dp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===iT(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=iT(n);"ul"===r||"ol"===r;)r=iT(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}};var sT={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}};function uT(e){return Dp.Editor.nodes(e,{at:e.selection||void 0,match:function(t){return 1===gv.findPath(e,t).length}})}var lT={type:"list-item",renderElem:function(e,t,n){Kx.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=gv.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=Dp.Path.previous(c),f=Dp.Editor.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);return iE("div",{style:u},iE("span",{contentEditable:!1,style:{marginRight:"0.5em",color:Yx(e)},"data-w-e-reserve":!0},l),iE("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},cT={renderElems:[lT],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void Dp.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(Dp.Range.isExpanded(r))t(n);else{var o=gv.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=Xx(e,o,u-1);d&&d.ordered!==c?Dp.Transforms.setNodes(i,{level:u-1,ordered:!c}):Dp.Transforms.setNodes(i,{level:u-1})}else Dp.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(Dp.Range.isCollapsed(a)){var s=gv.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void Dp.Transforms.setNodes(i,{level:l+1})}}if(Dp.Range.isExpanded(a)){var c=0,d=!1;try{for(var f=Fp(uT(i)),p=f.next();!p.done;p=f.next()){var h=Pp(p.value,1)[0];"list-item"===gv.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=Fp(uT(i)),v=g.next();!v.done;v=g.next()){var m=Pp(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;Dp.Transforms.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=Pp(e,2),n=t[0],o=t[1],a=gv.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||Dp.Transforms.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[rT,oT],elemsToHtml:[Qx],parseElemsHtml:[sT,aT]};Ny("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Fit width",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),Ny("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"适应宽度",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var dT={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map(function(e){return"<col width=".concat(e,"></col>")}).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},fT={type:"table-row",elemToHtml:function(e,t){var n=e.height,r=n?' style="height: '.concat(n,'px"'):"";return"<tr".concat(r,">").concat(t,"</tr>")}},pT={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden;if(void 0!==d&&d)return"";var f=u?"th":"td";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'">').concat(t,"</").concat(f,">")}},hT='<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',gT={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function vT(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=gT,o=t.map(function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]});return function(e){return function(e){return!Dp.Editor.isEditor(e)&&Dp.Element.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function mT(e,t){for(var n=Pp(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=Pp(Dp.Node.common(e,r,o),2),u=s[0],l=s[1];return!!vT.apply(void 0,Ip([e],Pp(i),!1))(u,l)||!!Dp.Editor.above(e,{match:vT.apply(void 0,Ip([e],Pp(i),!1)),at:l})}function yT(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=Fp(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),kp(this,function(E){switch(E.label){case 0:if(n=Pp(Dp.Editor.nodes(e,{match:vT(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=Pp(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=Fp(Dp.Editor.nodes(e,{match:vT(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=Pp(s.value,2),l=u[1],c=[];try{for(y=void 0,d=Fp(Dp.Editor.nodes(e,{match:vT(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=Pp(f.value,2),h=p[1],c.push(Ip([],Pp(Dp.Editor.nodes(e,{match:vT(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}})}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0,c=0;c<s.length;c+=1)s[c]&&(l=Math.max(l,s[c].length));for(c=0;c<s.length;c+=1)if(u[c]||(u[c]=[]),s[c])for(var d=0;d<s[c].length;d+=1)if(s[c][d]&&s[c][d][0]){for(var f=Pp(s[c][d],1)[0],p=f.rowSpan,h=void 0===p?1:p,g=f.colSpan,v=void 0===g?1:g,m=d;u[c]&&u[c][m];)m+=1;for(var y=0;y<v;y+=1)for(var b=0;b<h;b+=1){var E=c+b,w=m+y;u[E]||(u[E]=[]),u[E][w]||(u[E][w]=[s[c][d],{rtl:y+1,ltr:v-y,ttb:b+1,btt:h-b}])}}o.push.apply(o,Ip([],Pp(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var bT=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function ET(e){return e.length?e[0].tagName.toLowerCase():""}function wT(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}ug&&Hh.fn&&(Hh.fn.append=ug),Yh&&Hh.fn&&(Hh.fn.on=Yh),bg&&Hh.fn&&(Hh.fn.focus=bg),Vh&&Hh.fn&&(Hh.fn.attr=Vh),Kh&&Hh.fn&&(Hh.fn.val=Kh),ig&&Hh.fn&&(Hh.fn.html=ig),qh&&Hh.fn&&(Hh.fn.dataset=qh),zh&&Hh.fn&&(Hh.fn.addClass=zh),$h&&Hh.fn&&(Hh.fn.removeClass=$h),pg&&Hh.fn&&(Hh.fn.children=pg),rg&&Hh.fn&&(Hh.fn.each=rg),fg&&Hh.fn&&(Hh.fn.find=fg),Gh&&Hh.fn&&(Hh.fn.data=Gh),eg&&Hh.fn&&(Hh.fn.hide=eg),tg&&Hh.fn&&(Hh.fn.show=tg);var CT=new WeakMap,DT=new WeakMap,ST=function(){function e(){this.title=ky("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.menu="table",this.borderStyle=[{value:"none",label:ky("tableModule.borderStyle.none")},{value:"solid",label:ky("tableModule.borderStyle.solid")},{value:"dotted",label:ky("tableModule.borderStyle.dotted")},{value:"dashed",label:ky("tableModule.borderStyle.dashed")},{value:"double",label:ky("tableModule.borderStyle.double")},{value:"groove",label:ky("tableModule.borderStyle.groove")},{value:"ridge",label:ky("tableModule.borderStyle.ridge")},{value:"inset",label:ky("tableModule.borderStyle.inset")},{value:"outset",label:ky("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:ky("justify.left"),svg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"center",label:ky("justify.center"),svg:'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"right",label:ky("justify.right"),svg:'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"justify",label:ky("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==gv.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return Pp(Dp.Editor.nodes(e,{match:vT(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=Pp(n,2),o=r[0],i=r[1],a=Hh('<div>\n <label class="babel-container">\n <span>'.concat(ky("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(ky("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(ky("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(ky("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(ky("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each(function(e){Hh(e).val(o[Hh(e).attr("name")])});var s=function(e,t){t?Hh(".color-group-block",e).css("background-color",t).empty():Hh(".color-group-block",e).css("background-color","").html(hT)};return a.find(".color-group").each(function(n){var r=Hh('[type="hidden"]',n).val()||"";s(n,r);var o=Hh(n);o.on("click",function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){Hh('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))})}),a.find("button").on("click",function(){var n=Array.from(a.find("[name]")).reduce(function(e,t){return e[Hh(t).attr("name")]=Hh(t).val(),e},{}),r=CT.get(e);"cell"===t.menu&&(null==r?void 0:r.length)?r.forEach(function(t){t.forEach(function(t){Dp.Transforms.setNodes(e,n,{at:t[0][1]})})}):Dp.Transforms.setNodes(e,n,{at:i}),setTimeout(function(){e.focus()})}),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=Hh('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=Hh(t).attr("data-value");o(n)}});var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach(function(e){var t=Hh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=Hh('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)});var s="";"color"===n&&(s=ky("tableModule.color.default")),"bgColor"===n&&(s=ky("tableModule.color.clear"));var u=Hh('\n <li data-value="" class="clear">\n '.concat(hT,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=Hh('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),AT=function(e){function t(){var t=e.apply(this,Ip([],Pp(arguments),!1))||this;return t.title=ky("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t.menu="cell",t}return Op(t,e),t.prototype.getModalContentNode=function(e){return Pp(Dp.Editor.nodes(e,{match:vT(e,"td")}),1)[0]},t}(ST),xT=function(){function e(){this.title=ky("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||null==gv.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")},universal:!0}),1),r=Pp(n[0],2),o=r[0],i=r[1],a=gv.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)Dp.Transforms.removeNodes(e,{mode:"highest"});else if(null!=gv.getParentNode(e,a)){var u=yT(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Pp(u[c][d],1),p=Pp(f[0],2)[1];if(Dp.Path.equals(i,p)){l=d;break e}}Dp.Editor.withoutNormalizing(e,function(){for(var t,n,r=new Set,o=new Set,i=0;i<u.length;i+=1)if(u[i]&&u[i][l]){var a=Pp(u[i][l],2),s=Pp(a[0],2)[1],c=a[1],d=c.rtl,f=c.ltr,p=c.ttb,h=c.btt,g=s.join(",");if(d>1||f>1||p>1||h>1){var v=i-(p-1),m=l-(d-1);if(v<0||v>=u.length||!u[v]||!u[v][m])continue;var y=Pp(u[v][m],1),b=Pp(y[0],2),E=b[0],w=b[1],C=w.join(",");if(!o.has(C)){o.add(C);var D=E.rowSpan,S=void 0===D?1:D,A=E.colSpan,x=void 0===A?1:A,T=Math.max(x-1,1);Dp.Transforms.setNodes(e,{rowSpan:S,colSpan:T},{at:w})}}else r.add(g)}var O=Array.from(r);O.sort(function(e,t){var n=e.split(",").map(Number),r=t.split(",").map(Number);return n[n.length-2]!==r[r.length-2]?r[r.length-2]-n[n.length-2]:r[r.length-1]-n[n.length-1]});try{for(var N=Fp(O),B=N.next();!B.done;B=N.next()){var k=B.value.split(",").map(Number);try{Dp.Editor.hasPath(e,k)&&Dp.Transforms.removeNodes(e,{at:k})}catch(e){console.warn("删除单元格失败:",k,e)}}}catch(e){t={error:e}}finally{try{B&&!B.done&&(n=N.return)&&n.call(N)}finally{if(t)throw t.error}}var F=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table")},universal:!0}),1),P=F[0];if(P){var I=Pp(P,2),_=I[0],R=I[1],L=_.columnWidths,M=Ip([],Pp(void 0===L?[]:L),!1);M.splice(l,1),Dp.Transforms.setNodes(e,{columnWidths:M},{at:R})}})}}},e}(),TT=function(){function e(){this.title=ky("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||null==gv.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-row")},universal:!0}),1),r=Pp(n[0],2),o=r[0],i=r[1],a=gv.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)Dp.Transforms.removeNodes(e,{mode:"highest"});else{var s=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")},universal:!0}),1),u=Pp(s[0],2)[1],l=yT(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=Pp(l[d][f],1),h=Pp(p[0],2)[1];if(Dp.Path.equals(u,h)){c=d;break e}}Dp.Editor.withoutNormalizing(e,function(){for(var t,n,r=[],o=0;o<l[c].length;o+=1){var a=Pp(l[c][o],2),s=Pp(a[0],1)[0].hidden,u=a[1],d=u.ttb,f=u.btt,p=u.rtl;if(d>1||f>1){var h=c-(d-1);if(h<0||h>=l.length||!l[h]||!l[h][o])continue;var g=Pp(l[h][o],1),v=Pp(g[0],2),m=v[0],y=v[1],b=m,E=b.rowSpan,w=void 0===E?1:E,C=b.colSpan,D=void 0===C?1:C;if(s)Dp.Transforms.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y});else if(1===d&&1===p){if(c+1<l.length&&w>1){var S={type:"table-cell",rowSpan:w-1,colSpan:D,hidden:!1,children:b.children.map(function(e){return Np({},e)})};b.isHeader&&(S.isHeader=b.isHeader),b.width&&(S.width=b.width),b.backgroundColor&&(S.backgroundColor=b.backgroundColor),b.borderWidth&&(S.borderWidth=b.borderWidth),b.borderStyle&&(S.borderStyle=b.borderStyle),b.borderColor&&(S.borderColor=b.borderColor),b.textAlign&&(S.textAlign=b.textAlign),r.push({cell:S,columnIndex:o})}else Dp.Transforms.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}else Dp.Transforms.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}}if(Dp.Transforms.removeNodes(e,{at:i}),r.length>0){var A=i;try{r.sort(function(e,t){return e.columnIndex-t.columnIndex});try{for(var x=Fp(r),T=x.next();!T.done;T=x.next()){var O=T.value,N=O.cell,B=O.columnIndex;try{var k=Ip(Ip([],Pp(A),!1),[B],!1);Dp.Transforms.insertNodes(e,N,{at:k})}catch(t){try{var F=Pp(Dp.Editor.node(e,A),1)[0].children.length,P=Ip(Ip([],Pp(A),!1),[F],!1);Dp.Transforms.insertNodes(e,N,{at:P})}catch(e){console.warn("插入新单元格失败:",e)}}}}catch(e){t={error:e}}finally{try{T&&!T.done&&(n=x.return)&&n.call(x)}finally{if(t)throw t.error}}}catch(e){console.warn("插入新单元格失败:",e)}}})}}},e}(),OT=function(){function e(){this.title=ky("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==gv.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||Dp.Transforms.removeNodes(e,{mode:"highest"})},e}(),NT=function(){function e(){this.title=ky("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return!1},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||null==gv.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=gv.getSelectedNodeByType(e,"table");if(n){var r=n.columnWidths,o=void 0===r?[]:r,i=gv.toDOMNode(e,n).querySelector(".table-container");if(i&&0!==o.length){var a=i.clientWidth,s=o.reduce(function(e,t){return e+t},0),u=o.map(function(e){var t=e/s;return Math.floor(t*a)}),l=e.getMenuConfig("insertTable").minWidth,c=parseInt(String(void 0===l?60:l),10)||60,d=u.map(function(e){return Math.max(c,e)}),f=d.reduce(function(e,t){return e+t},0);if(f>a){var p=a/f,h=d.map(function(e){return Math.max(c,Math.floor(e*p))});v={width:"auto",columnWidths:h};Dp.Transforms.setNodes(e,v,{mode:"highest"})}else{h=Ip([],Pp(d),!1);var g=a-f-1;g>0&&h.length>0&&(h[h.length-1]+=g);v={width:"auto",columnWidths:h};Dp.Transforms.setNodes(e,v,{mode:"highest"})}}else{var v={width:"auto"};Dp.Transforms.setNodes(e,v,{mode:"highest"})}}}},e}();function BT(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function kT(e){return BT(e).every(function(e){return!!e.isHeader})}var FT=function(){function e(){this.title=ky("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;if(null==t)return!0;if(!Dp.Range.isCollapsed(t))return!0;var n=gv.getSelectedNodeByType(e,"table");if(null==n)return!0;try{var r=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")},universal:!0}),1),o=r[0];if(!o)return!0;for(var i=Pp(o,2)[1],a=yT(e),s=-1,u=0;u<a.length;u+=1){for(var l=0;l<a[u].length;l+=1){var c=Pp(a[u][l],1),d=Pp(c[0],2)[1];if(Dp.Path.equals(i,d)){s=l;break}}if(-1!==s)break}if(-1===s)return!0;var f=n.columnWidths,p=(void 0===f?[]:f)[s];if(p&&p<20)return!0}catch(e){return!0}return!1},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")},universal:!0}),1),r=Pp(n[0],2),o=r[0],i=r[1],a=gv.getParentNode(e,o);if(null!=a){var s=gv.getParentNode(e,a);if(null!=s){for(var u=yT(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Pp(u[c][d],1),p=Pp(f[0],2)[1];if(Dp.Path.equals(i,p)){l=d;break}}Dp.Editor.withoutNormalizing(e,function(){for(var t=new Set,n=new Set,r=0;r<u.length;r+=1)if(u[r]&&u[r][l]){var o=Pp(u[r][l],2);Pp(o[0],1);var i=o[1],a=i.rtl,c=i.ltr,d=i.ttb,f=i.btt;if(a>1||c>1||d>1||f>1){var p=r-(d-1),h=l-(a-1);if(p<0||p>=u.length||!u[p]||!u[p][h])continue;var g=Pp(u[p][h],1),v=Pp(g[0],2),m=v[0],y=v[1],b=y.join(",");if(t.has(b))n.add(r);else{t.add(b);var E=m.rowSpan,w=void 0===E?1:E,C=m.colSpan,D=(void 0===C?1:C)+1;m.hidden||Dp.Transforms.setNodes(e,{colSpan:D},{at:y});for(var S=0;S<w;S+=1)n.add(p+S)}}}for(r=0;r<u.length;r+=1)if(!n.has(r)&&u[r]&&u[r][l]){var A={type:"table-cell",children:[{text:""}]};0===r&&kT(s)&&(A.isHeader=!0);var x=Pp(u[r][l],1),T=Pp(x[0],2)[1];Dp.Transforms.insertNodes(e,A,{at:T})}var O=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table")},universal:!0}),1),N=O[0];if(N){var B=Pp(N,2),k=B[0],F=B[1],P=k.columnWidths,I=void 0===P?[]:P,_=Ip([],Pp(I),!1),R=e.getMenuConfig("insertTable").minWidth,L=void 0===R?60:R,M=I[l]||parseInt(L,10)||60,j=Math.floor(M/2),H=M-j;_.splice(l,0,j),_[l+1]=H,Dp.Transforms.setNodes(e,{columnWidths:_},{at:F})}})}}}},e}(),PT=function(){function e(){this.title=ky("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||null==gv.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){var n;if(!this.isDisabled(e)){var r=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")},universal:!0}),1),o=Pp(r[0],2)[1],i=yT(e),a=0;e:for(var s=0;s<i.length;s+=1)for(var u=0;u<i[s].length;u+=1){var l=Pp(i[s][u],1),c=Pp(l[0],2)[1];if(Dp.Path.equals(o,c)){a=s;break e}}var d=(null===(n=i[a])||void 0===n?void 0:n.length)||0;0!==d&&Dp.Editor.withoutNormalizing(e,function(){for(var t=a+1,n=t>=0&&t<i.length,r=[],s=0;n&&s<i[a].length;s+=1){var u=Pp(i[a][s],2)[1],l=u.ttb,c=u.btt;if(l>1||c>1){var f=a-(l-1);if(f<0||f>=i.length||!i[f]||!i[f][s])continue;var p=Pp(i[f][s],1),h=Pp(p[0],2),g=h[0],v=h[1],m=g.rowSpan||1;r.push(s),g.hidden||Dp.Transforms.setNodes(e,{rowSpan:m+1},{at:v})}}for(var y=(e.getMenuConfig("insertTable")||{}).minRowHeight,b={type:"table-row",children:[],height:parseInt((void 0===y?30:y).toString(),10)||30},E=0;E<d;E+=1)if(!r.includes(E)){b.children.push({type:"table-cell",children:[{text:""}]})}var w=Dp.Path.parent(o),C=Dp.Path.next(w);Dp.Transforms.insertNodes(e,b,{at:C})})}},e}();var IT=function(){function e(){this.title=ky("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||!!gv.getSelectedElems(e).some(function(t){var n=gv.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))}))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=Hh('<div class="w-e-panel-content-table"></div>'),r=Hh("<span>0 × 0</span>"),o=Hh("<table></table>"),i=0;i<10;i+=1){for(var a=Hh("<tr></tr>"),s=0;s<10;s+=1){var u=Hh("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",function(e){var t=e.target;if(null!=t){var n=Hh(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each(function(e){Hh(e).children().each(function(e){var t=Hh(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")})})}}),u.on("click",function(n){n.preventDefault();var r=n.target;if(null!=r){var o=Hh(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}})}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(gv.isSelectedEmptyParagraph(e)&&Dp.Transforms.removeNodes(e,{mode:"highest"}),0===e.children.length){Dp.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.minRowHeight,l=void 0===u?30:u,c=i.tableFullWidth,d=i.tableHeader,f=Array(n).fill(parseInt(s,10)||60),p=0;p<t;p+=1){for(var h=[],g=0;g<n;g+=1){var v={type:"table-cell",children:[{text:""}]};0===p&&(v.isHeader=null===(r=null==d?void 0:d.selected)||void 0===r||r),h.push(v)}o.push({type:"table-row",children:h,height:parseInt(l,10)||30})}return{type:"table",width:(null==c?void 0:c.selected)?"100%":"auto",children:o,columnWidths:f}}(e,r,o);Dp.Transforms.insertNodes(e,i,{mode:"highest"})}},e}(),_T={isInTable:function(e,t){return void 0===t&&(t={}),!!Pp(Dp.Editor.nodes(e,{match:vT(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return kp(this,function(l){switch(l.label){case 0:t=CT.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=Pp(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}})},unselect:function(e){DT.delete(e),CT.delete(e)},isSelected:function(e,t){var n=DT.get(e);return!!n&&n.has(t)},hasSelected:function(e){return CT.has(e)}},RT=function(){function e(){this.title=ky("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),_T.unselect(e))},e.prototype.canMerge=function(e){var t=CT.get(e);if(!t||!t.length)return!1;var n=Pp(t[t.length-1][t[t.length-1].length-1],1),r=Pp(n[0],2)[1],o=Pp(t[0][0],1);return!!mT(e,[Pp(o[0],2)[1],r],"table")},e.prototype.merge=function(e){if(this.canMerge(e)){var t=CT.get(e);if(t&&t.length){var n=Pp(t[0][0],1),r=Pp(n[0],2)[1],o=Pp(Dp.Node.children(e,r,{reverse:!0}),1),i=Pp(o[0],2)[1];Dp.Editor.withoutNormalizing(e,function(){for(var n,o,a,s,u,l,c=new Map,d=[],f=1/0,p=-1/0,h=1/0,g=-1/0,v=0;v<t.length;v+=1)for(var m=0;m<t[v].length;m+=1){var y=Pp(t[v][m],2),b=Pp(y[0],2),E=b[0],w=b[1],C=y[1].ttb,D=w.join(",");if(1===C&&!c.has(D)){c.set(D,{path:w,x:v,y:m,element:E});var S=E.rowSpan,A=void 0===S?1:S,x=E.colSpan,T=v,O=v+A-1,N=m,B=m+(void 0===x?1:x)-1;f=Math.min(f,T),p=Math.max(p,O),h=Math.min(h,N),g=Math.max(g,B)}}var k=p-f+1,F=g-h+1;try{for(var P=Fp(c),I=P.next();!I.done;I=P.next()){w=Pp(I.value,2)[1].path;Dp.Path.equals(r,w)||d.push(w)}}catch(e){n={error:e}}finally{try{I&&!I.done&&(o=P.return)&&o.call(P)}finally{if(n)throw n.error}}d.sort(function(e,t){for(var n=0;n<Math.min(e.length,t.length);n+=1)if(e[n]!==t[n])return t[n]-e[n];return t.length-e.length});try{for(var _=Fp(d),R=_.next();!R.done;R=_.next()){w=R.value;try{if(!Dp.Editor.hasPath(e,w))continue;try{for(var L=(u=void 0,Fp(Dp.Node.children(e,w,{reverse:!0}))),M=L.next();!M.done;M=L.next()){var j=Pp(M.value,2)[1];Dp.Transforms.moveNodes(e,{to:Dp.Path.next(i),at:j})}}catch(e){u={error:e}}finally{try{M&&!M.done&&(l=L.return)&&l.call(L)}finally{if(u)throw u.error}}Dp.Transforms.removeNodes(e,{at:w})}catch(e){}}}catch(e){a={error:e}}finally{try{R&&!R.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}Dp.Transforms.setNodes(e,{rowSpan:k,colSpan:F},{at:r})})}}},e}(),LT=function(){function e(){this.title=ky("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")}}),1),n=t[0];if(!n)return!0;var r=Pp(n,1)[0],o=r.rowSpan,i=void 0===o?1:o,a=r.colSpan;return!(i>1||(void 0===a?1:a)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=Pp(Dp.Editor.nodes(e,{match:vT(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=kT(Pp(r,1)[0]),a=Pp(o,2),s=a[0],u=a[1],l=s.rowSpan,c=void 0===l?1:l,d=s.colSpan,f=void 0===d?1:d;1===c&&1===f||Dp.Editor.withoutNormalizing(e,function(){Dp.Transforms.setNodes(e,{rowSpan:1,colSpan:1},{at:u});for(var t=1;t<f;t+=1){var n={type:"table-cell",children:[{text:""}]};0===u[u.length-2]&&i&&(n.isHeader=!0);var r=u.slice(0,-1),o=u[u.length-1]+t,a=Ip(Ip([],Pp(r),!1),[o],!1);try{Dp.Transforms.insertNodes(e,n,{at:a})}catch(t){try{var s=Pp(Dp.Editor.node(e,r),1)[0].children.length,l=Ip(Ip([],Pp(r),!1),[s],!1);Dp.Transforms.insertNodes(e,n,{at:l})}catch(e){console.warn("插入同行单元格失败: ".concat(e instanceof Error?e.message:String(e)))}}}for(var d=1;d<c;d+=1){var p=u[u.length-2]+d,h=Ip(Ip([],Pp(u.slice(0,-2)),!1),[p],!1);try{var g=Pp(Dp.Editor.node(e,h),1)[0];if(!g){console.warn("目标行 ".concat(p," 不存在"));continue}for(t=0;t<f;t+=1){n={type:"table-cell",children:[{text:""}]},o=u[u.length-1]+t,a=Ip(Ip([],Pp(h),!1),[o],!1);try{var v=g.children.length;if(o>=v){var m=Ip(Ip([],Pp(h),!1),[v],!1);Dp.Transforms.insertNodes(e,n,{at:m})}else Dp.Transforms.insertNodes(e,n,{at:a})}catch(t){try{var y=g.children.length;l=Ip(Ip([],Pp(h),!1),[y],!1);Dp.Transforms.insertNodes(e,n,{at:l})}catch(e){console.warn("插入单元格到第".concat(d,"行失败: ").concat(e instanceof Error?e.message:String(e)))}}}}catch(e){console.warn("处理第".concat(d,"行时出错: ").concat(e instanceof Error?e.message:String(e)))}}})}},e}(),MT=function(){function e(){this.title=ky("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=gv.getSelectedNodeByType(e,"table");return null!=t&&kT(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||null==gv.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=gv.getSelectedNodeByType(e,"table");if(null!=r)BT(r).forEach(function(t){return Dp.Transforms.setNodes(e,{isHeader:n},{at:gv.findPath(e,t)})})}},e}(),jT={key:"insertTable",factory:function(){return new IT}},HT={key:"deleteTable",factory:function(){return new OT}},zT={key:"insertTableRow",factory:function(){return new PT}},$T={key:"deleteTableRow",factory:function(){return new TT}},UT={key:"insertTableCol",factory:function(){return new FT}},VT={key:"deleteTableCol",factory:function(){return new xT}},WT={key:"tableHeader",factory:function(){return new MT}},GT={key:"tableFullWidth",factory:function(){return new NT}},qT={key:"mergeTableCell",factory:function(){return new RT}},KT={key:"splitTableCell",factory:function(){return new LT}},YT={key:"setTableProperty",factory:function(){return new ST}},XT={key:"setTableCellProperty",factory:function(){return new AT}};var ZT={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Hh(e);0===(t=t.filter(function(e){return"paragraph"===gv.getNodeType(e)||(!!Dp.Text.isText(e)||!!n.isInline(e))})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===wT(r,"display"),s=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===ET(r),colSpan:o,rowSpan:i,width:s,children:t,hidden:a}}};var JT={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r=Hh(e),o=[],i=0;i<t.length;i+=1){var a=t[i];if("table-cell"===gv.getNodeType(a)){var s=a;if(s.hidden)continue;o.push(s)}}return{type:"table-row",height:parseInt(wT(r,"height")||"0",10)||void 0,children:o}}};var QT,eO={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=Hh(e),a="auto";"100%"===wT(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(wT(i,"height")||"0",10),children:t.filter(function(e){return"table-row"===gv.getNodeType(e)})},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null,c=t[t.length-1].children.length;if(l&&l.length===c)s.columnWidths=Array.from(l).map(function(e){return parseInt(e.getAttribute("width"),10)});else if(u.length>0){var d=[];Array.from(u).forEach(function(e){var t=parseInt(Hh(e).attr("colSpan")||"1",10),n=parseInt(wT(Hh(e),"width")||"90",10);d.push(n);for(var r=1;r<t;r+=1)d.push(90)}),s.columnWidths=d}return s}},tO=null===(QT=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===QT?void 0:QT.getPropertyValue("--w-e-textarea-border-color");function nO(e){var t=e.selection;if(null==t)return!1;var n=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=Pp(r,2)[1],i=Dp.Editor.start(e,o);if(Dp.Point.equals(t.anchor,i))return!0}return!1}function rO(e,t){var n=t.offset;if(0===n)return!1;var r=Dp.Editor.node(e,t);if(!Dp.Text.isText(r[0]))return!1;var o=Dp.Node.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function oO(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=Pp(Dp.Editor.nodes(e,{match:function(e){return gv.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=Dp.Editor.before(e,r)),"forward"===n&&Dp.Editor.isEnd(e,r.anchor,r.anchor.path)&&(a=Dp.Editor.after(e,r)),null==a)return!1;var s=Dp.Editor.above(e,{at:a,match:function(e){return gv.checkNodeType(e,"table-cell")}});if(null==s||null==i||!Dp.Path.equals(s[1],i[1]))return!1;var u=Dp.Editor.node(e,a);if(!Dp.Text.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=Dp.Node.string(u[0]);return"\n\r"===c.slice.apply(c,Ip([],Pp(l),!1))?(Dp.Transforms.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:Dp.Editor.start(e,a.path),focus:Dp.Editor.end(e,a.path)}}),!0):!!rO(e,a)&&(Dp.Transforms.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:Dp.Editor.start(e,a.path),focus:Dp.Editor.end(e,a.path)}}),!0)}function iO(e,t){var n=Dp.Editor.nodes(e,{at:t,match:function(e){return"table"===gv.getNodeType(e)}});return!!Ip([],Pp(n),!1).find(function(){return!0})}function aO(e){var t,n;try{for(var r=Fp(["paragraph","header1","header2","header3","header4","header5","header6","blockquote","list-item","todo","divider"]),o=r.next();!o.done;o=r.next()){var i=o.value;if(gv.getSelectedNodeByType(e,i))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!1}var sO={selector:"table",preParseHtml:function(e){var t=Hh(e);if("table"!==ET(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");t.append(r),n.remove();for(var o=t.find("td, th"),i=0;i<o.length;i+=1){var a=(u=Hh(o[i])).attr("style");if(a){/display\s*:\s*none/i.test(a)&&u.remove()}u.attr("width","auto")}var s=t.find("td, th");for(i=0;i<s.length;i+=1){var u,l=(u=Hh(s[i])).html()||"";l=(l=(l=l.replace(/<o:p[^>]*>[\s\S]*?<\/o:p>/gi,"")).replace(/<\/o:p>/gi,"")).replace(/<p[^>]*>([\s\S]*?)<\/p>/gi,function(e,t){var n=t.trim();return n&&" "!==n?t:""}),u.html(l)}return t[0]}};function uO(e){var t,n,r=[],o=0;try{for(var i=Fp(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function lO(e){var t,n,r=[],o=e.reduce(function(e,t){return e+t},0);try{for(var i=Fp(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var cO=null;var dO=!1,fO=!1,pO=0,hO=null,gO=Hh(window);gO.on("mousedown",function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))dO=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===hO)return;fO=!0;var n=e.clientX;pO=n,document.body.style.cursor="col-resize",e.preventDefault()}gO.on("mousemove",vO),gO.on("mouseup",mO)});var vO=nb(function(e){if(fO&&null!==hO){e.preventDefault();var t,n=e.clientX,r=n-pO,o=Pp(Dp.Editor.nodes(hO,{match:vT(hO,"table")}),1),i=Pp(o[0],1)[0],a=i.columnWidths,s=void 0===a?[]:a,u=i.resizingIndex,l=void 0===u?-1:u,c=gv.getSelectedNodeByType(hO,"table"),d=gv.toDOMNode(hO,c).querySelector(".table");if(d)t=function(e,t,n,r,o){var i=Ip([],Pp(e),!1);if(t<0||t>=e.length)return i;var a=o.getMenuConfig("insertTable").minWidth,s=parseInt((void 0===a?60:a).toString(),10)||60,u=n-(0===t?0:r[t-1]),l=Math.max(s,u);return i[t]=Math.floor(100*l)/100,i}(s,l,n-d.getBoundingClientRect().left,uO(s),hO);else t=function(e,t,n,r){var o=Ip([],Pp(e),!1),i=r.getMenuConfig("insertTable").minWidth,a=parseInt((void 0===i?60:i).toString(),10)||60,s=o[t],u=Math.max(a,s+n);return o[t]=Math.floor(100*u)/100,o}(s,l,r,hO);Dp.Transforms.setNodes(hO,{columnWidths:t},{mode:"highest"})}},100);function mO(e){dO=!1,fO=!1,hO=null,document.body.style.cursor="",gO.off("mousemove",vO),gO.off("mouseup",mO)}function yO(e,t){"mouseenter"===t.type?Dp.Transforms.setNodes(e,{isResizing:!0},{mode:"highest"}):Dp.Transforms.setNodes(e,{isResizing:!1},{mode:"highest"})}function bO(e){var t,n,r=[],o=0;try{for(var i=Fp(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var EO=!1,wO=0,CO=null,DO=Hh(window);var SO=nb(function(e){if(EO&&null!==CO){e.preventDefault();var t,n=e.clientY,r=n-wO,o=Pp(Dp.Editor.nodes(CO,{match:vT(CO,"table")}),1),i=Pp(o[0],1)[0],a=i.children,s=i.resizingRowIndex,u=void 0===s?-1:s,l=a.map(function(e){return e.height||30}),c=gv.getSelectedNodeByType(CO,"table"),d=gv.toDOMNode(CO,c).querySelector(".table");if(d)t=function(e,t,n,r,o){var i=Ip([],Pp(e),!1);if(t<0||t>=e.length)return i;var a=(o.getMenuConfig("insertTable")||{}).minRowHeight,s=parseInt((void 0===a?30:a).toString(),10)||30,u=n-(0===t?0:r[t-1]),l=Math.max(s,u);return i[t]=Math.floor(100*l)/100,i}(l,u,n-d.getBoundingClientRect().top,bO(l),CO);else t=function(e,t,n,r){var o=Ip([],Pp(e),!1),i=(r.getMenuConfig("insertTable")||{}).minRowHeight,a=parseInt((void 0===i?30:i).toString(),10)||30,s=o[t],u=Math.max(a,s+n);return o[t]=Math.floor(100*u)/100,o}(l,u,r,CO);var f=gv.getSelectedNodeByType(CO,"table");if(f&&u>=0&&u<t.length){var p=Ip(Ip([],Pp(gv.findPath(CO,f)),!1),[u],!1);try{Dp.Transforms.setNodes(CO,{height:t[u]},{at:p})}catch(e){console.warn("更新行高度失败:",e)}}}},100);function AO(e){EO=!1,CO=null,document.body.style.cursor="",DO.off("mousemove",SO),DO.off("mouseup",AO)}function xO(e,t){"mouseenter"===t.type?Dp.Transforms.setNodes(e,{isResizingRow:!0},{mode:"highest"}):Dp.Transforms.setNodes(e,{isResizingRow:!1},{mode:"highest"})}DO.on("mousedown",function(e){var t=e.target;if("DIV"===t.tagName&&t.closest(".row-resizer-item")){if(null===CO)return;EO=!0;var n=e.clientY;wO=n,document.body.style.cursor="row-resize",e.preventDefault()}DO.on("mousemove",SO),DO.on("mouseup",AO)});var TO={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(Dp.Range.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=gv.findPath(e,t),a=Dp.Editor.start(e,i),s=Dp.Editor.end(e,i),u=Dp.Point.compare(r,s)<=0&&Dp.Point.compare(r,a)>=0,l=Dp.Point.compare(o,s)<=0&&Dp.Point.compare(o,a)>=0;return!!(u&&l&&Dp.Path.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=o.isHoverRowBorder,v=o.resizingRowIndex,m=o.isResizingRow,y=gv.isNodeSelected(n,e),b=Pp(_T.selection(n),1)[0],E=lO(l),w=iE("div",{className:"table-container","data-selected":y,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&_T.unselect(n);var r=gv.findPath(n,e),o=Dp.Editor.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},iE("table",{width:a,contentEditable:r,className:"table ".concat(b?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce(function(e,t){return e+t},0),"px")},on:{mousemove:Lm(function(t){_T.hasSelected(n)||(function(e,t,n,r){if(!e.isDisabled()&&!dO&&!fO){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(xg(f)&&d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&Dp.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(xg(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?lO(u).map(function(e){return e*r}):u,m=uO(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void Dp.Transforms.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&Dp.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}(n,e,t,d),function(e,t,n){if(!e.isDisabled()&&!EO){var r=t,o=r.children,i=r.isHoverRowBorder,a=r.resizingRowIndex,s=n.target;if(xg(s)){var u=s.closest(".table");if(u)for(var l=n.clientY,c=u.getBoundingClientRect(),d=bO(o.map(function(e){return e.height||30})),f=0;f<d.length;f+=1)if(l-c.y>=d[f]-5&&l-c.y<d[f]+5){if(a===f)return;return void Dp.Transforms.setNodes(e,{isHoverRowBorder:!0,resizingRowIndex:f},{mode:"highest"})}}!0===i&&Dp.Transforms.setNodes(e,{isHoverRowBorder:!1,resizingRowIndex:-1},{mode:"highest"})}}(n,e,t))},25)}},iE("colgroup",{contentEditable:!1},l.map(function(e){return iE("col",{width:e})})),iE("tbody",null,t)),iE("div",{className:"column-resizer",contentEditable:!1},l.map(function(e,t){var r=e;return"100%"===a&&(r=E[t]*d),iE("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},iE("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return yO(n,e)},mouseleave:function(e){return yO(n,e)},mousedown:function(e){return function(e){fO||(hO=e)}(n)}}},iE("div",{className:"resizer-line"})))})),iE("div",{className:"row-resizer",contentEditable:!1},e.children.map(function(e,t){var r=l.reduce(function(e,t){return e+t},0),o=e.height||30;return iE("div",{className:"row-resizer-item",style:{minHeight:"".concat(o,"px")}},iE("div",{className:"resizer-line-hotzone-horizontal ".concat(g&&t===v?"visible ":"").concat(m&&t===v?"highlight":""),style:{width:"".concat(r,"px")},on:{mouseenter:function(e){return xO(n,e)},mouseleave:function(e){return xO(n,e)},mousedown:function(e){return function(e){EO||(CO=e)}(n)}}},iE("div",{className:"resizer-line-horizontal"})))}))),C=jb("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(xg(t)){var n=t.querySelector("table");n&&(cO=new ResizeObserver(function(t){var n=Pp(t,1)[0].contentRect;Dp.Transforms.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})}),cO.observe(n))}}(n,t)},destroy:function(){cO&&(null==cO||cO.disconnect(),cO=null)}}},w);return C}},OO={type:"table-row",renderElem:function(e,t,n){var r=e.height;return iE("tr",{style:r?{height:"".concat(r,"px")}:{}},t)}},NO={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=gv.getParentNode(e,t);if(null==n)return!1;var r=gv.getParentNode(e,n);return null!=r&&BT(r).some(function(e){return e===t})}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=_T.isSelected(n,e);return iE(r&&c?"th":"td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function BO(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var kO={renderStyle:function(e,t){var n,r;if(!Dp.Element.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};if(i&&(c.backgroundColor=i),a){/^\d+(\.\d+)?$/.test(a)?c.borderWidth="".concat(a,"px"):c.borderWidth=a}s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?BO(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):BO(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=Hh(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if(!["TABLE","TD","TH"].includes(e.tagName))return t;var r=Hh(e),o=t,i=wT(r,"background-color");i||(i=wT(r,"background")),i&&(o.backgroundColor=i);var a=wT(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(tO));var s,u=Pp((null==a?void 0:a.split(" "))||[],3),l=u[0],c=u[1],d=u[2];(l=wT(r,"border-width")||l)&&(o.borderWidth=(s=l.trim())&&"string"==typeof s&&s.includes("pt")?s.replace(/(\d+(\.\d+)?)\s*pt/g,function(e,t){var n=(4*parseFloat(t)/3).toFixed(2);return"".concat(n,"px")}):s),(c=wT(r,"border-style")||c)&&(o.borderStyle="none"===c?"":c),(d=wT(r,"border-color")||d)&&(o.borderColor=d);var f=wT(r,"text-align");return(f=wT(r,"text-align")||f)&&(o.textAlign=f),t},renderElems:[TO,OO,NO],elemsToHtml:[dT,fT,pT],preParseHtml:[sO],parseElemsHtml:[ZT,JT,eO],menus:[jT,HT,zT,$T,UT,VT,WT,GT,qT,KT,YT,XT],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;l.insertBreak=function(){null==gv.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!nO(l)&&!oO(l,e,"backward")){var t=l.selection;if(t){var r=Dp.Editor.before(l,t),o=Dp.Editor.above(l,{at:t,match:function(e){return gv.checkNodeType(e,"table-cell")}});if(r){var i=iO(l,r);if(!o&&i&&aO(l))return}}n(e)}},l.handleTab=function(){var t;if(gv.getSelectedNodeByType(l,"table")){var n=Dp.Editor.above(e);gv.checkNodeType(n[0],"table-cell")&&Dp.Transforms.select(e,n[1]);var r=Dp.Editor.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=Dp.Editor.above(e,{at:r[1]}))&&void 0!==t?t:r),Dp.Transforms.select(e,r[1]);else{var o=l.children||[],i=o.length;if(gv.checkNodeType(o[i-1],"table")){var a=gv.genEmptyParagraph();Dp.Transforms.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){if(!nO(l)&&!oO(l,e,"forward")){var t=l.selection;if(t){var n=Dp.Editor.after(l,t),o=Dp.Editor.above(l,{at:t,match:function(e){return gv.checkNodeType(e,"table-cell")}});if(n){var i=iO(l,n);if(!o&&i&&aO(l))return}}r(e)}},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=Dp.Point.isBefore(i.anchor,i.focus);if(rO(l,t.anchor))(n=Dp.Editor[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(rO(l,t.focus))(n=Dp.Editor[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&Dp.Transforms.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=Pp(e,2),n=t[0],r=t[1];if("table"!==gv.getNodeType(n))return i([n,r]);if(gv.isLastNode(l,n)){var o=gv.genEmptyParagraph();Dp.Transforms.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=gv.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):Dp.Editor.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=gv.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(Dp.Path.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==Dp.Node.string(t).length){var o=gv.findPath(l,t),i={anchor:Dp.Editor.start(l,o),focus:Dp.Editor.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!Dp.Operation.isSelectionOperation(n)||!n.newProperties)return t(n);var r=Np(Np({},e.selection),n.newProperties);if(!Dp.Range.isRange(r))return _T.unselect(e),t(n);var o=function(e){return Dp.Element.isElement(e)&&("table-cell"===e.type||"th"===e.type||"td"===e.type)},i=Pp(Dp.Editor.nodes(e,{match:o,at:Dp.Range.start(r),mode:"lowest"}),1)[0],a=Pp(Dp.Editor.nodes(e,{match:o,at:Dp.Range.end(r),mode:"lowest"}),1)[0];if(!i||!a)return _T.unselect(e),t(n);var s=Pp(i,2)[1],u=Pp(a,2)[1];if(Dp.Path.equals(s,u)||!mT(e,[s,u],"table"))return _T.unselect(e),t(n);try{var l=yT(e,{at:s});if(!l||0===l.length)return _T.unselect(e),t(n);for(var c=bT.valueOf(0,0),d=bT.valueOf(0,0),f=!1,p=!1,h=0;h<l.length;h+=1)if(l[h])for(var g=0;g<l[h].length;g+=1)if(l[h][g]){var v=Pp(l[h][g],1),m=Pp(v[0],2)[1];Dp.Path.equals(s,m)&&(c.x=h,c.y=g,f=!0),Dp.Path.equals(u,m)&&(d.x=h,d.y=g,p=!0)}if(!f||!p)return _T.unselect(e),t(n);for(var y=bT.valueOf(Math.min(c.x,d.x),Math.min(c.y,d.y)),b=bT.valueOf(Math.max(c.x,d.x),Math.max(c.y,d.y));;){var E=bT.valueOf(y.x,y.y),w=bT.valueOf(b.x,b.y);for(h=E.x;h<=w.x&&h<l.length;h+=1)if(l[h])for(g=E.y;g<=w.y&&g<l[h].length;g+=1)if(l[h][g]){var C=Pp(l[h][g],2)[1];if(C){var D=C.rtl,S=C.ltr,A=C.btt,x=C.ttb;E.x=Math.min(E.x,h-(x-1)),E.y=Math.min(E.y,g-(D-1)),w.x=Math.max(w.x,h+(A-1)),w.y=Math.max(w.y,g+(S-1))}}if(bT.equals(y,E)&&bT.equals(b,w))break;y=E,b=w}var T=[],O=new WeakSet;for(h=y.x;h<=b.x&&h<l.length;h+=1)if(l[h]){var N=[];for(g=y.y;g<=b.y&&g<l[h].length;g+=1)if(l[h][g]){var B=Pp(l[h][g],1),k=Pp(B[0],1)[0];k&&(O.add(k),N.push(l[h][g]))}N.length>0&&T.push(N)}CT.set(e,T),DT.set(e,O)}catch(r){return _T.unselect(e),t(n)}t(n)}}(l),l.getTableSelection=function(){return CT.get(l)||null};var c=l.addMark,d=l.removeMark,f=Np({},Dp.Transforms);return l.addMark=function(e,t){var n=CT.get(l);if(n&&n.length>0){var r=l.selection;n.forEach(function(n){n.forEach(function(n){var r=Pp(n[0],2)[1],o=Dp.Editor.start(l,r),i=Dp.Editor.end(l,r);Dp.Transforms.select(l,{anchor:o,focus:i}),c(e,t)})}),r&&Dp.Transforms.select(l,r)}else c(e,t)},l.removeMark=function(e){var t=CT.get(l);if(t&&t.length>0){var n=l.selection;t.forEach(function(t){t.forEach(function(t){var n=Pp(t[0],2)[1],r=Dp.Editor.start(l,n),o=Dp.Editor.end(l,n);Dp.Transforms.select(l,{anchor:r,focus:o}),d(e)})}),n&&Dp.Transforms.select(l,n)}else d(e)},Dp.Transforms.setNodes=function(e,t,n){if(void 0===n&&(n={}),e===l){var r=CT.get(l);if(r&&r.length>0)return"hidden"in t||"rowSpan"in t||"colSpan"in t?void f.setNodes(e,t,n):void r.forEach(function(r){r.forEach(function(r){var o=Pp(r[0],2)[1];f.setNodes(e,t,Np(Np({},n),{at:o}))})})}f.setNodes(e,t,n)},l}};function FO(e){return e.length?e[0].tagName.toLowerCase():""}function PO(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=Hh(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}Ny("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),Ny("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),ug&&(Hh.fn.append=ug),Yh&&(Hh.fn.on=Yh),bg&&(Hh.fn.focus=bg),Vh&&(Hh.fn.attr=Vh),Kh&&(Hh.fn.val=Kh),ig&&(Hh.fn.html=ig),cg&&(Hh.fn.parent=cg),Uh&&(Hh.fn.hasClass=Uh),gg&&(Hh.fn.empty=gg);var IO={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=PO(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function _O(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(wg())}function RO(e){var t={};return e.trim().split(";").forEach(function(e){if(e){var n=Pp(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}}),t}function LO(){return _O("w-e-insert-video")}var MO=function(){function e(){this.title=ky("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=LO(),this.heightInputId=LO(),this.buttonId=LO()}return e.prototype.getSelectedVideoNode=function(e){return gv.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Pp($y(ky("videoModule.width"),n,"auto"),2),a=i[0],s=Hh(i[1]),u=Pp($y(ky("videoModule.height"),r,"auto"),2),l=u[0],c=Hh(u[1]),d=Pp(Uy(o,ky("videoModule.ok")),1)[0],f=this.getSelectedVideoNode(e);if(null==this.$content){var p=Hh("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=f.style,d=void 0===c?{}:c;e.restoreSelection();var h={style:Np(Np({},d),{width:u,height:l})};Dp.Transforms.setNodes(e,h,{match:function(e){return gv.checkNodeType(e,"video")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"":m,b=v.height,E=void 0===b?"":b;return s.val(y),c.val(E),setTimeout(function(){s.focus()}),h[0]},e}();function jO(){return _O("w-e-edit-video")}var HO=function(){function e(){this.title=ky("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=jO(),this.posterInputId=jO(),this.buttonId=jO()}return e.prototype.getSelectedVideoNode=function(e){return gv.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Pp($y(ky("videoModule.videoSrc"),r,ky("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Pp($y(ky("videoModule.videoPoster"),o,ky("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Hh(u),p=Hh(d),h=Pp(Uy(i,ky("videoModule.ok")),1)[0];if(null==this.$content){var g=Hh("<div></div>");g.on("click","#".concat(i),function(n){return Bp(t,void 0,void 0,function(){var t,i,a,s;return kp(this,function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=_O("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),Dp.Transforms.setNodes(e,s,{match:function(e){return gv.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]})})}),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,w=void 0===E?"":E;return f.val(b),p.val(w),setTimeout(function(){f.focus()}),v[0]},e}();function zO(e,t){return Bp(this,arguments,void 0,function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),kp(this,function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then(function(){gv.isSelectedEmptyParagraph(e)&&Dp.Transforms.removeNodes(e,{mode:"highest"}),Dp.Transforms.insertNodes(e,d,{mode:"highest"})}),a(d),[2]}})})}function $O(){return _O("w-e-insert-video")}var UO=function(){function e(){this.title=ky("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=$O(),this.posterInputId=$O(),this.buttonId=$O()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||!!gv.getSelectedElems(e).some(function(t){var n=gv.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Pp($y(ky("videoModule.videoSrc"),r,ky("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Pp($y(ky("videoModule.videoPoster"),o,ky("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Hh(u),p=Hh(d),h=Pp(Uy(i,ky("videoModule.ok")),1)[0];if(null==this.$content){var g=Hh("<div></div>");g.on("click","#".concat(i),function(n){return Bp(t,void 0,void 0,function(){var t,i;return kp(this,function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,zO(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout(function(){f.focus()}),v[0]},e}();function VO(e){return e.getMenuConfig("uploadVideo")}var WO=new WeakMap;function GO(e,t){return Bp(this,void 0,void 0,function(){var n,r;return kp(this,function(o){switch(o.label){case 0:return n=function(e){var t=WO.get(e);if(null!=t)return t;var n=VO(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=SD(Np(Np({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n){return zO(e,t,n)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;zO(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),WO.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}var qO=function(){function e(){this.title=ky("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n){return zO(e,t,n)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Hh("body"),u=Hh('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;!function(e,t){Bp(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p;return kp(this,function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=VO(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=_p(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,function(t,n){return zO(e,t,n)},e)]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,GO(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}})})}(e,t)})}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Dp.Range.isCollapsed(t)||!!gv.getSelectedElems(e).some(function(t){var n=gv.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function KO(e,t,n,r,o,i){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}],textAlign:i}}var YO={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=Hh(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=RO(u=l.attr("style")||""),KO(o=l[0].outerHTML,i,a,s,u,RO(r.attr("style")||"")["text-align"]||"center");var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",KO(o,i=c.attr("poster")||"",a,s,u=RO(u=c.attr("style")||""),RO(r.attr("style")||"")["text-align"]||"center")}};var XO={selector:"iframe,video,p",preParseHtml:function(e){var t=Hh(e),n=t;if("p"===FO(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=Hh(o))}}var a=FO(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=Hh('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}};var ZO={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=gv.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){r=iE("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:PO(a,f,h,v)})}else{var E=iE("video",{key:c,poster:u,controls:!0,style:v},iE("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(E.data.width=f),"auto"!==h&&(E.data.height=h),r=iE("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},E)}var w=jb("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return w}},JO={renderElems:[ZO],elemsToHtml:[IO],preParseHtml:[XO],parseElemsHtml:[YO],menus:[{key:"insertVideo",factory:function(){return new UO},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new qO},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new MO}},{key:"editVideoSrc",factory:function(){return new HO}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=Pp(e,2),o=t[0],i=t[1];"video"===gv.getNodeType(o)&&(gv.isLastNode(r,o)&&Dp.Transforms.insertNodes(r,gv.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}};Ny("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),Ny("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});ug&&(Hh.fn.append=ug),Yh&&(Hh.fn.on=Yh),hg&&(Hh.fn.remove=hg),Kh&&(Hh.fn.val=Kh),yg&&(Hh.fn.click=yg),eg&&(Hh.fn.hide=eg);var QO=new WeakMap;function eN(e){return e.getMenuConfig("uploadImage")}function tN(e,t){return Bp(this,void 0,void 0,function(){return kp(this,function(n){return[2,new Promise(function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;SA(e,i,t.name,a),n("ok")}}})]})})}function nN(e,t){return Bp(this,void 0,void 0,function(){var n,r;return kp(this,function(o){switch(o.label){case 0:return n=function(e){var t=QO.get(e);if(null!=t)return t;var n=eN(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=SD(Np(Np({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n,r){return SA(e,t,n,r)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach(function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;SA(e,r,i,void 0===a?"":a)});else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;SA(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),QO.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}function rN(e,t){return Bp(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return kp(this,function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=eN(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=_p(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,tN(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,function(t,n,r){return SA(e,t,n,r)},e)]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,nN(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}})})}var oN=function(){function e(){this.title=ky("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return wA(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n,r){return SA(e,t,n,r)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Hh("body"),u=Hh('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;rN(e,t)})}},e}();var iN={menus:[{key:"uploadImage",factory:function(){return new oN},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(wA(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some(function(e){return"image"===Pp(e.type.split("/"),1)[0]})?rN(e,o):t(r)}},n}};Ny("en",{highLightModule:{selectLang:"Language"}}),Ny("zh-CN",{highLightModule:{selectLang:"选择语言"}});var aN,sN={exports:{}};var uN=(aN||(aN=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,o){r[o]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n.hasOwnProperty(s)||(a[s]=i[s])}var l=r[e];return r[e]=a,o.languages.DFS(o.languages,function(t,n){n===l&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var u=t[s],l=o.util.type(u);"Object"!==l||i[a(u)]?"Array"!==l||i[a(u)]||(i[a(u)]=!0,e(u,n,s,i)):(i[a(u)]=!0,e(u,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var u={element:t,language:i,grammar:a,code:t.textContent};function l(e){u.highlightedCode=e,o.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o.hooks.run("after-highlight",u),o.hooks.run("complete",u),r&&r.call(u.element)}if(o.hooks.run("before-sanity-check",u),(s=u.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!u.code)return o.hooks.run("complete",u),void(r&&r.call(u.element));if(o.hooks.run("before-highlight",u),u.grammar)if(n&&e.Worker){var c=new Worker(o.filename);c.onmessage=function(e){l(e.data)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else l(o.highlight(u.code,u.grammar,u.language));else l(o.util.encode(u.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new u;return l(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,u,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(d&&d.cause==f+","+h)return;var g=p[h],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var E=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,E+"g")}for(var w=g.pattern||g,C=r.next,D=u;C!==t.tail&&!(d&&D>=d.reach);D+=C.value.length,C=C.next){var S=C.value;if(t.length>e.length)return;if(!(S instanceof i)){var A,x=1;if(y){if(!(A=a(w,D,e,m))||A.index>=e.length)break;var T=A.index,O=A.index+A[0].length,N=D;for(N+=C.value.length;T>=N;)N+=(C=C.next).value.length;if(D=N-=C.value.length,C.value instanceof i)continue;for(var B=C;B!==t.tail&&(N<O||"string"==typeof B.value);B=B.next)x++,N+=B.value.length;x--,S=e.slice(D,N),A.index-=D}else if(!(A=a(w,0,S,m)))continue;T=A.index;var k=A[0],F=S.slice(0,T),P=S.slice(T+k.length),I=D+S.length;d&&I>d.reach&&(d.reach=I);var _=C.prev;if(F&&(_=l(t,_,F),D+=F.length),c(t,_,x),C=l(t,_,new i(f,v?o.tokenize(k,v):k,b,k)),P&&l(t,C,P),x>1){var R={cause:f+","+h,reach:I};s(e,t,n,C.prev,D,R),d&&R.reach>d.reach&&(d.reach=R.reach)}}}}}}function u(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var u in i.attributes)s+=" "+u+'="'+(i.attributes[u]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()},!1),o):o;var d=o.util.currentScript();function f(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
12
|
+
*/function i(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),r=o(r,new RegExp(`%\\{${e}\\}`,"g"),i)}return r}var a=n("apply");function u(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}return nw=class{constructor(t){Object.defineProperty(this,a,{value:u}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},nw}function Bw(){return iw||(iw=1,ow=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,u){var s=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,u=i.length;for(;a<u;a++){var s=i[a];if("*"===s&&(n=n.concat(t[s])),2===o.length&&o[0]===s){n=n.concat(t[s]);break}}return n}(e);s.length&&function(e,t,n){var r=0,o=t.length;for(;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,s,[n,r,o,i,a,u])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function r(){n.apply(this,arguments),e.off(t,r)})},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),ow}function kw(){if(uw)return aw;uw=1;var e=0;function t(t){return"__private_"+e+++"_"+t}var n=t("publish");class r{constructor(){Object.defineProperty(this,n,{value:o}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},r={...this.state,...e};this.state=r,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,n)[n](t,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(e=>{e(...t)})}return r.VERSION="2.1.1",aw=function(){return new r}}function Fw(){if(lw)return sw;return lw=1,sw=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function Iw(){return fw?cw:(fw=1,cw={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function Pw(){if(Dw)return Cw;Dw=1;var e=GE(),t=WE(),n=Ow();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function u(e){return"__private_"+a+++"_"+e}const s=Nw(),l=Bw(),c=fb(),f=kw(),d=function(){if(pw)return dw;pw=1;const e=Fw(),t=Iw();return dw=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=Fw(),h=function(){if(gw)return hw;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}return gw=1,hw=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(mw||(mw=1,vw=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),vw),v=bw?yw:(bw=1,yw=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=ww?Ew:(ww=1,Ew={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=u("plugins"),b=u("restricter"),E=u("storeUnsubscribe"),w=u("emitter"),C=u("preProcessors"),D=u("uploaders"),A=u("postProcessors"),S=u("informAndEmit"),x=u("checkRequiredMetaFieldsOnFile"),O=u("checkRequiredMetaFields"),T=u("assertNewUploadAllowed"),N=u("checkAndCreateFileStateObject"),B=u("startIfAutoProceed"),k=u("addListeners"),F=u("updateOnlineStatus"),I=u("createUpload"),P=u("getUpload"),R=u("removeUpload"),_=u("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class L{constructor(e){Object.defineProperty(this,_,{value:K}),Object.defineProperty(this,R,{value:q}),Object.defineProperty(this,P,{value:G}),Object.defineProperty(this,I,{value:W}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,B,{value:U}),Object.defineProperty(this,N,{value:$}),Object.defineProperty(this,T,{value:z}),Object.defineProperty(this,O,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,S,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,w,{writable:!0,value:l()}),Object.defineProperty(this,C,{writable:!0,value:new Set}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,A,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:f(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter(()=>this.opts,this.i18n),i(this,E)[E]=this.store.subscribe((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}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];i(this,w)[w].emit(e,...n)}on(e,t){return i(this,w)[w].on(e,t),this}once(e,t){return i(this,w)[w].once(e,t),this}off(e,t){return i(this,w)[w].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new s([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(e=>{e.setOptions()}),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,C)[C].add(e)}removePreProcessor(e){return i(this,C)[C].delete(e)}addPostProcessor(e){i(this,A)[A].add(e)}removePostProcessor(e){return i(this,A)[A].delete(e)}addUploader(e){i(this,D)[D].add(e)}removeUploader(e){return i(this,D)[D].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter(e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted}),i=r.filter(e=>!e.progress.uploadStarted),a=r.filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess),u=r.filter(e=>e.progress.uploadStarted),s=r.filter(e=>e.isPaused),l=r.filter(e=>e.progress.uploadComplete),c=r.filter(e=>e.error),f=o.filter(e=>!e.isPaused),d=r.filter(e=>e.progress.preprocess||e.progress.postprocess);return{newFiles:i,startedFiles:a,uploadStartedFiles:u,pausedFiles:s,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:f,processingFiles:d,isUploadStarted:u.length>0,isAllComplete:100===t&&l.length===r.length&&0===d.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&s.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,T)[T](e);const{files:t}=this.getState();let n=i(this,N)[N](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,B)[B](),n.id}addFiles(e){i(this,T)[T]();const t={...this.getState().files},n=[],r=[];for(let o=0;o<e.length;o++)try{let r=i(this,N)[N](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)}),n.length>0&&i(this,B)[B](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function u(e){return void 0===a[e]}e.forEach(e=>{n[e]&&(a[e]=n[e],delete o[e])}),Object.keys(i).forEach(e=>{const t=r[e].fileIDs.filter(u);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}});const s={currentUploads:i,files:o};0===Object.keys(o).length&&(s.allowNewUpload=!0,s.error=null,s.recoveredState=null),this.setState(s),this.calculateTotalProgress();const l=Object.keys(a);l.forEach(e=>{this.emit("file-removed",a[e],t)}),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!0};e[t]=n}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,I)[I](t,{forceAllowNewUpload:!0});return i(this,_)[_](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,I)[I]([e],{forceAllowNewUpload:!0});return i(this,_)[_](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter(e=>null!=e.progress.bytesTotal),n=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce((e,t)=>e+t.progress.bytesTotal,0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach(e=>{i+=e.progress.bytesUploaded}),n.forEach(e=>{i+=o*(e.progress.percentage||0)/100});let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find(t=>t.id===e);if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex(t=>t.id===e.id);-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,_)[_](e):(i(this,R)[R](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,I)[I](...arguments)}addResultData(e,t){if(!i(this,P)[P](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then(()=>i(this,b)[b].validateMinNumberOfFiles(t)).catch(e=>{throw i(this,S)[S](e),e}).then(()=>{if(!i(this,O)[O](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(e=>{throw e}).then(()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)});const o=i(this,I)[I](r);return i(this,_)[_](o)}).catch(e=>{throw this.emit("error",e),this.log(e,"error"),e}))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,S)[S](t,e),t}}function $(e,t){const r=d(t),o=v(r,t),a=p(o).extension,u=Boolean(t.isRemote),s=h({...t,type:r});if(this.checkIfFileAlreadyExists(s)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,S)[S](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let f={source:t.source||"",id:s,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:u,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(f,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(f=g);try{const t=Object.keys(e).map(t=>e[t]);i(this,b)[b].validate(f,t)}catch(e){throw i(this,S)[S](e,f),e}return f}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,S)[S](e)}else i(this,S)[S](n)}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,A)[A].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("preprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("postprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&i(this,x)[x](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function W(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function G(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,C)[C],...i(this,D)[D],...i(this,A)[A]];try{for(let i=r;i<o.length&&n;i++){const r=o[i],a={...n,step:i};this.setState({currentUploads:{...t,[e]:a}}),await r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw i(this,R)[R](e),t}if(n){n.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const r=n.fileIDs.map(e=>this.getFile(e)),o=r.filter(e=>!e.error),i=r.filter(e=>e.error);await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,R)[R](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return L.VERSION="2.3.4",Cw=L}var Rw,_w,Lw,Mw,jw,Hw,zw,$w,Uw,Vw,Ww,Gw,qw,Kw={},Yw=[],Xw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Zw=Array.isArray;function Jw(e,t){for(var n in t)e[n]=t[n];return e}function Qw(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function eC(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Rw.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return tC(e,a,r,o,null)}function tC(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++Lw:o,__i:-1,__u:0};return null==o&&null!=_w.vnode&&_w.vnode(i),i}function nC(e){return e.children}function rC(e,t){this.props=e,this.context=t}function oC(e,t){if(null==t)return e.__?oC(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?oC(e):null}function iC(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],i=Jw({},t);i.__v=t.__v+1,_w.vnode&&_w.vnode(i),vC(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,null==n?oC(t):n,!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,yC(r,i,o),t.__e=t.__=null,i.__e!=n&&aC(i)}}function aC(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),aC(e)}function uC(e){(!e.__d&&(e.__d=!0)&&jw.push(e)&&!sC.__r++||Hw!=_w.debounceRendering)&&((Hw=_w.debounceRendering)||zw)(sC)}function sC(){try{for(var e,t=1;jw.length;)jw.length>t&&jw.sort($w),e=jw.shift(),t=jw.length,iC(e)}finally{jw.length=sC.__r=0}}function lC(e,t,n,r,o,i,a,u,s,l,c){var f,d,p,h,g,v,m,y=r&&r.__k||Yw,b=t.length;for(s=cC(n,t,y,s,b),f=0;f<b;f++)null!=(p=n.__k[f])&&(d=-1!=p.__i&&y[p.__i]||Kw,p.__i=f,v=vC(e,p,d,o,i,a,u,s,l,c),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&wC(d.ref,null,p),c.push(p.ref,p.__c||h,p)),null==g&&null!=h&&(g=h),(m=!!(4&p.__u))||d.__k===p.__k?s=fC(p,s,e,m):"function"==typeof p.type&&void 0!==v?s=v:h&&(s=h.nextSibling),p.__u&=-7);return n.__e=g,s}function cC(e,t,n,r,o){var i,a,u,s,l,c=n.length,f=c,d=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=tC(null,a,null,null,null):Zw(a)?a=e.__k[i]=tC(nC,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=tC(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,s=i+d,a.__=e,a.__b=e.__b+1,u=null,-1!=(l=a.__i=dC(a,n,s,f))&&(f--,(u=n[l])&&(u.__u|=2)),null==u||null==u.__v?(-1==l&&(o>c?d--:o<c&&d++),"function"!=typeof a.type&&(a.__u|=4)):l!=s&&(l==s-1?d--:l==s+1?d++:(l>s?d--:d++,a.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<c;i++)null!=(u=n[i])&&!(2&u.__u)&&(u.__e==r&&(r=oC(u)),CC(u,u));return r}function fC(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=fC(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=oC(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function dC(e,t,n,r){var o,i,a,u=e.key,s=e.type,l=t[n],c=null!=l&&!(2&l.__u);if(null===l&&null==u||c&&u==l.key&&s==l.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(l=t[a=o>=0?o--:i++])&&!(2&l.__u)&&u==l.key&&s==l.type)return a;return-1}function pC(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Xw.test(t)?n:n+"px"}function hC(e,t,n,r,o){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||pC(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||pC(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(Uw,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Vw,e.addEventListener(t,i?Gw:Ww,i)):e.removeEventListener(t,i?Gw:Ww,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function gC(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Vw++;else if(t.t<n.u)return;return n(_w.event?_w.event(t):t)}}}function vC(e,t,n,r,o,i,a,u,s,l){var c,f,d,p,h,g,v,m,y,b,E,w,C,D,A,S=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(s=!!(32&n.__u),i=[u=t.__e=n.__e]),(c=_w.__b)&&c(t);e:if("function"==typeof S)try{if(m=t.props,y=S.prototype&&S.prototype.render,b=(c=S.contextType)&&r[c.__c],E=c?b?b.props.value:c.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new S(m,E):(t.__c=f=new rC(m,E),f.constructor=S,f.render=DC),b&&b.sub(f),f.state||(f.state={}),f.__n=r,d=f.__d=!0,f.__h=[],f._sb=[]),y&&null==f.__s&&(f.__s=f.state),y&&null!=S.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=Jw({},f.__s)),Jw(f.__s,S.getDerivedStateFromProps(m,f.__s))),p=f.props,h=f.state,f.__v=t,d)y&&null==S.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),y&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(y&&null==S.getDerivedStateFromProps&&m!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(m,E),t.__v==n.__v||!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(m,f.__s,E)){t.__v!=n.__v&&(f.props=m,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),Yw.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&a.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(m,f.__s,E),y&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(p,h,g)})}if(f.context=E,f.props=m,f.__P=e,f.__e=!1,w=_w.__r,C=0,y)f.state=f.__s,f.__d=!1,w&&w(t),c=f.render(f.props,f.state,f.context),Yw.push.apply(f.__h,f._sb),f._sb=[];else do{f.__d=!1,w&&w(t),c=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++C<25);f.state=f.__s,null!=f.getChildContext&&(r=Jw(Jw({},r),f.getChildContext())),y&&!d&&null!=f.getSnapshotBeforeUpdate&&(g=f.getSnapshotBeforeUpdate(p,h)),D=null!=c&&c.type===nC&&null==c.key?bC(c.props.children):c,u=lC(e,Zw(D)?D:[D],t,n,r,o,i,a,u,s,l),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),v&&(f.__E=f.__=null)}catch(e){if(t.__v=null,s||null!=i)if(e.then){for(t.__u|=s?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;i[i.indexOf(u)]=null,t.__e=u}else{for(A=i.length;A--;)Qw(i[A]);mC(t)}else t.__e=n.__e,t.__k=n.__k,e.then||mC(t);_w.__e(e,t,n)}else null==i&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):u=t.__e=EC(n.__e,t,n,r,o,i,a,s,l);return(c=_w.diffed)&&c(t),128&t.__u?void 0:u}function mC(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(mC))}function yC(e,t,n){for(var r=0;r<n.length;r++)wC(n[r],n[++r],n[++r]);_w.__c&&_w.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){_w.__e(e,t.__v)}})}function bC(e){return"object"!=typeof e||null==e||e.__b>0?e:Zw(e)?e.map(bC):Jw({},e)}function EC(e,t,n,r,o,i,a,u,s){var l,c,f,d,p,h,g,v=n.props||Kw,m=t.props,y=t.type;if("svg"==y?o="http://www.w3.org/2000/svg":"math"==y?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=i)for(l=0;l<i.length;l++)if((p=i[l])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,i[l]=null;break}if(null==e){if(null==y)return document.createTextNode(m);e=document.createElementNS(o,y,m.is&&m),u&&(_w.__m&&_w.__m(t,i),u=!1),i=null}if(null==y)v===m||u&&e.data==m||(e.data=m);else{if(i=i&&Rw.call(e.childNodes),!u&&null!=i)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)p=v[l],"dangerouslySetInnerHTML"==l?f=p:"children"==l||l in m||"value"==l&&"defaultValue"in m||"checked"==l&&"defaultChecked"in m||hC(e,l,null,p,o);for(l in m)p=m[l],"children"==l?d=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?h=p:"checked"==l?g=p:u&&"function"!=typeof p||v[l]===p||hC(e,l,p,v[l],o);if(c)u||f&&(c.__html==f.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(f&&(e.innerHTML=""),lC("template"==t.type?e.content:e,Zw(d)?d:[d],t,n,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":o,i,a,i?i[0]:n.__k&&oC(n,0),u,s),null!=i)for(l=i.length;l--;)Qw(i[l]);u||(l="value","progress"==y&&null==h?e.removeAttribute("value"):null!=h&&(h!==e[l]||"progress"==y&&!h||"option"==y&&h!=v[l])&&hC(e,l,h,v[l],o),l="checked",null!=g&&g!=e[l]&&hC(e,l,g,v[l],o))}return e}function wC(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){_w.__e(e,n)}}function CC(e,t,n){var r,o;if(_w.unmount&&_w.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||wC(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){_w.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&CC(r[o],t,n||"function"!=typeof e.type);n||Qw(e.__e),e.__c=e.__=e.__e=void 0}function DC(e,t,n){return this.constructor(e,n)}function AC(e,t,n){var r,o,i,a;t==document&&(t=document.documentElement),_w.__&&_w.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],a=[],vC(t,e=(!r&&n||t).__k=eC(nC,null,[e]),o||Kw,Kw,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Rw.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),yC(i,e,a)}Rw=Yw.slice,_w={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},Lw=0,Mw=function(e){return null!=e&&void 0===e.constructor},rC.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=Jw({},this.state),"function"==typeof e&&(e=e(Jw({},n),this.props)),e&&Jw(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),uC(this))},rC.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),uC(this))},rC.prototype.render=nC,jw=[],zw="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$w=function(e,t){return e.__v.__b-t.__v.__b},sC.__r=0,Uw=/(PointerCapture)$|Capture$/i,Vw=0,Ww=gC(!1),Gw=gC(!0),qw=0;var SC,xC,OC,TC,NC,BC,kC,FC,IC,PC,RC,_C=Object.freeze({__proto__:null,Component:rC,Fragment:nC,cloneElement:function(e,t,n){var r,o,i,a,u=Jw({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:u[i]=void 0===t[i]&&null!=a?a[i]:t[i];return arguments.length>2&&(u.children=arguments.length>3?Rw.call(arguments,2):n),tC(e.type,u,r||e.key,o||e.ref,null)},createContext:function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,uC(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+qw++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},createElement:eC,createRef:function(){return{current:null}},h:eC,hydrate:function e(t,n){AC(t,n,e)},get isValidElement(){return Mw},get options(){return _w},render:AC,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Zw(t)?t.some(function(t){e(t,n)}):n.push(t)),n}}),LC=w(_C);function MC(){if(TC)return OC;TC=1;const e=xC?SC:(xC=1,SC=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return OC=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function jC(){if(FC)return kC;FC=1;const e=Nw();return kC=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function HC(){if(PC)return IC;PC=1;var e=LC;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=MC(),i=BC?NC:(BC=1,NC=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=jC();var u=r("updateUI");class s extends a{constructor(){super(...arguments),Object.defineProperty(this,u,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,u)[u]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=o,t||(t=Promise.resolve().then(()=>(t=null,e(...n)))),t}}(t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())}),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof s)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins(t=>{t instanceof e&&(c=t)})}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let f=`Invalid target option given to ${a}.`;throw f+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(f)}update(e){var n,r;null!=this.el&&(null==(n=(r=t(this,u))[u])||n.call(r,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}return IC=s}var zC,$C,UC,VC,WC,GC,qC,KC,YC,XC,ZC=(RC||(RC=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=WE();e.exports=Pw();const r=HC();t.UIPlugin=r;const o=jC();t.BasePlugin=o;const i=Pw();t.Uppy=i;const a=HC(),u=jC();i.Uppy=i,i.UIPlugin=a,i.BasePlugin=u,i.debugLogger=n.debugLogger}(UE,UE.exports)),UE.exports),JC=E(ZC),QC={};function eD(){if($C)return zC;$C=1;class e extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}return zC=e}function tD(){if(XC)return YC;let e;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}XC=1;var n=0;function r(e){return"__private_"+n+++"_"+e}const o=function(){if(VC)return UC;VC=1;const e=eD();return UC=function(){return fetch(...arguments).catch(t=>{throw"AbortError"===t.name?t:new e(t)})},UC}(),i=function(){if(GC)return WC;GC=1;const e=Tw();class t extends Error{constructor(t,n){void 0===n&&(n={}),super(t),this.cause=n.cause,this.cause&&e(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}return WC=t}(),a=function(){if(KC)return qC;KC=1;class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}return qC=e}();async function u(e){if(401===e.status)throw new a;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var s=r("companionHeaders"),l=r("getPostResponseFunc"),c=r("getUrl"),f=r("errorHandler");e=Symbol.for("uppy test: getCompanionHeaders");class d{constructor(e,n){Object.defineProperty(this,f,{value:h}),Object.defineProperty(this,c,{value:p}),Object.defineProperty(this,s,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,t(this,s)[s]=null==n?void 0:n.companionHeaders}setCompanionHeaders(e){t(this,s)[s]=e}[e](){return t(this,s)[s]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...d.defaultHeaders,...t(this,s)[s]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(t(this,c)[c](e),{method:"OPTIONS"}).then(e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map(e=>e.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then(e=>{let[t,n]=e;return Object.keys(n).forEach(e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])}),n})}get(e,n){return this.preflightAndHeaders(e).then(n=>o(t(this,c)[c](e),{method:"get",headers:n,credentials:this.opts.companionCookiesRule||"same-origin"})).then(t(this,l)[l](n)).then(u).catch(t(this,f)[f]("get",e))}post(e,n,r){const i="post";return this.preflightAndHeaders(e).then(r=>o(t(this,c)[c](e),{method:i,headers:r,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)})).then(t(this,l)[l](r)).then(u).catch(t(this,f)[f](i,e))}delete(e,n,r){const i="delete";return this.preflightAndHeaders(e).then(t=>o(`${this.hostname}/${e}`,{method:i,headers:t,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null})).then(t(this,l)[l](r)).then(u).catch(t(this,f)[f](i,e))}}function p(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function h(e,n){return r=>{var o;return null!=(o=r)&&o.isAuthError||(r=new i(`Could not ${e} ${t(this,c)[c](n)}`,{cause:r})),Promise.reject(r)}}return d.VERSION="2.2.2",d.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${d.VERSION}`},YC=d}var nD,rD,oD,iD,aD,uD,sD,lD,cD={};function fD(){if(nD)return cD;return nD=1,Object.defineProperty(cD,"__esModule",{value:!0}),cD.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},cD.removeItem=function(e){return new Promise(t=>{localStorage.removeItem(e),t()})},cD.setItem=function(e,t){return new Promise(n=>{localStorage.setItem(e,t),n()})},cD}function dD(){if(lD)return QC;lD=1,Object.defineProperty(QC,"__esModule",{value:!0}),QC.Socket=QC.SearchProvider=QC.RequestClient=QC.Provider=void 0;const e=tD();QC.RequestClient=e;const t=function(){if(oD)return rD;oD=1;var e=fD();const t=tD();return rD=class extends t{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}})}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then(e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(e=>{let[t]=e;return t})}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const e=n.companionAllowedHosts;if(!("string"==typeof e||Array.isArray(e)||e instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=e}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||e}},rD}();QC.Provider=t;const n=function(){if(aD)return iD;aD=1;const e=tD();return iD=class extends e{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}},iD}();QC.SearchProvider=n;const r=function(){if(sD)return uD;let e,t;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}sD=1;var r=0;function o(e){return"__private_"+r+++"_"+e}const i=Bw();var a=o("queued"),u=o("emitter"),s=o("isOpen"),l=o("socket"),c=o("handleMessage");return e=Symbol.for("uppy test: getSocket"),t=Symbol.for("uppy test: getQueued"),uD=class{constructor(e){Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,u,{writable:!0,value:i()}),Object.defineProperty(this,s,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,s)[s]}[e](){return n(this,l)[l]}[t](){return n(this,a)[a]}open(){n(this,l)[l]=new WebSocket(this.opts.target),n(this,l)[l].onopen=()=>{for(n(this,s)[s]=!0;n(this,a)[a].length>0&&n(this,s)[s];){const e=n(this,a)[a].shift();this.send(e.action,e.payload)}},n(this,l)[l].onclose=()=>{n(this,s)[s]=!1},n(this,l)[l].onmessage=n(this,c)[c]}close(){var e;null==(e=n(this,l)[l])||e.close()}send(e,t){n(this,s)[s]?n(this,l)[l].send(JSON.stringify({action:e,payload:t})):n(this,a)[a].push({action:e,payload:t})}on(e,t){n(this,u)[u].on(e,t)}emit(e,t){n(this,u)[u].emit(e,t)}once(e,t){n(this,u)[u].once(e,t)}},uD}();return QC.Socket=r,QC}var pD,hD,gD,vD,mD,yD,bD,ED,wD,CD,DD,AD,SD,xD,OD,TD,ND,BD={};function kD(){if(pD)return BD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}pD=1,Object.defineProperty(BD,"__esModule",{value:!0}),BD.internalRateLimitedQueue=BD.RateLimitedQueue=void 0;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("activeRequests"),o=n("queuedHandlers"),i=n("paused"),a=n("pauseTimer"),u=n("downLimit"),s=n("upperLimit"),l=n("rateLimitingTimer"),c=n("call"),f=n("queueNext"),d=n("next"),p=n("queue"),h=n("dequeue"),g=n("resume"),v=n("increaseLimit");function m(t){e(this,r)[r]+=1;let n,o=!1;try{n=t()}catch(t){throw e(this,r)[r]-=1,t}return{abort:()=>{o||(o=!0,e(this,r)[r]-=1,n(),e(this,f)[f]())},done:()=>{o||(o=!0,e(this,r)[r]-=1,e(this,f)[f]())}}}function y(){queueMicrotask(()=>e(this,d)[d]())}function b(){if(e(this,i)[i]||e(this,r)[r]>=this.limit)return;if(0===e(this,o)[o].length)return;const t=e(this,o)[o].shift(),n=e(this,c)[c](t.fn);t.abort=n.abort,t.done=n.done}function E(t,n){void 0===n&&(n={});const r={fn:t,priority:n.priority||0,abort:()=>{e(this,h)[h](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=e(this,o)[o].findIndex(e=>r.priority>e.priority);return-1===i?e(this,o)[o].push(r):e(this,o)[o].splice(i,0,r),r}function w(t){const n=e(this,o)[o].indexOf(t);-1!==n&&e(this,o)[o].splice(n,1)}BD.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,h,{value:w}),Object.defineProperty(this,p,{value:E}),Object.defineProperty(this,d,{value:b}),Object.defineProperty(this,f,{value:y}),Object.defineProperty(this,c,{value:m}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,i,{writable:!0,value:!1}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:1}),Object.defineProperty(this,s,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(e(this,i)[i])e(this,l)[l]=setTimeout(e(this,v)[v],0);else{e(this,u)[u]=this.limit,this.limit=Math.ceil((e(this,s)[s]+e(this,u)[u])/2);for(let t=e(this,u)[u];t<=this.limit;t++)e(this,f)[f]();e(this,s)[s]-e(this,u)[u]>3?e(this,l)[l]=setTimeout(e(this,v)[v],2e3):e(this,u)[u]=Math.floor(e(this,u)[u]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,n){return!e(this,i)[i]&&e(this,r)[r]<this.limit?e(this,c)[c](t):e(this,p)[p](t,n)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const u=new Promise((r,i)=>{a=n.run(()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then(e=>{t?i(t):(a.done(),r(e))},e=>{t?i(t):(a.done(),i(e))}),()=>{t=new Error("Cancelled")}},t)});return u.abort=()=>{a.abort()},u}}resume(){e(this,i)[i]=!1,clearTimeout(e(this,a)[a]);for(let t=0;t<this.limit;t++)e(this,f)[f]()}pause(t){void 0===t&&(t=null),e(this,i)[i]=!0,clearTimeout(e(this,a)[a]),null!=t&&(e(this,a)[a]=setTimeout(e(this,g)[g],t))}rateLimit(t){clearTimeout(e(this,l)[l]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(e(this,s)[s]=this.limit-1,this.limit=e(this,u)[u],e(this,l)[l]=setTimeout(e(this,v)[v],t))}get isPaused(){return e(this,i)[i]}};const C=Symbol("__queue");return BD.internalRateLimitedQueue=C,BD}function FD(){return OD?xD:(OD=1,xD={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}})}var ID=function(){if(ND)return TD;ND=1;var e=GE(),t=dD(),n=kD();const r=jC(),o=function(){if(gD)return hD;gD=1;const e=fb();return hD=e(function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))},300,{leading:!0,trailing:!0})}(),i=mD?vD:(mD=1,vD=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}),a=bD?yD:(bD=1,yD=function(e){const t=[],n=[];function r(e){t.push(e)}function o(e){n.push(e)}return Promise.all(e.map(e=>e.then(r,o))).then(()=>({successful:t,failed:n}))}),u=function(){if(wD)return ED;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}wD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("emitter"),o=n("events");return ED=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,n){return e(this,o)[o].push([t,n]),e(this,r)[r].on(t,n)}remove(){for(const[t,n]of e(this,o)[o].splice(0))e(this,r)[r].off(t,n)}}}(),s=function(){if(DD)return CD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}DD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("aliveTimer"),o=n("isDone"),i=n("onTimedOut"),a=n("timeout");return CD=class{constructor(t,n){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:!1}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),e(this,a)[a]=t,e(this,i)[i]=n}progress(){e(this,o)[o]||e(this,a)[a]>0&&(clearTimeout(e(this,r)[r]),e(this,r)[r]=setTimeout(e(this,i)[i],e(this,a)[a]))}done(){e(this,o)[o]||(clearTimeout(e(this,r)[r]),e(this,r)[r]=null,e(this,o)[o]=!0)}}}(),l=eD(),c=SD?AD:(SD=1,AD=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}),f=FD();function d(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),c(e)?(n=new l(n,e),n):(n.request=e,n)}function p(e){return e.data.slice(0,e.data.size,e.meta.type)}class h extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=f;const r={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(t){e.log(t)}return n},getResponseError(e,t){let n=new Error("Upload error");return c(t)&&(n=new l(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts={...r,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),n.internalRateLimitedQueue in this.opts?this.requests=this.opts[n.internalRateLimitedQueue]:this.requests=new n.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach(n=>{e.append(n,t[n])})}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=p(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach(e=>{const t=this.getOptions(e),r=p(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)}),n}upload(t,n,r){const o=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise((n,r)=>{this.uppy.emit("upload-started",t);const i=o.formData?this.createFormDataUpload(t,o):t.data,a=new XMLHttpRequest;let l;this.uploaderEvents[t.id]=new u(this.uppy);const c=new s(o.timeout,()=>{a.abort(),l.done();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-error",t,e),r(e)}),f=(0,e.nanoid)();a.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${f} started`)}),a.upload.addEventListener("progress",e=>{this.uppy.log(`[XHRUpload] ${f} progress: ${e.loaded} / ${e.total}`),c.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})}),a.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${f} finished`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),o.validateStatus(a.status,a.responseText,a)){const e=o.getResponseData(a.responseText,a),r=e[o.responseUrlFieldName],i={status:a.status,body:e,uploadURL:r};return this.uppy.emit("upload-success",t,i),r&&this.uppy.log(`Download ${t.name} from ${r}`),n(t)}const e=o.getResponseData(a.responseText,a),i=d(a,o.getResponseError(a.responseText,a)),u={status:a.status,body:e};return this.uppy.emit("upload-error",t,i,u),r(i)}),a.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${f} errored`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const e=d(a,o.getResponseError(a.responseText,a));return this.uppy.emit("upload-error",t,e),r(e)}),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),l=this.requests.run(()=>{this.uppy.emit("upload-started",t);const e=this.getOptions(t);return Object.keys(e.headers).forEach(t=>{a.setRequestHeader(t,e.headers[t])}),a.send(i),()=>{c.done(),a.abort()}}),this.onFileRemove(t.id,()=>{l.abort(),r(new Error("File removed"))}),this.onCancelAll(t.id,e=>{let{reason:t}=e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))})})}uploadRemote(e){const n=this.getOptions(e);return new Promise((r,a)=>{this.uppy.emit("upload-started",e);const s={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(e.meta)).forEach(t=>{s[t]=e.meta[t]});new(e.remote.providerOptions.provider?t.Provider:t.RequestClient)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:s,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then(s=>{const{token:l}=s,c=i(e.remote.companionUrl),f=new t.Socket({target:`${c}/api/${l}`,autoOpen:!1});let d;this.uploaderEvents[e.id]=new u(this.uppy),this.onFileRemove(e.id,()=>{f.send("cancel",{}),d.abort(),r(`upload ${e.id} was removed`)}),this.onCancelAll(e.id,function(t){let{reason:n}=void 0===t?{}:t;"user"===n&&(f.send("cancel",{}),d.abort()),r(`upload ${e.id} was canceled`)}),this.onRetry(e.id,()=>{f.send("pause",{}),f.send("resume",{})}),this.onRetryAll(e.id,()=>{f.send("pause",{}),f.send("resume",{})}),f.on("progress",t=>o(this,t,e)),f.on("success",t=>{const o=n.getResponseData(t.response.responseText,t.response),i=o[n.responseUrlFieldName],a={status:t.response.status,body:o,uploadURL:i};return this.uppy.emit("upload-success",e,a),d.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r()}),f.on("error",t=>{const r=t.response,o=r?n.getResponseError(r.responseText,r):Object.assign(new Error(t.error.message),{cause:t.error});this.uppy.emit("upload-error",e,o),d.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),a(o)}),d=this.requests.run(()=>(f.open(),e.isPaused&&f.send("pause",{}),()=>f.close()))}).catch(t=>{this.uppy.emit("upload-error",e,t),a(t)})})}uploadBundle(e){return new Promise((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),u=new XMLHttpRequest,l=t=>{e.forEach(e=>{this.uppy.emit("upload-error",e,t)})},c=new s(this.opts.timeout,()=>{u.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(e),n(e)});u.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),c.progress()}),u.upload.addEventListener("progress",t=>{c.progress(),t.lengthComputable&&e.forEach(e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})})}),u.addEventListener("load",r=>{if(c.done(),this.opts.validateStatus(r.target.status,u.responseText,u)){const n=this.opts.getResponseData(u.responseText,u),o={status:r.target.status,body:n};return e.forEach(e=>{this.uppy.emit("upload-success",e,o)}),t()}const o=this.opts.getResponseError(u.responseText,u)||new Error("Upload error");return o.request=u,l(o),n(o)}),u.addEventListener("error",()=>{c.done();const e=this.opts.getResponseError(u.responseText,u)||new Error("Upload error");return l(e),n(e)}),this.uppy.on("cancel-all",function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(c.done(),u.abort())}),u.open(o.toUpperCase(),r,!0),u.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(u.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(e=>{u.setRequestHeader(e,this.opts.headers[e])}),u.send(a),e.forEach(e=>{this.uppy.emit("upload-started",e)})})}uploadFiles(e){const t=e.map((t,n)=>{const r=parseInt(n,10)+1,o=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,o):this.upload(t,r,o)});return a(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",n=>{e===n.id&&t(n.id)})}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",()=>{this.uppy.getFile(e)&&t()})}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",function(){n.uppy.getFile(e)&&t(...arguments)})}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[n.internalRateLimitedQueue]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map(e=>this.uppy.getFile(e));if(this.opts.bundle){if(t.some(e=>e.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}return h.VERSION="2.1.3",TD=h}(),PD=E(ID);function RD(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,u=e.maxNumberOfFiles,s=void 0===u?100:u,l=e.meta,c=void 0===l?{}:l,f=e.metaWithUrl,d=void 0!==f&&f,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,E=void 0===b?function(e){return e}:b,w=e.onSuccess,C=void 0===w?function(e,t){}:w,D=e.onError,A=void 0===D?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:D,S=e.onProgress,x=void 0===S?function(e){}:S;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var O=n;d&&(O=function(e,t){var n=Op(e.split("#"),2),r=n[0],o=n[1],i=[];Lp(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}(O,c));var T=new JC(Dp({onBeforeUpload:E,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c},e.uppyConfig)).use(PD,Dp({endpoint:O,headers:h,formData:!0,fieldName:o,bundle:!1,withCredentials:v,timeout:y},e.xhrConfig));return T.on("upload-success",function(e,t){var n=(null!=t?t:{}).body,r=void 0===n?{}:n;try{C(e,r)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}}),T.on("progress",function(e){e<1||x(e)}),T.on("upload-error",function(e,t,n){try{A(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}}),T.on("restriction-failed",function(e,t){try{A(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}}),T}jy("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),jy("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var _D,LD,MD,jD,HD,zD,$D,UD,VD,WD,GD,qD,KD,YD,XD,ZD,JD,QD={};function eA(){if(LD)return _D;LD=1;var e=S();return _D=Array.isArray||function(t){return"Array"===e(t)}}function tA(){if(jD)return MD;jD=1;var e=A(),t=C(),n=ye(),r=kr(),o=$t(),i=xn(),a=function(){},u=o("Reflect","construct"),s=/^\s*(?:class|function)\b/,l=e(s.exec),c=!s.test(a),f=function(e){if(!n(e))return!1;try{return u(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(s,i(e))}catch(e){return!0}};return d.sham=!0,MD=!u||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?d:f}function nA(){if(zD)return HD;zD=1;var e=eA(),t=tA(),n=be(),r=me()("species"),o=Array;return HD=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},HD}function rA(){if(UD)return $D;UD=1;var e=nA();return $D=function(t,n){return new(e(t))(0===n?0:n)}}function oA(){if(WD)return VD;WD=1;var e=xe(),t=Xt(),n=ln();return VD=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function iA(){if(YD)return KD;YD=1;var e=C();return KD=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})}}function aA(){if(ZD)return XD;ZD=1;var e=function(){if(qD)return GD;qD=1;var e=qo(),t=x(),n=fe(),r=Qt(),o=rA(),i=oA(),a=function(a){var u=1===a,s=2===a,l=3===a,c=4===a,f=6===a,d=7===a,p=5===a||f;return function(h,g,v){for(var m,y,b=n(h),E=t(b),w=r(E),C=e(g,v),D=0,A=0,S=u?o(h,w):s||d?o(h,0):void 0;w>D;D++)if((p||D in E)&&(y=C(m=E[D],D,b),a))if(u)i(S,D,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return D;case 2:i(S,A++,m)}else switch(a){case 4:return!1;case 7:i(S,A++,m)}return f?-1:l||c?c:S}};return GD={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}().forEach,t=iA()("forEach");return XD=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},XD}!function(){if(JD)return QD;JD=1;var e=B(),t=fi(),n=di(),r=aA(),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)}();jy("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"},formatPainter:{title:"Format Painter"}}),jy("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"},formatPainter:{title:"格式刷"}});var uA={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>".concat(t,"</blockquote>")}},sA='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',lA='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',cA='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',fA=function(){function e(){this.title=zy("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!Dv.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Op(mp.Editor.nodes(e,{match:function(e){var t=Dv.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1);return!t[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";mp.Transforms.setNodes(e,{type:n},{mode:"highest"})}},e}(),dA={key:"blockquote",factory:function(){return new fA}};function pA(e){return 0===zh("<div>".concat(e,"</div>")).children().filter(function(e){return"BR"!==e.tagName}).length}function hA(e){return 0===e.length?"":e[0].outerHTML}function gA(e){return e.length?e[0].tagName.toLowerCase():""}function vA(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var u=a.split(":");u[0].trim()===t&&(n=u[1].trim())}}return n}rg&&(zh.fn.css=rg),lg&&(zh.fn.append=lg),cg&&(zh.fn.prepend=cg),$h&&(zh.fn.addClass=$h),Uh&&(zh.fn.removeClass=Uh),Vh&&(zh.fn.hasClass=Vh),Xh&&(zh.fn.on=Xh),Zh&&(zh.fn.off=Zh),Eg&&(zh.fn.focus=Eg),Wh&&(zh.fn.attr=Wh),Gh&&(zh.fn.removeAttr=Gh),tg&&(zh.fn.hide=tg),ng&&(zh.fn.show=ng),dg&&(zh.fn.parents=dg),Kh&&(zh.fn.dataset=Kh),Yh&&(zh.fn.val=Yh),ug&&(zh.fn.text=ug),ag&&(zh.fn.html=ag),hg&&(zh.fn.children=hg),gg&&(zh.fn.remove=gg),pg&&(zh.fn.find=pg),Jh&&(zh.fn.width=Jh),Qh&&(zh.fn.height=Qh),ig&&(zh.fn.filter=ig),vg&&(zh.fn.empty=vg);var mA={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e);return 0===(t=t.filter(function(e){return!!mp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}};function yA(e){e.deleteBackward("character");mp.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var bA={type:"blockquote",renderElem:function(e,t,n){return gE("blockquote",null,t)}},EA={renderElems:[bA],elemsToHtml:[uA],parseElemsHtml:[mA],menus:[dA],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(null==o)return t();var i=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"blockquote")},universal:!0}),1),a=i[0];if(!a)return t();var u=a[0];if(Dv.getParentNode(e,u)){var s=Dv.findPath(e,u),l=mp.Editor.end(e,s);if(mp.Point.equals(l,o.focus)){var c=mp.Editor.last(e,l.path),f=mp.Node.string(c[0]);if(f&&"\n"===f.slice(-1))return void yA(r)}n("\n")}else yA(r)},r}};var wA={type:"code",elemToHtml:function(e,t){return"<code>".concat(t,"</code>")}};var CA={type:"pre",elemToHtml:function(e,t){return"<pre>".concat(t,"</pre>")}},DA=function(){function e(){this.title=zy("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=Dv.getSelectedNodeByType(e,"code");if(null==t)return null;var n=Dv.getParentNode(e,t);return null==n||"pre"!==Dv.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t){var n=e.getMenuConfig("codeSelectLang").codeLangs,r=(void 0===n?[]:n).find(function(e){return e.selected});return(null==r?void 0:r.value)||""}return t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Dv.getSelectedElems(e);return!!t.some(function(t){return e.isVoid(t)})||!t.some(function(e){var t=Dv.getNodeType(e);return"pre"===t||"paragraph"===t})},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=mp.Node.string(t);mp.Transforms.removeNodes(e,{mode:"highest"});var r=n.split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}});mp.Transforms.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,o=[],i=mp.Editor.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=xp(i),u=a.next();!u.done;u=a.next()){var s=Op(u.value,1)[0];s&&o.push(mp.Node.string(s))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}mp.Transforms.removeNodes(e,{mode:"highest"});var l={type:"pre",children:[{type:"code",language:t,children:[{text:o.join("\n")}]}]};mp.Transforms.insertNodes(e,l,{mode:"highest"})},e}();var AA={selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e);return 0===(t=t.filter(function(e){return"code"===Dv.getNodeType(e)})).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(e){return"code"===Dv.getNodeType(e)})}}};var SA={type:"pre",renderElem:function(e,t,n){return gE("pre",null,t)}},xA={type:"code",renderElem:function(e,t,n){return gE("code",null,t)}},OA={menus:[{key:"codeBlock",factory:function(){return new DA}}],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData,o=e.handleTab,i=e;return i.insertBreak=function(){var e=Dv.getSelectedNodeByType(i,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=mp.Node.string(e),o=n.anchor.offset,i=r.slice(0,o).split("\n"),a=i.length;return 0===a?"":i[a-1]}(e,i);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var o=r[0];return void i.insertText("\n".concat(o))}}i.insertText("\n")}else t()},e.handleTab=function(){var t=e.selection;if(t){var n=Dv.getSelectedNodeByType(e,"code");if(n&&!mp.Range.isCollapsed(t)){var r=Op([t.anchor,t.focus].sort(function(e,t){return e.offset-t.offset}),2),i=r[0],a=r[1],u=n.children[0].text,s=u.split("\n"),l=u.slice(0,i.offset).split("\n").length-1,c=u.slice(0,a.offset).split("\n").length-1,f=s.map(function(e,t){return t>=l&&t<=c?" ".concat(e):e}),d=f.join("\n"),p={anchor:{path:i.path,offset:i.offset+2},focus:{path:a.path,offset:a.offset+2}};mp.Transforms.insertText(e,d,{at:{anchor:{path:i.path,offset:0},focus:{path:a.path,offset:u.length}}}),mp.Transforms.select(e,p)}else o()}},i.normalizeNode=function(e){var t=Op(e,2),r=t[0],o=t[1],a=Dv.getNodeType(r);("code"===a&&o.length<=1&&mp.Transforms.setNodes(i,{type:"paragraph"},{at:o}),"pre"===a)&&(Dv.isLastNode(i,r)&&mp.Transforms.insertNodes(i,Dv.genEmptyParagraph(),{at:[o[0]+1]}),"code"!==Dv.getNodeType(r.children[0])&&(mp.Transforms.unwrapNodes(i),mp.Transforms.setNodes(i,{type:"paragraph"},{mode:"highest"})));return n([r,o])},i.insertData=function(e){if(null!=Dv.getSelectedNodeByType(i,"code")){var t=e.getData("text/plain");mp.Editor.insertText(i,t)}else r(e)},i},renderElems:[SA,xA],elemsToHtml:[wA,CA],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=zh(e);if("code"!==gA(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:zh(e)[0].textContent||""}]}}},AA]},TA=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=mp.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Op(mp.Editor.nodes(e,{match:function(t){return"pre"===Dv.getNodeType(t)||!(!mp.Element.isElement(t)||!mp.Editor.isVoid(e,t))},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=zh('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var o=zh(r).attr("data-value");"0"===o?mp.Editor.removeMark(e,t):mp.Editor.addMark(e,t,o)}}),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var o=this.getValue(e),i=e.getMenuConfig(t).colors;(void 0===i?[]:i).forEach(function(e){var t=zh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=zh('<li data-value="'.concat(e,'"></li>'));o===e&&n.addClass("active"),n.append(t),r.append(n)});var a="";"color"===t&&(a=zy("color.default")),"bgColor"===t&&(a=zy("color.clear"));var u=zh('\n <li data-value="0" class="clear">\n '.concat('<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',"\n ").concat(a,"\n </li>\n "));return r.prepend(u),r[0]},e}(),NA=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("color.bgColor"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',t.mark="bgColor",t}return Cp(t,e),t}(TA),BA=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("color.color"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',t.mark="color",t}return Cp(t,e),t}(TA),kA=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"];var FA={selector:"font",preParseHtml:function(e){var t=zh(e);if("font"!==gA(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}};function IA(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var PA={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&IA(i,{color:r}),o&&IA(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!mp.Text.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((pA(t)||"span"!==gA(n=zh(t)))&&(n=zh("<span>".concat(t,"</span>"))),o&&n.css("color",o),i&&n.css("background-color",i),hA(n)):t},preParseHtml:[FA],parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Text.isText(t))return t;var o=t,i=vA(r,"color");i&&(o.color=i);var a=vA(r,"background-color");return a||(a=vA(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new BA},config:{colors:kA}},{key:"bgColor",factory:function(){return new NA},config:{colors:kA}}]},RA=function(){function e(){this.title=zy("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!mp.Range.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];mp.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(mp.Editor.start(e,r))}},e}(),_A={menus:[{key:"enter",factory:function(){return new RA}}]};var LA={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},MA=function(){function e(){this.title=zy("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!Dv.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=Dv.getNodeType(t);return"table"===n||"pre"===n})},e.prototype.exec=function(e,t){Dv.isSelectedEmptyParagraph(e)&&mp.Transforms.removeNodes(e,{mode:"highest"}),mp.Transforms.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}();var jA={renderElems:[{type:"divider",renderElem:function(e,t,n){return Yb("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:Dv.isNodeSelected(n,e)?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[Yb("hr")])}}],elemsToHtml:[LA],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new MA}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=Op(e,2),o=t[0],i=t[1];if("divider"!==Dv.getNodeType(o))return n([o,i]);Dv.isLastNode(r,o)&&mp.Transforms.insertNodes(r,Dv.genEmptyParagraph(),{at:[i[0]+1]})},r}};var HA=function(){function e(){this.title=zy("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Op(mp.Editor.nodes(e,{match:function(t){return"pre"===Dv.getNodeType(t)||!(!mp.Element.isElement(t)||!mp.Editor.isVoid(e,t))},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=zh('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=zh(n).text();e.insertText(r)}}),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach(function(e){var t=zh("<li>".concat(e,"</li>"));n.append(t)}),n[0]},e}(),zA={menus:[{key:"emotion",factory:function(){return new HA},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]};var $A=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=mp.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Op(mp.Editor.nodes(e,{match:function(t){return"pre"===Dv.getNodeType(t)||!(!mp.Element.isElement(t)||!mp.Editor.isVoid(e,t))},universal:!0}),1);return!!t[0]},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),UA=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("fontFamily.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',t.mark="fontFamily",t.selectPanelWidth=150,t}return Cp(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:zy("fontFamily.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}});var o=this.getValue(e),i=!1;return t.forEach(function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0}),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}($A),VA=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return Cp(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:zy("fontSize.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r})}});var o=this.getValue(e),i=!1;return t.forEach(function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0}),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}($A);var WA={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"};var GA={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&IA(i,{fontSize:r}),o&&IA(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!mp.Text.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((pA(t)||"span"!==gA(n=zh(t)))&&(n=zh("<span>".concat(t,"</span>"))),o&&n.css("font-size",o),i&&n.css("font-family",i),hA(n)):t},preParseHtml:[{selector:"font",preParseHtml:function(e){var t=zh(e);if("font"!==gA(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",WA[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}}],parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Text.isText(t))return t;var o=t,i=vA(r,"font-size");i&&(o.fontSize=i);var a=vA(r,"font-family").replace(/"/g,"");return a&&(o.fontFamily=a),o},menus:[{key:"fontSize",factory:function(){return new VA},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new UA},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]};var qA=function(){function e(){this.title=zy("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(t){return e.attrs.isSelect},e.prototype.isDisabled=function(e){return!1},e.prototype.setFormatHtml=function(t){var n,r;if(t.getSelectionText().length){if(e.attrs.formatStyle){!function(e){var t=mp.Editor.marks(e);t&&Object.keys(t).forEach(function(t){e.removeMark(t)})}(t);try{for(var o=xp(Object.entries(e.attrs.formatStyle)),i=o.next();!i.done;i=o.next()){var a=Op(i.value,2),u=a[0],s=a[1];t.addMark(u,s)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}e.attrs.formatStyle=null,e.attrs.isSelect=!1}},e.prototype.exec=function(t){e.attrs.isSelect?(e.attrs.isSelect=!1,e.attrs.formatStyle=null):t.getSelectionText().length&&(e.attrs.formatStyle=mp.Editor.marks(t),e.attrs.isSelect=!0);t.blur(),t.focus()},e.attrs={isSelect:!1,formatStyle:null},e}();var KA={menus:[{key:"formatPainter",factory:function(){return new qA}}],editorPlugin:function(e){var t=new qA,n=e.onChange,r=e,o=function(){t.setFormatHtml(r),document.removeEventListener("mouseup",o)};return r.onChange=function(){n(),qA.attrs.isSelect&&(document.removeEventListener("mouseup",o),document.addEventListener("mouseup",o))},r}},YA=function(){function e(){this.title=zy("fullScreen.title"),this.iconSvg=cA,this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.getIcon=function(e){return e.isFullScreen?'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>':cA},e.prototype.getTitle=function(e){return e.isFullScreen?zy("fullScreen.cancelTitle"):zy("fullScreen.title")},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),XA={menus:[{key:"fullScreen",factory:function(){return new YA}}]};function ZA(e){return function(t,n){return"<h".concat(e,">").concat(n,"</h").concat(e,">")}}var JA={type:"header1",elemToHtml:ZA(1)},QA={type:"header2",elemToHtml:ZA(2)},eS={type:"header3",elemToHtml:ZA(3)},tS={type:"header4",elemToHtml:ZA(4)},nS={type:"header5",elemToHtml:ZA(5)},rS={type:"header6",elemToHtml:ZA(6)};function oS(e){var t=Op(mp.Editor.nodes(e,{match:function(e){return Dv.getNodeType(e).startsWith("header")},universal:!0}),1),n=t[0];if(null==n)return"paragraph";var r=Op(n,1)[0];return Dv.getNodeType(r)}function iS(e){if(null==e.selection)return!0;var t=Op(mp.Editor.nodes(e,{match:function(e){var t=Dv.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1);return!t[0]}function aS(e,t){t&&mp.Transforms.setNodes(e,{type:t})}var uS=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return oS(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return iS(e)},e.prototype.exec=function(e,t){var n=this.type;aS(e,t===n?"paragraph":n)},e}(),sS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="H1",t.type="header1",t}return Cp(t,e),t}(uS),lS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="H2",t.type="header2",t}return Cp(t,e),t}(uS),cS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="H3",t.type="header3",t}return Cp(t,e),t}(uS),fS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="H4",t.type="header4",t}return Cp(t,e),t}(uS),dS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="H5",t.type="header5",t}return Cp(t,e),t}(uS),pS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="H6",t.type="header6",t}return Cp(t,e),t}(uS),hS=function(){function e(){this.title=zy("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(e){var t=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:zy("header.text")}],n=this.getValue(e).toString();return t.forEach(function(e){e.value===n?e.selected=!0:e.selected=void 0}),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return oS(e)},e.prototype.isDisabled=function(e){return iS(e)},e.prototype.exec=function(e,t){aS(e,t.toString())},e}(),gS={key:"headerSelect",factory:function(){return new hS}},vS={key:"header1",factory:function(){return new sS}},mS={key:"header2",factory:function(){return new lS}},yS={key:"header3",factory:function(){return new cS}},bS={key:"header4",factory:function(){return new fS}},ES={key:"header5",factory:function(){return new dS}},wS={key:"header6",factory:function(){return new pS}};function CS(e){return function(t,n,r){var o=zh(t);return 0===(n=n.filter(function(e){return!!mp.Text.isText(e)||!!r.isInline(e)})).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header".concat(e),children:n}}}var DS={selector:"h1:not([data-w-e-type])",parseElemHtml:CS(1)},AS={selector:"h2:not([data-w-e-type])",parseElemHtml:CS(2)},SS={selector:"h3:not([data-w-e-type])",parseElemHtml:CS(3)},xS={selector:"h4:not([data-w-e-type])",parseElemHtml:CS(4)},OS={selector:"h5:not([data-w-e-type])",parseElemHtml:CS(5)},TS={selector:"h6:not([data-w-e-type])",parseElemHtml:CS(6)};function NS(e){return function(t,n,r){return gE("h".concat(e),null,n)}}var BS={renderElems:[{type:"header1",renderElem:NS(1)},{type:"header2",renderElem:NS(2)},{type:"header3",renderElem:NS(3)},{type:"header4",renderElem:NS(4)},{type:"header5",renderElem:NS(5)},{type:"header6",renderElem:NS(6)}],elemsToHtml:[JA,QA,eS,tS,nS,rS],parseElemsHtml:[DS,AS,SS,xS,OS,TS],menus:[gS,vS,mS,yS,bS,ES,wS],editorPlugin:function(e){var t=e.insertBreak,n=e;return n.insertBreak=function(){var r=Op(mp.Editor.nodes(n,{match:function(e){return Dv.getNodeType(e).startsWith("header")},universal:!0}),1),o=r[0];if(o)if(Dv.isSelectionAtLineEnd(e,o[1])){mp.Transforms.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else t();else t()},n}};var kS={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=void 0===o?"":o,a=n.href,u=void 0===a?"":a,s=n.width,l=void 0===s?"":s,c=n.height,f=void 0===c?"":c,d=n.style,p=void 0===d?{}:d,h=p.width,g=void 0===h?"":h,v=p.height,m=void 0===v?"":v,y="";return g&&(y+="width: ".concat(g,";")),m&&(y+="height: ".concat(m,";")),'<img src="'.concat(r,'" alt="').concat(i,'" data-href="').concat(u,'" width="').concat(l,'" height="').concat(f,'" style="').concat(y,'"/>')}};var FS=function(){function e(){this.title=zy("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Dv.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||mp.Transforms.removeNodes(e,{match:function(e){return Dv.checkNodeType(e,"image")}})},e}();function IS(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(Cg())}function PS(e){return e.replace(/</g,"<").replace(/>/g,">")}function RS(e){var t=e.selection;if(null==t)return!0;if(!mp.Range.isCollapsed(t))return!0;var n=Op(mp.Editor.nodes(e,{match:function(t){var n=Dv.getNodeType(t);return"code"===n||("pre"===n||("link"===n||("list-item"===n||(!!n.startsWith("header")||("blockquote"===n||!(!mp.Element.isElement(t)||!mp.Editor.isVoid(e,t)))))))},universal:!0}),1);return!!n[0]}function _S(e,t,n){return Ap(this,arguments,void 0,function(e,t,n,r,o){var i,a;return void 0===r&&(r=""),void 0===o&&(o=""),Sp(this,function(u){switch(u.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if("string"==typeof(a=u.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];u.label=2;case 2:return[2,!0]}})})}function LS(e,t,n){return Ap(this,void 0,void 0,function(){var r;return Sp(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function MS(e,t){return Ap(this,arguments,void 0,function(e,t,n,r){var o,i,a;return void 0===n&&(n=""),void 0===r&&(r=""),Sp(this,function(u){switch(u.label){case 0:return[4,_S("insertImage",e,t,n,r)];case 1:return u.sent()?[4,LS("insertImage",e,t)]:[2];case 2:return o=u.sent(),i={type:"image",src:PS(o),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),Dv.getSelectedNodeByType(e,"image")&&e.move(1),RS(e)?[2]:(mp.Transforms.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i),[2])}})})}function jS(){return IS("w-e-edit-image")}var HS=function(){function e(){this.title=zy("image.edit"),this.iconSvg=sA,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=jS(),this.altInputId=jS(),this.hrefInputId=jS(),this.buttonId=jS()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return Dv.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||null==Dv.getSelectedNodeByType(e,"image"))},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,u=this.getImageNode(e);if(null==u)throw new Error("Not found selected image node");var s=Op(Jy(zy("image.src"),r),2),l=s[0],c=zh(s[1]),f=Op(Jy(zy("image.desc"),o),2),d=f[0],p=zh(f[1]),h=Op(Jy(zy("image.link"),i),2),g=h[0],v=zh(h[1]),m=Op(Qy(a,zy("common.ok")),1)[0];if(null==this.$content){var y=zh("<div></div>");y.on("click","#".concat(a),function(n){n.preventDefault();var a=y.find("#".concat(r)).val(),u=y.find("#".concat(o)).val(),s=y.find("#".concat(i)).val();t.updateImage(e,a,u,s),e.hidePanelOrModal()}),this.$content=y}var b=this.$content;b.empty(),b.append(l),b.append(d),b.append(g),b.append(m);var E=u,w=E.src,C=E.alt,D=void 0===C?"":C,A=E.href,S=void 0===A?"":A;return c.val(w),p.val(D),v.val(S),setTimeout(function(){c.focus()}),b[0]},e.prototype.updateImage=function(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t){Ap(this,arguments,void 0,function(e,t,n,r,o){var i,a,u,s,l,c;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),Sp(this,function(f){switch(f.label){case 0:return[4,_S("editImage",e,t,n,r)];case 1:return f.sent()?[4,LS("editImage",e,t)]:[2];case 2:return i=f.sent(),null==(a=Dv.getSelectedNodeByType(e,"image"))||(u=a.style,s={src:i,alt:n,href:r,style:Dp(Dp({},void 0===u?{}:u),o)},mp.Transforms.setNodes(e,s,{match:function(e){return Dv.checkNodeType(e,"image")}}),l=Dv.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l)),[2]}})})}(e,t,n,r,o))},e}();function zS(){return IS("w-e-insert-image")}var $S=function(){function e(){this.title=zy("image.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=zS(),this.heightInputId=zS(),this.buttonId=zS()}return e.prototype.getSelectedImageNode=function(e){return Dv.getSelectedNodeByType(e,"image")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedImageNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Op(Jy(zy("image.width"),n,"auto"),2),a=i[0],u=zh(i[1]),s=Op(Jy(zy("image.height"),r,"auto"),2),l=s[0],c=zh(s[1]),f=Op(Qy(o,zy("image.ok")),1)[0],d=this.getSelectedImageNode(e);if(null==this.$content){var p=zh("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},u=function(e){return/^\d+(\.\d+)?$/.test(e)},s=function(e){return/^\d+(\.\d+)?px$/.test(e)},l="auto",c="auto";a(o)?l=o:u(o)?l="".concat(parseInt(o,10),"px"):s(o)&&(l=o),a(i)?c=i:u(i)?c="".concat(parseInt(i,10),"px"):s(i)&&(c=i);var f=d.style,h=void 0===f?{}:f;e.restoreSelection();var g=Dp(Dp({},h),{style:{width:l,height:c}});mp.Transforms.setNodes(e,g,{match:function(e){return Dv.checkNodeType(e,"image")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(f),null==d)return h[0];var g=d.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"auto":m,b=v.height,E=void 0===b?"auto":b;return u.val(y),c.val(E),setTimeout(function(){u.focus()}),h[0]},e}();function US(){return IS("w-e-insert-image")}var VS=function(){function e(){this.title=zy("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=US(),this.altInputId=US(),this.hrefInputId=US(),this.buttonId=US()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return RS(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,u=Op(Jy(zy("image.src"),r),2),s=u[0],l=zh(u[1]),c=Op(Jy(zy("image.desc"),o),2),f=c[0],d=zh(c[1]),p=Op(Jy(zy("image.link"),i),2),h=p[0],g=zh(p[1]),v=Op(Qy(a,zy("common.ok")),1)[0];if(null==this.$content){var m=zh("<div></div>");m.on("click","#".concat(a),function(n){n.preventDefault();var a=m.find("#".concat(r)).val().trim(),u=m.find("#".concat(o)).val().trim(),s=m.find("#".concat(i)).val().trim();t.insertImage(e,a,u,s),e.hidePanelOrModal()}),this.$content=m}var y=this.$content;return y.empty(),y.append(s),y.append(f),y.append(h),y.append(v),l.val(""),d.val(""),g.val(""),setTimeout(function(){l.focus()}),y[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||MS(e,t,n,r))},e}(),WS=function(){function e(){this.title=zy("image.viewLink"),this.iconSvg=lA,this.tag="button"}return e.prototype.getValue=function(e){var t=Dv.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '".concat(t,"'"));window.open(t,"_blank")}},e}(),GS=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return Dv.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=Dv.getHoverbar(e);r&&r.hideAndClean();var o=n.style,i={style:Dp(Dp({},void 0===o?{}:o),{width:this.value,height:""})};mp.Transforms.setNodes(e,i,{match:function(e){return Dv.checkNodeType(e,"image")}})}}},e}(),qS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="30%",t.value="30%",t}return Cp(t,e),t}(GS),KS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="50%",t.value="50%",t}return Cp(t,e),t}(GS),YS=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title="100%",t.value="100%",t}return Cp(t,e),t}(GS),XS={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}};function ZS(e,t){var n=Dv.findKey(e,t).id;return"w-e-image-container-".concat(n)}function JS(e,t,n,r){var o=zh("body"),i=ZS(e,t),a=r.width,u=r.height,s=0,l=0,c=0,f=0,d=!1,p=null;var h=db(function(e){e.preventDefault();var t=e.clientX,n=l+(d?s-t:t-s),r=c*(n/l);n>f-6||null!=p&&(n<=15||r<=15||(p.css("width","".concat(n,"px")),p.css("height","".concat(r,"px"))))},100);function g(n){if(o.off("mousemove",h),null!=p){var r=p.width().toFixed(2),i=p.height().toFixed(2),a={style:Dp(Dp({},t.style),{width:"".concat(r,"px"),height:"".concat(i,"px")})};mp.Transforms.setNodes(e,a,{at:Dv.findPath(e,t)}),o.off("mouseup",g)}}function v(t,n){p=function(){var e=zh("#".concat(i));if(0===e.length)throw new Error("Cannot find image container elem");return e}(),s=t,f=n;var r=p.find("img");if(0===r.length)throw new Error("Cannot find image elem");l=r.width(),c=r.height(),o.on("mousemove",h),o.on("mouseup",g);var a=Dv.getHoverbar(e);a&&a.hideAndClean()}var m={};return a&&(m.width=a),u&&(m.height=u),m.boxShadow="0 0 0 1px #B4D5FF",gE("div",{id:i,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(n){var r=zh(n.target);if(r.hasClass("w-e-image-dragger")){n.preventDefault(),(r.hasClass("left-top")||r.hasClass("left-bottom"))&&(d=!0);var o=Dv.getParentNode(e,t);if(null!=o){var i=Dv.toDOMNode(e,o),a=i.getBoundingClientRect?i.getBoundingClientRect():{width:0},u=window.getComputedStyle(i),s=parseFloat(u.paddingLeft),l=parseFloat(u.paddingRight),c=parseFloat(u.borderLeftWidth),f=parseFloat(u.borderRightWidth);v(n.clientX,a.width-s-l-c-f)}}}}},n,gE("div",{className:"w-e-image-dragger left-top"}),gE("div",{className:"w-e-image-dragger right-top"}),gE("div",{className:"w-e-image-dragger left-bottom"}),gE("div",{className:"w-e-image-dragger right-bottom"}))}var QS={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=void 0===i?"":i,u=r.href,s=void 0===u?"":u,l=r.style,c=void 0===l?{}:l,f=c.width,d=void 0===f?"":f,p=c.height,h=void 0===p?"":p,g=Dv.isNodeSelected(n,e),v={maxWidth:"100%"};d&&(v.width="100%"),h&&(v.height="100%");var m=gE("img",{style:v,src:o,alt:a,"data-href":s}),y=n.isDisabled();return g&&!y?JS(n,e,m,{width:d,height:h}):function(e,t,n,r){var o=r.width,i=r.height,a={};return o&&(a.width=o),i&&(a.height=i),gE("div",{id:ZS(e,t),style:a,className:"w-e-image-container"},n)}(n,e,m,{width:d,height:h})}},ex={renderElems:[QS],elemsToHtml:[kS],parseElemsHtml:[{selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:vA(r,"width"),height:vA(r,"height")},width:r.attr("width")||"",height:r.attr("height")||"",children:[{text:""}]}}}],menus:[{key:"insertImage",factory:function(){return new VS},config:XS},{key:"deleteImage",factory:function(){return new FS}},{key:"editImage",factory:function(){return new HS},config:XS},{key:"viewImageLink",factory:function(){return new WS}},{key:"imageWidth30",factory:function(){return new qS}},{key:"imageWidth50",factory:function(){return new KS}},{key:"imageWidth100",factory:function(){return new YS}},{key:"editorImageSizeMenu",factory:function(){return new $S}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid,r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},tx=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=Op(mp.Editor.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return null==n?"":Op(n,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=Op(mp.Editor.nodes(e,{match:function(e){var t=Dv.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e}(),nx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return Cp(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){mp.Transforms.setNodes(e,{indent:null},{match:function(e){return mp.Element.isElement(e)}})},t}(tx),rx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t.DEFAULT_INDENT_VALUE="2em",t}return Cp(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.getIndentValue=function(e){var t=this.getMatchNode(e);if(!t)return this.DEFAULT_INDENT_VALUE;var n=t.children.filter(mp.Text.isText)[0];if(!n||!n.fontSize)return this.DEFAULT_INDENT_VALUE;var r=n.fontSize,o=parseInt(n.fontSize,10),i=r.replace("".concat(o),"");return"".concat(2*o).concat(i)},t.prototype.exec=function(e,t){var n=this.getIndentValue(e);mp.Transforms.setNodes(e,{indent:n},{match:function(e){return mp.Element.isElement(e)},mode:"highest"})},t}(tx);var ox={renderStyle:function(e,t){if(!mp.Element.isElement(e))return t;var n=e.indent,r=t;return n&&IA(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!mp.Element.isElement(e))return t;var n=e.indent;if(!n)return t;var r=zh(t);return r.css("text-indent",n),hA(r)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=zh(e),n=vA(t,"padding-left");return/^[1-9]\d*em$/.test(n)&&t.css("text-indent","2em"),/^[1-9]\d*px$/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}}],parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Element.isElement(t))return t;var o=t,i=vA(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new rx}},{key:"delIndent",factory:function(){return new nx}}]},ix=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!Dv.getSelectedElems(e).some(function(t){var n=t.type;return!(!mp.Editor.isVoid(e,t)||!mp.Editor.isBlock(e,t)||"video"===n)||!!["pre","code"].includes(n)})},e}(),ax=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("justify.center"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return Cp(t,e),t.prototype.exec=function(e,t){mp.Transforms.setNodes(e,{textAlign:"center"},{match:function(t){return mp.Element.isElement(t)&&!e.isInline(t)}})},t}(ix),ux=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return Cp(t,e),t.prototype.exec=function(e,t){mp.Transforms.setNodes(e,{textAlign:"justify"},{match:function(t){return mp.Element.isElement(t)&&!e.isInline(t)}})},t}(ix),sx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("justify.left"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return Cp(t,e),t.prototype.exec=function(e,t){mp.Transforms.setNodes(e,{textAlign:"left"},{match:function(t){return mp.Element.isElement(t)&&!e.isInline(t)}})},t}(ix),lx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("justify.right"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return Cp(t,e),t.prototype.exec=function(e,t){mp.Transforms.setNodes(e,{textAlign:"right"},{match:function(t){return mp.Element.isElement(t)&&!e.isInline(t)}})},t}(ix);var cx={renderStyle:function(e,t){if(!mp.Element.isElement(e))return t;var n=e.textAlign,r=t;return n&&IA(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!mp.Element.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=zh(t);return r.css("text-align",n),hA(r)},parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Element.isElement(t))return t;var o=t,i=vA(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new sx}},{key:"justifyRight",factory:function(){return new lx}},{key:"justifyCenter",factory:function(){return new ax}},{key:"justifyJustify",factory:function(){return new ux}}]};var fx=function(){function e(){this.title=zy("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:zy("lineHeight.default"),value:""}),r.forEach(function(e){t.push({text:e,value:e})});var o=this.getValue(e);return t.forEach(function(e){e.value===o?e.selected=!0:e.selected=void 0}),t},e.prototype.getMatchNode=function(e){var t=Op(mp.Editor.nodes(e,{match:function(e){var t=Dv.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":mp.Element.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){mp.Transforms.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}();var dx={renderStyle:function(e,t){if(!mp.Element.isElement(e))return t;var n=e.lineHeight,r=t;return n&&IA(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!mp.Element.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=zh(t);return r.css("line-height",n),hA(r)},parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Element.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===i?[]:i,u=vA(r,"line-height");return u&&a.includes(u)&&(o.lineHeight=u),o},menus:[{key:"lineHeight",factory:function(){return new fx},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]};var px={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target,i=void 0===o?"_blank":o;return'<a href="'.concat(r,'" target="').concat(i,'">').concat(t,"</a>")}};function hx(e,t,n,r){return Ap(this,void 0,void 0,function(){var o,i;return Sp(this,function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if("string"==typeof(i=a.sent()))return t.alert(i,"error"),[2,!1];if(null==i)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function gx(e,t,n){return Ap(this,void 0,void 0,function(){var r;return Sp(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function vx(e){return null==e.selection||!!Dv.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)})}function mx(e,t){return{type:"link",url:PS(e),children:t?[{text:t}]:[]}}function yx(e,t,n){return Ap(this,void 0,void 0,function(){var r,o,i,a,u;return Sp(this,function(s){switch(s.label){case 0:return n?(t||(t=n),e.restoreSelection(),vx(e)?[2]:[4,hx("insertLink",e,t,n)]):[2];case 1:return s.sent()?[4,gx("insertLink",e,n)]:[2];case 2:if(r=s.sent(),null==(o=e.selection))return[2];if(mp.Range.isCollapsed(o)){if((a=Dv.getLeftLengthOfMaxLength(e))<=0)return[2];e.insertText(" "),a<t.length+1&&(t=t.slice(0,a-1)),u=mx(r,t),mp.Transforms.insertNodes(e,u),e.insertFragment([{text:" "}])}else if((i=mp.Editor.string(e,o))!==t){if((a=Dv.getLeftLengthOfMaxLength(e))<=0)return[2];a<i.length-t.length&&(t=t.slice(0,a)),e.deleteFragment(),u=mx(r,t),mp.Transforms.insertNodes(e,u)}else u=mx(r),mp.Transforms.wrapNodes(e,u,{split:!0}),mp.Transforms.collapse(e,{edge:"end"});return[2]}})})}function bx(){return IS("w-e-update-link")}var Ex=function(){function e(){this.title=zy("link.edit"),this.iconSvg=sA,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=bx(),this.buttonId=bx()}return e.prototype.getSelectedLinkElem=function(e){var t=Dv.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return Dv.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=Op(Jy(zy("link.url"),t),2),o=r[0],i=zh(r[1]),a=Op(Qy(n,zy("common.ok")),1)[0];if(null==this.$content){var u=zh("<div></div>");u.on("click","#".concat(n),function(n){n.preventDefault(),e.restoreSelection();var r=Dv.getSelectedNodeByType(e,"link"),o=r?mp.Node.string(r):"",i=u.find("#".concat(t)).val();!function(e,t,n){Ap(this,void 0,void 0,function(){var r,o;return Sp(this,function(i){switch(i.label){case 0:return n?[4,hx("editLink",e,t,n)]:[2];case 1:return i.sent()?[4,gx("editLink",e,n)]:[2];case 2:return r=i.sent(),o={url:PS(r)},mp.Transforms.setNodes(e,o,{match:function(e){return Dv.checkNodeType(e,"link")}}),[2]}})})}(e,o,i),e.hidePanelOrModal()}),this.$content=u}var s=this.$content;s.empty(),s.append(o),s.append(a);var l=this.getValue(e);return i.val(l),setTimeout(function(){i.focus()}),s[0]},e}();function wx(){return IS("w-e-insert-link")}var Cx=function(){function e(){this.title=zy("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=wx(),this.urlInputId=wx(),this.buttonId=wx()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return vx(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,o=n.urlInputId,i=n.buttonId,a=Op(Jy(zy("link.text"),r),2),u=a[0],s=zh(a[1]),l=Op(Jy(zy("link.url"),o),2),c=l[0],f=zh(l[1]),d=Op(Qy(i,zy("common.ok")),1)[0];if(null==this.$content){var p=zh("<div></div>");p.on("click","#".concat(i),function(t){t.preventDefault();var n=p.find("#".concat(r)).val(),i=p.find("#".concat(o)).val();yx(e,n,i),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(u),h.append(c),h.append(d),null==t||mp.Range.isCollapsed(t))s.val("");else{var g=mp.Editor.string(e,t);s.val(g)}return f.val(""),setTimeout(function(){s.focus()}),h[0]},e}(),Dx=function(){function e(){this.title=zy("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Dv.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||mp.Transforms.unwrapNodes(e,{match:function(e){return Dv.checkNodeType(e,"link")}})},e}(),Ax=function(){function e(){this.title=zy("link.view"),this.iconSvg=lA,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=Dv.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '".concat(t,"'"));window.open(t,"_blank")}},e}(),Sx={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},xx={key:"insertLink",factory:function(){return new Cx},config:Sx},Ox={key:"editLink",factory:function(){return new Ex},config:Sx},Tx={key:"unLink",factory:function(){return new Dx}},Nx={key:"viewLink",factory:function(){return new Ax}};var Bx,kx,Fx={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e);return 0===(t=t.filter(function(e){return!!mp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};var Ix=E(function(){if(kx)return Bx;kx=1,Bx=function(r){if("string"!=typeof r)return!1;var o=r.match(e);if(!o)return!1;var i=o[1];if(!i)return!1;if(t.test(i)||n.test(i))return!0;return!1};var e=/^(?:\w+:)?\/\/(\S+)$/,t=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;return Bx}());var Px={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target;return gE("a",{href:o,target:void 0===i?"_blank":i},t)}},Rx={renderElems:[Px],elemsToHtml:[px],parseElemsHtml:[Fx],menus:[xx,Ox,Tx,Nx],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode,o=e;return o.isInline=function(e){return"link"===e.type||t(e)},o.insertData=function(e){var t=e.getData("text/plain");if(Ix(t)){if(/<img[^>]+>/.test(e.getData("text/html")))n(e);else if(!vx(o)){var r=o.selection;if(null!=r){var i=mp.Editor.string(o,r);yx(o,i,t)}}}else n(e)},o.normalizeNode=function(e){var t=Op(e,2),n=t[0],i=t[1];return"link"!==Dv.getNodeType(n)?r([n,i]):""===mp.Node.string(n)?mp.Transforms.removeNodes(o,{at:i}):r([n,i])},o}};var _x={selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e);return 0===(t=t.filter(function(e){return!!mp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}};function Lx(e){var t=Op(mp.Editor.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1),n=t[0];if(null==n)return!1;var r=n[0];if(!mp.Element.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==mp.Node.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!mp.Text.isText(i[0])&&(mp.Transforms.setNodes(e,{type:"paragraph"}),!0)}var Mx={type:"paragraph",renderElem:function(e,t,n){return gE("p",null,t)}},jx={renderElems:[Mx],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>".concat(t,"</p>")}}],parseElemsHtml:[_x],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward,r=e;return r.deleteBackward=function(e){Lx(r)||t(e)},r.deleteForward=function(e){Lx(r)||n(e)},r}};function Hx(e,t){if(null==e.selection)return!0;var n=Op(mp.Editor.nodes(e,{match:function(t){return"pre"===Dv.getNodeType(t)||!(!mp.Element.isElement(t)||!mp.Editor.isVoid(e,t))},universal:!0}),1);return!!n[0]}function zx(e,t){Object.keys(t).forEach(function(t){"text"!==t&&mp.Editor.removeMark(e,t)})}var $x=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=mp.Editor.marks(e);if(n)return n[t];var r=Op(mp.Editor.nodes(e,{match:function(e){return!0===e[t]}}),1);return!!r[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return Hx(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach(function(t){return e.removeMark(t)}))},e}(),Ux=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="bold",t.title=zy("textStyle.bold"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',t.hotkey="mod+b",t}return Cp(t,e),t}($x),Vx=function(){function e(){this.title=zy("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return Hx(e)},e.prototype.exec=function(e,t){var n,r,o=mp.Editor.nodes(e,{match:function(e){return mp.Text.isText(e)},universal:!0});try{for(var i=xp(o),a=i.next();!a.done;a=i.next()){zx(e,a.value[0])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e}(),Wx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="code",t.title=zy("textStyle.code"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',t.hotkey="mod+e",t}return Cp(t,e),t}($x),Gx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="italic",t.title=zy("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return Cp(t,e),t}($x),qx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=zy("textStyle.sub"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return Cp(t,e),t}($x),Kx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=zy("textStyle.sup"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return Cp(t,e),t}($x),Yx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="through",t.title=zy("textStyle.through"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',t.hotkey="mod+shift+x",t}return Cp(t,e),t}($x),Xx=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.mark="underline",t.title=zy("textStyle.underline"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',t.hotkey="mod+u",t}return Cp(t,e),t}($x);function Zx(e,t){return 0!==e.length&&e[0].matches(t)}function Jx(e,t){var n=vA(e,"text-decoration"),r=vA(e,"text-decoration-line");return n.includes(t)||r.includes(t)}function Qx(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline,u=r.code,s=r.through,l=r.sub,c=r.sup;return o&&(n="<strong>".concat(n,"</strong>")),u&&(n="<code>".concat(n,"</code>")),i&&(n="<em>".concat(n,"</em>")),a&&(n="<u>".concat(n,"</u>")),s&&(n="<s>".concat(n,"</s>")),l&&(n="<sub>".concat(n,"</sub>")),c&&(n="<sup>".concat(n,"</sup>")),n}var eO={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,u=n.through,s=n.sub,l=n.sup,c=t;return r&&(c=gE("strong",null,c)),a&&(c=gE("code",null,c)),o&&(c=gE("em",null,c)),i&&(c=gE("u",null,c)),u&&(c=gE("s",null,c)),s&&(c=gE("sub",null,c)),l&&(c=gE("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new Ux}},{key:"underline",factory:function(){return new Xx}},{key:"italic",factory:function(){return new Gx}},{key:"through",factory:function(){return new Yx}},{key:"code",factory:function(){return new Wx}},{key:"sub",factory:function(){return new qx}},{key:"sup",factory:function(){return new Kx}},{key:"clearStyle",factory:function(){return new Vx}}],styleToHtml:function(e,t){if(!mp.Text.isText(e))return t;if(pA(t))return Qx(e,t);var n=zh(t),r=n.html();return r=Qx(e,r),n.html(r),hA(n)},parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Text.isText(t))return t;var o=t;return(Zx(r,"b,strong")||function(e){var t=vA(e,"font-weight");if(!t)return!1;if("bold"===t||"bolder"===t)return!0;var n=Number(t);return!Number.isNaN(n)&&n>=600}(r))&&(o.bold=!0),(Zx(r,"i,em")||["italic","oblique"].includes(vA(r,"font-style")))&&(o.italic=!0),(Zx(r,"u")||Jx(r,"underline"))&&(o.underline=!0),(Zx(r,"s,strike")||Jx(r,"line-through"))&&(o.through=!0),(Zx(r,"sub")||"sub"===vA(r,"vertical-align"))&&(o.sub=!0),(Zx(r,"sup")||"super"===vA(r,"vertical-align"))&&(o.sup=!0),Zx(r,"code")&&(o.code=!0),o}};var tO={type:"todo",elemToHtml:function(e,t){var n=e.checked;return'<div data-w-e-type="todo"><input type="checkbox" disabled '.concat(n?"checked":"",">").concat(t,"</div>")}},nO=function(){function e(){this.title=zy("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!Dv.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!Dv.getSelectedElems(e).some(function(t){if(mp.Editor.isVoid(e,t)&&mp.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)})},e.prototype.exec=function(e,t){var n=this.isActive(e);mp.Transforms.setNodes(e,{type:n?"paragraph":"todo"})},e}();var rO={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=zh(e);0===(t=t.filter(function(e){return!!mp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(o=!0),{type:"todo",checked:o,children:t}}};var oO={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=gE("div",{style:{margin:"5px 0"}},gE("span",{contentEditable:!1,style:{marginRight:"0.5em"}},gE("input",{type:"checkbox",checked:e.checked,disabled:r,on:{change:function(t){var r=Dv.findPath(n,e),o={checked:t.target.checked};mp.Transforms.setNodes(n,o,{at:r})}}})),gE("span",null,t));return o}},iO={renderElems:[oO],elemsToHtml:[tO],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=zh(e).find("li"),n=zh('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML+=t[0].innerHTML,n[0]}}],parseElemsHtml:[rO],menus:[{key:"todo",factory:function(){return new nO}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&mp.Range.isCollapsed(r)){var o=Dv.getSelectedNodeByType(e,"todo");if(o&&0===mp.Node.string(o).length)return void mp.Transforms.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},aO=function(){function e(){this.title=zy("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),uO=function(){function e(){this.title=zy("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),sO=[eO,PA,GA,ox,cx,dx,ex,jA,zA,Rx,OA,EA,BS,jx,iO,KA,{menus:[{key:"redo",factory:function(){return new aO}},{key:"undo",factory:function(){return new uO}}]},XA,_A];jy("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),jy("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var lO=new WeakMap;function cO(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];mp.Text.isText(i)&&(t=i)}return null==t?"":t.color||""}function fO(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=Dv.findPath(e,t);;){if(0===a.length||0===a[a.length-1])return null;a=mp.Path.previous(a);var u=mp.Editor.node(e,a);if(!u)return null;var s=Op(u,1)[0],l=s.level,c=void 0===l?0:l;if(Dv.getNodeType(s)!==r)return null;if(c===i)return s}}function dO(e,t,n){var r=fO(e,t,n);return!!r&&r.ordered===t.ordered}var pO=[];var hO={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=lO.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,u=void 0===a?0:a,s=Dv.findPath(t,e);if(0===s[0])return u+1;var l=mp.Path.previous(s),c=mp.Editor.node(t,l);if(!c)return 0;var f=Op(c,1)[0];if(Dv.getNodeType(f)!==r)return u+1;var d=f,p=d.ordered,h=void 0!==p&&p,g=d.level,v=void 0===g?0:g;return v<u?u-v:v>u?dO(t,e)?0:1:v===u?h===i?0:1:0}(e);if(a>0)for(var u=0;u<a;u+=1)n+="<".concat(i,">"),pO.push(i);var s=function(e){var t=lO.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,u=void 0===a?0:a,s=Dv.findPath(t,e);if(s[0]===t.children.length-1)return u+1;var l=mp.Path.next(s),c=mp.Editor.node(t,l);if(!c)return 0;var f=Op(c,1)[0];if(Dv.getNodeType(f)!==r)return u+1;var d=f,p=d.ordered,h=void 0!==p&&p,g=d.level,v=void 0===g?0:g;return v<u?dO(t,f)?u-v:u-v+1:v>u?0:v===u?h===i?0:1:0}(e);if(s>0)for(u=0;u<s;u+=1){var l=pO.pop();r+="</".concat(l,">")}var c=cO(e),f=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(f,">").concat(t,"</li>"),prefix:n,suffix:r}}},gO=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return Dv.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!Dv.getSelectedElems(e).some(function(t){if(mp.Editor.isVoid(e,t)&&mp.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})},e.prototype.exec=function(e,t){this.isActive(e)?mp.Transforms.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):mp.Transforms.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),vO=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.ordered=!1,t.title=zy("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return Cp(t,e),t}(gO),mO=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.ordered=!0,t.title=zy("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return Cp(t,e),t}(gO),yO={key:"bulletedList",factory:function(){return new vO}},bO={key:"numberedList",factory:function(){return new mO}};function EO(e){return e.length?e[0].tagName.toLowerCase():""}lg&&(zh.fn.append=lg),Wh&&(zh.fn.attr=Wh),fg&&(zh.fn.parent=fg);var wO={selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e);0===(t=t.filter(function(e){return!!mp.Text.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===EO(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=EO(n);"ul"===r||"ol"===r;)r=EO(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}};var CO={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}};function DO(e){return mp.Editor.nodes(e,{at:e.selection||void 0,match:function(t){return 1===Dv.findPath(e,t).length}})}var AO={type:"list-item",renderElem:function(e,t,n){lO.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,u=void 0!==a&&a,s={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(u){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,u=void 0!==a&&a,s=1,l=t,c=Dv.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var f=mp.Path.previous(c),d=mp.Editor.node(e,f);if(null==d)break;var p=d[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==u)break;s+=1}l=p,c=f}return s}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);return gE("div",{style:s},gE("span",{contentEditable:!1,style:{marginRight:"0.5em",color:cO(e)},"data-w-e-reserve":!0},l),gE("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},SO={renderElems:[AO],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void mp.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(mp.Range.isExpanded(r))t(n);else{var o=Dv.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,u=a.level,s=void 0===u?0:u,l=a.ordered,c=void 0!==l&&l;if(s>0){var f=fO(e,o,s-1);f&&f.ordered!==c?mp.Transforms.setNodes(i,{level:s-1,ordered:!c}):mp.Transforms.setNodes(i,{level:s-1})}else mp.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(mp.Range.isCollapsed(a)){var u=Dv.getSelectedNodeByType(i,"list-item");if(null==u)return void n();if(0===a.focus.offset){var s=u.level,l=void 0===s?0:s;return void mp.Transforms.setNodes(i,{level:l+1})}}if(mp.Range.isExpanded(a)){var c=0,f=!1;try{for(var d=xp(DO(i)),p=d.next();!p.done;p=d.next()){var h=Op(p.value,1)[0];"list-item"===Dv.getNodeType(h)?c+=1:f=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}if(f||c<=1)return void n();try{for(var g=xp(DO(i)),v=g.next();!v.done;v=g.next()){var m=Op(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;mp.Transforms.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=Op(e,2),n=t[0],o=t[1],a=Dv.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||mp.Transforms.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[yO,bO],elemsToHtml:[hO],parseElemsHtml:[CO,wO]};jy("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Fit width",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),jy("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"适应宽度",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var xO={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,u=void 0===a?"auto":a,s=null==i?void 0:i.map(function(e){return"<col width=".concat(e,"></col>")}).join(""),l=s?'<colgroup contentEditable="false">'.concat(s,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(u,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},OO={type:"table-row",elemToHtml:function(e,t){var n=e.height,r=n?' style="height: '.concat(n,'px"'):"";return"<tr".concat(r,">").concat(t,"</tr>")}},TO={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,u=n.isHeader,s=void 0!==u&&u,l=n.width,c=void 0===l?"auto":l,f=n.hidden;if(void 0!==f&&f)return"";var d=s?"th":"td";return"<".concat(d,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'">').concat(t,"</").concat(d,">")}},NO='<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',BO={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function kO(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=BO,o=t.map(function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]});return function(e){return function(e){return!mp.Editor.isEditor(e)&&mp.Element.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function FO(e,t){for(var n=Op(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var u=Op(mp.Node.common(e,r,o),2),s=u[0],l=u[1];return!!kO.apply(void 0,Tp([e],Op(i),!1))(s,l)||!!mp.Editor.above(e,{match:kO.apply(void 0,Tp([e],Op(i),!1)),at:l})}function IO(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=xp(function(e,t){var n,r,o,i,a,u,s,l,c,f,d,p,h,g,v,m,y,b;return void 0===t&&(t={}),Sp(this,function(E){switch(E.label){case 0:if(n=Op(mp.Editor.nodes(e,{match:kO(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=Op(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=xp(mp.Editor.nodes(e,{match:kO(e,"table"),at:i})),u=a.next(),E.label=2;case 2:if(u.done)return[3,5];s=Op(u.value,2),l=s[1],c=[];try{for(y=void 0,f=xp(mp.Editor.nodes(e,{match:kO(e,"tr"),at:l})),d=f.next();!d.done;d=f.next())p=Op(d.value,2),h=p[1],c.push(Tp([],Op(mp.Editor.nodes(e,{match:kO(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{d&&!d.done&&(b=f.return)&&b.call(f)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{u&&!u.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}})}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var u=a.value,s=[],l=0,c=0;c<u.length;c+=1)u[c]&&(l=Math.max(l,u[c].length));for(c=0;c<u.length;c+=1)if(s[c]||(s[c]=[]),u[c])for(var f=0;f<u[c].length;f+=1)if(u[c][f]&&u[c][f][0]){for(var d=Op(u[c][f],1)[0],p=d.rowSpan,h=void 0===p?1:p,g=d.colSpan,v=void 0===g?1:g,m=f;s[c]&&s[c][m];)m+=1;for(var y=0;y<v;y+=1)for(var b=0;b<h;b+=1){var E=c+b,w=m+y;s[E]||(s[E]=[]),s[E][w]||(s[E][w]=[u[c][f],{rtl:y+1,ltr:v-y,ttb:b+1,btt:h-b}])}}o.push.apply(o,Tp([],Op(s),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var PO=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function RO(e){return e.length?e[0].tagName.toLowerCase():""}function _O(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var u=a.split(":");u[0].trim()===t&&(n=u[1].trim())}}return n}lg&&zh.fn&&(zh.fn.append=lg),Xh&&zh.fn&&(zh.fn.on=Xh),Eg&&zh.fn&&(zh.fn.focus=Eg),Wh&&zh.fn&&(zh.fn.attr=Wh),Yh&&zh.fn&&(zh.fn.val=Yh),ag&&zh.fn&&(zh.fn.html=ag),Kh&&zh.fn&&(zh.fn.dataset=Kh),$h&&zh.fn&&(zh.fn.addClass=$h),Uh&&zh.fn&&(zh.fn.removeClass=Uh),hg&&zh.fn&&(zh.fn.children=hg),og&&zh.fn&&(zh.fn.each=og),pg&&zh.fn&&(zh.fn.find=pg),qh&&zh.fn&&(zh.fn.data=qh),tg&&zh.fn&&(zh.fn.hide=tg),ng&&zh.fn&&(zh.fn.show=ng);var LO=new WeakMap,MO=new WeakMap,jO=function(){function e(){this.title=zy("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.menu="table",this.borderStyle=[{value:"none",label:zy("tableModule.borderStyle.none")},{value:"solid",label:zy("tableModule.borderStyle.solid")},{value:"dotted",label:zy("tableModule.borderStyle.dotted")},{value:"dashed",label:zy("tableModule.borderStyle.dashed")},{value:"double",label:zy("tableModule.borderStyle.double")},{value:"groove",label:zy("tableModule.borderStyle.groove")},{value:"ridge",label:zy("tableModule.borderStyle.ridge")},{value:"inset",label:zy("tableModule.borderStyle.inset")},{value:"outset",label:zy("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:zy("justify.left"),svg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"center",label:zy("justify.center"),svg:'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"right",label:zy("justify.right"),svg:'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"justify",label:zy("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==Dv.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return Op(mp.Editor.nodes(e,{match:kO(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=Op(n,2),o=r[0],i=r[1],a=zh('<div>\n <label class="babel-container">\n <span>'.concat(zy("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(zy("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(zy("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(zy("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(zy("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each(function(e){zh(e).val(o[zh(e).attr("name")])});var u=function(e,t){t?zh(".color-group-block",e).css("background-color",t).empty():zh(".color-group-block",e).css("background-color","").html(NO)};return a.find(".color-group").each(function(n){var r=zh('[type="hidden"]',n).val()||"";u(n,r);var o=zh(n);o.on("click",function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){zh('[type="hidden"]',n).val(e||""),u(n,e),i.hide()}}),o.append(i),o.data("panel",i))})}),a.find("button").on("click",function(){var n=Array.from(a.find("[name]")).reduce(function(e,t){return e[zh(t).attr("name")]=zh(t).val(),e},{}),r=LO.get(e);"cell"===t.menu&&(null==r?void 0:r.length)?r.forEach(function(t){t.forEach(function(t){mp.Transforms.setNodes(e,n,{at:t[0][1]})})}):mp.Transforms.setNodes(e,n,{at:i}),setTimeout(function(){e.focus()})}),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=zh('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=zh(t).attr("data-value");o(n)}});var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach(function(e){var t=zh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=zh('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)});var u="";"color"===n&&(u=zy("tableModule.color.default")),"bgColor"===n&&(u=zy("tableModule.color.clear"));var s=zh('\n <li data-value="" class="clear">\n '.concat(NO,"\n ").concat(u,"\n </li>\n "));i.prepend(s);var l=zh('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),HO=function(e){function t(){var t=e.apply(this,Tp([],Op(arguments),!1))||this;return t.title=zy("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t.menu="cell",t}return Cp(t,e),t.prototype.getModalContentNode=function(e){return Op(mp.Editor.nodes(e,{match:kO(e,"td")}),1)[0]},t}(jO),zO=function(){function e(){this.title=zy("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||null==Dv.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")},universal:!0}),1),r=Op(n[0],2),o=r[0],i=r[1],a=Dv.getParentNode(e,o),u=(null==a?void 0:a.children.length)||0;if(!a||u<=1)mp.Transforms.removeNodes(e,{mode:"highest"});else if(null!=Dv.getParentNode(e,a)){var s=IO(e),l=0;e:for(var c=0;c<s.length;c+=1)for(var f=0;f<s[c].length;f+=1){var d=Op(s[c][f],1),p=Op(d[0],2)[1];if(mp.Path.equals(i,p)){l=f;break e}}mp.Editor.withoutNormalizing(e,function(){for(var t,n,r=new Set,o=new Set,i=0;i<s.length;i+=1)if(s[i]&&s[i][l]){var a=Op(s[i][l],2),u=Op(a[0],2)[1],c=a[1],f=c.rtl,d=c.ltr,p=c.ttb,h=c.btt,g=u.join(",");if(f>1||d>1||p>1||h>1){var v=i-(p-1),m=l-(f-1);if(v<0||v>=s.length||!s[v]||!s[v][m])continue;var y=Op(s[v][m],1),b=Op(y[0],2),E=b[0],w=b[1],C=w.join(",");if(!o.has(C)){o.add(C);var D=E.rowSpan,A=void 0===D?1:D,S=E.colSpan,x=void 0===S?1:S,O=Math.max(x-1,1);mp.Transforms.setNodes(e,{rowSpan:A,colSpan:O},{at:w})}}else r.add(g)}var T=Array.from(r);T.sort(function(e,t){var n=e.split(",").map(Number),r=t.split(",").map(Number);return n[n.length-2]!==r[r.length-2]?r[r.length-2]-n[n.length-2]:r[r.length-1]-n[n.length-1]});try{for(var N=xp(T),B=N.next();!B.done;B=N.next()){var k=B.value.split(",").map(Number);try{mp.Editor.hasPath(e,k)&&mp.Transforms.removeNodes(e,{at:k})}catch(e){console.warn("删除单元格失败:",k,e)}}}catch(e){t={error:e}}finally{try{B&&!B.done&&(n=N.return)&&n.call(N)}finally{if(t)throw t.error}}var F=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table")},universal:!0}),1),I=F[0];if(I){var P=Op(I,2),R=P[0],_=P[1],L=R.columnWidths,M=Tp([],Op(void 0===L?[]:L),!1);M.splice(l,1),mp.Transforms.setNodes(e,{columnWidths:M},{at:_})}})}}},e}(),$O=function(){function e(){this.title=zy("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||null==Dv.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-row")},universal:!0}),1),r=Op(n[0],2),o=r[0],i=r[1],a=Dv.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)mp.Transforms.removeNodes(e,{mode:"highest"});else{var u=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")},universal:!0}),1),s=Op(u[0],2)[1],l=IO(e),c=0;e:for(var f=0;f<l.length;f+=1)for(var d=0;d<l[f].length;d+=1){var p=Op(l[f][d],1),h=Op(p[0],2)[1];if(mp.Path.equals(s,h)){c=f;break e}}mp.Editor.withoutNormalizing(e,function(){for(var t,n,r=[],o=0;o<l[c].length;o+=1){var a=Op(l[c][o],2),u=Op(a[0],1)[0].hidden,s=a[1],f=s.ttb,d=s.btt,p=s.rtl;if(f>1||d>1){var h=c-(f-1);if(h<0||h>=l.length||!l[h]||!l[h][o])continue;var g=Op(l[h][o],1),v=Op(g[0],2),m=v[0],y=v[1],b=m,E=b.rowSpan,w=void 0===E?1:E,C=b.colSpan,D=void 0===C?1:C;if(u)mp.Transforms.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y});else if(1===f&&1===p){if(c+1<l.length&&w>1){var A={type:"table-cell",rowSpan:w-1,colSpan:D,hidden:!1,children:b.children.map(function(e){return Dp({},e)})};b.isHeader&&(A.isHeader=b.isHeader),b.width&&(A.width=b.width),b.backgroundColor&&(A.backgroundColor=b.backgroundColor),b.borderWidth&&(A.borderWidth=b.borderWidth),b.borderStyle&&(A.borderStyle=b.borderStyle),b.borderColor&&(A.borderColor=b.borderColor),b.textAlign&&(A.textAlign=b.textAlign),r.push({cell:A,columnIndex:o})}else mp.Transforms.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}else mp.Transforms.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}}if(mp.Transforms.removeNodes(e,{at:i}),r.length>0){var S=i;try{r.sort(function(e,t){return e.columnIndex-t.columnIndex});try{for(var x=xp(r),O=x.next();!O.done;O=x.next()){var T=O.value,N=T.cell,B=T.columnIndex;try{var k=Tp(Tp([],Op(S),!1),[B],!1);mp.Transforms.insertNodes(e,N,{at:k})}catch(t){try{var F=Op(mp.Editor.node(e,S),1)[0].children.length,I=Tp(Tp([],Op(S),!1),[F],!1);mp.Transforms.insertNodes(e,N,{at:I})}catch(e){console.warn("插入新单元格失败:",e)}}}}catch(e){t={error:e}}finally{try{O&&!O.done&&(n=x.return)&&n.call(x)}finally{if(t)throw t.error}}}catch(e){console.warn("插入新单元格失败:",e)}}})}}},e}(),UO=function(){function e(){this.title=zy("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Dv.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||mp.Transforms.removeNodes(e,{mode:"highest"})},e}(),VO=function(){function e(){this.title=zy("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return!1},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||null==Dv.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Dv.getSelectedNodeByType(e,"table");if(n){var r=n.columnWidths,o=void 0===r?[]:r,i=Dv.toDOMNode(e,n).querySelector(".table-container");if(i&&0!==o.length){var a=i.clientWidth,u=o.reduce(function(e,t){return e+t},0),s=o.map(function(e){var t=e/u;return Math.floor(t*a)}),l=e.getMenuConfig("insertTable").minWidth,c=parseInt(String(void 0===l?60:l),10)||60,f=s.map(function(e){return Math.max(c,e)}),d=f.reduce(function(e,t){return e+t},0);if(d>a){var p=a/d,h=f.map(function(e){return Math.max(c,Math.floor(e*p))});v={width:"auto",columnWidths:h};mp.Transforms.setNodes(e,v,{mode:"highest"})}else{h=Tp([],Op(f),!1);var g=a-d-1;g>0&&h.length>0&&(h[h.length-1]+=g);v={width:"auto",columnWidths:h};mp.Transforms.setNodes(e,v,{mode:"highest"})}}else{var v={width:"auto"};mp.Transforms.setNodes(e,v,{mode:"highest"})}}}},e}();function WO(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function GO(e){return WO(e).every(function(e){return!!e.isHeader})}var qO=function(){function e(){this.title=zy("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;if(null==t)return!0;if(!mp.Range.isCollapsed(t))return!0;var n=Dv.getSelectedNodeByType(e,"table");if(null==n)return!0;try{var r=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")},universal:!0}),1),o=r[0];if(!o)return!0;for(var i=Op(o,2)[1],a=IO(e),u=-1,s=0;s<a.length;s+=1){for(var l=0;l<a[s].length;l+=1){var c=Op(a[s][l],1),f=Op(c[0],2)[1];if(mp.Path.equals(i,f)){u=l;break}}if(-1!==u)break}if(-1===u)return!0;var d=n.columnWidths,p=(void 0===d?[]:d)[u];if(p&&p<20)return!0}catch(e){return!0}return!1},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")},universal:!0}),1),r=Op(n[0],2),o=r[0],i=r[1],a=Dv.getParentNode(e,o);if(null!=a){var u=Dv.getParentNode(e,a);if(null!=u){for(var s=IO(e),l=0,c=0;c<s.length;c+=1)for(var f=0;f<s[c].length;f+=1){var d=Op(s[c][f],1),p=Op(d[0],2)[1];if(mp.Path.equals(i,p)){l=f;break}}mp.Editor.withoutNormalizing(e,function(){for(var t=new Set,n=new Set,r=0;r<s.length;r+=1)if(s[r]&&s[r][l]){var o=Op(s[r][l],2);Op(o[0],1);var i=o[1],a=i.rtl,c=i.ltr,f=i.ttb,d=i.btt;if(a>1||c>1||f>1||d>1){var p=r-(f-1),h=l-(a-1);if(p<0||p>=s.length||!s[p]||!s[p][h])continue;var g=Op(s[p][h],1),v=Op(g[0],2),m=v[0],y=v[1],b=y.join(",");if(t.has(b))n.add(r);else{t.add(b);var E=m.rowSpan,w=void 0===E?1:E,C=m.colSpan,D=(void 0===C?1:C)+1;m.hidden||mp.Transforms.setNodes(e,{colSpan:D},{at:y});for(var A=0;A<w;A+=1)n.add(p+A)}}}for(r=0;r<s.length;r+=1)if(!n.has(r)&&s[r]&&s[r][l]){var S={type:"table-cell",children:[{text:""}]};0===r&&GO(u)&&(S.isHeader=!0);var x=Op(s[r][l],1),O=Op(x[0],2)[1];mp.Transforms.insertNodes(e,S,{at:O})}var T=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table")},universal:!0}),1),N=T[0];if(N){var B=Op(N,2),k=B[0],F=B[1],I=k.columnWidths,P=void 0===I?[]:I,R=Tp([],Op(P),!1),_=e.getMenuConfig("insertTable").minWidth,L=void 0===_?60:_,M=P[l]||parseInt(L,10)||60,j=Math.floor(M/2),H=M-j;R.splice(l,0,j),R[l+1]=H,mp.Transforms.setNodes(e,{columnWidths:R},{at:F})}})}}}},e}(),KO=function(){function e(){this.title=zy("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||null==Dv.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){var n;if(!this.isDisabled(e)){var r=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")},universal:!0}),1),o=Op(r[0],2)[1],i=IO(e),a=0;e:for(var u=0;u<i.length;u+=1)for(var s=0;s<i[u].length;s+=1){var l=Op(i[u][s],1),c=Op(l[0],2)[1];if(mp.Path.equals(o,c)){a=u;break e}}var f=(null===(n=i[a])||void 0===n?void 0:n.length)||0;0!==f&&mp.Editor.withoutNormalizing(e,function(){for(var t=a+1,n=t>=0&&t<i.length,r=[],u=0;n&&u<i[a].length;u+=1){var s=Op(i[a][u],2)[1],l=s.ttb,c=s.btt;if(l>1||c>1){var d=a-(l-1);if(d<0||d>=i.length||!i[d]||!i[d][u])continue;var p=Op(i[d][u],1),h=Op(p[0],2),g=h[0],v=h[1],m=g.rowSpan||1;r.push(u),g.hidden||mp.Transforms.setNodes(e,{rowSpan:m+1},{at:v})}}for(var y=(e.getMenuConfig("insertTable")||{}).minRowHeight,b={type:"table-row",children:[],height:parseInt((void 0===y?30:y).toString(),10)||30},E=0;E<f;E+=1)if(!r.includes(E)){b.children.push({type:"table-cell",children:[{text:""}]})}var w=mp.Path.parent(o),C=mp.Path.next(w);mp.Transforms.insertNodes(e,b,{at:C})})}},e}();var YO=function(){function e(){this.title=zy("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||!!Dv.getSelectedElems(e).some(function(t){var n=Dv.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))}))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=zh('<div class="w-e-panel-content-table"></div>'),r=zh("<span>0 × 0</span>"),o=zh("<table></table>"),i=0;i<10;i+=1){for(var a=zh("<tr></tr>"),u=0;u<10;u+=1){var s=zh("<td></td>");s.attr("data-x",u.toString()),s.attr("data-y",i.toString()),a.append(s),s.on("mouseenter",function(e){var t=e.target;if(null!=t){var n=zh(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each(function(e){zh(e).children().each(function(e){var t=zh(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")})})}}),s.on("click",function(n){n.preventDefault();var r=n.target;if(null!=r){var o=zh(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}})}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(Dv.isSelectedEmptyParagraph(e)&&mp.Transforms.removeNodes(e,{mode:"highest"}),0===e.children.length){mp.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,u=void 0===a?60:a,s=i.minRowHeight,l=void 0===s?30:s,c=i.tableFullWidth,f=i.tableHeader,d=Array(n).fill(parseInt(u,10)||60),p=0;p<t;p+=1){for(var h=[],g=0;g<n;g+=1){var v={type:"table-cell",children:[{text:""}]};0===p&&(v.isHeader=null===(r=null==f?void 0:f.selected)||void 0===r||r),h.push(v)}o.push({type:"table-row",children:h,height:parseInt(l,10)||30})}return{type:"table",width:(null==c?void 0:c.selected)?"100%":"auto",children:o,columnWidths:d}}(e,r,o);mp.Transforms.insertNodes(e,i,{mode:"highest"})}},e}(),XO={isInTable:function(e,t){return void 0===t&&(t={}),!!Op(mp.Editor.nodes(e,{match:kO(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,u,s;return Sp(this,function(l){switch(l.label){case 0:t=LO.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=Op(t[n][o],2),a=i[0],u=i[1],s=u.ltr,1===u.ttb&&r.push(a),o+=s-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}})},unselect:function(e){MO.delete(e),LO.delete(e)},isSelected:function(e,t){var n=MO.get(e);return!!n&&n.has(t)},hasSelected:function(e){return LO.has(e)}},ZO=function(){function e(){this.title=zy("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),XO.unselect(e))},e.prototype.canMerge=function(e){var t=LO.get(e);if(!t||!t.length)return!1;var n=Op(t[t.length-1][t[t.length-1].length-1],1),r=Op(n[0],2)[1],o=Op(t[0][0],1);return!!FO(e,[Op(o[0],2)[1],r],"table")},e.prototype.merge=function(e){if(this.canMerge(e)){var t=LO.get(e);if(t&&t.length){var n=Op(t[0][0],1),r=Op(n[0],2)[1],o=Op(mp.Node.children(e,r,{reverse:!0}),1),i=Op(o[0],2)[1];mp.Editor.withoutNormalizing(e,function(){for(var n,o,a,u,s,l,c=new Map,f=[],d=1/0,p=-1/0,h=1/0,g=-1/0,v=0;v<t.length;v+=1)for(var m=0;m<t[v].length;m+=1){var y=Op(t[v][m],2),b=Op(y[0],2),E=b[0],w=b[1],C=y[1].ttb,D=w.join(",");if(1===C&&!c.has(D)){c.set(D,{path:w,x:v,y:m,element:E});var A=E.rowSpan,S=void 0===A?1:A,x=E.colSpan,O=v,T=v+S-1,N=m,B=m+(void 0===x?1:x)-1;d=Math.min(d,O),p=Math.max(p,T),h=Math.min(h,N),g=Math.max(g,B)}}var k=p-d+1,F=g-h+1;try{for(var I=xp(c),P=I.next();!P.done;P=I.next()){w=Op(P.value,2)[1].path;mp.Path.equals(r,w)||f.push(w)}}catch(e){n={error:e}}finally{try{P&&!P.done&&(o=I.return)&&o.call(I)}finally{if(n)throw n.error}}f.sort(function(e,t){for(var n=0;n<Math.min(e.length,t.length);n+=1)if(e[n]!==t[n])return t[n]-e[n];return t.length-e.length});try{for(var R=xp(f),_=R.next();!_.done;_=R.next()){w=_.value;try{if(!mp.Editor.hasPath(e,w))continue;try{for(var L=(s=void 0,xp(mp.Node.children(e,w,{reverse:!0}))),M=L.next();!M.done;M=L.next()){var j=Op(M.value,2)[1];mp.Transforms.moveNodes(e,{to:mp.Path.next(i),at:j})}}catch(e){s={error:e}}finally{try{M&&!M.done&&(l=L.return)&&l.call(L)}finally{if(s)throw s.error}}mp.Transforms.removeNodes(e,{at:w})}catch(e){}}}catch(e){a={error:e}}finally{try{_&&!_.done&&(u=R.return)&&u.call(R)}finally{if(a)throw a.error}}mp.Transforms.setNodes(e,{rowSpan:k,colSpan:F},{at:r})})}}},e}(),JO=function(){function e(){this.title=zy("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")}}),1),n=t[0];if(!n)return!0;var r=Op(n,1)[0],o=r.rowSpan,i=void 0===o?1:o,a=r.colSpan;return!(i>1||(void 0===a?1:a)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=Op(mp.Editor.nodes(e,{match:kO(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=GO(Op(r,1)[0]),a=Op(o,2),u=a[0],s=a[1],l=u.rowSpan,c=void 0===l?1:l,f=u.colSpan,d=void 0===f?1:f;1===c&&1===d||mp.Editor.withoutNormalizing(e,function(){mp.Transforms.setNodes(e,{rowSpan:1,colSpan:1},{at:s});for(var t=1;t<d;t+=1){var n={type:"table-cell",children:[{text:""}]};0===s[s.length-2]&&i&&(n.isHeader=!0);var r=s.slice(0,-1),o=s[s.length-1]+t,a=Tp(Tp([],Op(r),!1),[o],!1);try{mp.Transforms.insertNodes(e,n,{at:a})}catch(t){try{var u=Op(mp.Editor.node(e,r),1)[0].children.length,l=Tp(Tp([],Op(r),!1),[u],!1);mp.Transforms.insertNodes(e,n,{at:l})}catch(e){console.warn("插入同行单元格失败: ".concat(e instanceof Error?e.message:String(e)))}}}for(var f=1;f<c;f+=1){var p=s[s.length-2]+f,h=Tp(Tp([],Op(s.slice(0,-2)),!1),[p],!1);try{var g=Op(mp.Editor.node(e,h),1)[0];if(!g){console.warn("目标行 ".concat(p," 不存在"));continue}for(t=0;t<d;t+=1){n={type:"table-cell",children:[{text:""}]},o=s[s.length-1]+t,a=Tp(Tp([],Op(h),!1),[o],!1);try{var v=g.children.length;if(o>=v){var m=Tp(Tp([],Op(h),!1),[v],!1);mp.Transforms.insertNodes(e,n,{at:m})}else mp.Transforms.insertNodes(e,n,{at:a})}catch(t){try{var y=g.children.length;l=Tp(Tp([],Op(h),!1),[y],!1);mp.Transforms.insertNodes(e,n,{at:l})}catch(e){console.warn("插入单元格到第".concat(f,"行失败: ").concat(e instanceof Error?e.message:String(e)))}}}}catch(e){console.warn("处理第".concat(f,"行时出错: ").concat(e instanceof Error?e.message:String(e)))}}})}},e}(),QO=function(){function e(){this.title=zy("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=Dv.getSelectedNodeByType(e,"table");return null!=t&&GO(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||null==Dv.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=Dv.getSelectedNodeByType(e,"table");if(null!=r)WO(r).forEach(function(t){return mp.Transforms.setNodes(e,{isHeader:n},{at:Dv.findPath(e,t)})})}},e}(),eT={key:"insertTable",factory:function(){return new YO}},tT={key:"deleteTable",factory:function(){return new UO}},nT={key:"insertTableRow",factory:function(){return new KO}},rT={key:"deleteTableRow",factory:function(){return new $O}},oT={key:"insertTableCol",factory:function(){return new qO}},iT={key:"deleteTableCol",factory:function(){return new zO}},aT={key:"tableHeader",factory:function(){return new QO}},uT={key:"tableFullWidth",factory:function(){return new VO}},sT={key:"mergeTableCell",factory:function(){return new ZO}},lT={key:"splitTableCell",factory:function(){return new JO}},cT={key:"setTableProperty",factory:function(){return new jO}},fT={key:"setTableCellProperty",factory:function(){return new HO}};var dT={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=zh(e);0===(t=t.filter(function(e){return"paragraph"===Dv.getNodeType(e)||(!!mp.Text.isText(e)||!!n.isInline(e))})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===_O(r,"display"),u=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===RO(r),colSpan:o,rowSpan:i,width:u,children:t,hidden:a}}};var pT={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r=zh(e),o=[],i=0;i<t.length;i+=1){var a=t[i];if("table-cell"===Dv.getNodeType(a)){var u=a;if(u.hidden)continue;o.push(u)}}return{type:"table-row",height:parseInt(_O(r,"height")||"0",10)||void 0,children:o}}};var hT,gT={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=zh(e),a="auto";"100%"===_O(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var u={type:"table",width:a,height:parseInt(_O(i,"height")||"0",10),children:t.filter(function(e){return"table-row"===Dv.getNodeType(e)})},s=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null,c=l?Array.from(l).map(function(e){return parseInt(e.getAttribute("width"),10)}).filter(function(e){return!Number.isNaN(e)}):[];if(c.length>0)u.columnWidths=c;else if(s.length>0){var f=[];Array.from(s).forEach(function(e){var t=parseInt(zh(e).attr("colSpan")||"1",10),n=parseInt(_O(zh(e),"width")||"90",10);f.push(n);for(var r=1;r<t;r+=1)f.push(90)}),u.columnWidths=f}return u}},vT=null===(hT=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===hT?void 0:hT.getPropertyValue("--w-e-textarea-border-color");function mT(e){var t=e.selection;if(null==t)return!1;var n=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=Op(r,2)[1],i=mp.Editor.start(e,o);if(mp.Point.equals(t.anchor,i))return!0}return!1}function yT(e,t){var n=t.offset;if(0===n)return!1;var r=mp.Editor.node(e,t);if(!mp.Text.isText(r[0]))return!1;var o=mp.Node.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function bT(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=Op(mp.Editor.nodes(e,{match:function(e){return Dv.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=mp.Editor.before(e,r)),"forward"===n&&mp.Editor.isEnd(e,r.anchor,r.anchor.path)&&(a=mp.Editor.after(e,r)),null==a)return!1;var u=mp.Editor.above(e,{at:a,match:function(e){return Dv.checkNodeType(e,"table-cell")}});if(null==u||null==i||!mp.Path.equals(u[1],i[1]))return!1;var s=mp.Editor.node(e,a);if(!mp.Text.isText(s[0])||s[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=mp.Node.string(s[0]);return"\n\r"===c.slice.apply(c,Tp([],Op(l),!1))?(mp.Transforms.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:mp.Editor.start(e,a.path),focus:mp.Editor.end(e,a.path)}}),!0):!!yT(e,a)&&(mp.Transforms.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:mp.Editor.start(e,a.path),focus:mp.Editor.end(e,a.path)}}),!0)}function ET(e,t){var n=mp.Editor.nodes(e,{at:t,match:function(e){return"table"===Dv.getNodeType(e)}});return!!Tp([],Op(n),!1).find(function(){return!0})}function wT(e){var t,n;try{for(var r=xp(["paragraph","header1","header2","header3","header4","header5","header6","blockquote","list-item","todo","divider"]),o=r.next();!o.done;o=r.next()){var i=o.value;if(Dv.getSelectedNodeByType(e,i))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!1}function CT(e){var t=document.createElement("div");t.innerHTML=e;var n=[],r=!1;return Array.from(t.childNodes).forEach(function(e){if(e.nodeType!==Node.TEXT_NODE){if(!(e instanceof HTMLElement)||"p"!==e.tagName.toLowerCase())return n.push(e.cloneNode(!0)),void(r=!0);var t=e.innerHTML,o=t.trim();if(o&&" "!==o){r&&n.push(document.createElement("br"));var i=document.createElement("div");i.innerHTML=t,Array.from(i.childNodes).forEach(function(e){n.push(e.cloneNode(!0))}),r=!0}}else(e.textContent||"").trim()&&(n.push(e.cloneNode(!0)),r=!0)}),t.replaceChildren.apply(t,Tp([],Op(n),!1)),t.innerHTML}var DT={selector:"table",preParseHtml:function(e){var t=zh(e);if("table"!==RO(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");t.append(r),n.remove();for(var o=t.find("td, th"),i=0;i<o.length;i+=1){var a=(s=zh(o[i])).attr("style");if(a){/display\s*:\s*none/i.test(a)&&s.remove()}s.attr("width","auto")}var u=t.find("td, th");for(i=0;i<u.length;i+=1){var s,l=(s=zh(u[i])).html()||"";l=CT(l=(l=l.replace(/<o:p[^>]*>[\s\S]*?<\/o:p>/gi,"")).replace(/<\/o:p>/gi,"")),s.html(l)}return t[0]}};function AT(e){var t,n,r=[],o=0;try{for(var i=xp(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function ST(e){var t,n,r=[],o=e.reduce(function(e,t){return e+t},0);try{for(var i=xp(e),a=i.next();!a.done;a=i.next()){var u=a.value;r.push(u/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var xT=null;var OT=!1,TT=!1,NT=0,BT=null,kT=zh(window);kT.on("mousedown",function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))OT=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===BT)return;TT=!0;var n=e.clientX;NT=n,document.body.style.cursor="col-resize",e.preventDefault()}kT.on("mousemove",FT),kT.on("mouseup",IT)});var FT=db(function(e){if(TT&&null!==BT){e.preventDefault();var t,n=e.clientX,r=n-NT,o=Op(mp.Editor.nodes(BT,{match:kO(BT,"table")}),1),i=Op(o[0],1)[0],a=i.columnWidths,u=void 0===a?[]:a,s=i.resizingIndex,l=void 0===s?-1:s,c=Dv.getSelectedNodeByType(BT,"table"),f=Dv.toDOMNode(BT,c).querySelector(".table");if(f)t=function(e,t,n,r,o){var i=Tp([],Op(e),!1);if(t<0||t>=e.length)return i;var a=o.getMenuConfig("insertTable").minWidth,u=parseInt((void 0===a?60:a).toString(),10)||60,s=n-(0===t?0:r[t-1]),l=Math.max(u,s);return i[t]=Math.floor(100*l)/100,i}(u,l,n-f.getBoundingClientRect().left,AT(u),BT);else t=function(e,t,n,r){var o=Tp([],Op(e),!1),i=r.getMenuConfig("insertTable").minWidth,a=parseInt((void 0===i?60:i).toString(),10)||60,u=o[t],s=Math.max(a,u+n);return o[t]=Math.floor(100*s)/100,o}(u,l,r,BT);mp.Transforms.setNodes(BT,{columnWidths:t},{mode:"highest"})}},100);function IT(e){OT=!1,TT=!1,BT=null,document.body.style.cursor="",kT.off("mousemove",FT),kT.off("mouseup",IT)}function PT(e,t){"mouseenter"===t.type?mp.Transforms.setNodes(e,{isResizing:!0},{mode:"highest"}):mp.Transforms.setNodes(e,{isResizing:!1},{mode:"highest"})}function RT(e){var t,n,r=[],o=0;try{for(var i=xp(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var _T=!1,LT=0,MT=null,jT=zh(window);var HT=db(function(e){if(_T&&null!==MT){e.preventDefault();var t,n=e.clientY,r=n-LT,o=Op(mp.Editor.nodes(MT,{match:kO(MT,"table")}),1),i=Op(o[0],1)[0],a=i.children,u=i.resizingRowIndex,s=void 0===u?-1:u,l=a.map(function(e){return e.height||30}),c=Dv.getSelectedNodeByType(MT,"table"),f=Dv.toDOMNode(MT,c).querySelector(".table");if(f)t=function(e,t,n,r,o){var i=Tp([],Op(e),!1);if(t<0||t>=e.length)return i;var a=(o.getMenuConfig("insertTable")||{}).minRowHeight,u=parseInt((void 0===a?30:a).toString(),10)||30,s=n-(0===t?0:r[t-1]),l=Math.max(u,s);return i[t]=Math.floor(100*l)/100,i}(l,s,n-f.getBoundingClientRect().top,RT(l),MT);else t=function(e,t,n,r){var o=Tp([],Op(e),!1),i=(r.getMenuConfig("insertTable")||{}).minRowHeight,a=parseInt((void 0===i?30:i).toString(),10)||30,u=o[t],s=Math.max(a,u+n);return o[t]=Math.floor(100*s)/100,o}(l,s,r,MT);var d=Dv.getSelectedNodeByType(MT,"table");if(d&&s>=0&&s<t.length){var p=Tp(Tp([],Op(Dv.findPath(MT,d)),!1),[s],!1);try{mp.Transforms.setNodes(MT,{height:t[s]},{at:p})}catch(e){console.warn("更新行高度失败:",e)}}}},100);function zT(e){_T=!1,MT=null,document.body.style.cursor="",jT.off("mousemove",HT),jT.off("mouseup",zT)}function $T(e,t){"mouseenter"===t.type?mp.Transforms.setNodes(e,{isResizingRow:!0},{mode:"highest"}):mp.Transforms.setNodes(e,{isResizingRow:!1},{mode:"highest"})}jT.on("mousedown",function(e){var t=e.target;if("DIV"===t.tagName&&t.closest(".row-resizer-item")){if(null===MT)return;_T=!0;var n=e.clientY;LT=n,document.body.style.cursor="row-resize",e.preventDefault()}jT.on("mousemove",HT),jT.on("mouseup",zT)});var UT={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(mp.Range.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=Dv.findPath(e,t),a=mp.Editor.start(e,i),u=mp.Editor.end(e,i),s=mp.Point.compare(r,u)<=0&&mp.Point.compare(r,a)>=0,l=mp.Point.compare(o,u)<=0&&mp.Point.compare(o,a)>=0;return!!(s&&l&&mp.Path.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,u=o.height,s=o.columnWidths,l=void 0===s?[]:s,c=o.scrollWidth,f=void 0===c?0:c,d=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=o.isHoverRowBorder,v=o.resizingRowIndex,m=o.isResizingRow,y=Dv.isNodeSelected(n,e),b=Op(XO.selection(n),1)[0],E=ST(l),w=gE("div",{className:"table-container","data-selected":y,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&XO.unselect(n);var r=Dv.findPath(n,e),o=mp.Editor.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},gE("table",{width:a,contentEditable:r,className:"table ".concat(b?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce(function(e,t){return e+t},0),"px")},on:{mousemove:qm(function(t){XO.hasSelected(n)||(function(e,t,n,r){if(!e.isDisabled()&&!OT&&!TT){var o=t,i=o.width,a=void 0===i?"auto":i,u=o.columnWidths,s=void 0===u?[]:u,l=o.isHoverCellBorder,c=o.resizingIndex,f=n.clientX,d=n.target;if(Ng(d)&&f>(g=d.getBoundingClientRect()).x+5&&f<g.x+g.width-5)return void(l&&mp.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(Ng(d)){var p=d.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?ST(s).map(function(e){return e*r}):s,m=AT(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void mp.Transforms.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&mp.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}(n,e,t,f),function(e,t,n){if(!e.isDisabled()&&!_T){var r=t,o=r.children,i=r.isHoverRowBorder,a=r.resizingRowIndex,u=n.target;if(Ng(u)){var s=u.closest(".table");if(s)for(var l=n.clientY,c=s.getBoundingClientRect(),f=RT(o.map(function(e){return e.height||30})),d=0;d<f.length;d+=1)if(l-c.y>=f[d]-5&&l-c.y<f[d]+5){if(a===d)return;return void mp.Transforms.setNodes(e,{isHoverRowBorder:!0,resizingRowIndex:d},{mode:"highest"})}}!0===i&&mp.Transforms.setNodes(e,{isHoverRowBorder:!1,resizingRowIndex:-1},{mode:"highest"})}}(n,e,t))},25)}},gE("colgroup",{contentEditable:!1},l.map(function(e){return gE("col",{width:e})})),gE("tbody",null,t)),gE("div",{className:"column-resizer",contentEditable:!1},l.map(function(e,t){var r=e;return"100%"===a&&(r=E[t]*f),gE("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},gE("div",{className:"resizer-line-hotzone ".concat(d&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(u,"px")},on:{mouseenter:function(e){return PT(n,e)},mouseleave:function(e){return PT(n,e)},mousedown:function(e){return function(e){TT||(BT=e)}(n)}}},gE("div",{className:"resizer-line"})))})),gE("div",{className:"row-resizer",contentEditable:!1},e.children.map(function(e,t){var r=l.reduce(function(e,t){return e+t},0),o=e.height||30;return gE("div",{className:"row-resizer-item",style:{minHeight:"".concat(o,"px")}},gE("div",{className:"resizer-line-hotzone-horizontal ".concat(g&&t===v?"visible ":"").concat(m&&t===v?"highlight":""),style:{width:"".concat(r,"px")},on:{mouseenter:function(e){return $T(n,e)},mouseleave:function(e){return $T(n,e)},mousedown:function(e){return function(e){_T||(MT=e)}(n)}}},gE("div",{className:"resizer-line-horizontal"})))}))),C=Yb("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(Ng(t)){var n=t.querySelector("table");n&&(xT=new ResizeObserver(function(t){var n=Op(t,1)[0].contentRect;mp.Transforms.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})}),xT.observe(n))}}(n,t)},destroy:function(){xT&&(null==xT||xT.disconnect(),xT=null)}}},w);return C}},VT={type:"table-row",renderElem:function(e,t,n){var r=e.height;return gE("tr",{style:r?{height:"".concat(r,"px")}:{}},t)}},WT={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=Dv.getParentNode(e,t);if(null==n)return!1;var r=Dv.getParentNode(e,n);return null!=r&&WO(r).some(function(e){return e===t})}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,u=o.rowSpan,s=void 0===u?1:u,l=o.isHeader,c=void 0!==l&&l,f=o.hidden,d=void 0!==f&&f,p=XO.isSelected(n,e);return gE(r&&c?"th":"td",{colSpan:a,rowSpan:s,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:d?"none":""}},t)}};function GT(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var qT={renderStyle:function(e,t){var n,r;if(!mp.Element.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,u=o.borderStyle,s=o.borderColor,l=o.textAlign,c={};if(i&&(c.backgroundColor=i),a){/^\d+(\.\d+)?$/.test(a)?c.borderWidth="".concat(a,"px"):c.borderWidth=a}u&&(c.borderStyle="none"===u?"":u),s&&(c.borderColor=s),l&&(c.textAlign=l);var f=t;return"table"===e.type?GT(null===(r=(null===(n=f.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):GT(f,c),f},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var u=zh(t);return n&&u.css("background-color",n),r&&u.css("border-width","".concat(r,"px")),o&&u.css("border-style","none"===o?"":o),i&&u.css("border-color",i),a&&u.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(u)},parseStyleHtml:function(e,t,n){if(!["TABLE","TD","TH"].includes(e.tagName))return t;var r=zh(e),o=t,i=_O(r,"background-color");i||(i=_O(r,"background")),i&&(o.backgroundColor=i);var a=_O(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(vT));var u,s=Op((null==a?void 0:a.split(" "))||[],3),l=s[0],c=s[1],f=s[2];(l=_O(r,"border-width")||l)&&(o.borderWidth=(u=l.trim())&&"string"==typeof u&&u.includes("pt")?u.replace(/(\d+(\.\d+)?)\s*pt/g,function(e,t){var n=(4*parseFloat(t)/3).toFixed(2);return"".concat(n,"px")}):u),(c=_O(r,"border-style")||c)&&(o.borderStyle="none"===c?"":c),(f=_O(r,"border-color")||f)&&(o.borderColor=f);var d=_O(r,"text-align");return(d=_O(r,"text-align")||d)&&(o.textAlign=d),t},renderElems:[UT,VT,WT],elemsToHtml:[xO,OO,TO],preParseHtml:[DT],parseElemsHtml:[dT,pT,gT],menus:[eT,tT,nT,rT,oT,iT,aT,uT,sT,lT,cT,fT],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,u=e.handleTab,s=e.selectAll,l=e;l.insertBreak=function(){null==Dv.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!mT(l)&&!bT(l,e,"backward")){var t=l.selection;if(t){var r=mp.Editor.before(l,t),o=mp.Editor.above(l,{at:t,match:function(e){return Dv.checkNodeType(e,"table-cell")}});if(r){var i=ET(l,r);if(!o&&i&&wT(l))return}}n(e)}},l.handleTab=function(){var t;if(Dv.getSelectedNodeByType(l,"table")){var n=mp.Editor.above(e);Dv.checkNodeType(n[0],"table-cell")&&mp.Transforms.select(e,n[1]);var r=mp.Editor.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=mp.Editor.above(e,{at:r[1]}))&&void 0!==t?t:r),mp.Transforms.select(e,r[1]);else{var o=l.children||[],i=o.length;if(Dv.checkNodeType(o[i-1],"table")){var a=Dv.genEmptyParagraph();mp.Transforms.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else u()},l.deleteForward=function(e){if(!mT(l)&&!bT(l,e,"forward")){var t=l.selection;if(t){var n=mp.Editor.after(l,t),o=mp.Editor.above(l,{at:t,match:function(e){return Dv.checkNodeType(e,"table-cell")}});if(n){var i=ET(l,n);if(!o&&i&&wT(l))return}}r(e)}},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=mp.Point.isBefore(i.anchor,i.focus);if(yT(l,t.anchor))(n=mp.Editor[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(yT(l,t.focus))(n=mp.Editor[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&mp.Transforms.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=Op(e,2),n=t[0],r=t[1];if("table"!==Dv.getNodeType(n))return i([n,r]);if(Dv.isLastNode(l,n)){var o=Dv.genEmptyParagraph();mp.Transforms.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=Dv.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):mp.Editor.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=Dv.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(mp.Path.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==mp.Node.string(t).length){var o=Dv.findPath(l,t),i={anchor:mp.Editor.start(l,o),focus:mp.Editor.end(l,o)};l.select(i)}else s();else s()}else s()}else s()},function(e){var t=e.apply;e.apply=function(n){if(!mp.Operation.isSelectionOperation(n)||!n.newProperties)return t(n);var r=Dp(Dp({},e.selection),n.newProperties);if(!mp.Range.isRange(r))return XO.unselect(e),t(n);var o=function(e){return mp.Element.isElement(e)&&("table-cell"===e.type||"th"===e.type||"td"===e.type)},i=Op(mp.Editor.nodes(e,{match:o,at:mp.Range.start(r),mode:"lowest"}),1)[0],a=Op(mp.Editor.nodes(e,{match:o,at:mp.Range.end(r),mode:"lowest"}),1)[0];if(!i||!a)return XO.unselect(e),t(n);var u=Op(i,2)[1],s=Op(a,2)[1];if(mp.Path.equals(u,s)||!FO(e,[u,s],"table"))return XO.unselect(e),t(n);try{var l=IO(e,{at:u});if(!l||0===l.length)return XO.unselect(e),t(n);for(var c=PO.valueOf(0,0),f=PO.valueOf(0,0),d=!1,p=!1,h=0;h<l.length;h+=1)if(l[h])for(var g=0;g<l[h].length;g+=1)if(l[h][g]){var v=Op(l[h][g],1),m=Op(v[0],2)[1];mp.Path.equals(u,m)&&(c.x=h,c.y=g,d=!0),mp.Path.equals(s,m)&&(f.x=h,f.y=g,p=!0)}if(!d||!p)return XO.unselect(e),t(n);for(var y=PO.valueOf(Math.min(c.x,f.x),Math.min(c.y,f.y)),b=PO.valueOf(Math.max(c.x,f.x),Math.max(c.y,f.y));;){var E=PO.valueOf(y.x,y.y),w=PO.valueOf(b.x,b.y);for(h=E.x;h<=w.x&&h<l.length;h+=1)if(l[h])for(g=E.y;g<=w.y&&g<l[h].length;g+=1)if(l[h][g]){var C=Op(l[h][g],2)[1];if(C){var D=C.rtl,A=C.ltr,S=C.btt,x=C.ttb;E.x=Math.min(E.x,h-(x-1)),E.y=Math.min(E.y,g-(D-1)),w.x=Math.max(w.x,h+(S-1)),w.y=Math.max(w.y,g+(A-1))}}if(PO.equals(y,E)&&PO.equals(b,w))break;y=E,b=w}var O=[],T=new WeakSet;for(h=y.x;h<=b.x&&h<l.length;h+=1)if(l[h]){var N=[];for(g=y.y;g<=b.y&&g<l[h].length;g+=1)if(l[h][g]){var B=Op(l[h][g],1),k=Op(B[0],1)[0];k&&(T.add(k),N.push(l[h][g]))}N.length>0&&O.push(N)}LO.set(e,O),MO.set(e,T)}catch(r){return XO.unselect(e),t(n)}t(n)}}(l),l.getTableSelection=function(){return LO.get(l)||null};var c=l.addMark,f=l.removeMark,d=Dp({},mp.Transforms);return l.addMark=function(e,t){var n=LO.get(l);if(n&&n.length>0){var r=l.selection;n.forEach(function(n){n.forEach(function(n){var r=Op(n[0],2)[1],o=mp.Editor.start(l,r),i=mp.Editor.end(l,r);mp.Transforms.select(l,{anchor:o,focus:i}),c(e,t)})}),r&&mp.Transforms.select(l,r)}else c(e,t)},l.removeMark=function(e){var t=LO.get(l);if(t&&t.length>0){var n=l.selection;t.forEach(function(t){t.forEach(function(t){var n=Op(t[0],2)[1],r=mp.Editor.start(l,n),o=mp.Editor.end(l,n);mp.Transforms.select(l,{anchor:r,focus:o}),f(e)})}),n&&mp.Transforms.select(l,n)}else f(e)},mp.Transforms.setNodes=function(e,t,n){if(void 0===n&&(n={}),e===l){var r=LO.get(l);if(r&&r.length>0)return"hidden"in t||"rowSpan"in t||"colSpan"in t?void d.setNodes(e,t,n):void r.forEach(function(r){r.forEach(function(r){var o=Op(r[0],2)[1];d.setNodes(e,t,Dp(Dp({},n),{at:o}))})})}d.setNodes(e,t,n)},l}};function KT(e){return e.length?e[0].tagName.toLowerCase():""}function YT(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=zh(e),i=r.width,a=void 0===i?"":i,u=r.height,s=void 0===u?"":u,l="";return a&&(l+="width: ".concat(a,";")),s&&(l+="height: ".concat(s,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}jy("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),jy("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),lg&&(zh.fn.append=lg),Xh&&(zh.fn.on=Xh),Eg&&(zh.fn.focus=Eg),Wh&&(zh.fn.attr=Wh),Yh&&(zh.fn.val=Yh),ag&&(zh.fn.html=ag),fg&&(zh.fn.parent=fg),Vh&&(zh.fn.hasClass=Vh),vg&&(zh.fn.empty=vg);var XT={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,u=n.width,s=void 0===u?"auto":u,l=n.height,c=void 0===l?"auto":l,f=n.style,d=void 0===f?{}:f,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=YT(o,s,c,d)}else{var g=d.width,v=void 0===g?"":g,m=d.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(s,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function ZT(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(Cg())}function JT(e){var t={};return e.trim().split(";").forEach(function(e){if(e){var n=Op(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}}),t}function QT(){return ZT("w-e-insert-video")}var eN=function(){function e(){this.title=zy("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=QT(),this.heightInputId=QT(),this.buttonId=QT()}return e.prototype.getSelectedVideoNode=function(e){return Dv.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Op(Jy(zy("videoModule.width"),n,"auto"),2),a=i[0],u=zh(i[1]),s=Op(Jy(zy("videoModule.height"),r,"auto"),2),l=s[0],c=zh(s[1]),f=Op(Qy(o,zy("videoModule.ok")),1)[0],d=this.getSelectedVideoNode(e);if(null==this.$content){var p=zh("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},u=function(e){return/^\d+(\.\d+)?$/.test(e)},s="auto",l="auto";a(o)?s=o:u(o)&&(s="".concat(parseInt(o,10),"px")),a(i)?l=i:u(i)&&(l="".concat(parseInt(i,10),"px"));var c=d.style,f=void 0===c?{}:c;e.restoreSelection();var h={style:Dp(Dp({},f),{width:s,height:l})};mp.Transforms.setNodes(e,h,{match:function(e){return Dv.checkNodeType(e,"video")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(f),null==d)return h[0];var g=d.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"":m,b=v.height,E=void 0===b?"":b;return u.val(y),c.val(E),setTimeout(function(){u.focus()}),h[0]},e}();function tN(){return ZT("w-e-edit-video")}var nN=function(){function e(){this.title=zy("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=tN(),this.posterInputId=tN(),this.buttonId=tN()}return e.prototype.getSelectedVideoNode=function(e){return Dv.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Op(Jy(zy("videoModule.videoSrc"),r,zy("videoModule.videoSrcPlaceHolder")),2),u=a[0],s=a[1],l=Op(Jy(zy("videoModule.videoPoster"),o,zy("videoModule.videoPosterPlaceHolder")),2),c=l[0],f=l[1],d=zh(s),p=zh(f),h=Op(Qy(i,zy("videoModule.ok")),1)[0];if(null==this.$content){var g=zh("<div></div>");g.on("click","#".concat(i),function(n){return Ap(t,void 0,void 0,function(){var t,i,a,u;return Sp(this,function(s){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=ZT("video-"),u={src:t,poster:i,key:a},e.restoreSelection(),mp.Transforms.setNodes(e,u,{match:function(e){return Dv.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]})})}),this.$content=g}var v=this.$content;v.empty(),v.append(u),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,w=void 0===E?"":E;return d.val(b),p.val(w),setTimeout(function(){d.focus()}),v[0]},e}();function rN(e,t){return Ap(this,arguments,void 0,function(e,t,n,r,o){var i,a,u,s,l,c,f;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),Sp(this,function(d){switch(d.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,u=i.checkVideo,s=i.parseVideoSrc,[4,u(t,n)]):[2];case 1:return"string"==typeof(l=d.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,s(t)];case 2:return 0!==(c=d.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),f={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then(function(){Dv.isSelectedEmptyParagraph(e)&&mp.Transforms.removeNodes(e,{mode:"highest"}),mp.Transforms.insertNodes(e,f,{mode:"highest"})}),a(f),[2]}})})}function oN(){return ZT("w-e-insert-video")}var iN=function(){function e(){this.title=zy("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=oN(),this.posterInputId=oN(),this.buttonId=oN()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||!!Dv.getSelectedElems(e).some(function(t){var n=Dv.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Op(Jy(zy("videoModule.videoSrc"),r,zy("videoModule.videoSrcPlaceHolder")),2),u=a[0],s=a[1],l=Op(Jy(zy("videoModule.videoPoster"),o,zy("videoModule.videoPosterPlaceHolder")),2),c=l[0],f=l[1],d=zh(s),p=zh(f),h=Op(Qy(i,zy("videoModule.ok")),1)[0];if(null==this.$content){var g=zh("<div></div>");g.on("click","#".concat(i),function(n){return Ap(t,void 0,void 0,function(){var t,i;return Sp(this,function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,rN(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var v=this.$content;return v.empty(),v.append(u),v.append(c),v.append(h),d.val(""),p.val(""),setTimeout(function(){d.focus()}),v[0]},e}();function aN(e){return e.getMenuConfig("uploadVideo")}var uN=new WeakMap;function sN(e,t){return Ap(this,void 0,void 0,function(){var n,r;return Sp(this,function(o){switch(o.label){case 0:return n=function(e){var t=uN.get(e);if(null!=t)return t;var n=aN(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,u=n.onError;return t=RD(Dp(Dp({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n){return rN(e,t,n)}),void r(t,n);var o=n.errno,u=void 0===o?1:o,s=n.data,l=void 0===s?{}:s;if(0===u){var c=l.url,f=void 0===c?"":c,d=l.poster;rN(e,f,void 0===d?"":d),r(t,n)}else i(t,n)},onError:function(e,t,n){u(e,t,n)}})),uN.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}var lN=function(){function e(){this.title=zy("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n){return rN(e,t,n)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var u=zh("body"),s=zh('<input type="file" '.concat(a," multiple/>"));s.hide(),u.append(s),s.click(),s.on("change",function(){var t=s[0].files;!function(e,t){Ap(this,void 0,void 0,function(){var n,r,o,i,a,u,s,l,c,f,d,p;return Sp(this,function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=aN(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=Np(n),h.label=2;case 2:return[4,a.next()];case 3:return u=h.sent(),(c=u.done)?[3,7]:(p=u.value,i=!1,s=p,o?[4,o(s,function(t,n){return rN(e,t,n)},e)]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(s),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),f={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(d=a.return)?[3,11]:[4,d.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(f)throw f.error;return[7];case 13:return[7];case 14:return r.length>0?[4,sN(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}})})}(e,t)})}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!mp.Range.isCollapsed(t)||!!Dv.getSelectedElems(e).some(function(t){var n=Dv.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function cN(e,t,n,r,o,i){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}],textAlign:i}}var fN={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=zh(e),o="",i="",a="auto",u="auto",s={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",u=l.attr("height")||"auto",s=JT(s=l.attr("style")||""),cN(o=l[0].outerHTML,i,a,u,s,JT(r.attr("style")||"")["text-align"]||"center");var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",u=c.attr("height")||"auto",cN(o,i=c.attr("poster")||"",a,u,s=JT(s=c.attr("style")||""),JT(r.attr("style")||"")["text-align"]||"center")}};var dN={selector:"iframe,video,p",preParseHtml:function(e){var t=zh(e),n=t;if("p"===KT(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=zh(o))}}var a=KT(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var u=zh('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return u.append(n),u[0]}};var pN={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,u=o.poster,s=void 0===u?"":u,l=o.key,c=void 0===l?"":l,f=o.width,d=void 0===f?"auto":f,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=Dv.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){r=gE("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:YT(a,d,h,v)})}else{var E=gE("video",{key:c,poster:s,controls:!0,style:v},gE("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==d&&(E.data.width=d),"auto"!==h&&(E.data.height=h),r=gE("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},E)}var w=Yb("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return w}},hN={renderElems:[pN],elemsToHtml:[XT],preParseHtml:[dN],parseElemsHtml:[fN],menus:[{key:"insertVideo",factory:function(){return new iN},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new lN},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new eN}},{key:"editVideoSrc",factory:function(){return new nN}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=Op(e,2),o=t[0],i=t[1];"video"===Dv.getNodeType(o)&&(Dv.isLastNode(r,o)&&mp.Transforms.insertNodes(r,Dv.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}};jy("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),jy("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});lg&&(zh.fn.append=lg),Xh&&(zh.fn.on=Xh),gg&&(zh.fn.remove=gg),Yh&&(zh.fn.val=Yh),bg&&(zh.fn.click=bg),tg&&(zh.fn.hide=tg);var gN=new WeakMap;function vN(e){return e.getMenuConfig("uploadImage")}function mN(e,t){return Ap(this,void 0,void 0,function(){return Sp(this,function(n){return[2,new Promise(function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;MS(e,i,t.name,a),n("ok")}}})]})})}function yN(e,t){return Ap(this,void 0,void 0,function(){var n,r;return Sp(this,function(o){switch(o.label){case 0:return n=function(e){var t=gN.get(e);if(null!=t)return t;var n=vN(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,u=n.onError;return t=RD(Dp(Dp({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n,r){return MS(e,t,n,r)}),void r(t,n);var o=n.errno,u=void 0===o?1:o,s=n.data,l=void 0===s?{}:s;if(0===u){if(Array.isArray(l))l.forEach(function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;MS(e,r,i,void 0===a?"":a)});else{var c=l.url,f=void 0===c?"":c,d=l.alt,p=void 0===d?"":d,h=l.href;MS(e,f,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){u(e,t,n)}})),gN.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}function bN(e,t){return Ap(this,void 0,void 0,function(){var n,r,o,i,a,u,s,l,c,f,d,p,h,g,v;return Sp(this,function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=vN(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),u=!0,s=Np(n),m.label=2;case 2:return[4,s.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,u=!1,f=(c=v).size,i&&f<=i?[4,mN(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,function(t,n,r){return MS(e,t,n,r)},e)]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return u=!0,[3,2];case 9:return[3,16];case 10:return d=m.sent(),h={error:d},[3,16];case 11:return m.trys.push([11,,14,15]),u||p||!(g=s.return)?[3,13]:[4,g.call(s)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,yN(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}})})}var EN=function(){function e(){this.title=zy("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return RS(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n,r){return MS(e,t,n,r)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var u=zh("body"),s=zh('<input type="file" '.concat(a," multiple/>"));s.hide(),u.append(s),s.click(),s.on("change",function(){var t=s[0].files;bN(e,t)})}},e}();var wN={menus:[{key:"uploadImage",factory:function(){return new EN},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(RS(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some(function(e){return"image"===Op(e.type.split("/"),1)[0]})?bN(e,o):t(r)}},n}};jy("en",{highLightModule:{selectLang:"Language"}}),jy("zh-CN",{highLightModule:{selectLang:"选择语言"}});var CN,DN={exports:{}};var AN=(CN||(CN=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,o){r[o]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var u in i)if(i.hasOwnProperty(u)){if(u==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(u)||(a[u]=i[u])}var l=r[e];return r[e]=a,o.languages.DFS(o.languages,function(t,n){n===l&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var u in t)if(t.hasOwnProperty(u)){n.call(t,u,t[u],r||u);var s=t[u],l=o.util.type(s);"Object"!==l||i[a(s)]?"Array"!==l||i[a(s)]||(i[a(s)]=!0,e(s,n,u,i)):(i[a(s)]=!0,e(s,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var u=t.parentElement;u&&"pre"===u.nodeName.toLowerCase()&&o.util.setLanguage(u,i);var s={element:t,language:i,grammar:a,code:t.textContent};function l(e){s.highlightedCode=e,o.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,o.hooks.run("after-highlight",s),o.hooks.run("complete",s),r&&r.call(s.element)}if(o.hooks.run("before-sanity-check",s),(u=s.element.parentElement)&&"pre"===u.nodeName.toLowerCase()&&!u.hasAttribute("tabindex")&&u.setAttribute("tabindex","0"),!s.code)return o.hooks.run("complete",s),void(r&&r.call(s.element));if(o.hooks.run("before-highlight",s),s.grammar)if(n&&e.Worker){var c=new Worker(o.filename);c.onmessage=function(e){l(e.data)},c.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else l(o.highlight(s.code,s.grammar,s.language));else l(o.util.encode(s.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new s;return l(o,o.head,e),u(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function u(e,t,n,r,s,f){for(var d in n)if(n.hasOwnProperty(d)&&n[d]){var p=n[d];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(f&&f.cause==d+","+h)return;var g=p[h],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var E=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,E+"g")}for(var w=g.pattern||g,C=r.next,D=s;C!==t.tail&&!(f&&D>=f.reach);D+=C.value.length,C=C.next){var A=C.value;if(t.length>e.length)return;if(!(A instanceof i)){var S,x=1;if(y){if(!(S=a(w,D,e,m))||S.index>=e.length)break;var O=S.index,T=S.index+S[0].length,N=D;for(N+=C.value.length;O>=N;)N+=(C=C.next).value.length;if(D=N-=C.value.length,C.value instanceof i)continue;for(var B=C;B!==t.tail&&(N<T||"string"==typeof B.value);B=B.next)x++,N+=B.value.length;x--,A=e.slice(D,N),S.index-=D}else if(!(S=a(w,0,A,m)))continue;O=S.index;var k=S[0],F=A.slice(0,O),I=A.slice(O+k.length),P=D+A.length;f&&P>f.reach&&(f.reach=P);var R=C.prev;if(F&&(R=l(t,R,F),D+=F.length),c(t,R,x),C=l(t,R,new i(d,v?o.tokenize(k,v):k,b,k)),I&&l(t,C,I),x>1){var _={cause:d+","+h,reach:P};u(e,t,n,C.prev,D,_),f&&_.reach>f.reach&&(f.reach=_.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var u="";for(var s in i.attributes)u+=" "+s+'="'+(i.attributes[s]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+u+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()},!1),o):o;var f=o.util.currentScript();function d(){o.manual||o.highlightAll()}if(f&&(o.filename=f.src,f.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
20
13
|
/**
|
|
21
14
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
22
15
|
*
|
|
@@ -24,5 +17,5 @@ function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return
|
|
|
24
17
|
* @author Lea Verou <https://lea.verou.me>
|
|
25
18
|
* @namespace
|
|
26
19
|
* @public
|
|
27
|
-
*/e.exports&&(e.exports=t),void 0!==b&&(b.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",function(e){e.selector+=", "+i}),t.hooks.add("before-sanity-check",function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)},function(e){s.setAttribute(n,"failed"),u.textContent=e})}}),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(sN)),sN.exports),lN=E(uN);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(Prism);var cN;cN||(cN=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var dN;dN||(dN=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var fN;fN||(fN=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var pN;pN||(pN=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var hN;hN||(hN=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var gN;gN||(gN=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,m,y]),D={keyword:c,punctuation:/[<>()?,.:[\]]/},S=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,x=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:D},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:D},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,f,g]),inside:D}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:D},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,m]),inside:D,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:D,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:D}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,C,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:D},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var T=A+"|"+S,O=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[T]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[O]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,P=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[O]),2),I=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,F]),_=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[T]),2),R=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[_,F]);function L(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:L(I,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:L(R,_)}],char:{pattern:RegExp(S),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var vN;vN||(vN=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e}),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var mN=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function yN(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce(function(e,t){return e+yN(t)},0)}var bN=function(e){var t,n,r,o=Pp(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!Dp.Text.isText(e))return null;var t=gv.getParentNode(null,e);if(t&&"code"===gv.getNodeType(t)){var n=gv.getParentNode(null,t);if(n&&"pre"===gv.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=lN.languages[t];return n?lN.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=Fp(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+yN(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var EN={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var wN=function(){function e(){this.title=ky("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach(function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})});var i=this.getValue(e);return n.forEach(function(e){e.value===i?e.selected=!0:e.selected=void 0}),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!Dp.Element.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some(function(e){return e.value===n})?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};Dp.Transforms.setNodes(e,n,{match:function(e){return gv.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=gv.getSelectedNodeByType(e,"code");if(null==t)return null;var n=gv.getParentNode(e,t);return Dp.Element.isElement(n)?"pre"!==n.type?null:t:null},e}(),CN={key:"codeSelectLang",factory:function(){return new wN},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};Vh&&(Hh.fn.attr=Vh);var DN={renderStyle:function(e,t){var n=e,r=t,o="";return mN.forEach(function(e){n[e]&&(o=e)}),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=Hh(e);if(!Dp.Element.isElement(t))return t;if("code"!==gv.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[CN],elemsToHtml:[EN]},SN=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=Np(Np({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=Np(Np({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=Np(Np({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=Np(Np({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){eh(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,lE[n||""]=r},e.registerRenderStyle=function(e){!function(e){aE.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;tv[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){Jg.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,zg.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;Ug[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){$g.push(e)}(e)},e.registerModule=function(e){AN(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function AN(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(e){return SN.registerMenu(e)}),n&&n.forEach(function(e){return SN.registerRenderElem(e)}),r&&SN.registerRenderStyle(r),o&&o.forEach(function(e){return SN.registerElemToHtml(e)}),i&&SN.registerStyleToHtml(i),a&&a.forEach(function(e){return SN.registerPreParseHtml(e)}),s&&s.forEach(function(e){return SN.registerParseElemHtml(e)}),u&&SN.registerParseStyleHtml(u),l&&SN.registerPlugin(l)}qx.forEach(function(e){return AN(e)}),AN(cT),AN(kO),AN(JO),AN(iN),AN(DN);var xN='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>';var TN={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var ON={hoverbarKeys:Np(Np({},TN),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};SN.setEditorConfig(Np(Np({},ON),{decorate:bN}));var NN={hoverbarKeys:TN};SN.setSimpleEditorConfig(Np(Np({},NN),{decorate:bN}));var BN={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:ky("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:ky("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:ky("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:ky("editor.image"),iconSvg:xN,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:ky("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};SN.setToolbarConfig(BN);var kN={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:ky("editor.image"),iconSvg:xN,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};SN.setSimpleToolbarConfig(kN);e.Boot=SN,e.DomEditor=gv,e.SlateEditor=Dp.Editor,e.SlateElement=Dp.Element,e.SlateLocation=Dp.Location,e.SlateNode=Dp.Node,e.SlatePath=Dp.Path,e.SlatePoint=Dp.Point,e.SlateRange=Dp.Range,e.SlateText=Dp.Text,e.SlateTransforms=Dp.Transforms,e.Toolbar=xE,e.createEditor=function(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?SN.simpleEditorConfig:SN.editorConfig,c=Np(Np({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return AE({selector:n,config:Np(Np(Np({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:SN.plugins})},e.createToolbar=function(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?SN.simpleToolbarConfig:SN.toolbarConfig;return TE(n,{selector:t,config:Np(Np({},s),o)})},e.createUploader=SD,e.default={},e.genModalButtonElems=Uy,e.genModalInputElems=$y,e.genModalTextareaElems=function(e,t,n){var r=Hh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Hh('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]},e.i18nAddResources=Ny,e.i18nChangeLanguage=function(e){Ty.changeLanguage(e)},e.i18nGetResources=function(e){return Ty.getResourceBundle(e,Oy)},e.t=ky,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
20
|
+
*/e.exports&&(e.exports=t),void 0!==b&&(b.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",function(e){e.selector+=", "+i}),t.hooks.add("before-sanity-check",function(a){var u=a.element;if(u.matches(i)){a.code="",u.setAttribute(n,r);var s=u.appendChild(document.createElement("CODE"));s.textContent="Loading…";var l=u.getAttribute("data-src"),c=a.language;if("none"===c){var f=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[f]||f}t.util.setLanguage(s,c),t.util.setLanguage(u,c);var d=t.plugins.autoloader;d&&d.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,function(e){u.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(u.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),u.hasAttribute("data-start")||u.setAttribute("data-start",String(a+1))}s.textContent=e,t.highlightElement(s)},function(e){u.setAttribute(n,"failed"),s.textContent=e})}}),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(DN)),DN.exports),SN=E(AN);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},u=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=a(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&u(o.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||u(e.tokens)})}(Prism);var xN;xN||(xN=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var ON;ON||(ON=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},u=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:u,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:u,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var TN;TN||(TN=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var NN;NN||(NN=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var BN;BN||(BN=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var kN;kN||(kN=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",u="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function s(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=s(i),c=RegExp(s(o+" "+i+" "+a+" "+u)),f=s(i+" "+a+" "+u),d=s(o+" "+i+" "+u),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[f,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,m,y]),D={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,x=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:D},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:D},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,d,g]),inside:D}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:D},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,m]),inside:D,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:D,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:D}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,C,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:D},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=S+"|"+A,T=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,F]),R=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),_=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,F]);function L(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:L(P,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[_]),lookbehind:!0,greedy:!0,inside:L(_,R)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var FN;FN||(FN=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var u=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),s="language-"+(u=(/[a-z][\w-]*/i.exec(u)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,s]:a.alias.push(s):a.alias=[s]}}else e(o.content)}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),s(n);var r=u[t];return r||e}),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var f="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=f,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(f);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),u={amp:"&",lt:"<",gt:">",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var IN=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function PN(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce(function(e,t){return e+PN(t)},0)}var RN=function(e){var t,n,r,o=Op(e,2),i=o[0],a=o[1],u=[],s=function(e){if(!mp.Text.isText(e))return null;var t=Dv.getParentNode(null,e);if(t&&"code"===Dv.getNodeType(t)){var n=Dv.getParentNode(null,t);if(n&&"pre"===Dv.getNodeType(n))return t}return null}(i);if(null==s)return u;var l=s.language,c=void 0===l?"":l;if(!c)return u;var f=function(e,t){if(!t)return[];var n=SN.languages[t];return n?SN.tokenize(e.text,n):[]}(i,c),d=0;try{for(var p=xp(f),h=p.next();!h.done;h=p.next()){var g=h.value,v=d+PN(g);"string"!=typeof g&&u.push(((r={})[g.type]=!0,r.anchor={path:a,offset:d},r.focus={path:a,offset:v},r)),d=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return u};var _N={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var LN=function(){function e(){this.title=zy("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach(function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})});var i=this.getValue(e);return n.forEach(function(e){e.value===i?e.selected=!0:e.selected=void 0}),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!mp.Element.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some(function(e){return e.value===n})?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};mp.Transforms.setNodes(e,n,{match:function(e){return Dv.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=Dv.getSelectedNodeByType(e,"code");if(null==t)return null;var n=Dv.getParentNode(e,t);return mp.Element.isElement(n)?"pre"!==n.type?null:t:null},e}(),MN={key:"codeSelectLang",factory:function(){return new LN},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};Wh&&(zh.fn.attr=Wh);var jN={renderStyle:function(e,t){var n=e,r=t,o="";return IN.forEach(function(e){n[e]&&(o=e)}),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=zh(e);if(!mp.Element.isElement(t))return t;if("code"!==Dv.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[MN],elemsToHtml:[_N]},HN=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=Dp(Dp({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=Dp(Dp({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=Dp(Dp({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=Dp(Dp({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){Qp(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,bE[n||""]=r},e.registerRenderStyle=function(e){!function(e){vE.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;uv[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){ov.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,Vg.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;Gg[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){Wg.push(e)}(e)},e.registerModule=function(e){zN(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function zN(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,u=e.parseElemsHtml,s=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(e){return HN.registerMenu(e)}),n&&n.forEach(function(e){return HN.registerRenderElem(e)}),r&&HN.registerRenderStyle(r),o&&o.forEach(function(e){return HN.registerElemToHtml(e)}),i&&HN.registerStyleToHtml(i),a&&a.forEach(function(e){return HN.registerPreParseHtml(e)}),u&&u.forEach(function(e){return HN.registerParseElemHtml(e)}),s&&HN.registerParseStyleHtml(s),l&&HN.registerPlugin(l)}sO.forEach(function(e){return zN(e)}),zN(SO),zN(qT),zN(hN),zN(wN),zN(jN);var $N='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>';var UN={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var VN={hoverbarKeys:Dp(Dp({},UN),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};HN.setEditorConfig(Dp(Dp({},VN),{decorate:RN}));var WN={hoverbarKeys:UN};HN.setSimpleEditorConfig(Dp(Dp({},WN),{decorate:RN}));var GN={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:zy("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:zy("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:zy("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:zy("editor.image"),iconSvg:$N,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:zy("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};HN.setToolbarConfig(GN);var qN={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:zy("editor.image"),iconSvg:$N,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};HN.setSimpleToolbarConfig(qN);e.Boot=HN,e.DomEditor=Dv,e.SlateEditor=mp.Editor,e.SlateElement=mp.Element,e.SlateLocation=mp.Location,e.SlateNode=mp.Node,e.SlatePath=mp.Path,e.SlatePoint=mp.Point,e.SlateRange=mp.Range,e.SlateText=mp.Text,e.SlateTransforms=mp.Transforms,e.Toolbar=_E,e.createEditor=function(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,u=void 0===a?{}:a,s=e.mode,l="simple"===(void 0===s?"default":s)?HN.simpleEditorConfig:HN.editorConfig,c=Dp(Dp({},l.hoverbarKeys||{}),u.hoverbarKeys||{});return RE({selector:n,config:Dp(Dp(Dp({},l),u),{hoverbarKeys:c}),content:o,html:i,plugins:HN.plugins})},e.createToolbar=function(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var u="simple"===a?HN.simpleToolbarConfig:HN.toolbarConfig;return LE(n,{selector:t,config:Dp(Dp({},u),o)})},e.createUploader=RD,e.default={},e.genModalButtonElems=Qy,e.genModalInputElems=Jy,e.genModalTextareaElems=function(e,t,n){var r=zh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=zh('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]},e.i18nAddResources=jy,e.i18nChangeLanguage=function(e){Ly.changeLanguage(e)},e.i18nGetResources=function(e){return Ly.getResourceBundle(e,My)},e.t=zy,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
28
21
|
//# sourceMappingURL=index.js.map
|