@syhr/sy-graph 1.0.0 → 1.0.2-beta.0

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.
@@ -1,12 +1,17 @@
1
- (function(ae,re){typeof exports=="object"&&typeof module!="undefined"?re(exports,require("vue"),require("lodash-es"),require("element-plus"),require("@meta2d/utils"),require("@meta2d/core"),require("@meta2d/plugin-mind-core"),require("@meta2d/plugin-mind-collapse"),require("@meta2d/form-diagram"),require("@meta2d/class-diagram"),require("@meta2d/le5le-charts"),require("@meta2d/flow-diagram"),require("@meta2d/fta-diagram"),require("@meta2d/sequence-diagram"),require("@meta2d/activity-diagram")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","element-plus","@meta2d/utils","@meta2d/core","@meta2d/plugin-mind-core","@meta2d/plugin-mind-collapse","@meta2d/form-diagram","@meta2d/class-diagram","@meta2d/le5le-charts","@meta2d/flow-diagram","@meta2d/fta-diagram","@meta2d/sequence-diagram","@meta2d/activity-diagram"],re):(ae=typeof globalThis!="undefined"?globalThis:ae||self,re(ae.SyGraph={},ae.Vue,ae._,ae.ElementPlus,ae.Meta2dUtils,ae.Meta2dCore,ae.Meta2dPluginMindCore,ae.Meta2dPluginMindCollapse,ae.Meta2dFormDiagram,ae.Meta2dClassDiagram,ae.Meta2dLe5leCharts,ae.Meta2dFlowDiagram,ae.Meta2dFtaDiagram,ae.Meta2dSequenceDiagram,ae.Meta2dActivityDiagram))})(this,function(ae,re,me,we,ke,de,Ue,Ve,Ie,rt,_r,ar,sr,st,gi){"use strict";var dx=Object.defineProperty,px=Object.defineProperties;var vx=Object.getOwnPropertyDescriptors;var Ms=Object.getOwnPropertySymbols;var yx=Object.prototype.hasOwnProperty,mx=Object.prototype.propertyIsEnumerable;var or=(ae,re)=>(re=Symbol[ae])?re:Symbol.for("Symbol."+ae),gx=ae=>{throw TypeError(ae)};var vi=(ae,re,me)=>re in ae?dx(ae,re,{enumerable:!0,configurable:!0,writable:!0,value:me}):ae[re]=me,te=(ae,re)=>{for(var me in re||(re={}))yx.call(re,me)&&vi(ae,me,re[me]);if(Ms)for(var me of Ms(re))mx.call(re,me)&&vi(ae,me,re[me]);return ae},Le=(ae,re)=>px(ae,vx(re));var It=(ae,re,me)=>vi(ae,typeof re!="symbol"?re+"":re,me);var Qe=(ae,re,me)=>new Promise((we,ke)=>{var de=Ie=>{try{Ve(me.next(Ie))}catch(rt){ke(rt)}},Ue=Ie=>{try{Ve(me.throw(Ie))}catch(rt){ke(rt)}},Ve=Ie=>Ie.done?we(Ie.value):Promise.resolve(Ie.value).then(de,Ue);Ve((me=me.apply(ae,re)).next())}),Gt=function(ae,re){this[0]=ae,this[1]=re},yi=(ae,re,me)=>{var we=(Ue,Ve,Ie,rt)=>{try{var _r=me[Ue](Ve),ar=(Ve=_r.value)instanceof Gt,sr=_r.done;Promise.resolve(ar?Ve[0]:Ve).then(st=>ar?we(Ue==="return"?Ue:"next",Ve[1]?{done:st.done,value:st.value}:st,Ie,rt):Ie({value:st,done:sr})).catch(st=>we("throw",st,Ie,rt))}catch(st){rt(st)}},ke=Ue=>de[Ue]=Ve=>new Promise((Ie,rt)=>we(Ue,Ve,Ie,rt)),de={};return me=me.apply(ae,re),de[or("asyncIterator")]=()=>de,ke("next"),ke("throw"),ke("return"),de},mi=ae=>{var re=ae[or("asyncIterator")],me=!1,we,ke={};return re==null?(re=ae[or("iterator")](),we=de=>ke[de]=Ue=>re[de](Ue)):(re=re.call(ae),we=de=>ke[de]=Ue=>{if(me){if(me=!1,de==="throw")throw Ue;return Ue}return me=!0,{done:!1,value:new Gt(new Promise(Ve=>{var Ie=re[de](Ue);Ie instanceof Object||gx("Object expected"),Ve(Ie)}),1)}}),ke[or("iterator")]=()=>ke,we("next"),"throw"in re?we("throw"):ke.throw=de=>{throw de},"return"in re&&we("return"),ke},Ls=(ae,re,me)=>(re=ae[or("asyncIterator")])?re.call(ae):(ae=ae[or("iterator")](),re={},me=(we,ke)=>(ke=ae[we])&&(re[we]=de=>new Promise((Ue,Ve,Ie)=>(de=ke.call(ae,de),Ie=de.done,Promise.resolve(de.value).then(rt=>Ue({value:rt,done:Ie}),Ve)))),me("next"),me("return"),re);var gs,As,Es,Bs,ws,Cs,bs,Fs,Ds,_s,Ss,Ts;var le=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function A0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ns(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Vt=TypeError;const Ai=Ns(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var E0=typeof Map=="function"&&Map.prototype,B0=Object.getOwnPropertyDescriptor&&E0?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Sr=E0&&B0&&typeof B0.get=="function"?B0.get:null,Ei=E0&&Map.prototype.forEach,w0=typeof Set=="function"&&Set.prototype,C0=Object.getOwnPropertyDescriptor&&w0?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Tr=w0&&C0&&typeof C0.get=="function"?C0.get:null,Bi=w0&&Set.prototype.forEach,Hs=typeof WeakMap=="function"&&WeakMap.prototype,fr=Hs?WeakMap.prototype.has:null,qs=typeof WeakSet=="function"&&WeakSet.prototype,cr=qs?WeakSet.prototype.has:null,$s=typeof WeakRef=="function"&&WeakRef.prototype,wi=$s?WeakRef.prototype.deref:null,zs=Boolean.prototype.valueOf,Ws=Object.prototype.toString,Gs=Function.prototype.toString,Vs=String.prototype.match,b0=String.prototype.slice,wt=String.prototype.replace,Ks=String.prototype.toUpperCase,Ci=String.prototype.toLowerCase,bi=RegExp.prototype.test,Fi=Array.prototype.concat,xt=Array.prototype.join,js=Array.prototype.slice,Di=Math.floor,F0=typeof BigInt=="function"?BigInt.prototype.valueOf:null,D0=Object.getOwnPropertySymbols,_0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ur=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Kt||!0)?Symbol.toStringTag:null,_i=Object.prototype.propertyIsEnumerable,Si=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Ti(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||bi.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-Di(-t):Di(t);if(n!==t){var i=String(n),o=b0.call(e,i.length+1);return wt.call(i,r,"$&_")+"."+wt.call(wt.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wt.call(e,r,"$&_")}var S0=Ai,Ii=S0.custom,Ri=Mi(Ii)?Ii:null,Oi={__proto__:null,double:'"',single:"'"},Xs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Ir=function t(e,r,n,i){var o=r||{};if(Et(o,"quoteStyle")&&!Et(Oi,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Et(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=Et(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Et(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Et(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ui(e,o);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var p=String(e);return s?Ti(e,p):p}if(typeof e=="bigint"){var f=String(e)+"n";return s?Ti(e,f):f}var l=typeof o.depth=="undefined"?5:o.depth;if(typeof n=="undefined"&&(n=0),n>=l&&l>0&&typeof e=="object")return T0(e)?"[Array]":"[Object]";var v=df(o,n);if(typeof i=="undefined")i=[];else if(Li(i,e)>=0)return"[Circular]";function x(S,N,M){if(N&&(i=js.call(i),i.push(N)),M){var H={depth:o.depth};return Et(o,"quoteStyle")&&(H.quoteStyle=o.quoteStyle),t(S,H,n+1,i)}return t(S,o,n+1,i)}if(typeof e=="function"&&!Pi(e)){var A=of(e),y=Rr(e,x);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(y.length>0?" { "+xt.call(y,", ")+" }":"")}if(Mi(e)){var m=Kt?wt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):_0.call(e);return typeof e=="object"&&!Kt?lr(m):m}if(lf(e)){for(var g="<"+Ci.call(String(e.nodeName)),D=e.attributes||[],C=0;C<D.length;C++)g+=" "+D[C].name+"="+ki(Ys(D[C].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+Ci.call(String(e.nodeName))+">",g}if(T0(e)){if(e.length===0)return"[]";var B=Rr(e,x);return v&&!xf(B)?"["+R0(B,v)+"]":"[ "+xt.call(B,", ")+" ]"}if(Qs(e)){var b=Rr(e,x);return!("cause"in Error.prototype)&&"cause"in e&&!_i.call(e,"cause")?"{ ["+String(e)+"] "+xt.call(Fi.call("[cause]: "+x(e.cause),b),", ")+" }":b.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+xt.call(b,", ")+" }"}if(typeof e=="object"&&a){if(Ri&&typeof e[Ri]=="function"&&S0)return S0(e,{depth:l-n});if(a!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(af(e)){var _=[];return Ei&&Ei.call(e,function(S,N){_.push(x(N,e,!0)+" => "+x(S,e))}),Ni("Map",Sr.call(e),_,v)}if(cf(e)){var T=[];return Bi&&Bi.call(e,function(S){T.push(x(S,e))}),Ni("Set",Tr.call(e),T,v)}if(sf(e))return I0("WeakMap");if(uf(e))return I0("WeakSet");if(ff(e))return I0("WeakRef");if(ef(e))return lr(x(Number(e)));if(rf(e))return lr(x(F0.call(e)));if(tf(e))return lr(zs.call(e));if(Js(e))return lr(x(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof le!="undefined"&&e===le)return"{ [object globalThis] }";if(!Zs(e)&&!Pi(e)){var k=Rr(e,x),q=Si?Si(e)===Object.prototype:e instanceof Object||e.constructor===Object,X=e instanceof Object?"":"null prototype",I=!q&&ur&&Object(e)===e&&ur in e?b0.call(Ct(e),8,-1):X?"Object":"",P=q||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",G=P+(I||X?"["+xt.call(Fi.call([],I||[],X||[]),": ")+"] ":"");return k.length===0?G+"{}":v?G+"{"+R0(k,v)+"}":G+"{ "+xt.call(k,", ")+" }"}return String(e)};function ki(t,e,r){var n=r.quoteStyle||e,i=Oi[n];return i+t+i}function Ys(t){return wt.call(String(t),/"/g,"&quot;")}function Rt(t){return!ur||!(typeof t=="object"&&(ur in t||typeof t[ur]!="undefined"))}function T0(t){return Ct(t)==="[object Array]"&&Rt(t)}function Zs(t){return Ct(t)==="[object Date]"&&Rt(t)}function Pi(t){return Ct(t)==="[object RegExp]"&&Rt(t)}function Qs(t){return Ct(t)==="[object Error]"&&Rt(t)}function Js(t){return Ct(t)==="[object String]"&&Rt(t)}function ef(t){return Ct(t)==="[object Number]"&&Rt(t)}function tf(t){return Ct(t)==="[object Boolean]"&&Rt(t)}function Mi(t){if(Kt)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!_0)return!1;try{return _0.call(t),!0}catch(e){}return!1}function rf(t){if(!t||typeof t!="object"||!F0)return!1;try{return F0.call(t),!0}catch(e){}return!1}var nf=Object.prototype.hasOwnProperty||function(t){return t in this};function Et(t,e){return nf.call(t,e)}function Ct(t){return Ws.call(t)}function of(t){if(t.name)return t.name;var e=Vs.call(Gs.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Li(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function af(t){if(!Sr||!t||typeof t!="object")return!1;try{Sr.call(t);try{Tr.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function sf(t){if(!fr||!t||typeof t!="object")return!1;try{fr.call(t,fr);try{cr.call(t,cr)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function ff(t){if(!wi||!t||typeof t!="object")return!1;try{return wi.call(t),!0}catch(e){}return!1}function cf(t){if(!Tr||!t||typeof t!="object")return!1;try{Tr.call(t);try{Sr.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function uf(t){if(!cr||!t||typeof t!="object")return!1;try{cr.call(t,cr);try{fr.call(t,fr)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function lf(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Ui(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Ui(b0.call(t,0,e.maxStringLength),e)+n}var i=Xs[e.quoteStyle||"single"];i.lastIndex=0;var o=wt.call(wt.call(t,i,"\\$1"),/[\x00-\x1f]/g,hf);return ki(o,"single",e)}function hf(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Ks.call(e.toString(16))}function lr(t){return"Object("+t+")"}function I0(t){return t+" { ? }"}function Ni(t,e,r,n){var i=n?R0(r,n):xt.call(r,", ");return t+" ("+e+") {"+i+"}"}function xf(t){for(var e=0;e<t.length;e++)if(Li(t[e],`
2
- `)>=0)return!1;return!0}function df(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=xt.call(Array(t.indent+1)," ");else return null;return{base:r,prev:xt.call(Array(e+1),r)}}function R0(t,e){if(t.length===0)return"";var r=`
3
- `+e.prev+e.base;return r+xt.call(t,","+r)+`
4
- `+e.prev}function Rr(t,e){var r=T0(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Et(t,i)?e(t[i],t):""}var o=typeof D0=="function"?D0(t):[],a;if(Kt){a={};for(var s=0;s<o.length;s++)a["$"+o[s]]=o[s]}for(var p in t)Et(t,p)&&(r&&String(Number(p))===p&&p<t.length||Kt&&a["$"+p]instanceof Symbol||(bi.call(/[^\w$]/,p)?n.push(e(p,t)+": "+e(t[p],t)):n.push(p+": "+e(t[p],t))));if(typeof D0=="function")for(var f=0;f<o.length;f++)_i.call(t,o[f])&&n.push("["+e(o[f])+"]: "+e(t[o[f]],t));return n}var pf=Ir,vf=Vt,Or=function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},yf=function(t,e){if(t){var r=Or(t,e);return r&&r.value}},mf=function(t,e,r){var n=Or(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},gf=function(t,e){return t?!!Or(t,e):!1},Af=function(t,e){if(t)return Or(t,e,!0)},Ef=function(){var e,r={assert:function(n){if(!r.has(n))throw new vf("Side channel does not contain "+pf(n))},delete:function(n){var i=e&&e.next,o=Af(e,n);return o&&i&&i===o&&(e=void 0),!!o},get:function(n){return yf(e,n)},has:function(n){return gf(e,n)},set:function(n,i){e||(e={next:void 0}),mf(e,n,i)}};return r},Hi=Object,Bf=Error,wf=EvalError,Cf=RangeError,bf=ReferenceError,Ff=SyntaxError,Df=URIError,_f=Math.abs,Sf=Math.floor,Tf=Math.max,If=Math.min,Rf=Math.pow,Of=Math.round,kf=Number.isNaN||function(e){return e!==e},Pf=kf,Mf=function(e){return Pf(e)||e===0?e:e<0?-1:1},Lf=Object.getOwnPropertyDescriptor,kr=Lf;if(kr)try{kr([],"length")}catch(t){kr=null}var qi=kr,Pr=Object.defineProperty||!1;if(Pr)try{Pr({},"a",{value:1})}catch(t){Pr=!1}var Uf=Pr,O0,$i;function Nf(){return $i||($i=1,O0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),O0}var k0,zi;function Hf(){if(zi)return k0;zi=1;var t=typeof Symbol!="undefined"&&Symbol,e=Nf();return k0=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},k0}var P0,Wi;function Gi(){return Wi||(Wi=1,P0=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),P0}var M0,Vi;function Ki(){if(Vi)return M0;Vi=1;var t=Hi;return M0=t.getPrototypeOf||null,M0}var L0,ji;function qf(){if(ji)return L0;ji=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(p,f){for(var l=[],v=0;v<p.length;v+=1)l[v]=p[v];for(var x=0;x<f.length;x+=1)l[x+p.length]=f[x];return l},o=function(p,f){for(var l=[],v=f,x=0;v<p.length;v+=1,x+=1)l[x]=p[v];return l},a=function(s,p){for(var f="",l=0;l<s.length;l+=1)f+=s[l],l+1<s.length&&(f+=p);return f};return L0=function(p){var f=this;if(typeof f!="function"||e.apply(f)!==n)throw new TypeError(t+f);for(var l=o(arguments,1),v,x=function(){if(this instanceof v){var D=f.apply(this,i(l,arguments));return Object(D)===D?D:this}return f.apply(p,i(l,arguments))},A=r(0,f.length-l.length),y=[],m=0;m<A;m++)y[m]="$"+m;if(v=Function("binder","return function ("+a(y,",")+"){ return binder.apply(this,arguments); }")(x),f.prototype){var g=function(){};g.prototype=f.prototype,v.prototype=new g,g.prototype=null}return v},L0}var U0,Xi;function Mr(){if(Xi)return U0;Xi=1;var t=qf();return U0=Function.prototype.bind||t,U0}var N0,Yi;function H0(){return Yi||(Yi=1,N0=Function.prototype.call),N0}var q0,Zi;function Qi(){return Zi||(Zi=1,q0=Function.prototype.apply),q0}var $f=typeof Reflect!="undefined"&&Reflect&&Reflect.apply,zf=Mr(),Wf=Qi(),Gf=H0(),Vf=$f,Kf=Vf||zf.call(Gf,Wf),jf=Mr(),Xf=Vt,Yf=H0(),Zf=Kf,Ji=function(e){if(e.length<1||typeof e[0]!="function")throw new Xf("a function is required");return Zf(jf,Yf,e)},$0,eo;function Qf(){if(eo)return $0;eo=1;var t=Ji,e=qi,r;try{r=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var n=!!r&&e&&e(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return $0=n&&typeof n.get=="function"?t([n.get]):typeof o=="function"?function(s){return o(s==null?s:i(s))}:!1,$0}var z0,to;function Jf(){if(to)return z0;to=1;var t=Gi(),e=Ki(),r=Qf();return z0=t?function(i){return t(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:r?function(i){return r(i)}:null,z0}var W0,ro;function ec(){if(ro)return W0;ro=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Mr();return W0=r.call(t,e),W0}var pe,tc=Hi,rc=Bf,nc=wf,ic=Cf,oc=bf,jt=Ff,Xt=Vt,ac=Df,sc=_f,fc=Sf,cc=Tf,uc=If,lc=Rf,hc=Of,xc=Mf,no=Function,G0=function(t){try{return no('"use strict"; return ('+t+").constructor;")()}catch(e){}},hr=qi,dc=Uf,V0=function(){throw new Xt},pc=hr?function(){try{return arguments.callee,V0}catch(t){try{return hr(arguments,"callee").get}catch(e){return V0}}}():V0,Yt=Hf()(),Ne=Jf(),vc=Ki(),yc=Gi(),io=Qi(),xr=H0(),Zt={},mc=typeof Uint8Array=="undefined"||!Ne?pe:Ne(Uint8Array),Ot={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":Yt&&Ne?Ne([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Zt,"%AsyncGenerator%":Zt,"%AsyncGeneratorFunction%":Zt,"%AsyncIteratorPrototype%":Zt,"%Atomics%":typeof Atomics=="undefined"?pe:Atomics,"%BigInt%":typeof BigInt=="undefined"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rc,"%eval%":eval,"%EvalError%":nc,"%Float16Array%":typeof Float16Array=="undefined"?pe:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?pe:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?pe:FinalizationRegistry,"%Function%":no,"%GeneratorFunction%":Zt,"%Int8Array%":typeof Int8Array=="undefined"?pe:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?pe:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Yt&&Ne?Ne(Ne([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map=="undefined"?pe:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Yt||!Ne?pe:Ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":tc,"%Object.getOwnPropertyDescriptor%":hr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?pe:Promise,"%Proxy%":typeof Proxy=="undefined"?pe:Proxy,"%RangeError%":ic,"%ReferenceError%":oc,"%Reflect%":typeof Reflect=="undefined"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?pe:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Yt||!Ne?pe:Ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Yt&&Ne?Ne(""[Symbol.iterator]()):pe,"%Symbol%":Yt?Symbol:pe,"%SyntaxError%":jt,"%ThrowTypeError%":pc,"%TypedArray%":mc,"%TypeError%":Xt,"%Uint8Array%":typeof Uint8Array=="undefined"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?pe:Uint32Array,"%URIError%":ac,"%WeakMap%":typeof WeakMap=="undefined"?pe:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?pe:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?pe:WeakSet,"%Function.prototype.call%":xr,"%Function.prototype.apply%":io,"%Object.defineProperty%":dc,"%Object.getPrototypeOf%":vc,"%Math.abs%":sc,"%Math.floor%":fc,"%Math.max%":cc,"%Math.min%":uc,"%Math.pow%":lc,"%Math.round%":hc,"%Math.sign%":xc,"%Reflect.getPrototypeOf%":yc};if(Ne)try{null.error}catch(t){var gc=Ne(Ne(t));Ot["%Error.prototype%"]=gc}var Ac=function t(e){var r;if(e==="%AsyncFunction%")r=G0("async function () {}");else if(e==="%GeneratorFunction%")r=G0("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=G0("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ne&&(r=Ne(i.prototype))}return Ot[e]=r,r},oo={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},dr=Mr(),Lr=ec(),Ec=dr.call(xr,Array.prototype.concat),Bc=dr.call(io,Array.prototype.splice),ao=dr.call(xr,String.prototype.replace),Ur=dr.call(xr,String.prototype.slice),wc=dr.call(xr,RegExp.prototype.exec),Cc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,bc=/\\(\\)?/g,Fc=function(e){var r=Ur(e,0,1),n=Ur(e,-1);if(r==="%"&&n!=="%")throw new jt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new jt("invalid intrinsic syntax, expected opening `%`");var i=[];return ao(e,Cc,function(o,a,s,p){i[i.length]=s?ao(p,bc,"$1"):a||o}),i},Dc=function(e,r){var n=e,i;if(Lr(oo,n)&&(i=oo[n],n="%"+i[0]+"%"),Lr(Ot,n)){var o=Ot[n];if(o===Zt&&(o=Ac(n)),typeof o=="undefined"&&!r)throw new Xt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new jt("intrinsic "+e+" does not exist!")},K0=function(e,r){if(typeof e!="string"||e.length===0)throw new Xt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Xt('"allowMissing" argument must be a boolean');if(wc(/^%?[^%]*%?$/,e)===null)throw new jt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Fc(e),i=n.length>0?n[0]:"",o=Dc("%"+i+"%",r),a=o.name,s=o.value,p=!1,f=o.alias;f&&(i=f[0],Bc(n,Ec([0,1],f)));for(var l=1,v=!0;l<n.length;l+=1){var x=n[l],A=Ur(x,0,1),y=Ur(x,-1);if((A==='"'||A==="'"||A==="`"||y==='"'||y==="'"||y==="`")&&A!==y)throw new jt("property names with quotes must have matching quotes");if((x==="constructor"||!v)&&(p=!0),i+="."+x,a="%"+i+"%",Lr(Ot,a))s=Ot[a];else if(s!=null){if(!(x in s)){if(!r)throw new Xt("base intrinsic for "+e+" exists, but the property is not available.");return}if(hr&&l+1>=n.length){var m=hr(s,x);v=!!m,v&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[x]}else v=Lr(s,x),s=s[x];v&&!p&&(Ot[a]=s)}}return s},so=K0,fo=Ji,_c=fo([so("%String.prototype.indexOf%")]),co=function(e,r){var n=so(e,!!r);return typeof n=="function"&&_c(e,".prototype.")>-1?fo([n]):n},Sc=K0,pr=co,Tc=Ir,Ic=Vt,uo=Sc("%Map%",!0),Rc=pr("Map.prototype.get",!0),Oc=pr("Map.prototype.set",!0),kc=pr("Map.prototype.has",!0),Pc=pr("Map.prototype.delete",!0),Mc=pr("Map.prototype.size",!0),lo=!!uo&&function(){var e,r={assert:function(n){if(!r.has(n))throw new Ic("Side channel does not contain "+Tc(n))},delete:function(n){if(e){var i=Pc(e,n);return Mc(e)===0&&(e=void 0),i}return!1},get:function(n){if(e)return Rc(e,n)},has:function(n){return e?kc(e,n):!1},set:function(n,i){e||(e=new uo),Oc(e,n,i)}};return r},Lc=K0,Nr=co,Uc=Ir,Hr=lo,Nc=Vt,Qt=Lc("%WeakMap%",!0),Hc=Nr("WeakMap.prototype.get",!0),qc=Nr("WeakMap.prototype.set",!0),$c=Nr("WeakMap.prototype.has",!0),zc=Nr("WeakMap.prototype.delete",!0),Wc=Qt?function(){var e,r,n={assert:function(i){if(!n.has(i))throw new Nc("Side channel does not contain "+Uc(i))},delete:function(i){if(Qt&&i&&(typeof i=="object"||typeof i=="function")){if(e)return zc(e,i)}else if(Hr&&r)return r.delete(i);return!1},get:function(i){return Qt&&i&&(typeof i=="object"||typeof i=="function")&&e?Hc(e,i):r&&r.get(i)},has:function(i){return Qt&&i&&(typeof i=="object"||typeof i=="function")&&e?$c(e,i):!!r&&r.has(i)},set:function(i,o){Qt&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Qt),qc(e,i,o)):Hr&&(r||(r=Hr()),r.set(i,o))}};return n}:Hr,Gc=Vt,Vc=Ir,Kc=Ef,jc=lo,Xc=Wc,Yc=Xc||jc||Kc,Zc=function(){var e,r={assert:function(n){if(!r.has(n))throw new Gc("Side channel does not contain "+Vc(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,i){e||(e=Yc()),e.set(n,i)}};return r},Qc=String.prototype.replace,Jc=/%20/g,j0={RFC1738:"RFC1738",RFC3986:"RFC3986"},X0={default:j0.RFC3986,formatters:{RFC1738:function(t){return Qc.call(t,Jc,"+")},RFC3986:function(t){return String(t)}},RFC1738:j0.RFC1738,RFC3986:j0.RFC3986},eu=X0,Y0=Object.prototype.hasOwnProperty,kt=Array.isArray,dt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),tu=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(kt(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]!="undefined"&&i.push(n[o]);r.obj[r.prop]=i}}},ho=function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]!="undefined"&&(n[i]=e[i]);return n},ru=function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(kt(e))e.push(r);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Y0.call(Object.prototype,r))&&(e[r]=!0);else return[e,r];return e}if(!e||typeof e!="object")return[e].concat(r);var i=e;return kt(e)&&!kt(r)&&(i=ho(e,n)),kt(e)&&kt(r)?(r.forEach(function(o,a){if(Y0.call(e,a)){var s=e[a];s&&typeof s=="object"&&o&&typeof o=="object"?e[a]=t(s,o,n):e.push(o)}else e[a]=o}),e):Object.keys(r).reduce(function(o,a){var s=r[a];return Y0.call(o,a)?o[a]=t(o[a],s,n):o[a]=s,o},i)},nu=function(e,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},e)},iu=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(i){return n}},Z0=1024,ou=function(e,r,n,i,o){if(e.length===0)return e;var a=e;if(typeof e=="symbol"?a=Symbol.prototype.toString.call(e):typeof e!="string"&&(a=String(e)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var s="",p=0;p<a.length;p+=Z0){for(var f=a.length>=Z0?a.slice(p,p+Z0):a,l=[],v=0;v<f.length;++v){var x=f.charCodeAt(v);if(x===45||x===46||x===95||x===126||x>=48&&x<=57||x>=65&&x<=90||x>=97&&x<=122||o===eu.RFC1738&&(x===40||x===41)){l[l.length]=f.charAt(v);continue}if(x<128){l[l.length]=dt[x];continue}if(x<2048){l[l.length]=dt[192|x>>6]+dt[128|x&63];continue}if(x<55296||x>=57344){l[l.length]=dt[224|x>>12]+dt[128|x>>6&63]+dt[128|x&63];continue}v+=1,x=65536+((x&1023)<<10|f.charCodeAt(v)&1023),l[l.length]=dt[240|x>>18]+dt[128|x>>12&63]+dt[128|x>>6&63]+dt[128|x&63]}s+=l.join("")}return s},au=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],s=Object.keys(a),p=0;p<s.length;++p){var f=s[p],l=a[f];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(r.push({obj:a,prop:f}),n.push(l))}return tu(r),e},su=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},fu=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},cu=function(e,r){return[].concat(e,r)},uu=function(e,r){if(kt(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(r(e[i]));return n}return r(e)},xo={arrayToObject:ho,assign:nu,combine:cu,compact:au,decode:iu,encode:ou,isBuffer:fu,isRegExp:su,maybeMap:uu,merge:ru},po=Zc,qr=xo,vr=X0,lu=Object.prototype.hasOwnProperty,vo={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},pt=Array.isArray,hu=Array.prototype.push,yo=function(t,e){hu.apply(t,pt(e)?e:[e])},xu=Date.prototype.toISOString,mo=vr.default,Pe={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:qr.encode,encodeValuesOnly:!1,filter:void 0,format:mo,formatter:vr.formatters[mo],indices:!1,serializeDate:function(e){return xu.call(e)},skipNulls:!1,strictNullHandling:!1},du=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Q0={},pu=function t(e,r,n,i,o,a,s,p,f,l,v,x,A,y,m,g,D,C){for(var B=e,b=C,_=0,T=!1;(b=b.get(Q0))!==void 0&&!T;){var k=b.get(e);if(_+=1,typeof k!="undefined"){if(k===_)throw new RangeError("Cyclic object value");T=!0}typeof b.get(Q0)=="undefined"&&(_=0)}if(typeof l=="function"?B=l(r,B):B instanceof Date?B=A(B):n==="comma"&&pt(B)&&(B=qr.maybeMap(B,function(J){return J instanceof Date?A(J):J})),B===null){if(a)return f&&!g?f(r,Pe.encoder,D,"key",y):r;B=""}if(du(B)||qr.isBuffer(B)){if(f){var q=g?r:f(r,Pe.encoder,D,"key",y);return[m(q)+"="+m(f(B,Pe.encoder,D,"value",y))]}return[m(r)+"="+m(String(B))]}var X=[];if(typeof B=="undefined")return X;var I;if(n==="comma"&&pt(B))g&&f&&(B=qr.maybeMap(B,f)),I=[{value:B.length>0?B.join(",")||null:void 0}];else if(pt(l))I=l;else{var P=Object.keys(B);I=v?P.sort(v):P}var G=p?String(r).replace(/\./g,"%2E"):String(r),S=i&&pt(B)&&B.length===1?G+"[]":G;if(o&&pt(B)&&B.length===0)return S+"[]";for(var N=0;N<I.length;++N){var M=I[N],H=typeof M=="object"&&M&&typeof M.value!="undefined"?M.value:B[M];if(!(s&&H===null)){var Y=x&&p?String(M).replace(/\./g,"%2E"):String(M),W=pt(B)?typeof n=="function"?n(S,Y):S:S+(x?"."+Y:"["+Y+"]");C.set(e,_);var ee=po();ee.set(Q0,C),yo(X,t(H,W,n,i,o,a,s,p,n==="comma"&&g&&pt(B)?null:f,l,v,x,A,y,m,g,D,ee))}}return X},vu=function(e){if(!e)return Pe;if(typeof e.allowEmptyArrays!="undefined"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys!="undefined"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder!="undefined"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||Pe.charset;if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=vr.default;if(typeof e.format!="undefined"){if(!lu.call(vr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=vr.formatters[n],o=Pe.filter;(typeof e.filter=="function"||pt(e.filter))&&(o=e.filter);var a;if(e.arrayFormat in vo?a=e.arrayFormat:"indices"in e?a=e.indices?"indices":"repeat":a=Pe.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof e.allowDots=="undefined"?e.encodeDotInKeys===!0?!0:Pe.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Pe.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Pe.allowEmptyArrays,arrayFormat:a,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Pe.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter=="undefined"?Pe.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Pe.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Pe.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Pe.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Pe.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Pe.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Pe.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Pe.strictNullHandling}},yu=function(t,e){var r=t,n=vu(e),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):pt(n.filter)&&(o=n.filter,i=o);var a=[];if(typeof r!="object"||r===null)return"";var s=vo[n.arrayFormat],p=s==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var f=po(),l=0;l<i.length;++l){var v=i[l],x=r[v];n.skipNulls&&x===null||yo(a,pu(x,v,s,p,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,f))}var A=a.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),A.length>0?y+A:""},Pt=xo,J0=Object.prototype.hasOwnProperty,go=Array.isArray,Te={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Pt.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},mu=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},Ao=function(t,e,r){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},gu="utf8=%26%2310003%3B",Au="utf8=%E2%9C%93",Eu=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,r.throwOnLimitExceeded?o+1:o);if(r.throwOnLimitExceeded&&a.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(o===1?"":"s")+" allowed.");var s=-1,p,f=r.charset;if(r.charsetSentinel)for(p=0;p<a.length;++p)a[p].indexOf("utf8=")===0&&(a[p]===Au?f="utf-8":a[p]===gu&&(f="iso-8859-1"),s=p,p=a.length);for(p=0;p<a.length;++p)if(p!==s){var l=a[p],v=l.indexOf("]="),x=v===-1?l.indexOf("="):v+1,A,y;x===-1?(A=r.decoder(l,Te.decoder,f,"key"),y=r.strictNullHandling?null:""):(A=r.decoder(l.slice(0,x),Te.decoder,f,"key"),y=Pt.maybeMap(Ao(l.slice(x+1),r,go(n[A])?n[A].length:0),function(g){return r.decoder(g,Te.decoder,f,"value")})),y&&r.interpretNumericEntities&&f==="iso-8859-1"&&(y=mu(String(y))),l.indexOf("[]=")>-1&&(y=go(y)?[y]:y);var m=J0.call(n,A);m&&r.duplicates==="combine"?n[A]=Pt.combine(n[A],y):(!m||r.duplicates==="last")&&(n[A]=y)}return n},Bu=function(t,e,r,n){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var o=t.slice(0,-1).join("");i=Array.isArray(e)&&e[o]?e[o].length:0}for(var a=n?e:Ao(e,r,i),s=t.length-1;s>=0;--s){var p,f=t[s];if(f==="[]"&&r.parseArrays)p=r.allowEmptyArrays&&(a===""||r.strictNullHandling&&a===null)?[]:Pt.combine([],a);else{p=r.plainObjects?{__proto__:null}:{};var l=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,v=r.decodeDotInKeys?l.replace(/%2E/g,"."):l,x=parseInt(v,10);!r.parseArrays&&v===""?p={0:a}:!isNaN(x)&&f!==v&&String(x)===v&&x>=0&&r.parseArrays&&x<=r.arrayLimit?(p=[],p[x]=a):v!=="__proto__"&&(p[v]=a)}a=p}return a},wu=function(e,r,n,i){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,p=n.depth>0&&a.exec(o),f=p?o.slice(0,p.index):o,l=[];if(f){if(!n.plainObjects&&J0.call(Object.prototype,f)&&!n.allowPrototypes)return;l.push(f)}for(var v=0;n.depth>0&&(p=s.exec(o))!==null&&v<n.depth;){if(v+=1,!n.plainObjects&&J0.call(Object.prototype,p[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(p[1])}if(p){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");l.push("["+o.slice(p.index)+"]")}return Bu(l,r,n,i)}},Cu=function(e){if(!e)return Te;if(typeof e.allowEmptyArrays!="undefined"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys!="undefined"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder!="undefined"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded!="undefined"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset=="undefined"?Te.charset:e.charset,n=typeof e.duplicates=="undefined"?Te.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots=="undefined"?e.decodeDotInKeys===!0?!0:Te.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Te.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Te.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Te.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Te.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Te.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Te.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:Te.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:Te.decoder,delimiter:typeof e.delimiter=="string"||Pt.isRegExp(e.delimiter)?e.delimiter:Te.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Te.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Te.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Te.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Te.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:Te.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Te.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},bu=function(t,e){var r=Cu(e);if(t===""||t===null||typeof t=="undefined")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?Eu(t,r):t,i=r.plainObjects?{__proto__:null}:{},o=Object.keys(n),a=0;a<o.length;++a){var s=o[a],p=wu(s,n[s],r,typeof t=="string");i=Pt.merge(i,p,r)}return r.allowSparse===!0?i:Pt.compact(i)},Fu=yu,Du=bu,_u=X0,Su={formats:_u,parse:Du,stringify:Fu};const Tu=A0(Su);function Eo(t,e){return function(){return t.apply(e,arguments)}}const{toString:Iu}=Object.prototype,{getPrototypeOf:en}=Object,{iterator:$r,toStringTag:Bo}=Symbol,zr=(t=>e=>{const r=Iu.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ft=t=>(t=t.toLowerCase(),e=>zr(e)===t),Wr=t=>e=>typeof e===t,{isArray:Jt}=Array,yr=Wr("undefined");function mr(t){return t!==null&&!yr(t)&&t.constructor!==null&&!yr(t.constructor)&&Je(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const wo=ft("ArrayBuffer");function Ru(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&wo(t.buffer),e}const Ou=Wr("string"),Je=Wr("function"),Co=Wr("number"),gr=t=>t!==null&&typeof t=="object",ku=t=>t===!0||t===!1,Gr=t=>{if(zr(t)!=="object")return!1;const e=en(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Bo in t)&&!($r in t)},Pu=t=>{if(!gr(t)||mr(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch(e){return!1}},Mu=ft("Date"),Lu=ft("File"),Uu=ft("Blob"),Nu=ft("FileList"),Hu=t=>gr(t)&&Je(t.pipe),qu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Je(t.append)&&((e=zr(t))==="formdata"||e==="object"&&Je(t.toString)&&t.toString()==="[object FormData]"))},$u=ft("URLSearchParams"),[zu,Wu,Gu,Vu]=["ReadableStream","Request","Response","Headers"].map(ft),Ku=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ar(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t=="undefined")return;let n,i;if(typeof t!="object"&&(t=[t]),Jt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(mr(t))return;const o=r?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length;let s;for(n=0;n<a;n++)s=o[n],e.call(null,t[s],s,t)}}function bo(t,e){if(mr(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const Mt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Fo=t=>!yr(t)&&t!==Mt;function tn(){const{caseless:t}=Fo(this)&&this||{},e={},r=(n,i)=>{const o=t&&bo(e,i)||i;Gr(e[o])&&Gr(n)?e[o]=tn(e[o],n):Gr(n)?e[o]=tn({},n):Jt(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Ar(arguments[n],r);return e}const ju=(t,e,r,{allOwnKeys:n}={})=>(Ar(e,(i,o)=>{r&&Je(i)?t[o]=Eo(i,r):t[o]=i},{allOwnKeys:n}),t),Xu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yu=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Zu=(t,e,r,n)=>{let i,o,a;const s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!n||n(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=r!==!1&&en(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Qu=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Ju=t=>{if(!t)return null;if(Jt(t))return t;let e=t.length;if(!Co(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},el=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&en(Uint8Array)),tl=(t,e)=>{const n=(t&&t[$r]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},rl=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},nl=ft("HTMLFormElement"),il=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Do=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ol=ft("RegExp"),_o=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ar(r,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(n[o]=a||i)}),Object.defineProperties(t,n)},al=t=>{_o(t,(e,r)=>{if(Je(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(Je(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},sl=(t,e)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return Jt(t)?n(t):n(String(t).split(e)),r},fl=()=>{},cl=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function ul(t){return!!(t&&Je(t.append)&&t[Bo]==="FormData"&&t[$r])}const ll=t=>{const e=new Array(10),r=(n,i)=>{if(gr(n)){if(e.indexOf(n)>=0)return;if(mr(n))return n;if(!("toJSON"in n)){e[i]=n;const o=Jt(n)?[]:{};return Ar(n,(a,s)=>{const p=r(a,i+1);!yr(p)&&(o[s]=p)}),e[i]=void 0,o}}return n};return r(t,0)},hl=ft("AsyncFunction"),xl=t=>t&&(gr(t)||Je(t))&&Je(t.then)&&Je(t.catch),So=((t,e)=>t?setImmediate:e?((r,n)=>(Mt.addEventListener("message",({source:i,data:o})=>{i===Mt&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Mt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Je(Mt.postMessage)),dl=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Mt):typeof process!="undefined"&&process.nextTick||So,$={isArray:Jt,isArrayBuffer:wo,isBuffer:mr,isFormData:qu,isArrayBufferView:Ru,isString:Ou,isNumber:Co,isBoolean:ku,isObject:gr,isPlainObject:Gr,isEmptyObject:Pu,isReadableStream:zu,isRequest:Wu,isResponse:Gu,isHeaders:Vu,isUndefined:yr,isDate:Mu,isFile:Lu,isBlob:Uu,isRegExp:ol,isFunction:Je,isStream:Hu,isURLSearchParams:$u,isTypedArray:el,isFileList:Nu,forEach:Ar,merge:tn,extend:ju,trim:Ku,stripBOM:Xu,inherits:Yu,toFlatObject:Zu,kindOf:zr,kindOfTest:ft,endsWith:Qu,toArray:Ju,forEachEntry:tl,matchAll:rl,isHTMLForm:nl,hasOwnProperty:Do,hasOwnProp:Do,reduceDescriptors:_o,freezeMethods:al,toObjectSet:sl,toCamelCase:il,noop:fl,toFiniteNumber:cl,findKey:bo,global:Mt,isContextDefined:Fo,isSpecCompliantForm:ul,toJSONObject:ll,isAsyncFn:hl,isThenable:xl,setImmediate:So,asap:dl,isIterable:t=>t!=null&&Je(t[$r])};function he(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}$.inherits(he,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}});const To=he.prototype,Io={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Io[t]={value:t}}),Object.defineProperties(he,Io),Object.defineProperty(To,"isAxiosError",{value:!0}),he.from=(t,e,r,n,i,o)=>{const a=Object.create(To);return $.toFlatObject(t,a,function(p){return p!==Error.prototype},s=>s!=="isAxiosError"),he.call(a,t.message,e,r,n,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};const pl=null;function rn(t){return $.isPlainObject(t)||$.isArray(t)}function Ro(t){return $.endsWith(t,"[]")?t.slice(0,-2):t}function Oo(t,e,r){return t?t.concat(e).map(function(i,o){return i=Ro(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function vl(t){return $.isArray(t)&&!t.some(rn)}const yl=$.toFlatObject($,{},null,function(e){return/^is[A-Z]/.test(e)});function Vr(t,e,r){if(!$.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=$.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!$.isUndefined(g[m])});const n=r.metaTokens,i=r.visitor||l,o=r.dots,a=r.indexes,p=(r.Blob||typeof Blob!="undefined"&&Blob)&&$.isSpecCompliantForm(e);if(!$.isFunction(i))throw new TypeError("visitor must be a function");function f(y){if(y===null)return"";if($.isDate(y))return y.toISOString();if($.isBoolean(y))return y.toString();if(!p&&$.isBlob(y))throw new he("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(y)||$.isTypedArray(y)?p&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function l(y,m,g){let D=y;if(y&&!g&&typeof y=="object"){if($.endsWith(m,"{}"))m=n?m:m.slice(0,-2),y=JSON.stringify(y);else if($.isArray(y)&&vl(y)||($.isFileList(y)||$.endsWith(m,"[]"))&&(D=$.toArray(y)))return m=Ro(m),D.forEach(function(B,b){!($.isUndefined(B)||B===null)&&e.append(a===!0?Oo([m],b,o):a===null?m:m+"[]",f(B))}),!1}return rn(y)?!0:(e.append(Oo(g,m,o),f(y)),!1)}const v=[],x=Object.assign(yl,{defaultVisitor:l,convertValue:f,isVisitable:rn});function A(y,m){if(!$.isUndefined(y)){if(v.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));v.push(y),$.forEach(y,function(D,C){(!($.isUndefined(D)||D===null)&&i.call(e,D,$.isString(C)?C.trim():C,m,x))===!0&&A(D,m?m.concat(C):[C])}),v.pop()}}if(!$.isObject(t))throw new TypeError("data must be an object");return A(t),e}function ko(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function nn(t,e){this._pairs=[],t&&Vr(t,this,e)}const Po=nn.prototype;Po.append=function(e,r){this._pairs.push([e,r])},Po.toString=function(e){const r=e?function(n){return e.call(this,n,ko)}:ko;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function ml(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mo(t,e,r){if(!e)return t;const n=r&&r.encode||ml;$.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(e,r):o=$.isURLSearchParams(e)?e.toString():new nn(e,r).toString(n),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Lo{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){$.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Uo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gl={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:nn,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},on=typeof window!="undefined"&&typeof document!="undefined",an=typeof navigator=="object"&&navigator||void 0,Al=on&&(!an||["ReactNative","NativeScript","NS"].indexOf(an.product)<0),El=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bl=on&&window.location.href||"http://localhost",je=te(te({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:on,hasStandardBrowserEnv:Al,hasStandardBrowserWebWorkerEnv:El,navigator:an,origin:Bl},Symbol.toStringTag,{value:"Module"}))),gl);function wl(t,e){return Vr(t,new je.classes.URLSearchParams,te({visitor:function(r,n,i,o){return je.isNode&&$.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function Cl(t){return $.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function bl(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function No(t){function e(r,n,i,o){let a=r[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),p=o>=r.length;return a=!a&&$.isArray(i)?i.length:a,p?($.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!s):((!i[a]||!$.isObject(i[a]))&&(i[a]=[]),e(r,n,i[a],o)&&$.isArray(i[a])&&(i[a]=bl(i[a])),!s)}if($.isFormData(t)&&$.isFunction(t.entries)){const r={};return $.forEachEntry(t,(n,i)=>{e(Cl(n),i,r,0)}),r}return null}function Fl(t,e,r){if($.isString(t))try{return(e||JSON.parse)(t),$.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Er={transitional:Uo,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=$.isObject(e);if(o&&$.isHTMLForm(e)&&(e=new FormData(e)),$.isFormData(e))return i?JSON.stringify(No(e)):e;if($.isArrayBuffer(e)||$.isBuffer(e)||$.isStream(e)||$.isFile(e)||$.isBlob(e)||$.isReadableStream(e))return e;if($.isArrayBufferView(e))return e.buffer;if($.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return wl(e,this.formSerializer).toString();if((s=$.isFileList(e))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Vr(s?{"files[]":e}:e,p&&new p,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),Fl(e)):e}],transformResponse:[function(e){const r=this.transitional||Er.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if($.isResponse(e)||$.isReadableStream(e))return e;if(e&&$.isString(e)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?he.from(s,he.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:je.classes.FormData,Blob:je.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],t=>{Er.headers[t]={}});const Dl=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_l=t=>{const e={};let r,n,i;return t&&t.split(`
5
- `).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||e[r]&&Dl[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Ho=Symbol("internals");function Br(t){return t&&String(t).trim().toLowerCase()}function Kr(t){return t===!1||t==null?t:$.isArray(t)?t.map(Kr):String(t)}function Sl(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Tl=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function sn(t,e,r,n,i){if($.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!$.isString(e)){if($.isString(n))return e.indexOf(n)!==-1;if($.isRegExp(n))return n.test(e)}}function Il(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Rl(t,e){const r=$.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,a){return this[n].call(this,e,i,o,a)},configurable:!0})})}let et=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function o(s,p,f){const l=Br(p);if(!l)throw new Error("header name must be a non-empty string");const v=$.findKey(i,l);(!v||i[v]===void 0||f===!0||f===void 0&&i[v]!==!1)&&(i[v||p]=Kr(s))}const a=(s,p)=>$.forEach(s,(f,l)=>o(f,l,p));if($.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if($.isString(e)&&(e=e.trim())&&!Tl(e))a(_l(e),r);else if($.isObject(e)&&$.isIterable(e)){let s={},p,f;for(const l of e){if(!$.isArray(l))throw TypeError("Object iterator must return a key-value pair");s[f=l[0]]=(p=s[f])?$.isArray(p)?[...p,l[1]]:[p,l[1]]:l[1]}a(s,r)}else e!=null&&o(r,e,n);return this}get(e,r){if(e=Br(e),e){const n=$.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return Sl(i);if($.isFunction(r))return r.call(this,i,n);if($.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Br(e),e){const n=$.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||sn(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function o(a){if(a=Br(a),a){const s=$.findKey(n,a);s&&(!r||sn(n,n[s],s,r))&&(delete n[s],i=!0)}}return $.isArray(e)?e.forEach(o):o(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!e||sn(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const r=this,n={};return $.forEach(this,(i,o)=>{const a=$.findKey(n,o);if(a){r[a]=Kr(i),delete r[o];return}const s=e?Il(o):String(o).trim();s!==o&&delete r[o],r[s]=Kr(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return $.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&$.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
6
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[Ho]=this[Ho]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Br(a);n[s]||(Rl(i,a),n[s]=!0)}return $.isArray(e)?e.forEach(o):o(e),this}};et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(et.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),$.freezeMethods(et);function fn(t,e){const r=this||Er,n=e||r,i=et.from(n.headers);let o=n.data;return $.forEach(t,function(s){o=s.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function qo(t){return!!(t&&t.__CANCEL__)}function er(t,e,r){he.call(this,t==null?"canceled":t,he.ERR_CANCELED,e,r),this.name="CanceledError"}$.inherits(er,he,{__CANCEL__:!0});function $o(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ol(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function kl(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,o=0,a;return e=e!==void 0?e:1e3,function(p){const f=Date.now(),l=n[o];a||(a=f),r[i]=p,n[i]=f;let v=o,x=0;for(;v!==i;)x+=r[v++],v=v%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),f-a<e)return;const A=l&&f-l;return A?Math.round(x*1e3/A):void 0}}function Pl(t,e){let r=0,n=1e3/e,i,o;const a=(f,l=Date.now())=>{r=l,i=null,o&&(clearTimeout(o),o=null),t(...f)};return[(...f)=>{const l=Date.now(),v=l-r;v>=n?a(f,l):(i=f,o||(o=setTimeout(()=>{o=null,a(i)},n-v)))},()=>i&&a(i)]}const jr=(t,e,r=3)=>{let n=0;const i=kl(50,250);return Pl(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,p=a-n,f=i(p),l=a<=s;n=a;const v={loaded:a,total:s,progress:s?a/s:void 0,bytes:p,rate:f||void 0,estimated:f&&s&&l?(s-a)/f:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(v)},r)},zo=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Wo=t=>(...e)=>$.asap(()=>t(...e)),Ml=je.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,je.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(je.origin),je.navigator&&/(msie|trident)/i.test(je.navigator.userAgent)):()=>!0,Ll=je.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const a=[t+"="+encodeURIComponent(e)];$.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),$.isString(n)&&a.push("path="+n),$.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ul(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Nl(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Go(t,e,r){let n=!Ul(e);return t&&(n||r==!1)?Nl(t,e):e}const Vo=t=>t instanceof et?te({},t):t;function Lt(t,e){e=e||{};const r={};function n(f,l,v,x){return $.isPlainObject(f)&&$.isPlainObject(l)?$.merge.call({caseless:x},f,l):$.isPlainObject(l)?$.merge({},l):$.isArray(l)?l.slice():l}function i(f,l,v,x){if($.isUndefined(l)){if(!$.isUndefined(f))return n(void 0,f,v,x)}else return n(f,l,v,x)}function o(f,l){if(!$.isUndefined(l))return n(void 0,l)}function a(f,l){if($.isUndefined(l)){if(!$.isUndefined(f))return n(void 0,f)}else return n(void 0,l)}function s(f,l,v){if(v in e)return n(f,l);if(v in t)return n(void 0,f)}const p={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(f,l,v)=>i(Vo(f),Vo(l),v,!0)};return $.forEach(Object.keys(te(te({},t),e)),function(l){const v=p[l]||i,x=v(t[l],e[l],l);$.isUndefined(x)&&v!==s||(r[l]=x)}),r}const Ko=t=>{const e=Lt({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;e.headers=a=et.from(a),e.url=Mo(Go(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let p;if($.isFormData(r)){if(je.hasStandardBrowserEnv||je.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((p=a.getContentType())!==!1){const[f,...l]=p?p.split(";").map(v=>v.trim()).filter(Boolean):[];a.setContentType([f||"multipart/form-data",...l].join("; "))}}if(je.hasStandardBrowserEnv&&(n&&$.isFunction(n)&&(n=n(e)),n||n!==!1&&Ml(e.url))){const f=i&&o&&Ll.read(o);f&&a.set(i,f)}return e},Hl=typeof XMLHttpRequest!="undefined"&&function(t){return new Promise(function(r,n){const i=Ko(t);let o=i.data;const a=et.from(i.headers).normalize();let{responseType:s,onUploadProgress:p,onDownloadProgress:f}=i,l,v,x,A,y;function m(){A&&A(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function D(){if(!g)return;const B=et.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:B,config:t,request:g};$o(function(k){r(k),m()},function(k){n(k),m()},_),g=null}"onloadend"in g?g.onloadend=D:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(D)},g.onabort=function(){g&&(n(new he("Request aborted",he.ECONNABORTED,t,g)),g=null)},g.onerror=function(){n(new he("Network Error",he.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||Uo;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new he(b,_.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,t,g)),g=null},o===void 0&&a.setContentType(null),"setRequestHeader"in g&&$.forEach(a.toJSON(),function(b,_){g.setRequestHeader(_,b)}),$.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),f&&([x,y]=jr(f,!0),g.addEventListener("progress",x)),p&&g.upload&&([v,A]=jr(p),g.upload.addEventListener("progress",v),g.upload.addEventListener("loadend",A)),(i.cancelToken||i.signal)&&(l=B=>{g&&(n(!B||B.type?new er(null,t,g):B),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const C=Ol(i.url);if(C&&je.protocols.indexOf(C)===-1){n(new he("Unsupported protocol "+C+":",he.ERR_BAD_REQUEST,t));return}g.send(o||null)})},ql=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const o=function(f){if(!i){i=!0,s();const l=f instanceof Error?f:this.reason;n.abort(l instanceof he?l:new er(l instanceof Error?l.message:l))}};let a=e&&setTimeout(()=>{a=null,o(new he(`timeout ${e} of ms exceeded`,he.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),t=null)};t.forEach(f=>f.addEventListener("abort",o));const{signal:p}=n;return p.unsubscribe=()=>$.asap(s),p}},$l=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},zl=function(t,e){return yi(this,null,function*(){try{for(var r=Ls(Wl(t)),n,i,o;n=!(i=yield new Gt(r.next())).done;n=!1){const a=i.value;yield*mi($l(a,e))}}catch(i){o=[i]}finally{try{n&&(i=r.return)&&(yield new Gt(i.call(r)))}finally{if(o)throw o[0]}}})},Wl=function(t){return yi(this,null,function*(){if(t[Symbol.asyncIterator]){yield*mi(t);return}const e=t.getReader();try{for(;;){const{done:r,value:n}=yield new Gt(e.read());if(r)break;yield n}}finally{yield new Gt(e.cancel())}})},jo=(t,e,r,n)=>{const i=zl(t,e);let o=0,a,s=f=>{a||(a=!0,n&&n(f))};return new ReadableStream({pull(f){return Qe(this,null,function*(){try{const{done:l,value:v}=yield i.next();if(l){s(),f.close();return}let x=v.byteLength;if(r){let A=o+=x;r(A)}f.enqueue(new Uint8Array(v))}catch(l){throw s(l),l}})},cancel(f){return s(f),i.return()}},{highWaterMark:2})},Xr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Xo=Xr&&typeof ReadableStream=="function",Gl=Xr&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):t=>Qe(this,null,function*(){return new Uint8Array(yield new Response(t).arrayBuffer())})),Yo=(t,...e)=>{try{return!!t(...e)}catch(r){return!1}},Vl=Xo&&Yo(()=>{let t=!1;const e=new Request(je.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Zo=64*1024,cn=Xo&&Yo(()=>$.isReadableStream(new Response("").body)),Yr={stream:cn&&(t=>t.body)};Xr&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Yr[e]&&(Yr[e]=$.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new he(`Response type '${e}' is not supported`,he.ERR_NOT_SUPPORT,n)})})})(new Response);const Kl=t=>Qe(this,null,function*(){if(t==null)return 0;if($.isBlob(t))return t.size;if($.isSpecCompliantForm(t))return(yield new Request(je.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if($.isArrayBufferView(t)||$.isArrayBuffer(t))return t.byteLength;if($.isURLSearchParams(t)&&(t=t+""),$.isString(t))return(yield Gl(t)).byteLength}),jl=(t,e)=>Qe(this,null,function*(){const r=$.toFiniteNumber(t.getContentLength());return r==null?Kl(e):r}),un={http:pl,xhr:Hl,fetch:Xr&&(t=>Qe(this,null,function*(){let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:p,responseType:f,headers:l,withCredentials:v="same-origin",fetchOptions:x}=Ko(t);f=f?(f+"").toLowerCase():"text";let A=ql([i,o&&o.toAbortSignal()],a),y;const m=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let g;try{if(p&&Vl&&r!=="get"&&r!=="head"&&(g=yield jl(l,n))!==0){let _=new Request(e,{method:"POST",body:n,duplex:"half"}),T;if($.isFormData(n)&&(T=_.headers.get("content-type"))&&l.setContentType(T),_.body){const[k,q]=zo(g,jr(Wo(p)));n=jo(_.body,Zo,k,q)}}$.isString(v)||(v=v?"include":"omit");const D="credentials"in Request.prototype;y=new Request(e,Le(te({},x),{signal:A,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:D?v:void 0}));let C=yield fetch(y,x);const B=cn&&(f==="stream"||f==="response");if(cn&&(s||B&&m)){const _={};["status","statusText","headers"].forEach(X=>{_[X]=C[X]});const T=$.toFiniteNumber(C.headers.get("content-length")),[k,q]=s&&zo(T,jr(Wo(s),!0))||[];C=new Response(jo(C.body,Zo,k,()=>{q&&q(),m&&m()}),_)}f=f||"text";let b=yield Yr[$.findKey(Yr,f)||"text"](C,t);return!B&&m&&m(),yield new Promise((_,T)=>{$o(_,T,{data:b,headers:et.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:y})})}catch(D){throw m&&m(),D&&D.name==="TypeError"&&/Load failed|fetch/i.test(D.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,t,y),{cause:D.cause||D}):he.from(D,D&&D.code,t,y)}}))};$.forEach(un,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(r){}Object.defineProperty(t,"adapterName",{value:e})}});const Qo=t=>`- ${t}`,Xl=t=>$.isFunction(t)||t===null||t===!1,Jo={getAdapter:t=>{t=$.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){r=t[o];let a;if(n=r,!Xl(r)&&(n=un[(a=String(r)).toLowerCase()],n===void 0))throw new he(`Unknown adapter '${a}'`);if(n)break;i[a||"#"+o]=n}if(!n){const o=Object.entries(i).map(([s,p])=>`adapter ${s} `+(p===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since :
7
- `+o.map(Qo).join(`
8
- `):" "+Qo(o[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:un};function ln(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new er(null,t)}function ea(t){return ln(t),t.headers=et.from(t.headers),t.data=fn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jo.getAdapter(t.adapter||Er.adapter)(t).then(function(n){return ln(t),n.data=fn.call(t,t.transformResponse,n),n.headers=et.from(n.headers),n},function(n){return qo(n)||(ln(t),n&&n.response&&(n.response.data=fn.call(t,t.transformResponse,n.response),n.response.headers=et.from(n.response.headers))),Promise.reject(n)})}const ta="1.11.0",Zr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Zr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ra={};Zr.transitional=function(e,r,n){function i(o,a){return"[Axios v"+ta+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,s)=>{if(e===!1)throw new he(i(a," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!ra[a]&&(ra[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,s):!0}},Zr.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Yl(t,e,r){if(typeof t!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],a=e[o];if(a){const s=t[o],p=s===void 0||a(s,o,t);if(p!==!0)throw new he("option "+o+" must be "+p,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const Qr={assertOptions:Yl,validators:Zr},vt=Qr.validators;let Ut=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Lo,response:new Lo}}request(e,r){return Qe(this,null,function*(){try{return yield this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
9
- `+o):n.stack=o}catch(a){}}throw n}})}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Lt(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&Qr.assertOptions(n,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1),i!=null&&($.isFunction(i)?r.paramsSerializer={serialize:i}:Qr.assertOptions(i,{encode:vt.function,serialize:vt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Qr.assertOptions(r,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&$.merge(o.common,o[r.method]);o&&$.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),r.headers=et.concat(a,o);const s=[];let p=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(p=p&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let l,v=0,x;if(!p){const y=[ea.bind(this),void 0];for(y.unshift(...s),y.push(...f),x=y.length,l=Promise.resolve(r);v<x;)l=l.then(y[v++],y[v++]);return l}x=s.length;let A=r;for(v=0;v<x;){const y=s[v++],m=s[v++];try{A=y(A)}catch(g){m.call(this,g);break}}try{l=ea.call(this,A)}catch(y){return Promise.reject(y)}for(v=0,x=f.length;v<x;)l=l.then(f[v++],f[v++]);return l}getUri(e){e=Lt(this.defaults,e);const r=Go(e.baseURL,e.url,e.allowAbsoluteUrls);return Mo(r,e.params,e.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(e){Ut.prototype[e]=function(r,n){return this.request(Lt(n||{},{method:e,url:r,data:(n||{}).data}))}}),$.forEach(["post","put","patch"],function(e){function r(n){return function(o,a,s){return this.request(Lt(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ut.prototype[e]=r(),Ut.prototype[e+"Form"]=r(!0)});let Zl=class Us{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{n.subscribe(s),o=s}).then(i);return a.cancel=function(){n.unsubscribe(o)},a},e(function(o,a,s){n.reason||(n.reason=new er(o,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Us(function(i){e=i}),cancel:e}}};function Ql(t){return function(r){return t.apply(null,r)}}function Jl(t){return $.isObject(t)&&t.isAxiosError===!0}const hn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(hn).forEach(([t,e])=>{hn[e]=t});function na(t){const e=new Ut(t),r=Eo(Ut.prototype.request,e);return $.extend(r,Ut.prototype,e,{allOwnKeys:!0}),$.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return na(Lt(t,i))},r}const Re=na(Er);Re.Axios=Ut,Re.CanceledError=er,Re.CancelToken=Zl,Re.isCancel=qo,Re.VERSION=ta,Re.toFormData=Vr,Re.AxiosError=he,Re.Cancel=Re.CanceledError,Re.all=function(e){return Promise.all(e)},Re.spread=Ql,Re.isAxiosError=Jl,Re.mergeConfig=Lt,Re.AxiosHeaders=et,Re.formToJSON=t=>No($.isHTMLForm(t)?new FormData(t):t),Re.getAdapter=Jo.getAdapter,Re.HttpStatusCode=hn,Re.default=Re;const{Axios:Sx,AxiosError:Tx,CanceledError:Ix,isCancel:Rx,CancelToken:Ox,VERSION:kx,all:Px,Cancel:Mx,isAxiosError:Lx,spread:Ux,toFormData:Nx,AxiosHeaders:Hx,HttpStatusCode:qx,formToJSON:$x,getAdapter:zx,mergeConfig:Wx}=Re,Ce={NORMAL:"NORMAL",TEXT:"TEXT",AUDIO:"AUDIO",MP4:"MP4",CAMERA:"CAMERA",VIDEO_STREAM:"VIDEO_STREAM",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",TABLE:"TABLE",SWITCH:"SWITCH",RADIO:"RADIO",SLIDER:"SLIDER",SELECT:"SELECT",CHECKBOX:"CHECKBOX",TIME:"TIME",BUTTON:"BUTTON",INPUT:"INPUT"},ct={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH"},eh={OFFLINE:0},Jr={Emit:7},th={STOP:2},rh={1:1,2:2,3:3,4:4,5:5},ia={GRAPH:{SOCKET:"GRAPH_SOCKET"}},nh="/",ih=location.protocol==="https:";(As=(gs=window.meta)==null?void 0:gs.app)!=null&&As.server_ip||location.origin;const oh=ih?"wss:":"ws:",ah=location.origin;(Bs=(Es=window==null?void 0:window.meta)==null?void 0:Es.graph)!=null&&Bs.savePath,(Cs=(ws=window==null?void 0:window.meta)==null?void 0:ws.graph)!=null&&Cs.templatePath;const oa=`${oh}//${location.host}/ws`,Oe=Re.create({baseURL:ah,timeout:window.REQUEST_TIMEOUT||3e4,withCredentials:!1,paramsSerializer:t=>Tu.stringify(t)});Oe.interceptors.request.use(t=>(t.headers["x-token"]="ewoglCJhbGcilDogpc3",t),t=>Promise.reject(t)),Oe.interceptors.response.use(t=>{const{data:e}=t;return Promise.resolve(e)},t=>Promise.reject(t));function sh(t,e={},r={}){return new Promise(n=>{Oe.get(t,te({params:e},r)).then(i=>n({res:i,err:null})).catch(i=>n({res:null,err:i}))})}function fh(t,e={},r={}){return new Promise(n=>{Oe.post(t,e,r).then(i=>n({res:i,err:null})).catch(i=>n({res:null,err:i}))})}function ch(t,e={},r={}){return Oe.get(t,te({params:e},r))}function uh(t,e={},r={}){return Oe.post(t,e,r)}function lh(t,e={}){return Oe.get(`/filehandle/${t}`,{params:e})}function hh(t,e={},r={}){return Oe.post(`/filehandle/${t}`,e,r)}function xh(t,e={}){return Oe.get(`/user/${t}`,{params:e})}function dh(t,e={},r={}){return Oe.post(`/user/${t}`,e,r)}function ph(t,e={}){return Oe.get(`${t}`,e.local?{params:e,baseURL:nh}:{params:e})}function vh(t,e={}){return Oe.get(`/media/${t}/`,{params:e})}function yh(t,e={},r={}){return Oe.post(`/media/${t}/`,e,r)}function mh(t,e={}){return Oe.get(`/common/${t}/`,{params:e})}function gh(t,e={},r={}){return Oe.post(`/common/${t}/`,e,r)}function Ah(t,e={}){return Oe.get(`/history/${t}`,{params:e})}function Eh(t,e={},r={}){return Oe.post(`/history/${t}`,e,r)}function Bh(t,e={}){return Oe.get(`/common/factory/${t}`,{params:e})}function wh(t,e={},r={}){return Oe.post(`/common/factory/${t}`,e,r)}function Ch(t,e={}){return Oe.get(`/factory/${t}`,{params:e})}function bh(t,e={},r={}){return Oe.post(`/factory/${t}`,e,r)}const xn={getApi:sh,postApi:fh,getFileApi:lh,postFileApi:hh,getBaseApi:ch,postBaseApi:uh,getUserApi:xh,postUserApi:dh,getGraphApi:ph,getMediaApi:vh,postMediaApi:yh,getCommonApi:mh,postCommonApi:gh,getHistoryApi:Ah,postHistoryApi:Eh,getFactoryApi:Ch,postFactoryApi:bh,getCommonFactoryApi:Bh,postCommonFactoryApi:wh};function Fh(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}const dn=Fh();function aa(t){return Object.prototype.toString.call(t).slice(8,-1)}var Dh={exports:{}};function _h(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pn={exports:{}},sa;function ve(){return sa||(sa=1,function(t,e){(function(r,n){t.exports=n()})(le,function(){var r=r||function(n,i){var o;if(typeof window!="undefined"&&window.crypto&&(o=window.crypto),typeof self!="undefined"&&self.crypto&&(o=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window!="undefined"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof le!="undefined"&&le.crypto&&(o=le.crypto),!o&&typeof _h=="function")try{o=Ai}catch(C){}var a=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch(C){}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch(C){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function C(){}return function(B){var b;return C.prototype=B,b=new C,C.prototype=null,b}}(),p={},f=p.lib={},l=f.Base=function(){return{extend:function(C){var B=s(this);return C&&B.mixIn(C),(!B.hasOwnProperty("init")||this.init===B.init)&&(B.init=function(){B.$super.init.apply(this,arguments)}),B.init.prototype=B,B.$super=this,B},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var B in C)C.hasOwnProperty(B)&&(this[B]=C[B]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),v=f.WordArray=l.extend({init:function(C,B){C=this.words=C||[],B!=i?this.sigBytes=B:this.sigBytes=C.length*4},toString:function(C){return(C||A).stringify(this)},concat:function(C){var B=this.words,b=C.words,_=this.sigBytes,T=C.sigBytes;if(this.clamp(),_%4)for(var k=0;k<T;k++){var q=b[k>>>2]>>>24-k%4*8&255;B[_+k>>>2]|=q<<24-(_+k)%4*8}else for(var X=0;X<T;X+=4)B[_+X>>>2]=b[X>>>2];return this.sigBytes+=T,this},clamp:function(){var C=this.words,B=this.sigBytes;C[B>>>2]&=4294967295<<32-B%4*8,C.length=n.ceil(B/4)},clone:function(){var C=l.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var B=[],b=0;b<C;b+=4)B.push(a());return new v.init(B,C)}}),x=p.enc={},A=x.Hex={stringify:function(C){for(var B=C.words,b=C.sigBytes,_=[],T=0;T<b;T++){var k=B[T>>>2]>>>24-T%4*8&255;_.push((k>>>4).toString(16)),_.push((k&15).toString(16))}return _.join("")},parse:function(C){for(var B=C.length,b=[],_=0;_<B;_+=2)b[_>>>3]|=parseInt(C.substr(_,2),16)<<24-_%8*4;return new v.init(b,B/2)}},y=x.Latin1={stringify:function(C){for(var B=C.words,b=C.sigBytes,_=[],T=0;T<b;T++){var k=B[T>>>2]>>>24-T%4*8&255;_.push(String.fromCharCode(k))}return _.join("")},parse:function(C){for(var B=C.length,b=[],_=0;_<B;_++)b[_>>>2]|=(C.charCodeAt(_)&255)<<24-_%4*8;return new v.init(b,B)}},m=x.Utf8={stringify:function(C){try{return decodeURIComponent(escape(y.stringify(C)))}catch(B){throw new Error("Malformed UTF-8 data")}},parse:function(C){return y.parse(unescape(encodeURIComponent(C)))}},g=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new v.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=m.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var B,b=this._data,_=b.words,T=b.sigBytes,k=this.blockSize,q=k*4,X=T/q;C?X=n.ceil(X):X=n.max((X|0)-this._minBufferSize,0);var I=X*k,P=n.min(I*4,T);if(I){for(var G=0;G<I;G+=k)this._doProcessBlock(_,G);B=_.splice(0,I),b.sigBytes-=P}return new v.init(B,P)},clone:function(){var C=l.clone.call(this);return C._data=this._data.clone(),C},_minBufferSize:0});f.Hasher=g.extend({cfg:l.extend(),init:function(C){this.cfg=this.cfg.extend(C),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(C){return this._append(C),this._process(),this},finalize:function(C){C&&this._append(C);var B=this._doFinalize();return B},blockSize:16,_createHelper:function(C){return function(B,b){return new C.init(b).finalize(B)}},_createHmacHelper:function(C){return function(B,b){return new D.HMAC.init(C,b).finalize(B)}}});var D=p.algo={};return p}(Math);return r})}(pn)),pn.exports}var vn={exports:{}},fa;function e0(){return fa||(fa=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(n){var i=r,o=i.lib,a=o.Base,s=o.WordArray,p=i.x64={};p.Word=a.extend({init:function(f,l){this.high=f,this.low=l}}),p.WordArray=a.extend({init:function(f,l){f=this.words=f||[],l!=n?this.sigBytes=l:this.sigBytes=f.length*8},toX32:function(){for(var f=this.words,l=f.length,v=[],x=0;x<l;x++){var A=f[x];v.push(A.high),v.push(A.low)}return s.create(v,this.sigBytes)},clone:function(){for(var f=a.clone.call(this),l=f.words=this.words.slice(0),v=l.length,x=0;x<v;x++)l[x]=l[x].clone();return f}})}(),r})}(vn)),vn.exports}var yn={exports:{}},ca;function Sh(){return ca||(ca=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(){if(typeof ArrayBuffer=="function"){var n=r,i=n.lib,o=i.WordArray,a=o.init,s=o.init=function(p){if(p instanceof ArrayBuffer&&(p=new Uint8Array(p)),(p instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&p instanceof Uint8ClampedArray||p instanceof Int16Array||p instanceof Uint16Array||p instanceof Int32Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array)&&(p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength)),p instanceof Uint8Array){for(var f=p.byteLength,l=[],v=0;v<f;v++)l[v>>>2]|=p[v]<<24-v%4*8;a.call(this,l,f)}else a.apply(this,arguments)};s.prototype=o}}(),r.lib.WordArray})}(yn)),yn.exports}var mn={exports:{}},ua;function Th(){return ua||(ua=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(){var n=r,i=n.lib,o=i.WordArray,a=n.enc;a.Utf16=a.Utf16BE={stringify:function(p){for(var f=p.words,l=p.sigBytes,v=[],x=0;x<l;x+=2){var A=f[x>>>2]>>>16-x%4*8&65535;v.push(String.fromCharCode(A))}return v.join("")},parse:function(p){for(var f=p.length,l=[],v=0;v<f;v++)l[v>>>1]|=p.charCodeAt(v)<<16-v%2*16;return o.create(l,f*2)}},a.Utf16LE={stringify:function(p){for(var f=p.words,l=p.sigBytes,v=[],x=0;x<l;x+=2){var A=s(f[x>>>2]>>>16-x%4*8&65535);v.push(String.fromCharCode(A))}return v.join("")},parse:function(p){for(var f=p.length,l=[],v=0;v<f;v++)l[v>>>1]|=s(p.charCodeAt(v)<<16-v%2*16);return o.create(l,f*2)}};function s(p){return p<<8&4278255360|p>>>8&16711935}}(),r.enc.Utf16})}(mn)),mn.exports}var gn={exports:{}},la;function Nt(){return la||(la=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(){var n=r,i=n.lib,o=i.WordArray,a=n.enc;a.Base64={stringify:function(p){var f=p.words,l=p.sigBytes,v=this._map;p.clamp();for(var x=[],A=0;A<l;A+=3)for(var y=f[A>>>2]>>>24-A%4*8&255,m=f[A+1>>>2]>>>24-(A+1)%4*8&255,g=f[A+2>>>2]>>>24-(A+2)%4*8&255,D=y<<16|m<<8|g,C=0;C<4&&A+C*.75<l;C++)x.push(v.charAt(D>>>6*(3-C)&63));var B=v.charAt(64);if(B)for(;x.length%4;)x.push(B);return x.join("")},parse:function(p){var f=p.length,l=this._map,v=this._reverseMap;if(!v){v=this._reverseMap=[];for(var x=0;x<l.length;x++)v[l.charCodeAt(x)]=x}var A=l.charAt(64);if(A){var y=p.indexOf(A);y!==-1&&(f=y)}return s(p,f,v)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function s(p,f,l){for(var v=[],x=0,A=0;A<f;A++)if(A%4){var y=l[p.charCodeAt(A-1)]<<A%4*2,m=l[p.charCodeAt(A)]>>>6-A%4*2,g=y|m;v[x>>>2]|=g<<24-x%4*8,x++}return o.create(v,x)}}(),r.enc.Base64})}(gn)),gn.exports}var An={exports:{}},ha;function Ih(){return ha||(ha=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(){var n=r,i=n.lib,o=i.WordArray,a=n.enc;a.Base64url={stringify:function(p,f){f===void 0&&(f=!0);var l=p.words,v=p.sigBytes,x=f?this._safe_map:this._map;p.clamp();for(var A=[],y=0;y<v;y+=3)for(var m=l[y>>>2]>>>24-y%4*8&255,g=l[y+1>>>2]>>>24-(y+1)%4*8&255,D=l[y+2>>>2]>>>24-(y+2)%4*8&255,C=m<<16|g<<8|D,B=0;B<4&&y+B*.75<v;B++)A.push(x.charAt(C>>>6*(3-B)&63));var b=x.charAt(64);if(b)for(;A.length%4;)A.push(b);return A.join("")},parse:function(p,f){f===void 0&&(f=!0);var l=p.length,v=f?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var A=0;A<v.length;A++)x[v.charCodeAt(A)]=A}var y=v.charAt(64);if(y){var m=p.indexOf(y);m!==-1&&(l=m)}return s(p,l,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function s(p,f,l){for(var v=[],x=0,A=0;A<f;A++)if(A%4){var y=l[p.charCodeAt(A-1)]<<A%4*2,m=l[p.charCodeAt(A)]>>>6-A%4*2,g=y|m;v[x>>>2]|=g<<24-x%4*8,x++}return o.create(v,x)}}(),r.enc.Base64url})}(An)),An.exports}var En={exports:{}},xa;function Ht(){return xa||(xa=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(n){var i=r,o=i.lib,a=o.WordArray,s=o.Hasher,p=i.algo,f=[];(function(){for(var m=0;m<64;m++)f[m]=n.abs(n.sin(m+1))*4294967296|0})();var l=p.MD5=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,g){for(var D=0;D<16;D++){var C=g+D,B=m[C];m[C]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}var b=this._hash.words,_=m[g+0],T=m[g+1],k=m[g+2],q=m[g+3],X=m[g+4],I=m[g+5],P=m[g+6],G=m[g+7],S=m[g+8],N=m[g+9],M=m[g+10],H=m[g+11],Y=m[g+12],W=m[g+13],ee=m[g+14],J=m[g+15],O=b[0],U=b[1],V=b[2],z=b[3];O=v(O,U,V,z,_,7,f[0]),z=v(z,O,U,V,T,12,f[1]),V=v(V,z,O,U,k,17,f[2]),U=v(U,V,z,O,q,22,f[3]),O=v(O,U,V,z,X,7,f[4]),z=v(z,O,U,V,I,12,f[5]),V=v(V,z,O,U,P,17,f[6]),U=v(U,V,z,O,G,22,f[7]),O=v(O,U,V,z,S,7,f[8]),z=v(z,O,U,V,N,12,f[9]),V=v(V,z,O,U,M,17,f[10]),U=v(U,V,z,O,H,22,f[11]),O=v(O,U,V,z,Y,7,f[12]),z=v(z,O,U,V,W,12,f[13]),V=v(V,z,O,U,ee,17,f[14]),U=v(U,V,z,O,J,22,f[15]),O=x(O,U,V,z,T,5,f[16]),z=x(z,O,U,V,P,9,f[17]),V=x(V,z,O,U,H,14,f[18]),U=x(U,V,z,O,_,20,f[19]),O=x(O,U,V,z,I,5,f[20]),z=x(z,O,U,V,M,9,f[21]),V=x(V,z,O,U,J,14,f[22]),U=x(U,V,z,O,X,20,f[23]),O=x(O,U,V,z,N,5,f[24]),z=x(z,O,U,V,ee,9,f[25]),V=x(V,z,O,U,q,14,f[26]),U=x(U,V,z,O,S,20,f[27]),O=x(O,U,V,z,W,5,f[28]),z=x(z,O,U,V,k,9,f[29]),V=x(V,z,O,U,G,14,f[30]),U=x(U,V,z,O,Y,20,f[31]),O=A(O,U,V,z,I,4,f[32]),z=A(z,O,U,V,S,11,f[33]),V=A(V,z,O,U,H,16,f[34]),U=A(U,V,z,O,ee,23,f[35]),O=A(O,U,V,z,T,4,f[36]),z=A(z,O,U,V,X,11,f[37]),V=A(V,z,O,U,G,16,f[38]),U=A(U,V,z,O,M,23,f[39]),O=A(O,U,V,z,W,4,f[40]),z=A(z,O,U,V,_,11,f[41]),V=A(V,z,O,U,q,16,f[42]),U=A(U,V,z,O,P,23,f[43]),O=A(O,U,V,z,N,4,f[44]),z=A(z,O,U,V,Y,11,f[45]),V=A(V,z,O,U,J,16,f[46]),U=A(U,V,z,O,k,23,f[47]),O=y(O,U,V,z,_,6,f[48]),z=y(z,O,U,V,G,10,f[49]),V=y(V,z,O,U,ee,15,f[50]),U=y(U,V,z,O,I,21,f[51]),O=y(O,U,V,z,Y,6,f[52]),z=y(z,O,U,V,q,10,f[53]),V=y(V,z,O,U,M,15,f[54]),U=y(U,V,z,O,T,21,f[55]),O=y(O,U,V,z,S,6,f[56]),z=y(z,O,U,V,J,10,f[57]),V=y(V,z,O,U,P,15,f[58]),U=y(U,V,z,O,W,21,f[59]),O=y(O,U,V,z,X,6,f[60]),z=y(z,O,U,V,H,10,f[61]),V=y(V,z,O,U,k,15,f[62]),U=y(U,V,z,O,N,21,f[63]),b[0]=b[0]+O|0,b[1]=b[1]+U|0,b[2]=b[2]+V|0,b[3]=b[3]+z|0},_doFinalize:function(){var m=this._data,g=m.words,D=this._nDataBytes*8,C=m.sigBytes*8;g[C>>>5]|=128<<24-C%32;var B=n.floor(D/4294967296),b=D;g[(C+64>>>9<<4)+15]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,g[(C+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,m.sigBytes=(g.length+1)*4,this._process();for(var _=this._hash,T=_.words,k=0;k<4;k++){var q=T[k];T[k]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}return _},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function v(m,g,D,C,B,b,_){var T=m+(g&D|~g&C)+B+_;return(T<<b|T>>>32-b)+g}function x(m,g,D,C,B,b,_){var T=m+(g&C|D&~C)+B+_;return(T<<b|T>>>32-b)+g}function A(m,g,D,C,B,b,_){var T=m+(g^D^C)+B+_;return(T<<b|T>>>32-b)+g}function y(m,g,D,C,B,b,_){var T=m+(D^(g|~C))+B+_;return(T<<b|T>>>32-b)+g}i.MD5=s._createHelper(l),i.HmacMD5=s._createHmacHelper(l)}(Math),r.MD5})}(En)),En.exports}var Bn={exports:{}},da;function pa(){return da||(da=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(){var n=r,i=n.lib,o=i.WordArray,a=i.Hasher,s=n.algo,p=[],f=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,v){for(var x=this._hash.words,A=x[0],y=x[1],m=x[2],g=x[3],D=x[4],C=0;C<80;C++){if(C<16)p[C]=l[v+C]|0;else{var B=p[C-3]^p[C-8]^p[C-14]^p[C-16];p[C]=B<<1|B>>>31}var b=(A<<5|A>>>27)+D+p[C];C<20?b+=(y&m|~y&g)+1518500249:C<40?b+=(y^m^g)+1859775393:C<60?b+=(y&m|y&g|m&g)-1894007588:b+=(y^m^g)-899497514,D=g,g=m,m=y<<30|y>>>2,y=A,A=b}x[0]=x[0]+A|0,x[1]=x[1]+y|0,x[2]=x[2]+m|0,x[3]=x[3]+g|0,x[4]=x[4]+D|0},_doFinalize:function(){var l=this._data,v=l.words,x=this._nDataBytes*8,A=l.sigBytes*8;return v[A>>>5]|=128<<24-A%32,v[(A+64>>>9<<4)+14]=Math.floor(x/4294967296),v[(A+64>>>9<<4)+15]=x,l.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var l=a.clone.call(this);return l._hash=this._hash.clone(),l}});n.SHA1=a._createHelper(f),n.HmacSHA1=a._createHmacHelper(f)}(),r.SHA1})}(Bn)),Bn.exports}var wn={exports:{}},va;function Cn(){return va||(va=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){return function(n){var i=r,o=i.lib,a=o.WordArray,s=o.Hasher,p=i.algo,f=[],l=[];(function(){function A(D){for(var C=n.sqrt(D),B=2;B<=C;B++)if(!(D%B))return!1;return!0}function y(D){return(D-(D|0))*4294967296|0}for(var m=2,g=0;g<64;)A(m)&&(g<8&&(f[g]=y(n.pow(m,1/2))),l[g]=y(n.pow(m,1/3)),g++),m++})();var v=[],x=p.SHA256=s.extend({_doReset:function(){this._hash=new a.init(f.slice(0))},_doProcessBlock:function(A,y){for(var m=this._hash.words,g=m[0],D=m[1],C=m[2],B=m[3],b=m[4],_=m[5],T=m[6],k=m[7],q=0;q<64;q++){if(q<16)v[q]=A[y+q]|0;else{var X=v[q-15],I=(X<<25|X>>>7)^(X<<14|X>>>18)^X>>>3,P=v[q-2],G=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;v[q]=I+v[q-7]+G+v[q-16]}var S=b&_^~b&T,N=g&D^g&C^D&C,M=(g<<30|g>>>2)^(g<<19|g>>>13)^(g<<10|g>>>22),H=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),Y=k+H+S+l[q]+v[q],W=M+N;k=T,T=_,_=b,b=B+Y|0,B=C,C=D,D=g,g=Y+W|0}m[0]=m[0]+g|0,m[1]=m[1]+D|0,m[2]=m[2]+C|0,m[3]=m[3]+B|0,m[4]=m[4]+b|0,m[5]=m[5]+_|0,m[6]=m[6]+T|0,m[7]=m[7]+k|0},_doFinalize:function(){var A=this._data,y=A.words,m=this._nDataBytes*8,g=A.sigBytes*8;return y[g>>>5]|=128<<24-g%32,y[(g+64>>>9<<4)+14]=n.floor(m/4294967296),y[(g+64>>>9<<4)+15]=m,A.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var A=s.clone.call(this);return A._hash=this._hash.clone(),A}});i.SHA256=s._createHelper(x),i.HmacSHA256=s._createHmacHelper(x)}(Math),r.SHA256})}(wn)),wn.exports}var bn={exports:{}},ya;function Rh(){return ya||(ya=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Cn())})(le,function(r){return function(){var n=r,i=n.lib,o=i.WordArray,a=n.algo,s=a.SHA256,p=a.SHA224=s.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=s._doFinalize.call(this);return f.sigBytes-=4,f}});n.SHA224=s._createHelper(p),n.HmacSHA224=s._createHmacHelper(p)}(),r.SHA224})}(bn)),bn.exports}var Fn={exports:{}},ma;function ga(){return ma||(ma=1,function(t,e){(function(r,n,i){t.exports=n(ve(),e0())})(le,function(r){return function(){var n=r,i=n.lib,o=i.Hasher,a=n.x64,s=a.Word,p=a.WordArray,f=n.algo;function l(){return s.create.apply(s,arguments)}var v=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],x=[];(function(){for(var y=0;y<80;y++)x[y]=l()})();var A=f.SHA512=o.extend({_doReset:function(){this._hash=new p.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(y,m){for(var g=this._hash.words,D=g[0],C=g[1],B=g[2],b=g[3],_=g[4],T=g[5],k=g[6],q=g[7],X=D.high,I=D.low,P=C.high,G=C.low,S=B.high,N=B.low,M=b.high,H=b.low,Y=_.high,W=_.low,ee=T.high,J=T.low,O=k.high,U=k.low,V=q.high,z=q.low,se=X,ce=I,be=P,fe=G,Se=S,Fe=N,Ke=M,ze=H,Ee=Y,Me=W,Dt=ee,w=J,c=O,u=U,F=V,L=z,K=0;K<80;K++){var Z,ue,ye=x[K];if(K<16)ue=ye.high=y[m+K*2]|0,Z=ye.low=y[m+K*2+1]|0;else{var Be=x[K-15],De=Be.high,Ae=Be.low,_t=(De>>>1|Ae<<31)^(De>>>8|Ae<<24)^De>>>7,qt=(Ae>>>1|De<<31)^(Ae>>>8|De<<24)^(Ae>>>7|De<<25),__$t__=x[K-2],St=__$t__.high,zt=__$t__.low,ri=(St>>>19|zt<<13)^(St<<3|zt>>>29)^St>>>6,ir=(zt>>>19|St<<13)^(zt<<3|St>>>29)^(zt>>>6|St<<26),c0=x[K-7],u0=c0.high,ni=c0.low,Fr=x[K-16],ii=Fr.high,l0=Fr.low;Z=qt+ni,ue=_t+u0+(Z>>>0<qt>>>0?1:0),Z=Z+ir,ue=ue+ri+(Z>>>0<ir>>>0?1:0),Z=Z+l0,ue=ue+ii+(Z>>>0<l0>>>0?1:0),ye.high=ue,ye.low=Z}var oi=Ee&Dt^~Ee&c,h0=Me&w^~Me&u,ai=se&be^se&Se^be&Se,si=ce&fe^ce&Fe^fe&Fe,fi=(se>>>28|ce<<4)^(se<<30|ce>>>2)^(se<<25|ce>>>7),x0=(ce>>>28|se<<4)^(ce<<30|se>>>2)^(ce<<25|se>>>7),ci=(Ee>>>14|Me<<18)^(Ee>>>18|Me<<14)^(Ee<<23|Me>>>9),ui=(Me>>>14|Ee<<18)^(Me>>>18|Ee<<14)^(Me<<23|Ee>>>9),d0=v[K],li=d0.high,p0=d0.low,Ye=L+ui,At=F+ci+(Ye>>>0<L>>>0?1:0),Ye=Ye+h0,At=At+oi+(Ye>>>0<h0>>>0?1:0),Ye=Ye+p0,At=At+li+(Ye>>>0<p0>>>0?1:0),Ye=Ye+Z,At=At+ue+(Ye>>>0<Z>>>0?1:0),v0=x0+si,hi=fi+ai+(v0>>>0<x0>>>0?1:0);F=c,L=u,c=Dt,u=w,Dt=Ee,w=Me,Me=ze+Ye|0,Ee=Ke+At+(Me>>>0<ze>>>0?1:0)|0,Ke=Se,ze=Fe,Se=be,Fe=fe,be=se,fe=ce,ce=Ye+v0|0,se=At+hi+(ce>>>0<Ye>>>0?1:0)|0}I=D.low=I+ce,D.high=X+se+(I>>>0<ce>>>0?1:0),G=C.low=G+fe,C.high=P+be+(G>>>0<fe>>>0?1:0),N=B.low=N+Fe,B.high=S+Se+(N>>>0<Fe>>>0?1:0),H=b.low=H+ze,b.high=M+Ke+(H>>>0<ze>>>0?1:0),W=_.low=W+Me,_.high=Y+Ee+(W>>>0<Me>>>0?1:0),J=T.low=J+w,T.high=ee+Dt+(J>>>0<w>>>0?1:0),U=k.low=U+u,k.high=O+c+(U>>>0<u>>>0?1:0),z=q.low=z+L,q.high=V+F+(z>>>0<L>>>0?1:0)},_doFinalize:function(){var y=this._data,m=y.words,g=this._nDataBytes*8,D=y.sigBytes*8;m[D>>>5]|=128<<24-D%32,m[(D+128>>>10<<5)+30]=Math.floor(g/4294967296),m[(D+128>>>10<<5)+31]=g,y.sigBytes=m.length*4,this._process();var C=this._hash.toX32();return C},clone:function(){var y=o.clone.call(this);return y._hash=this._hash.clone(),y},blockSize:1024/32});n.SHA512=o._createHelper(A),n.HmacSHA512=o._createHmacHelper(A)}(),r.SHA512})}(Fn)),Fn.exports}var Dn={exports:{}},Aa;function Oh(){return Aa||(Aa=1,function(t,e){(function(r,n,i){t.exports=n(ve(),e0(),ga())})(le,function(r){return function(){var n=r,i=n.x64,o=i.Word,a=i.WordArray,s=n.algo,p=s.SHA512,f=s.SHA384=p.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var l=p._doFinalize.call(this);return l.sigBytes-=16,l}});n.SHA384=p._createHelper(f),n.HmacSHA384=p._createHmacHelper(f)}(),r.SHA384})}(Dn)),Dn.exports}var _n={exports:{}},Ea;function kh(){return Ea||(Ea=1,function(t,e){(function(r,n,i){t.exports=n(ve(),e0())})(le,function(r){return function(n){var i=r,o=i.lib,a=o.WordArray,s=o.Hasher,p=i.x64,f=p.Word,l=i.algo,v=[],x=[],A=[];(function(){for(var g=1,D=0,C=0;C<24;C++){v[g+5*D]=(C+1)*(C+2)/2%64;var B=D%5,b=(2*g+3*D)%5;g=B,D=b}for(var g=0;g<5;g++)for(var D=0;D<5;D++)x[g+5*D]=D+(2*g+3*D)%5*5;for(var _=1,T=0;T<24;T++){for(var k=0,q=0,X=0;X<7;X++){if(_&1){var I=(1<<X)-1;I<32?q^=1<<I:k^=1<<I-32}_&128?_=_<<1^113:_<<=1}A[T]=f.create(k,q)}})();var y=[];(function(){for(var g=0;g<25;g++)y[g]=f.create()})();var m=l.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var g=this._state=[],D=0;D<25;D++)g[D]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(g,D){for(var C=this._state,B=this.blockSize/2,b=0;b<B;b++){var _=g[D+2*b],T=g[D+2*b+1];_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var k=C[b];k.high^=T,k.low^=_}for(var q=0;q<24;q++){for(var X=0;X<5;X++){for(var I=0,P=0,G=0;G<5;G++){var k=C[X+5*G];I^=k.high,P^=k.low}var S=y[X];S.high=I,S.low=P}for(var X=0;X<5;X++)for(var N=y[(X+4)%5],M=y[(X+1)%5],H=M.high,Y=M.low,I=N.high^(H<<1|Y>>>31),P=N.low^(Y<<1|H>>>31),G=0;G<5;G++){var k=C[X+5*G];k.high^=I,k.low^=P}for(var W=1;W<25;W++){var I,P,k=C[W],ee=k.high,J=k.low,O=v[W];O<32?(I=ee<<O|J>>>32-O,P=J<<O|ee>>>32-O):(I=J<<O-32|ee>>>64-O,P=ee<<O-32|J>>>64-O);var U=y[x[W]];U.high=I,U.low=P}var V=y[0],z=C[0];V.high=z.high,V.low=z.low;for(var X=0;X<5;X++)for(var G=0;G<5;G++){var W=X+5*G,k=C[W],se=y[W],ce=y[(X+1)%5+5*G],be=y[(X+2)%5+5*G];k.high=se.high^~ce.high&be.high,k.low=se.low^~ce.low&be.low}var k=C[0],fe=A[q];k.high^=fe.high,k.low^=fe.low}},_doFinalize:function(){var g=this._data,D=g.words;this._nDataBytes*8;var C=g.sigBytes*8,B=this.blockSize*32;D[C>>>5]|=1<<24-C%32,D[(n.ceil((C+1)/B)*B>>>5)-1]|=128,g.sigBytes=D.length*4,this._process();for(var b=this._state,_=this.cfg.outputLength/8,T=_/8,k=[],q=0;q<T;q++){var X=b[q],I=X.high,P=X.low;I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,k.push(P),k.push(I)}return new a.init(k,_)},clone:function(){for(var g=s.clone.call(this),D=g._state=this._state.slice(0),C=0;C<25;C++)D[C]=D[C].clone();return g}});i.SHA3=s._createHelper(m),i.HmacSHA3=s._createHmacHelper(m)}(Math),r.SHA3})}(_n)),_n.exports}var Sn={exports:{}},Ba;function Ph(){return Ba||(Ba=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){/** @preserve
1
+ (function(ge,pe){typeof exports=="object"&&typeof module!="undefined"?pe(exports,require("vue"),require("element-plus"),require("@meta2d/utils"),require("@meta2d/core"),require("lodash-es"),require("@meta2d/plugin-mind-core"),require("@meta2d/plugin-mind-collapse"),require("@meta2d/form-diagram"),require("@meta2d/class-diagram"),require("@meta2d/le5le-charts"),require("@meta2d/flow-diagram"),require("@meta2d/fta-diagram"),require("@meta2d/sequence-diagram"),require("@meta2d/activity-diagram")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus","@meta2d/utils","@meta2d/core","lodash-es","@meta2d/plugin-mind-core","@meta2d/plugin-mind-collapse","@meta2d/form-diagram","@meta2d/class-diagram","@meta2d/le5le-charts","@meta2d/flow-diagram","@meta2d/fta-diagram","@meta2d/sequence-diagram","@meta2d/activity-diagram"],pe):(ge=typeof globalThis!="undefined"?globalThis:ge||self,pe(ge.SyGraph={},ge.Vue,ge.ElementPlus,ge.Meta2dUtils,ge.Meta2dCore,ge._,ge.Meta2dPluginMindCore,ge.Meta2dPluginMindCollapse,ge.Meta2dFormDiagram,ge.Meta2dClassDiagram,ge.Meta2dLe5leCharts,ge.Meta2dFlowDiagram,ge.Meta2dFtaDiagram,ge.Meta2dSequenceDiagram,ge.Meta2dActivityDiagram))})(this,function(ge,pe,we,Ke,Ae,Oe,ze,Ge,Ne,nt,Ir,ur,cr,lt,To){"use strict";var s1=Object.defineProperty,l1=Object.defineProperties;var u1=Object.getOwnPropertyDescriptors;var gl=Object.getOwnPropertySymbols;var c1=Object.prototype.hasOwnProperty,f1=Object.prototype.propertyIsEnumerable;var lr=(ge,pe)=>(pe=Symbol[ge])?pe:Symbol.for("Symbol."+ge),h1=ge=>{throw TypeError(ge)},Et=Math.pow,So=(ge,pe,we)=>pe in ge?s1(ge,pe,{enumerable:!0,configurable:!0,writable:!0,value:we}):ge[pe]=we,he=(ge,pe)=>{for(var we in pe||(pe={}))c1.call(pe,we)&&So(ge,we,pe[we]);if(gl)for(var we of gl(pe))f1.call(pe,we)&&So(ge,we,pe[we]);return ge},De=(ge,pe)=>l1(ge,u1(pe));var It=(ge,pe,we)=>So(ge,typeof pe!="symbol"?pe+"":pe,we);var Qe=(ge,pe,we)=>new Promise((Ke,Ae)=>{var Oe=Ne=>{try{Ge(we.next(Ne))}catch(nt){Ae(nt)}},ze=Ne=>{try{Ge(we.throw(Ne))}catch(nt){Ae(nt)}},Ge=Ne=>Ne.done?Ke(Ne.value):Promise.resolve(Ne.value).then(Oe,ze);Ge((we=we.apply(ge,pe)).next())}),Vt=function(ge,pe){this[0]=ge,this[1]=pe},Bo=(ge,pe,we)=>{var Ke=(ze,Ge,Ne,nt)=>{try{var Ir=we[ze](Ge),ur=(Ge=Ir.value)instanceof Vt,cr=Ir.done;Promise.resolve(ur?Ge[0]:Ge).then(lt=>ur?Ke(ze==="return"?ze:"next",Ge[1]?{done:lt.done,value:lt.value}:lt,Ne,nt):Ne({value:lt,done:cr})).catch(lt=>Ke("throw",lt,Ne,nt))}catch(lt){nt(lt)}},Ae=ze=>Oe[ze]=Ge=>new Promise((Ne,nt)=>Ke(ze,Ge,Ne,nt)),Oe={};return we=we.apply(ge,pe),Oe[lr("asyncIterator")]=()=>Oe,Ae("next"),Ae("throw"),Ae("return"),Oe},ko=ge=>{var pe=ge[lr("asyncIterator")],we=!1,Ke,Ae={};return pe==null?(pe=ge[lr("iterator")](),Ke=Oe=>Ae[Oe]=ze=>pe[Oe](ze)):(pe=pe.call(ge),Ke=Oe=>Ae[Oe]=ze=>{if(we){if(we=!1,Oe==="throw")throw ze;return ze}return we=!0,{done:!1,value:new Vt(new Promise(Ge=>{var Ne=pe[Oe](ze);Ne instanceof Object||h1("Object expected"),Ge(Ne)}),1)}}),Ae[lr("iterator")]=()=>Ae,Ke("next"),"throw"in pe?Ke("throw"):Ae.throw=Oe=>{throw Oe},"return"in pe&&Ke("return"),Ae},bl=(ge,pe,we)=>(pe=ge[lr("asyncIterator")])?pe.call(ge):(ge=ge[lr("iterator")](),pe={},we=(Ke,Ae)=>(Ae=ge[Ke])&&(pe[Ke]=Oe=>new Promise((ze,Ge,Ne)=>(Oe=Ae.call(ge,Oe),Ne=Oe.done,Promise.resolve(Oe.value).then(nt=>ze({value:nt,done:Ne}),Ge)))),we("next"),we("return"),pe);var J0,el,tl,rl,nl,il,ol,al,sl,ll,ul,cl,fl,hl,pl;var Fo=document.createElement("style");Fo.textContent=`.meta2d-editor[data-v-3657c9a7]{position:relative;width:100%;height:100%}.meta2d-editor[data-v-3657c9a7] .meta2d-map{z-index:1999}.meta2d-editor[data-v-3657c9a7] .stage.value-map{position:absolute;top:1.04vw;right:.52vw;z-index:200}.meta2d-editor .toolbox[data-v-3657c9a7]{position:absolute;display:none;width:5.21vw;height:1.56vw;background:red;z-index:1999}.preview-container[data-v-ca3fd052]{position:relative;width:100%;height:100%}.preview-container .back-btn[data-v-ca3fd052]{position:absolute;bottom:.52vw;right:.52vw;z-index:1000}
2
+ /*$vite$:1*/`,document.head.appendChild(Fo);var be=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function El(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var p=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,p.get?p:{enumerable:!0,get:function(){return e[i]}})}),r}var Kt=TypeError;const Do=El(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var kn=typeof Map=="function"&&Map.prototype,Tn=Object.getOwnPropertyDescriptor&&kn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Rr=kn&&Tn&&typeof Tn.get=="function"?Tn.get:null,Io=kn&&Map.prototype.forEach,Fn=typeof Set=="function"&&Set.prototype,Dn=Object.getOwnPropertyDescriptor&&Fn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Or=Fn&&Dn&&typeof Dn.get=="function"?Dn.get:null,Ro=Fn&&Set.prototype.forEach,_l=typeof WeakMap=="function"&&WeakMap.prototype,fr=_l?WeakMap.prototype.has:null,Al=typeof WeakSet=="function"&&WeakSet.prototype,hr=Al?WeakSet.prototype.has:null,Cl=typeof WeakRef=="function"&&WeakRef.prototype,Oo=Cl?WeakRef.prototype.deref:null,Sl=Boolean.prototype.valueOf,Bl=Object.prototype.toString,kl=Function.prototype.toString,Tl=String.prototype.match,In=String.prototype.slice,St=String.prototype.replace,Fl=String.prototype.toUpperCase,Po=String.prototype.toLowerCase,Mo=RegExp.prototype.test,No=Array.prototype.concat,dt=Array.prototype.join,Dl=Array.prototype.slice,Lo=Math.floor,Rn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,On=Object.getOwnPropertySymbols,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",pr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Gt||!0)?Symbol.toStringTag:null,Uo=Object.prototype.propertyIsEnumerable,qo=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function zo(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Mo.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var i=e<0?-Lo(-e):Lo(e);if(i!==e){var p=String(i),l=In.call(t,p.length+1);return St.call(p,r,"$&_")+"."+St.call(St.call(l,/([0-9]{3})/g,"$&_"),/_$/,"")}}return St.call(t,r,"$&_")}var Mn=Do,jo=Mn.custom,Ho=Ko(jo)?jo:null,$o={__proto__:null,double:'"',single:"'"},Il={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Pr=function e(t,r,i,p){var l=r||{};if(_t(l,"quoteStyle")&&!_t($o,l.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(_t(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=_t(l,"customInspect")?l.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(_t(l,"indent")&&l.indent!==null&&l.indent!==" "&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(_t(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=l.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Qo(t,l);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var d=String(t);return c?zo(t,d):d}if(typeof t=="bigint"){var o=String(t)+"n";return c?zo(t,o):o}var n=typeof l.depth=="undefined"?5:l.depth;if(typeof i=="undefined"&&(i=0),i>=n&&n>0&&typeof t=="object")return Nn(t)?"[Array]":"[Object]";var h=Yl(l,i);if(typeof p=="undefined")p=[];else if(Go(p,t)>=0)return"[Circular]";function a(C,B,N){if(B&&(p=Dl.call(p),p.push(B)),N){var q={depth:l.depth};return _t(l,"quoteStyle")&&(q.quoteStyle=l.quoteStyle),e(C,q,i+1,p)}return e(C,l,i+1,p)}if(typeof t=="function"&&!Vo(t)){var u=zl(t),f=Mr(t,a);return"[Function"+(u?": "+u:" (anonymous)")+"]"+(f.length>0?" { "+dt.call(f,", ")+" }":"")}if(Ko(t)){var v=Gt?St.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Pn.call(t);return typeof t=="object"&&!Gt?dr(v):v}if(Kl(t)){for(var y="<"+Po.call(String(t.nodeName)),g=t.attributes||[],b=0;b<g.length;b++)y+=" "+g[b].name+"="+Wo(Rl(g[b].value),"double",l);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+Po.call(String(t.nodeName))+">",y}if(Nn(t)){if(t.length===0)return"[]";var m=Mr(t,a);return h&&!Ql(m)?"["+Un(m,h)+"]":"[ "+dt.call(m,", ")+" ]"}if(Pl(t)){var E=Mr(t,a);return!("cause"in Error.prototype)&&"cause"in t&&!Uo.call(t,"cause")?"{ ["+String(t)+"] "+dt.call(No.call("[cause]: "+a(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+dt.call(E,", ")+" }"}if(typeof t=="object"&&s){if(Ho&&typeof t[Ho]=="function"&&Mn)return Mn(t,{depth:n-i});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(jl(t)){var F=[];return Io&&Io.call(t,function(C,B){F.push(a(B,t,!0)+" => "+a(C,t))}),Yo("Map",Rr.call(t),F,h)}if(Wl(t)){var T=[];return Ro&&Ro.call(t,function(C){T.push(a(C,t))}),Yo("Set",Or.call(t),T,h)}if(Hl(t))return Ln("WeakMap");if(Vl(t))return Ln("WeakSet");if($l(t))return Ln("WeakRef");if(Nl(t))return dr(a(Number(t)));if(Ul(t))return dr(a(Rn.call(t)));if(Ll(t))return dr(Sl.call(t));if(Ml(t))return dr(a(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof be!="undefined"&&t===be)return"{ [object globalThis] }";if(!Ol(t)&&!Vo(t)){var D=Mr(t,a),I=qo?qo(t)===Object.prototype:t instanceof Object||t.constructor===Object,Y=t instanceof Object?"":"null prototype",W=!I&&pr&&Object(t)===t&&pr in t?In.call(Bt(t),8,-1):Y?"Object":"",_=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",A=_+(W||Y?"["+dt.call(No.call([],W||[],Y||[]),": ")+"] ":"");return D.length===0?A+"{}":h?A+"{"+Un(D,h)+"}":A+"{ "+dt.call(D,", ")+" }"}return String(t)};function Wo(e,t,r){var i=r.quoteStyle||t,p=$o[i];return p+e+p}function Rl(e){return St.call(String(e),/"/g,"&quot;")}function Rt(e){return!pr||!(typeof e=="object"&&(pr in e||typeof e[pr]!="undefined"))}function Nn(e){return Bt(e)==="[object Array]"&&Rt(e)}function Ol(e){return Bt(e)==="[object Date]"&&Rt(e)}function Vo(e){return Bt(e)==="[object RegExp]"&&Rt(e)}function Pl(e){return Bt(e)==="[object Error]"&&Rt(e)}function Ml(e){return Bt(e)==="[object String]"&&Rt(e)}function Nl(e){return Bt(e)==="[object Number]"&&Rt(e)}function Ll(e){return Bt(e)==="[object Boolean]"&&Rt(e)}function Ko(e){if(Gt)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Pn)return!1;try{return Pn.call(e),!0}catch(t){}return!1}function Ul(e){if(!e||typeof e!="object"||!Rn)return!1;try{return Rn.call(e),!0}catch(t){}return!1}var ql=Object.prototype.hasOwnProperty||function(e){return e in this};function _t(e,t){return ql.call(e,t)}function Bt(e){return Bl.call(e)}function zl(e){if(e.name)return e.name;var t=Tl.call(kl.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Go(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}function jl(e){if(!Rr||!e||typeof e!="object")return!1;try{Rr.call(e);try{Or.call(e)}catch(t){return!0}return e instanceof Map}catch(t){}return!1}function Hl(e){if(!fr||!e||typeof e!="object")return!1;try{fr.call(e,fr);try{hr.call(e,hr)}catch(t){return!0}return e instanceof WeakMap}catch(t){}return!1}function $l(e){if(!Oo||!e||typeof e!="object")return!1;try{return Oo.call(e),!0}catch(t){}return!1}function Wl(e){if(!Or||!e||typeof e!="object")return!1;try{Or.call(e);try{Rr.call(e)}catch(t){return!0}return e instanceof Set}catch(t){}return!1}function Vl(e){if(!hr||!e||typeof e!="object")return!1;try{hr.call(e,hr);try{fr.call(e,fr)}catch(t){return!0}return e instanceof WeakSet}catch(t){}return!1}function Kl(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Qo(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return Qo(In.call(e,0,t.maxStringLength),t)+i}var p=Il[t.quoteStyle||"single"];p.lastIndex=0;var l=St.call(St.call(e,p,"\\$1"),/[\x00-\x1f]/g,Gl);return Wo(l,"single",t)}function Gl(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Fl.call(t.toString(16))}function dr(e){return"Object("+e+")"}function Ln(e){return e+" { ? }"}function Yo(e,t,r,i){var p=i?Un(r,i):dt.call(r,", ");return e+" ("+t+") {"+p+"}"}function Ql(e){for(var t=0;t<e.length;t++)if(Go(e[t],`
3
+ `)>=0)return!1;return!0}function Yl(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=dt.call(Array(e.indent+1)," ");else return null;return{base:r,prev:dt.call(Array(t+1),r)}}function Un(e,t){if(e.length===0)return"";var r=`
4
+ `+t.prev+t.base;return r+dt.call(e,","+r)+`
5
+ `+t.prev}function Mr(e,t){var r=Nn(e),i=[];if(r){i.length=e.length;for(var p=0;p<e.length;p++)i[p]=_t(e,p)?t(e[p],e):""}var l=typeof On=="function"?On(e):[],s;if(Gt){s={};for(var c=0;c<l.length;c++)s["$"+l[c]]=l[c]}for(var d in e)_t(e,d)&&(r&&String(Number(d))===d&&d<e.length||Gt&&s["$"+d]instanceof Symbol||(Mo.call(/[^\w$]/,d)?i.push(t(d,e)+": "+t(e[d],e)):i.push(d+": "+t(e[d],e))));if(typeof On=="function")for(var o=0;o<l.length;o++)Uo.call(e,l[o])&&i.push("["+t(l[o])+"]: "+t(e[l[o]],e));return i}var Xl=Pr,Zl=Kt,Nr=function(e,t,r){for(var i=e,p;(p=i.next)!=null;i=p)if(p.key===t)return i.next=p.next,r||(p.next=e.next,e.next=p),p},Jl=function(e,t){if(e){var r=Nr(e,t);return r&&r.value}},eu=function(e,t,r){var i=Nr(e,t);i?i.value=r:e.next={key:t,next:e.next,value:r}},tu=function(e,t){return e?!!Nr(e,t):!1},ru=function(e,t){if(e)return Nr(e,t,!0)},nu=function(){var t,r={assert:function(i){if(!r.has(i))throw new Zl("Side channel does not contain "+Xl(i))},delete:function(i){var p=t&&t.next,l=ru(t,i);return l&&p&&p===l&&(t=void 0),!!l},get:function(i){return Jl(t,i)},has:function(i){return tu(t,i)},set:function(i,p){t||(t={next:void 0}),eu(t,i,p)}};return r},Xo=Object,iu=Error,ou=EvalError,au=RangeError,su=ReferenceError,lu=SyntaxError,uu=URIError,cu=Math.abs,fu=Math.floor,hu=Math.max,pu=Math.min,du=Math.pow,yu=Math.round,mu=Number.isNaN||function(t){return t!==t},vu=mu,xu=function(t){return vu(t)||t===0?t:t<0?-1:1},gu=Object.getOwnPropertyDescriptor,Lr=gu;if(Lr)try{Lr([],"length")}catch(e){Lr=null}var Zo=Lr,Ur=Object.defineProperty||!1;if(Ur)try{Ur({},"a",{value:1})}catch(e){Ur=!1}var bu=Ur,qn,Jo;function wu(){return Jo||(Jo=1,qn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var p=42;t[r]=p;for(var l in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,r);if(c.value!==p||c.enumerable!==!0)return!1}return!0}),qn}var zn,ea;function Eu(){if(ea)return zn;ea=1;var e=typeof Symbol!="undefined"&&Symbol,t=wu();return zn=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},zn}var jn,ta;function ra(){return ta||(ta=1,jn=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),jn}var Hn,na;function ia(){if(na)return Hn;na=1;var e=Xo;return Hn=e.getPrototypeOf||null,Hn}var $n,oa;function _u(){if(oa)return $n;oa=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,i="[object Function]",p=function(d,o){for(var n=[],h=0;h<d.length;h+=1)n[h]=d[h];for(var a=0;a<o.length;a+=1)n[a+d.length]=o[a];return n},l=function(d,o){for(var n=[],h=o,a=0;h<d.length;h+=1,a+=1)n[a]=d[h];return n},s=function(c,d){for(var o="",n=0;n<c.length;n+=1)o+=c[n],n+1<c.length&&(o+=d);return o};return $n=function(d){var o=this;if(typeof o!="function"||t.apply(o)!==i)throw new TypeError(e+o);for(var n=l(arguments,1),h,a=function(){if(this instanceof h){var g=o.apply(this,p(n,arguments));return Object(g)===g?g:this}return o.apply(d,p(n,arguments))},u=r(0,o.length-n.length),f=[],v=0;v<u;v++)f[v]="$"+v;if(h=Function("binder","return function ("+s(f,",")+"){ return binder.apply(this,arguments); }")(a),o.prototype){var y=function(){};y.prototype=o.prototype,h.prototype=new y,y.prototype=null}return h},$n}var Wn,aa;function qr(){if(aa)return Wn;aa=1;var e=_u();return Wn=Function.prototype.bind||e,Wn}var Vn,sa;function Kn(){return sa||(sa=1,Vn=Function.prototype.call),Vn}var Gn,la;function ua(){return la||(la=1,Gn=Function.prototype.apply),Gn}var Au=typeof Reflect!="undefined"&&Reflect&&Reflect.apply,Cu=qr(),Su=ua(),Bu=Kn(),ku=Au,Tu=ku||Cu.call(Bu,Su),Fu=qr(),Du=Kt,Iu=Kn(),Ru=Tu,ca=function(t){if(t.length<1||typeof t[0]!="function")throw new Du("a function is required");return Ru(Fu,Iu,t)},Qn,fa;function Ou(){if(fa)return Qn;fa=1;var e=ca,t=Zo,r;try{r=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var i=!!r&&t&&t(Object.prototype,"__proto__"),p=Object,l=p.getPrototypeOf;return Qn=i&&typeof i.get=="function"?e([i.get]):typeof l=="function"?function(c){return l(c==null?c:p(c))}:!1,Qn}var Yn,ha;function Pu(){if(ha)return Yn;ha=1;var e=ra(),t=ia(),r=Ou();return Yn=e?function(p){return e(p)}:t?function(p){if(!p||typeof p!="object"&&typeof p!="function")throw new TypeError("getProto: not an object");return t(p)}:r?function(p){return r(p)}:null,Yn}var Xn,pa;function Mu(){if(pa)return Xn;pa=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=qr();return Xn=r.call(e,t),Xn}var Ce,Nu=Xo,Lu=iu,Uu=ou,qu=au,zu=su,Qt=lu,Yt=Kt,ju=uu,Hu=cu,$u=fu,Wu=hu,Vu=pu,Ku=du,Gu=yu,Qu=xu,da=Function,Zn=function(e){try{return da('"use strict"; return ('+e+").constructor;")()}catch(t){}},yr=Zo,Yu=bu,Jn=function(){throw new Yt},Xu=yr?function(){try{return arguments.callee,Jn}catch(e){try{return yr(arguments,"callee").get}catch(t){return Jn}}}():Jn,Xt=Eu()(),je=Pu(),Zu=ia(),Ju=ra(),ya=ua(),mr=Kn(),Zt={},ec=typeof Uint8Array=="undefined"||!je?Ce:je(Uint8Array),Ot={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":Xt&&je?je([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":Zt,"%AsyncGenerator%":Zt,"%AsyncGeneratorFunction%":Zt,"%AsyncIteratorPrototype%":Zt,"%Atomics%":typeof Atomics=="undefined"?Ce:Atomics,"%BigInt%":typeof BigInt=="undefined"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Lu,"%eval%":eval,"%EvalError%":Uu,"%Float16Array%":typeof Float16Array=="undefined"?Ce:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Ce:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Ce:FinalizationRegistry,"%Function%":da,"%GeneratorFunction%":Zt,"%Int8Array%":typeof Int8Array=="undefined"?Ce:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Ce:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Xt&&je?je(je([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map=="undefined"?Ce:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Xt||!je?Ce:je(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Nu,"%Object.getOwnPropertyDescriptor%":yr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Ce:Promise,"%Proxy%":typeof Proxy=="undefined"?Ce:Proxy,"%RangeError%":qu,"%ReferenceError%":zu,"%Reflect%":typeof Reflect=="undefined"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Ce:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Xt||!je?Ce:je(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Xt&&je?je(""[Symbol.iterator]()):Ce,"%Symbol%":Xt?Symbol:Ce,"%SyntaxError%":Qt,"%ThrowTypeError%":Xu,"%TypedArray%":ec,"%TypeError%":Yt,"%Uint8Array%":typeof Uint8Array=="undefined"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Ce:Uint32Array,"%URIError%":ju,"%WeakMap%":typeof WeakMap=="undefined"?Ce:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Ce:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Ce:WeakSet,"%Function.prototype.call%":mr,"%Function.prototype.apply%":ya,"%Object.defineProperty%":Yu,"%Object.getPrototypeOf%":Zu,"%Math.abs%":Hu,"%Math.floor%":$u,"%Math.max%":Wu,"%Math.min%":Vu,"%Math.pow%":Ku,"%Math.round%":Gu,"%Math.sign%":Qu,"%Reflect.getPrototypeOf%":Ju};if(je)try{null.error}catch(e){var tc=je(je(e));Ot["%Error.prototype%"]=tc}var rc=function e(t){var r;if(t==="%AsyncFunction%")r=Zn("async function () {}");else if(t==="%GeneratorFunction%")r=Zn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Zn("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var p=e("%AsyncGenerator%");p&&je&&(r=je(p.prototype))}return Ot[t]=r,r},ma={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vr=qr(),zr=Mu(),nc=vr.call(mr,Array.prototype.concat),ic=vr.call(ya,Array.prototype.splice),va=vr.call(mr,String.prototype.replace),jr=vr.call(mr,String.prototype.slice),oc=vr.call(mr,RegExp.prototype.exec),ac=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sc=/\\(\\)?/g,lc=function(t){var r=jr(t,0,1),i=jr(t,-1);if(r==="%"&&i!=="%")throw new Qt("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Qt("invalid intrinsic syntax, expected opening `%`");var p=[];return va(t,ac,function(l,s,c,d){p[p.length]=c?va(d,sc,"$1"):s||l}),p},uc=function(t,r){var i=t,p;if(zr(ma,i)&&(p=ma[i],i="%"+p[0]+"%"),zr(Ot,i)){var l=Ot[i];if(l===Zt&&(l=rc(i)),typeof l=="undefined"&&!r)throw new Yt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:p,name:i,value:l}}throw new Qt("intrinsic "+t+" does not exist!")},ei=function(t,r){if(typeof t!="string"||t.length===0)throw new Yt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Yt('"allowMissing" argument must be a boolean');if(oc(/^%?[^%]*%?$/,t)===null)throw new Qt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=lc(t),p=i.length>0?i[0]:"",l=uc("%"+p+"%",r),s=l.name,c=l.value,d=!1,o=l.alias;o&&(p=o[0],ic(i,nc([0,1],o)));for(var n=1,h=!0;n<i.length;n+=1){var a=i[n],u=jr(a,0,1),f=jr(a,-1);if((u==='"'||u==="'"||u==="`"||f==='"'||f==="'"||f==="`")&&u!==f)throw new Qt("property names with quotes must have matching quotes");if((a==="constructor"||!h)&&(d=!0),p+="."+a,s="%"+p+"%",zr(Ot,s))c=Ot[s];else if(c!=null){if(!(a in c)){if(!r)throw new Yt("base intrinsic for "+t+" exists, but the property is not available.");return}if(yr&&n+1>=i.length){var v=yr(c,a);h=!!v,h&&"get"in v&&!("originalValue"in v.get)?c=v.get:c=c[a]}else h=zr(c,a),c=c[a];h&&!d&&(Ot[s]=c)}}return c},xa=ei,ga=ca,cc=ga([xa("%String.prototype.indexOf%")]),ba=function(t,r){var i=xa(t,!!r);return typeof i=="function"&&cc(t,".prototype.")>-1?ga([i]):i},fc=ei,xr=ba,hc=Pr,pc=Kt,wa=fc("%Map%",!0),dc=xr("Map.prototype.get",!0),yc=xr("Map.prototype.set",!0),mc=xr("Map.prototype.has",!0),vc=xr("Map.prototype.delete",!0),xc=xr("Map.prototype.size",!0),Ea=!!wa&&function(){var t,r={assert:function(i){if(!r.has(i))throw new pc("Side channel does not contain "+hc(i))},delete:function(i){if(t){var p=vc(t,i);return xc(t)===0&&(t=void 0),p}return!1},get:function(i){if(t)return dc(t,i)},has:function(i){return t?mc(t,i):!1},set:function(i,p){t||(t=new wa),yc(t,i,p)}};return r},gc=ei,Hr=ba,bc=Pr,$r=Ea,wc=Kt,Jt=gc("%WeakMap%",!0),Ec=Hr("WeakMap.prototype.get",!0),_c=Hr("WeakMap.prototype.set",!0),Ac=Hr("WeakMap.prototype.has",!0),Cc=Hr("WeakMap.prototype.delete",!0),Sc=Jt?function(){var t,r,i={assert:function(p){if(!i.has(p))throw new wc("Side channel does not contain "+bc(p))},delete:function(p){if(Jt&&p&&(typeof p=="object"||typeof p=="function")){if(t)return Cc(t,p)}else if($r&&r)return r.delete(p);return!1},get:function(p){return Jt&&p&&(typeof p=="object"||typeof p=="function")&&t?Ec(t,p):r&&r.get(p)},has:function(p){return Jt&&p&&(typeof p=="object"||typeof p=="function")&&t?Ac(t,p):!!r&&r.has(p)},set:function(p,l){Jt&&p&&(typeof p=="object"||typeof p=="function")?(t||(t=new Jt),_c(t,p,l)):$r&&(r||(r=$r()),r.set(p,l))}};return i}:$r,Bc=Kt,kc=Pr,Tc=nu,Fc=Ea,Dc=Sc,Ic=Dc||Fc||Tc,Rc=function(){var t,r={assert:function(i){if(!r.has(i))throw new Bc("Side channel does not contain "+kc(i))},delete:function(i){return!!t&&t.delete(i)},get:function(i){return t&&t.get(i)},has:function(i){return!!t&&t.has(i)},set:function(i,p){t||(t=Ic()),t.set(i,p)}};return r},Oc=String.prototype.replace,Pc=/%20/g,ti={RFC1738:"RFC1738",RFC3986:"RFC3986"},ri={default:ti.RFC3986,formatters:{RFC1738:function(e){return Oc.call(e,Pc,"+")},RFC3986:function(e){return String(e)}},RFC1738:ti.RFC1738,RFC3986:ti.RFC3986},Mc=ri,ni=Object.prototype.hasOwnProperty,Pt=Array.isArray,yt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Nc=function(t){for(;t.length>1;){var r=t.pop(),i=r.obj[r.prop];if(Pt(i)){for(var p=[],l=0;l<i.length;++l)typeof i[l]!="undefined"&&p.push(i[l]);r.obj[r.prop]=p}}},_a=function(t,r){for(var i=r&&r.plainObjects?{__proto__:null}:{},p=0;p<t.length;++p)typeof t[p]!="undefined"&&(i[p]=t[p]);return i},Lc=function e(t,r,i){if(!r)return t;if(typeof r!="object"&&typeof r!="function"){if(Pt(t))t.push(r);else if(t&&typeof t=="object")(i&&(i.plainObjects||i.allowPrototypes)||!ni.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var p=t;return Pt(t)&&!Pt(r)&&(p=_a(t,i)),Pt(t)&&Pt(r)?(r.forEach(function(l,s){if(ni.call(t,s)){var c=t[s];c&&typeof c=="object"&&l&&typeof l=="object"?t[s]=e(c,l,i):t.push(l)}else t[s]=l}),t):Object.keys(r).reduce(function(l,s){var c=r[s];return ni.call(l,s)?l[s]=e(l[s],c,i):l[s]=c,l},p)},Uc=function(t,r){return Object.keys(r).reduce(function(i,p){return i[p]=r[p],i},t)},qc=function(e,t,r){var i=e.replace(/\+/g," ");if(r==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(p){return i}},ii=1024,zc=function(t,r,i,p,l){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),i==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var c="",d=0;d<s.length;d+=ii){for(var o=s.length>=ii?s.slice(d,d+ii):s,n=[],h=0;h<o.length;++h){var a=o.charCodeAt(h);if(a===45||a===46||a===95||a===126||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||l===Mc.RFC1738&&(a===40||a===41)){n[n.length]=o.charAt(h);continue}if(a<128){n[n.length]=yt[a];continue}if(a<2048){n[n.length]=yt[192|a>>6]+yt[128|a&63];continue}if(a<55296||a>=57344){n[n.length]=yt[224|a>>12]+yt[128|a>>6&63]+yt[128|a&63];continue}h+=1,a=65536+((a&1023)<<10|o.charCodeAt(h)&1023),n[n.length]=yt[240|a>>18]+yt[128|a>>12&63]+yt[128|a>>6&63]+yt[128|a&63]}c+=n.join("")}return c},jc=function(t){for(var r=[{obj:{o:t},prop:"o"}],i=[],p=0;p<r.length;++p)for(var l=r[p],s=l.obj[l.prop],c=Object.keys(s),d=0;d<c.length;++d){var o=c[d],n=s[o];typeof n=="object"&&n!==null&&i.indexOf(n)===-1&&(r.push({obj:s,prop:o}),i.push(n))}return Nc(r),t},Hc=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},$c=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Wc=function(t,r){return[].concat(t,r)},Vc=function(t,r){if(Pt(t)){for(var i=[],p=0;p<t.length;p+=1)i.push(r(t[p]));return i}return r(t)},Aa={arrayToObject:_a,assign:Uc,combine:Wc,compact:jc,decode:qc,encode:zc,isBuffer:$c,isRegExp:Hc,maybeMap:Vc,merge:Lc},Ca=Rc,Wr=Aa,gr=ri,Kc=Object.prototype.hasOwnProperty,Sa={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},mt=Array.isArray,Gc=Array.prototype.push,Ba=function(e,t){Gc.apply(e,mt(t)?t:[t])},Qc=Date.prototype.toISOString,ka=gr.default,qe={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Wr.encode,encodeValuesOnly:!1,filter:void 0,format:ka,formatter:gr.formatters[ka],indices:!1,serializeDate:function(t){return Qc.call(t)},skipNulls:!1,strictNullHandling:!1},Yc=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},oi={},Xc=function e(t,r,i,p,l,s,c,d,o,n,h,a,u,f,v,y,g,b){for(var m=t,E=b,F=0,T=!1;(E=E.get(oi))!==void 0&&!T;){var D=E.get(t);if(F+=1,typeof D!="undefined"){if(D===F)throw new RangeError("Cyclic object value");T=!0}typeof E.get(oi)=="undefined"&&(F=0)}if(typeof n=="function"?m=n(r,m):m instanceof Date?m=u(m):i==="comma"&&mt(m)&&(m=Wr.maybeMap(m,function(j){return j instanceof Date?u(j):j})),m===null){if(s)return o&&!y?o(r,qe.encoder,g,"key",f):r;m=""}if(Yc(m)||Wr.isBuffer(m)){if(o){var I=y?r:o(r,qe.encoder,g,"key",f);return[v(I)+"="+v(o(m,qe.encoder,g,"value",f))]}return[v(r)+"="+v(String(m))]}var Y=[];if(typeof m=="undefined")return Y;var W;if(i==="comma"&&mt(m))y&&o&&(m=Wr.maybeMap(m,o)),W=[{value:m.length>0?m.join(",")||null:void 0}];else if(mt(n))W=n;else{var _=Object.keys(m);W=h?_.sort(h):_}var A=d?String(r).replace(/\./g,"%2E"):String(r),C=p&&mt(m)&&m.length===1?A+"[]":A;if(l&&mt(m)&&m.length===0)return C+"[]";for(var B=0;B<W.length;++B){var N=W[B],q=typeof N=="object"&&N&&typeof N.value!="undefined"?N.value:m[N];if(!(c&&q===null)){var X=a&&d?String(N).replace(/\./g,"%2E"):String(N),$=mt(m)?typeof i=="function"?i(C,X):C:C+(a?"."+X:"["+X+"]");b.set(t,F);var M=Ca();M.set(oi,b),Ba(Y,e(q,$,i,p,l,s,c,d,i==="comma"&&y&&mt(m)?null:o,n,h,a,u,f,v,y,g,M))}}return Y},Zc=function(t){if(!t)return qe;if(typeof t.allowEmptyArrays!="undefined"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys!="undefined"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder!="undefined"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||qe.charset;if(typeof t.charset!="undefined"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=gr.default;if(typeof t.format!="undefined"){if(!Kc.call(gr.formatters,t.format))throw new TypeError("Unknown format option provided.");i=t.format}var p=gr.formatters[i],l=qe.filter;(typeof t.filter=="function"||mt(t.filter))&&(l=t.filter);var s;if(t.arrayFormat in Sa?s=t.arrayFormat:"indices"in t?s=t.indices?"indices":"repeat":s=qe.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=typeof t.allowDots=="undefined"?t.encodeDotInKeys===!0?!0:qe.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:qe.addQueryPrefix,allowDots:c,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:qe.allowEmptyArrays,arrayFormat:s,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:qe.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter=="undefined"?qe.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:qe.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:qe.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:qe.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:qe.encodeValuesOnly,filter:l,format:i,formatter:p,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:qe.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:qe.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:qe.strictNullHandling}},Jc=function(e,t){var r=e,i=Zc(t),p,l;typeof i.filter=="function"?(l=i.filter,r=l("",r)):mt(i.filter)&&(l=i.filter,p=l);var s=[];if(typeof r!="object"||r===null)return"";var c=Sa[i.arrayFormat],d=c==="comma"&&i.commaRoundTrip;p||(p=Object.keys(r)),i.sort&&p.sort(i.sort);for(var o=Ca(),n=0;n<p.length;++n){var h=p[n],a=r[h];i.skipNulls&&a===null||Ba(s,Xc(a,h,c,d,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,o))}var u=s.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),u.length>0?f+u:""},Mt=Aa,ai=Object.prototype.hasOwnProperty,Ta=Array.isArray,Me={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Mt.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},ef=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Fa=function(e,t,r){if(e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return e},tf="utf8=%26%2310003%3B",rf="utf8=%E2%9C%93",nf=function(t,r){var i={__proto__:null},p=r.ignoreQueryPrefix?t.replace(/^\?/,""):t;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=r.parameterLimit===1/0?void 0:r.parameterLimit,s=p.split(r.delimiter,r.throwOnLimitExceeded?l+1:l);if(r.throwOnLimitExceeded&&s.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(l===1?"":"s")+" allowed.");var c=-1,d,o=r.charset;if(r.charsetSentinel)for(d=0;d<s.length;++d)s[d].indexOf("utf8=")===0&&(s[d]===rf?o="utf-8":s[d]===tf&&(o="iso-8859-1"),c=d,d=s.length);for(d=0;d<s.length;++d)if(d!==c){var n=s[d],h=n.indexOf("]="),a=h===-1?n.indexOf("="):h+1,u,f;a===-1?(u=r.decoder(n,Me.decoder,o,"key"),f=r.strictNullHandling?null:""):(u=r.decoder(n.slice(0,a),Me.decoder,o,"key"),f=Mt.maybeMap(Fa(n.slice(a+1),r,Ta(i[u])?i[u].length:0),function(y){return r.decoder(y,Me.decoder,o,"value")})),f&&r.interpretNumericEntities&&o==="iso-8859-1"&&(f=ef(String(f))),n.indexOf("[]=")>-1&&(f=Ta(f)?[f]:f);var v=ai.call(i,u);v&&r.duplicates==="combine"?i[u]=Mt.combine(i[u],f):(!v||r.duplicates==="last")&&(i[u]=f)}return i},of=function(e,t,r,i){var p=0;if(e.length>0&&e[e.length-1]==="[]"){var l=e.slice(0,-1).join("");p=Array.isArray(t)&&t[l]?t[l].length:0}for(var s=i?t:Fa(t,r,p),c=e.length-1;c>=0;--c){var d,o=e[c];if(o==="[]"&&r.parseArrays)d=r.allowEmptyArrays&&(s===""||r.strictNullHandling&&s===null)?[]:Mt.combine([],s);else{d=r.plainObjects?{__proto__:null}:{};var n=o.charAt(0)==="["&&o.charAt(o.length-1)==="]"?o.slice(1,-1):o,h=r.decodeDotInKeys?n.replace(/%2E/g,"."):n,a=parseInt(h,10);!r.parseArrays&&h===""?d={0:s}:!isNaN(a)&&o!==h&&String(a)===h&&a>=0&&r.parseArrays&&a<=r.arrayLimit?(d=[],d[a]=s):h!=="__proto__"&&(d[h]=s)}s=d}return s},af=function(t,r,i,p){if(t){var l=i.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,c=/(\[[^[\]]*])/g,d=i.depth>0&&s.exec(l),o=d?l.slice(0,d.index):l,n=[];if(o){if(!i.plainObjects&&ai.call(Object.prototype,o)&&!i.allowPrototypes)return;n.push(o)}for(var h=0;i.depth>0&&(d=c.exec(l))!==null&&h<i.depth;){if(h+=1,!i.plainObjects&&ai.call(Object.prototype,d[1].slice(1,-1))&&!i.allowPrototypes)return;n.push(d[1])}if(d){if(i.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+i.depth+" and strictDepth is true");n.push("["+l.slice(d.index)+"]")}return of(n,r,i,p)}},sf=function(t){if(!t)return Me;if(typeof t.allowEmptyArrays!="undefined"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys!="undefined"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder!="undefined"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset!="undefined"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded!="undefined"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof t.charset=="undefined"?Me.charset:t.charset,i=typeof t.duplicates=="undefined"?Me.duplicates:t.duplicates;if(i!=="combine"&&i!=="first"&&i!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof t.allowDots=="undefined"?t.decodeDotInKeys===!0?!0:Me.allowDots:!!t.allowDots;return{allowDots:p,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Me.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Me.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Me.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Me.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Me.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Me.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Me.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Me.decoder,delimiter:typeof t.delimiter=="string"||Mt.isRegExp(t.delimiter)?t.delimiter:Me.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Me.depth,duplicates:i,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Me.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Me.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Me.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Me.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Me.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},lf=function(e,t){var r=sf(t);if(e===""||e===null||typeof e=="undefined")return r.plainObjects?{__proto__:null}:{};for(var i=typeof e=="string"?nf(e,r):e,p=r.plainObjects?{__proto__:null}:{},l=Object.keys(i),s=0;s<l.length;++s){var c=l[s],d=af(c,i[c],r,typeof e=="string");p=Mt.merge(p,d,r)}return r.allowSparse===!0?p:Mt.compact(p)},uf=Jc,cf=lf,ff=ri,hf={formats:ff,parse:cf,stringify:uf};const pf=Bn(hf);function Da(e,t){return function(){return e.apply(t,arguments)}}const{toString:df}=Object.prototype,{getPrototypeOf:si}=Object,{iterator:Vr,toStringTag:Ia}=Symbol,Kr=(e=>t=>{const r=df.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ut=e=>(e=e.toLowerCase(),t=>Kr(t)===e),Gr=e=>t=>typeof t===e,{isArray:er}=Array,br=Gr("undefined");function wr(e){return e!==null&&!br(e)&&e.constructor!==null&&!br(e.constructor)&&et(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ra=ut("ArrayBuffer");function yf(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ra(e.buffer),t}const mf=Gr("string"),et=Gr("function"),Oa=Gr("number"),Er=e=>e!==null&&typeof e=="object",vf=e=>e===!0||e===!1,Qr=e=>{if(Kr(e)!=="object")return!1;const t=si(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ia in e)&&!(Vr in e)},xf=e=>{if(!Er(e)||wr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},gf=ut("Date"),bf=ut("File"),wf=ut("Blob"),Ef=ut("FileList"),_f=e=>Er(e)&&et(e.pipe),Af=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||et(e.append)&&((t=Kr(e))==="formdata"||t==="object"&&et(e.toString)&&e.toString()==="[object FormData]"))},Cf=ut("URLSearchParams"),[Sf,Bf,kf,Tf]=["ReadableStream","Request","Response","Headers"].map(ut),Ff=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _r(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e=="undefined")return;let i,p;if(typeof e!="object"&&(e=[e]),er(e))for(i=0,p=e.length;i<p;i++)t.call(null,e[i],i,e);else{if(wr(e))return;const l=r?Object.getOwnPropertyNames(e):Object.keys(e),s=l.length;let c;for(i=0;i<s;i++)c=l[i],t.call(null,e[c],c,e)}}function Pa(e,t){if(wr(e))return null;t=t.toLowerCase();const r=Object.keys(e);let i=r.length,p;for(;i-- >0;)if(p=r[i],t===p.toLowerCase())return p;return null}const Nt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Ma=e=>!br(e)&&e!==Nt;function li(){const{caseless:e}=Ma(this)&&this||{},t={},r=(i,p)=>{const l=e&&Pa(t,p)||p;Qr(t[l])&&Qr(i)?t[l]=li(t[l],i):Qr(i)?t[l]=li({},i):er(i)?t[l]=i.slice():t[l]=i};for(let i=0,p=arguments.length;i<p;i++)arguments[i]&&_r(arguments[i],r);return t}const Df=(e,t,r,{allOwnKeys:i}={})=>(_r(t,(p,l)=>{r&&et(p)?e[l]=Da(p,r):e[l]=p},{allOwnKeys:i}),e),If=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rf=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Of=(e,t,r,i)=>{let p,l,s;const c={};if(t=t||{},e==null)return t;do{for(p=Object.getOwnPropertyNames(e),l=p.length;l-- >0;)s=p[l],(!i||i(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=r!==!1&&si(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Pf=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},Mf=e=>{if(!e)return null;if(er(e))return e;let t=e.length;if(!Oa(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Nf=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&si(Uint8Array)),Lf=(e,t)=>{const i=(e&&e[Vr]).call(e);let p;for(;(p=i.next())&&!p.done;){const l=p.value;t.call(e,l[0],l[1])}},Uf=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},qf=ut("HTMLFormElement"),zf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,p){return i.toUpperCase()+p}),Na=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),jf=ut("RegExp"),La=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};_r(r,(p,l)=>{let s;(s=t(p,l,e))!==!1&&(i[l]=s||p)}),Object.defineProperties(e,i)},Hf=e=>{La(e,(t,r)=>{if(et(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(et(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},$f=(e,t)=>{const r={},i=p=>{p.forEach(l=>{r[l]=!0})};return er(e)?i(e):i(String(e).split(t)),r},Wf=()=>{},Vf=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Kf(e){return!!(e&&et(e.append)&&e[Ia]==="FormData"&&e[Vr])}const Gf=e=>{const t=new Array(10),r=(i,p)=>{if(Er(i)){if(t.indexOf(i)>=0)return;if(wr(i))return i;if(!("toJSON"in i)){t[p]=i;const l=er(i)?[]:{};return _r(i,(s,c)=>{const d=r(s,p+1);!br(d)&&(l[c]=d)}),t[p]=void 0,l}}return i};return r(e,0)},Qf=ut("AsyncFunction"),Yf=e=>e&&(Er(e)||et(e))&&et(e.then)&&et(e.catch),Ua=((e,t)=>e?setImmediate:t?((r,i)=>(Nt.addEventListener("message",({source:p,data:l})=>{p===Nt&&l===r&&i.length&&i.shift()()},!1),p=>{i.push(p),Nt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",et(Nt.postMessage)),Xf=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Nt):typeof process!="undefined"&&process.nextTick||Ua,se={isArray:er,isArrayBuffer:Ra,isBuffer:wr,isFormData:Af,isArrayBufferView:yf,isString:mf,isNumber:Oa,isBoolean:vf,isObject:Er,isPlainObject:Qr,isEmptyObject:xf,isReadableStream:Sf,isRequest:Bf,isResponse:kf,isHeaders:Tf,isUndefined:br,isDate:gf,isFile:bf,isBlob:wf,isRegExp:jf,isFunction:et,isStream:_f,isURLSearchParams:Cf,isTypedArray:Nf,isFileList:Ef,forEach:_r,merge:li,extend:Df,trim:Ff,stripBOM:If,inherits:Rf,toFlatObject:Of,kindOf:Kr,kindOfTest:ut,endsWith:Pf,toArray:Mf,forEachEntry:Lf,matchAll:Uf,isHTMLForm:qf,hasOwnProperty:Na,hasOwnProp:Na,reduceDescriptors:La,freezeMethods:Hf,toObjectSet:$f,toCamelCase:zf,noop:Wf,toFiniteNumber:Vf,findKey:Pa,global:Nt,isContextDefined:Ma,isSpecCompliantForm:Kf,toJSONObject:Gf,isAsyncFn:Qf,isThenable:Yf,setImmediate:Ua,asap:Xf,isIterable:e=>e!=null&&et(e[Vr])};function Ee(e,t,r,i,p){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),p&&(this.response=p,this.status=p.status?p.status:null)}se.inherits(Ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.status}}});const qa=Ee.prototype,za={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{za[e]={value:e}}),Object.defineProperties(Ee,za),Object.defineProperty(qa,"isAxiosError",{value:!0}),Ee.from=(e,t,r,i,p,l)=>{const s=Object.create(qa);return se.toFlatObject(e,s,function(d){return d!==Error.prototype},c=>c!=="isAxiosError"),Ee.call(s,e.message,t,r,i,p),s.cause=e,s.name=e.name,l&&Object.assign(s,l),s};const Zf=null;function ui(e){return se.isPlainObject(e)||se.isArray(e)}function ja(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function Ha(e,t,r){return e?e.concat(t).map(function(p,l){return p=ja(p),!r&&l?"["+p+"]":p}).join(r?".":""):t}function Jf(e){return se.isArray(e)&&!e.some(ui)}const eh=se.toFlatObject(se,{},null,function(t){return/^is[A-Z]/.test(t)});function Yr(e,t,r){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=se.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!se.isUndefined(y[v])});const i=r.metaTokens,p=r.visitor||n,l=r.dots,s=r.indexes,d=(r.Blob||typeof Blob!="undefined"&&Blob)&&se.isSpecCompliantForm(t);if(!se.isFunction(p))throw new TypeError("visitor must be a function");function o(f){if(f===null)return"";if(se.isDate(f))return f.toISOString();if(se.isBoolean(f))return f.toString();if(!d&&se.isBlob(f))throw new Ee("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(f)||se.isTypedArray(f)?d&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function n(f,v,y){let g=f;if(f&&!y&&typeof f=="object"){if(se.endsWith(v,"{}"))v=i?v:v.slice(0,-2),f=JSON.stringify(f);else if(se.isArray(f)&&Jf(f)||(se.isFileList(f)||se.endsWith(v,"[]"))&&(g=se.toArray(f)))return v=ja(v),g.forEach(function(m,E){!(se.isUndefined(m)||m===null)&&t.append(s===!0?Ha([v],E,l):s===null?v:v+"[]",o(m))}),!1}return ui(f)?!0:(t.append(Ha(y,v,l),o(f)),!1)}const h=[],a=Object.assign(eh,{defaultVisitor:n,convertValue:o,isVisitable:ui});function u(f,v){if(!se.isUndefined(f)){if(h.indexOf(f)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(f),se.forEach(f,function(g,b){(!(se.isUndefined(g)||g===null)&&p.call(t,g,se.isString(b)?b.trim():b,v,a))===!0&&u(g,v?v.concat(b):[b])}),h.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return u(e),t}function $a(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function ci(e,t){this._pairs=[],e&&Yr(e,this,t)}const Wa=ci.prototype;Wa.append=function(t,r){this._pairs.push([t,r])},Wa.toString=function(t){const r=t?function(i){return t.call(this,i,$a)}:$a;return this._pairs.map(function(p){return r(p[0])+"="+r(p[1])},"").join("&")};function th(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Va(e,t,r){if(!t)return e;const i=r&&r.encode||th;se.isFunction(r)&&(r={serialize:r});const p=r&&r.serialize;let l;if(p?l=p(t,r):l=se.isURLSearchParams(t)?t.toString():new ci(t,r).toString(i),l){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Ka{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){se.forEach(this.handlers,function(i){i!==null&&t(i)})}}const Ga={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rh={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:ci,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},fi=typeof window!="undefined"&&typeof document!="undefined",hi=typeof navigator=="object"&&navigator||void 0,nh=fi&&(!hi||["ReactNative","NativeScript","NS"].indexOf(hi.product)<0),ih=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oh=fi&&window.location.href||"http://localhost",Ye=he(he({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fi,hasStandardBrowserEnv:nh,hasStandardBrowserWebWorkerEnv:ih,navigator:hi,origin:oh},Symbol.toStringTag,{value:"Module"}))),rh);function ah(e,t){return Yr(e,new Ye.classes.URLSearchParams,he({visitor:function(r,i,p,l){return Ye.isNode&&se.isBuffer(r)?(this.append(i,r.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function sh(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lh(e){const t={},r=Object.keys(e);let i;const p=r.length;let l;for(i=0;i<p;i++)l=r[i],t[l]=e[l];return t}function Qa(e){function t(r,i,p,l){let s=r[l++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),d=l>=r.length;return s=!s&&se.isArray(p)?p.length:s,d?(se.hasOwnProp(p,s)?p[s]=[p[s],i]:p[s]=i,!c):((!p[s]||!se.isObject(p[s]))&&(p[s]=[]),t(r,i,p[s],l)&&se.isArray(p[s])&&(p[s]=lh(p[s])),!c)}if(se.isFormData(e)&&se.isFunction(e.entries)){const r={};return se.forEachEntry(e,(i,p)=>{t(sh(i),p,r,0)}),r}return null}function uh(e,t,r){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const Ar={transitional:Ga,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const i=r.getContentType()||"",p=i.indexOf("application/json")>-1,l=se.isObject(t);if(l&&se.isHTMLForm(t)&&(t=new FormData(t)),se.isFormData(t))return p?JSON.stringify(Qa(t)):t;if(se.isArrayBuffer(t)||se.isBuffer(t)||se.isStream(t)||se.isFile(t)||se.isBlob(t)||se.isReadableStream(t))return t;if(se.isArrayBufferView(t))return t.buffer;if(se.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return ah(t,this.formSerializer).toString();if((c=se.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Yr(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return l||p?(r.setContentType("application/json",!1),uh(t)):t}],transformResponse:[function(t){const r=this.transitional||Ar.transitional,i=r&&r.forcedJSONParsing,p=this.responseType==="json";if(se.isResponse(t)||se.isReadableStream(t))return t;if(t&&se.isString(t)&&(i&&!this.responseType||p)){const s=!(r&&r.silentJSONParsing)&&p;try{return JSON.parse(t)}catch(c){if(s)throw c.name==="SyntaxError"?Ee.from(c,Ee.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ye.classes.FormData,Blob:Ye.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],e=>{Ar.headers[e]={}});const ch=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fh=e=>{const t={};let r,i,p;return e&&e.split(`
6
+ `).forEach(function(s){p=s.indexOf(":"),r=s.substring(0,p).trim().toLowerCase(),i=s.substring(p+1).trim(),!(!r||t[r]&&ch[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},Ya=Symbol("internals");function Cr(e){return e&&String(e).trim().toLowerCase()}function Xr(e){return e===!1||e==null?e:se.isArray(e)?e.map(Xr):String(e)}function hh(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const ph=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pi(e,t,r,i,p){if(se.isFunction(i))return i.call(this,t,r);if(p&&(t=r),!!se.isString(t)){if(se.isString(i))return t.indexOf(i)!==-1;if(se.isRegExp(i))return i.test(t)}}function dh(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function yh(e,t){const r=se.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(p,l,s){return this[i].call(this,t,p,l,s)},configurable:!0})})}let tt=class{constructor(t){t&&this.set(t)}set(t,r,i){const p=this;function l(c,d,o){const n=Cr(d);if(!n)throw new Error("header name must be a non-empty string");const h=se.findKey(p,n);(!h||p[h]===void 0||o===!0||o===void 0&&p[h]!==!1)&&(p[h||d]=Xr(c))}const s=(c,d)=>se.forEach(c,(o,n)=>l(o,n,d));if(se.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(se.isString(t)&&(t=t.trim())&&!ph(t))s(fh(t),r);else if(se.isObject(t)&&se.isIterable(t)){let c={},d,o;for(const n of t){if(!se.isArray(n))throw TypeError("Object iterator must return a key-value pair");c[o=n[0]]=(d=c[o])?se.isArray(d)?[...d,n[1]]:[d,n[1]]:n[1]}s(c,r)}else t!=null&&l(r,t,i);return this}get(t,r){if(t=Cr(t),t){const i=se.findKey(this,t);if(i){const p=this[i];if(!r)return p;if(r===!0)return hh(p);if(se.isFunction(r))return r.call(this,p,i);if(se.isRegExp(r))return r.exec(p);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cr(t),t){const i=se.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||pi(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let p=!1;function l(s){if(s=Cr(s),s){const c=se.findKey(i,s);c&&(!r||pi(i,i[c],c,r))&&(delete i[c],p=!0)}}return se.isArray(t)?t.forEach(l):l(t),p}clear(t){const r=Object.keys(this);let i=r.length,p=!1;for(;i--;){const l=r[i];(!t||pi(this,this[l],l,t,!0))&&(delete this[l],p=!0)}return p}normalize(t){const r=this,i={};return se.forEach(this,(p,l)=>{const s=se.findKey(i,l);if(s){r[s]=Xr(p),delete r[l];return}const c=t?dh(l):String(l).trim();c!==l&&delete r[l],r[c]=Xr(p),i[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return se.forEach(this,(i,p)=>{i!=null&&i!==!1&&(r[p]=t&&se.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
7
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(p=>i.set(p)),i}static accessor(t){const i=(this[Ya]=this[Ya]={accessors:{}}).accessors,p=this.prototype;function l(s){const c=Cr(s);i[c]||(yh(p,s),i[c]=!0)}return se.isArray(t)?t.forEach(l):l(t),this}};tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(tt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}}),se.freezeMethods(tt);function di(e,t){const r=this||Ar,i=t||r,p=tt.from(i.headers);let l=i.data;return se.forEach(e,function(c){l=c.call(r,l,p.normalize(),t?t.status:void 0)}),p.normalize(),l}function Xa(e){return!!(e&&e.__CANCEL__)}function tr(e,t,r){Ee.call(this,e==null?"canceled":e,Ee.ERR_CANCELED,t,r),this.name="CanceledError"}se.inherits(tr,Ee,{__CANCEL__:!0});function Za(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Ee("Request failed with status code "+r.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function mh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function vh(e,t){e=e||10;const r=new Array(e),i=new Array(e);let p=0,l=0,s;return t=t!==void 0?t:1e3,function(d){const o=Date.now(),n=i[l];s||(s=o),r[p]=d,i[p]=o;let h=l,a=0;for(;h!==p;)a+=r[h++],h=h%e;if(p=(p+1)%e,p===l&&(l=(l+1)%e),o-s<t)return;const u=n&&o-n;return u?Math.round(a*1e3/u):void 0}}function xh(e,t){let r=0,i=1e3/t,p,l;const s=(o,n=Date.now())=>{r=n,p=null,l&&(clearTimeout(l),l=null),e(...o)};return[(...o)=>{const n=Date.now(),h=n-r;h>=i?s(o,n):(p=o,l||(l=setTimeout(()=>{l=null,s(p)},i-h)))},()=>p&&s(p)]}const Zr=(e,t,r=3)=>{let i=0;const p=vh(50,250);return xh(l=>{const s=l.loaded,c=l.lengthComputable?l.total:void 0,d=s-i,o=p(d),n=s<=c;i=s;const h={loaded:s,total:c,progress:c?s/c:void 0,bytes:d,rate:o||void 0,estimated:o&&c&&n?(c-s)/o:void 0,event:l,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},Ja=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},es=e=>(...t)=>se.asap(()=>e(...t)),gh=Ye.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ye.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ye.origin),Ye.navigator&&/(msie|trident)/i.test(Ye.navigator.userAgent)):()=>!0,bh=Ye.hasStandardBrowserEnv?{write(e,t,r,i,p,l){const s=[e+"="+encodeURIComponent(t)];se.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),se.isString(i)&&s.push("path="+i),se.isString(p)&&s.push("domain="+p),l===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Eh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ts(e,t,r){let i=!wh(t);return e&&(i||r==!1)?Eh(e,t):t}const rs=e=>e instanceof tt?he({},e):e;function Lt(e,t){t=t||{};const r={};function i(o,n,h,a){return se.isPlainObject(o)&&se.isPlainObject(n)?se.merge.call({caseless:a},o,n):se.isPlainObject(n)?se.merge({},n):se.isArray(n)?n.slice():n}function p(o,n,h,a){if(se.isUndefined(n)){if(!se.isUndefined(o))return i(void 0,o,h,a)}else return i(o,n,h,a)}function l(o,n){if(!se.isUndefined(n))return i(void 0,n)}function s(o,n){if(se.isUndefined(n)){if(!se.isUndefined(o))return i(void 0,o)}else return i(void 0,n)}function c(o,n,h){if(h in t)return i(o,n);if(h in e)return i(void 0,o)}const d={url:l,method:l,data:l,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(o,n,h)=>p(rs(o),rs(n),h,!0)};return se.forEach(Object.keys(he(he({},e),t)),function(n){const h=d[n]||p,a=h(e[n],t[n],n);se.isUndefined(a)&&h!==c||(r[n]=a)}),r}const ns=e=>{const t=Lt({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:p,xsrfCookieName:l,headers:s,auth:c}=t;t.headers=s=tt.from(s),t.url=Va(ts(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let d;if(se.isFormData(r)){if(Ye.hasStandardBrowserEnv||Ye.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((d=s.getContentType())!==!1){const[o,...n]=d?d.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([o||"multipart/form-data",...n].join("; "))}}if(Ye.hasStandardBrowserEnv&&(i&&se.isFunction(i)&&(i=i(t)),i||i!==!1&&gh(t.url))){const o=p&&l&&bh.read(l);o&&s.set(p,o)}return t},_h=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(r,i){const p=ns(e);let l=p.data;const s=tt.from(p.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:o}=p,n,h,a,u,f;function v(){u&&u(),f&&f(),p.cancelToken&&p.cancelToken.unsubscribe(n),p.signal&&p.signal.removeEventListener("abort",n)}let y=new XMLHttpRequest;y.open(p.method.toUpperCase(),p.url,!0),y.timeout=p.timeout;function g(){if(!y)return;const m=tt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),F={data:!c||c==="text"||c==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:m,config:e,request:y};Za(function(D){r(D),v()},function(D){i(D),v()},F),y=null}"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(g)},y.onabort=function(){y&&(i(new Ee("Request aborted",Ee.ECONNABORTED,e,y)),y=null)},y.onerror=function(){i(new Ee("Network Error",Ee.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let E=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded";const F=p.transitional||Ga;p.timeoutErrorMessage&&(E=p.timeoutErrorMessage),i(new Ee(E,F.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,e,y)),y=null},l===void 0&&s.setContentType(null),"setRequestHeader"in y&&se.forEach(s.toJSON(),function(E,F){y.setRequestHeader(F,E)}),se.isUndefined(p.withCredentials)||(y.withCredentials=!!p.withCredentials),c&&c!=="json"&&(y.responseType=p.responseType),o&&([a,f]=Zr(o,!0),y.addEventListener("progress",a)),d&&y.upload&&([h,u]=Zr(d),y.upload.addEventListener("progress",h),y.upload.addEventListener("loadend",u)),(p.cancelToken||p.signal)&&(n=m=>{y&&(i(!m||m.type?new tr(null,e,y):m),y.abort(),y=null)},p.cancelToken&&p.cancelToken.subscribe(n),p.signal&&(p.signal.aborted?n():p.signal.addEventListener("abort",n)));const b=mh(p.url);if(b&&Ye.protocols.indexOf(b)===-1){i(new Ee("Unsupported protocol "+b+":",Ee.ERR_BAD_REQUEST,e));return}y.send(l||null)})},Ah=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,p;const l=function(o){if(!p){p=!0,c();const n=o instanceof Error?o:this.reason;i.abort(n instanceof Ee?n:new tr(n instanceof Error?n.message:n))}};let s=t&&setTimeout(()=>{s=null,l(new Ee(`timeout ${t} of ms exceeded`,Ee.ETIMEDOUT))},t);const c=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(o=>{o.unsubscribe?o.unsubscribe(l):o.removeEventListener("abort",l)}),e=null)};e.forEach(o=>o.addEventListener("abort",l));const{signal:d}=i;return d.unsubscribe=()=>se.asap(c),d}},Ch=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let i=0,p;for(;i<r;)p=i+t,yield e.slice(i,p),i=p},Sh=function(e,t){return Bo(this,null,function*(){try{for(var r=bl(Bh(e)),i,p,l;i=!(p=yield new Vt(r.next())).done;i=!1){const s=p.value;yield*ko(Ch(s,t))}}catch(p){l=[p]}finally{try{i&&(p=r.return)&&(yield new Vt(p.call(r)))}finally{if(l)throw l[0]}}})},Bh=function(e){return Bo(this,null,function*(){if(e[Symbol.asyncIterator]){yield*ko(e);return}const t=e.getReader();try{for(;;){const{done:r,value:i}=yield new Vt(t.read());if(r)break;yield i}}finally{yield new Vt(t.cancel())}})},is=(e,t,r,i)=>{const p=Sh(e,t);let l=0,s,c=o=>{s||(s=!0,i&&i(o))};return new ReadableStream({pull(o){return Qe(this,null,function*(){try{const{done:n,value:h}=yield p.next();if(n){c(),o.close();return}let a=h.byteLength;if(r){let u=l+=a;r(u)}o.enqueue(new Uint8Array(h))}catch(n){throw c(n),n}})},cancel(o){return c(o),p.return()}},{highWaterMark:2})},Jr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",os=Jr&&typeof ReadableStream=="function",kh=Jr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):e=>Qe(this,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),as=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},Th=os&&as(()=>{let e=!1;const t=new Request(Ye.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ss=64*1024,yi=os&&as(()=>se.isReadableStream(new Response("").body)),en={stream:yi&&(e=>e.body)};Jr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!en[t]&&(en[t]=se.isFunction(e[t])?r=>r[t]():(r,i)=>{throw new Ee(`Response type '${t}' is not supported`,Ee.ERR_NOT_SUPPORT,i)})})})(new Response);const Fh=e=>Qe(this,null,function*(){if(e==null)return 0;if(se.isBlob(e))return e.size;if(se.isSpecCompliantForm(e))return(yield new Request(Ye.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(se.isArrayBufferView(e)||se.isArrayBuffer(e))return e.byteLength;if(se.isURLSearchParams(e)&&(e=e+""),se.isString(e))return(yield kh(e)).byteLength}),Dh=(e,t)=>Qe(this,null,function*(){const r=se.toFiniteNumber(e.getContentLength());return r==null?Fh(t):r}),mi={http:Zf,xhr:_h,fetch:Jr&&(e=>Qe(this,null,function*(){let{url:t,method:r,data:i,signal:p,cancelToken:l,timeout:s,onDownloadProgress:c,onUploadProgress:d,responseType:o,headers:n,withCredentials:h="same-origin",fetchOptions:a}=ns(e);o=o?(o+"").toLowerCase():"text";let u=Ah([p,l&&l.toAbortSignal()],s),f;const v=u&&u.unsubscribe&&(()=>{u.unsubscribe()});let y;try{if(d&&Th&&r!=="get"&&r!=="head"&&(y=yield Dh(n,i))!==0){let F=new Request(t,{method:"POST",body:i,duplex:"half"}),T;if(se.isFormData(i)&&(T=F.headers.get("content-type"))&&n.setContentType(T),F.body){const[D,I]=Ja(y,Zr(es(d)));i=is(F.body,ss,D,I)}}se.isString(h)||(h=h?"include":"omit");const g="credentials"in Request.prototype;f=new Request(t,De(he({},a),{signal:u,method:r.toUpperCase(),headers:n.normalize().toJSON(),body:i,duplex:"half",credentials:g?h:void 0}));let b=yield fetch(f,a);const m=yi&&(o==="stream"||o==="response");if(yi&&(c||m&&v)){const F={};["status","statusText","headers"].forEach(Y=>{F[Y]=b[Y]});const T=se.toFiniteNumber(b.headers.get("content-length")),[D,I]=c&&Ja(T,Zr(es(c),!0))||[];b=new Response(is(b.body,ss,D,()=>{I&&I(),v&&v()}),F)}o=o||"text";let E=yield en[se.findKey(en,o)||"text"](b,e);return!m&&v&&v(),yield new Promise((F,T)=>{Za(F,T,{data:E,headers:tt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:f})})}catch(g){throw v&&v(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new Ee("Network Error",Ee.ERR_NETWORK,e,f),{cause:g.cause||g}):Ee.from(g,g&&g.code,e,f)}}))};se.forEach(mi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const ls=e=>`- ${e}`,Ih=e=>se.isFunction(e)||e===null||e===!1,us={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let r,i;const p={};for(let l=0;l<t;l++){r=e[l];let s;if(i=r,!Ih(r)&&(i=mi[(s=String(r)).toLowerCase()],i===void 0))throw new Ee(`Unknown adapter '${s}'`);if(i)break;p[s||"#"+l]=i}if(!i){const l=Object.entries(p).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=t?l.length>1?`since :
8
+ `+l.map(ls).join(`
9
+ `):" "+ls(l[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:mi};function vi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tr(null,e)}function cs(e){return vi(e),e.headers=tt.from(e.headers),e.data=di.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),us.getAdapter(e.adapter||Ar.adapter)(e).then(function(i){return vi(e),i.data=di.call(e,e.transformResponse,i),i.headers=tt.from(i.headers),i},function(i){return Xa(i)||(vi(e),i&&i.response&&(i.response.data=di.call(e,e.transformResponse,i.response),i.response.headers=tt.from(i.response.headers))),Promise.reject(i)})}const fs="1.11.0",tn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tn[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const hs={};tn.transitional=function(t,r,i){function p(l,s){return"[Axios v"+fs+"] Transitional option '"+l+"'"+s+(i?". "+i:"")}return(l,s,c)=>{if(t===!1)throw new Ee(p(s," has been removed"+(r?" in "+r:"")),Ee.ERR_DEPRECATED);return r&&!hs[s]&&(hs[s]=!0,console.warn(p(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(l,s,c):!0}},tn.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function Rh(e,t,r){if(typeof e!="object")throw new Ee("options must be an object",Ee.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let p=i.length;for(;p-- >0;){const l=i[p],s=t[l];if(s){const c=e[l],d=c===void 0||s(c,l,e);if(d!==!0)throw new Ee("option "+l+" must be "+d,Ee.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ee("Unknown option "+l,Ee.ERR_BAD_OPTION)}}const rn={assertOptions:Rh,validators:tn},vt=rn.validators;let Ut=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ka,response:new Ka}}request(t,r){return Qe(this,null,function*(){try{return yield this._request(t,r)}catch(i){if(i instanceof Error){let p={};Error.captureStackTrace?Error.captureStackTrace(p):p=new Error;const l=p.stack?p.stack.replace(/^.+\n/,""):"";try{i.stack?l&&!String(i.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(i.stack+=`
10
+ `+l):i.stack=l}catch(s){}}throw i}})}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Lt(this.defaults,r);const{transitional:i,paramsSerializer:p,headers:l}=r;i!==void 0&&rn.assertOptions(i,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1),p!=null&&(se.isFunction(p)?r.paramsSerializer={serialize:p}:rn.assertOptions(p,{encode:vt.function,serialize:vt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),rn.assertOptions(r,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=l&&se.merge(l.common,l[r.method]);l&&se.forEach(["delete","get","head","post","put","patch","common"],f=>{delete l[f]}),r.headers=tt.concat(s,l);const c=[];let d=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(d=d&&v.synchronous,c.unshift(v.fulfilled,v.rejected))});const o=[];this.interceptors.response.forEach(function(v){o.push(v.fulfilled,v.rejected)});let n,h=0,a;if(!d){const f=[cs.bind(this),void 0];for(f.unshift(...c),f.push(...o),a=f.length,n=Promise.resolve(r);h<a;)n=n.then(f[h++],f[h++]);return n}a=c.length;let u=r;for(h=0;h<a;){const f=c[h++],v=c[h++];try{u=f(u)}catch(y){v.call(this,y);break}}try{n=cs.call(this,u)}catch(f){return Promise.reject(f)}for(h=0,a=o.length;h<a;)n=n.then(o[h++],o[h++]);return n}getUri(t){t=Lt(this.defaults,t);const r=ts(t.baseURL,t.url,t.allowAbsoluteUrls);return Va(r,t.params,t.paramsSerializer)}};se.forEach(["delete","get","head","options"],function(t){Ut.prototype[t]=function(r,i){return this.request(Lt(i||{},{method:t,url:r,data:(i||{}).data}))}}),se.forEach(["post","put","patch"],function(t){function r(i){return function(l,s,c){return this.request(Lt(c||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:l,data:s}))}}Ut.prototype[t]=r(),Ut.prototype[t+"Form"]=r(!0)});let Oh=class wl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(l){r=l});const i=this;this.promise.then(p=>{if(!i._listeners)return;let l=i._listeners.length;for(;l-- >0;)i._listeners[l](p);i._listeners=null}),this.promise.then=p=>{let l;const s=new Promise(c=>{i.subscribe(c),l=c}).then(p);return s.cancel=function(){i.unsubscribe(l)},s},t(function(l,s,c){i.reason||(i.reason=new tr(l,s,c),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new wl(function(p){t=p}),cancel:t}}};function Ph(e){return function(r){return e.apply(null,r)}}function Mh(e){return se.isObject(e)&&e.isAxiosError===!0}const xi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xi).forEach(([e,t])=>{xi[t]=e});function ps(e){const t=new Ut(e),r=Da(Ut.prototype.request,t);return se.extend(r,Ut.prototype,t,{allOwnKeys:!0}),se.extend(r,t,null,{allOwnKeys:!0}),r.create=function(p){return ps(Lt(e,p))},r}const Le=ps(Ar);Le.Axios=Ut,Le.CanceledError=tr,Le.CancelToken=Oh,Le.isCancel=Xa,Le.VERSION=fs,Le.toFormData=Yr,Le.AxiosError=Ee,Le.Cancel=Le.CanceledError,Le.all=function(t){return Promise.all(t)},Le.spread=Ph,Le.isAxiosError=Mh,Le.mergeConfig=Lt,Le.AxiosHeaders=tt,Le.formToJSON=e=>Qa(se.isHTMLForm(e)?new FormData(e):e),Le.getAdapter=us.getAdapter,Le.HttpStatusCode=xi,Le.default=Le;const{Axios:E1,AxiosError:_1,CanceledError:A1,isCancel:C1,CancelToken:S1,VERSION:B1,all:k1,Cancel:T1,isAxiosError:F1,spread:D1,toFormData:I1,AxiosHeaders:R1,HttpStatusCode:O1,formToJSON:P1,getAdapter:M1,mergeConfig:N1}=Le,ct={CUSTOM_MSG:"CUSTOM_MSG",OPEN_CAMERA:"OPEN_CAMERA",CLOSE_CAMERA:"CLOSE_CAMERA",OPEN_AUDIO:"OPEN_AUDIO",CLOSE_AUDIO:"CLOSE_AUDIO",CHANGE_GRAPH:"CHANGE_GRAPH",NOTIFY_DIALOG:"NOTIFY_DIALOG"},Nh={OFFLINE:0},ke={NORMAL:"NORMAL",TEXT:"TEXT",AUDIO:"AUDIO",MP4:"MP4",CAMERA:"CAMERA",VIDEO_STREAM:"VIDEO_STREAM",POINT_VALUE:"POINT_VALUE",LIGHT_PLATE:"LIGHT_PLATE",SENSOR:"SENSOR",TABLE:"TABLE",SWITCH:"SWITCH",RADIO:"RADIO",SLIDER:"SLIDER",SELECT:"SELECT",CHECKBOX:"CHECKBOX",TIME:"TIME",BUTTON:"BUTTON",INPUT:"INPUT"},gi={POINT:5,YX:6,YC:7},nn={Emit:7},Lh={STOP:2},Uh={1:1,2:2,3:3,4:4,5:5},on={WUJIE:"wujie",QIANKUN:"qiankun",MICROAPP:"microapp"},ds={GRAPH:{SOCKET:"GRAPH_SOCKET"}},ys={AC:{ALARM:"ac.channel.alarm",CONDITION:"ac.channel.gk",OPERATION:"ac.channel.op"},AUDIT:{MSG:"audit.msg",ALARM:"audit.alarm"},DATA:{TASK_STATUS:"data.patroldevice.taskstatus",TASK_RESULT:"data.patroldevice.taskresult"},HOST:{STATUS:"status.platform.hoststatus"},NEST:{BATTERY:"status.platform.nestbattery",HUMIDITY:"status.platform.nesthumidity",TEMPERATURE:"status.platform.nesttemperature",AIR_STATE:"status.platform.nestairstate",DOOR_STATE:"status.platform.nestdoorstate",CHARGE_STATE:"status.platform.nestchargestate",RUNNING_STATE:"status.platform.nestrunningstate",BATTERY_STATE:"status.platform.nestbatterystate",BATTERY_ENABLE:"status.platform.nestbatteryenable",BATTERY_VOLTAGE:"status.platform.nestbatteryvoltage",PLATFORM_STATE:"status.platform.nestsysstate"},MEDIA:{NVR_INFO:"status.platform.nvrinfo",NVR_STATUS:"status.platform.nvrstatus",CAMERA_STATUS:"status.platform.camerastatus"},DRONE:{STATUS:"status.platform.dronestatus",ELECTRICITY:"status.platform.droneelectricity",FLIGHT_TIME:"status.platform.flighttime",FLIGHT_HEIGHT:"status.platform.flightheight",FLIGHT_STATUS:"status.platform.flightstatus",FLIGHT_DISTANCE:"status.platform.flightdistance",PTZ_ELEVATION:"status.platform.ptzelevation",PTZ_YAW_ANGLE:"status.platform.ptzyawangle",PTZ_ROLL_ANGLE:"status.platform.ptzrollangle",LOW_BATTERY:"status.platform.lowbattery",COMM_ABNORMAL:"status.platform.commabnormal",DRIVE_EXCEPTION:"status.platform.driveexception",FAULT_ALARM:"status.platform.faultalarm",CONTROL_STATUS:"status.platform.controlstatus",MILEAGE:"status.platform.mileage",CONTROL_MODE:"status.platform.controlmode"},ROBOT:{SPEED:"status.platform.robotspeed",STATUS:"status.platform.robotstatus",BATTERY:"status.platform.robotbattery",MILEAGE:"status.platform.robotmileage",HUMIDITY:"status.platform.robothumidity",WINDSPEED:"status.platform.robotwindspeed",COORDINATE:"status.platform.robotcoordinate",COORDINATES:"status.platform.robotcoordinates",FAULT_ALARM:"status.platform.robotfaultalarm",LOW_BATTERY:"status.platform.robotlowbattery",TEMPERATURE:"status.platform.robottemperature",CONTROL_MODE:"status.platform.robotcontrolmode",COMM_ABNORMAL:"status.platform.robotcommabnormal",RUNNING_STATE:"status.platform.robotrunningstate",CONTROL_STATUS:"status.platform.robotcontrolstatus",DRIVE_EXCEPTION:"status.platform.robotdriveexception",TRANSPORT_STATUS:"status.platform.robottransportstatus",ULTRASONIC_STOPPING:"status.platform.robotultrasonicstopping"},VOICE:{STATUS:"voiceprint.status",DATA:"voice.data",VOICEPRINT:"voiceprint.data",TIME_DOMAIN:"voiceprint.time.domain",FREQ_DOMAIN:"voiceprint.freq.domain"},PATROL:{ALARM:"patrol.alarm",TASK_ITEM:"patrol.task.item",TASK_INDEX:"patrol.task.index",SINGLE_RESULT:"patrol.single.result",CAMERA_ITEM:"patrol.camera.item",PATROLDEVICE_TASKSTATUS:"data.patroldevice.taskstatus",PATROLDEVICE_TASKRESULT:"data.patroldevice.taskresult",MASTER_ALARM:"patrol.master.alarm",MASTER_SILENCE:"patrol.task.master.silence",MASTER_TASK_ITEM:"patrol.task.master.item",MASTER_TASK_INDEX:"patrol.task.master.index"},REPORT:{ALARM:"report.alarm.message",EXCEL:"report.excel.message",PATROL:"report.patrol.message",PICTURE:"report.picture.message"},ACPOINT:{YCVALUE:"status.platform.ycvalue",YXVALUE:"status.platform.yxvalue"},ALARM:{VOICE:"alarm.platform.alarm"},LINKAGE:{TASK:"linkage.record.task",CAMERA:"linkage.record.camera",PRESET:"linkage.record.preset",CONTROL:"linkage.record.control",PATROLPOINT:"linkage.record.patrolpoint"},METRICS:{SERVER:"metrics.metrics.server",CONTAINER:"metrics.metrics.container"},STATION:{SF6:"status.platform.stationsf6",OXYGEN:"status.platform.stationoxygen",HUMIDITY:"status.platform.stationhumidity",PRESSURE:"status.platform.stationpressure",RAINFALL:"status.platform.stationrainfall",WINDSPEED:"status.platform.stationwindspeed",TEMPERATURE:"status.platform.stationtemperature",WINDDIRECTION:"status.platform.stationwinddirection"},INTERFACE:{ANALYSIS:"analyse.pic.result",ALGORITHM:"algorithm.update.result"},PATROL_DEVICE:{BATTERY:"status.platform.battery",MILEAGE:"status.platform.mileage",GEOGRAPHY:"status.platform.coordinate_geography",COORDINATE:"status.platform.coordinate",COORDINATES:"status.platform.coordinates",ELECTRICITY:"status.platform.electricity",PTZYAWANGLE:"status.platform.ptzyawangle",PTZELEVATION:"status.platform.ptzelevation",PTZROLLANGLE:"status.platform.ptzrollangle",VERTICAL_SPEED:"status.platform.verticalspeed",HORIZONTAL_SPEED:"status.platform.horizontalspeed",FAULT_ALARM:"status.platform.faultalarm",LOW_BATTERY:"status.platform.lowbattery",CONTROL_MODE:"status.platform.controlmode",COMM_ABNORMAL:"status.platform.commabnormal",RUNNING_STATE:"status.platform.runningstate",CONTROL_STATUS:"status.platform.controlstatus",DRIVE_EXCEPTION:"status.platform.driveexception",TRANSPORT_STATUS:"status.platform.transportstatus",ULTRASONIC_STOPPING:"status.platform.ultrasonicstopping"}};var an={};/*!
11
+ * vite-plugin-qiankun.js v1.0.14
12
+ * (c) 2021-2022 Teng Mao Qing
13
+ * Released under the MIT License.
14
+ */Object.defineProperty(an,"__esModule",{value:!0});var rr=typeof window!="undefined"?window.proxy||window:{},ms=function(e){rr!=null&&rr.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),rr.qiankunName&&(window.moudleQiankunAppLifeCycles[rr.qiankunName]=e))};an.default=ms;var qh=an.qiankunWindow=rr;an.renderWithQiankun=ms;const zh="/",bi=((tl=(el=(J0=(qh||window).meta)==null?void 0:J0.vite)==null?void 0:el.micro)==null?void 0:tl.type)||on.QIANKUN,vs=bi===on.WUJIE,xs=bi===on.QIANKUN,gs=bi===on.MICROAPP,jh=window.top!==window.self||vs||xs||gs;console.log("🚀 ~ isNested:",jh,vs,xs,gs);const Hh=location.protocol==="https:";(nl=(rl=window.meta)==null?void 0:rl.app)!=null&&nl.server_ip||location.origin;const $h=Hh?"wss:":"ws:",Wh=location.origin;(ol=(il=window==null?void 0:window.meta)==null?void 0:il.graph)!=null&&ol.savePath,(sl=(al=window==null?void 0:window.meta)==null?void 0:al.graph)!=null&&sl.templatePath;const bs=`${$h}//${location.host}/ws`,Pe=Le.create({baseURL:Wh,timeout:window.REQUEST_TIMEOUT||3e4,withCredentials:!1,paramsSerializer:e=>pf.stringify(e)});Pe.interceptors.request.use(e=>(e.headers["x-token"]="ewoglCJhbGcilDogpc3",e),e=>Promise.reject(e)),Pe.interceptors.response.use(e=>{const{data:t}=e;return Promise.resolve(t)},e=>Promise.reject(e));function Vh(e,t={},r={}){return new Promise(i=>{Pe.get(e,he({params:t},r)).then(p=>i({res:p,err:null})).catch(p=>i({res:null,err:p}))})}function Kh(e,t={},r={}){return new Promise(i=>{Pe.post(e,t,r).then(p=>i({res:p,err:null})).catch(p=>i({res:null,err:p}))})}function Gh(e,t={},r={}){return Pe.get(e,he({params:t},r))}function Qh(e,t={},r={}){return Pe.post(e,t,r)}function Yh(e,t={}){return Pe.get(`/filehandle/${e}`,{params:t})}function Xh(e,t={},r={}){return Pe.post(`/filehandle/${e}`,t,r)}function Zh(e,t={}){return Pe.get(`/user/${e}`,{params:t})}function Jh(e,t={},r={}){return Pe.post(`/user/${e}`,t,r)}function ep(e,t={}){return Pe.get(`${e}`,t.local?{params:t,baseURL:zh}:{params:t})}function tp(e,t={}){return Pe.get(`/media/${e}/`,{params:t})}function rp(e,t={},r={}){return Pe.post(`/media/${e}/`,t,r)}function np(e,t={}){return Pe.get(`/common/${e}/`,{params:t})}function ip(e,t={},r={}){return Pe.post(`/common/${e}/`,t,r)}function op(e,t={}){return Pe.get(`/history/${e}`,{params:t})}function ap(e,t={},r={}){return Pe.post(`/history/${e}`,t,r)}function sp(e,t={}){return Pe.get(`/scada/${e}`,{params:t})}function lp(e,t={},r={}){return Pe.post(`/scada/${e}`,t,r)}function up(e,t={}){return Pe.get(`/common/factory/${e}`,{params:t})}function cp(e,t={},r={}){return Pe.post(`/common/factory/${e}`,t,r)}function fp(e,t={}){return Pe.get(`/factory/${e}`,{params:t})}function hp(e,t={},r={}){return Pe.post(`/factory/${e}`,t,r)}const wi={getApi:Vh,postApi:Kh,getFileApi:Yh,postFileApi:Xh,getBaseApi:Gh,postBaseApi:Qh,getUserApi:Zh,postUserApi:Jh,getGraphApi:ep,getMediaApi:tp,postMediaApi:rp,getScadaApi:sp,postScadaApi:lp,getCommonApi:np,postCommonApi:ip,getHistoryApi:op,postHistoryApi:ap,getFactoryApi:fp,postFactoryApi:hp,getCommonFactoryApi:up,postCommonFactoryApi:cp};function pp(e){return{all:e=e||new Map,on:function(t,r){var i=e.get(t);i?i.push(r):e.set(t,[r])},off:function(t,r){var i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var i=e.get(t);i&&i.slice().map(function(p){p(r)}),(i=e.get("*"))&&i.slice().map(function(p){p(t,r)})}}}const Ei=pp(),ws=e=>{const{quality:t,value:r,function_id:i}=e;return(t>>7&1)===1||t===0&&i===2&&r===1};function Es(e){return Object.prototype.toString.call(e).slice(8,-1)}var dp={exports:{}};function Sr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _i={exports:{}},_s;function Se(){return _s||(_s=1,function(e,t){(function(r,i){e.exports=i()})(be,function(){var r=r||function(i,p){var l;if(typeof window!="undefined"&&window.crypto&&(l=window.crypto),typeof self!="undefined"&&self.crypto&&(l=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(l=globalThis.crypto),!l&&typeof window!="undefined"&&window.msCrypto&&(l=window.msCrypto),!l&&typeof be!="undefined"&&be.crypto&&(l=be.crypto),!l&&typeof Sr=="function")try{l=Do}catch(b){}var s=function(){if(l){if(typeof l.getRandomValues=="function")try{return l.getRandomValues(new Uint32Array(1))[0]}catch(b){}if(typeof l.randomBytes=="function")try{return l.randomBytes(4).readInt32LE()}catch(b){}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||function(){function b(){}return function(m){var E;return b.prototype=m,E=new b,b.prototype=null,E}}(),d={},o=d.lib={},n=o.Base=function(){return{extend:function(b){var m=c(this);return b&&m.mixIn(b),(!m.hasOwnProperty("init")||this.init===m.init)&&(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var m in b)b.hasOwnProperty(m)&&(this[m]=b[m]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),h=o.WordArray=n.extend({init:function(b,m){b=this.words=b||[],m!=p?this.sigBytes=m:this.sigBytes=b.length*4},toString:function(b){return(b||u).stringify(this)},concat:function(b){var m=this.words,E=b.words,F=this.sigBytes,T=b.sigBytes;if(this.clamp(),F%4)for(var D=0;D<T;D++){var I=E[D>>>2]>>>24-D%4*8&255;m[F+D>>>2]|=I<<24-(F+D)%4*8}else for(var Y=0;Y<T;Y+=4)m[F+Y>>>2]=E[Y>>>2];return this.sigBytes+=T,this},clamp:function(){var b=this.words,m=this.sigBytes;b[m>>>2]&=4294967295<<32-m%4*8,b.length=i.ceil(m/4)},clone:function(){var b=n.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var m=[],E=0;E<b;E+=4)m.push(s());return new h.init(m,b)}}),a=d.enc={},u=a.Hex={stringify:function(b){for(var m=b.words,E=b.sigBytes,F=[],T=0;T<E;T++){var D=m[T>>>2]>>>24-T%4*8&255;F.push((D>>>4).toString(16)),F.push((D&15).toString(16))}return F.join("")},parse:function(b){for(var m=b.length,E=[],F=0;F<m;F+=2)E[F>>>3]|=parseInt(b.substr(F,2),16)<<24-F%8*4;return new h.init(E,m/2)}},f=a.Latin1={stringify:function(b){for(var m=b.words,E=b.sigBytes,F=[],T=0;T<E;T++){var D=m[T>>>2]>>>24-T%4*8&255;F.push(String.fromCharCode(D))}return F.join("")},parse:function(b){for(var m=b.length,E=[],F=0;F<m;F++)E[F>>>2]|=(b.charCodeAt(F)&255)<<24-F%4*8;return new h.init(E,m)}},v=a.Utf8={stringify:function(b){try{return decodeURIComponent(escape(f.stringify(b)))}catch(m){throw new Error("Malformed UTF-8 data")}},parse:function(b){return f.parse(unescape(encodeURIComponent(b)))}},y=o.BufferedBlockAlgorithm=n.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=v.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var m,E=this._data,F=E.words,T=E.sigBytes,D=this.blockSize,I=D*4,Y=T/I;b?Y=i.ceil(Y):Y=i.max((Y|0)-this._minBufferSize,0);var W=Y*D,_=i.min(W*4,T);if(W){for(var A=0;A<W;A+=D)this._doProcessBlock(F,A);m=F.splice(0,W),E.sigBytes-=_}return new h.init(m,_)},clone:function(){var b=n.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0});o.Hasher=y.extend({cfg:n.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){b&&this._append(b);var m=this._doFinalize();return m},blockSize:16,_createHelper:function(b){return function(m,E){return new b.init(E).finalize(m)}},_createHmacHelper:function(b){return function(m,E){return new g.HMAC.init(b,E).finalize(m)}}});var g=d.algo={};return d}(Math);return r})}(_i)),_i.exports}var Ai={exports:{}},As;function sn(){return As||(As=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(i){var p=r,l=p.lib,s=l.Base,c=l.WordArray,d=p.x64={};d.Word=s.extend({init:function(o,n){this.high=o,this.low=n}}),d.WordArray=s.extend({init:function(o,n){o=this.words=o||[],n!=i?this.sigBytes=n:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,n=o.length,h=[],a=0;a<n;a++){var u=o[a];h.push(u.high),h.push(u.low)}return c.create(h,this.sigBytes)},clone:function(){for(var o=s.clone.call(this),n=o.words=this.words.slice(0),h=n.length,a=0;a<h;a++)n[a]=n[a].clone();return o}})}(),r})}(Ai)),Ai.exports}var Ci={exports:{}},Cs;function yp(){return Cs||(Cs=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(){if(typeof ArrayBuffer=="function"){var i=r,p=i.lib,l=p.WordArray,s=l.init,c=l.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var o=d.byteLength,n=[],h=0;h<o;h++)n[h>>>2]|=d[h]<<24-h%4*8;s.call(this,n,o)}else s.apply(this,arguments)};c.prototype=l}}(),r.lib.WordArray})}(Ci)),Ci.exports}var Si={exports:{}},Ss;function mp(){return Ss||(Ss=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(){var i=r,p=i.lib,l=p.WordArray,s=i.enc;s.Utf16=s.Utf16BE={stringify:function(d){for(var o=d.words,n=d.sigBytes,h=[],a=0;a<n;a+=2){var u=o[a>>>2]>>>16-a%4*8&65535;h.push(String.fromCharCode(u))}return h.join("")},parse:function(d){for(var o=d.length,n=[],h=0;h<o;h++)n[h>>>1]|=d.charCodeAt(h)<<16-h%2*16;return l.create(n,o*2)}},s.Utf16LE={stringify:function(d){for(var o=d.words,n=d.sigBytes,h=[],a=0;a<n;a+=2){var u=c(o[a>>>2]>>>16-a%4*8&65535);h.push(String.fromCharCode(u))}return h.join("")},parse:function(d){for(var o=d.length,n=[],h=0;h<o;h++)n[h>>>1]|=c(d.charCodeAt(h)<<16-h%2*16);return l.create(n,o*2)}};function c(d){return d<<8&4278255360|d>>>8&16711935}}(),r.enc.Utf16})}(Si)),Si.exports}var Bi={exports:{}},Bs;function qt(){return Bs||(Bs=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(){var i=r,p=i.lib,l=p.WordArray,s=i.enc;s.Base64={stringify:function(d){var o=d.words,n=d.sigBytes,h=this._map;d.clamp();for(var a=[],u=0;u<n;u+=3)for(var f=o[u>>>2]>>>24-u%4*8&255,v=o[u+1>>>2]>>>24-(u+1)%4*8&255,y=o[u+2>>>2]>>>24-(u+2)%4*8&255,g=f<<16|v<<8|y,b=0;b<4&&u+b*.75<n;b++)a.push(h.charAt(g>>>6*(3-b)&63));var m=h.charAt(64);if(m)for(;a.length%4;)a.push(m);return a.join("")},parse:function(d){var o=d.length,n=this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var a=0;a<n.length;a++)h[n.charCodeAt(a)]=a}var u=n.charAt(64);if(u){var f=d.indexOf(u);f!==-1&&(o=f)}return c(d,o,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(d,o,n){for(var h=[],a=0,u=0;u<o;u++)if(u%4){var f=n[d.charCodeAt(u-1)]<<u%4*2,v=n[d.charCodeAt(u)]>>>6-u%4*2,y=f|v;h[a>>>2]|=y<<24-a%4*8,a++}return l.create(h,a)}}(),r.enc.Base64})}(Bi)),Bi.exports}var ki={exports:{}},ks;function vp(){return ks||(ks=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(){var i=r,p=i.lib,l=p.WordArray,s=i.enc;s.Base64url={stringify:function(d,o){o===void 0&&(o=!0);var n=d.words,h=d.sigBytes,a=o?this._safe_map:this._map;d.clamp();for(var u=[],f=0;f<h;f+=3)for(var v=n[f>>>2]>>>24-f%4*8&255,y=n[f+1>>>2]>>>24-(f+1)%4*8&255,g=n[f+2>>>2]>>>24-(f+2)%4*8&255,b=v<<16|y<<8|g,m=0;m<4&&f+m*.75<h;m++)u.push(a.charAt(b>>>6*(3-m)&63));var E=a.charAt(64);if(E)for(;u.length%4;)u.push(E);return u.join("")},parse:function(d,o){o===void 0&&(o=!0);var n=d.length,h=o?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var u=0;u<h.length;u++)a[h.charCodeAt(u)]=u}var f=h.charAt(64);if(f){var v=d.indexOf(f);v!==-1&&(n=v)}return c(d,n,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(d,o,n){for(var h=[],a=0,u=0;u<o;u++)if(u%4){var f=n[d.charCodeAt(u-1)]<<u%4*2,v=n[d.charCodeAt(u)]>>>6-u%4*2,y=f|v;h[a>>>2]|=y<<24-a%4*8,a++}return l.create(h,a)}}(),r.enc.Base64url})}(ki)),ki.exports}var Ti={exports:{}},Ts;function zt(){return Ts||(Ts=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(i){var p=r,l=p.lib,s=l.WordArray,c=l.Hasher,d=p.algo,o=[];(function(){for(var v=0;v<64;v++)o[v]=i.abs(i.sin(v+1))*4294967296|0})();var n=d.MD5=c.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,y){for(var g=0;g<16;g++){var b=y+g,m=v[b];v[b]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var E=this._hash.words,F=v[y+0],T=v[y+1],D=v[y+2],I=v[y+3],Y=v[y+4],W=v[y+5],_=v[y+6],A=v[y+7],C=v[y+8],B=v[y+9],N=v[y+10],q=v[y+11],X=v[y+12],$=v[y+13],M=v[y+14],j=v[y+15],L=E[0],R=E[1],H=E[2],V=E[3];L=h(L,R,H,V,F,7,o[0]),V=h(V,L,R,H,T,12,o[1]),H=h(H,V,L,R,D,17,o[2]),R=h(R,H,V,L,I,22,o[3]),L=h(L,R,H,V,Y,7,o[4]),V=h(V,L,R,H,W,12,o[5]),H=h(H,V,L,R,_,17,o[6]),R=h(R,H,V,L,A,22,o[7]),L=h(L,R,H,V,C,7,o[8]),V=h(V,L,R,H,B,12,o[9]),H=h(H,V,L,R,N,17,o[10]),R=h(R,H,V,L,q,22,o[11]),L=h(L,R,H,V,X,7,o[12]),V=h(V,L,R,H,$,12,o[13]),H=h(H,V,L,R,M,17,o[14]),R=h(R,H,V,L,j,22,o[15]),L=a(L,R,H,V,T,5,o[16]),V=a(V,L,R,H,_,9,o[17]),H=a(H,V,L,R,q,14,o[18]),R=a(R,H,V,L,F,20,o[19]),L=a(L,R,H,V,W,5,o[20]),V=a(V,L,R,H,N,9,o[21]),H=a(H,V,L,R,j,14,o[22]),R=a(R,H,V,L,Y,20,o[23]),L=a(L,R,H,V,B,5,o[24]),V=a(V,L,R,H,M,9,o[25]),H=a(H,V,L,R,I,14,o[26]),R=a(R,H,V,L,C,20,o[27]),L=a(L,R,H,V,$,5,o[28]),V=a(V,L,R,H,D,9,o[29]),H=a(H,V,L,R,A,14,o[30]),R=a(R,H,V,L,X,20,o[31]),L=u(L,R,H,V,W,4,o[32]),V=u(V,L,R,H,C,11,o[33]),H=u(H,V,L,R,q,16,o[34]),R=u(R,H,V,L,M,23,o[35]),L=u(L,R,H,V,T,4,o[36]),V=u(V,L,R,H,Y,11,o[37]),H=u(H,V,L,R,A,16,o[38]),R=u(R,H,V,L,N,23,o[39]),L=u(L,R,H,V,$,4,o[40]),V=u(V,L,R,H,F,11,o[41]),H=u(H,V,L,R,I,16,o[42]),R=u(R,H,V,L,_,23,o[43]),L=u(L,R,H,V,B,4,o[44]),V=u(V,L,R,H,X,11,o[45]),H=u(H,V,L,R,j,16,o[46]),R=u(R,H,V,L,D,23,o[47]),L=f(L,R,H,V,F,6,o[48]),V=f(V,L,R,H,A,10,o[49]),H=f(H,V,L,R,M,15,o[50]),R=f(R,H,V,L,W,21,o[51]),L=f(L,R,H,V,X,6,o[52]),V=f(V,L,R,H,I,10,o[53]),H=f(H,V,L,R,N,15,o[54]),R=f(R,H,V,L,T,21,o[55]),L=f(L,R,H,V,C,6,o[56]),V=f(V,L,R,H,j,10,o[57]),H=f(H,V,L,R,_,15,o[58]),R=f(R,H,V,L,$,21,o[59]),L=f(L,R,H,V,Y,6,o[60]),V=f(V,L,R,H,q,10,o[61]),H=f(H,V,L,R,D,15,o[62]),R=f(R,H,V,L,B,21,o[63]),E[0]=E[0]+L|0,E[1]=E[1]+R|0,E[2]=E[2]+H|0,E[3]=E[3]+V|0},_doFinalize:function(){var v=this._data,y=v.words,g=this._nDataBytes*8,b=v.sigBytes*8;y[b>>>5]|=128<<24-b%32;var m=i.floor(g/4294967296),E=g;y[(b+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,y[(b+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,v.sigBytes=(y.length+1)*4,this._process();for(var F=this._hash,T=F.words,D=0;D<4;D++){var I=T[D];T[D]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}return F},clone:function(){var v=c.clone.call(this);return v._hash=this._hash.clone(),v}});function h(v,y,g,b,m,E,F){var T=v+(y&g|~y&b)+m+F;return(T<<E|T>>>32-E)+y}function a(v,y,g,b,m,E,F){var T=v+(y&b|g&~b)+m+F;return(T<<E|T>>>32-E)+y}function u(v,y,g,b,m,E,F){var T=v+(y^g^b)+m+F;return(T<<E|T>>>32-E)+y}function f(v,y,g,b,m,E,F){var T=v+(g^(y|~b))+m+F;return(T<<E|T>>>32-E)+y}p.MD5=c._createHelper(n),p.HmacMD5=c._createHmacHelper(n)}(Math),r.MD5})}(Ti)),Ti.exports}var Fi={exports:{}},Fs;function Ds(){return Fs||(Fs=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(){var i=r,p=i.lib,l=p.WordArray,s=p.Hasher,c=i.algo,d=[],o=c.SHA1=s.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(n,h){for(var a=this._hash.words,u=a[0],f=a[1],v=a[2],y=a[3],g=a[4],b=0;b<80;b++){if(b<16)d[b]=n[h+b]|0;else{var m=d[b-3]^d[b-8]^d[b-14]^d[b-16];d[b]=m<<1|m>>>31}var E=(u<<5|u>>>27)+g+d[b];b<20?E+=(f&v|~f&y)+1518500249:b<40?E+=(f^v^y)+1859775393:b<60?E+=(f&v|f&y|v&y)-1894007588:E+=(f^v^y)-899497514,g=y,y=v,v=f<<30|f>>>2,f=u,u=E}a[0]=a[0]+u|0,a[1]=a[1]+f|0,a[2]=a[2]+v|0,a[3]=a[3]+y|0,a[4]=a[4]+g|0},_doFinalize:function(){var n=this._data,h=n.words,a=this._nDataBytes*8,u=n.sigBytes*8;return h[u>>>5]|=128<<24-u%32,h[(u+64>>>9<<4)+14]=Math.floor(a/4294967296),h[(u+64>>>9<<4)+15]=a,n.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var n=s.clone.call(this);return n._hash=this._hash.clone(),n}});i.SHA1=s._createHelper(o),i.HmacSHA1=s._createHmacHelper(o)}(),r.SHA1})}(Fi)),Fi.exports}var Di={exports:{}},Is;function Ii(){return Is||(Is=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){return function(i){var p=r,l=p.lib,s=l.WordArray,c=l.Hasher,d=p.algo,o=[],n=[];(function(){function u(g){for(var b=i.sqrt(g),m=2;m<=b;m++)if(!(g%m))return!1;return!0}function f(g){return(g-(g|0))*4294967296|0}for(var v=2,y=0;y<64;)u(v)&&(y<8&&(o[y]=f(i.pow(v,1/2))),n[y]=f(i.pow(v,1/3)),y++),v++})();var h=[],a=d.SHA256=c.extend({_doReset:function(){this._hash=new s.init(o.slice(0))},_doProcessBlock:function(u,f){for(var v=this._hash.words,y=v[0],g=v[1],b=v[2],m=v[3],E=v[4],F=v[5],T=v[6],D=v[7],I=0;I<64;I++){if(I<16)h[I]=u[f+I]|0;else{var Y=h[I-15],W=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,_=h[I-2],A=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;h[I]=W+h[I-7]+A+h[I-16]}var C=E&F^~E&T,B=y&g^y&b^g&b,N=(y<<30|y>>>2)^(y<<19|y>>>13)^(y<<10|y>>>22),q=(E<<26|E>>>6)^(E<<21|E>>>11)^(E<<7|E>>>25),X=D+q+C+n[I]+h[I],$=N+B;D=T,T=F,F=E,E=m+X|0,m=b,b=g,g=y,y=X+$|0}v[0]=v[0]+y|0,v[1]=v[1]+g|0,v[2]=v[2]+b|0,v[3]=v[3]+m|0,v[4]=v[4]+E|0,v[5]=v[5]+F|0,v[6]=v[6]+T|0,v[7]=v[7]+D|0},_doFinalize:function(){var u=this._data,f=u.words,v=this._nDataBytes*8,y=u.sigBytes*8;return f[y>>>5]|=128<<24-y%32,f[(y+64>>>9<<4)+14]=i.floor(v/4294967296),f[(y+64>>>9<<4)+15]=v,u.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var u=c.clone.call(this);return u._hash=this._hash.clone(),u}});p.SHA256=c._createHelper(a),p.HmacSHA256=c._createHmacHelper(a)}(Math),r.SHA256})}(Di)),Di.exports}var Ri={exports:{}},Rs;function xp(){return Rs||(Rs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),Ii())})(be,function(r){return function(){var i=r,p=i.lib,l=p.WordArray,s=i.algo,c=s.SHA256,d=s.SHA224=c.extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var o=c._doFinalize.call(this);return o.sigBytes-=4,o}});i.SHA224=c._createHelper(d),i.HmacSHA224=c._createHmacHelper(d)}(),r.SHA224})}(Ri)),Ri.exports}var Oi={exports:{}},Os;function Ps(){return Os||(Os=1,function(e,t){(function(r,i,p){e.exports=i(Se(),sn())})(be,function(r){return function(){var i=r,p=i.lib,l=p.Hasher,s=i.x64,c=s.Word,d=s.WordArray,o=i.algo;function n(){return c.create.apply(c,arguments)}var h=[n(1116352408,3609767458),n(1899447441,602891725),n(3049323471,3964484399),n(3921009573,2173295548),n(961987163,4081628472),n(1508970993,3053834265),n(2453635748,2937671579),n(2870763221,3664609560),n(3624381080,2734883394),n(310598401,1164996542),n(607225278,1323610764),n(1426881987,3590304994),n(1925078388,4068182383),n(2162078206,991336113),n(2614888103,633803317),n(3248222580,3479774868),n(3835390401,2666613458),n(4022224774,944711139),n(264347078,2341262773),n(604807628,2007800933),n(770255983,1495990901),n(1249150122,1856431235),n(1555081692,3175218132),n(1996064986,2198950837),n(2554220882,3999719339),n(2821834349,766784016),n(2952996808,2566594879),n(3210313671,3203337956),n(3336571891,1034457026),n(3584528711,2466948901),n(113926993,3758326383),n(338241895,168717936),n(666307205,1188179964),n(773529912,1546045734),n(1294757372,1522805485),n(1396182291,2643833823),n(1695183700,2343527390),n(1986661051,1014477480),n(2177026350,1206759142),n(2456956037,344077627),n(2730485921,1290863460),n(2820302411,3158454273),n(3259730800,3505952657),n(3345764771,106217008),n(3516065817,3606008344),n(3600352804,1432725776),n(4094571909,1467031594),n(275423344,851169720),n(430227734,3100823752),n(506948616,1363258195),n(659060556,3750685593),n(883997877,3785050280),n(958139571,3318307427),n(1322822218,3812723403),n(1537002063,2003034995),n(1747873779,3602036899),n(1955562222,1575990012),n(2024104815,1125592928),n(2227730452,2716904306),n(2361852424,442776044),n(2428436474,593698344),n(2756734187,3733110249),n(3204031479,2999351573),n(3329325298,3815920427),n(3391569614,3928383900),n(3515267271,566280711),n(3940187606,3454069534),n(4118630271,4000239992),n(116418474,1914138554),n(174292421,2731055270),n(289380356,3203993006),n(460393269,320620315),n(685471733,587496836),n(852142971,1086792851),n(1017036298,365543100),n(1126000580,2618297676),n(1288033470,3409855158),n(1501505948,4234509866),n(1607167915,987167468),n(1816402316,1246189591)],a=[];(function(){for(var f=0;f<80;f++)a[f]=n()})();var u=o.SHA512=l.extend({_doReset:function(){this._hash=new d.init([new c.init(1779033703,4089235720),new c.init(3144134277,2227873595),new c.init(1013904242,4271175723),new c.init(2773480762,1595750129),new c.init(1359893119,2917565137),new c.init(2600822924,725511199),new c.init(528734635,4215389547),new c.init(1541459225,327033209)])},_doProcessBlock:function(f,v){for(var y=this._hash.words,g=y[0],b=y[1],m=y[2],E=y[3],F=y[4],T=y[5],D=y[6],I=y[7],Y=g.high,W=g.low,_=b.high,A=b.low,C=m.high,B=m.low,N=E.high,q=E.low,X=F.high,$=F.low,M=T.high,j=T.low,L=D.high,R=D.low,H=I.high,V=I.low,J=Y,ie=W,ne=_,oe=A,x=C,w=B,O=N,K=q,Z=X,ee=$,ae=M,z=j,S=L,k=R,Q=H,re=V,le=0;le<80;le++){var ue,ye,xe=a[le];if(le<16)ye=xe.high=f[v+le*2]|0,ue=xe.low=f[v+le*2+1]|0;else{var Be=a[le-15],Ie=Be.high,Fe=Be.low,Tt=(Ie>>>1|Fe<<31)^(Ie>>>8|Fe<<24)^Ie>>>7,jt=(Fe>>>1|Ie<<31)^(Fe>>>8|Ie<<24)^(Fe>>>7|Ie<<25),Ht=a[le-2],Ft=Ht.high,__$t__=Ht.low,fo=(Ft>>>19|__$t__<<13)^(Ft<<3|__$t__>>>29)^Ft>>>6,sr=(__$t__>>>19|Ft<<13)^(__$t__<<3|Ft>>>29)^(__$t__>>>6|Ft<<26),mn=a[le-7],vn=mn.high,ho=mn.low,Fr=a[le-16],po=Fr.high,xn=Fr.low;ue=jt+ho,ye=Tt+vn+(ue>>>0<jt>>>0?1:0),ue=ue+sr,ye=ye+fo+(ue>>>0<sr>>>0?1:0),ue=ue+xn,ye=ye+po+(ue>>>0<xn>>>0?1:0),xe.high=ye,xe.low=ue}var yo=Z&ae^~Z&S,gn=ee&z^~ee&k,mo=J&ne^J&x^ne&x,vo=ie&oe^ie&w^oe&w,xo=(J>>>28|ie<<4)^(J<<30|ie>>>2)^(J<<25|ie>>>7),bn=(ie>>>28|J<<4)^(ie<<30|J>>>2)^(ie<<25|J>>>7),go=(Z>>>14|ee<<18)^(Z>>>18|ee<<14)^(Z<<23|ee>>>9),bo=(ee>>>14|Z<<18)^(ee>>>18|Z<<14)^(ee<<23|Z>>>9),wn=h[le],wo=wn.high,En=wn.low,Ze=re+bo,wt=Q+go+(Ze>>>0<re>>>0?1:0),Ze=Ze+gn,wt=wt+yo+(Ze>>>0<gn>>>0?1:0),Ze=Ze+En,wt=wt+wo+(Ze>>>0<En>>>0?1:0),Ze=Ze+ue,wt=wt+ye+(Ze>>>0<ue>>>0?1:0),_n=bn+vo,Eo=xo+mo+(_n>>>0<bn>>>0?1:0);Q=S,re=k,S=ae,k=z,ae=Z,z=ee,ee=K+Ze|0,Z=O+wt+(ee>>>0<K>>>0?1:0)|0,O=x,K=w,x=ne,w=oe,ne=J,oe=ie,ie=Ze+_n|0,J=wt+Eo+(ie>>>0<Ze>>>0?1:0)|0}W=g.low=W+ie,g.high=Y+J+(W>>>0<ie>>>0?1:0),A=b.low=A+oe,b.high=_+ne+(A>>>0<oe>>>0?1:0),B=m.low=B+w,m.high=C+x+(B>>>0<w>>>0?1:0),q=E.low=q+K,E.high=N+O+(q>>>0<K>>>0?1:0),$=F.low=$+ee,F.high=X+Z+($>>>0<ee>>>0?1:0),j=T.low=j+z,T.high=M+ae+(j>>>0<z>>>0?1:0),R=D.low=R+k,D.high=L+S+(R>>>0<k>>>0?1:0),V=I.low=V+re,I.high=H+Q+(V>>>0<re>>>0?1:0)},_doFinalize:function(){var f=this._data,v=f.words,y=this._nDataBytes*8,g=f.sigBytes*8;v[g>>>5]|=128<<24-g%32,v[(g+128>>>10<<5)+30]=Math.floor(y/4294967296),v[(g+128>>>10<<5)+31]=y,f.sigBytes=v.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var f=l.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});i.SHA512=l._createHelper(u),i.HmacSHA512=l._createHmacHelper(u)}(),r.SHA512})}(Oi)),Oi.exports}var Pi={exports:{}},Ms;function gp(){return Ms||(Ms=1,function(e,t){(function(r,i,p){e.exports=i(Se(),sn(),Ps())})(be,function(r){return function(){var i=r,p=i.x64,l=p.Word,s=p.WordArray,c=i.algo,d=c.SHA512,o=c.SHA384=d.extend({_doReset:function(){this._hash=new s.init([new l.init(3418070365,3238371032),new l.init(1654270250,914150663),new l.init(2438529370,812702999),new l.init(355462360,4144912697),new l.init(1731405415,4290775857),new l.init(2394180231,1750603025),new l.init(3675008525,1694076839),new l.init(1203062813,3204075428)])},_doFinalize:function(){var n=d._doFinalize.call(this);return n.sigBytes-=16,n}});i.SHA384=d._createHelper(o),i.HmacSHA384=d._createHmacHelper(o)}(),r.SHA384})}(Pi)),Pi.exports}var Mi={exports:{}},Ns;function bp(){return Ns||(Ns=1,function(e,t){(function(r,i,p){e.exports=i(Se(),sn())})(be,function(r){return function(i){var p=r,l=p.lib,s=l.WordArray,c=l.Hasher,d=p.x64,o=d.Word,n=p.algo,h=[],a=[],u=[];(function(){for(var y=1,g=0,b=0;b<24;b++){h[y+5*g]=(b+1)*(b+2)/2%64;var m=g%5,E=(2*y+3*g)%5;y=m,g=E}for(var y=0;y<5;y++)for(var g=0;g<5;g++)a[y+5*g]=g+(2*y+3*g)%5*5;for(var F=1,T=0;T<24;T++){for(var D=0,I=0,Y=0;Y<7;Y++){if(F&1){var W=(1<<Y)-1;W<32?I^=1<<W:D^=1<<W-32}F&128?F=F<<1^113:F<<=1}u[T]=o.create(D,I)}})();var f=[];(function(){for(var y=0;y<25;y++)f[y]=o.create()})();var v=n.SHA3=c.extend({cfg:c.cfg.extend({outputLength:512}),_doReset:function(){for(var y=this._state=[],g=0;g<25;g++)y[g]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(y,g){for(var b=this._state,m=this.blockSize/2,E=0;E<m;E++){var F=y[g+2*E],T=y[g+2*E+1];F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var D=b[E];D.high^=T,D.low^=F}for(var I=0;I<24;I++){for(var Y=0;Y<5;Y++){for(var W=0,_=0,A=0;A<5;A++){var D=b[Y+5*A];W^=D.high,_^=D.low}var C=f[Y];C.high=W,C.low=_}for(var Y=0;Y<5;Y++)for(var B=f[(Y+4)%5],N=f[(Y+1)%5],q=N.high,X=N.low,W=B.high^(q<<1|X>>>31),_=B.low^(X<<1|q>>>31),A=0;A<5;A++){var D=b[Y+5*A];D.high^=W,D.low^=_}for(var $=1;$<25;$++){var W,_,D=b[$],M=D.high,j=D.low,L=h[$];L<32?(W=M<<L|j>>>32-L,_=j<<L|M>>>32-L):(W=j<<L-32|M>>>64-L,_=M<<L-32|j>>>64-L);var R=f[a[$]];R.high=W,R.low=_}var H=f[0],V=b[0];H.high=V.high,H.low=V.low;for(var Y=0;Y<5;Y++)for(var A=0;A<5;A++){var $=Y+5*A,D=b[$],J=f[$],ie=f[(Y+1)%5+5*A],ne=f[(Y+2)%5+5*A];D.high=J.high^~ie.high&ne.high,D.low=J.low^~ie.low&ne.low}var D=b[0],oe=u[I];D.high^=oe.high,D.low^=oe.low}},_doFinalize:function(){var y=this._data,g=y.words;this._nDataBytes*8;var b=y.sigBytes*8,m=this.blockSize*32;g[b>>>5]|=1<<24-b%32,g[(i.ceil((b+1)/m)*m>>>5)-1]|=128,y.sigBytes=g.length*4,this._process();for(var E=this._state,F=this.cfg.outputLength/8,T=F/8,D=[],I=0;I<T;I++){var Y=E[I],W=Y.high,_=Y.low;W=(W<<8|W>>>24)&16711935|(W<<24|W>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,D.push(_),D.push(W)}return new s.init(D,F)},clone:function(){for(var y=c.clone.call(this),g=y._state=this._state.slice(0),b=0;b<25;b++)g[b]=g[b].clone();return y}});p.SHA3=c._createHelper(v),p.HmacSHA3=c._createHmacHelper(v)}(Math),r.SHA3})}(Mi)),Mi.exports}var Ni={exports:{}},Ls;function wp(){return Ls||(Ls=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){/** @preserve
10
15
  (c) 2012 by Cédric Mesnil. All rights reserved.
11
16
 
12
17
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -15,14 +20,22 @@
15
20
  - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
16
21
 
17
22
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18
- */return function(n){var i=r,o=i.lib,a=o.WordArray,s=o.Hasher,p=i.algo,f=a.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=a.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),v=a.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),x=a.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),A=a.create([0,1518500249,1859775393,2400959708,2840853838]),y=a.create([1352829926,1548603684,1836072691,2053994217,0]),m=p.RIPEMD160=s.extend({_doReset:function(){this._hash=a.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,k){for(var q=0;q<16;q++){var X=k+q,I=T[X];T[X]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360}var P=this._hash.words,G=A.words,S=y.words,N=f.words,M=l.words,H=v.words,Y=x.words,W,ee,J,O,U,V,z,se,ce,be;V=W=P[0],z=ee=P[1],se=J=P[2],ce=O=P[3],be=U=P[4];for(var fe,q=0;q<80;q+=1)fe=W+T[k+N[q]]|0,q<16?fe+=g(ee,J,O)+G[0]:q<32?fe+=D(ee,J,O)+G[1]:q<48?fe+=C(ee,J,O)+G[2]:q<64?fe+=B(ee,J,O)+G[3]:fe+=b(ee,J,O)+G[4],fe=fe|0,fe=_(fe,H[q]),fe=fe+U|0,W=U,U=O,O=_(J,10),J=ee,ee=fe,fe=V+T[k+M[q]]|0,q<16?fe+=b(z,se,ce)+S[0]:q<32?fe+=B(z,se,ce)+S[1]:q<48?fe+=C(z,se,ce)+S[2]:q<64?fe+=D(z,se,ce)+S[3]:fe+=g(z,se,ce)+S[4],fe=fe|0,fe=_(fe,Y[q]),fe=fe+be|0,V=be,be=ce,ce=_(se,10),se=z,z=fe;fe=P[1]+J+ce|0,P[1]=P[2]+O+be|0,P[2]=P[3]+U+V|0,P[3]=P[4]+W+z|0,P[4]=P[0]+ee+se|0,P[0]=fe},_doFinalize:function(){var T=this._data,k=T.words,q=this._nDataBytes*8,X=T.sigBytes*8;k[X>>>5]|=128<<24-X%32,k[(X+64>>>9<<4)+14]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360,T.sigBytes=(k.length+1)*4,this._process();for(var I=this._hash,P=I.words,G=0;G<5;G++){var S=P[G];P[G]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return I},clone:function(){var T=s.clone.call(this);return T._hash=this._hash.clone(),T}});function g(T,k,q){return T^k^q}function D(T,k,q){return T&k|~T&q}function C(T,k,q){return(T|~k)^q}function B(T,k,q){return T&q|k&~q}function b(T,k,q){return T^(k|~q)}function _(T,k){return T<<k|T>>>32-k}i.RIPEMD160=s._createHelper(m),i.HmacRIPEMD160=s._createHmacHelper(m)}(),r.RIPEMD160})}(Sn)),Sn.exports}var Tn={exports:{}},wa;function In(){return wa||(wa=1,function(t,e){(function(r,n){t.exports=n(ve())})(le,function(r){(function(){var n=r,i=n.lib,o=i.Base,a=n.enc,s=a.Utf8,p=n.algo;p.HMAC=o.extend({init:function(f,l){f=this._hasher=new f.init,typeof l=="string"&&(l=s.parse(l));var v=f.blockSize,x=v*4;l.sigBytes>x&&(l=f.finalize(l)),l.clamp();for(var A=this._oKey=l.clone(),y=this._iKey=l.clone(),m=A.words,g=y.words,D=0;D<v;D++)m[D]^=1549556828,g[D]^=909522486;A.sigBytes=y.sigBytes=x,this.reset()},reset:function(){var f=this._hasher;f.reset(),f.update(this._iKey)},update:function(f){return this._hasher.update(f),this},finalize:function(f){var l=this._hasher,v=l.finalize(f);l.reset();var x=l.finalize(this._oKey.clone().concat(v));return x}})})()})}(Tn)),Tn.exports}var Rn={exports:{}},Ca;function Mh(){return Ca||(Ca=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Cn(),In())})(le,function(r){return function(){var n=r,i=n.lib,o=i.Base,a=i.WordArray,s=n.algo,p=s.SHA256,f=s.HMAC,l=s.PBKDF2=o.extend({cfg:o.extend({keySize:128/32,hasher:p,iterations:25e4}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,x){for(var A=this.cfg,y=f.create(A.hasher,v),m=a.create(),g=a.create([1]),D=m.words,C=g.words,B=A.keySize,b=A.iterations;D.length<B;){var _=y.update(x).finalize(g);y.reset();for(var T=_.words,k=T.length,q=_,X=1;X<b;X++){q=y.finalize(q),y.reset();for(var I=q.words,P=0;P<k;P++)T[P]^=I[P]}m.concat(_),C[0]++}return m.sigBytes=B*4,m}});n.PBKDF2=function(v,x,A){return l.create(A).compute(v,x)}}(),r.PBKDF2})}(Rn)),Rn.exports}var On={exports:{}},ba;function bt(){return ba||(ba=1,function(t,e){(function(r,n,i){t.exports=n(ve(),pa(),In())})(le,function(r){return function(){var n=r,i=n.lib,o=i.Base,a=i.WordArray,s=n.algo,p=s.MD5,f=s.EvpKDF=o.extend({cfg:o.extend({keySize:128/32,hasher:p,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,v){for(var x,A=this.cfg,y=A.hasher.create(),m=a.create(),g=m.words,D=A.keySize,C=A.iterations;g.length<D;){x&&y.update(x),x=y.update(l).finalize(v),y.reset();for(var B=1;B<C;B++)x=y.finalize(x),y.reset();m.concat(x)}return m.sigBytes=D*4,m}});n.EvpKDF=function(l,v,x){return f.create(x).compute(l,v)}}(),r.EvpKDF})}(On)),On.exports}var kn={exports:{}},Fa;function He(){return Fa||(Fa=1,function(t,e){(function(r,n,i){t.exports=n(ve(),bt())})(le,function(r){r.lib.Cipher||function(n){var i=r,o=i.lib,a=o.Base,s=o.WordArray,p=o.BufferedBlockAlgorithm,f=i.enc;f.Utf8;var l=f.Base64,v=i.algo,x=v.EvpKDF,A=o.Cipher=p.extend({cfg:a.extend(),createEncryptor:function(I,P){return this.create(this._ENC_XFORM_MODE,I,P)},createDecryptor:function(I,P){return this.create(this._DEC_XFORM_MODE,I,P)},init:function(I,P,G){this.cfg=this.cfg.extend(G),this._xformMode=I,this._key=P,this.reset()},reset:function(){p.reset.call(this),this._doReset()},process:function(I){return this._append(I),this._process()},finalize:function(I){I&&this._append(I);var P=this._doFinalize();return P},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function I(P){return typeof P=="string"?X:T}return function(P){return{encrypt:function(G,S,N){return I(S).encrypt(P,G,S,N)},decrypt:function(G,S,N){return I(S).decrypt(P,G,S,N)}}}}()});o.StreamCipher=A.extend({_doFinalize:function(){var I=this._process(!0);return I},blockSize:1});var y=i.mode={},m=o.BlockCipherMode=a.extend({createEncryptor:function(I,P){return this.Encryptor.create(I,P)},createDecryptor:function(I,P){return this.Decryptor.create(I,P)},init:function(I,P){this._cipher=I,this._iv=P}}),g=y.CBC=function(){var I=m.extend();I.Encryptor=I.extend({processBlock:function(G,S){var N=this._cipher,M=N.blockSize;P.call(this,G,S,M),N.encryptBlock(G,S),this._prevBlock=G.slice(S,S+M)}}),I.Decryptor=I.extend({processBlock:function(G,S){var N=this._cipher,M=N.blockSize,H=G.slice(S,S+M);N.decryptBlock(G,S),P.call(this,G,S,M),this._prevBlock=H}});function P(G,S,N){var M,H=this._iv;H?(M=H,this._iv=n):M=this._prevBlock;for(var Y=0;Y<N;Y++)G[S+Y]^=M[Y]}return I}(),D=i.pad={},C=D.Pkcs7={pad:function(I,P){for(var G=P*4,S=G-I.sigBytes%G,N=S<<24|S<<16|S<<8|S,M=[],H=0;H<S;H+=4)M.push(N);var Y=s.create(M,S);I.concat(Y)},unpad:function(I){var P=I.words[I.sigBytes-1>>>2]&255;I.sigBytes-=P}};o.BlockCipher=A.extend({cfg:A.cfg.extend({mode:g,padding:C}),reset:function(){var I;A.reset.call(this);var P=this.cfg,G=P.iv,S=P.mode;this._xformMode==this._ENC_XFORM_MODE?I=S.createEncryptor:(I=S.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==I?this._mode.init(this,G&&G.words):(this._mode=I.call(S,this,G&&G.words),this._mode.__creator=I)},_doProcessBlock:function(I,P){this._mode.processBlock(I,P)},_doFinalize:function(){var I,P=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(P.pad(this._data,this.blockSize),I=this._process(!0)):(I=this._process(!0),P.unpad(I)),I},blockSize:128/32});var B=o.CipherParams=a.extend({init:function(I){this.mixIn(I)},toString:function(I){return(I||this.formatter).stringify(this)}}),b=i.format={},_=b.OpenSSL={stringify:function(I){var P,G=I.ciphertext,S=I.salt;return S?P=s.create([1398893684,1701076831]).concat(S).concat(G):P=G,P.toString(l)},parse:function(I){var P,G=l.parse(I),S=G.words;return S[0]==1398893684&&S[1]==1701076831&&(P=s.create(S.slice(2,4)),S.splice(0,4),G.sigBytes-=16),B.create({ciphertext:G,salt:P})}},T=o.SerializableCipher=a.extend({cfg:a.extend({format:_}),encrypt:function(I,P,G,S){S=this.cfg.extend(S);var N=I.createEncryptor(G,S),M=N.finalize(P),H=N.cfg;return B.create({ciphertext:M,key:G,iv:H.iv,algorithm:I,mode:H.mode,padding:H.padding,blockSize:I.blockSize,formatter:S.format})},decrypt:function(I,P,G,S){S=this.cfg.extend(S),P=this._parse(P,S.format);var N=I.createDecryptor(G,S).finalize(P.ciphertext);return N},_parse:function(I,P){return typeof I=="string"?P.parse(I,this):I}}),k=i.kdf={},q=k.OpenSSL={execute:function(I,P,G,S,N){if(S||(S=s.random(64/8)),N)var M=x.create({keySize:P+G,hasher:N}).compute(I,S);else var M=x.create({keySize:P+G}).compute(I,S);var H=s.create(M.words.slice(P),G*4);return M.sigBytes=P*4,B.create({key:M,iv:H,salt:S})}},X=o.PasswordBasedCipher=T.extend({cfg:T.cfg.extend({kdf:q}),encrypt:function(I,P,G,S){S=this.cfg.extend(S);var N=S.kdf.execute(G,I.keySize,I.ivSize,S.salt,S.hasher);S.iv=N.iv;var M=T.encrypt.call(this,I,P,N.key,S);return M.mixIn(N),M},decrypt:function(I,P,G,S){S=this.cfg.extend(S),P=this._parse(P,S.format);var N=S.kdf.execute(G,I.keySize,I.ivSize,P.salt,S.hasher);S.iv=N.iv;var M=T.decrypt.call(this,I,P,N.key,S);return M}})}()})}(kn)),kn.exports}var Pn={exports:{}},Da;function Lh(){return Da||(Da=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.mode.CFB=function(){var n=r.lib.BlockCipherMode.extend();n.Encryptor=n.extend({processBlock:function(o,a){var s=this._cipher,p=s.blockSize;i.call(this,o,a,p,s),this._prevBlock=o.slice(a,a+p)}}),n.Decryptor=n.extend({processBlock:function(o,a){var s=this._cipher,p=s.blockSize,f=o.slice(a,a+p);i.call(this,o,a,p,s),this._prevBlock=f}});function i(o,a,s,p){var f,l=this._iv;l?(f=l.slice(0),this._iv=void 0):f=this._prevBlock,p.encryptBlock(f,0);for(var v=0;v<s;v++)o[a+v]^=f[v]}return n}(),r.mode.CFB})}(Pn)),Pn.exports}var Mn={exports:{}},_a;function Uh(){return _a||(_a=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.mode.CTR=function(){var n=r.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(o,a){var s=this._cipher,p=s.blockSize,f=this._iv,l=this._counter;f&&(l=this._counter=f.slice(0),this._iv=void 0);var v=l.slice(0);s.encryptBlock(v,0),l[p-1]=l[p-1]+1|0;for(var x=0;x<p;x++)o[a+x]^=v[x]}});return n.Decryptor=i,n}(),r.mode.CTR})}(Mn)),Mn.exports}var Ln={exports:{}},Sa;function Nh(){return Sa||(Sa=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){/** @preserve
23
+ */return function(i){var p=r,l=p.lib,s=l.WordArray,c=l.Hasher,d=p.algo,o=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),n=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),h=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=s.create([0,1518500249,1859775393,2400959708,2840853838]),f=s.create([1352829926,1548603684,1836072691,2053994217,0]),v=d.RIPEMD160=c.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,D){for(var I=0;I<16;I++){var Y=D+I,W=T[Y];T[Y]=(W<<8|W>>>24)&16711935|(W<<24|W>>>8)&4278255360}var _=this._hash.words,A=u.words,C=f.words,B=o.words,N=n.words,q=h.words,X=a.words,$,M,j,L,R,H,V,J,ie,ne;H=$=_[0],V=M=_[1],J=j=_[2],ie=L=_[3],ne=R=_[4];for(var oe,I=0;I<80;I+=1)oe=$+T[D+B[I]]|0,I<16?oe+=y(M,j,L)+A[0]:I<32?oe+=g(M,j,L)+A[1]:I<48?oe+=b(M,j,L)+A[2]:I<64?oe+=m(M,j,L)+A[3]:oe+=E(M,j,L)+A[4],oe=oe|0,oe=F(oe,q[I]),oe=oe+R|0,$=R,R=L,L=F(j,10),j=M,M=oe,oe=H+T[D+N[I]]|0,I<16?oe+=E(V,J,ie)+C[0]:I<32?oe+=m(V,J,ie)+C[1]:I<48?oe+=b(V,J,ie)+C[2]:I<64?oe+=g(V,J,ie)+C[3]:oe+=y(V,J,ie)+C[4],oe=oe|0,oe=F(oe,X[I]),oe=oe+ne|0,H=ne,ne=ie,ie=F(J,10),J=V,V=oe;oe=_[1]+j+ie|0,_[1]=_[2]+L+ne|0,_[2]=_[3]+R+H|0,_[3]=_[4]+$+V|0,_[4]=_[0]+M+J|0,_[0]=oe},_doFinalize:function(){var T=this._data,D=T.words,I=this._nDataBytes*8,Y=T.sigBytes*8;D[Y>>>5]|=128<<24-Y%32,D[(Y+64>>>9<<4)+14]=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,T.sigBytes=(D.length+1)*4,this._process();for(var W=this._hash,_=W.words,A=0;A<5;A++){var C=_[A];_[A]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}return W},clone:function(){var T=c.clone.call(this);return T._hash=this._hash.clone(),T}});function y(T,D,I){return T^D^I}function g(T,D,I){return T&D|~T&I}function b(T,D,I){return(T|~D)^I}function m(T,D,I){return T&I|D&~I}function E(T,D,I){return T^(D|~I)}function F(T,D){return T<<D|T>>>32-D}p.RIPEMD160=c._createHelper(v),p.HmacRIPEMD160=c._createHmacHelper(v)}(),r.RIPEMD160})}(Ni)),Ni.exports}var Li={exports:{}},Us;function Ui(){return Us||(Us=1,function(e,t){(function(r,i){e.exports=i(Se())})(be,function(r){(function(){var i=r,p=i.lib,l=p.Base,s=i.enc,c=s.Utf8,d=i.algo;d.HMAC=l.extend({init:function(o,n){o=this._hasher=new o.init,typeof n=="string"&&(n=c.parse(n));var h=o.blockSize,a=h*4;n.sigBytes>a&&(n=o.finalize(n)),n.clamp();for(var u=this._oKey=n.clone(),f=this._iKey=n.clone(),v=u.words,y=f.words,g=0;g<h;g++)v[g]^=1549556828,y[g]^=909522486;u.sigBytes=f.sigBytes=a,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var n=this._hasher,h=n.finalize(o);n.reset();var a=n.finalize(this._oKey.clone().concat(h));return a}})})()})}(Li)),Li.exports}var qi={exports:{}},qs;function Ep(){return qs||(qs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),Ii(),Ui())})(be,function(r){return function(){var i=r,p=i.lib,l=p.Base,s=p.WordArray,c=i.algo,d=c.SHA256,o=c.HMAC,n=c.PBKDF2=l.extend({cfg:l.extend({keySize:128/32,hasher:d,iterations:25e4}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,a){for(var u=this.cfg,f=o.create(u.hasher,h),v=s.create(),y=s.create([1]),g=v.words,b=y.words,m=u.keySize,E=u.iterations;g.length<m;){var F=f.update(a).finalize(y);f.reset();for(var T=F.words,D=T.length,I=F,Y=1;Y<E;Y++){I=f.finalize(I),f.reset();for(var W=I.words,_=0;_<D;_++)T[_]^=W[_]}v.concat(F),b[0]++}return v.sigBytes=m*4,v}});i.PBKDF2=function(h,a,u){return n.create(u).compute(h,a)}}(),r.PBKDF2})}(qi)),qi.exports}var zi={exports:{}},zs;function kt(){return zs||(zs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),Ds(),Ui())})(be,function(r){return function(){var i=r,p=i.lib,l=p.Base,s=p.WordArray,c=i.algo,d=c.MD5,o=c.EvpKDF=l.extend({cfg:l.extend({keySize:128/32,hasher:d,iterations:1}),init:function(n){this.cfg=this.cfg.extend(n)},compute:function(n,h){for(var a,u=this.cfg,f=u.hasher.create(),v=s.create(),y=v.words,g=u.keySize,b=u.iterations;y.length<g;){a&&f.update(a),a=f.update(n).finalize(h),f.reset();for(var m=1;m<b;m++)a=f.finalize(a),f.reset();v.concat(a)}return v.sigBytes=g*4,v}});i.EvpKDF=function(n,h,a){return o.create(a).compute(n,h)}}(),r.EvpKDF})}(zi)),zi.exports}var ji={exports:{}},js;function He(){return js||(js=1,function(e,t){(function(r,i,p){e.exports=i(Se(),kt())})(be,function(r){r.lib.Cipher||function(i){var p=r,l=p.lib,s=l.Base,c=l.WordArray,d=l.BufferedBlockAlgorithm,o=p.enc;o.Utf8;var n=o.Base64,h=p.algo,a=h.EvpKDF,u=l.Cipher=d.extend({cfg:s.extend(),createEncryptor:function(W,_){return this.create(this._ENC_XFORM_MODE,W,_)},createDecryptor:function(W,_){return this.create(this._DEC_XFORM_MODE,W,_)},init:function(W,_,A){this.cfg=this.cfg.extend(A),this._xformMode=W,this._key=_,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(W){return this._append(W),this._process()},finalize:function(W){W&&this._append(W);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function W(_){return typeof _=="string"?Y:T}return function(_){return{encrypt:function(A,C,B){return W(C).encrypt(_,A,C,B)},decrypt:function(A,C,B){return W(C).decrypt(_,A,C,B)}}}}()});l.StreamCipher=u.extend({_doFinalize:function(){var W=this._process(!0);return W},blockSize:1});var f=p.mode={},v=l.BlockCipherMode=s.extend({createEncryptor:function(W,_){return this.Encryptor.create(W,_)},createDecryptor:function(W,_){return this.Decryptor.create(W,_)},init:function(W,_){this._cipher=W,this._iv=_}}),y=f.CBC=function(){var W=v.extend();W.Encryptor=W.extend({processBlock:function(A,C){var B=this._cipher,N=B.blockSize;_.call(this,A,C,N),B.encryptBlock(A,C),this._prevBlock=A.slice(C,C+N)}}),W.Decryptor=W.extend({processBlock:function(A,C){var B=this._cipher,N=B.blockSize,q=A.slice(C,C+N);B.decryptBlock(A,C),_.call(this,A,C,N),this._prevBlock=q}});function _(A,C,B){var N,q=this._iv;q?(N=q,this._iv=i):N=this._prevBlock;for(var X=0;X<B;X++)A[C+X]^=N[X]}return W}(),g=p.pad={},b=g.Pkcs7={pad:function(W,_){for(var A=_*4,C=A-W.sigBytes%A,B=C<<24|C<<16|C<<8|C,N=[],q=0;q<C;q+=4)N.push(B);var X=c.create(N,C);W.concat(X)},unpad:function(W){var _=W.words[W.sigBytes-1>>>2]&255;W.sigBytes-=_}};l.BlockCipher=u.extend({cfg:u.cfg.extend({mode:y,padding:b}),reset:function(){var W;u.reset.call(this);var _=this.cfg,A=_.iv,C=_.mode;this._xformMode==this._ENC_XFORM_MODE?W=C.createEncryptor:(W=C.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==W?this._mode.init(this,A&&A.words):(this._mode=W.call(C,this,A&&A.words),this._mode.__creator=W)},_doProcessBlock:function(W,_){this._mode.processBlock(W,_)},_doFinalize:function(){var W,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),W=this._process(!0)):(W=this._process(!0),_.unpad(W)),W},blockSize:128/32});var m=l.CipherParams=s.extend({init:function(W){this.mixIn(W)},toString:function(W){return(W||this.formatter).stringify(this)}}),E=p.format={},F=E.OpenSSL={stringify:function(W){var _,A=W.ciphertext,C=W.salt;return C?_=c.create([1398893684,1701076831]).concat(C).concat(A):_=A,_.toString(n)},parse:function(W){var _,A=n.parse(W),C=A.words;return C[0]==1398893684&&C[1]==1701076831&&(_=c.create(C.slice(2,4)),C.splice(0,4),A.sigBytes-=16),m.create({ciphertext:A,salt:_})}},T=l.SerializableCipher=s.extend({cfg:s.extend({format:F}),encrypt:function(W,_,A,C){C=this.cfg.extend(C);var B=W.createEncryptor(A,C),N=B.finalize(_),q=B.cfg;return m.create({ciphertext:N,key:A,iv:q.iv,algorithm:W,mode:q.mode,padding:q.padding,blockSize:W.blockSize,formatter:C.format})},decrypt:function(W,_,A,C){C=this.cfg.extend(C),_=this._parse(_,C.format);var B=W.createDecryptor(A,C).finalize(_.ciphertext);return B},_parse:function(W,_){return typeof W=="string"?_.parse(W,this):W}}),D=p.kdf={},I=D.OpenSSL={execute:function(W,_,A,C,B){if(C||(C=c.random(64/8)),B)var N=a.create({keySize:_+A,hasher:B}).compute(W,C);else var N=a.create({keySize:_+A}).compute(W,C);var q=c.create(N.words.slice(_),A*4);return N.sigBytes=_*4,m.create({key:N,iv:q,salt:C})}},Y=l.PasswordBasedCipher=T.extend({cfg:T.cfg.extend({kdf:I}),encrypt:function(W,_,A,C){C=this.cfg.extend(C);var B=C.kdf.execute(A,W.keySize,W.ivSize,C.salt,C.hasher);C.iv=B.iv;var N=T.encrypt.call(this,W,_,B.key,C);return N.mixIn(B),N},decrypt:function(W,_,A,C){C=this.cfg.extend(C),_=this._parse(_,C.format);var B=C.kdf.execute(A,W.keySize,W.ivSize,_.salt,C.hasher);C.iv=B.iv;var N=T.decrypt.call(this,W,_,B.key,C);return N}})}()})}(ji)),ji.exports}var Hi={exports:{}},Hs;function _p(){return Hs||(Hs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.mode.CFB=function(){var i=r.lib.BlockCipherMode.extend();i.Encryptor=i.extend({processBlock:function(l,s){var c=this._cipher,d=c.blockSize;p.call(this,l,s,d,c),this._prevBlock=l.slice(s,s+d)}}),i.Decryptor=i.extend({processBlock:function(l,s){var c=this._cipher,d=c.blockSize,o=l.slice(s,s+d);p.call(this,l,s,d,c),this._prevBlock=o}});function p(l,s,c,d){var o,n=this._iv;n?(o=n.slice(0),this._iv=void 0):o=this._prevBlock,d.encryptBlock(o,0);for(var h=0;h<c;h++)l[s+h]^=o[h]}return i}(),r.mode.CFB})}(Hi)),Hi.exports}var $i={exports:{}},$s;function Ap(){return $s||($s=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.mode.CTR=function(){var i=r.lib.BlockCipherMode.extend(),p=i.Encryptor=i.extend({processBlock:function(l,s){var c=this._cipher,d=c.blockSize,o=this._iv,n=this._counter;o&&(n=this._counter=o.slice(0),this._iv=void 0);var h=n.slice(0);c.encryptBlock(h,0),n[d-1]=n[d-1]+1|0;for(var a=0;a<d;a++)l[s+a]^=h[a]}});return i.Decryptor=p,i}(),r.mode.CTR})}($i)),$i.exports}var Wi={exports:{}},Ws;function Cp(){return Ws||(Ws=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){/** @preserve
19
24
  * Counter block mode compatible with Dr Brian Gladman fileenc.c
20
25
  * derived from CryptoJS.mode.CTR
21
26
  * Jan Hruby jhruby.web@gmail.com
22
- */return r.mode.CTRGladman=function(){var n=r.lib.BlockCipherMode.extend();function i(s){if((s>>24&255)===255){var p=s>>16&255,f=s>>8&255,l=s&255;p===255?(p=0,f===255?(f=0,l===255?l=0:++l):++f):++p,s=0,s+=p<<16,s+=f<<8,s+=l}else s+=1<<24;return s}function o(s){return(s[0]=i(s[0]))===0&&(s[1]=i(s[1])),s}var a=n.Encryptor=n.extend({processBlock:function(s,p){var f=this._cipher,l=f.blockSize,v=this._iv,x=this._counter;v&&(x=this._counter=v.slice(0),this._iv=void 0),o(x);var A=x.slice(0);f.encryptBlock(A,0);for(var y=0;y<l;y++)s[p+y]^=A[y]}});return n.Decryptor=a,n}(),r.mode.CTRGladman})}(Ln)),Ln.exports}var Un={exports:{}},Ta;function Hh(){return Ta||(Ta=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.mode.OFB=function(){var n=r.lib.BlockCipherMode.extend(),i=n.Encryptor=n.extend({processBlock:function(o,a){var s=this._cipher,p=s.blockSize,f=this._iv,l=this._keystream;f&&(l=this._keystream=f.slice(0),this._iv=void 0),s.encryptBlock(l,0);for(var v=0;v<p;v++)o[a+v]^=l[v]}});return n.Decryptor=i,n}(),r.mode.OFB})}(Un)),Un.exports}var Nn={exports:{}},Ia;function qh(){return Ia||(Ia=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.mode.ECB=function(){var n=r.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),n.Decryptor=n.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),n}(),r.mode.ECB})}(Nn)),Nn.exports}var Hn={exports:{}},Ra;function $h(){return Ra||(Ra=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.pad.AnsiX923={pad:function(n,i){var o=n.sigBytes,a=i*4,s=a-o%a,p=o+s-1;n.clamp(),n.words[p>>>2]|=s<<24-p%4*8,n.sigBytes+=s},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},r.pad.Ansix923})}(Hn)),Hn.exports}var qn={exports:{}},Oa;function zh(){return Oa||(Oa=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.pad.Iso10126={pad:function(n,i){var o=i*4,a=o-n.sigBytes%o;n.concat(r.lib.WordArray.random(a-1)).concat(r.lib.WordArray.create([a<<24],1))},unpad:function(n){var i=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=i}},r.pad.Iso10126})}(qn)),qn.exports}var $n={exports:{}},ka;function Wh(){return ka||(ka=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.pad.Iso97971={pad:function(n,i){n.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(n,i)},unpad:function(n){r.pad.ZeroPadding.unpad(n),n.sigBytes--}},r.pad.Iso97971})}($n)),$n.exports}var zn={exports:{}},Pa;function Gh(){return Pa||(Pa=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.pad.ZeroPadding={pad:function(n,i){var o=i*4;n.clamp(),n.sigBytes+=o-(n.sigBytes%o||o)},unpad:function(n){for(var i=n.words,o=n.sigBytes-1,o=n.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){n.sigBytes=o+1;break}}},r.pad.ZeroPadding})}(zn)),zn.exports}var Wn={exports:{}},Ma;function Vh(){return Ma||(Ma=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})}(Wn)),Wn.exports}var Gn={exports:{}},La;function Kh(){return La||(La=1,function(t,e){(function(r,n,i){t.exports=n(ve(),He())})(le,function(r){return function(n){var i=r,o=i.lib,a=o.CipherParams,s=i.enc,p=s.Hex,f=i.format;f.Hex={stringify:function(l){return l.ciphertext.toString(p)},parse:function(l){var v=p.parse(l);return a.create({ciphertext:v})}}}(),r.format.Hex})}(Gn)),Gn.exports}var Vn={exports:{}},Ua;function jh(){return Ua||(Ua=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Nt(),Ht(),bt(),He())})(le,function(r){return function(){var n=r,i=n.lib,o=i.BlockCipher,a=n.algo,s=[],p=[],f=[],l=[],v=[],x=[],A=[],y=[],m=[],g=[];(function(){for(var B=[],b=0;b<256;b++)b<128?B[b]=b<<1:B[b]=b<<1^283;for(var _=0,T=0,b=0;b<256;b++){var k=T^T<<1^T<<2^T<<3^T<<4;k=k>>>8^k&255^99,s[_]=k,p[k]=_;var q=B[_],X=B[q],I=B[X],P=B[k]*257^k*16843008;f[_]=P<<24|P>>>8,l[_]=P<<16|P>>>16,v[_]=P<<8|P>>>24,x[_]=P;var P=I*16843009^X*65537^q*257^_*16843008;A[k]=P<<24|P>>>8,y[k]=P<<16|P>>>16,m[k]=P<<8|P>>>24,g[k]=P,_?(_=q^B[B[B[I^q]]],T^=B[B[T]]):_=T=1}})();var D=[0,1,2,4,8,16,32,64,128,27,54],C=a.AES=o.extend({_doReset:function(){var B;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var b=this._keyPriorReset=this._key,_=b.words,T=b.sigBytes/4,k=this._nRounds=T+6,q=(k+1)*4,X=this._keySchedule=[],I=0;I<q;I++)I<T?X[I]=_[I]:(B=X[I-1],I%T?T>6&&I%T==4&&(B=s[B>>>24]<<24|s[B>>>16&255]<<16|s[B>>>8&255]<<8|s[B&255]):(B=B<<8|B>>>24,B=s[B>>>24]<<24|s[B>>>16&255]<<16|s[B>>>8&255]<<8|s[B&255],B^=D[I/T|0]<<24),X[I]=X[I-T]^B);for(var P=this._invKeySchedule=[],G=0;G<q;G++){var I=q-G;if(G%4)var B=X[I];else var B=X[I-4];G<4||I<=4?P[G]=B:P[G]=A[s[B>>>24]]^y[s[B>>>16&255]]^m[s[B>>>8&255]]^g[s[B&255]]}}},encryptBlock:function(B,b){this._doCryptBlock(B,b,this._keySchedule,f,l,v,x,s)},decryptBlock:function(B,b){var _=B[b+1];B[b+1]=B[b+3],B[b+3]=_,this._doCryptBlock(B,b,this._invKeySchedule,A,y,m,g,p);var _=B[b+1];B[b+1]=B[b+3],B[b+3]=_},_doCryptBlock:function(B,b,_,T,k,q,X,I){for(var P=this._nRounds,G=B[b]^_[0],S=B[b+1]^_[1],N=B[b+2]^_[2],M=B[b+3]^_[3],H=4,Y=1;Y<P;Y++){var W=T[G>>>24]^k[S>>>16&255]^q[N>>>8&255]^X[M&255]^_[H++],ee=T[S>>>24]^k[N>>>16&255]^q[M>>>8&255]^X[G&255]^_[H++],J=T[N>>>24]^k[M>>>16&255]^q[G>>>8&255]^X[S&255]^_[H++],O=T[M>>>24]^k[G>>>16&255]^q[S>>>8&255]^X[N&255]^_[H++];G=W,S=ee,N=J,M=O}var W=(I[G>>>24]<<24|I[S>>>16&255]<<16|I[N>>>8&255]<<8|I[M&255])^_[H++],ee=(I[S>>>24]<<24|I[N>>>16&255]<<16|I[M>>>8&255]<<8|I[G&255])^_[H++],J=(I[N>>>24]<<24|I[M>>>16&255]<<16|I[G>>>8&255]<<8|I[S&255])^_[H++],O=(I[M>>>24]<<24|I[G>>>16&255]<<16|I[S>>>8&255]<<8|I[N&255])^_[H++];B[b]=W,B[b+1]=ee,B[b+2]=J,B[b+3]=O},keySize:256/32});n.AES=o._createHelper(C)}(),r.AES})}(Vn)),Vn.exports}var Kn={exports:{}},Na;function Xh(){return Na||(Na=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Nt(),Ht(),bt(),He())})(le,function(r){return function(){var n=r,i=n.lib,o=i.WordArray,a=i.BlockCipher,s=n.algo,p=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],f=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],v=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],x=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],A=s.DES=a.extend({_doReset:function(){for(var D=this._key,C=D.words,B=[],b=0;b<56;b++){var _=p[b]-1;B[b]=C[_>>>5]>>>31-_%32&1}for(var T=this._subKeys=[],k=0;k<16;k++){for(var q=T[k]=[],X=l[k],b=0;b<24;b++)q[b/6|0]|=B[(f[b]-1+X)%28]<<31-b%6,q[4+(b/6|0)]|=B[28+(f[b+24]-1+X)%28]<<31-b%6;q[0]=q[0]<<1|q[0]>>>31;for(var b=1;b<7;b++)q[b]=q[b]>>>(b-1)*4+3;q[7]=q[7]<<5|q[7]>>>27}for(var I=this._invSubKeys=[],b=0;b<16;b++)I[b]=T[15-b]},encryptBlock:function(D,C){this._doCryptBlock(D,C,this._subKeys)},decryptBlock:function(D,C){this._doCryptBlock(D,C,this._invSubKeys)},_doCryptBlock:function(D,C,B){this._lBlock=D[C],this._rBlock=D[C+1],y.call(this,4,252645135),y.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),y.call(this,1,1431655765);for(var b=0;b<16;b++){for(var _=B[b],T=this._lBlock,k=this._rBlock,q=0,X=0;X<8;X++)q|=v[X][((k^_[X])&x[X])>>>0];this._lBlock=k,this._rBlock=T^q}var I=this._lBlock;this._lBlock=this._rBlock,this._rBlock=I,y.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),D[C]=this._lBlock,D[C+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(D,C){var B=(this._lBlock>>>D^this._rBlock)&C;this._rBlock^=B,this._lBlock^=B<<D}function m(D,C){var B=(this._rBlock>>>D^this._lBlock)&C;this._lBlock^=B,this._rBlock^=B<<D}n.DES=a._createHelper(A);var g=s.TripleDES=a.extend({_doReset:function(){var D=this._key,C=D.words;if(C.length!==2&&C.length!==4&&C.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var B=C.slice(0,2),b=C.length<4?C.slice(0,2):C.slice(2,4),_=C.length<6?C.slice(0,2):C.slice(4,6);this._des1=A.createEncryptor(o.create(B)),this._des2=A.createEncryptor(o.create(b)),this._des3=A.createEncryptor(o.create(_))},encryptBlock:function(D,C){this._des1.encryptBlock(D,C),this._des2.decryptBlock(D,C),this._des3.encryptBlock(D,C)},decryptBlock:function(D,C){this._des3.decryptBlock(D,C),this._des2.encryptBlock(D,C),this._des1.decryptBlock(D,C)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=a._createHelper(g)}(),r.TripleDES})}(Kn)),Kn.exports}var jn={exports:{}},Ha;function Yh(){return Ha||(Ha=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Nt(),Ht(),bt(),He())})(le,function(r){return function(){var n=r,i=n.lib,o=i.StreamCipher,a=n.algo,s=a.RC4=o.extend({_doReset:function(){for(var l=this._key,v=l.words,x=l.sigBytes,A=this._S=[],y=0;y<256;y++)A[y]=y;for(var y=0,m=0;y<256;y++){var g=y%x,D=v[g>>>2]>>>24-g%4*8&255;m=(m+A[y]+D)%256;var C=A[y];A[y]=A[m],A[m]=C}this._i=this._j=0},_doProcessBlock:function(l,v){l[v]^=p.call(this)},keySize:256/32,ivSize:0});function p(){for(var l=this._S,v=this._i,x=this._j,A=0,y=0;y<4;y++){v=(v+1)%256,x=(x+l[v])%256;var m=l[v];l[v]=l[x],l[x]=m,A|=l[(l[v]+l[x])%256]<<24-y*8}return this._i=v,this._j=x,A}n.RC4=o._createHelper(s);var f=a.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)p.call(this)}});n.RC4Drop=o._createHelper(f)}(),r.RC4})}(jn)),jn.exports}var Xn={exports:{}},qa;function Zh(){return qa||(qa=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Nt(),Ht(),bt(),He())})(le,function(r){return function(){var n=r,i=n.lib,o=i.StreamCipher,a=n.algo,s=[],p=[],f=[],l=a.Rabbit=o.extend({_doReset:function(){for(var x=this._key.words,A=this.cfg.iv,y=0;y<4;y++)x[y]=(x[y]<<8|x[y]>>>24)&16711935|(x[y]<<24|x[y]>>>8)&4278255360;var m=this._X=[x[0],x[3]<<16|x[2]>>>16,x[1],x[0]<<16|x[3]>>>16,x[2],x[1]<<16|x[0]>>>16,x[3],x[2]<<16|x[1]>>>16],g=this._C=[x[2]<<16|x[2]>>>16,x[0]&4294901760|x[1]&65535,x[3]<<16|x[3]>>>16,x[1]&4294901760|x[2]&65535,x[0]<<16|x[0]>>>16,x[2]&4294901760|x[3]&65535,x[1]<<16|x[1]>>>16,x[3]&4294901760|x[0]&65535];this._b=0;for(var y=0;y<4;y++)v.call(this);for(var y=0;y<8;y++)g[y]^=m[y+4&7];if(A){var D=A.words,C=D[0],B=D[1],b=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,_=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,T=b>>>16|_&4294901760,k=_<<16|b&65535;g[0]^=b,g[1]^=T,g[2]^=_,g[3]^=k,g[4]^=b,g[5]^=T,g[6]^=_,g[7]^=k;for(var y=0;y<4;y++)v.call(this)}},_doProcessBlock:function(x,A){var y=this._X;v.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,x[A+m]^=s[m]},blockSize:128/32,ivSize:64/32});function v(){for(var x=this._X,A=this._C,y=0;y<8;y++)p[y]=A[y];A[0]=A[0]+1295307597+this._b|0,A[1]=A[1]+3545052371+(A[0]>>>0<p[0]>>>0?1:0)|0,A[2]=A[2]+886263092+(A[1]>>>0<p[1]>>>0?1:0)|0,A[3]=A[3]+1295307597+(A[2]>>>0<p[2]>>>0?1:0)|0,A[4]=A[4]+3545052371+(A[3]>>>0<p[3]>>>0?1:0)|0,A[5]=A[5]+886263092+(A[4]>>>0<p[4]>>>0?1:0)|0,A[6]=A[6]+1295307597+(A[5]>>>0<p[5]>>>0?1:0)|0,A[7]=A[7]+3545052371+(A[6]>>>0<p[6]>>>0?1:0)|0,this._b=A[7]>>>0<p[7]>>>0?1:0;for(var y=0;y<8;y++){var m=x[y]+A[y],g=m&65535,D=m>>>16,C=((g*g>>>17)+g*D>>>15)+D*D,B=((m&4294901760)*m|0)+((m&65535)*m|0);f[y]=C^B}x[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,x[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,x[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,x[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,x[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,x[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,x[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,x[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}n.Rabbit=o._createHelper(l)}(),r.Rabbit})}(Xn)),Xn.exports}var Yn={exports:{}},$a;function Qh(){return $a||($a=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Nt(),Ht(),bt(),He())})(le,function(r){return function(){var n=r,i=n.lib,o=i.StreamCipher,a=n.algo,s=[],p=[],f=[],l=a.RabbitLegacy=o.extend({_doReset:function(){var x=this._key.words,A=this.cfg.iv,y=this._X=[x[0],x[3]<<16|x[2]>>>16,x[1],x[0]<<16|x[3]>>>16,x[2],x[1]<<16|x[0]>>>16,x[3],x[2]<<16|x[1]>>>16],m=this._C=[x[2]<<16|x[2]>>>16,x[0]&4294901760|x[1]&65535,x[3]<<16|x[3]>>>16,x[1]&4294901760|x[2]&65535,x[0]<<16|x[0]>>>16,x[2]&4294901760|x[3]&65535,x[1]<<16|x[1]>>>16,x[3]&4294901760|x[0]&65535];this._b=0;for(var g=0;g<4;g++)v.call(this);for(var g=0;g<8;g++)m[g]^=y[g+4&7];if(A){var D=A.words,C=D[0],B=D[1],b=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,_=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,T=b>>>16|_&4294901760,k=_<<16|b&65535;m[0]^=b,m[1]^=T,m[2]^=_,m[3]^=k,m[4]^=b,m[5]^=T,m[6]^=_,m[7]^=k;for(var g=0;g<4;g++)v.call(this)}},_doProcessBlock:function(x,A){var y=this._X;v.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,x[A+m]^=s[m]},blockSize:128/32,ivSize:64/32});function v(){for(var x=this._X,A=this._C,y=0;y<8;y++)p[y]=A[y];A[0]=A[0]+1295307597+this._b|0,A[1]=A[1]+3545052371+(A[0]>>>0<p[0]>>>0?1:0)|0,A[2]=A[2]+886263092+(A[1]>>>0<p[1]>>>0?1:0)|0,A[3]=A[3]+1295307597+(A[2]>>>0<p[2]>>>0?1:0)|0,A[4]=A[4]+3545052371+(A[3]>>>0<p[3]>>>0?1:0)|0,A[5]=A[5]+886263092+(A[4]>>>0<p[4]>>>0?1:0)|0,A[6]=A[6]+1295307597+(A[5]>>>0<p[5]>>>0?1:0)|0,A[7]=A[7]+3545052371+(A[6]>>>0<p[6]>>>0?1:0)|0,this._b=A[7]>>>0<p[7]>>>0?1:0;for(var y=0;y<8;y++){var m=x[y]+A[y],g=m&65535,D=m>>>16,C=((g*g>>>17)+g*D>>>15)+D*D,B=((m&4294901760)*m|0)+((m&65535)*m|0);f[y]=C^B}x[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,x[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,x[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,x[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,x[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,x[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,x[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,x[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}n.RabbitLegacy=o._createHelper(l)}(),r.RabbitLegacy})}(Yn)),Yn.exports}var Zn={exports:{}},za;function Jh(){return za||(za=1,function(t,e){(function(r,n,i){t.exports=n(ve(),Nt(),Ht(),bt(),He())})(le,function(r){return function(){var n=r,i=n.lib,o=i.BlockCipher,a=n.algo;const s=16,p=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],f=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function v(g,D){let C=D>>24&255,B=D>>16&255,b=D>>8&255,_=D&255,T=g.sbox[0][C]+g.sbox[1][B];return T=T^g.sbox[2][b],T=T+g.sbox[3][_],T}function x(g,D,C){let B=D,b=C,_;for(let T=0;T<s;++T)B=B^g.pbox[T],b=v(g,B)^b,_=B,B=b,b=_;return _=B,B=b,b=_,b=b^g.pbox[s],B=B^g.pbox[s+1],{left:B,right:b}}function A(g,D,C){let B=D,b=C,_;for(let T=s+1;T>1;--T)B=B^g.pbox[T],b=v(g,B)^b,_=B,B=b,b=_;return _=B,B=b,b=_,b=b^g.pbox[1],B=B^g.pbox[0],{left:B,right:b}}function y(g,D,C){for(let k=0;k<4;k++){g.sbox[k]=[];for(let q=0;q<256;q++)g.sbox[k][q]=f[k][q]}let B=0;for(let k=0;k<s+2;k++)g.pbox[k]=p[k]^D[B],B++,B>=C&&(B=0);let b=0,_=0,T=0;for(let k=0;k<s+2;k+=2)T=x(g,b,_),b=T.left,_=T.right,g.pbox[k]=b,g.pbox[k+1]=_;for(let k=0;k<4;k++)for(let q=0;q<256;q+=2)T=x(g,b,_),b=T.left,_=T.right,g.sbox[k][q]=b,g.sbox[k][q+1]=_;return!0}var m=a.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var g=this._keyPriorReset=this._key,D=g.words,C=g.sigBytes/4;y(l,D,C)}},encryptBlock:function(g,D){var C=x(l,g[D],g[D+1]);g[D]=C.left,g[D+1]=C.right},decryptBlock:function(g,D){var C=A(l,g[D],g[D+1]);g[D]=C.left,g[D+1]=C.right},blockSize:64/32,keySize:128/32,ivSize:64/32});n.Blowfish=o._createHelper(m)}(),r.Blowfish})}(Zn)),Zn.exports}(function(t,e){(function(r,n,i){t.exports=n(ve(),e0(),Sh(),Th(),Nt(),Ih(),Ht(),pa(),Cn(),Rh(),ga(),Oh(),kh(),Ph(),In(),Mh(),bt(),He(),Lh(),Uh(),Nh(),Hh(),qh(),$h(),zh(),Wh(),Gh(),Vh(),Kh(),jh(),Xh(),Yh(),Zh(),Qh(),Jh())})(le,function(r){return r})})(Dh);var xe={},t0={};t0.byteLength=r1,t0.toByteArray=i1,t0.fromByteArray=s1;for(var yt=[],ot=[],e1=typeof Uint8Array!="undefined"?Uint8Array:Array,Qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tr=0,t1=Qn.length;tr<t1;++tr)yt[tr]=Qn[tr],ot[Qn.charCodeAt(tr)]=tr;ot[45]=62,ot[95]=63;function Wa(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function r1(t){var e=Wa(t),r=e[0],n=e[1];return(r+n)*3/4-n}function n1(t,e,r){return(e+r)*3/4-r}function i1(t){var e,r=Wa(t),n=r[0],i=r[1],o=new e1(n1(t,n,i)),a=0,s=i>0?n-4:n,p;for(p=0;p<s;p+=4)e=ot[t.charCodeAt(p)]<<18|ot[t.charCodeAt(p+1)]<<12|ot[t.charCodeAt(p+2)]<<6|ot[t.charCodeAt(p+3)],o[a++]=e>>16&255,o[a++]=e>>8&255,o[a++]=e&255;return i===2&&(e=ot[t.charCodeAt(p)]<<2|ot[t.charCodeAt(p+1)]>>4,o[a++]=e&255),i===1&&(e=ot[t.charCodeAt(p)]<<10|ot[t.charCodeAt(p+1)]<<4|ot[t.charCodeAt(p+2)]>>2,o[a++]=e>>8&255,o[a++]=e&255),o}function o1(t){return yt[t>>18&63]+yt[t>>12&63]+yt[t>>6&63]+yt[t&63]}function a1(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(o1(n));return i.join("")}function s1(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(a1(t,a,a+o>s?s:a+o));return n===1?(e=t[r-1],i.push(yt[e>>2]+yt[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(yt[e>>10]+yt[e>>4&63]+yt[e<<2&63]+"=")),i.join("")}var Jn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Jn.read=function(t,e,r,n,i){var o,a,s=i*8-n-1,p=(1<<s)-1,f=p>>1,l=-7,v=r?i-1:0,x=r?-1:1,A=t[e+v];for(v+=x,o=A&(1<<-l)-1,A>>=-l,l+=s;l>0;o=o*256+t[e+v],v+=x,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=a*256+t[e+v],v+=x,l-=8);if(o===0)o=1-f;else{if(o===p)return a?NaN:(A?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-f}return(A?-1:1)*a*Math.pow(2,o-n)},Jn.write=function(t,e,r,n,i,o){var a,s,p,f=o*8-i-1,l=(1<<f)-1,v=l>>1,x=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=n?0:o-1,y=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(p=Math.pow(2,-a))<1&&(a--,p*=2),a+v>=1?e+=x/p:e+=x*Math.pow(2,1-v),e*p>=2&&(a++,p/=2),a+v>=l?(s=0,a=l):a+v>=1?(s=(e*p-1)*Math.pow(2,i),a=a+v):(s=e*Math.pow(2,v-1)*Math.pow(2,i),a=0));i>=8;t[r+A]=s&255,A+=y,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+A]=a&255,A+=y,a/=256,f-=8);t[r+A-y]|=m*128};/*!
27
+ */return r.mode.CTRGladman=function(){var i=r.lib.BlockCipherMode.extend();function p(c){if((c>>24&255)===255){var d=c>>16&255,o=c>>8&255,n=c&255;d===255?(d=0,o===255?(o=0,n===255?n=0:++n):++o):++d,c=0,c+=d<<16,c+=o<<8,c+=n}else c+=1<<24;return c}function l(c){return(c[0]=p(c[0]))===0&&(c[1]=p(c[1])),c}var s=i.Encryptor=i.extend({processBlock:function(c,d){var o=this._cipher,n=o.blockSize,h=this._iv,a=this._counter;h&&(a=this._counter=h.slice(0),this._iv=void 0),l(a);var u=a.slice(0);o.encryptBlock(u,0);for(var f=0;f<n;f++)c[d+f]^=u[f]}});return i.Decryptor=s,i}(),r.mode.CTRGladman})}(Wi)),Wi.exports}var Vi={exports:{}},Vs;function Sp(){return Vs||(Vs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.mode.OFB=function(){var i=r.lib.BlockCipherMode.extend(),p=i.Encryptor=i.extend({processBlock:function(l,s){var c=this._cipher,d=c.blockSize,o=this._iv,n=this._keystream;o&&(n=this._keystream=o.slice(0),this._iv=void 0),c.encryptBlock(n,0);for(var h=0;h<d;h++)l[s+h]^=n[h]}});return i.Decryptor=p,i}(),r.mode.OFB})}(Vi)),Vi.exports}var Ki={exports:{}},Ks;function Bp(){return Ks||(Ks=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.mode.ECB=function(){var i=r.lib.BlockCipherMode.extend();return i.Encryptor=i.extend({processBlock:function(p,l){this._cipher.encryptBlock(p,l)}}),i.Decryptor=i.extend({processBlock:function(p,l){this._cipher.decryptBlock(p,l)}}),i}(),r.mode.ECB})}(Ki)),Ki.exports}var Gi={exports:{}},Gs;function kp(){return Gs||(Gs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.pad.AnsiX923={pad:function(i,p){var l=i.sigBytes,s=p*4,c=s-l%s,d=l+c-1;i.clamp(),i.words[d>>>2]|=c<<24-d%4*8,i.sigBytes+=c},unpad:function(i){var p=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=p}},r.pad.Ansix923})}(Gi)),Gi.exports}var Qi={exports:{}},Qs;function Tp(){return Qs||(Qs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.pad.Iso10126={pad:function(i,p){var l=p*4,s=l-i.sigBytes%l;i.concat(r.lib.WordArray.random(s-1)).concat(r.lib.WordArray.create([s<<24],1))},unpad:function(i){var p=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=p}},r.pad.Iso10126})}(Qi)),Qi.exports}var Yi={exports:{}},Ys;function Fp(){return Ys||(Ys=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.pad.Iso97971={pad:function(i,p){i.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(i,p)},unpad:function(i){r.pad.ZeroPadding.unpad(i),i.sigBytes--}},r.pad.Iso97971})}(Yi)),Yi.exports}var Xi={exports:{}},Xs;function Dp(){return Xs||(Xs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.pad.ZeroPadding={pad:function(i,p){var l=p*4;i.clamp(),i.sigBytes+=l-(i.sigBytes%l||l)},unpad:function(i){for(var p=i.words,l=i.sigBytes-1,l=i.sigBytes-1;l>=0;l--)if(p[l>>>2]>>>24-l%4*8&255){i.sigBytes=l+1;break}}},r.pad.ZeroPadding})}(Xi)),Xi.exports}var Zi={exports:{}},Zs;function Ip(){return Zs||(Zs=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})}(Zi)),Zi.exports}var Ji={exports:{}},Js;function Rp(){return Js||(Js=1,function(e,t){(function(r,i,p){e.exports=i(Se(),He())})(be,function(r){return function(i){var p=r,l=p.lib,s=l.CipherParams,c=p.enc,d=c.Hex,o=p.format;o.Hex={stringify:function(n){return n.ciphertext.toString(d)},parse:function(n){var h=d.parse(n);return s.create({ciphertext:h})}}}(),r.format.Hex})}(Ji)),Ji.exports}var eo={exports:{}},e0;function Op(){return e0||(e0=1,function(e,t){(function(r,i,p){e.exports=i(Se(),qt(),zt(),kt(),He())})(be,function(r){return function(){var i=r,p=i.lib,l=p.BlockCipher,s=i.algo,c=[],d=[],o=[],n=[],h=[],a=[],u=[],f=[],v=[],y=[];(function(){for(var m=[],E=0;E<256;E++)E<128?m[E]=E<<1:m[E]=E<<1^283;for(var F=0,T=0,E=0;E<256;E++){var D=T^T<<1^T<<2^T<<3^T<<4;D=D>>>8^D&255^99,c[F]=D,d[D]=F;var I=m[F],Y=m[I],W=m[Y],_=m[D]*257^D*16843008;o[F]=_<<24|_>>>8,n[F]=_<<16|_>>>16,h[F]=_<<8|_>>>24,a[F]=_;var _=W*16843009^Y*65537^I*257^F*16843008;u[D]=_<<24|_>>>8,f[D]=_<<16|_>>>16,v[D]=_<<8|_>>>24,y[D]=_,F?(F=I^m[m[m[W^I]]],T^=m[m[T]]):F=T=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],b=s.AES=l.extend({_doReset:function(){var m;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var E=this._keyPriorReset=this._key,F=E.words,T=E.sigBytes/4,D=this._nRounds=T+6,I=(D+1)*4,Y=this._keySchedule=[],W=0;W<I;W++)W<T?Y[W]=F[W]:(m=Y[W-1],W%T?T>6&&W%T==4&&(m=c[m>>>24]<<24|c[m>>>16&255]<<16|c[m>>>8&255]<<8|c[m&255]):(m=m<<8|m>>>24,m=c[m>>>24]<<24|c[m>>>16&255]<<16|c[m>>>8&255]<<8|c[m&255],m^=g[W/T|0]<<24),Y[W]=Y[W-T]^m);for(var _=this._invKeySchedule=[],A=0;A<I;A++){var W=I-A;if(A%4)var m=Y[W];else var m=Y[W-4];A<4||W<=4?_[A]=m:_[A]=u[c[m>>>24]]^f[c[m>>>16&255]]^v[c[m>>>8&255]]^y[c[m&255]]}}},encryptBlock:function(m,E){this._doCryptBlock(m,E,this._keySchedule,o,n,h,a,c)},decryptBlock:function(m,E){var F=m[E+1];m[E+1]=m[E+3],m[E+3]=F,this._doCryptBlock(m,E,this._invKeySchedule,u,f,v,y,d);var F=m[E+1];m[E+1]=m[E+3],m[E+3]=F},_doCryptBlock:function(m,E,F,T,D,I,Y,W){for(var _=this._nRounds,A=m[E]^F[0],C=m[E+1]^F[1],B=m[E+2]^F[2],N=m[E+3]^F[3],q=4,X=1;X<_;X++){var $=T[A>>>24]^D[C>>>16&255]^I[B>>>8&255]^Y[N&255]^F[q++],M=T[C>>>24]^D[B>>>16&255]^I[N>>>8&255]^Y[A&255]^F[q++],j=T[B>>>24]^D[N>>>16&255]^I[A>>>8&255]^Y[C&255]^F[q++],L=T[N>>>24]^D[A>>>16&255]^I[C>>>8&255]^Y[B&255]^F[q++];A=$,C=M,B=j,N=L}var $=(W[A>>>24]<<24|W[C>>>16&255]<<16|W[B>>>8&255]<<8|W[N&255])^F[q++],M=(W[C>>>24]<<24|W[B>>>16&255]<<16|W[N>>>8&255]<<8|W[A&255])^F[q++],j=(W[B>>>24]<<24|W[N>>>16&255]<<16|W[A>>>8&255]<<8|W[C&255])^F[q++],L=(W[N>>>24]<<24|W[A>>>16&255]<<16|W[C>>>8&255]<<8|W[B&255])^F[q++];m[E]=$,m[E+1]=M,m[E+2]=j,m[E+3]=L},keySize:256/32});i.AES=l._createHelper(b)}(),r.AES})}(eo)),eo.exports}var to={exports:{}},t0;function Pp(){return t0||(t0=1,function(e,t){(function(r,i,p){e.exports=i(Se(),qt(),zt(),kt(),He())})(be,function(r){return function(){var i=r,p=i.lib,l=p.WordArray,s=p.BlockCipher,c=i.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],n=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],a=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=c.DES=s.extend({_doReset:function(){for(var g=this._key,b=g.words,m=[],E=0;E<56;E++){var F=d[E]-1;m[E]=b[F>>>5]>>>31-F%32&1}for(var T=this._subKeys=[],D=0;D<16;D++){for(var I=T[D]=[],Y=n[D],E=0;E<24;E++)I[E/6|0]|=m[(o[E]-1+Y)%28]<<31-E%6,I[4+(E/6|0)]|=m[28+(o[E+24]-1+Y)%28]<<31-E%6;I[0]=I[0]<<1|I[0]>>>31;for(var E=1;E<7;E++)I[E]=I[E]>>>(E-1)*4+3;I[7]=I[7]<<5|I[7]>>>27}for(var W=this._invSubKeys=[],E=0;E<16;E++)W[E]=T[15-E]},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._subKeys)},decryptBlock:function(g,b){this._doCryptBlock(g,b,this._invSubKeys)},_doCryptBlock:function(g,b,m){this._lBlock=g[b],this._rBlock=g[b+1],f.call(this,4,252645135),f.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),f.call(this,1,1431655765);for(var E=0;E<16;E++){for(var F=m[E],T=this._lBlock,D=this._rBlock,I=0,Y=0;Y<8;Y++)I|=h[Y][((D^F[Y])&a[Y])>>>0];this._lBlock=D,this._rBlock=T^I}var W=this._lBlock;this._lBlock=this._rBlock,this._rBlock=W,f.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),g[b]=this._lBlock,g[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(g,b){var m=(this._lBlock>>>g^this._rBlock)&b;this._rBlock^=m,this._lBlock^=m<<g}function v(g,b){var m=(this._rBlock>>>g^this._lBlock)&b;this._lBlock^=m,this._rBlock^=m<<g}i.DES=s._createHelper(u);var y=c.TripleDES=s.extend({_doReset:function(){var g=this._key,b=g.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var m=b.slice(0,2),E=b.length<4?b.slice(0,2):b.slice(2,4),F=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=u.createEncryptor(l.create(m)),this._des2=u.createEncryptor(l.create(E)),this._des3=u.createEncryptor(l.create(F))},encryptBlock:function(g,b){this._des1.encryptBlock(g,b),this._des2.decryptBlock(g,b),this._des3.encryptBlock(g,b)},decryptBlock:function(g,b){this._des3.decryptBlock(g,b),this._des2.encryptBlock(g,b),this._des1.decryptBlock(g,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});i.TripleDES=s._createHelper(y)}(),r.TripleDES})}(to)),to.exports}var ro={exports:{}},r0;function Mp(){return r0||(r0=1,function(e,t){(function(r,i,p){e.exports=i(Se(),qt(),zt(),kt(),He())})(be,function(r){return function(){var i=r,p=i.lib,l=p.StreamCipher,s=i.algo,c=s.RC4=l.extend({_doReset:function(){for(var n=this._key,h=n.words,a=n.sigBytes,u=this._S=[],f=0;f<256;f++)u[f]=f;for(var f=0,v=0;f<256;f++){var y=f%a,g=h[y>>>2]>>>24-y%4*8&255;v=(v+u[f]+g)%256;var b=u[f];u[f]=u[v],u[v]=b}this._i=this._j=0},_doProcessBlock:function(n,h){n[h]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var n=this._S,h=this._i,a=this._j,u=0,f=0;f<4;f++){h=(h+1)%256,a=(a+n[h])%256;var v=n[h];n[h]=n[a],n[a]=v,u|=n[(n[h]+n[a])%256]<<24-f*8}return this._i=h,this._j=a,u}i.RC4=l._createHelper(c);var o=s.RC4Drop=c.extend({cfg:c.cfg.extend({drop:192}),_doReset:function(){c._doReset.call(this);for(var n=this.cfg.drop;n>0;n--)d.call(this)}});i.RC4Drop=l._createHelper(o)}(),r.RC4})}(ro)),ro.exports}var no={exports:{}},n0;function Np(){return n0||(n0=1,function(e,t){(function(r,i,p){e.exports=i(Se(),qt(),zt(),kt(),He())})(be,function(r){return function(){var i=r,p=i.lib,l=p.StreamCipher,s=i.algo,c=[],d=[],o=[],n=s.Rabbit=l.extend({_doReset:function(){for(var a=this._key.words,u=this.cfg.iv,f=0;f<4;f++)a[f]=(a[f]<<8|a[f]>>>24)&16711935|(a[f]<<24|a[f]>>>8)&4278255360;var v=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],y=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var f=0;f<4;f++)h.call(this);for(var f=0;f<8;f++)y[f]^=v[f+4&7];if(u){var g=u.words,b=g[0],m=g[1],E=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,F=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,T=E>>>16|F&4294901760,D=F<<16|E&65535;y[0]^=E,y[1]^=T,y[2]^=F,y[3]^=D,y[4]^=E,y[5]^=T,y[6]^=F,y[7]^=D;for(var f=0;f<4;f++)h.call(this)}},_doProcessBlock:function(a,u){var f=this._X;h.call(this),c[0]=f[0]^f[5]>>>16^f[3]<<16,c[1]=f[2]^f[7]>>>16^f[5]<<16,c[2]=f[4]^f[1]>>>16^f[7]<<16,c[3]=f[6]^f[3]>>>16^f[1]<<16;for(var v=0;v<4;v++)c[v]=(c[v]<<8|c[v]>>>24)&16711935|(c[v]<<24|c[v]>>>8)&4278255360,a[u+v]^=c[v]},blockSize:128/32,ivSize:64/32});function h(){for(var a=this._X,u=this._C,f=0;f<8;f++)d[f]=u[f];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<d[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<d[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<d[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<d[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<d[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<d[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<d[6]>>>0?1:0)|0,this._b=u[7]>>>0<d[7]>>>0?1:0;for(var f=0;f<8;f++){var v=a[f]+u[f],y=v&65535,g=v>>>16,b=((y*y>>>17)+y*g>>>15)+g*g,m=((v&4294901760)*v|0)+((v&65535)*v|0);o[f]=b^m}a[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,a[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,a[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,a[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,a[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,a[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,a[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,a[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}i.Rabbit=l._createHelper(n)}(),r.Rabbit})}(no)),no.exports}var io={exports:{}},i0;function Lp(){return i0||(i0=1,function(e,t){(function(r,i,p){e.exports=i(Se(),qt(),zt(),kt(),He())})(be,function(r){return function(){var i=r,p=i.lib,l=p.StreamCipher,s=i.algo,c=[],d=[],o=[],n=s.RabbitLegacy=l.extend({_doReset:function(){var a=this._key.words,u=this.cfg.iv,f=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],v=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[0]&65535];this._b=0;for(var y=0;y<4;y++)h.call(this);for(var y=0;y<8;y++)v[y]^=f[y+4&7];if(u){var g=u.words,b=g[0],m=g[1],E=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,F=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,T=E>>>16|F&4294901760,D=F<<16|E&65535;v[0]^=E,v[1]^=T,v[2]^=F,v[3]^=D,v[4]^=E,v[5]^=T,v[6]^=F,v[7]^=D;for(var y=0;y<4;y++)h.call(this)}},_doProcessBlock:function(a,u){var f=this._X;h.call(this),c[0]=f[0]^f[5]>>>16^f[3]<<16,c[1]=f[2]^f[7]>>>16^f[5]<<16,c[2]=f[4]^f[1]>>>16^f[7]<<16,c[3]=f[6]^f[3]>>>16^f[1]<<16;for(var v=0;v<4;v++)c[v]=(c[v]<<8|c[v]>>>24)&16711935|(c[v]<<24|c[v]>>>8)&4278255360,a[u+v]^=c[v]},blockSize:128/32,ivSize:64/32});function h(){for(var a=this._X,u=this._C,f=0;f<8;f++)d[f]=u[f];u[0]=u[0]+1295307597+this._b|0,u[1]=u[1]+3545052371+(u[0]>>>0<d[0]>>>0?1:0)|0,u[2]=u[2]+886263092+(u[1]>>>0<d[1]>>>0?1:0)|0,u[3]=u[3]+1295307597+(u[2]>>>0<d[2]>>>0?1:0)|0,u[4]=u[4]+3545052371+(u[3]>>>0<d[3]>>>0?1:0)|0,u[5]=u[5]+886263092+(u[4]>>>0<d[4]>>>0?1:0)|0,u[6]=u[6]+1295307597+(u[5]>>>0<d[5]>>>0?1:0)|0,u[7]=u[7]+3545052371+(u[6]>>>0<d[6]>>>0?1:0)|0,this._b=u[7]>>>0<d[7]>>>0?1:0;for(var f=0;f<8;f++){var v=a[f]+u[f],y=v&65535,g=v>>>16,b=((y*y>>>17)+y*g>>>15)+g*g,m=((v&4294901760)*v|0)+((v&65535)*v|0);o[f]=b^m}a[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,a[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,a[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,a[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,a[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,a[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,a[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,a[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}i.RabbitLegacy=l._createHelper(n)}(),r.RabbitLegacy})}(io)),io.exports}var oo={exports:{}},o0;function Up(){return o0||(o0=1,function(e,t){(function(r,i,p){e.exports=i(Se(),qt(),zt(),kt(),He())})(be,function(r){return function(){var i=r,p=i.lib,l=p.BlockCipher,s=i.algo;const c=16,d=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var n={pbox:[],sbox:[]};function h(y,g){let b=g>>24&255,m=g>>16&255,E=g>>8&255,F=g&255,T=y.sbox[0][b]+y.sbox[1][m];return T=T^y.sbox[2][E],T=T+y.sbox[3][F],T}function a(y,g,b){let m=g,E=b,F;for(let T=0;T<c;++T)m=m^y.pbox[T],E=h(y,m)^E,F=m,m=E,E=F;return F=m,m=E,E=F,E=E^y.pbox[c],m=m^y.pbox[c+1],{left:m,right:E}}function u(y,g,b){let m=g,E=b,F;for(let T=c+1;T>1;--T)m=m^y.pbox[T],E=h(y,m)^E,F=m,m=E,E=F;return F=m,m=E,E=F,E=E^y.pbox[1],m=m^y.pbox[0],{left:m,right:E}}function f(y,g,b){for(let D=0;D<4;D++){y.sbox[D]=[];for(let I=0;I<256;I++)y.sbox[D][I]=o[D][I]}let m=0;for(let D=0;D<c+2;D++)y.pbox[D]=d[D]^g[m],m++,m>=b&&(m=0);let E=0,F=0,T=0;for(let D=0;D<c+2;D+=2)T=a(y,E,F),E=T.left,F=T.right,y.pbox[D]=E,y.pbox[D+1]=F;for(let D=0;D<4;D++)for(let I=0;I<256;I+=2)T=a(y,E,F),E=T.left,F=T.right,y.sbox[D][I]=E,y.sbox[D][I+1]=F;return!0}var v=s.Blowfish=l.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var y=this._keyPriorReset=this._key,g=y.words,b=y.sigBytes/4;f(n,g,b)}},encryptBlock:function(y,g){var b=a(n,y[g],y[g+1]);y[g]=b.left,y[g+1]=b.right},decryptBlock:function(y,g){var b=u(n,y[g],y[g+1]);y[g]=b.left,y[g+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});i.Blowfish=l._createHelper(v)}(),r.Blowfish})}(oo)),oo.exports}(function(e,t){(function(r,i,p){e.exports=i(Se(),sn(),yp(),mp(),qt(),vp(),zt(),Ds(),Ii(),xp(),Ps(),gp(),bp(),wp(),Ui(),Ep(),kt(),He(),_p(),Ap(),Cp(),Sp(),Bp(),kp(),Tp(),Fp(),Dp(),Ip(),Rp(),Op(),Pp(),Mp(),Np(),Lp(),Up())})(be,function(r){return r})})(dp);var _e={},ln={};ln.byteLength=jp,ln.toByteArray=$p,ln.fromByteArray=Kp;for(var xt=[],at=[],qp=typeof Uint8Array!="undefined"?Uint8Array:Array,ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nr=0,zp=ao.length;nr<zp;++nr)xt[nr]=ao[nr],at[ao.charCodeAt(nr)]=nr;at[45]=62,at[95]=63;function a0(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function jp(e){var t=a0(e),r=t[0],i=t[1];return(r+i)*3/4-i}function Hp(e,t,r){return(t+r)*3/4-r}function $p(e){var t,r=a0(e),i=r[0],p=r[1],l=new qp(Hp(e,i,p)),s=0,c=p>0?i-4:i,d;for(d=0;d<c;d+=4)t=at[e.charCodeAt(d)]<<18|at[e.charCodeAt(d+1)]<<12|at[e.charCodeAt(d+2)]<<6|at[e.charCodeAt(d+3)],l[s++]=t>>16&255,l[s++]=t>>8&255,l[s++]=t&255;return p===2&&(t=at[e.charCodeAt(d)]<<2|at[e.charCodeAt(d+1)]>>4,l[s++]=t&255),p===1&&(t=at[e.charCodeAt(d)]<<10|at[e.charCodeAt(d+1)]<<4|at[e.charCodeAt(d+2)]>>2,l[s++]=t>>8&255,l[s++]=t&255),l}function Wp(e){return xt[e>>18&63]+xt[e>>12&63]+xt[e>>6&63]+xt[e&63]}function Vp(e,t,r){for(var i,p=[],l=t;l<r;l+=3)i=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),p.push(Wp(i));return p.join("")}function Kp(e){for(var t,r=e.length,i=r%3,p=[],l=16383,s=0,c=r-i;s<c;s+=l)p.push(Vp(e,s,s+l>c?c:s+l));return i===1?(t=e[r-1],p.push(xt[t>>2]+xt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],p.push(xt[t>>10]+xt[t>>4&63]+xt[t<<2&63]+"=")),p.join("")}var so={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */so.read=function(e,t,r,i,p){var l,s,c=p*8-i-1,d=(1<<c)-1,o=d>>1,n=-7,h=r?p-1:0,a=r?-1:1,u=e[t+h];for(h+=a,l=u&(1<<-n)-1,u>>=-n,n+=c;n>0;l=l*256+e[t+h],h+=a,n-=8);for(s=l&(1<<-n)-1,l>>=-n,n+=i;n>0;s=s*256+e[t+h],h+=a,n-=8);if(l===0)l=1-o;else{if(l===d)return s?NaN:(u?-1:1)*(1/0);s=s+Math.pow(2,i),l=l-o}return(u?-1:1)*s*Math.pow(2,l-i)},so.write=function(e,t,r,i,p,l){var s,c,d,o=l*8-p-1,n=(1<<o)-1,h=n>>1,a=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=i?0:l-1,f=i?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,s=n):(s=Math.floor(Math.log(t)/Math.LN2),t*(d=Math.pow(2,-s))<1&&(s--,d*=2),s+h>=1?t+=a/d:t+=a*Math.pow(2,1-h),t*d>=2&&(s++,d/=2),s+h>=n?(c=0,s=n):s+h>=1?(c=(t*d-1)*Math.pow(2,p),s=s+h):(c=t*Math.pow(2,h-1)*Math.pow(2,p),s=0));p>=8;e[r+u]=c&255,u+=f,c/=256,p-=8);for(s=s<<p|c,o+=p;o>0;e[r+u]=s&255,u+=f,s/=256,o-=8);e[r+u-f]|=v*128};/*!
23
28
  * The buffer module from node.js, for the browser.
24
29
  *
25
30
  * @author Feross Aboukhadijeh <https://feross.org>
26
31
  * @license MIT
27
- */(function(t){var e=t0,r=Jn,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=C,t.INSPECT_MAX_BYTES=50;var i=2147483647;t.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!s.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{var w=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(w,c),w.foo()===42}catch(u){return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(w){if(w>i)throw new RangeError('The value "'+w+'" is invalid for option "size"');var c=new Uint8Array(w);return Object.setPrototypeOf(c,s.prototype),c}function s(w,c,u){if(typeof w=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(w)}return p(w,c,u)}s.poolSize=8192;function p(w,c,u){if(typeof w=="string")return x(w,c);if(ArrayBuffer.isView(w))return y(w);if(w==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w);if(Ee(w,ArrayBuffer)||w&&Ee(w.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ee(w,SharedArrayBuffer)||w&&Ee(w.buffer,SharedArrayBuffer)))return m(w,c,u);if(typeof w=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var F=w.valueOf&&w.valueOf();if(F!=null&&F!==w)return s.from(F,c,u);var L=g(w);if(L)return L;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof w[Symbol.toPrimitive]=="function")return s.from(w[Symbol.toPrimitive]("string"),c,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w)}s.from=function(w,c,u){return p(w,c,u)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function f(w){if(typeof w!="number")throw new TypeError('"size" argument must be of type number');if(w<0)throw new RangeError('The value "'+w+'" is invalid for option "size"')}function l(w,c,u){return f(w),w<=0?a(w):c!==void 0?typeof u=="string"?a(w).fill(c,u):a(w).fill(c):a(w)}s.alloc=function(w,c,u){return l(w,c,u)};function v(w){return f(w),a(w<0?0:D(w)|0)}s.allocUnsafe=function(w){return v(w)},s.allocUnsafeSlow=function(w){return v(w)};function x(w,c){if((typeof c!="string"||c==="")&&(c="utf8"),!s.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var u=B(w,c)|0,F=a(u),L=F.write(w,c);return L!==u&&(F=F.slice(0,L)),F}function A(w){for(var c=w.length<0?0:D(w.length)|0,u=a(c),F=0;F<c;F+=1)u[F]=w[F]&255;return u}function y(w){if(Ee(w,Uint8Array)){var c=new Uint8Array(w);return m(c.buffer,c.byteOffset,c.byteLength)}return A(w)}function m(w,c,u){if(c<0||w.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(w.byteLength<c+(u||0))throw new RangeError('"length" is outside of buffer bounds');var F;return c===void 0&&u===void 0?F=new Uint8Array(w):u===void 0?F=new Uint8Array(w,c):F=new Uint8Array(w,c,u),Object.setPrototypeOf(F,s.prototype),F}function g(w){if(s.isBuffer(w)){var c=D(w.length)|0,u=a(c);return u.length===0||w.copy(u,0,0,c),u}if(w.length!==void 0)return typeof w.length!="number"||Me(w.length)?a(0):A(w);if(w.type==="Buffer"&&Array.isArray(w.data))return A(w.data)}function D(w){if(w>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return w|0}function C(w){return+w!=w&&(w=0),s.alloc(+w)}s.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==s.prototype},s.compare=function(c,u){if(Ee(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),Ee(u,Uint8Array)&&(u=s.from(u,u.offset,u.byteLength)),!s.isBuffer(c)||!s.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===u)return 0;for(var F=c.length,L=u.length,K=0,Z=Math.min(F,L);K<Z;++K)if(c[K]!==u[K]){F=c[K],L=u[K];break}return F<L?-1:L<F?1:0},s.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(c,u){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return s.alloc(0);var F;if(u===void 0)for(u=0,F=0;F<c.length;++F)u+=c[F].length;var L=s.allocUnsafe(u),K=0;for(F=0;F<c.length;++F){var Z=c[F];if(Ee(Z,Uint8Array))K+Z.length>L.length?s.from(Z).copy(L,K):Uint8Array.prototype.set.call(L,Z,K);else if(s.isBuffer(Z))Z.copy(L,K);else throw new TypeError('"list" argument must be an Array of Buffers');K+=Z.length}return L};function B(w,c){if(s.isBuffer(w))return w.length;if(ArrayBuffer.isView(w)||Ee(w,ArrayBuffer))return w.byteLength;if(typeof w!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof w);var u=w.length,F=arguments.length>2&&arguments[2]===!0;if(!F&&u===0)return 0;for(var L=!1;;)switch(c){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return fe(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return Ke(w).length;default:if(L)return F?-1:fe(w).length;c=(""+c).toLowerCase(),L=!0}}s.byteLength=B;function b(w,c,u){var F=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,c>>>=0,u<=c))return"";for(w||(w="utf8");;)switch(w){case"hex":return ee(this,c,u);case"utf8":case"utf-8":return N(this,c,u);case"ascii":return Y(this,c,u);case"latin1":case"binary":return W(this,c,u);case"base64":return S(this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,c,u);default:if(F)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),F=!0}}s.prototype._isBuffer=!0;function _(w,c,u){var F=w[c];w[c]=w[u],w[u]=F}s.prototype.swap16=function(){var c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var u=0;u<c;u+=2)_(this,u,u+1);return this},s.prototype.swap32=function(){var c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var u=0;u<c;u+=4)_(this,u,u+3),_(this,u+1,u+2);return this},s.prototype.swap64=function(){var c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var u=0;u<c;u+=8)_(this,u,u+7),_(this,u+1,u+6),_(this,u+2,u+5),_(this,u+3,u+4);return this},s.prototype.toString=function(){var c=this.length;return c===0?"":arguments.length===0?N(this,0,c):b.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(c){if(!s.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:s.compare(this,c)===0},s.prototype.inspect=function(){var c="",u=t.INSPECT_MAX_BYTES;return c=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(c+=" ... "),"<Buffer "+c+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(c,u,F,L,K){if(Ee(c,Uint8Array)&&(c=s.from(c,c.offset,c.byteLength)),!s.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(u===void 0&&(u=0),F===void 0&&(F=c?c.length:0),L===void 0&&(L=0),K===void 0&&(K=this.length),u<0||F>c.length||L<0||K>this.length)throw new RangeError("out of range index");if(L>=K&&u>=F)return 0;if(L>=K)return-1;if(u>=F)return 1;if(u>>>=0,F>>>=0,L>>>=0,K>>>=0,this===c)return 0;for(var Z=K-L,ue=F-u,ye=Math.min(Z,ue),Be=this.slice(L,K),De=c.slice(u,F),Ae=0;Ae<ye;++Ae)if(Be[Ae]!==De[Ae]){Z=Be[Ae],ue=De[Ae];break}return Z<ue?-1:ue<Z?1:0};function T(w,c,u,F,L){if(w.length===0)return-1;if(typeof u=="string"?(F=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Me(u)&&(u=L?0:w.length-1),u<0&&(u=w.length+u),u>=w.length){if(L)return-1;u=w.length-1}else if(u<0)if(L)u=0;else return-1;if(typeof c=="string"&&(c=s.from(c,F)),s.isBuffer(c))return c.length===0?-1:k(w,c,u,F,L);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(w,c,u):Uint8Array.prototype.lastIndexOf.call(w,c,u):k(w,[c],u,F,L);throw new TypeError("val must be string, number or Buffer")}function k(w,c,u,F,L){var K=1,Z=w.length,ue=c.length;if(F!==void 0&&(F=String(F).toLowerCase(),F==="ucs2"||F==="ucs-2"||F==="utf16le"||F==="utf-16le")){if(w.length<2||c.length<2)return-1;K=2,Z/=2,ue/=2,u/=2}function ye(qt,__$t__){return K===1?qt[__$t__]:qt.readUInt16BE(__$t__*K)}var Be;if(L){var De=-1;for(Be=u;Be<Z;Be++)if(ye(w,Be)===ye(c,De===-1?0:Be-De)){if(De===-1&&(De=Be),Be-De+1===ue)return De*K}else De!==-1&&(Be-=Be-De),De=-1}else for(u+ue>Z&&(u=Z-ue),Be=u;Be>=0;Be--){for(var Ae=!0,_t=0;_t<ue;_t++)if(ye(w,Be+_t)!==ye(c,_t)){Ae=!1;break}if(Ae)return Be}return-1}s.prototype.includes=function(c,u,F){return this.indexOf(c,u,F)!==-1},s.prototype.indexOf=function(c,u,F){return T(this,c,u,F,!0)},s.prototype.lastIndexOf=function(c,u,F){return T(this,c,u,F,!1)};function q(w,c,u,F){u=Number(u)||0;var L=w.length-u;F?(F=Number(F),F>L&&(F=L)):F=L;var K=c.length;F>K/2&&(F=K/2);for(var Z=0;Z<F;++Z){var ue=parseInt(c.substr(Z*2,2),16);if(Me(ue))return Z;w[u+Z]=ue}return Z}function X(w,c,u,F){return ze(fe(c,w.length-u),w,u,F)}function I(w,c,u,F){return ze(Se(c),w,u,F)}function P(w,c,u,F){return ze(Ke(c),w,u,F)}function G(w,c,u,F){return ze(Fe(c,w.length-u),w,u,F)}s.prototype.write=function(c,u,F,L){if(u===void 0)L="utf8",F=this.length,u=0;else if(F===void 0&&typeof u=="string")L=u,F=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(F)?(F=F>>>0,L===void 0&&(L="utf8")):(L=F,F=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var K=this.length-u;if((F===void 0||F>K)&&(F=K),c.length>0&&(F<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var Z=!1;;)switch(L){case"hex":return q(this,c,u,F);case"utf8":case"utf-8":return X(this,c,u,F);case"ascii":case"latin1":case"binary":return I(this,c,u,F);case"base64":return P(this,c,u,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,c,u,F);default:if(Z)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),Z=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(w,c,u){return c===0&&u===w.length?e.fromByteArray(w):e.fromByteArray(w.slice(c,u))}function N(w,c,u){u=Math.min(w.length,u);for(var F=[],L=c;L<u;){var K=w[L],Z=null,ue=K>239?4:K>223?3:K>191?2:1;if(L+ue<=u){var ye,Be,De,Ae;switch(ue){case 1:K<128&&(Z=K);break;case 2:ye=w[L+1],(ye&192)===128&&(Ae=(K&31)<<6|ye&63,Ae>127&&(Z=Ae));break;case 3:ye=w[L+1],Be=w[L+2],(ye&192)===128&&(Be&192)===128&&(Ae=(K&15)<<12|(ye&63)<<6|Be&63,Ae>2047&&(Ae<55296||Ae>57343)&&(Z=Ae));break;case 4:ye=w[L+1],Be=w[L+2],De=w[L+3],(ye&192)===128&&(Be&192)===128&&(De&192)===128&&(Ae=(K&15)<<18|(ye&63)<<12|(Be&63)<<6|De&63,Ae>65535&&Ae<1114112&&(Z=Ae))}}Z===null?(Z=65533,ue=1):Z>65535&&(Z-=65536,F.push(Z>>>10&1023|55296),Z=56320|Z&1023),F.push(Z),L+=ue}return H(F)}var M=4096;function H(w){var c=w.length;if(c<=M)return String.fromCharCode.apply(String,w);for(var u="",F=0;F<c;)u+=String.fromCharCode.apply(String,w.slice(F,F+=M));return u}function Y(w,c,u){var F="";u=Math.min(w.length,u);for(var L=c;L<u;++L)F+=String.fromCharCode(w[L]&127);return F}function W(w,c,u){var F="";u=Math.min(w.length,u);for(var L=c;L<u;++L)F+=String.fromCharCode(w[L]);return F}function ee(w,c,u){var F=w.length;(!c||c<0)&&(c=0),(!u||u<0||u>F)&&(u=F);for(var L="",K=c;K<u;++K)L+=Dt[w[K]];return L}function J(w,c,u){for(var F=w.slice(c,u),L="",K=0;K<F.length-1;K+=2)L+=String.fromCharCode(F[K]+F[K+1]*256);return L}s.prototype.slice=function(c,u){var F=this.length;c=~~c,u=u===void 0?F:~~u,c<0?(c+=F,c<0&&(c=0)):c>F&&(c=F),u<0?(u+=F,u<0&&(u=0)):u>F&&(u=F),u<c&&(u=c);var L=this.subarray(c,u);return Object.setPrototypeOf(L,s.prototype),L};function O(w,c,u){if(w%1!==0||w<0)throw new RangeError("offset is not uint");if(w+c>u)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(c,u,F){c=c>>>0,u=u>>>0,F||O(c,u,this.length);for(var L=this[c],K=1,Z=0;++Z<u&&(K*=256);)L+=this[c+Z]*K;return L},s.prototype.readUintBE=s.prototype.readUIntBE=function(c,u,F){c=c>>>0,u=u>>>0,F||O(c,u,this.length);for(var L=this[c+--u],K=1;u>0&&(K*=256);)L+=this[c+--u]*K;return L},s.prototype.readUint8=s.prototype.readUInt8=function(c,u){return c=c>>>0,u||O(c,1,this.length),this[c]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(c,u){return c=c>>>0,u||O(c,2,this.length),this[c]|this[c+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(c,u){return c=c>>>0,u||O(c,2,this.length),this[c]<<8|this[c+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(c,u){return c=c>>>0,u||O(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(c,u){return c=c>>>0,u||O(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},s.prototype.readIntLE=function(c,u,F){c=c>>>0,u=u>>>0,F||O(c,u,this.length);for(var L=this[c],K=1,Z=0;++Z<u&&(K*=256);)L+=this[c+Z]*K;return K*=128,L>=K&&(L-=Math.pow(2,8*u)),L},s.prototype.readIntBE=function(c,u,F){c=c>>>0,u=u>>>0,F||O(c,u,this.length);for(var L=u,K=1,Z=this[c+--L];L>0&&(K*=256);)Z+=this[c+--L]*K;return K*=128,Z>=K&&(Z-=Math.pow(2,8*u)),Z},s.prototype.readInt8=function(c,u){return c=c>>>0,u||O(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},s.prototype.readInt16LE=function(c,u){c=c>>>0,u||O(c,2,this.length);var F=this[c]|this[c+1]<<8;return F&32768?F|4294901760:F},s.prototype.readInt16BE=function(c,u){c=c>>>0,u||O(c,2,this.length);var F=this[c+1]|this[c]<<8;return F&32768?F|4294901760:F},s.prototype.readInt32LE=function(c,u){return c=c>>>0,u||O(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},s.prototype.readInt32BE=function(c,u){return c=c>>>0,u||O(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},s.prototype.readFloatLE=function(c,u){return c=c>>>0,u||O(c,4,this.length),r.read(this,c,!0,23,4)},s.prototype.readFloatBE=function(c,u){return c=c>>>0,u||O(c,4,this.length),r.read(this,c,!1,23,4)},s.prototype.readDoubleLE=function(c,u){return c=c>>>0,u||O(c,8,this.length),r.read(this,c,!0,52,8)},s.prototype.readDoubleBE=function(c,u){return c=c>>>0,u||O(c,8,this.length),r.read(this,c,!1,52,8)};function U(w,c,u,F,L,K){if(!s.isBuffer(w))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>L||c<K)throw new RangeError('"value" argument is out of bounds');if(u+F>w.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(c,u,F,L){if(c=+c,u=u>>>0,F=F>>>0,!L){var K=Math.pow(2,8*F)-1;U(this,c,u,F,K,0)}var Z=1,ue=0;for(this[u]=c&255;++ue<F&&(Z*=256);)this[u+ue]=c/Z&255;return u+F},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(c,u,F,L){if(c=+c,u=u>>>0,F=F>>>0,!L){var K=Math.pow(2,8*F)-1;U(this,c,u,F,K,0)}var Z=F-1,ue=1;for(this[u+Z]=c&255;--Z>=0&&(ue*=256);)this[u+Z]=c/ue&255;return u+F},s.prototype.writeUint8=s.prototype.writeUInt8=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,1,255,0),this[u]=c&255,u+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,2,65535,0),this[u]=c&255,this[u+1]=c>>>8,u+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,2,65535,0),this[u]=c>>>8,this[u+1]=c&255,u+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,4,4294967295,0),this[u+3]=c>>>24,this[u+2]=c>>>16,this[u+1]=c>>>8,this[u]=c&255,u+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,4,4294967295,0),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4},s.prototype.writeIntLE=function(c,u,F,L){if(c=+c,u=u>>>0,!L){var K=Math.pow(2,8*F-1);U(this,c,u,F,K-1,-K)}var Z=0,ue=1,ye=0;for(this[u]=c&255;++Z<F&&(ue*=256);)c<0&&ye===0&&this[u+Z-1]!==0&&(ye=1),this[u+Z]=(c/ue>>0)-ye&255;return u+F},s.prototype.writeIntBE=function(c,u,F,L){if(c=+c,u=u>>>0,!L){var K=Math.pow(2,8*F-1);U(this,c,u,F,K-1,-K)}var Z=F-1,ue=1,ye=0;for(this[u+Z]=c&255;--Z>=0&&(ue*=256);)c<0&&ye===0&&this[u+Z+1]!==0&&(ye=1),this[u+Z]=(c/ue>>0)-ye&255;return u+F},s.prototype.writeInt8=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,1,127,-128),c<0&&(c=255+c+1),this[u]=c&255,u+1},s.prototype.writeInt16LE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,2,32767,-32768),this[u]=c&255,this[u+1]=c>>>8,u+2},s.prototype.writeInt16BE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,2,32767,-32768),this[u]=c>>>8,this[u+1]=c&255,u+2},s.prototype.writeInt32LE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,4,2147483647,-2147483648),this[u]=c&255,this[u+1]=c>>>8,this[u+2]=c>>>16,this[u+3]=c>>>24,u+4},s.prototype.writeInt32BE=function(c,u,F){return c=+c,u=u>>>0,F||U(this,c,u,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4};function V(w,c,u,F,L,K){if(u+F>w.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function z(w,c,u,F,L){return c=+c,u=u>>>0,L||V(w,c,u,4),r.write(w,c,u,F,23,4),u+4}s.prototype.writeFloatLE=function(c,u,F){return z(this,c,u,!0,F)},s.prototype.writeFloatBE=function(c,u,F){return z(this,c,u,!1,F)};function se(w,c,u,F,L){return c=+c,u=u>>>0,L||V(w,c,u,8),r.write(w,c,u,F,52,8),u+8}s.prototype.writeDoubleLE=function(c,u,F){return se(this,c,u,!0,F)},s.prototype.writeDoubleBE=function(c,u,F){return se(this,c,u,!1,F)},s.prototype.copy=function(c,u,F,L){if(!s.isBuffer(c))throw new TypeError("argument should be a Buffer");if(F||(F=0),!L&&L!==0&&(L=this.length),u>=c.length&&(u=c.length),u||(u=0),L>0&&L<F&&(L=F),L===F||c.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),c.length-u<L-F&&(L=c.length-u+F);var K=L-F;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,F,L):Uint8Array.prototype.set.call(c,this.subarray(F,L),u),K},s.prototype.fill=function(c,u,F,L){if(typeof c=="string"){if(typeof u=="string"?(L=u,u=0,F=this.length):typeof F=="string"&&(L=F,F=this.length),L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!s.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(c.length===1){var K=c.charCodeAt(0);(L==="utf8"&&K<128||L==="latin1")&&(c=K)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(u<0||this.length<u||this.length<F)throw new RangeError("Out of range index");if(F<=u)return this;u=u>>>0,F=F===void 0?this.length:F>>>0,c||(c=0);var Z;if(typeof c=="number")for(Z=u;Z<F;++Z)this[Z]=c;else{var ue=s.isBuffer(c)?c:s.from(c,L),ye=ue.length;if(ye===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(Z=0;Z<F-u;++Z)this[Z+u]=ue[Z%ye]}return this};var ce=/[^+/0-9A-Za-z-_]/g;function be(w){if(w=w.split("=")[0],w=w.trim().replace(ce,""),w.length<2)return"";for(;w.length%4!==0;)w=w+"=";return w}function fe(w,c){c=c||1/0;for(var u,F=w.length,L=null,K=[],Z=0;Z<F;++Z){if(u=w.charCodeAt(Z),u>55295&&u<57344){if(!L){if(u>56319){(c-=3)>-1&&K.push(239,191,189);continue}else if(Z+1===F){(c-=3)>-1&&K.push(239,191,189);continue}L=u;continue}if(u<56320){(c-=3)>-1&&K.push(239,191,189),L=u;continue}u=(L-55296<<10|u-56320)+65536}else L&&(c-=3)>-1&&K.push(239,191,189);if(L=null,u<128){if((c-=1)<0)break;K.push(u)}else if(u<2048){if((c-=2)<0)break;K.push(u>>6|192,u&63|128)}else if(u<65536){if((c-=3)<0)break;K.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((c-=4)<0)break;K.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return K}function Se(w){for(var c=[],u=0;u<w.length;++u)c.push(w.charCodeAt(u)&255);return c}function Fe(w,c){for(var u,F,L,K=[],Z=0;Z<w.length&&!((c-=2)<0);++Z)u=w.charCodeAt(Z),F=u>>8,L=u%256,K.push(L),K.push(F);return K}function Ke(w){return e.toByteArray(be(w))}function ze(w,c,u,F){for(var L=0;L<F&&!(L+u>=c.length||L>=w.length);++L)c[L+u]=w[L];return L}function Ee(w,c){return w instanceof c||w!=null&&w.constructor!=null&&w.constructor.name!=null&&w.constructor.name===c.name}function Me(w){return w!==w}var Dt=function(){for(var w="0123456789abcdef",c=new Array(256),u=0;u<16;++u)for(var F=u*16,L=0;L<16;++L)c[F+L]=w[u]+w[L];return c}()})(xe);var f1=xe.Buffer,c1=function(t){if(t instanceof Uint8Array){if(t.byteOffset===0&&t.byteLength===t.buffer.byteLength)return t.buffer;if(typeof t.buffer.slice=="function")return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(f1.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,n=0;n<r;n++)e[n]=t[n];return e.buffer}else throw new Error("Argument must be a Buffer")};const wr=A0(c1);var Ga={exports:{}};(function(t,e){(function(){var r,n=0xdeadbeefcafe,i=(n&16777215)==15715070;function o(h,d,E){h!=null&&(typeof h=="number"?this.fromNumber(h,d,E):d==null&&typeof h!="string"?this.fromString(h,256):this.fromString(h,d))}function a(){return new o(null)}function s(h,d,E,R,j,Q){for(;--Q>=0;){var ne=d*this[h++]+E[R]+j;j=Math.floor(ne/67108864),E[R++]=ne&67108863}return j}function p(h,d,E,R,j,Q){for(var ne=d&32767,ie=d>>15;--Q>=0;){var _e=this[h]&32767,Ge=this[h++]>>15,at=ie*_e+Ge*ne;_e=ne*_e+((at&32767)<<15)+E[R]+(j&1073741823),j=(_e>>>30)+(at>>>15)+ie*Ge+(j>>>30),E[R++]=_e&1073741823}return j}function f(h,d,E,R,j,Q){for(var ne=d&16383,ie=d>>14;--Q>=0;){var _e=this[h]&16383,Ge=this[h++]>>14,at=ie*_e+Ge*ne;_e=ne*_e+((at&16383)<<14)+E[R]+j,j=(_e>>28)+(at>>14)+ie*Ge,E[R++]=_e&268435455}return j}var l=typeof navigator!="undefined";l&&i&&navigator.appName=="Microsoft Internet Explorer"?(o.prototype.am=p,r=30):l&&i&&navigator.appName!="Netscape"?(o.prototype.am=s,r=26):(o.prototype.am=f,r=28),o.prototype.DB=r,o.prototype.DM=(1<<r)-1,o.prototype.DV=1<<r;var v=52;o.prototype.FV=Math.pow(2,v),o.prototype.F1=v-r,o.prototype.F2=2*r-v;var x="0123456789abcdefghijklmnopqrstuvwxyz",A=new Array,y,m;for(y=48,m=0;m<=9;++m)A[y++]=m;for(y=97,m=10;m<36;++m)A[y++]=m;for(y=65,m=10;m<36;++m)A[y++]=m;function g(h){return x.charAt(h)}function D(h,d){var E=A[h.charCodeAt(d)];return E==null?-1:E}function C(h){for(var d=this.t-1;d>=0;--d)h[d]=this[d];h.t=this.t,h.s=this.s}function B(h){this.t=1,this.s=h<0?-1:0,h>0?this[0]=h:h<-1?this[0]=h+this.DV:this.t=0}function b(h){var d=a();return d.fromInt(h),d}function _(h,d){var E;if(d==16)E=4;else if(d==8)E=3;else if(d==256)E=8;else if(d==2)E=1;else if(d==32)E=5;else if(d==4)E=2;else{this.fromRadix(h,d);return}this.t=0,this.s=0;for(var R=h.length,j=!1,Q=0;--R>=0;){var ne=E==8?h[R]&255:D(h,R);if(ne<0){h.charAt(R)=="-"&&(j=!0);continue}j=!1,Q==0?this[this.t++]=ne:Q+E>this.DB?(this[this.t-1]|=(ne&(1<<this.DB-Q)-1)<<Q,this[this.t++]=ne>>this.DB-Q):this[this.t-1]|=ne<<Q,Q+=E,Q>=this.DB&&(Q-=this.DB)}E==8&&h[0]&128&&(this.s=-1,Q>0&&(this[this.t-1]|=(1<<this.DB-Q)-1<<Q)),this.clamp(),j&&o.ZERO.subTo(this,this)}function T(){for(var h=this.s&this.DM;this.t>0&&this[this.t-1]==h;)--this.t}function k(h){if(this.s<0)return"-"+this.negate().toString(h);var d;if(h==16)d=4;else if(h==8)d=3;else if(h==2)d=1;else if(h==32)d=5;else if(h==4)d=2;else return this.toRadix(h);var E=(1<<d)-1,R,j=!1,Q="",ne=this.t,ie=this.DB-ne*this.DB%d;if(ne-- >0)for(ie<this.DB&&(R=this[ne]>>ie)>0&&(j=!0,Q=g(R));ne>=0;)ie<d?(R=(this[ne]&(1<<ie)-1)<<d-ie,R|=this[--ne]>>(ie+=this.DB-d)):(R=this[ne]>>(ie-=d)&E,ie<=0&&(ie+=this.DB,--ne)),R>0&&(j=!0),j&&(Q+=g(R));return j?Q:"0"}function q(){var h=a();return o.ZERO.subTo(this,h),h}function X(){return this.s<0?this.negate():this}function I(h){var d=this.s-h.s;if(d!=0)return d;var E=this.t;if(d=E-h.t,d!=0)return this.s<0?-d:d;for(;--E>=0;)if((d=this[E]-h[E])!=0)return d;return 0}function P(h){var d=1,E;return(E=h>>>16)!=0&&(h=E,d+=16),(E=h>>8)!=0&&(h=E,d+=8),(E=h>>4)!=0&&(h=E,d+=4),(E=h>>2)!=0&&(h=E,d+=2),(E=h>>1)!=0&&(h=E,d+=1),d}function G(){return this.t<=0?0:this.DB*(this.t-1)+P(this[this.t-1]^this.s&this.DM)}function S(h,d){var E;for(E=this.t-1;E>=0;--E)d[E+h]=this[E];for(E=h-1;E>=0;--E)d[E]=0;d.t=this.t+h,d.s=this.s}function N(h,d){for(var E=h;E<this.t;++E)d[E-h]=this[E];d.t=Math.max(this.t-h,0),d.s=this.s}function M(h,d){var E=h%this.DB,R=this.DB-E,j=(1<<R)-1,Q=Math.floor(h/this.DB),ne=this.s<<E&this.DM,ie;for(ie=this.t-1;ie>=0;--ie)d[ie+Q+1]=this[ie]>>R|ne,ne=(this[ie]&j)<<E;for(ie=Q-1;ie>=0;--ie)d[ie]=0;d[Q]=ne,d.t=this.t+Q+1,d.s=this.s,d.clamp()}function H(h,d){d.s=this.s;var E=Math.floor(h/this.DB);if(E>=this.t){d.t=0;return}var R=h%this.DB,j=this.DB-R,Q=(1<<R)-1;d[0]=this[E]>>R;for(var ne=E+1;ne<this.t;++ne)d[ne-E-1]|=(this[ne]&Q)<<j,d[ne-E]=this[ne]>>R;R>0&&(d[this.t-E-1]|=(this.s&Q)<<j),d.t=this.t-E,d.clamp()}function Y(h,d){for(var E=0,R=0,j=Math.min(h.t,this.t);E<j;)R+=this[E]-h[E],d[E++]=R&this.DM,R>>=this.DB;if(h.t<this.t){for(R-=h.s;E<this.t;)R+=this[E],d[E++]=R&this.DM,R>>=this.DB;R+=this.s}else{for(R+=this.s;E<h.t;)R-=h[E],d[E++]=R&this.DM,R>>=this.DB;R-=h.s}d.s=R<0?-1:0,R<-1?d[E++]=this.DV+R:R>0&&(d[E++]=R),d.t=E,d.clamp()}function W(h,d){var E=this.abs(),R=h.abs(),j=E.t;for(d.t=j+R.t;--j>=0;)d[j]=0;for(j=0;j<R.t;++j)d[j+E.t]=E.am(0,R[j],d,j,0,E.t);d.s=0,d.clamp(),this.s!=h.s&&o.ZERO.subTo(d,d)}function ee(h){for(var d=this.abs(),E=h.t=2*d.t;--E>=0;)h[E]=0;for(E=0;E<d.t-1;++E){var R=d.am(E,d[E],h,2*E,0,1);(h[E+d.t]+=d.am(E+1,2*d[E],h,2*E+1,R,d.t-E-1))>=d.DV&&(h[E+d.t]-=d.DV,h[E+d.t+1]=1)}h.t>0&&(h[h.t-1]+=d.am(E,d[E],h,2*E,0,1)),h.s=0,h.clamp()}function J(h,d,E){var R=h.abs();if(!(R.t<=0)){var j=this.abs();if(j.t<R.t){d!=null&&d.fromInt(0),E!=null&&this.copyTo(E);return}E==null&&(E=a());var Q=a(),ne=this.s,ie=h.s,_e=this.DB-P(R[R.t-1]);_e>0?(R.lShiftTo(_e,Q),j.lShiftTo(_e,E)):(R.copyTo(Q),j.copyTo(E));var Ge=Q.t,at=Q[Ge-1];if(at!=0){var it=at*(1<<this.F1)+(Ge>1?Q[Ge-2]>>this.F2:0),Bt=this.FV/it,m0=(1<<this.F1)/it,lt=1<<this.F2,ht=E.t,g0=ht-Ge,Tt=d==null?a():d;for(Q.dlShiftTo(g0,Tt),E.compareTo(Tt)>=0&&(E[E.t++]=1,E.subTo(Tt,E)),o.ONE.dlShiftTo(Ge,Tt),Tt.subTo(Q,Q);Q.t<Ge;)Q[Q.t++]=0;for(;--g0>=0;){var pi=E[--ht]==at?this.DM:Math.floor(E[ht]*Bt+(E[ht-1]+lt)*m0);if((E[ht]+=Q.am(0,pi,E,g0,0,Ge))<pi)for(Q.dlShiftTo(g0,Tt),E.subTo(Tt,E);E[ht]<--pi;)E.subTo(Tt,E)}d!=null&&(E.drShiftTo(Ge,d),ne!=ie&&o.ZERO.subTo(d,d)),E.t=Ge,E.clamp(),_e>0&&E.rShiftTo(_e,E),ne<0&&o.ZERO.subTo(E,E)}}}function O(h){var d=a();return this.abs().divRemTo(h,null,d),this.s<0&&d.compareTo(o.ZERO)>0&&h.subTo(d,d),d}function U(h){this.m=h}function V(h){return h.s<0||h.compareTo(this.m)>=0?h.mod(this.m):h}function z(h){return h}function se(h){h.divRemTo(this.m,null,h)}function ce(h,d,E){h.multiplyTo(d,E),this.reduce(E)}function be(h,d){h.squareTo(d),this.reduce(d)}U.prototype.convert=V,U.prototype.revert=z,U.prototype.reduce=se,U.prototype.mulTo=ce,U.prototype.sqrTo=be;function fe(){if(this.t<1)return 0;var h=this[0];if(!(h&1))return 0;var d=h&3;return d=d*(2-(h&15)*d)&15,d=d*(2-(h&255)*d)&255,d=d*(2-((h&65535)*d&65535))&65535,d=d*(2-h*d%this.DV)%this.DV,d>0?this.DV-d:-d}function Se(h){this.m=h,this.mp=h.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<h.DB-15)-1,this.mt2=2*h.t}function Fe(h){var d=a();return h.abs().dlShiftTo(this.m.t,d),d.divRemTo(this.m,null,d),h.s<0&&d.compareTo(o.ZERO)>0&&this.m.subTo(d,d),d}function Ke(h){var d=a();return h.copyTo(d),this.reduce(d),d}function ze(h){for(;h.t<=this.mt2;)h[h.t++]=0;for(var d=0;d<this.m.t;++d){var E=h[d]&32767,R=E*this.mpl+((E*this.mph+(h[d]>>15)*this.mpl&this.um)<<15)&h.DM;for(E=d+this.m.t,h[E]+=this.m.am(0,R,h,d,0,this.m.t);h[E]>=h.DV;)h[E]-=h.DV,h[++E]++}h.clamp(),h.drShiftTo(this.m.t,h),h.compareTo(this.m)>=0&&h.subTo(this.m,h)}function Ee(h,d){h.squareTo(d),this.reduce(d)}function Me(h,d,E){h.multiplyTo(d,E),this.reduce(E)}Se.prototype.convert=Fe,Se.prototype.revert=Ke,Se.prototype.reduce=ze,Se.prototype.mulTo=Me,Se.prototype.sqrTo=Ee;function Dt(){return(this.t>0?this[0]&1:this.s)==0}function w(h,d){if(h>4294967295||h<1)return o.ONE;var E=a(),R=a(),j=d.convert(this),Q=P(h)-1;for(j.copyTo(E);--Q>=0;)if(d.sqrTo(E,R),(h&1<<Q)>0)d.mulTo(R,j,E);else{var ne=E;E=R,R=ne}return d.revert(E)}function c(h,d){var E;return h<256||d.isEven()?E=new U(d):E=new Se(d),this.exp(h,E)}o.prototype.copyTo=C,o.prototype.fromInt=B,o.prototype.fromString=_,o.prototype.clamp=T,o.prototype.dlShiftTo=S,o.prototype.drShiftTo=N,o.prototype.lShiftTo=M,o.prototype.rShiftTo=H,o.prototype.subTo=Y,o.prototype.multiplyTo=W,o.prototype.squareTo=ee,o.prototype.divRemTo=J,o.prototype.invDigit=fe,o.prototype.isEven=Dt,o.prototype.exp=w,o.prototype.toString=k,o.prototype.negate=q,o.prototype.abs=X,o.prototype.compareTo=I,o.prototype.bitLength=G,o.prototype.mod=O,o.prototype.modPowInt=c,o.ZERO=b(0),o.ONE=b(1);function u(){var h=a();return this.copyTo(h),h}function F(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function L(){return this.t==0?this.s:this[0]<<24>>24}function K(){return this.t==0?this.s:this[0]<<16>>16}function Z(h){return Math.floor(Math.LN2*this.DB/Math.log(h))}function ue(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function ye(h){if(h==null&&(h=10),this.signum()==0||h<2||h>36)return"0";var d=this.chunkSize(h),E=Math.pow(h,d),R=b(E),j=a(),Q=a(),ne="";for(this.divRemTo(R,j,Q);j.signum()>0;)ne=(E+Q.intValue()).toString(h).substr(1)+ne,j.divRemTo(R,j,Q);return Q.intValue().toString(h)+ne}function Be(h,d){this.fromInt(0),d==null&&(d=10);for(var E=this.chunkSize(d),R=Math.pow(d,E),j=!1,Q=0,ne=0,ie=0;ie<h.length;++ie){var _e=D(h,ie);if(_e<0){h.charAt(ie)=="-"&&this.signum()==0&&(j=!0);continue}ne=d*ne+_e,++Q>=E&&(this.dMultiply(R),this.dAddOffset(ne,0),Q=0,ne=0)}Q>0&&(this.dMultiply(Math.pow(d,Q)),this.dAddOffset(ne,0)),j&&o.ZERO.subTo(this,this)}function De(h,d,E){if(typeof d=="number")if(h<2)this.fromInt(1);else for(this.fromNumber(h,E),this.testBit(h-1)||this.bitwiseTo(o.ONE.shiftLeft(h-1),ir,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(d);)this.dAddOffset(2,0),this.bitLength()>h&&this.subTo(o.ONE.shiftLeft(h-1),this);else{var R=new Array,j=h&7;R.length=(h>>3)+1,d.nextBytes(R),j>0?R[0]&=(1<<j)-1:R[0]=0,this.fromString(R,256)}}function Ae(){var h=this.t,d=new Array;d[0]=this.s;var E=this.DB-h*this.DB%8,R,j=0;if(h-- >0)for(E<this.DB&&(R=this[h]>>E)!=(this.s&this.DM)>>E&&(d[j++]=R|this.s<<this.DB-E);h>=0;)E<8?(R=(this[h]&(1<<E)-1)<<8-E,R|=this[--h]>>(E+=this.DB-8)):(R=this[h]>>(E-=8)&255,E<=0&&(E+=this.DB,--h)),R&128&&(R|=-256),j==0&&(this.s&128)!=(R&128)&&++j,(j>0||R!=this.s)&&(d[j++]=R);return d}function _t(h){return this.compareTo(h)==0}function qt(h){return this.compareTo(h)<0?this:h}function __$t__(h){return this.compareTo(h)>0?this:h}function St(h,d,E){var R,j,Q=Math.min(h.t,this.t);for(R=0;R<Q;++R)E[R]=d(this[R],h[R]);if(h.t<this.t){for(j=h.s&this.DM,R=Q;R<this.t;++R)E[R]=d(this[R],j);E.t=this.t}else{for(j=this.s&this.DM,R=Q;R<h.t;++R)E[R]=d(j,h[R]);E.t=h.t}E.s=d(this.s,h.s),E.clamp()}function zt(h,d){return h&d}function ri(h){var d=a();return this.bitwiseTo(h,zt,d),d}function ir(h,d){return h|d}function c0(h){var d=a();return this.bitwiseTo(h,ir,d),d}function u0(h,d){return h^d}function ni(h){var d=a();return this.bitwiseTo(h,u0,d),d}function Fr(h,d){return h&~d}function ii(h){var d=a();return this.bitwiseTo(h,Fr,d),d}function l0(){for(var h=a(),d=0;d<this.t;++d)h[d]=this.DM&~this[d];return h.t=this.t,h.s=~this.s,h}function oi(h){var d=a();return h<0?this.rShiftTo(-h,d):this.lShiftTo(h,d),d}function h0(h){var d=a();return h<0?this.lShiftTo(-h,d):this.rShiftTo(h,d),d}function ai(h){if(h==0)return-1;var d=0;return h&65535||(h>>=16,d+=16),h&255||(h>>=8,d+=8),h&15||(h>>=4,d+=4),h&3||(h>>=2,d+=2),h&1||++d,d}function si(){for(var h=0;h<this.t;++h)if(this[h]!=0)return h*this.DB+ai(this[h]);return this.s<0?this.t*this.DB:-1}function fi(h){for(var d=0;h!=0;)h&=h-1,++d;return d}function x0(){for(var h=0,d=this.s&this.DM,E=0;E<this.t;++E)h+=fi(this[E]^d);return h}function ci(h){var d=Math.floor(h/this.DB);return d>=this.t?this.s!=0:(this[d]&1<<h%this.DB)!=0}function ui(h,d){var E=o.ONE.shiftLeft(h);return this.bitwiseTo(E,d,E),E}function d0(h){return this.changeBit(h,ir)}function li(h){return this.changeBit(h,Fr)}function p0(h){return this.changeBit(h,u0)}function Ye(h,d){for(var E=0,R=0,j=Math.min(h.t,this.t);E<j;)R+=this[E]+h[E],d[E++]=R&this.DM,R>>=this.DB;if(h.t<this.t){for(R+=h.s;E<this.t;)R+=this[E],d[E++]=R&this.DM,R>>=this.DB;R+=this.s}else{for(R+=this.s;E<h.t;)R+=h[E],d[E++]=R&this.DM,R>>=this.DB;R+=h.s}d.s=R<0?-1:0,R>0?d[E++]=R:R<-1&&(d[E++]=this.DV+R),d.t=E,d.clamp()}function At(h){var d=a();return this.addTo(h,d),d}function v0(h){var d=a();return this.subTo(h,d),d}function hi(h){var d=a();return this.multiplyTo(h,d),d}function N1(){var h=a();return this.squareTo(h),h}function H1(h){var d=a();return this.divRemTo(h,d,null),d}function q1(h){var d=a();return this.divRemTo(h,null,d),d}function $1(h){var d=a(),E=a();return this.divRemTo(h,d,E),new Array(d,E)}function z1(h){this[this.t]=this.am(0,h-1,this,0,0,this.t),++this.t,this.clamp()}function W1(h,d){if(h!=0){for(;this.t<=d;)this[this.t++]=0;for(this[d]+=h;this[d]>=this.DV;)this[d]-=this.DV,++d>=this.t&&(this[this.t++]=0),++this[d]}}function Dr(){}function Is(h){return h}function G1(h,d,E){h.multiplyTo(d,E)}function V1(h,d){h.squareTo(d)}Dr.prototype.convert=Is,Dr.prototype.revert=Is,Dr.prototype.mulTo=G1,Dr.prototype.sqrTo=V1;function K1(h){return this.exp(h,new Dr)}function j1(h,d,E){var R=Math.min(this.t+h.t,d);for(E.s=0,E.t=R;R>0;)E[--R]=0;var j;for(j=E.t-this.t;R<j;++R)E[R+this.t]=this.am(0,h[R],E,R,0,this.t);for(j=Math.min(h.t,d);R<j;++R)this.am(0,h[R],E,R,0,d-R);E.clamp()}function X1(h,d,E){--d;var R=E.t=this.t+h.t-d;for(E.s=0;--R>=0;)E[R]=0;for(R=Math.max(d-this.t,0);R<h.t;++R)E[this.t+R-d]=this.am(d-R,h[R],E,0,0,this.t+R-d);E.clamp(),E.drShiftTo(1,E)}function Wt(h){this.r2=a(),this.q3=a(),o.ONE.dlShiftTo(2*h.t,this.r2),this.mu=this.r2.divide(h),this.m=h}function Y1(h){if(h.s<0||h.t>2*this.m.t)return h.mod(this.m);if(h.compareTo(this.m)<0)return h;var d=a();return h.copyTo(d),this.reduce(d),d}function Z1(h){return h}function Q1(h){for(h.drShiftTo(this.m.t-1,this.r2),h.t>this.m.t+1&&(h.t=this.m.t+1,h.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);h.compareTo(this.r2)<0;)h.dAddOffset(1,this.m.t+1);for(h.subTo(this.r2,h);h.compareTo(this.m)>=0;)h.subTo(this.m,h)}function J1(h,d){h.squareTo(d),this.reduce(d)}function ex(h,d,E){h.multiplyTo(d,E),this.reduce(E)}Wt.prototype.convert=Y1,Wt.prototype.revert=Z1,Wt.prototype.reduce=Q1,Wt.prototype.mulTo=ex,Wt.prototype.sqrTo=J1;function tx(h,d){var E=h.bitLength(),R,j=b(1),Q;if(E<=0)return j;E<18?R=1:E<48?R=3:E<144?R=4:E<768?R=5:R=6,E<8?Q=new U(d):d.isEven()?Q=new Wt(d):Q=new Se(d);var ne=new Array,ie=3,_e=R-1,Ge=(1<<R)-1;if(ne[1]=Q.convert(this),R>1){var at=a();for(Q.sqrTo(ne[1],at);ie<=Ge;)ne[ie]=a(),Q.mulTo(at,ne[ie-2],ne[ie]),ie+=2}var it=h.t-1,Bt,m0=!0,lt=a(),ht;for(E=P(h[it])-1;it>=0;){for(E>=_e?Bt=h[it]>>E-_e&Ge:(Bt=(h[it]&(1<<E+1)-1)<<_e-E,it>0&&(Bt|=h[it-1]>>this.DB+E-_e)),ie=R;!(Bt&1);)Bt>>=1,--ie;if((E-=ie)<0&&(E+=this.DB,--it),m0)ne[Bt].copyTo(j),m0=!1;else{for(;ie>1;)Q.sqrTo(j,lt),Q.sqrTo(lt,j),ie-=2;ie>0?Q.sqrTo(j,lt):(ht=j,j=lt,lt=ht),Q.mulTo(lt,ne[Bt],j)}for(;it>=0&&!(h[it]&1<<E);)Q.sqrTo(j,lt),ht=j,j=lt,lt=ht,--E<0&&(E=this.DB-1,--it)}return Q.revert(j)}function rx(h){var d=this.s<0?this.negate():this.clone(),E=h.s<0?h.negate():h.clone();if(d.compareTo(E)<0){var R=d;d=E,E=R}var j=d.getLowestSetBit(),Q=E.getLowestSetBit();if(Q<0)return d;for(j<Q&&(Q=j),Q>0&&(d.rShiftTo(Q,d),E.rShiftTo(Q,E));d.signum()>0;)(j=d.getLowestSetBit())>0&&d.rShiftTo(j,d),(j=E.getLowestSetBit())>0&&E.rShiftTo(j,E),d.compareTo(E)>=0?(d.subTo(E,d),d.rShiftTo(1,d)):(E.subTo(d,E),E.rShiftTo(1,E));return Q>0&&E.lShiftTo(Q,E),E}function nx(h){if(h<=0)return 0;var d=this.DV%h,E=this.s<0?h-1:0;if(this.t>0)if(d==0)E=this[0]%h;else for(var R=this.t-1;R>=0;--R)E=(d*E+this[R])%h;return E}function ix(h){var d=h.isEven();if(this.isEven()&&d||h.signum()==0)return o.ZERO;for(var E=h.clone(),R=this.clone(),j=b(1),Q=b(0),ne=b(0),ie=b(1);E.signum()!=0;){for(;E.isEven();)E.rShiftTo(1,E),d?((!j.isEven()||!Q.isEven())&&(j.addTo(this,j),Q.subTo(h,Q)),j.rShiftTo(1,j)):Q.isEven()||Q.subTo(h,Q),Q.rShiftTo(1,Q);for(;R.isEven();)R.rShiftTo(1,R),d?((!ne.isEven()||!ie.isEven())&&(ne.addTo(this,ne),ie.subTo(h,ie)),ne.rShiftTo(1,ne)):ie.isEven()||ie.subTo(h,ie),ie.rShiftTo(1,ie);E.compareTo(R)>=0?(E.subTo(R,E),d&&j.subTo(ne,j),Q.subTo(ie,Q)):(R.subTo(E,R),d&&ne.subTo(j,ne),ie.subTo(Q,ie))}if(R.compareTo(o.ONE)!=0)return o.ZERO;if(ie.compareTo(h)>=0)return ie.subtract(h);if(ie.signum()<0)ie.addTo(h,ie);else return ie;return ie.signum()<0?ie.add(h):ie}var Ze=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ox=(1<<26)/Ze[Ze.length-1];function ax(h){var d,E=this.abs();if(E.t==1&&E[0]<=Ze[Ze.length-1]){for(d=0;d<Ze.length;++d)if(E[0]==Ze[d])return!0;return!1}if(E.isEven())return!1;for(d=1;d<Ze.length;){for(var R=Ze[d],j=d+1;j<Ze.length&&R<ox;)R*=Ze[j++];for(R=E.modInt(R);d<j;)if(R%Ze[d++]==0)return!1}return E.millerRabin(h)}function sx(h){var d=this.subtract(o.ONE),E=d.getLowestSetBit();if(E<=0)return!1;var R=d.shiftRight(E);h=h+1>>1,h>Ze.length&&(h=Ze.length);for(var j=a(),Q=0;Q<h;++Q){j.fromInt(Ze[Math.floor(Math.random()*Ze.length)]);var ne=j.modPow(R,this);if(ne.compareTo(o.ONE)!=0&&ne.compareTo(d)!=0){for(var ie=1;ie++<E&&ne.compareTo(d)!=0;)if(ne=ne.modPowInt(2,this),ne.compareTo(o.ONE)==0)return!1;if(ne.compareTo(d)!=0)return!1}}return!0}o.prototype.chunkSize=Z,o.prototype.toRadix=ye,o.prototype.fromRadix=Be,o.prototype.fromNumber=De,o.prototype.bitwiseTo=St,o.prototype.changeBit=ui,o.prototype.addTo=Ye,o.prototype.dMultiply=z1,o.prototype.dAddOffset=W1,o.prototype.multiplyLowerTo=j1,o.prototype.multiplyUpperTo=X1,o.prototype.modInt=nx,o.prototype.millerRabin=sx,o.prototype.clone=u,o.prototype.intValue=F,o.prototype.byteValue=L,o.prototype.shortValue=K,o.prototype.signum=ue,o.prototype.toByteArray=Ae,o.prototype.equals=_t,o.prototype.min=qt,o.prototype.max=__$t__,o.prototype.and=ri,o.prototype.or=c0,o.prototype.xor=ni,o.prototype.andNot=ii,o.prototype.not=l0,o.prototype.shiftLeft=oi,o.prototype.shiftRight=h0,o.prototype.getLowestSetBit=si,o.prototype.bitCount=x0,o.prototype.testBit=ci,o.prototype.setBit=d0,o.prototype.clearBit=li,o.prototype.flipBit=p0,o.prototype.add=At,o.prototype.subtract=v0,o.prototype.multiply=hi,o.prototype.divide=H1,o.prototype.remainder=q1,o.prototype.divideAndRemainder=$1,o.prototype.modPow=tx,o.prototype.modInverse=ix,o.prototype.pow=K1,o.prototype.gcd=rx,o.prototype.isProbablePrime=ax,o.prototype.square=N1,o.prototype.Barrett=Wt;var y0,nt,We;function fx(h){nt[We++]^=h&255,nt[We++]^=h>>8&255,nt[We++]^=h>>16&255,nt[We++]^=h>>24&255,We>=di&&(We-=di)}function Rs(){fx(new Date().getTime())}if(nt==null){nt=new Array,We=0;var ut;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var Os=new Uint8Array(32);for(window.crypto.getRandomValues(Os),ut=0;ut<32;++ut)nt[We++]=Os[ut]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var ks=window.crypto.random(32);for(ut=0;ut<ks.length;++ut)nt[We++]=ks.charCodeAt(ut)&255}}for(;We<di;)ut=Math.floor(65536*Math.random()),nt[We++]=ut>>>8,nt[We++]=ut&255;We=0,Rs()}function cx(){if(y0==null){for(Rs(),y0=xx(),y0.init(nt),We=0;We<nt.length;++We)nt[We]=0;We=0}return y0.next()}function ux(h){var d;for(d=0;d<h.length;++d)h[d]=cx()}function Ps(){}Ps.prototype.nextBytes=ux;function xi(){this.i=0,this.j=0,this.S=new Array}function lx(h){var d,E,R;for(d=0;d<256;++d)this.S[d]=d;for(E=0,d=0;d<256;++d)E=E+this.S[d]+h[d%h.length]&255,R=this.S[d],this.S[d]=this.S[E],this.S[E]=R;this.i=0,this.j=0}function hx(){var h;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,h=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=h,this.S[h+this.S[this.i]&255]}xi.prototype.init=lx,xi.prototype.next=hx;function xx(){return new xi}var di=256;t.exports={default:o,BigInteger:o,SecureRandom:Ps}}).call(le)})(Ga);var ge=Ga.exports,u1=ge.BigInteger.prototype.Barrett;function Xe(t,e){this.x=e,this.q=t}function tt(t,e,r,n){this.curve=t,this.x=e,this.y=r,this.z=n==null?ge.BigInteger.ONE:n,this.zinv=null}function mt(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new tt(this,null,null),this.reducer=new u1(this.q)}Xe.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.x.equals(t.x)},Xe.prototype.toBigInteger=function(){return this.x},Xe.prototype.negate=function(){return new Xe(this.q,this.x.negate().mod(this.q))},Xe.prototype.add=function(t){return new Xe(this.q,this.x.add(t.toBigInteger()).mod(this.q))},Xe.prototype.subtract=function(t){return new Xe(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))},Xe.prototype.multiply=function(t){return new Xe(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))},Xe.prototype.square=function(){return new Xe(this.q,this.x.square().mod(this.q))},Xe.prototype.divide=function(t){return new Xe(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))},tt.prototype.getX=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var t=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(t),this.curve.fromBigInteger(t)},tt.prototype.getY=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var t=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(t),this.curve.fromBigInteger(t)},tt.prototype.equals=function(t){return t==this||(this.isInfinity()?t.isInfinity():t.isInfinity()?this.isInfinity():!!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(ge.BigInteger.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(ge.BigInteger.ZERO))},tt.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(ge.BigInteger.ZERO)&&!this.y.toBigInteger().equals(ge.BigInteger.ZERO)},tt.prototype.negate=function(){return new tt(this.curve,this.x,this.y.negate(),this.z)},tt.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),r=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(ge.BigInteger.ZERO.equals(r))return ge.BigInteger.ZERO.equals(e)?this.twice():this.curve.getInfinity();var n=new ge.BigInteger("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),a=(t.x.toBigInteger(),t.y.toBigInteger(),r.square()),s=a.multiply(r),p=i.multiply(a),f=e.square().multiply(this.z),l=f.subtract(p.shiftLeft(1)).multiply(t.z).subtract(s).multiply(r).mod(this.curve.q),v=p.multiply(n).multiply(e).subtract(o.multiply(s)).subtract(f.multiply(e)).multiply(t.z).add(e.multiply(s)).mod(this.curve.q),x=s.multiply(this.z).multiply(t.z).mod(this.curve.q);return new tt(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(v),x)},tt.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var t=new ge.BigInteger("3"),e=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),o=this.curve.a.toBigInteger(),a=e.square().multiply(t);ge.BigInteger.ZERO.equals(o)||(a=a.add(this.z.square().multiply(o)));var s=(a=a.mod(this.curve.q)).square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),p=a.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.square().multiply(a)).mod(this.curve.q),f=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new tt(this.curve,this.curve.fromBigInteger(s),this.curve.fromBigInteger(p),f)},tt.prototype.multiply=function(t){if(this.isInfinity())return this;if(t.signum()==0)return this.curve.getInfinity();var e,r=t,n=r.multiply(new ge.BigInteger("3")),i=this.negate(),o=this;for(e=n.bitLength()-2;e>0;--e){o=o.twice();var a=n.testBit(e);a!=r.testBit(e)&&(o=o.add(a?this:i))}return o},tt.prototype.multiplyTwo=function(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(e);n>=0;)i=i.twice(),t.testBit(n)?i=r.testBit(n)?i.add(o):i.add(this):r.testBit(n)&&(i=i.add(e)),--n;return i},mt.prototype.getQ=function(){return this.q},mt.prototype.getA=function(){return this.a},mt.prototype.getB=function(){return this.b},mt.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},mt.prototype.getInfinity=function(){return this.infinity},mt.prototype.fromBigInteger=function(t){return new Xe(this.q,t)},mt.prototype.reduce=function(t){this.reducer.reduce(t)},mt.prototype.decodePointHex=function(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var e=(t.length-2)/2,r=t.substr(2,e),n=t.substr(e+2,e);return new tt(this,this.fromBigInteger(new ge.BigInteger(r,16)),this.fromBigInteger(new ge.BigInteger(n,16)));default:return null}},mt.prototype.encodePointHex=function(t){if(t.isInfinity())return"00";var e=t.getX().toBigInteger().toString(16),r=t.getY().toBigInteger().toString(16),n=this.getQ().toString(16).length;for(n%2!=0&&n++;e.length<n;)e="0"+e;for(;r.length<n;)r="0"+r;return"04"+e+r};var qe=function(t,e){return t<<(e%=32)|t>>>32-e},gt=function(t,e){var r=e-t.length;return(r>0?"0".repeat(r):"")+t},l1=function(t){return t<16?2043430169:2055708042},h1=function(t,e,r,n){return n<16?t^e^r:t&e|t&r|e&r},x1=function(t,e,r,n){return n<16?t^e^r:t&e|~t&r},d1=function(t,e,r){for(var n,i,o,a,s,p=function(C){var B,b=new Array(132);C.forEach(function(k,q){b[q]=k});for(var _=16;_<68;_++)b[_]=(B=b[_-16]^b[_-9]^qe(b[_-3],15))^qe(B,15)^qe(B,23)^qe(b[_-13],7)^b[_-6];for(var T=0;T<64;T++)b[T+68]=b[T]^b[T+4];return b}(e),f=t[0],l=t[1],v=t[2],x=t[3],A=t[4],y=t[5],m=t[6],g=t[7],D=0;D<64;D++)i=(n=qe(qe(f,12)+A+qe(l1(D),D),7))^qe(f,12),o=h1(f,l,v,D)+x+i+p[D+68],a=x1(A,y,m,D)+g+n+p[D],x=v,v=qe(l,9),l=f,f=o,g=m,m=qe(y,19),y=A,A=(s=a)^qe(s,9)^qe(s,17);return[f^t[0],l^t[1],v^t[2],x^t[3],A^t[4],y^t[5],m^t[6],g^t[7]]},ei=function(t,e,r){if(typeof t=="string"?t=xe.Buffer.from(t,e||"utf8"):t instanceof ArrayBuffer&&(t=xe.Buffer.from(t)),!xe.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');var n,i,o,a,s,p;n=t,i=xe.Buffer.alloc(1,128),a=xe.Buffer.alloc(o=(o=n.length%64)>=56?64-o%56-1:56-o-1,0),s=xe.Buffer.alloc(8),p=8*n.length,s.writeUInt32BE(Math.floor(p/Math.pow(2,32)),0),s.writeUInt32BE(p%Math.pow(2,32),4);for(var f=(t=xe.Buffer.concat([n,i,a,s],n.length+1+o+8)).length/64,l=new Array(f),v=0;v<f;v++){l[v]=new Array(16);for(var x=0;x<16;x++)l[v][x]=t.readUInt32BE(64*v+4*x)}var A=new Array(f);A[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var y=0;y<f;y++)A[y+1]=d1(A[y],l[y]);var m=xe.Buffer.alloc(32);return A[f].forEach(function(g,D){return m.writeInt32BE(g,4*D)}),r?m.toString(r):wr(m)},Va=new ge.SecureRandom,ti=function(){var t=new mt(new ge.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new ge.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new ge.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),e=t.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:t,G:e,n:new ge.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),Ka=ti.curve,ja=ti.G,r0=ti.n;function Xa(t,e){for(var r=[],n=Math.ceil(e/32),i=e%32,o=1;o<=n;o++){var a=xe.Buffer.allocUnsafe(4);a.writeUInt32BE(o);var s=ei(xe.Buffer.concat([t,a]));r.push(o===n&&i?xe.Buffer.from(s).slice(0,i):xe.Buffer.from(s))}return xe.Buffer.concat(r,e)}var p1={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var t=new ge.BigInteger(r0.bitLength(),Va).mod(r0.subtract(new ge.BigInteger("2"))).add(ge.BigInteger.ONE),e=gt(t.toString(16),64),r=ja.multiply(t);return{privateKey:e,publicKey:"04"+gt(r.getX().toBigInteger().toString(16),64)+gt(r.getY().toBigInteger().toString(16),64)}},encrypt:function(t,e,r){var n=r||{},i=n.mode,o=i===void 0?1:i,a=n.outputEncoding,s=n.pc;if(typeof t=="string"?t=xe.Buffer.from(t,n.inputEncoding||"utf8"):t instanceof ArrayBuffer&&(t=xe.Buffer.from(t)),!xe.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');var p=new ge.BigInteger(r0.bitLength(),Va).mod(r0.subtract(ge.BigInteger.ONE)).add(ge.BigInteger.ONE),f=ja.multiply(p),l=gt(f.getX().toBigInteger().toString(16),64)+gt(f.getY().toBigInteger().toString(16),64),v=Ka.decodePointHex(e).multiply(p),x=gt(v.getX().toBigInteger().toString(16),64),A=gt(v.getY().toBigInteger().toString(16),64),y=Xa(xe.Buffer.from(x+A,"hex"),t.length),m=gt(new ge.BigInteger(t.toString("hex"),16).xor(new ge.BigInteger(y.toString("hex"),16)).toString(16),2*t.length),g=ei(x+t.toString("hex")+A,"hex","hex"),D=xe.Buffer.from((s?"04":"")+(o===0?l+m+g:l+g+m),"hex");return a?D.toString(a):wr(D)},decrypt:function(t,e,r){var n=r||{},i=n.mode,o=i===void 0?1:i,a=n.outputEncoding,s=n.pc;if(typeof t=="string"?t=xe.Buffer.from(t,n.inputEncoding):t instanceof ArrayBuffer&&(t=xe.Buffer.from(t)),!xe.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');var p=(t=s?t.slice(1):t).slice(0,32).toString("hex"),f=t.slice(32,64).toString("hex"),l=Ka.decodePointHex("04"+p+f).multiply(new ge.BigInteger(e,16)),v=gt(l.getX().toBigInteger().toString(16),64),x=gt(l.getY().toBigInteger().toString(16),64),A=t.slice(64,96),y=t.slice(96);o===0&&(A=t.slice(t.length-32),y=t.slice(64,t.length-32));var m=Xa(xe.Buffer.from(v+x,"hex"),y.length),g=new ge.BigInteger(y.toString("hex"),16).xor(new ge.BigInteger(m.toString("hex"),16)).toString(16),D=ei(v+g+x,"hex","hex")===A.toString("hex")?xe.Buffer.from(g,"hex"):xe.Buffer.alloc(0);return a?D.toString(a):wr(D)}},n0=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],i0=[2746333894,1453994832,1736282519,2993693404],v1=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],o0=/^[0-9a-f]{32}$/i,Ya=function(t){return n0[(4026531840&t)>>>28][(251658240&t)>>>24]<<24|n0[(15728640&t)>>>20][(983040&t)>>>16]<<16|n0[(61440&t)>>>12][(3840&t)>>>8]<<8|n0[(240&t)>>>4][(15&t)>>>0]<<0},Za=function(t){return(e=Ya(t))^qe(e,2)^qe(e,10)^qe(e,18)^qe(e,24);var e},Qa=function(t){var e,r=new Array(36);r[0]=t[0]^i0[0],r[1]=t[1]^i0[1],r[2]=t[2]^i0[2],r[3]=t[3]^i0[3];for(var n=new Array(32),i=0;i<32;i++)r[i+4]=r[i]^(e=Ya(r[i+1]^r[i+2]^r[i+3]^v1[i]))^qe(e,13)^qe(e,23),n[i]=r[i+4];return n},Ja=function(t,e){for(var r=Qa(e),n=0;n<32;n++)t[n+4]=t[n]^Za(t[n+1]^t[n+2]^t[n+3]^r[n]);return[t[35],t[34],t[33],t[32]]},es=function(t,e){for(var r=Qa(e).reverse(),n=0;n<32;n++)t[n+4]=t[n]^Za(t[n+1]^t[n+2]^t[n+3]^r[n]);return[t[35],t[34],t[33],t[32]]},a0=function(t){return[t.readInt32BE(0),t.readInt32BE(4),t.readInt32BE(8),t.readInt32BE(12)]},s0=function(t){for(var e=xe.Buffer.alloc(16),r=0;r<4;r++)e.writeInt32BE(t[r],4*r);return e},rr={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(t,e,r){var n=r||{},i=n.mode,o=n.iv,a=n.outputEncoding;if(typeof t=="string"?t=xe.Buffer.from(t,n.inputEncoding||"utf8"):t instanceof ArrayBuffer&&(t=xe.Buffer.from(t)),!xe.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');if(!o0.test(e))throw new TypeError("Invalid value of cipher `key`");if(e=xe.Buffer.from(e,"hex"),i===2&&!o0.test(o))throw new TypeError("Invalid value of `iv` option");return function(s,p,f,l){f&&(f=a0(f)),p=a0(p);for(var v=[],x=(s=function(_){var T=16-_.length%16,k=xe.Buffer.alloc(T,T);return xe.Buffer.concat([_,k],_.length+T)}(s)).length/16,A=0;A<x;A++)if(f){var y=16*A,m=[f[0]^s.readInt32BE(y),f[1]^s.readInt32BE(y+4),f[2]^s.readInt32BE(y+8),f[3]^s.readInt32BE(y+12)],g=Ja(m,p);v.push(s0(g)),f=g.slice(0)}else{var D=16*A,C=[s.readInt32BE(D),s.readInt32BE(D+4),s.readInt32BE(D+8),s.readInt32BE(D+12)],B=Ja(C,p);v.push(s0(B))}var b=xe.Buffer.concat(v,s.length);return l?b.toString(l):wr(b)}(t,e,o=i===2?xe.Buffer.from(o,"hex"):null,a)},decrypt:function(t,e,r){var n=r||{},i=n.mode,o=n.iv,a=n.outputEncoding;if(typeof t=="string"?t=xe.Buffer.from(t,n.inputEncoding):t instanceof ArrayBuffer&&(t=xe.Buffer.from(t)),!xe.Buffer.isBuffer(t))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(t)+'"');if(!o0.test(e))throw new TypeError("Invalid value of cipher `key`");if(e=xe.Buffer.from(e,"hex"),i===2&&!o0.test(o))throw new TypeError("Invalid value of `iv` option");return function(s,p,f,l){f&&(f=a0(f)),p=a0(p);var v=[],x=s.length/16;if(f)for(var A=x-1;A>=0;A--){var y,m=16*A;y=A>0?[s.readInt32BE(m-16),s.readInt32BE(m-16+4),s.readInt32BE(m-16+8),s.readInt32BE(m-16+12)]:f;var g=[s.readInt32BE(m),s.readInt32BE(m+4),s.readInt32BE(m+8),s.readInt32BE(m+12)],D=es(g,p);v.unshift(s0([D[0]^y[0],D[1]^y[1],D[2]^y[2],D[3]^y[3]]))}else for(var C=0;C<x;C++){var B=16*C,b=[s.readInt32BE(B),s.readInt32BE(B+4),s.readInt32BE(B+8),s.readInt32BE(B+12)],_=es(b,p);v.push(s0(_))}var T=xe.Buffer.concat(v,s.length-v[v.length-1][15]);return l?T.toString(l):wr(T)}(t,e,o=i===2?xe.Buffer.from(o,"hex"):null,a)}};(function(){if(typeof Object.id=="undefined"){var t=0;Object.id=function(e){return typeof e.__uniqueid=="undefined"&&Object.defineProperty(e,"__uniqueid",{value:++t,enumerable:!1,writable:!1}),e.__uniqueid}}})();function y1(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(r){var n,i,o,a,s,p;for(o=r.length,i=0,n="";i<o;){if(a=r.charCodeAt(i++)&255,i==o){n+=t.charAt(a>>2),n+=t.charAt((a&3)<<4),n+="==";break}if(s=r.charCodeAt(i++),i==o){n+=t.charAt(a>>2),n+=t.charAt((a&3)<<4|(s&240)>>4),n+=t.charAt((s&15)<<2),n+="=";break}p=r.charCodeAt(i++),n+=t.charAt(a>>2),n+=t.charAt((a&3)<<4|(s&240)>>4),n+=t.charAt((s&15)<<2|(p&192)>>6),n+=t.charAt(p&63)}return n},this.decode=function(r){var n,i,o,a,s,p,f;for(p=r.length,s=0,f="";s<p;){do n=e[r.charCodeAt(s++)&255];while(s<p&&n==-1);if(n==-1)break;do i=e[r.charCodeAt(s++)&255];while(s<p&&i==-1);if(i==-1)break;f+=String.fromCharCode(n<<2|(i&48)>>4);do{if(o=r.charCodeAt(s++)&255,o==61)return f;o=e[o]}while(s<p&&o==-1);if(o==-1)break;f+=String.fromCharCode((i&15)<<4|(o&60)>>2);do{if(a=r.charCodeAt(s++)&255,a==61)return f;a=e[a]}while(s<p&&a==-1);if(a==-1)break;f+=String.fromCharCode((o&3)<<6|a)}return f},this.utf16to8=function(r){var n,i,o,a;for(n="",o=r.length,i=0;i<o;i++)a=r.charCodeAt(i),a>=1&&a<=127?n+=r.charAt(i):a>2047?(n+=String.fromCharCode(224|a>>12&15),n+=String.fromCharCode(128|a>>6&63),n+=String.fromCharCode(128|a>>0&63)):(n+=String.fromCharCode(192|a>>6&31),n+=String.fromCharCode(128|a>>0&63));return n},this.utf8to16=function(r){var n,i,o,a,s,p;for(n="",o=r.length,i=0;i<o;)switch(a=r.charCodeAt(i++),a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=r.charAt(i-1);break;case 12:case 13:s=r.charCodeAt(i++),n+=String.fromCharCode((a&31)<<6|s&63);break;case 14:s=r.charCodeAt(i++),p=r.charCodeAt(i++),n+=String.fromCharCode((a&15)<<12|(s&63)<<6|(p&63)<<0);break}return n},this.charToHex=function(r){var n,i,o;for(n="",i=0;i<r.length;)o=r.charCodeAt(i++).toString(16),n+="\\0x"+o,n+=i>0&&i%8==0?`\r
28
- `:", ";return n}}function m1(){var t=0,e=new Object;this.add=function(r,n){this.containsKey(r)||t++,e[r]=n},this.getValue=function(r){return this.containsKey(r)?e[r]:null},this.remove=function(r){this.containsKey(r)&&delete e[r]&&t--},this.containsKey=function(r){return r in e},this.containsValue=function(r){for(var n in e)if(e[n]==r)return!0;return!1},this.getValues=function(){var r=[];for(var n in e)r.push(e[n]);return r},this.getKeys=function(){var r=[];for(var n in e)r.push(n);return r},this.getSize=function(){return t},this.clear=function(){t=0,e=new Object}}function g1(t){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new m1,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var e=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(e)},this.loadModuleCallBack=function(e){if(!e)throw e.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(e,r,n){var i=Object.id(n).toString();this.callbacks_.add(i,n);var o={MsgId:i,Method:e+"|"+t};r&&(o.Param=JSON.stringify(r));var a=JSON.stringify(o);this.connect&&this.ws.send(a)},this.ready=function(e){this.ready_func_=e},this._callback=function(e){var r=JSON.parse(e.data),n=r.MsgId;if(this.callbacks_.containsKey(n)){var i=this.callbacks_.getValue(n);i(r.Result,r.Response),this.callbacks_.remove(n)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:e,DongleInfoNum:r},n){this.exec("Arm_GetDongleInfo",[parseInt(e),parseInt(r)],n)},this.Arm_Enum=function(e){this.exec("Arm_Enum",null,e)},this.Arm_Open=function({Index:e},r){this.exec("Arm_Open",[parseInt(e)],r)},this.Arm_Close=function({Handle:e},r){this.exec("Arm_Close",[parseInt(e)],r)},this.Arm_VerifyPIN=function({Handle:e,UserPin:r,UserType:n},i){this.exec("Arm_VerifyPIN",[parseInt(e),n,r],i)},this.Arm_ResetState=function({Handle:e},r){this.exec("Arm_ResetState",[parseInt(e)],r)},this.Arm_GenRandom=function({Handle:e,RandomLen:r},n){this.exec("Arm_GenRandom",[parseInt(e),parseInt(r)],n)},this.Arm_LEDControl=function({Handle:e,LedFlag:r},n){this.exec("Arm_LEDControl",[parseInt(e),r],n)},this.Arm_SwitchProtocol=function({Handle:e,ProtocolFlag:r},n){this.exec("Arm_SwitchProtocol",[parseInt(e),r],n)},this.Arm_CreateFile=function({Handle:e,FileID:r,FileType:n,AttrBuffer:i},o){this.exec("Arm_CreateFile",[parseInt(e),n,parseInt(r),i],o)},this.Arm_WriteFile=function({Handle:e,FileID:r,FileType:n,FileOffset:i,DataInput:o},a){this.exec("Arm_WriteFile",[parseInt(e),n,parseInt(r),parseInt(i),o],a)},this.Arm_ReadFile0001=function({Handle:e},r){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0001"),parseInt(0),parseInt("64")],r)},this.Arm_ReadFile0002=function({Handle:e},r){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0002"),parseInt(0),parseInt("130")],r)},this.Arm_ReadFile0003=function({Handle:e},r){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0003"),parseInt(0),parseInt("130")],r)},this.Arm_ReadFile0004=function({Handle:e},r){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0004"),parseInt(0),parseInt("2048")],r)},this.Arm_ReadFile0005=function({Handle:e},r){this.exec("Arm_ReadFile",[parseInt(e),parseInt("0005"),parseInt(0),parseInt("2048")],r)},this.Arm_DownloadExeFile=function({Handle:e,Count:r,ExeFileInfo:n},i){this.exec("Arm_DownloadExeFile",[parseInt(e),parseInt(r),n],i)},this.Arm_RunExeFile=function({Handle:e,FileID:r,InData:n,DataLen:i},o){this.exec("Arm_RunExeFile",[parseInt(e),parseInt(r),n,n.length,parseInt(i)],o)},this.Arm_ReadRunExeFileData=function(e){this.exec("Arm_ReadRunExeFileData",null,e)},this.Arm_DeleteFile=function({Handle:e,FileID:r,FileType:n},i){this.exec("Arm_DeleteFile",[parseInt(e),n,parseInt(r)],i)},this.Arm_WriteData=function({Handle:e,Offset:r,DataInput:n},i){this.exec("Arm_WriteData",[parseInt(e),parseInt(r),n],i)},this.Arm_ReadData=function({Handle:e,Offset:r,ReadLength:n},i){this.exec("Arm_ReadData",[parseInt(e),parseInt(r),n],i)},this.Arm_WriteShareMemory=function({Handle:e,DataInput:r},n){this.exec("Arm_WriteShareMemory",[parseInt(e),r],n)},this.Arm_ReadShareMemory=function({Handle:e},r){this.exec("Arm_ReadShareMemory",[parseInt(e)],r)},this.Arm_GenUniqueKey=function({Handle:e,Seed:r},n){this.exec("Arm_GenUniqueKey",[parseInt(e),r.length,r],n)},this.Arm_ChangePIN=function({Handle:e,NewPIN:r,OldPIN:n,TryCount:i,PinFlag:o},a){this.exec("Arm_ChangePIN",[parseInt(e),o,n,r,parseInt(i)],a)},this.Arm_ResetUserPIN=function({Handle:e,AdminPIN:r},n){this.exec("Arm_ResetUserPIN",[parseInt(e),r],n)},this.Arm_SetUserID=function({Handle:e,UserID:r},n){this.exec("Arm_SetUserID",[parseInt(e),parseInt(r)],n)},this.Arm_GetDeadline=function({Handle:e},r){this.exec("Arm_GetDeadline",[parseInt(e)],r)},this.Arm_SetDeadline=function({Handle:e,SetDeadTime:r},n){this.exec("Arm_SetDeadline",[parseInt(e),parseInt(r)],n)},this.Arm_GetUTCTime=function({Handle:e},r){this.exec("Arm_GetUTCTime",[parseInt(e)],r)},this.Arm_RFS=function({Handle:e},r){this.exec("Arm_RFS",[parseInt(e)],r)},this.Arm_RsaGenPubPriKey=function({Handle:e,RsaFileId:r},n){this.exec("Arm_RsaGenPubPriKey",[parseInt(e),parseInt(r)],n)},this.Arm_EccGenPubPriKey=function({Handle:e,EccFileId:r},n){this.exec("Arm_EccGenPubPriKey",[parseInt(e),parseInt(r)],n)},this.Arm_Sm2GenPubPriKey=function({Handle:e,Sm2FileId:r},n){this.exec("Arm_Sm2GenPubPriKey",[parseInt(e),parseInt(r)],n)},this.Arm_ReadRsaPri=function(e){this.exec("Arm_ReadRsaPri",null,e)},this.Arm_ReadRsaPub=function(e){this.exec("Arm_ReadRsaPub",null,e)},this.Arm_ReadEccPri=function(e){this.exec("Arm_ReadEccPri",null,e)},this.Arm_ReadEccPub=function(e){this.exec("Arm_ReadEccPub",null,e)},this.Arm_ReadSm2Pri=function(e){this.exec("Arm_ReadSm2Pri",null,e)},this.Arm_ReadSm2Pub=function(e){this.exec("Arm_ReadSm2Pub",null,e)},this.Arm_RsaPri=function({Handle:e,RsaPri_Flag:r,RsaPriInData:n,RsaPriFileID:i,RsaPriFileSize:o},a){this.exec("Arm_RsaPri",[parseInt(e),parseInt(i),parseInt(o),r,n],a)},this.Arm_RsaPub=function({Handle:e,RsaPubKey:r,RsaPub_Flag:n,RsaPubInData:i,RsaPubFileSize:o},a){this.exec("Arm_RsaPub",[parseInt(e),parseInt(o),n,r,r.length,i],a)},this.Arm_EccSign=function({Handle:e,HashData:r,EccFileId:n},i){this.exec("Arm_EccSign",[parseInt(e),parseInt(n),r],i)},this.Arm_EccVerify=function({Handle:e,HashData:r,EccPubKey:n,EccSignData:i},o){this.exec("Arm_EccVerify",[parseInt(e),n,n.length,r,i],o)},this.Arm_Sm2Sign=function({Handle:e,HashData:r,Sm2FileId:n},i){this.exec("Arm_Sm2Sign",[parseInt(e),parseInt(n),r],i)},this.Arm_Sm2Verify=function({Handle:e,HashData:r,Sm2PubKey:n,Sm2SignData:i},o){this.exec("Arm_Sm2Verify",[parseInt(e),n,n.length,r,i],o)},this.Arm_TDES=function({Handle:e,Tdes_Flag:r,TdesFileID:n,TdesInData:i},o){this.exec("Arm_TDES",[parseInt(e),parseInt(n),r,i],o)},this.Arm_SM4=function({Handle:e,Sm4_Flag:r,Sm4FileID:n,Sm4InData:i},o){this.exec("Arm_SM4",[parseInt(e),parseInt(n),r,i],o)},this.Arm_HASH=function({Handle:e,Hash_Flag:r,HashInData:n},i){this.exec("Arm_HASH",[parseInt(e),r,n],i)},this.Arm_Seed=function({Handle:e,SeedData:r,SeedLength:n},i){this.exec("Arm_Seed",[parseInt(e),n,r],i)},this.Arm_LimitSeedCount=function({Handle:e,SeedCount:r},n){this.exec("Arm_LimitSeedCount",[parseInt(e),parseInt(r)],n)},this.Arm_GenMotherKey=function({Handle:e,SeedLen:r,SeedForPID:n,SonCount:i,StartUserID:o,AdminTryCount:a,UserPin:s,UserTryCount:p,UpdateRSAPriKey:f},l){this.exec("Arm_GenMotherKey",[parseInt(e),parseInt(r),n,s,parseInt(p),parseInt(a),f,parseInt(o),parseInt(i)],l)},this.Arm_RequestInit=function({Handle:e},r){this.exec("Arm_RequestInit",[parseInt(e)],r)},this.Arm_GetInitDataFromMother=function({Handle:e},r){this.exec("Arm_GetInitDataFromMother",[parseInt(e),Request],r)},this.Arm_InitSon=function({Handle:e,InitData:r},n){this.exec("Arm_InitSon",[parseInt(e),r],n)},this.Arm_SetUpdatePriKey=function({Handle:e,UpdatePriKey:r},n){this.exec("Arm_SetUpdatePriKey",[parseInt(e),r],n)},this.Arm_MakeUpdatePacket=function({Handle:e,HID:r,Func:n,FileID:i,FileType:o,Offset:a,DataLen:s,DataBuffer:p,UpRSAPubKey:f},l){this.exec("Arm_MakeUpdatePacket",[parseInt(e),r,n,o,parseInt(i),parseInt(a),p,f,parseInt(s)],l)},this.Arm_MakeUpdatePacketFromMother=function({Handle:e,HID:r,Func:n,FileID:i,FileType:o,Offset:a,DataLen:s,DataBuffer:p},f){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(e),r,n,o,parseInt(i),parseInt(a),p,parseInt(s)],f)},this.Arm_Update=function({Handle:e,UpdateData:r},n){this.exec("Arm_Update",[parseInt(e),r],n)},this.Arm_Set_DATA_FILE_ATTR=function({Size:e,ReadPriv:r,WritePriv:n},i){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(e),parseInt(r),parseInt(n)],i)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:e,Size:r,Type:n,Priv:i,IsReset:o,IsDecOnRAM:a},s){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[n,parseInt(r),parseInt(e),parseInt(i),parseInt(a),parseInt(o)],s)},this.Arm_Set_KEY_FILE_ATTR=function({Size:e,PrivEnc:r},n){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(e),parseInt(r)],n)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:e,PrivExe:r},n){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(e),parseInt(r)],n)},this.Arm_Set_DATA_LIC=function({ReadPriv:e,WritePriv:r},n){this.exec("Arm_Set_DATA_LIC",[parseInt(e),parseInt(r)],n)},this.Arm_Set_PRIKEY_LIC=function({Count:e,Priv:r,IsReset:n,IsDecOnRAM:i},o){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(e),parseInt(r),parseInt(i),parseInt(n)],o)},this.Arm_Set_KEY_LIC=function({PrivEnc:e},r){this.exec("Arm_Set_KEY_LIC",[parseInt(e)],r)},this.Arm_Set_EXE_LIC=function({PrivExe:e},r){this.exec("Arm_Set_EXE_LIC",[parseInt(e)],r)},this.Arm_Set_EXE_FILE_INFO=function({FileID:e,FileData:r,FileSize:n,InBuffer:i,CallLimit:o},a){this.exec("Arm_Set_EXE_FILE_INFO",[i,parseInt(n),parseInt(e),parseInt(o),r,r.length],a)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:e},r){this.exec("Arm_Clear_EXE_FILE_INFO",[e],r)}}const A1={HID:0},f0={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},ts={USER:0};class rs{constructor(){It(this,"Base64",new y1);It(this,"AtlCtrl",null);It(this,"ArmCount",0);It(this,"ArmIndex",0);It(this,"ArmHandle",0);It(this,"ArmRandom","");try{this.AtlCtrl=new g1("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(e){this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((e,r)=>{this.AtlCtrl.Arm_Enum((n,i)=>{n?(this.ArmCount=+i,e(i)):r(i)})})}armOpen(e=0){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((r,n)=>{this.AtlCtrl.Arm_Open({Index:e},(i,o)=>{i?(this.ArmHandle=+o,r(o)):(this.ArmHandle=o,n(o))})})}armClose(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,n)=>{this.AtlCtrl.Arm_Close({Handle:e},(i,o)=>{i?r(o):n(o)})})}armChangePIN(e,r,n=255,i=ts.USER,o=this.ArmHandle){if(this.AtlCtrl)return new Promise((a,s)=>{this.AtlCtrl.Arm_ChangePIN({Handle:o,NewPIN:e,OldPIN:r,TryCount:n,PinFlag:i},(p,f)=>{p&&f==0?(this.ArmPin=e,a(f)):s(f)})})}armGenRandom(e=16,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_GenRandom({Handle:r,RandomLen:e},(o,a)=>{o?(this.ArmRandom=a,n(a)):i(a)})})}armGetDeadline(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,n)=>{this.AtlCtrl.Arm_GetDeadline({Handle:e},(i,o)=>{i?(this.ArmDeadline=o,r(o)):n(o)})})}armGenUniqueKey(e="MTIzNDU2Nzg5MA==",r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:r,Seed:e},(o,a)=>{o?(this.ArmUKey=a,n(a)):i(a)})})}armGetDongleInfo(e=0,r=f0.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=e,new Promise((n,i)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:e,DongleInfoNum:r},(o,a)=>{if(o){switch(r){case f0.USER_ID:this.ArmUid=a;break;case f0.PRODUCT_ID:this.ArmPid=a;break;case f0.HARDWARE_ID:this.ArmHid=a;break}n(a)}else i(a)})})}armLEDControl(e,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_LEDControl({Handle:r,LedFlag:e},(o,a)=>{o&&a==0?n(a):i(a)})})}armRFS(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,n)=>{this.AtlCtrl.Arm_RFS({Handle:e},(i,o)=>{i&&o==0?r(o):n(o)})})}armReadFile(e="0001",r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl[`Arm_ReadFile${e}`]({Handle:r},(o,a)=>{if(o&&a.length>0)try{a=this.Base64.decode(a),n(a)}catch(s){n(a)}else i(a)})})}armResetState(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,n)=>{this.AtlCtrl.Arm_ResetState({Handle:e},(i,o)=>{i&&o==0?r(o):n(o)})})}armResetUserPIN(e,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:r,AdminPIN:e},(o,a)=>{o&&a==0?n(a):i(a)})})}armSetUserID(e,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_SetUserID({Handle:r,UserID:e},(o,a)=>{o&&a==0?n(a):i(a)})})}armSetDeadline(e,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_SetDeadline({Handle:r,SetDeadTime:e},(o,a)=>{o&&a==0?n(a):i(a)})})}armSwitchProtocol(e=A1.HID,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:r,ProtocolFlag:e},(o,a)=>{o&&a==0?n(a):i(a)})})}armVerifyPIN(e,r=ts.USER,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,o)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:n,UserPin:e,UserType:r},(a,s)=>{a&&s==0?(this.ArmPin=e,i(s)):o(s)})})}armReadData(e=0,r=128,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,o)=>{this.AtlCtrl.Arm_ReadData({Handle:n,Offset:e,ReadLength:r},(a,s)=>{a?(this.ArmData=s,i(s)):o(s)})})}armWriteData(e,r=0,n=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,o)=>{this.AtlCtrl.Arm_WriteData({Handle:n,Offset:r,DataInput:e},(a,s)=>{a&&s==0?i(s):o(s)})})}armReadShareMemory(e=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,n)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:e},(i,o)=>{i?(this.ArmData=o,r(o)):n(o)})})}armWriteShareMemory(e,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((n,i)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:r,DataInput:e},(o,a)=>{o&&a==0?n(a):i(a)})})}}const ns="0123456789abcdeffedcba9876543210",is="4b0de988570c3a0f";let nr=window.ENCRYPT&&new rs;function os(t=16,e="0123456789abcdefghijklmnopqrstuvwxyz"){let r="",n=e.length;for(;t>0;)r+=e[Math.floor(Math.random()*n)],t--;return r}function as(){return Qe(this,null,function*(){return nr||(nr=new rs),new Promise((t,e)=>{nr.armEnum().then(r=>{t(+r)}).catch(r=>{we.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e(r)})})})}me.throttle(()=>Qe(this,null,function*(){const t=yield as(),e={};if(typeof t!="number"||t<=0)we.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken();else{const r=yield B1();if(!e.token)return;r.length?r.includes(e.ukeyHid)||(we.ElMessage({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),e.resetToken()):(we.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),e.resetToken())}}),5e3,{trailing:!1});function E1(t=0){return Qe(this,null,function*(){return nr?new Promise((e,r)=>{nr.armGetDongleInfo(t).then(n=>{n?e(n):(we.ElMessage({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),r(n))}).catch(n=>{r(n)})}):we.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function B1(){return Qe(this,null,function*(){if(!nr)return we.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const t=yield as();let e=[];for(let r=0;r<t;r++){const n=yield E1(r);e.push(n)}return e})}os(16),os(16);const ss=window.INSPECT?rr.constants.CBC:rr.constants.ECB;p1.generateKeyPair();function fs(t,e,r={}){const n=us(is),i=r.mode||ss;r=i===rr.constants.ECB?te({mode:i,inputEncoding:"utf8",outputEncoding:"hex"},r):te({iv:ns,mode:i,inputEncoding:"utf8",outputEncoding:"hex"},r);let o="";try{o=rr.encrypt(t,n,r)}catch(a){console.log("err: ",a)}return o}function cs(t,e,r={}){const n=us(is),i=r.mode||ss;return r=i===rr.constants.ECB?te({mode:i,inputEncoding:"hex",outputEncoding:"utf8"},r):te({iv:ns,mode:i,inputEncoding:"hex",outputEncoding:"utf8"},r),rr.decrypt(t,n,r)}function us(t){return[...t].map(e=>e.charCodeAt().toString(16)).join("")}const ls={getLocal:t=>{try{let e=window.localStorage.getItem(t);return e=e!==null?cs(e):e,JSON.parse(e)}catch(e){console.error(e)}},setLocal:(t,e)=>{try{let r=JSON.stringify(e);r=r!==null?fs(r):r,window.localStorage.setItem(t,r)}catch(r){console.error(r)}},eachLocal:t=>{if(!t||aa(t)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,r=window.localStorage.length;e<r;e++){const n=window.localStorage.key(e);t((void 0).getLocal(n),n)}},clearLocal:()=>{window.localStorage.clear()},removeLocal:t=>{window.localStorage.removeItem(t)},getSession:t=>{try{let e=window.sessionStorage.getItem(t);return e=e!==null?cs(e):e,JSON.parse(e)}catch(e){console.error(e)}},setSession:(t,e)=>{try{let r=JSON.stringify(e);r=r!==null?fs(r):r,window.sessionStorage.setItem(t,r)}catch(r){console.error(r)}},eachSession:t=>{if(!t||aa(t)!=="Function")return console.error("传递参数非函数类型!");for(let e=0,r=window.sessionStorage.length;e<r;e++){const n=window.sessionStorage.key(e);t((void 0).getSession(n),n)}},clearSession:()=>{window.sessionStorage.clear()},removeSession:t=>{window.sessionStorage.removeItem(t)}},hs=t=>{const{quality:e,value:r,function_id:n}=t;return(e>>7&1)===1||e===0&&n===2&&r===1},xs="USER_TOKEN",ds="STATION_ID";var ps={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(le,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",p="hour",f="day",l="week",v="month",x="quarter",A="year",y="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var M=["th","st","nd","rd"],H=N%100;return"["+N+(M[(H-20)%10]||M[H]||M[0])+"]"}},B=function(N,M,H){var Y=String(N);return!Y||Y.length>=M?N:""+Array(M+1-Y.length).join(H)+N},b={s:B,z:function(N){var M=-N.utcOffset(),H=Math.abs(M),Y=Math.floor(H/60),W=H%60;return(M<=0?"+":"-")+B(Y,2,"0")+":"+B(W,2,"0")},m:function N(M,H){if(M.date()<H.date())return-N(H,M);var Y=12*(H.year()-M.year())+(H.month()-M.month()),W=M.clone().add(Y,v),ee=H-W<0,J=M.clone().add(Y+(ee?-1:1),v);return+(-(Y+(H-W)/(ee?W-J:J-W))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:v,y:A,w:l,d:f,D:y,h:p,m:s,s:a,ms:o,Q:x}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},_="en",T={};T[_]=C;var k="$isDayjsObject",q=function(N){return N instanceof G||!(!N||!N[k])},X=function N(M,H,Y){var W;if(!M)return _;if(typeof M=="string"){var ee=M.toLowerCase();T[ee]&&(W=ee),H&&(T[ee]=H,W=ee);var J=M.split("-");if(!W&&J.length>1)return N(J[0])}else{var O=M.name;T[O]=M,W=O}return!Y&&W&&(_=W),W||!Y&&_},I=function(N,M){if(q(N))return N.clone();var H=typeof M=="object"?M:{};return H.date=N,H.args=arguments,new G(H)},P=b;P.l=X,P.i=q,P.w=function(N,M){return I(N,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var G=function(){function N(H){this.$L=X(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[k]=!0}var M=N.prototype;return M.parse=function(H){this.$d=function(Y){var W=Y.date,ee=Y.utc;if(W===null)return new Date(NaN);if(P.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var J=W.match(g);if(J){var O=J[2]-1||0,U=(J[7]||"0").substring(0,3);return ee?new Date(Date.UTC(J[1],O,J[3]||1,J[4]||0,J[5]||0,J[6]||0,U)):new Date(J[1],O,J[3]||1,J[4]||0,J[5]||0,J[6]||0,U)}}return new Date(W)}(H),this.init()},M.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},M.$utils=function(){return P},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(H,Y){var W=I(H);return this.startOf(Y)<=W&&W<=this.endOf(Y)},M.isAfter=function(H,Y){return I(H)<this.startOf(Y)},M.isBefore=function(H,Y){return this.endOf(Y)<I(H)},M.$g=function(H,Y,W){return P.u(H)?this[Y]:this.set(W,H)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(H,Y){var W=this,ee=!!P.u(Y)||Y,J=P.p(H),O=function(Se,Fe){var Ke=P.w(W.$u?Date.UTC(W.$y,Fe,Se):new Date(W.$y,Fe,Se),W);return ee?Ke:Ke.endOf(f)},U=function(Se,Fe){return P.w(W.toDate()[Se].apply(W.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(Fe)),W)},V=this.$W,z=this.$M,se=this.$D,ce="set"+(this.$u?"UTC":"");switch(J){case A:return ee?O(1,0):O(31,11);case v:return ee?O(1,z):O(0,z+1);case l:var be=this.$locale().weekStart||0,fe=(V<be?V+7:V)-be;return O(ee?se-fe:se+(6-fe),z);case f:case y:return U(ce+"Hours",0);case p:return U(ce+"Minutes",1);case s:return U(ce+"Seconds",2);case a:return U(ce+"Milliseconds",3);default:return this.clone()}},M.endOf=function(H){return this.startOf(H,!1)},M.$set=function(H,Y){var W,ee=P.p(H),J="set"+(this.$u?"UTC":""),O=(W={},W[f]=J+"Date",W[y]=J+"Date",W[v]=J+"Month",W[A]=J+"FullYear",W[p]=J+"Hours",W[s]=J+"Minutes",W[a]=J+"Seconds",W[o]=J+"Milliseconds",W)[ee],U=ee===f?this.$D+(Y-this.$W):Y;if(ee===v||ee===A){var V=this.clone().set(y,1);V.$d[O](U),V.init(),this.$d=V.set(y,Math.min(this.$D,V.daysInMonth())).$d}else O&&this.$d[O](U);return this.init(),this},M.set=function(H,Y){return this.clone().$set(H,Y)},M.get=function(H){return this[P.p(H)]()},M.add=function(H,Y){var W,ee=this;H=Number(H);var J=P.p(Y),O=function(z){var se=I(ee);return P.w(se.date(se.date()+Math.round(z*H)),ee)};if(J===v)return this.set(v,this.$M+H);if(J===A)return this.set(A,this.$y+H);if(J===f)return O(1);if(J===l)return O(7);var U=(W={},W[s]=n,W[p]=i,W[a]=r,W)[J]||1,V=this.$d.getTime()+H*U;return P.w(V,this)},M.subtract=function(H,Y){return this.add(-1*H,Y)},M.format=function(H){var Y=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var ee=H||"YYYY-MM-DDTHH:mm:ssZ",J=P.z(this),O=this.$H,U=this.$m,V=this.$M,z=W.weekdays,se=W.months,ce=W.meridiem,be=function(Fe,Ke,ze,Ee){return Fe&&(Fe[Ke]||Fe(Y,ee))||ze[Ke].slice(0,Ee)},fe=function(Fe){return P.s(O%12||12,Fe,"0")},Se=ce||function(Fe,Ke,ze){var Ee=Fe<12?"AM":"PM";return ze?Ee.toLowerCase():Ee};return ee.replace(D,function(Fe,Ke){return Ke||function(ze){switch(ze){case"YY":return String(Y.$y).slice(-2);case"YYYY":return P.s(Y.$y,4,"0");case"M":return V+1;case"MM":return P.s(V+1,2,"0");case"MMM":return be(W.monthsShort,V,se,3);case"MMMM":return be(se,V);case"D":return Y.$D;case"DD":return P.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return be(W.weekdaysMin,Y.$W,z,2);case"ddd":return be(W.weekdaysShort,Y.$W,z,3);case"dddd":return z[Y.$W];case"H":return String(O);case"HH":return P.s(O,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return Se(O,U,!0);case"A":return Se(O,U,!1);case"m":return String(U);case"mm":return P.s(U,2,"0");case"s":return String(Y.$s);case"ss":return P.s(Y.$s,2,"0");case"SSS":return P.s(Y.$ms,3,"0");case"Z":return J}return null}(Fe)||J.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(H,Y,W){var ee,J=this,O=P.p(Y),U=I(H),V=(U.utcOffset()-this.utcOffset())*n,z=this-U,se=function(){return P.m(J,U)};switch(O){case A:ee=se()/12;break;case v:ee=se();break;case x:ee=se()/3;break;case l:ee=(z-V)/6048e5;break;case f:ee=(z-V)/864e5;break;case p:ee=z/i;break;case s:ee=z/n;break;case a:ee=z/r;break;default:ee=z}return W?ee:P.a(ee)},M.daysInMonth=function(){return this.endOf(v).$D},M.$locale=function(){return T[this.$L]},M.locale=function(H,Y){if(!H)return this.$L;var W=this.clone(),ee=X(H,Y,!0);return ee&&(W.$L=ee),W},M.clone=function(){return P.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},N}(),S=G.prototype;return I.prototype=S,[["$ms",o],["$s",a],["$m",s],["$H",p],["$W",f],["$M",v],["$y",A],["$D",y]].forEach(function(N){S[N[1]]=function(M){return this.$g(M,N[0],N[1])}}),I.extend=function(N,M){return N.$i||(N(M,G,I),N.$i=!0),I},I.locale=X,I.isDayjs=q,I.unix=function(N){return I(1e3*N)},I.en=T[_],I.Ls=T,I.p={},I})})(ps);var w1=ps.exports;const C1=A0(w1),b1=[{key:0,value:"离线"},{key:1,value:"在线"}],F1=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],D1=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],_1="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1747379227336'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='23558'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='64'%20height='64'%3e%3cpath%20d='M687.543%20658.286c-21.943-10.972-47.543-10.972-65.829%200C599.771%20669.257%20588.8%20691.2%20588.8%20716.8s10.971%2043.886%2032.914%2058.514c21.943%2010.972%2047.543%2010.972%2065.829%200%2021.943-10.971%2032.914-32.914%2032.914-58.514s-14.628-43.886-32.914-58.514zM10.97%20694.857c-10.971%2021.943-14.628%2036.572%200%2051.2L91.43%20833.83c14.628%2014.628%2032.914%2010.971%2051.2%200l47.542-21.943-153.6-164.572-25.6%2047.543zM936.23%20526.63V650.97H724.114c29.257%2032.915%2032.915%2076.8%2014.629%20113.372h197.486V921.6H1024V526.629h-87.771z%20m-402.286%203.657l212.114-201.143c7.314-7.314%2010.972-14.629%2010.972-25.6%200-10.972-3.658-18.286-10.972-25.6L588.8%20113.37c-7.314-7.314-14.629-10.971-25.6-10.971-10.971%200-18.286%203.657-25.6%2010.971l-482.743%20460.8c-7.314%207.315-10.971%2014.629-10.971%2025.6%200%2010.972%203.657%2018.286%2010.971%2025.6l157.257%20164.572c7.315%207.314%2014.629%2010.971%2025.6%2010.971%2010.972%200%2018.286-3.657%2025.6-10.971l219.429-208.457%2080.457%2098.743c10.971-21.943%2029.257-40.229%2051.2-51.2l-80.457-98.743z'%20p-id='23559'%20fill='%23999999'%3e%3c/path%3e%3c/svg%3e",S1="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1747379205045'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='23361'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='64'%20height='64'%3e%3cpath%20d='M808.19035614-5.81530905v72.49414403h144.98828683v147.05954724h74.56540444V-5.81530905zM77.03514075%2066.67883498h147.05954724V-5.81530905H4.54099794v219.55369127H77.03514075zM953.17864297%20942.82233719h-144.98828683v74.56540445h219.55369127V797.83405037h-74.56540444zM77.03514075%20797.83405037H4.54099794v219.55369127h219.55369005v-74.56540445H77.03514075zM866.18567111%20526.49882905v-6.21378371c2.07126164-20.71261275-14.49882905-39.35396386-35.21144058-41.4252255h-120.13315201c-8.28504534%200-14.49882905%202.07126164-20.71261275%206.21378371l-28.99765688-91.13549392c-6.2137837-14.49882905-18.64135111-24.85513482-35.21144058-28.99765688-16.57008947%202.07126164-28.99765689%2014.49882905-35.2114418%2028.99765688l-49.71026962%20155.34459259-35.21144059-275.4777446c0-14.49882905-14.49882905-28.99765689-35.21144059-35.21144059-20.71261275%200-35.21144059%206.2137837-35.21144179%2028.99765689l-70.42288117%20219.55369126-6.2137837-49.71026963c-8.28504534-12.42756741-20.71261275-22.78387317-35.2114418-28.99765687-14.49882905%200-28.99765689%208.28504534-35.21144058%2020.71261154l-35.21144059%2049.71026962h-84.92171142c-20.71261275%202.07126164-37.28270222%2014.49882905-43.49648593%2035.2114418%204.14252206%2020.71261275%2020.71261275%2037.28270222%2043.49648593%2041.42522428h105.63432296c10.35630577%200%2020.71261275-6.2137837%2028.99765809-14.49882903l28.99765688%2091.13549512c6.2137837%2016.57008947%2018.64135111%2026.92639645%2035.21144058%2031.06891852%2016.57008947-2.07126164%2028.99765689-14.49882905%2035.21144181-28.99765809l55.92405333-176.05720413%2035.21144058%20289.97657244c0%2014.49882905%2014.49882905%2028.99765689%2035.21144058%2035.21144057%2016.57008947-2.07126164%2028.99765689-14.49882905%2035.2114418-28.99765687l55.92405334-211.26864593%2020.71261153%2055.92405333c6.2137837%2014.49882905%2018.64135111%2024.85513482%2035.2114418%2028.99765688%2014.49882905%200%2028.99765689-8.28504534%2035.21144058-20.71261154l20.71261275-49.71026963h99.42053926c18.64135111%200%2033.14018016-14.49882905%2035.21144058-31.06891851z'%20p-id='23362'%20fill='%23999999'%3e%3c/path%3e%3c/svg%3e",Ft=(Fs=(bs=window.meta)==null?void 0:bs.graph)!=null&&Fs.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],POINT_VALUE:[{name:"在线状态",key:"online_state",type:"select",dataIds:{},options:[{label:"在线",value:1},{label:"离线",value:0}]},{name:"测点值",key:"point_value",type:"text",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},vs=(_s=(Ds=window.meta)==null?void 0:Ds.graph)!=null&&_s.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200",1:"#e2ac06",2:"#fa800a",3:"#f04155",4:"#ff0000"},ys=(Ts=(Ss=window.meta)==null?void 0:Ss.graph)!=null&&Ts.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff",1:"#fff",2:"#fff",3:"#fff",4:"#fff"},$e={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:b1.map(t=>({label:t.value,value:t.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:F1.map(t=>({label:t.value,value:t.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:D1.map(t=>({label:t.value,value:t.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},oe=Le(te({penType:Ce.NORMAL},$e),{form:[...Ft[Ce.NORMAL],...$e.form]});Ce.POINT_VALUE,$e.anchors,window.visibleLevel,[...Ft[Ce.POINT_VALUE],...$e.form],$e.form,window.dataType,window.dataProp,window.visibleLevel,$e.form,window.dataType,window.dataProp,window.visibleLevel,ys[0],Ce.LIGHT_PLATE,vs[0],$e.anchors,window.visibleLevel,[...Ft[Ce.LIGHT_PLATE],...$e.form],Le(te({width:100,height:30,name:"text",text:"文本",disableAnchor:!0,penType:Ce.TEXT},$e),{form:[...Ft[Ce.TEXT],...$e.form]}),te({width:100,height:100,name:"square"},oe),Le(te({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},oe),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),te({width:200,height:50,borderRadius:0,name:"rectangle"},oe),te({width:100,height:100,name:"circle"},oe),te({width:100,height:100,name:"triangle"},oe),te({width:100,height:100,name:"diamond"},oe),te({width:100,height:100,name:"pentagon"},oe),te({width:100,height:100,name:"hexagon"},oe),te({width:100,height:100,name:"pentagram"},oe),te({width:120,height:60,name:"leftArrow"},oe),te({width:120,height:60,name:"rightArrow"},oe),te({width:150,height:60,name:"twowayArrow"},oe),te({width:100,height:100,name:"cloud"},oe),te({textTop:-.1,width:100,height:100,name:"message"},oe),te({width:80,height:100,name:"file"},oe),Le(te({name:"svg",width:100,height:100,image:S1,audioId:"",penType:Ce.AUDIO},$e),{form:[...Ft[Ce.AUDIO],...$e.form],events:[{name:"enter",action:Jr.Emit,value:ct.CUSTOM_MSG,where:{type:""},params:JSON.stringify({action:ct.OPEN_AUDIO,data:""})},{name:"leave",action:Jr.Emit,value:ct.CUSTOM_MSG,where:{type:""},params:JSON.stringify({action:ct.CLOSE_AUDIO,data:""})}]}),Le(te({name:"svg",width:100,height:100,image:_1,cameraId:"",events:[{name:"enter",action:Jr.Emit,value:ct.CUSTOM_MSG,where:{type:""},params:JSON.stringify({action:ct.OPEN_CAMERA,data:""})},{name:"leave",action:Jr.Emit,value:ct.CUSTOM_MSG,where:{type:""},params:JSON.stringify({action:ct.CLOSE_CAMERA,data:""})}],penType:Ce.CAMERA},$e),{form:[...Ft[Ce.CAMERA],...$e.form]}),Le(te({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:Ce.MP4},$e),{form:[...Ft[Ce.MP4],...$e.form]}),Le(te({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:Ce.VIDEO_STREAM},$e),{form:[...Ft[Ce.VIDEO_STREAM],...$e.form]}),Le(te({width:60,height:100,name:"cube",z:.25},oe),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),te({width:70,height:100,name:"people"},oe),Le(te({name:"table",width:80,height:30,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,color:"#333",textColor:"#444"},oe),{penType:Ce.TABLE,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),Le(te({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},oe),{penType:Ce.BUTTON}),Le(te({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},oe),{penType:Ce.SWITCH}),Le(te({name:"radio",penName:"单选框",width:150,height:100,direction:"vertical",checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},oe),{penType:Ce.RADIO}),Le(te({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},oe),{penType:Ce.CHECKBOX}),Le(te({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},oe),{penType:Ce.SLIDER}),Le(te({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},oe),{penType:Ce.INPUT}),Le(te({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},oe),{penType:Ce.SELECT}),Le(te({name:"time",penName:"时间",width:300,height:40,text:`${C1().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,interval:67,fillZero:!0},oe),{penType:Ce.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...oe.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),te({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle"},oe),te({text:"流程",width:120,height:40,name:"rectangle"},oe),te({text:"判定",width:120,height:60,name:"diamond"},oe),te({text:"数据",width:120,height:50,name:"flowData",offsetX:.14},oe),te({text:"准备",width:120,height:50,name:"hexagon"},oe),te({text:"子流程",width:120,height:50,name:"flowSubprocess"},oe),te({text:"数据库",width:80,height:120,name:"flowDb"},oe),te({text:"文档",width:120,height:100,name:"flowDocument"},oe),te({text:"内部存储",width:120,height:80,name:"flowInternalStorage"},oe),te({text:"外部存储",width:120,height:80,name:"flowExternStorage"},oe),te({text:"队列",width:100,height:100,name:"flowQueue"},oe),te({text:"手动输入",width:120,height:80,name:"flowManually"},oe),te({text:"展示",width:120,height:80,name:"flowDisplay"},oe),te({text:"并行模式",width:120,height:50,name:"flowParallel"},oe),te({text:"注释",width:100,height:100,name:"flowComment"},oe),te({text:"",width:30,height:30,name:"circle",background:"#555",lineWidth:0},oe),te({width:30,height:30,name:"activityFinal"},oe),te({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle"},oe),te({text:"决策/合并",width:120,height:50,name:"diamond"},oe),te({text:"垂直泳道",width:200,height:500,name:"swimlaneV",textBaseline:"top",textTop:20,lineTop:.08},oe),te({text:"水平泳道",width:500,height:200,name:"swimlaneH",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},oe),te({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",fillStyle:"#555",strokeStyle:"transparent"},oe),te({text:"水平分岔/汇合",width:150,height:10,name:"forkH",fillStyle:"#555",strokeStyle:"transparent"},oe),te({name:"andGate",width:100,height:150},oe),te({name:"basicEvent",width:100,height:150},oe),te({name:"unexpandedEvent",width:100,height:150},oe),te({name:"priorityAndGate",width:100,height:150},oe),te({name:"forbiddenGate",width:100,height:150},oe),te({name:"event",width:100,height:150},oe),te({name:"switchEvent",width:100,height:150},oe),te({name:"conditionalEvent",width:150,height:100},oe),te({name:"transferSymbol",width:100,height:150},oe),te({name:"orGate",width:100,height:150},oe),te({name:"xorGate",width:100,height:150},oe),te({name:"votingGate",width:100,height:150},oe),te({text:"主题",width:200,height:50,name:"mindNode",borderRadius:.5},oe),te({text:"子主题",width:160,height:40,name:"mindLine"},oe);class T1{constructor(e){It(this,"editor");this.editor=e}initPlugin(e,r,n={}){e.installPenPlugins({name:r},[{plugin:Ue.mindBoxPlugin,options:n},{plugin:Ve.collapseChildPlugin,options:n}])}}const I1="original_meta2d";function R1(){return localStorage.removeItem(I1)}let Cr={};const O1=t=>{const e=document.querySelectorAll("video");let r=null;if(e.forEach(i=>{i.getAttribute("src")===t.video&&(r=i)}),!r)return;r.setAttribute("muted","muted"),r.setAttribute("autoplay","autoplay"),r.setAttribute("loop","loop"),r.setAttribute("crossorigin",""),r.setAttribute("controls",""),r.style.display="none",r.parentElement.style.border="2px solid #ffc878";const n=new JessibucaPro({container:r.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return t.autoPlay&&t.streamUrl&&n.play(t.streamUrl),Cr[t.id]=n,n},k1=()=>{Object.keys(Cr).forEach(t=>{Cr[t].destroy(),Cr[t]=null}),Cr={}},ms=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},P1=ms(Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1}},emits:["loaded"],setup(t,{expose:e,emit:r}){const n=r,i=t,o=re.ref(null),a=re.shallowRef(),s=re.computed(()=>!!(i.data||i.url));re.watch(()=>[i.data,i.url],()=>{s.value&&p()});function p(){return Qe(this,null,function*(){try{if(yield re.nextTick(),!o.value){console.error("未找到meta2d元素!");return}let m=null;if(i.data?m=i.data:i.url&&(m=yield y()),!m||!m.data){console.log("图纸数据为空");return}const g=m.options||{background:"#eee",disableAnchor:!1};if(a.value&&(a.value.destroy(!0),a.value=null),!o.value){console.error("Meta2D 容器元素不可用");return}a.value=new de.Meta2d(o.value,te({},g)),g.visibleLevel&&a.value.scale(g.visibleLevel),f(),l(),yield v(m.data),a.value.render(),x(),setTimeout(()=>{window!=null&&window.meta2dTools&&(window==null||window.registerToolsNew())},1e3),n("loaded",a.value)}catch(m){console.error("初始化编辑器失败:",m),we.ElMessage.error("初始化编辑器失败")}})}function f(){if(!a.value)return;new T1({}).initPlugin(a.value,"mindNode",{})}function l(){de.register(rt.classPens()),de.register(ar.flowPens()),de.registerAnchors(ar.flowAnchors()),de.register(st.sequencePens()),de.registerCanvasDraw(st.sequencePensbyCtx()),de.register(gi.activityDiagram()),de.registerCanvasDraw(gi.activityDiagramByCtx()),de.registerCanvasDraw(Ie.formPens()),de.registerCanvasDraw(_r.chartsPens()),de.register(sr.ftaPens()),de.registerAnchors(sr.ftaAnchors()),de.registerCanvasDraw(sr.ftaPensbyCtx())}function v(m){var g,D;if(a.value){if(typeof m.locked=="undefined"&&(m.locked=0),m.bkImage&&a.value.setBackgroundImage(m.bkImage),m.pens&&m.pens.length>0){const C=m.pens.filter(_=>_.name==="video"&&_.streamUrl);C.length>0&&setTimeout(()=>{C.forEach(_=>{O1(_)})},500);const B=((D=(g=window==null?void 0:window.meta)==null?void 0:g.graph)==null?void 0:D.penCountThreshold)||2e3;m.pens.length>B&&m.scale&&m.pens.forEach(_=>{const T=_.visibleLevel;T!==void 0?(_.visible=m.scale>=T,_.visible||(_.disabled=!0,_.locked=de.LockState.Disable)):(_.visible=!0,_.disabled=!1,_.locked=de.LockState.None)})}a.value.open(m)}}function x(){a.value&&a.value.on("scale",A)}function A(m){var g,D;try{if(!a.value)return;dn.emit("graph-scale",m);let C=a.value.store.data.pens;const B=((D=(g=window==null?void 0:window.meta)==null?void 0:g.graph)==null?void 0:D.penCountThreshold)||500;if(!(C.length>B))return;for(let _=0;_<C.length;_++){const T=C[_],k=T.visibleLevel!==void 0?m>=T.visibleLevel:!0;a.value._setValue({id:T.id,visible:k,disabled:!k,locked:k?de.LockState.None:de.LockState.Disable})}a.value.render()}catch(C){console.error("处理缩放失败:",C)}}function y(){return Qe(this,null,function*(){return i.url?(yield xn.getGraphApi(i.url,{local:i.local}))||null:(we.ElMessage.error("图纸路径为空!"),null)})}return re.onMounted(()=>{s.value&&p()}),re.onUnmounted(()=>{k1(),R1(),a.value&&(i.preview?(ke.clearLineCross(),a.value.destroy(!0)):a.value.off("scale",A))}),e({stage:a}),(m,g)=>(re.openBlock(),re.createElementBlock("div",{ref_key:"meta2dRef",ref:o,class:"meta2d-editor"},null,512))}}),[["__scopeId","data-v-664781e2"]]),M1={class:"preview-container"},L1={key:0,class:"back-btn"},br=ms(Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},config:{type:Object,default:()=>({socketUrl:oa,stationIdKey:ds,userTokenKey:xs,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:ia.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},apiInstance:{type:Object,default:()=>xn},mittInstance:{type:Object,default:()=>dn},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})}},emits:["error","loaded","custom-msg","socket-msg"],setup(t,{expose:e,emit:r}){const n=r,i=t;let o=re.ref(!1),a=re.ref(""),s=re.ref(!1);const p=re.ref(null),f=re.ref(""),l=re.ref(!1),v=re.computed(()=>{var S;return(S=p.value)==null?void 0:S.stage}),x=re.computed(()=>{var S;return(S=v.value)==null?void 0:S.store}),A=re.computed(()=>te({socketUrl:oa,stationIdKey:ds,userTokenKey:xs,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:ia.GRAPH.SOCKET},i.config)),y=()=>i.apiInstance||xn,m=()=>i.mittInstance||dn,g=(S,N="")=>{const M={error:S,message:N,timestamp:new Date().toISOString()};n("error",M),i.errorHandler.callback?i.errorHandler.callback(M):i.errorHandler.showMessage&&we.ElMessage&&we.ElMessage.error(`${N}: ${S.message||S}`)},D=()=>{a.value&&(f.value=a.value,l.value=s.value)},C=S=>{var N,M;try{if(!S)return;if(S.includes("token 必传"))return we.ElMessage.warning(S);if(S.data==="服务错误"||S.data.includes("token is expired"))return we.ElMessage.warning(S.data);n("socket-msg",S);const H=typeof S=="string"?JSON.parse(S):S;if(((N=H.data)==null?void 0:N.length)>0){const Y=setTimeout(()=>{clearTimeout(Y),v.value&&(H.data.forEach(W=>{const ee=v.value.find(W.dataId);I(ee,W)}),v.value.render())},A.value.messageDelay);i.customCallbacks.onWebSocketMessage&&i.customCallbacks.onWebSocketMessage(H),(M=window.customSocketFn)==null||M.call(window,S)}return!0}catch(H){return g(H,"WebSocket消息处理"),!0}},B=S=>Qe(this,null,function*(){var N;try{if(S.params){const M=JSON.parse(S.params);switch(M.action){case ct.CHANGE_GRAPH:(M==null?void 0:M.data)!=="图纸id"&&(a.value=f.value,s.value=l.value,o.value=M.isBack,(N=M==null?void 0:M.data)!=null&&N.startsWith("/")?(f.value=M==null?void 0:M.data,l.value=!0):(l.value=!1,_(M.data)));break}}n("custom-msg",S),i.customCallbacks.onCustomMessage&&i.customCallbacks.onCustomMessage(S)}catch(M){g(M,"自定义消息处理")}}),b=S=>{var N,M;try{n("loaded",S);const H=T(),Y=A.value,W=ls.getSession(Y.stationIdKey),ee=ls.getSession(Y.userTokenKey);!((M=(N=S.store)==null?void 0:N.data)!=null&&M.websocket)&&Y.enableWebSocket&&W&&ee&&(S.store.data.websocket=`${Y.socketUrl}?station_id=${W}`,S.store.data.websocketProtocols=ee,S.connectWebsocket()),(i.showMap||H.showMap==="true")&&S.showMap(),S.setRule({rule:!1}),S.setOptions({disableRuleLine:!0}),S.setGrid({grid:!1}),S.lock(de.LockState.DisableEdit),X().forEach(O=>{var U;(U=O==null?void 0:O.events)!=null&&U.length?k({id:O.id,locked:1},!1):k({id:O.id,locked:10},!1)}),S.render(),Y.enableAutoFit&&S.fitView(!0,24),S.on(ct.CUSTOM_MSG,B),S.on(ct.CHANGE_GRAPH,B),S&&(S.socketFn=C),i.customCallbacks.onStageLoaded&&i.customCallbacks.onStageLoaded(S)}catch(H){g(H,"图纸加载完成处理")}},_=S=>Qe(this,null,function*(){var N;try{if(i.url){f.value=i.url,l.value=i.local;return}const M=T();if(S=S||i.gid||M.id,M.local==="true"&&(l.value=!0),S){const H=y();if(H&&H.getCommonApi){const Y=yield H.getCommonApi(i.isFactory?"graph":"floorplan",{guid:S});if((N=Y.data)!=null&&N.length)f.value=Y.data[0].path,i.customCallbacks.onGraphLoaded&&i.customCallbacks.onGraphLoaded(f.value);else{const W="未找到图纸!";g(new Error(W),"获取图纸数据")}}else g(new Error("API实例不可用"),"初始化图纸数据!")}else f.value=i.url,l.value=i.local}catch(M){g(M,"获取图纸数据失败")}}),T=()=>{var H;const S={},N=((H=window.location.href.split("?"))==null?void 0:H[1])||"",M=new URLSearchParams(N);for(const[Y,W]of M.entries())S[Y]=W;return S},k=(S,N=!0)=>{if(v.value)return v.value.setValue(S,{render:N})},q=()=>v.value,X=()=>{var S,N;return((N=(S=x.value)==null?void 0:S.data)==null?void 0:N.pens)||[]},I=(()=>{let S=null;const N=new Map,M=new Map,H=W=>{var J;if(!((J=W.children)!=null&&J.length))return[];const ee=W.id||"";if(!ee)return[];if(!M.has(ee)&&x.value){const O=de.getAllChildren(W,x.value);M.set(ee,O)}return M.get(ee)||[]},Y=()=>{if(N.size===0||!v.value||!x.value)return;const W=[],ee=[],J=x.value.animates;N.forEach(({pen:O,dataItem:U,formKey:V})=>{switch(V){case"light_plate":{const z=U.value===-1||hs(U)?"#999999":ys[U.value!==void 0?U.value:U.alarm_value],se=U.value===-1||hs(U)?"#cccccc":vs[U.value!==void 0?U.value:U.alarm_value];k({id:O.id,textColor:z,background:se},!1)}break;case"point_value":O.penType===Ce.POINT_VALUE&&H(O).forEach(se=>{se.name==="text"&&k({id:se.id,text:U.value},!1)});break;case"online_state":{let z=U.value?void 0:"contrast(0%)";k({id:O.id,filter:z},!1),H(O).forEach(ce=>{k({id:ce.id,filter:z},!1)})}break;case"charged_state":{const z=U.value===eh.OFFLINE?"contrast(0%)":void 0;z!==O.filter&&(k({id:O.id,filter:z},!1),H(O).forEach(ce=>{k({id:ce.id,filter:z},!1)}))}break;case"electric_direction":U.value===th.STOP?J!=null&&J.has(O)&&ee.push(O):!!U.value!==O.animateReverse&&(k({id:O.id,animateReverse:!!U.value},!1),J!=null&&J.has(O)||W.push(O));break;case"electric_size":{const z=rh[U.value];z!==void 0&&z!==O.lineWidth&&k({id:O.id,lineWidth:z},!1)}break}}),ee.length>0&&v.value.stopAnimate(ee),W.length>0&&v.value.startAnimate(W),N.clear(),v.value.render()};return(W,ee)=>{W!=null&&W.length&&(W.forEach(J=>{const O=J.form;O!=null&&O.length&&O.forEach(U=>{if(!(Array.isArray(U.dataIds)?U.dataIds:[U.dataIds]).some(ce=>(ce==null?void 0:ce.dataId)===ee.dataId))return;const se=`${J.id}-${U.key}`;N.set(se,{pen:J,dataItem:ee,formKey:U.key})})}),S&&clearTimeout(S),S=setTimeout(()=>{Y(),S=null},A.value.debounceDelay))}})(),P=S=>{if(v.value){for(let N=0;N<S.length;N++){const M=S[N],H=v.value.find(M.dataId);I(H,M)}v.value.render(),i.customCallbacks.onBatchUpdate&&i.customCallbacks.onBatchUpdate(S)}},G=(S,N=!1)=>{if(!v.value)return;const M=X();for(let H=0;H<M.length;H++){const Y=M[H];let W=!1;N?W=S===Y.dataProp:W=S===5?!0:Y.dataProp<=S,k({id:Y.id,visible:W},!1)}v.value.fitView(),v.value.render(),i.customCallbacks.onLevelChange&&i.customCallbacks.onLevelChange(S,N)};return re.watch(()=>[i.url,i.isFactory,i.local,i.data,i.gid],()=>{_()}),re.watch(()=>i.showMap,()=>{v.value&&v.value.showMap()}),re.onMounted(()=>{const S=m();S&&S.on&&S.on(A.value.graphSocket,C),_()}),re.onUnmounted(()=>{const S=m();S&&S.off&&S.off(A.value.graphSocket,C)}),e({setValue:k,getStage:q,getAllPens:X,batchUpdatePen:P,handleLineCross:ke.handleLineCross,changeVisibleByLevel:G}),(S,N)=>{const M=re.resolveComponent("el-button");return re.openBlock(),re.createElementBlock("div",M1,[re.createVNode(P1,{ref_key:"graphRef",ref:p,url:f.value,local:l.value,data:i.data,preview:"",onLoaded:b},null,8,["url","local","data"]),re.unref(o)?(re.openBlock(),re.createElementBlock("div",L1,[re.createVNode(M,{type:"primary",onClick:D},{default:re.withCtx(()=>N[0]||(N[0]=[re.createTextVNode("返回",-1)])),_:1,__:[0]})])):re.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-c09e5d6b"]]);br.name||(br.name="SyGraph");const U1={install:t=>{t.component(br.name||"SyGraph",br)}};ae.SyGraph=br,ae.default=U1,Object.defineProperties(ae,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
32
+ */(function(e){var t=ln,r=so,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;var p=2147483647;e.kMaxLength=p,c.TYPED_ARRAY_SUPPORT=l(),!c.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{var z=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(z,S),z.foo()===42}catch(k){return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function s(z){if(z>p)throw new RangeError('The value "'+z+'" is invalid for option "size"');var S=new Uint8Array(z);return Object.setPrototypeOf(S,c.prototype),S}function c(z,S,k){if(typeof z=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(z)}return d(z,S,k)}c.poolSize=8192;function d(z,S,k){if(typeof z=="string")return a(z,S);if(ArrayBuffer.isView(z))return f(z);if(z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z);if(Z(z,ArrayBuffer)||z&&Z(z.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Z(z,SharedArrayBuffer)||z&&Z(z.buffer,SharedArrayBuffer)))return v(z,S,k);if(typeof z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Q=z.valueOf&&z.valueOf();if(Q!=null&&Q!==z)return c.from(Q,S,k);var re=y(z);if(re)return re;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof z[Symbol.toPrimitive]=="function")return c.from(z[Symbol.toPrimitive]("string"),S,k);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z)}c.from=function(z,S,k){return d(z,S,k)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function o(z){if(typeof z!="number")throw new TypeError('"size" argument must be of type number');if(z<0)throw new RangeError('The value "'+z+'" is invalid for option "size"')}function n(z,S,k){return o(z),z<=0?s(z):S!==void 0?typeof k=="string"?s(z).fill(S,k):s(z).fill(S):s(z)}c.alloc=function(z,S,k){return n(z,S,k)};function h(z){return o(z),s(z<0?0:g(z)|0)}c.allocUnsafe=function(z){return h(z)},c.allocUnsafeSlow=function(z){return h(z)};function a(z,S){if((typeof S!="string"||S==="")&&(S="utf8"),!c.isEncoding(S))throw new TypeError("Unknown encoding: "+S);var k=m(z,S)|0,Q=s(k),re=Q.write(z,S);return re!==k&&(Q=Q.slice(0,re)),Q}function u(z){for(var S=z.length<0?0:g(z.length)|0,k=s(S),Q=0;Q<S;Q+=1)k[Q]=z[Q]&255;return k}function f(z){if(Z(z,Uint8Array)){var S=new Uint8Array(z);return v(S.buffer,S.byteOffset,S.byteLength)}return u(z)}function v(z,S,k){if(S<0||z.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(z.byteLength<S+(k||0))throw new RangeError('"length" is outside of buffer bounds');var Q;return S===void 0&&k===void 0?Q=new Uint8Array(z):k===void 0?Q=new Uint8Array(z,S):Q=new Uint8Array(z,S,k),Object.setPrototypeOf(Q,c.prototype),Q}function y(z){if(c.isBuffer(z)){var S=g(z.length)|0,k=s(S);return k.length===0||z.copy(k,0,0,S),k}if(z.length!==void 0)return typeof z.length!="number"||ee(z.length)?s(0):u(z);if(z.type==="Buffer"&&Array.isArray(z.data))return u(z.data)}function g(z){if(z>=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return z|0}function b(z){return+z!=z&&(z=0),c.alloc(+z)}c.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==c.prototype},c.compare=function(S,k){if(Z(S,Uint8Array)&&(S=c.from(S,S.offset,S.byteLength)),Z(k,Uint8Array)&&(k=c.from(k,k.offset,k.byteLength)),!c.isBuffer(S)||!c.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===k)return 0;for(var Q=S.length,re=k.length,le=0,ue=Math.min(Q,re);le<ue;++le)if(S[le]!==k[le]){Q=S[le],re=k[le];break}return Q<re?-1:re<Q?1:0},c.isEncoding=function(S){switch(String(S).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(S,k){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return c.alloc(0);var Q;if(k===void 0)for(k=0,Q=0;Q<S.length;++Q)k+=S[Q].length;var re=c.allocUnsafe(k),le=0;for(Q=0;Q<S.length;++Q){var ue=S[Q];if(Z(ue,Uint8Array))le+ue.length>re.length?c.from(ue).copy(re,le):Uint8Array.prototype.set.call(re,ue,le);else if(c.isBuffer(ue))ue.copy(re,le);else throw new TypeError('"list" argument must be an Array of Buffers');le+=ue.length}return re};function m(z,S){if(c.isBuffer(z))return z.length;if(ArrayBuffer.isView(z)||Z(z,ArrayBuffer))return z.byteLength;if(typeof z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof z);var k=z.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&k===0)return 0;for(var re=!1;;)switch(S){case"ascii":case"latin1":case"binary":return k;case"utf8":case"utf-8":return oe(z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k*2;case"hex":return k>>>1;case"base64":return O(z).length;default:if(re)return Q?-1:oe(z).length;S=(""+S).toLowerCase(),re=!0}}c.byteLength=m;function E(z,S,k){var Q=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((k===void 0||k>this.length)&&(k=this.length),k<=0)||(k>>>=0,S>>>=0,k<=S))return"";for(z||(z="utf8");;)switch(z){case"hex":return M(this,S,k);case"utf8":case"utf-8":return B(this,S,k);case"ascii":return X(this,S,k);case"latin1":case"binary":return $(this,S,k);case"base64":return C(this,S,k);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,S,k);default:if(Q)throw new TypeError("Unknown encoding: "+z);z=(z+"").toLowerCase(),Q=!0}}c.prototype._isBuffer=!0;function F(z,S,k){var Q=z[S];z[S]=z[k],z[k]=Q}c.prototype.swap16=function(){var S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var k=0;k<S;k+=2)F(this,k,k+1);return this},c.prototype.swap32=function(){var S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var k=0;k<S;k+=4)F(this,k,k+3),F(this,k+1,k+2);return this},c.prototype.swap64=function(){var S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var k=0;k<S;k+=8)F(this,k,k+7),F(this,k+1,k+6),F(this,k+2,k+5),F(this,k+3,k+4);return this},c.prototype.toString=function(){var S=this.length;return S===0?"":arguments.length===0?B(this,0,S):E.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(S){if(!c.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:c.compare(this,S)===0},c.prototype.inspect=function(){var S="",k=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,k).replace(/(.{2})/g,"$1 ").trim(),this.length>k&&(S+=" ... "),"<Buffer "+S+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(S,k,Q,re,le){if(Z(S,Uint8Array)&&(S=c.from(S,S.offset,S.byteLength)),!c.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(k===void 0&&(k=0),Q===void 0&&(Q=S?S.length:0),re===void 0&&(re=0),le===void 0&&(le=this.length),k<0||Q>S.length||re<0||le>this.length)throw new RangeError("out of range index");if(re>=le&&k>=Q)return 0;if(re>=le)return-1;if(k>=Q)return 1;if(k>>>=0,Q>>>=0,re>>>=0,le>>>=0,this===S)return 0;for(var ue=le-re,ye=Q-k,xe=Math.min(ue,ye),Be=this.slice(re,le),Ie=S.slice(k,Q),Fe=0;Fe<xe;++Fe)if(Be[Fe]!==Ie[Fe]){ue=Be[Fe],ye=Ie[Fe];break}return ue<ye?-1:ye<ue?1:0};function T(z,S,k,Q,re){if(z.length===0)return-1;if(typeof k=="string"?(Q=k,k=0):k>2147483647?k=2147483647:k<-2147483648&&(k=-2147483648),k=+k,ee(k)&&(k=re?0:z.length-1),k<0&&(k=z.length+k),k>=z.length){if(re)return-1;k=z.length-1}else if(k<0)if(re)k=0;else return-1;if(typeof S=="string"&&(S=c.from(S,Q)),c.isBuffer(S))return S.length===0?-1:D(z,S,k,Q,re);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(z,S,k):Uint8Array.prototype.lastIndexOf.call(z,S,k):D(z,[S],k,Q,re);throw new TypeError("val must be string, number or Buffer")}function D(z,S,k,Q,re){var le=1,ue=z.length,ye=S.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(z.length<2||S.length<2)return-1;le=2,ue/=2,ye/=2,k/=2}function xe(jt,Ht){return le===1?jt[Ht]:jt.readUInt16BE(Ht*le)}var Be;if(re){var Ie=-1;for(Be=k;Be<ue;Be++)if(xe(z,Be)===xe(S,Ie===-1?0:Be-Ie)){if(Ie===-1&&(Ie=Be),Be-Ie+1===ye)return Ie*le}else Ie!==-1&&(Be-=Be-Ie),Ie=-1}else for(k+ye>ue&&(k=ue-ye),Be=k;Be>=0;Be--){for(var Fe=!0,Tt=0;Tt<ye;Tt++)if(xe(z,Be+Tt)!==xe(S,Tt)){Fe=!1;break}if(Fe)return Be}return-1}c.prototype.includes=function(S,k,Q){return this.indexOf(S,k,Q)!==-1},c.prototype.indexOf=function(S,k,Q){return T(this,S,k,Q,!0)},c.prototype.lastIndexOf=function(S,k,Q){return T(this,S,k,Q,!1)};function I(z,S,k,Q){k=Number(k)||0;var re=z.length-k;Q?(Q=Number(Q),Q>re&&(Q=re)):Q=re;var le=S.length;Q>le/2&&(Q=le/2);for(var ue=0;ue<Q;++ue){var ye=parseInt(S.substr(ue*2,2),16);if(ee(ye))return ue;z[k+ue]=ye}return ue}function Y(z,S,k,Q){return K(oe(S,z.length-k),z,k,Q)}function W(z,S,k,Q){return K(x(S),z,k,Q)}function _(z,S,k,Q){return K(O(S),z,k,Q)}function A(z,S,k,Q){return K(w(S,z.length-k),z,k,Q)}c.prototype.write=function(S,k,Q,re){if(k===void 0)re="utf8",Q=this.length,k=0;else if(Q===void 0&&typeof k=="string")re=k,Q=this.length,k=0;else if(isFinite(k))k=k>>>0,isFinite(Q)?(Q=Q>>>0,re===void 0&&(re="utf8")):(re=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var le=this.length-k;if((Q===void 0||Q>le)&&(Q=le),S.length>0&&(Q<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var ue=!1;;)switch(re){case"hex":return I(this,S,k,Q);case"utf8":case"utf-8":return Y(this,S,k,Q);case"ascii":case"latin1":case"binary":return W(this,S,k,Q);case"base64":return _(this,S,k,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,S,k,Q);default:if(ue)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),ue=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(z,S,k){return S===0&&k===z.length?t.fromByteArray(z):t.fromByteArray(z.slice(S,k))}function B(z,S,k){k=Math.min(z.length,k);for(var Q=[],re=S;re<k;){var le=z[re],ue=null,ye=le>239?4:le>223?3:le>191?2:1;if(re+ye<=k){var xe,Be,Ie,Fe;switch(ye){case 1:le<128&&(ue=le);break;case 2:xe=z[re+1],(xe&192)===128&&(Fe=(le&31)<<6|xe&63,Fe>127&&(ue=Fe));break;case 3:xe=z[re+1],Be=z[re+2],(xe&192)===128&&(Be&192)===128&&(Fe=(le&15)<<12|(xe&63)<<6|Be&63,Fe>2047&&(Fe<55296||Fe>57343)&&(ue=Fe));break;case 4:xe=z[re+1],Be=z[re+2],Ie=z[re+3],(xe&192)===128&&(Be&192)===128&&(Ie&192)===128&&(Fe=(le&15)<<18|(xe&63)<<12|(Be&63)<<6|Ie&63,Fe>65535&&Fe<1114112&&(ue=Fe))}}ue===null?(ue=65533,ye=1):ue>65535&&(ue-=65536,Q.push(ue>>>10&1023|55296),ue=56320|ue&1023),Q.push(ue),re+=ye}return q(Q)}var N=4096;function q(z){var S=z.length;if(S<=N)return String.fromCharCode.apply(String,z);for(var k="",Q=0;Q<S;)k+=String.fromCharCode.apply(String,z.slice(Q,Q+=N));return k}function X(z,S,k){var Q="";k=Math.min(z.length,k);for(var re=S;re<k;++re)Q+=String.fromCharCode(z[re]&127);return Q}function $(z,S,k){var Q="";k=Math.min(z.length,k);for(var re=S;re<k;++re)Q+=String.fromCharCode(z[re]);return Q}function M(z,S,k){var Q=z.length;(!S||S<0)&&(S=0),(!k||k<0||k>Q)&&(k=Q);for(var re="",le=S;le<k;++le)re+=ae[z[le]];return re}function j(z,S,k){for(var Q=z.slice(S,k),re="",le=0;le<Q.length-1;le+=2)re+=String.fromCharCode(Q[le]+Q[le+1]*256);return re}c.prototype.slice=function(S,k){var Q=this.length;S=~~S,k=k===void 0?Q:~~k,S<0?(S+=Q,S<0&&(S=0)):S>Q&&(S=Q),k<0?(k+=Q,k<0&&(k=0)):k>Q&&(k=Q),k<S&&(k=S);var re=this.subarray(S,k);return Object.setPrototypeOf(re,c.prototype),re};function L(z,S,k){if(z%1!==0||z<0)throw new RangeError("offset is not uint");if(z+S>k)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(S,k,Q){S=S>>>0,k=k>>>0,Q||L(S,k,this.length);for(var re=this[S],le=1,ue=0;++ue<k&&(le*=256);)re+=this[S+ue]*le;return re},c.prototype.readUintBE=c.prototype.readUIntBE=function(S,k,Q){S=S>>>0,k=k>>>0,Q||L(S,k,this.length);for(var re=this[S+--k],le=1;k>0&&(le*=256);)re+=this[S+--k]*le;return re},c.prototype.readUint8=c.prototype.readUInt8=function(S,k){return S=S>>>0,k||L(S,1,this.length),this[S]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(S,k){return S=S>>>0,k||L(S,2,this.length),this[S]|this[S+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(S,k){return S=S>>>0,k||L(S,2,this.length),this[S]<<8|this[S+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(S,k){return S=S>>>0,k||L(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(S,k){return S=S>>>0,k||L(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},c.prototype.readIntLE=function(S,k,Q){S=S>>>0,k=k>>>0,Q||L(S,k,this.length);for(var re=this[S],le=1,ue=0;++ue<k&&(le*=256);)re+=this[S+ue]*le;return le*=128,re>=le&&(re-=Math.pow(2,8*k)),re},c.prototype.readIntBE=function(S,k,Q){S=S>>>0,k=k>>>0,Q||L(S,k,this.length);for(var re=k,le=1,ue=this[S+--re];re>0&&(le*=256);)ue+=this[S+--re]*le;return le*=128,ue>=le&&(ue-=Math.pow(2,8*k)),ue},c.prototype.readInt8=function(S,k){return S=S>>>0,k||L(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},c.prototype.readInt16LE=function(S,k){S=S>>>0,k||L(S,2,this.length);var Q=this[S]|this[S+1]<<8;return Q&32768?Q|4294901760:Q},c.prototype.readInt16BE=function(S,k){S=S>>>0,k||L(S,2,this.length);var Q=this[S+1]|this[S]<<8;return Q&32768?Q|4294901760:Q},c.prototype.readInt32LE=function(S,k){return S=S>>>0,k||L(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},c.prototype.readInt32BE=function(S,k){return S=S>>>0,k||L(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},c.prototype.readFloatLE=function(S,k){return S=S>>>0,k||L(S,4,this.length),r.read(this,S,!0,23,4)},c.prototype.readFloatBE=function(S,k){return S=S>>>0,k||L(S,4,this.length),r.read(this,S,!1,23,4)},c.prototype.readDoubleLE=function(S,k){return S=S>>>0,k||L(S,8,this.length),r.read(this,S,!0,52,8)},c.prototype.readDoubleBE=function(S,k){return S=S>>>0,k||L(S,8,this.length),r.read(this,S,!1,52,8)};function R(z,S,k,Q,re,le){if(!c.isBuffer(z))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>re||S<le)throw new RangeError('"value" argument is out of bounds');if(k+Q>z.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(S,k,Q,re){if(S=+S,k=k>>>0,Q=Q>>>0,!re){var le=Math.pow(2,8*Q)-1;R(this,S,k,Q,le,0)}var ue=1,ye=0;for(this[k]=S&255;++ye<Q&&(ue*=256);)this[k+ye]=S/ue&255;return k+Q},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(S,k,Q,re){if(S=+S,k=k>>>0,Q=Q>>>0,!re){var le=Math.pow(2,8*Q)-1;R(this,S,k,Q,le,0)}var ue=Q-1,ye=1;for(this[k+ue]=S&255;--ue>=0&&(ye*=256);)this[k+ue]=S/ye&255;return k+Q},c.prototype.writeUint8=c.prototype.writeUInt8=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,1,255,0),this[k]=S&255,k+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,2,65535,0),this[k]=S&255,this[k+1]=S>>>8,k+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,2,65535,0),this[k]=S>>>8,this[k+1]=S&255,k+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,4,4294967295,0),this[k+3]=S>>>24,this[k+2]=S>>>16,this[k+1]=S>>>8,this[k]=S&255,k+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,4,4294967295,0),this[k]=S>>>24,this[k+1]=S>>>16,this[k+2]=S>>>8,this[k+3]=S&255,k+4},c.prototype.writeIntLE=function(S,k,Q,re){if(S=+S,k=k>>>0,!re){var le=Math.pow(2,8*Q-1);R(this,S,k,Q,le-1,-le)}var ue=0,ye=1,xe=0;for(this[k]=S&255;++ue<Q&&(ye*=256);)S<0&&xe===0&&this[k+ue-1]!==0&&(xe=1),this[k+ue]=(S/ye>>0)-xe&255;return k+Q},c.prototype.writeIntBE=function(S,k,Q,re){if(S=+S,k=k>>>0,!re){var le=Math.pow(2,8*Q-1);R(this,S,k,Q,le-1,-le)}var ue=Q-1,ye=1,xe=0;for(this[k+ue]=S&255;--ue>=0&&(ye*=256);)S<0&&xe===0&&this[k+ue+1]!==0&&(xe=1),this[k+ue]=(S/ye>>0)-xe&255;return k+Q},c.prototype.writeInt8=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,1,127,-128),S<0&&(S=255+S+1),this[k]=S&255,k+1},c.prototype.writeInt16LE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,2,32767,-32768),this[k]=S&255,this[k+1]=S>>>8,k+2},c.prototype.writeInt16BE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,2,32767,-32768),this[k]=S>>>8,this[k+1]=S&255,k+2},c.prototype.writeInt32LE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,4,2147483647,-2147483648),this[k]=S&255,this[k+1]=S>>>8,this[k+2]=S>>>16,this[k+3]=S>>>24,k+4},c.prototype.writeInt32BE=function(S,k,Q){return S=+S,k=k>>>0,Q||R(this,S,k,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[k]=S>>>24,this[k+1]=S>>>16,this[k+2]=S>>>8,this[k+3]=S&255,k+4};function H(z,S,k,Q,re,le){if(k+Q>z.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("Index out of range")}function V(z,S,k,Q,re){return S=+S,k=k>>>0,re||H(z,S,k,4),r.write(z,S,k,Q,23,4),k+4}c.prototype.writeFloatLE=function(S,k,Q){return V(this,S,k,!0,Q)},c.prototype.writeFloatBE=function(S,k,Q){return V(this,S,k,!1,Q)};function J(z,S,k,Q,re){return S=+S,k=k>>>0,re||H(z,S,k,8),r.write(z,S,k,Q,52,8),k+8}c.prototype.writeDoubleLE=function(S,k,Q){return J(this,S,k,!0,Q)},c.prototype.writeDoubleBE=function(S,k,Q){return J(this,S,k,!1,Q)},c.prototype.copy=function(S,k,Q,re){if(!c.isBuffer(S))throw new TypeError("argument should be a Buffer");if(Q||(Q=0),!re&&re!==0&&(re=this.length),k>=S.length&&(k=S.length),k||(k=0),re>0&&re<Q&&(re=Q),re===Q||S.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),S.length-k<re-Q&&(re=S.length-k+Q);var le=re-Q;return this===S&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(k,Q,re):Uint8Array.prototype.set.call(S,this.subarray(Q,re),k),le},c.prototype.fill=function(S,k,Q,re){if(typeof S=="string"){if(typeof k=="string"?(re=k,k=0,Q=this.length):typeof Q=="string"&&(re=Q,Q=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!c.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(S.length===1){var le=S.charCodeAt(0);(re==="utf8"&&le<128||re==="latin1")&&(S=le)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(k<0||this.length<k||this.length<Q)throw new RangeError("Out of range index");if(Q<=k)return this;k=k>>>0,Q=Q===void 0?this.length:Q>>>0,S||(S=0);var ue;if(typeof S=="number")for(ue=k;ue<Q;++ue)this[ue]=S;else{var ye=c.isBuffer(S)?S:c.from(S,re),xe=ye.length;if(xe===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(ue=0;ue<Q-k;++ue)this[ue+k]=ye[ue%xe]}return this};var ie=/[^+/0-9A-Za-z-_]/g;function ne(z){if(z=z.split("=")[0],z=z.trim().replace(ie,""),z.length<2)return"";for(;z.length%4!==0;)z=z+"=";return z}function oe(z,S){S=S||1/0;for(var k,Q=z.length,re=null,le=[],ue=0;ue<Q;++ue){if(k=z.charCodeAt(ue),k>55295&&k<57344){if(!re){if(k>56319){(S-=3)>-1&&le.push(239,191,189);continue}else if(ue+1===Q){(S-=3)>-1&&le.push(239,191,189);continue}re=k;continue}if(k<56320){(S-=3)>-1&&le.push(239,191,189),re=k;continue}k=(re-55296<<10|k-56320)+65536}else re&&(S-=3)>-1&&le.push(239,191,189);if(re=null,k<128){if((S-=1)<0)break;le.push(k)}else if(k<2048){if((S-=2)<0)break;le.push(k>>6|192,k&63|128)}else if(k<65536){if((S-=3)<0)break;le.push(k>>12|224,k>>6&63|128,k&63|128)}else if(k<1114112){if((S-=4)<0)break;le.push(k>>18|240,k>>12&63|128,k>>6&63|128,k&63|128)}else throw new Error("Invalid code point")}return le}function x(z){for(var S=[],k=0;k<z.length;++k)S.push(z.charCodeAt(k)&255);return S}function w(z,S){for(var k,Q,re,le=[],ue=0;ue<z.length&&!((S-=2)<0);++ue)k=z.charCodeAt(ue),Q=k>>8,re=k%256,le.push(re),le.push(Q);return le}function O(z){return t.toByteArray(ne(z))}function K(z,S,k,Q){for(var re=0;re<Q&&!(re+k>=S.length||re>=z.length);++re)S[re+k]=z[re];return re}function Z(z,S){return z instanceof S||z!=null&&z.constructor!=null&&z.constructor.name!=null&&z.constructor.name===S.name}function ee(z){return z!==z}var ae=function(){for(var z="0123456789abcdef",S=new Array(256),k=0;k<16;++k)for(var Q=k*16,re=0;re<16;++re)S[Q+re]=z[k]+z[re];return S}()})(_e);var Gp=_e.Buffer,Qp=function(e){if(e instanceof Uint8Array){if(e.byteOffset===0&&e.byteLength===e.buffer.byteLength)return e.buffer;if(typeof e.buffer.slice=="function")return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(Gp.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i<r;i++)t[i]=e[i];return t.buffer}else throw new Error("Argument must be a Buffer")};const Br=Bn(Qp);var s0={exports:{}};(function(e,t){(function(){var r,i=0xdeadbeefcafe,p=(i&16777215)==15715070;function l(P,U,G){P!=null&&(typeof P=="number"?this.fromNumber(P,U,G):U==null&&typeof P!="string"?this.fromString(P,256):this.fromString(P,U))}function s(){return new l(null)}function c(P,U,G,te,ce,fe){for(;--fe>=0;){var de=U*this[P++]+G[te]+ce;ce=Math.floor(de/67108864),G[te++]=de&67108863}return ce}function d(P,U,G,te,ce,fe){for(var de=U&32767,me=U>>15;--fe>=0;){var Re=this[P]&32767,Ve=this[P++]>>15,st=me*Re+Ve*de;Re=de*Re+((st&32767)<<15)+G[te]+(ce&1073741823),ce=(Re>>>30)+(st>>>15)+me*Ve+(ce>>>30),G[te++]=Re&1073741823}return ce}function o(P,U,G,te,ce,fe){for(var de=U&16383,me=U>>14;--fe>=0;){var Re=this[P]&16383,Ve=this[P++]>>14,st=me*Re+Ve*de;Re=de*Re+((st&16383)<<14)+G[te]+ce,ce=(Re>>28)+(st>>14)+me*Ve,G[te++]=Re&268435455}return ce}var n=typeof navigator!="undefined";n&&p&&navigator.appName=="Microsoft Internet Explorer"?(l.prototype.am=d,r=30):n&&p&&navigator.appName!="Netscape"?(l.prototype.am=c,r=26):(l.prototype.am=o,r=28),l.prototype.DB=r,l.prototype.DM=(1<<r)-1,l.prototype.DV=1<<r;var h=52;l.prototype.FV=Math.pow(2,h),l.prototype.F1=h-r,l.prototype.F2=2*r-h;var a="0123456789abcdefghijklmnopqrstuvwxyz",u=new Array,f,v;for(f=48,v=0;v<=9;++v)u[f++]=v;for(f=97,v=10;v<36;++v)u[f++]=v;for(f=65,v=10;v<36;++v)u[f++]=v;function y(P){return a.charAt(P)}function g(P,U){var G=u[P.charCodeAt(U)];return G==null?-1:G}function b(P){for(var U=this.t-1;U>=0;--U)P[U]=this[U];P.t=this.t,P.s=this.s}function m(P){this.t=1,this.s=P<0?-1:0,P>0?this[0]=P:P<-1?this[0]=P+this.DV:this.t=0}function E(P){var U=s();return U.fromInt(P),U}function F(P,U){var G;if(U==16)G=4;else if(U==8)G=3;else if(U==256)G=8;else if(U==2)G=1;else if(U==32)G=5;else if(U==4)G=2;else{this.fromRadix(P,U);return}this.t=0,this.s=0;for(var te=P.length,ce=!1,fe=0;--te>=0;){var de=G==8?P[te]&255:g(P,te);if(de<0){P.charAt(te)=="-"&&(ce=!0);continue}ce=!1,fe==0?this[this.t++]=de:fe+G>this.DB?(this[this.t-1]|=(de&(1<<this.DB-fe)-1)<<fe,this[this.t++]=de>>this.DB-fe):this[this.t-1]|=de<<fe,fe+=G,fe>=this.DB&&(fe-=this.DB)}G==8&&P[0]&128&&(this.s=-1,fe>0&&(this[this.t-1]|=(1<<this.DB-fe)-1<<fe)),this.clamp(),ce&&l.ZERO.subTo(this,this)}function T(){for(var P=this.s&this.DM;this.t>0&&this[this.t-1]==P;)--this.t}function D(P){if(this.s<0)return"-"+this.negate().toString(P);var U;if(P==16)U=4;else if(P==8)U=3;else if(P==2)U=1;else if(P==32)U=5;else if(P==4)U=2;else return this.toRadix(P);var G=(1<<U)-1,te,ce=!1,fe="",de=this.t,me=this.DB-de*this.DB%U;if(de-- >0)for(me<this.DB&&(te=this[de]>>me)>0&&(ce=!0,fe=y(te));de>=0;)me<U?(te=(this[de]&(1<<me)-1)<<U-me,te|=this[--de]>>(me+=this.DB-U)):(te=this[de]>>(me-=U)&G,me<=0&&(me+=this.DB,--de)),te>0&&(ce=!0),ce&&(fe+=y(te));return ce?fe:"0"}function I(){var P=s();return l.ZERO.subTo(this,P),P}function Y(){return this.s<0?this.negate():this}function W(P){var U=this.s-P.s;if(U!=0)return U;var G=this.t;if(U=G-P.t,U!=0)return this.s<0?-U:U;for(;--G>=0;)if((U=this[G]-P[G])!=0)return U;return 0}function _(P){var U=1,G;return(G=P>>>16)!=0&&(P=G,U+=16),(G=P>>8)!=0&&(P=G,U+=8),(G=P>>4)!=0&&(P=G,U+=4),(G=P>>2)!=0&&(P=G,U+=2),(G=P>>1)!=0&&(P=G,U+=1),U}function A(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)}function C(P,U){var G;for(G=this.t-1;G>=0;--G)U[G+P]=this[G];for(G=P-1;G>=0;--G)U[G]=0;U.t=this.t+P,U.s=this.s}function B(P,U){for(var G=P;G<this.t;++G)U[G-P]=this[G];U.t=Math.max(this.t-P,0),U.s=this.s}function N(P,U){var G=P%this.DB,te=this.DB-G,ce=(1<<te)-1,fe=Math.floor(P/this.DB),de=this.s<<G&this.DM,me;for(me=this.t-1;me>=0;--me)U[me+fe+1]=this[me]>>te|de,de=(this[me]&ce)<<G;for(me=fe-1;me>=0;--me)U[me]=0;U[fe]=de,U.t=this.t+fe+1,U.s=this.s,U.clamp()}function q(P,U){U.s=this.s;var G=Math.floor(P/this.DB);if(G>=this.t){U.t=0;return}var te=P%this.DB,ce=this.DB-te,fe=(1<<te)-1;U[0]=this[G]>>te;for(var de=G+1;de<this.t;++de)U[de-G-1]|=(this[de]&fe)<<ce,U[de-G]=this[de]>>te;te>0&&(U[this.t-G-1]|=(this.s&fe)<<ce),U.t=this.t-G,U.clamp()}function X(P,U){for(var G=0,te=0,ce=Math.min(P.t,this.t);G<ce;)te+=this[G]-P[G],U[G++]=te&this.DM,te>>=this.DB;if(P.t<this.t){for(te-=P.s;G<this.t;)te+=this[G],U[G++]=te&this.DM,te>>=this.DB;te+=this.s}else{for(te+=this.s;G<P.t;)te-=P[G],U[G++]=te&this.DM,te>>=this.DB;te-=P.s}U.s=te<0?-1:0,te<-1?U[G++]=this.DV+te:te>0&&(U[G++]=te),U.t=G,U.clamp()}function $(P,U){var G=this.abs(),te=P.abs(),ce=G.t;for(U.t=ce+te.t;--ce>=0;)U[ce]=0;for(ce=0;ce<te.t;++ce)U[ce+G.t]=G.am(0,te[ce],U,ce,0,G.t);U.s=0,U.clamp(),this.s!=P.s&&l.ZERO.subTo(U,U)}function M(P){for(var U=this.abs(),G=P.t=2*U.t;--G>=0;)P[G]=0;for(G=0;G<U.t-1;++G){var te=U.am(G,U[G],P,2*G,0,1);(P[G+U.t]+=U.am(G+1,2*U[G],P,2*G+1,te,U.t-G-1))>=U.DV&&(P[G+U.t]-=U.DV,P[G+U.t+1]=1)}P.t>0&&(P[P.t-1]+=U.am(G,U[G],P,2*G,0,1)),P.s=0,P.clamp()}function j(P,U,G){var te=P.abs();if(!(te.t<=0)){var ce=this.abs();if(ce.t<te.t){U!=null&&U.fromInt(0),G!=null&&this.copyTo(G);return}G==null&&(G=s());var fe=s(),de=this.s,me=P.s,Re=this.DB-_(te[te.t-1]);Re>0?(te.lShiftTo(Re,fe),ce.lShiftTo(Re,G)):(te.copyTo(fe),ce.copyTo(G));var Ve=fe.t,st=fe[Ve-1];if(st!=0){var ot=st*(1<<this.F1)+(Ve>1?fe[Ve-2]>>this.F2:0),Ct=this.FV/ot,Cn=(1<<this.F1)/ot,ht=1<<this.F2,pt=G.t,Sn=pt-Ve,Dt=U==null?s():U;for(fe.dlShiftTo(Sn,Dt),G.compareTo(Dt)>=0&&(G[G.t++]=1,G.subTo(Dt,G)),l.ONE.dlShiftTo(Ve,Dt),Dt.subTo(fe,fe);fe.t<Ve;)fe[fe.t++]=0;for(;--Sn>=0;){var Co=G[--pt]==st?this.DM:Math.floor(G[pt]*Ct+(G[pt-1]+ht)*Cn);if((G[pt]+=fe.am(0,Co,G,Sn,0,Ve))<Co)for(fe.dlShiftTo(Sn,Dt),G.subTo(Dt,G);G[pt]<--Co;)G.subTo(Dt,G)}U!=null&&(G.drShiftTo(Ve,U),de!=me&&l.ZERO.subTo(U,U)),G.t=Ve,G.clamp(),Re>0&&G.rShiftTo(Re,G),de<0&&l.ZERO.subTo(G,G)}}}function L(P){var U=s();return this.abs().divRemTo(P,null,U),this.s<0&&U.compareTo(l.ZERO)>0&&P.subTo(U,U),U}function R(P){this.m=P}function H(P){return P.s<0||P.compareTo(this.m)>=0?P.mod(this.m):P}function V(P){return P}function J(P){P.divRemTo(this.m,null,P)}function ie(P,U,G){P.multiplyTo(U,G),this.reduce(G)}function ne(P,U){P.squareTo(U),this.reduce(U)}R.prototype.convert=H,R.prototype.revert=V,R.prototype.reduce=J,R.prototype.mulTo=ie,R.prototype.sqrTo=ne;function oe(){if(this.t<1)return 0;var P=this[0];if(!(P&1))return 0;var U=P&3;return U=U*(2-(P&15)*U)&15,U=U*(2-(P&255)*U)&255,U=U*(2-((P&65535)*U&65535))&65535,U=U*(2-P*U%this.DV)%this.DV,U>0?this.DV-U:-U}function x(P){this.m=P,this.mp=P.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<P.DB-15)-1,this.mt2=2*P.t}function w(P){var U=s();return P.abs().dlShiftTo(this.m.t,U),U.divRemTo(this.m,null,U),P.s<0&&U.compareTo(l.ZERO)>0&&this.m.subTo(U,U),U}function O(P){var U=s();return P.copyTo(U),this.reduce(U),U}function K(P){for(;P.t<=this.mt2;)P[P.t++]=0;for(var U=0;U<this.m.t;++U){var G=P[U]&32767,te=G*this.mpl+((G*this.mph+(P[U]>>15)*this.mpl&this.um)<<15)&P.DM;for(G=U+this.m.t,P[G]+=this.m.am(0,te,P,U,0,this.m.t);P[G]>=P.DV;)P[G]-=P.DV,P[++G]++}P.clamp(),P.drShiftTo(this.m.t,P),P.compareTo(this.m)>=0&&P.subTo(this.m,P)}function Z(P,U){P.squareTo(U),this.reduce(U)}function ee(P,U,G){P.multiplyTo(U,G),this.reduce(G)}x.prototype.convert=w,x.prototype.revert=O,x.prototype.reduce=K,x.prototype.mulTo=ee,x.prototype.sqrTo=Z;function ae(){return(this.t>0?this[0]&1:this.s)==0}function z(P,U){if(P>4294967295||P<1)return l.ONE;var G=s(),te=s(),ce=U.convert(this),fe=_(P)-1;for(ce.copyTo(G);--fe>=0;)if(U.sqrTo(G,te),(P&1<<fe)>0)U.mulTo(te,ce,G);else{var de=G;G=te,te=de}return U.revert(G)}function S(P,U){var G;return P<256||U.isEven()?G=new R(U):G=new x(U),this.exp(P,G)}l.prototype.copyTo=b,l.prototype.fromInt=m,l.prototype.fromString=F,l.prototype.clamp=T,l.prototype.dlShiftTo=C,l.prototype.drShiftTo=B,l.prototype.lShiftTo=N,l.prototype.rShiftTo=q,l.prototype.subTo=X,l.prototype.multiplyTo=$,l.prototype.squareTo=M,l.prototype.divRemTo=j,l.prototype.invDigit=oe,l.prototype.isEven=ae,l.prototype.exp=z,l.prototype.toString=D,l.prototype.negate=I,l.prototype.abs=Y,l.prototype.compareTo=W,l.prototype.bitLength=A,l.prototype.mod=L,l.prototype.modPowInt=S,l.ZERO=E(0),l.ONE=E(1);function k(){var P=s();return this.copyTo(P),P}function Q(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function re(){return this.t==0?this.s:this[0]<<24>>24}function le(){return this.t==0?this.s:this[0]<<16>>16}function ue(P){return Math.floor(Math.LN2*this.DB/Math.log(P))}function ye(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function xe(P){if(P==null&&(P=10),this.signum()==0||P<2||P>36)return"0";var U=this.chunkSize(P),G=Math.pow(P,U),te=E(G),ce=s(),fe=s(),de="";for(this.divRemTo(te,ce,fe);ce.signum()>0;)de=(G+fe.intValue()).toString(P).substr(1)+de,ce.divRemTo(te,ce,fe);return fe.intValue().toString(P)+de}function Be(P,U){this.fromInt(0),U==null&&(U=10);for(var G=this.chunkSize(U),te=Math.pow(U,G),ce=!1,fe=0,de=0,me=0;me<P.length;++me){var Re=g(P,me);if(Re<0){P.charAt(me)=="-"&&this.signum()==0&&(ce=!0);continue}de=U*de+Re,++fe>=G&&(this.dMultiply(te),this.dAddOffset(de,0),fe=0,de=0)}fe>0&&(this.dMultiply(Math.pow(U,fe)),this.dAddOffset(de,0)),ce&&l.ZERO.subTo(this,this)}function Ie(P,U,G){if(typeof U=="number")if(P<2)this.fromInt(1);else for(this.fromNumber(P,G),this.testBit(P-1)||this.bitwiseTo(l.ONE.shiftLeft(P-1),sr,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(U);)this.dAddOffset(2,0),this.bitLength()>P&&this.subTo(l.ONE.shiftLeft(P-1),this);else{var te=new Array,ce=P&7;te.length=(P>>3)+1,U.nextBytes(te),ce>0?te[0]&=(1<<ce)-1:te[0]=0,this.fromString(te,256)}}function Fe(){var P=this.t,U=new Array;U[0]=this.s;var G=this.DB-P*this.DB%8,te,ce=0;if(P-- >0)for(G<this.DB&&(te=this[P]>>G)!=(this.s&this.DM)>>G&&(U[ce++]=te|this.s<<this.DB-G);P>=0;)G<8?(te=(this[P]&(1<<G)-1)<<8-G,te|=this[--P]>>(G+=this.DB-8)):(te=this[P]>>(G-=8)&255,G<=0&&(G+=this.DB,--P)),te&128&&(te|=-256),ce==0&&(this.s&128)!=(te&128)&&++ce,(ce>0||te!=this.s)&&(U[ce++]=te);return U}function Tt(P){return this.compareTo(P)==0}function jt(P){return this.compareTo(P)<0?this:P}function Ht(P){return this.compareTo(P)>0?this:P}function Ft(P,U,G){var te,ce,fe=Math.min(P.t,this.t);for(te=0;te<fe;++te)G[te]=U(this[te],P[te]);if(P.t<this.t){for(ce=P.s&this.DM,te=fe;te<this.t;++te)G[te]=U(this[te],ce);G.t=this.t}else{for(ce=this.s&this.DM,te=fe;te<P.t;++te)G[te]=U(ce,P[te]);G.t=P.t}G.s=U(this.s,P.s),G.clamp()}function __$t__(P,U){return P&U}function fo(P){var U=s();return this.bitwiseTo(P,__$t__,U),U}function sr(P,U){return P|U}function mn(P){var U=s();return this.bitwiseTo(P,sr,U),U}function vn(P,U){return P^U}function ho(P){var U=s();return this.bitwiseTo(P,vn,U),U}function Fr(P,U){return P&~U}function po(P){var U=s();return this.bitwiseTo(P,Fr,U),U}function xn(){for(var P=s(),U=0;U<this.t;++U)P[U]=this.DM&~this[U];return P.t=this.t,P.s=~this.s,P}function yo(P){var U=s();return P<0?this.rShiftTo(-P,U):this.lShiftTo(P,U),U}function gn(P){var U=s();return P<0?this.lShiftTo(-P,U):this.rShiftTo(P,U),U}function mo(P){if(P==0)return-1;var U=0;return P&65535||(P>>=16,U+=16),P&255||(P>>=8,U+=8),P&15||(P>>=4,U+=4),P&3||(P>>=2,U+=2),P&1||++U,U}function vo(){for(var P=0;P<this.t;++P)if(this[P]!=0)return P*this.DB+mo(this[P]);return this.s<0?this.t*this.DB:-1}function xo(P){for(var U=0;P!=0;)P&=P-1,++U;return U}function bn(){for(var P=0,U=this.s&this.DM,G=0;G<this.t;++G)P+=xo(this[G]^U);return P}function go(P){var U=Math.floor(P/this.DB);return U>=this.t?this.s!=0:(this[U]&1<<P%this.DB)!=0}function bo(P,U){var G=l.ONE.shiftLeft(P);return this.bitwiseTo(G,U,G),G}function wn(P){return this.changeBit(P,sr)}function wo(P){return this.changeBit(P,Fr)}function En(P){return this.changeBit(P,vn)}function Ze(P,U){for(var G=0,te=0,ce=Math.min(P.t,this.t);G<ce;)te+=this[G]+P[G],U[G++]=te&this.DM,te>>=this.DB;if(P.t<this.t){for(te+=P.s;G<this.t;)te+=this[G],U[G++]=te&this.DM,te>>=this.DB;te+=this.s}else{for(te+=this.s;G<P.t;)te+=P[G],U[G++]=te&this.DM,te>>=this.DB;te+=P.s}U.s=te<0?-1:0,te>0?U[G++]=te:te<-1&&(U[G++]=this.DV+te),U.t=G,U.clamp()}function wt(P){var U=s();return this.addTo(P,U),U}function _n(P){var U=s();return this.subTo(P,U),U}function Eo(P){var U=s();return this.multiplyTo(P,U),U}function Id(){var P=s();return this.squareTo(P),P}function Rd(P){var U=s();return this.divRemTo(P,U,null),U}function Od(P){var U=s();return this.divRemTo(P,null,U),U}function Pd(P){var U=s(),G=s();return this.divRemTo(P,U,G),new Array(U,G)}function Md(P){this[this.t]=this.am(0,P-1,this,0,0,this.t),++this.t,this.clamp()}function Nd(P,U){if(P!=0){for(;this.t<=U;)this[this.t++]=0;for(this[U]+=P;this[U]>=this.DV;)this[U]-=this.DV,++U>=this.t&&(this[this.t++]=0),++this[U]}}function Dr(){}function dl(P){return P}function Ld(P,U,G){P.multiplyTo(U,G)}function Ud(P,U){P.squareTo(U)}Dr.prototype.convert=dl,Dr.prototype.revert=dl,Dr.prototype.mulTo=Ld,Dr.prototype.sqrTo=Ud;function qd(P){return this.exp(P,new Dr)}function zd(P,U,G){var te=Math.min(this.t+P.t,U);for(G.s=0,G.t=te;te>0;)G[--te]=0;var ce;for(ce=G.t-this.t;te<ce;++te)G[te+this.t]=this.am(0,P[te],G,te,0,this.t);for(ce=Math.min(P.t,U);te<ce;++te)this.am(0,P[te],G,te,0,U-te);G.clamp()}function jd(P,U,G){--U;var te=G.t=this.t+P.t-U;for(G.s=0;--te>=0;)G[te]=0;for(te=Math.max(U-this.t,0);te<P.t;++te)G[this.t+te-U]=this.am(U-te,P[te],G,0,0,this.t+te-U);G.clamp(),G.drShiftTo(1,G)}function Wt(P){this.r2=s(),this.q3=s(),l.ONE.dlShiftTo(2*P.t,this.r2),this.mu=this.r2.divide(P),this.m=P}function Hd(P){if(P.s<0||P.t>2*this.m.t)return P.mod(this.m);if(P.compareTo(this.m)<0)return P;var U=s();return P.copyTo(U),this.reduce(U),U}function $d(P){return P}function Wd(P){for(P.drShiftTo(this.m.t-1,this.r2),P.t>this.m.t+1&&(P.t=this.m.t+1,P.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);P.compareTo(this.r2)<0;)P.dAddOffset(1,this.m.t+1);for(P.subTo(this.r2,P);P.compareTo(this.m)>=0;)P.subTo(this.m,P)}function Vd(P,U){P.squareTo(U),this.reduce(U)}function Kd(P,U,G){P.multiplyTo(U,G),this.reduce(G)}Wt.prototype.convert=Hd,Wt.prototype.revert=$d,Wt.prototype.reduce=Wd,Wt.prototype.mulTo=Kd,Wt.prototype.sqrTo=Vd;function Gd(P,U){var G=P.bitLength(),te,ce=E(1),fe;if(G<=0)return ce;G<18?te=1:G<48?te=3:G<144?te=4:G<768?te=5:te=6,G<8?fe=new R(U):U.isEven()?fe=new Wt(U):fe=new x(U);var de=new Array,me=3,Re=te-1,Ve=(1<<te)-1;if(de[1]=fe.convert(this),te>1){var st=s();for(fe.sqrTo(de[1],st);me<=Ve;)de[me]=s(),fe.mulTo(st,de[me-2],de[me]),me+=2}var ot=P.t-1,Ct,Cn=!0,ht=s(),pt;for(G=_(P[ot])-1;ot>=0;){for(G>=Re?Ct=P[ot]>>G-Re&Ve:(Ct=(P[ot]&(1<<G+1)-1)<<Re-G,ot>0&&(Ct|=P[ot-1]>>this.DB+G-Re)),me=te;!(Ct&1);)Ct>>=1,--me;if((G-=me)<0&&(G+=this.DB,--ot),Cn)de[Ct].copyTo(ce),Cn=!1;else{for(;me>1;)fe.sqrTo(ce,ht),fe.sqrTo(ht,ce),me-=2;me>0?fe.sqrTo(ce,ht):(pt=ce,ce=ht,ht=pt),fe.mulTo(ht,de[Ct],ce)}for(;ot>=0&&!(P[ot]&1<<G);)fe.sqrTo(ce,ht),pt=ce,ce=ht,ht=pt,--G<0&&(G=this.DB-1,--ot)}return fe.revert(ce)}function Qd(P){var U=this.s<0?this.negate():this.clone(),G=P.s<0?P.negate():P.clone();if(U.compareTo(G)<0){var te=U;U=G,G=te}var ce=U.getLowestSetBit(),fe=G.getLowestSetBit();if(fe<0)return U;for(ce<fe&&(fe=ce),fe>0&&(U.rShiftTo(fe,U),G.rShiftTo(fe,G));U.signum()>0;)(ce=U.getLowestSetBit())>0&&U.rShiftTo(ce,U),(ce=G.getLowestSetBit())>0&&G.rShiftTo(ce,G),U.compareTo(G)>=0?(U.subTo(G,U),U.rShiftTo(1,U)):(G.subTo(U,G),G.rShiftTo(1,G));return fe>0&&G.lShiftTo(fe,G),G}function Yd(P){if(P<=0)return 0;var U=this.DV%P,G=this.s<0?P-1:0;if(this.t>0)if(U==0)G=this[0]%P;else for(var te=this.t-1;te>=0;--te)G=(U*G+this[te])%P;return G}function Xd(P){var U=P.isEven();if(this.isEven()&&U||P.signum()==0)return l.ZERO;for(var G=P.clone(),te=this.clone(),ce=E(1),fe=E(0),de=E(0),me=E(1);G.signum()!=0;){for(;G.isEven();)G.rShiftTo(1,G),U?((!ce.isEven()||!fe.isEven())&&(ce.addTo(this,ce),fe.subTo(P,fe)),ce.rShiftTo(1,ce)):fe.isEven()||fe.subTo(P,fe),fe.rShiftTo(1,fe);for(;te.isEven();)te.rShiftTo(1,te),U?((!de.isEven()||!me.isEven())&&(de.addTo(this,de),me.subTo(P,me)),de.rShiftTo(1,de)):me.isEven()||me.subTo(P,me),me.rShiftTo(1,me);G.compareTo(te)>=0?(G.subTo(te,G),U&&ce.subTo(de,ce),fe.subTo(me,fe)):(te.subTo(G,te),U&&de.subTo(ce,de),me.subTo(fe,me))}if(te.compareTo(l.ONE)!=0)return l.ZERO;if(me.compareTo(P)>=0)return me.subtract(P);if(me.signum()<0)me.addTo(P,me);else return me;return me.signum()<0?me.add(P):me}var Je=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Zd=(1<<26)/Je[Je.length-1];function Jd(P){var U,G=this.abs();if(G.t==1&&G[0]<=Je[Je.length-1]){for(U=0;U<Je.length;++U)if(G[0]==Je[U])return!0;return!1}if(G.isEven())return!1;for(U=1;U<Je.length;){for(var te=Je[U],ce=U+1;ce<Je.length&&te<Zd;)te*=Je[ce++];for(te=G.modInt(te);U<ce;)if(te%Je[U++]==0)return!1}return G.millerRabin(P)}function e1(P){var U=this.subtract(l.ONE),G=U.getLowestSetBit();if(G<=0)return!1;var te=U.shiftRight(G);P=P+1>>1,P>Je.length&&(P=Je.length);for(var ce=s(),fe=0;fe<P;++fe){ce.fromInt(Je[Math.floor(Math.random()*Je.length)]);var de=ce.modPow(te,this);if(de.compareTo(l.ONE)!=0&&de.compareTo(U)!=0){for(var me=1;me++<G&&de.compareTo(U)!=0;)if(de=de.modPowInt(2,this),de.compareTo(l.ONE)==0)return!1;if(de.compareTo(U)!=0)return!1}}return!0}l.prototype.chunkSize=ue,l.prototype.toRadix=xe,l.prototype.fromRadix=Be,l.prototype.fromNumber=Ie,l.prototype.bitwiseTo=Ft,l.prototype.changeBit=bo,l.prototype.addTo=Ze,l.prototype.dMultiply=Md,l.prototype.dAddOffset=Nd,l.prototype.multiplyLowerTo=zd,l.prototype.multiplyUpperTo=jd,l.prototype.modInt=Yd,l.prototype.millerRabin=e1,l.prototype.clone=k,l.prototype.intValue=Q,l.prototype.byteValue=re,l.prototype.shortValue=le,l.prototype.signum=ye,l.prototype.toByteArray=Fe,l.prototype.equals=Tt,l.prototype.min=jt,l.prototype.max=Ht,l.prototype.and=fo,l.prototype.or=mn,l.prototype.xor=ho,l.prototype.andNot=po,l.prototype.not=xn,l.prototype.shiftLeft=yo,l.prototype.shiftRight=gn,l.prototype.getLowestSetBit=vo,l.prototype.bitCount=bn,l.prototype.testBit=go,l.prototype.setBit=wn,l.prototype.clearBit=wo,l.prototype.flipBit=En,l.prototype.add=wt,l.prototype.subtract=_n,l.prototype.multiply=Eo,l.prototype.divide=Rd,l.prototype.remainder=Od,l.prototype.divideAndRemainder=Pd,l.prototype.modPow=Gd,l.prototype.modInverse=Xd,l.prototype.pow=qd,l.prototype.gcd=Qd,l.prototype.isProbablePrime=Jd,l.prototype.square=Id,l.prototype.Barrett=Wt;var An,it,We;function t1(P){it[We++]^=P&255,it[We++]^=P>>8&255,it[We++]^=P>>16&255,it[We++]^=P>>24&255,We>=Ao&&(We-=Ao)}function yl(){t1(new Date().getTime())}if(it==null){it=new Array,We=0;var ft;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var ml=new Uint8Array(32);for(window.crypto.getRandomValues(ml),ft=0;ft<32;++ft)it[We++]=ml[ft]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var vl=window.crypto.random(32);for(ft=0;ft<vl.length;++ft)it[We++]=vl.charCodeAt(ft)&255}}for(;We<Ao;)ft=Math.floor(65536*Math.random()),it[We++]=ft>>>8,it[We++]=ft&255;We=0,yl()}function r1(){if(An==null){for(yl(),An=a1(),An.init(it),We=0;We<it.length;++We)it[We]=0;We=0}return An.next()}function n1(P){var U;for(U=0;U<P.length;++U)P[U]=r1()}function xl(){}xl.prototype.nextBytes=n1;function _o(){this.i=0,this.j=0,this.S=new Array}function i1(P){var U,G,te;for(U=0;U<256;++U)this.S[U]=U;for(G=0,U=0;U<256;++U)G=G+this.S[U]+P[U%P.length]&255,te=this.S[U],this.S[U]=this.S[G],this.S[G]=te;this.i=0,this.j=0}function o1(){var P;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,P=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=P,this.S[P+this.S[this.i]&255]}_o.prototype.init=i1,_o.prototype.next=o1;function a1(){return new _o}var Ao=256;e.exports={default:l,BigInteger:l,SecureRandom:xl}}).call(be)})(s0);var Te=s0.exports,Yp=Te.BigInteger.prototype.Barrett;function Xe(e,t){this.x=t,this.q=e}function rt(e,t,r,i){this.curve=e,this.x=t,this.y=r,this.z=i==null?Te.BigInteger.ONE:i,this.zinv=null}function gt(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new rt(this,null,null),this.reducer=new Yp(this.q)}Xe.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},Xe.prototype.toBigInteger=function(){return this.x},Xe.prototype.negate=function(){return new Xe(this.q,this.x.negate().mod(this.q))},Xe.prototype.add=function(e){return new Xe(this.q,this.x.add(e.toBigInteger()).mod(this.q))},Xe.prototype.subtract=function(e){return new Xe(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},Xe.prototype.multiply=function(e){return new Xe(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},Xe.prototype.square=function(){return new Xe(this.q,this.x.square().mod(this.q))},Xe.prototype.divide=function(e){return new Xe(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},rt.prototype.getX=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)},rt.prototype.getY=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)},rt.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(Te.BigInteger.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(Te.BigInteger.ZERO))},rt.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(Te.BigInteger.ZERO)&&!this.y.toBigInteger().equals(Te.BigInteger.ZERO)},rt.prototype.negate=function(){return new rt(this.curve,this.x,this.y.negate(),this.z)},rt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(Te.BigInteger.ZERO.equals(r))return Te.BigInteger.ZERO.equals(t)?this.twice():this.curve.getInfinity();var i=new Te.BigInteger("3"),p=this.x.toBigInteger(),l=this.y.toBigInteger(),s=(e.x.toBigInteger(),e.y.toBigInteger(),r.square()),c=s.multiply(r),d=p.multiply(s),o=t.square().multiply(this.z),n=o.subtract(d.shiftLeft(1)).multiply(e.z).subtract(c).multiply(r).mod(this.curve.q),h=d.multiply(i).multiply(t).subtract(l.multiply(c)).subtract(o.multiply(t)).multiply(e.z).add(t.multiply(c)).mod(this.curve.q),a=c.multiply(this.z).multiply(e.z).mod(this.curve.q);return new rt(this.curve,this.curve.fromBigInteger(n),this.curve.fromBigInteger(h),a)},rt.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var e=new Te.BigInteger("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),i=r.multiply(this.z),p=i.multiply(r).mod(this.curve.q),l=this.curve.a.toBigInteger(),s=t.square().multiply(e);Te.BigInteger.ZERO.equals(l)||(s=s.add(this.z.square().multiply(l)));var c=(s=s.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(p)).shiftLeft(1).multiply(i).mod(this.curve.q),d=s.multiply(e).multiply(t).subtract(p.shiftLeft(1)).shiftLeft(2).multiply(p).subtract(s.square().multiply(s)).mod(this.curve.q),o=i.square().multiply(i).shiftLeft(3).mod(this.curve.q);return new rt(this.curve,this.curve.fromBigInteger(c),this.curve.fromBigInteger(d),o)},rt.prototype.multiply=function(e){if(this.isInfinity())return this;if(e.signum()==0)return this.curve.getInfinity();var t,r=e,i=r.multiply(new Te.BigInteger("3")),p=this.negate(),l=this;for(t=i.bitLength()-2;t>0;--t){l=l.twice();var s=i.testBit(t);s!=r.testBit(t)&&(l=l.add(s?this:p))}return l},rt.prototype.multiplyTwo=function(e,t,r){var i;i=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var p=this.curve.getInfinity(),l=this.add(t);i>=0;)p=p.twice(),e.testBit(i)?p=r.testBit(i)?p.add(l):p.add(this):r.testBit(i)&&(p=p.add(t)),--i;return p},gt.prototype.getQ=function(){return this.q},gt.prototype.getA=function(){return this.a},gt.prototype.getB=function(){return this.b},gt.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},gt.prototype.getInfinity=function(){return this.infinity},gt.prototype.fromBigInteger=function(e){return new Xe(this.q,e)},gt.prototype.reduce=function(e){this.reducer.reduce(e)},gt.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(e.length-2)/2,r=e.substr(2,t),i=e.substr(t+2,t);return new rt(this,this.fromBigInteger(new Te.BigInteger(r,16)),this.fromBigInteger(new Te.BigInteger(i,16)));default:return null}},gt.prototype.encodePointHex=function(e){if(e.isInfinity())return"00";var t=e.getX().toBigInteger().toString(16),r=e.getY().toBigInteger().toString(16),i=this.getQ().toString(16).length;for(i%2!=0&&i++;t.length<i;)t="0"+t;for(;r.length<i;)r="0"+r;return"04"+t+r};var $e=function(e,t){return e<<(t%=32)|e>>>32-t},bt=function(e,t){var r=t-e.length;return(r>0?"0".repeat(r):"")+e},Xp=function(e){return e<16?2043430169:2055708042},Zp=function(e,t,r,i){return i<16?e^t^r:e&t|e&r|t&r},Jp=function(e,t,r,i){return i<16?e^t^r:e&t|~e&r},ed=function(e,t,r){for(var i,p,l,s,c,d=function(b){var m,E=new Array(132);b.forEach(function(D,I){E[I]=D});for(var F=16;F<68;F++)E[F]=(m=E[F-16]^E[F-9]^$e(E[F-3],15))^$e(m,15)^$e(m,23)^$e(E[F-13],7)^E[F-6];for(var T=0;T<64;T++)E[T+68]=E[T]^E[T+4];return E}(t),o=e[0],n=e[1],h=e[2],a=e[3],u=e[4],f=e[5],v=e[6],y=e[7],g=0;g<64;g++)p=(i=$e($e(o,12)+u+$e(Xp(g),g),7))^$e(o,12),l=Zp(o,n,h,g)+a+p+d[g+68],s=Jp(u,f,v,g)+y+i+d[g],a=h,h=$e(n,9),n=o,o=l,y=v,v=$e(f,19),f=u,u=(c=s)^$e(c,9)^$e(c,17);return[o^e[0],n^e[1],h^e[2],a^e[3],u^e[4],f^e[5],v^e[6],y^e[7]]},lo=function(e,t,r){if(typeof e=="string"?e=_e.Buffer.from(e,t||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var i,p,l,s,c,d;i=e,p=_e.Buffer.alloc(1,128),s=_e.Buffer.alloc(l=(l=i.length%64)>=56?64-l%56-1:56-l-1,0),c=_e.Buffer.alloc(8),d=8*i.length,c.writeUInt32BE(Math.floor(d/Math.pow(2,32)),0),c.writeUInt32BE(d%Math.pow(2,32),4);for(var o=(e=_e.Buffer.concat([i,p,s,c],i.length+1+l+8)).length/64,n=new Array(o),h=0;h<o;h++){n[h]=new Array(16);for(var a=0;a<16;a++)n[h][a]=e.readUInt32BE(64*h+4*a)}var u=new Array(o);u[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var f=0;f<o;f++)u[f+1]=ed(u[f],n[f]);var v=_e.Buffer.alloc(32);return u[o].forEach(function(y,g){return v.writeInt32BE(y,4*g)}),r?v.toString(r):Br(v)},l0=new Te.SecureRandom,uo=function(){var e=new gt(new Te.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new Te.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new Te.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),t=e.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:e,G:t,n:new Te.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),u0=uo.curve,c0=uo.G,un=uo.n;function f0(e,t){for(var r=[],i=Math.ceil(t/32),p=t%32,l=1;l<=i;l++){var s=_e.Buffer.allocUnsafe(4);s.writeUInt32BE(l);var c=lo(_e.Buffer.concat([e,s]));r.push(l===i&&p?_e.Buffer.from(c).slice(0,p):_e.Buffer.from(c))}return _e.Buffer.concat(r,t)}var td={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var e=new Te.BigInteger(un.bitLength(),l0).mod(un.subtract(new Te.BigInteger("2"))).add(Te.BigInteger.ONE),t=bt(e.toString(16),64),r=c0.multiply(e);return{privateKey:t,publicKey:"04"+bt(r.getX().toBigInteger().toString(16),64)+bt(r.getY().toBigInteger().toString(16),64)}},encrypt:function(e,t,r){var i=r||{},p=i.mode,l=p===void 0?1:p,s=i.outputEncoding,c=i.pc;if(typeof e=="string"?e=_e.Buffer.from(e,i.inputEncoding||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var d=new Te.BigInteger(un.bitLength(),l0).mod(un.subtract(Te.BigInteger.ONE)).add(Te.BigInteger.ONE),o=c0.multiply(d),n=bt(o.getX().toBigInteger().toString(16),64)+bt(o.getY().toBigInteger().toString(16),64),h=u0.decodePointHex(t).multiply(d),a=bt(h.getX().toBigInteger().toString(16),64),u=bt(h.getY().toBigInteger().toString(16),64),f=f0(_e.Buffer.from(a+u,"hex"),e.length),v=bt(new Te.BigInteger(e.toString("hex"),16).xor(new Te.BigInteger(f.toString("hex"),16)).toString(16),2*e.length),y=lo(a+e.toString("hex")+u,"hex","hex"),g=_e.Buffer.from((c?"04":"")+(l===0?n+v+y:n+y+v),"hex");return s?g.toString(s):Br(g)},decrypt:function(e,t,r){var i=r||{},p=i.mode,l=p===void 0?1:p,s=i.outputEncoding,c=i.pc;if(typeof e=="string"?e=_e.Buffer.from(e,i.inputEncoding):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');var d=(e=c?e.slice(1):e).slice(0,32).toString("hex"),o=e.slice(32,64).toString("hex"),n=u0.decodePointHex("04"+d+o).multiply(new Te.BigInteger(t,16)),h=bt(n.getX().toBigInteger().toString(16),64),a=bt(n.getY().toBigInteger().toString(16),64),u=e.slice(64,96),f=e.slice(96);l===0&&(u=e.slice(e.length-32),f=e.slice(64,e.length-32));var v=f0(_e.Buffer.from(h+a,"hex"),f.length),y=new Te.BigInteger(f.toString("hex"),16).xor(new Te.BigInteger(v.toString("hex"),16)).toString(16),g=lo(h+y+a,"hex","hex")===u.toString("hex")?_e.Buffer.from(y,"hex"):_e.Buffer.alloc(0);return s?g.toString(s):Br(g)}},cn=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],fn=[2746333894,1453994832,1736282519,2993693404],rd=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],hn=/^[0-9a-f]{32}$/i,h0=function(e){return cn[(4026531840&e)>>>28][(251658240&e)>>>24]<<24|cn[(15728640&e)>>>20][(983040&e)>>>16]<<16|cn[(61440&e)>>>12][(3840&e)>>>8]<<8|cn[(240&e)>>>4][(15&e)>>>0]<<0},p0=function(e){return(t=h0(e))^$e(t,2)^$e(t,10)^$e(t,18)^$e(t,24);var t},d0=function(e){var t,r=new Array(36);r[0]=e[0]^fn[0],r[1]=e[1]^fn[1],r[2]=e[2]^fn[2],r[3]=e[3]^fn[3];for(var i=new Array(32),p=0;p<32;p++)r[p+4]=r[p]^(t=h0(r[p+1]^r[p+2]^r[p+3]^rd[p]))^$e(t,13)^$e(t,23),i[p]=r[p+4];return i},y0=function(e,t){for(var r=d0(t),i=0;i<32;i++)e[i+4]=e[i]^p0(e[i+1]^e[i+2]^e[i+3]^r[i]);return[e[35],e[34],e[33],e[32]]},m0=function(e,t){for(var r=d0(t).reverse(),i=0;i<32;i++)e[i+4]=e[i]^p0(e[i+1]^e[i+2]^e[i+3]^r[i]);return[e[35],e[34],e[33],e[32]]},pn=function(e){return[e.readInt32BE(0),e.readInt32BE(4),e.readInt32BE(8),e.readInt32BE(12)]},dn=function(e){for(var t=_e.Buffer.alloc(16),r=0;r<4;r++)t.writeInt32BE(e[r],4*r);return t},ir={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(e,t,r){var i=r||{},p=i.mode,l=i.iv,s=i.outputEncoding;if(typeof e=="string"?e=_e.Buffer.from(e,i.inputEncoding||"utf8"):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');if(!hn.test(t))throw new TypeError("Invalid value of cipher `key`");if(t=_e.Buffer.from(t,"hex"),p===2&&!hn.test(l))throw new TypeError("Invalid value of `iv` option");return function(c,d,o,n){o&&(o=pn(o)),d=pn(d);for(var h=[],a=(c=function(F){var T=16-F.length%16,D=_e.Buffer.alloc(T,T);return _e.Buffer.concat([F,D],F.length+T)}(c)).length/16,u=0;u<a;u++)if(o){var f=16*u,v=[o[0]^c.readInt32BE(f),o[1]^c.readInt32BE(f+4),o[2]^c.readInt32BE(f+8),o[3]^c.readInt32BE(f+12)],y=y0(v,d);h.push(dn(y)),o=y.slice(0)}else{var g=16*u,b=[c.readInt32BE(g),c.readInt32BE(g+4),c.readInt32BE(g+8),c.readInt32BE(g+12)],m=y0(b,d);h.push(dn(m))}var E=_e.Buffer.concat(h,c.length);return n?E.toString(n):Br(E)}(e,t,l=p===2?_e.Buffer.from(l,"hex"):null,s)},decrypt:function(e,t,r){var i=r||{},p=i.mode,l=i.iv,s=i.outputEncoding;if(typeof e=="string"?e=_e.Buffer.from(e,i.inputEncoding):e instanceof ArrayBuffer&&(e=_e.Buffer.from(e)),!_e.Buffer.isBuffer(e))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(e)+'"');if(!hn.test(t))throw new TypeError("Invalid value of cipher `key`");if(t=_e.Buffer.from(t,"hex"),p===2&&!hn.test(l))throw new TypeError("Invalid value of `iv` option");return function(c,d,o,n){o&&(o=pn(o)),d=pn(d);var h=[],a=c.length/16;if(o)for(var u=a-1;u>=0;u--){var f,v=16*u;f=u>0?[c.readInt32BE(v-16),c.readInt32BE(v-16+4),c.readInt32BE(v-16+8),c.readInt32BE(v-16+12)]:o;var y=[c.readInt32BE(v),c.readInt32BE(v+4),c.readInt32BE(v+8),c.readInt32BE(v+12)],g=m0(y,d);h.unshift(dn([g[0]^f[0],g[1]^f[1],g[2]^f[2],g[3]^f[3]]))}else for(var b=0;b<a;b++){var m=16*b,E=[c.readInt32BE(m),c.readInt32BE(m+4),c.readInt32BE(m+8),c.readInt32BE(m+12)],F=m0(E,d);h.push(dn(F))}var T=_e.Buffer.concat(h,c.length-h[h.length-1][15]);return n?T.toString(n):Br(T)}(e,t,l=p===2?_e.Buffer.from(l,"hex"):null,s)}};(function(){if(typeof Object.id=="undefined"){var e=0;Object.id=function(t){return typeof t.__uniqueid=="undefined"&&Object.defineProperty(t,"__uniqueid",{value:++e,enumerable:!1,writable:!1}),t.__uniqueid}}})();function nd(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];this.encode=function(r){var i,p,l,s,c,d;for(l=r.length,p=0,i="";p<l;){if(s=r.charCodeAt(p++)&255,p==l){i+=e.charAt(s>>2),i+=e.charAt((s&3)<<4),i+="==";break}if(c=r.charCodeAt(p++),p==l){i+=e.charAt(s>>2),i+=e.charAt((s&3)<<4|(c&240)>>4),i+=e.charAt((c&15)<<2),i+="=";break}d=r.charCodeAt(p++),i+=e.charAt(s>>2),i+=e.charAt((s&3)<<4|(c&240)>>4),i+=e.charAt((c&15)<<2|(d&192)>>6),i+=e.charAt(d&63)}return i},this.decode=function(r){var i,p,l,s,c,d,o;for(d=r.length,c=0,o="";c<d;){do i=t[r.charCodeAt(c++)&255];while(c<d&&i==-1);if(i==-1)break;do p=t[r.charCodeAt(c++)&255];while(c<d&&p==-1);if(p==-1)break;o+=String.fromCharCode(i<<2|(p&48)>>4);do{if(l=r.charCodeAt(c++)&255,l==61)return o;l=t[l]}while(c<d&&l==-1);if(l==-1)break;o+=String.fromCharCode((p&15)<<4|(l&60)>>2);do{if(s=r.charCodeAt(c++)&255,s==61)return o;s=t[s]}while(c<d&&s==-1);if(s==-1)break;o+=String.fromCharCode((l&3)<<6|s)}return o},this.utf16to8=function(r){var i,p,l,s;for(i="",l=r.length,p=0;p<l;p++)s=r.charCodeAt(p),s>=1&&s<=127?i+=r.charAt(p):s>2047?(i+=String.fromCharCode(224|s>>12&15),i+=String.fromCharCode(128|s>>6&63),i+=String.fromCharCode(128|s>>0&63)):(i+=String.fromCharCode(192|s>>6&31),i+=String.fromCharCode(128|s>>0&63));return i},this.utf8to16=function(r){var i,p,l,s,c,d;for(i="",l=r.length,p=0;p<l;)switch(s=r.charCodeAt(p++),s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:i+=r.charAt(p-1);break;case 12:case 13:c=r.charCodeAt(p++),i+=String.fromCharCode((s&31)<<6|c&63);break;case 14:c=r.charCodeAt(p++),d=r.charCodeAt(p++),i+=String.fromCharCode((s&15)<<12|(c&63)<<6|(d&63)<<0);break}return i},this.charToHex=function(r){var i,p,l;for(i="",p=0;p<r.length;)l=r.charCodeAt(p++).toString(16),i+="\\0x"+l,i+=p>0&&p%8==0?`\r
33
+ `:", ";return i}}function id(){var e=0,t=new Object;this.add=function(r,i){this.containsKey(r)||e++,t[r]=i},this.getValue=function(r){return this.containsKey(r)?t[r]:null},this.remove=function(r){this.containsKey(r)&&delete t[r]&&e--},this.containsKey=function(r){return r in t},this.containsValue=function(r){for(var i in t)if(t[i]==r)return!0;return!1},this.getValues=function(){var r=[];for(var i in t)r.push(t[i]);return r},this.getKeys=function(){var r=[];for(var i in t)r.push(i);return r},this.getSize=function(){return e},this.clear=function(){e=0,t=new Object}}function od(e){if(this.connect=!1,this.ready_func_=null,this.callbacks_=new id,this.module_="JS_IActiveXCtrl","WebSocket"in window)this.ws=new WebSocket("ws://127.0.0.1:7321");else throw"WebSocket not supported";this.ws.onerror=function(){throw"Unable to establish connection to WebSocket"},this.loadModule=function(){this.connect=!0;var t=JSON.stringify({MsgId:"LoadModule",Module:this.module_});this.ws.onmessage=this._callback.bind(this),this.ws.send(t)},this.loadModuleCallBack=function(t){if(!t)throw t.Response;this.ready_func_&&this.ready_func_()}.bind(this),this.callbacks_.add("LoadModule",this.loadModuleCallBack),this.exec=function(t,r,i){var p=Object.id(i).toString();this.callbacks_.add(p,i);var l={MsgId:p,Method:t+"|"+e};r&&(l.Param=JSON.stringify(r));var s=JSON.stringify(l);this.connect&&this.ws.send(s)},this.ready=function(t){this.ready_func_=t},this._callback=function(t){var r=JSON.parse(t.data),i=r.MsgId;if(this.callbacks_.containsKey(i)){var p=this.callbacks_.getValue(i);p(r.Result,r.Response),this.callbacks_.remove(i)}},this.ws.onopen=this.loadModule.bind(this),this.Arm_GetDongleInfo=function({Index:t,DongleInfoNum:r},i){this.exec("Arm_GetDongleInfo",[parseInt(t),parseInt(r)],i)},this.Arm_Enum=function(t){this.exec("Arm_Enum",null,t)},this.Arm_Open=function({Index:t},r){this.exec("Arm_Open",[parseInt(t)],r)},this.Arm_Close=function({Handle:t},r){this.exec("Arm_Close",[parseInt(t)],r)},this.Arm_VerifyPIN=function({Handle:t,UserPin:r,UserType:i},p){this.exec("Arm_VerifyPIN",[parseInt(t),i,r],p)},this.Arm_ResetState=function({Handle:t},r){this.exec("Arm_ResetState",[parseInt(t)],r)},this.Arm_GenRandom=function({Handle:t,RandomLen:r},i){this.exec("Arm_GenRandom",[parseInt(t),parseInt(r)],i)},this.Arm_LEDControl=function({Handle:t,LedFlag:r},i){this.exec("Arm_LEDControl",[parseInt(t),r],i)},this.Arm_SwitchProtocol=function({Handle:t,ProtocolFlag:r},i){this.exec("Arm_SwitchProtocol",[parseInt(t),r],i)},this.Arm_CreateFile=function({Handle:t,FileID:r,FileType:i,AttrBuffer:p},l){this.exec("Arm_CreateFile",[parseInt(t),i,parseInt(r),p],l)},this.Arm_WriteFile=function({Handle:t,FileID:r,FileType:i,FileOffset:p,DataInput:l},s){this.exec("Arm_WriteFile",[parseInt(t),i,parseInt(r),parseInt(p),l],s)},this.Arm_ReadFile0001=function({Handle:t},r){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0001"),parseInt(0),parseInt("64")],r)},this.Arm_ReadFile0002=function({Handle:t},r){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0002"),parseInt(0),parseInt("130")],r)},this.Arm_ReadFile0003=function({Handle:t},r){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0003"),parseInt(0),parseInt("130")],r)},this.Arm_ReadFile0004=function({Handle:t},r){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0004"),parseInt(0),parseInt("2048")],r)},this.Arm_ReadFile0005=function({Handle:t},r){this.exec("Arm_ReadFile",[parseInt(t),parseInt("0005"),parseInt(0),parseInt("2048")],r)},this.Arm_DownloadExeFile=function({Handle:t,Count:r,ExeFileInfo:i},p){this.exec("Arm_DownloadExeFile",[parseInt(t),parseInt(r),i],p)},this.Arm_RunExeFile=function({Handle:t,FileID:r,InData:i,DataLen:p},l){this.exec("Arm_RunExeFile",[parseInt(t),parseInt(r),i,i.length,parseInt(p)],l)},this.Arm_ReadRunExeFileData=function(t){this.exec("Arm_ReadRunExeFileData",null,t)},this.Arm_DeleteFile=function({Handle:t,FileID:r,FileType:i},p){this.exec("Arm_DeleteFile",[parseInt(t),i,parseInt(r)],p)},this.Arm_WriteData=function({Handle:t,Offset:r,DataInput:i},p){this.exec("Arm_WriteData",[parseInt(t),parseInt(r),i],p)},this.Arm_ReadData=function({Handle:t,Offset:r,ReadLength:i},p){this.exec("Arm_ReadData",[parseInt(t),parseInt(r),i],p)},this.Arm_WriteShareMemory=function({Handle:t,DataInput:r},i){this.exec("Arm_WriteShareMemory",[parseInt(t),r],i)},this.Arm_ReadShareMemory=function({Handle:t},r){this.exec("Arm_ReadShareMemory",[parseInt(t)],r)},this.Arm_GenUniqueKey=function({Handle:t,Seed:r},i){this.exec("Arm_GenUniqueKey",[parseInt(t),r.length,r],i)},this.Arm_ChangePIN=function({Handle:t,NewPIN:r,OldPIN:i,TryCount:p,PinFlag:l},s){this.exec("Arm_ChangePIN",[parseInt(t),l,i,r,parseInt(p)],s)},this.Arm_ResetUserPIN=function({Handle:t,AdminPIN:r},i){this.exec("Arm_ResetUserPIN",[parseInt(t),r],i)},this.Arm_SetUserID=function({Handle:t,UserID:r},i){this.exec("Arm_SetUserID",[parseInt(t),parseInt(r)],i)},this.Arm_GetDeadline=function({Handle:t},r){this.exec("Arm_GetDeadline",[parseInt(t)],r)},this.Arm_SetDeadline=function({Handle:t,SetDeadTime:r},i){this.exec("Arm_SetDeadline",[parseInt(t),parseInt(r)],i)},this.Arm_GetUTCTime=function({Handle:t},r){this.exec("Arm_GetUTCTime",[parseInt(t)],r)},this.Arm_RFS=function({Handle:t},r){this.exec("Arm_RFS",[parseInt(t)],r)},this.Arm_RsaGenPubPriKey=function({Handle:t,RsaFileId:r},i){this.exec("Arm_RsaGenPubPriKey",[parseInt(t),parseInt(r)],i)},this.Arm_EccGenPubPriKey=function({Handle:t,EccFileId:r},i){this.exec("Arm_EccGenPubPriKey",[parseInt(t),parseInt(r)],i)},this.Arm_Sm2GenPubPriKey=function({Handle:t,Sm2FileId:r},i){this.exec("Arm_Sm2GenPubPriKey",[parseInt(t),parseInt(r)],i)},this.Arm_ReadRsaPri=function(t){this.exec("Arm_ReadRsaPri",null,t)},this.Arm_ReadRsaPub=function(t){this.exec("Arm_ReadRsaPub",null,t)},this.Arm_ReadEccPri=function(t){this.exec("Arm_ReadEccPri",null,t)},this.Arm_ReadEccPub=function(t){this.exec("Arm_ReadEccPub",null,t)},this.Arm_ReadSm2Pri=function(t){this.exec("Arm_ReadSm2Pri",null,t)},this.Arm_ReadSm2Pub=function(t){this.exec("Arm_ReadSm2Pub",null,t)},this.Arm_RsaPri=function({Handle:t,RsaPri_Flag:r,RsaPriInData:i,RsaPriFileID:p,RsaPriFileSize:l},s){this.exec("Arm_RsaPri",[parseInt(t),parseInt(p),parseInt(l),r,i],s)},this.Arm_RsaPub=function({Handle:t,RsaPubKey:r,RsaPub_Flag:i,RsaPubInData:p,RsaPubFileSize:l},s){this.exec("Arm_RsaPub",[parseInt(t),parseInt(l),i,r,r.length,p],s)},this.Arm_EccSign=function({Handle:t,HashData:r,EccFileId:i},p){this.exec("Arm_EccSign",[parseInt(t),parseInt(i),r],p)},this.Arm_EccVerify=function({Handle:t,HashData:r,EccPubKey:i,EccSignData:p},l){this.exec("Arm_EccVerify",[parseInt(t),i,i.length,r,p],l)},this.Arm_Sm2Sign=function({Handle:t,HashData:r,Sm2FileId:i},p){this.exec("Arm_Sm2Sign",[parseInt(t),parseInt(i),r],p)},this.Arm_Sm2Verify=function({Handle:t,HashData:r,Sm2PubKey:i,Sm2SignData:p},l){this.exec("Arm_Sm2Verify",[parseInt(t),i,i.length,r,p],l)},this.Arm_TDES=function({Handle:t,Tdes_Flag:r,TdesFileID:i,TdesInData:p},l){this.exec("Arm_TDES",[parseInt(t),parseInt(i),r,p],l)},this.Arm_SM4=function({Handle:t,Sm4_Flag:r,Sm4FileID:i,Sm4InData:p},l){this.exec("Arm_SM4",[parseInt(t),parseInt(i),r,p],l)},this.Arm_HASH=function({Handle:t,Hash_Flag:r,HashInData:i},p){this.exec("Arm_HASH",[parseInt(t),r,i],p)},this.Arm_Seed=function({Handle:t,SeedData:r,SeedLength:i},p){this.exec("Arm_Seed",[parseInt(t),i,r],p)},this.Arm_LimitSeedCount=function({Handle:t,SeedCount:r},i){this.exec("Arm_LimitSeedCount",[parseInt(t),parseInt(r)],i)},this.Arm_GenMotherKey=function({Handle:t,SeedLen:r,SeedForPID:i,SonCount:p,StartUserID:l,AdminTryCount:s,UserPin:c,UserTryCount:d,UpdateRSAPriKey:o},n){this.exec("Arm_GenMotherKey",[parseInt(t),parseInt(r),i,c,parseInt(d),parseInt(s),o,parseInt(l),parseInt(p)],n)},this.Arm_RequestInit=function({Handle:t},r){this.exec("Arm_RequestInit",[parseInt(t)],r)},this.Arm_GetInitDataFromMother=function({Handle:t},r){this.exec("Arm_GetInitDataFromMother",[parseInt(t),Request],r)},this.Arm_InitSon=function({Handle:t,InitData:r},i){this.exec("Arm_InitSon",[parseInt(t),r],i)},this.Arm_SetUpdatePriKey=function({Handle:t,UpdatePriKey:r},i){this.exec("Arm_SetUpdatePriKey",[parseInt(t),r],i)},this.Arm_MakeUpdatePacket=function({Handle:t,HID:r,Func:i,FileID:p,FileType:l,Offset:s,DataLen:c,DataBuffer:d,UpRSAPubKey:o},n){this.exec("Arm_MakeUpdatePacket",[parseInt(t),r,i,l,parseInt(p),parseInt(s),d,o,parseInt(c)],n)},this.Arm_MakeUpdatePacketFromMother=function({Handle:t,HID:r,Func:i,FileID:p,FileType:l,Offset:s,DataLen:c,DataBuffer:d},o){this.exec("Arm_MakeUpdatePacketFromMother",[parseInt(t),r,i,l,parseInt(p),parseInt(s),d,parseInt(c)],o)},this.Arm_Update=function({Handle:t,UpdateData:r},i){this.exec("Arm_Update",[parseInt(t),r],i)},this.Arm_Set_DATA_FILE_ATTR=function({Size:t,ReadPriv:r,WritePriv:i},p){this.exec("Arm_Set_DATA_FILE_ATTR",[parseInt(t),parseInt(r),parseInt(i)],p)},this.Arm_Set_PRIKEY_FILE_ATTR=function({Count:t,Size:r,Type:i,Priv:p,IsReset:l,IsDecOnRAM:s},c){this.exec("Arm_Set_PRIKEY_FILE_ATTR",[i,parseInt(r),parseInt(t),parseInt(p),parseInt(s),parseInt(l)],c)},this.Arm_Set_KEY_FILE_ATTR=function({Size:t,PrivEnc:r},i){this.exec("Arm_Set_KEY_FILE_ATTR",[parseInt(t),parseInt(r)],i)},this.Arm_Set_EXE_FILE_ATTR=function({FileLen:t,PrivExe:r},i){this.exec("Arm_Set_EXE_FILE_ATTR",[parseInt(t),parseInt(r)],i)},this.Arm_Set_DATA_LIC=function({ReadPriv:t,WritePriv:r},i){this.exec("Arm_Set_DATA_LIC",[parseInt(t),parseInt(r)],i)},this.Arm_Set_PRIKEY_LIC=function({Count:t,Priv:r,IsReset:i,IsDecOnRAM:p},l){this.exec("Arm_Set_PRIKEY_LIC",[parseInt(t),parseInt(r),parseInt(p),parseInt(i)],l)},this.Arm_Set_KEY_LIC=function({PrivEnc:t},r){this.exec("Arm_Set_KEY_LIC",[parseInt(t)],r)},this.Arm_Set_EXE_LIC=function({PrivExe:t},r){this.exec("Arm_Set_EXE_LIC",[parseInt(t)],r)},this.Arm_Set_EXE_FILE_INFO=function({FileID:t,FileData:r,FileSize:i,InBuffer:p,CallLimit:l},s){this.exec("Arm_Set_EXE_FILE_INFO",[p,parseInt(i),parseInt(t),parseInt(l),r,r.length],s)},this.Arm_Clear_EXE_FILE_INFO=function({InBuffer:t},r){this.exec("Arm_Clear_EXE_FILE_INFO",[t],r)}}const ad={HID:0},yn={PRODUCT_ID:0,USER_ID:1,HARDWARE_ID:2},v0={USER:0};class x0{constructor(){It(this,"Base64",new nd);It(this,"AtlCtrl",null);It(this,"ArmCount",0);It(this,"ArmIndex",0);It(this,"ArmHandle",0);It(this,"ArmRandom","");try{this.AtlCtrl=new od("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}")}catch(t){this.AtlCtrl=null}}armEnum(){if(this.AtlCtrl)return new Promise((t,r)=>{this.AtlCtrl.Arm_Enum((i,p)=>{i?(this.ArmCount=+p,t(p)):r(p)})})}armOpen(t=0){if(this.AtlCtrl)return this.ArmIndex=t,new Promise((r,i)=>{this.AtlCtrl.Arm_Open({Index:t},(p,l)=>{p?(this.ArmHandle=+l,r(l)):(this.ArmHandle=l,i(l))})})}armClose(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_Close({Handle:t},(p,l)=>{p?r(l):i(l)})})}armChangePIN(t,r,i=255,p=v0.USER,l=this.ArmHandle){if(this.AtlCtrl)return new Promise((s,c)=>{this.AtlCtrl.Arm_ChangePIN({Handle:l,NewPIN:t,OldPIN:r,TryCount:i,PinFlag:p},(d,o)=>{d&&o==0?(this.ArmPin=t,s(o)):c(o)})})}armGenRandom(t=16,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_GenRandom({Handle:r,RandomLen:t},(l,s)=>{l?(this.ArmRandom=s,i(s)):p(s)})})}armGetDeadline(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_GetDeadline({Handle:t},(p,l)=>{p?(this.ArmDeadline=l,r(l)):i(l)})})}armGenUniqueKey(t="MTIzNDU2Nzg5MA==",r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_GenUniqueKey({Handle:r,Seed:t},(l,s)=>{l?(this.ArmUKey=s,i(s)):p(s)})})}armGetDongleInfo(t=0,r=yn.HARDWARE_ID){if(this.AtlCtrl)return this.ArmIndex=t,new Promise((i,p)=>{this.AtlCtrl.Arm_GetDongleInfo({Index:t,DongleInfoNum:r},(l,s)=>{if(l){switch(r){case yn.USER_ID:this.ArmUid=s;break;case yn.PRODUCT_ID:this.ArmPid=s;break;case yn.HARDWARE_ID:this.ArmHid=s;break}i(s)}else p(s)})})}armLEDControl(t,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_LEDControl({Handle:r,LedFlag:t},(l,s)=>{l&&s==0?i(s):p(s)})})}armRFS(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_RFS({Handle:t},(p,l)=>{p&&l==0?r(l):i(l)})})}armReadFile(t="0001",r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl[`Arm_ReadFile${t}`]({Handle:r},(l,s)=>{if(l&&s.length>0)try{s=this.Base64.decode(s),i(s)}catch(c){i(s)}else p(s)})})}armResetState(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_ResetState({Handle:t},(p,l)=>{p&&l==0?r(l):i(l)})})}armResetUserPIN(t,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_ResetUserPIN({Handle:r,AdminPIN:t},(l,s)=>{l&&s==0?i(s):p(s)})})}armSetUserID(t,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_SetUserID({Handle:r,UserID:t},(l,s)=>{l&&s==0?i(s):p(s)})})}armSetDeadline(t,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_SetDeadline({Handle:r,SetDeadTime:t},(l,s)=>{l&&s==0?i(s):p(s)})})}armSwitchProtocol(t=ad.HID,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_SwitchProtocol({Handle:r,ProtocolFlag:t},(l,s)=>{l&&s==0?i(s):p(s)})})}armVerifyPIN(t,r=v0.USER,i=this.ArmHandle){if(this.AtlCtrl)return new Promise((p,l)=>{this.AtlCtrl.Arm_VerifyPIN({Handle:i,UserPin:t,UserType:r},(s,c)=>{s&&c==0?(this.ArmPin=t,p(c)):l(c)})})}armReadData(t=0,r=128,i=this.ArmHandle){if(this.AtlCtrl)return new Promise((p,l)=>{this.AtlCtrl.Arm_ReadData({Handle:i,Offset:t,ReadLength:r},(s,c)=>{s?(this.ArmData=c,p(c)):l(c)})})}armWriteData(t,r=0,i=this.ArmHandle){if(this.AtlCtrl)return new Promise((p,l)=>{this.AtlCtrl.Arm_WriteData({Handle:i,Offset:r,DataInput:t},(s,c)=>{s&&c==0?p(c):l(c)})})}armReadShareMemory(t=this.ArmHandle){if(this.AtlCtrl)return new Promise((r,i)=>{this.AtlCtrl.Arm_ReadShareMemory({Handle:t},(p,l)=>{p?(this.ArmData=l,r(l)):i(l)})})}armWriteShareMemory(t,r=this.ArmHandle){if(this.AtlCtrl)return new Promise((i,p)=>{this.AtlCtrl.Arm_WriteShareMemory({Handle:r,DataInput:t},(l,s)=>{l&&s==0?i(s):p(s)})})}}const g0="0123456789abcdeffedcba9876543210",b0="4b0de988570c3a0f";let or=window.ENCRYPT&&new x0;function w0(e=16,t="0123456789abcdefghijklmnopqrstuvwxyz"){let r="",i=t.length;for(;e>0;)r+=t[Math.floor(Math.random()*i)],e--;return r}function E0(){return Qe(this,null,function*(){return or||(or=new x0),new Promise((e,t)=>{or.armEnum().then(r=>{e(+r)}).catch(r=>{we.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),t(r)})})})}Oe.throttle(()=>Qe(this,null,function*(){const e=yield E0(),t={};if(typeof e!="number"||e<=0)we.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),t.resetToken();else{const r=yield ld();if(!t.token)return;r.length?r.includes(t.ukeyHid)||(we.ElMessage({type:"error",ElMessage:"U盘锁不匹配,请检查U盘锁!"}),t.resetToken()):(we.ElMessage({type:"warning",ElMessage:"未找到U盘锁,请检查U盘锁!"}),t.resetToken())}}),5e3,{trailing:!1});function sd(e=0){return Qe(this,null,function*(){return or?new Promise((t,r)=>{or.armGetDongleInfo(e).then(i=>{i?t(i):(we.ElMessage({type:"warning",ElMessage:"U盘锁信息为空,请检查U盘锁!"}),r(i))}).catch(i=>{r(i)})}):we.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"})})}function ld(){return Qe(this,null,function*(){if(!or)return we.ElMessage({type:"warning",ElMessage:"未找到U盘锁程序,请检查后台程序!"});const e=yield E0();let t=[];for(let r=0;r<e;r++){const i=yield sd(r);t.push(i)}return t})}w0(16),w0(16);const _0=window.INSPECT?ir.constants.CBC:ir.constants.ECB;td.generateKeyPair();function A0(e,t,r={}){const i=S0(b0),p=r.mode||_0;r=p===ir.constants.ECB?he({mode:p,inputEncoding:"utf8",outputEncoding:"hex"},r):he({iv:g0,mode:p,inputEncoding:"utf8",outputEncoding:"hex"},r);let l="";try{l=ir.encrypt(e,i,r)}catch(s){console.log("err: ",s)}return l}function C0(e,t,r={}){const i=S0(b0),p=r.mode||_0;return r=p===ir.constants.ECB?he({mode:p,inputEncoding:"hex",outputEncoding:"utf8"},r):he({iv:g0,mode:p,inputEncoding:"hex",outputEncoding:"utf8"},r),ir.decrypt(e,i,r)}function S0(e){return[...e].map(t=>t.charCodeAt().toString(16)).join("")}const B0={getLocal:e=>{try{let t=window.localStorage.getItem(e);return t=t!==null?C0(t):t,JSON.parse(t)}catch(t){console.error(t)}},setLocal:(e,t)=>{try{let r=JSON.stringify(t);r=r!==null?A0(r):r,window.localStorage.setItem(e,r)}catch(r){console.error(r)}},eachLocal:e=>{if(!e||Es(e)!=="Function")return console.error("传递参数非函数类型!");for(let t=0,r=window.localStorage.length;t<r;t++){const i=window.localStorage.key(t);e((void 0).getLocal(i),i)}},clearLocal:()=>{window.localStorage.clear()},removeLocal:e=>{window.localStorage.removeItem(e)},getSession:e=>{try{let t=window.sessionStorage.getItem(e);return t=t!==null?C0(t):t,JSON.parse(t)}catch(t){console.error(t)}},setSession:(e,t)=>{try{let r=JSON.stringify(t);r=r!==null?A0(r):r,window.sessionStorage.setItem(e,r)}catch(r){console.error(r)}},eachSession:e=>{if(!e||Es(e)!=="Function")return console.error("传递参数非函数类型!");for(let t=0,r=window.sessionStorage.length;t<r;t++){const i=window.sessionStorage.key(t);e((void 0).getSession(i),i)}},clearSession:()=>{window.sessionStorage.clear()},removeSession:e=>{window.sessionStorage.removeItem(e)}},k0="USER_TOKEN",T0="STATION_ID";var F0={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(be,function(){var r=1e3,i=6e4,p=36e5,l="millisecond",s="second",c="minute",d="hour",o="day",n="week",h="month",a="quarter",u="year",f="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var N=["th","st","nd","rd"],q=B%100;return"["+B+(N[(q-20)%10]||N[q]||N[0])+"]"}},m=function(B,N,q){var X=String(B);return!X||X.length>=N?B:""+Array(N+1-X.length).join(q)+B},E={s:m,z:function(B){var N=-B.utcOffset(),q=Math.abs(N),X=Math.floor(q/60),$=q%60;return(N<=0?"+":"-")+m(X,2,"0")+":"+m($,2,"0")},m:function B(N,q){if(N.date()<q.date())return-B(q,N);var X=12*(q.year()-N.year())+(q.month()-N.month()),$=N.clone().add(X,h),M=q-$<0,j=N.clone().add(X+(M?-1:1),h);return+(-(X+(q-$)/(M?$-j:j-$))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:h,y:u,w:n,d:o,D:f,h:d,m:c,s,ms:l,Q:a}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},F="en",T={};T[F]=b;var D="$isDayjsObject",I=function(B){return B instanceof A||!(!B||!B[D])},Y=function B(N,q,X){var $;if(!N)return F;if(typeof N=="string"){var M=N.toLowerCase();T[M]&&($=M),q&&(T[M]=q,$=M);var j=N.split("-");if(!$&&j.length>1)return B(j[0])}else{var L=N.name;T[L]=N,$=L}return!X&&$&&(F=$),$||!X&&F},W=function(B,N){if(I(B))return B.clone();var q=typeof N=="object"?N:{};return q.date=B,q.args=arguments,new A(q)},_=E;_.l=Y,_.i=I,_.w=function(B,N){return W(B,{locale:N.$L,utc:N.$u,x:N.$x,$offset:N.$offset})};var A=function(){function B(q){this.$L=Y(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[D]=!0}var N=B.prototype;return N.parse=function(q){this.$d=function(X){var $=X.date,M=X.utc;if($===null)return new Date(NaN);if(_.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var j=$.match(y);if(j){var L=j[2]-1||0,R=(j[7]||"0").substring(0,3);return M?new Date(Date.UTC(j[1],L,j[3]||1,j[4]||0,j[5]||0,j[6]||0,R)):new Date(j[1],L,j[3]||1,j[4]||0,j[5]||0,j[6]||0,R)}}return new Date($)}(q),this.init()},N.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},N.$utils=function(){return _},N.isValid=function(){return this.$d.toString()!==v},N.isSame=function(q,X){var $=W(q);return this.startOf(X)<=$&&$<=this.endOf(X)},N.isAfter=function(q,X){return W(q)<this.startOf(X)},N.isBefore=function(q,X){return this.endOf(X)<W(q)},N.$g=function(q,X,$){return _.u(q)?this[X]:this.set($,q)},N.unix=function(){return Math.floor(this.valueOf()/1e3)},N.valueOf=function(){return this.$d.getTime()},N.startOf=function(q,X){var $=this,M=!!_.u(X)||X,j=_.p(q),L=function(x,w){var O=_.w($.$u?Date.UTC($.$y,w,x):new Date($.$y,w,x),$);return M?O:O.endOf(o)},R=function(x,w){return _.w($.toDate()[x].apply($.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(w)),$)},H=this.$W,V=this.$M,J=this.$D,ie="set"+(this.$u?"UTC":"");switch(j){case u:return M?L(1,0):L(31,11);case h:return M?L(1,V):L(0,V+1);case n:var ne=this.$locale().weekStart||0,oe=(H<ne?H+7:H)-ne;return L(M?J-oe:J+(6-oe),V);case o:case f:return R(ie+"Hours",0);case d:return R(ie+"Minutes",1);case c:return R(ie+"Seconds",2);case s:return R(ie+"Milliseconds",3);default:return this.clone()}},N.endOf=function(q){return this.startOf(q,!1)},N.$set=function(q,X){var $,M=_.p(q),j="set"+(this.$u?"UTC":""),L=($={},$[o]=j+"Date",$[f]=j+"Date",$[h]=j+"Month",$[u]=j+"FullYear",$[d]=j+"Hours",$[c]=j+"Minutes",$[s]=j+"Seconds",$[l]=j+"Milliseconds",$)[M],R=M===o?this.$D+(X-this.$W):X;if(M===h||M===u){var H=this.clone().set(f,1);H.$d[L](R),H.init(),this.$d=H.set(f,Math.min(this.$D,H.daysInMonth())).$d}else L&&this.$d[L](R);return this.init(),this},N.set=function(q,X){return this.clone().$set(q,X)},N.get=function(q){return this[_.p(q)]()},N.add=function(q,X){var $,M=this;q=Number(q);var j=_.p(X),L=function(V){var J=W(M);return _.w(J.date(J.date()+Math.round(V*q)),M)};if(j===h)return this.set(h,this.$M+q);if(j===u)return this.set(u,this.$y+q);if(j===o)return L(1);if(j===n)return L(7);var R=($={},$[c]=i,$[d]=p,$[s]=r,$)[j]||1,H=this.$d.getTime()+q*R;return _.w(H,this)},N.subtract=function(q,X){return this.add(-1*q,X)},N.format=function(q){var X=this,$=this.$locale();if(!this.isValid())return $.invalidDate||v;var M=q||"YYYY-MM-DDTHH:mm:ssZ",j=_.z(this),L=this.$H,R=this.$m,H=this.$M,V=$.weekdays,J=$.months,ie=$.meridiem,ne=function(w,O,K,Z){return w&&(w[O]||w(X,M))||K[O].slice(0,Z)},oe=function(w){return _.s(L%12||12,w,"0")},x=ie||function(w,O,K){var Z=w<12?"AM":"PM";return K?Z.toLowerCase():Z};return M.replace(g,function(w,O){return O||function(K){switch(K){case"YY":return String(X.$y).slice(-2);case"YYYY":return _.s(X.$y,4,"0");case"M":return H+1;case"MM":return _.s(H+1,2,"0");case"MMM":return ne($.monthsShort,H,J,3);case"MMMM":return ne(J,H);case"D":return X.$D;case"DD":return _.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ne($.weekdaysMin,X.$W,V,2);case"ddd":return ne($.weekdaysShort,X.$W,V,3);case"dddd":return V[X.$W];case"H":return String(L);case"HH":return _.s(L,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return x(L,R,!0);case"A":return x(L,R,!1);case"m":return String(R);case"mm":return _.s(R,2,"0");case"s":return String(X.$s);case"ss":return _.s(X.$s,2,"0");case"SSS":return _.s(X.$ms,3,"0");case"Z":return j}return null}(w)||j.replace(":","")})},N.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},N.diff=function(q,X,$){var M,j=this,L=_.p(X),R=W(q),H=(R.utcOffset()-this.utcOffset())*i,V=this-R,J=function(){return _.m(j,R)};switch(L){case u:M=J()/12;break;case h:M=J();break;case a:M=J()/3;break;case n:M=(V-H)/6048e5;break;case o:M=(V-H)/864e5;break;case d:M=V/p;break;case c:M=V/i;break;case s:M=V/r;break;default:M=V}return $?M:_.a(M)},N.daysInMonth=function(){return this.endOf(h).$D},N.$locale=function(){return T[this.$L]},N.locale=function(q,X){if(!q)return this.$L;var $=this.clone(),M=Y(q,X,!0);return M&&($.$L=M),$},N.clone=function(){return _.w(this.$d,this)},N.toDate=function(){return new Date(this.valueOf())},N.toJSON=function(){return this.isValid()?this.toISOString():null},N.toISOString=function(){return this.$d.toISOString()},N.toString=function(){return this.$d.toUTCString()},B}(),C=A.prototype;return W.prototype=C,[["$ms",l],["$s",s],["$m",c],["$H",d],["$W",o],["$M",h],["$y",u],["$D",f]].forEach(function(B){C[B[1]]=function(N){return this.$g(N,B[0],B[1])}}),W.extend=function(B,N){return B.$i||(B(N,A,W),B.$i=!0),W},W.locale=Y,W.isDayjs=I,W.unix=function(B){return W(1e3*B)},W.en=T[F],W.Ls=T,W.p={},W})})(F0);var ud=F0.exports;const cd=Bn(ud),fd=[{key:0,value:"离线"},{key:1,value:"在线"}],hd=[{key:0,value:"反向"},{key:1,value:"正向"},{key:2,value:"停止"}],pd=[{key:1,value:1},{key:2,value:2},{key:3,value:3},{key:4,value:4},{key:5,value:5}],dd="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1747379227336'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='23558'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='64'%20height='64'%3e%3cpath%20d='M687.543%20658.286c-21.943-10.972-47.543-10.972-65.829%200C599.771%20669.257%20588.8%20691.2%20588.8%20716.8s10.971%2043.886%2032.914%2058.514c21.943%2010.972%2047.543%2010.972%2065.829%200%2021.943-10.971%2032.914-32.914%2032.914-58.514s-14.628-43.886-32.914-58.514zM10.97%20694.857c-10.971%2021.943-14.628%2036.572%200%2051.2L91.43%20833.83c14.628%2014.628%2032.914%2010.971%2051.2%200l47.542-21.943-153.6-164.572-25.6%2047.543zM936.23%20526.63V650.97H724.114c29.257%2032.915%2032.915%2076.8%2014.629%20113.372h197.486V921.6H1024V526.629h-87.771z%20m-402.286%203.657l212.114-201.143c7.314-7.314%2010.972-14.629%2010.972-25.6%200-10.972-3.658-18.286-10.972-25.6L588.8%20113.37c-7.314-7.314-14.629-10.971-25.6-10.971-10.971%200-18.286%203.657-25.6%2010.971l-482.743%20460.8c-7.314%207.315-10.971%2014.629-10.971%2025.6%200%2010.972%203.657%2018.286%2010.971%2025.6l157.257%20164.572c7.315%207.314%2014.629%2010.971%2025.6%2010.971%2010.972%200%2018.286-3.657%2025.6-10.971l219.429-208.457%2080.457%2098.743c10.971-21.943%2029.257-40.229%2051.2-51.2l-80.457-98.743z'%20p-id='23559'%20fill='%23999999'%3e%3c/path%3e%3c/svg%3e",yd="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1747379205045'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='23361'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='64'%20height='64'%3e%3cpath%20d='M808.19035614-5.81530905v72.49414403h144.98828683v147.05954724h74.56540444V-5.81530905zM77.03514075%2066.67883498h147.05954724V-5.81530905H4.54099794v219.55369127H77.03514075zM953.17864297%20942.82233719h-144.98828683v74.56540445h219.55369127V797.83405037h-74.56540444zM77.03514075%20797.83405037H4.54099794v219.55369127h219.55369005v-74.56540445H77.03514075zM866.18567111%20526.49882905v-6.21378371c2.07126164-20.71261275-14.49882905-39.35396386-35.21144058-41.4252255h-120.13315201c-8.28504534%200-14.49882905%202.07126164-20.71261275%206.21378371l-28.99765688-91.13549392c-6.2137837-14.49882905-18.64135111-24.85513482-35.21144058-28.99765688-16.57008947%202.07126164-28.99765689%2014.49882905-35.2114418%2028.99765688l-49.71026962%20155.34459259-35.21144059-275.4777446c0-14.49882905-14.49882905-28.99765689-35.21144059-35.21144059-20.71261275%200-35.21144059%206.2137837-35.21144179%2028.99765689l-70.42288117%20219.55369126-6.2137837-49.71026963c-8.28504534-12.42756741-20.71261275-22.78387317-35.2114418-28.99765687-14.49882905%200-28.99765689%208.28504534-35.21144058%2020.71261154l-35.21144059%2049.71026962h-84.92171142c-20.71261275%202.07126164-37.28270222%2014.49882905-43.49648593%2035.2114418%204.14252206%2020.71261275%2020.71261275%2037.28270222%2043.49648593%2041.42522428h105.63432296c10.35630577%200%2020.71261275-6.2137837%2028.99765809-14.49882903l28.99765688%2091.13549512c6.2137837%2016.57008947%2018.64135111%2026.92639645%2035.21144058%2031.06891852%2016.57008947-2.07126164%2028.99765689-14.49882905%2035.21144181-28.99765809l55.92405333-176.05720413%2035.21144058%20289.97657244c0%2014.49882905%2014.49882905%2028.99765689%2035.21144058%2035.21144057%2016.57008947-2.07126164%2028.99765689-14.49882905%2035.2114418-28.99765687l55.92405334-211.26864593%2020.71261153%2055.92405333c6.2137837%2014.49882905%2018.64135111%2024.85513482%2035.2114418%2028.99765688%2014.49882905%200%2028.99765689-8.28504534%2035.21144058-20.71261154l20.71261275-49.71026963h99.42053926c18.64135111%200%2033.14018016-14.49882905%2035.21144058-31.06891851z'%20p-id='23362'%20fill='%23999999'%3e%3c/path%3e%3c/svg%3e",md="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20class='icon'%20width='256px'%20height='256.00px'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M272.832598%20272.833878h479.9988v479.9988h-479.9988z'%20fill='%23BBE2FF'%20/%3e%3cpath%20d='M919.93498%20105.890295m-66.175834%200a66.175835%2066.175835%200%201%200%20132.351669%200%2066.175835%2066.175835%200%201%200-132.351669%200Z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M919.93498%20919.93626m-66.175834%200a66.175835%2066.175835%200%201%200%20132.351669%200%2066.175835%2066.175835%200%201%200-132.351669%200Z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M105.889015%20105.890295m-66.175834%200a66.175835%2066.175835%200%201%200%20132.351669%200%2066.175835%2066.175835%200%201%200-132.351669%200Z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M105.889015%20919.93626m-66.175834%200a66.175835%2066.175835%200%201%200%20132.351669%200%2066.175835%2066.175835%200%201%200-132.351669%200Z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M916.670988%201.026557a104.383739%20104.383739%200%200%200-104.383739%20104.383739%2090.751773%2090.751773%200%200%200%2016.895958%2052.863868l-73.919815%2070.847823h-489.086777l-74.079815-70.847823a97.087757%2097.087757%200%200%200%2017.087957-54.879862%20103.679741%20103.679741%200%200%200-104.415739-103.391742%20104.767738%20104.767738%200%201%200%200%20209.535476%20102.399744%20102.399744%200%200%200%2053.567866-15.295962l81.759796%2082.975793v479.9988l-74.623814%2075.679811a103.071742%20103.071742%200%200%200-60.799848-19.99995%20104.383739%20104.383739%200%201%200%20104.511739%20104.383739%20119.455701%20119.455701%200%200%200-12.959968-53.279867l73.407817-78.111805h482.174794l73.407817%2078.111805a111.007722%20111.007722%200%200%200-12.799968%2051.199872%20105.375737%20105.375737%200%200%200%20104.255739%20105.599736%20103.99974%20103.99974%200%201%200-61.183847-187.90353l-58.687853-58.943853v-513.310717l65.823835-66.239834a104.255739%20104.255739%200%201%200%2054.047865-193.375517z%20m-259.199352%20738.430154v-69.599826h92.799768v69.599826z%20m92.799768-115.99971h-139.039652v115.99971h-185.599536v-115.99971h-139.135652v-208.767478h139.167652v-139.167652h185.599536v139.167652h139.167652z%20m-371.007072-324.735188v69.599826h-92.799768v-69.599826z%20m-92.799768%20440.734898v-69.599826h92.799768v69.599826z%20m463.99884-440.734898v69.599826h-92.799768v-69.599826z%20m-703.678241-193.311517a57.983855%2057.983855%200%201%201%2057.983855%2057.983856%2057.983855%2057.983855%200%200%201-57.983855-57.983856z%20m57.983855%20869.885826a57.983855%2057.983855%200%201%201%2057.983855-57.983855%2057.983855%2057.983855%200%200%201-57.983855%2057.983855z%20m811.90197-115.99971a57.983855%2057.983855%200%201%201-57.983855%2057.983855%2057.983855%2057.983855%200%200%201%2057.983855-57.983855z%20m0-695.90226a57.983855%2057.983855%200%201%201%2057.983855-57.983856%2057.983855%2057.983855%200%200%201-57.983855%2057.983856z'%20fill='%230091EB'%20/%3e%3cpath%20d='M515.551991%2091.522331a82.847793%2082.847793%200%200%200-76.799808%2052.831868l43.295892%2016.639959a35.96791%2035.96791%200%200%201%2068.03183%202.719993l44.511889-13.087968a82.751793%2082.751793%200%200%200-79.039803-59.103852z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M647.487661%2098.018315a154.591614%20154.591614%200%200%200-131.90367-74.751813%20152.735618%20152.735618%200%200%200-131.199672%2073.599816l39.583901%2024.223939a107.295732%20107.295732%200%200%201%20183.711541%200.799998z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M515.551991%20947.168192a82.783793%2082.783793%200%200%200%2078.879803-59.071852l-44.511889-13.087968a35.93591%2035.93591%200%200%201-68.03183%202.687994l-43.295891%2016.671958a82.879793%2082.879793%200%200%200%2076.959807%2052.799868z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M384.384319%20941.888205a152.735618%20152.735618%200%200%200%20131.199672%2073.599816%20154.623613%20154.623613%200%200%200%20131.90367-74.751813l-39.8079-23.87194a107.295732%20107.295732%200%200%201-183.711541%200.831998z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M871.519101%20553.473176l13.087967%2044.511889a82.335794%2082.335794%200%200%200%206.399984-155.83961l-16.639958%2043.295891a35.96791%2035.96791%200%200%201-2.719993%2067.99983z'%20fill='%230091EB'%20/%3e%3cpath%20d='M1011.96675%20519.105262a152.767618%20152.767618%200%200%200-73.599816-131.199672l-24.223939%2039.583901a107.359732%20107.359732%200%200%201-0.831998%20183.711541l23.83994%2039.8079a154.591614%20154.591614%200%200%200%2074.815813-131.90367z'%20fill='%230091EB'%20/%3e%3cpath%20d='M157.472886%20485.505346l-16.607958-43.295892a82.335794%2082.335794%200%200%200%206.239984%20155.839611l13.119967-44.511889a35.93591%2035.93591%200%200%201-2.751993-67.99983z'%20fill='%230091EB'%20/%3e%3cpath%20d='M19.713231%20519.105262a154.623613%20154.623613%200%200%200%2074.751813%20131.93567l23.83994-39.8079a107.327732%20107.327732%200%200%201-0.863998-183.743541l-24.223939-39.583901a152.735618%20152.735618%200%200%200-73.599816%20131.199672z'%20fill='%230091EB'%20/%3e%3cpath%20d='M332.864448%20437.889465h69.599826v46.399884h-69.599826z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M472.0641%20437.889465h92.799768v46.399884h-92.799768z'%20fill='%230091EB'%20/%3e%3cpath%20d='M634.431694%20437.889465h69.599826v46.399884h-69.599826z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M332.864448%20530.689233h69.599826v46.399884h-69.599826z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M472.0641%20530.689233h92.799768v46.399884h-92.799768z'%20fill='%230091EB'%20/%3e%3cpath%20d='M634.431694%20530.689233h69.599826v46.399884h-69.599826z'%20fill='%23FFB541'%20/%3e%3cpath%20d='M272.832598%20272.833878h127.99968v127.99968h-127.99968z'%20fill='%230091EB'%20/%3e%3cpath%20d='M272.832598%20624.832998h127.99968v127.99968h-127.99968z'%20fill='%230091EB'%20/%3e%3cpath%20d='M624.831718%20272.833878h127.99968v127.99968h-127.99968z'%20fill='%230091EB'%20/%3e%3cpath%20d='M624.831718%20624.832998h127.99968v127.99968h-127.99968z'%20fill='%230091EB'%20/%3e%3c/svg%3e",vd="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e",At=(ul=(ll=window.meta)==null?void 0:ll.graph)!=null&&ul.penFormMap?window.meta.graph.penFormMap:{NORMAL:[{name:"颜色",key:"color",type:"color",dataIds:{}}],TEXT:[{name:"显示内容",key:"text",type:"text",dataIds:{}}],AUDIO:[{name:"颜色",key:"color",type:"color",dataIds:{}}],MP4:[{name:"颜色",key:"color",type:"color",dataIds:{}}],CAMERA:[{name:"颜色",key:"color",type:"color",dataIds:{}}],VIDEO_STREAM:[{name:"颜色",key:"color",type:"color",dataIds:{}}],POINT_VALUE:[{name:"在线状态",key:"online_state",type:"select",dataIds:{},options:[{label:"在线",value:1},{label:"离线",value:0}]},{name:"测点值",key:"point_value",type:"text",dataIds:{}}],LIGHT_PLATE:[{name:"光字牌",key:"light_plate",type:"select",dataIds:{},options:[{label:"离线",value:-1},{label:"正常",value:0},{label:"预警",value:1},{label:"一般",value:2},{label:"严重",value:3},{label:"危急",value:4}]}]},D0=(fl=(cl=window.meta)==null?void 0:cl.graph)!=null&&fl.lightPlateColorMap?window.meta.graph.lightPlateColorMap:{0:"#00d200",1:"#e2ac06",2:"#fa800a",3:"#f04155",4:"#ff0000"},I0=(pl=(hl=window.meta)==null?void 0:hl.graph)!=null&&pl.lightPlateTextMap?window.meta.graph.lightPlateTextMap:{0:"#fff",1:"#fff",2:"#fff",3:"#fff",4:"#fff"},Ue={form:[{name:"带电状态",key:"charged_state",type:"select",dataIds:{},options:fd.map(e=>({label:e.value,value:e.key}))},{name:"潮流方向",key:"electric_direction",type:"select",dataIds:{},options:hd.map(e=>({label:e.value,value:e.key}))},{name:"电荷大小",key:"electric_size",type:"select",dataIds:{},options:pd.map(e=>({label:e.value,value:e.key}))}],anchors:[{x:0,y:.5,id:"0"},{x:.5,y:0,id:"1"},{x:1,y:.5,id:"2"},{x:.5,y:1,id:"3"}],dataType:window.dataType,dataProp:window.dataProp,visibleLevel:window.visibleLevel},ve=De(he({penType:ke.NORMAL},Ue),{form:[...At[ke.NORMAL],...Ue.form]});ke.POINT_VALUE,Ue.anchors,window.visibleLevel,[...At[ke.POINT_VALUE],...Ue.form],Ue.form,window.dataType,window.dataProp,window.visibleLevel,Ue.form,window.dataType,window.dataProp,window.visibleLevel,I0[0],ke.LIGHT_PLATE,D0[0],Ue.anchors,window.visibleLevel,[...At[ke.LIGHT_PLATE],...Ue.form],ke.SENSOR,Ue.anchors,window.visibleLevel,[...At[ke.LIGHT_PLATE],...Ue.form],De(he({width:100,height:30,name:"text",text:"文本",disableAnchor:!0,penType:ke.TEXT},Ue),{form:[...At[ke.TEXT],...Ue.form]}),he({width:100,height:100,name:"square"},ve),De(he({type:1,name:"line",width:100,height:5,lineWidth:2,lineName:"line",penName:"line",background:"#FFF000",color:"#FFF000"},ve),{lineAnimateType:1,anchors:[{x:0,y:.5,id:"0"},{x:1,y:.5,id:"1"}]}),he({width:200,height:50,borderRadius:0,name:"rectangle"},ve),he({width:100,height:100,name:"circle"},ve),he({width:100,height:100,name:"triangle"},ve),he({width:100,height:100,name:"diamond"},ve),he({width:100,height:100,name:"pentagon"},ve),he({width:100,height:100,name:"hexagon"},ve),he({width:100,height:100,name:"pentagram"},ve),he({width:120,height:60,name:"leftArrow"},ve),he({width:120,height:60,name:"rightArrow"},ve),he({width:150,height:60,name:"twowayArrow"},ve),he({width:100,height:100,name:"cloud"},ve),he({textTop:-.1,width:100,height:100,name:"message"},ve),he({width:80,height:100,name:"file"},ve),De(he({name:"svg",width:100,height:100,image:yd,audioId:"",penType:ke.AUDIO},Ue),{form:[...At[ke.AUDIO],...Ue.form],events:[{name:"enter",action:nn.Emit,value:ct.OPEN_AUDIO,where:{type:""},params:JSON.stringify({action:ct.OPEN_AUDIO,data:""})},{name:"leave",action:nn.Emit,value:ct.CLOSE_AUDIO,where:{type:""},params:JSON.stringify({action:ct.CLOSE_AUDIO,data:""})}]}),De(he({name:"svg",width:100,height:100,image:dd,cameraId:"",events:[{name:"enter",action:nn.Emit,value:ct.OPEN_CAMERA,where:{type:""},params:JSON.stringify({action:ct.OPEN_CAMERA,data:""})},{name:"leave",action:nn.Emit,value:ct.CLOSE_CAMERA,where:{type:""},params:JSON.stringify({action:ct.CLOSE_CAMERA,data:""})}],penType:ke.CAMERA},Ue),{form:[...At[ke.CAMERA],...Ue.form]}),De(he({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:ke.MP4},Ue),{form:[...At[ke.MP4],...Ue.form]}),De(he({name:"video",width:100,height:100,video:"https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",autoPlay:!0,penType:ke.VIDEO_STREAM},Ue),{form:[...At[ke.VIDEO_STREAM],...Ue.form]}),De(he({width:60,height:100,name:"cube",z:.25},ve),{props:{custom:[{key:"z",label:"Z",type:"number",min:0,placeholder:"<= 1 即宽度的比例"},{key:"backgroundFront",label:"前背景色",type:"color"},{key:"backgroundUp",label:"顶背景色",type:"color"},{key:"backgroundRight",label:"右背景色",type:"color"}]}}),he({width:70,height:100,name:"people"},ve),De(he({name:"table",width:80,height:30,disableAnchor:!0,colWidth:90,rowHeight:32,bordered:!0,vLine:!0,hLine:!0,stripe:!1,color:"#333",textColor:"#444"},ve),{penType:ke.TABLE,data:[["设备 ID","设备名称","数据协议","级别"],["1","200","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["2","湿度传感器","MQTT",{text:"二级告警",background:"#4d2a02",textColor:"#E6A82EFF"}],["3","物联网设备","MQTT",{text:"一级告警",background:"#650b09",textColor:"#FF5D3CFF"}],["4","物联网设备/智能家居/智慧城市","MQTT",{text:"三级告警",textColor:"#58CC84FF",background:"#042617;"}]],styles:[{row:0,textColor:"#000"}]}),De(he({name:"rectangle",penName:"按钮",width:80,height:30,borderRadius:.2,text:"按钮",background:"#1890ff",color:"#1890ff",textColor:"#fff",activeBackground:"#40a9ff",activeColor:"#40a9ff",activeTextColor:"#fff",hoverBackground:"#40a9ff",hoverColor:"#40a9ff",hoverTextColor:"#fff"},ve),{penType:ke.BUTTON}),De(he({name:"switch",penName:"开关",height:30,width:60,checked:!1,offColor:"#BFBFBF",onColor:"#1890ff",disableOffColor:"#E5E5E5",disableOnColor:"#A3D3FF",locked:0},ve),{penType:ke.SWITCH}),De(he({name:"radio",penName:"单选框",width:150,height:100,direction:"vertical",checked:"",options:[{text:"选项一"},{text:"选项二"},{text:"选项三",isForbidden:!0}]},ve),{penType:ke.RADIO}),De(he({name:"checkbox",penName:"多选框",width:30,height:30,checked:!0,value:"选项一"},ve),{penType:ke.CHECKBOX}),De(he({name:"slider",penName:"进度条",width:300,height:30,value:10,textWidth:50,barHeight:4,min:0,max:100,color:"#1890ff",background:"#D4D6D9",textColor:"#222",unit:"%"},ve),{penType:ke.SLIDER}),De(he({name:"rectangle",penName:"输入框",height:50,width:200,input:!0,borderRadius:.05,ellipsis:!0,text:"输入数据",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10},ve),{penType:ke.INPUT}),De(he({name:"rectangle",penName:"选择器",height:50,width:200,borderRadius:.05,ellipsis:!0,text:"选项1",textAlign:"left",color:"#D9D9D9FF",textColor:"#000000FF",hoverTextColor:"#000000FF",activeTextColor:"#000000FF",textLeft:10,dropdownList:[{text:"选项1"},{text:"选项2"},{text:"选项3"}]},ve),{penType:ke.SELECT}),De(he({name:"time",penName:"时间",width:300,height:40,text:`${cd().format("YYYY-MM-DD HH:mm:ss")}`,lineWidth:0,interval:67,fillZero:!0},ve),{penType:ke.TIME,form:[{key:"timeFormat",name:"显示格式",type:"text"},{key:"fillZero",name:"是否补0",type:"switch"},...ve.form],timeFormat:"`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"}),he({text:"开始/结束",width:120,height:40,borderRadius:.5,name:"rectangle"},ve),he({text:"流程",width:120,height:40,name:"rectangle"},ve),he({text:"判定",width:120,height:60,name:"diamond"},ve),he({text:"数据",width:120,height:50,name:"flowData",offsetX:.14},ve),he({text:"准备",width:120,height:50,name:"hexagon"},ve),he({text:"子流程",width:120,height:50,name:"flowSubprocess"},ve),he({text:"数据库",width:80,height:120,name:"flowDb"},ve),he({text:"文档",width:120,height:100,name:"flowDocument"},ve),he({text:"内部存储",width:120,height:80,name:"flowInternalStorage"},ve),he({text:"外部存储",width:120,height:80,name:"flowExternStorage"},ve),he({text:"队列",width:100,height:100,name:"flowQueue"},ve),he({text:"手动输入",width:120,height:80,name:"flowManually"},ve),he({text:"展示",width:120,height:80,name:"flowDisplay"},ve),he({text:"并行模式",width:120,height:50,name:"flowParallel"},ve),he({text:"注释",width:100,height:100,name:"flowComment"},ve),he({text:"",width:30,height:30,name:"circle",background:"#555",lineWidth:0},ve),he({width:30,height:30,name:"activityFinal"},ve),he({text:"活动",width:120,height:50,borderRadius:.25,name:"rectangle"},ve),he({text:"决策/合并",width:120,height:50,name:"diamond"},ve),he({text:"垂直泳道",width:200,height:500,name:"swimlaneV",textBaseline:"top",textTop:20,lineTop:.08},ve),he({text:"水平泳道",width:500,height:200,name:"swimlaneH",textWidth:.01,textLeft:.04,textAlign:"left",lineLeft:.08},ve),he({text:"垂直分岔/汇合",width:10,height:150,name:"forkV",fillStyle:"#555",strokeStyle:"transparent"},ve),he({text:"水平分岔/汇合",width:150,height:10,name:"forkH",fillStyle:"#555",strokeStyle:"transparent"},ve),he({name:"andGate",width:100,height:150},ve),he({name:"basicEvent",width:100,height:150},ve),he({name:"unexpandedEvent",width:100,height:150},ve),he({name:"priorityAndGate",width:100,height:150},ve),he({name:"forbiddenGate",width:100,height:150},ve),he({name:"event",width:100,height:150},ve),he({name:"switchEvent",width:100,height:150},ve),he({name:"conditionalEvent",width:150,height:100},ve),he({name:"transferSymbol",width:100,height:150},ve),he({name:"orGate",width:100,height:150},ve),he({name:"xorGate",width:100,height:150},ve),he({name:"votingGate",width:100,height:150},ve),he({text:"主题",width:200,height:50,name:"mindNode",borderRadius:.5},ve),he({text:"子主题",width:160,height:40,name:"mindLine"},ve);class xd{constructor(t){It(this,"editor");this.editor=t}initPlugin(t,r,i={}){t.installPenPlugins({name:r},[{plugin:ze.mindBoxPlugin,options:i},{plugin:Ge.collapseChildPlugin,options:i}])}}var R0;(function(e){e[e.Node=0]="Node",e[e.Line=1]="Line"})(R0||(R0={}));var O0;(function(e){e[e.None=0]="None",e[e.DisableEdit=1]="DisableEdit",e[e.DisableMove=2]="DisableMove",e[e.DisableScale=3]="DisableScale",e[e.DisableMoveScale=4]="DisableMoveScale",e[e.Disable=10]="Disable"})(O0||(O0={}));var P0;(function(e){e[e.Default=0]="Default",e[e.In=1]="In",e[e.Out=2]="Out"})(P0||(P0={}));var M0;(function(e){e[e.None=0]="None",e[e.Linear=1]="Linear",e[e.Radial=2]="Radial"})(M0||(M0={}));var N0;(function(e){e[e.CanvasTemplate=1]="CanvasTemplate",e[e.CanvasImageBottom=2]="CanvasImageBottom",e[e.CanvasMain=3]="CanvasMain",e[e.CanvasImage=4]="CanvasImage"})(N0||(N0={}));var L0;(function(e){e[e.Normal=0]="Normal",e[e.Beads=1]="Beads",e[e.Dot=2]="Dot",e[e.Arrow=3]="Arrow",e[e.WaterDrop=4]="WaterDrop",e[e.Custom=5]="Custom"})(L0||(L0={}));var U0;(function(e){e[e.Image=0]="Image",e[e.Icon=1]="Icon",e[e.Pen=2]="Pen",e[e.Element=3]="Element"})(U0||(U0={}));var q0;(function(e){e[e.None=0]="None",e[e.LineAnchor=1]="LineAnchor",e[e.NodeAnchor=2]="NodeAnchor",e[e.Line=3]="Line",e[e.Node=4]="Node",e[e.Resize=5]="Resize",e[e.Rotate=6]="Rotate",e[e.LineAnchorPrev=7]="LineAnchorPrev",e[e.LineAnchorNext=8]="LineAnchorNext"})(q0||(q0={}));var z0;(function(e){e[e.None=0]="None",e[e.Translate=1]="Translate",e[e.Select=2]="Select",e[e.Resize=3]="Resize",e[e.AddAnchor=4]="AddAnchor"})(z0||(z0={}));var j0;(function(e){e[e.None=0]="None",e[e.Down=1]="Down",e[e.Translate=2]="Translate"})(j0||(j0={}));var H0;(function(e){e[e.None=-1]="None",e[e.Up=0]="Up",e[e.Right=1]="Right",e[e.Bottom=2]="Bottom",e[e.Left=3]="Left"})(H0||(H0={}));var $0;(function(e){e[e.Mirror=0]="Mirror",e[e.Bilateral=1]="Bilateral",e[e.Free=2]="Free"})($0||($0={}));var W0;(function(e){e[e.Default=0]="Default",e[e.In=1]="In",e[e.Out=2]="Out",e[e.DisableConnected=3]="DisableConnected",e[e.DisableConnectTo=4]="DisableConnectTo",e[e.Disable=10]="Disable"})(W0||(W0={}));var V0;(function(e){e[e.Default=0]="Default",e[e.Line=1]="Line"})(V0||(V0={}));var co;(function(e){e[e.None=-1]="None",e[e.Document=0]="Document",e[e.Canvas=1]="Canvas"})(co||(co={})),co.Document;var K0;(function(e){e[e.Add=0]="Add",e[e.Update=1]="Update",e[e.Delete=2]="Delete",e[e.Replace=3]="Replace"})(K0||(K0={}));function G0(e){const t=parseInt,r=Math.round;let i=e.length,p={};if(i>9){const[l,s,c,d]=e=e.split(",");if(i=e.length,i<3||i>4)return null;p.r=t(l[3]=="a"?l.slice(5):l.slice(4)),p.g=t(s),p.b=t(c),p.a=d?parseFloat(d):-1}else{if(i==8||i==6||i<4)return null;i<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(i>4?e[4]+e[4]:"")),e=t(e.slice(1),16),i==9||i==5?(p.r=e>>24&255,p.g=e>>16&255,p.b=e>>8&255,p.a=r((e&255)/.255)/1e3):(p.r=e>>16,p.g=e>>8&255,p.b=e&255,p.a=-1)}return p}function gd(e,t,r,i){let p,l,s,c,d,o,n,h=Math.round,a=typeof r=="string";return typeof e!="number"||e<-1||e>1||typeof t!="string"||t[0]!="r"&&t[0]!="#"||r&&!a||(n=t.length>9,n=a?r.length>9?!0:r=="c"?!n:!1:n,d=G0(t),c=e<0,o=r&&r!="c"?G0(r):c?{r:0,g:0,b:0,a:-1}:{r:255,g:255,b:255,a:-1},e=c?e*-1:e,c=1-e,!d||!o)?null:(i?(p=h(c*d.r+e*o.r),l=h(c*d.g+e*o.g),s=h(c*d.b+e*o.b)):(p=h(Et(c*Et(d.r,2)+e*Et(o.r,2),.5)),l=h(Et(c*Et(d.g,2)+e*Et(o.g,2),.5)),s=h(Et(c*Et(d.b,2)+e*Et(o.b,2),.5))),a=d.a,o=o.a,d=a>=0||o>=0,a=d?a<0?o:o<0?a:a*c+o*e:0,n?"rgb"+(d?"a(":"(")+p+","+l+","+s+(d?","+h(a*1e3)/1e3:"")+")":"#"+(4294967296+p*16777216+l*65536+s*256+(d?h(a*255):0)).toString(16).slice(1,d?void 0:-2))}globalThis.pSBC=gd;var Q0;(function(e){e[e.None=0]="None",e[e.LocalStorage=1]="LocalStorage",e[e.Cookie=2]="Cookie"})(Q0||(Q0={})),location.host.indexOf("le5le.com");const ar={};var Y0;(function(e){e[e.Link=0]="Link",e[e.SetProps=1]="SetProps",e[e.StartAnimate=2]="StartAnimate",e[e.PauseAnimate=3]="PauseAnimate",e[e.StopAnimate=4]="StopAnimate",e[e.JS=5]="JS",e[e.GlobalFn=6]="GlobalFn",e[e.Emit=7]="Emit",e[e.StartVideo=8]="StartVideo",e[e.PauseVideo=9]="PauseVideo",e[e.StopVideo=10]="StopVideo",e[e.SendPropData=11]="SendPropData",e[e.SendVarData=12]="SendVarData",e[e.Navigator=13]="Navigator",e[e.Dialog=14]="Dialog",e[e.SendData=15]="SendData",e[e.PostMessage=16]="PostMessage",e[e.PostMessageToParent=17]="PostMessageToParent",e[e.Message=18]="Message"})(Y0||(Y0={}));var bd={exports:{}};(function(e,t){(function(r){e.exports=r()})(function(){return function(){return function r(i,p,l){function s(o,n){if(!p[o]){if(!i[o]){var h=typeof Sr=="function"&&Sr;if(!n&&h)return h(o,!0);if(c)return c(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var u=p[o]={exports:{}};i[o][0].call(u.exports,function(f){return s(i[o][1][f]||f)},u,u.exports,r,i,p,l)}return p[o].exports}for(var c=typeof Sr=="function"&&Sr,d=0;d<l.length;d++)s(l[d]);return s}}()({1:[function(r,i,p){(function(l,s){(function(){const c=r("events").EventEmitter,d=r("./store"),o=r("./topic-alias-recv"),n=r("./topic-alias-send"),h=r("mqtt-packet"),a=r("./default-message-id-provider"),u=r("readable-stream").Writable,f=r("inherits"),v=r("reinterval"),y=r("rfdc/default"),g=r("./validations"),b=r("xtend"),m=r("debug")("mqttjs:client"),E=l?l.nextTick:function(C){setTimeout(C,0)},F=s.setImmediate||function(C){E(C)},T={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},D={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function I(C,B){let N;B.properties&&(N=B.properties.topicAlias);let q=B.topic.toString();if(q.length===0){if(N===void 0)return new Error("Unregistered Topic Alias");if((q=C.topicAliasSend.getTopicByAlias(N))===void 0)return new Error("Unregistered Topic Alias");B.topic=q}N&&delete B.properties.topicAlias}function Y(C,B,N){m("sendPacket :: packet: %O",B),m("sendPacket :: emitting `packetsend`"),C.emit("packetsend",B),m("sendPacket :: writing to stream");const q=h.writeToStream(B,C.stream,C.options);m("sendPacket :: writeToStream result %s",q),!q&&N&&N!==_?(m("sendPacket :: handle events on `drain` once through callback."),C.stream.once("drain",N)):N&&(m("sendPacket :: invoking cb"),N())}function W(C,B,N,q){m("storeAndSend :: store packet with cmd %s to outgoingStore",B.cmd);let X,$=B;if($.cmd==="publish"&&($=y(B),X=I(C,$)))return N&&N(X);C.outgoingStore.put($,function(M){if(M)return N&&N(M);q(),Y(C,B,N)})}function _(C){m("nop ::",C)}function A(C,B){let N;const q=this;if(!(this instanceof A))return new A(C,B);for(N in this.options=B||{},T)this.options[N]===void 0?this.options[N]=T[N]:this.options[N]=B[N];m("MqttClient :: options.protocol",B.protocol),m("MqttClient :: options.protocolVersion",B.protocolVersion),m("MqttClient :: options.username",B.username),m("MqttClient :: options.keepalive",B.keepalive),m("MqttClient :: options.reconnectPeriod",B.reconnectPeriod),m("MqttClient :: options.rejectUnauthorized",B.rejectUnauthorized),m("MqttClient :: options.topicAliasMaximum",B.topicAliasMaximum),this.options.clientId=typeof B.clientId=="string"?B.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),m("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=B.protocolVersion===5&&B.customHandleAcks?B.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=C,this.messageIdProvider=this.options.messageIdProvider===void 0?new a:this.options.messageIdProvider,this.outgoingStore=B.outgoingStore||new d,this.incomingStore=B.incomingStore||new d,this.queueQoSZero=B.queueQoSZero===void 0||B.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,B.topicAliasMaximum>0&&(B.topicAliasMaximum>65535?m("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new o(B.topicAliasMaximum)),this.on("connect",function(){const X=this.queue;m("connect :: sending queued packets"),function $(){const M=X.shift();m("deliver :: entry %o",M);let j=null;if(!M)return void q._resubscribe();j=M.packet,m("deliver :: call _sendPacket for %o",j);let L=!0;j.messageId&&j.messageId!==0&&(q.messageIdProvider.register(j.messageId)||(L=!1)),L?q._sendPacket(j,function(R){M.cb&&M.cb(R),$()}):(m("messageId: %d has already used. The message is skipped and removed.",j.messageId),$())}()}),this.on("close",function(){m("close :: connected set to `false`"),this.connected=!1,m("close :: clearing connackTimer"),clearTimeout(this.connackTimer),m("close :: clearing ping timer"),q.pingTimer!==null&&(q.pingTimer.clear(),q.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),m("close :: calling _setupReconnect"),this._setupReconnect()}),c.call(this),m("MqttClient :: setting up stream"),this._setupStream()}f(A,c),A.prototype._setupStream=function(){const C=this,B=new u,N=h.parser(this.options);let q=null;const X=[];function $(){if(X.length)E(M);else{const L=q;q=null,L()}}function M(){m("work :: getting next packet in queue");const L=X.shift();if(L)m("work :: packet pulled from queue"),C._handlePacket(L,$);else{m("work :: no packets in queue");const R=q;q=null,m("work :: done flag is %s",!!R),R&&R()}}m("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),m("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),N.on("packet",function(L){m("parser :: on packet push to packets array."),X.push(L)}),B._write=function(L,R,H){q=H,m("writable stream :: parsing buffer"),N.parse(L),M()},m("_setupStream :: pipe stream to writable stream"),this.stream.pipe(B),this.stream.on("error",function(L){m("streamErrorHandler :: error",L.message),L.code?(m("streamErrorHandler :: emitting error"),C.emit("error",L)):_(L)}),this.stream.on("close",function(){var L;m("(%s)stream :: on close",C.options.clientId),(L=C.outgoing)&&(m("flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(L).forEach(function(R){L[R].volatile&&typeof L[R].cb=="function"&&(L[R].cb(new Error("Connection closed")),delete L[R])})),m("stream: emit close to MqttClient"),C.emit("close")}),m("_setupStream: sending packet `connect`");const j=Object.create(this.options);if(j.cmd="connect",this.topicAliasRecv&&(j.properties||(j.properties={}),this.topicAliasRecv&&(j.properties.topicAliasMaximum=this.topicAliasRecv.max)),Y(this,j),N.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return C.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"&&Y(this,b({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){m("!!connectTimeout hit!! Calling _cleanUp with force `true`"),C._cleanUp(!0)},this.options.connectTimeout)},A.prototype._handlePacket=function(C,B){const N=this.options;if(N.protocolVersion===5&&N.properties&&N.properties.maximumPacketSize&&N.properties.maximumPacketSize<C.length)return this.emit("error",new Error("exceeding packets size "+C.cmd)),this.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),this;switch(m("_handlePacket :: emitting packetreceive"),this.emit("packetreceive",C),C.cmd){case"publish":this._handlePublish(C,B);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(C),B();break;case"pubrel":this._handlePubrel(C,B);break;case"connack":this._handleConnack(C),B();break;case"auth":this._handleAuth(C),B();break;case"pingresp":this._handlePingresp(C),B();break;case"disconnect":this._handleDisconnect(C),B()}},A.prototype._checkDisconnecting=function(C){return this.disconnecting&&(C&&C!==_?C(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},A.prototype.publish=function(C,B,N,q){m("publish :: message `%s` to topic `%s`",B,C);const X=this.options;if(typeof N=="function"&&(q=N,N=null),N=b({qos:0,retain:!1,dup:!1},N),this._checkDisconnecting(q))return this;const $=this,M=function(){let j=0;if((N.qos===1||N.qos===2)&&(j=$._nextId())===null)return m("No messageId left"),!1;const L={cmd:"publish",topic:C,payload:B,qos:N.qos,retain:N.retain,messageId:j,dup:N.dup};switch(X.protocolVersion===5&&(L.properties=N.properties),m("publish :: qos",N.qos),N.qos){case 1:case 2:$.outgoing[L.messageId]={volatile:!1,cb:q||_},m("MqttClient:publish: packet cmd: %s",L.cmd),$._sendPacket(L,void 0,N.cbStorePut);break;default:m("MqttClient:publish: packet cmd: %s",L.cmd),$._sendPacket(L,q,N.cbStorePut)}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!M())&&this._storeProcessingQueue.push({invoke:M,cbStorePut:N.cbStorePut,callback:q}),this},A.prototype.subscribe=function(){const C=this,B=new Array(arguments.length);for(let V=0;V<arguments.length;V++)B[V]=arguments[V];const N=[];let q=B.shift();const X=q.resubscribe;let $=B.pop()||_,M=B.pop();const j=this.options.protocolVersion;delete q.resubscribe,typeof q=="string"&&(q=[q]),typeof $!="function"&&(M=$,$=_);const L=g.validateTopics(q);if(L!==null)return F($,new Error("Invalid topic "+L)),this;if(this._checkDisconnecting($))return m("subscribe: discconecting true"),this;const R={qos:0};if(j===5&&(R.nl=!1,R.rap=!1,R.rh=0),M=b(R,M),Array.isArray(q)?q.forEach(function(V){if(m("subscribe: array topic %s",V),!Object.prototype.hasOwnProperty.call(C._resubscribeTopics,V)||C._resubscribeTopics[V].qos<M.qos||X){const J={topic:V,qos:M.qos};j===5&&(J.nl=M.nl,J.rap=M.rap,J.rh=M.rh,J.properties=M.properties),m("subscribe: pushing topic `%s` and qos `%s` to subs list",J.topic,J.qos),N.push(J)}}):Object.keys(q).forEach(function(V){if(m("subscribe: object topic %s",V),!Object.prototype.hasOwnProperty.call(C._resubscribeTopics,V)||C._resubscribeTopics[V].qos<q[V].qos||X){const J={topic:V,qos:q[V].qos};j===5&&(J.nl=q[V].nl,J.rap=q[V].rap,J.rh=q[V].rh,J.properties=M.properties),m("subscribe: pushing `%s` to subs list",J),N.push(J)}}),!N.length)return $(null,[]),this;const H=function(){const V=C._nextId();if(V===null)return m("No messageId left"),!1;const J={cmd:"subscribe",subscriptions:N,qos:1,retain:!1,dup:!1,messageId:V};if(M.properties&&(J.properties=M.properties),C.options.resubscribe){m("subscribe :: resubscribe true");const ie=[];N.forEach(function(ne){if(C.options.reconnectPeriod>0){const oe={qos:ne.qos};j===5&&(oe.nl=ne.nl||!1,oe.rap=ne.rap||!1,oe.rh=ne.rh||0,oe.properties=ne.properties),C._resubscribeTopics[ne.topic]=oe,ie.push(ne.topic)}}),C.messageIdToTopic[J.messageId]=ie}return C.outgoing[J.messageId]={volatile:!0,cb:function(ie,ne){if(!ie){const oe=ne.granted;for(let x=0;x<oe.length;x+=1)N[x].qos=oe[x]}$(ie,N)}},m("subscribe :: call _sendPacket"),C._sendPacket(J),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!H())&&this._storeProcessingQueue.push({invoke:H,callback:$}),this},A.prototype.unsubscribe=function(){const C=this,B=new Array(arguments.length);for(let j=0;j<arguments.length;j++)B[j]=arguments[j];let N=B.shift(),q=B.pop()||_,X=B.pop();typeof N=="string"&&(N=[N]),typeof q!="function"&&(X=q,q=_);const $=g.validateTopics(N);if($!==null)return F(q,new Error("Invalid topic "+$)),this;if(C._checkDisconnecting(q))return this;const M=function(){const j=C._nextId();if(j===null)return m("No messageId left"),!1;const L={cmd:"unsubscribe",qos:1,messageId:j};return typeof N=="string"?L.unsubscriptions=[N]:Array.isArray(N)&&(L.unsubscriptions=N),C.options.resubscribe&&L.unsubscriptions.forEach(function(R){delete C._resubscribeTopics[R]}),typeof X=="object"&&X.properties&&(L.properties=X.properties),C.outgoing[L.messageId]={volatile:!0,cb:q},m("unsubscribe: call _sendPacket"),C._sendPacket(L),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!M())&&this._storeProcessingQueue.push({invoke:M,callback:q}),this},A.prototype.end=function(C,B,N){const q=this;function X(){m("end :: (%s) :: finish :: calling _cleanUp with force %s",q.options.clientId,C),q._cleanUp(C,()=>{m("end :: finish :: calling process.nextTick on closeStores"),E(function(){m("end :: closeStores: closing incoming and outgoing stores"),q.disconnected=!0,q.incomingStore.close(function($){q.outgoingStore.close(function(M){if(m("end :: closeStores: emitting end"),q.emit("end"),N){const j=$||M;m("end :: closeStores: invoking callback with args"),N(j)}})}),q._deferredReconnect&&q._deferredReconnect()}.bind(q))},B)}return m("end :: (%s)",this.options.clientId),C!=null&&typeof C=="boolean"||(N=B||_,B=C,C=!1,typeof B!="object"&&(N=B,B=null,typeof N!="function"&&(N=_))),typeof B!="object"&&(N=B,B=null),m("end :: cb? %s",!!N),N=N||_,this.disconnecting?(N(),this):(this._clearReconnect(),this.disconnecting=!0,!C&&Object.keys(this.outgoing).length>0?(m("end :: (%s) :: calling finish in 10ms once outgoing is empty",q.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,X,10))):(m("end :: (%s) :: immediately calling finish",q.options.clientId),X()),this)},A.prototype.removeOutgoingMessage=function(C){const B=this.outgoing[C]?this.outgoing[C].cb:null;return delete this.outgoing[C],this.outgoingStore.del({messageId:C},function(){B(new Error("Message removed"))}),this},A.prototype.reconnect=function(C){m("client reconnect");const B=this,N=function(){C?(B.options.incomingStore=C.incomingStore,B.options.outgoingStore=C.outgoingStore):(B.options.incomingStore=null,B.options.outgoingStore=null),B.incomingStore=B.options.incomingStore||new d,B.outgoingStore=B.options.outgoingStore||new d,B.disconnecting=!1,B.disconnected=!1,B._deferredReconnect=null,B._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=N:N(),this},A.prototype._reconnect=function(){m("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this._setupStream()}),m("client already connected. disconnecting first.")):(m("_reconnect: calling _setupStream"),this._setupStream())},A.prototype._setupReconnect=function(){const C=this;!C.disconnecting&&!C.reconnectTimer&&C.options.reconnectPeriod>0?(this.reconnecting||(m("_setupReconnect :: emit `offline` state"),this.emit("offline"),m("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),m("_setupReconnect :: setting reconnectTimer for %d ms",C.options.reconnectPeriod),C.reconnectTimer=setInterval(function(){m("reconnectTimer :: reconnect triggered!"),C._reconnect()},C.options.reconnectPeriod)):m("_setupReconnect :: doing nothing...")},A.prototype._clearReconnect=function(){m("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},A.prototype._cleanUp=function(C,B){const N=arguments[2];if(B&&(m("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",B)),m("_cleanUp :: forced? %s",C),C)this.options.reconnectPeriod===0&&this.options.clean&&(q=this.outgoing)&&(m("flush: queue exists? %b",!!q),Object.keys(q).forEach(function(X){typeof q[X].cb=="function"&&(q[X].cb(new Error("Connection closed")),delete q[X])})),m("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const X=b({cmd:"disconnect"},N);m("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(X,F.bind(null,this.stream.end.bind(this.stream)))}var q;this.disconnecting||(m("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(m("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),B&&!this.connected&&(m("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",B),B())},A.prototype._sendPacket=function(C,B,N){m("_sendPacket :: (%s) :: start",this.options.clientId),N=N||_,B=B||_;const q=function(X,$){if(X.options.protocolVersion===5&&$.cmd==="publish"){let M;$.properties&&(M=$.properties.topicAlias);const j=$.topic.toString();if(X.topicAliasSend)if(M){if(j.length!==0&&(m("applyTopicAlias :: register topic: %s - alias: %d",j,M),!X.topicAliasSend.put(j,M)))return m("applyTopicAlias :: error out of range. topic: %s - alias: %d",j,M),new Error("Sending Topic Alias out of range")}else j.length!==0&&(X.options.autoAssignTopicAlias?(M=X.topicAliasSend.getAliasByTopic(j))?($.topic="",$.properties=De(he({},$.properties),{topicAlias:M}),m("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",j,M)):(M=X.topicAliasSend.getLruAlias(),X.topicAliasSend.put(j,M),$.properties=De(he({},$.properties),{topicAlias:M}),m("applyTopicAlias :: auto assign topic: %s - alias: %d",j,M)):X.options.autoUseTopicAlias&&(M=X.topicAliasSend.getAliasByTopic(j))&&($.topic="",$.properties=De(he({},$.properties),{topicAlias:M}),m("applyTopicAlias :: auto use topic: %s - alias: %d",j,M)));else if(M)return m("applyTopicAlias :: error out of range. topic: %s - alias: %d",j,M),new Error("Sending Topic Alias out of range")}}(this,C);if(q)B(q);else{if(!this.connected)return C.cmd==="auth"?(this._shiftPingInterval(),void Y(this,C,B)):(m("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(C,B,N));switch(this._shiftPingInterval(),C.cmd){case"publish":break;case"pubrel":return void W(this,C,B,N);default:return void Y(this,C,B)}switch(C.qos){case 2:case 1:W(this,C,B,N);break;case 0:default:Y(this,C,B)}m("_sendPacket :: (%s) :: end",this.options.clientId)}},A.prototype._storePacket=function(C,B,N){m("_storePacket :: packet: %o",C),m("_storePacket :: cb? %s",!!B),N=N||_;let q=C;if(q.cmd==="publish"){const X=I(this,q=y(C));if(X)return B&&B(X)}(q.qos||0)===0&&this.queueQoSZero||q.cmd!=="publish"?this.queue.push({packet:q,cb:B}):q.qos>0?(B=this.outgoing[q.messageId]?this.outgoing[q.messageId].cb:null,this.outgoingStore.put(q,function(X){if(X)return B&&B(X);N()})):B&&B(new Error("No connection to broker"))},A.prototype._setupPingTimer=function(){m("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const C=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=v(function(){C._checkPing()},1e3*this.options.keepalive))},A.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},A.prototype._checkPing=function(){m("_checkPing :: checking ping..."),this.pingResp?(m("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(m("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},A.prototype._handlePingresp=function(){this.pingResp=!0},A.prototype._handleConnack=function(C){m("_handleConnack");const B=this.options,N=B.protocolVersion===5?C.reasonCode:C.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,C.properties){if(C.properties.topicAliasMaximum){if(C.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));C.properties.topicAliasMaximum>0&&(this.topicAliasSend=new n(C.properties.topicAliasMaximum))}C.properties.serverKeepAlive&&B.keepalive&&(B.keepalive=C.properties.serverKeepAlive,this._shiftPingInterval()),C.properties.maximumPacketSize&&(B.properties||(B.properties={}),B.properties.maximumPacketSize=C.properties.maximumPacketSize)}if(N===0)this.reconnecting=!1,this._onConnect(C);else if(N>0){const q=new Error("Connection refused: "+D[N]);q.code=N,this.emit("error",q)}},A.prototype._handleAuth=function(C){const B=this.options.protocolVersion,N=B===5?C.reasonCode:C.returnCode;if(B!==5){const X=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+B);return X.code=N,void this.emit("error",X)}const q=this;this.handleAuth(C,function(X,$){if(X)q.emit("error",X);else if(N===24)q.reconnecting=!1,q._sendPacket($);else{const M=new Error("Connection refused: "+D[N]);X.code=N,q.emit("error",M)}})},A.prototype.handleAuth=function(C,B){B()},A.prototype._handlePublish=function(C,B){m("_handlePublish: packet %o",C),B=B!==void 0?B:_;let N=C.topic.toString();const q=C.payload,X=C.qos,$=C.messageId,M=this,j=this.options,L=[0,16,128,131,135,144,145,151,153];if(this.options.protocolVersion===5){let R;if(C.properties&&(R=C.properties.topicAlias),R!==void 0)if(N.length===0){if(!(R>0&&R<=65535))return m("_handlePublish :: topic alias out of range. alias: %d",R),void this.emit("error",new Error("Received Topic Alias is out of range"));{const H=this.topicAliasRecv.getTopicByAlias(R);if(!H)return m("_handlePublish :: unregistered topic alias. alias: %d",R),void this.emit("error",new Error("Received unregistered Topic Alias"));m("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",N=H,R)}}else{if(!this.topicAliasRecv.put(N,R))return m("_handlePublish :: topic alias out of range. alias: %d",R),void this.emit("error",new Error("Received Topic Alias is out of range"));m("_handlePublish :: registered topic: %s - alias: %d",N,R)}}switch(m("_handlePublish: qos %d",X),X){case 2:j.customHandleAcks(N,q,C,function(R,H){return R instanceof Error||(H=R,R=null),R?M.emit("error",R):L.indexOf(H)===-1?M.emit("error",new Error("Wrong reason code for pubrec")):void(H?M._sendPacket({cmd:"pubrec",messageId:$,reasonCode:H},B):M.incomingStore.put(C,function(){M._sendPacket({cmd:"pubrec",messageId:$},B)}))});break;case 1:j.customHandleAcks(N,q,C,function(R,H){return R instanceof Error||(H=R,R=null),R?M.emit("error",R):L.indexOf(H)===-1?M.emit("error",new Error("Wrong reason code for puback")):(H||M.emit("message",N,q,C),void M.handleMessage(C,function(V){if(V)return B&&B(V);M._sendPacket({cmd:"puback",messageId:$,reasonCode:H},B)}))});break;case 0:this.emit("message",N,q,C),this.handleMessage(C,B);break;default:m("_handlePublish: unknown QoS. Doing nothing.")}},A.prototype.handleMessage=function(C,B){B()},A.prototype._handleAck=function(C){const B=C.messageId,N=C.cmd;let q=null;const X=this.outgoing[B]?this.outgoing[B].cb:null,$=this;let M;if(X){switch(m("_handleAck :: packet type",N),N){case"pubcomp":case"puback":{const j=C.reasonCode;j&&j>0&&j!==16&&((M=new Error("Publish error: "+D[j])).code=j,X(M,C)),delete this.outgoing[B],this.outgoingStore.del(C,X),this.messageIdProvider.deallocate(B),this._invokeStoreProcessingQueue();break}case"pubrec":{q={cmd:"pubrel",qos:2,messageId:B};const j=C.reasonCode;j&&j>0&&j!==16?((M=new Error("Publish error: "+D[j])).code=j,X(M,C)):this._sendPacket(q);break}case"suback":delete this.outgoing[B],this.messageIdProvider.deallocate(B);for(let j=0;j<C.granted.length;j++)if(128&C.granted[j]){const L=this.messageIdToTopic[B];L&&L.forEach(function(R){delete $._resubscribeTopics[R]})}this._invokeStoreProcessingQueue(),X(null,C);break;case"unsuback":delete this.outgoing[B],this.messageIdProvider.deallocate(B),this._invokeStoreProcessingQueue(),X(null);break;default:$.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")}else m("_handleAck :: Server sent an ack in error. Ignoring.")},A.prototype._handlePubrel=function(C,B){m("handling pubrel packet"),B=B!==void 0?B:_;const N=this,q={cmd:"pubcomp",messageId:C.messageId};N.incomingStore.get(C,function(X,$){X?N._sendPacket(q,B):(N.emit("message",$.topic,$.payload,$),N.handleMessage($,function(M){if(M)return B(M);N.incomingStore.del($,_),N._sendPacket(q,B)}))})},A.prototype._handleDisconnect=function(C){this.emit("disconnect",C)},A.prototype._nextId=function(){return this.messageIdProvider.allocate()},A.prototype.getLastMessageId=function(){return this.messageIdProvider.getLastAllocated()},A.prototype._resubscribe=function(){m("_resubscribe");const C=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion===5&&!this.connackPacket.sessionPresent)&&C.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){m("_resubscribe: protocolVersion 5");for(let B=0;B<C.length;B++){const N={};N[C[B]]=this._resubscribeTopics[C[B]],N.resubscribe=!0,this.subscribe(N,{properties:N[C[B]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1},A.prototype._onConnect=function(C){if(this.disconnected)return void this.emit("connect",C);const B=this;this.connackPacket=C,this.messageIdProvider.clear(),this._setupPingTimer(),this.connected=!0,function N(){let q=B.outgoingStore.createStream();function X(){B._storeProcessing=!1,B._packetIdsDuringStoreProcessing={}}function $(){q.destroy(),q=null,B._flushStoreProcessingQueue(),X()}B.once("close",$),q.on("error",function(M){X(),B._flushStoreProcessingQueue(),B.removeListener("close",$),B.emit("error",M)}),q.on("end",function(){let M=!0;for(const j in B._packetIdsDuringStoreProcessing)if(!B._packetIdsDuringStoreProcessing[j]){M=!1;break}M?(X(),B.removeListener("close",$),B._invokeAllStoreProcessingQueue(),B.emit("connect",C)):N()}),function M(){if(!q)return;B._storeProcessing=!0;const j=q.read(1);let L;j?B._packetIdsDuringStoreProcessing[j.messageId]?M():B.disconnecting||B.reconnectTimer?q.destroy&&q.destroy():(L=B.outgoing[j.messageId]?B.outgoing[j.messageId].cb:null,B.outgoing[j.messageId]={volatile:!1,cb:function(R,H){L&&L(R,H),M()}},B._packetIdsDuringStoreProcessing[j.messageId]=!0,B.messageIdProvider.register(j.messageId)?B._sendPacket(j):m("messageId: %d has already used.",j.messageId)):q.once("readable",M)}()}()},A.prototype._invokeStoreProcessingQueue=function(){if(this._storeProcessingQueue.length>0){const C=this._storeProcessingQueue[0];if(C&&C.invoke())return this._storeProcessingQueue.shift(),!0}return!1},A.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},A.prototype._flushStoreProcessingQueue=function(){for(const C of this._storeProcessingQueue)C.cbStorePut&&C.cbStorePut(new Error("Connection closed")),C.callback&&C.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},i.exports=A}).call(this)}).call(this,r("_process"),typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(r,i,p){const{Buffer:l}=r("buffer"),s=r("readable-stream").Transform,c=r("duplexify");let d,o,n,h=!1;i.exports=function(a,u){if(u.hostname=u.hostname||u.host,!u.hostname)throw new Error("Could not determine host. Specify host manually.");const f=u.protocolId==="MQIsdp"&&u.protocolVersion===3?"mqttv3.1":"mqtt";(function(y){y.hostname||(y.hostname="localhost"),y.path||(y.path="/"),y.wsOptions||(y.wsOptions={})})(u);const v=function(y,g){const b=y.protocol==="alis"?"wss":"ws";let m=b+"://"+y.hostname+y.path;return y.port&&y.port!==80&&y.port!==443&&(m=b+"://"+y.hostname+":"+y.port+y.path),typeof y.transformWsUrl=="function"&&(m=y.transformWsUrl(m,y,g)),m}(u,a);return(d=u.my).connectSocket({url:v,protocols:f}),o=function(){const y=new s;return y._write=function(g,b,m){d.sendSocketMessage({data:g.buffer,success:function(){m()},fail:function(){m(new Error)}})},y._flush=function(g){d.closeSocket({success:function(){g()}})},y}(),n=c.obj(),h||(h=!0,d.onSocketOpen(function(){n.setReadable(o),n.setWritable(o),n.emit("connect")}),d.onSocketMessage(function(y){if(typeof y.data=="string"){const g=l.from(y.data,"base64");o.push(g)}else{const g=new FileReader;g.addEventListener("load",function(){let b=g.result;b=b instanceof ArrayBuffer?l.from(b):l.from(b,"utf8"),o.push(b)}),g.readAsArrayBuffer(y.data)}}),d.onSocketClose(function(){n.end(),n.destroy()}),d.onSocketError(function(y){n.destroy(y)})),n}},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(r,i,p){const l=r("net"),s=r("debug")("mqttjs:tcp");i.exports=function(c,d){d.port=d.port||1883,d.hostname=d.hostname||d.host||"localhost";const o=d.port,n=d.hostname;return s("port %d and host %s",o,n),l.createConnection(o,n)}},{debug:18,net:16}],4:[function(r,i,p){const l=r("tls"),s=r("net"),c=r("debug")("mqttjs:tls");i.exports=function(d,o){o.port=o.port||8883,o.host=o.hostname||o.host||"localhost",s.isIP(o.host)===0&&(o.servername=o.host),o.rejectUnauthorized=o.rejectUnauthorized!==!1,delete o.path,c("port %d host %s rejectUnauthorized %b",o.port,o.host,o.rejectUnauthorized);const n=l.connect(o);function h(a){o.rejectUnauthorized&&d.emit("error",a),n.end()}return n.on("secureConnect",function(){o.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",h)}),n.on("error",h),n}},{debug:18,net:16,tls:16}],5:[function(r,i,p){(function(l){(function(){const{Buffer:s}=r("buffer"),c=r("ws"),d=r("debug")("mqttjs:ws"),o=r("duplexify"),n=r("readable-stream").Transform,h=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],a=l!==void 0&&l.title==="browser"||typeof __webpack_require__=="function";function u(v,y){let g=v.protocol+"://"+v.hostname+":"+v.port+v.path;return typeof v.transformWsUrl=="function"&&(g=v.transformWsUrl(g,v,y)),g}function f(v){const y=v;return v.hostname||(y.hostname="localhost"),v.port||(v.protocol==="wss"?y.port=443:y.port=80),v.path||(y.path="/"),v.wsOptions||(y.wsOptions={}),a||v.protocol!=="wss"||h.forEach(function(g){Object.prototype.hasOwnProperty.call(v,g)&&!Object.prototype.hasOwnProperty.call(v.wsOptions,g)&&(y.wsOptions[g]=v[g])}),y}i.exports=a?function(v,y){let g;d("browserStreamBuilder");const b=function(C){const B=f(C);if(B.hostname||(B.hostname=B.host),!B.hostname){if(typeof document=="undefined")throw new Error("Could not determine host. Specify host manually.");const N=new URL(document.URL);B.hostname=N.hostname,B.port||(B.port=N.port)}return B.objectMode===void 0&&(B.objectMode=!(B.binary===!0||B.binary===void 0)),B}(y).browserBufferSize||524288,m=y.browserBufferTimeout||1e3,E=!y.objectMode,F=function(C,B){const N=B.protocolId==="MQIsdp"&&B.protocolVersion===3?"mqttv3.1":"mqtt",q=u(B,C),X=new WebSocket(q,[N]);return X.binaryType="arraybuffer",X}(v,y),T=function(C,B,N){const q=new n({objectModeMode:C.objectMode});return q._write=B,q._flush=N,q}(y,function C(B,N,q){F.bufferedAmount>b&&setTimeout(C,m,B,N,q),E&&typeof B=="string"&&(B=s.from(B,"utf8"));try{F.send(B)}catch(X){return q(X)}q()},function(C){F.close(),C()});y.objectMode||(T._writev=A),T.on("close",()=>{F.close()});const D=F.addEventListener!==void 0;function I(){g.setReadable(T),g.setWritable(T),g.emit("connect")}function Y(){g.end(),g.destroy()}function W(C){g.destroy(C)}function _(C){let B=C.data;B=B instanceof ArrayBuffer?s.from(B):s.from(B,"utf8"),T.push(B)}function A(C,B){const N=new Array(C.length);for(let q=0;q<C.length;q++)typeof C[q].chunk=="string"?N[q]=s.from(C[q],"utf8"):N[q]=C[q].chunk;this._write(s.concat(N),"binary",B)}return F.readyState===F.OPEN?g=T:(g=g=o(void 0,void 0,y),y.objectMode||(g._writev=A),D?F.addEventListener("open",I):F.onopen=I),g.socket=F,D?(F.addEventListener("close",Y),F.addEventListener("error",W),F.addEventListener("message",_)):(F.onclose=Y,F.onerror=W,F.onmessage=_),g}:function(v,y){d("streamBuilder");const g=f(y),b=u(g,v),m=function(F,T,D){d("createWebSocket"),d("protocol: "+D.protocolId+" "+D.protocolVersion);const I=D.protocolId==="MQIsdp"&&D.protocolVersion===3?"mqttv3.1":"mqtt";return d("creating new Websocket for url: "+T+" and protocol: "+I),new c(T,[I],D.wsOptions)}(0,b,g),E=c.createWebSocketStream(m,g.wsOptions);return E.url=b,m.on("close",()=>{E.destroy()}),E}}).call(this)}).call(this,r("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(r,i,p){const{Buffer:l}=r("buffer"),s=r("readable-stream").Transform,c=r("duplexify");let d,o,n;i.exports=function(h,a){if(a.hostname=a.hostname||a.host,!a.hostname)throw new Error("Could not determine host. Specify host manually.");const u=a.protocolId==="MQIsdp"&&a.protocolVersion===3?"mqttv3.1":"mqtt";(function(y){y.hostname||(y.hostname="localhost"),y.path||(y.path="/"),y.wsOptions||(y.wsOptions={})})(a);const f=function(y,g){const b=y.protocol==="wxs"?"wss":"ws";let m=b+"://"+y.hostname+y.path;return y.port&&y.port!==80&&y.port!==443&&(m=b+"://"+y.hostname+":"+y.port+y.path),typeof y.transformWsUrl=="function"&&(m=y.transformWsUrl(m,y,g)),m}(a,h);d=wx.connectSocket({url:f,protocols:[u]}),o=function(){const y=new s;return y._write=function(g,b,m){d.send({data:g.buffer,success:function(){m()},fail:function(E){m(new Error(E))}})},y._flush=function(g){d.close({success:function(){g()}})},y}(),(n=c.obj())._destroy=function(y,g){d.close({success:function(){g&&g(y)}})};const v=n.destroy;return n.destroy=function(){n.destroy=v;const y=this;setTimeout(function(){d.close({fail:function(){y._destroy(new Error)}})},0)}.bind(n),d.onOpen(function(){n.setReadable(o),n.setWritable(o),n.emit("connect")}),d.onMessage(function(y){let g=y.data;g=g instanceof ArrayBuffer?l.from(g):l.from(g,"utf8"),o.push(g)}),d.onClose(function(){n.end(),n.destroy()}),d.onError(function(y){n.destroy(new Error(y.errMsg))}),n}},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(r,i,p){function l(){if(!(this instanceof l))return new l;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}l.prototype.allocate=function(){const s=this.nextId++;return this.nextId===65536&&(this.nextId=1),s},l.prototype.getLastAllocated=function(){return this.nextId===1?65535:this.nextId-1},l.prototype.register=function(s){return!0},l.prototype.deallocate=function(s){},l.prototype.clear=function(){},i.exports=l},{}],8:[function(r,i,p){const l=r("xtend"),s=r("readable-stream").Readable,c={objectMode:!0},d={clean:!0};function o(n){if(!(this instanceof o))return new o(n);this.options=n||{},this.options=l(d,n),this._inflights=new Map}o.prototype.put=function(n,h){return this._inflights.set(n.messageId,n),h&&h(),this},o.prototype.createStream=function(){const n=new s(c),h=[];let a=!1,u=0;return this._inflights.forEach(function(f,v){h.push(f)}),n._read=function(){!a&&u<h.length?this.push(h[u++]):this.push(null)},n.destroy=function(){if(a)return;const f=this;a=!0,setTimeout(function(){f.emit("close")},0)},n},o.prototype.del=function(n,h){return(n=this._inflights.get(n.messageId))?(this._inflights.delete(n.messageId),h(null,n)):h&&h(new Error("missing packet")),this},o.prototype.get=function(n,h){return(n=this._inflights.get(n.messageId))?h(null,n):h&&h(new Error("missing packet")),this},o.prototype.close=function(n){this.options.clean&&(this._inflights=null),n&&n()},i.exports=o},{"readable-stream":69,xtend:81}],9:[function(r,i,p){function l(s){if(!(this instanceof l))return new l(s);this.aliasToTopic={},this.max=s}l.prototype.put=function(s,c){return!(c===0||c>this.max)&&(this.aliasToTopic[c]=s,this.length=Object.keys(this.aliasToTopic).length,!0)},l.prototype.getTopicByAlias=function(s){return this.aliasToTopic[s]},l.prototype.clear=function(){this.aliasToTopic={}},i.exports=l},{}],10:[function(r,i,p){const l=r("lru-cache"),s=r("number-allocator").NumberAllocator;function c(d){if(!(this instanceof c))return new c(d);d>0&&(this.aliasToTopic=new l({max:d}),this.topicToAlias={},this.numberAllocator=new s(1,d),this.max=d,this.length=0)}c.prototype.put=function(d,o){if(o===0||o>this.max)return!1;const n=this.aliasToTopic.get(o);return n&&delete this.topicToAlias[n],this.aliasToTopic.set(o,d),this.topicToAlias[d]=o,this.numberAllocator.use(o),this.length=this.aliasToTopic.length,!0},c.prototype.getTopicByAlias=function(d){return this.aliasToTopic.get(d)},c.prototype.getAliasByTopic=function(d){const o=this.topicToAlias[d];return o!==void 0&&this.aliasToTopic.get(o),o},c.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},c.prototype.getLruAlias=function(){return this.numberAllocator.firstVacant()||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},i.exports=c},{"lru-cache":37,"number-allocator":46}],11:[function(r,i,p){function l(s){const c=s.split("/");for(let d=0;d<c.length;d++)if(c[d]!=="+"){if(c[d]==="#")return d===c.length-1;if(c[d].indexOf("+")!==-1||c[d].indexOf("#")!==-1)return!1}return!0}i.exports={validateTopics:function(s){if(s.length===0)return"empty_topic_list";for(let c=0;c<s.length;c++)if(!l(s[c]))return s[c];return null}}},{}],12:[function(r,i,p){(function(l){(function(){const s=r("../client"),c=r("../store"),d=r("url"),o=r("xtend"),n=r("debug")("mqttjs"),h={};function a(u,f){if(n("connecting to an MQTT broker..."),typeof u!="object"||f||(f=u,u=null),f=f||{},u){const y=d.parse(u,!0);if(y.port!=null&&(y.port=Number(y.port)),(f=o(y,f)).protocol===null)throw new Error("Missing protocol");f.protocol=f.protocol.replace(/:$/,"")}if(function(y){let g;y.auth&&((g=y.auth.match(/^(.+):(.+)$/))?(y.username=g[1],y.password=g[2]):y.username=y.auth)}(f),f.query&&typeof f.query.clientId=="string"&&(f.clientId=f.query.clientId),f.cert&&f.key){if(!f.protocol)throw new Error("Missing secure protocol key");if(["mqtts","wss","wxs","alis"].indexOf(f.protocol)===-1)switch(f.protocol){case"mqtt":f.protocol="mqtts";break;case"ws":f.protocol="wss";break;case"wx":f.protocol="wxs";break;case"ali":f.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+f.protocol+'"!')}}if(!h[f.protocol]){const y=["mqtts","wss"].indexOf(f.protocol)!==-1;f.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter(function(g,b){return(!y||b%2!=0)&&typeof h[g]=="function"})[0]}if(f.clean===!1&&!f.clientId)throw new Error("Missing clientId for unclean clients");f.protocol&&(f.defaultProtocol=f.protocol);const v=new s(function(y){return f.servers&&(y._reconnectCount&&y._reconnectCount!==f.servers.length||(y._reconnectCount=0),f.host=f.servers[y._reconnectCount].host,f.port=f.servers[y._reconnectCount].port,f.protocol=f.servers[y._reconnectCount].protocol?f.servers[y._reconnectCount].protocol:f.defaultProtocol,f.hostname=f.host,y._reconnectCount++),n("calling streambuilder for",f.protocol),h[f.protocol](y,f)},f);return v.on("error",function(){}),v}l!==void 0&&l.title!=="browser"||typeof __webpack_require__!="function"?(h.mqtt=r("./tcp"),h.tcp=r("./tcp"),h.ssl=r("./tls"),h.tls=r("./tls"),h.mqtts=r("./tls")):(h.wx=r("./wx"),h.wxs=r("./wx"),h.ali=r("./ali"),h.alis=r("./ali")),h.ws=r("./ws"),h.wss=r("./ws"),i.exports=a,i.exports.connect=a,i.exports.MqttClient=s,i.exports.Store=c}).call(this)}).call(this,r("_process"))},{"../client":1,"../store":8,"./ali":2,"./tcp":3,"./tls":4,"./ws":5,"./wx":6,_process:50,debug:18,url:76,xtend:81}],13:[function(r,i,p){p.byteLength=function(u){var f=h(u),v=f[0],y=f[1];return 3*(v+y)/4-y},p.toByteArray=function(u){var f,v,y=h(u),g=y[0],b=y[1],m=new c(function(T,D,I){return 3*(D+I)/4-I}(0,g,b)),E=0,F=b>0?g-4:g;for(v=0;v<F;v+=4)f=s[u.charCodeAt(v)]<<18|s[u.charCodeAt(v+1)]<<12|s[u.charCodeAt(v+2)]<<6|s[u.charCodeAt(v+3)],m[E++]=f>>16&255,m[E++]=f>>8&255,m[E++]=255&f;return b===2&&(f=s[u.charCodeAt(v)]<<2|s[u.charCodeAt(v+1)]>>4,m[E++]=255&f),b===1&&(f=s[u.charCodeAt(v)]<<10|s[u.charCodeAt(v+1)]<<4|s[u.charCodeAt(v+2)]>>2,m[E++]=f>>8&255,m[E++]=255&f),m},p.fromByteArray=function(u){for(var f,v=u.length,y=v%3,g=[],b=0,m=v-y;b<m;b+=16383)g.push(a(u,b,b+16383>m?m:b+16383));return y===1?(f=u[v-1],g.push(l[f>>2]+l[f<<4&63]+"==")):y===2&&(f=(u[v-2]<<8)+u[v-1],g.push(l[f>>10]+l[f>>4&63]+l[f<<2&63]+"=")),g.join("")};for(var l=[],s=[],c=typeof Uint8Array!="undefined"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=d.length;o<n;++o)l[o]=d[o],s[d.charCodeAt(o)]=o;function h(u){var f=u.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=u.indexOf("=");return v===-1&&(v=f),[v,v===f?0:4-v%4]}function a(u,f,v){for(var y,g,b=[],m=f;m<v;m+=3)y=(u[m]<<16&16711680)+(u[m+1]<<8&65280)+(255&u[m+2]),b.push(l[(g=y)>>18&63]+l[g>>12&63]+l[g>>6&63]+l[63&g]);return b.join("")}s[45]=62,s[95]=63},{}],14:[function(r,i,p){const{Buffer:l}=r("buffer"),s=Symbol.for("BufferList");function c(d){if(!(this instanceof c))return new c(d);c._init.call(this,d)}c._init=function(d){Object.defineProperty(this,s,{value:!0}),this._bufs=[],this.length=0,d&&this.append(d)},c.prototype._new=function(d){return new c(d)},c.prototype._offset=function(d){if(d===0)return[0,0];let o=0;for(let n=0;n<this._bufs.length;n++){const h=o+this._bufs[n].length;if(d<h||n===this._bufs.length-1)return[n,d-o];o=h}},c.prototype._reverseOffset=function(d){const o=d[0];let n=d[1];for(let h=0;h<o;h++)n+=this._bufs[h].length;return n},c.prototype.get=function(d){if(d>this.length||d<0)return;const o=this._offset(d);return this._bufs[o[0]][o[1]]},c.prototype.slice=function(d,o){return typeof d=="number"&&d<0&&(d+=this.length),typeof o=="number"&&o<0&&(o+=this.length),this.copy(null,0,d,o)},c.prototype.copy=function(d,o,n,h){if((typeof n!="number"||n<0)&&(n=0),(typeof h!="number"||h>this.length)&&(h=this.length),n>=this.length||h<=0)return d||l.alloc(0);const a=!!d,u=this._offset(n),f=h-n;let v=f,y=a&&o||0,g=u[1];if(n===0&&h===this.length){if(!a)return this._bufs.length===1?this._bufs[0]:l.concat(this._bufs,this.length);for(let b=0;b<this._bufs.length;b++)this._bufs[b].copy(d,y),y+=this._bufs[b].length;return d}if(v<=this._bufs[u[0]].length-g)return a?this._bufs[u[0]].copy(d,o,g,g+v):this._bufs[u[0]].slice(g,g+v);a||(d=l.allocUnsafe(f));for(let b=u[0];b<this._bufs.length;b++){const m=this._bufs[b].length-g;if(!(v>m)){this._bufs[b].copy(d,y,g,g+v),y+=m;break}this._bufs[b].copy(d,y,g),y+=m,v-=m,g&&(g=0)}return d.length>y?d.slice(0,y):d},c.prototype.shallowSlice=function(d,o){if(d=d||0,o=typeof o!="number"?this.length:o,d<0&&(d+=this.length),o<0&&(o+=this.length),d===o)return this._new();const n=this._offset(d),h=this._offset(o),a=this._bufs.slice(n[0],h[0]+1);return h[1]===0?a.pop():a[a.length-1]=a[a.length-1].slice(0,h[1]),n[1]!==0&&(a[0]=a[0].slice(n[1])),this._new(a)},c.prototype.toString=function(d,o,n){return this.slice(o,n).toString(d)},c.prototype.consume=function(d){if(d=Math.trunc(d),Number.isNaN(d)||d<=0)return this;for(;this._bufs.length;){if(!(d>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(d),this.length-=d;break}d-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},c.prototype.duplicate=function(){const d=this._new();for(let o=0;o<this._bufs.length;o++)d.append(this._bufs[o]);return d},c.prototype.append=function(d){if(d==null)return this;if(d.buffer)this._appendBuffer(l.from(d.buffer,d.byteOffset,d.byteLength));else if(Array.isArray(d))for(let o=0;o<d.length;o++)this.append(d[o]);else if(this._isBufferList(d))for(let o=0;o<d._bufs.length;o++)this.append(d._bufs[o]);else typeof d=="number"&&(d=d.toString()),this._appendBuffer(l.from(d));return this},c.prototype._appendBuffer=function(d){this._bufs.push(d),this.length+=d.length},c.prototype.indexOf=function(d,o,n){if(n===void 0&&typeof o=="string"&&(n=o,o=void 0),typeof d=="function"||Array.isArray(d))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof d=="number"?d=l.from([d]):typeof d=="string"?d=l.from(d,n):this._isBufferList(d)?d=d.slice():Array.isArray(d.buffer)?d=l.from(d.buffer,d.byteOffset,d.byteLength):l.isBuffer(d)||(d=l.from(d)),o=Number(o||0),isNaN(o)&&(o=0),o<0&&(o=this.length+o),o<0&&(o=0),d.length===0)return o>this.length?this.length:o;const h=this._offset(o);let a=h[0],u=h[1];for(;a<this._bufs.length;a++){const f=this._bufs[a];for(;u<f.length;)if(f.length-u>=d.length){const v=f.indexOf(d,u);if(v!==-1)return this._reverseOffset([a,v]);u=f.length-d.length+1}else{const v=this._reverseOffset([a,u]);if(this._match(v,d))return v;u++}u=0}return-1},c.prototype._match=function(d,o){if(this.length-d<o.length)return!1;for(let n=0;n<o.length;n++)if(this.get(d+n)!==o[n])return!1;return!0},function(){const d={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const o in d)(function(n){c.prototype[n]=d[n]===null?function(h,a){return this.slice(h,h+a)[n](0,a)}:function(h=0){return this.slice(h,h+d[n])[n](0)}})(o)}(),c.prototype._isBufferList=function(d){return d instanceof c||c.isBufferList(d)},c.isBufferList=function(d){return d!=null&&d[s]},i.exports=c},{buffer:17}],15:[function(r,i,p){const l=r("readable-stream").Duplex,s=r("inherits"),c=r("./BufferList");function d(o){if(!(this instanceof d))return new d(o);if(typeof o=="function"){this._callback=o;const n=function(h){this._callback&&(this._callback(h),this._callback=null)}.bind(this);this.on("pipe",function(h){h.on("error",n)}),this.on("unpipe",function(h){h.removeListener("error",n)}),o=null}c._init.call(this,o),l.call(this)}s(d,l),Object.assign(d.prototype,c.prototype),d.prototype._new=function(o){return new d(o)},d.prototype._write=function(o,n,h){this._appendBuffer(o),typeof h=="function"&&h()},d.prototype._read=function(o){if(!this.length)return this.push(null);o=Math.min(o,this.length),this.push(this.slice(0,o)),this.consume(o)},d.prototype.end=function(o){l.prototype.end.call(this,o),this._callback&&(this._callback(null,this.slice()),this._callback=null)},d.prototype._destroy=function(o,n){this._bufs.length=0,this.length=0,n(o)},d.prototype._isBufferList=function(o){return o instanceof d||o instanceof c||d.isBufferList(o)},d.isBufferList=c.isBufferList,i.exports=d,i.exports.BufferListStream=d,i.exports.BufferList=c},{"./BufferList":14,inherits:24,"readable-stream":69}],16:[function(r,i,p){},{}],17:[function(r,i,p){(function(l){(function(){var s=r("base64-js"),c=r("ieee754");p.Buffer=n,p.SlowBuffer=function(x){return+x!=x&&(x=0),n.alloc(+x)},p.INSPECT_MAX_BYTES=50;var d=2147483647;function o(x){if(x>d)throw new RangeError('The value "'+x+'" is invalid for option "size"');var w=new Uint8Array(x);return w.__proto__=n.prototype,w}function n(x,w,O){if(typeof x=="number"){if(typeof w=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(x)}return h(x,w,O)}function h(x,w,O){if(typeof x=="string")return function(ee,ae){if(typeof ae=="string"&&ae!==""||(ae="utf8"),!n.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);var z=0|y(ee,ae),S=o(z),k=S.write(ee,ae);return k!==z&&(S=S.slice(0,k)),S}(x,w);if(ArrayBuffer.isView(x))return f(x);if(x==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(ne(x,ArrayBuffer)||x&&ne(x.buffer,ArrayBuffer))return function(ee,ae,z){if(ae<0||ee.byteLength<ae)throw new RangeError('"offset" is outside of buffer bounds');if(ee.byteLength<ae+(z||0))throw new RangeError('"length" is outside of buffer bounds');var S;return S=ae===void 0&&z===void 0?new Uint8Array(ee):z===void 0?new Uint8Array(ee,ae):new Uint8Array(ee,ae,z),S.__proto__=n.prototype,S}(x,w,O);if(typeof x=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var K=x.valueOf&&x.valueOf();if(K!=null&&K!==x)return n.from(K,w,O);var Z=function(ee){if(n.isBuffer(ee)){var ae=0|v(ee.length),z=o(ae);return z.length===0||ee.copy(z,0,0,ae),z}if(ee.length!==void 0)return typeof ee.length!="number"||oe(ee.length)?o(0):f(ee);if(ee.type==="Buffer"&&Array.isArray(ee.data))return f(ee.data)}(x);if(Z)return Z;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return n.from(x[Symbol.toPrimitive]("string"),w,O);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}function a(x){if(typeof x!="number")throw new TypeError('"size" argument must be of type number');if(x<0)throw new RangeError('The value "'+x+'" is invalid for option "size"')}function u(x){return a(x),o(x<0?0:0|v(x))}function f(x){for(var w=x.length<0?0:0|v(x.length),O=o(w),K=0;K<w;K+=1)O[K]=255&x[K];return O}function v(x){if(x>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|x}function y(x,w){if(n.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||ne(x,ArrayBuffer))return x.byteLength;if(typeof x!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof x);var O=x.length,K=arguments.length>2&&arguments[2]===!0;if(!K&&O===0)return 0;for(var Z=!1;;)switch(w){case"ascii":case"latin1":case"binary":return O;case"utf8":case"utf-8":return V(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*O;case"hex":return O>>>1;case"base64":return J(x).length;default:if(Z)return K?-1:V(x).length;w=(""+w).toLowerCase(),Z=!0}}function g(x,w,O){var K=x[w];x[w]=x[O],x[O]=K}function b(x,w,O,K,Z){if(x.length===0)return-1;if(typeof O=="string"?(K=O,O=0):O>2147483647?O=2147483647:O<-2147483648&&(O=-2147483648),oe(O=+O)&&(O=Z?0:x.length-1),O<0&&(O=x.length+O),O>=x.length){if(Z)return-1;O=x.length-1}else if(O<0){if(!Z)return-1;O=0}if(typeof w=="string"&&(w=n.from(w,K)),n.isBuffer(w))return w.length===0?-1:m(x,w,O,K,Z);if(typeof w=="number")return w&=255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(x,w,O):Uint8Array.prototype.lastIndexOf.call(x,w,O):m(x,[w],O,K,Z);throw new TypeError("val must be string, number or Buffer")}function m(x,w,O,K,Z){var ee,ae=1,z=x.length,S=w.length;if(K!==void 0&&((K=String(K).toLowerCase())==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(x.length<2||w.length<2)return-1;ae=2,z/=2,S/=2,O/=2}function k(ue,ye){return ae===1?ue[ye]:ue.readUInt16BE(ye*ae)}if(Z){var Q=-1;for(ee=O;ee<z;ee++)if(k(x,ee)===k(w,Q===-1?0:ee-Q)){if(Q===-1&&(Q=ee),ee-Q+1===S)return Q*ae}else Q!==-1&&(ee-=ee-Q),Q=-1}else for(O+S>z&&(O=z-S),ee=O;ee>=0;ee--){for(var re=!0,le=0;le<S;le++)if(k(x,ee+le)!==k(w,le)){re=!1;break}if(re)return ee}return-1}function E(x,w,O,K){O=Number(O)||0;var Z=x.length-O;K?(K=Number(K))>Z&&(K=Z):K=Z;var ee=w.length;K>ee/2&&(K=ee/2);for(var ae=0;ae<K;++ae){var z=parseInt(w.substr(2*ae,2),16);if(oe(z))return ae;x[O+ae]=z}return ae}function F(x,w,O,K){return ie(V(w,x.length-O),x,O,K)}function T(x,w,O,K){return ie(function(Z){for(var ee=[],ae=0;ae<Z.length;++ae)ee.push(255&Z.charCodeAt(ae));return ee}(w),x,O,K)}function D(x,w,O,K){return T(x,w,O,K)}function I(x,w,O,K){return ie(J(w),x,O,K)}function Y(x,w,O,K){return ie(function(Z,ee){for(var ae,z,S,k=[],Q=0;Q<Z.length&&!((ee-=2)<0);++Q)ae=Z.charCodeAt(Q),z=ae>>8,S=ae%256,k.push(S),k.push(z);return k}(w,x.length-O),x,O,K)}function W(x,w,O){return w===0&&O===x.length?s.fromByteArray(x):s.fromByteArray(x.slice(w,O))}function _(x,w,O){O=Math.min(x.length,O);for(var K=[],Z=w;Z<O;){var ee,ae,z,S,k=x[Z],Q=null,re=k>239?4:k>223?3:k>191?2:1;if(Z+re<=O)switch(re){case 1:k<128&&(Q=k);break;case 2:(192&(ee=x[Z+1]))==128&&(S=(31&k)<<6|63&ee)>127&&(Q=S);break;case 3:ee=x[Z+1],ae=x[Z+2],(192&ee)==128&&(192&ae)==128&&(S=(15&k)<<12|(63&ee)<<6|63&ae)>2047&&(S<55296||S>57343)&&(Q=S);break;case 4:ee=x[Z+1],ae=x[Z+2],z=x[Z+3],(192&ee)==128&&(192&ae)==128&&(192&z)==128&&(S=(15&k)<<18|(63&ee)<<12|(63&ae)<<6|63&z)>65535&&S<1114112&&(Q=S)}Q===null?(Q=65533,re=1):Q>65535&&(Q-=65536,K.push(Q>>>10&1023|55296),Q=56320|1023&Q),K.push(Q),Z+=re}return function(le){var ue=le.length;if(ue<=A)return String.fromCharCode.apply(String,le);for(var ye="",xe=0;xe<ue;)ye+=String.fromCharCode.apply(String,le.slice(xe,xe+=A));return ye}(K)}p.kMaxLength=d,n.TYPED_ARRAY_SUPPORT=function(){try{var x=new Uint8Array(1);return x.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},x.foo()===42}catch(w){return!1}}(),n.TYPED_ARRAY_SUPPORT||typeof console=="undefined"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),typeof Symbol!="undefined"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=function(x,w,O){return h(x,w,O)},n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,n.alloc=function(x,w,O){return function(K,Z,ee){return a(K),K<=0?o(K):Z!==void 0?typeof ee=="string"?o(K).fill(Z,ee):o(K).fill(Z):o(K)}(x,w,O)},n.allocUnsafe=function(x){return u(x)},n.allocUnsafeSlow=function(x){return u(x)},n.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==n.prototype},n.compare=function(x,w){if(ne(x,Uint8Array)&&(x=n.from(x,x.offset,x.byteLength)),ne(w,Uint8Array)&&(w=n.from(w,w.offset,w.byteLength)),!n.isBuffer(x)||!n.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===w)return 0;for(var O=x.length,K=w.length,Z=0,ee=Math.min(O,K);Z<ee;++Z)if(x[Z]!==w[Z]){O=x[Z],K=w[Z];break}return O<K?-1:K<O?1:0},n.isEncoding=function(x){switch(String(x).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(x,w){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return n.alloc(0);var O;if(w===void 0)for(w=0,O=0;O<x.length;++O)w+=x[O].length;var K=n.allocUnsafe(w),Z=0;for(O=0;O<x.length;++O){var ee=x[O];if(ne(ee,Uint8Array)&&(ee=n.from(ee)),!n.isBuffer(ee))throw new TypeError('"list" argument must be an Array of Buffers');ee.copy(K,Z),Z+=ee.length}return K},n.byteLength=y,n.prototype._isBuffer=!0,n.prototype.swap16=function(){var x=this.length;if(x%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var w=0;w<x;w+=2)g(this,w,w+1);return this},n.prototype.swap32=function(){var x=this.length;if(x%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var w=0;w<x;w+=4)g(this,w,w+3),g(this,w+1,w+2);return this},n.prototype.swap64=function(){var x=this.length;if(x%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var w=0;w<x;w+=8)g(this,w,w+7),g(this,w+1,w+6),g(this,w+2,w+5),g(this,w+3,w+4);return this},n.prototype.toString=function(){var x=this.length;return x===0?"":arguments.length===0?_(this,0,x):function(w,O,K){var Z=!1;if((O===void 0||O<0)&&(O=0),O>this.length||((K===void 0||K>this.length)&&(K=this.length),K<=0)||(K>>>=0)<=(O>>>=0))return"";for(w||(w="utf8");;)switch(w){case"hex":return N(this,O,K);case"utf8":case"utf-8":return _(this,O,K);case"ascii":return C(this,O,K);case"latin1":case"binary":return B(this,O,K);case"base64":return W(this,O,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,O,K);default:if(Z)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),Z=!0}}.apply(this,arguments)},n.prototype.toLocaleString=n.prototype.toString,n.prototype.equals=function(x){if(!n.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x||n.compare(this,x)===0},n.prototype.inspect=function(){var x="",w=p.INSPECT_MAX_BYTES;return x=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(x+=" ... "),"<Buffer "+x+">"},n.prototype.compare=function(x,w,O,K,Z){if(ne(x,Uint8Array)&&(x=n.from(x,x.offset,x.byteLength)),!n.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(w===void 0&&(w=0),O===void 0&&(O=x?x.length:0),K===void 0&&(K=0),Z===void 0&&(Z=this.length),w<0||O>x.length||K<0||Z>this.length)throw new RangeError("out of range index");if(K>=Z&&w>=O)return 0;if(K>=Z)return-1;if(w>=O)return 1;if(w>>>=0,O>>>=0,K>>>=0,Z>>>=0,this===x)return 0;for(var ee=Z-K,ae=O-w,z=Math.min(ee,ae),S=this.slice(K,Z),k=x.slice(w,O),Q=0;Q<z;++Q)if(S[Q]!==k[Q]){ee=S[Q],ae=k[Q];break}return ee<ae?-1:ae<ee?1:0},n.prototype.includes=function(x,w,O){return this.indexOf(x,w,O)!==-1},n.prototype.indexOf=function(x,w,O){return b(this,x,w,O,!0)},n.prototype.lastIndexOf=function(x,w,O){return b(this,x,w,O,!1)},n.prototype.write=function(x,w,O,K){if(w===void 0)K="utf8",O=this.length,w=0;else if(O===void 0&&typeof w=="string")K=w,O=this.length,w=0;else{if(!isFinite(w))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");w>>>=0,isFinite(O)?(O>>>=0,K===void 0&&(K="utf8")):(K=O,O=void 0)}var Z=this.length-w;if((O===void 0||O>Z)&&(O=Z),x.length>0&&(O<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");for(var ee=!1;;)switch(K){case"hex":return E(this,x,w,O);case"utf8":case"utf-8":return F(this,x,w,O);case"ascii":return T(this,x,w,O);case"latin1":case"binary":return D(this,x,w,O);case"base64":return I(this,x,w,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,x,w,O);default:if(ee)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),ee=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function C(x,w,O){var K="";O=Math.min(x.length,O);for(var Z=w;Z<O;++Z)K+=String.fromCharCode(127&x[Z]);return K}function B(x,w,O){var K="";O=Math.min(x.length,O);for(var Z=w;Z<O;++Z)K+=String.fromCharCode(x[Z]);return K}function N(x,w,O){var K=x.length;(!w||w<0)&&(w=0),(!O||O<0||O>K)&&(O=K);for(var Z="",ee=w;ee<O;++ee)Z+=H(x[ee]);return Z}function q(x,w,O){for(var K=x.slice(w,O),Z="",ee=0;ee<K.length;ee+=2)Z+=String.fromCharCode(K[ee]+256*K[ee+1]);return Z}function X(x,w,O){if(x%1!=0||x<0)throw new RangeError("offset is not uint");if(x+w>O)throw new RangeError("Trying to access beyond buffer length")}function $(x,w,O,K,Z,ee){if(!n.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(w>Z||w<ee)throw new RangeError('"value" argument is out of bounds');if(O+K>x.length)throw new RangeError("Index out of range")}function M(x,w,O,K,Z,ee){if(O+K>x.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("Index out of range")}function j(x,w,O,K,Z){return w=+w,O>>>=0,Z||M(x,0,O,4),c.write(x,w,O,K,23,4),O+4}function L(x,w,O,K,Z){return w=+w,O>>>=0,Z||M(x,0,O,8),c.write(x,w,O,K,52,8),O+8}n.prototype.slice=function(x,w){var O=this.length;x=~~x,w=w===void 0?O:~~w,x<0?(x+=O)<0&&(x=0):x>O&&(x=O),w<0?(w+=O)<0&&(w=0):w>O&&(w=O),w<x&&(w=x);var K=this.subarray(x,w);return K.__proto__=n.prototype,K},n.prototype.readUIntLE=function(x,w,O){x>>>=0,w>>>=0,O||X(x,w,this.length);for(var K=this[x],Z=1,ee=0;++ee<w&&(Z*=256);)K+=this[x+ee]*Z;return K},n.prototype.readUIntBE=function(x,w,O){x>>>=0,w>>>=0,O||X(x,w,this.length);for(var K=this[x+--w],Z=1;w>0&&(Z*=256);)K+=this[x+--w]*Z;return K},n.prototype.readUInt8=function(x,w){return x>>>=0,w||X(x,1,this.length),this[x]},n.prototype.readUInt16LE=function(x,w){return x>>>=0,w||X(x,2,this.length),this[x]|this[x+1]<<8},n.prototype.readUInt16BE=function(x,w){return x>>>=0,w||X(x,2,this.length),this[x]<<8|this[x+1]},n.prototype.readUInt32LE=function(x,w){return x>>>=0,w||X(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+16777216*this[x+3]},n.prototype.readUInt32BE=function(x,w){return x>>>=0,w||X(x,4,this.length),16777216*this[x]+(this[x+1]<<16|this[x+2]<<8|this[x+3])},n.prototype.readIntLE=function(x,w,O){x>>>=0,w>>>=0,O||X(x,w,this.length);for(var K=this[x],Z=1,ee=0;++ee<w&&(Z*=256);)K+=this[x+ee]*Z;return K>=(Z*=128)&&(K-=Math.pow(2,8*w)),K},n.prototype.readIntBE=function(x,w,O){x>>>=0,w>>>=0,O||X(x,w,this.length);for(var K=w,Z=1,ee=this[x+--K];K>0&&(Z*=256);)ee+=this[x+--K]*Z;return ee>=(Z*=128)&&(ee-=Math.pow(2,8*w)),ee},n.prototype.readInt8=function(x,w){return x>>>=0,w||X(x,1,this.length),128&this[x]?-1*(255-this[x]+1):this[x]},n.prototype.readInt16LE=function(x,w){x>>>=0,w||X(x,2,this.length);var O=this[x]|this[x+1]<<8;return 32768&O?4294901760|O:O},n.prototype.readInt16BE=function(x,w){x>>>=0,w||X(x,2,this.length);var O=this[x+1]|this[x]<<8;return 32768&O?4294901760|O:O},n.prototype.readInt32LE=function(x,w){return x>>>=0,w||X(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},n.prototype.readInt32BE=function(x,w){return x>>>=0,w||X(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},n.prototype.readFloatLE=function(x,w){return x>>>=0,w||X(x,4,this.length),c.read(this,x,!0,23,4)},n.prototype.readFloatBE=function(x,w){return x>>>=0,w||X(x,4,this.length),c.read(this,x,!1,23,4)},n.prototype.readDoubleLE=function(x,w){return x>>>=0,w||X(x,8,this.length),c.read(this,x,!0,52,8)},n.prototype.readDoubleBE=function(x,w){return x>>>=0,w||X(x,8,this.length),c.read(this,x,!1,52,8)},n.prototype.writeUIntLE=function(x,w,O,K){x=+x,w>>>=0,O>>>=0,K||$(this,x,w,O,Math.pow(2,8*O)-1,0);var Z=1,ee=0;for(this[w]=255&x;++ee<O&&(Z*=256);)this[w+ee]=x/Z&255;return w+O},n.prototype.writeUIntBE=function(x,w,O,K){x=+x,w>>>=0,O>>>=0,K||$(this,x,w,O,Math.pow(2,8*O)-1,0);var Z=O-1,ee=1;for(this[w+Z]=255&x;--Z>=0&&(ee*=256);)this[w+Z]=x/ee&255;return w+O},n.prototype.writeUInt8=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,1,255,0),this[w]=255&x,w+1},n.prototype.writeUInt16LE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,2,65535,0),this[w]=255&x,this[w+1]=x>>>8,w+2},n.prototype.writeUInt16BE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,2,65535,0),this[w]=x>>>8,this[w+1]=255&x,w+2},n.prototype.writeUInt32LE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,4,4294967295,0),this[w+3]=x>>>24,this[w+2]=x>>>16,this[w+1]=x>>>8,this[w]=255&x,w+4},n.prototype.writeUInt32BE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,4,4294967295,0),this[w]=x>>>24,this[w+1]=x>>>16,this[w+2]=x>>>8,this[w+3]=255&x,w+4},n.prototype.writeIntLE=function(x,w,O,K){if(x=+x,w>>>=0,!K){var Z=Math.pow(2,8*O-1);$(this,x,w,O,Z-1,-Z)}var ee=0,ae=1,z=0;for(this[w]=255&x;++ee<O&&(ae*=256);)x<0&&z===0&&this[w+ee-1]!==0&&(z=1),this[w+ee]=(x/ae>>0)-z&255;return w+O},n.prototype.writeIntBE=function(x,w,O,K){if(x=+x,w>>>=0,!K){var Z=Math.pow(2,8*O-1);$(this,x,w,O,Z-1,-Z)}var ee=O-1,ae=1,z=0;for(this[w+ee]=255&x;--ee>=0&&(ae*=256);)x<0&&z===0&&this[w+ee+1]!==0&&(z=1),this[w+ee]=(x/ae>>0)-z&255;return w+O},n.prototype.writeInt8=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,1,127,-128),x<0&&(x=255+x+1),this[w]=255&x,w+1},n.prototype.writeInt16LE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,2,32767,-32768),this[w]=255&x,this[w+1]=x>>>8,w+2},n.prototype.writeInt16BE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,2,32767,-32768),this[w]=x>>>8,this[w+1]=255&x,w+2},n.prototype.writeInt32LE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,4,2147483647,-2147483648),this[w]=255&x,this[w+1]=x>>>8,this[w+2]=x>>>16,this[w+3]=x>>>24,w+4},n.prototype.writeInt32BE=function(x,w,O){return x=+x,w>>>=0,O||$(this,x,w,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[w]=x>>>24,this[w+1]=x>>>16,this[w+2]=x>>>8,this[w+3]=255&x,w+4},n.prototype.writeFloatLE=function(x,w,O){return j(this,x,w,!0,O)},n.prototype.writeFloatBE=function(x,w,O){return j(this,x,w,!1,O)},n.prototype.writeDoubleLE=function(x,w,O){return L(this,x,w,!0,O)},n.prototype.writeDoubleBE=function(x,w,O){return L(this,x,w,!1,O)},n.prototype.copy=function(x,w,O,K){if(!n.isBuffer(x))throw new TypeError("argument should be a Buffer");if(O||(O=0),K||K===0||(K=this.length),w>=x.length&&(w=x.length),w||(w=0),K>0&&K<O&&(K=O),K===O||x.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),x.length-w<K-O&&(K=x.length-w+O);var Z=K-O;if(this===x&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(w,O,K);else if(this===x&&O<w&&w<K)for(var ee=Z-1;ee>=0;--ee)x[ee+w]=this[ee+O];else Uint8Array.prototype.set.call(x,this.subarray(O,K),w);return Z},n.prototype.fill=function(x,w,O,K){if(typeof x=="string"){if(typeof w=="string"?(K=w,w=0,O=this.length):typeof O=="string"&&(K=O,O=this.length),K!==void 0&&typeof K!="string")throw new TypeError("encoding must be a string");if(typeof K=="string"&&!n.isEncoding(K))throw new TypeError("Unknown encoding: "+K);if(x.length===1){var Z=x.charCodeAt(0);(K==="utf8"&&Z<128||K==="latin1")&&(x=Z)}}else typeof x=="number"&&(x&=255);if(w<0||this.length<w||this.length<O)throw new RangeError("Out of range index");if(O<=w)return this;var ee;if(w>>>=0,O=O===void 0?this.length:O>>>0,x||(x=0),typeof x=="number")for(ee=w;ee<O;++ee)this[ee]=x;else{var ae=n.isBuffer(x)?x:n.from(x,K),z=ae.length;if(z===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(ee=0;ee<O-w;++ee)this[ee+w]=ae[ee%z]}return this};var R=/[^+/0-9A-Za-z-_]/g;function H(x){return x<16?"0"+x.toString(16):x.toString(16)}function V(x,w){var O;w=w||1/0;for(var K=x.length,Z=null,ee=[],ae=0;ae<K;++ae){if((O=x.charCodeAt(ae))>55295&&O<57344){if(!Z){if(O>56319){(w-=3)>-1&&ee.push(239,191,189);continue}if(ae+1===K){(w-=3)>-1&&ee.push(239,191,189);continue}Z=O;continue}if(O<56320){(w-=3)>-1&&ee.push(239,191,189),Z=O;continue}O=65536+(Z-55296<<10|O-56320)}else Z&&(w-=3)>-1&&ee.push(239,191,189);if(Z=null,O<128){if((w-=1)<0)break;ee.push(O)}else if(O<2048){if((w-=2)<0)break;ee.push(O>>6|192,63&O|128)}else if(O<65536){if((w-=3)<0)break;ee.push(O>>12|224,O>>6&63|128,63&O|128)}else{if(!(O<1114112))throw new Error("Invalid code point");if((w-=4)<0)break;ee.push(O>>18|240,O>>12&63|128,O>>6&63|128,63&O|128)}}return ee}function J(x){return s.toByteArray(function(w){if((w=(w=w.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;w.length%4!=0;)w+="=";return w}(x))}function ie(x,w,O,K){for(var Z=0;Z<K&&!(Z+O>=w.length||Z>=x.length);++Z)w[Z+O]=x[Z];return Z}function ne(x,w){return x instanceof w||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===w.name}function oe(x){return x!=x}}).call(this)}).call(this,r("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(r,i,p){(function(l){(function(){p.formatArgs=function(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;c.splice(1,0,d,"color: inherit");let o=0,n=0;c[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&h==="%c"&&(n=++o)}),c.splice(n,0,d)},p.save=function(c){try{c?p.storage.setItem("debug",c):p.storage.removeItem("debug")}catch(d){}},p.load=function(){let c;try{c=p.storage.getItem("debug")}catch(d){}return!c&&l!==void 0&&"env"in l&&(c=l.env.DEBUG),c},p.useColors=function(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},p.storage=function(){try{return localStorage}catch(c){}}(),p.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),p.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],p.log=console.debug||console.log||(()=>{}),i.exports=r("./common")(p);const{formatters:s}=i.exports;s.j=function(c){try{return JSON.stringify(c)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}}).call(this)}).call(this,r("_process"))},{"./common":19,_process:50}],19:[function(r,i,p){i.exports=function(l){function s(o){let n,h,a,u=null;function f(...v){if(!f.enabled)return;const y=f,g=Number(new Date),b=g-(n||g);y.diff=b,y.prev=n,y.curr=g,n=g,v[0]=s.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let m=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(E,F)=>{if(E==="%%")return"%";m++;const T=s.formatters[F];if(typeof T=="function"){const D=v[m];E=T.call(y,D),v.splice(m,1),m--}return E}),s.formatArgs.call(y,v),(y.log||s.log).apply(y,v)}return f.namespace=o,f.useColors=s.useColors(),f.color=s.selectColor(o),f.extend=c,f.destroy=s.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(h!==s.namespaces&&(h=s.namespaces,a=s.enabled(o)),a),set:v=>{u=v}}),typeof s.init=="function"&&s.init(f),f}function c(o,n){const h=s(this.namespace+(n===void 0?":":n)+o);return h.log=this.log,h}function d(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}return s.debug=s,s.default=s,s.coerce=function(o){return o instanceof Error?o.stack||o.message:o},s.disable=function(){const o=[...s.names.map(d),...s.skips.map(d).map(n=>"-"+n)].join(",");return s.enable(""),o},s.enable=function(o){let n;s.save(o),s.namespaces=o,s.names=[],s.skips=[];const h=(typeof o=="string"?o:"").split(/[\s,]+/),a=h.length;for(n=0;n<a;n++)h[n]&&((o=h[n].replace(/\*/g,".*?"))[0]==="-"?s.skips.push(new RegExp("^"+o.substr(1)+"$")):s.names.push(new RegExp("^"+o+"$")))},s.enabled=function(o){if(o[o.length-1]==="*")return!0;let n,h;for(n=0,h=s.skips.length;n<h;n++)if(s.skips[n].test(o))return!1;for(n=0,h=s.names.length;n<h;n++)if(s.names[n].test(o))return!0;return!1},s.humanize=r("ms"),s.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(l).forEach(o=>{s[o]=l[o]}),s.names=[],s.skips=[],s.formatters={},s.selectColor=function(o){let n=0;for(let h=0;h<o.length;h++)n=(n<<5)-n+o.charCodeAt(h),n|=0;return s.colors[Math.abs(n)%s.colors.length]},s.enable(s.load()),s}},{ms:45}],20:[function(r,i,p){(function(l,s){(function(){var c=r("readable-stream"),d=r("end-of-stream"),o=r("inherits"),n=r("stream-shift"),h=s.from&&s.from!==Uint8Array.from?s.from([0]):new s([0]),a=function(y,g){y._corked?y.once("uncork",g):g()},u=function(y,g){return function(b){b?function(m,E){m._autoDestroy&&m.destroy(E)}(y,b.message==="premature close"?null:b):g&&!y._ended&&y.end()}},f=function(){},v=function(y,g,b){if(!(this instanceof v))return new v(y,g,b);c.Duplex.call(this,b),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!b||b.autoDestroy!==!1,this._forwardDestroy=!b||b.destroy!==!1,this._forwardEnd=!b||b.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,y&&this.setWritable(y),g&&this.setReadable(g)};o(v,c.Duplex),v.obj=function(y,g,b){return b||(b={}),b.objectMode=!0,b.highWaterMark=16,new v(y,g,b)},v.prototype.cork=function(){++this._corked==1&&this.emit("cork")},v.prototype.uncork=function(){this._corked&&--this._corked==0&&this.emit("uncork")},v.prototype.setWritable=function(y){if(this._unwrite&&this._unwrite(),this.destroyed)y&&y.destroy&&y.destroy();else if(y!==null&&y!==!1){var g=this,b=d(y,{writable:!0,readable:!1},u(this,this._forwardEnd)),m=function(){var E=g._ondrain;g._ondrain=null,E&&E()};this._unwrite&&l.nextTick(m),this._writable=y,this._writable.on("drain",m),this._unwrite=function(){g._writable.removeListener("drain",m),b()},this.uncork()}else this.end()},v.prototype.setReadable=function(y){if(this._unread&&this._unread(),this.destroyed)y&&y.destroy&&y.destroy();else{if(y===null||y===!1)return this.push(null),void this.resume();var g,b=this,m=d(y,{writable:!1,readable:!0},u(this)),E=function(){b._forward()},F=function(){b.push(null)};this._drained=!0,this._readable=y,this._readable2=y._readableState?y:(g=y,new c.Readable({objectMode:!0,highWaterMark:16}).wrap(g)),this._readable2.on("readable",E),this._readable2.on("end",F),this._unread=function(){b._readable2.removeListener("readable",E),b._readable2.removeListener("end",F),m()},this._forward()}},v.prototype._read=function(){this._drained=!0,this._forward()},v.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var y;for(this._forwarding=!0;this._drained&&(y=n(this._readable2))!==null;)this.destroyed||(this._drained=this.push(y));this._forwarding=!1}},v.prototype.destroy=function(y,g){if(g||(g=f),this.destroyed)return g(null);this.destroyed=!0;var b=this;l.nextTick(function(){b._destroy(y),g(null)})},v.prototype._destroy=function(y){if(y){var g=this._ondrain;this._ondrain=null,g?g(y):this.emit("error",y)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},v.prototype._write=function(y,g,b){if(!this.destroyed)return this._corked?a(this,this._write.bind(this,y,g,b)):y===h?this._finish(b):this._writable?void(this._writable.write(y)===!1?this._ondrain=b:this.destroyed||b()):b()},v.prototype._finish=function(y){var g=this;this.emit("preend"),a(this,function(){var b,m;b=g._forwardEnd&&g._writable,m=function(){g._writableState.prefinished===!1&&(g._writableState.prefinished=!0),g.emit("prefinish"),a(g,y)},b?b._writableState&&b._writableState.finished?m():b._writableState?b.end(m):(b.end(),m()):m()})},v.prototype.end=function(y,g,b){return typeof y=="function"?this.end(null,null,y):typeof g=="function"?this.end(y,null,g):(this._ended=!0,y&&this.write(y),this._writableState.ending||this._writableState.destroyed||this.write(h),c.Writable.prototype.end.call(this,b))},i.exports=v}).call(this)}).call(this,r("_process"),r("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(r,i,p){(function(l){(function(){var s=r("once"),c=function(){},d=function(o,n,h){if(typeof n=="function")return d(o,null,n);n||(n={}),h=s(h||c);var a=o._writableState,u=o._readableState,f=n.readable||n.readable!==!1&&o.readable,v=n.writable||n.writable!==!1&&o.writable,y=!1,g=function(){o.writable||b()},b=function(){v=!1,f||h.call(o)},m=function(){f=!1,v||h.call(o)},E=function(Y){h.call(o,Y?new Error("exited with error code: "+Y):null)},F=function(Y){h.call(o,Y)},T=function(){l.nextTick(D)},D=function(){if(!y)return(!f||u&&u.ended&&!u.destroyed)&&(!v||a&&a.ended&&!a.destroyed)?void 0:h.call(o,new Error("premature close"))},I=function(){o.req.on("finish",b)};return function(Y){return Y.setHeader&&typeof Y.abort=="function"}(o)?(o.on("complete",b),o.on("abort",T),o.req?I():o.on("request",I)):v&&!a&&(o.on("end",g),o.on("close",g)),function(Y){return Y.stdio&&Array.isArray(Y.stdio)&&Y.stdio.length===3}(o)&&o.on("exit",E),o.on("end",m),o.on("finish",b),n.error!==!1&&o.on("error",F),o.on("close",T),function(){y=!0,o.removeListener("complete",b),o.removeListener("abort",T),o.removeListener("request",I),o.req&&o.req.removeListener("finish",b),o.removeListener("end",g),o.removeListener("close",g),o.removeListener("finish",b),o.removeListener("exit",E),o.removeListener("end",m),o.removeListener("error",F),o.removeListener("close",T)}};i.exports=d}).call(this)}).call(this,r("_process"))},{_process:50,once:48}],22:[function(r,i,p){var l=Object.create||function(m){var E=function(){};return E.prototype=m,new E},s=Object.keys||function(m){var E=[];for(var F in m)Object.prototype.hasOwnProperty.call(m,F)&&E.push(F);return F},c=Function.prototype.bind||function(m){var E=this;return function(){return E.apply(m,arguments)}};function d(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=l(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}i.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0;var o,n=10;try{var h={};Object.defineProperty&&Object.defineProperty(h,"x",{value:0}),o=h.x===0}catch(m){o=!1}function a(m){return m._maxListeners===void 0?d.defaultMaxListeners:m._maxListeners}function u(m,E,F,T){var D,I,Y;if(typeof F!="function")throw new TypeError('"listener" argument must be a function');if((I=m._events)?(I.newListener&&(m.emit("newListener",E,F.listener?F.listener:F),I=m._events),Y=I[E]):(I=m._events=l(null),m._eventsCount=0),Y){if(typeof Y=="function"?Y=I[E]=T?[F,Y]:[Y,F]:T?Y.unshift(F):Y.push(F),!Y.warned&&(D=a(m))&&D>0&&Y.length>D){Y.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+Y.length+' "'+String(E)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');W.name="MaxListenersExceededWarning",W.emitter=m,W.type=E,W.count=Y.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",W.name,W.message)}}else Y=I[E]=F,++m._eventsCount;return m}function f(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var m=new Array(arguments.length),E=0;E<m.length;++E)m[E]=arguments[E];this.listener.apply(this.target,m)}}function v(m,E,F){var T={fired:!1,wrapFn:void 0,target:m,type:E,listener:F},D=c.call(f,T);return D.listener=F,T.wrapFn=D,D}function y(m,E,F){var T=m._events;if(!T)return[];var D=T[E];return D?typeof D=="function"?F?[D.listener||D]:[D]:F?function(I){for(var Y=new Array(I.length),W=0;W<Y.length;++W)Y[W]=I[W].listener||I[W];return Y}(D):b(D,D.length):[]}function g(m){var E=this._events;if(E){var F=E[m];if(typeof F=="function")return 1;if(F)return F.length}return 0}function b(m,E){for(var F=new Array(E),T=0;T<E;++T)F[T]=m[T];return F}o?Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(m){if(typeof m!="number"||m<0||m!=m)throw new TypeError('"defaultMaxListeners" must be a positive number');n=m}}):d.defaultMaxListeners=n,d.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||isNaN(m))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=m,this},d.prototype.getMaxListeners=function(){return a(this)},d.prototype.emit=function(m){var E,F,T,D,I,Y,W=m==="error";if(Y=this._events)W=W&&Y.error==null;else if(!W)return!1;if(W){if(arguments.length>1&&(E=arguments[1]),E instanceof Error)throw E;var _=new Error('Unhandled "error" event. ('+E+")");throw _.context=E,_}if(!(F=Y[m]))return!1;var A=typeof F=="function";switch(T=arguments.length){case 1:(function(C,B,N){if(B)C.call(N);else for(var q=C.length,X=b(C,q),$=0;$<q;++$)X[$].call(N)})(F,A,this);break;case 2:(function(C,B,N,q){if(B)C.call(N,q);else for(var X=C.length,$=b(C,X),M=0;M<X;++M)$[M].call(N,q)})(F,A,this,arguments[1]);break;case 3:(function(C,B,N,q,X){if(B)C.call(N,q,X);else for(var $=C.length,M=b(C,$),j=0;j<$;++j)M[j].call(N,q,X)})(F,A,this,arguments[1],arguments[2]);break;case 4:(function(C,B,N,q,X,$){if(B)C.call(N,q,X,$);else for(var M=C.length,j=b(C,M),L=0;L<M;++L)j[L].call(N,q,X,$)})(F,A,this,arguments[1],arguments[2],arguments[3]);break;default:for(D=new Array(T-1),I=1;I<T;I++)D[I-1]=arguments[I];(function(C,B,N,q){if(B)C.apply(N,q);else for(var X=C.length,$=b(C,X),M=0;M<X;++M)$[M].apply(N,q)})(F,A,this,D)}return!0},d.prototype.addListener=function(m,E){return u(this,m,E,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(m,E){return u(this,m,E,!0)},d.prototype.once=function(m,E){if(typeof E!="function")throw new TypeError('"listener" argument must be a function');return this.on(m,v(this,m,E)),this},d.prototype.prependOnceListener=function(m,E){if(typeof E!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(m,v(this,m,E)),this},d.prototype.removeListener=function(m,E){var F,T,D,I,Y;if(typeof E!="function")throw new TypeError('"listener" argument must be a function');if(!(T=this._events))return this;if(!(F=T[m]))return this;if(F===E||F.listener===E)--this._eventsCount==0?this._events=l(null):(delete T[m],T.removeListener&&this.emit("removeListener",m,F.listener||E));else if(typeof F!="function"){for(D=-1,I=F.length-1;I>=0;I--)if(F[I]===E||F[I].listener===E){Y=F[I].listener,D=I;break}if(D<0)return this;D===0?F.shift():function(W,_){for(var A=_,C=A+1,B=W.length;C<B;A+=1,C+=1)W[A]=W[C];W.pop()}(F,D),F.length===1&&(T[m]=F[0]),T.removeListener&&this.emit("removeListener",m,Y||E)}return this},d.prototype.removeAllListeners=function(m){var E,F,T;if(!(F=this._events))return this;if(!F.removeListener)return arguments.length===0?(this._events=l(null),this._eventsCount=0):F[m]&&(--this._eventsCount==0?this._events=l(null):delete F[m]),this;if(arguments.length===0){var D,I=s(F);for(T=0;T<I.length;++T)(D=I[T])!=="removeListener"&&this.removeAllListeners(D);return this.removeAllListeners("removeListener"),this._events=l(null),this._eventsCount=0,this}if(typeof(E=F[m])=="function")this.removeListener(m,E);else if(E)for(T=E.length-1;T>=0;T--)this.removeListener(m,E[T]);return this},d.prototype.listeners=function(m){return y(this,m,!0)},d.prototype.rawListeners=function(m){return y(this,m,!1)},d.listenerCount=function(m,E){return typeof m.listenerCount=="function"?m.listenerCount(E):g.call(m,E)},d.prototype.listenerCount=g,d.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],23:[function(r,i,p){p.read=function(l,s,c,d,o){var n,h,a=8*o-d-1,u=(1<<a)-1,f=u>>1,v=-7,y=c?o-1:0,g=c?-1:1,b=l[s+y];for(y+=g,n=b&(1<<-v)-1,b>>=-v,v+=a;v>0;n=256*n+l[s+y],y+=g,v-=8);for(h=n&(1<<-v)-1,n>>=-v,v+=d;v>0;h=256*h+l[s+y],y+=g,v-=8);if(n===0)n=1-f;else{if(n===u)return h?NaN:1/0*(b?-1:1);h+=Math.pow(2,d),n-=f}return(b?-1:1)*h*Math.pow(2,n-d)},p.write=function(l,s,c,d,o,n){var h,a,u,f=8*n-o-1,v=(1<<f)-1,y=v>>1,g=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=d?0:n-1,m=d?1:-1,E=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(a=isNaN(s)?1:0,h=v):(h=Math.floor(Math.log(s)/Math.LN2),s*(u=Math.pow(2,-h))<1&&(h--,u*=2),(s+=h+y>=1?g/u:g*Math.pow(2,1-y))*u>=2&&(h++,u/=2),h+y>=v?(a=0,h=v):h+y>=1?(a=(s*u-1)*Math.pow(2,o),h+=y):(a=s*Math.pow(2,y-1)*Math.pow(2,o),h=0));o>=8;l[c+b]=255&a,b+=m,a/=256,o-=8);for(h=h<<o|a,f+=o;f>0;l[c+b]=255&h,b+=m,h/=256,f-=8);l[c+b-m]|=128*E}},{}],24:[function(r,i,p){typeof Object.create=="function"?i.exports=function(l,s){s&&(l.super_=s,l.prototype=Object.create(s.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}))}:i.exports=function(l,s){if(s){l.super_=s;var c=function(){};c.prototype=s.prototype,l.prototype=new c,l.prototype.constructor=l}}},{}],25:[function(r,i,p){Object.defineProperty(p,"__esModule",{value:!0});var l=function(){function s(c,d){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=c,this.value=d}return s.prototype.rotateLeft=function(){var c=this.parent,d=this.brother,o=this.leftChild,n=this.rightChild;if(!n)throw new Error("unknown error");var h=n.leftChild,a=n.rightChild;return c&&(c.leftChild===this?c.leftChild=n:c.rightChild===this&&(c.rightChild=n)),n.parent=c,n.brother=d,n.leftChild=this,n.rightChild=a,d&&(d.brother=n),this.parent=n,this.brother=a,this.leftChild=o,this.rightChild=h,a&&(a.parent=n,a.brother=this),o&&(o.parent=this,o.brother=h),h&&(h.parent=this,h.brother=o),n},s.prototype.rotateRight=function(){var c=this.parent,d=this.brother,o=this.leftChild;if(!o)throw new Error("unknown error");var n=this.rightChild,h=o.leftChild,a=o.rightChild;return c&&(c.leftChild===this?c.leftChild=o:c.rightChild===this&&(c.rightChild=o)),o.parent=c,o.brother=d,o.leftChild=h,o.rightChild=this,d&&(d.brother=o),h&&(h.parent=o,h.brother=this),this.parent=o,this.brother=h,this.leftChild=a,this.rightChild=n,a&&(a.parent=this,a.brother=n),n&&(n.parent=this,n.brother=a),o},s.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},s.TreeNodeColorType={red:!0,black:!1},s}();Object.freeze(l),p.default=l},{}],26:[function(r,i,p){var l=this&&this.__generator||function(c,d){var o,n,h,a,u={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return a={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function f(v){return function(y){return function(g){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,n&&(h=2&g[0]?n.return:g[0]?n.throw||((h=n.return)&&h.call(n),0):n.next)&&!(h=h.call(n,g[1])).done)return h;switch(n=0,h&&(g=[2&g[0],h.value]),g[0]){case 0:case 1:h=g;break;case 4:return u.label++,{value:g[1],done:!1};case 5:u.label++,n=g[1],g=[0];continue;case 7:g=u.ops.pop(),u.trys.pop();continue;default:if(!(h=(h=u.trys).length>0&&h[h.length-1])&&(g[0]===6||g[0]===2)){u=0;continue}if(g[0]===3&&(!h||g[1]>h[0]&&g[1]<h[3])){u.label=g[1];break}if(g[0]===6&&u.label<h[1]){u.label=h[1],h=g;break}if(h&&u.label<h[2]){u.label=h[2],u.ops.push(g);break}h[2]&&u.ops.pop(),u.trys.pop();continue}g=d.call(c,u)}catch(b){g=[6,b],n=0}finally{o=h=0}if(5&g[0])throw g[1];return{value:g[0]?g[1]:void 0,done:!0}}([v,y])}}};function s(c){var d=this;c===void 0&&(c=[]);var o=[],n=0,h=0,a=0,u=0,f=0,v=0;this.size=function(){return v},this.empty=function(){return v===0},this.clear=function(){n=a=h=u=f=v=0,g.call(this,s.bucketSize),v=0},this.front=function(){return o[n][h]},this.back=function(){return o[a][u]},this.forEach=function(b){if(!this.empty()){var m=0;if(n!==a){for(F=h;F<s.bucketSize;++F)b(o[n][F],m++);for(F=n+1;F<a;++F)for(var E=0;E<s.bucketSize;++E)b(o[F][E],m++);for(F=0;F<=u;++F)b(o[a][F],m++)}else for(var F=h;F<=u;++F)b(o[n][F],m++)}};var y=function(b){var m=n*s.bucketSize+h,E=m+b,F=a*s.bucketSize+u;if(E<m||E>F)throw new Error("pos should more than 0 and less than queue's size");return{curNodeBucketIndex:Math.floor(E/s.bucketSize),curNodePointerIndex:E%s.bucketSize}};this.getElementByPos=function(b){var m=y(b),E=m.curNodeBucketIndex,F=m.curNodePointerIndex;return o[E][F]},this.eraseElementByPos=function(b){var m=this;if(b<0||b>v)throw new Error("pos should more than 0 and less than queue's size");if(b===0)this.popFront();else if(b===this.size())this.popBack();else{for(var E=[],F=b+1;F<v;++F)E.push(this.getElementByPos(F));this.cut(b),this.popBack(),E.forEach(function(T){return m.pushBack(T)})}},this.eraseElementByValue=function(b){if(!this.empty()){var m=[];this.forEach(function(T){T!==b&&m.push(T)});for(var E=m.length,F=0;F<E;++F)this.setElementByPos(F,m[F]);this.cut(E-1)}};var g=function(b){for(var m=[],E=b*s.sigma,F=Math.max(Math.ceil(E/s.bucketSize),2),T=0;T<F;++T)m.push(new Array(s.bucketSize));var D=Math.ceil(b/s.bucketSize),I=Math.floor(F/2)-Math.floor(D/2),Y=I,W=0;if(this.size())for(T=0;T<D;++T){for(var _=0;_<s.bucketSize;++_)if(m[I+T][_]=this.front(),this.popFront(),this.empty()){Y=I+T,W=_;break}if(this.empty())break}o=m,n=I,h=0,a=Y,u=W,f=F,v=b};this.pushBack=function(b){this.empty()||(a===f-1&&u===s.bucketSize-1&&g.call(this,this.size()),u<s.bucketSize-1?++u:a<f-1&&(++a,u=0)),++v,o[a][u]=b},this.popBack=function(){this.empty()||(this.size()!==1&&(u>0?--u:n<a&&(--a,u=s.bucketSize-1)),v>0&&--v)},this.setElementByPos=function(b,m){var E=y(b),F=E.curNodeBucketIndex,T=E.curNodePointerIndex;o[F][T]=m},this.insert=function(b,m,E){var F=this;if(E===void 0&&(E=1),b===0)for(;E--;)this.pushFront(m);else if(b===this.size())for(;E--;)this.pushBack(m);else{for(var T=[],D=b;D<v;++D)T.push(this.getElementByPos(D));for(this.cut(b-1),D=0;D<E;++D)this.pushBack(m);T.forEach(function(I){return F.pushBack(I)})}},this.find=function(b){if(n===a){for(var m=h;m<=u;++m)if(o[n][m]===b)return!0;return!1}for(m=h;m<s.bucketSize;++m)if(o[n][m]===b)return!0;for(m=n+1;m<a;++m)for(var E=0;E<s.bucketSize;++E)if(o[m][E]===b)return!0;for(m=0;m<=u;++m)if(o[a][m]===b)return!0;return!1},this.reverse=function(){for(var b=0,m=v-1;b<m;){var E=this.getElementByPos(b);this.setElementByPos(b,this.getElementByPos(m)),this.setElementByPos(m,E),++b,--m}},this.unique=function(){if(!this.empty()){var b=[],m=this.front();this.forEach(function(F,T){T!==0&&F===m||(b.push(F),m=F)});for(var E=0;E<v;++E)this.setElementByPos(E,b[E]);this.cut(b.length-1)}},this.sort=function(b){var m=[];this.forEach(function(F){m.push(F)}),m.sort(b);for(var E=0;E<v;++E)this.setElementByPos(E,m[E])},this.pushFront=function(b){this.empty()||(n===0&&h===0&&g.call(this,this.size()),h>0?--h:n>0&&(--n,h=s.bucketSize-1)),++v,o[n][h]=b},this.popFront=function(){this.empty()||(this.size()!==1&&(h<s.bucketSize-1?++h:n<a&&(++n,h=0)),v>0&&--v)},this.shrinkToFit=function(){var b=this,m=[];this.forEach(function(D){m.push(D)});var E=m.length;o=[];for(var F=Math.ceil(E/s.bucketSize),T=0;T<F;++T)o.push(new Array(s.bucketSize));this.clear(),m.forEach(function(D){return b.pushBack(D)})},this.cut=function(b){if(b<0)this.clear();else{var m=y(b),E=m.curNodeBucketIndex,F=m.curNodePointerIndex;a=E,u=F,v=b+1}},this[Symbol.iterator]=function(){return function(){var b,m;return l(this,function(E){switch(E.label){case 0:if(v===0)return[2];if(n!==a)return[3,5];m=h,E.label=1;case 1:return m<=u?[4,o[n][m]]:[3,4];case 2:E.sent(),E.label=3;case 3:return++m,[3,1];case 4:return[2];case 5:m=h,E.label=6;case 6:return m<s.bucketSize?[4,o[n][m]]:[3,9];case 7:E.sent(),E.label=8;case 8:return++m,[3,6];case 9:m=n+1,E.label=10;case 10:if(!(m<a))return[3,15];b=0,E.label=11;case 11:return b<s.bucketSize?[4,o[m][b]]:[3,14];case 12:E.sent(),E.label=13;case 13:return++b,[3,11];case 14:return++m,[3,10];case 15:m=0,E.label=16;case 16:return m<=u?[4,o[a][m]]:[3,19];case 17:E.sent(),E.label=18;case 18:return++m,[3,16];case 19:return[2]}})}()},function(){var b=s.bucketSize;c.size?b=c.size():c.length&&(b=c.length);var m=b*s.sigma;f=Math.ceil(m/s.bucketSize),f=Math.max(f,3);for(var E=0;E<f;++E)o.push(new Array(s.bucketSize));var F=Math.ceil(b/s.bucketSize);n=Math.floor(f/2)-Math.floor(F/2),a=n,c.forEach(function(T){return d.pushBack(T)})}(),Object.freeze(this)}Object.defineProperty(p,"__esModule",{value:!0}),s.sigma=3,s.bucketSize=5e3,Object.freeze(s),p.default=s},{}],27:[function(r,i,p){var l=this&&this.__generator||function(n,h){var a,u,f,v,y={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(b){return function(m){return function(E){if(a)throw new TypeError("Generator is already executing.");for(;y;)try{if(a=1,u&&(f=2&E[0]?u.return:E[0]?u.throw||((f=u.return)&&f.call(u),0):u.next)&&!(f=f.call(u,E[1])).done)return f;switch(u=0,f&&(E=[2&E[0],f.value]),E[0]){case 0:case 1:f=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,u=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(!(f=(f=y.trys).length>0&&f[f.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!f||E[1]>f[0]&&E[1]<f[3])){y.label=E[1];break}if(E[0]===6&&y.label<f[1]){y.label=f[1],f=E;break}if(f&&y.label<f[2]){y.label=f[2],y.ops.push(E);break}f[2]&&y.ops.pop(),y.trys.pop();continue}E=h.call(n,y)}catch(F){E=[6,F],u=0}finally{a=f=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}([b,m])}}},s=this&&this.__values||function(n){var h=typeof Symbol=="function"&&Symbol.iterator,a=h&&n[h],u=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&u>=n.length&&(n=void 0),{value:n&&n[u++],done:!n}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(p,"__esModule",{value:!0});var c=r("../LinkList/LinkList"),d=r("../Map/Map");function o(n,h,a){var u=this;if(n===void 0&&(n=[]),h===void 0&&(h=o.initSize),a=a||function(g){var b,m,E=0,F="";if(typeof g=="number")E=((E=Math.floor(g))<<5)-E,E&=E;else{F=typeof g!="string"?JSON.stringify(g):g;try{for(var T=s(F),D=T.next();!D.done;D=T.next())E=(E<<5)-E+D.value.charCodeAt(0),E&=E}catch(I){b={error:I}}finally{try{D&&!D.done&&(m=T.return)&&m.call(T)}finally{if(b)throw b.error}}}return E^=E>>>16},(h&h-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var f=0,v=[],y=Math.max(o.initSize,Math.min(o.maxSize,h));this.size=function(){return f},this.empty=function(){return f===0},this.clear=function(){f=0,y=h,v=[]},this.forEach=function(g){var b=0;v.forEach(function(m){m.forEach(function(E){g(E,b++)})})},this.setElement=function(g,b){var m,E;if(g==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(b!=null){var F=a(g)&y-1;if(v[F]){var T=v[F].size();if(v[F]instanceof c.default){try{for(var D=s(v[F]),I=D.next();!I.done;I=D.next()){var Y=I.value;if(Y.key===g)return void(Y.value=b)}}catch(_){m={error:_}}finally{try{I&&!I.done&&(E=D.return)&&E.call(D)}finally{if(m)throw m.error}}v[F].pushBack({key:g,value:b}),v[F].size()>=o.treeifyThreshold&&(v[F]=new d.default(v[F]))}else v[F].setElement(g,b);var W=v[F].size();f+=W-T}else++f,v[F]=new c.default([{key:g,value:b}]);f>y*o.sigma&&function(_){if(!(_>=o.maxSize)){y=2*_;var A=[];v.forEach(function(C,B){if(!C.empty()){if(C instanceof c.default&&C.size()===1){var N=C.front(),q=N.key,X=N.value;A[a(q)&y-1]=new c.default([{key:q,value:X}])}else if(C instanceof d.default){var $=new c.default,M=new c.default;C.forEach(function(R){a(R.key)&_?M.pushBack(R):$.pushBack(R)}),$.size()>o.untreeifyThreshold?A[B]=new d.default($):$.size()&&(A[B]=$),M.size()>o.untreeifyThreshold?A[B+_]=new d.default(M):M.size()&&(A[B+_]=M)}else{var j=new c.default,L=new c.default;C.forEach(function(R){a(R.key)&_?L.pushBack(R):j.pushBack(R)}),j.size()&&(A[B]=j),L.size()&&(A[B+_]=L)}v[B].clear()}}),v=A}}.call(this,y)}else this.eraseElementByKey(g)},this.getElementByKey=function(g){var b,m,E=a(g)&y-1;if(v[E]){if(v[E]instanceof d.default)return v[E].getElementByKey(g);try{for(var F=s(v[E]),T=F.next();!T.done;T=F.next()){var D=T.value;if(D.key===g)return D.value}}catch(I){b={error:I}}finally{try{T&&!T.done&&(m=F.return)&&m.call(F)}finally{if(b)throw b.error}}}},this.eraseElementByKey=function(g){var b,m,E=a(g)&y-1;if(v[E]){var F=v[E].size();if(v[E]instanceof d.default)v[E].eraseElementByKey(g),v[E].size()<=o.untreeifyThreshold&&(v[E]=new c.default(v[E]));else{var T=-1;try{for(var D=s(v[E]),I=D.next();!I.done;I=D.next())if(++T,I.value.key===g){v[E].eraseElementByPos(T);break}}catch(W){b={error:W}}finally{try{I&&!I.done&&(m=D.return)&&m.call(D)}finally{if(b)throw b.error}}}var Y=v[E].size();f+=Y-F}},this.find=function(g){var b,m,E=a(g)&y-1;if(!v[E])return!1;if(v[E]instanceof d.default)return v[E].find(g);try{for(var F=s(v[E]),T=F.next();!T.done;T=F.next())if(T.value.key===g)return!0}catch(D){b={error:D}}finally{try{T&&!T.done&&(m=F.return)&&m.call(F)}finally{if(b)throw b.error}}return!1},this[Symbol.iterator]=function(){return function(){var g,b,m,E,F,T;return l(this,function(D){switch(D.label){case 0:g=0,D.label=1;case 1:if(!(g<y))return[3,10];for(;g<y&&!v[g];)++g;if(g>=y)return[3,10];D.label=2;case 2:D.trys.push([2,7,8,9]),F=void 0,b=s(v[g]),m=b.next(),D.label=3;case 3:return m.done?[3,6]:[4,m.value];case 4:D.sent(),D.label=5;case 5:return m=b.next(),[3,3];case 6:return[3,9];case 7:return E=D.sent(),F={error:E},[3,9];case 8:try{m&&!m.done&&(T=b.return)&&T.call(b)}finally{if(F)throw F.error}return[7];case 9:return++g,[3,1];case 10:return[2]}})}()},n.forEach(function(g){var b=g.key,m=g.value;return u.setElement(b,m)}),Object.freeze(this)}o.initSize=16,o.maxSize=1<<30,o.sigma=.75,o.treeifyThreshold=8,o.untreeifyThreshold=6,o.minTreeifySize=64,Object.freeze(o),p.default=o},{"../LinkList/LinkList":29,"../Map/Map":30}],28:[function(r,i,p){var l=this&&this.__generator||function(n,h){var a,u,f,v,y={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(b){return function(m){return function(E){if(a)throw new TypeError("Generator is already executing.");for(;y;)try{if(a=1,u&&(f=2&E[0]?u.return:E[0]?u.throw||((f=u.return)&&f.call(u),0):u.next)&&!(f=f.call(u,E[1])).done)return f;switch(u=0,f&&(E=[2&E[0],f.value]),E[0]){case 0:case 1:f=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,u=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(!(f=(f=y.trys).length>0&&f[f.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!f||E[1]>f[0]&&E[1]<f[3])){y.label=E[1];break}if(E[0]===6&&y.label<f[1]){y.label=f[1],f=E;break}if(f&&y.label<f[2]){y.label=f[2],y.ops.push(E);break}f[2]&&y.ops.pop(),y.trys.pop();continue}E=h.call(n,y)}catch(F){E=[6,F],u=0}finally{a=f=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}([b,m])}}},s=this&&this.__values||function(n){var h=typeof Symbol=="function"&&Symbol.iterator,a=h&&n[h],u=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&u>=n.length&&(n=void 0),{value:n&&n[u++],done:!n}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(p,"__esModule",{value:!0});var c=r("../Set/Set"),d=r("../LinkList/LinkList");function o(n,h,a){var u=this;if(n===void 0&&(n=[]),h===void 0&&(h=o.initSize),a=a||function(g){var b=0,m="";if(typeof g=="number")b=((b=Math.floor(g))<<5)-b,b&=b;else{m=typeof g!="string"?JSON.stringify(g):g;for(var E=0;E<m.length;E++)b=(b<<5)-b+m.charCodeAt(E),b&=b}return b^=b>>>16},(h&h-1)!=0)throw new Error("initBucketNum must be 2 to the power of n");var f=0,v=[],y=Math.max(o.initSize,Math.min(o.maxSize,h));this.size=function(){return f},this.empty=function(){return f===0},this.clear=function(){f=0,y=h,v=[]},this.forEach=function(g){var b=0;v.forEach(function(m){m.forEach(function(E){g(E,b++)})})},this.insert=function(g){if(g==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var b=a(g)&y-1;if(v[b]){var m=v[b].size();if(v[b]instanceof d.default){if(v[b].find(g))return;v[b].pushBack(g),v[b].size()>=o.treeifyThreshold&&(v[b]=new c.default(v[b]))}else v[b].insert(g);var E=v[b].size();f+=E-m}else v[b]=new d.default([g]),++f;f>y*o.sigma&&function(F){if(!(F>=o.maxSize)){y=2*F;var T=[];v.forEach(function(D,I){if(!D.empty()){if(D instanceof d.default&&D.size()===1){var Y=D.front();if(Y===void 0)throw new Error("unknown error");T[a(Y)&y-1]=new d.default([Y])}else if(D instanceof c.default){var W=new d.default,_=new d.default;D.forEach(function(B){a(B)&F?_.pushBack(B):W.pushBack(B)}),W.size()>o.untreeifyThreshold?T[I]=new c.default(W):W.size()&&(T[I]=W),_.size()>o.untreeifyThreshold?T[I+F]=new c.default(_):_.size()&&(T[I+F]=_)}else{var A=new d.default,C=new d.default;D.forEach(function(B){a(B)&F?C.pushBack(B):A.pushBack(B)}),A.size()&&(T[I]=A),C.size()&&(T[I+F]=C)}v[I].clear()}}),v=T}}.call(this,y)},this.eraseElementByValue=function(g){var b=a(g)&y-1;if(v[b]){var m=v[b].size();v[b].eraseElementByValue(g),v[b]instanceof c.default&&v[b].size()<=o.untreeifyThreshold&&(v[b]=new d.default(v[b]));var E=v[b].size();f+=E-m}},this.find=function(g){var b=a(g)&y-1;return!!v[b]&&v[b].find(g)},this[Symbol.iterator]=function(){return function(){var g,b,m,E,F,T;return l(this,function(D){switch(D.label){case 0:g=0,D.label=1;case 1:if(!(g<y))return[3,10];for(;g<y&&!v[g];)++g;if(g>=y)return[3,10];D.label=2;case 2:D.trys.push([2,7,8,9]),F=void 0,b=s(v[g]),m=b.next(),D.label=3;case 3:return m.done?[3,6]:[4,m.value];case 4:D.sent(),D.label=5;case 5:return m=b.next(),[3,3];case 6:return[3,9];case 7:return E=D.sent(),F={error:E},[3,9];case 8:try{m&&!m.done&&(T=b.return)&&T.call(b)}finally{if(F)throw F.error}return[7];case 9:return++g,[3,1];case 10:return[2]}})}()},n.forEach(function(g){return u.insert(g)}),Object.freeze(this)}o.initSize=16,o.maxSize=1<<30,o.sigma=.75,o.treeifyThreshold=8,o.untreeifyThreshold=6,o.minTreeifySize=64,Object.freeze(o),p.default=o},{"../LinkList/LinkList":29,"../Set/Set":33}],29:[function(r,i,p){var l=this&&this.__generator||function(d,o){var n,h,a,u,f={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return u={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function v(y){return function(g){return function(b){if(n)throw new TypeError("Generator is already executing.");for(;f;)try{if(n=1,h&&(a=2&b[0]?h.return:b[0]?h.throw||((a=h.return)&&a.call(h),0):h.next)&&!(a=a.call(h,b[1])).done)return a;switch(h=0,a&&(b=[2&b[0],a.value]),b[0]){case 0:case 1:a=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,h=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(!(a=(a=f.trys).length>0&&a[a.length-1])&&(b[0]===6||b[0]===2)){f=0;continue}if(b[0]===3&&(!a||b[1]>a[0]&&b[1]<a[3])){f.label=b[1];break}if(b[0]===6&&f.label<a[1]){f.label=a[1],a=b;break}if(a&&f.label<a[2]){f.label=a[2],f.ops.push(b);break}a[2]&&f.ops.pop(),f.trys.pop();continue}b=o.call(d,f)}catch(m){b=[6,m],h=0}finally{n=a=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([y,g])}}};Object.defineProperty(p,"__esModule",{value:!0});var s=function(){return function(d){this.value=void 0,this.pre=void 0,this.next=void 0,this.value=d}}();function c(d){var o=this;d===void 0&&(d=[]);var n=0,h=void 0,a=void 0;this.size=function(){return n},this.empty=function(){return n===0},this.clear=function(){h=a=void 0,n=0},this.front=function(){return h==null?void 0:h.value},this.back=function(){return a==null?void 0:a.value},this.forEach=function(u){for(var f=h,v=0;f;){if(f.value===void 0)throw new Error("unknown error");u(f.value,v++),f=f.next}},this.getElementByPos=function(u){if(u<0||u>=n)throw new Error("pos must more then 0 and less then the list length");for(var f=h;u--&&f;)f=f.next;if(!f||f.value===void 0)throw new Error("unknown error");return f.value},this.eraseElementByPos=function(u){if(u<0||u>=n)throw new Error("erase pos must more then 0 and less then the list length");if(u===0)this.popFront();else if(u===n-1)this.popBack();else{for(var f=h;u--;){if(!(f!=null&&f.next))throw new Error("unknown error");f=f.next}if(!f||!f.pre||!f.next)throw new Error("unknown error");var v=f.pre,y=f.next;y.pre=v,v.next=y,n>0&&--n}},this.eraseElementByValue=function(u){for(;h&&h.value===u;)this.popFront();for(;a&&a.value===u;)this.popBack();if(h)for(var f=h;f;){if(f.value===u){var v=f.pre,y=f.next;y&&(y.pre=v),v&&(v.next=y),n>0&&--n}f=f.next}},this.pushBack=function(u){if(u==null)throw new Error("you can't push null or undefined here");++n;var f=new s(u);a?(a.next=f,f.pre=a,a=f):h=a=f},this.popBack=function(){a&&(n>0&&--n,a&&(h===a?h=a=void 0:(a=a.pre)&&(a.next=void 0)))},this.setElementByPos=function(u,f){if(f==null)throw new Error("you can't set null or undefined here");if(u<0||u>=n)throw new Error("pos must more then 0 and less then the list length");for(var v=h;u--;){if(!v)throw new Error("unknown error");v=v.next}v&&(v.value=f)},this.insert=function(u,f,v){if(v===void 0&&(v=1),f==null)throw new Error("you can't insert null or undefined here");if(u<0||u>n)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(v<0)throw new Error("insert size must more than 0");if(u===0)for(;v--;)this.pushFront(f);else if(u===n)for(;v--;)this.pushBack(f);else{for(var y=h,g=1;g<u;++g){if(!(y!=null&&y.next))throw new Error("unknown error");y=y==null?void 0:y.next}if(!y)throw new Error("unknown error");var b=y.next;for(n+=v;v--;)y.next=new s(f),y.next.pre=y,y=y.next;y.next=b,b&&(b.pre=y)}},this.find=function(u){for(var f=h;f;){if(f.value===u)return!0;f=f.next}return!1},this.reverse=function(){for(var u=h,f=a,v=0;u&&f&&2*v<n;){var y=u.value;u.value=f.value,f.value=y,u=u.next,f=f.pre,++v}},this.unique=function(){for(var u=h;u;){for(var f=u;f&&f.next&&f.value===f.next.value;)f=f.next,n>0&&--n;u.next=f.next,u.next&&(u.next.pre=u),u=u.next}},this.sort=function(u){var f=[];this.forEach(function(y){f.push(y)}),f.sort(u);var v=h;f.forEach(function(y){v&&(v.value=y,v=v.next)})},this.pushFront=function(u){if(u==null)throw new Error("you can't push null or undefined here");++n;var f=new s(u);h?(f.next=h,h.pre=f,h=f):h=a=f},this.popFront=function(){h&&(n>0&&--n,h&&(h===a?h=a=void 0:(h=h.next)&&(h.pre=void 0)))},this.merge=function(u){var f=this,v=h;u.forEach(function(y){for(;v&&v.value!==void 0&&v.value<=y;)v=v.next;if(v===void 0)f.pushBack(y),v=a;else if(v===h)f.pushFront(y),v=h;else{++n;var g=v.pre;g&&(g.next=new s(y),g.next.pre=g,g.next.next=v,v&&(v.pre=g.next))}})},this[Symbol.iterator]=function(){return function(){var u;return l(this,function(f){switch(f.label){case 0:u=h,f.label=1;case 1:if(u===void 0)return[3,3];if(!u.value)throw new Error("unknown error");return[4,u.value];case 2:return f.sent(),u=u.next,[3,1];case 3:return[2]}})}()},d.forEach(function(u){return o.pushBack(u)}),Object.freeze(this)}Object.freeze(c),p.default=c},{}],30:[function(r,i,p){var l=this&&this.__generator||function(o,n){var h,a,u,f,v={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return f={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function y(g){return function(b){return function(m){if(h)throw new TypeError("Generator is already executing.");for(;v;)try{if(h=1,a&&(u=2&m[0]?a.return:m[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,m[1])).done)return u;switch(a=0,u&&(m=[2&m[0],u.value]),m[0]){case 0:case 1:u=m;break;case 4:return v.label++,{value:m[1],done:!1};case 5:v.label++,a=m[1],m=[0];continue;case 7:m=v.ops.pop(),v.trys.pop();continue;default:if(!(u=(u=v.trys).length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){v=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){v.label=m[1];break}if(m[0]===6&&v.label<u[1]){v.label=u[1],u=m;break}if(u&&v.label<u[2]){v.label=u[2],v.ops.push(m);break}u[2]&&v.ops.pop(),v.trys.pop();continue}m=n.call(o,v)}catch(E){m=[6,E],a=0}finally{h=u=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([g,b])}}},s=this&&this.__values||function(o){var n=typeof Symbol=="function"&&Symbol.iterator,h=n&&o[n],a=0;if(h)return h.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&a>=o.length&&(o=void 0),{value:o&&o[a++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(p,"__esModule",{value:!0});var c=r("../Base/TreeNode");function d(o,n){var h=this;o===void 0&&(o=[]),n=n||function(_,A){return _<A?-1:_>A?1:0};var a=0,u=new c.default;u.color=c.default.TreeNodeColorType.black,this.size=function(){return a},this.empty=function(){return a===0},this.clear=function(){a=0,u.key=u.value=void 0,u.leftChild=u.rightChild=u.brother=void 0};var f=function(_){if(!_||_.key===void 0)throw new Error("unknown error");return _.leftChild?f(_.leftChild):_},v=function(_){if(!_||_.key===void 0)throw new Error("unknown error");return _.rightChild?v(_.rightChild):_};this.front=function(){if(!this.empty()){var _=f(u);if(_.key===void 0||_.value===void 0)throw new Error("unknown error");return{key:_.key,value:_.value}}},this.back=function(){if(!this.empty()){var _=v(u);if(_.key===void 0||_.value===void 0)throw new Error("unknown error");return{key:_.key,value:_.value}}},this.forEach=function(_){var A,C,B=0;try{for(var N=s(this),q=N.next();!q.done;q=N.next())_(q.value,B++)}catch(X){A={error:X}}finally{try{q&&!q.done&&(C=N.return)&&C.call(N)}finally{if(A)throw A.error}}},this.getElementByPos=function(_){var A,C;if(_<0||_>=this.size())throw new Error("pos must more than 0 and less than set's size");var B=0;try{for(var N=s(this),q=N.next();!q.done;q=N.next()){var X=q.value;if(B===_)return X;++B}}catch($){A={error:$}}finally{try{q&&!q.done&&(C=N.return)&&C.call(N)}finally{if(A)throw A.error}}throw new Error("unknown Error")};var y=function(_,A){if(_&&_.key!==void 0&&_.value!==void 0){var C=n(_.key,A);return C===0?{key:_.key,value:_.value}:C<0?y(_.rightChild,A):y(_.leftChild,A)||{key:_.key,value:_.value}}};this.lowerBound=function(_){return y(u,_)};var g=function(_,A){if(_&&_.key!==void 0&&_.value!==void 0)return n(_.key,A)<=0?g(_.rightChild,A):g(_.leftChild,A)||{key:_.key,value:_.value}};this.upperBound=function(_){return g(u,_)};var b=function(_,A){if(_&&_.key!==void 0&&_.value!==void 0){var C=n(_.key,A);return C===0?{key:_.key,value:_.value}:C>0?b(_.leftChild,A):b(_.rightChild,A)||{key:_.key,value:_.value}}};this.reverseLowerBound=function(_){return b(u,_)};var m=function(_,A){if(_&&_.key!==void 0&&_.value!==void 0)return n(_.key,A)>=0?m(_.leftChild,A):m(_.rightChild,A)||{key:_.key,value:_.value}};this.reverseUpperBound=function(_){return m(u,_)};var E=function(_){var A=_.parent;if(!A){if(_===u)return;throw new Error("unknown error")}if(_.color!==c.default.TreeNodeColorType.red){var C=_.brother;if(!C)throw new Error("unknown error");if(_===A.leftChild)if(C.color===c.default.TreeNodeColorType.red){C.color=c.default.TreeNodeColorType.black,A.color=c.default.TreeNodeColorType.red;var B=A.rotateLeft();u===A&&(u=B),E(_)}else C.color===c.default.TreeNodeColorType.black&&(C.rightChild&&C.rightChild.color===c.default.TreeNodeColorType.red?(C.color=A.color,A.color=c.default.TreeNodeColorType.black,C.rightChild&&(C.rightChild.color=c.default.TreeNodeColorType.black),B=A.rotateLeft(),u===A&&(u=B),_.color=c.default.TreeNodeColorType.black):C.rightChild&&C.rightChild.color!==c.default.TreeNodeColorType.black||!C.leftChild||C.leftChild.color!==c.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==c.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==c.default.TreeNodeColorType.black||(C.color=c.default.TreeNodeColorType.red,E(A)):(C.color=c.default.TreeNodeColorType.red,C.leftChild&&(C.leftChild.color=c.default.TreeNodeColorType.black),B=C.rotateRight(),u===C&&(u=B),E(_)));else _===A.rightChild&&(C.color===c.default.TreeNodeColorType.red?(C.color=c.default.TreeNodeColorType.black,A.color=c.default.TreeNodeColorType.red,B=A.rotateRight(),u===A&&(u=B),E(_)):C.color===c.default.TreeNodeColorType.black&&(C.leftChild&&C.leftChild.color===c.default.TreeNodeColorType.red?(C.color=A.color,A.color=c.default.TreeNodeColorType.black,C.leftChild&&(C.leftChild.color=c.default.TreeNodeColorType.black),B=A.rotateRight(),u===A&&(u=B),_.color=c.default.TreeNodeColorType.black):C.leftChild&&C.leftChild.color!==c.default.TreeNodeColorType.black||!C.rightChild||C.rightChild.color!==c.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==c.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==c.default.TreeNodeColorType.black||(C.color=c.default.TreeNodeColorType.red,E(A)):(C.color=c.default.TreeNodeColorType.red,C.rightChild&&(C.rightChild.color=c.default.TreeNodeColorType.black),B=C.rotateLeft(),u===C&&(u=B),E(_))))}else _.color=c.default.TreeNodeColorType.black},F=function(_){for(var A=_;A.leftChild||A.rightChild;){if(A.rightChild){A=f(A.rightChild);var C=_.key;_.key=A.key,A.key=C;var B=_.value;_.value=A.value,A.value=B,_=A}A.leftChild&&(A=v(A.leftChild),C=_.key,_.key=A.key,A.key=C,B=_.value,_.value=A.value,A.value=B,_=A)}E(A),A&&A.remove(),--a,u.color=c.default.TreeNodeColorType.black},T=function(_,A){return!(!_||_.key===void 0)&&(!!T(_.leftChild,A)||!!A(_)||T(_.rightChild,A))};this.eraseElementByPos=function(_){if(_<0||_>=a)throw new Error("pos must more than 0 and less than set's size");var A=0;T(u,function(C){return _===A?(F(C),!0):(++A,!1)})},this.eraseElementByKey=function(_){if(!this.empty()){var A=Y(u,_);A!==void 0&&A.key!==void 0&&n(A.key,_)===0&&F(A)}};var D=function(_,A){if(!_||_.key===void 0)throw new Error("unknown error");var C=n(A,_.key);return C<0?_.leftChild?D(_.leftChild,A):(_.leftChild=new c.default,_.leftChild.parent=_,_.leftChild.brother=_.rightChild,_.rightChild&&(_.rightChild.brother=_.leftChild),_.leftChild):C>0?_.rightChild?D(_.rightChild,A):(_.rightChild=new c.default,_.rightChild.parent=_,_.rightChild.brother=_.leftChild,_.leftChild&&(_.leftChild.brother=_.rightChild),_.rightChild):_},I=function(_){var A=_.parent;if(!A){if(_===u)return;throw new Error("unknown error")}if(A.color!==c.default.TreeNodeColorType.black&&A.color===c.default.TreeNodeColorType.red){var C=A.brother,B=A.parent;if(!B)throw new Error("unknown error");if(C&&C.color===c.default.TreeNodeColorType.red)C.color=A.color=c.default.TreeNodeColorType.black,B.color=c.default.TreeNodeColorType.red,I(B);else if(!C||C.color===c.default.TreeNodeColorType.black)if(A===B.leftChild)if(_===A.leftChild){A.color=c.default.TreeNodeColorType.black,B.color=c.default.TreeNodeColorType.red;var N=B.rotateRight();B===u&&(u=N)}else _===A.rightChild&&(N=A.rotateLeft(),B===u&&(u=N),I(A));else A===B.rightChild&&(_===A.leftChild?(N=A.rotateRight(),B===u&&(u=N),I(A)):_===A.rightChild&&(A.color=c.default.TreeNodeColorType.black,B.color=c.default.TreeNodeColorType.red,N=B.rotateLeft(),B===u&&(u=N)))}};this.setElement=function(_,A){if(_==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(A!=null){if(this.empty())return++a,u.key=_,u.value=A,void(u.color=c.default.TreeNodeColorType.black);var C=D(u,_);C.key===void 0||n(C.key,_)!==0?(++a,C.key=_,C.value=A,I(C),u.color=c.default.TreeNodeColorType.black):C.value=A}else this.eraseElementByKey(_)};var Y=function(_,A){if(_&&_.key!==void 0){var C=n(A,_.key);return C<0?Y(_.leftChild,A):C>0?Y(_.rightChild,A):_}};this.find=function(_){return!!Y(u,_)},this.getElementByKey=function(_){var A=Y(u,_);if((A==null?void 0:A.key)===void 0||(A==null?void 0:A.value)===void 0)throw new Error("unknown error");return A.value},this.union=function(_){var A=this;_.forEach(function(C){var B=C.key,N=C.value;return A.setElement(B,N)})},this.getHeight=function(){if(this.empty())return 0;var _=function(A){return A?Math.max(_(A.leftChild),_(A.rightChild))+1:1};return _(u)};var W=function(_){return l(this,function(A){switch(A.label){case 0:return _&&_.key!==void 0&&_.value!==void 0?[5,s(W(_.leftChild))]:[2];case 1:return A.sent(),[4,{key:_.key,value:_.value}];case 2:return A.sent(),[5,s(W(_.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return W(u)},o.forEach(function(_){var A=_.key,C=_.value;return h.setElement(A,C)}),Object.freeze(this)}Object.freeze(d),p.default=d},{"../Base/TreeNode":25}],31:[function(r,i,p){function l(s,c){s===void 0&&(s=[]),c=c||function(a,u){return a>u?-1:a<u?1:0};var d=[];s.forEach(function(a){return d.push(a)});var o=d.length,n=function(a,u){if(a<0||a>=o)throw new Error("unknown error");if(u<0||u>=o)throw new Error("unknown error");var f=d[a];d[a]=d[u],d[u]=f},h=function(a){if(a<0||a>=o)throw new Error("unknown error");var u=2*a+1,f=2*a+2;u<o&&c(d[a],d[u])>0&&n(a,u),f<o&&c(d[a],d[f])>0&&n(a,f)};(function(){for(var a=Math.floor((o-1)/2);a>=0;--a)for(var u=a,f=2*u+1;f<o;){var v=f+1,y=f;if(v<o&&c(d[f],d[v])>0&&(y=v),c(d[u],d[y])<=0)break;n(u,y),f=2*(u=y)+1}})(),this.size=function(){return o},this.empty=function(){return o===0},this.clear=function(){o=0,d.length=0},this.push=function(a){if(d.push(a),++o!==1)for(var u=o-1;u>0;){var f=Math.floor((u-1)/2);if(c(d[f],a)<=0)break;h(f),u=f}},this.pop=function(){if(!this.empty())if(this.size()!==1){var a=d[o-1];--o;for(var u=0;u<this.size();){var f=2*u+1,v=2*u+2;if(f>=this.size())break;var y=f;if(v<this.size()&&c(d[f],d[v])>0&&(y=v),c(d[y],a)>=0)break;d[u]=d[y],u=y}d[u]=a}else--o},this.top=function(){return d[0]},Object.freeze(this)}Object.defineProperty(p,"__esModule",{value:!0}),Object.freeze(l),p.default=l},{}],32:[function(r,i,p){Object.defineProperty(p,"__esModule",{value:!0});var l=r("../LinkList/LinkList");function s(c){c===void 0&&(c=[]);var d=new l.default(c);this.size=function(){return d.size()},this.empty=function(){return d.empty()},this.clear=function(){d.clear()},this.push=function(o){d.pushBack(o)},this.pop=function(){d.popFront()},this.front=function(){return d.front()},Object.freeze(this)}Object.freeze(s),p.default=s},{"../LinkList/LinkList":29}],33:[function(r,i,p){var l=this&&this.__generator||function(o,n){var h,a,u,f,v={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return f={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function y(g){return function(b){return function(m){if(h)throw new TypeError("Generator is already executing.");for(;v;)try{if(h=1,a&&(u=2&m[0]?a.return:m[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,m[1])).done)return u;switch(a=0,u&&(m=[2&m[0],u.value]),m[0]){case 0:case 1:u=m;break;case 4:return v.label++,{value:m[1],done:!1};case 5:v.label++,a=m[1],m=[0];continue;case 7:m=v.ops.pop(),v.trys.pop();continue;default:if(!(u=(u=v.trys).length>0&&u[u.length-1])&&(m[0]===6||m[0]===2)){v=0;continue}if(m[0]===3&&(!u||m[1]>u[0]&&m[1]<u[3])){v.label=m[1];break}if(m[0]===6&&v.label<u[1]){v.label=u[1],u=m;break}if(u&&v.label<u[2]){v.label=u[2],v.ops.push(m);break}u[2]&&v.ops.pop(),v.trys.pop();continue}m=n.call(o,v)}catch(E){m=[6,E],a=0}finally{h=u=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([g,b])}}},s=this&&this.__values||function(o){var n=typeof Symbol=="function"&&Symbol.iterator,h=n&&o[n],a=0;if(h)return h.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&a>=o.length&&(o=void 0),{value:o&&o[a++],done:!o}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(p,"__esModule",{value:!0});var c=r("../Base/TreeNode");function d(o,n){var h=this;o===void 0&&(o=[]),n=n||function(_,A){return _<A?-1:_>A?1:0};var a=0,u=new c.default;u.color=c.default.TreeNodeColorType.black,this.size=function(){return a},this.empty=function(){return a===0},this.clear=function(){a=0,u.key=void 0,u.leftChild=u.rightChild=u.brother=u.parent=void 0,u.color=c.default.TreeNodeColorType.black};var f=function(_){if(!_||_.key===void 0)throw new Error("unknown error");return _.leftChild?f(_.leftChild):_},v=function(_){if(!_||_.key===void 0)throw new Error("unknown error");return _.rightChild?v(_.rightChild):_};this.front=function(){if(!this.empty())return f(u).key},this.back=function(){if(!this.empty())return v(u).key},this.forEach=function(_){var A,C,B=0;try{for(var N=s(this),q=N.next();!q.done;q=N.next())_(q.value,B++)}catch(X){A={error:X}}finally{try{q&&!q.done&&(C=N.return)&&C.call(N)}finally{if(A)throw A.error}}},this.getElementByPos=function(_){var A,C;if(_<0||_>=this.size())throw new Error("pos must more than 0 and less than set's size");var B=0;try{for(var N=s(this),q=N.next();!q.done;q=N.next()){var X=q.value;if(B===_)return X;++B}}catch($){A={error:$}}finally{try{q&&!q.done&&(C=N.return)&&C.call(N)}finally{if(A)throw A.error}}throw new Error("unknown error")};var y=function(_){var A=_.parent;if(!A){if(_===u)return;throw new Error("unknown error")}if(_.color!==c.default.TreeNodeColorType.red){var C=_.brother;if(!C)throw new Error("unknown error");if(_===A.leftChild)if(C.color===c.default.TreeNodeColorType.red){C.color=c.default.TreeNodeColorType.black,A.color=c.default.TreeNodeColorType.red;var B=A.rotateLeft();u===A&&(u=B),y(_)}else C.color===c.default.TreeNodeColorType.black&&(C.rightChild&&C.rightChild.color===c.default.TreeNodeColorType.red?(C.color=A.color,A.color=c.default.TreeNodeColorType.black,C.rightChild&&(C.rightChild.color=c.default.TreeNodeColorType.black),B=A.rotateLeft(),u===A&&(u=B),_.color=c.default.TreeNodeColorType.black):C.rightChild&&C.rightChild.color!==c.default.TreeNodeColorType.black||!C.leftChild||C.leftChild.color!==c.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==c.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==c.default.TreeNodeColorType.black||(C.color=c.default.TreeNodeColorType.red,y(A)):(C.color=c.default.TreeNodeColorType.red,C.leftChild&&(C.leftChild.color=c.default.TreeNodeColorType.black),B=C.rotateRight(),u===C&&(u=B),y(_)));else _===A.rightChild&&(C.color===c.default.TreeNodeColorType.red?(C.color=c.default.TreeNodeColorType.black,A.color=c.default.TreeNodeColorType.red,B=A.rotateRight(),u===A&&(u=B),y(_)):C.color===c.default.TreeNodeColorType.black&&(C.leftChild&&C.leftChild.color===c.default.TreeNodeColorType.red?(C.color=A.color,A.color=c.default.TreeNodeColorType.black,C.leftChild&&(C.leftChild.color=c.default.TreeNodeColorType.black),B=A.rotateRight(),u===A&&(u=B),_.color=c.default.TreeNodeColorType.black):C.leftChild&&C.leftChild.color!==c.default.TreeNodeColorType.black||!C.rightChild||C.rightChild.color!==c.default.TreeNodeColorType.red?C.leftChild&&C.leftChild.color!==c.default.TreeNodeColorType.black||C.rightChild&&C.rightChild.color!==c.default.TreeNodeColorType.black||(C.color=c.default.TreeNodeColorType.red,y(A)):(C.color=c.default.TreeNodeColorType.red,C.rightChild&&(C.rightChild.color=c.default.TreeNodeColorType.black),B=C.rotateLeft(),u===C&&(u=B),y(_))))}else _.color=c.default.TreeNodeColorType.black},g=function(_){for(var A=_;A.leftChild||A.rightChild;){if(A.rightChild){A=f(A.rightChild);var C=_.key;_.key=A.key,A.key=C,_=A}A.leftChild&&(A=v(A.leftChild),C=_.key,_.key=A.key,A.key=C,_=A)}y(A),A&&A.remove(),--a,u.color=c.default.TreeNodeColorType.black},b=function(_,A){return!(!_||_.key===void 0)&&(!!b(_.leftChild,A)||!!A(_)||b(_.rightChild,A))};this.eraseElementByPos=function(_){if(_<0||_>=a)throw new Error("pos must more than 0 and less than set's size");var A=0;b(u,function(C){return _===A?(g(C),!0):(++A,!1)})},this.eraseElementByValue=function(_){if(!this.empty()){var A=F(u,_);A!==void 0&&A.key!==void 0&&n(A.key,_)===0&&g(A)}};var m=function(_,A){if(!_||_.key===void 0)throw new Error("unknown error");var C=n(A,_.key);return C<0?_.leftChild?m(_.leftChild,A):(_.leftChild=new c.default,_.leftChild.parent=_,_.leftChild.brother=_.rightChild,_.rightChild&&(_.rightChild.brother=_.leftChild),_.leftChild):C>0?_.rightChild?m(_.rightChild,A):(_.rightChild=new c.default,_.rightChild.parent=_,_.rightChild.brother=_.leftChild,_.leftChild&&(_.leftChild.brother=_.rightChild),_.rightChild):_},E=function(_){var A=_.parent;if(!A){if(_===u)return;throw new Error("unknown error")}if(A.color!==c.default.TreeNodeColorType.black&&A.color===c.default.TreeNodeColorType.red){var C=A.brother,B=A.parent;if(!B)throw new Error("unknown error");if(C&&C.color===c.default.TreeNodeColorType.red)C.color=A.color=c.default.TreeNodeColorType.black,B.color=c.default.TreeNodeColorType.red,E(B);else if(!C||C.color===c.default.TreeNodeColorType.black)if(A===B.leftChild)if(_===A.leftChild){A.color=c.default.TreeNodeColorType.black,B.color=c.default.TreeNodeColorType.red;var N=B.rotateRight();B===u&&(u=N)}else _===A.rightChild&&(N=A.rotateLeft(),B===u&&(u=N),E(A));else A===B.rightChild&&(_===A.leftChild?(N=A.rotateRight(),B===u&&(u=N),E(A)):_===A.rightChild&&(A.color=c.default.TreeNodeColorType.black,B.color=c.default.TreeNodeColorType.red,N=B.rotateLeft(),B===u&&(u=N)))}};this.insert=function(_){if(_==null)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty())return++a,u.key=_,void(u.color=c.default.TreeNodeColorType.black);var A=m(u,_);A.key!==void 0&&n(A.key,_)===0||(++a,A.key=_,E(A),u.color=c.default.TreeNodeColorType.black)};var F=function(_,A){if(_&&_.key!==void 0){var C=n(A,_.key);return C<0?F(_.leftChild,A):C>0?F(_.rightChild,A):_}};this.find=function(_){var A=F(u,_);return A!==void 0&&A.key!==void 0&&n(A.key,_)===0};var T=function(_,A){if(_&&_.key!==void 0){var C=n(_.key,A);if(C===0)return _.key;if(C<0)return T(_.rightChild,A);var B=T(_.leftChild,A);return B!==void 0?B:_.key}};this.lowerBound=function(_){return T(u,_)};var D=function(_,A){if(_&&_.key!==void 0){if(n(_.key,A)<=0)return D(_.rightChild,A);var C=D(_.leftChild,A);return C!==void 0?C:_.key}};this.upperBound=function(_){return D(u,_)};var I=function(_,A){if(_&&_.key!==void 0){var C=n(_.key,A);if(C===0)return _.key;if(C>0)return I(_.leftChild,A);var B=I(_.rightChild,A);return B!==void 0?B:_.key}};this.reverseLowerBound=function(_){return I(u,_)};var Y=function(_,A){if(_&&_.key!==void 0){if(n(_.key,A)>=0)return Y(_.leftChild,A);var C=Y(_.rightChild,A);return C!==void 0?C:_.key}};this.reverseUpperBound=function(_){return Y(u,_)},this.union=function(_){var A=this;_.forEach(function(C){return A.insert(C)})},this.getHeight=function(){if(this.empty())return 0;var _=function(A){return A?Math.max(_(A.leftChild),_(A.rightChild))+1:1};return _(u)};var W=function(_){return l(this,function(A){switch(A.label){case 0:return _&&_.key!==void 0?[5,s(W(_.leftChild))]:[2];case 1:return A.sent(),[4,_.key];case 2:return A.sent(),[5,s(W(_.rightChild))];case 3:return A.sent(),[2]}})};this[Symbol.iterator]=function(){return W(u)},o.forEach(function(_){return h.insert(_)}),Object.freeze(this)}Object.freeze(d),p.default=d},{"../Base/TreeNode":25}],34:[function(r,i,p){function l(s){var c=this;s===void 0&&(s=[]);var d=0,o=[];this.size=function(){return d},this.empty=function(){return d===0},this.clear=function(){d=0,o.length=0},this.push=function(n){o.push(n),++d},this.pop=function(){o.pop(),d>0&&--d},this.top=function(){return o[d-1]},s.forEach(function(n){return c.push(n)}),Object.freeze(this)}Object.defineProperty(p,"__esModule",{value:!0}),Object.freeze(l),p.default=l},{}],35:[function(r,i,p){var l=this&&this.__generator||function(n,h){var a,u,f,v,y={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return v={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function g(b){return function(m){return function(E){if(a)throw new TypeError("Generator is already executing.");for(;y;)try{if(a=1,u&&(f=2&E[0]?u.return:E[0]?u.throw||((f=u.return)&&f.call(u),0):u.next)&&!(f=f.call(u,E[1])).done)return f;switch(u=0,f&&(E=[2&E[0],f.value]),E[0]){case 0:case 1:f=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,u=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(!(f=(f=y.trys).length>0&&f[f.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!f||E[1]>f[0]&&E[1]<f[3])){y.label=E[1];break}if(E[0]===6&&y.label<f[1]){y.label=f[1],f=E;break}if(f&&y.label<f[2]){y.label=f[2],y.ops.push(E);break}f[2]&&y.ops.pop(),y.trys.pop();continue}E=h.call(n,y)}catch(F){E=[6,F],u=0}finally{a=f=0}if(5&E[0])throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}([b,m])}}},s=this&&this.__read||function(n,h){var a=typeof Symbol=="function"&&n[Symbol.iterator];if(!a)return n;var u,f,v=a.call(n),y=[];try{for(;(h===void 0||h-- >0)&&!(u=v.next()).done;)y.push(u.value)}catch(g){f={error:g}}finally{try{u&&!u.done&&(a=v.return)&&a.call(v)}finally{if(f)throw f.error}}return y},c=this&&this.__spreadArray||function(n,h,a){if(a||arguments.length===2)for(var u,f=0,v=h.length;f<v;f++)!u&&f in h||(u||(u=Array.prototype.slice.call(h,0,f)),u[f]=h[f]);return n.concat(u||Array.prototype.slice.call(h))},d=this&&this.__values||function(n){var h=typeof Symbol=="function"&&Symbol.iterator,a=h&&n[h],u=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&u>=n.length&&(n=void 0),{value:n&&n[u++],done:!n}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")};function o(n){var h=this;n===void 0&&(n=[]);var a=0,u=[];this.size=function(){return a},this.empty=function(){return a===0},this.clear=function(){a=0,u.length=0},this.front=function(){if(!this.empty())return u[0]},this.back=function(){if(!this.empty())return u[a-1]},this.forEach=function(f){u.forEach(f)},this.getElementByPos=function(f){if(f<0||f>=a)throw new Error("pos must more than 0 and less than vector's size");return u[f]},this.eraseElementByPos=function(f){if(f<0||f>=a)throw new Error("pos must more than 0 and less than vector's size");for(var v=f;v<a-1;++v)u[v]=u[v+1];this.popBack()},this.eraseElementByValue=function(f){var v=[];this.forEach(function(g){g!==f&&v.push(g)}),v.forEach(function(g,b){u[b]=g});for(var y=v.length;a>y;)this.popBack()},this.pushBack=function(f){u.push(f),++a},this.popBack=function(){u.pop(),a>0&&--a},this.setElementByPos=function(f,v){if(f<0||f>=a)throw new Error("pos must more than 0 and less than vector's size");u[f]=v},this.insert=function(f,v,y){if(y===void 0&&(y=1),f<0||f>a)throw new Error("pos must more than 0 and less than or equal to vector's size");u.splice.apply(u,c([f,0],s(new Array(y).fill(v)),!1)),a+=y},this.find=function(f){return u.includes(f)},this.reverse=function(){u.reverse()},this.unique=function(){var f,v=[];this.forEach(function(g,b){b!==0&&g===f||(v.push(g),f=g)}),v.forEach(function(g,b){u[b]=g});for(var y=v.length;a>y;)this.popBack()},this.sort=function(f){u.sort(f)},this[Symbol.iterator]=function(){return function(){return l(this,function(f){switch(f.label){case 0:return[5,d(u)];case 1:return[2,f.sent()]}})}()},n.forEach(function(f){return h.pushBack(f)}),Object.freeze(this)}Object.defineProperty(p,"__esModule",{value:!0}),Object.freeze(o),p.default=o},{}],36:[function(r,i,p){Object.defineProperty(p,"__esModule",{value:!0}),p.HashMap=p.HashSet=p.Map=p.Set=p.PriorityQueue=p.Deque=p.LinkList=p.Queue=p.Stack=p.Vector=void 0;var l=r("./Vector/Vector");p.Vector=l.default;var s=r("./Stack/Stack");p.Stack=s.default;var c=r("./Queue/Queue");p.Queue=c.default;var d=r("./LinkList/LinkList");p.LinkList=d.default;var o=r("./Deque/Deque");p.Deque=o.default;var n=r("./PriorityQueue/PriorityQueue");p.PriorityQueue=n.default;var h=r("./Set/Set");p.Set=h.default;var a=r("./Map/Map");p.Map=a.default;var u=r("./HashSet/HashSet");p.HashSet=u.default;var f=r("./HashMap/HashMap");p.HashMap=f.default},{"./Deque/Deque":26,"./HashMap/HashMap":27,"./HashSet/HashSet":28,"./LinkList/LinkList":29,"./Map/Map":30,"./PriorityQueue/PriorityQueue":31,"./Queue/Queue":32,"./Set/Set":33,"./Stack/Stack":34,"./Vector/Vector":35}],37:[function(r,i,p){const l=r("yallist"),s=Symbol("max"),c=Symbol("length"),d=Symbol("lengthCalculator"),o=Symbol("allowStale"),n=Symbol("maxAge"),h=Symbol("dispose"),a=Symbol("noDisposeOnSet"),u=Symbol("lruList"),f=Symbol("cache"),v=Symbol("updateAgeOnGet"),y=()=>1,g=(D,I,Y)=>{const W=D[f].get(I);if(W){const _=W.value;if(b(D,_)){if(E(D,W),!D[o])return}else Y&&(D[v]&&(W.value.now=Date.now()),D[u].unshiftNode(W));return _.value}},b=(D,I)=>{if(!I||!I.maxAge&&!D[n])return!1;const Y=Date.now()-I.now;return I.maxAge?Y>I.maxAge:D[n]&&Y>D[n]},m=D=>{if(D[c]>D[s])for(let I=D[u].tail;D[c]>D[s]&&I!==null;){const Y=I.prev;E(D,I),I=Y}},E=(D,I)=>{if(I){const Y=I.value;D[h]&&D[h](Y.key,Y.value),D[c]-=Y.length,D[f].delete(Y.key),D[u].removeNode(I)}};class F{constructor(I,Y,W,_,A){this.key=I,this.value=Y,this.length=W,this.now=_,this.maxAge=A||0}}const T=(D,I,Y,W)=>{let _=Y.value;b(D,_)&&(E(D,Y),D[o]||(_=void 0)),_&&I.call(W,_.value,_.key,D)};i.exports=class{constructor(D){if(typeof D=="number"&&(D={max:D}),D||(D={}),D.max&&(typeof D.max!="number"||D.max<0))throw new TypeError("max must be a non-negative number");this[s]=D.max||1/0;const I=D.length||y;if(this[d]=typeof I!="function"?y:I,this[o]=D.stale||!1,D.maxAge&&typeof D.maxAge!="number")throw new TypeError("maxAge must be a number");this[n]=D.maxAge||0,this[h]=D.dispose,this[a]=D.noDisposeOnSet||!1,this[v]=D.updateAgeOnGet||!1,this.reset()}set max(D){if(typeof D!="number"||D<0)throw new TypeError("max must be a non-negative number");this[s]=D||1/0,m(this)}get max(){return this[s]}set allowStale(D){this[o]=!!D}get allowStale(){return this[o]}set maxAge(D){if(typeof D!="number")throw new TypeError("maxAge must be a non-negative number");this[n]=D,m(this)}get maxAge(){return this[n]}set lengthCalculator(D){typeof D!="function"&&(D=y),D!==this[d]&&(this[d]=D,this[c]=0,this[u].forEach(I=>{I.length=this[d](I.value,I.key),this[c]+=I.length})),m(this)}get lengthCalculator(){return this[d]}get length(){return this[c]}get itemCount(){return this[u].length}rforEach(D,I){I=I||this;for(let Y=this[u].tail;Y!==null;){const W=Y.prev;T(this,D,Y,I),Y=W}}forEach(D,I){I=I||this;for(let Y=this[u].head;Y!==null;){const W=Y.next;T(this,D,Y,I),Y=W}}keys(){return this[u].toArray().map(D=>D.key)}values(){return this[u].toArray().map(D=>D.value)}reset(){this[h]&&this[u]&&this[u].length&&this[u].forEach(D=>this[h](D.key,D.value)),this[f]=new Map,this[u]=new l,this[c]=0}dump(){return this[u].map(D=>!b(this,D)&&{k:D.key,v:D.value,e:D.now+(D.maxAge||0)}).toArray().filter(D=>D)}dumpLru(){return this[u]}set(D,I,Y){if((Y=Y||this[n])&&typeof Y!="number")throw new TypeError("maxAge must be a number");const W=Y?Date.now():0,_=this[d](I,D);if(this[f].has(D)){if(_>this[s])return E(this,this[f].get(D)),!1;const C=this[f].get(D).value;return this[h]&&(this[a]||this[h](D,C.value)),C.now=W,C.maxAge=Y,C.value=I,this[c]+=_-C.length,C.length=_,this.get(D),m(this),!0}const A=new F(D,I,_,W,Y);return A.length>this[s]?(this[h]&&this[h](D,I),!1):(this[c]+=A.length,this[u].unshift(A),this[f].set(D,this[u].head),m(this),!0)}has(D){if(!this[f].has(D))return!1;const I=this[f].get(D).value;return!b(this,I)}get(D){return g(this,D,!0)}peek(D){return g(this,D,!1)}pop(){const D=this[u].tail;return D?(E(this,D),D.value):null}del(D){E(this,this[f].get(D))}load(D){this.reset();const I=Date.now();for(let Y=D.length-1;Y>=0;Y--){const W=D[Y],_=W.e||0;if(_===0)this.set(W.k,W.v);else{const A=_-I;A>0&&this.set(W.k,W.v,A)}}}prune(){this[f].forEach((D,I)=>g(this,I,!1))}}},{yallist:83}],38:[function(r,i,p){(function(l){(function(){const s=i.exports;s.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},s.codes={};for(const d in s.types){const o=s.types[d];s.codes[o]=d}s.CMD_SHIFT=4,s.CMD_MASK=240,s.DUP_MASK=8,s.QOS_MASK=3,s.QOS_SHIFT=1,s.RETAIN_MASK=1,s.VARBYTEINT_MASK=127,s.VARBYTEINT_FIN_MASK=128,s.VARBYTEINT_MAX=268435455,s.SESSIONPRESENT_MASK=1,s.SESSIONPRESENT_HEADER=l.from([s.SESSIONPRESENT_MASK]),s.CONNACK_HEADER=l.from([s.codes.connack<<s.CMD_SHIFT]),s.USERNAME_MASK=128,s.PASSWORD_MASK=64,s.WILL_RETAIN_MASK=32,s.WILL_QOS_MASK=24,s.WILL_QOS_SHIFT=3,s.WILL_FLAG_MASK=4,s.CLEAN_SESSION_MASK=2,s.CONNECT_HEADER=l.from([s.codes.connect<<s.CMD_SHIFT]),s.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},s.propertiesCodes={};for(const d in s.properties){const o=s.properties[d];s.propertiesCodes[o]=d}function c(d){return[0,1,2].map(o=>[0,1].map(n=>[0,1].map(h=>{const a=l.alloc(1);return a.writeUInt8(s.codes[d]<<s.CMD_SHIFT|(n?s.DUP_MASK:0)|o<<s.QOS_SHIFT|h,0,!0),a})))}s.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},s.PUBLISH_HEADER=c("publish"),s.SUBSCRIBE_HEADER=c("subscribe"),s.SUBSCRIBE_OPTIONS_QOS_MASK=3,s.SUBSCRIBE_OPTIONS_NL_MASK=1,s.SUBSCRIBE_OPTIONS_NL_SHIFT=2,s.SUBSCRIBE_OPTIONS_RAP_MASK=1,s.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,s.SUBSCRIBE_OPTIONS_RH_MASK=3,s.SUBSCRIBE_OPTIONS_RH_SHIFT=4,s.SUBSCRIBE_OPTIONS_RH=[0,16,32],s.SUBSCRIBE_OPTIONS_NL=4,s.SUBSCRIBE_OPTIONS_RAP=8,s.SUBSCRIBE_OPTIONS_QOS=[0,1,2],s.UNSUBSCRIBE_HEADER=c("unsubscribe"),s.ACKS={unsuback:c("unsuback"),puback:c("puback"),pubcomp:c("pubcomp"),pubrel:c("pubrel"),pubrec:c("pubrec")},s.SUBACK_HEADER=l.from([s.codes.suback<<s.CMD_SHIFT]),s.VERSION3=l.from([3]),s.VERSION4=l.from([4]),s.VERSION5=l.from([5]),s.VERSION131=l.from([131]),s.VERSION132=l.from([132]),s.QOS=[0,1,2].map(d=>l.from([d])),s.EMPTY={pingreq:l.from([s.codes.pingreq<<4,0]),pingresp:l.from([s.codes.pingresp<<4,0]),disconnect:l.from([s.codes.disconnect<<4,0])}}).call(this)}).call(this,r("buffer").Buffer)},{buffer:17}],39:[function(r,i,p){(function(l){(function(){const s=r("./writeToStream"),c=r("events");class d extends c{constructor(){super(),this._array=new Array(20),this._i=0}write(n){return this._array[this._i++]=n,!0}concat(){let n=0;const h=new Array(this._array.length),a=this._array;let u,f=0;for(u=0;u<a.length&&a[u]!==void 0;u++)typeof a[u]!="string"?h[u]=a[u].length:h[u]=l.byteLength(a[u]),n+=h[u];const v=l.allocUnsafe(n);for(u=0;u<a.length&&a[u]!==void 0;u++)typeof a[u]!="string"?(a[u].copy(v,f),f+=h[u]):(v.write(a[u],f),f+=h[u]);return v}}i.exports=function(o,n){const h=new d;return s(o,h,n),h.concat()}}).call(this)}).call(this,r("buffer").Buffer)},{"./writeToStream":44,buffer:17,events:22}],40:[function(r,i,p){p.parser=r("./parser").parser,p.generate=r("./generate"),p.writeToStream=r("./writeToStream")},{"./generate":39,"./parser":43,"./writeToStream":44}],41:[function(r,i,p){(function(l){(function(){const c={},d=l.isBuffer(l.from([1,2]).subarray(0,1));function o(n){const h=l.allocUnsafe(2);return h.writeUInt8(n>>8,0),h.writeUInt8(255&n,1),h}i.exports={cache:c,generateCache:function(){for(let n=0;n<65536;n++)c[n]=o(n)},generateNumber:o,genBufVariableByteInt:function(n){let h=0,a=0;const u=l.allocUnsafe(4);do h=n%128|0,(n=n/128|0)>0&&(h|=128),u.writeUInt8(h,a++);while(n>0&&a<4);return n>0&&(a=0),d?u.subarray(0,a):u.slice(0,a)},generate4ByteBuffer:function(n){const h=l.allocUnsafe(4);return h.writeUInt32BE(n,0),h}}}).call(this)}).call(this,r("buffer").Buffer)},{buffer:17}],42:[function(r,i,p){i.exports=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}},{}],43:[function(r,i,p){const l=r("bl"),s=r("events"),c=r("./packet"),d=r("./constants"),o=r("debug")("mqtt-packet:parser");class n extends s{constructor(){super(),this.parser=this.constructor.parser}static parser(a){return this instanceof n?(this.settings=a||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new n().parser(a)}_resetState(){o("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new c,this.error=null,this._list=l(),this._stateCounter=0}parse(a){for(this.error&&this._resetState(),this._list.append(a),o("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,o("parse: state complete. _stateCounter is now: %d",this._stateCounter),o("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return o("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const a=this._list.readUInt8(0);return this.packet.cmd=d.types[a>>d.CMD_SHIFT],this.packet.retain=(a&d.RETAIN_MASK)!=0,this.packet.qos=a>>d.QOS_SHIFT&d.QOS_MASK,this.packet.dup=(a&d.DUP_MASK)!=0,o("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const a=this._parseVarByteNum(!0);return a&&(this.packet.length=a.value,this._list.consume(a.bytes)),o("_parseLength %d",a.value),!!a}_parsePayload(){o("_parsePayload: payload %O",this._list);let a=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}a=!0}return o("_parsePayload complete result: %s",a),a}_parseConnect(){let a,u,f,v;o("_parseConnect");const y={},g=this.packet,b=this._parseString();if(b===null)return this._emitError(new Error("Cannot parse protocolId"));if(b!=="MQTT"&&b!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(g.protocolId=b,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(g.protocolVersion=this._list.readUInt8(this._pos),g.protocolVersion>=128&&(g.bridgeMode=!0,g.protocolVersion=g.protocolVersion-128),g.protocolVersion!==3&&g.protocolVersion!==4&&g.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(y.username=this._list.readUInt8(this._pos)&d.USERNAME_MASK,y.password=this._list.readUInt8(this._pos)&d.PASSWORD_MASK,y.will=this._list.readUInt8(this._pos)&d.WILL_FLAG_MASK,y.will&&(g.will={},g.will.retain=(this._list.readUInt8(this._pos)&d.WILL_RETAIN_MASK)!=0,g.will.qos=(this._list.readUInt8(this._pos)&d.WILL_QOS_MASK)>>d.WILL_QOS_SHIFT),g.clean=(this._list.readUInt8(this._pos)&d.CLEAN_SESSION_MASK)!=0,this._pos++,g.keepalive=this._parseNum(),g.keepalive===-1)return this._emitError(new Error("Packet too short"));if(g.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(g.properties=E)}const m=this._parseString();if(m===null)return this._emitError(new Error("Packet too short"));if(g.clientId=m,o("_parseConnect: packet.clientId: %s",g.clientId),y.will){if(g.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(g.will.properties=E)}if((a=this._parseString())===null)return this._emitError(new Error("Cannot parse will topic"));if(g.will.topic=a,o("_parseConnect: packet.will.topic: %s",g.will.topic),(u=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse will payload"));g.will.payload=u,o("_parseConnect: packet.will.paylaod: %s",g.will.payload)}if(y.username){if((v=this._parseString())===null)return this._emitError(new Error("Cannot parse username"));g.username=v,o("_parseConnect: packet.username: %s",g.username)}if(y.password){if((f=this._parseBuffer())===null)return this._emitError(new Error("Cannot parse password"));g.password=f}return this.settings=g,o("_parseConnect: complete"),g}_parseConnack(){o("_parseConnack");const a=this.packet;if(this._list.length<1)return null;if(a.sessionPresent=!!(this._list.readUInt8(this._pos++)&d.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?a.reasonCode=this._list.readUInt8(this._pos++):a.reasonCode=0;else{if(this._list.length<2)return null;a.returnCode=this._list.readUInt8(this._pos++)}if(a.returnCode===-1||a.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){const u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(a.properties=u)}o("_parseConnack: complete")}_parsePublish(){o("_parsePublish");const a=this.packet;if(a.topic=this._parseString(),a.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(a.qos>0)||this._parseMessageId()){if(this.settings.protocolVersion===5){const u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(a.properties=u)}a.payload=this._list.slice(this._pos,a.length),o("_parsePublish: payload from buffer list: %o",a.payload)}}_parseSubscribe(){o("_parseSubscribe");const a=this.packet;let u,f,v,y,g,b,m;if(a.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(a.subscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(a.properties=E)}for(;this._pos<a.length;){if((u=this._parseString())===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=a.length)return this._emitError(new Error("Malformed Subscribe Payload"));v=(f=this._parseByte())&d.SUBSCRIBE_OPTIONS_QOS_MASK,b=(f>>d.SUBSCRIBE_OPTIONS_NL_SHIFT&d.SUBSCRIBE_OPTIONS_NL_MASK)!=0,g=(f>>d.SUBSCRIBE_OPTIONS_RAP_SHIFT&d.SUBSCRIBE_OPTIONS_RAP_MASK)!=0,y=f>>d.SUBSCRIBE_OPTIONS_RH_SHIFT&d.SUBSCRIBE_OPTIONS_RH_MASK,m={topic:u,qos:v},this.settings.protocolVersion===5?(m.nl=b,m.rap=g,m.rh=y):this.settings.bridgeMode&&(m.rh=0,m.rap=!0,m.nl=!0),o("_parseSubscribe: push subscription `%s` to subscription",m),a.subscriptions.push(m)}}}_parseSuback(){o("_parseSuback");const a=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(a.properties=u)}for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseUnsubscribe(){o("_parseUnsubscribe");const a=this.packet;if(a.unsubscriptions=[],this._parseMessageId()){if(this.settings.protocolVersion===5){const u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(a.properties=u)}for(;this._pos<a.length;){const u=this._parseString();if(u===null)return this._emitError(new Error("Cannot parse topic"));o("_parseUnsubscribe: push topic `%s` to unsubscriptions",u),a.unsubscriptions.push(u)}}}_parseUnsuback(){o("_parseUnsuback");const a=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if(this.settings.protocolVersion===5){const u=this._parseProperties();for(Object.getOwnPropertyNames(u).length&&(a.properties=u),a.granted=[];this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))}}_parseConfirmation(){o("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);const a=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5&&(a.length>2?(a.reasonCode=this._parseByte(),o("_parseConfirmation: packet.reasonCode `%d`",a.reasonCode)):a.reasonCode=0,a.length>3)){const u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(a.properties=u)}return!0}_parseDisconnect(){const a=this.packet;if(o("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?a.reasonCode=this._parseByte():a.reasonCode=0;const u=this._parseProperties();Object.getOwnPropertyNames(u).length&&(a.properties=u)}return o("_parseDisconnect result: true"),!0}_parseAuth(){o("_parseAuth");const a=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));a.reasonCode=this._parseByte();const u=this._parseProperties();return Object.getOwnPropertyNames(u).length&&(a.properties=u),o("_parseAuth: result: true"),!0}_parseMessageId(){const a=this.packet;return a.messageId=this._parseNum(),a.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(o("_parseMessageId: packet.messageId %d",a.messageId),!0)}_parseString(a){const u=this._parseNum(),f=u+this._pos;if(u===-1||f>this._list.length||f>this.packet.length)return null;const v=this._list.toString("utf8",this._pos,f);return this._pos+=u,o("_parseString: result: %s",v),v}_parseStringPair(){return o("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const a=this._parseNum(),u=a+this._pos;if(a===-1||u>this._list.length||u>this.packet.length)return null;const f=this._list.slice(this._pos,u);return this._pos+=a,o("_parseBuffer: result: %o",f),f}_parseNum(){if(this._list.length-this._pos<2)return-1;const a=this._list.readUInt16BE(this._pos);return this._pos+=2,o("_parseNum: result: %s",a),a}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const a=this._list.readUInt32BE(this._pos);return this._pos+=4,o("_parse4ByteNum: result: %s",a),a}_parseVarByteNum(a){o("_parseVarByteNum");let u,f=0,v=1,y=0,g=!1;const b=this._pos?this._pos:0;for(;f<4&&b+f<this._list.length;){if(y+=v*((u=this._list.readUInt8(b+f++))&d.VARBYTEINT_MASK),v*=128,(u&d.VARBYTEINT_FIN_MASK)==0){g=!0;break}if(this._list.length<=f)break}return!g&&f===4&&this._list.length>=f&&this._emitError(new Error("Invalid variable byte integer")),b&&(this._pos+=f),o("_parseVarByteNum: result: %o",g=!!g&&(a?{bytes:f,value:y}:y)),g}_parseByte(){let a;return this._pos<this._list.length&&(a=this._list.readUInt8(this._pos),this._pos++),o("_parseByte: result: %o",a),a}_parseByType(a){switch(o("_parseByType: type: %s",a),a){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){o("_parseProperties");const a=this._parseVarByteNum(),u=this._pos+a,f={};for(;this._pos<u;){const v=this._parseByte();if(!v)return this._emitError(new Error("Cannot parse property code type")),!1;const y=d.propertiesCodes[v];if(!y)return this._emitError(new Error("Unknown property")),!1;if(y!=="userProperties")f[y]?Array.isArray(f[y])?f[y].push(this._parseByType(d.propertiesTypes[y])):(f[y]=[f[y]],f[y].push(this._parseByType(d.propertiesTypes[y]))):f[y]=this._parseByType(d.propertiesTypes[y]);else{f[y]||(f[y]=Object.create(null));const g=this._parseByType(d.propertiesTypes[y]);if(f[y][g.name])if(Array.isArray(f[y][g.name]))f[y][g.name].push(g.value);else{const b=f[y][g.name];f[y][g.name]=[b],f[y][g.name].push(g.value)}else f[y][g.name]=g.value}}return f}_newPacket(){return o("_newPacket"),this.packet&&(this._list.consume(this.packet.length),o("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),o("_newPacket: new packet"),this.packet=new c,this._pos=0,!0}_emitError(a){o("_emitError"),this.error=a,this.emit("error",a)}}i.exports=n},{"./constants":38,"./packet":42,bl:15,debug:18,events:22}],44:[function(r,i,p){(function(l){(function(){const s=r("./constants"),c=l.allocUnsafe(0),d=l.from([0]),o=r("./numbers"),n=r("process-nextick-args").nextTick,h=r("debug")("mqtt-packet:writeToStream"),a=o.cache,u=o.generateNumber,f=o.generateCache,v=o.genBufVariableByteInt,y=o.generate4ByteBuffer;let g=Y,b=!0;function m($,M,j){switch(h("generate called"),M.cork&&(M.cork(),n(E,M)),b&&(b=!1,f()),h("generate: packet.cmd: %s",$.cmd),$.cmd){case"connect":return function(L,R,H){const V=L||{},J=V.protocolId||"MQTT";let ie=V.protocolVersion||4;const ne=V.will;let oe=V.clean;const x=V.keepalive||0,w=V.clientId||"",O=V.username,K=V.password,Z=V.properties;oe===void 0&&(oe=!0);let ee=0;if(typeof J!="string"&&!l.isBuffer(J))return R.emit("error",new Error("Invalid protocolId")),!1;if(ee+=J.length+2,ie!==3&&ie!==4&&ie!==5)return R.emit("error",new Error("Invalid protocol version")),!1;if(ee+=1,(typeof w=="string"||l.isBuffer(w))&&(w||ie>=4)&&(w||oe))ee+=l.byteLength(w)+2;else{if(ie<4)return R.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*oe==0)return R.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof x!="number"||x<0||x>65535||x%1!=0)return R.emit("error",new Error("Invalid keepalive")),!1;if(ee+=2,ee+=1,ie===5){var ae=A(R,Z);if(!ae)return!1;ee+=ae.length}if(ne){if(typeof ne!="object")return R.emit("error",new Error("Invalid will")),!1;if(!ne.topic||typeof ne.topic!="string")return R.emit("error",new Error("Invalid will topic")),!1;if(ee+=l.byteLength(ne.topic)+2,ee+=2,ne.payload){if(!(ne.payload.length>=0))return R.emit("error",new Error("Invalid will payload")),!1;typeof ne.payload=="string"?ee+=l.byteLength(ne.payload):ee+=ne.payload.length}var z={};if(ie===5){if(!(z=A(R,ne.properties)))return!1;ee+=z.length}}let S=!1;if(O!=null){if(!X(O))return R.emit("error",new Error("Invalid username")),!1;S=!0,ee+=l.byteLength(O)+2}if(K!=null){if(!S)return R.emit("error",new Error("Username is required to use password")),!1;if(!X(K))return R.emit("error",new Error("Invalid password")),!1;ee+=q(K)+2}R.write(s.CONNECT_HEADER),T(R,ee),_(R,J),V.bridgeMode&&(ie+=128),R.write(ie===131?s.VERSION131:ie===132?s.VERSION132:ie===4?s.VERSION4:ie===5?s.VERSION5:s.VERSION3);let k=0;return k|=O!=null?s.USERNAME_MASK:0,k|=K!=null?s.PASSWORD_MASK:0,k|=ne&&ne.retain?s.WILL_RETAIN_MASK:0,k|=ne&&ne.qos?ne.qos<<s.WILL_QOS_SHIFT:0,k|=ne?s.WILL_FLAG_MASK:0,k|=oe?s.CLEAN_SESSION_MASK:0,R.write(l.from([k])),g(R,x),ie===5&&ae.write(),_(R,w),ne&&(ie===5&&z.write(),D(R,ne.topic),_(R,ne.payload)),O!=null&&_(R,O),K!=null&&_(R,K),!0}($,M);case"connack":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=V===5?J.reasonCode:J.returnCode,ne=J.properties;let oe=2;if(typeof ie!="number")return R.emit("error",new Error("Invalid return code")),!1;let x=null;if(V===5){if(!(x=A(R,ne)))return!1;oe+=x.length}return R.write(s.CONNACK_HEADER),T(R,oe),R.write(J.sessionPresent?s.SESSIONPRESENT_HEADER:d),R.write(l.from([ie])),x!=null&&x.write(),!0}($,M,j);case"publish":return function(L,R,H){h("publish: packet: %o",L);const V=H?H.protocolVersion:4,J=L||{},ie=J.qos||0,ne=J.retain?s.RETAIN_MASK:0,oe=J.topic,x=J.payload||c,w=J.messageId,O=J.properties;let K=0;if(typeof oe=="string")K+=l.byteLength(oe)+2;else{if(!l.isBuffer(oe))return R.emit("error",new Error("Invalid topic")),!1;K+=oe.length+2}if(l.isBuffer(x)?K+=x.length:K+=l.byteLength(x),ie&&typeof w!="number")return R.emit("error",new Error("Invalid messageId")),!1;ie&&(K+=2);let Z=null;if(V===5){if(!(Z=A(R,O)))return!1;K+=Z.length}return R.write(s.PUBLISH_HEADER[ie][J.dup?1:0][ne?1:0]),T(R,K),g(R,q(oe)),R.write(oe),ie>0&&g(R,w),Z!=null&&Z.write(),h("publish: payload: %o",x),R.write(x)}($,M,j);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=J.cmd||"puback",ne=J.messageId,oe=J.dup&&ie==="pubrel"?s.DUP_MASK:0;let x=0;const w=J.reasonCode,O=J.properties;let K=V===5?3:2;if(ie==="pubrel"&&(x=1),typeof ne!="number")return R.emit("error",new Error("Invalid messageId")),!1;let Z=null;if(V===5&&typeof O=="object"){if(!(Z=C(R,O,H,K)))return!1;K+=Z.length}return R.write(s.ACKS[ie][x][oe][0]),T(R,K),g(R,ne),V===5&&R.write(l.from([w])),Z!==null&&Z.write(),!0}($,M,j);case"subscribe":return function(L,R,H){h("subscribe: packet: ");const V=H?H.protocolVersion:4,J=L||{},ie=J.dup?s.DUP_MASK:0,ne=J.messageId,oe=J.subscriptions,x=J.properties;let w=0;if(typeof ne!="number")return R.emit("error",new Error("Invalid messageId")),!1;w+=2;let O=null;if(V===5){if(!(O=A(R,x)))return!1;w+=O.length}if(typeof oe!="object"||!oe.length)return R.emit("error",new Error("Invalid subscriptions")),!1;for(let Z=0;Z<oe.length;Z+=1){const ee=oe[Z].topic,ae=oe[Z].qos;if(typeof ee!="string")return R.emit("error",new Error("Invalid subscriptions - invalid topic")),!1;if(typeof ae!="number")return R.emit("error",new Error("Invalid subscriptions - invalid qos")),!1;if(V===5){if(typeof(oe[Z].nl||!1)!="boolean")return R.emit("error",new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(oe[Z].rap||!1)!="boolean")return R.emit("error",new Error("Invalid subscriptions - invalid Retain as Published")),!1;const k=oe[Z].rh||0;if(typeof k!="number"||k>2)return R.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}w+=l.byteLength(ee)+2+1}h("subscribe: writing to stream: %o",s.SUBSCRIBE_HEADER),R.write(s.SUBSCRIBE_HEADER[1][ie?1:0][0]),T(R,w),g(R,ne),O!==null&&O.write();let K=!0;for(const Z of oe){const ee=Z.topic,ae=Z.qos,z=+Z.nl,S=+Z.rap,k=Z.rh;let Q;D(R,ee),Q=s.SUBSCRIBE_OPTIONS_QOS[ae],V===5&&(Q|=z?s.SUBSCRIBE_OPTIONS_NL:0,Q|=S?s.SUBSCRIBE_OPTIONS_RAP:0,Q|=k?s.SUBSCRIBE_OPTIONS_RH[k]:0),K=R.write(l.from([Q]))}return K}($,M,j);case"suback":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=J.messageId,ne=J.granted,oe=J.properties;let x=0;if(typeof ie!="number")return R.emit("error",new Error("Invalid messageId")),!1;if(x+=2,typeof ne!="object"||!ne.length)return R.emit("error",new Error("Invalid qos vector")),!1;for(let O=0;O<ne.length;O+=1){if(typeof ne[O]!="number")return R.emit("error",new Error("Invalid qos vector")),!1;x+=1}let w=null;if(V===5){if(!(w=C(R,oe,H,x)))return!1;x+=w.length}return R.write(s.SUBACK_HEADER),T(R,x),g(R,ie),w!==null&&w.write(),R.write(l.from(ne))}($,M,j);case"unsubscribe":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=J.messageId,ne=J.dup?s.DUP_MASK:0,oe=J.unsubscriptions,x=J.properties;let w=0;if(typeof ie!="number")return R.emit("error",new Error("Invalid messageId")),!1;if(w+=2,typeof oe!="object"||!oe.length)return R.emit("error",new Error("Invalid unsubscriptions")),!1;for(let Z=0;Z<oe.length;Z+=1){if(typeof oe[Z]!="string")return R.emit("error",new Error("Invalid unsubscriptions")),!1;w+=l.byteLength(oe[Z])+2}let O=null;if(V===5){if(!(O=A(R,x)))return!1;w+=O.length}R.write(s.UNSUBSCRIBE_HEADER[1][ne?1:0][0]),T(R,w),g(R,ie),O!==null&&O.write();let K=!0;for(let Z=0;Z<oe.length;Z++)K=D(R,oe[Z]);return K}($,M,j);case"unsuback":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=J.messageId,ne=J.dup?s.DUP_MASK:0,oe=J.granted,x=J.properties,w=J.cmd;let O=2;if(typeof ie!="number")return R.emit("error",new Error("Invalid messageId")),!1;if(V===5){if(typeof oe!="object"||!oe.length)return R.emit("error",new Error("Invalid qos vector")),!1;for(let Z=0;Z<oe.length;Z+=1){if(typeof oe[Z]!="number")return R.emit("error",new Error("Invalid qos vector")),!1;O+=1}}let K=null;if(V===5){if(!(K=C(R,x,H,O)))return!1;O+=K.length}return R.write(s.ACKS[w][0][ne][0]),T(R,O),g(R,ie),K!==null&&K.write(),V===5&&R.write(l.from(oe)),!0}($,M,j);case"pingreq":case"pingresp":return function(L,R,H){return R.write(s.EMPTY[L.cmd])}($,M);case"disconnect":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=J.reasonCode,ne=J.properties;let oe=V===5?1:0,x=null;if(V===5){if(!(x=C(R,ne,H,oe)))return!1;oe+=x.length}return R.write(l.from([s.codes.disconnect<<4])),T(R,oe),V===5&&R.write(l.from([ie])),x!==null&&x.write(),!0}($,M,j);case"auth":return function(L,R,H){const V=H?H.protocolVersion:4,J=L||{},ie=J.reasonCode,ne=J.properties;let oe=V===5?1:0;V!==5&&R.emit("error",new Error("Invalid mqtt version for auth packet"));const x=C(R,ne,H,oe);return x?(oe+=x.length,R.write(l.from([s.codes.auth<<4])),T(R,oe),R.write(l.from([ie])),x!==null&&x.write(),!0):!1}($,M,j);default:return M.emit("error",new Error("Unknown command")),!1}}function E($){$.uncork()}Object.defineProperty(m,"cacheNumbers",{get:()=>g===Y,set($){$?(a&&Object.keys(a).length!==0||(b=!0),g=Y):(b=!1,g=W)}});const F={};function T($,M){if(M>s.VARBYTEINT_MAX)return $.emit("error",new Error(`Invalid variable byte integer: ${M}`)),!1;let j=F[M];return j||(j=v(M),M<16384&&(F[M]=j)),h("writeVarByteInt: writing to stream: %o",j),$.write(j)}function D($,M){const j=l.byteLength(M);return g($,j),h("writeString: %s",M),$.write(M,"utf8")}function I($,M,j){D($,M),D($,j)}function Y($,M){return h("writeNumberCached: number: %d",M),h("writeNumberCached: %o",a[M]),$.write(a[M])}function W($,M){const j=u(M);return h("writeNumberGenerated: %o",j),$.write(j)}function _($,M){typeof M=="string"?D($,M):M?(g($,M.length),$.write(M)):g($,0)}function A($,M){if(typeof M!="object"||M.length!=null)return{length:1,write(){N($,{},0)}};let j=0;function L(R,H){let V=0;switch(s.propertiesTypes[R]){case"byte":if(typeof H!="boolean")return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=2;break;case"int8":if(typeof H!="number"||H<0||H>255)return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=2;break;case"binary":if(H&&H===null)return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=1+l.byteLength(H)+2;break;case"int16":if(typeof H!="number"||H<0||H>65535)return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=3;break;case"int32":if(typeof H!="number"||H<0||H>4294967295)return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=5;break;case"var":if(typeof H!="number"||H<0||H>268435455)return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=1+l.byteLength(v(H));break;case"string":if(typeof H!="string")return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=3+l.byteLength(H.toString());break;case"pair":if(typeof H!="object")return $.emit("error",new Error(`Invalid ${R}: ${H}`)),!1;V+=Object.getOwnPropertyNames(H).reduce((J,ie)=>{const ne=H[ie];return Array.isArray(ne)?J+=ne.reduce((oe,x)=>oe+=3+l.byteLength(ie.toString())+2+l.byteLength(x.toString()),0):J+=3+l.byteLength(ie.toString())+2+l.byteLength(H[ie].toString()),J},0);break;default:return $.emit("error",new Error(`Invalid property ${R}: ${H}`)),!1}return V}if(M)for(const R in M){let H=0,V=0;const J=M[R];if(Array.isArray(J))for(let ie=0;ie<J.length;ie++){if(!(V=L(R,J[ie])))return!1;H+=V}else{if(!(V=L(R,J)))return!1;H=V}if(!H)return!1;j+=H}return{length:l.byteLength(v(j))+j,write(){N($,M,j)}}}function C($,M,j,L){const R=["reasonString","userProperties"],H=j&&j.properties&&j.properties.maximumPacketSize?j.properties.maximumPacketSize:0;let V=A($,M);if(H)for(;L+V.length>H;){const J=R.shift();if(!J||!M[J])return!1;delete M[J],V=A($,M)}return V}function B($,M,j){switch(s.propertiesTypes[M]){case"byte":$.write(l.from([s.properties[M]])),$.write(l.from([+j]));break;case"int8":$.write(l.from([s.properties[M]])),$.write(l.from([j]));break;case"binary":$.write(l.from([s.properties[M]])),_($,j);break;case"int16":$.write(l.from([s.properties[M]])),g($,j);break;case"int32":$.write(l.from([s.properties[M]])),function(L,R){const H=y(R);h("write4ByteNumber: %o",H),L.write(H)}($,j);break;case"var":$.write(l.from([s.properties[M]])),T($,j);break;case"string":$.write(l.from([s.properties[M]])),D($,j);break;case"pair":Object.getOwnPropertyNames(j).forEach(L=>{const R=j[L];Array.isArray(R)?R.forEach(H=>{$.write(l.from([s.properties[M]])),I($,L.toString(),H.toString())}):($.write(l.from([s.properties[M]])),I($,L.toString(),R.toString()))});break;default:return $.emit("error",new Error(`Invalid property ${M} value: ${j}`)),!1}}function N($,M,j){T($,j);for(const L in M)if(Object.prototype.hasOwnProperty.call(M,L)&&M[L]!==null){const R=M[L];if(Array.isArray(R))for(let H=0;H<R.length;H++)B($,L,R[H]);else B($,L,R)}}function q($){return $?$ instanceof l?$.length:l.byteLength($):0}function X($){return typeof $=="string"||$ instanceof l}i.exports=m}).call(this)}).call(this,r("buffer").Buffer)},{"./constants":38,"./numbers":41,buffer:17,debug:18,"process-nextick-args":49}],45:[function(r,i,p){var l=1e3,s=60*l,c=60*s,d=24*c,o=7*d,n=365.25*d;function h(a,u,f,v){var y=u>=1.5*f;return Math.round(a/f)+" "+v+(y?"s":"")}i.exports=function(a,u){u=u||{};var f=typeof a;if(f==="string"&&a.length>0)return function(v){if(!((v=String(v)).length>100)){var y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(v);if(y){var g=parseFloat(y[1]);switch((y[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return g*n;case"weeks":case"week":case"w":return g*o;case"days":case"day":case"d":return g*d;case"hours":case"hour":case"hrs":case"hr":case"h":return g*c;case"minutes":case"minute":case"mins":case"min":case"m":return g*s;case"seconds":case"second":case"secs":case"sec":case"s":return g*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}(a);if(f==="number"&&isFinite(a))return u.long?function(v){var y=Math.abs(v);return y>=d?h(v,y,d,"day"):y>=c?h(v,y,c,"hour"):y>=s?h(v,y,s,"minute"):y>=l?h(v,y,l,"second"):v+" ms"}(a):function(v){var y=Math.abs(v);return y>=d?Math.round(v/d)+"d":y>=c?Math.round(v/c)+"h":y>=s?Math.round(v/s)+"m":y>=l?Math.round(v/l)+"s":v+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))}},{}],46:[function(r,i,p){const l=r("./lib/number-allocator.js");i.exports.NumberAllocator=l},{"./lib/number-allocator.js":47}],47:[function(r,i,p){const l=r("js-sdsl").Set,s=r("debug")("number-allocator:trace"),c=r("debug")("number-allocator:error");function d(n,h){this.low=n,this.high=h}function o(n,h){if(!(this instanceof o))return new o(n,h);this.min=n,this.max=h,this.ss=new l([],(a,u)=>a.compare(u)),s("Create"),this.clear()}d.prototype.equals=function(n){return this.low===n.low&&this.high===n.high},d.prototype.compare=function(n){return this.low<n.low&&this.high<n.low?-1:n.low<this.low&&n.high<this.low?1:0},o.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},o.prototype.alloc=function(){if(this.ss.size()===0)return s("alloc():empty"),null;const n=this.ss.front(),h=n.low;return h+1<=n.high?++n.low:this.ss.eraseElementByPos(0),s("alloc():"+h),h},o.prototype.use=function(n){const h=new d(n,n),a=this.ss.lowerBound(h);if(a){if(a.equals(h))return this.ss.eraseElementByValue(a),s("use():"+n),!0;if(a.low>n)return!1;if(a.low===n)return++a.low,s("use():"+n),!0;if(a.high===n)return--a.high,s("use():"+n),!0;const u=a.low;return a.low=n+1,this.ss.insert(new d(u,n-1)),s("use():"+n),!0}return s("use():failed"),!1},o.prototype.free=function(n){if(n<this.min||n>this.max)return void c("free():"+n+" is out of range");const h=new d(n,n),a=this.ss.lowerBound(h);if(a){if(a.low<=n&&n<=a.high)return void c("free():"+n+" has already been vacant");if(a===this.ss.front())n+1===a.low?--a.low:this.ss.insert(h);else{const u=this.ss.reverseLowerBound(h);u.high+1===n?n+1===a.low?(this.ss.eraseElementByValue(u),a.low=u.low):u.high=n:n+1===a.low?a.low=n:this.ss.insert(h)}}else{if(a===this.ss.front())return void this.ss.insert(h);const u=this.ss.reverseLowerBound(h);u.high+1===n?u.high=n:this.ss.insert(h)}s("free():"+n)},o.prototype.clear=function(){s("clear()"),this.ss.clear(),this.ss.insert(new d(this.min,this.max))},o.prototype.intervalCount=function(){return this.ss.size()},o.prototype.dump=function(){console.log("length:"+this.ss.size());for(const n of this.ss)console.log(n)},i.exports=o},{debug:18,"js-sdsl":36}],48:[function(r,i,p){var l=r("wrappy");function s(d){var o=function(){return o.called?o.value:(o.called=!0,o.value=d.apply(this,arguments))};return o.called=!1,o}function c(d){var o=function(){if(o.called)throw new Error(o.onceError);return o.called=!0,o.value=d.apply(this,arguments)},n=d.name||"Function wrapped with `once`";return o.onceError=n+" shouldn't be called more than once",o.called=!1,o}i.exports=l(s),i.exports.strict=l(c),s.proto=s(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return s(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return c(this)},configurable:!0})})},{wrappy:79}],49:[function(r,i,p){(function(l){(function(){l===void 0||!l.version||l.version.indexOf("v0.")===0||l.version.indexOf("v1.")===0&&l.version.indexOf("v1.8.")!==0?i.exports={nextTick:function(s,c,d,o){if(typeof s!="function")throw new TypeError('"callback" argument must be a function');var n,h,a=arguments.length;switch(a){case 0:case 1:return l.nextTick(s);case 2:return l.nextTick(function(){s.call(null,c)});case 3:return l.nextTick(function(){s.call(null,c,d)});case 4:return l.nextTick(function(){s.call(null,c,d,o)});default:for(n=new Array(a-1),h=0;h<n.length;)n[h++]=arguments[h];return l.nextTick(function(){s.apply(null,n)})}}}:i.exports=l}).call(this)}).call(this,r("_process"))},{_process:50}],50:[function(r,i,p){var l,s,c=i.exports={};function d(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function n(m){if(l===setTimeout)return setTimeout(m,0);if((l===d||!l)&&setTimeout)return l=setTimeout,setTimeout(m,0);try{return l(m,0)}catch(E){try{return l.call(null,m,0)}catch(F){return l.call(this,m,0)}}}(function(){try{l=typeof setTimeout=="function"?setTimeout:d}catch(m){l=d}try{s=typeof clearTimeout=="function"?clearTimeout:o}catch(m){s=o}})();var h,a=[],u=!1,f=-1;function v(){u&&h&&(u=!1,h.length?a=h.concat(a):f=-1,a.length&&y())}function y(){if(!u){var m=n(v);u=!0;for(var E=a.length;E;){for(h=a,a=[];++f<E;)h&&h[f].run();f=-1,E=a.length}h=null,u=!1,function(F){if(s===clearTimeout)return clearTimeout(F);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(F);try{s(F)}catch(T){try{return s.call(null,F)}catch(D){return s.call(this,F)}}}(m)}}function g(m,E){this.fun=m,this.array=E}function b(){}c.nextTick=function(m){var E=new Array(arguments.length-1);if(arguments.length>1)for(var F=1;F<arguments.length;F++)E[F-1]=arguments[F];a.push(new g(m,E)),a.length!==1||u||n(y)},g.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=b,c.addListener=b,c.once=b,c.off=b,c.removeListener=b,c.removeAllListeners=b,c.emit=b,c.prependListener=b,c.prependOnceListener=b,c.listeners=function(m){return[]},c.binding=function(m){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(m){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],51:[function(r,i,p){(function(l){(function(){(function(s){var c=typeof p=="object"&&p&&!p.nodeType&&p,d=typeof i=="object"&&i&&!i.nodeType&&i,o=typeof l=="object"&&l;o.global!==o&&o.window!==o&&o.self!==o||(s=o);var n,h,a=2147483647,u=36,f=1,v=26,y=38,g=700,b=72,m=128,E="-",F=/^xn--/,T=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Y=u-f,W=Math.floor,_=String.fromCharCode;function A(L){throw new RangeError(I[L])}function C(L,R){for(var H=L.length,V=[];H--;)V[H]=R(L[H]);return V}function B(L,R){var H=L.split("@"),V="";return H.length>1&&(V=H[0]+"@",L=H[1]),V+C((L=L.replace(D,".")).split("."),R).join(".")}function N(L){for(var R,H,V=[],J=0,ie=L.length;J<ie;)(R=L.charCodeAt(J++))>=55296&&R<=56319&&J<ie?(64512&(H=L.charCodeAt(J++)))==56320?V.push(((1023&R)<<10)+(1023&H)+65536):(V.push(R),J--):V.push(R);return V}function q(L){return C(L,function(R){var H="";return R>65535&&(H+=_((R-=65536)>>>10&1023|55296),R=56320|1023&R),H+=_(R)}).join("")}function X(L,R){return L+22+75*(L<26)-((R!=0)<<5)}function $(L,R,H){var V=0;for(L=H?W(L/g):L>>1,L+=W(L/R);L>Y*v>>1;V+=u)L=W(L/Y);return W(V+(Y+1)*L/(L+y))}function M(L){var R,H,V,J,ie,ne,oe,x,w,O,K,Z=[],ee=L.length,ae=0,z=m,S=b;for((H=L.lastIndexOf(E))<0&&(H=0),V=0;V<H;++V)L.charCodeAt(V)>=128&&A("not-basic"),Z.push(L.charCodeAt(V));for(J=H>0?H+1:0;J<ee;){for(ie=ae,ne=1,oe=u;J>=ee&&A("invalid-input"),((x=(K=L.charCodeAt(J++))-48<10?K-22:K-65<26?K-65:K-97<26?K-97:u)>=u||x>W((a-ae)/ne))&&A("overflow"),ae+=x*ne,!(x<(w=oe<=S?f:oe>=S+v?v:oe-S));oe+=u)ne>W(a/(O=u-w))&&A("overflow"),ne*=O;S=$(ae-ie,R=Z.length+1,ie==0),W(ae/R)>a-z&&A("overflow"),z+=W(ae/R),ae%=R,Z.splice(ae++,0,z)}return q(Z)}function j(L){var R,H,V,J,ie,ne,oe,x,w,O,K,Z,ee,ae,z,S=[];for(Z=(L=N(L)).length,R=m,H=0,ie=b,ne=0;ne<Z;++ne)(K=L[ne])<128&&S.push(_(K));for(V=J=S.length,J&&S.push(E);V<Z;){for(oe=a,ne=0;ne<Z;++ne)(K=L[ne])>=R&&K<oe&&(oe=K);for(oe-R>W((a-H)/(ee=V+1))&&A("overflow"),H+=(oe-R)*ee,R=oe,ne=0;ne<Z;++ne)if((K=L[ne])<R&&++H>a&&A("overflow"),K==R){for(x=H,w=u;!(x<(O=w<=ie?f:w>=ie+v?v:w-ie));w+=u)z=x-O,ae=u-O,S.push(_(X(O+z%ae,0))),x=W(z/ae);S.push(_(X(x,0))),ie=$(H,ee,V==J),H=0,++V}++H,++R}return S.join("")}if(n={version:"1.4.1",ucs2:{decode:N,encode:q},decode:M,encode:j,toASCII:function(L){return B(L,function(R){return T.test(R)?"xn--"+j(R):R})},toUnicode:function(L){return B(L,function(R){return F.test(R)?M(R.slice(4).toLowerCase()):R})}},c&&d)if(i.exports==c)d.exports=n;else for(h in n)n.hasOwnProperty(h)&&(c[h]=n[h]);else s.punycode=n})(this)}).call(this)}).call(this,typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],52:[function(r,i,p){function l(c,d){return Object.prototype.hasOwnProperty.call(c,d)}i.exports=function(c,d,o,n){d=d||"&",o=o||"=";var h={};if(typeof c!="string"||c.length===0)return h;var a=/\+/g;c=c.split(d);var u=1e3;n&&typeof n.maxKeys=="number"&&(u=n.maxKeys);var f=c.length;u>0&&f>u&&(f=u);for(var v=0;v<f;++v){var y,g,b,m,E=c[v].replace(a,"%20"),F=E.indexOf(o);F>=0?(y=E.substr(0,F),g=E.substr(F+1)):(y=E,g=""),b=decodeURIComponent(y),m=decodeURIComponent(g),l(h,b)?s(h[b])?h[b].push(m):h[b]=[h[b],m]:h[b]=m}return h};var s=Array.isArray||function(c){return Object.prototype.toString.call(c)==="[object Array]"}},{}],53:[function(r,i,p){var l=function(o){switch(typeof o){case"string":return o;case"boolean":return o?"true":"false";case"number":return isFinite(o)?o:"";default:return""}};i.exports=function(o,n,h,a){return n=n||"&",h=h||"=",o===null&&(o=void 0),typeof o=="object"?c(d(o),function(u){var f=encodeURIComponent(l(u))+h;return s(o[u])?c(o[u],function(v){return f+encodeURIComponent(l(v))}).join(n):f+encodeURIComponent(l(o[u]))}).join(n):a?encodeURIComponent(l(a))+h+encodeURIComponent(l(o)):""};var s=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function c(o,n){if(o.map)return o.map(n);for(var h=[],a=0;a<o.length;a++)h.push(n(o[a],a));return h}var d=Object.keys||function(o){var n=[];for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&n.push(h);return n}},{}],54:[function(r,i,p){p.decode=p.parse=r("./decode"),p.encode=p.stringify=r("./encode")},{"./decode":52,"./encode":53}],55:[function(r,i,p){var l={};function s(d,o,n){n||(n=Error);var h=function(a){var u,f;function v(y,g,b){return a.call(this,function(m,E,F){return typeof o=="string"?o:o(m,E,F)}(y,g,b))||this}return f=a,(u=v).prototype=Object.create(f.prototype),u.prototype.constructor=u,u.__proto__=f,v}(n);h.prototype.name=n.name,h.prototype.code=d,l[d]=h}function c(d,o){if(Array.isArray(d)){var n=d.length;return d=d.map(function(h){return String(h)}),n>2?"one of ".concat(o," ").concat(d.slice(0,n-1).join(", "),", or ")+d[n-1]:n===2?"one of ".concat(o," ").concat(d[0]," or ").concat(d[1]):"of ".concat(o," ").concat(d[0])}return"of ".concat(o," ").concat(String(d))}s("ERR_INVALID_OPT_VALUE",function(d,o){return'The value "'+o+'" is invalid for option "'+d+'"'},TypeError),s("ERR_INVALID_ARG_TYPE",function(d,o,n){var h,a,u;if(typeof o=="string"&&(a="not ",o.substr(0,a.length)===a)?(h="must not be",o=o.replace(/^not /,"")):h="must be",function(v,y,g){return(g===void 0||g>v.length)&&(g=v.length),v.substring(g-y.length,g)===y}(d," argument"))u="The ".concat(d," ").concat(h," ").concat(c(o,"type"));else{var f=function(v,y,g){return typeof g!="number"&&(g=0),!(g+y.length>v.length)&&v.indexOf(y,g)!==-1}(d,".")?"property":"argument";u='The "'.concat(d,'" ').concat(f," ").concat(h," ").concat(c(o,"type"))}return u+=". Received type ".concat(typeof n)},TypeError),s("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),s("ERR_METHOD_NOT_IMPLEMENTED",function(d){return"The "+d+" method is not implemented"}),s("ERR_STREAM_PREMATURE_CLOSE","Premature close"),s("ERR_STREAM_DESTROYED",function(d){return"Cannot call "+d+" after a stream was destroyed"}),s("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),s("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),s("ERR_STREAM_WRITE_AFTER_END","write after end"),s("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),s("ERR_UNKNOWN_ENCODING",function(d){return"Unknown encoding: "+d},TypeError),s("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),i.exports.codes=l},{}],56:[function(r,i,p){(function(l){(function(){var s=Object.keys||function(v){var y=[];for(var g in v)y.push(g);return y};i.exports=a;var c=r("./_stream_readable"),d=r("./_stream_writable");r("inherits")(a,c);for(var o=s(d.prototype),n=0;n<o.length;n++){var h=o[n];a.prototype[h]||(a.prototype[h]=d.prototype[h])}function a(v){if(!(this instanceof a))return new a(v);c.call(this,v),d.call(this,v),this.allowHalfOpen=!0,v&&(v.readable===!1&&(this.readable=!1),v.writable===!1&&(this.writable=!1),v.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||l.nextTick(f,this)}function f(v){v.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(v){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=v,this._writableState.destroyed=v)}})}).call(this)}).call(this,r("_process"))},{"./_stream_readable":58,"./_stream_writable":60,_process:50,inherits:24}],57:[function(r,i,p){i.exports=s;var l=r("./_stream_transform");function s(c){if(!(this instanceof s))return new s(c);l.call(this,c)}r("inherits")(s,l),s.prototype._transform=function(c,d,o){o(null,c)}},{"./_stream_transform":59,inherits:24}],58:[function(r,i,p){(function(l,s){(function(){var c;i.exports=A,A.ReadableState=_,r("events").EventEmitter;var d=function(x,w){return x.listeners(w).length},o=r("./internal/streams/stream"),n=r("buffer").Buffer,h=s.Uint8Array||function(){},a,u=r("util");a=u&&u.debuglog?u.debuglog("stream"):function(){};var f,v,y,g=r("./internal/streams/buffer_list"),b=r("./internal/streams/destroy"),m=r("./internal/streams/state").getHighWaterMark,E=r("../errors").codes,F=E.ERR_INVALID_ARG_TYPE,T=E.ERR_STREAM_PUSH_AFTER_EOF,D=E.ERR_METHOD_NOT_IMPLEMENTED,I=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r("inherits")(A,o);var Y=b.errorOrDestroy,W=["error","close","destroy","pause","resume"];function _(x,w,O){c=c||r("./_stream_duplex"),x=x||{},typeof O!="boolean"&&(O=w instanceof c),this.objectMode=!!x.objectMode,O&&(this.objectMode=this.objectMode||!!x.readableObjectMode),this.highWaterMark=m(this,x,"readableHighWaterMark",O),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=x.emitClose!==!1,this.autoDestroy=!!x.autoDestroy,this.destroyed=!1,this.defaultEncoding=x.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,x.encoding&&(f||(f=r("string_decoder/").StringDecoder),this.decoder=new f(x.encoding),this.encoding=x.encoding)}function A(x){if(c=c||r("./_stream_duplex"),!(this instanceof A))return new A(x);var w=this instanceof c;this._readableState=new _(x,this,w),this.readable=!0,x&&(typeof x.read=="function"&&(this._read=x.read),typeof x.destroy=="function"&&(this._destroy=x.destroy)),o.call(this)}function C(x,w,O,K,Z){a("readableAddChunk",w);var ee,ae=x._readableState;if(w===null)ae.reading=!1,function(z,S){if(a("onEofChunk"),!S.ended){if(S.decoder){var k=S.decoder.end();k&&k.length&&(S.buffer.push(k),S.length+=S.objectMode?1:k.length)}S.ended=!0,S.sync?X(z):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,$(z)))}}(x,ae);else if(Z||(ee=function(z,S){var k;Q=S,n.isBuffer(Q)||Q instanceof h||typeof S=="string"||S===void 0||z.objectMode||(k=new F("chunk",["string","Buffer","Uint8Array"],S));var Q;return k}(ae,w)),ee)Y(x,ee);else if(ae.objectMode||w&&w.length>0)if(typeof w=="string"||ae.objectMode||Object.getPrototypeOf(w)===n.prototype||(w=function(z){return n.from(z)}(w)),K)ae.endEmitted?Y(x,new I):B(x,ae,w,!0);else if(ae.ended)Y(x,new T);else{if(ae.destroyed)return!1;ae.reading=!1,ae.decoder&&!O?(w=ae.decoder.write(w),ae.objectMode||w.length!==0?B(x,ae,w,!1):M(x,ae)):B(x,ae,w,!1)}else K||(ae.reading=!1,M(x,ae));return!ae.ended&&(ae.length<ae.highWaterMark||ae.length===0)}function B(x,w,O,K){w.flowing&&w.length===0&&!w.sync?(w.awaitDrain=0,x.emit("data",O)):(w.length+=w.objectMode?1:O.length,K?w.buffer.unshift(O):w.buffer.push(O),w.needReadable&&X(x)),M(x,w)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),A.prototype.destroy=b.destroy,A.prototype._undestroy=b.undestroy,A.prototype._destroy=function(x,w){w(x)},A.prototype.push=function(x,w){var O,K=this._readableState;return K.objectMode?O=!0:typeof x=="string"&&((w=w||K.defaultEncoding)!==K.encoding&&(x=n.from(x,w),w=""),O=!0),C(this,x,w,!1,O)},A.prototype.unshift=function(x){return C(this,x,null,!0,!1)},A.prototype.isPaused=function(){return this._readableState.flowing===!1},A.prototype.setEncoding=function(x){f||(f=r("string_decoder/").StringDecoder);var w=new f(x);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;for(var O=this._readableState.buffer.head,K="";O!==null;)K+=w.write(O.data),O=O.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};var N=1073741824;function q(x,w){return x<=0||w.length===0&&w.ended?0:w.objectMode?1:x!=x?w.flowing&&w.length?w.buffer.head.data.length:w.length:(x>w.highWaterMark&&(w.highWaterMark=function(O){return O>=N?O=N:(O--,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O++),O}(x)),x<=w.length?x:w.ended?w.length:(w.needReadable=!0,0))}function X(x){var w=x._readableState;a("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,w.emittedReadable||(a("emitReadable",w.flowing),w.emittedReadable=!0,l.nextTick($,x))}function $(x){var w=x._readableState;a("emitReadable_",w.destroyed,w.length,w.ended),w.destroyed||!w.length&&!w.ended||(x.emit("readable"),w.emittedReadable=!1),w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,V(x)}function M(x,w){w.readingMore||(w.readingMore=!0,l.nextTick(j,x,w))}function j(x,w){for(;!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0);){var O=w.length;if(a("maybeReadMore read 0"),x.read(0),O===w.length)break}w.readingMore=!1}function L(x){var w=x._readableState;w.readableListening=x.listenerCount("readable")>0,w.resumeScheduled&&!w.paused?w.flowing=!0:x.listenerCount("data")>0&&x.resume()}function R(x){a("readable nexttick read 0"),x.read(0)}function H(x,w){a("resume",w.reading),w.reading||x.read(0),w.resumeScheduled=!1,x.emit("resume"),V(x),w.flowing&&!w.reading&&x.read(0)}function V(x){var w=x._readableState;for(a("flow",w.flowing);w.flowing&&x.read()!==null;);}function J(x,w){return w.length===0?null:(w.objectMode?O=w.buffer.shift():!x||x>=w.length?(O=w.decoder?w.buffer.join(""):w.buffer.length===1?w.buffer.first():w.buffer.concat(w.length),w.buffer.clear()):O=w.buffer.consume(x,w.decoder),O);var O}function ie(x){var w=x._readableState;a("endReadable",w.endEmitted),w.endEmitted||(w.ended=!0,l.nextTick(ne,w,x))}function ne(x,w){if(a("endReadableNT",x.endEmitted,x.length),!x.endEmitted&&x.length===0&&(x.endEmitted=!0,w.readable=!1,w.emit("end"),x.autoDestroy)){var O=w._writableState;(!O||O.autoDestroy&&O.finished)&&w.destroy()}}function oe(x,w){for(var O=0,K=x.length;O<K;O++)if(x[O]===w)return O;return-1}A.prototype.read=function(x){a("read",x),x=parseInt(x,10);var w=this._readableState,O=x;if(x!==0&&(w.emittedReadable=!1),x===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended))return a("read: emitReadable",w.length,w.ended),w.length===0&&w.ended?ie(this):X(this),null;if((x=q(x,w))===0&&w.ended)return w.length===0&&ie(this),null;var K,Z=w.needReadable;return a("need readable",Z),(w.length===0||w.length-x<w.highWaterMark)&&a("length less than watermark",Z=!0),w.ended||w.reading?a("reading or ended",Z=!1):Z&&(a("do read"),w.reading=!0,w.sync=!0,w.length===0&&(w.needReadable=!0),this._read(w.highWaterMark),w.sync=!1,w.reading||(x=q(O,w))),(K=x>0?J(x,w):null)===null?(w.needReadable=w.length<=w.highWaterMark,x=0):(w.length-=x,w.awaitDrain=0),w.length===0&&(w.ended||(w.needReadable=!0),O!==x&&w.ended&&ie(this)),K!==null&&this.emit("data",K),K},A.prototype._read=function(x){Y(this,new D("_read()"))},A.prototype.pipe=function(x,w){var O=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=x;break;case 1:K.pipes=[K.pipes,x];break;default:K.pipes.push(x)}K.pipesCount+=1,a("pipe count=%d opts=%j",K.pipesCount,w);var Z=(!w||w.end!==!1)&&x!==l.stdout&&x!==l.stderr?ae:ue;function ee(ye,xe){a("onunpipe"),ye===O&&xe&&xe.hasUnpiped===!1&&(xe.hasUnpiped=!0,a("cleanup"),x.removeListener("close",re),x.removeListener("finish",le),x.removeListener("drain",z),x.removeListener("error",Q),x.removeListener("unpipe",ee),O.removeListener("end",ae),O.removeListener("end",ue),O.removeListener("data",k),S=!0,!K.awaitDrain||x._writableState&&!x._writableState.needDrain||z())}function ae(){a("onend"),x.end()}K.endEmitted?l.nextTick(Z):O.once("end",Z),x.on("unpipe",ee);var z=function(ye){return function(){var xe=ye._readableState;a("pipeOnDrain",xe.awaitDrain),xe.awaitDrain&&xe.awaitDrain--,xe.awaitDrain===0&&d(ye,"data")&&(xe.flowing=!0,V(ye))}}(O);x.on("drain",z);var S=!1;function k(ye){a("ondata");var xe=x.write(ye);a("dest.write",xe),xe===!1&&((K.pipesCount===1&&K.pipes===x||K.pipesCount>1&&oe(K.pipes,x)!==-1)&&!S&&(a("false write response, pause",K.awaitDrain),K.awaitDrain++),O.pause())}function Q(ye){a("onerror",ye),ue(),x.removeListener("error",Q),d(x,"error")===0&&Y(x,ye)}function re(){x.removeListener("finish",le),ue()}function le(){a("onfinish"),x.removeListener("close",re),ue()}function ue(){a("unpipe"),O.unpipe(x)}return O.on("data",k),function(ye,xe,Be){if(typeof ye.prependListener=="function")return ye.prependListener(xe,Be);ye._events&&ye._events[xe]?Array.isArray(ye._events[xe])?ye._events[xe].unshift(Be):ye._events[xe]=[Be,ye._events[xe]]:ye.on(xe,Be)}(x,"error",Q),x.once("close",re),x.once("finish",le),x.emit("pipe",O),K.flowing||(a("pipe resume"),O.resume()),x},A.prototype.unpipe=function(x){var w=this._readableState,O={hasUnpiped:!1};if(w.pipesCount===0)return this;if(w.pipesCount===1)return x&&x!==w.pipes?this:(x||(x=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,x&&x.emit("unpipe",this,O),this);if(!x){var K=w.pipes,Z=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var ee=0;ee<Z;ee++)K[ee].emit("unpipe",this,{hasUnpiped:!1});return this}var ae=oe(w.pipes,x);return ae===-1?this:(w.pipes.splice(ae,1),w.pipesCount-=1,w.pipesCount===1&&(w.pipes=w.pipes[0]),x.emit("unpipe",this,O),this)},A.prototype.on=function(x,w){var O=o.prototype.on.call(this,x,w),K=this._readableState;return x==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):x==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,a("on readable",K.length,K.reading),K.length?X(this):K.reading||l.nextTick(R,this))),O},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(x,w){var O=o.prototype.removeListener.call(this,x,w);return x==="readable"&&l.nextTick(L,this),O},A.prototype.removeAllListeners=function(x){var w=o.prototype.removeAllListeners.apply(this,arguments);return x!=="readable"&&x!==void 0||l.nextTick(L,this),w},A.prototype.resume=function(){var x=this._readableState;return x.flowing||(a("resume"),x.flowing=!x.readableListening,function(w,O){O.resumeScheduled||(O.resumeScheduled=!0,l.nextTick(H,w,O))}(this,x)),x.paused=!1,this},A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(x){var w=this,O=this._readableState,K=!1;for(var Z in x.on("end",function(){if(a("wrapped end"),O.decoder&&!O.ended){var ae=O.decoder.end();ae&&ae.length&&w.push(ae)}w.push(null)}),x.on("data",function(ae){a("wrapped data"),O.decoder&&(ae=O.decoder.write(ae)),(!O.objectMode||ae!=null)&&(O.objectMode||ae&&ae.length)&&(w.push(ae)||(K=!0,x.pause()))}),x)this[Z]===void 0&&typeof x[Z]=="function"&&(this[Z]=function(ae){return function(){return x[ae].apply(x,arguments)}}(Z));for(var ee=0;ee<W.length;ee++)x.on(W[ee],this.emit.bind(this,W[ee]));return this._read=function(ae){a("wrapped _read",ae),K&&(K=!1,x.resume())},this},typeof Symbol=="function"&&(A.prototype[Symbol.asyncIterator]=function(){return v===void 0&&(v=r("./internal/streams/async_iterator")),v(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),A._fromList=J,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(A.from=function(x,w){return y===void 0&&(y=r("./internal/streams/from")),y(A,x,w)})}).call(this)}).call(this,r("_process"),typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/async_iterator":61,"./internal/streams/buffer_list":62,"./internal/streams/destroy":63,"./internal/streams/from":65,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,events:22,inherits:24,"string_decoder/":75,util:16}],59:[function(r,i,p){i.exports=h;var l=r("../errors").codes,s=l.ERR_METHOD_NOT_IMPLEMENTED,c=l.ERR_MULTIPLE_CALLBACK,d=l.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=l.ERR_TRANSFORM_WITH_LENGTH_0,n=r("./_stream_duplex");function h(f){if(!(this instanceof h))return new h(f);n.call(this,f),this._transformState={afterTransform:function(v,y){var g=this._transformState;g.transforming=!1;var b=g.writecb;if(b===null)return this.emit("error",new c);g.writechunk=null,g.writecb=null,y!=null&&this.push(y),b(v);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",a)}function a(){var f=this;typeof this._flush!="function"||this._readableState.destroyed?u(this,null,null):this._flush(function(v,y){u(f,v,y)})}function u(f,v,y){if(v)return f.emit("error",v);if(y!=null&&f.push(y),f._writableState.length)throw new o;if(f._transformState.transforming)throw new d;return f.push(null)}r("inherits")(h,n),h.prototype.push=function(f,v){return this._transformState.needTransform=!1,n.prototype.push.call(this,f,v)},h.prototype._transform=function(f,v,y){y(new s("_transform()"))},h.prototype._write=function(f,v,y){var g=this._transformState;if(g.writecb=y,g.writechunk=f,g.writeencoding=v,!g.transforming){var b=this._readableState;(g.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},h.prototype._read=function(f){var v=this._transformState;v.writechunk===null||v.transforming?v.needTransform=!0:(v.transforming=!0,this._transform(v.writechunk,v.writeencoding,v.afterTransform))},h.prototype._destroy=function(f,v){n.prototype._destroy.call(this,f,function(y){v(y)})}},{"../errors":55,"./_stream_duplex":56,inherits:24}],60:[function(r,i,p){(function(l,s){(function(){function c(M){var j=this;this.next=null,this.entry=null,this.finish=function(){(function(L,R,H){var V=L.entry;for(L.entry=null;V;){var J=V.callback;R.pendingcb--,J(H),V=V.next}R.corkedRequestsFree.next=L})(j,M)}}var d;i.exports=A,A.WritableState=_;var o={deprecate:r("util-deprecate")},n=r("./internal/streams/stream"),h=r("buffer").Buffer,a=s.Uint8Array||function(){},u,f=r("./internal/streams/destroy"),v=r("./internal/streams/state").getHighWaterMark,y=r("../errors").codes,g=y.ERR_INVALID_ARG_TYPE,b=y.ERR_METHOD_NOT_IMPLEMENTED,m=y.ERR_MULTIPLE_CALLBACK,E=y.ERR_STREAM_CANNOT_PIPE,F=y.ERR_STREAM_DESTROYED,T=y.ERR_STREAM_NULL_VALUES,D=y.ERR_STREAM_WRITE_AFTER_END,I=y.ERR_UNKNOWN_ENCODING,Y=f.errorOrDestroy;function W(){}function _(M,j,L){d=d||r("./_stream_duplex"),M=M||{},typeof L!="boolean"&&(L=j instanceof d),this.objectMode=!!M.objectMode,L&&(this.objectMode=this.objectMode||!!M.writableObjectMode),this.highWaterMark=v(this,M,"writableHighWaterMark",L),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var R=M.decodeStrings===!1;this.decodeStrings=!R,this.defaultEncoding=M.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){(function(V,J){var ie=V._writableState,ne=ie.sync,oe=ie.writecb;if(typeof oe!="function")throw new m;if(function(w){w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0}(ie),J)(function(w,O,K,Z,ee){--O.pendingcb,K?(l.nextTick(ee,Z),l.nextTick($,w,O),w._writableState.errorEmitted=!0,Y(w,Z)):(ee(Z),w._writableState.errorEmitted=!0,Y(w,Z),$(w,O))})(V,ie,ne,J,oe);else{var x=q(ie)||V.destroyed;x||ie.corked||ie.bufferProcessing||!ie.bufferedRequest||N(V,ie),ne?l.nextTick(B,V,ie,x,oe):B(V,ie,x,oe)}})(j,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function A(M){var j=this instanceof(d=d||r("./_stream_duplex"));if(!j&&!u.call(A,this))return new A(M);this._writableState=new _(M,this,j),this.writable=!0,M&&(typeof M.write=="function"&&(this._write=M.write),typeof M.writev=="function"&&(this._writev=M.writev),typeof M.destroy=="function"&&(this._destroy=M.destroy),typeof M.final=="function"&&(this._final=M.final)),n.call(this)}function C(M,j,L,R,H,V,J){j.writelen=R,j.writecb=J,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new F("write")):L?M._writev(H,j.onwrite):M._write(H,V,j.onwrite),j.sync=!1}function B(M,j,L,R){L||function(H,V){V.length===0&&V.needDrain&&(V.needDrain=!1,H.emit("drain"))}(M,j),j.pendingcb--,R(),$(M,j)}function N(M,j){j.bufferProcessing=!0;var L=j.bufferedRequest;if(M._writev&&L&&L.next){var R=j.bufferedRequestCount,H=new Array(R),V=j.corkedRequestsFree;V.entry=L;for(var J=0,ie=!0;L;)H[J]=L,L.isBuf||(ie=!1),L=L.next,J+=1;H.allBuffers=ie,C(M,j,!0,j.length,H,"",V.finish),j.pendingcb++,j.lastBufferedRequest=null,V.next?(j.corkedRequestsFree=V.next,V.next=null):j.corkedRequestsFree=new c(j),j.bufferedRequestCount=0}else{for(;L;){var ne=L.chunk,oe=L.encoding,x=L.callback;if(C(M,j,!1,j.objectMode?1:ne.length,ne,oe,x),L=L.next,j.bufferedRequestCount--,j.writing)break}L===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=L,j.bufferProcessing=!1}function q(M){return M.ending&&M.length===0&&M.bufferedRequest===null&&!M.finished&&!M.writing}function X(M,j){M._final(function(L){j.pendingcb--,L&&Y(M,L),j.prefinished=!0,M.emit("prefinish"),$(M,j)})}function $(M,j){var L=q(j);if(L&&(function(H,V){V.prefinished||V.finalCalled||(typeof H._final!="function"||V.destroyed?(V.prefinished=!0,H.emit("prefinish")):(V.pendingcb++,V.finalCalled=!0,l.nextTick(X,H,V)))}(M,j),j.pendingcb===0&&(j.finished=!0,M.emit("finish"),j.autoDestroy))){var R=M._readableState;(!R||R.autoDestroy&&R.endEmitted)&&M.destroy()}return L}r("inherits")(A,n),_.prototype.getBuffer=function(){for(var M=this.bufferedRequest,j=[];M;)j.push(M),M=M.next;return j},function(){try{Object.defineProperty(_.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(M){}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(M){return!!u.call(this,M)||this===A&&M&&M._writableState instanceof _}})):u=function(M){return M instanceof this},A.prototype.pipe=function(){Y(this,new E)},A.prototype.write=function(M,j,L){var R,H=this._writableState,V=!1,J=!H.objectMode&&(R=M,h.isBuffer(R)||R instanceof a);return J&&!h.isBuffer(M)&&(M=function(ie){return h.from(ie)}(M)),typeof j=="function"&&(L=j,j=null),J?j="buffer":j||(j=H.defaultEncoding),typeof L!="function"&&(L=W),H.ending?function(ie,ne){var oe=new D;Y(ie,oe),l.nextTick(ne,oe)}(this,L):(J||function(ie,ne,oe,x){var w;return oe===null?w=new T:typeof oe=="string"||ne.objectMode||(w=new g("chunk",["string","Buffer"],oe)),!w||(Y(ie,w),l.nextTick(x,w),!1)}(this,H,M,L))&&(H.pendingcb++,V=function(ie,ne,oe,x,w,O){if(!oe){var K=function(z,S,k){return z.objectMode||z.decodeStrings===!1||typeof S!="string"||(S=h.from(S,k)),S}(ne,x,w);x!==K&&(oe=!0,w="buffer",x=K)}var Z=ne.objectMode?1:x.length;ne.length+=Z;var ee=ne.length<ne.highWaterMark;if(ee||(ne.needDrain=!0),ne.writing||ne.corked){var ae=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:x,encoding:w,isBuf:oe,callback:O,next:null},ae?ae.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else C(ie,ne,!1,Z,x,w,O);return ee}(this,H,J,M,j,L)),V},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var M=this._writableState;M.corked&&(M.corked--,M.writing||M.corked||M.bufferProcessing||!M.bufferedRequest||N(this,M))},A.prototype.setDefaultEncoding=function(M){if(typeof M=="string"&&(M=M.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((M+"").toLowerCase())>-1))throw new I(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(M,j,L){L(new b("_write()"))},A.prototype._writev=null,A.prototype.end=function(M,j,L){var R=this._writableState;return typeof M=="function"?(L=M,M=null,j=null):typeof j=="function"&&(L=j,j=null),M!=null&&this.write(M,j),R.corked&&(R.corked=1,this.uncork()),R.ending||function(H,V,J){V.ending=!0,$(H,V),J&&(V.finished?l.nextTick(J):H.once("finish",J)),V.ended=!0,H.writable=!1}(this,R,L),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(M,j){j(M)}}).call(this)}).call(this,r("_process"),typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/destroy":63,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,inherits:24,"util-deprecate":78}],61:[function(r,i,p){(function(l){(function(){var s;function c(E,F,T){return F in E?Object.defineProperty(E,F,{value:T,enumerable:!0,configurable:!0,writable:!0}):E[F]=T,E}var d=r("./end-of-stream"),o=Symbol("lastResolve"),n=Symbol("lastReject"),h=Symbol("error"),a=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),v=Symbol("stream");function y(E,F){return{value:E,done:F}}function g(E){var F=E[o];if(F!==null){var T=E[v].read();T!==null&&(E[u]=null,E[o]=null,E[n]=null,F(y(T,!1)))}}var b=Object.getPrototypeOf(function(){}),m=Object.setPrototypeOf((c(s={get stream(){return this[v]},next:function(){var E=this,F=this[h];if(F!==null)return Promise.reject(F);if(this[a])return Promise.resolve(y(void 0,!0));if(this[v].destroyed)return new Promise(function(Y,W){l.nextTick(function(){E[h]?W(E[h]):Y(y(void 0,!0))})});var T,D=this[u];if(D)T=new Promise(function(Y,W){return function(_,A){Y.then(function(){W[a]?_(y(void 0,!0)):W[f](_,A)},A)}}(D,this));else{var I=this[v].read();if(I!==null)return Promise.resolve(y(I,!1));T=new Promise(this[f])}return this[u]=T,T}},Symbol.asyncIterator,function(){return this}),c(s,"return",function(){var E=this;return new Promise(function(F,T){E[v].destroy(null,function(D){D?T(D):F(y(void 0,!0))})})}),s),b);i.exports=function(E){var F,T=Object.create(m,(c(F={},v,{value:E,writable:!0}),c(F,o,{value:null,writable:!0}),c(F,n,{value:null,writable:!0}),c(F,h,{value:null,writable:!0}),c(F,a,{value:E._readableState.endEmitted,writable:!0}),c(F,f,{value:function(D,I){var Y=T[v].read();Y?(T[u]=null,T[o]=null,T[n]=null,D(y(Y,!1))):(T[o]=D,T[n]=I)},writable:!0}),F));return T[u]=null,d(E,function(D){if(D&&D.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=T[n];return I!==null&&(T[u]=null,T[o]=null,T[n]=null,I(D)),void(T[h]=D)}var Y=T[o];Y!==null&&(T[u]=null,T[o]=null,T[n]=null,Y(y(void 0,!0))),T[a]=!0}),E.on("readable",function(D){l.nextTick(g,D)}.bind(null,T)),T}}).call(this)}).call(this,r("_process"))},{"./end-of-stream":64,_process:50}],62:[function(r,i,p){function l(h,a){var u=Object.keys(h);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(h);a&&(f=f.filter(function(v){return Object.getOwnPropertyDescriptor(h,v).enumerable})),u.push.apply(u,f)}return u}function s(h,a,u){return a in h?Object.defineProperty(h,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):h[a]=u,h}function c(h,a){for(var u=0;u<a.length;u++){var f=a[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(h,f.key,f)}}var d=r("buffer").Buffer,o=r("util").inspect,n=o&&o.custom||"inspect";i.exports=function(){function h(){(function(f,v){if(!(f instanceof v))throw new TypeError("Cannot call a class as a function")})(this,h),this.head=null,this.tail=null,this.length=0}var a,u;return a=h,(u=[{key:"push",value:function(f){var v={data:f,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(f){var v={data:f,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=f+v.data;return y}},{key:"concat",value:function(f){if(this.length===0)return d.alloc(0);for(var v,y,g,b=d.allocUnsafe(f>>>0),m=this.head,E=0;m;)v=m.data,y=b,g=E,d.prototype.copy.call(v,y,g),E+=m.data.length,m=m.next;return b}},{key:"consume",value:function(f,v){var y;return f<this.head.data.length?(y=this.head.data.slice(0,f),this.head.data=this.head.data.slice(f)):y=f===this.head.data.length?this.shift():v?this._getString(f):this._getBuffer(f),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(f){var v=this.head,y=1,g=v.data;for(f-=g.length;v=v.next;){var b=v.data,m=f>b.length?b.length:f;if(m===b.length?g+=b:g+=b.slice(0,f),(f-=m)===0){m===b.length?(++y,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=b.slice(m));break}++y}return this.length-=y,g}},{key:"_getBuffer",value:function(f){var v=d.allocUnsafe(f),y=this.head,g=1;for(y.data.copy(v),f-=y.data.length;y=y.next;){var b=y.data,m=f>b.length?b.length:f;if(b.copy(v,v.length-f,0,m),(f-=m)===0){m===b.length?(++g,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=b.slice(m));break}++g}return this.length-=g,v}},{key:n,value:function(f,v){return o(this,function(y){for(var g=1;g<arguments.length;g++){var b=arguments[g]!=null?arguments[g]:{};g%2?l(Object(b),!0).forEach(function(m){s(y,m,b[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):l(Object(b)).forEach(function(m){Object.defineProperty(y,m,Object.getOwnPropertyDescriptor(b,m))})}return y}({},v,{depth:0,customInspect:!1}))}}])&&c(a.prototype,u),h}()},{buffer:17,util:16}],63:[function(r,i,p){(function(l){(function(){function s(o,n){d(o,n),c(o)}function c(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function d(o,n){o.emit("error",n)}i.exports={destroy:function(o,n){var h=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(n?n(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,l.nextTick(d,this,o)):l.nextTick(d,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!n&&f?h._writableState?h._writableState.errorEmitted?l.nextTick(c,h):(h._writableState.errorEmitted=!0,l.nextTick(s,h,f)):l.nextTick(s,h,f):n?(l.nextTick(c,h),n(f)):l.nextTick(c,h)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(o,n){var h=o._readableState,a=o._writableState;h&&h.autoDestroy||a&&a.autoDestroy?o.destroy(n):o.emit("error",n)}}}).call(this)}).call(this,r("_process"))},{_process:50}],64:[function(r,i,p){var l=r("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function s(){}i.exports=function c(d,o,n){if(typeof o=="function")return c(d,null,o);o||(o={}),n=function(F){var T=!1;return function(){if(!T){T=!0;for(var D=arguments.length,I=new Array(D),Y=0;Y<D;Y++)I[Y]=arguments[Y];F.apply(this,I)}}}(n||s);var h=o.readable||o.readable!==!1&&d.readable,a=o.writable||o.writable!==!1&&d.writable,u=function(){d.writable||v()},f=d._writableState&&d._writableState.finished,v=function(){a=!1,f=!0,h||n.call(d)},y=d._readableState&&d._readableState.endEmitted,g=function(){h=!1,y=!0,a||n.call(d)},b=function(F){n.call(d,F)},m=function(){var F;return h&&!y?(d._readableState&&d._readableState.ended||(F=new l),n.call(d,F)):a&&!f?(d._writableState&&d._writableState.ended||(F=new l),n.call(d,F)):void 0},E=function(){d.req.on("finish",v)};return function(F){return F.setHeader&&typeof F.abort=="function"}(d)?(d.on("complete",v),d.on("abort",m),d.req?E():d.on("request",E)):a&&!d._writableState&&(d.on("end",u),d.on("close",u)),d.on("end",g),d.on("finish",v),o.error!==!1&&d.on("error",b),d.on("close",m),function(){d.removeListener("complete",v),d.removeListener("abort",m),d.removeListener("request",E),d.req&&d.req.removeListener("finish",v),d.removeListener("end",u),d.removeListener("close",u),d.removeListener("finish",v),d.removeListener("end",g),d.removeListener("error",b),d.removeListener("close",m)}}},{"../../../errors":55}],65:[function(r,i,p){i.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],66:[function(r,i,p){var l,s=r("../../../errors").codes,c=s.ERR_MISSING_ARGS,d=s.ERR_STREAM_DESTROYED;function o(a){if(a)throw a}function n(a){a()}function h(a,u){return a.pipe(u)}i.exports=function(){for(var a=arguments.length,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f];var v,y=function(b){return b.length?typeof b[b.length-1]!="function"?o:b.pop():o}(u);if(Array.isArray(u[0])&&(u=u[0]),u.length<2)throw new c("streams");var g=u.map(function(b,m){var E=m<u.length-1;return function(F,T,D,I){I=function(_){var A=!1;return function(){A||(A=!0,_.apply(void 0,arguments))}}(I);var Y=!1;F.on("close",function(){Y=!0}),l===void 0&&(l=r("./end-of-stream")),l(F,{readable:T,writable:D},function(_){if(_)return I(_);Y=!0,I()});var W=!1;return function(_){if(!Y&&!W)return W=!0,function(A){return A.setHeader&&typeof A.abort=="function"}(F)?F.abort():typeof F.destroy=="function"?F.destroy():void I(_||new d("pipe"))}}(b,E,m>0,function(F){v||(v=F),F&&g.forEach(n),E||(g.forEach(n),y(v))})});return u.reduce(h)}},{"../../../errors":55,"./end-of-stream":64}],67:[function(r,i,p){var l=r("../../../errors").codes.ERR_INVALID_OPT_VALUE;i.exports={getHighWaterMark:function(s,c,d,o){var n=function(h,a,u){return h.highWaterMark!=null?h.highWaterMark:a?h[u]:null}(c,o,d);if(n!=null){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new l(o?d:"highWaterMark",n);return Math.floor(n)}return s.objectMode?16:16384}}},{"../../../errors":55}],68:[function(r,i,p){i.exports=r("events").EventEmitter},{events:22}],69:[function(r,i,p){(p=i.exports=r("./lib/_stream_readable.js")).Stream=p,p.Readable=p,p.Writable=r("./lib/_stream_writable.js"),p.Duplex=r("./lib/_stream_duplex.js"),p.Transform=r("./lib/_stream_transform.js"),p.PassThrough=r("./lib/_stream_passthrough.js"),p.finished=r("./lib/internal/streams/end-of-stream.js"),p.pipeline=r("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":56,"./lib/_stream_passthrough.js":57,"./lib/_stream_readable.js":58,"./lib/_stream_transform.js":59,"./lib/_stream_writable.js":60,"./lib/internal/streams/end-of-stream.js":64,"./lib/internal/streams/pipeline.js":66}],70:[function(r,i,p){i.exports=function(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var l;if(arguments.length>0){l=new Array(arguments.length-2);for(var s=0;s<l.length;s++)l[s]=arguments[s+2]}return new function(c,d,o){var n=this;this._callback=c,this._args=o,this._interval=setInterval(c,d,this._args),this.reschedule=function(h){h||(h=n._interval),n._interval&&clearInterval(n._interval),n._interval=setInterval(n._callback,h,n._args)},this.clear=function(){n._interval&&(clearInterval(n._interval),n._interval=void 0)},this.destroy=function(){n._interval&&clearInterval(n._interval),n._callback=void 0,n._interval=void 0,n._args=void 0}}(arguments[0],arguments[1],l)}},{}],71:[function(r,i,p){i.exports=r("./index.js")()},{"./index.js":72}],72:[function(r,i,p){(function(l){(function(){function s(c){return c instanceof l?l.from(c):new c.constructor(c.buffer.slice(),c.byteOffset,c.length)}i.exports=function(c){return(c=c||{}).circles?function(o){var n=[],h=[];return o.proto?function u(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return a(f,u);if(f instanceof Map)return new Map(a(Array.from(f),u));if(f instanceof Set)return new Set(a(Array.from(f),u));var v={};for(var y in n.push(f),h.push(v),f){var g=f[y];if(typeof g!="object"||g===null)v[y]=g;else if(g instanceof Date)v[y]=new Date(g);else if(g instanceof Map)v[y]=new Map(a(Array.from(g),u));else if(g instanceof Set)v[y]=new Set(a(Array.from(g),u));else if(ArrayBuffer.isView(g))v[y]=s(g);else{var b=n.indexOf(g);v[y]=b!==-1?h[b]:u(g)}}return n.pop(),h.pop(),v}:function u(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return a(f,u);if(f instanceof Map)return new Map(a(Array.from(f),u));if(f instanceof Set)return new Set(a(Array.from(f),u));var v={};for(var y in n.push(f),h.push(v),f)if(Object.hasOwnProperty.call(f,y)!==!1){var g=f[y];if(typeof g!="object"||g===null)v[y]=g;else if(g instanceof Date)v[y]=new Date(g);else if(g instanceof Map)v[y]=new Map(a(Array.from(g),u));else if(g instanceof Set)v[y]=new Set(a(Array.from(g),u));else if(ArrayBuffer.isView(g))v[y]=s(g);else{var b=n.indexOf(g);v[y]=b!==-1?h[b]:u(g)}}return n.pop(),h.pop(),v};function a(u,f){for(var v=Object.keys(u),y=new Array(v.length),g=0;g<v.length;g++){var b=v[g],m=u[b];if(typeof m!="object"||m===null)y[b]=m;else if(m instanceof Date)y[b]=new Date(m);else if(ArrayBuffer.isView(m))y[b]=s(m);else{var E=n.indexOf(m);y[b]=E!==-1?h[E]:f(m)}}return y}}(c):c.proto?function o(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return d(n,o);if(n instanceof Map)return new Map(d(Array.from(n),o));if(n instanceof Set)return new Set(d(Array.from(n),o));var h={};for(var a in n){var u=n[a];typeof u!="object"||u===null?h[a]=u:u instanceof Date?h[a]=new Date(u):u instanceof Map?h[a]=new Map(d(Array.from(u),o)):u instanceof Set?h[a]=new Set(d(Array.from(u),o)):ArrayBuffer.isView(u)?h[a]=s(u):h[a]=o(u)}return h}:function o(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return d(n,o);if(n instanceof Map)return new Map(d(Array.from(n),o));if(n instanceof Set)return new Set(d(Array.from(n),o));var h={};for(var a in n)if(Object.hasOwnProperty.call(n,a)!==!1){var u=n[a];typeof u!="object"||u===null?h[a]=u:u instanceof Date?h[a]=new Date(u):u instanceof Map?h[a]=new Map(d(Array.from(u),o)):u instanceof Set?h[a]=new Set(d(Array.from(u),o)):ArrayBuffer.isView(u)?h[a]=s(u):h[a]=o(u)}return h};function d(o,n){for(var h=Object.keys(o),a=new Array(h.length),u=0;u<h.length;u++){var f=h[u],v=o[f];typeof v!="object"||v===null?a[f]=v:v instanceof Date?a[f]=new Date(v):ArrayBuffer.isView(v)?a[f]=s(v):a[f]=n(v)}return a}}}).call(this)}).call(this,r("buffer").Buffer)},{buffer:17}],73:[function(r,i,p){var l=r("buffer"),s=l.Buffer;function c(o,n){for(var h in o)n[h]=o[h]}function d(o,n,h){return s(o,n,h)}s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?i.exports=l:(c(l,p),p.Buffer=d),d.prototype=Object.create(s.prototype),c(s,d),d.from=function(o,n,h){if(typeof o=="number")throw new TypeError("Argument must not be a number");return s(o,n,h)},d.alloc=function(o,n,h){if(typeof o!="number")throw new TypeError("Argument must be a number");var a=s(o);return n!==void 0?typeof h=="string"?a.fill(n,h):a.fill(n):a.fill(0),a},d.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return s(o)},d.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(o)}},{buffer:17}],74:[function(r,i,p){i.exports=function(l){var s=l._readableState;return s?s.objectMode||typeof l._duplexState=="number"?l.read():l.read((c=s,c.buffer.length?c.buffer.head?c.buffer.head.data.length:c.buffer[0].length:c.length)):null;var c}},{}],75:[function(r,i,p){var l=r("safe-buffer").Buffer,s=l.isEncoding||function(y){switch((y=""+y)&&y.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(y){var g;switch(this.encoding=function(b){var m=function(E){if(!E)return"utf8";for(var F;;)switch(E){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return E;default:if(F)return;E=(""+E).toLowerCase(),F=!0}}(b);if(typeof m!="string"&&(l.isEncoding===s||!s(b)))throw new Error("Unknown encoding: "+b);return m||b}(y),this.encoding){case"utf16le":this.text=n,this.end=h,g=4;break;case"utf8":this.fillLast=o,g=4;break;case"base64":this.text=a,this.end=u,g=3;break;default:return this.write=f,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(g)}function d(y){return y<=127?0:y>>5==6?2:y>>4==14?3:y>>3==30?4:y>>6==2?-1:-2}function o(y){var g=this.lastTotal-this.lastNeed,b=function(m,E,F){if((192&E[0])!=128)return m.lastNeed=0,"�";if(m.lastNeed>1&&E.length>1){if((192&E[1])!=128)return m.lastNeed=1,"�";if(m.lastNeed>2&&E.length>2&&(192&E[2])!=128)return m.lastNeed=2,"�"}}(this,y);return b!==void 0?b:this.lastNeed<=y.length?(y.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(y.copy(this.lastChar,g,0,y.length),void(this.lastNeed-=y.length))}function n(y,g){if((y.length-g)%2==0){var b=y.toString("utf16le",g);if(b){var m=b.charCodeAt(b.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",g,y.length-1)}function h(y){var g=y&&y.length?this.write(y):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,b)}return g}function a(y,g){var b=(y.length-g)%3;return b===0?y.toString("base64",g):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",g,y.length-b))}function u(y){var g=y&&y.length?this.write(y):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function f(y){return y.toString(this.encoding)}function v(y){return y&&y.length?this.write(y):""}p.StringDecoder=c,c.prototype.write=function(y){if(y.length===0)return"";var g,b;if(this.lastNeed){if((g=this.fillLast(y))===void 0)return"";b=this.lastNeed,this.lastNeed=0}else b=0;return b<y.length?g?g+this.text(y,b):this.text(y,b):g||""},c.prototype.end=function(y){var g=y&&y.length?this.write(y):"";return this.lastNeed?g+"�":g},c.prototype.text=function(y,g){var b=function(E,F,T){var D=F.length-1;if(D<T)return 0;var I=d(F[D]);return I>=0?(I>0&&(E.lastNeed=I-1),I):--D<T||I===-2?0:(I=d(F[D]))>=0?(I>0&&(E.lastNeed=I-2),I):--D<T||I===-2?0:(I=d(F[D]))>=0?(I>0&&(I===2?I=0:E.lastNeed=I-3),I):0}(this,y,g);if(!this.lastNeed)return y.toString("utf8",g);this.lastTotal=b;var m=y.length-(b-this.lastNeed);return y.copy(this.lastChar,0,m),y.toString("utf8",g,m)},c.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length}},{"safe-buffer":73}],76:[function(r,i,p){var l=r("punycode"),s=r("./util");function c(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}p.parse=F,p.resolve=function(T,D){return F(T,!1,!0).resolve(D)},p.resolveObject=function(T,D){return T?F(T,!1,!0).resolveObject(D):D},p.format=function(T){return s.isString(T)&&(T=F(T)),T instanceof c?T.format():c.prototype.format.call(T)},p.Url=c;var d=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,n=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
34
+ `," "]),a=["'"].concat(h),u=["%","/","?",";","#"].concat(a),f=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=r("querystring");function F(T,D,I){if(T&&s.isObject(T)&&T instanceof c)return T;var Y=new c;return Y.parse(T,D,I),Y}c.prototype.parse=function(T,D,I){if(!s.isString(T))throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var Y=T.indexOf("?"),W=Y!==-1&&Y<T.indexOf("#")?"?":"#",_=T.split(W);_[0]=_[0].replace(/\\/g,"/");var A=T=_.join(W);if(A=A.trim(),!I&&T.split("#").length===1){var C=n.exec(A);if(C)return this.path=A,this.href=A,this.pathname=C[1],C[2]?(this.search=C[2],this.query=D?E.parse(this.search.substr(1)):this.search.substr(1)):D&&(this.search="",this.query={}),this}var B=d.exec(A);if(B){var N=(B=B[0]).toLowerCase();this.protocol=N,A=A.substr(B.length)}if(I||B||A.match(/^\/\/[^@\/]+@[^@\/]+/)){var q=A.substr(0,2)==="//";!q||B&&b[B]||(A=A.substr(2),this.slashes=!0)}if(!b[B]&&(q||B&&!m[B])){for(var X,$,M=-1,j=0;j<f.length;j++)(L=A.indexOf(f[j]))!==-1&&(M===-1||L<M)&&(M=L);for(($=M===-1?A.lastIndexOf("@"):A.lastIndexOf("@",M))!==-1&&(X=A.slice(0,$),A=A.slice($+1),this.auth=decodeURIComponent(X)),M=-1,j=0;j<u.length;j++){var L;(L=A.indexOf(u[j]))!==-1&&(M===-1||L<M)&&(M=L)}M===-1&&(M=A.length),this.host=A.slice(0,M),A=A.slice(M),this.parseHost(),this.hostname=this.hostname||"";var R=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!R)for(var H=this.hostname.split(/\./),V=(j=0,H.length);j<V;j++){var J=H[j];if(J&&!J.match(v)){for(var ie="",ne=0,oe=J.length;ne<oe;ne++)J.charCodeAt(ne)>127?ie+="x":ie+=J[ne];if(!ie.match(v)){var x=H.slice(0,j),w=H.slice(j+1),O=J.match(y);O&&(x.push(O[1]),w.unshift(O[2])),w.length&&(A="/"+w.join(".")+A),this.hostname=x.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname));var K=this.port?":"+this.port:"",Z=this.hostname||"";this.host=Z+K,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),A[0]!=="/"&&(A="/"+A))}if(!g[N])for(j=0,V=a.length;j<V;j++){var ee=a[j];if(A.indexOf(ee)!==-1){var ae=encodeURIComponent(ee);ae===ee&&(ae=escape(ee)),A=A.split(ee).join(ae)}}var z=A.indexOf("#");z!==-1&&(this.hash=A.substr(z),A=A.slice(0,z));var S=A.indexOf("?");if(S!==-1?(this.search=A.substr(S),this.query=A.substr(S+1),D&&(this.query=E.parse(this.query)),A=A.slice(0,S)):D&&(this.search="",this.query={}),A&&(this.pathname=A),m[N]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){K=this.pathname||"";var k=this.search||"";this.path=K+k}return this.href=this.format(),this},c.prototype.format=function(){var T=this.auth||"";T&&(T=(T=encodeURIComponent(T)).replace(/%3A/i,":"),T+="@");var D=this.protocol||"",I=this.pathname||"",Y=this.hash||"",W=!1,_="";this.host?W=T+this.host:this.hostname&&(W=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(W+=":"+this.port)),this.query&&s.isObject(this.query)&&Object.keys(this.query).length&&(_=E.stringify(this.query));var A=this.search||_&&"?"+_||"";return D&&D.substr(-1)!==":"&&(D+=":"),this.slashes||(!D||m[D])&&W!==!1?(W="//"+(W||""),I&&I.charAt(0)!=="/"&&(I="/"+I)):W||(W=""),Y&&Y.charAt(0)!=="#"&&(Y="#"+Y),A&&A.charAt(0)!=="?"&&(A="?"+A),D+W+(I=I.replace(/[?#]/g,function(C){return encodeURIComponent(C)}))+(A=A.replace("#","%23"))+Y},c.prototype.resolve=function(T){return this.resolveObject(F(T,!1,!0)).format()},c.prototype.resolveObject=function(T){if(s.isString(T)){var D=new c;D.parse(T,!1,!0),T=D}for(var I=new c,Y=Object.keys(this),W=0;W<Y.length;W++){var _=Y[W];I[_]=this[_]}if(I.hash=T.hash,T.href==="")return I.href=I.format(),I;if(T.slashes&&!T.protocol){for(var A=Object.keys(T),C=0;C<A.length;C++){var B=A[C];B!=="protocol"&&(I[B]=T[B])}return m[I.protocol]&&I.hostname&&!I.pathname&&(I.path=I.pathname="/"),I.href=I.format(),I}if(T.protocol&&T.protocol!==I.protocol){if(!m[T.protocol]){for(var N=Object.keys(T),q=0;q<N.length;q++){var X=N[q];I[X]=T[X]}return I.href=I.format(),I}if(I.protocol=T.protocol,T.host||b[T.protocol])I.pathname=T.pathname;else{for(var $=(T.pathname||"").split("/");$.length&&!(T.host=$.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),$[0]!==""&&$.unshift(""),$.length<2&&$.unshift(""),I.pathname=$.join("/")}if(I.search=T.search,I.query=T.query,I.host=T.host||"",I.auth=T.auth,I.hostname=T.hostname||T.host,I.port=T.port,I.pathname||I.search){var M=I.pathname||"",j=I.search||"";I.path=M+j}return I.slashes=I.slashes||T.slashes,I.href=I.format(),I}var L=I.pathname&&I.pathname.charAt(0)==="/",R=T.host||T.pathname&&T.pathname.charAt(0)==="/",H=R||L||I.host&&T.pathname,V=H,J=I.pathname&&I.pathname.split("/")||[],ie=($=T.pathname&&T.pathname.split("/")||[],I.protocol&&!m[I.protocol]);if(ie&&(I.hostname="",I.port=null,I.host&&(J[0]===""?J[0]=I.host:J.unshift(I.host)),I.host="",T.protocol&&(T.hostname=null,T.port=null,T.host&&($[0]===""?$[0]=T.host:$.unshift(T.host)),T.host=null),H=H&&($[0]===""||J[0]==="")),R)I.host=T.host||T.host===""?T.host:I.host,I.hostname=T.hostname||T.hostname===""?T.hostname:I.hostname,I.search=T.search,I.query=T.query,J=$;else if($.length)J||(J=[]),J.pop(),J=J.concat($),I.search=T.search,I.query=T.query;else if(!s.isNullOrUndefined(T.search))return ie&&(I.hostname=I.host=J.shift(),(O=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=O.shift(),I.host=I.hostname=O.shift())),I.search=T.search,I.query=T.query,s.isNull(I.pathname)&&s.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.href=I.format(),I;if(!J.length)return I.pathname=null,I.search?I.path="/"+I.search:I.path=null,I.href=I.format(),I;for(var ne=J.slice(-1)[0],oe=(I.host||T.host||J.length>1)&&(ne==="."||ne==="..")||ne==="",x=0,w=J.length;w>=0;w--)(ne=J[w])==="."?J.splice(w,1):ne===".."?(J.splice(w,1),x++):x&&(J.splice(w,1),x--);if(!H&&!V)for(;x--;x)J.unshift("..");!H||J[0]===""||J[0]&&J[0].charAt(0)==="/"||J.unshift(""),oe&&J.join("/").substr(-1)!=="/"&&J.push("");var O,K=J[0]===""||J[0]&&J[0].charAt(0)==="/";return ie&&(I.hostname=I.host=K?"":J.length?J.shift():"",(O=!!(I.host&&I.host.indexOf("@")>0)&&I.host.split("@"))&&(I.auth=O.shift(),I.host=I.hostname=O.shift())),(H=H||I.host&&J.length)&&!K&&J.unshift(""),J.length?I.pathname=J.join("/"):(I.pathname=null,I.path=null),s.isNull(I.pathname)&&s.isNull(I.search)||(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.auth=T.auth||I.auth,I.slashes=I.slashes||T.slashes,I.href=I.format(),I},c.prototype.parseHost=function(){var T=this.host,D=o.exec(T);D&&((D=D[0])!==":"&&(this.port=D.substr(1)),T=T.substr(0,T.length-D.length)),T&&(this.hostname=T)}},{"./util":77,punycode:51,querystring:54}],77:[function(r,i,p){i.exports={isString:function(l){return typeof l=="string"},isObject:function(l){return typeof l=="object"&&l!==null},isNull:function(l){return l===null},isNullOrUndefined:function(l){return l==null}}},{}],78:[function(r,i,p){(function(l){(function(){function s(c){try{if(!l.localStorage)return!1}catch(o){return!1}var d=l.localStorage[c];return d!=null&&String(d).toLowerCase()==="true"}i.exports=function(c,d){if(s("noDeprecation"))return c;var o=!1;return function(){if(!o){if(s("throwDeprecation"))throw new Error(d);s("traceDeprecation")?console.trace(d):console.warn(d),o=!0}return c.apply(this,arguments)}}}).call(this)}).call(this,typeof be!="undefined"?be:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],79:[function(r,i,p){i.exports=function l(s,c){if(s&&c)return l(s)(c);if(typeof s!="function")throw new TypeError("need wrapper function");return Object.keys(s).forEach(function(o){d[o]=s[o]}),d;function d(){for(var o=new Array(arguments.length),n=0;n<o.length;n++)o[n]=arguments[n];var h=s.apply(this,o),a=o[o.length-1];return typeof h=="function"&&h!==a&&Object.keys(a).forEach(function(u){h[u]=a[u]}),h}}},{}],80:[function(r,i,p){i.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},{}],81:[function(r,i,p){i.exports=function(){for(var s={},c=0;c<arguments.length;c++){var d=arguments[c];for(var o in d)l.call(d,o)&&(s[o]=d[o])}return s};var l=Object.prototype.hasOwnProperty},{}],82:[function(r,i,p){i.exports=function(l){l.prototype[Symbol.iterator]=function*(){for(let s=this.head;s;s=s.next)yield s.value}}},{}],83:[function(r,i,p){function l(n){var h=this;if(h instanceof l||(h=new l),h.tail=null,h.head=null,h.length=0,n&&typeof n.forEach=="function")n.forEach(function(f){h.push(f)});else if(arguments.length>0)for(var a=0,u=arguments.length;a<u;a++)h.push(arguments[a]);return h}function s(n,h,a){var u=h===n.head?new o(a,null,h,n):new o(a,h,h.next,n);return u.next===null&&(n.tail=u),u.prev===null&&(n.head=u),n.length++,u}function c(n,h){n.tail=new o(h,n.tail,null,n),n.head||(n.head=n.tail),n.length++}function d(n,h){n.head=new o(h,null,n.head,n),n.tail||(n.tail=n.head),n.length++}function o(n,h,a,u){if(!(this instanceof o))return new o(n,h,a,u);this.list=u,this.value=n,h?(h.next=this,this.prev=h):this.prev=null,a?(a.prev=this,this.next=a):this.next=null}i.exports=l,l.Node=o,l.create=l,l.prototype.removeNode=function(n){if(n.list!==this)throw new Error("removing node which does not belong to this list");var h=n.next,a=n.prev;return h&&(h.prev=a),a&&(a.next=h),n===this.head&&(this.head=h),n===this.tail&&(this.tail=a),n.list.length--,n.next=null,n.prev=null,n.list=null,h},l.prototype.unshiftNode=function(n){if(n!==this.head){n.list&&n.list.removeNode(n);var h=this.head;n.list=this,n.next=h,h&&(h.prev=n),this.head=n,this.tail||(this.tail=n),this.length++}},l.prototype.pushNode=function(n){if(n!==this.tail){n.list&&n.list.removeNode(n);var h=this.tail;n.list=this,n.prev=h,h&&(h.next=n),this.tail=n,this.head||(this.head=n),this.length++}},l.prototype.push=function(){for(var n=0,h=arguments.length;n<h;n++)c(this,arguments[n]);return this.length},l.prototype.unshift=function(){for(var n=0,h=arguments.length;n<h;n++)d(this,arguments[n]);return this.length},l.prototype.pop=function(){if(this.tail){var n=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,n}},l.prototype.shift=function(){if(this.head){var n=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,n}},l.prototype.forEach=function(n,h){h=h||this;for(var a=this.head,u=0;a!==null;u++)n.call(h,a.value,u,this),a=a.next},l.prototype.forEachReverse=function(n,h){h=h||this;for(var a=this.tail,u=this.length-1;a!==null;u--)n.call(h,a.value,u,this),a=a.prev},l.prototype.get=function(n){for(var h=0,a=this.head;a!==null&&h<n;h++)a=a.next;if(h===n&&a!==null)return a.value},l.prototype.getReverse=function(n){for(var h=0,a=this.tail;a!==null&&h<n;h++)a=a.prev;if(h===n&&a!==null)return a.value},l.prototype.map=function(n,h){h=h||this;for(var a=new l,u=this.head;u!==null;)a.push(n.call(h,u.value,this)),u=u.next;return a},l.prototype.mapReverse=function(n,h){h=h||this;for(var a=new l,u=this.tail;u!==null;)a.push(n.call(h,u.value,this)),u=u.prev;return a},l.prototype.reduce=function(n,h){var a,u=this.head;if(arguments.length>1)a=h;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");u=this.head.next,a=this.head.value}for(var f=0;u!==null;f++)a=n(a,u.value,f),u=u.next;return a},l.prototype.reduceReverse=function(n,h){var a,u=this.tail;if(arguments.length>1)a=h;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");u=this.tail.prev,a=this.tail.value}for(var f=this.length-1;u!==null;f--)a=n(a,u.value,f),u=u.prev;return a},l.prototype.toArray=function(){for(var n=new Array(this.length),h=0,a=this.head;a!==null;h++)n[h]=a.value,a=a.next;return n},l.prototype.toArrayReverse=function(){for(var n=new Array(this.length),h=0,a=this.tail;a!==null;h++)n[h]=a.value,a=a.prev;return n},l.prototype.slice=function(n,h){(h=h||this.length)<0&&(h+=this.length),(n=n||0)<0&&(n+=this.length);var a=new l;if(h<n||h<0)return a;n<0&&(n=0),h>this.length&&(h=this.length);for(var u=0,f=this.head;f!==null&&u<n;u++)f=f.next;for(;f!==null&&u<h;u++,f=f.next)a.push(f.value);return a},l.prototype.sliceReverse=function(n,h){(h=h||this.length)<0&&(h+=this.length),(n=n||0)<0&&(n+=this.length);var a=new l;if(h<n||h<0)return a;n<0&&(n=0),h>this.length&&(h=this.length);for(var u=this.length,f=this.tail;f!==null&&u>h;u--)f=f.prev;for(;f!==null&&u>n;u--,f=f.prev)a.push(f.value);return a},l.prototype.splice=function(n,h,...a){n>this.length&&(n=this.length-1),n<0&&(n=this.length+n);for(var u=0,f=this.head;f!==null&&u<n;u++)f=f.next;var v=[];for(u=0;f&&u<h;u++)v.push(f.value),f=this.removeNode(f);for(f===null&&(f=this.tail),f!==this.head&&f!==this.tail&&(f=f.prev),u=0;u<a.length;u++)f=s(this,f,a[u]);return v},l.prototype.reverse=function(){for(var n=this.head,h=this.tail,a=n;a!==null;a=a.prev){var u=a.prev;a.prev=a.next,a.next=u}return this.head=h,this.tail=n,this};try{r("./iterator.js")(l)}catch(n){}},{"./iterator.js":82}]},{},[12])(12)})})(bd);function wd(e,t){var s,c;let r=t.payload.topicName,i=t.payload.message,p=t.payload.notifyTime,l=`<div style="padding:0px 12px 0px 0px;width:300px;">
35
+ <div style="display:flex;height: 20px;justify-content: space-between">
36
+ <div style="color: #000000d9;
37
+ font-size: 14px;
38
+ font-weight: 700;">${r}</div><div style="color: #00000073;">${Ed(p)}</div>
39
+ </div>
40
+ <span>${i}</span>
41
+ </div>`;e.message({content:l,duration:0,closeBtn:!0,placement:"right",height:75}),(s=t.payload.detail)!=null&&s.alarmConfigId&&_d(e,(c=t.payload.detail)==null?void 0:c.alarmConfigId)}globalThis.doWarning=wd;function Ed(e){const t=new Date(e),r=t.getFullYear(),i=(t.getMonth()+1+"").padStart(2,"0"),p=(t.getDate()+"").padStart(2,"0"),l=(t.getHours()+"").padStart(2,"0"),s=(t.getMinutes()+"").padStart(2,"0"),c=(t.getSeconds()+"").padStart(2,"0");return r+"-"+i+"-"+p+" "+l+":"+s+":"+c}function _d(e,t){return Qe(this,null,function*(){const r=yield fetch(`/api/alarm/config/${t}`,{headers:{"X-Access-Token":localStorage.getItem("X-Access-Token")||new URLSearchParams(location.search).get("X-Access-Token")||"","Content-Type":"application/json"},method:"GET"});if(r.ok){let i=yield r.json();i.result.media&&X0(e,i.result.media,i.result.playTimes)}})}function X0(e,t,r){if(e.store.globalAudio||(e.store.globalAudio=document.createElement("audio")),e.store.globalAudio.src=t,e.store.globalAudio.play(),r===-1)e.store.globalAudio.loop=!0;else{e.store.globalAudio.loop=!1;let i=0;e.store.globalAudio.onended=()=>{i++,i<r&&e.store.globalAudio.play()}}}globalThis.createAudio=X0;const Ad="original_meta2d";function Cd(){return localStorage.removeItem(Ad)}let kr={};const Sd=e=>{const t=document.querySelectorAll("video");let r=null;if(t.forEach(p=>{p.getAttribute("src")===e.video&&(r=p)}),!r)return;r.setAttribute("muted","muted"),r.setAttribute("autoplay","autoplay"),r.setAttribute("loop","loop"),r.setAttribute("crossorigin",""),r.setAttribute("controls",""),r.style.display="none",r.parentElement.style.border="2px solid #ffc878";const i=new JessibucaPro({container:r.parentElement,background:"",hasControl:!1,controlAutoHide:!0,checkFirstIFrame:!0,debug:!1,decoder:"./wasm/decoder-pro.js",forceNoOffscreen:!0,hotKey:!1,hasAudio:!1,hasVideo:!0,hiddenAutoPause:!1,isFlv:!0,isResize:!1,isNotMute:!0,loadingIcon:!0,loadingText:"加载中...",networkDelayTimeoutReplay:!1,playbackForwardMaxRateDecodeIFrame:8,showBandwidth:!1,showPerformance:!1,syncAudioAndVideo:!0,supportDblclickFullscreen:!1,timeout:10,useMSE:!0,useWCS:!1,useSIMD:!0,useVideoRender:!0,useCanvasRender:!1,videoBuffer:.2,videoBufferDelay:1});return e.autoPlay&&e.streamUrl&&i.play(e.streamUrl),kr[e.id]=i,i},Bd=()=>{Object.keys(kr).forEach(e=>{kr[e].destroy(),kr[e]=null}),kr={}},Z0=(e,t)=>{const r=e.__vccOpts||e;for(const[i,p]of t)r[i]=p;return r},kd=Z0(Object.assign({name:"Meta2dEditor"},{__name:"index",props:{url:{type:String,default:""},data:{type:Object,default:()=>{}},local:{type:Boolean,default:!1},preview:{type:Boolean,default:!1}},emits:["loaded"],setup(e,{expose:t,emit:r}){const i=r,p=e,l=pe.ref(null),s=pe.shallowRef(),c=pe.computed(()=>!!(p.data||p.url));pe.watch(()=>[p.data,p.url],()=>{c.value&&d()});function d(){return Qe(this,null,function*(){try{if(yield pe.nextTick(),!l.value){console.error("未找到meta2d元素!");return}let y=null;if(p.data?y=p.data:p.url&&(y=yield f()),!y||!y.data){console.log("图纸数据为空");return}const g=y.options||{background:"#eee",disableAnchor:!1};if(s.value&&(s.value.destroy(!0),s.value=null),!l.value){console.error("Meta2D 容器元素不可用");return}s.value=new Ae.Meta2d(l.value,he({},g)),g.visibleLevel&&s.value.scale(g.visibleLevel),o(),n(),yield h(y.data),s.value.render(),a(),setTimeout(()=>{window!=null&&window.meta2dTools&&(window==null||window.registerToolsNew())},1e3),i("loaded",s.value)}catch(y){console.error("初始化编辑器失败:",y),we.ElMessage.error("初始化编辑器失败")}})}function o(){if(!s.value)return;new xd({}).initPlugin(s.value,"mindNode",{})}function n(){Ae.register(nt.classPens()),Ae.register(ur.flowPens()),Ae.registerAnchors(ur.flowAnchors()),Ae.register(lt.sequencePens()),Ae.registerCanvasDraw(lt.sequencePensbyCtx()),Ae.register(To.activityDiagram()),Ae.registerCanvasDraw(To.activityDiagramByCtx()),Ae.registerCanvasDraw(Ne.formPens()),Ae.registerCanvasDraw(Ir.chartsPens()),Ae.register(cr.ftaPens()),Ae.registerAnchors(cr.ftaAnchors()),Ae.registerCanvasDraw(cr.ftaPensbyCtx())}function h(y){var g,b;if(s.value){if(typeof y.locked=="undefined"&&(y.locked=0),y.bkImage&&s.value.setBackgroundImage(y.bkImage),y.pens&&y.pens.length>0){const m=y.pens.filter(T=>T.name==="video"&&T.streamUrl);m.length>0&&setTimeout(()=>{m.forEach(T=>{Sd(T)})},500);const E=((b=(g=window==null?void 0:window.meta)==null?void 0:g.graph)==null?void 0:b.penCountThreshold)||2e3;y.pens.length>E&&y.scale&&y.pens.forEach(T=>{const D=T.visibleLevel;D!==void 0?(T.visible=y.scale>=D,T.visible||(T.disabled=!0,T.locked=Ae.LockState.Disable)):(T.visible=!0,T.disabled=!1,T.locked=Ae.LockState.None)})}s.value.open(y)}}function a(){s.value&&s.value.on("scale",u)}const u=Oe.debounce(y=>{var g,b,m,E,F,T;try{if(!s.value)return;Ei.emit("graph-scale",y);let D=s.value.store.data.pens;const I=((b=(g=window==null?void 0:window.meta)==null?void 0:g.graph)==null?void 0:b.penCountThreshold)||2e3,Y=D.length>I;for(let W=0;W<D.length;W++){const _=D[W];if([ke.VIDEO_STREAM,ke.MP4].includes(_.penType)){if(((E=(m=ar[_.id])==null?void 0:m.children)==null?void 0:E.length)===3){let A=ar[_.id].children[0],C=ar[_.id].children[2];A.style.width=C.currentTime/C.duration*_.calculative.worldRect.width+"px"}else if(((T=(F=ar[_.id])==null?void 0:F.children)==null?void 0:T.length)===2){let A=ar[_.id].children[0],C=ar[_.id].children[1];A.style.width=C.currentTime/C.duration*_.calculative.worldRect.width+"px"}}if(Y){const A=_.visibleLevel!==void 0?y>=_.visibleLevel:!0;s.value._setValue({id:_.id,visible:A,disabled:!A,locked:A?Ae.LockState.None:Ae.LockState.Disable})}}s.value.render()}catch(D){console.error("处理缩放失败:",D)}},500);function f(){return Qe(this,null,function*(){return p.url?(yield wi.getGraphApi(p.url,{local:p.local}))||null:(we.ElMessage.error("图纸路径为空!"),null)})}const v=()=>{s.value&&s.value.resize()};return pe.onMounted(()=>{c.value&&d(),window.document.addEventListener("resize",v)}),pe.onUnmounted(()=>{Bd(),Cd(),s.value&&(p.preview?(Ke.clearLineCross(),s.value.destroy(!0)):s.value.off("scale",u)),window.document.removeEventListener("resize",v)}),t({stage:s}),(y,g)=>(pe.openBlock(),pe.createElementBlock("div",{ref_key:"meta2dRef",ref:l,class:"meta2d-editor"},null,512))}}),[["__scopeId","data-v-3657c9a7"]]),Td={class:"preview-container"},Fd={key:0,class:"back-btn"},Tr=Z0(Object.assign({name:"Meta2dPreview"},{__name:"index",props:{url:{type:String,default:""},gid:{type:String,default:""},data:{type:Object,default:null},local:{type:Boolean,default:!1},isInitData:{type:Boolean,default:!0},config:{type:Object,default:()=>({socketUrl:bs,stationIdKey:T0,userTokenKey:k0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,enableWebSocket:!0,graphSocket:ds.GRAPH.SOCKET})},showMap:{type:Boolean,default:!1},isFactory:{type:Boolean,default:!1},apiInstance:{type:Object,default:()=>wi},mittInstance:{type:Object,default:()=>Ei},customCallbacks:{type:Object,default:()=>({})},errorHandler:{type:Object,default:()=>({callback:null,showMessage:!0})}},emits:["error","loaded","custom-msg","socket-msg"],setup(e,{expose:t,emit:r}){const i=r,p=e;let l=pe.ref(!1),s=pe.ref(""),c=pe.ref(!1);const d=pe.ref(null),o=pe.ref(""),n=pe.ref(!1),h=pe.computed(()=>{var B;return(B=d.value)==null?void 0:B.stage}),a=pe.computed(()=>{var B;return(B=h.value)==null?void 0:B.store}),u=pe.computed(()=>he({socketUrl:bs,stationIdKey:T0,userTokenKey:k0,messageDelay:200,debounceDelay:100,enableAutoFit:!0,fitPadding:10,enableWebSocket:!0,graphSocket:ds.GRAPH.SOCKET},p.config)),f=()=>p.apiInstance||wi,v=()=>p.mittInstance||Ei,y=(B,N="")=>{const q={error:B,message:N,timestamp:new Date().toISOString()};i("error",q),p.errorHandler.callback?p.errorHandler.callback(q):p.errorHandler.showMessage&&we.ElMessage&&we.ElMessage.error(`${N}: ${B.message||B}`)},g=()=>{s.value&&(o.value=s.value,n.value=c.value)},b=B=>{var N,q,X,$,M;try{if(!B)return;if(B.includes("token 必传"))return we.ElMessage.warning(B);const j=typeof B=="string"?JSON.parse(B):B;if((j==null?void 0:j.data)==="服务错误"||(q=(N=j==null?void 0:j.data)==null?void 0:N.includes)!=null&&q.call(N,"token is expired"))return we.ElMessage.warning(j.data);switch(i("socket-msg",j),j.action){case ys.ACPOINT.YCVALUE:case ys.ACPOINT.YXVALUE:if((X=j==null?void 0:j.data)!=null&&X.point_id){const L=h.value.find(j.data.point_id);L&&_(L,j.data)}break;default:if((($=j.data)==null?void 0:$.length)>0){const L=setTimeout(()=>{clearTimeout(L),h.value&&j.data.forEach(R=>{const H=h.value.find(R.dataId||R.point_id);_(H,R)})},u.value.messageDelay);p.customCallbacks.onWebSocketMessage&&p.customCallbacks.onWebSocketMessage(j),(M=window.customSocketFn)==null||M.call(window,B)}break}return!0}catch(j){return y(j,"WebSocket消息处理"),!0}},m=B=>Qe(this,null,function*(){var N;try{if(B.params){const q=JSON.parse(B.params);switch(q.action){case ct.CHANGE_GRAPH:(q==null?void 0:q.data)!=="图纸id"?(s.value=o.value,c.value=n.value,l.value=q.isBack,(N=q==null?void 0:q.data)!=null&&N.startsWith("/")?(o.value=q==null?void 0:q.data,n.value=!0):(n.value=!1,F(q.data))):console.warn("切换图纸信息为空");break;case ct.NOTIFY_DIALOG:q.msg!=="通知内容"?we.ElNotification(he({message:q.msg},q)):console.warn("通知内容为空");break}}i("custom-msg",B),p.customCallbacks.onCustomMessage&&p.customCallbacks.onCustomMessage(B)}catch(q){y(q,"自定义消息处理")}}),E=B=>{var N,q;try{i("loaded",B);const X=D(),$=u.value,M=B0.getSession($.stationIdKey),j=B0.getSession($.userTokenKey);!((q=(N=B.store)==null?void 0:N.data)!=null&&q.websocket)&&$.enableWebSocket&&M&&j&&(B.store.data.websocket=`${$.socketUrl}?station_id=${M}`,B.store.data.websocketProtocols=j,B.connectWebsocket()),(p.showMap||X.showMap==="true")&&B.showMap(),B.setRule({rule:!1}),B.setOptions({disableRuleLine:!0}),B.setGrid({grid:!1}),B.lock(Ae.LockState.DisableEdit),W().forEach(R=>{var H;(H=R==null?void 0:R.events)!=null&&H.length?I({id:R.id,locked:1},!1):I({id:R.id,locked:10},!1)}),B.render(),$.enableAutoFit&&B.fitView(!0,$.fitPadding),Object.values(ct).forEach(R=>{B.on(R,m)}),B&&(B.socketFn=b),p.customCallbacks.onStageLoaded&&p.customCallbacks.onStageLoaded(B),p.isInitData&&T(B)}catch(X){y(X,"图纸加载完成处理")}},F=B=>Qe(this,null,function*(){var N;try{if(p.url){o.value=p.url,n.value=p.local;return}const q=D();if(B=B||p.gid||q.id,q.local==="true"&&(n.value=!0),B){const X=f();if(X&&X.getCommonApi){const $=yield X.getCommonApi(p.isFactory?"graph":"floorplan",{guid:B});if((N=$.data)!=null&&N.length)o.value=$.data[0].path,p.customCallbacks.onGraphLoaded&&p.customCallbacks.onGraphLoaded(o.value);else{const M="未找到图纸!";y(new Error(M),"获取图纸数据")}}else y(new Error("API实例不可用"),"初始化图纸数据!")}else o.value=p.url,n.value=p.local}catch(q){y(q,"获取图纸数据失败")}}),T=B=>Qe(this,null,function*(){var N,q,X;if(B){let $=[],M=[],j=[];const L=B.store.data.pens;for(let R=0;R<L.length;R++){const H=L[R];H.bindDataId&&(N=H.form)!=null&&N.length&&H.form.forEach(V=>{if(V.dataIds.dataId)switch(V.dataIds.dataType){case gi.YC:$.push(De(he({},V),{nodeName:V.dataIds.name,penId:H.id,penName:H.penName}));break;case gi.YX:M.push(De(he({},V),{nodeName:V.dataIds.name,penId:H.id,penName:H.penName}));break;case gi.POINT:j.push(De(he({},V),{nodeName:V.dataIds.name,penId:H.id,penName:H.penName}));break}})}if($.length){const R=f();if(R&&R.postScadaApi){const H=yield R.postScadaApi("commonYcQuery",{guid_list:$.map(V=>{var J;return(J=V==null?void 0:V.dataIds)==null?void 0:J.dataId}),limit:1});(q=H==null?void 0:H.data)!=null&&q.length&&H.data.forEach(V=>{const J=B.find(V.guid);_(J,De(he({},V),{value:V.value,value_disp:V.value_disp,alarm_value:V.alarm_value,point_id:V.guid}))})}}if(M.length){const R=f();if(R&&R.postScadaApi){const H=yield R.postScadaApi("commonYxQuery",{guid_list:M.map(V=>{var J;return(J=V==null?void 0:V.dataIds)==null?void 0:J.dataId}),limit:1});(X=H==null?void 0:H.data)!=null&&X.length&&H.data.forEach(V=>{const J=B.find(V.guid);_(J,De(he({},V),{value:V.value,value_disp:V.value_disp,alarm_value:V.alarm_value,point_id:V.guid}))})}}}}),D=()=>{var X;const B={},N=((X=window.location.href.split("?"))==null?void 0:X[1])||"",q=new URLSearchParams(N);for(const[$,M]of q.entries())B[$]=M;return B},I=(B,N=!0)=>{if(h.value)return h.value.setValue(B,{render:N})},Y=()=>h.value,W=()=>{var B,N;return((N=(B=a.value)==null?void 0:B.data)==null?void 0:N.pens)||[]},_=(()=>{let B=null;const N=new Map,q=new Map,X=M=>{var L;if(!((L=M.children)!=null&&L.length))return[];const j=M.id||"";if(!j)return[];if(!q.has(j)&&a.value){const R=Ae.getAllChildren(M,a.value);q.set(j,R)}return q.get(j)||[]},$=()=>{if(N.size===0||!h.value||!a.value)return;const M=[],j=[],L=a.value.animates;N.forEach(({pen:R,dataItem:H,formKey:V})=>{switch(V){case"showChild":I({id:R.id,showChild:H.value},!1);break;case"text":I({id:R.id,text:H.value_disp},!1);break;case"light_plate":{const J=H.value===-1||ws(H)?"#999999":I0[H.value!==void 0?H.value:H.alarm_value],ie=H.value===-1||ws(H)?"#cccccc":D0[H.value!==void 0?H.value:H.alarm_value];I({id:R.id,textColor:J,background:ie},!1)}break;case"point_value":R.penType===ke.POINT_VALUE&&X(R).forEach(ie=>{ie.name==="text"&&I({id:ie.id,text:H.value},!1)});break;case"online_state":{let J=H.value?void 0:"contrast(0%)";I({id:R.id,filter:J},!1),X(R).forEach(ne=>{I({id:ne.id,filter:J},!1)})}break;case"charged_state":{const J=H.value===Nh.OFFLINE?"contrast(0%)":void 0;J!==R.filter&&(I({id:R.id,filter:J},!1),X(R).forEach(ne=>{I({id:ne.id,filter:J},!1)}))}break;case"electric_direction":H.value===Lh.STOP?L!=null&&L.has(R)&&j.push(R):!!H.value!==R.animateReverse&&(I({id:R.id,animateReverse:!!H.value},!1),L!=null&&L.has(R)||M.push(R));break;case"electric_size":{const J=Uh[H.value];J!==void 0&&J!==R.lineWidth&&I({id:R.id,lineWidth:J},!1)}break;default:I({id:R.id,[V]:H.value},!1);break}}),j.length>0&&h.value.stopAnimate(j),M.length>0&&h.value.startAnimate(M),N.clear(),h.value.render()};return(M,j)=>{M!=null&&M.length&&(M.forEach(L=>{const R=L.form;R!=null&&R.length&&R.forEach(H=>{if(!(Array.isArray(H.dataIds)?H.dataIds:[H.dataIds]).some(ne=>(ne==null?void 0:ne.dataId)===j.dataId||(ne==null?void 0:ne.dataId)===j.point_id))return;const ie=`${L.id}-${H.key}`;N.set(ie,{pen:L,dataItem:j,formKey:H.key})})}),B&&clearTimeout(B),B=setTimeout(()=>{$(),B=null},u.value.debounceDelay))}})(),A=B=>{if(h.value){for(let N=0;N<B.length;N++){const q=B[N],X=h.value.find(q.dataId);_(X,q)}h.value.render(),p.customCallbacks.onBatchUpdate&&p.customCallbacks.onBatchUpdate(B)}},C=(B,N=!1)=>{if(!h.value)return;const q=W();for(let X=0;X<q.length;X++){const $=q[X];let M=!1;N?M=B===$.dataProp:M=B===5?!0:$.dataProp<=B,I({id:$.id,visible:M},!1)}h.value.fitView(),h.value.render(),p.customCallbacks.onLevelChange&&p.customCallbacks.onLevelChange(B,N)};return pe.watch(()=>[p.url,p.isFactory,p.local,p.data,p.gid],()=>{F()}),pe.watch(()=>p.showMap,()=>{h.value&&h.value.showMap()}),pe.onMounted(()=>{const B=v();B&&B.on&&B.on(u.value.graphSocket,b),F()}),pe.onUnmounted(()=>{const B=v();B&&B.off&&B.off(u.value.graphSocket,b)}),t({setValue:I,getStage:Y,getAllPens:W,batchUpdatePen:A,handleLineCross:Ke.handleLineCross,changeVisibleByLevel:C}),(B,N)=>(pe.openBlock(),pe.createElementBlock("div",Td,[pe.createVNode(kd,{ref_key:"graphRef",ref:d,url:o.value,local:n.value,data:p.data,preview:"",onLoaded:E},null,8,["url","local","data"]),pe.unref(l)?(pe.openBlock(),pe.createElementBlock("div",Fd,[pe.createVNode(pe.unref(we.ElButton),{type:"primary",onClick:g},{default:pe.withCtx(()=>[...N[0]||(N[0]=[pe.createTextVNode("返回",-1)])]),_:1})])):pe.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-ca3fd052"]]);Tr.name||(Tr.name="SyGraph");const Dd={install:e=>{e.component(Tr.name||"SyGraph",Tr)}};ge.SyGraph=Tr,ge.default=Dd,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});