@paimaexample/explorer 0.3.116 → 0.3.117
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.
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var $4=Object.defineProperty;var m2=e=>{throw TypeError(e)};var q4=(e,t,n)=>t in e?$4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rt=(e,t,n)=>q4(e,typeof t!="symbol"?t+"":t,n),Xg=(e,t,n)=>t.has(e)||m2("Cannot "+n);var Ae=(e,t,n)=>(Xg(e,t,"read from private field"),n?n.call(e):t.get(e)),Et=(e,t,n)=>t.has(e)?m2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ht=(e,t,n,o)=>(Xg(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),We=(e,t,n)=>(Xg(e,t,"access private method"),n);var Nh=(e,t,n,o)=>({set _(s){ht(e,t,s,n)},get _(){return Ae(e,t,o)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(s){if(s.ep)return;s.ep=!0;const u=n(s);fetch(s.href,u)}})();var Jc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zg={exports:{}},Zl={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var b2;function H4(){if(b2)return Zl;b2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,s,u){var l=null;if(u!==void 0&&(l=""+u),s.key!==void 0&&(l=""+s.key),"key"in s){u={};for(var c in s)c!=="key"&&(u[c]=s[c])}else u=s;return s=u.ref,{$$typeof:e,type:o,key:l,ref:s!==void 0?s:null,props:u}}return Zl.Fragment=t,Zl.jsx=n,Zl.jsxs=n,Zl}var A2;function Q4(){return A2||(A2=1,Zg.exports=H4()),Zg.exports}var _e=Q4(),Jg={exports:{}},em={},Jl={},v2;function G4(){if(v2)return Jl;v2=1,Jl.byteLength=c,Jl.toByteArray=f,Jl.fromByteArray=g;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)e[s]=o[s],t[o.charCodeAt(s)]=s;t[45]=62,t[95]=63;function l(b){var w=b.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var B=b.indexOf("=");B===-1&&(B=w);var _=B===w?0:4-B%4;return[B,_]}function c(b){var w=l(b),B=w[0],_=w[1];return(B+_)*3/4-_}function h(b,w,B){return(w+B)*3/4-B}function f(b){var w,B=l(b),_=B[0],M=B[1],A=new n(h(b,_,M)),I=0,R=M>0?_-4:_,T;for(T=0;T<R;T+=4)w=t[b.charCodeAt(T)]<<18|t[b.charCodeAt(T+1)]<<12|t[b.charCodeAt(T+2)]<<6|t[b.charCodeAt(T+3)],A[I++]=w>>16&255,A[I++]=w>>8&255,A[I++]=w&255;return M===2&&(w=t[b.charCodeAt(T)]<<2|t[b.charCodeAt(T+1)]>>4,A[I++]=w&255),M===1&&(w=t[b.charCodeAt(T)]<<10|t[b.charCodeAt(T+1)]<<4|t[b.charCodeAt(T+2)]>>2,A[I++]=w>>8&255,A[I++]=w&255),A}function p(b){return e[b>>18&63]+e[b>>12&63]+e[b>>6&63]+e[b&63]}function y(b,w,B){for(var _,M=[],A=w;A<B;A+=3)_=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),M.push(p(_));return M.join("")}function g(b){for(var w,B=b.length,_=B%3,M=[],A=16383,I=0,R=B-_;I<R;I+=A)M.push(y(b,I,I+A>R?R:I+A));return _===1?(w=b[B-1],M.push(e[w>>2]+e[w<<4&63]+"==")):_===2&&(w=(b[B-2]<<8)+b[B-1],M.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),M.join("")}return Jl}var Ph={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var w2;function K4(){return w2||(w2=1,Ph.read=function(e,t,n,o,s){var u,l,c=s*8-o-1,h=(1<<c)-1,f=h>>1,p=-7,y=n?s-1:0,g=n?-1:1,b=e[t+y];for(y+=g,u=b&(1<<-p)-1,b>>=-p,p+=c;p>0;u=u*256+e[t+y],y+=g,p-=8);for(l=u&(1<<-p)-1,u>>=-p,p+=o;p>0;l=l*256+e[t+y],y+=g,p-=8);if(u===0)u=1-f;else{if(u===h)return l?NaN:(b?-1:1)*(1/0);l=l+Math.pow(2,o),u=u-f}return(b?-1:1)*l*Math.pow(2,u-o)},Ph.write=function(e,t,n,o,s,u){var l,c,h,f=u*8-s-1,p=(1<<f)-1,y=p>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:u-1,w=o?1:-1,B=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,l=p):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+y>=1?t+=g/h:t+=g*Math.pow(2,1-y),t*h>=2&&(l++,h/=2),l+y>=p?(c=0,l=p):l+y>=1?(c=(t*h-1)*Math.pow(2,s),l=l+y):(c=t*Math.pow(2,y-1)*Math.pow(2,s),l=0));s>=8;e[n+b]=c&255,b+=w,c/=256,s-=8);for(l=l<<s|c,f+=s;f>0;e[n+b]=l&255,b+=w,l/=256,f-=8);e[n+b-w]|=B*128}),Ph}/*!
|
|
10
|
+
* The buffer module from node.js, for the browser.
|
|
11
|
+
*
|
|
12
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
+
* @license MIT
|
|
14
|
+
*/var x2;function Y4(){return x2||(x2=1,(function(e){var t=G4(),n=K4(),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;var s=2147483647;e.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=u(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&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 u(){try{var S=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(S,v),S.foo()===42}catch{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 l(S){if(S>s)throw new RangeError('The value "'+S+'" is invalid for option "size"');var v=new Uint8Array(S);return Object.setPrototypeOf(v,c.prototype),v}function c(S,v,C){if(typeof S=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(S)}return h(S,v,C)}c.poolSize=8192;function h(S,v,C){if(typeof S=="string")return g(S,v);if(ArrayBuffer.isView(S))return w(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(se(S,ArrayBuffer)||S&&se(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(S,SharedArrayBuffer)||S&&se(S.buffer,SharedArrayBuffer)))return B(S,v,C);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var N=S.valueOf&&S.valueOf();if(N!=null&&N!==S)return c.from(N,v,C);var he=_(S);if(he)return he;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return c.from(S[Symbol.toPrimitive]("string"),v,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}c.from=function(S,v,C){return h(S,v,C)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function p(S,v,C){return f(S),S<=0?l(S):v!==void 0?typeof C=="string"?l(S).fill(v,C):l(S).fill(v):l(S)}c.alloc=function(S,v,C){return p(S,v,C)};function y(S){return f(S),l(S<0?0:M(S)|0)}c.allocUnsafe=function(S){return y(S)},c.allocUnsafeSlow=function(S){return y(S)};function g(S,v){if((typeof v!="string"||v==="")&&(v="utf8"),!c.isEncoding(v))throw new TypeError("Unknown encoding: "+v);var C=I(S,v)|0,N=l(C),he=N.write(S,v);return he!==C&&(N=N.slice(0,he)),N}function b(S){for(var v=S.length<0?0:M(S.length)|0,C=l(v),N=0;N<v;N+=1)C[N]=S[N]&255;return C}function w(S){if(se(S,Uint8Array)){var v=new Uint8Array(S);return B(v.buffer,v.byteOffset,v.byteLength)}return b(S)}function B(S,v,C){if(v<0||S.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<v+(C||0))throw new RangeError('"length" is outside of buffer bounds');var N;return v===void 0&&C===void 0?N=new Uint8Array(S):C===void 0?N=new Uint8Array(S,v):N=new Uint8Array(S,v,C),Object.setPrototypeOf(N,c.prototype),N}function _(S){if(c.isBuffer(S)){var v=M(S.length)|0,C=l(v);return C.length===0||S.copy(C,0,0,v),C}if(S.length!==void 0)return typeof S.length!="number"||ye(S.length)?l(0):b(S);if(S.type==="Buffer"&&Array.isArray(S.data))return b(S.data)}function M(S){if(S>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return S|0}function A(S){return+S!=S&&(S=0),c.alloc(+S)}c.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==c.prototype},c.compare=function(v,C){if(se(v,Uint8Array)&&(v=c.from(v,v.offset,v.byteLength)),se(C,Uint8Array)&&(C=c.from(C,C.offset,C.byteLength)),!c.isBuffer(v)||!c.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===C)return 0;for(var N=v.length,he=C.length,ce=0,Ee=Math.min(N,he);ce<Ee;++ce)if(v[ce]!==C[ce]){N=v[ce],he=C[ce];break}return N<he?-1:he<N?1:0},c.isEncoding=function(v){switch(String(v).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(v,C){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return c.alloc(0);var N;if(C===void 0)for(C=0,N=0;N<v.length;++N)C+=v[N].length;var he=c.allocUnsafe(C),ce=0;for(N=0;N<v.length;++N){var Ee=v[N];if(se(Ee,Uint8Array))ce+Ee.length>he.length?c.from(Ee).copy(he,ce):Uint8Array.prototype.set.call(he,Ee,ce);else if(c.isBuffer(Ee))Ee.copy(he,ce);else throw new TypeError('"list" argument must be an Array of Buffers');ce+=Ee.length}return he};function I(S,v){if(c.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||se(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);var C=S.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&C===0)return 0;for(var he=!1;;)switch(v){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return ne(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return q(S).length;default:if(he)return N?-1:ne(S).length;v=(""+v).toLowerCase(),he=!0}}c.byteLength=I;function R(S,v,C){var N=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,v>>>=0,C<=v))return"";for(S||(S="utf8");;)switch(S){case"hex":return ue(this,v,C);case"utf8":case"utf-8":return le(this,v,C);case"ascii":return te(this,v,C);case"latin1":case"binary":return pe(this,v,C);case"base64":return re(this,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,v,C);default:if(N)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),N=!0}}c.prototype._isBuffer=!0;function T(S,v,C){var N=S[v];S[v]=S[C],S[C]=N}c.prototype.swap16=function(){var v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var C=0;C<v;C+=2)T(this,C,C+1);return this},c.prototype.swap32=function(){var v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var C=0;C<v;C+=4)T(this,C,C+3),T(this,C+1,C+2);return this},c.prototype.swap64=function(){var v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var C=0;C<v;C+=8)T(this,C,C+7),T(this,C+1,C+6),T(this,C+2,C+5),T(this,C+3,C+4);return this},c.prototype.toString=function(){var v=this.length;return v===0?"":arguments.length===0?le(this,0,v):R.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(v){if(!c.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:c.compare(this,v)===0},c.prototype.inspect=function(){var v="",C=e.INSPECT_MAX_BYTES;return v=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(v+=" ... "),"<Buffer "+v+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(v,C,N,he,ce){if(se(v,Uint8Array)&&(v=c.from(v,v.offset,v.byteLength)),!c.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(C===void 0&&(C=0),N===void 0&&(N=v?v.length:0),he===void 0&&(he=0),ce===void 0&&(ce=this.length),C<0||N>v.length||he<0||ce>this.length)throw new RangeError("out of range index");if(he>=ce&&C>=N)return 0;if(he>=ce)return-1;if(C>=N)return 1;if(C>>>=0,N>>>=0,he>>>=0,ce>>>=0,this===v)return 0;for(var Ee=ce-he,Te=N-C,de=Math.min(Ee,Te),we=this.slice(he,ce),x=v.slice(C,N),O=0;O<de;++O)if(we[O]!==x[O]){Ee=we[O],Te=x[O];break}return Ee<Te?-1:Te<Ee?1:0};function $(S,v,C,N,he){if(S.length===0)return-1;if(typeof C=="string"?(N=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,ye(C)&&(C=he?0:S.length-1),C<0&&(C=S.length+C),C>=S.length){if(he)return-1;C=S.length-1}else if(C<0)if(he)C=0;else return-1;if(typeof v=="string"&&(v=c.from(v,N)),c.isBuffer(v))return v.length===0?-1:k(S,v,C,N,he);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(S,v,C):Uint8Array.prototype.lastIndexOf.call(S,v,C):k(S,[v],C,N,he);throw new TypeError("val must be string, number or Buffer")}function k(S,v,C,N,he){var ce=1,Ee=S.length,Te=v.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(S.length<2||v.length<2)return-1;ce=2,Ee/=2,Te/=2,C/=2}function de(ie,me){return ce===1?ie[me]:ie.readUInt16BE(me*ce)}var we;if(he){var x=-1;for(we=C;we<Ee;we++)if(de(S,we)===de(v,x===-1?0:we-x)){if(x===-1&&(x=we),we-x+1===Te)return x*ce}else x!==-1&&(we-=we-x),x=-1}else for(C+Te>Ee&&(C=Ee-Te),we=C;we>=0;we--){for(var O=!0,D=0;D<Te;D++)if(de(S,we+D)!==de(v,D)){O=!1;break}if(O)return we}return-1}c.prototype.includes=function(v,C,N){return this.indexOf(v,C,N)!==-1},c.prototype.indexOf=function(v,C,N){return $(this,v,C,N,!0)},c.prototype.lastIndexOf=function(v,C,N){return $(this,v,C,N,!1)};function L(S,v,C,N){C=Number(C)||0;var he=S.length-C;N?(N=Number(N),N>he&&(N=he)):N=he;var ce=v.length;N>ce/2&&(N=ce/2);for(var Ee=0;Ee<N;++Ee){var Te=parseInt(v.substr(Ee*2,2),16);if(ye(Te))return Ee;S[C+Ee]=Te}return Ee}function U(S,v,C,N){return Y(ne(v,S.length-C),S,C,N)}function j(S,v,C,N){return Y(Z(v),S,C,N)}function Q(S,v,C,N){return Y(q(v),S,C,N)}function P(S,v,C,N){return Y(F(v,S.length-C),S,C,N)}c.prototype.write=function(v,C,N,he){if(C===void 0)he="utf8",N=this.length,C=0;else if(N===void 0&&typeof C=="string")he=C,N=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(N)?(N=N>>>0,he===void 0&&(he="utf8")):(he=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-C;if((N===void 0||N>ce)&&(N=ce),v.length>0&&(N<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Ee=!1;;)switch(he){case"hex":return L(this,v,C,N);case"utf8":case"utf-8":return U(this,v,C,N);case"ascii":case"latin1":case"binary":return j(this,v,C,N);case"base64":return Q(this,v,C,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,v,C,N);default:if(Ee)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Ee=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(S,v,C){return v===0&&C===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(v,C))}function le(S,v,C){C=Math.min(S.length,C);for(var N=[],he=v;he<C;){var ce=S[he],Ee=null,Te=ce>239?4:ce>223?3:ce>191?2:1;if(he+Te<=C){var de,we,x,O;switch(Te){case 1:ce<128&&(Ee=ce);break;case 2:de=S[he+1],(de&192)===128&&(O=(ce&31)<<6|de&63,O>127&&(Ee=O));break;case 3:de=S[he+1],we=S[he+2],(de&192)===128&&(we&192)===128&&(O=(ce&15)<<12|(de&63)<<6|we&63,O>2047&&(O<55296||O>57343)&&(Ee=O));break;case 4:de=S[he+1],we=S[he+2],x=S[he+3],(de&192)===128&&(we&192)===128&&(x&192)===128&&(O=(ce&15)<<18|(de&63)<<12|(we&63)<<6|x&63,O>65535&&O<1114112&&(Ee=O))}}Ee===null?(Ee=65533,Te=1):Ee>65535&&(Ee-=65536,N.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),N.push(Ee),he+=Te}return X(N)}var oe=4096;function X(S){var v=S.length;if(v<=oe)return String.fromCharCode.apply(String,S);for(var C="",N=0;N<v;)C+=String.fromCharCode.apply(String,S.slice(N,N+=oe));return C}function te(S,v,C){var N="";C=Math.min(S.length,C);for(var he=v;he<C;++he)N+=String.fromCharCode(S[he]&127);return N}function pe(S,v,C){var N="";C=Math.min(S.length,C);for(var he=v;he<C;++he)N+=String.fromCharCode(S[he]);return N}function ue(S,v,C){var N=S.length;(!v||v<0)&&(v=0),(!C||C<0||C>N)&&(C=N);for(var he="",ce=v;ce<C;++ce)he+=ee[S[ce]];return he}function J(S,v,C){for(var N=S.slice(v,C),he="",ce=0;ce<N.length-1;ce+=2)he+=String.fromCharCode(N[ce]+N[ce+1]*256);return he}c.prototype.slice=function(v,C){var N=this.length;v=~~v,C=C===void 0?N:~~C,v<0?(v+=N,v<0&&(v=0)):v>N&&(v=N),C<0?(C+=N,C<0&&(C=0)):C>N&&(C=N),C<v&&(C=v);var he=this.subarray(v,C);return Object.setPrototypeOf(he,c.prototype),he};function G(S,v,C){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+v>C)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(v,C,N){v=v>>>0,C=C>>>0,N||G(v,C,this.length);for(var he=this[v],ce=1,Ee=0;++Ee<C&&(ce*=256);)he+=this[v+Ee]*ce;return he},c.prototype.readUintBE=c.prototype.readUIntBE=function(v,C,N){v=v>>>0,C=C>>>0,N||G(v,C,this.length);for(var he=this[v+--C],ce=1;C>0&&(ce*=256);)he+=this[v+--C]*ce;return he},c.prototype.readUint8=c.prototype.readUInt8=function(v,C){return v=v>>>0,C||G(v,1,this.length),this[v]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(v,C){return v=v>>>0,C||G(v,2,this.length),this[v]|this[v+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(v,C){return v=v>>>0,C||G(v,2,this.length),this[v]<<8|this[v+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(v,C){return v=v>>>0,C||G(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(v,C){return v=v>>>0,C||G(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},c.prototype.readIntLE=function(v,C,N){v=v>>>0,C=C>>>0,N||G(v,C,this.length);for(var he=this[v],ce=1,Ee=0;++Ee<C&&(ce*=256);)he+=this[v+Ee]*ce;return ce*=128,he>=ce&&(he-=Math.pow(2,8*C)),he},c.prototype.readIntBE=function(v,C,N){v=v>>>0,C=C>>>0,N||G(v,C,this.length);for(var he=C,ce=1,Ee=this[v+--he];he>0&&(ce*=256);)Ee+=this[v+--he]*ce;return ce*=128,Ee>=ce&&(Ee-=Math.pow(2,8*C)),Ee},c.prototype.readInt8=function(v,C){return v=v>>>0,C||G(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},c.prototype.readInt16LE=function(v,C){v=v>>>0,C||G(v,2,this.length);var N=this[v]|this[v+1]<<8;return N&32768?N|4294901760:N},c.prototype.readInt16BE=function(v,C){v=v>>>0,C||G(v,2,this.length);var N=this[v+1]|this[v]<<8;return N&32768?N|4294901760:N},c.prototype.readInt32LE=function(v,C){return v=v>>>0,C||G(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},c.prototype.readInt32BE=function(v,C){return v=v>>>0,C||G(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},c.prototype.readFloatLE=function(v,C){return v=v>>>0,C||G(v,4,this.length),n.read(this,v,!0,23,4)},c.prototype.readFloatBE=function(v,C){return v=v>>>0,C||G(v,4,this.length),n.read(this,v,!1,23,4)},c.prototype.readDoubleLE=function(v,C){return v=v>>>0,C||G(v,8,this.length),n.read(this,v,!0,52,8)},c.prototype.readDoubleBE=function(v,C){return v=v>>>0,C||G(v,8,this.length),n.read(this,v,!1,52,8)};function H(S,v,C,N,he,ce){if(!c.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>he||v<ce)throw new RangeError('"value" argument is out of bounds');if(C+N>S.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(v,C,N,he){if(v=+v,C=C>>>0,N=N>>>0,!he){var ce=Math.pow(2,8*N)-1;H(this,v,C,N,ce,0)}var Ee=1,Te=0;for(this[C]=v&255;++Te<N&&(Ee*=256);)this[C+Te]=v/Ee&255;return C+N},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(v,C,N,he){if(v=+v,C=C>>>0,N=N>>>0,!he){var ce=Math.pow(2,8*N)-1;H(this,v,C,N,ce,0)}var Ee=N-1,Te=1;for(this[C+Ee]=v&255;--Ee>=0&&(Te*=256);)this[C+Ee]=v/Te&255;return C+N},c.prototype.writeUint8=c.prototype.writeUInt8=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,1,255,0),this[C]=v&255,C+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,2,65535,0),this[C]=v&255,this[C+1]=v>>>8,C+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,2,65535,0),this[C]=v>>>8,this[C+1]=v&255,C+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,4,4294967295,0),this[C+3]=v>>>24,this[C+2]=v>>>16,this[C+1]=v>>>8,this[C]=v&255,C+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,4,4294967295,0),this[C]=v>>>24,this[C+1]=v>>>16,this[C+2]=v>>>8,this[C+3]=v&255,C+4},c.prototype.writeIntLE=function(v,C,N,he){if(v=+v,C=C>>>0,!he){var ce=Math.pow(2,8*N-1);H(this,v,C,N,ce-1,-ce)}var Ee=0,Te=1,de=0;for(this[C]=v&255;++Ee<N&&(Te*=256);)v<0&&de===0&&this[C+Ee-1]!==0&&(de=1),this[C+Ee]=(v/Te>>0)-de&255;return C+N},c.prototype.writeIntBE=function(v,C,N,he){if(v=+v,C=C>>>0,!he){var ce=Math.pow(2,8*N-1);H(this,v,C,N,ce-1,-ce)}var Ee=N-1,Te=1,de=0;for(this[C+Ee]=v&255;--Ee>=0&&(Te*=256);)v<0&&de===0&&this[C+Ee+1]!==0&&(de=1),this[C+Ee]=(v/Te>>0)-de&255;return C+N},c.prototype.writeInt8=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,1,127,-128),v<0&&(v=255+v+1),this[C]=v&255,C+1},c.prototype.writeInt16LE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,2,32767,-32768),this[C]=v&255,this[C+1]=v>>>8,C+2},c.prototype.writeInt16BE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,2,32767,-32768),this[C]=v>>>8,this[C+1]=v&255,C+2},c.prototype.writeInt32LE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,4,2147483647,-2147483648),this[C]=v&255,this[C+1]=v>>>8,this[C+2]=v>>>16,this[C+3]=v>>>24,C+4},c.prototype.writeInt32BE=function(v,C,N){return v=+v,C=C>>>0,N||H(this,v,C,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[C]=v>>>24,this[C+1]=v>>>16,this[C+2]=v>>>8,this[C+3]=v&255,C+4};function K(S,v,C,N,he,ce){if(C+N>S.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function W(S,v,C,N,he){return v=+v,C=C>>>0,he||K(S,v,C,4),n.write(S,v,C,N,23,4),C+4}c.prototype.writeFloatLE=function(v,C,N){return W(this,v,C,!0,N)},c.prototype.writeFloatBE=function(v,C,N){return W(this,v,C,!1,N)};function z(S,v,C,N,he){return v=+v,C=C>>>0,he||K(S,v,C,8),n.write(S,v,C,N,52,8),C+8}c.prototype.writeDoubleLE=function(v,C,N){return z(this,v,C,!0,N)},c.prototype.writeDoubleBE=function(v,C,N){return z(this,v,C,!1,N)},c.prototype.copy=function(v,C,N,he){if(!c.isBuffer(v))throw new TypeError("argument should be a Buffer");if(N||(N=0),!he&&he!==0&&(he=this.length),C>=v.length&&(C=v.length),C||(C=0),he>0&&he<N&&(he=N),he===N||v.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),v.length-C<he-N&&(he=v.length-C+N);var ce=he-N;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(C,N,he):Uint8Array.prototype.set.call(v,this.subarray(N,he),C),ce},c.prototype.fill=function(v,C,N,he){if(typeof v=="string"){if(typeof C=="string"?(he=C,C=0,N=this.length):typeof N=="string"&&(he=N,N=this.length),he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!c.isEncoding(he))throw new TypeError("Unknown encoding: "+he);if(v.length===1){var ce=v.charCodeAt(0);(he==="utf8"&&ce<128||he==="latin1")&&(v=ce)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(C<0||this.length<C||this.length<N)throw new RangeError("Out of range index");if(N<=C)return this;C=C>>>0,N=N===void 0?this.length:N>>>0,v||(v=0);var Ee;if(typeof v=="number")for(Ee=C;Ee<N;++Ee)this[Ee]=v;else{var Te=c.isBuffer(v)?v:c.from(v,he),de=Te.length;if(de===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(Ee=0;Ee<N-C;++Ee)this[Ee+C]=Te[Ee%de]}return this};var fe=/[^+/0-9A-Za-z-_]/g;function ae(S){if(S=S.split("=")[0],S=S.trim().replace(fe,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function ne(S,v){v=v||1/0;for(var C,N=S.length,he=null,ce=[],Ee=0;Ee<N;++Ee){if(C=S.charCodeAt(Ee),C>55295&&C<57344){if(!he){if(C>56319){(v-=3)>-1&&ce.push(239,191,189);continue}else if(Ee+1===N){(v-=3)>-1&&ce.push(239,191,189);continue}he=C;continue}if(C<56320){(v-=3)>-1&&ce.push(239,191,189),he=C;continue}C=(he-55296<<10|C-56320)+65536}else he&&(v-=3)>-1&&ce.push(239,191,189);if(he=null,C<128){if((v-=1)<0)break;ce.push(C)}else if(C<2048){if((v-=2)<0)break;ce.push(C>>6|192,C&63|128)}else if(C<65536){if((v-=3)<0)break;ce.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((v-=4)<0)break;ce.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return ce}function Z(S){for(var v=[],C=0;C<S.length;++C)v.push(S.charCodeAt(C)&255);return v}function F(S,v){for(var C,N,he,ce=[],Ee=0;Ee<S.length&&!((v-=2)<0);++Ee)C=S.charCodeAt(Ee),N=C>>8,he=C%256,ce.push(he),ce.push(N);return ce}function q(S){return t.toByteArray(ae(S))}function Y(S,v,C,N){for(var he=0;he<N&&!(he+C>=v.length||he>=S.length);++he)v[he+C]=S[he];return he}function se(S,v){return S instanceof v||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===v.name}function ye(S){return S!==S}var ee=(function(){for(var S="0123456789abcdef",v=new Array(256),C=0;C<16;++C)for(var N=C*16,he=0;he<16;++he)v[N+he]=S[C]+S[he];return v})()})(em)),em}var jr=Y4(),kh={exports:{}},E2;function V4(){return E2||(E2=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={exports:{}},o=n.exports={},s,u;function l(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=l}catch{s=l}try{typeof clearTimeout=="function"?u=clearTimeout:u=c}catch{u=c}})();function h(ue){if(s===setTimeout)return setTimeout(ue,0);if((s===l||!s)&&setTimeout)return s=setTimeout,setTimeout(ue,0);try{return s(ue,0)}catch{try{return s.call(null,ue,0)}catch{return s.call(this,ue,0)}}}function f(ue){if(u===clearTimeout)return clearTimeout(ue);if((u===c||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(ue);try{return u(ue)}catch{try{return u.call(null,ue)}catch{return u.call(this,ue)}}}var p=[],y=!1,g,b=-1;function w(){!y||!g||(y=!1,g.length?p=g.concat(p):b=-1,p.length&&B())}function B(){if(!y){var ue=h(w);y=!0;for(var J=p.length;J;){for(g=p,p=[];++b<J;)g&&g[b].run();b=-1,J=p.length}g=null,y=!1,f(ue)}}o.nextTick=function(ue){var J=new Array(arguments.length-1);if(arguments.length>1)for(var G=1;G<arguments.length;G++)J[G-1]=arguments[G];p.push(new _(ue,J)),p.length===1&&!y&&h(B)};function _(ue,J){this.fun=ue,this.array=J}_.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={};function M(){}o.on=M,o.addListener=M,o.once=M,o.off=M,o.removeListener=M,o.removeAllListeners=M,o.emit=M,o.prependListener=M,o.prependOnceListener=M,o.listeners=function(ue){return[]},o.binding=function(ue){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(ue){throw new Error("process.chdir is not supported")},o.umask=function(){return 0};function A(){}var I=n.exports.browser,R=A,T=n.exports.binding,$=A,k=1,L={},U=A,j=A,Q=A,P=A,re=A,le="browser",oe="browser",X="browser",te=[],pe={nextTick:n.exports.nextTick,title:n.exports.title,browser:I,env:n.exports.env,argv:n.exports.argv,version:n.exports.version,versions:n.exports.versions,on:n.exports.on,addListener:n.exports.addListener,once:n.exports.once,off:n.exports.off,removeListener:n.exports.removeListener,removeAllListeners:n.exports.removeAllListeners,emit:n.exports.emit,emitWarning:R,prependListener:n.exports.prependListener,prependOnceListener:n.exports.prependOnceListener,listeners:n.exports.listeners,binding:T,cwd:n.exports.cwd,chdir:n.exports.chdir,umask:n.exports.umask,exit:$,pid:k,features:L,kill:U,dlopen:j,uptime:Q,memoryUsage:P,uvCounters:re,platform:le,arch:oe,execPath:X,execArgv:te};t.addListener=n.exports.addListener,t.arch=oe,t.argv=n.exports.argv,t.binding=T,t.browser=I,t.chdir=n.exports.chdir,t.cwd=n.exports.cwd,t.default=pe,t.dlopen=j,t.emit=n.exports.emit,t.emitWarning=R,t.env=n.exports.env,t.execArgv=te,t.execPath=X,t.exit=$,t.features=L,t.kill=U,t.listeners=n.exports.listeners,t.memoryUsage=P,t.nextTick=n.exports.nextTick,t.off=n.exports.off,t.on=n.exports.on,t.once=n.exports.once,t.pid=k,t.platform=le,t.prependListener=n.exports.prependListener,t.prependOnceListener=n.exports.prependOnceListener,t.removeAllListeners=n.exports.removeAllListeners,t.removeListener=n.exports.removeListener,t.title=n.exports.title,t.umask=n.exports.umask,t.uptime=Q,t.uvCounters=re,t.version=n.exports.version,t.versions=n.exports.versions,t=e.exports=pe})(kh,kh.exports)),kh.exports}var W4=V4();const Ut=Wd(W4);var X4=(function(e){function t(){var o=this||self;return delete e.prototype.__magic__,o}if(typeof globalThis=="object")return globalThis;if(this)return t();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t});var n=__magic__;return n})(Object),Z4=X4,vt={},S2;function J4(){if(S2)return vt;S2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),g=Symbol.iterator;function b(G){return G===null||typeof G!="object"?null:(G=g&&G[g]||G["@@iterator"],typeof G=="function"?G:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,_={};function M(G,H,K){this.props=G,this.context=H,this.refs=_,this.updater=K||w}M.prototype.isReactComponent={},M.prototype.setState=function(G,H){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,H,"setState")},M.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function A(){}A.prototype=M.prototype;function I(G,H,K){this.props=G,this.context=H,this.refs=_,this.updater=K||w}var R=I.prototype=new A;R.constructor=I,B(R,M.prototype),R.isPureReactComponent=!0;var T=Array.isArray;function $(){}var k={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function U(G,H,K){var W=K.ref;return{$$typeof:e,type:G,key:H,ref:W!==void 0?W:null,props:K}}function j(G,H){return U(G.type,H,G.props)}function Q(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function P(G){var H={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(K){return H[K]})}var re=/\/+/g;function le(G,H){return typeof G=="object"&&G!==null&&G.key!=null?P(""+G.key):H.toString(36)}function oe(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then($,$):(G.status="pending",G.then(function(H){G.status==="pending"&&(G.status="fulfilled",G.value=H)},function(H){G.status==="pending"&&(G.status="rejected",G.reason=H)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function X(G,H,K,W,z){var fe=typeof G;(fe==="undefined"||fe==="boolean")&&(G=null);var ae=!1;if(G===null)ae=!0;else switch(fe){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(G.$$typeof){case e:case t:ae=!0;break;case p:return ae=G._init,X(ae(G._payload),H,K,W,z)}}if(ae)return z=z(G),ae=W===""?"."+le(G,0):W,T(z)?(K="",ae!=null&&(K=ae.replace(re,"$&/")+"/"),X(z,H,K,"",function(F){return F})):z!=null&&(Q(z)&&(z=j(z,K+(z.key==null||G&&G.key===z.key?"":(""+z.key).replace(re,"$&/")+"/")+ae)),H.push(z)),1;ae=0;var ne=W===""?".":W+":";if(T(G))for(var Z=0;Z<G.length;Z++)W=G[Z],fe=ne+le(W,Z),ae+=X(W,H,K,fe,z);else if(Z=b(G),typeof Z=="function")for(G=Z.call(G),Z=0;!(W=G.next()).done;)W=W.value,fe=ne+le(W,Z++),ae+=X(W,H,K,fe,z);else if(fe==="object"){if(typeof G.then=="function")return X(oe(G),H,K,W,z);throw H=String(G),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ae}function te(G,H,K){if(G==null)return G;var W=[],z=0;return X(G,W,"","",function(fe){return H.call(K,fe,z++)}),W}function pe(G){if(G._status===-1){var H=G._result;H=H(),H.then(function(K){(G._status===0||G._status===-1)&&(G._status=1,G._result=K)},function(K){(G._status===0||G._status===-1)&&(G._status=2,G._result=K)}),G._status===-1&&(G._status=0,G._result=H)}if(G._status===1)return G._result.default;throw G._result}var ue=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(H))return}else if(typeof Ut=="object"&&typeof Ut.emit=="function"){Ut.emit("uncaughtException",G);return}console.error(G)},J={map:te,forEach:function(G,H,K){te(G,function(){H.apply(this,arguments)},K)},count:function(G){var H=0;return te(G,function(){H++}),H},toArray:function(G){return te(G,function(H){return H})||[]},only:function(G){if(!Q(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return vt.Activity=y,vt.Children=J,vt.Component=M,vt.Fragment=n,vt.Profiler=s,vt.PureComponent=I,vt.StrictMode=o,vt.Suspense=h,vt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,vt.__COMPILER_RUNTIME={__proto__:null,c:function(G){return k.H.useMemoCache(G)}},vt.cache=function(G){return function(){return G.apply(null,arguments)}},vt.cacheSignal=function(){return null},vt.cloneElement=function(G,H,K){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var W=B({},G.props),z=G.key;if(H!=null)for(fe in H.key!==void 0&&(z=""+H.key),H)!L.call(H,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&H.ref===void 0||(W[fe]=H[fe]);var fe=arguments.length-2;if(fe===1)W.children=K;else if(1<fe){for(var ae=Array(fe),ne=0;ne<fe;ne++)ae[ne]=arguments[ne+2];W.children=ae}return U(G.type,z,W)},vt.createContext=function(G){return G={$$typeof:l,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:u,_context:G},G},vt.createElement=function(G,H,K){var W,z={},fe=null;if(H!=null)for(W in H.key!==void 0&&(fe=""+H.key),H)L.call(H,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(z[W]=H[W]);var ae=arguments.length-2;if(ae===1)z.children=K;else if(1<ae){for(var ne=Array(ae),Z=0;Z<ae;Z++)ne[Z]=arguments[Z+2];z.children=ne}if(G&&G.defaultProps)for(W in ae=G.defaultProps,ae)z[W]===void 0&&(z[W]=ae[W]);return U(G,fe,z)},vt.createRef=function(){return{current:null}},vt.forwardRef=function(G){return{$$typeof:c,render:G}},vt.isValidElement=Q,vt.lazy=function(G){return{$$typeof:p,_payload:{_status:-1,_result:G},_init:pe}},vt.memo=function(G,H){return{$$typeof:f,type:G,compare:H===void 0?null:H}},vt.startTransition=function(G){var H=k.T,K={};k.T=K;try{var W=G(),z=k.S;z!==null&&z(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then($,ue)}catch(fe){ue(fe)}finally{H!==null&&K.types!==null&&(H.types=K.types),k.T=H}},vt.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},vt.use=function(G){return k.H.use(G)},vt.useActionState=function(G,H,K){return k.H.useActionState(G,H,K)},vt.useCallback=function(G,H){return k.H.useCallback(G,H)},vt.useContext=function(G){return k.H.useContext(G)},vt.useDebugValue=function(){},vt.useDeferredValue=function(G,H){return k.H.useDeferredValue(G,H)},vt.useEffect=function(G,H){return k.H.useEffect(G,H)},vt.useEffectEvent=function(G){return k.H.useEffectEvent(G)},vt.useId=function(){return k.H.useId()},vt.useImperativeHandle=function(G,H,K){return k.H.useImperativeHandle(G,H,K)},vt.useInsertionEffect=function(G,H){return k.H.useInsertionEffect(G,H)},vt.useLayoutEffect=function(G,H){return k.H.useLayoutEffect(G,H)},vt.useMemo=function(G,H){return k.H.useMemo(G,H)},vt.useOptimistic=function(G,H){return k.H.useOptimistic(G,H)},vt.useReducer=function(G,H,K){return k.H.useReducer(G,H,K)},vt.useRef=function(G){return k.H.useRef(G)},vt.useState=function(G){return k.H.useState(G)},vt.useSyncExternalStore=function(G,H,K){return k.H.useSyncExternalStore(G,H,K)},vt.useTransition=function(){return k.H.useTransition()},vt.version="19.2.0",vt}var I2;function GA(){return I2||(I2=1,Jg.exports=J4()),Jg.exports}var Xe=GA(),tm={exports:{}},ec={},rm={exports:{}},nm={};/**
|
|
15
|
+
* @license React
|
|
16
|
+
* scheduler.production.js
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the MIT license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/var _2;function eR(){return _2||(_2=1,(function(e){function t(X,te){var pe=X.length;X.push(te);e:for(;0<pe;){var ue=pe-1>>>1,J=X[ue];if(0<s(J,te))X[ue]=te,X[pe]=J,pe=ue;else break e}}function n(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var te=X[0],pe=X.pop();if(pe!==te){X[0]=pe;e:for(var ue=0,J=X.length,G=J>>>1;ue<G;){var H=2*(ue+1)-1,K=X[H],W=H+1,z=X[W];if(0>s(K,pe))W<J&&0>s(z,K)?(X[ue]=z,X[W]=pe,ue=W):(X[ue]=K,X[H]=pe,ue=H);else if(W<J&&0>s(z,pe))X[ue]=z,X[W]=pe,ue=W;else break e}}return te}function s(X,te){var pe=X.sortIndex-te.sortIndex;return pe!==0?pe:X.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var h=[],f=[],p=1,y=null,g=3,b=!1,w=!1,B=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function R(X){for(var te=n(f);te!==null;){if(te.callback===null)o(f);else if(te.startTime<=X)o(f),te.sortIndex=te.expirationTime,t(h,te);else break;te=n(f)}}function T(X){if(B=!1,R(X),!w)if(n(h)!==null)w=!0,$||($=!0,P());else{var te=n(f);te!==null&&oe(T,te.startTime-X)}}var $=!1,k=-1,L=5,U=-1;function j(){return _?!0:!(e.unstable_now()-U<L)}function Q(){if(_=!1,$){var X=e.unstable_now();U=X;var te=!0;try{e:{w=!1,B&&(B=!1,A(k),k=-1),b=!0;var pe=g;try{t:{for(R(X),y=n(h);y!==null&&!(y.expirationTime>X&&j());){var ue=y.callback;if(typeof ue=="function"){y.callback=null,g=y.priorityLevel;var J=ue(y.expirationTime<=X);if(X=e.unstable_now(),typeof J=="function"){y.callback=J,R(X),te=!0;break t}y===n(h)&&o(h),R(X)}else o(h);y=n(h)}if(y!==null)te=!0;else{var G=n(f);G!==null&&oe(T,G.startTime-X),te=!1}}break e}finally{y=null,g=pe,b=!1}te=void 0}}finally{te?P():$=!1}}}var P;if(typeof I=="function")P=function(){I(Q)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,le=re.port2;re.port1.onmessage=Q,P=function(){le.postMessage(null)}}else P=function(){M(Q,0)};function oe(X,te){k=M(function(){X(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(X){switch(g){case 1:case 2:case 3:var te=3;break;default:te=g}var pe=g;g=te;try{return X()}finally{g=pe}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(X,te){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var pe=g;g=X;try{return te()}finally{g=pe}},e.unstable_scheduleCallback=function(X,te,pe){var ue=e.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?ue+pe:ue):pe=ue,X){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=pe+J,X={id:p++,callback:te,priorityLevel:X,startTime:pe,expirationTime:J,sortIndex:-1},pe>ue?(X.sortIndex=pe,t(f,X),n(h)===null&&X===n(f)&&(B?(A(k),k=-1):B=!0,oe(T,pe-ue))):(X.sortIndex=J,t(h,X),w||b||(w=!0,$||($=!0,P()))),X},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(X){var te=g;return function(){var pe=g;g=te;try{return X.apply(this,arguments)}finally{g=pe}}}})(nm)),nm}var C2;function tR(){return C2||(C2=1,rm.exports=eR()),rm.exports}var im={exports:{}},an={};/**
|
|
23
|
+
* @license React
|
|
24
|
+
* react-dom.production.js
|
|
25
|
+
*
|
|
26
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the MIT license found in the
|
|
29
|
+
* LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/var F2;function rR(){if(F2)return an;F2=1;var e=GA();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,f,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:h,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return an.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,an.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return u(h,f,null,p)},an.flushSync=function(h){var f=l.T,p=o.p;try{if(l.T=null,o.p=2,h)return h()}finally{l.T=f,o.p=p,o.d.f()}},an.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,o.d.C(h,f))},an.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},an.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,y=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?o.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:b}):p==="script"&&o.d.X(h,{crossOrigin:y,integrity:g,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},an.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);o.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&o.d.M(h)},an.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,y=c(p,f.crossOrigin);o.d.L(h,p,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},an.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=c(f.as,f.crossOrigin);o.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else o.d.m(h)},an.requestFormReset=function(h){o.d.r(h)},an.unstable_batchedUpdates=function(h,f){return h(f)},an.useFormState=function(h,f,p){return l.H.useFormState(h,f,p)},an.useFormStatus=function(){return l.H.useHostTransitionStatus()},an.version="19.2.0",an}var O2;function kF(){if(O2)return im.exports;O2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),im.exports=rR(),im.exports}var B2;function nR(){if(B2)return ec;B2=1;var e=tR(),t=GA(),n=kF();function o(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var i=r,a=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(a=i.return),r=i.return;while(r)}return i.tag===3?a:null}function l(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function c(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function h(r){if(u(r)!==r)throw Error(o(188))}function f(r){var i=r.alternate;if(!i){if(i=u(r),i===null)throw Error(o(188));return i!==r?null:r}for(var a=r,d=i;;){var m=a.return;if(m===null)break;var E=m.alternate;if(E===null){if(d=m.return,d!==null){a=d;continue}break}if(m.child===E.child){for(E=m.child;E;){if(E===a)return h(m),r;if(E===d)return h(m),i;E=E.sibling}throw Error(o(188))}if(a.return!==d.return)a=m,d=E;else{for(var V=!1,ge=m.child;ge;){if(ge===a){V=!0,a=m,d=E;break}if(ge===d){V=!0,d=m,a=E;break}ge=ge.sibling}if(!V){for(ge=E.child;ge;){if(ge===a){V=!0,a=E,d=m;break}if(ge===d){V=!0,d=E,a=m;break}ge=ge.sibling}if(!V)throw Error(o(189))}}if(a.alternate!==d)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?r:i}function p(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=p(r),i!==null)return i;r=r.sibling}return null}var y=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),I=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function P(r){return r===null||typeof r!="object"?null:(r=Q&&r[Q]||r["@@iterator"],typeof r=="function"?r:null)}var re=Symbol.for("react.client.reference");function le(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===re?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case B:return"Fragment";case M:return"Profiler";case _:return"StrictMode";case T:return"Suspense";case $:return"SuspenseList";case U:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case I:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case R:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case k:return i=r.displayName||null,i!==null?i:le(r.type)||"Memo";case L:i=r._payload,r=r._init;try{return le(r(i))}catch{}}return null}var oe=Array.isArray,X=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},ue=[],J=-1;function G(r){return{current:r}}function H(r){0>J||(r.current=ue[J],ue[J]=null,J--)}function K(r,i){J++,ue[J]=r.current,r.current=i}var W=G(null),z=G(null),fe=G(null),ae=G(null);function ne(r,i){switch(K(fe,i),K(z,r),K(W,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?LS(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=LS(i),r=zS(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(W),K(W,r)}function Z(){H(W),H(z),H(fe)}function F(r){r.memoizedState!==null&&K(ae,r);var i=W.current,a=zS(i,r.type);i!==a&&(K(z,r),K(W,a))}function q(r){z.current===r&&(H(W),H(z)),ae.current===r&&(H(ae),Yl._currentValue=pe)}var Y,se;function ye(r){if(Y===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);Y=i&&i[1]||"",se=-1<a.stack.indexOf(`
|
|
31
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
32
|
+
`+Y+r+se}var ee=!1;function S(r,i){if(!r||ee)return"";ee=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var Ge=function(){throw Error()};if(Object.defineProperty(Ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ge,[])}catch(Ne){var Ue=Ne}Reflect.construct(r,[],Ge)}else{try{Ge.call()}catch(Ne){Ue=Ne}r.call(Ge.prototype)}}else{try{throw Error()}catch(Ne){Ue=Ne}(Ge=r())&&typeof Ge.catch=="function"&&Ge.catch(function(){})}}catch(Ne){if(Ne&&Ue&&typeof Ne.stack=="string")return[Ne.stack,Ue.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=d.DetermineComponentFrameRoot(),V=E[0],ge=E[1];if(V&&ge){var Fe=V.split(`
|
|
33
|
+
`),Me=ge.split(`
|
|
34
|
+
`);for(m=d=0;d<Fe.length&&!Fe[d].includes("DetermineComponentFrameRoot");)d++;for(;m<Me.length&&!Me[m].includes("DetermineComponentFrameRoot");)m++;if(d===Fe.length||m===Me.length)for(d=Fe.length-1,m=Me.length-1;1<=d&&0<=m&&Fe[d]!==Me[m];)m--;for(;1<=d&&0<=m;d--,m--)if(Fe[d]!==Me[m]){if(d!==1||m!==1)do if(d--,m--,0>m||Fe[d]!==Me[m]){var $e=`
|
|
35
|
+
`+Fe[d].replace(" at new "," at ");return r.displayName&&$e.includes("<anonymous>")&&($e=$e.replace("<anonymous>",r.displayName)),$e}while(1<=d&&0<=m);break}}}finally{ee=!1,Error.prepareStackTrace=a}return(a=r?r.displayName||r.name:"")?ye(a):""}function v(r,i){switch(r.tag){case 26:case 27:case 5:return ye(r.type);case 16:return ye("Lazy");case 13:return r.child!==i&&i!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return S(r.type,!1);case 11:return S(r.type.render,!1);case 1:return S(r.type,!0);case 31:return ye("Activity");default:return""}}function C(r){try{var i="",a=null;do i+=v(r,a),a=r,r=r.return;while(r);return i}catch(d){return`
|
|
36
|
+
Error generating stack: `+d.message+`
|
|
37
|
+
`+d.stack}}var N=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,ce=e.unstable_cancelCallback,Ee=e.unstable_shouldYield,Te=e.unstable_requestPaint,de=e.unstable_now,we=e.unstable_getCurrentPriorityLevel,x=e.unstable_ImmediatePriority,O=e.unstable_UserBlockingPriority,D=e.unstable_NormalPriority,ie=e.unstable_LowPriority,me=e.unstable_IdlePriority,xe=e.log,Ce=e.unstable_setDisableYieldValue,ve=null,Se=null;function He(r){if(typeof xe=="function"&&Ce(r),Se&&typeof Se.setStrictMode=="function")try{Se.setStrictMode(ve,r)}catch{}}var Ke=Math.clz32?Math.clz32:gt,Ve=Math.log,et=Math.LN2;function gt(r){return r>>>=0,r===0?32:31-(Ve(r)/et|0)|0}var bt=256,lt=262144,yt=4194304;function tt(r){var i=r&42;if(i!==0)return i;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function ft(r,i,a){var d=r.pendingLanes;if(d===0)return 0;var m=0,E=r.suspendedLanes,V=r.pingedLanes;r=r.warmLanes;var ge=d&134217727;return ge!==0?(d=ge&~E,d!==0?m=tt(d):(V&=ge,V!==0?m=tt(V):a||(a=ge&~r,a!==0&&(m=tt(a))))):(ge=d&~E,ge!==0?m=tt(ge):V!==0?m=tt(V):a||(a=d&~r,a!==0&&(m=tt(a)))),m===0?0:i!==0&&i!==m&&(i&E)===0&&(E=m&-m,a=i&-i,E>=a||E===32&&(a&4194048)!==0)?i:m}function dt(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function At(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xt(){var r=yt;return yt<<=1,(yt&62914560)===0&&(yt=4194304),r}function br(r){for(var i=[],a=0;31>a;a++)i.push(r);return i}function be(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ie(r,i,a,d,m,E){var V=r.pendingLanes;r.pendingLanes=a,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=a,r.entangledLanes&=a,r.errorRecoveryDisabledLanes&=a,r.shellSuspendCounter=0;var ge=r.entanglements,Fe=r.expirationTimes,Me=r.hiddenUpdates;for(a=V&~a;0<a;){var $e=31-Ke(a),Ge=1<<$e;ge[$e]=0,Fe[$e]=-1;var Ue=Me[$e];if(Ue!==null)for(Me[$e]=null,$e=0;$e<Ue.length;$e++){var Ne=Ue[$e];Ne!==null&&(Ne.lane&=-536870913)}a&=~Ge}d!==0&&Ye(r,d,0),E!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=E&~(V&~i))}function Ye(r,i,a){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-Ke(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|a&261930}function Je(r,i){var a=r.entangledLanes|=i;for(r=r.entanglements;a;){var d=31-Ke(a),m=1<<d;m&i|r[d]&i&&(r[d]|=i),a&=~m}}function ot(r,i){var a=i&-i;return a=(a&42)!==0?1:qt(a),(a&(r.suspendedLanes|i))!==0?0:a}function qt(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function tr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Br(){var r=te.p;return r!==0?r:(r=window.event,r===void 0?32:c2(r.type))}function Ln(r,i){var a=te.p;try{return te.p=r,i()}finally{te.p=a}}var Tr=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Tr,rr="__reactProps$"+Tr,Rr="__reactContainer$"+Tr,Mr="__reactEvents$"+Tr,gn="__reactListeners$"+Tr,wn="__reactHandles$"+Tr,Pr="__reactResources$"+Tr,Ar="__reactMarker$"+Tr;function Vo(r){delete r[Ht],delete r[rr],delete r[Mr],delete r[gn],delete r[wn]}function wi(r){var i=r[Ht];if(i)return i;for(var a=r.parentNode;a;){if(i=a[Rr]||a[Ht]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(r=YS(r);r!==null;){if(a=r[Ht])return a;r=YS(r)}return i}r=a,a=r.parentNode}return null}function xi(r){if(r=r[Ht]||r[Rr]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function ki(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(o(33))}function Ei(r){var i=r[Pr];return i||(i=r[Pr]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function ar(r){r[Ar]=!0}var $s=new Set,Fw={};function qs(r,i){La(r,i),La(r+"Capture",i)}function La(r,i){for(Fw[r]=i,r=0;r<i.length;r++)$s.add(i[r])}var M6=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ow={},Bw={};function U6(r){return N.call(Bw,r)?!0:N.call(Ow,r)?!1:M6.test(r)?Bw[r]=!0:(Ow[r]=!0,!1)}function If(r,i,a){if(U6(i))if(a===null)r.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+a)}}function _f(r,i,a){if(a===null)r.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+a)}}function to(r,i,a,d){if(d===null)r.removeAttribute(a);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttributeNS(i,a,""+d)}}function ii(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Tw(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function j6(r,i,a){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var m=d.get,E=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(V){a=""+V,E.call(this,V)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return a},setValue:function(V){a=""+V},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Hp(r){if(!r._valueTracker){var i=Tw(r)?"checked":"value";r._valueTracker=j6(r,i,""+r[i])}}function Rw(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),d="";return r&&(d=Tw(r)?r.checked?"true":"false":r.value),r=d,r!==a?(i.setValue(r),!0):!1}function Cf(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var D6=/[\n"\\]/g;function oi(r){return r.replace(D6,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Qp(r,i,a,d,m,E,V,ge){r.name="",V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?r.type=V:r.removeAttribute("type"),i!=null?V==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+ii(i)):r.value!==""+ii(i)&&(r.value=""+ii(i)):V!=="submit"&&V!=="reset"||r.removeAttribute("value"),i!=null?Gp(r,V,ii(i)):a!=null?Gp(r,V,ii(a)):d!=null&&r.removeAttribute("value"),m==null&&E!=null&&(r.defaultChecked=!!E),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),ge!=null&&typeof ge!="function"&&typeof ge!="symbol"&&typeof ge!="boolean"?r.name=""+ii(ge):r.removeAttribute("name")}function Mw(r,i,a,d,m,E,V,ge){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(r.type=E),i!=null||a!=null){if(!(E!=="submit"&&E!=="reset"||i!=null)){Hp(r);return}a=a!=null?""+ii(a):"",i=i!=null?""+ii(i):a,ge||i===r.value||(r.value=i),r.defaultValue=i}d=d??m,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=ge?r.checked:!!d,r.defaultChecked=!!d,V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"&&(r.name=V),Hp(r)}function Gp(r,i,a){i==="number"&&Cf(r.ownerDocument)===r||r.defaultValue===""+a||(r.defaultValue=""+a)}function za(r,i,a,d){if(r=r.options,i){i={};for(var m=0;m<a.length;m++)i["$"+a[m]]=!0;for(a=0;a<r.length;a++)m=i.hasOwnProperty("$"+r[a].value),r[a].selected!==m&&(r[a].selected=m),m&&d&&(r[a].defaultSelected=!0)}else{for(a=""+ii(a),i=null,m=0;m<r.length;m++){if(r[m].value===a){r[m].selected=!0,d&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function Uw(r,i,a){if(i!=null&&(i=""+ii(i),i!==r.value&&(r.value=i),a==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=a!=null?""+ii(a):""}function jw(r,i,a,d){if(i==null){if(d!=null){if(a!=null)throw Error(o(92));if(oe(d)){if(1<d.length)throw Error(o(93));d=d[0]}a=d}a==null&&(a=""),i=a}a=ii(i),r.defaultValue=a,d=r.textContent,d===a&&d!==""&&d!==null&&(r.value=d),Hp(r)}function $a(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var N6=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Dw(r,i,a){var d=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,a):typeof a!="number"||a===0||N6.has(i)?i==="float"?r.cssFloat=a:r[i]=(""+a).trim():r[i]=a+"px"}function Nw(r,i,a){if(i!=null&&typeof i!="object")throw Error(o(62));if(r=r.style,a!=null){for(var d in a)!a.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var m in i)d=i[m],i.hasOwnProperty(m)&&a[m]!==d&&Dw(r,m,d)}else for(var E in i)i.hasOwnProperty(E)&&Dw(r,E,i[E])}function Kp(r){if(r.indexOf("-")===-1)return!1;switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var P6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),k6=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ff(r){return k6.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ro(){}var Yp=null;function Vp(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var qa=null,Ha=null;function Pw(r){var i=xi(r);if(i&&(r=i.stateNode)){var a=r[rr]||null;e:switch(r=i.stateNode,i.type){case"input":if(Qp(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+oi(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var d=a[i];if(d!==r&&d.form===r.form){var m=d[rr]||null;if(!m)throw Error(o(90));Qp(d,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<a.length;i++)d=a[i],d.form===r.form&&Rw(d)}break e;case"textarea":Uw(r,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&za(r,!!a.multiple,i,!1)}}}var Wp=!1;function kw(r,i,a){if(Wp)return r(i,a);Wp=!0;try{var d=r(i);return d}finally{if(Wp=!1,(qa!==null||Ha!==null)&&(yh(),qa&&(i=qa,r=Ha,Ha=qa=null,Pw(i),r)))for(i=0;i<r.length;i++)Pw(r[i])}}function fl(r,i){var a=r.stateNode;if(a===null)return null;var d=a[rr]||null;if(d===null)return null;a=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(o(231,i,typeof a));return a}var no=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xp=!1;if(no)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){Xp=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{Xp=!1}var Wo=null,Zp=null,Of=null;function Lw(){if(Of)return Of;var r,i=Zp,a=i.length,d,m="value"in Wo?Wo.value:Wo.textContent,E=m.length;for(r=0;r<a&&i[r]===m[r];r++);var V=a-r;for(d=1;d<=V&&i[a-d]===m[E-d];d++);return Of=m.slice(r,1<d?1-d:void 0)}function Bf(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Tf(){return!0}function zw(){return!1}function xn(r){function i(a,d,m,E,V){this._reactName=a,this._targetInst=m,this.type=d,this.nativeEvent=E,this.target=V,this.currentTarget=null;for(var ge in r)r.hasOwnProperty(ge)&&(a=r[ge],this[ge]=a?a(E):E[ge]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Tf:zw,this.isPropagationStopped=zw,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Tf)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Tf)},persist:function(){},isPersistent:Tf}),i}var Hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rf=xn(Hs),dl=y({},Hs,{view:0,detail:0}),L6=xn(dl),Jp,ey,pl,Mf=y({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ry,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==pl&&(pl&&r.type==="mousemove"?(Jp=r.screenX-pl.screenX,ey=r.screenY-pl.screenY):ey=Jp=0,pl=r),Jp)},movementY:function(r){return"movementY"in r?r.movementY:ey}}),$w=xn(Mf),z6=y({},Mf,{dataTransfer:0}),$6=xn(z6),q6=y({},dl,{relatedTarget:0}),ty=xn(q6),H6=y({},Hs,{animationName:0,elapsedTime:0,pseudoElement:0}),Q6=xn(H6),G6=y({},Hs,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),K6=xn(G6),Y6=y({},Hs,{data:0}),qw=xn(Y6),V6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W6={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},X6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z6(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=X6[r])?!!i[r]:!1}function ry(){return Z6}var J6=y({},dl,{key:function(r){if(r.key){var i=V6[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Bf(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?W6[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ry,charCode:function(r){return r.type==="keypress"?Bf(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Bf(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),e8=xn(J6),t8=y({},Mf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hw=xn(t8),r8=y({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ry}),n8=xn(r8),i8=y({},Hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),o8=xn(i8),s8=y({},Mf,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),a8=xn(s8),u8=y({},Hs,{newState:0,oldState:0}),l8=xn(u8),c8=[9,13,27,32],ny=no&&"CompositionEvent"in window,yl=null;no&&"documentMode"in document&&(yl=document.documentMode);var f8=no&&"TextEvent"in window&&!yl,Qw=no&&(!ny||yl&&8<yl&&11>=yl),Gw=" ",Kw=!1;function Yw(r,i){switch(r){case"keyup":return c8.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vw(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Qa=!1;function h8(r,i){switch(r){case"compositionend":return Vw(i);case"keypress":return i.which!==32?null:(Kw=!0,Gw);case"textInput":return r=i.data,r===Gw&&Kw?null:r;default:return null}}function d8(r,i){if(Qa)return r==="compositionend"||!ny&&Yw(r,i)?(r=Lw(),Of=Zp=Wo=null,Qa=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Qw&&i.locale!=="ko"?null:i.data;default:return null}}var p8={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ww(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!p8[r.type]:i==="textarea"}function Xw(r,i,a,d){qa?Ha?Ha.push(d):Ha=[d]:qa=d,i=xh(i,"onChange"),0<i.length&&(a=new Rf("onChange","change",null,a,d),r.push({event:a,listeners:i}))}var gl=null,ml=null;function y8(r){US(r,0)}function Uf(r){var i=ki(r);if(Rw(i))return r}function Zw(r,i){if(r==="change")return i}var Jw=!1;if(no){var iy;if(no){var oy="oninput"in document;if(!oy){var ex=document.createElement("div");ex.setAttribute("oninput","return;"),oy=typeof ex.oninput=="function"}iy=oy}else iy=!1;Jw=iy&&(!document.documentMode||9<document.documentMode)}function tx(){gl&&(gl.detachEvent("onpropertychange",rx),ml=gl=null)}function rx(r){if(r.propertyName==="value"&&Uf(ml)){var i=[];Xw(i,ml,r,Vp(r)),kw(y8,i)}}function g8(r,i,a){r==="focusin"?(tx(),gl=i,ml=a,gl.attachEvent("onpropertychange",rx)):r==="focusout"&&tx()}function m8(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Uf(ml)}function b8(r,i){if(r==="click")return Uf(i)}function A8(r,i){if(r==="input"||r==="change")return Uf(i)}function v8(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var zn=typeof Object.is=="function"?Object.is:v8;function bl(r,i){if(zn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var a=Object.keys(r),d=Object.keys(i);if(a.length!==d.length)return!1;for(d=0;d<a.length;d++){var m=a[d];if(!N.call(i,m)||!zn(r[m],i[m]))return!1}return!0}function nx(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function ix(r,i){var a=nx(r);r=0;for(var d;a;){if(a.nodeType===3){if(d=r+a.textContent.length,r<=i&&d>=i)return{node:a,offset:i-r};r=d}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=nx(a)}}function ox(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ox(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function sx(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Cf(r.document);i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=Cf(r.document)}return i}function sy(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var w8=no&&"documentMode"in document&&11>=document.documentMode,Ga=null,ay=null,Al=null,uy=!1;function ax(r,i,a){var d=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;uy||Ga==null||Ga!==Cf(d)||(d=Ga,"selectionStart"in d&&sy(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Al&&bl(Al,d)||(Al=d,d=xh(ay,"onSelect"),0<d.length&&(i=new Rf("onSelect","select",null,i,a),r.push({event:i,listeners:d}),i.target=Ga)))}function Qs(r,i){var a={};return a[r.toLowerCase()]=i.toLowerCase(),a["Webkit"+r]="webkit"+i,a["Moz"+r]="moz"+i,a}var Ka={animationend:Qs("Animation","AnimationEnd"),animationiteration:Qs("Animation","AnimationIteration"),animationstart:Qs("Animation","AnimationStart"),transitionrun:Qs("Transition","TransitionRun"),transitionstart:Qs("Transition","TransitionStart"),transitioncancel:Qs("Transition","TransitionCancel"),transitionend:Qs("Transition","TransitionEnd")},ly={},ux={};no&&(ux=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);function Gs(r){if(ly[r])return ly[r];if(!Ka[r])return r;var i=Ka[r],a;for(a in i)if(i.hasOwnProperty(a)&&a in ux)return ly[r]=i[a];return r}var lx=Gs("animationend"),cx=Gs("animationiteration"),fx=Gs("animationstart"),x8=Gs("transitionrun"),E8=Gs("transitionstart"),S8=Gs("transitioncancel"),hx=Gs("transitionend"),dx=new Map,cy="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");cy.push("scrollEnd");function Si(r,i){dx.set(r,i),qs(i,[r])}var jf=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof Ut=="object"&&typeof Ut.emit=="function"){Ut.emit("uncaughtException",r);return}console.error(r)},si=[],Ya=0,fy=0;function Df(){for(var r=Ya,i=fy=Ya=0;i<r;){var a=si[i];si[i++]=null;var d=si[i];si[i++]=null;var m=si[i];si[i++]=null;var E=si[i];if(si[i++]=null,d!==null&&m!==null){var V=d.pending;V===null?m.next=m:(m.next=V.next,V.next=m),d.pending=m}E!==0&&px(a,m,E)}}function Nf(r,i,a,d){si[Ya++]=r,si[Ya++]=i,si[Ya++]=a,si[Ya++]=d,fy|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function hy(r,i,a,d){return Nf(r,i,a,d),Pf(r)}function Ks(r,i){return Nf(r,null,null,i),Pf(r)}function px(r,i,a){r.lanes|=a;var d=r.alternate;d!==null&&(d.lanes|=a);for(var m=!1,E=r.return;E!==null;)E.childLanes|=a,d=E.alternate,d!==null&&(d.childLanes|=a),E.tag===22&&(r=E.stateNode,r===null||r._visibility&1||(m=!0)),r=E,E=E.return;return r.tag===3?(E=r.stateNode,m&&i!==null&&(m=31-Ke(a),r=E.hiddenUpdates,d=r[m],d===null?r[m]=[i]:d.push(i),i.lane=a|536870912),E):null}function Pf(r){if(50<zl)throw zl=0,wg=null,Error(o(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Va={};function I8(r,i,a,d){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $n(r,i,a,d){return new I8(r,i,a,d)}function dy(r){return r=r.prototype,!(!r||!r.isReactComponent)}function io(r,i){var a=r.alternate;return a===null?(a=$n(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&65011712,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a.refCleanup=r.refCleanup,a}function yx(r,i){r.flags&=65011714;var a=r.alternate;return a===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=a.childLanes,r.lanes=a.lanes,r.child=a.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=a.memoizedProps,r.memoizedState=a.memoizedState,r.updateQueue=a.updateQueue,r.type=a.type,i=a.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function kf(r,i,a,d,m,E){var V=0;if(d=r,typeof r=="function")dy(r)&&(V=1);else if(typeof r=="string")V=B4(r,a,W.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case U:return r=$n(31,a,i,m),r.elementType=U,r.lanes=E,r;case B:return Ys(a.children,m,E,i);case _:V=8,m|=24;break;case M:return r=$n(12,a,i,m|2),r.elementType=M,r.lanes=E,r;case T:return r=$n(13,a,i,m),r.elementType=T,r.lanes=E,r;case $:return r=$n(19,a,i,m),r.elementType=$,r.lanes=E,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case I:V=10;break e;case A:V=9;break e;case R:V=11;break e;case k:V=14;break e;case L:V=16,d=null;break e}V=29,a=Error(o(130,r===null?"null":typeof r,"")),d=null}return i=$n(V,a,i,m),i.elementType=r,i.type=d,i.lanes=E,i}function Ys(r,i,a,d){return r=$n(7,r,d,i),r.lanes=a,r}function py(r,i,a){return r=$n(6,r,null,i),r.lanes=a,r}function gx(r){var i=$n(18,null,null,0);return i.stateNode=r,i}function yy(r,i,a){return i=$n(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var mx=new WeakMap;function ai(r,i){if(typeof r=="object"&&r!==null){var a=mx.get(r);return a!==void 0?a:(i={value:r,source:i,stack:C(i)},mx.set(r,i),i)}return{value:r,source:i,stack:C(i)}}var Wa=[],Xa=0,Lf=null,vl=0,ui=[],li=0,Xo=null,Li=1,zi="";function oo(r,i){Wa[Xa++]=vl,Wa[Xa++]=Lf,Lf=r,vl=i}function bx(r,i,a){ui[li++]=Li,ui[li++]=zi,ui[li++]=Xo,Xo=r;var d=Li;r=zi;var m=32-Ke(d)-1;d&=~(1<<m),a+=1;var E=32-Ke(i)+m;if(30<E){var V=m-m%5;E=(d&(1<<V)-1).toString(32),d>>=V,m-=V,Li=1<<32-Ke(i)+m|a<<m|d,zi=E+r}else Li=1<<E|a<<m|d,zi=r}function gy(r){r.return!==null&&(oo(r,1),bx(r,1,0))}function my(r){for(;r===Lf;)Lf=Wa[--Xa],Wa[Xa]=null,vl=Wa[--Xa],Wa[Xa]=null;for(;r===Xo;)Xo=ui[--li],ui[li]=null,zi=ui[--li],ui[li]=null,Li=ui[--li],ui[li]=null}function Ax(r,i){ui[li++]=Li,ui[li++]=zi,ui[li++]=Xo,Li=i.id,zi=i.overflow,Xo=r}var Yr=null,Zt=null,Mt=!1,Zo=null,ci=!1,by=Error(o(519));function Jo(r){var i=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wl(ai(i,r)),by}function vx(r){var i=r.stateNode,a=r.type,d=r.memoizedProps;switch(i[Ht]=r,i[rr]=d,a){case"dialog":It("cancel",i),It("close",i);break;case"iframe":case"object":case"embed":It("load",i);break;case"video":case"audio":for(a=0;a<ql.length;a++)It(ql[a],i);break;case"source":It("error",i);break;case"img":case"image":case"link":It("error",i),It("load",i);break;case"details":It("toggle",i);break;case"input":It("invalid",i),Mw(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":It("invalid",i);break;case"textarea":It("invalid",i),jw(i,d.value,d.defaultValue,d.children)}a=d.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||d.suppressHydrationWarning===!0||PS(i.textContent,a)?(d.popover!=null&&(It("beforetoggle",i),It("toggle",i)),d.onScroll!=null&&It("scroll",i),d.onScrollEnd!=null&&It("scrollend",i),d.onClick!=null&&(i.onclick=ro),i=!0):i=!1,i||Jo(r,!0)}function xx(r){for(Yr=r.return;Yr;)switch(Yr.tag){case 5:case 31:case 13:ci=!1;return;case 27:case 3:ci=!0;return;default:Yr=Yr.return}}function Za(r){if(r!==Yr)return!1;if(!Mt)return xx(r),Mt=!0,!1;var i=r.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=r.type,a=!(a!=="form"&&a!=="button")||Dg(r.type,r.memoizedProps)),a=!a),a&&Zt&&Jo(r),xx(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));Zt=KS(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));Zt=KS(r)}else i===27?(i=Zt,ds(r.type)?(r=zg,zg=null,Zt=r):Zt=i):Zt=Yr?hi(r.stateNode.nextSibling):null;return!0}function Vs(){Zt=Yr=null,Mt=!1}function Ay(){var r=Zo;return r!==null&&(_n===null?_n=r:_n.push.apply(_n,r),Zo=null),r}function wl(r){Zo===null?Zo=[r]:Zo.push(r)}var vy=G(null),Ws=null,so=null;function es(r,i,a){K(vy,i._currentValue),i._currentValue=a}function ao(r){r._currentValue=vy.current,H(vy)}function wy(r,i,a){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===a)break;r=r.return}}function xy(r,i,a,d){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var E=m.dependencies;if(E!==null){var V=m.child;E=E.firstContext;e:for(;E!==null;){var ge=E;E=m;for(var Fe=0;Fe<i.length;Fe++)if(ge.context===i[Fe]){E.lanes|=a,ge=E.alternate,ge!==null&&(ge.lanes|=a),wy(E.return,a,r),d||(V=null);break e}E=ge.next}}else if(m.tag===18){if(V=m.return,V===null)throw Error(o(341));V.lanes|=a,E=V.alternate,E!==null&&(E.lanes|=a),wy(V,a,r),V=null}else V=m.child;if(V!==null)V.return=m;else for(V=m;V!==null;){if(V===r){V=null;break}if(m=V.sibling,m!==null){m.return=V.return,V=m;break}V=V.return}m=V}}function Ja(r,i,a,d){r=null;for(var m=i,E=!1;m!==null;){if(!E){if((m.flags&524288)!==0)E=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var V=m.alternate;if(V===null)throw Error(o(387));if(V=V.memoizedProps,V!==null){var ge=m.type;zn(m.pendingProps.value,V.value)||(r!==null?r.push(ge):r=[ge])}}else if(m===ae.current){if(V=m.alternate,V===null)throw Error(o(387));V.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Yl):r=[Yl])}m=m.return}r!==null&&xy(i,r,a,d),i.flags|=262144}function zf(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Xs(r){Ws=r,so=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Vr(r){return Ex(Ws,r)}function $f(r,i){return Ws===null&&Xs(r),Ex(r,i)}function Ex(r,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},so===null){if(r===null)throw Error(o(308));so=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else so=so.next=i;return a}var _8=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(a,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(a){return a()})}},C8=e.unstable_scheduleCallback,F8=e.unstable_NormalPriority,vr={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ey(){return{controller:new _8,data:new Map,refCount:0}}function xl(r){r.refCount--,r.refCount===0&&C8(F8,function(){r.controller.abort()})}var El=null,Sy=0,eu=0,tu=null;function O8(r,i){if(El===null){var a=El=[];Sy=0,eu=Cg(),tu={status:"pending",value:void 0,then:function(d){a.push(d)}}}return Sy++,i.then(Sx,Sx),i}function Sx(){if(--Sy===0&&El!==null){tu!==null&&(tu.status="fulfilled");var r=El;El=null,eu=0,tu=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function B8(r,i){var a=[],d={status:"pending",value:null,reason:null,then:function(m){a.push(m)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var m=0;m<a.length;m++)(0,a[m])(i)},function(m){for(d.status="rejected",d.reason=m,m=0;m<a.length;m++)(0,a[m])(void 0)}),d}var Ix=X.S;X.S=function(r,i){uS=de(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&O8(r,i),Ix!==null&&Ix(r,i)};var Zs=G(null);function Iy(){var r=Zs.current;return r!==null?r:Vt.pooledCache}function qf(r,i){i===null?K(Zs,Zs.current):K(Zs,i.pool)}function _x(){var r=Iy();return r===null?null:{parent:vr._currentValue,pool:r}}var ru=Error(o(460)),_y=Error(o(474)),Hf=Error(o(542)),Qf={then:function(){}};function Cx(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Fx(r,i,a){switch(a=r[a],a===void 0?r.push(i):a!==i&&(i.then(ro,ro),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Bx(r),r;default:if(typeof i.status=="string")i.then(ro,ro);else{if(r=Vt,r!==null&&100<r.shellSuspendCounter)throw Error(o(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=d}},function(d){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Bx(r),r}throw ea=i,ru}}function Js(r){try{var i=r._init;return i(r._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ea=a,ru):a}}var ea=null;function Ox(){if(ea===null)throw Error(o(459));var r=ea;return ea=null,r}function Bx(r){if(r===ru||r===Hf)throw Error(o(483))}var nu=null,Sl=0;function Gf(r){var i=Sl;return Sl+=1,nu===null&&(nu=[]),Fx(nu,r,i)}function Il(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Kf(r,i){throw i.$$typeof===g?Error(o(525)):(r=Object.prototype.toString.call(i),Error(o(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function Tx(r){function i(Be,Oe){if(r){var Re=Be.deletions;Re===null?(Be.deletions=[Oe],Be.flags|=16):Re.push(Oe)}}function a(Be,Oe){if(!r)return null;for(;Oe!==null;)i(Be,Oe),Oe=Oe.sibling;return null}function d(Be){for(var Oe=new Map;Be!==null;)Be.key!==null?Oe.set(Be.key,Be):Oe.set(Be.index,Be),Be=Be.sibling;return Oe}function m(Be,Oe){return Be=io(Be,Oe),Be.index=0,Be.sibling=null,Be}function E(Be,Oe,Re){return Be.index=Re,r?(Re=Be.alternate,Re!==null?(Re=Re.index,Re<Oe?(Be.flags|=67108866,Oe):Re):(Be.flags|=67108866,Oe)):(Be.flags|=1048576,Oe)}function V(Be){return r&&Be.alternate===null&&(Be.flags|=67108866),Be}function ge(Be,Oe,Re,Qe){return Oe===null||Oe.tag!==6?(Oe=py(Re,Be.mode,Qe),Oe.return=Be,Oe):(Oe=m(Oe,Re),Oe.return=Be,Oe)}function Fe(Be,Oe,Re,Qe){var pt=Re.type;return pt===B?$e(Be,Oe,Re.props.children,Qe,Re.key):Oe!==null&&(Oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===L&&Js(pt)===Oe.type)?(Oe=m(Oe,Re.props),Il(Oe,Re),Oe.return=Be,Oe):(Oe=kf(Re.type,Re.key,Re.props,null,Be.mode,Qe),Il(Oe,Re),Oe.return=Be,Oe)}function Me(Be,Oe,Re,Qe){return Oe===null||Oe.tag!==4||Oe.stateNode.containerInfo!==Re.containerInfo||Oe.stateNode.implementation!==Re.implementation?(Oe=yy(Re,Be.mode,Qe),Oe.return=Be,Oe):(Oe=m(Oe,Re.children||[]),Oe.return=Be,Oe)}function $e(Be,Oe,Re,Qe,pt){return Oe===null||Oe.tag!==7?(Oe=Ys(Re,Be.mode,Qe,pt),Oe.return=Be,Oe):(Oe=m(Oe,Re),Oe.return=Be,Oe)}function Ge(Be,Oe,Re){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number"||typeof Oe=="bigint")return Oe=py(""+Oe,Be.mode,Re),Oe.return=Be,Oe;if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case b:return Re=kf(Oe.type,Oe.key,Oe.props,null,Be.mode,Re),Il(Re,Oe),Re.return=Be,Re;case w:return Oe=yy(Oe,Be.mode,Re),Oe.return=Be,Oe;case L:return Oe=Js(Oe),Ge(Be,Oe,Re)}if(oe(Oe)||P(Oe))return Oe=Ys(Oe,Be.mode,Re,null),Oe.return=Be,Oe;if(typeof Oe.then=="function")return Ge(Be,Gf(Oe),Re);if(Oe.$$typeof===I)return Ge(Be,$f(Be,Oe),Re);Kf(Be,Oe)}return null}function Ue(Be,Oe,Re,Qe){var pt=Oe!==null?Oe.key:null;if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return pt!==null?null:ge(Be,Oe,""+Re,Qe);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case b:return Re.key===pt?Fe(Be,Oe,Re,Qe):null;case w:return Re.key===pt?Me(Be,Oe,Re,Qe):null;case L:return Re=Js(Re),Ue(Be,Oe,Re,Qe)}if(oe(Re)||P(Re))return pt!==null?null:$e(Be,Oe,Re,Qe,null);if(typeof Re.then=="function")return Ue(Be,Oe,Gf(Re),Qe);if(Re.$$typeof===I)return Ue(Be,Oe,$f(Be,Re),Qe);Kf(Be,Re)}return null}function Ne(Be,Oe,Re,Qe,pt){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"||typeof Qe=="bigint")return Be=Be.get(Re)||null,ge(Oe,Be,""+Qe,pt);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case b:return Be=Be.get(Qe.key===null?Re:Qe.key)||null,Fe(Oe,Be,Qe,pt);case w:return Be=Be.get(Qe.key===null?Re:Qe.key)||null,Me(Oe,Be,Qe,pt);case L:return Qe=Js(Qe),Ne(Be,Oe,Re,Qe,pt)}if(oe(Qe)||P(Qe))return Be=Be.get(Re)||null,$e(Oe,Be,Qe,pt,null);if(typeof Qe.then=="function")return Ne(Be,Oe,Re,Gf(Qe),pt);if(Qe.$$typeof===I)return Ne(Be,Oe,Re,$f(Oe,Qe),pt);Kf(Oe,Qe)}return null}function ut(Be,Oe,Re,Qe){for(var pt=null,jt=null,ct=Oe,xt=Oe=0,Ot=null;ct!==null&&xt<Re.length;xt++){ct.index>xt?(Ot=ct,ct=null):Ot=ct.sibling;var Dt=Ue(Be,ct,Re[xt],Qe);if(Dt===null){ct===null&&(ct=Ot);break}r&&ct&&Dt.alternate===null&&i(Be,ct),Oe=E(Dt,Oe,xt),jt===null?pt=Dt:jt.sibling=Dt,jt=Dt,ct=Ot}if(xt===Re.length)return a(Be,ct),Mt&&oo(Be,xt),pt;if(ct===null){for(;xt<Re.length;xt++)ct=Ge(Be,Re[xt],Qe),ct!==null&&(Oe=E(ct,Oe,xt),jt===null?pt=ct:jt.sibling=ct,jt=ct);return Mt&&oo(Be,xt),pt}for(ct=d(ct);xt<Re.length;xt++)Ot=Ne(ct,Be,xt,Re[xt],Qe),Ot!==null&&(r&&Ot.alternate!==null&&ct.delete(Ot.key===null?xt:Ot.key),Oe=E(Ot,Oe,xt),jt===null?pt=Ot:jt.sibling=Ot,jt=Ot);return r&&ct.forEach(function(bs){return i(Be,bs)}),Mt&&oo(Be,xt),pt}function mt(Be,Oe,Re,Qe){if(Re==null)throw Error(o(151));for(var pt=null,jt=null,ct=Oe,xt=Oe=0,Ot=null,Dt=Re.next();ct!==null&&!Dt.done;xt++,Dt=Re.next()){ct.index>xt?(Ot=ct,ct=null):Ot=ct.sibling;var bs=Ue(Be,ct,Dt.value,Qe);if(bs===null){ct===null&&(ct=Ot);break}r&&ct&&bs.alternate===null&&i(Be,ct),Oe=E(bs,Oe,xt),jt===null?pt=bs:jt.sibling=bs,jt=bs,ct=Ot}if(Dt.done)return a(Be,ct),Mt&&oo(Be,xt),pt;if(ct===null){for(;!Dt.done;xt++,Dt=Re.next())Dt=Ge(Be,Dt.value,Qe),Dt!==null&&(Oe=E(Dt,Oe,xt),jt===null?pt=Dt:jt.sibling=Dt,jt=Dt);return Mt&&oo(Be,xt),pt}for(ct=d(ct);!Dt.done;xt++,Dt=Re.next())Dt=Ne(ct,Be,xt,Dt.value,Qe),Dt!==null&&(r&&Dt.alternate!==null&&ct.delete(Dt.key===null?xt:Dt.key),Oe=E(Dt,Oe,xt),jt===null?pt=Dt:jt.sibling=Dt,jt=Dt);return r&&ct.forEach(function(z4){return i(Be,z4)}),Mt&&oo(Be,xt),pt}function Kt(Be,Oe,Re,Qe){if(typeof Re=="object"&&Re!==null&&Re.type===B&&Re.key===null&&(Re=Re.props.children),typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case b:e:{for(var pt=Re.key;Oe!==null;){if(Oe.key===pt){if(pt=Re.type,pt===B){if(Oe.tag===7){a(Be,Oe.sibling),Qe=m(Oe,Re.props.children),Qe.return=Be,Be=Qe;break e}}else if(Oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===L&&Js(pt)===Oe.type){a(Be,Oe.sibling),Qe=m(Oe,Re.props),Il(Qe,Re),Qe.return=Be,Be=Qe;break e}a(Be,Oe);break}else i(Be,Oe);Oe=Oe.sibling}Re.type===B?(Qe=Ys(Re.props.children,Be.mode,Qe,Re.key),Qe.return=Be,Be=Qe):(Qe=kf(Re.type,Re.key,Re.props,null,Be.mode,Qe),Il(Qe,Re),Qe.return=Be,Be=Qe)}return V(Be);case w:e:{for(pt=Re.key;Oe!==null;){if(Oe.key===pt)if(Oe.tag===4&&Oe.stateNode.containerInfo===Re.containerInfo&&Oe.stateNode.implementation===Re.implementation){a(Be,Oe.sibling),Qe=m(Oe,Re.children||[]),Qe.return=Be,Be=Qe;break e}else{a(Be,Oe);break}else i(Be,Oe);Oe=Oe.sibling}Qe=yy(Re,Be.mode,Qe),Qe.return=Be,Be=Qe}return V(Be);case L:return Re=Js(Re),Kt(Be,Oe,Re,Qe)}if(oe(Re))return ut(Be,Oe,Re,Qe);if(P(Re)){if(pt=P(Re),typeof pt!="function")throw Error(o(150));return Re=pt.call(Re),mt(Be,Oe,Re,Qe)}if(typeof Re.then=="function")return Kt(Be,Oe,Gf(Re),Qe);if(Re.$$typeof===I)return Kt(Be,Oe,$f(Be,Re),Qe);Kf(Be,Re)}return typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint"?(Re=""+Re,Oe!==null&&Oe.tag===6?(a(Be,Oe.sibling),Qe=m(Oe,Re),Qe.return=Be,Be=Qe):(a(Be,Oe),Qe=py(Re,Be.mode,Qe),Qe.return=Be,Be=Qe),V(Be)):a(Be,Oe)}return function(Be,Oe,Re,Qe){try{Sl=0;var pt=Kt(Be,Oe,Re,Qe);return nu=null,pt}catch(ct){if(ct===ru||ct===Hf)throw ct;var jt=$n(29,ct,null,Be.mode);return jt.lanes=Qe,jt.return=Be,jt}finally{}}}var ta=Tx(!0),Rx=Tx(!1),ts=!1;function Cy(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fy(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function rs(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ns(r,i,a){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Pt&2)!==0){var m=d.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),d.pending=i,i=Pf(r),px(r,null,a),i}return Nf(r,d,i,a),Pf(r)}function _l(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,a|=d,i.lanes=a,Je(r,a)}}function Oy(r,i){var a=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,a===d)){var m=null,E=null;if(a=a.firstBaseUpdate,a!==null){do{var V={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};E===null?m=E=V:E=E.next=V,a=a.next}while(a!==null);E===null?m=E=i:E=E.next=i}else m=E=i;a={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:E,shared:d.shared,callbacks:d.callbacks},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}var By=!1;function Cl(){if(By){var r=tu;if(r!==null)throw r}}function Fl(r,i,a,d){By=!1;var m=r.updateQueue;ts=!1;var E=m.firstBaseUpdate,V=m.lastBaseUpdate,ge=m.shared.pending;if(ge!==null){m.shared.pending=null;var Fe=ge,Me=Fe.next;Fe.next=null,V===null?E=Me:V.next=Me,V=Fe;var $e=r.alternate;$e!==null&&($e=$e.updateQueue,ge=$e.lastBaseUpdate,ge!==V&&(ge===null?$e.firstBaseUpdate=Me:ge.next=Me,$e.lastBaseUpdate=Fe))}if(E!==null){var Ge=m.baseState;V=0,$e=Me=Fe=null,ge=E;do{var Ue=ge.lane&-536870913,Ne=Ue!==ge.lane;if(Ne?(Ft&Ue)===Ue:(d&Ue)===Ue){Ue!==0&&Ue===eu&&(By=!0),$e!==null&&($e=$e.next={lane:0,tag:ge.tag,payload:ge.payload,callback:null,next:null});e:{var ut=r,mt=ge;Ue=i;var Kt=a;switch(mt.tag){case 1:if(ut=mt.payload,typeof ut=="function"){Ge=ut.call(Kt,Ge,Ue);break e}Ge=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=mt.payload,Ue=typeof ut=="function"?ut.call(Kt,Ge,Ue):ut,Ue==null)break e;Ge=y({},Ge,Ue);break e;case 2:ts=!0}}Ue=ge.callback,Ue!==null&&(r.flags|=64,Ne&&(r.flags|=8192),Ne=m.callbacks,Ne===null?m.callbacks=[Ue]:Ne.push(Ue))}else Ne={lane:Ue,tag:ge.tag,payload:ge.payload,callback:ge.callback,next:null},$e===null?(Me=$e=Ne,Fe=Ge):$e=$e.next=Ne,V|=Ue;if(ge=ge.next,ge===null){if(ge=m.shared.pending,ge===null)break;Ne=ge,ge=Ne.next,Ne.next=null,m.lastBaseUpdate=Ne,m.shared.pending=null}}while(!0);$e===null&&(Fe=Ge),m.baseState=Fe,m.firstBaseUpdate=Me,m.lastBaseUpdate=$e,E===null&&(m.shared.lanes=0),us|=V,r.lanes=V,r.memoizedState=Ge}}function Mx(r,i){if(typeof r!="function")throw Error(o(191,r));r.call(i)}function Ux(r,i){var a=r.callbacks;if(a!==null)for(r.callbacks=null,r=0;r<a.length;r++)Mx(a[r],i)}var iu=G(null),Yf=G(0);function jx(r,i){r=mo,K(Yf,r),K(iu,i),mo=r|i.baseLanes}function Ty(){K(Yf,mo),K(iu,iu.current)}function Ry(){mo=Yf.current,H(iu),H(Yf)}var qn=G(null),fi=null;function is(r){var i=r.alternate;K(yr,yr.current&1),K(qn,r),fi===null&&(i===null||iu.current!==null||i.memoizedState!==null)&&(fi=r)}function My(r){K(yr,yr.current),K(qn,r),fi===null&&(fi=r)}function Dx(r){r.tag===22?(K(yr,yr.current),K(qn,r),fi===null&&(fi=r)):os()}function os(){K(yr,yr.current),K(qn,qn.current)}function Hn(r){H(qn),fi===r&&(fi=null),H(yr)}var yr=G(0);function Vf(r){for(var i=r;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||kg(a)||Lg(a)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var uo=0,wt=null,Qt=null,wr=null,Wf=!1,ou=!1,ra=!1,Xf=0,Ol=0,su=null,T8=0;function cr(){throw Error(o(321))}function Uy(r,i){if(i===null)return!1;for(var a=0;a<i.length&&a<r.length;a++)if(!zn(r[a],i[a]))return!1;return!0}function jy(r,i,a,d,m,E){return uo=E,wt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,X.H=r===null||r.memoizedState===null?AE:Wy,ra=!1,E=a(d,m),ra=!1,ou&&(E=Px(i,a,d,m)),Nx(r),E}function Nx(r){X.H=Rl;var i=Qt!==null&&Qt.next!==null;if(uo=0,wr=Qt=wt=null,Wf=!1,Ol=0,su=null,i)throw Error(o(300));r===null||xr||(r=r.dependencies,r!==null&&zf(r)&&(xr=!0))}function Px(r,i,a,d){wt=r;var m=0;do{if(ou&&(su=null),Ol=0,ou=!1,25<=m)throw Error(o(301));if(m+=1,wr=Qt=null,r.updateQueue!=null){var E=r.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}X.H=vE,E=i(a,d)}while(ou);return E}function R8(){var r=X.H,i=r.useState()[0];return i=typeof i.then=="function"?Bl(i):i,r=r.useState()[0],(Qt!==null?Qt.memoizedState:null)!==r&&(wt.flags|=1024),i}function Dy(){var r=Xf!==0;return Xf=0,r}function Ny(r,i,a){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~a}function Py(r){if(Wf){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Wf=!1}uo=0,wr=Qt=wt=null,ou=!1,Ol=Xf=0,su=null}function mn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wr===null?wt.memoizedState=wr=r:wr=wr.next=r,wr}function gr(){if(Qt===null){var r=wt.alternate;r=r!==null?r.memoizedState:null}else r=Qt.next;var i=wr===null?wt.memoizedState:wr.next;if(i!==null)wr=i,Qt=r;else{if(r===null)throw wt.alternate===null?Error(o(467)):Error(o(310));Qt=r,r={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},wr===null?wt.memoizedState=wr=r:wr=wr.next=r}return wr}function Zf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bl(r){var i=Ol;return Ol+=1,su===null&&(su=[]),r=Fx(su,r,i),i=wt,(wr===null?i.memoizedState:wr.next)===null&&(i=i.alternate,X.H=i===null||i.memoizedState===null?AE:Wy),r}function Jf(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Bl(r);if(r.$$typeof===I)return Vr(r)}throw Error(o(438,String(r)))}function ky(r){var i=null,a=wt.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var d=wt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=Zf(),wt.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(r),d=0;d<r;d++)a[d]=j;return i.index++,a}function lo(r,i){return typeof i=="function"?i(r):i}function eh(r){var i=gr();return Ly(i,Qt,r)}function Ly(r,i,a){var d=r.queue;if(d===null)throw Error(o(311));d.lastRenderedReducer=a;var m=r.baseQueue,E=d.pending;if(E!==null){if(m!==null){var V=m.next;m.next=E.next,E.next=V}i.baseQueue=m=E,d.pending=null}if(E=r.baseState,m===null)r.memoizedState=E;else{i=m.next;var ge=V=null,Fe=null,Me=i,$e=!1;do{var Ge=Me.lane&-536870913;if(Ge!==Me.lane?(Ft&Ge)===Ge:(uo&Ge)===Ge){var Ue=Me.revertLane;if(Ue===0)Fe!==null&&(Fe=Fe.next={lane:0,revertLane:0,gesture:null,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null}),Ge===eu&&($e=!0);else if((uo&Ue)===Ue){Me=Me.next,Ue===eu&&($e=!0);continue}else Ge={lane:0,revertLane:Me.revertLane,gesture:null,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},Fe===null?(ge=Fe=Ge,V=E):Fe=Fe.next=Ge,wt.lanes|=Ue,us|=Ue;Ge=Me.action,ra&&a(E,Ge),E=Me.hasEagerState?Me.eagerState:a(E,Ge)}else Ue={lane:Ge,revertLane:Me.revertLane,gesture:Me.gesture,action:Me.action,hasEagerState:Me.hasEagerState,eagerState:Me.eagerState,next:null},Fe===null?(ge=Fe=Ue,V=E):Fe=Fe.next=Ue,wt.lanes|=Ge,us|=Ge;Me=Me.next}while(Me!==null&&Me!==i);if(Fe===null?V=E:Fe.next=ge,!zn(E,r.memoizedState)&&(xr=!0,$e&&(a=tu,a!==null)))throw a;r.memoizedState=E,r.baseState=V,r.baseQueue=Fe,d.lastRenderedState=E}return m===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function zy(r){var i=gr(),a=i.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=a.dispatch,m=a.pending,E=i.memoizedState;if(m!==null){a.pending=null;var V=m=m.next;do E=r(E,V.action),V=V.next;while(V!==m);zn(E,i.memoizedState)||(xr=!0),i.memoizedState=E,i.baseQueue===null&&(i.baseState=E),a.lastRenderedState=E}return[E,d]}function kx(r,i,a){var d=wt,m=gr(),E=Mt;if(E){if(a===void 0)throw Error(o(407));a=a()}else a=i();var V=!zn((Qt||m).memoizedState,a);if(V&&(m.memoizedState=a,xr=!0),m=m.queue,Hy($x.bind(null,d,m,r),[r]),m.getSnapshot!==i||V||wr!==null&&wr.memoizedState.tag&1){if(d.flags|=2048,au(9,{destroy:void 0},zx.bind(null,d,m,a,i),null),Vt===null)throw Error(o(349));E||(uo&127)!==0||Lx(d,i,a)}return a}function Lx(r,i,a){r.flags|=16384,r={getSnapshot:i,value:a},i=wt.updateQueue,i===null?(i=Zf(),wt.updateQueue=i,i.stores=[r]):(a=i.stores,a===null?i.stores=[r]:a.push(r))}function zx(r,i,a,d){i.value=a,i.getSnapshot=d,qx(i)&&Hx(r)}function $x(r,i,a){return a(function(){qx(i)&&Hx(r)})}function qx(r){var i=r.getSnapshot;r=r.value;try{var a=i();return!zn(r,a)}catch{return!0}}function Hx(r){var i=Ks(r,2);i!==null&&Cn(i,r,2)}function $y(r){var i=mn();if(typeof r=="function"){var a=r;if(r=a(),ra){He(!0);try{a()}finally{He(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:r},i}function Qx(r,i,a,d){return r.baseState=a,Ly(r,Qt,typeof d=="function"?d:lo)}function M8(r,i,a,d,m){if(nh(r))throw Error(o(485));if(r=i.action,r!==null){var E={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(V){E.listeners.push(V)}};X.T!==null?a(!0):E.isTransition=!1,d(E),a=i.pending,a===null?(E.next=i.pending=E,Gx(i,E)):(E.next=a.next,i.pending=a.next=E)}}function Gx(r,i){var a=i.action,d=i.payload,m=r.state;if(i.isTransition){var E=X.T,V={};X.T=V;try{var ge=a(m,d),Fe=X.S;Fe!==null&&Fe(V,ge),Kx(r,i,ge)}catch(Me){qy(r,i,Me)}finally{E!==null&&V.types!==null&&(E.types=V.types),X.T=E}}else try{E=a(m,d),Kx(r,i,E)}catch(Me){qy(r,i,Me)}}function Kx(r,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(d){Yx(r,i,d)},function(d){return qy(r,i,d)}):Yx(r,i,a)}function Yx(r,i,a){i.status="fulfilled",i.value=a,Vx(i),r.state=a,i=r.pending,i!==null&&(a=i.next,a===i?r.pending=null:(a=a.next,i.next=a,Gx(r,a)))}function qy(r,i,a){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=a,Vx(i),i=i.next;while(i!==d)}r.action=null}function Vx(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Wx(r,i){return i}function Xx(r,i){if(Mt){var a=Vt.formState;if(a!==null){e:{var d=wt;if(Mt){if(Zt){t:{for(var m=Zt,E=ci;m.nodeType!==8;){if(!E){m=null;break t}if(m=hi(m.nextSibling),m===null){m=null;break t}}E=m.data,m=E==="F!"||E==="F"?m:null}if(m){Zt=hi(m.nextSibling),d=m.data==="F!";break e}}Jo(d)}d=!1}d&&(i=a[0])}}return a=mn(),a.memoizedState=a.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wx,lastRenderedState:i},a.queue=d,a=gE.bind(null,wt,d),d.dispatch=a,d=$y(!1),E=Vy.bind(null,wt,!1,d.queue),d=mn(),m={state:i,dispatch:null,action:r,pending:null},d.queue=m,a=M8.bind(null,wt,m,E,a),m.dispatch=a,d.memoizedState=r,[i,a,!1]}function Zx(r){var i=gr();return Jx(i,Qt,r)}function Jx(r,i,a){if(i=Ly(r,i,Wx)[0],r=eh(lo)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=Bl(i)}catch(V){throw V===ru?Hf:V}else d=i;i=gr();var m=i.queue,E=m.dispatch;return a!==i.memoizedState&&(wt.flags|=2048,au(9,{destroy:void 0},U8.bind(null,m,a),null)),[d,E,r]}function U8(r,i){r.action=i}function eE(r){var i=gr(),a=Qt;if(a!==null)return Jx(i,a,r);gr(),i=i.memoizedState,a=gr();var d=a.queue.dispatch;return a.memoizedState=r,[i,d,!1]}function au(r,i,a,d){return r={tag:r,create:a,deps:d,inst:i,next:null},i=wt.updateQueue,i===null&&(i=Zf(),wt.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=r.next=r:(d=a.next,a.next=r,r.next=d,i.lastEffect=r),r}function tE(){return gr().memoizedState}function th(r,i,a,d){var m=mn();wt.flags|=r,m.memoizedState=au(1|i,{destroy:void 0},a,d===void 0?null:d)}function rh(r,i,a,d){var m=gr();d=d===void 0?null:d;var E=m.memoizedState.inst;Qt!==null&&d!==null&&Uy(d,Qt.memoizedState.deps)?m.memoizedState=au(i,E,a,d):(wt.flags|=r,m.memoizedState=au(1|i,E,a,d))}function rE(r,i){th(8390656,8,r,i)}function Hy(r,i){rh(2048,8,r,i)}function j8(r){wt.flags|=4;var i=wt.updateQueue;if(i===null)i=Zf(),wt.updateQueue=i,i.events=[r];else{var a=i.events;a===null?i.events=[r]:a.push(r)}}function nE(r){var i=gr().memoizedState;return j8({ref:i,nextImpl:r}),function(){if((Pt&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}function iE(r,i){return rh(4,2,r,i)}function oE(r,i){return rh(4,4,r,i)}function sE(r,i){if(typeof i=="function"){r=r();var a=i(r);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function aE(r,i,a){a=a!=null?a.concat([r]):null,rh(4,4,sE.bind(null,i,r),a)}function Qy(){}function uE(r,i){var a=gr();i=i===void 0?null:i;var d=a.memoizedState;return i!==null&&Uy(i,d[1])?d[0]:(a.memoizedState=[r,i],r)}function lE(r,i){var a=gr();i=i===void 0?null:i;var d=a.memoizedState;if(i!==null&&Uy(i,d[1]))return d[0];if(d=r(),ra){He(!0);try{r()}finally{He(!1)}}return a.memoizedState=[d,i],d}function Gy(r,i,a){return a===void 0||(uo&1073741824)!==0&&(Ft&261930)===0?r.memoizedState=i:(r.memoizedState=a,r=cS(),wt.lanes|=r,us|=r,a)}function cE(r,i,a,d){return zn(a,i)?a:iu.current!==null?(r=Gy(r,a,d),zn(r,i)||(xr=!0),r):(uo&42)===0||(uo&1073741824)!==0&&(Ft&261930)===0?(xr=!0,r.memoizedState=a):(r=cS(),wt.lanes|=r,us|=r,i)}function fE(r,i,a,d,m){var E=te.p;te.p=E!==0&&8>E?E:8;var V=X.T,ge={};X.T=ge,Vy(r,!1,i,a);try{var Fe=m(),Me=X.S;if(Me!==null&&Me(ge,Fe),Fe!==null&&typeof Fe=="object"&&typeof Fe.then=="function"){var $e=B8(Fe,d);Tl(r,i,$e,Kn(r))}else Tl(r,i,d,Kn(r))}catch(Ge){Tl(r,i,{then:function(){},status:"rejected",reason:Ge},Kn())}finally{te.p=E,V!==null&&ge.types!==null&&(V.types=ge.types),X.T=V}}function D8(){}function Ky(r,i,a,d){if(r.tag!==5)throw Error(o(476));var m=hE(r).queue;fE(r,m,i,pe,a===null?D8:function(){return dE(r),a(d)})}function hE(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:pe},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:a},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function dE(r){var i=hE(r);i.next===null&&(i=r.alternate.memoizedState),Tl(r,i.next.queue,{},Kn())}function Yy(){return Vr(Yl)}function pE(){return gr().memoizedState}function yE(){return gr().memoizedState}function N8(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var a=Kn();r=rs(a);var d=ns(i,r,a);d!==null&&(Cn(d,i,a),_l(d,i,a)),i={cache:Ey()},r.payload=i;return}i=i.return}}function P8(r,i,a){var d=Kn();a={lane:d,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},nh(r)?mE(i,a):(a=hy(r,i,a,d),a!==null&&(Cn(a,r,d),bE(a,i,d)))}function gE(r,i,a){var d=Kn();Tl(r,i,a,d)}function Tl(r,i,a,d){var m={lane:d,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(nh(r))mE(i,m);else{var E=r.alternate;if(r.lanes===0&&(E===null||E.lanes===0)&&(E=i.lastRenderedReducer,E!==null))try{var V=i.lastRenderedState,ge=E(V,a);if(m.hasEagerState=!0,m.eagerState=ge,zn(ge,V))return Nf(r,i,m,0),Vt===null&&Df(),!1}catch{}finally{}if(a=hy(r,i,m,d),a!==null)return Cn(a,r,d),bE(a,i,d),!0}return!1}function Vy(r,i,a,d){if(d={lane:2,revertLane:Cg(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},nh(r)){if(i)throw Error(o(479))}else i=hy(r,a,d,2),i!==null&&Cn(i,r,2)}function nh(r){var i=r.alternate;return r===wt||i!==null&&i===wt}function mE(r,i){ou=Wf=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function bE(r,i,a){if((a&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,a|=d,i.lanes=a,Je(r,a)}}var Rl={readContext:Vr,use:Jf,useCallback:cr,useContext:cr,useEffect:cr,useImperativeHandle:cr,useLayoutEffect:cr,useInsertionEffect:cr,useMemo:cr,useReducer:cr,useRef:cr,useState:cr,useDebugValue:cr,useDeferredValue:cr,useTransition:cr,useSyncExternalStore:cr,useId:cr,useHostTransitionStatus:cr,useFormState:cr,useActionState:cr,useOptimistic:cr,useMemoCache:cr,useCacheRefresh:cr};Rl.useEffectEvent=cr;var AE={readContext:Vr,use:Jf,useCallback:function(r,i){return mn().memoizedState=[r,i===void 0?null:i],r},useContext:Vr,useEffect:rE,useImperativeHandle:function(r,i,a){a=a!=null?a.concat([r]):null,th(4194308,4,sE.bind(null,i,r),a)},useLayoutEffect:function(r,i){return th(4194308,4,r,i)},useInsertionEffect:function(r,i){th(4,2,r,i)},useMemo:function(r,i){var a=mn();i=i===void 0?null:i;var d=r();if(ra){He(!0);try{r()}finally{He(!1)}}return a.memoizedState=[d,i],d},useReducer:function(r,i,a){var d=mn();if(a!==void 0){var m=a(i);if(ra){He(!0);try{a(i)}finally{He(!1)}}}else m=i;return d.memoizedState=d.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},d.queue=r,r=r.dispatch=P8.bind(null,wt,r),[d.memoizedState,r]},useRef:function(r){var i=mn();return r={current:r},i.memoizedState=r},useState:function(r){r=$y(r);var i=r.queue,a=gE.bind(null,wt,i);return i.dispatch=a,[r.memoizedState,a]},useDebugValue:Qy,useDeferredValue:function(r,i){var a=mn();return Gy(a,r,i)},useTransition:function(){var r=$y(!1);return r=fE.bind(null,wt,r.queue,!0,!1),mn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,a){var d=wt,m=mn();if(Mt){if(a===void 0)throw Error(o(407));a=a()}else{if(a=i(),Vt===null)throw Error(o(349));(Ft&127)!==0||Lx(d,i,a)}m.memoizedState=a;var E={value:a,getSnapshot:i};return m.queue=E,rE($x.bind(null,d,E,r),[r]),d.flags|=2048,au(9,{destroy:void 0},zx.bind(null,d,E,a,i),null),a},useId:function(){var r=mn(),i=Vt.identifierPrefix;if(Mt){var a=zi,d=Li;a=(d&~(1<<32-Ke(d)-1)).toString(32)+a,i="_"+i+"R_"+a,a=Xf++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=T8++,i="_"+i+"r_"+a.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Yy,useFormState:Xx,useActionState:Xx,useOptimistic:function(r){var i=mn();i.memoizedState=i.baseState=r;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=Vy.bind(null,wt,!0,a),a.dispatch=i,[r,i]},useMemoCache:ky,useCacheRefresh:function(){return mn().memoizedState=N8.bind(null,wt)},useEffectEvent:function(r){var i=mn(),a={impl:r};return i.memoizedState=a,function(){if((Pt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Wy={readContext:Vr,use:Jf,useCallback:uE,useContext:Vr,useEffect:Hy,useImperativeHandle:aE,useInsertionEffect:iE,useLayoutEffect:oE,useMemo:lE,useReducer:eh,useRef:tE,useState:function(){return eh(lo)},useDebugValue:Qy,useDeferredValue:function(r,i){var a=gr();return cE(a,Qt.memoizedState,r,i)},useTransition:function(){var r=eh(lo)[0],i=gr().memoizedState;return[typeof r=="boolean"?r:Bl(r),i]},useSyncExternalStore:kx,useId:pE,useHostTransitionStatus:Yy,useFormState:Zx,useActionState:Zx,useOptimistic:function(r,i){var a=gr();return Qx(a,Qt,r,i)},useMemoCache:ky,useCacheRefresh:yE};Wy.useEffectEvent=nE;var vE={readContext:Vr,use:Jf,useCallback:uE,useContext:Vr,useEffect:Hy,useImperativeHandle:aE,useInsertionEffect:iE,useLayoutEffect:oE,useMemo:lE,useReducer:zy,useRef:tE,useState:function(){return zy(lo)},useDebugValue:Qy,useDeferredValue:function(r,i){var a=gr();return Qt===null?Gy(a,r,i):cE(a,Qt.memoizedState,r,i)},useTransition:function(){var r=zy(lo)[0],i=gr().memoizedState;return[typeof r=="boolean"?r:Bl(r),i]},useSyncExternalStore:kx,useId:pE,useHostTransitionStatus:Yy,useFormState:eE,useActionState:eE,useOptimistic:function(r,i){var a=gr();return Qt!==null?Qx(a,Qt,r,i):(a.baseState=r,[r,a.queue.dispatch])},useMemoCache:ky,useCacheRefresh:yE};vE.useEffectEvent=nE;function Xy(r,i,a,d){i=r.memoizedState,a=a(d,i),a=a==null?i:y({},i,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var Zy={enqueueSetState:function(r,i,a){r=r._reactInternals;var d=Kn(),m=rs(d);m.payload=i,a!=null&&(m.callback=a),i=ns(r,m,d),i!==null&&(Cn(i,r,d),_l(i,r,d))},enqueueReplaceState:function(r,i,a){r=r._reactInternals;var d=Kn(),m=rs(d);m.tag=1,m.payload=i,a!=null&&(m.callback=a),i=ns(r,m,d),i!==null&&(Cn(i,r,d),_l(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var a=Kn(),d=rs(a);d.tag=2,i!=null&&(d.callback=i),i=ns(r,d,a),i!==null&&(Cn(i,r,a),_l(i,r,a))}};function wE(r,i,a,d,m,E,V){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,E,V):i.prototype&&i.prototype.isPureReactComponent?!bl(a,d)||!bl(m,E):!0}function xE(r,i,a,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,d),i.state!==r&&Zy.enqueueReplaceState(i,i.state,null)}function na(r,i){var a=i;if("ref"in i){a={};for(var d in i)d!=="ref"&&(a[d]=i[d])}if(r=r.defaultProps){a===i&&(a=y({},a));for(var m in r)a[m]===void 0&&(a[m]=r[m])}return a}function EE(r){jf(r)}function SE(r){console.error(r)}function IE(r){jf(r)}function ih(r,i){try{var a=r.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function _E(r,i,a){try{var d=r.onCaughtError;d(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Jy(r,i,a){return a=rs(a),a.tag=3,a.payload={element:null},a.callback=function(){ih(r,i)},a}function CE(r){return r=rs(r),r.tag=3,r}function FE(r,i,a,d){var m=a.type.getDerivedStateFromError;if(typeof m=="function"){var E=d.value;r.payload=function(){return m(E)},r.callback=function(){_E(i,a,d)}}var V=a.stateNode;V!==null&&typeof V.componentDidCatch=="function"&&(r.callback=function(){_E(i,a,d),typeof m!="function"&&(ls===null?ls=new Set([this]):ls.add(this));var ge=d.stack;this.componentDidCatch(d.value,{componentStack:ge!==null?ge:""})})}function k8(r,i,a,d,m){if(a.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=a.alternate,i!==null&&Ja(i,a,m,!0),a=qn.current,a!==null){switch(a.tag){case 31:case 13:return fi===null?gh():a.alternate===null&&fr===0&&(fr=3),a.flags&=-257,a.flags|=65536,a.lanes=m,d===Qf?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([d]):i.add(d),Sg(r,d,m)),!1;case 22:return a.flags|=65536,d===Qf?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([d]):a.add(d)),Sg(r,d,m)),!1}throw Error(o(435,a.tag))}return Sg(r,d,m),gh(),!1}if(Mt)return i=qn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,d!==by&&(r=Error(o(422),{cause:d}),wl(ai(r,a)))):(d!==by&&(i=Error(o(423),{cause:d}),wl(ai(i,a))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,d=ai(d,a),m=Jy(r.stateNode,d,m),Oy(r,m),fr!==4&&(fr=2)),!1;var E=Error(o(520),{cause:d});if(E=ai(E,a),Ll===null?Ll=[E]:Ll.push(E),fr!==4&&(fr=2),i===null)return!0;d=ai(d,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,r=m&-m,a.lanes|=r,r=Jy(a.stateNode,d,r),Oy(a,r),!1;case 1:if(i=a.type,E=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(ls===null||!ls.has(E))))return a.flags|=65536,m&=-m,a.lanes|=m,m=CE(m),FE(m,r,a,d),Oy(a,m),!1}a=a.return}while(a!==null);return!1}var eg=Error(o(461)),xr=!1;function Wr(r,i,a,d){i.child=r===null?Rx(i,null,a,d):ta(i,r.child,a,d)}function OE(r,i,a,d,m){a=a.render;var E=i.ref;if("ref"in d){var V={};for(var ge in d)ge!=="ref"&&(V[ge]=d[ge])}else V=d;return Xs(i),d=jy(r,i,a,V,E,m),ge=Dy(),r!==null&&!xr?(Ny(r,i,m),co(r,i,m)):(Mt&&ge&&gy(i),i.flags|=1,Wr(r,i,d,m),i.child)}function BE(r,i,a,d,m){if(r===null){var E=a.type;return typeof E=="function"&&!dy(E)&&E.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=E,TE(r,i,E,d,m)):(r=kf(a.type,null,d,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(E=r.child,!ug(r,m)){var V=E.memoizedProps;if(a=a.compare,a=a!==null?a:bl,a(V,d)&&r.ref===i.ref)return co(r,i,m)}return i.flags|=1,r=io(E,d),r.ref=i.ref,r.return=i,i.child=r}function TE(r,i,a,d,m){if(r!==null){var E=r.memoizedProps;if(bl(E,d)&&r.ref===i.ref)if(xr=!1,i.pendingProps=d=E,ug(r,m))(r.flags&131072)!==0&&(xr=!0);else return i.lanes=r.lanes,co(r,i,m)}return tg(r,i,a,d,m)}function RE(r,i,a,d){var m=d.children,E=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(E=E!==null?E.baseLanes|a:a,r!==null){for(d=i.child=r.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;d=m&~E}else d=0,i.child=null;return ME(r,i,E,a,d)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&qf(i,E!==null?E.cachePool:null),E!==null?jx(i,E):Ty(),Dx(i);else return d=i.lanes=536870912,ME(r,i,E!==null?E.baseLanes|a:a,a,d)}else E!==null?(qf(i,E.cachePool),jx(i,E),os(),i.memoizedState=null):(r!==null&&qf(i,null),Ty(),os());return Wr(r,i,m,a),i.child}function Ml(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function ME(r,i,a,d,m){var E=Iy();return E=E===null?null:{parent:vr._currentValue,pool:E},i.memoizedState={baseLanes:a,cachePool:E},r!==null&&qf(i,null),Ty(),Dx(i),r!==null&&Ja(r,i,d,!0),i.childLanes=m,null}function oh(r,i){return i=ah({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function UE(r,i,a){return ta(i,r.child,null,a),r=oh(i,i.pendingProps),r.flags|=2,Hn(i),i.memoizedState=null,r}function L8(r,i,a){var d=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Mt){if(d.mode==="hidden")return r=oh(i,d),i.lanes=536870912,Ml(null,r);if(My(i),(r=Zt)?(r=GS(r,ci),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xo!==null?{id:Li,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},a=gx(r),a.return=i,i.child=a,Yr=i,Zt=null)):r=null,r===null)throw Jo(i);return i.lanes=536870912,null}return oh(i,d)}var E=r.memoizedState;if(E!==null){var V=E.dehydrated;if(My(i),m)if(i.flags&256)i.flags&=-257,i=UE(r,i,a);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(o(558));else if(xr||Ja(r,i,a,!1),m=(a&r.childLanes)!==0,xr||m){if(d=Vt,d!==null&&(V=ot(d,a),V!==0&&V!==E.retryLane))throw E.retryLane=V,Ks(r,V),Cn(d,r,V),eg;gh(),i=UE(r,i,a)}else r=E.treeContext,Zt=hi(V.nextSibling),Yr=i,Mt=!0,Zo=null,ci=!1,r!==null&&Ax(i,r),i=oh(i,d),i.flags|=4096;return i}return r=io(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function sh(r,i){var a=i.ref;if(a===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(r===null||r.ref!==a)&&(i.flags|=4194816)}}function tg(r,i,a,d,m){return Xs(i),a=jy(r,i,a,d,void 0,m),d=Dy(),r!==null&&!xr?(Ny(r,i,m),co(r,i,m)):(Mt&&d&&gy(i),i.flags|=1,Wr(r,i,a,m),i.child)}function jE(r,i,a,d,m,E){return Xs(i),i.updateQueue=null,a=Px(i,d,a,m),Nx(r),d=Dy(),r!==null&&!xr?(Ny(r,i,E),co(r,i,E)):(Mt&&d&&gy(i),i.flags|=1,Wr(r,i,a,E),i.child)}function DE(r,i,a,d,m){if(Xs(i),i.stateNode===null){var E=Va,V=a.contextType;typeof V=="object"&&V!==null&&(E=Vr(V)),E=new a(d,E),i.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=Zy,i.stateNode=E,E._reactInternals=i,E=i.stateNode,E.props=d,E.state=i.memoizedState,E.refs={},Cy(i),V=a.contextType,E.context=typeof V=="object"&&V!==null?Vr(V):Va,E.state=i.memoizedState,V=a.getDerivedStateFromProps,typeof V=="function"&&(Xy(i,a,V,d),E.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(V=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),V!==E.state&&Zy.enqueueReplaceState(E,E.state,null),Fl(i,d,E,m),Cl(),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){E=i.stateNode;var ge=i.memoizedProps,Fe=na(a,ge);E.props=Fe;var Me=E.context,$e=a.contextType;V=Va,typeof $e=="object"&&$e!==null&&(V=Vr($e));var Ge=a.getDerivedStateFromProps;$e=typeof Ge=="function"||typeof E.getSnapshotBeforeUpdate=="function",ge=i.pendingProps!==ge,$e||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(ge||Me!==V)&&xE(i,E,d,V),ts=!1;var Ue=i.memoizedState;E.state=Ue,Fl(i,d,E,m),Cl(),Me=i.memoizedState,ge||Ue!==Me||ts?(typeof Ge=="function"&&(Xy(i,a,Ge,d),Me=i.memoizedState),(Fe=ts||wE(i,a,Fe,d,Ue,Me,V))?($e||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(i.flags|=4194308)):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=Me),E.props=d,E.state=Me,E.context=V,d=Fe):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{E=i.stateNode,Fy(r,i),V=i.memoizedProps,$e=na(a,V),E.props=$e,Ge=i.pendingProps,Ue=E.context,Me=a.contextType,Fe=Va,typeof Me=="object"&&Me!==null&&(Fe=Vr(Me)),ge=a.getDerivedStateFromProps,(Me=typeof ge=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(V!==Ge||Ue!==Fe)&&xE(i,E,d,Fe),ts=!1,Ue=i.memoizedState,E.state=Ue,Fl(i,d,E,m),Cl();var Ne=i.memoizedState;V!==Ge||Ue!==Ne||ts||r!==null&&r.dependencies!==null&&zf(r.dependencies)?(typeof ge=="function"&&(Xy(i,a,ge,d),Ne=i.memoizedState),($e=ts||wE(i,a,$e,d,Ue,Ne,Fe)||r!==null&&r.dependencies!==null&&zf(r.dependencies))?(Me||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(d,Ne,Fe),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(d,Ne,Fe)),typeof E.componentDidUpdate=="function"&&(i.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof E.componentDidUpdate!="function"||V===r.memoizedProps&&Ue===r.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||V===r.memoizedProps&&Ue===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=Ne),E.props=d,E.state=Ne,E.context=Fe,d=$e):(typeof E.componentDidUpdate!="function"||V===r.memoizedProps&&Ue===r.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||V===r.memoizedProps&&Ue===r.memoizedState||(i.flags|=1024),d=!1)}return E=d,sh(r,i),d=(i.flags&128)!==0,E||d?(E=i.stateNode,a=d&&typeof a.getDerivedStateFromError!="function"?null:E.render(),i.flags|=1,r!==null&&d?(i.child=ta(i,r.child,null,m),i.child=ta(i,null,a,m)):Wr(r,i,a,m),i.memoizedState=E.state,r=i.child):r=co(r,i,m),r}function NE(r,i,a,d){return Vs(),i.flags|=256,Wr(r,i,a,d),i.child}var rg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ng(r){return{baseLanes:r,cachePool:_x()}}function ig(r,i,a){return r=r!==null?r.childLanes&~a:0,i&&(r|=Gn),r}function PE(r,i,a){var d=i.pendingProps,m=!1,E=(i.flags&128)!==0,V;if((V=E)||(V=r!==null&&r.memoizedState===null?!1:(yr.current&2)!==0),V&&(m=!0,i.flags&=-129),V=(i.flags&32)!==0,i.flags&=-33,r===null){if(Mt){if(m?is(i):os(),(r=Zt)?(r=GS(r,ci),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xo!==null?{id:Li,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},a=gx(r),a.return=i,i.child=a,Yr=i,Zt=null)):r=null,r===null)throw Jo(i);return Lg(r)?i.lanes=32:i.lanes=536870912,null}var ge=d.children;return d=d.fallback,m?(os(),m=i.mode,ge=ah({mode:"hidden",children:ge},m),d=Ys(d,m,a,null),ge.return=i,d.return=i,ge.sibling=d,i.child=ge,d=i.child,d.memoizedState=ng(a),d.childLanes=ig(r,V,a),i.memoizedState=rg,Ml(null,d)):(is(i),og(i,ge))}var Fe=r.memoizedState;if(Fe!==null&&(ge=Fe.dehydrated,ge!==null)){if(E)i.flags&256?(is(i),i.flags&=-257,i=sg(r,i,a)):i.memoizedState!==null?(os(),i.child=r.child,i.flags|=128,i=null):(os(),ge=d.fallback,m=i.mode,d=ah({mode:"visible",children:d.children},m),ge=Ys(ge,m,a,null),ge.flags|=2,d.return=i,ge.return=i,d.sibling=ge,i.child=d,ta(i,r.child,null,a),d=i.child,d.memoizedState=ng(a),d.childLanes=ig(r,V,a),i.memoizedState=rg,i=Ml(null,d));else if(is(i),Lg(ge)){if(V=ge.nextSibling&&ge.nextSibling.dataset,V)var Me=V.dgst;V=Me,d=Error(o(419)),d.stack="",d.digest=V,wl({value:d,source:null,stack:null}),i=sg(r,i,a)}else if(xr||Ja(r,i,a,!1),V=(a&r.childLanes)!==0,xr||V){if(V=Vt,V!==null&&(d=ot(V,a),d!==0&&d!==Fe.retryLane))throw Fe.retryLane=d,Ks(r,d),Cn(V,r,d),eg;kg(ge)||gh(),i=sg(r,i,a)}else kg(ge)?(i.flags|=192,i.child=r.child,i=null):(r=Fe.treeContext,Zt=hi(ge.nextSibling),Yr=i,Mt=!0,Zo=null,ci=!1,r!==null&&Ax(i,r),i=og(i,d.children),i.flags|=4096);return i}return m?(os(),ge=d.fallback,m=i.mode,Fe=r.child,Me=Fe.sibling,d=io(Fe,{mode:"hidden",children:d.children}),d.subtreeFlags=Fe.subtreeFlags&65011712,Me!==null?ge=io(Me,ge):(ge=Ys(ge,m,a,null),ge.flags|=2),ge.return=i,d.return=i,d.sibling=ge,i.child=d,Ml(null,d),d=i.child,ge=r.child.memoizedState,ge===null?ge=ng(a):(m=ge.cachePool,m!==null?(Fe=vr._currentValue,m=m.parent!==Fe?{parent:Fe,pool:Fe}:m):m=_x(),ge={baseLanes:ge.baseLanes|a,cachePool:m}),d.memoizedState=ge,d.childLanes=ig(r,V,a),i.memoizedState=rg,Ml(r.child,d)):(is(i),a=r.child,r=a.sibling,a=io(a,{mode:"visible",children:d.children}),a.return=i,a.sibling=null,r!==null&&(V=i.deletions,V===null?(i.deletions=[r],i.flags|=16):V.push(r)),i.child=a,i.memoizedState=null,a)}function og(r,i){return i=ah({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function ah(r,i){return r=$n(22,r,null,i),r.lanes=0,r}function sg(r,i,a){return ta(i,r.child,null,a),r=og(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function kE(r,i,a){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),wy(r.return,i,a)}function ag(r,i,a,d,m,E){var V=r.memoizedState;V===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:a,tailMode:m,treeForkCount:E}:(V.isBackwards=i,V.rendering=null,V.renderingStartTime=0,V.last=d,V.tail=a,V.tailMode=m,V.treeForkCount=E)}function LE(r,i,a){var d=i.pendingProps,m=d.revealOrder,E=d.tail;d=d.children;var V=yr.current,ge=(V&2)!==0;if(ge?(V=V&1|2,i.flags|=128):V&=1,K(yr,V),Wr(r,i,d,a),d=Mt?vl:0,!ge&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&kE(r,a,i);else if(r.tag===19)kE(r,a,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(a=i.child,m=null;a!==null;)r=a.alternate,r!==null&&Vf(r)===null&&(m=a),a=a.sibling;a=m,a===null?(m=i.child,i.child=null):(m=a.sibling,a.sibling=null),ag(i,!1,m,a,E,d);break;case"backwards":case"unstable_legacy-backwards":for(a=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&Vf(r)===null){i.child=m;break}r=m.sibling,m.sibling=a,a=m,m=r}ag(i,!0,a,null,E,d);break;case"together":ag(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function co(r,i,a){if(r!==null&&(i.dependencies=r.dependencies),us|=i.lanes,(a&i.childLanes)===0)if(r!==null){if(Ja(r,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(o(153));if(i.child!==null){for(r=i.child,a=io(r,r.pendingProps),i.child=a,a.return=i;r.sibling!==null;)r=r.sibling,a=a.sibling=io(r,r.pendingProps),a.return=i;a.sibling=null}return i.child}function ug(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&zf(r)))}function z8(r,i,a){switch(i.tag){case 3:ne(i,i.stateNode.containerInfo),es(i,vr,r.memoizedState.cache),Vs();break;case 27:case 5:F(i);break;case 4:ne(i,i.stateNode.containerInfo);break;case 10:es(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,My(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(is(i),i.flags|=128,null):(a&i.child.childLanes)!==0?PE(r,i,a):(is(i),r=co(r,i,a),r!==null?r.sibling:null);is(i);break;case 19:var m=(r.flags&128)!==0;if(d=(a&i.childLanes)!==0,d||(Ja(r,i,a,!1),d=(a&i.childLanes)!==0),m){if(d)return LE(r,i,a);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),K(yr,yr.current),d)break;return null;case 22:return i.lanes=0,RE(r,i,a,i.pendingProps);case 24:es(i,vr,r.memoizedState.cache)}return co(r,i,a)}function zE(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps)xr=!0;else{if(!ug(r,a)&&(i.flags&128)===0)return xr=!1,z8(r,i,a);xr=(r.flags&131072)!==0}else xr=!1,Mt&&(i.flags&1048576)!==0&&bx(i,vl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Js(i.elementType),i.type=r,typeof r=="function")dy(r)?(d=na(r,d),i.tag=1,i=DE(null,i,r,d,a)):(i.tag=0,i=tg(null,i,r,d,a));else{if(r!=null){var m=r.$$typeof;if(m===R){i.tag=11,i=OE(null,i,r,d,a);break e}else if(m===k){i.tag=14,i=BE(null,i,r,d,a);break e}}throw i=le(r)||r,Error(o(306,i,""))}}return i;case 0:return tg(r,i,i.type,i.pendingProps,a);case 1:return d=i.type,m=na(d,i.pendingProps),DE(r,i,d,m,a);case 3:e:{if(ne(i,i.stateNode.containerInfo),r===null)throw Error(o(387));d=i.pendingProps;var E=i.memoizedState;m=E.element,Fy(r,i),Fl(i,d,null,a);var V=i.memoizedState;if(d=V.cache,es(i,vr,d),d!==E.cache&&xy(i,[vr],a,!0),Cl(),d=V.element,E.isDehydrated)if(E={element:d,isDehydrated:!1,cache:V.cache},i.updateQueue.baseState=E,i.memoizedState=E,i.flags&256){i=NE(r,i,d,a);break e}else if(d!==m){m=ai(Error(o(424)),i),wl(m),i=NE(r,i,d,a);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Zt=hi(r.firstChild),Yr=i,Mt=!0,Zo=null,ci=!0,a=Rx(i,null,d,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vs(),d===m){i=co(r,i,a);break e}Wr(r,i,d,a)}i=i.child}return i;case 26:return sh(r,i),r===null?(a=ZS(i.type,null,i.pendingProps,null))?i.memoizedState=a:Mt||(a=i.type,r=i.pendingProps,d=Eh(fe.current).createElement(a),d[Ht]=i,d[rr]=r,Xr(d,a,r),ar(d),i.stateNode=d):i.memoizedState=ZS(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return F(i),r===null&&Mt&&(d=i.stateNode=VS(i.type,i.pendingProps,fe.current),Yr=i,ci=!0,m=Zt,ds(i.type)?(zg=m,Zt=hi(d.firstChild)):Zt=m),Wr(r,i,i.pendingProps.children,a),sh(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Mt&&((m=d=Zt)&&(d=m4(d,i.type,i.pendingProps,ci),d!==null?(i.stateNode=d,Yr=i,Zt=hi(d.firstChild),ci=!1,m=!0):m=!1),m||Jo(i)),F(i),m=i.type,E=i.pendingProps,V=r!==null?r.memoizedProps:null,d=E.children,Dg(m,E)?d=null:V!==null&&Dg(m,V)&&(i.flags|=32),i.memoizedState!==null&&(m=jy(r,i,R8,null,null,a),Yl._currentValue=m),sh(r,i),Wr(r,i,d,a),i.child;case 6:return r===null&&Mt&&((r=a=Zt)&&(a=b4(a,i.pendingProps,ci),a!==null?(i.stateNode=a,Yr=i,Zt=null,r=!0):r=!1),r||Jo(i)),null;case 13:return PE(r,i,a);case 4:return ne(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=ta(i,null,d,a):Wr(r,i,d,a),i.child;case 11:return OE(r,i,i.type,i.pendingProps,a);case 7:return Wr(r,i,i.pendingProps,a),i.child;case 8:return Wr(r,i,i.pendingProps.children,a),i.child;case 12:return Wr(r,i,i.pendingProps.children,a),i.child;case 10:return d=i.pendingProps,es(i,i.type,d.value),Wr(r,i,d.children,a),i.child;case 9:return m=i.type._context,d=i.pendingProps.children,Xs(i),m=Vr(m),d=d(m),i.flags|=1,Wr(r,i,d,a),i.child;case 14:return BE(r,i,i.type,i.pendingProps,a);case 15:return TE(r,i,i.type,i.pendingProps,a);case 19:return LE(r,i,a);case 31:return L8(r,i,a);case 22:return RE(r,i,a,i.pendingProps);case 24:return Xs(i),d=Vr(vr),r===null?(m=Iy(),m===null&&(m=Vt,E=Ey(),m.pooledCache=E,E.refCount++,E!==null&&(m.pooledCacheLanes|=a),m=E),i.memoizedState={parent:d,cache:m},Cy(i),es(i,vr,m)):((r.lanes&a)!==0&&(Fy(r,i),Fl(i,null,null,a),Cl()),m=r.memoizedState,E=i.memoizedState,m.parent!==d?(m={parent:d,cache:d},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),es(i,vr,d)):(d=E.cache,es(i,vr,d),d!==m.cache&&xy(i,[vr],a,!0))),Wr(r,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(o(156,i.tag))}function fo(r){r.flags|=4}function lg(r,i,a,d,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(pS())r.flags|=8192;else throw ea=Qf,_y}else r.flags&=-16777217}function $E(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!n2(i))if(pS())r.flags|=8192;else throw ea=Qf,_y}function uh(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Xt():536870912,r.lanes|=i,fu|=i)}function Ul(r,i){if(!Mt)switch(r.tailMode){case"hidden":i=r.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Jt(r){var i=r.alternate!==null&&r.alternate.child===r.child,a=0,d=0;if(i)for(var m=r.child;m!==null;)a|=m.lanes|m.childLanes,d|=m.subtreeFlags&65011712,d|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)a|=m.lanes|m.childLanes,d|=m.subtreeFlags,d|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=d,r.childLanes=a,i}function $8(r,i,a){var d=i.pendingProps;switch(my(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jt(i),null;case 1:return Jt(i),null;case 3:return a=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),ao(vr),Z(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(r===null||r.child===null)&&(Za(i)?fo(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Ay())),Jt(i),null;case 26:var m=i.type,E=i.memoizedState;return r===null?(fo(i),E!==null?(Jt(i),$E(i,E)):(Jt(i),lg(i,m,null,d,a))):E?E!==r.memoizedState?(fo(i),Jt(i),$E(i,E)):(Jt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&fo(i),Jt(i),lg(i,m,r,d,a)),null;case 27:if(q(i),a=fe.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&fo(i);else{if(!d){if(i.stateNode===null)throw Error(o(166));return Jt(i),null}r=W.current,Za(i)?vx(i):(r=VS(m,d,a),i.stateNode=r,fo(i))}return Jt(i),null;case 5:if(q(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&fo(i);else{if(!d){if(i.stateNode===null)throw Error(o(166));return Jt(i),null}if(E=W.current,Za(i))vx(i);else{var V=Eh(fe.current);switch(E){case 1:E=V.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:E=V.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":E=V.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":E=V.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":E=V.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;case"select":E=typeof d.is=="string"?V.createElement("select",{is:d.is}):V.createElement("select"),d.multiple?E.multiple=!0:d.size&&(E.size=d.size);break;default:E=typeof d.is=="string"?V.createElement(m,{is:d.is}):V.createElement(m)}}E[Ht]=i,E[rr]=d;e:for(V=i.child;V!==null;){if(V.tag===5||V.tag===6)E.appendChild(V.stateNode);else if(V.tag!==4&&V.tag!==27&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===i)break e;for(;V.sibling===null;){if(V.return===null||V.return===i)break e;V=V.return}V.sibling.return=V.return,V=V.sibling}i.stateNode=E;e:switch(Xr(E,m,d),m){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&fo(i)}}return Jt(i),lg(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,a),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&fo(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(o(166));if(r=fe.current,Za(i)){if(r=i.stateNode,a=i.memoizedProps,d=null,m=Yr,m!==null)switch(m.tag){case 27:case 5:d=m.memoizedProps}r[Ht]=i,r=!!(r.nodeValue===a||d!==null&&d.suppressHydrationWarning===!0||PS(r.nodeValue,a)),r||Jo(i,!0)}else r=Eh(r).createTextNode(d),r[Ht]=i,i.stateNode=r}return Jt(i),null;case 31:if(a=i.memoizedState,r===null||r.memoizedState!==null){if(d=Za(i),a!==null){if(r===null){if(!d)throw Error(o(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(557));r[Ht]=i}else Vs(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Jt(i),r=!1}else a=Ay(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=a),r=!0;if(!r)return i.flags&256?(Hn(i),i):(Hn(i),null);if((i.flags&128)!==0)throw Error(o(558))}return Jt(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Za(i),d!==null&&d.dehydrated!==null){if(r===null){if(!m)throw Error(o(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[Ht]=i}else Vs(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Jt(i),m=!1}else m=Ay(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Hn(i),i):(Hn(i),null)}return Hn(i),(i.flags&128)!==0?(i.lanes=a,i):(a=d!==null,r=r!==null&&r.memoizedState!==null,a&&(d=i.child,m=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(m=d.alternate.memoizedState.cachePool.pool),E=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(E=d.memoizedState.cachePool.pool),E!==m&&(d.flags|=2048)),a!==r&&a&&(i.child.flags|=8192),uh(i,i.updateQueue),Jt(i),null);case 4:return Z(),r===null&&Tg(i.stateNode.containerInfo),Jt(i),null;case 10:return ao(i.type),Jt(i),null;case 19:if(H(yr),d=i.memoizedState,d===null)return Jt(i),null;if(m=(i.flags&128)!==0,E=d.rendering,E===null)if(m)Ul(d,!1);else{if(fr!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(E=Vf(r),E!==null){for(i.flags|=128,Ul(d,!1),r=E.updateQueue,i.updateQueue=r,uh(i,r),i.subtreeFlags=0,r=a,a=i.child;a!==null;)yx(a,r),a=a.sibling;return K(yr,yr.current&1|2),Mt&&oo(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&de()>dh&&(i.flags|=128,m=!0,Ul(d,!1),i.lanes=4194304)}else{if(!m)if(r=Vf(E),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,uh(i,r),Ul(d,!0),d.tail===null&&d.tailMode==="hidden"&&!E.alternate&&!Mt)return Jt(i),null}else 2*de()-d.renderingStartTime>dh&&a!==536870912&&(i.flags|=128,m=!0,Ul(d,!1),i.lanes=4194304);d.isBackwards?(E.sibling=i.child,i.child=E):(r=d.last,r!==null?r.sibling=E:i.child=E,d.last=E)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=de(),r.sibling=null,a=yr.current,K(yr,m?a&1|2:a&1),Mt&&oo(i,d.treeForkCount),r):(Jt(i),null);case 22:case 23:return Hn(i),Ry(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(a&536870912)!==0&&(i.flags&128)===0&&(Jt(i),i.subtreeFlags&6&&(i.flags|=8192)):Jt(i),a=i.updateQueue,a!==null&&uh(i,a.retryQueue),a=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==a&&(i.flags|=2048),r!==null&&H(Zs),null;case 24:return a=null,r!==null&&(a=r.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),ao(vr),Jt(i),null;case 25:return null;case 30:return null}throw Error(o(156,i.tag))}function q8(r,i){switch(my(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return ao(vr),Z(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return q(i),null;case 31:if(i.memoizedState!==null){if(Hn(i),i.alternate===null)throw Error(o(340));Vs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Hn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(o(340));Vs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return H(yr),null;case 4:return Z(),null;case 10:return ao(i.type),null;case 22:case 23:return Hn(i),Ry(),r!==null&&H(Zs),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return ao(vr),null;case 25:return null;default:return null}}function qE(r,i){switch(my(i),i.tag){case 3:ao(vr),Z();break;case 26:case 27:case 5:q(i);break;case 4:Z();break;case 31:i.memoizedState!==null&&Hn(i);break;case 13:Hn(i);break;case 19:H(yr);break;case 10:ao(i.type);break;case 22:case 23:Hn(i),Ry(),r!==null&&H(Zs);break;case 24:ao(vr)}}function jl(r,i){try{var a=i.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var m=d.next;a=m;do{if((a.tag&r)===r){d=void 0;var E=a.create,V=a.inst;d=E(),V.destroy=d}a=a.next}while(a!==m)}}catch(ge){Lt(i,i.return,ge)}}function ss(r,i,a){try{var d=i.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var E=m.next;d=E;do{if((d.tag&r)===r){var V=d.inst,ge=V.destroy;if(ge!==void 0){V.destroy=void 0,m=i;var Fe=a,Me=ge;try{Me()}catch($e){Lt(m,Fe,$e)}}}d=d.next}while(d!==E)}}catch($e){Lt(i,i.return,$e)}}function HE(r){var i=r.updateQueue;if(i!==null){var a=r.stateNode;try{Ux(i,a)}catch(d){Lt(r,r.return,d)}}}function QE(r,i,a){a.props=na(r.type,r.memoizedProps),a.state=r.memoizedState;try{a.componentWillUnmount()}catch(d){Lt(r,i,d)}}function Dl(r,i){try{var a=r.ref;if(a!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof a=="function"?r.refCleanup=a(d):a.current=d}}catch(m){Lt(r,i,m)}}function $i(r,i){var a=r.ref,d=r.refCleanup;if(a!==null)if(typeof d=="function")try{d()}catch(m){Lt(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(m){Lt(r,i,m)}else a.current=null}function GE(r){var i=r.type,a=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&d.focus();break e;case"img":a.src?d.src=a.src:a.srcSet&&(d.srcset=a.srcSet)}}catch(m){Lt(r,r.return,m)}}function cg(r,i,a){try{var d=r.stateNode;f4(d,r.type,a,i),d[rr]=i}catch(m){Lt(r,r.return,m)}}function KE(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ds(r.type)||r.tag===4}function fg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||KE(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&ds(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function hg(r,i,a){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(r,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(r),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=ro));else if(d!==4&&(d===27&&ds(r.type)&&(a=r.stateNode,i=null),r=r.child,r!==null))for(hg(r,i,a),r=r.sibling;r!==null;)hg(r,i,a),r=r.sibling}function lh(r,i,a){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(d!==4&&(d===27&&ds(r.type)&&(a=r.stateNode),r=r.child,r!==null))for(lh(r,i,a),r=r.sibling;r!==null;)lh(r,i,a),r=r.sibling}function YE(r){var i=r.stateNode,a=r.memoizedProps;try{for(var d=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Xr(i,d,a),i[Ht]=r,i[rr]=a}catch(E){Lt(r,r.return,E)}}var ho=!1,Er=!1,dg=!1,VE=typeof WeakSet=="function"?WeakSet:Set,kr=null;function H8(r,i){if(r=r.containerInfo,Ug=Bh,r=sx(r),sy(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var d=a.getSelection&&a.getSelection();if(d&&d.rangeCount!==0){a=d.anchorNode;var m=d.anchorOffset,E=d.focusNode;d=d.focusOffset;try{a.nodeType,E.nodeType}catch{a=null;break e}var V=0,ge=-1,Fe=-1,Me=0,$e=0,Ge=r,Ue=null;t:for(;;){for(var Ne;Ge!==a||m!==0&&Ge.nodeType!==3||(ge=V+m),Ge!==E||d!==0&&Ge.nodeType!==3||(Fe=V+d),Ge.nodeType===3&&(V+=Ge.nodeValue.length),(Ne=Ge.firstChild)!==null;)Ue=Ge,Ge=Ne;for(;;){if(Ge===r)break t;if(Ue===a&&++Me===m&&(ge=V),Ue===E&&++$e===d&&(Fe=V),(Ne=Ge.nextSibling)!==null)break;Ge=Ue,Ue=Ge.parentNode}Ge=Ne}a=ge===-1||Fe===-1?null:{start:ge,end:Fe}}else a=null}a=a||{start:0,end:0}}else a=null;for(jg={focusedElem:r,selectionRange:a},Bh=!1,kr=i;kr!==null;)if(i=kr,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,kr=r;else for(;kr!==null;){switch(i=kr,E=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(a=0;a<r.length;a++)m=r[a],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&E!==null){r=void 0,a=i,m=E.memoizedProps,E=E.memoizedState,d=a.stateNode;try{var ut=na(a.type,m);r=d.getSnapshotBeforeUpdate(ut,E),d.__reactInternalSnapshotBeforeUpdate=r}catch(mt){Lt(a,a.return,mt)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,a=r.nodeType,a===9)Pg(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Pg(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(o(163))}if(r=i.sibling,r!==null){r.return=i.return,kr=r;break}kr=i.return}}function WE(r,i,a){var d=a.flags;switch(a.tag){case 0:case 11:case 15:yo(r,a),d&4&&jl(5,a);break;case 1:if(yo(r,a),d&4)if(r=a.stateNode,i===null)try{r.componentDidMount()}catch(V){Lt(a,a.return,V)}else{var m=na(a.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(V){Lt(a,a.return,V)}}d&64&&HE(a),d&512&&Dl(a,a.return);break;case 3:if(yo(r,a),d&64&&(r=a.updateQueue,r!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{Ux(r,i)}catch(V){Lt(a,a.return,V)}}break;case 27:i===null&&d&4&&YE(a);case 26:case 5:yo(r,a),i===null&&d&4&&GE(a),d&512&&Dl(a,a.return);break;case 12:yo(r,a);break;case 31:yo(r,a),d&4&&JE(r,a);break;case 13:yo(r,a),d&4&&eS(r,a),d&64&&(r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(a=J8.bind(null,a),A4(r,a))));break;case 22:if(d=a.memoizedState!==null||ho,!d){i=i!==null&&i.memoizedState!==null||Er,m=ho;var E=Er;ho=d,(Er=i)&&!E?go(r,a,(a.subtreeFlags&8772)!==0):yo(r,a),ho=m,Er=E}break;case 30:break;default:yo(r,a)}}function XE(r){var i=r.alternate;i!==null&&(r.alternate=null,XE(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Vo(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var nr=null,En=!1;function po(r,i,a){for(a=a.child;a!==null;)ZE(r,i,a),a=a.sibling}function ZE(r,i,a){if(Se&&typeof Se.onCommitFiberUnmount=="function")try{Se.onCommitFiberUnmount(ve,a)}catch{}switch(a.tag){case 26:Er||$i(a,i),po(r,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Er||$i(a,i);var d=nr,m=En;ds(a.type)&&(nr=a.stateNode,En=!1),po(r,i,a),Ql(a.stateNode),nr=d,En=m;break;case 5:Er||$i(a,i);case 6:if(d=nr,m=En,nr=null,po(r,i,a),nr=d,En=m,nr!==null)if(En)try{(nr.nodeType===9?nr.body:nr.nodeName==="HTML"?nr.ownerDocument.body:nr).removeChild(a.stateNode)}catch(E){Lt(a,i,E)}else try{nr.removeChild(a.stateNode)}catch(E){Lt(a,i,E)}break;case 18:nr!==null&&(En?(r=nr,HS(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.stateNode),Au(r)):HS(nr,a.stateNode));break;case 4:d=nr,m=En,nr=a.stateNode.containerInfo,En=!0,po(r,i,a),nr=d,En=m;break;case 0:case 11:case 14:case 15:ss(2,a,i),Er||ss(4,a,i),po(r,i,a);break;case 1:Er||($i(a,i),d=a.stateNode,typeof d.componentWillUnmount=="function"&&QE(a,i,d)),po(r,i,a);break;case 21:po(r,i,a);break;case 22:Er=(d=Er)||a.memoizedState!==null,po(r,i,a),Er=d;break;default:po(r,i,a)}}function JE(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Au(r)}catch(a){Lt(i,i.return,a)}}}function eS(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Au(r)}catch(a){Lt(i,i.return,a)}}function Q8(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new VE),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new VE),i;default:throw Error(o(435,r.tag))}}function ch(r,i){var a=Q8(r);i.forEach(function(d){if(!a.has(d)){a.add(d);var m=e4.bind(null,r,d);d.then(m,m)}})}function Sn(r,i){var a=i.deletions;if(a!==null)for(var d=0;d<a.length;d++){var m=a[d],E=r,V=i,ge=V;e:for(;ge!==null;){switch(ge.tag){case 27:if(ds(ge.type)){nr=ge.stateNode,En=!1;break e}break;case 5:nr=ge.stateNode,En=!1;break e;case 3:case 4:nr=ge.stateNode.containerInfo,En=!0;break e}ge=ge.return}if(nr===null)throw Error(o(160));ZE(E,V,m),nr=null,En=!1,E=m.alternate,E!==null&&(E.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)tS(i,r),i=i.sibling}var Ii=null;function tS(r,i){var a=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Sn(i,r),In(r),d&4&&(ss(3,r,r.return),jl(3,r),ss(5,r,r.return));break;case 1:Sn(i,r),In(r),d&512&&(Er||a===null||$i(a,a.return)),d&64&&ho&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(a=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=a===null?d:a.concat(d))));break;case 26:var m=Ii;if(Sn(i,r),In(r),d&512&&(Er||a===null||$i(a,a.return)),d&4){var E=a!==null?a.memoizedState:null;if(d=r.memoizedState,a===null)if(d===null)if(r.stateNode===null){e:{d=r.type,a=r.memoizedProps,m=m.ownerDocument||m;t:switch(d){case"title":E=m.getElementsByTagName("title")[0],(!E||E[Ar]||E[Ht]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=m.createElement(d),m.head.insertBefore(E,m.querySelector("head > title"))),Xr(E,d,a),E[Ht]=r,ar(E),d=E;break e;case"link":var V=t2("link","href",m).get(d+(a.href||""));if(V){for(var ge=0;ge<V.length;ge++)if(E=V[ge],E.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&E.getAttribute("rel")===(a.rel==null?null:a.rel)&&E.getAttribute("title")===(a.title==null?null:a.title)&&E.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){V.splice(ge,1);break t}}E=m.createElement(d),Xr(E,d,a),m.head.appendChild(E);break;case"meta":if(V=t2("meta","content",m).get(d+(a.content||""))){for(ge=0;ge<V.length;ge++)if(E=V[ge],E.getAttribute("content")===(a.content==null?null:""+a.content)&&E.getAttribute("name")===(a.name==null?null:a.name)&&E.getAttribute("property")===(a.property==null?null:a.property)&&E.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&E.getAttribute("charset")===(a.charSet==null?null:a.charSet)){V.splice(ge,1);break t}}E=m.createElement(d),Xr(E,d,a),m.head.appendChild(E);break;default:throw Error(o(468,d))}E[Ht]=r,ar(E),d=E}r.stateNode=d}else r2(m,r.type,r.stateNode);else r.stateNode=e2(m,d,r.memoizedProps);else E!==d?(E===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):E.count--,d===null?r2(m,r.type,r.stateNode):e2(m,d,r.memoizedProps)):d===null&&r.stateNode!==null&&cg(r,r.memoizedProps,a.memoizedProps)}break;case 27:Sn(i,r),In(r),d&512&&(Er||a===null||$i(a,a.return)),a!==null&&d&4&&cg(r,r.memoizedProps,a.memoizedProps);break;case 5:if(Sn(i,r),In(r),d&512&&(Er||a===null||$i(a,a.return)),r.flags&32){m=r.stateNode;try{$a(m,"")}catch(ut){Lt(r,r.return,ut)}}d&4&&r.stateNode!=null&&(m=r.memoizedProps,cg(r,m,a!==null?a.memoizedProps:m)),d&1024&&(dg=!0);break;case 6:if(Sn(i,r),In(r),d&4){if(r.stateNode===null)throw Error(o(162));d=r.memoizedProps,a=r.stateNode;try{a.nodeValue=d}catch(ut){Lt(r,r.return,ut)}}break;case 3:if(_h=null,m=Ii,Ii=Sh(i.containerInfo),Sn(i,r),Ii=m,In(r),d&4&&a!==null&&a.memoizedState.isDehydrated)try{Au(i.containerInfo)}catch(ut){Lt(r,r.return,ut)}dg&&(dg=!1,rS(r));break;case 4:d=Ii,Ii=Sh(r.stateNode.containerInfo),Sn(i,r),In(r),Ii=d;break;case 12:Sn(i,r),In(r);break;case 31:Sn(i,r),In(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,ch(r,d)));break;case 13:Sn(i,r),In(r),r.child.flags&8192&&r.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(hh=de()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,ch(r,d)));break;case 22:m=r.memoizedState!==null;var Fe=a!==null&&a.memoizedState!==null,Me=ho,$e=Er;if(ho=Me||m,Er=$e||Fe,Sn(i,r),Er=$e,ho=Me,In(r),d&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(a===null||Fe||ho||Er||ia(r)),a=null,i=r;;){if(i.tag===5||i.tag===26){if(a===null){Fe=a=i;try{if(E=Fe.stateNode,m)V=E.style,typeof V.setProperty=="function"?V.setProperty("display","none","important"):V.display="none";else{ge=Fe.stateNode;var Ge=Fe.memoizedProps.style,Ue=Ge!=null&&Ge.hasOwnProperty("display")?Ge.display:null;ge.style.display=Ue==null||typeof Ue=="boolean"?"":(""+Ue).trim()}}catch(ut){Lt(Fe,Fe.return,ut)}}}else if(i.tag===6){if(a===null){Fe=i;try{Fe.stateNode.nodeValue=m?"":Fe.memoizedProps}catch(ut){Lt(Fe,Fe.return,ut)}}}else if(i.tag===18){if(a===null){Fe=i;try{var Ne=Fe.stateNode;m?QS(Ne,!0):QS(Fe.stateNode,!1)}catch(ut){Lt(Fe,Fe.return,ut)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(a=d.retryQueue,a!==null&&(d.retryQueue=null,ch(r,a))));break;case 19:Sn(i,r),In(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,ch(r,d)));break;case 30:break;case 21:break;default:Sn(i,r),In(r)}}function In(r){var i=r.flags;if(i&2){try{for(var a,d=r.return;d!==null;){if(KE(d)){a=d;break}d=d.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var m=a.stateNode,E=fg(r);lh(r,E,m);break;case 5:var V=a.stateNode;a.flags&32&&($a(V,""),a.flags&=-33);var ge=fg(r);lh(r,ge,V);break;case 3:case 4:var Fe=a.stateNode.containerInfo,Me=fg(r);hg(r,Me,Fe);break;default:throw Error(o(161))}}catch($e){Lt(r,r.return,$e)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function rS(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;rS(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function yo(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)WE(r,i.alternate,i),i=i.sibling}function ia(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:ss(4,i,i.return),ia(i);break;case 1:$i(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&QE(i,i.return,a),ia(i);break;case 27:Ql(i.stateNode);case 26:case 5:$i(i,i.return),ia(i);break;case 22:i.memoizedState===null&&ia(i);break;case 30:ia(i);break;default:ia(i)}r=r.sibling}}function go(r,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,m=r,E=i,V=E.flags;switch(E.tag){case 0:case 11:case 15:go(m,E,a),jl(4,E);break;case 1:if(go(m,E,a),d=E,m=d.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(Me){Lt(d,d.return,Me)}if(d=E,m=d.updateQueue,m!==null){var ge=d.stateNode;try{var Fe=m.shared.hiddenCallbacks;if(Fe!==null)for(m.shared.hiddenCallbacks=null,m=0;m<Fe.length;m++)Mx(Fe[m],ge)}catch(Me){Lt(d,d.return,Me)}}a&&V&64&&HE(E),Dl(E,E.return);break;case 27:YE(E);case 26:case 5:go(m,E,a),a&&d===null&&V&4&&GE(E),Dl(E,E.return);break;case 12:go(m,E,a);break;case 31:go(m,E,a),a&&V&4&&JE(m,E);break;case 13:go(m,E,a),a&&V&4&&eS(m,E);break;case 22:E.memoizedState===null&&go(m,E,a),Dl(E,E.return);break;case 30:break;default:go(m,E,a)}i=i.sibling}}function pg(r,i){var a=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==a&&(r!=null&&r.refCount++,a!=null&&xl(a))}function yg(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&xl(r))}function _i(r,i,a,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)nS(r,i,a,d),i=i.sibling}function nS(r,i,a,d){var m=i.flags;switch(i.tag){case 0:case 11:case 15:_i(r,i,a,d),m&2048&&jl(9,i);break;case 1:_i(r,i,a,d);break;case 3:_i(r,i,a,d),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&xl(r)));break;case 12:if(m&2048){_i(r,i,a,d),r=i.stateNode;try{var E=i.memoizedProps,V=E.id,ge=E.onPostCommit;typeof ge=="function"&&ge(V,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(Fe){Lt(i,i.return,Fe)}}else _i(r,i,a,d);break;case 31:_i(r,i,a,d);break;case 13:_i(r,i,a,d);break;case 23:break;case 22:E=i.stateNode,V=i.alternate,i.memoizedState!==null?E._visibility&2?_i(r,i,a,d):Nl(r,i):E._visibility&2?_i(r,i,a,d):(E._visibility|=2,uu(r,i,a,d,(i.subtreeFlags&10256)!==0||!1)),m&2048&&pg(V,i);break;case 24:_i(r,i,a,d),m&2048&&yg(i.alternate,i);break;default:_i(r,i,a,d)}}function uu(r,i,a,d,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var E=r,V=i,ge=a,Fe=d,Me=V.flags;switch(V.tag){case 0:case 11:case 15:uu(E,V,ge,Fe,m),jl(8,V);break;case 23:break;case 22:var $e=V.stateNode;V.memoizedState!==null?$e._visibility&2?uu(E,V,ge,Fe,m):Nl(E,V):($e._visibility|=2,uu(E,V,ge,Fe,m)),m&&Me&2048&&pg(V.alternate,V);break;case 24:uu(E,V,ge,Fe,m),m&&Me&2048&&yg(V.alternate,V);break;default:uu(E,V,ge,Fe,m)}i=i.sibling}}function Nl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=r,d=i,m=d.flags;switch(d.tag){case 22:Nl(a,d),m&2048&&pg(d.alternate,d);break;case 24:Nl(a,d),m&2048&&yg(d.alternate,d);break;default:Nl(a,d)}i=i.sibling}}var Pl=8192;function lu(r,i,a){if(r.subtreeFlags&Pl)for(r=r.child;r!==null;)iS(r,i,a),r=r.sibling}function iS(r,i,a){switch(r.tag){case 26:lu(r,i,a),r.flags&Pl&&r.memoizedState!==null&&T4(a,Ii,r.memoizedState,r.memoizedProps);break;case 5:lu(r,i,a);break;case 3:case 4:var d=Ii;Ii=Sh(r.stateNode.containerInfo),lu(r,i,a),Ii=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Pl,Pl=16777216,lu(r,i,a),Pl=d):lu(r,i,a));break;default:lu(r,i,a)}}function oS(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function kl(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var d=i[a];kr=d,aS(d,r)}oS(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)sS(r),r=r.sibling}function sS(r){switch(r.tag){case 0:case 11:case 15:kl(r),r.flags&2048&&ss(9,r,r.return);break;case 3:kl(r);break;case 12:kl(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,fh(r)):kl(r);break;default:kl(r)}}function fh(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var d=i[a];kr=d,aS(d,r)}oS(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:ss(8,i,i.return),fh(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,fh(i));break;default:fh(i)}r=r.sibling}}function aS(r,i){for(;kr!==null;){var a=kr;switch(a.tag){case 0:case 11:case 15:ss(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var d=a.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:xl(a.memoizedState.cache)}if(d=a.child,d!==null)d.return=a,kr=d;else e:for(a=r;kr!==null;){d=kr;var m=d.sibling,E=d.return;if(XE(d),d===a){kr=null;break e}if(m!==null){m.return=E,kr=m;break e}kr=E}}}var G8={getCacheForType:function(r){var i=Vr(vr),a=i.data.get(r);return a===void 0&&(a=r(),i.data.set(r,a)),a},cacheSignal:function(){return Vr(vr).controller.signal}},K8=typeof WeakMap=="function"?WeakMap:Map,Pt=0,Vt=null,St=null,Ft=0,kt=0,Qn=null,as=!1,cu=!1,gg=!1,mo=0,fr=0,us=0,oa=0,mg=0,Gn=0,fu=0,Ll=null,_n=null,bg=!1,hh=0,uS=0,dh=1/0,ph=null,ls=null,Ur=0,cs=null,hu=null,bo=0,Ag=0,vg=null,lS=null,zl=0,wg=null;function Kn(){return(Pt&2)!==0&&Ft!==0?Ft&-Ft:X.T!==null?Cg():Br()}function cS(){if(Gn===0)if((Ft&536870912)===0||Mt){var r=lt;lt<<=1,(lt&3932160)===0&&(lt=262144),Gn=r}else Gn=536870912;return r=qn.current,r!==null&&(r.flags|=32),Gn}function Cn(r,i,a){(r===Vt&&(kt===2||kt===9)||r.cancelPendingCommit!==null)&&(du(r,0),fs(r,Ft,Gn,!1)),be(r,a),((Pt&2)===0||r!==Vt)&&(r===Vt&&((Pt&2)===0&&(oa|=a),fr===4&&fs(r,Ft,Gn,!1)),qi(r))}function fS(r,i,a){if((Pt&6)!==0)throw Error(o(327));var d=!a&&(i&127)===0&&(i&r.expiredLanes)===0||dt(r,i),m=d?W8(r,i):Eg(r,i,!0),E=d;do{if(m===0){cu&&!d&&fs(r,i,0,!1);break}else{if(a=r.current.alternate,E&&!Y8(a)){m=Eg(r,i,!1),E=!1;continue}if(m===2){if(E=i,r.errorRecoveryDisabledLanes&E)var V=0;else V=r.pendingLanes&-536870913,V=V!==0?V:V&536870912?536870912:0;if(V!==0){i=V;e:{var ge=r;m=Ll;var Fe=ge.current.memoizedState.isDehydrated;if(Fe&&(du(ge,V).flags|=256),V=Eg(ge,V,!1),V!==2){if(gg&&!Fe){ge.errorRecoveryDisabledLanes|=E,oa|=E,m=4;break e}E=_n,_n=m,E!==null&&(_n===null?_n=E:_n.push.apply(_n,E))}m=V}if(E=!1,m!==2)continue}}if(m===1){du(r,0),fs(r,i,0,!0);break}e:{switch(d=r,E=m,E){case 0:case 1:throw Error(o(345));case 4:if((i&4194048)!==i)break;case 6:fs(d,i,Gn,!as);break e;case 2:_n=null;break;case 3:case 5:break;default:throw Error(o(329))}if((i&62914560)===i&&(m=hh+300-de(),10<m)){if(fs(d,i,Gn,!as),ft(d,0,!0)!==0)break e;bo=i,d.timeoutHandle=$S(hS.bind(null,d,a,_n,ph,bg,i,Gn,oa,fu,as,E,"Throttled",-0,0),m);break e}hS(d,a,_n,ph,bg,i,Gn,oa,fu,as,E,null,-0,0)}}break}while(!0);qi(r)}function hS(r,i,a,d,m,E,V,ge,Fe,Me,$e,Ge,Ue,Ne){if(r.timeoutHandle=-1,Ge=i.subtreeFlags,Ge&8192||(Ge&16785408)===16785408){Ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ro},iS(i,E,Ge);var ut=(E&62914560)===E?hh-de():(E&4194048)===E?uS-de():0;if(ut=R4(Ge,ut),ut!==null){bo=E,r.cancelPendingCommit=ut(vS.bind(null,r,i,E,a,d,m,V,ge,Fe,$e,Ge,null,Ue,Ne)),fs(r,E,V,!Me);return}}vS(r,i,E,a,d,m,V,ge,Fe)}function Y8(r){for(var i=r;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var d=0;d<a.length;d++){var m=a[d],E=m.getSnapshot;m=m.value;try{if(!zn(E(),m))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function fs(r,i,a,d){i&=~mg,i&=~oa,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var m=i;0<m;){var E=31-Ke(m),V=1<<E;d[E]=-1,m&=~V}a!==0&&Ye(r,a,i)}function yh(){return(Pt&6)===0?($l(0),!1):!0}function xg(){if(St!==null){if(kt===0)var r=St.return;else r=St,so=Ws=null,Py(r),nu=null,Sl=0,r=St;for(;r!==null;)qE(r.alternate,r),r=r.return;St=null}}function du(r,i){var a=r.timeoutHandle;a!==-1&&(r.timeoutHandle=-1,p4(a)),a=r.cancelPendingCommit,a!==null&&(r.cancelPendingCommit=null,a()),bo=0,xg(),Vt=r,St=a=io(r.current,null),Ft=i,kt=0,Qn=null,as=!1,cu=dt(r,i),gg=!1,fu=Gn=mg=oa=us=fr=0,_n=Ll=null,bg=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var m=31-Ke(d),E=1<<m;i|=r[m],d&=~E}return mo=i,Df(),a}function dS(r,i){wt=null,X.H=Rl,i===ru||i===Hf?(i=Ox(),kt=3):i===_y?(i=Ox(),kt=4):kt=i===eg?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Qn=i,St===null&&(fr=1,ih(r,ai(i,r.current)))}function pS(){var r=qn.current;return r===null?!0:(Ft&4194048)===Ft?fi===null:(Ft&62914560)===Ft||(Ft&536870912)!==0?r===fi:!1}function yS(){var r=X.H;return X.H=Rl,r===null?Rl:r}function gS(){var r=X.A;return X.A=G8,r}function gh(){fr=4,as||(Ft&4194048)!==Ft&&qn.current!==null||(cu=!0),(us&134217727)===0&&(oa&134217727)===0||Vt===null||fs(Vt,Ft,Gn,!1)}function Eg(r,i,a){var d=Pt;Pt|=2;var m=yS(),E=gS();(Vt!==r||Ft!==i)&&(ph=null,du(r,i)),i=!1;var V=fr;e:do try{if(kt!==0&&St!==null){var ge=St,Fe=Qn;switch(kt){case 8:xg(),V=6;break e;case 3:case 2:case 9:case 6:qn.current===null&&(i=!0);var Me=kt;if(kt=0,Qn=null,pu(r,ge,Fe,Me),a&&cu){V=0;break e}break;default:Me=kt,kt=0,Qn=null,pu(r,ge,Fe,Me)}}V8(),V=fr;break}catch($e){dS(r,$e)}while(!0);return i&&r.shellSuspendCounter++,so=Ws=null,Pt=d,X.H=m,X.A=E,St===null&&(Vt=null,Ft=0,Df()),V}function V8(){for(;St!==null;)mS(St)}function W8(r,i){var a=Pt;Pt|=2;var d=yS(),m=gS();Vt!==r||Ft!==i?(ph=null,dh=de()+500,du(r,i)):cu=dt(r,i);e:do try{if(kt!==0&&St!==null){i=St;var E=Qn;t:switch(kt){case 1:kt=0,Qn=null,pu(r,i,E,1);break;case 2:case 9:if(Cx(E)){kt=0,Qn=null,bS(i);break}i=function(){kt!==2&&kt!==9||Vt!==r||(kt=7),qi(r)},E.then(i,i);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:Cx(E)?(kt=0,Qn=null,bS(i)):(kt=0,Qn=null,pu(r,i,E,7));break;case 5:var V=null;switch(St.tag){case 26:V=St.memoizedState;case 5:case 27:var ge=St;if(V?n2(V):ge.stateNode.complete){kt=0,Qn=null;var Fe=ge.sibling;if(Fe!==null)St=Fe;else{var Me=ge.return;Me!==null?(St=Me,mh(Me)):St=null}break t}}kt=0,Qn=null,pu(r,i,E,5);break;case 6:kt=0,Qn=null,pu(r,i,E,6);break;case 8:xg(),fr=6;break e;default:throw Error(o(462))}}X8();break}catch($e){dS(r,$e)}while(!0);return so=Ws=null,X.H=d,X.A=m,Pt=a,St!==null?0:(Vt=null,Ft=0,Df(),fr)}function X8(){for(;St!==null&&!Ee();)mS(St)}function mS(r){var i=zE(r.alternate,r,mo);r.memoizedProps=r.pendingProps,i===null?mh(r):St=i}function bS(r){var i=r,a=i.alternate;switch(i.tag){case 15:case 0:i=jE(a,i,i.pendingProps,i.type,void 0,Ft);break;case 11:i=jE(a,i,i.pendingProps,i.type.render,i.ref,Ft);break;case 5:Py(i);default:qE(a,i),i=St=yx(i,mo),i=zE(a,i,mo)}r.memoizedProps=r.pendingProps,i===null?mh(r):St=i}function pu(r,i,a,d){so=Ws=null,Py(i),nu=null,Sl=0;var m=i.return;try{if(k8(r,m,i,a,Ft)){fr=1,ih(r,ai(a,r.current)),St=null;return}}catch(E){if(m!==null)throw St=m,E;fr=1,ih(r,ai(a,r.current)),St=null;return}i.flags&32768?(Mt||d===1?r=!0:cu||(Ft&536870912)!==0?r=!1:(as=r=!0,(d===2||d===9||d===3||d===6)&&(d=qn.current,d!==null&&d.tag===13&&(d.flags|=16384))),AS(i,r)):mh(i)}function mh(r){var i=r;do{if((i.flags&32768)!==0){AS(i,as);return}r=i.return;var a=$8(i.alternate,i,mo);if(a!==null){St=a;return}if(i=i.sibling,i!==null){St=i;return}St=i=r}while(i!==null);fr===0&&(fr=5)}function AS(r,i){do{var a=q8(r.alternate,r);if(a!==null){a.flags&=32767,St=a;return}if(a=r.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(r=r.sibling,r!==null)){St=r;return}St=r=a}while(r!==null);fr=6,St=null}function vS(r,i,a,d,m,E,V,ge,Fe){r.cancelPendingCommit=null;do bh();while(Ur!==0);if((Pt&6)!==0)throw Error(o(327));if(i!==null){if(i===r.current)throw Error(o(177));if(E=i.lanes|i.childLanes,E|=fy,Ie(r,a,E,V,ge,Fe),r===Vt&&(St=Vt=null,Ft=0),hu=i,cs=r,bo=a,Ag=E,vg=m,lS=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,t4(D,function(){return IS(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=X.T,X.T=null,m=te.p,te.p=2,V=Pt,Pt|=4;try{H8(r,i,a)}finally{Pt=V,te.p=m,X.T=d}}Ur=1,wS(),xS(),ES()}}function wS(){if(Ur===1){Ur=0;var r=cs,i=hu,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=X.T,X.T=null;var d=te.p;te.p=2;var m=Pt;Pt|=4;try{tS(i,r);var E=jg,V=sx(r.containerInfo),ge=E.focusedElem,Fe=E.selectionRange;if(V!==ge&&ge&&ge.ownerDocument&&ox(ge.ownerDocument.documentElement,ge)){if(Fe!==null&&sy(ge)){var Me=Fe.start,$e=Fe.end;if($e===void 0&&($e=Me),"selectionStart"in ge)ge.selectionStart=Me,ge.selectionEnd=Math.min($e,ge.value.length);else{var Ge=ge.ownerDocument||document,Ue=Ge&&Ge.defaultView||window;if(Ue.getSelection){var Ne=Ue.getSelection(),ut=ge.textContent.length,mt=Math.min(Fe.start,ut),Kt=Fe.end===void 0?mt:Math.min(Fe.end,ut);!Ne.extend&&mt>Kt&&(V=Kt,Kt=mt,mt=V);var Be=ix(ge,mt),Oe=ix(ge,Kt);if(Be&&Oe&&(Ne.rangeCount!==1||Ne.anchorNode!==Be.node||Ne.anchorOffset!==Be.offset||Ne.focusNode!==Oe.node||Ne.focusOffset!==Oe.offset)){var Re=Ge.createRange();Re.setStart(Be.node,Be.offset),Ne.removeAllRanges(),mt>Kt?(Ne.addRange(Re),Ne.extend(Oe.node,Oe.offset)):(Re.setEnd(Oe.node,Oe.offset),Ne.addRange(Re))}}}}for(Ge=[],Ne=ge;Ne=Ne.parentNode;)Ne.nodeType===1&&Ge.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof ge.focus=="function"&&ge.focus(),ge=0;ge<Ge.length;ge++){var Qe=Ge[ge];Qe.element.scrollLeft=Qe.left,Qe.element.scrollTop=Qe.top}}Bh=!!Ug,jg=Ug=null}finally{Pt=m,te.p=d,X.T=a}}r.current=i,Ur=2}}function xS(){if(Ur===2){Ur=0;var r=cs,i=hu,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=X.T,X.T=null;var d=te.p;te.p=2;var m=Pt;Pt|=4;try{WE(r,i.alternate,i)}finally{Pt=m,te.p=d,X.T=a}}Ur=3}}function ES(){if(Ur===4||Ur===3){Ur=0,Te();var r=cs,i=hu,a=bo,d=lS;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Ur=5:(Ur=0,hu=cs=null,SS(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(ls=null),tr(a),i=i.stateNode,Se&&typeof Se.onCommitFiberRoot=="function")try{Se.onCommitFiberRoot(ve,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=X.T,m=te.p,te.p=2,X.T=null;try{for(var E=r.onRecoverableError,V=0;V<d.length;V++){var ge=d[V];E(ge.value,{componentStack:ge.stack})}}finally{X.T=i,te.p=m}}(bo&3)!==0&&bh(),qi(r),m=r.pendingLanes,(a&261930)!==0&&(m&42)!==0?r===wg?zl++:(zl=0,wg=r):zl=0,$l(0)}}function SS(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,xl(i)))}function bh(){return wS(),xS(),ES(),IS()}function IS(){if(Ur!==5)return!1;var r=cs,i=Ag;Ag=0;var a=tr(bo),d=X.T,m=te.p;try{te.p=32>a?32:a,X.T=null,a=vg,vg=null;var E=cs,V=bo;if(Ur=0,hu=cs=null,bo=0,(Pt&6)!==0)throw Error(o(331));var ge=Pt;if(Pt|=4,sS(E.current),nS(E,E.current,V,a),Pt=ge,$l(0,!1),Se&&typeof Se.onPostCommitFiberRoot=="function")try{Se.onPostCommitFiberRoot(ve,E)}catch{}return!0}finally{te.p=m,X.T=d,SS(r,i)}}function _S(r,i,a){i=ai(a,i),i=Jy(r.stateNode,i,2),r=ns(r,i,2),r!==null&&(be(r,2),qi(r))}function Lt(r,i,a){if(r.tag===3)_S(r,r,a);else for(;i!==null;){if(i.tag===3){_S(i,r,a);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ls===null||!ls.has(d))){r=ai(a,r),a=CE(2),d=ns(i,a,2),d!==null&&(FE(a,d,i,r),be(d,2),qi(d));break}}i=i.return}}function Sg(r,i,a){var d=r.pingCache;if(d===null){d=r.pingCache=new K8;var m=new Set;d.set(i,m)}else m=d.get(i),m===void 0&&(m=new Set,d.set(i,m));m.has(a)||(gg=!0,m.add(a),r=Z8.bind(null,r,i,a),i.then(r,r))}function Z8(r,i,a){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&a,r.warmLanes&=~a,Vt===r&&(Ft&a)===a&&(fr===4||fr===3&&(Ft&62914560)===Ft&&300>de()-hh?(Pt&2)===0&&du(r,0):mg|=a,fu===Ft&&(fu=0)),qi(r)}function CS(r,i){i===0&&(i=Xt()),r=Ks(r,i),r!==null&&(be(r,i),qi(r))}function J8(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),CS(r,a)}function e4(r,i){var a=0;switch(r.tag){case 31:case 13:var d=r.stateNode,m=r.memoizedState;m!==null&&(a=m.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(o(314))}d!==null&&d.delete(i),CS(r,a)}function t4(r,i){return he(r,i)}var Ah=null,yu=null,Ig=!1,vh=!1,_g=!1,hs=0;function qi(r){r!==yu&&r.next===null&&(yu===null?Ah=yu=r:yu=yu.next=r),vh=!0,Ig||(Ig=!0,n4())}function $l(r,i){if(!_g&&vh){_g=!0;do for(var a=!1,d=Ah;d!==null;){if(r!==0){var m=d.pendingLanes;if(m===0)var E=0;else{var V=d.suspendedLanes,ge=d.pingedLanes;E=(1<<31-Ke(42|r)+1)-1,E&=m&~(V&~ge),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(a=!0,TS(d,E))}else E=Ft,E=ft(d,d===Vt?E:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(E&3)===0||dt(d,E)||(a=!0,TS(d,E));d=d.next}while(a);_g=!1}}function r4(){FS()}function FS(){vh=Ig=!1;var r=0;hs!==0&&d4()&&(r=hs);for(var i=de(),a=null,d=Ah;d!==null;){var m=d.next,E=OS(d,i);E===0?(d.next=null,a===null?Ah=m:a.next=m,m===null&&(yu=a)):(a=d,(r!==0||(E&3)!==0)&&(vh=!0)),d=m}Ur!==0&&Ur!==5||$l(r),hs!==0&&(hs=0)}function OS(r,i){for(var a=r.suspendedLanes,d=r.pingedLanes,m=r.expirationTimes,E=r.pendingLanes&-62914561;0<E;){var V=31-Ke(E),ge=1<<V,Fe=m[V];Fe===-1?((ge&a)===0||(ge&d)!==0)&&(m[V]=At(ge,i)):Fe<=i&&(r.expiredLanes|=ge),E&=~ge}if(i=Vt,a=Ft,a=ft(r,r===i?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,a===0||r===i&&(kt===2||kt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&ce(d),r.callbackNode=null,r.callbackPriority=0;if((a&3)===0||dt(r,a)){if(i=a&-a,i===r.callbackPriority)return i;switch(d!==null&&ce(d),tr(a)){case 2:case 8:a=O;break;case 32:a=D;break;case 268435456:a=me;break;default:a=D}return d=BS.bind(null,r),a=he(a,d),r.callbackPriority=i,r.callbackNode=a,i}return d!==null&&d!==null&&ce(d),r.callbackPriority=2,r.callbackNode=null,2}function BS(r,i){if(Ur!==0&&Ur!==5)return r.callbackNode=null,r.callbackPriority=0,null;var a=r.callbackNode;if(bh()&&r.callbackNode!==a)return null;var d=Ft;return d=ft(r,r===Vt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(fS(r,d,i),OS(r,de()),r.callbackNode!=null&&r.callbackNode===a?BS.bind(null,r):null)}function TS(r,i){if(bh())return null;fS(r,i,!0)}function n4(){y4(function(){(Pt&6)!==0?he(x,r4):FS()})}function Cg(){if(hs===0){var r=eu;r===0&&(r=bt,bt<<=1,(bt&261888)===0&&(bt=256)),hs=r}return hs}function RS(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Ff(""+r)}function MS(r,i){var a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,r.id&&a.setAttribute("form",r.id),i.parentNode.insertBefore(a,i),r=new FormData(r),a.parentNode.removeChild(a),r}function i4(r,i,a,d,m){if(i==="submit"&&a&&a.stateNode===m){var E=RS((m[rr]||null).action),V=d.submitter;V&&(i=(i=V[rr]||null)?RS(i.formAction):V.getAttribute("formAction"),i!==null&&(E=i,V=null));var ge=new Rf("action","action",null,d,m);r.push({event:ge,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(hs!==0){var Fe=V?MS(m,V):new FormData(m);Ky(a,{pending:!0,data:Fe,method:m.method,action:E},null,Fe)}}else typeof E=="function"&&(ge.preventDefault(),Fe=V?MS(m,V):new FormData(m),Ky(a,{pending:!0,data:Fe,method:m.method,action:E},E,Fe))},currentTarget:m}]})}}for(var Fg=0;Fg<cy.length;Fg++){var Og=cy[Fg],o4=Og.toLowerCase(),s4=Og[0].toUpperCase()+Og.slice(1);Si(o4,"on"+s4)}Si(lx,"onAnimationEnd"),Si(cx,"onAnimationIteration"),Si(fx,"onAnimationStart"),Si("dblclick","onDoubleClick"),Si("focusin","onFocus"),Si("focusout","onBlur"),Si(x8,"onTransitionRun"),Si(E8,"onTransitionStart"),Si(S8,"onTransitionCancel"),Si(hx,"onTransitionEnd"),La("onMouseEnter",["mouseout","mouseover"]),La("onMouseLeave",["mouseout","mouseover"]),La("onPointerEnter",["pointerout","pointerover"]),La("onPointerLeave",["pointerout","pointerover"]),qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qs("onBeforeInput",["compositionend","keypress","textInput","paste"]),qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ql="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),a4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ql));function US(r,i){i=(i&4)!==0;for(var a=0;a<r.length;a++){var d=r[a],m=d.event;d=d.listeners;e:{var E=void 0;if(i)for(var V=d.length-1;0<=V;V--){var ge=d[V],Fe=ge.instance,Me=ge.currentTarget;if(ge=ge.listener,Fe!==E&&m.isPropagationStopped())break e;E=ge,m.currentTarget=Me;try{E(m)}catch($e){jf($e)}m.currentTarget=null,E=Fe}else for(V=0;V<d.length;V++){if(ge=d[V],Fe=ge.instance,Me=ge.currentTarget,ge=ge.listener,Fe!==E&&m.isPropagationStopped())break e;E=ge,m.currentTarget=Me;try{E(m)}catch($e){jf($e)}m.currentTarget=null,E=Fe}}}}function It(r,i){var a=i[Mr];a===void 0&&(a=i[Mr]=new Set);var d=r+"__bubble";a.has(d)||(jS(i,r,2,!1),a.add(d))}function Bg(r,i,a){var d=0;i&&(d|=4),jS(a,r,d,i)}var wh="_reactListening"+Math.random().toString(36).slice(2);function Tg(r){if(!r[wh]){r[wh]=!0,$s.forEach(function(a){a!=="selectionchange"&&(a4.has(a)||Bg(a,!1,r),Bg(a,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[wh]||(i[wh]=!0,Bg("selectionchange",!1,i))}}function jS(r,i,a,d){switch(c2(i)){case 2:var m=j4;break;case 8:m=D4;break;default:m=Gg}a=m.bind(null,i,a,r),m=void 0,!Xp||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),d?m!==void 0?r.addEventListener(i,a,{capture:!0,passive:m}):r.addEventListener(i,a,!0):m!==void 0?r.addEventListener(i,a,{passive:m}):r.addEventListener(i,a,!1)}function Rg(r,i,a,d,m){var E=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var V=d.tag;if(V===3||V===4){var ge=d.stateNode.containerInfo;if(ge===m)break;if(V===4)for(V=d.return;V!==null;){var Fe=V.tag;if((Fe===3||Fe===4)&&V.stateNode.containerInfo===m)return;V=V.return}for(;ge!==null;){if(V=wi(ge),V===null)return;if(Fe=V.tag,Fe===5||Fe===6||Fe===26||Fe===27){d=E=V;continue e}ge=ge.parentNode}}d=d.return}kw(function(){var Me=E,$e=Vp(a),Ge=[];e:{var Ue=dx.get(r);if(Ue!==void 0){var Ne=Rf,ut=r;switch(r){case"keypress":if(Bf(a)===0)break e;case"keydown":case"keyup":Ne=e8;break;case"focusin":ut="focus",Ne=ty;break;case"focusout":ut="blur",Ne=ty;break;case"beforeblur":case"afterblur":Ne=ty;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ne=$w;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ne=$6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ne=n8;break;case lx:case cx:case fx:Ne=Q6;break;case hx:Ne=o8;break;case"scroll":case"scrollend":Ne=L6;break;case"wheel":Ne=a8;break;case"copy":case"cut":case"paste":Ne=K6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ne=Hw;break;case"toggle":case"beforetoggle":Ne=l8}var mt=(i&4)!==0,Kt=!mt&&(r==="scroll"||r==="scrollend"),Be=mt?Ue!==null?Ue+"Capture":null:Ue;mt=[];for(var Oe=Me,Re;Oe!==null;){var Qe=Oe;if(Re=Qe.stateNode,Qe=Qe.tag,Qe!==5&&Qe!==26&&Qe!==27||Re===null||Be===null||(Qe=fl(Oe,Be),Qe!=null&&mt.push(Hl(Oe,Qe,Re))),Kt)break;Oe=Oe.return}0<mt.length&&(Ue=new Ne(Ue,ut,null,a,$e),Ge.push({event:Ue,listeners:mt}))}}if((i&7)===0){e:{if(Ue=r==="mouseover"||r==="pointerover",Ne=r==="mouseout"||r==="pointerout",Ue&&a!==Yp&&(ut=a.relatedTarget||a.fromElement)&&(wi(ut)||ut[Rr]))break e;if((Ne||Ue)&&(Ue=$e.window===$e?$e:(Ue=$e.ownerDocument)?Ue.defaultView||Ue.parentWindow:window,Ne?(ut=a.relatedTarget||a.toElement,Ne=Me,ut=ut?wi(ut):null,ut!==null&&(Kt=u(ut),mt=ut.tag,ut!==Kt||mt!==5&&mt!==27&&mt!==6)&&(ut=null)):(Ne=null,ut=Me),Ne!==ut)){if(mt=$w,Qe="onMouseLeave",Be="onMouseEnter",Oe="mouse",(r==="pointerout"||r==="pointerover")&&(mt=Hw,Qe="onPointerLeave",Be="onPointerEnter",Oe="pointer"),Kt=Ne==null?Ue:ki(Ne),Re=ut==null?Ue:ki(ut),Ue=new mt(Qe,Oe+"leave",Ne,a,$e),Ue.target=Kt,Ue.relatedTarget=Re,Qe=null,wi($e)===Me&&(mt=new mt(Be,Oe+"enter",ut,a,$e),mt.target=Re,mt.relatedTarget=Kt,Qe=mt),Kt=Qe,Ne&&ut)t:{for(mt=u4,Be=Ne,Oe=ut,Re=0,Qe=Be;Qe;Qe=mt(Qe))Re++;Qe=0;for(var pt=Oe;pt;pt=mt(pt))Qe++;for(;0<Re-Qe;)Be=mt(Be),Re--;for(;0<Qe-Re;)Oe=mt(Oe),Qe--;for(;Re--;){if(Be===Oe||Oe!==null&&Be===Oe.alternate){mt=Be;break t}Be=mt(Be),Oe=mt(Oe)}mt=null}else mt=null;Ne!==null&&DS(Ge,Ue,Ne,mt,!1),ut!==null&&Kt!==null&&DS(Ge,Kt,ut,mt,!0)}}e:{if(Ue=Me?ki(Me):window,Ne=Ue.nodeName&&Ue.nodeName.toLowerCase(),Ne==="select"||Ne==="input"&&Ue.type==="file")var jt=Zw;else if(Ww(Ue))if(Jw)jt=A8;else{jt=m8;var ct=g8}else Ne=Ue.nodeName,!Ne||Ne.toLowerCase()!=="input"||Ue.type!=="checkbox"&&Ue.type!=="radio"?Me&&Kp(Me.elementType)&&(jt=Zw):jt=b8;if(jt&&(jt=jt(r,Me))){Xw(Ge,jt,a,$e);break e}ct&&ct(r,Ue,Me),r==="focusout"&&Me&&Ue.type==="number"&&Me.memoizedProps.value!=null&&Gp(Ue,"number",Ue.value)}switch(ct=Me?ki(Me):window,r){case"focusin":(Ww(ct)||ct.contentEditable==="true")&&(Ga=ct,ay=Me,Al=null);break;case"focusout":Al=ay=Ga=null;break;case"mousedown":uy=!0;break;case"contextmenu":case"mouseup":case"dragend":uy=!1,ax(Ge,a,$e);break;case"selectionchange":if(w8)break;case"keydown":case"keyup":ax(Ge,a,$e)}var xt;if(ny)e:{switch(r){case"compositionstart":var Ot="onCompositionStart";break e;case"compositionend":Ot="onCompositionEnd";break e;case"compositionupdate":Ot="onCompositionUpdate";break e}Ot=void 0}else Qa?Yw(r,a)&&(Ot="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(Ot="onCompositionStart");Ot&&(Qw&&a.locale!=="ko"&&(Qa||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&Qa&&(xt=Lw()):(Wo=$e,Zp="value"in Wo?Wo.value:Wo.textContent,Qa=!0)),ct=xh(Me,Ot),0<ct.length&&(Ot=new qw(Ot,r,null,a,$e),Ge.push({event:Ot,listeners:ct}),xt?Ot.data=xt:(xt=Vw(a),xt!==null&&(Ot.data=xt)))),(xt=f8?h8(r,a):d8(r,a))&&(Ot=xh(Me,"onBeforeInput"),0<Ot.length&&(ct=new qw("onBeforeInput","beforeinput",null,a,$e),Ge.push({event:ct,listeners:Ot}),ct.data=xt)),i4(Ge,r,Me,a,$e)}US(Ge,i)})}function Hl(r,i,a){return{instance:r,listener:i,currentTarget:a}}function xh(r,i){for(var a=i+"Capture",d=[];r!==null;){var m=r,E=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||E===null||(m=fl(r,a),m!=null&&d.unshift(Hl(r,m,E)),m=fl(r,i),m!=null&&d.push(Hl(r,m,E))),r.tag===3)return d;r=r.return}return[]}function u4(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function DS(r,i,a,d,m){for(var E=i._reactName,V=[];a!==null&&a!==d;){var ge=a,Fe=ge.alternate,Me=ge.stateNode;if(ge=ge.tag,Fe!==null&&Fe===d)break;ge!==5&&ge!==26&&ge!==27||Me===null||(Fe=Me,m?(Me=fl(a,E),Me!=null&&V.unshift(Hl(a,Me,Fe))):m||(Me=fl(a,E),Me!=null&&V.push(Hl(a,Me,Fe)))),a=a.return}V.length!==0&&r.push({event:i,listeners:V})}var l4=/\r\n?/g,c4=/\u0000|\uFFFD/g;function NS(r){return(typeof r=="string"?r:""+r).replace(l4,`
|
|
38
|
+
`).replace(c4,"")}function PS(r,i){return i=NS(i),NS(r)===i}function Gt(r,i,a,d,m,E){switch(a){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||$a(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&$a(r,""+d);break;case"className":_f(r,"class",d);break;case"tabIndex":_f(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":_f(r,a,d);break;case"style":Nw(r,d,E);break;case"data":if(i!=="object"){_f(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||a!=="href")){r.removeAttribute(a);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(a);break}d=Ff(""+d),r.setAttribute(a,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof E=="function"&&(a==="formAction"?(i!=="input"&&Gt(r,i,"name",m.name,m,null),Gt(r,i,"formEncType",m.formEncType,m,null),Gt(r,i,"formMethod",m.formMethod,m,null),Gt(r,i,"formTarget",m.formTarget,m,null)):(Gt(r,i,"encType",m.encType,m,null),Gt(r,i,"method",m.method,m,null),Gt(r,i,"target",m.target,m,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(a);break}d=Ff(""+d),r.setAttribute(a,d);break;case"onClick":d!=null&&(r.onclick=ro);break;case"onScroll":d!=null&&It("scroll",r);break;case"onScrollEnd":d!=null&&It("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(o(61));if(a=d.__html,a!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=a}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}a=Ff(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(a,""+d):r.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(a,""):r.removeAttribute(a);break;case"capture":case"download":d===!0?r.setAttribute(a,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(a,d):r.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(a,d):r.removeAttribute(a);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(a):r.setAttribute(a,d);break;case"popover":It("beforetoggle",r),It("toggle",r),If(r,"popover",d);break;case"xlinkActuate":to(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":to(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":to(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":to(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":to(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":to(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":to(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":to(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":to(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":If(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=P6.get(a)||a,If(r,a,d))}}function Mg(r,i,a,d,m,E){switch(a){case"style":Nw(r,d,E);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(o(61));if(a=d.__html,a!=null){if(m.children!=null)throw Error(o(60));r.innerHTML=a}}break;case"children":typeof d=="string"?$a(r,d):(typeof d=="number"||typeof d=="bigint")&&$a(r,""+d);break;case"onScroll":d!=null&&It("scroll",r);break;case"onScrollEnd":d!=null&&It("scrollend",r);break;case"onClick":d!=null&&(r.onclick=ro);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fw.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(m=a.endsWith("Capture"),i=a.slice(2,m?a.length-7:void 0),E=r[rr]||null,E=E!=null?E[a]:null,typeof E=="function"&&r.removeEventListener(i,E,m),typeof d=="function")){typeof E!="function"&&E!==null&&(a in r?r[a]=null:r.hasAttribute(a)&&r.removeAttribute(a)),r.addEventListener(i,d,m);break e}a in r?r[a]=d:d===!0?r.setAttribute(a,""):If(r,a,d)}}}function Xr(r,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":It("error",r),It("load",r);var d=!1,m=!1,E;for(E in a)if(a.hasOwnProperty(E)){var V=a[E];if(V!=null)switch(E){case"src":d=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,E,V,a,null)}}m&&Gt(r,i,"srcSet",a.srcSet,a,null),d&&Gt(r,i,"src",a.src,a,null);return;case"input":It("invalid",r);var ge=E=V=m=null,Fe=null,Me=null;for(d in a)if(a.hasOwnProperty(d)){var $e=a[d];if($e!=null)switch(d){case"name":m=$e;break;case"type":V=$e;break;case"checked":Fe=$e;break;case"defaultChecked":Me=$e;break;case"value":E=$e;break;case"defaultValue":ge=$e;break;case"children":case"dangerouslySetInnerHTML":if($e!=null)throw Error(o(137,i));break;default:Gt(r,i,d,$e,a,null)}}Mw(r,E,ge,Fe,Me,V,m,!1);return;case"select":It("invalid",r),d=V=E=null;for(m in a)if(a.hasOwnProperty(m)&&(ge=a[m],ge!=null))switch(m){case"value":E=ge;break;case"defaultValue":V=ge;break;case"multiple":d=ge;default:Gt(r,i,m,ge,a,null)}i=E,a=V,r.multiple=!!d,i!=null?za(r,!!d,i,!1):a!=null&&za(r,!!d,a,!0);return;case"textarea":It("invalid",r),E=m=d=null;for(V in a)if(a.hasOwnProperty(V)&&(ge=a[V],ge!=null))switch(V){case"value":d=ge;break;case"defaultValue":m=ge;break;case"children":E=ge;break;case"dangerouslySetInnerHTML":if(ge!=null)throw Error(o(91));break;default:Gt(r,i,V,ge,a,null)}jw(r,d,m,E);return;case"option":for(Fe in a)if(a.hasOwnProperty(Fe)&&(d=a[Fe],d!=null))switch(Fe){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Gt(r,i,Fe,d,a,null)}return;case"dialog":It("beforetoggle",r),It("toggle",r),It("cancel",r),It("close",r);break;case"iframe":case"object":It("load",r);break;case"video":case"audio":for(d=0;d<ql.length;d++)It(ql[d],r);break;case"image":It("error",r),It("load",r);break;case"details":It("toggle",r);break;case"embed":case"source":case"link":It("error",r),It("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Me in a)if(a.hasOwnProperty(Me)&&(d=a[Me],d!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,Me,d,a,null)}return;default:if(Kp(i)){for($e in a)a.hasOwnProperty($e)&&(d=a[$e],d!==void 0&&Mg(r,i,$e,d,a,void 0));return}}for(ge in a)a.hasOwnProperty(ge)&&(d=a[ge],d!=null&&Gt(r,i,ge,d,a,null))}function f4(r,i,a,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,E=null,V=null,ge=null,Fe=null,Me=null,$e=null;for(Ne in a){var Ge=a[Ne];if(a.hasOwnProperty(Ne)&&Ge!=null)switch(Ne){case"checked":break;case"value":break;case"defaultValue":Fe=Ge;default:d.hasOwnProperty(Ne)||Gt(r,i,Ne,null,d,Ge)}}for(var Ue in d){var Ne=d[Ue];if(Ge=a[Ue],d.hasOwnProperty(Ue)&&(Ne!=null||Ge!=null))switch(Ue){case"type":E=Ne;break;case"name":m=Ne;break;case"checked":Me=Ne;break;case"defaultChecked":$e=Ne;break;case"value":V=Ne;break;case"defaultValue":ge=Ne;break;case"children":case"dangerouslySetInnerHTML":if(Ne!=null)throw Error(o(137,i));break;default:Ne!==Ge&&Gt(r,i,Ue,Ne,d,Ge)}}Qp(r,V,ge,Fe,Me,$e,E,m);return;case"select":Ne=V=ge=Ue=null;for(E in a)if(Fe=a[E],a.hasOwnProperty(E)&&Fe!=null)switch(E){case"value":break;case"multiple":Ne=Fe;default:d.hasOwnProperty(E)||Gt(r,i,E,null,d,Fe)}for(m in d)if(E=d[m],Fe=a[m],d.hasOwnProperty(m)&&(E!=null||Fe!=null))switch(m){case"value":Ue=E;break;case"defaultValue":ge=E;break;case"multiple":V=E;default:E!==Fe&&Gt(r,i,m,E,d,Fe)}i=ge,a=V,d=Ne,Ue!=null?za(r,!!a,Ue,!1):!!d!=!!a&&(i!=null?za(r,!!a,i,!0):za(r,!!a,a?[]:"",!1));return;case"textarea":Ne=Ue=null;for(ge in a)if(m=a[ge],a.hasOwnProperty(ge)&&m!=null&&!d.hasOwnProperty(ge))switch(ge){case"value":break;case"children":break;default:Gt(r,i,ge,null,d,m)}for(V in d)if(m=d[V],E=a[V],d.hasOwnProperty(V)&&(m!=null||E!=null))switch(V){case"value":Ue=m;break;case"defaultValue":Ne=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==E&&Gt(r,i,V,m,d,E)}Uw(r,Ue,Ne);return;case"option":for(var ut in a)if(Ue=a[ut],a.hasOwnProperty(ut)&&Ue!=null&&!d.hasOwnProperty(ut))switch(ut){case"selected":r.selected=!1;break;default:Gt(r,i,ut,null,d,Ue)}for(Fe in d)if(Ue=d[Fe],Ne=a[Fe],d.hasOwnProperty(Fe)&&Ue!==Ne&&(Ue!=null||Ne!=null))switch(Fe){case"selected":r.selected=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;default:Gt(r,i,Fe,Ue,d,Ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var mt in a)Ue=a[mt],a.hasOwnProperty(mt)&&Ue!=null&&!d.hasOwnProperty(mt)&&Gt(r,i,mt,null,d,Ue);for(Me in d)if(Ue=d[Me],Ne=a[Me],d.hasOwnProperty(Me)&&Ue!==Ne&&(Ue!=null||Ne!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":if(Ue!=null)throw Error(o(137,i));break;default:Gt(r,i,Me,Ue,d,Ne)}return;default:if(Kp(i)){for(var Kt in a)Ue=a[Kt],a.hasOwnProperty(Kt)&&Ue!==void 0&&!d.hasOwnProperty(Kt)&&Mg(r,i,Kt,void 0,d,Ue);for($e in d)Ue=d[$e],Ne=a[$e],!d.hasOwnProperty($e)||Ue===Ne||Ue===void 0&&Ne===void 0||Mg(r,i,$e,Ue,d,Ne);return}}for(var Be in a)Ue=a[Be],a.hasOwnProperty(Be)&&Ue!=null&&!d.hasOwnProperty(Be)&&Gt(r,i,Be,null,d,Ue);for(Ge in d)Ue=d[Ge],Ne=a[Ge],!d.hasOwnProperty(Ge)||Ue===Ne||Ue==null&&Ne==null||Gt(r,i,Ge,Ue,d,Ne)}function kS(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function h4(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,a=performance.getEntriesByType("resource"),d=0;d<a.length;d++){var m=a[d],E=m.transferSize,V=m.initiatorType,ge=m.duration;if(E&&ge&&kS(V)){for(V=0,ge=m.responseEnd,d+=1;d<a.length;d++){var Fe=a[d],Me=Fe.startTime;if(Me>ge)break;var $e=Fe.transferSize,Ge=Fe.initiatorType;$e&&kS(Ge)&&(Fe=Fe.responseEnd,V+=$e*(Fe<ge?1:(ge-Me)/(Fe-Me)))}if(--d,i+=8*(E+V)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Ug=null,jg=null;function Eh(r){return r.nodeType===9?r:r.ownerDocument}function LS(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zS(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Dg(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Ng=null;function d4(){var r=window.event;return r&&r.type==="popstate"?r===Ng?!1:(Ng=r,!0):(Ng=null,!1)}var $S=typeof setTimeout=="function"?setTimeout:void 0,p4=typeof clearTimeout=="function"?clearTimeout:void 0,qS=typeof Promise=="function"?Promise:void 0,y4=typeof queueMicrotask=="function"?queueMicrotask:typeof qS<"u"?function(r){return qS.resolve(null).then(r).catch(g4)}:$S;function g4(r){setTimeout(function(){throw r})}function ds(r){return r==="head"}function HS(r,i){var a=i,d=0;do{var m=a.nextSibling;if(r.removeChild(a),m&&m.nodeType===8)if(a=m.data,a==="/$"||a==="/&"){if(d===0){r.removeChild(m),Au(i);return}d--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")d++;else if(a==="html")Ql(r.ownerDocument.documentElement);else if(a==="head"){a=r.ownerDocument.head,Ql(a);for(var E=a.firstChild;E;){var V=E.nextSibling,ge=E.nodeName;E[Ar]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&E.rel.toLowerCase()==="stylesheet"||a.removeChild(E),E=V}}else a==="body"&&Ql(r.ownerDocument.body);a=m}while(a);Au(i)}function QS(r,i){var a=r;r=0;do{var d=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(r===0)break;r--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||r++;a=d}while(a)}function Pg(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Pg(a),Vo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}r.removeChild(a)}}function m4(r,i,a,d){for(;r.nodeType===1;){var m=a;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Ar])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(E=r.getAttribute("rel"),E==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(E!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(E=r.getAttribute("src"),(E!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&E&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var E=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===E)return r}else return r;if(r=hi(r.nextSibling),r===null)break}return null}function b4(r,i,a){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=hi(r.nextSibling),r===null))return null;return r}function GS(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=hi(r.nextSibling),r===null))return null;return r}function kg(r){return r.data==="$?"||r.data==="$~"}function Lg(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function A4(r,i){var a=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||a.readyState!=="loading")i();else{var d=function(){i(),a.removeEventListener("DOMContentLoaded",d)};a.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function hi(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var zg=null;function KS(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"||a==="/&"){if(i===0)return hi(r.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}r=r.nextSibling}return null}function YS(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return r;i--}else a!=="/$"&&a!=="/&"||i++}r=r.previousSibling}return null}function VS(r,i,a){switch(i=Eh(a),r){case"html":if(r=i.documentElement,!r)throw Error(o(452));return r;case"head":if(r=i.head,!r)throw Error(o(453));return r;case"body":if(r=i.body,!r)throw Error(o(454));return r;default:throw Error(o(451))}}function Ql(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Vo(r)}var di=new Map,WS=new Set;function Sh(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ao=te.d;te.d={f:v4,r:w4,D:x4,C:E4,L:S4,m:I4,X:C4,S:_4,M:F4};function v4(){var r=Ao.f(),i=yh();return r||i}function w4(r){var i=xi(r);i!==null&&i.tag===5&&i.type==="form"?dE(i):Ao.r(r)}var gu=typeof document>"u"?null:document;function XS(r,i,a){var d=gu;if(d&&typeof i=="string"&&i){var m=oi(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof a=="string"&&(m+='[crossorigin="'+a+'"]'),WS.has(m)||(WS.add(m),r={rel:r,crossOrigin:a,href:i},d.querySelector(m)===null&&(i=d.createElement("link"),Xr(i,"link",r),ar(i),d.head.appendChild(i)))}}function x4(r){Ao.D(r),XS("dns-prefetch",r,null)}function E4(r,i){Ao.C(r,i),XS("preconnect",r,i)}function S4(r,i,a){Ao.L(r,i,a);var d=gu;if(d&&r&&i){var m='link[rel="preload"][as="'+oi(i)+'"]';i==="image"&&a&&a.imageSrcSet?(m+='[imagesrcset="'+oi(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(m+='[imagesizes="'+oi(a.imageSizes)+'"]')):m+='[href="'+oi(r)+'"]';var E=m;switch(i){case"style":E=mu(r);break;case"script":E=bu(r)}di.has(E)||(r=y({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:r,as:i},a),di.set(E,r),d.querySelector(m)!==null||i==="style"&&d.querySelector(Gl(E))||i==="script"&&d.querySelector(Kl(E))||(i=d.createElement("link"),Xr(i,"link",r),ar(i),d.head.appendChild(i)))}}function I4(r,i){Ao.m(r,i);var a=gu;if(a&&r){var d=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+oi(d)+'"][href="'+oi(r)+'"]',E=m;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=bu(r)}if(!di.has(E)&&(r=y({rel:"modulepreload",href:r},i),di.set(E,r),a.querySelector(m)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Kl(E)))return}d=a.createElement("link"),Xr(d,"link",r),ar(d),a.head.appendChild(d)}}}function _4(r,i,a){Ao.S(r,i,a);var d=gu;if(d&&r){var m=Ei(d).hoistableStyles,E=mu(r);i=i||"default";var V=m.get(E);if(!V){var ge={loading:0,preload:null};if(V=d.querySelector(Gl(E)))ge.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":i},a),(a=di.get(E))&&$g(r,a);var Fe=V=d.createElement("link");ar(Fe),Xr(Fe,"link",r),Fe._p=new Promise(function(Me,$e){Fe.onload=Me,Fe.onerror=$e}),Fe.addEventListener("load",function(){ge.loading|=1}),Fe.addEventListener("error",function(){ge.loading|=2}),ge.loading|=4,Ih(V,i,d)}V={type:"stylesheet",instance:V,count:1,state:ge},m.set(E,V)}}}function C4(r,i){Ao.X(r,i);var a=gu;if(a&&r){var d=Ei(a).hoistableScripts,m=bu(r),E=d.get(m);E||(E=a.querySelector(Kl(m)),E||(r=y({src:r,async:!0},i),(i=di.get(m))&&qg(r,i),E=a.createElement("script"),ar(E),Xr(E,"link",r),a.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},d.set(m,E))}}function F4(r,i){Ao.M(r,i);var a=gu;if(a&&r){var d=Ei(a).hoistableScripts,m=bu(r),E=d.get(m);E||(E=a.querySelector(Kl(m)),E||(r=y({src:r,async:!0,type:"module"},i),(i=di.get(m))&&qg(r,i),E=a.createElement("script"),ar(E),Xr(E,"link",r),a.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},d.set(m,E))}}function ZS(r,i,a,d){var m=(m=fe.current)?Sh(m):null;if(!m)throw Error(o(446));switch(r){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=mu(a.href),a=Ei(m).hoistableStyles,d=a.get(i),d||(d={type:"style",instance:null,count:0,state:null},a.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){r=mu(a.href);var E=Ei(m).hoistableStyles,V=E.get(r);if(V||(m=m.ownerDocument||m,V={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(r,V),(E=m.querySelector(Gl(r)))&&!E._p&&(V.instance=E,V.state.loading=5),di.has(r)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},di.set(r,a),E||O4(m,r,a,V.state))),i&&d===null)throw Error(o(528,""));return V}if(i&&d!==null)throw Error(o(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bu(a),a=Ei(m).hoistableScripts,d=a.get(i),d||(d={type:"script",instance:null,count:0,state:null},a.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,r))}}function mu(r){return'href="'+oi(r)+'"'}function Gl(r){return'link[rel="stylesheet"]['+r+"]"}function JS(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function O4(r,i,a,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Xr(i,"link",a),ar(i),r.head.appendChild(i))}function bu(r){return'[src="'+oi(r)+'"]'}function Kl(r){return"script[async]"+r}function e2(r,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+oi(a.href)+'"]');if(d)return i.instance=d,ar(d),d;var m=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),ar(d),Xr(d,"style",m),Ih(d,a.precedence,r),i.instance=d;case"stylesheet":m=mu(a.href);var E=r.querySelector(Gl(m));if(E)return i.state.loading|=4,i.instance=E,ar(E),E;d=JS(a),(m=di.get(m))&&$g(d,m),E=(r.ownerDocument||r).createElement("link"),ar(E);var V=E;return V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Xr(E,"link",d),i.state.loading|=4,Ih(E,a.precedence,r),i.instance=E;case"script":return E=bu(a.src),(m=r.querySelector(Kl(E)))?(i.instance=m,ar(m),m):(d=a,(m=di.get(E))&&(d=y({},a),qg(d,m)),r=r.ownerDocument||r,m=r.createElement("script"),ar(m),Xr(m,"link",d),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(o(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Ih(d,a.precedence,r));return i.instance}function Ih(r,i,a){for(var d=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=d.length?d[d.length-1]:null,E=m,V=0;V<d.length;V++){var ge=d[V];if(ge.dataset.precedence===i)E=ge;else if(E!==m)break}E?E.parentNode.insertBefore(r,E.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(r,i.firstChild))}function $g(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function qg(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var _h=null;function t2(r,i,a){if(_h===null){var d=new Map,m=_h=new Map;m.set(a,d)}else m=_h,d=m.get(a),d||(d=new Map,m.set(a,d));if(d.has(r))return d;for(d.set(r,null),a=a.getElementsByTagName(r),m=0;m<a.length;m++){var E=a[m];if(!(E[Ar]||E[Ht]||r==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var V=E.getAttribute(i)||"";V=r+V;var ge=d.get(V);ge?ge.push(E):d.set(V,[E])}}return d}function r2(r,i,a){r=r.ownerDocument||r,r.head.insertBefore(a,i==="title"?r.querySelector("head > title"):null)}function B4(r,i,a){if(a===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function n2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function T4(r,i,a,d){if(a.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var m=mu(d.href),E=i.querySelector(Gl(m));if(E){i=E._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Ch.bind(r),i.then(r,r)),a.state.loading|=4,a.instance=E,ar(E);return}E=i.ownerDocument||i,d=JS(d),(m=di.get(m))&&$g(d,m),E=E.createElement("link"),ar(E);var V=E;V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Xr(E,"link",d),a.instance=E}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(r.count++,a=Ch.bind(r),i.addEventListener("load",a),i.addEventListener("error",a))}}var Hg=0;function R4(r,i){return r.stylesheets&&r.count===0&&Oh(r,r.stylesheets),0<r.count||0<r.imgCount?function(a){var d=setTimeout(function(){if(r.stylesheets&&Oh(r,r.stylesheets),r.unsuspend){var E=r.unsuspend;r.unsuspend=null,E()}},6e4+i);0<r.imgBytes&&Hg===0&&(Hg=62500*h4());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Oh(r,r.stylesheets),r.unsuspend)){var E=r.unsuspend;r.unsuspend=null,E()}},(r.imgBytes>Hg?50:800)+i);return r.unsuspend=a,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(m)}}:null}function Ch(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oh(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Fh=null;function Oh(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Fh=new Map,i.forEach(M4,r),Fh=null,Ch.call(r))}function M4(r,i){if(!(i.state.loading&4)){var a=Fh.get(r);if(a)var d=a.get(null);else{a=new Map,Fh.set(r,a);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<m.length;E++){var V=m[E];(V.nodeName==="LINK"||V.getAttribute("media")!=="not all")&&(a.set(V.dataset.precedence,V),d=V)}d&&a.set(null,d)}m=i.instance,V=m.getAttribute("data-precedence"),E=a.get(V)||d,E===d&&a.set(null,m),a.set(V,m),this.count++,d=Ch.bind(this),m.addEventListener("load",d),m.addEventListener("error",d),E?E.parentNode.insertBefore(m,E.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var Yl={$$typeof:I,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function U4(r,i,a,d,m,E,V,ge,Fe){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=br(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=br(0),this.hiddenUpdates=br(null),this.identifierPrefix=d,this.onUncaughtError=m,this.onCaughtError=E,this.onRecoverableError=V,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Fe,this.incompleteTransitions=new Map}function i2(r,i,a,d,m,E,V,ge,Fe,Me,$e,Ge){return r=new U4(r,i,a,V,Fe,Me,$e,Ge,ge),i=1,E===!0&&(i|=24),E=$n(3,null,null,i),r.current=E,E.stateNode=r,i=Ey(),i.refCount++,r.pooledCache=i,i.refCount++,E.memoizedState={element:d,isDehydrated:a,cache:i},Cy(E),r}function o2(r){return r?(r=Va,r):Va}function s2(r,i,a,d,m,E){m=o2(m),d.context===null?d.context=m:d.pendingContext=m,d=rs(i),d.payload={element:a},E=E===void 0?null:E,E!==null&&(d.callback=E),a=ns(r,d,i),a!==null&&(Cn(a,r,i),_l(a,r,i))}function a2(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<i?a:i}}function Qg(r,i){a2(r,i),(r=r.alternate)&&a2(r,i)}function u2(r){if(r.tag===13||r.tag===31){var i=Ks(r,67108864);i!==null&&Cn(i,r,67108864),Qg(r,67108864)}}function l2(r){if(r.tag===13||r.tag===31){var i=Kn();i=qt(i);var a=Ks(r,i);a!==null&&Cn(a,r,i),Qg(r,i)}}var Bh=!0;function j4(r,i,a,d){var m=X.T;X.T=null;var E=te.p;try{te.p=2,Gg(r,i,a,d)}finally{te.p=E,X.T=m}}function D4(r,i,a,d){var m=X.T;X.T=null;var E=te.p;try{te.p=8,Gg(r,i,a,d)}finally{te.p=E,X.T=m}}function Gg(r,i,a,d){if(Bh){var m=Kg(d);if(m===null)Rg(r,i,d,Th,a),f2(r,d);else if(P4(m,r,i,a,d))d.stopPropagation();else if(f2(r,d),i&4&&-1<N4.indexOf(r)){for(;m!==null;){var E=xi(m);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var V=tt(E.pendingLanes);if(V!==0){var ge=E;for(ge.pendingLanes|=2,ge.entangledLanes|=2;V;){var Fe=1<<31-Ke(V);ge.entanglements[1]|=Fe,V&=~Fe}qi(E),(Pt&6)===0&&(dh=de()+500,$l(0))}}break;case 31:case 13:ge=Ks(E,2),ge!==null&&Cn(ge,E,2),yh(),Qg(E,2)}if(E=Kg(d),E===null&&Rg(r,i,d,Th,a),E===m)break;m=E}m!==null&&d.stopPropagation()}else Rg(r,i,d,null,a)}}function Kg(r){return r=Vp(r),Yg(r)}var Th=null;function Yg(r){if(Th=null,r=wi(r),r!==null){var i=u(r);if(i===null)r=null;else{var a=i.tag;if(a===13){if(r=l(i),r!==null)return r;r=null}else if(a===31){if(r=c(i),r!==null)return r;r=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Th=r,null}function c2(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(we()){case x:return 2;case O:return 8;case D:case ie:return 32;case me:return 268435456;default:return 32}default:return 32}}var Vg=!1,ps=null,ys=null,gs=null,Vl=new Map,Wl=new Map,ms=[],N4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function f2(r,i){switch(r){case"focusin":case"focusout":ps=null;break;case"dragenter":case"dragleave":ys=null;break;case"mouseover":case"mouseout":gs=null;break;case"pointerover":case"pointerout":Vl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wl.delete(i.pointerId)}}function Xl(r,i,a,d,m,E){return r===null||r.nativeEvent!==E?(r={blockedOn:i,domEventName:a,eventSystemFlags:d,nativeEvent:E,targetContainers:[m]},i!==null&&(i=xi(i),i!==null&&u2(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function P4(r,i,a,d,m){switch(i){case"focusin":return ps=Xl(ps,r,i,a,d,m),!0;case"dragenter":return ys=Xl(ys,r,i,a,d,m),!0;case"mouseover":return gs=Xl(gs,r,i,a,d,m),!0;case"pointerover":var E=m.pointerId;return Vl.set(E,Xl(Vl.get(E)||null,r,i,a,d,m)),!0;case"gotpointercapture":return E=m.pointerId,Wl.set(E,Xl(Wl.get(E)||null,r,i,a,d,m)),!0}return!1}function h2(r){var i=wi(r.target);if(i!==null){var a=u(i);if(a!==null){if(i=a.tag,i===13){if(i=l(a),i!==null){r.blockedOn=i,Ln(r.priority,function(){l2(a)});return}}else if(i===31){if(i=c(a),i!==null){r.blockedOn=i,Ln(r.priority,function(){l2(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Rh(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var a=Kg(r.nativeEvent);if(a===null){a=r.nativeEvent;var d=new a.constructor(a.type,a);Yp=d,a.target.dispatchEvent(d),Yp=null}else return i=xi(a),i!==null&&u2(i),r.blockedOn=a,!1;i.shift()}return!0}function d2(r,i,a){Rh(r)&&a.delete(i)}function k4(){Vg=!1,ps!==null&&Rh(ps)&&(ps=null),ys!==null&&Rh(ys)&&(ys=null),gs!==null&&Rh(gs)&&(gs=null),Vl.forEach(d2),Wl.forEach(d2)}function Mh(r,i){r.blockedOn===i&&(r.blockedOn=null,Vg||(Vg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,k4)))}var Uh=null;function p2(r){Uh!==r&&(Uh=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uh===r&&(Uh=null);for(var i=0;i<r.length;i+=3){var a=r[i],d=r[i+1],m=r[i+2];if(typeof d!="function"){if(Yg(d||a)===null)continue;break}var E=xi(a);E!==null&&(r.splice(i,3),i-=3,Ky(E,{pending:!0,data:m,method:a.method,action:d},d,m))}}))}function Au(r){function i(Fe){return Mh(Fe,r)}ps!==null&&Mh(ps,r),ys!==null&&Mh(ys,r),gs!==null&&Mh(gs,r),Vl.forEach(i),Wl.forEach(i);for(var a=0;a<ms.length;a++){var d=ms[a];d.blockedOn===r&&(d.blockedOn=null)}for(;0<ms.length&&(a=ms[0],a.blockedOn===null);)h2(a),a.blockedOn===null&&ms.shift();if(a=(r.ownerDocument||r).$$reactFormReplay,a!=null)for(d=0;d<a.length;d+=3){var m=a[d],E=a[d+1],V=m[rr]||null;if(typeof E=="function")V||p2(a);else if(V){var ge=null;if(E&&E.hasAttribute("formAction")){if(m=E,V=E[rr]||null)ge=V.formAction;else if(Yg(m)!==null)continue}else ge=V.action;typeof ge=="function"?a[d+1]=ge:(a.splice(d,3),d-=3),p2(a)}}}function y2(){function r(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(V){return m=V})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),d||setTimeout(a,20)}function a(){if(!d&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function Wg(r){this._internalRoot=r}jh.prototype.render=Wg.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(o(409));var a=i.current,d=Kn();s2(a,d,r,i,null,null)},jh.prototype.unmount=Wg.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;s2(r.current,2,null,r,null,null),yh(),i[Rr]=null}};function jh(r){this._internalRoot=r}jh.prototype.unstable_scheduleHydration=function(r){if(r){var i=Br();r={blockedOn:null,target:r,priority:i};for(var a=0;a<ms.length&&i!==0&&i<ms[a].priority;a++);ms.splice(a,0,r),a===0&&h2(r)}};var g2=t.version;if(g2!=="19.2.0")throw Error(o(527,g2,"19.2.0"));te.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(o(188)):(r=Object.keys(r).join(","),Error(o(268,r)));return r=f(i),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var L4={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dh.isDisabled&&Dh.supportsFiber)try{ve=Dh.inject(L4),Se=Dh}catch{}}return ec.createRoot=function(r,i){if(!s(r))throw Error(o(299));var a=!1,d="",m=EE,E=SE,V=IE;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(V=i.onRecoverableError)),i=i2(r,1,!1,null,null,a,d,null,m,E,V,y2),r[Rr]=i.current,Tg(r),new Wg(i)},ec.hydrateRoot=function(r,i,a){if(!s(r))throw Error(o(299));var d=!1,m="",E=EE,V=SE,ge=IE,Fe=null;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(E=a.onUncaughtError),a.onCaughtError!==void 0&&(V=a.onCaughtError),a.onRecoverableError!==void 0&&(ge=a.onRecoverableError),a.formState!==void 0&&(Fe=a.formState)),i=i2(r,1,!0,i,a??null,d,m,Fe,E,V,ge,y2),i.context=o2(null),a=i.current,d=Kn(),d=qt(d),m=rs(d),m.callback=null,ns(a,m,d),a=d,i.current.lanes=a,be(i,a),qi(i),r[Rr]=i.current,Tg(r),new jh(i)},ec.version="19.2.0",ec}var T2;function iR(){if(T2)return tm.exports;T2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),tm.exports=nR(),tm.exports}var oR=iR(),LF=kF();function uc({isOpen:e,onClose:t,title:n,children:o,className:s,url:u}){Xe.useEffect(()=>{if(e){const h=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e]);const l=()=>{var h;u&&((h=globalThis==null?void 0:globalThis.open)==null||h.call(globalThis,u,"_blank","noopener,noreferrer"),t())};if(!e)return null;const c=_e.jsx("div",{className:"modal-overlay",onClick:t,children:_e.jsxs("div",{className:`modal-content ${s}`,onClick:h=>h.stopPropagation(),children:[_e.jsxs("div",{className:"modal-header",children:[_e.jsx("h2",{className:"modal-title",children:n}),_e.jsxs("div",{className:"modal-header-actions",children:[u&&_e.jsx("button",{className:"modal-open-new-window",onClick:l,"aria-label":"Open in new window",title:"Open in new window",type:"button",children:_e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_e.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),_e.jsx("polyline",{points:"15 3 21 3 21 9"}),_e.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}),_e.jsx("button",{className:"modal-close",onClick:t,type:"button",children:"×"})]})]}),_e.jsx("div",{className:"modal-body",children:o})]})});return typeof document<"u"&&document.body?LF.createPortal(c,document.body):c}const vu=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function sR(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function vc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function ba(e,...t){if(!sR(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function aR(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");vc(e.outputLen),vc(e.blockLen)}function Mu(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function zF(e,t){ba(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function uR(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Uu(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function om(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Hi(e,t){return e<<32-t|e>>>t}const lR=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function cR(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function fR(e){for(let t=0;t<e.length;t++)e[t]=cR(e[t]);return e}const R2=lR?e=>e:fR;function hR(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Xd(e){return typeof e=="string"&&(e=hR(e)),ba(e),e}function dR(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];ba(s),t+=s.length}const n=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];n.set(u,s),s+=u.length}return n}let KA=class{};function $F(e){const t=o=>e().update(Xd(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function pR(e=32){if(vu&&typeof vu.getRandomValues=="function")return vu.getRandomValues(new Uint8Array(e));if(vu&&typeof vu.randomBytes=="function")return Uint8Array.from(vu.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const YA=BigInt(0),cb=BigInt(1);function ef(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function VA(e){if(!ef(e))throw new Error("Uint8Array expected")}function wc(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Lh(e){const t=e.toString(16);return t.length&1?"0"+t:t}function qF(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?YA:BigInt("0x"+e)}const HF=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",yR=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function xc(e){if(VA(e),HF)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=yR[e[n]];return t}const vo={_0:48,_9:57,A:65,F:70,a:97,f:102};function M2(e){if(e>=vo._0&&e<=vo._9)return e-vo._0;if(e>=vo.A&&e<=vo.F)return e-(vo.A-10);if(e>=vo.a&&e<=vo.f)return e-(vo.a-10)}function Nd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(HF)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(n);for(let s=0,u=0;s<n;s++,u+=2){const l=M2(e.charCodeAt(u)),c=M2(e.charCodeAt(u+1));if(l===void 0||c===void 0){const h=e[u]+e[u+1];throw new Error('hex string expected, got non-hex character "'+h+'" at index '+u)}o[s]=l*16+c}return o}function ya(e){return qF(xc(e))}function QF(e){return VA(e),qF(xc(Uint8Array.from(e).reverse()))}function tf(e,t){return Nd(e.toString(16).padStart(t*2,"0"))}function GF(e,t){return tf(e,t).reverse()}function yi(e,t,n){let o;if(typeof t=="string")try{o=Nd(t)}catch(u){throw new Error(e+" must be hex string or Uint8Array, cause: "+u)}else if(ef(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=o.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return o}function Pd(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];VA(s),t+=s.length}const n=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];n.set(u,s),s+=u.length}return n}const sm=e=>typeof e=="bigint"&&YA<=e;function WA(e,t,n){return sm(e)&&sm(t)&&sm(n)&&t<=e&&e<n}function Fu(e,t,n,o){if(!WA(t,n,o))throw new Error("expected valid "+e+": "+n+" <= n < "+o+", got "+t)}function gR(e){let t;for(t=0;e>YA;e>>=cb,t+=1);return t}const Zd=e=>(cb<<BigInt(e))-cb,am=e=>new Uint8Array(e),U2=e=>Uint8Array.from(e);function mR(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let o=am(e),s=am(e),u=0;const l=()=>{o.fill(1),s.fill(0),u=0},c=(...y)=>n(s,o,...y),h=(y=am(0))=>{s=c(U2([0]),y),o=c(),y.length!==0&&(s=c(U2([1]),y),o=c())},f=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let y=0;const g=[];for(;y<t;){o=c();const b=o.slice();g.push(b),y+=o.length}return Pd(...g)};return(y,g)=>{l(),h(y);let b;for(;!(b=g(f()));)h();return l(),b}}const bR={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||ef(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function Jd(e,t,n={}){const o=(s,u,l)=>{const c=bR[u];if(typeof c!="function")throw new Error("invalid validator function");const h=e[s];if(!(l&&h===void 0)&&!c(h,e))throw new Error("param "+String(s)+" is invalid. Expected "+u+", got "+h)};for(const[s,u]of Object.entries(t))o(s,u,!1);for(const[s,u]of Object.entries(n))o(s,u,!0);return e}function j2(e){const t=new WeakMap;return(n,...o)=>{const s=t.get(n);if(s!==void 0)return s;const u=e(n,...o);return t.set(n,u),u}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const On=BigInt(0),bn=BigInt(1),ca=BigInt(2),AR=BigInt(3),KF=BigInt(4),YF=BigInt(5),VF=BigInt(8);function Fn(e,t){const n=e%t;return n>=On?n:t+n}function pi(e,t,n){let o=e;for(;t-- >On;)o*=o,o%=n;return o}function fb(e,t){if(e===On)throw new Error("invert: expected non-zero number");if(t<=On)throw new Error("invert: expected positive modulus, got "+t);let n=Fn(e,t),o=t,s=On,u=bn;for(;n!==On;){const c=o/n,h=o%n,f=s-u*c;o=n,n=h,s=u,u=f}if(o!==bn)throw new Error("invert: does not exist");return Fn(s,t)}function WF(e,t){const n=(e.ORDER+bn)/KF,o=e.pow(t,n);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function vR(e,t){const n=(e.ORDER-YF)/VF,o=e.mul(t,ca),s=e.pow(o,n),u=e.mul(t,s),l=e.mul(e.mul(u,ca),s),c=e.mul(u,e.sub(l,e.ONE));if(!e.eql(e.sqr(c),t))throw new Error("Cannot find square root");return c}function wR(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-bn,n=0;for(;t%ca===On;)t/=ca,n++;let o=ca;const s=XA(e);for(;D2(s,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return WF;let u=s.pow(o,t);const l=(t+bn)/ca;return function(h,f){if(h.is0(f))return f;if(D2(h,f)!==1)throw new Error("Cannot find square root");let p=n,y=h.mul(h.ONE,u),g=h.pow(f,t),b=h.pow(f,l);for(;!h.eql(g,h.ONE);){if(h.is0(g))return h.ZERO;let w=1,B=h.sqr(g);for(;!h.eql(B,h.ONE);)if(w++,B=h.sqr(B),w===p)throw new Error("Cannot find square root");const _=bn<<BigInt(p-w-1),M=h.pow(y,_);p=w,y=h.sqr(M),g=h.mul(g,y),b=h.mul(b,M)}return b}}function xR(e){return e%KF===AR?WF:e%VF===YF?vR:wR(e)}const ER=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function SR(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=ER.reduce((o,s)=>(o[s]="function",o),t);return Jd(e,n)}function IR(e,t,n){if(n<On)throw new Error("invalid exponent, negatives unsupported");if(n===On)return e.ONE;if(n===bn)return t;let o=e.ONE,s=t;for(;n>On;)n&bn&&(o=e.mul(o,s)),s=e.sqr(s),n>>=bn;return o}function XF(e,t,n=!1){const o=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((l,c,h)=>e.is0(c)?l:(o[h]=l,e.mul(l,c)),e.ONE),u=e.inv(s);return t.reduceRight((l,c,h)=>e.is0(c)?l:(o[h]=e.mul(l,o[h]),e.mul(l,c)),u),o}function D2(e,t){const n=(e.ORDER-bn)/ca,o=e.pow(t,n),s=e.eql(o,e.ONE),u=e.eql(o,e.ZERO),l=e.eql(o,e.neg(e.ONE));if(!s&&!u&&!l)throw new Error("invalid Legendre symbol result");return s?1:u?0:-1}function ZF(e,t){t!==void 0&&vc(t);const n=t!==void 0?t:e.toString(2).length,o=Math.ceil(n/8);return{nBitLength:n,nByteLength:o}}function XA(e,t,n=!1,o={}){if(e<=On)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:u}=ZF(e,t);if(u>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let l;const c=Object.freeze({ORDER:e,isLE:n,BITS:s,BYTES:u,MASK:Zd(s),ZERO:On,ONE:bn,create:h=>Fn(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return On<=h&&h<e},is0:h=>h===On,isOdd:h=>(h&bn)===bn,neg:h=>Fn(-h,e),eql:(h,f)=>h===f,sqr:h=>Fn(h*h,e),add:(h,f)=>Fn(h+f,e),sub:(h,f)=>Fn(h-f,e),mul:(h,f)=>Fn(h*f,e),pow:(h,f)=>IR(c,h,f),div:(h,f)=>Fn(h*fb(f,e),e),sqrN:h=>h*h,addN:(h,f)=>h+f,subN:(h,f)=>h-f,mulN:(h,f)=>h*f,inv:h=>fb(h,e),sqrt:o.sqrt||(h=>(l||(l=xR(e)),l(c,h))),toBytes:h=>n?GF(h,u):tf(h,u),fromBytes:h=>{if(h.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+h.length);return n?QF(h):ya(h)},invertBatch:h=>XF(c,h),cmov:(h,f,p)=>p?f:h});return Object.freeze(c)}function JF(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function eO(e){const t=JF(e);return t+Math.ceil(t/2)}function _R(e,t,n=!1){const o=e.length,s=JF(t),u=eO(t);if(o<16||o<u||o>1024)throw new Error("expected "+u+"-1024 bytes of input, got "+o);const l=n?QF(e):ya(e),c=Fn(l,t-bn)+bn;return n?GF(c,s):tf(c,s)}function CR(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const s=BigInt(32),u=BigInt(4294967295),l=Number(n>>s&u),c=Number(n&u),h=o?4:0,f=o?0:4;e.setUint32(t+h,l,o),e.setUint32(t+f,c,o)}function FR(e,t,n){return e&t^~e&n}function OR(e,t,n){return e&t^e&n^t&n}class BR extends KA{constructor(t,n,o,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=s,this.buffer=new Uint8Array(t),this.view=om(this.buffer)}update(t){Mu(this),t=Xd(t),ba(t);const{view:n,buffer:o,blockLen:s}=this,u=t.length;for(let l=0;l<u;){const c=Math.min(s-this.pos,u-l);if(c===s){const h=om(t);for(;s<=u-l;l+=s)this.process(h,l);continue}o.set(t.subarray(l,l+c),this.pos),this.pos+=c,l+=c,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Mu(this),zF(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:s,isLE:u}=this;let{pos:l}=this;n[l++]=128,Uu(this.buffer.subarray(l)),this.padOffset>s-l&&(this.process(o,0),l=0);for(let y=l;y<s;y++)n[y]=0;CR(o,s-8,BigInt(this.length*8),u),this.process(o,0);const c=om(t),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const f=h/4,p=this.get();if(f>p.length)throw new Error("_sha2: outputLen bigger than state");for(let y=0;y<f;y++)c.setUint32(4*y,p[y],u)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:o,length:s,finished:u,destroyed:l,pos:c}=this;return t.destroyed=l,t.finished=u,t.length=s,t.pos=c,s%n&&t.buffer.set(o),t}clone(){return this._cloneInto()}}const As=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),zh=BigInt(2**32-1),N2=BigInt(32);function TR(e,t=!1){return t?{h:Number(e&zh),l:Number(e>>N2&zh)}:{h:Number(e>>N2&zh)|0,l:Number(e&zh)|0}}function RR(e,t=!1){const n=e.length;let o=new Uint32Array(n),s=new Uint32Array(n);for(let u=0;u<n;u++){const{h:l,l:c}=TR(e[u],t);[o[u],s[u]]=[l,c]}return[o,s]}const MR=(e,t,n)=>e<<n|t>>>32-n,UR=(e,t,n)=>t<<n|e>>>32-n,jR=(e,t,n)=>t<<n-32|e>>>64-n,DR=(e,t,n)=>e<<n-32|t>>>64-n,NR=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),vs=new Uint32Array(64);class PR extends BR{constructor(t=32){super(64,t,8,!1),this.A=As[0]|0,this.B=As[1]|0,this.C=As[2]|0,this.D=As[3]|0,this.E=As[4]|0,this.F=As[5]|0,this.G=As[6]|0,this.H=As[7]|0}get(){const{A:t,B:n,C:o,D:s,E:u,F:l,G:c,H:h}=this;return[t,n,o,s,u,l,c,h]}set(t,n,o,s,u,l,c,h){this.A=t|0,this.B=n|0,this.C=o|0,this.D=s|0,this.E=u|0,this.F=l|0,this.G=c|0,this.H=h|0}process(t,n){for(let y=0;y<16;y++,n+=4)vs[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const g=vs[y-15],b=vs[y-2],w=Hi(g,7)^Hi(g,18)^g>>>3,B=Hi(b,17)^Hi(b,19)^b>>>10;vs[y]=B+vs[y-7]+w+vs[y-16]|0}let{A:o,B:s,C:u,D:l,E:c,F:h,G:f,H:p}=this;for(let y=0;y<64;y++){const g=Hi(c,6)^Hi(c,11)^Hi(c,25),b=p+g+FR(c,h,f)+NR[y]+vs[y]|0,B=(Hi(o,2)^Hi(o,13)^Hi(o,22))+OR(o,s,u)|0;p=f,f=h,h=c,c=l+b|0,l=u,u=s,s=o,o=b+B|0}o=o+this.A|0,s=s+this.B|0,u=u+this.C|0,l=l+this.D|0,c=c+this.E|0,h=h+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(o,s,u,l,c,h,f,p)}roundClean(){Uu(vs)}destroy(){this.set(0,0,0,0,0,0,0,0),Uu(this.buffer)}}const tO=$F(()=>new PR);class rO extends KA{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,aR(t);const o=Xd(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,u=new Uint8Array(s);u.set(o.length>s?t.create().update(o).digest():o);for(let l=0;l<u.length;l++)u[l]^=54;this.iHash.update(u),this.oHash=t.create();for(let l=0;l<u.length;l++)u[l]^=106;this.oHash.update(u),Uu(u)}update(t){return Mu(this),this.iHash.update(t),this}digestInto(t){Mu(this),ba(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:o,finished:s,destroyed:u,blockLen:l,outputLen:c}=this;return t=t,t.finished=s,t.destroyed=u,t.blockLen=l,t.outputLen=c,t.oHash=n._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const nO=(e,t,n)=>new rO(e,t).update(n).digest();nO.create=(e,t)=>new rO(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const P2=BigInt(0),hb=BigInt(1);function um(e,t){const n=t.negate();return e?n:t}function iO(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function lm(e,t){iO(e,t);const n=Math.ceil(t/e)+1,o=2**(e-1),s=2**e,u=Zd(e),l=BigInt(e);return{windows:n,windowSize:o,mask:u,maxNumber:s,shiftBy:l}}function k2(e,t,n){const{windowSize:o,mask:s,maxNumber:u,shiftBy:l}=n;let c=Number(e&s),h=e>>l;c>o&&(c-=u,h+=hb);const f=t*o,p=f+Math.abs(c)-1,y=c===0,g=c<0,b=t%2!==0;return{nextN:h,offset:p,isZero:y,isNeg:g,isNegF:b,offsetF:f}}function kR(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,o)=>{if(!(n instanceof t))throw new Error("invalid point at index "+o)})}function LR(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,o)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+o)})}const cm=new WeakMap,oO=new WeakMap;function fm(e){return oO.get(e)||1}function zR(e,t){return{constTimeNegate:um,hasPrecomputes(n){return fm(n)!==1},unsafeLadder(n,o,s=e.ZERO){let u=n;for(;o>P2;)o&hb&&(s=s.add(u)),u=u.double(),o>>=hb;return s},precomputeWindow(n,o){const{windows:s,windowSize:u}=lm(o,t),l=[];let c=n,h=c;for(let f=0;f<s;f++){h=c,l.push(h);for(let p=1;p<u;p++)h=h.add(c),l.push(h);c=h.double()}return l},wNAF(n,o,s){let u=e.ZERO,l=e.BASE;const c=lm(n,t);for(let h=0;h<c.windows;h++){const{nextN:f,offset:p,isZero:y,isNeg:g,isNegF:b,offsetF:w}=k2(s,h,c);s=f,y?l=l.add(um(b,o[w])):u=u.add(um(g,o[p]))}return{p:u,f:l}},wNAFUnsafe(n,o,s,u=e.ZERO){const l=lm(n,t);for(let c=0;c<l.windows&&s!==P2;c++){const{nextN:h,offset:f,isZero:p,isNeg:y}=k2(s,c,l);if(s=h,!p){const g=o[f];u=u.add(y?g.negate():g)}}return u},getPrecomputes(n,o,s){let u=cm.get(o);return u||(u=this.precomputeWindow(o,n),n!==1&&cm.set(o,s(u))),u},wNAFCached(n,o,s){const u=fm(n);return this.wNAF(u,this.getPrecomputes(u,n,s),o)},wNAFCachedUnsafe(n,o,s,u){const l=fm(n);return l===1?this.unsafeLadder(n,o,u):this.wNAFUnsafe(l,this.getPrecomputes(l,n,s),o,u)},setWindowSize(n,o){iO(o,t),oO.set(n,o),cm.delete(n)}}}function $R(e,t,n,o){kR(n,e),LR(o,t);const s=n.length,u=o.length;if(s!==u)throw new Error("arrays of points and scalars must have equal length");const l=e.ZERO,c=gR(BigInt(s));let h=1;c>12?h=c-3:c>4?h=c-2:c>0&&(h=2);const f=Zd(h),p=new Array(Number(f)+1).fill(l),y=Math.floor((t.BITS-1)/h)*h;let g=l;for(let b=y;b>=0;b-=h){p.fill(l);for(let B=0;B<u;B++){const _=o[B],M=Number(_>>BigInt(b)&f);p[M]=p[M].add(n[B])}let w=l;for(let B=p.length-1,_=l;B>0;B--)_=_.add(p[B]),w=w.add(_);if(g=g.add(w),b!==0)for(let B=0;B<h;B++)g=g.double()}return g}function sO(e){return SR(e.Fp),Jd(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ZF(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function L2(e){e.lowS!==void 0&&wc("lowS",e.lowS),e.prehash!==void 0&&wc("prehash",e.prehash)}function qR(e){const t=sO(e);Jd(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:n,Fp:o,a:s}=t;if(n){if(!o.eql(s,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}class HR extends Error{constructor(t=""){super(t)}}const Fo={Err:HR,_tlv:{encode:(e,t)=>{const{Err:n}=Fo;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const o=t.length/2,s=Lh(o);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const u=o>127?Lh(s.length/2|128):"";return Lh(e)+u+s+t},decode(e,t){const{Err:n}=Fo;let o=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new n("tlv.decode: wrong tlv");const s=t[o++],u=!!(s&128);let l=0;if(!u)l=s;else{const h=s&127;if(!h)throw new n("tlv.decode(long): indefinite length not supported");if(h>4)throw new n("tlv.decode(long): byte length is too big");const f=t.subarray(o,o+h);if(f.length!==h)throw new n("tlv.decode: length bytes not complete");if(f[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const p of f)l=l<<8|p;if(o+=h,l<128)throw new n("tlv.decode(long): not minimal encoding")}const c=t.subarray(o,o+l);if(c.length!==l)throw new n("tlv.decode: wrong value length");return{v:c,l:t.subarray(o+l)}}},_int:{encode(e){const{Err:t}=Fo;if(e<Mo)throw new t("integer: negative integers are not allowed");let n=Lh(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Fo;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return ya(e)}},toSig(e){const{Err:t,_int:n,_tlv:o}=Fo,s=yi("signature",e),{v:u,l}=o.decode(48,s);if(l.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l:h}=o.decode(2,u),{v:f,l:p}=o.decode(2,h);if(p.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(f)}},hexFromSig(e){const{_tlv:t,_int:n}=Fo,o=t.encode(2,n.encode(e.r)),s=t.encode(2,n.encode(e.s)),u=o+s;return t.encode(48,u)}};function hm(e,t){return xc(tf(e,t))}const Mo=BigInt(0),Lr=BigInt(1);BigInt(2);const dm=BigInt(3),QR=BigInt(4);function GR(e){const t=qR(e),{Fp:n}=t,o=XA(t.n,t.nBitLength),s=t.toBytes||((I,R,T)=>{const $=R.toAffine();return Pd(Uint8Array.from([4]),n.toBytes($.x),n.toBytes($.y))}),u=t.fromBytes||(I=>{const R=I.subarray(1),T=n.fromBytes(R.subarray(0,n.BYTES)),$=n.fromBytes(R.subarray(n.BYTES,2*n.BYTES));return{x:T,y:$}});function l(I){const{a:R,b:T}=t,$=n.sqr(I),k=n.mul($,I);return n.add(n.add(k,n.mul(I,R)),T)}function c(I,R){const T=n.sqr(R),$=l(I);return n.eql(T,$)}if(!c(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const h=n.mul(n.pow(t.a,dm),QR),f=n.mul(n.sqr(t.b),BigInt(27));if(n.is0(n.add(h,f)))throw new Error("bad curve params: a or b");function p(I){return WA(I,Lr,t.n)}function y(I){const{allowedPrivateKeyLengths:R,nByteLength:T,wrapPrivateKey:$,n:k}=t;if(R&&typeof I!="bigint"){if(ef(I)&&(I=xc(I)),typeof I!="string"||!R.includes(I.length))throw new Error("invalid private key");I=I.padStart(T*2,"0")}let L;try{L=typeof I=="bigint"?I:ya(yi("private key",I,T))}catch{throw new Error("invalid private key, expected hex or "+T+" bytes, got "+typeof I)}return $&&(L=Fn(L,k)),Fu("private key",L,Lr,k),L}function g(I){if(!(I instanceof B))throw new Error("ProjectivePoint expected")}const b=j2((I,R)=>{const{px:T,py:$,pz:k}=I;if(n.eql(k,n.ONE))return{x:T,y:$};const L=I.is0();R==null&&(R=L?n.ONE:n.inv(k));const U=n.mul(T,R),j=n.mul($,R),Q=n.mul(k,R);if(L)return{x:n.ZERO,y:n.ZERO};if(!n.eql(Q,n.ONE))throw new Error("invZ was invalid");return{x:U,y:j}}),w=j2(I=>{if(I.is0()){if(t.allowInfinityPoint&&!n.is0(I.py))return;throw new Error("bad point: ZERO")}const{x:R,y:T}=I.toAffine();if(!n.isValid(R)||!n.isValid(T))throw new Error("bad point: x or y not FE");if(!c(R,T))throw new Error("bad point: equation left != right");if(!I.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class B{constructor(R,T,$){if(R==null||!n.isValid(R))throw new Error("x required");if(T==null||!n.isValid(T)||n.is0(T))throw new Error("y required");if($==null||!n.isValid($))throw new Error("z required");this.px=R,this.py=T,this.pz=$,Object.freeze(this)}static fromAffine(R){const{x:T,y:$}=R||{};if(!R||!n.isValid(T)||!n.isValid($))throw new Error("invalid affine point");if(R instanceof B)throw new Error("projective point not allowed");const k=L=>n.eql(L,n.ZERO);return k(T)&&k($)?B.ZERO:new B(T,$,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(R){const T=XF(n,R.map($=>$.pz));return R.map(($,k)=>$.toAffine(T[k])).map(B.fromAffine)}static fromHex(R){const T=B.fromAffine(u(yi("pointHex",R)));return T.assertValidity(),T}static fromPrivateKey(R){return B.BASE.multiply(y(R))}static msm(R,T){return $R(B,o,R,T)}_setWindowSize(R){A.setWindowSize(this,R)}assertValidity(){w(this)}hasEvenY(){const{y:R}=this.toAffine();if(n.isOdd)return!n.isOdd(R);throw new Error("Field doesn't support isOdd")}equals(R){g(R);const{px:T,py:$,pz:k}=this,{px:L,py:U,pz:j}=R,Q=n.eql(n.mul(T,j),n.mul(L,k)),P=n.eql(n.mul($,j),n.mul(U,k));return Q&&P}negate(){return new B(this.px,n.neg(this.py),this.pz)}double(){const{a:R,b:T}=t,$=n.mul(T,dm),{px:k,py:L,pz:U}=this;let j=n.ZERO,Q=n.ZERO,P=n.ZERO,re=n.mul(k,k),le=n.mul(L,L),oe=n.mul(U,U),X=n.mul(k,L);return X=n.add(X,X),P=n.mul(k,U),P=n.add(P,P),j=n.mul(R,P),Q=n.mul($,oe),Q=n.add(j,Q),j=n.sub(le,Q),Q=n.add(le,Q),Q=n.mul(j,Q),j=n.mul(X,j),P=n.mul($,P),oe=n.mul(R,oe),X=n.sub(re,oe),X=n.mul(R,X),X=n.add(X,P),P=n.add(re,re),re=n.add(P,re),re=n.add(re,oe),re=n.mul(re,X),Q=n.add(Q,re),oe=n.mul(L,U),oe=n.add(oe,oe),re=n.mul(oe,X),j=n.sub(j,re),P=n.mul(oe,le),P=n.add(P,P),P=n.add(P,P),new B(j,Q,P)}add(R){g(R);const{px:T,py:$,pz:k}=this,{px:L,py:U,pz:j}=R;let Q=n.ZERO,P=n.ZERO,re=n.ZERO;const le=t.a,oe=n.mul(t.b,dm);let X=n.mul(T,L),te=n.mul($,U),pe=n.mul(k,j),ue=n.add(T,$),J=n.add(L,U);ue=n.mul(ue,J),J=n.add(X,te),ue=n.sub(ue,J),J=n.add(T,k);let G=n.add(L,j);return J=n.mul(J,G),G=n.add(X,pe),J=n.sub(J,G),G=n.add($,k),Q=n.add(U,j),G=n.mul(G,Q),Q=n.add(te,pe),G=n.sub(G,Q),re=n.mul(le,J),Q=n.mul(oe,pe),re=n.add(Q,re),Q=n.sub(te,re),re=n.add(te,re),P=n.mul(Q,re),te=n.add(X,X),te=n.add(te,X),pe=n.mul(le,pe),J=n.mul(oe,J),te=n.add(te,pe),pe=n.sub(X,pe),pe=n.mul(le,pe),J=n.add(J,pe),X=n.mul(te,J),P=n.add(P,X),X=n.mul(G,J),Q=n.mul(ue,Q),Q=n.sub(Q,X),X=n.mul(ue,te),re=n.mul(G,re),re=n.add(re,X),new B(Q,P,re)}subtract(R){return this.add(R.negate())}is0(){return this.equals(B.ZERO)}wNAF(R){return A.wNAFCached(this,R,B.normalizeZ)}multiplyUnsafe(R){const{endo:T,n:$}=t;Fu("scalar",R,Mo,$);const k=B.ZERO;if(R===Mo)return k;if(this.is0()||R===Lr)return this;if(!T||A.hasPrecomputes(this))return A.wNAFCachedUnsafe(this,R,B.normalizeZ);let{k1neg:L,k1:U,k2neg:j,k2:Q}=T.splitScalar(R),P=k,re=k,le=this;for(;U>Mo||Q>Mo;)U&Lr&&(P=P.add(le)),Q&Lr&&(re=re.add(le)),le=le.double(),U>>=Lr,Q>>=Lr;return L&&(P=P.negate()),j&&(re=re.negate()),re=new B(n.mul(re.px,T.beta),re.py,re.pz),P.add(re)}multiply(R){const{endo:T,n:$}=t;Fu("scalar",R,Lr,$);let k,L;if(T){const{k1neg:U,k1:j,k2neg:Q,k2:P}=T.splitScalar(R);let{p:re,f:le}=this.wNAF(j),{p:oe,f:X}=this.wNAF(P);re=A.constTimeNegate(U,re),oe=A.constTimeNegate(Q,oe),oe=new B(n.mul(oe.px,T.beta),oe.py,oe.pz),k=re.add(oe),L=le.add(X)}else{const{p:U,f:j}=this.wNAF(R);k=U,L=j}return B.normalizeZ([k,L])[0]}multiplyAndAddUnsafe(R,T,$){const k=B.BASE,L=(j,Q)=>Q===Mo||Q===Lr||!j.equals(k)?j.multiplyUnsafe(Q):j.multiply(Q),U=L(this,T).add(L(R,$));return U.is0()?void 0:U}toAffine(R){return b(this,R)}isTorsionFree(){const{h:R,isTorsionFree:T}=t;if(R===Lr)return!0;if(T)return T(B,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:R,clearCofactor:T}=t;return R===Lr?this:T?T(B,this):this.multiplyUnsafe(t.h)}toRawBytes(R=!0){return wc("isCompressed",R),this.assertValidity(),s(B,this,R)}toHex(R=!0){return wc("isCompressed",R),xc(this.toRawBytes(R))}}B.BASE=new B(t.Gx,t.Gy,n.ONE),B.ZERO=new B(n.ZERO,n.ONE,n.ZERO);const{endo:_,nBitLength:M}=t,A=zR(B,_?Math.ceil(M/2):M);return{CURVE:t,ProjectivePoint:B,normPrivateKeyToScalar:y,weierstrassEquation:l,isWithinCurveOrder:p}}function KR(e){const t=sO(e);return Jd(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function YR(e){const t=KR(e),{Fp:n,n:o,nByteLength:s,nBitLength:u}=t,l=n.BYTES+1,c=2*n.BYTES+1;function h(oe){return Fn(oe,o)}function f(oe){return fb(oe,o)}const{ProjectivePoint:p,normPrivateKeyToScalar:y,weierstrassEquation:g,isWithinCurveOrder:b}=GR({...t,toBytes(oe,X,te){const pe=X.toAffine(),ue=n.toBytes(pe.x),J=Pd;return wc("isCompressed",te),te?J(Uint8Array.from([X.hasEvenY()?2:3]),ue):J(Uint8Array.from([4]),ue,n.toBytes(pe.y))},fromBytes(oe){const X=oe.length,te=oe[0],pe=oe.subarray(1);if(X===l&&(te===2||te===3)){const ue=ya(pe);if(!WA(ue,Lr,n.ORDER))throw new Error("Point is not on curve");const J=g(ue);let G;try{G=n.sqrt(J)}catch(W){const z=W instanceof Error?": "+W.message:"";throw new Error("Point is not on curve"+z)}const H=(G&Lr)===Lr;return(te&1)===1!==H&&(G=n.neg(G)),{x:ue,y:G}}else if(X===c&&te===4){const ue=n.fromBytes(pe.subarray(0,n.BYTES)),J=n.fromBytes(pe.subarray(n.BYTES,2*n.BYTES));return{x:ue,y:J}}else{const ue=l,J=c;throw new Error("invalid Point, expected length of "+ue+", or uncompressed "+J+", got "+X)}}});function w(oe){const X=o>>Lr;return oe>X}function B(oe){return w(oe)?h(-oe):oe}const _=(oe,X,te)=>ya(oe.slice(X,te));class M{constructor(X,te,pe){Fu("r",X,Lr,o),Fu("s",te,Lr,o),this.r=X,this.s=te,pe!=null&&(this.recovery=pe),Object.freeze(this)}static fromCompact(X){const te=s;return X=yi("compactSignature",X,te*2),new M(_(X,0,te),_(X,te,2*te))}static fromDER(X){const{r:te,s:pe}=Fo.toSig(yi("DER",X));return new M(te,pe)}assertValidity(){}addRecoveryBit(X){return new M(this.r,this.s,X)}recoverPublicKey(X){const{r:te,s:pe,recovery:ue}=this,J=k(yi("msgHash",X));if(ue==null||![0,1,2,3].includes(ue))throw new Error("recovery id invalid");const G=ue===2||ue===3?te+t.n:te;if(G>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const H=(ue&1)===0?"02":"03",K=p.fromHex(H+hm(G,n.BYTES)),W=f(G),z=h(-J*W),fe=h(pe*W),ae=p.BASE.multiplyAndAddUnsafe(K,z,fe);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return Nd(this.toDERHex())}toDERHex(){return Fo.hexFromSig(this)}toCompactRawBytes(){return Nd(this.toCompactHex())}toCompactHex(){const X=s;return hm(this.r,X)+hm(this.s,X)}}const A={isValidPrivateKey(oe){try{return y(oe),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const oe=eO(t.n);return _R(t.randomBytes(oe),t.n)},precompute(oe=8,X=p.BASE){return X._setWindowSize(oe),X.multiply(BigInt(3)),X}};function I(oe,X=!0){return p.fromPrivateKey(oe).toRawBytes(X)}function R(oe){if(typeof oe=="bigint")return!1;if(oe instanceof p)return!0;const te=yi("key",oe).length,pe=n.BYTES,ue=pe+1,J=2*pe+1;if(!(t.allowedPrivateKeyLengths||s===ue))return te===ue||te===J}function T(oe,X,te=!0){if(R(oe)===!0)throw new Error("first arg must be private key");if(R(X)===!1)throw new Error("second arg must be public key");return p.fromHex(X).multiply(y(oe)).toRawBytes(te)}const $=t.bits2int||function(oe){if(oe.length>8192)throw new Error("input is too large");const X=ya(oe),te=oe.length*8-u;return te>0?X>>BigInt(te):X},k=t.bits2int_modN||function(oe){return h($(oe))},L=Zd(u);function U(oe){return Fu("num < 2^"+u,oe,Mo,L),tf(oe,s)}function j(oe,X,te=Q){if(["recovered","canonical"].some(Z=>Z in te))throw new Error("sign() legacy options not supported");const{hash:pe,randomBytes:ue}=t;let{lowS:J,prehash:G,extraEntropy:H}=te;J==null&&(J=!0),oe=yi("msgHash",oe),L2(te),G&&(oe=yi("prehashed msgHash",pe(oe)));const K=k(oe),W=y(X),z=[U(W),U(K)];if(H!=null&&H!==!1){const Z=H===!0?ue(n.BYTES):H;z.push(yi("extraEntropy",Z))}const fe=Pd(...z),ae=K;function ne(Z){const F=$(Z);if(!b(F))return;const q=f(F),Y=p.BASE.multiply(F).toAffine(),se=h(Y.x);if(se===Mo)return;const ye=h(q*h(ae+se*W));if(ye===Mo)return;let ee=(Y.x===se?0:2)|Number(Y.y&Lr),S=ye;return J&&w(ye)&&(S=B(ye),ee^=1),new M(se,S,ee)}return{seed:fe,k2sig:ne}}const Q={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};function re(oe,X,te=Q){const{seed:pe,k2sig:ue}=j(oe,X,te),J=t;return mR(J.hash.outputLen,J.nByteLength,J.hmac)(pe,ue)}p.BASE._setWindowSize(8);function le(oe,X,te,pe=P){var ee;const ue=oe;X=yi("msgHash",X),te=yi("publicKey",te);const{lowS:J,prehash:G,format:H}=pe;if(L2(pe),"strict"in pe)throw new Error("options.strict was renamed to lowS");if(H!==void 0&&H!=="compact"&&H!=="der")throw new Error("format must be compact or der");const K=typeof ue=="string"||ef(ue),W=!K&&!H&&typeof ue=="object"&&ue!==null&&typeof ue.r=="bigint"&&typeof ue.s=="bigint";if(!K&&!W)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let z,fe;try{if(W&&(z=new M(ue.r,ue.s)),K){try{H!=="compact"&&(z=M.fromDER(ue))}catch(S){if(!(S instanceof Fo.Err))throw S}!z&&H!=="der"&&(z=M.fromCompact(ue))}fe=p.fromHex(te)}catch{return!1}if(!z||J&&z.hasHighS())return!1;G&&(X=t.hash(X));const{r:ae,s:ne}=z,Z=k(X),F=f(ne),q=h(Z*F),Y=h(ae*F),se=(ee=p.BASE.multiplyAndAddUnsafe(fe,q,Y))==null?void 0:ee.toAffine();return se?h(se.x)===ae:!1}return{CURVE:t,getPublicKey:I,getSharedSecret:T,sign:re,verify:le,ProjectivePoint:p,Signature:M,utils:A}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function VR(e){return{hash:e,hmac:(t,...n)=>nO(e,t,dR(...n)),randomBytes:pR}}function WR(e,t){const n=o=>YR({...e,...VR(o)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const aO=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),z2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),XR=BigInt(0),ZR=BigInt(1),db=BigInt(2),$2=(e,t)=>(e+t/db)/t;function JR(e){const t=aO,n=BigInt(3),o=BigInt(6),s=BigInt(11),u=BigInt(22),l=BigInt(23),c=BigInt(44),h=BigInt(88),f=e*e*e%t,p=f*f*e%t,y=pi(p,n,t)*p%t,g=pi(y,n,t)*p%t,b=pi(g,db,t)*f%t,w=pi(b,s,t)*b%t,B=pi(w,u,t)*w%t,_=pi(B,c,t)*B%t,M=pi(_,h,t)*_%t,A=pi(M,c,t)*B%t,I=pi(A,n,t)*p%t,R=pi(I,l,t)*w%t,T=pi(R,o,t)*f%t,$=pi(T,db,t);if(!pb.eql(pb.sqr($),e))throw new Error("Cannot find square root");return $}const pb=XA(aO,void 0,void 0,{sqrt:JR}),rf=WR({a:XR,b:BigInt(7),Fp:pb,n:z2,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=z2,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-ZR*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),u=n,l=BigInt("0x100000000000000000000000000000000"),c=$2(u*e,t),h=$2(-o*e,t);let f=Fn(e-c*n-h*s,t),p=Fn(-c*o-h*u,t);const y=f>l,g=p>l;if(y&&(f=t-f),g&&(p=t-p),f>l||p>l)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:y,k1:f,k2neg:g,k2:p}}}},tO),eM=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:rf},Symbol.toStringTag,{value:"Module"})),uO="2.37.3";let tc={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${uO}`};class Ze extends Error{constructor(t,n={}){var c;const o=(()=>{var h;return n.cause instanceof Ze?n.cause.details:(h=n.cause)!=null&&h.message?n.cause.message:n.details})(),s=n.cause instanceof Ze&&n.cause.docsPath||n.docsPath,u=(c=tc.getDocsUrl)==null?void 0:c.call(tc,{...n,docsPath:s}),l=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...o?[`Details: ${o}`]:[],...tc.version?[`Version: ${tc.version}`]:[]].join(`
|
|
39
|
+
`);super(l,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=o,this.docsPath=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=uO}walk(t){return lO(this,t)}}function lO(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?lO(e.cause,t):t?null:e}class cO extends Ze{constructor({max:t,min:n,signed:o,size:s,value:u}){super(`Number "${u}" is not in safe ${s?`${s*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class tM extends Ze{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class rM extends Ze{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function No(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function dr(e){return No(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function Ts(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,o=0;for(let s=0;s<n.length-1&&n[t==="left"?s:n.length-s-1].toString()==="0";s++)o++;return n=t==="left"?n.slice(o):n.slice(0,n.length-o),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}class fO extends Ze{constructor({offset:t,position:n,size:o}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"})}}class hO extends Ze{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}class q2 extends Ze{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${n} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"})}}function Gu(e,{dir:t,size:n=32}={}){return typeof e=="string"?Bs(e,{dir:t,size:n}):nM(e,{dir:t,size:n})}function Bs(e,{dir:t,size:n=32}={}){if(n===null)return e;const o=e.replace("0x","");if(o.length>n*2)throw new hO({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function nM(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new hO({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let s=0;s<n;s++){const u=t==="right";o[u?s:n-s-1]=e[u?s:e.length-s-1]}return o}const iM=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Vi(e,t={}){return typeof e=="number"||typeof e=="bigint"?st(e,t):typeof e=="string"?ju(e,t):typeof e=="boolean"?dO(e,t):dn(e,t)}function dO(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ji(n,{size:t.size}),Gu(n,{size:t.size})):n}function dn(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=iM[e[s]];const o=`0x${n}`;return typeof t.size=="number"?(Ji(o,{size:t.size}),Gu(o,{dir:"right",size:t.size})):o}function st(e,t={}){const{signed:n,size:o}=t,s=BigInt(e);let u;o?n?u=(1n<<BigInt(o)*8n-1n)-1n:u=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(u=BigInt(Number.MAX_SAFE_INTEGER));const l=typeof u=="bigint"&&n?-u-1n:0;if(u&&s>u||s<l){const h=typeof e=="bigint"?"n":"";throw new cO({max:u?`${u}${h}`:void 0,min:`${l}${h}`,signed:n,size:o,value:`${e}${h}`})}const c=`0x${(n&&s<0?(1n<<BigInt(o*8))+BigInt(s):s).toString(16)}`;return o?Gu(c,{size:o}):c}const oM=new TextEncoder;function ju(e,t={}){const n=oM.encode(e);return dn(n,t)}const sM=new TextEncoder;function ZA(e,t={}){return typeof e=="number"||typeof e=="bigint"?uM(e,t):typeof e=="boolean"?aM(e,t):No(e)?Ti(e,t):pO(e,t)}function aM(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Ji(n,{size:t.size}),Gu(n,{size:t.size})):n}const wo={zero:48,nine:57,A:65,F:70,a:97,f:102};function H2(e){if(e>=wo.zero&&e<=wo.nine)return e-wo.zero;if(e>=wo.A&&e<=wo.F)return e-(wo.A-10);if(e>=wo.a&&e<=wo.f)return e-(wo.a-10)}function Ti(e,t={}){let n=e;t.size&&(Ji(n,{size:t.size}),n=Gu(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const s=o.length/2,u=new Uint8Array(s);for(let l=0,c=0;l<s;l++){const h=H2(o.charCodeAt(c++)),f=H2(o.charCodeAt(c++));if(h===void 0||f===void 0)throw new Ze(`Invalid byte sequence ("${o[c-2]}${o[c-1]}" in "${o}").`);u[l]=h*16+f}return u}function uM(e,t){const n=st(e,t);return Ti(n)}function pO(e,t={}){const n=sM.encode(e);return typeof t.size=="number"?(Ji(n,{size:t.size}),Gu(n,{dir:"right",size:t.size})):n}function Ji(e,{size:t}){if(dr(e)>t)throw new rM({givenSize:dr(e),maxSize:t})}function Wi(e,t={}){const{signed:n}=t;t.size&&Ji(e,{size:t.size});const o=BigInt(e);if(!n)return o;const s=(e.length-2)/2,u=(1n<<BigInt(s)*8n-1n)-1n;return o<=u?o:o-BigInt(`0x${"f".padStart(s*2,"f")}`)-1n}function Po(e,t={}){return Number(Wi(e,t))}async function yO(e,{address:t,blockTag:n="latest",blockNumber:o}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof o=="bigint"?st(o):n]},{dedupe:!!o});return Po(s)}class ep extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}function lM({r:e,s:t,to:n="hex",v:o,yParity:s}){const u=(()=>{if(s===0||s===1)return s;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),l=`0x${new rf.Signature(Wi(e),Wi(t)).toCompactHex()}${u===0?"1b":"1c"}`;return n==="hex"?l:Ti(l)}function cM(){return Vi(rf.utils.randomPrivateKey())}class An extends Ze{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}const fM=BigInt(0),rc=BigInt(1),hM=BigInt(2),dM=BigInt(7),pM=BigInt(256),yM=BigInt(113),gO=[],mO=[],bO=[];for(let e=0,t=rc,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],gO.push(2*(5*o+n)),mO.push((e+1)*(e+2)/2%64);let s=fM;for(let u=0;u<7;u++)t=(t<<rc^(t>>dM)*yM)%pM,t&hM&&(s^=rc<<(rc<<BigInt(u))-rc);bO.push(s)}const AO=RR(bO,!0),gM=AO[0],mM=AO[1],Q2=(e,t,n)=>n>32?jR(e,t,n):MR(e,t,n),G2=(e,t,n)=>n>32?DR(e,t,n):UR(e,t,n);function bM(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){const c=(l+8)%10,h=(l+2)%10,f=n[h],p=n[h+1],y=Q2(f,p,1)^n[c],g=G2(f,p,1)^n[c+1];for(let b=0;b<50;b+=10)e[l+b]^=y,e[l+b+1]^=g}let s=e[2],u=e[3];for(let l=0;l<24;l++){const c=mO[l],h=Q2(s,u,c),f=G2(s,u,c),p=gO[l];s=e[p],u=e[p+1],e[p]=h,e[p+1]=f}for(let l=0;l<50;l+=10){for(let c=0;c<10;c++)n[c]=e[l+c];for(let c=0;c<10;c++)e[l+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=gM[o],e[1]^=mM[o]}Uu(n)}class JA extends KA{constructor(t,n,o,s=!1,u=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=s,this.rounds=u,vc(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=uR(this.state)}clone(){return this._cloneInto()}keccak(){R2(this.state32),bM(this.state32,this.rounds),R2(this.state32),this.posOut=0,this.pos=0}update(t){Mu(this),t=Xd(t),ba(t);const{blockLen:n,state:o}=this,s=t.length;for(let u=0;u<s;){const l=Math.min(n-this.pos,s-u);for(let c=0;c<l;c++)o[this.pos++]^=t[u++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:s}=this;t[o]^=n,(n&128)!==0&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){Mu(this,!1),ba(t),this.finish();const n=this.state,{blockLen:o}=this;for(let s=0,u=t.length;s<u;){this.posOut>=o&&this.keccak();const l=Math.min(o-this.posOut,u-s);t.set(n.subarray(this.posOut,this.posOut+l),s),this.posOut+=l,s+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return vc(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(zF(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Uu(this.state)}_cloneInto(t){const{blockLen:n,suffix:o,outputLen:s,rounds:u,enableXOF:l}=this;return t||(t=new JA(n,o,s,l,u)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=u,t.suffix=o,t.outputLen=s,t.enableXOF=l,t.destroyed=this.destroyed,t}}const AM=(e,t,n)=>$F(()=>new JA(t,e,n)),vM=AM(1,136,256/8);function Yn(e,t){const n=t||"hex",o=vM(No(e,{strict:!1})?ZA(e):e);return n==="bytes"?o:Vi(o)}const pm=new ep(8192);function nf(e,t){if(pm.has(`${e}.${t}`))return pm.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),o=Yn(pO(n),"bytes"),s=n.split("");for(let l=0;l<40;l+=2)o[l>>1]>>4>=8&&s[l]&&(s[l]=s[l].toUpperCase()),(o[l>>1]&15)>=8&&s[l+1]&&(s[l+1]=s[l+1].toUpperCase());const u=`0x${s.join("")}`;return pm.set(`${e}.${t}`,u),u}function wM(e,t){if(!qr(e,{strict:!1}))throw new An({address:e});return nf(e,t)}const xM=/^0x[a-fA-F0-9]{40}$/,ym=new ep(8192);function qr(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if(ym.has(o))return ym.get(o);const s=xM.test(e)?e.toLowerCase()===e?!0:n?nf(e)===e:!0:!1;return ym.set(o,s),s}function EM(e){if(typeof e=="string"){if(!qr(e,{strict:!1}))throw new An({address:e});return{address:e,type:"json-rpc"}}if(!qr(e.address,{strict:!1}))throw new An({address:e.address});return{address:e.address,nonceManager:e.nonceManager,sign:e.sign,signAuthorization:e.signAuthorization,signMessage:e.signMessage,signTransaction:e.signTransaction,signTypedData:e.signTypedData,source:"custom",type:"local"}}function vO(e){const t=Yn(`0x${e.substring(4)}`).substring(26);return nf(`0x${t}`)}let gm=!1;async function of({hash:e,privateKey:t,to:n="object"}){const{r:o,s,recovery:u}=rf.sign(e.slice(2),t.slice(2),{lowS:!0,extraEntropy:No(gm,{strict:!1})?Ti(gm):gm}),l={r:st(o,{size:32}),s:st(s,{size:32}),v:u?28n:27n,yParity:u};return n==="bytes"||n==="hex"?lM({...l,to:n}):l}function Xi(e){return typeof e[0]=="string"?Rs(e):SM(e)}function SM(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let o=0;for(const s of e)n.set(s,o),o+=s.length;return n}function Rs(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}class K2 extends Ze{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class IM extends Ze{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class _M extends Ze{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const CM={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new _M({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new IM({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new K2({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new K2({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function ev(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(CM);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Aa(e,t="hex"){const n=wO(e),o=ev(new Uint8Array(n.length));return n.encode(o),t==="hex"?dn(o.bytes):o.bytes}function wO(e){return Array.isArray(e)?FM(e.map(t=>wO(t))):OM(e)}function FM(e){const t=e.reduce((s,u)=>s+u.length,0),n=xO(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:u}of e)u(s)}}}function OM(e){const t=typeof e=="string"?Ti(e):e,n=xO(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function xO(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new Ze("Length is too large.")}function EO(e){const{chainId:t,nonce:n,to:o}=e,s=e.contractAddress??e.address,u=Yn(Rs(["0x05",Aa([t?st(t):"0x",s,n?st(n):"0x"])]));return o==="bytes"?Ti(u):u}async function BM(e){const{chainId:t,nonce:n,privateKey:o,to:s="object"}=e,u=e.contractAddress??e.address,l=await of({hash:EO({address:u,chainId:t,nonce:n}),privateKey:o,to:s});return s==="object"?{address:u,chainId:t,nonce:n,...l}:l}const TM=`Ethereum Signed Message:
|
|
40
|
+
`;function RM(e){const t=typeof e=="string"?ju(e):typeof e.raw=="string"?e.raw:dn(e.raw),n=ju(`${TM}${dr(t)}`);return Xi([n,t])}function MM(e,t){return Yn(RM(e),t)}async function UM({message:e,privateKey:t}){return await of({hash:MM(e),privateKey:t,to:"hex"})}const jM={gwei:9,wei:18},DM={ether:-9,wei:9};function SO(e,t){let n=e.toString();const o=n.startsWith("-");o&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,u]=[n.slice(0,n.length-t),n.slice(n.length-t)];return u=u.replace(/(0+)$/,""),`${o?"-":""}${s||"0"}${u?`.${u}`:""}`}function IO(e,t="wei"){return SO(e,jM[t])}function Oi(e,t="wei"){return SO(e,DM[t])}function tp(e){const t=Object.entries(e).map(([o,s])=>s===void 0||s===!1?null:[o,s]).filter(Boolean),n=t.reduce((o,[s])=>Math.max(o,s.length),0);return t.map(([o,s])=>` ${`${o}:`.padEnd(n+1)} ${s}`).join(`
|
|
41
|
+
`)}class NM extends Ze{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
|
|
42
|
+
`),{name:"FeeConflictError"})}}class PM extends Ze{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class kM extends Ze{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",tp(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class LM extends Ze{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class zM extends Ze{constructor(t,{account:n,docsPath:o,chain:s,data:u,gas:l,gasPrice:c,maxFeePerGas:h,maxPriorityFeePerGas:f,nonce:p,to:y,value:g}){var w;const b=tp({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:n==null?void 0:n.address,to:y,value:typeof g<"u"&&`${IO(g)} ${((w=s==null?void 0:s.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:u,gas:l,gasPrice:typeof c<"u"&&`${Oi(c)} gwei`,maxFeePerGas:typeof h<"u"&&`${Oi(h)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Oi(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",b].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function $M(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:o,nonce:s,...u}=n,l=n.address;t.push([o?Vi(o):"0x",l,s?Vi(s):"0x",...sf({},u)])}return t}function tv(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(u=>Ti(u)):e.blobs,s=[];for(const u of o)s.push(Uint8Array.from(t.blobToKzgCommitment(u)));return n==="bytes"?s:s.map(u=>dn(u))}function rv(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(l=>Ti(l)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(l=>Ti(l)):e.commitments,u=[];for(let l=0;l<o.length;l++){const c=o[l],h=s[l];u.push(Uint8Array.from(t.computeBlobKzgProof(c,h)))}return n==="bytes"?u:u.map(l=>dn(l))}const yb=tO;function qM(e,t){return yb(No(e,{strict:!1})?ZA(e):e)}function HM(e){const{commitment:t,version:n=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),s=qM(t);return s.set([n],0),o==="bytes"?s:dn(s)}function _O(e){const{commitments:t,version:n}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const u of t)s.push(HM({commitment:u,to:o,version:n}));return s}const Y2=6,CO=32,nv=4096,FO=CO*nv,V2=FO*Y2-1-1*nv*Y2,OO=1;class QM extends Ze{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class BO extends Ze{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class GM extends Ze{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class KM extends Ze{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${OO}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function YM(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Ti(e.data):e.data,o=dr(n);if(!o)throw new BO;if(o>V2)throw new QM({maxSize:V2,size:o});const s=[];let u=!0,l=0;for(;u;){const c=ev(new Uint8Array(FO));let h=0;for(;h<nv;){const f=n.slice(l,l+(CO-1));if(c.pushByte(0),c.pushBytes(f),f.length<31){c.pushByte(128),u=!1;break}h++,l+=31}s.push(c)}return t==="bytes"?s.map(c=>c.bytes):s.map(c=>dn(c.bytes))}function TO(e){const{data:t,kzg:n,to:o}=e,s=e.blobs??YM({data:t,to:o}),u=e.commitments??tv({blobs:s,kzg:n,to:o}),l=e.proofs??rv({blobs:s,commitments:u,kzg:n,to:o}),c=[];for(let h=0;h<s.length;h++)c.push({blob:s[h],commitment:u[h],proof:l[h]});return c}const rp=2n**256n-1n;class VM extends Ze{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class WM extends Ze{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
|
|
43
|
+
`),{name:"ChainNotFoundError"})}}class np extends Ze{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Su extends Ze{constructor({cause:t,message:n}={}){var s;const o=(s=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Su,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Su,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class va extends Ze{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Oi(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(va,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class gb extends Ze{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Oi(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(gb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class mb extends Ze{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(mb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class bb extends Ze{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
44
|
+
`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(bb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Ab extends Ze{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(Ab,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class vb extends Ze{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
45
|
+
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(vb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class wb extends Ze{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(wb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class xb extends Ze{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(xb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Eb extends Ze{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Eb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ec extends Ze{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Oi(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${Oi(o)} gwei`:""}).`].join(`
|
|
46
|
+
`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ec,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class iv extends Ze{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function Sc(e,t,n,{strict:o}={}){return No(e,{strict:!1})?Sb(e,t,n,{strict:o}):UO(e,t,n,{strict:o})}function RO(e,t){if(typeof t=="number"&&t>0&&t>dr(e)-1)throw new fO({offset:t,position:"start",size:dr(e)})}function MO(e,t,n){if(typeof t=="number"&&typeof n=="number"&&dr(e)!==n-t)throw new fO({offset:n,position:"end",size:dr(e)})}function UO(e,t,n,{strict:o}={}){RO(e,t);const s=e.slice(t,n);return o&&MO(s,t,n),s}function Sb(e,t,n,{strict:o}={}){RO(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&MO(s,t,n),s}function XM(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:o}=n,s=n.address;if(!qr(s))throw new An({address:s});if(o<0)throw new np({chainId:o})}ov(e)}function ZM(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new BO;for(const n of t){const o=dr(n),s=Po(Sc(n,0,1));if(o!==32)throw new GM({hash:n,size:o});if(s!==OO)throw new KM({hash:n,version:s})}}ov(e)}function ov(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new np({chainId:t});if(s&&!qr(s))throw new An({address:s});if(o&&o>rp)throw new va({maxFeePerGas:o});if(n&&o&&n>o)throw new Ec({maxFeePerGas:o,maxPriorityFeePerGas:n})}function JM(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:u}=e;if(t<=0)throw new np({chainId:t});if(u&&!qr(u))throw new An({address:u});if(n||s)throw new Ze("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>rp)throw new va({maxFeePerGas:o})}function eU(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:u}=e;if(u&&!qr(u))throw new An({address:u});if(typeof t<"u"&&t<=0)throw new np({chainId:t});if(n||s)throw new Ze("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>rp)throw new va({maxFeePerGas:o})}function jO(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new kM({transaction:e})}function ip(e){if(!e||e.length===0)return[];const t=[];for(let n=0;n<e.length;n++){const{address:o,storageKeys:s}=e[n];for(let u=0;u<s.length;u++)if(s[u].length-2!==64)throw new LM({storageKey:s[u]});if(!qr(o,{strict:!1}))throw new An({address:o});t.push([o,s])}return t}function tU(e,t){const n=jO(e);return n==="eip1559"?iU(e,t):n==="eip2930"?oU(e,t):n==="eip4844"?nU(e,t):n==="eip7702"?rU(e,t):sU(e,t)}function rU(e,t){const{authorizationList:n,chainId:o,gas:s,nonce:u,to:l,value:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;XM(e);const g=ip(p),b=$M(n);return Rs(["0x04",Aa([st(o),u?st(u):"0x",f?st(f):"0x",h?st(h):"0x",s?st(s):"0x",l??"0x",c?st(c):"0x",y??"0x",g,b,...sf(e,t)])])}function nU(e,t){const{chainId:n,gas:o,nonce:s,to:u,value:l,maxFeePerBlobGas:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;ZM(e);let g=e.blobVersionedHashes,b=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof b>"u")){const I=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map($=>dn($)),R=e.kzg,T=tv({blobs:I,kzg:R});if(typeof g>"u"&&(g=_O({commitments:T})),typeof b>"u"){const $=rv({blobs:I,commitments:T,kzg:R});b=TO({blobs:I,commitments:T,proofs:$})}}const w=ip(p),B=[st(n),s?st(s):"0x",f?st(f):"0x",h?st(h):"0x",o?st(o):"0x",u??"0x",l?st(l):"0x",y??"0x",w,c?st(c):"0x",g??[],...sf(e,t)],_=[],M=[],A=[];if(b)for(let I=0;I<b.length;I++){const{blob:R,commitment:T,proof:$}=b[I];_.push(R),M.push(T),A.push($)}return Rs(["0x03",Aa(b?[B,_,M,A]:B)])}function iU(e,t){const{chainId:n,gas:o,nonce:s,to:u,value:l,maxFeePerGas:c,maxPriorityFeePerGas:h,accessList:f,data:p}=e;ov(e);const y=ip(f),g=[st(n),s?st(s):"0x",h?st(h):"0x",c?st(c):"0x",o?st(o):"0x",u??"0x",l?st(l):"0x",p??"0x",y,...sf(e,t)];return Rs(["0x02",Aa(g)])}function oU(e,t){const{chainId:n,gas:o,data:s,nonce:u,to:l,value:c,accessList:h,gasPrice:f}=e;JM(e);const p=ip(h),y=[st(n),u?st(u):"0x",f?st(f):"0x",o?st(o):"0x",l??"0x",c?st(c):"0x",s??"0x",p,...sf(e,t)];return Rs(["0x01",Aa(y)])}function sU(e,t){const{chainId:n=0,gas:o,data:s,nonce:u,to:l,value:c,gasPrice:h}=e;eU(e);let f=[u?st(u):"0x",h?st(h):"0x",o?st(o):"0x",l??"0x",c?st(c):"0x",s??"0x"];if(t){const p=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);const b=27n+(t.v===27n?0n:1n);if(t.v!==b)throw new PM({v:t.v});return b})(),y=Ts(t.r),g=Ts(t.s);f=[...f,st(p),y==="0x00"?"0x":y,g==="0x00"?"0x":g]}else n>0&&(f=[...f,st(n),"0x","0x"]);return Aa(f)}function sf(e,t){const n=t??e,{v:o,yParity:s}=n;if(typeof n.r>"u")return[];if(typeof n.s>"u")return[];if(typeof o>"u"&&typeof s>"u")return[];const u=Ts(n.r),l=Ts(n.s);return[typeof s=="number"?s?st(1):"0x":o===0n?"0x":o===1n?st(1):o===27n?"0x":st(1),u==="0x00"?"0x":u,l==="0x00"?"0x":l]}async function aU(e){const{privateKey:t,transaction:n,serializer:o=tU}=e,s=n.type==="eip4844"?{...n,sidecars:!1}:n,u=await of({hash:Yn(o(s)),privateKey:t});return o(n,u)}function Du(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new AU(e.type);return`${e.name}(${sv(e.inputs,{includeName:t})})`}function sv(e,{includeName:t=!1}={}){return e?e.map(n=>uU(n,{includeName:t})).join(t?", ":","):""}function uU(e,{includeName:t}){return e.type.startsWith("tuple")?`(${sv(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class lU extends Ze{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
47
|
+
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class W2 extends Ze{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
48
|
+
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class cU extends Ze{constructor({data:t,params:n,size:o}){super([`Data size of ${o} bytes is too small for given parameters.`].join(`
|
|
49
|
+
`),{metaMessages:[`Params: (${sv(n,{includeName:!0})})`,`Data: ${t} (${o} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=o}}class av extends Ze{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class fU extends Ze{constructor({expectedLength:t,givenLength:n,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
|
|
50
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class hU extends Ze{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${dr(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class dU extends Ze{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
|
|
51
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}class DO extends Ze{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
|
|
52
|
+
`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class X2 extends Ze{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
53
|
+
`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class pU extends Ze{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${Du(t.abiItem)}\`, and`,`\`${n.type}\` in \`${Du(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class yU extends Ze{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class gU extends Ze{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
54
|
+
`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class mU extends Ze{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
55
|
+
`),{docsPath:n,name:"InvalidAbiDecodingType"})}}class bU extends Ze{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
56
|
+
`),{name:"InvalidArrayError"})}}class AU extends Ze{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
57
|
+
`),{name:"InvalidDefinitionTypeError"})}}const vU=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,NO=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function op(e,t){if(e.length!==t.length)throw new dU({expectedLength:e.length,givenLength:t.length});const n=wU({params:e,values:t}),o=lv(n);return o.length===0?"0x":o}function wU({params:e,values:t}){const n=[];for(let o=0;o<e.length;o++)n.push(uv({param:e[o],value:t[o]}));return n}function uv({param:e,value:t}){const n=cv(e.type);if(n){const[o,s]=n;return EU(t,{length:o,param:{...e,type:s}})}if(e.type==="tuple")return FU(t,{param:e});if(e.type==="address")return xU(t);if(e.type==="bool")return IU(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const o=e.type.startsWith("int"),[,,s="256"]=NO.exec(e.type)??[];return _U(t,{signed:o,size:Number(s)})}if(e.type.startsWith("bytes"))return SU(t,{param:e});if(e.type==="string")return CU(t);throw new gU(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function lv(e){let t=0;for(let u=0;u<e.length;u++){const{dynamic:l,encoded:c}=e[u];l?t+=32:t+=dr(c)}const n=[],o=[];let s=0;for(let u=0;u<e.length;u++){const{dynamic:l,encoded:c}=e[u];l?(n.push(st(t+s,{size:32})),o.push(c),s+=dr(c)):n.push(c)}return Xi([...n,...o])}function xU(e){if(!qr(e))throw new An({address:e});return{dynamic:!1,encoded:Bs(e.toLowerCase())}}function EU(e,{length:t,param:n}){const o=t===null;if(!Array.isArray(e))throw new bU(e);if(!o&&e.length!==t)throw new fU({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const u=[];for(let l=0;l<e.length;l++){const c=uv({param:n,value:e[l]});c.dynamic&&(s=!0),u.push(c)}if(o||s){const l=lv(u);if(o){const c=st(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?Xi([c,l]):c}}if(s)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:Xi(u.map(({encoded:l})=>l))}}function SU(e,{param:t}){const[,n]=t.type.split("bytes"),o=dr(e);if(!n){let s=e;return o%32!==0&&(s=Bs(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Xi([Bs(st(o,{size:32})),s])}}if(o!==Number.parseInt(n,10))throw new hU({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Bs(e,{dir:"right"})}}function IU(e){if(typeof e!="boolean")throw new Ze(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Bs(dO(e))}}function _U(e,{signed:t,size:n=256}){if(typeof n=="number"){const o=2n**(BigInt(n)-(t?1n:0n))-1n,s=t?-o-1n:0n;if(e>o||e<s)throw new cO({max:o.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:st(e,{size:32,signed:t})}}function CU(e){const t=ju(e),n=Math.ceil(dr(t)/32),o=[];for(let s=0;s<n;s++)o.push(Bs(Sc(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Xi([Bs(st(dr(t),{size:32})),...o])}}function FU(e,{param:t}){let n=!1;const o=[];for(let s=0;s<t.components.length;s++){const u=t.components[s],l=Array.isArray(e)?s:u.name,c=uv({param:u,value:e[l]});o.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?lv(o):Xi(o.map(({encoded:s})=>s))}}function cv(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Bi=(e,t,n)=>JSON.stringify(e,(o,s)=>typeof s=="bigint"?s.toString():s,n);class OU extends Ze{constructor({domain:t}){super(`Invalid domain "${Bi(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class BU extends Ze{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class TU extends Ze{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function RU(e){const{domain:t,message:n,primaryType:o,types:s}=e,u=(h,f)=>{const p={...f};for(const y of h){const{name:g,type:b}=y;b==="address"&&(p[g]=p[g].toLowerCase())}return p},l=s.EIP712Domain?t?u(s.EIP712Domain,t):{}:{},c=(()=>{if(o!=="EIP712Domain")return u(s[o],n)})();return Bi({domain:l,message:c,primaryType:o,types:s})}function PO(e){const{domain:t,message:n,primaryType:o,types:s}=e,u=(l,c)=>{for(const h of l){const{name:f,type:p}=h,y=c[f],g=p.match(NO);if(g&&(typeof y=="number"||typeof y=="bigint")){const[B,_,M]=g;st(y,{signed:_==="int",size:Number.parseInt(M,10)/8})}if(p==="address"&&typeof y=="string"&&!qr(y))throw new An({address:y});const b=p.match(vU);if(b){const[B,_]=b;if(_&&dr(y)!==Number.parseInt(_,10))throw new yU({expectedSize:Number.parseInt(_,10),givenSize:dr(y)})}const w=s[p];w&&(MU(p),u(w,y))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new OU({domain:t});u(s.EIP712Domain,t)}if(o!=="EIP712Domain")if(s[o])u(s[o],n);else throw new BU({primaryType:o,types:s})}function kO({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function MU(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new TU({type:e})}function UU(e){const{domain:t={},message:n,primaryType:o}=e,s={EIP712Domain:kO({domain:t}),...e.types};PO({domain:t,message:n,primaryType:o,types:s});const u=["0x1901"];return t&&u.push(jU({domain:t,types:s})),o!=="EIP712Domain"&&u.push(LO({data:n,primaryType:o,types:s})),Yn(Xi(u))}function jU({domain:e,types:t}){return LO({data:e,primaryType:"EIP712Domain",types:t})}function LO({data:e,primaryType:t,types:n}){const o=zO({data:e,primaryType:t,types:n});return Yn(o)}function zO({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],s=[DU({primaryType:t,types:n})];for(const u of n[t]){const[l,c]=qO({types:n,name:u.name,type:u.type,value:e[u.name]});o.push(l),s.push(c)}return op(o,s)}function DU({primaryType:e,types:t}){const n=Vi(NU({primaryType:e,types:t}));return Yn(n)}function NU({primaryType:e,types:t}){let n="";const o=$O({primaryType:e,types:t});o.delete(e);const s=[e,...Array.from(o).sort()];for(const u of s)n+=`${u}(${t[u].map(({name:l,type:c})=>`${c} ${l}`).join(",")})`;return n}function $O({primaryType:e,types:t},n=new Set){const o=e.match(/^\w*/u),s=o==null?void 0:o[0];if(n.has(s)||t[s]===void 0)return n;n.add(s);for(const u of t[s])$O({primaryType:u.type,types:t},n);return n}function qO({types:e,name:t,type:n,value:o}){if(e[n]!==void 0)return[{type:"bytes32"},Yn(zO({data:o,primaryType:n,types:e}))];if(n==="bytes")return o=`0x${(o.length%2?"0":"")+o.slice(2)}`,[{type:"bytes32"},Yn(o)];if(n==="string")return[{type:"bytes32"},Yn(Vi(o))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),u=o.map(l=>qO({name:t,type:s,types:e,value:l}));return[{type:"bytes32"},Yn(op(u.map(([l])=>l),u.map(([,l])=>l)))]}return[{type:n},o]}async function PU(e){const{privateKey:t,...n}=e;return await of({hash:UU(n),privateKey:t,to:"hex"})}function xs(e,t={}){const{nonceManager:n}=t,o=Vi(rf.getPublicKey(e.slice(2),!1)),s=vO(o);return{...EM({address:s,nonceManager:n,async sign({hash:l}){return of({hash:l,privateKey:e,to:"hex"})},async signAuthorization(l){return BM({...l,privateKey:e})},async signMessage({message:l}){return UM({message:l,privateKey:e})},async signTransaction(l,{serializer:c}={}){return aU({privateKey:e,transaction:l,serializer:c})},async signTypedData(l){return PU({...l,privateKey:e})}}),publicKey:o,source:"privateKey"}}function Mn(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}function kU(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const Z2=/^tuple(?<array>(\[(\d*)\])*)$/;function Ib(e){let t=e.type;if(Z2.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const u=e.components[s];t+=Ib(u),s<n-1&&(t+=", ")}const o=kU(Z2,e.type);return t+=`)${(o==null?void 0:o.array)??""}`,Ib({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function nc(e){let t="";const n=e.length;for(let o=0;o<n;o++){const s=e[o];t+=Ib(s),o!==n-1&&(t+=", ")}return t}function LU(e){var t;return e.type==="function"?`function ${e.name}(${nc(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${nc(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${nc(e.inputs)})`:e.type==="error"?`error ${e.name}(${nc(e.inputs)})`:e.type==="constructor"?`constructor(${nc(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function tn(e,t,n){const o=e[t.name];if(typeof o=="function")return o;const s=e[n];return typeof s=="function"?s:u=>t(e,u)}const zU=e=>Yn(ZA(e));function $U(e){return zU(e)}function qU(e){let t=!0,n="",o=0,s="",u=!1;for(let l=0;l<e.length;l++){const c=e[l];if(["(",")",","].includes(c)&&(t=!0),c==="("&&o++,c===")"&&o--,!!t){if(o===0){if(c===" "&&["event","function",""].includes(s))s="";else if(s+=c,c===")"){u=!0;break}continue}if(c===" "){e[l-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}s+=c,n+=c}}if(!u)throw new Ze("Unable to normalize signature.");return s}const HU=e=>{const t=typeof e=="string"?e:LU(e);return qU(t)};function HO(e){return $U(HU(e))}const QU=HO,fv=e=>Sc(HO(e),0,4);function QO(e){const{abi:t,args:n=[],name:o}=e,s=No(o,{strict:!1}),u=t.filter(c=>s?c.type==="function"?fv(c)===o:c.type==="event"?QU(c)===o:!1:"name"in c&&c.name===o);if(u.length===0)return;if(u.length===1)return u[0];let l;for(const c of u){if(!("inputs"in c))continue;if(!n||n.length===0){if(!c.inputs||c.inputs.length===0)return c;continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==n.length)continue;if(n.every((f,p)=>{const y="inputs"in c&&c.inputs[p];return y?_b(f,y):!1})){if(l&&"inputs"in l&&l.inputs){const f=GO(c.inputs,l.inputs,n);if(f)throw new pU({abiItem:c,type:f[0]},{abiItem:l,type:f[1]})}l=c}}return l||u[0]}function _b(e,t){const n=typeof e,o=t.type;switch(o){case"address":return qr(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((s,u)=>_b(Object.values(e)[u],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(s=>_b(s,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function GO(e,t,n){for(const o in e){const s=e[o],u=t[o];if(s.type==="tuple"&&u.type==="tuple"&&"components"in s&&"components"in u)return GO(s.components,u.components,n[o]);const l=[s.type,u.type];if(l.includes("address")&&l.includes("bytes20")?!0:l.includes("address")&&l.includes("string")?qr(n[o],{strict:!1}):l.includes("address")&&l.includes("bytes")?qr(n[o],{strict:!1}):!1)return l}}const J2="/docs/contract/encodeFunctionData";function GU(e){const{abi:t,args:n,functionName:o}=e;let s=t[0];if(o){const u=QO({abi:t,args:n,name:o});if(!u)throw new X2(o,{docsPath:J2});s=u}if(s.type!=="function")throw new X2(void 0,{docsPath:J2});return{abi:[s],functionName:fv(Du(s))}}function KO(e){const{args:t}=e,{abi:n,functionName:o}=(()=>{var c;return e.abi.length===1&&((c=e.functionName)!=null&&c.startsWith("0x"))?e:GU(e)})(),s=n[0],u=o,l="inputs"in s&&s.inputs?op(s.inputs,t??[]):void 0;return Rs([u,l??"0x"])}const KU={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},YU={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},VU={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function WU(e,t={}){typeof t.size<"u"&&Ji(e,{size:t.size});const n=dn(e,t);return Wi(n,t)}function XU(e,t={}){let n=e;if(typeof t.size<"u"&&(Ji(n,{size:t.size}),n=Ts(n)),n.length>1||n[0]>1)throw new tM(n);return!!n[0]}function Do(e,t={}){typeof t.size<"u"&&Ji(e,{size:t.size});const n=dn(e,t);return Po(n,t)}function ZU(e,t={}){let n=e;return typeof t.size<"u"&&(Ji(n,{size:t.size}),n=Ts(n,{dir:"right"})),new TextDecoder().decode(n)}function JU(e,t){const n=typeof t=="string"?Ti(t):t,o=ev(n);if(dr(n)===0&&e.length>0)throw new av;if(dr(t)&&dr(t)<32)throw new cU({data:typeof t=="string"?t:dn(t),params:e,size:dr(t)});let s=0;const u=[];for(let l=0;l<e.length;++l){const c=e[l];o.setPosition(s);const[h,f]=Ou(o,c,{staticPosition:0});s+=f,u.push(h)}return u}function Ou(e,t,{staticPosition:n}){const o=cv(t.type);if(o){const[s,u]=o;return tj(e,{...t,type:u},{length:s,staticPosition:n})}if(t.type==="tuple")return oj(e,t,{staticPosition:n});if(t.type==="address")return ej(e);if(t.type==="bool")return rj(e);if(t.type.startsWith("bytes"))return nj(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return ij(e,t);if(t.type==="string")return sj(e,{staticPosition:n});throw new mU(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const eI=32,Cb=32;function ej(e){const t=e.readBytes(32);return[nf(dn(UO(t,-20))),32]}function tj(e,t,{length:n,staticPosition:o}){if(!n){const l=Do(e.readBytes(Cb)),c=o+l,h=c+eI;e.setPosition(c);const f=Do(e.readBytes(eI)),p=Ic(t);let y=0;const g=[];for(let b=0;b<f;++b){e.setPosition(h+(p?b*32:y));const[w,B]=Ou(e,t,{staticPosition:h});y+=B,g.push(w)}return e.setPosition(o+32),[g,32]}if(Ic(t)){const l=Do(e.readBytes(Cb)),c=o+l,h=[];for(let f=0;f<n;++f){e.setPosition(c+f*32);const[p]=Ou(e,t,{staticPosition:c});h.push(p)}return e.setPosition(o+32),[h,32]}let s=0;const u=[];for(let l=0;l<n;++l){const[c,h]=Ou(e,t,{staticPosition:o+s});s+=h,u.push(c)}return[u,s]}function rj(e){return[XU(e.readBytes(32),{size:32}),32]}function nj(e,t,{staticPosition:n}){const[o,s]=t.type.split("bytes");if(!s){const l=Do(e.readBytes(32));e.setPosition(n+l);const c=Do(e.readBytes(32));if(c===0)return e.setPosition(n+32),["0x",32];const h=e.readBytes(c);return e.setPosition(n+32),[dn(h),32]}return[dn(e.readBytes(Number.parseInt(s,10),32)),32]}function ij(e,t){const n=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),s=e.readBytes(32);return[o>48?WU(s,{signed:n}):Do(s,{signed:n}),32]}function oj(e,t,{staticPosition:n}){const o=t.components.length===0||t.components.some(({name:l})=>!l),s=o?[]:{};let u=0;if(Ic(t)){const l=Do(e.readBytes(Cb)),c=n+l;for(let h=0;h<t.components.length;++h){const f=t.components[h];e.setPosition(c+u);const[p,y]=Ou(e,f,{staticPosition:c});u+=y,s[o?h:f==null?void 0:f.name]=p}return e.setPosition(n+32),[s,32]}for(let l=0;l<t.components.length;++l){const c=t.components[l],[h,f]=Ou(e,c,{staticPosition:n});s[o?l:c==null?void 0:c.name]=h,u+=f}return[s,u]}function sj(e,{staticPosition:t}){const n=Do(e.readBytes(32)),o=t+n;e.setPosition(o);const s=Do(e.readBytes(32));if(s===0)return e.setPosition(t+32),["",32];const u=e.readBytes(s,32),l=ZU(Ts(u));return e.setPosition(t+32),[l,32]}function Ic(e){var o;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(o=e.components)==null?void 0:o.some(Ic);const n=cv(e.type);return!!(n&&Ic({...e,type:n[1]}))}function aj(e){const{abi:t,data:n}=e,o=Sc(n,0,4);if(o==="0x")throw new av;const u=[...t||[],YU,VU].find(l=>l.type==="error"&&o===fv(Du(l)));if(!u)throw new DO(o,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?JU(u.inputs,Sc(n,4)):void 0,errorName:u.name}}function YO({abiItem:e,args:t,includeFunctionName:n=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((s,u)=>`${o&&s.name?`${s.name}: `:""}${typeof t[u]=="object"?Bi(t[u]):t[u]}`).join(", ")})`}class uj extends Ze{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class lj extends Ze{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}const cj=e=>e,hv=e=>e;class fj extends Ze{constructor(t,{abi:n,args:o,contractAddress:s,docsPath:u,functionName:l,sender:c}){const h=QO({abi:n,args:o,name:l}),f=h?YO({abiItem:h,args:o,includeFunctionName:!1,includeName:!1}):void 0,p=h?Du(h,{includeName:!0}):void 0,y=tp({address:s&&cj(s),function:p,args:f&&f!=="()"&&`${[...Array((l==null?void 0:l.length)??0).keys()].map(()=>" ").join("")}${f}`,sender:c});super(t.shortMessage||`An unknown error occurred while executing the contract function "${l}".`,{cause:t,docsPath:u,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],y&&"Contract Call:",y].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=o,this.cause=t,this.contractAddress=s,this.functionName=l,this.sender=c}}class hj extends Ze{constructor({abi:t,data:n,functionName:o,message:s}){let u,l,c,h;if(n&&n!=="0x")try{l=aj({abi:t,data:n});const{abiItem:p,errorName:y,args:g}=l;if(y==="Error")h=g[0];else if(y==="Panic"){const[b]=g;h=KU[b]}else{const b=p?Du(p,{includeName:!0}):void 0,w=p&&g?YO({abiItem:p,args:g,includeFunctionName:!1,includeName:!1}):void 0;c=[b?`Error: ${b}`:"",w&&w!=="()"?` ${[...Array((y==null?void 0:y.length)??0).keys()].map(()=>" ").join("")}${w}`:""]}}catch(p){u=p}else s&&(h=s);let f;u instanceof DO&&(f=u.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${f}.`]),super(h&&h!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,h||f].join(`
|
|
58
|
+
`):`The contract function "${o}" reverted.`,{cause:u,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=l,this.raw=n,this.reason=h,this.signature=f}}class dj extends Ze{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class pj extends Ze{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class gc extends Ze{constructor({body:t,cause:n,details:o,headers:s,status:u,url:l}){super("HTTP request failed.",{cause:n,details:o,metaMessages:[u&&`Status: ${u}`,`URL: ${hv(l)}`,t&&`Request body: ${Bi(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=s,this.status=u,this.url=l}}class dv extends Ze{constructor({body:t,error:n,url:o}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${hv(o)}`,`Request body: ${Bi(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data}}class tI extends Ze{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hv(n)}`,`Request body: ${Bi(t)}`],name:"TimeoutError"})}}const yj=-1;class Nn extends Ze{constructor(t,{code:n,docsPath:o,metaMessages:s,name:u,shortMessage:l}){super(l,{cause:t,docsPath:o,metaMessages:s||(t==null?void 0:t.metaMessages),name:u||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=u||t.name,this.code=t instanceof dv?t.code:n??yj}}class ti extends Nn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class _c extends Nn{constructor(t){super(t,{code:_c.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(_c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Cc extends Nn{constructor(t){super(t,{code:Cc.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Cc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Fc extends Nn{constructor(t,{method:n}={}){super(t,{code:Fc.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(Fc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Oc extends Nn{constructor(t){super(t,{code:Oc.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
59
|
+
`)})}}Object.defineProperty(Oc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class wa extends Nn{constructor(t){super(t,{code:wa.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(wa,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Bc extends Nn{constructor(t){super(t,{code:Bc.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
60
|
+
`)})}}Object.defineProperty(Bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Tc extends Nn{constructor(t){super(t,{code:Tc.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Tc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Rc extends Nn{constructor(t){super(t,{code:Rc.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Rc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Mc extends Nn{constructor(t){super(t,{code:Mc.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class fa extends Nn{constructor(t,{method:n}={}){super(t,{code:fa.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(fa,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Nu extends Nn{constructor(t){super(t,{code:Nu.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Nu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Uc extends Nn{constructor(t){super(t,{code:Uc.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Uc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Bu extends ti{constructor(t){super(t,{code:Bu.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Bu,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class jc extends ti{constructor(t){super(t,{code:jc.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(jc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Dc extends ti{constructor(t,{method:n}={}){super(t,{code:Dc.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(Dc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Nc extends ti{constructor(t){super(t,{code:Nc.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(Nc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Pc extends ti{constructor(t){super(t,{code:Pc.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Pc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class kc extends ti{constructor(t){super(t,{code:kc.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(kc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Pu extends ti{constructor(t){super(t,{code:Pu.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(Pu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class Lc extends ti{constructor(t){super(t,{code:Lc.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(Lc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class zc extends ti{constructor(t){super(t,{code:zc.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(zc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class $c extends ti{constructor(t){super(t,{code:$c.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty($c,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class qc extends ti{constructor(t){super(t,{code:qc.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(qc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class Hc extends ti{constructor(t){super(t,{code:Hc.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Hc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class ku extends ti{constructor(t){super(t,{code:ku.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(ku,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class gj extends Nn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const mj=3;function bj(e,{abi:t,address:n,args:o,docsPath:s,functionName:u,sender:l}){const c=e instanceof pj?e:e instanceof Ze?e.walk(w=>"data"in w)||e.walk():{},{code:h,data:f,details:p,message:y,shortMessage:g}=c,b=e instanceof av?new dj({functionName:u}):[mj,wa.code].includes(h)&&(f||p||y||g)?new hj({abi:t,data:typeof f=="object"?f.data:f,functionName:u,message:c instanceof dv?p:g??y}):e;return new fj(b,{abi:t,args:o,contractAddress:n,docsPath:s,functionName:u,sender:l})}const Aj="modulepreload",vj=function(e){return"/"+e},rI={},wj=function(t,n,o){let s=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));s=l(n.map(f=>{if(f=vj(f),f in rI)return;rI[f]=!0;const p=f.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":Aj,p||(g.as="script"),g.crossOrigin="",g.href=f,h&&g.setAttribute("nonce",h),document.head.appendChild(g),p)return new Promise((b,w)=>{g.addEventListener("load",b),g.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function u(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return s.then(l=>{for(const c of l||[])c.status==="rejected"&&u(c.reason);return t().catch(u)})};async function xj({hash:e,signature:t}){const n=No(e)?e:Vi(e),{secp256k1:o}=await wj(async()=>{const{secp256k1:l}=await Promise.resolve().then(()=>eM);return{secp256k1:l}},void 0);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:f,s:p,v:y,yParity:g}=t,b=Number(g??y),w=nI(b);return new o.Signature(Wi(f),Wi(p)).addRecoveryBit(w)}const l=No(t)?t:Vi(t);if(dr(l)!==65)throw new Error("invalid signature length");const c=Po(`0x${l.slice(130)}`),h=nI(c);return o.Signature.fromCompact(l.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function nI(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Ej({hash:e,signature:t}){return vO(await xj({hash:e,signature:t}))}async function VO(e){const{authorization:t,signature:n}=e;return Ej({hash:EO(t),signature:n??t})}class Sj extends Ze{constructor(t,{account:n,docsPath:o,chain:s,data:u,gas:l,gasPrice:c,maxFeePerGas:h,maxPriorityFeePerGas:f,nonce:p,to:y,value:g}){var w;const b=tp({from:n==null?void 0:n.address,to:y,value:typeof g<"u"&&`${IO(g)} ${((w=s==null?void 0:s.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:u,gas:l,gasPrice:typeof c<"u"&&`${Oi(c)} gwei`,maxFeePerGas:typeof h<"u"&&`${Oi(h)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Oi(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",b].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function WO(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof Ze?e.walk(s=>(s==null?void 0:s.code)===Su.code):e;return o instanceof Ze?new Su({cause:e,message:o.details}):Su.nodeMessage.test(n)?new Su({cause:e,message:e.details}):va.nodeMessage.test(n)?new va({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):gb.nodeMessage.test(n)?new gb({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):mb.nodeMessage.test(n)?new mb({cause:e,nonce:t==null?void 0:t.nonce}):bb.nodeMessage.test(n)?new bb({cause:e,nonce:t==null?void 0:t.nonce}):Ab.nodeMessage.test(n)?new Ab({cause:e,nonce:t==null?void 0:t.nonce}):vb.nodeMessage.test(n)?new vb({cause:e}):wb.nodeMessage.test(n)?new wb({cause:e,gas:t==null?void 0:t.gas}):xb.nodeMessage.test(n)?new xb({cause:e,gas:t==null?void 0:t.gas}):Eb.nodeMessage.test(n)?new Eb({cause:e}):Ec.nodeMessage.test(n)?new Ec({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new iv({cause:e})}function Ij(e,{docsPath:t,...n}){const o=(()=>{const s=WO(e,n);return s instanceof iv?e:s})();return new Sj(o,{docsPath:t,...n})}function XO(e,{format:t}){if(!t)return{};const n={};function o(u){const l=Object.keys(u);for(const c of l)c in e&&(n[c]=e[c]),u[c]&&typeof u[c]=="object"&&!Array.isArray(u[c])&&o(u[c])}const s=t(e||{});return o(s),n}const _j={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function pv(e){const t={};return typeof e.authorizationList<"u"&&(t.authorizationList=Cj(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>dn(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=st(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=st(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=st(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=st(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=st(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=st(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=_j[e.type]),typeof e.value<"u"&&(t.value=st(e.value)),t}function Cj(e){return e.map(t=>({address:t.address,r:t.r?st(BigInt(t.r)):t.r,s:t.s?st(BigInt(t.s)):t.s,chainId:st(t.chainId),nonce:st(t.nonce),...typeof t.yParity<"u"?{yParity:st(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:st(t.v)}:{}}))}function iI(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:o})=>{if(n.length!==66)throw new q2({size:n.length,targetSize:66,type:"hex"});if(o.length!==66)throw new q2({size:o.length,targetSize:66,type:"hex"});return t[n]=o,t},{})}function Fj(e){const{balance:t,nonce:n,state:o,stateDiff:s,code:u}=e,l={};if(u!==void 0&&(l.code=u),t!==void 0&&(l.balance=st(t)),n!==void 0&&(l.nonce=st(n)),o!==void 0&&(l.state=iI(o)),s!==void 0){if(l.state)throw new lj;l.stateDiff=iI(s)}return l}function Oj(e){if(!e)return;const t={};for(const{address:n,...o}of e){if(!qr(n,{strict:!1}))throw new An({address:n});if(t[n])throw new uj({address:n});t[n]=Fj(o)}return t}function sp(e){const{account:t,gasPrice:n,maxFeePerGas:o,maxPriorityFeePerGas:s,to:u}=e,l=t?Mn(t):void 0;if(l&&!qr(l.address))throw new An({address:l.address});if(u&&!qr(u))throw new An({address:u});if(typeof n<"u"&&(typeof o<"u"||typeof s<"u"))throw new NM;if(o&&o>rp)throw new va({maxFeePerGas:o});if(s&&o&&s>o)throw new Ec({maxFeePerGas:o,maxPriorityFeePerGas:s})}class Bj extends Ze{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class yv extends Ze{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Tj extends Ze{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Oi(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Rj extends Ze{constructor({blockHash:t,blockNumber:n}){let o="Block";t&&(o=`Block at hash "${t}"`),n&&(o=`Block at number "${n}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"})}}const Mj={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Uj(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Po(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?Po(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Mj[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(t.authorizationList=jj(e.authorizationList)),t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof t.v=="bigint"){if(t.v===0n||t.v===27n)return 0;if(t.v===1n||t.v===28n)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),t.type==="legacy"&&(delete t.accessList,delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),t.type==="eip2930"&&(delete t.maxFeePerBlobGas,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t.type==="eip1559"&&delete t.maxFeePerBlobGas,t}function jj(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Dj(e){const t=(e.transactions??[]).map(n=>typeof n=="string"?n:Uj(n));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function kd(e,{blockHash:t,blockNumber:n,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:s}={}){var f,p,y;const u=s??!1,l=n!==void 0?st(n):void 0;let c=null;if(t?c=await e.request({method:"eth_getBlockByHash",params:[t,u]},{dedupe:!0}):c=await e.request({method:"eth_getBlockByNumber",params:[l||o,u]},{dedupe:!!l}),!c)throw new Rj({blockHash:t,blockNumber:n});return(((y=(p=(f=e.chain)==null?void 0:f.formatters)==null?void 0:p.block)==null?void 0:y.format)||Dj)(c)}async function ZO(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Nj(e,t){var u,l;const{block:n,chain:o=e.chain,request:s}=t||{};try{const c=((u=o==null?void 0:o.fees)==null?void 0:u.maxPriorityFeePerGas)??((l=o==null?void 0:o.fees)==null?void 0:l.defaultPriorityFee);if(typeof c=="function"){const f=n||await tn(e,kd,"getBlock")({}),p=await c({block:f,client:e,request:s});if(p===null)throw new Error;return p}if(typeof c<"u")return c;const h=await e.request({method:"eth_maxPriorityFeePerGas"});return Wi(h)}catch{const[c,h]=await Promise.all([n?Promise.resolve(n):tn(e,kd,"getBlock")({}),tn(e,ZO,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new yv;const f=h-c.baseFeePerGas;return f<0n?0n:f}}async function oI(e,t){var g,b;const{block:n,chain:o=e.chain,request:s,type:u="eip1559"}=t||{},l=await(async()=>{var w,B;return typeof((w=o==null?void 0:o.fees)==null?void 0:w.baseFeeMultiplier)=="function"?o.fees.baseFeeMultiplier({block:n,client:e,request:s}):((B=o==null?void 0:o.fees)==null?void 0:B.baseFeeMultiplier)??1.2})();if(l<1)throw new Bj;const h=10**(((g=l.toString().split(".")[1])==null?void 0:g.length)??0),f=w=>w*BigInt(Math.ceil(l*h))/BigInt(h),p=n||await tn(e,kd,"getBlock")({});if(typeof((b=o==null?void 0:o.fees)==null?void 0:b.estimateFeesPerGas)=="function"){const w=await o.fees.estimateFeesPerGas({block:n,client:e,multiply:f,request:s,type:u});if(w!==null)return w}if(u==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new yv;const w=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Nj(e,{block:p,chain:o,request:s}),B=f(p.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??B+w,maxPriorityFeePerGas:w}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await tn(e,ZO,"getGasPrice")({}))}}async function af(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return Po(t)}const JO=["blobVersionedHashes","chainId","fees","gas","nonce","type"],sI=new Map;async function gv(e,t){const{account:n=e.account,blobs:o,chain:s,gas:u,kzg:l,nonce:c,nonceManager:h,parameters:f=JO,type:p}=t,y=n&&Mn(n),g={...t,...y?{from:y==null?void 0:y.address}:{}};let b;async function w(){return b||(b=await tn(e,kd,"getBlock")({blockTag:"latest"}),b)}let B;async function _(){return B||(s?s.id:typeof t.chainId<"u"?t.chainId:(B=await tn(e,af,"getChainId")({}),B))}if(f.includes("nonce")&&typeof c>"u"&&y)if(h){const M=await _();g.nonce=await h.consume({address:y.address,chainId:M,client:e})}else g.nonce=await tn(e,yO,"getTransactionCount")({address:y.address,blockTag:"pending"});if((f.includes("blobVersionedHashes")||f.includes("sidecars"))&&o&&l){const M=tv({blobs:o,kzg:l});if(f.includes("blobVersionedHashes")){const A=_O({commitments:M,to:"hex"});g.blobVersionedHashes=A}if(f.includes("sidecars")){const A=rv({blobs:o,commitments:M,kzg:l}),I=TO({blobs:o,commitments:M,proofs:A,to:"hex"});g.sidecars=I}}if(f.includes("chainId")&&(g.chainId=await _()),(f.includes("fees")||f.includes("type"))&&typeof p>"u")try{g.type=jO(g)}catch{let M=sI.get(e.uid);if(typeof M>"u"){const A=await w();M=typeof(A==null?void 0:A.baseFeePerGas)=="bigint",sI.set(e.uid,M)}g.type=M?"eip1559":"legacy"}if(f.includes("fees"))if(g.type!=="legacy"&&g.type!=="eip2930"){if(typeof g.maxFeePerGas>"u"||typeof g.maxPriorityFeePerGas>"u"){const M=await w(),{maxFeePerGas:A,maxPriorityFeePerGas:I}=await oI(e,{block:M,chain:s,request:g});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<I)throw new Tj({maxPriorityFeePerGas:I});g.maxPriorityFeePerGas=I,g.maxFeePerGas=A}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new yv;if(typeof t.gasPrice>"u"){const M=await w(),{gasPrice:A}=await oI(e,{block:M,chain:s,request:g,type:"legacy"});g.gasPrice=A}}return f.includes("gas")&&typeof u>"u"&&(g.gas=await tn(e,kj,"estimateGas")({...g,account:y&&{address:y.address,type:"json-rpc"}})),sp(g),delete g.parameters,g}async function Pj(e,{address:t,blockNumber:n,blockTag:o=e.experimental_blockTag??"latest"}){const s=typeof n=="bigint"?st(n):void 0,u=await e.request({method:"eth_getBalance",params:[t,s||o]});return BigInt(u)}async function kj(e,t){var u,l,c;const{account:n=e.account}=t,o=n?Mn(n):void 0;try{let oe=function(te){const{block:pe,request:ue,rpcStateOverride:J}=te;return e.request({method:"eth_estimateGas",params:J?[ue,pe??e.experimental_blockTag??"latest",J]:pe?[ue,pe]:[ue]})};var s=oe;const{accessList:h,authorizationList:f,blobs:p,blobVersionedHashes:y,blockNumber:g,blockTag:b,data:w,gas:B,gasPrice:_,maxFeePerBlobGas:M,maxFeePerGas:A,maxPriorityFeePerGas:I,nonce:R,value:T,stateOverride:$,...k}=await gv(e,{...t,parameters:(o==null?void 0:o.type)==="local"?void 0:["blobVersionedHashes"]}),U=(typeof g=="bigint"?st(g):void 0)||b,j=Oj($),Q=await(async()=>{if(k.to)return k.to;if(f&&f.length>0)return await VO({authorization:f[0]}).catch(()=>{throw new Ze("`to` is required. Could not infer from `authorizationList`")})})();sp(t);const P=(c=(l=(u=e.chain)==null?void 0:u.formatters)==null?void 0:l.transactionRequest)==null?void 0:c.format,le=(P||pv)({...XO(k,{format:P}),from:o==null?void 0:o.address,accessList:h,authorizationList:f,blobs:p,blobVersionedHashes:y,data:w,gas:B,gasPrice:_,maxFeePerBlobGas:M,maxFeePerGas:A,maxPriorityFeePerGas:I,nonce:R,to:Q,value:T});let X=BigInt(await oe({block:U,request:le,rpcStateOverride:j}));if(f){const te=await Pj(e,{address:le.from}),pe=await Promise.all(f.map(async ue=>{const{address:J}=ue,G=await oe({block:U,request:{authorizationList:void 0,data:w,from:o==null?void 0:o.address,to:J,value:st(te)},rpcStateOverride:j}).catch(()=>100000n);return 2n*BigInt(G)}));X+=pe.reduce((ue,J)=>ue+J,0n)}return X}catch(h){throw Ij(h,{...t,account:o,chain:e.chain})}}function Lj(e,t){if(!qr(e,{strict:!1}))throw new An({address:e});if(!qr(t,{strict:!1}))throw new An({address:t});return e.toLowerCase()===t.toLowerCase()}const mm="/docs/contract/encodeDeployData";function zj(e){const{abi:t,args:n,bytecode:o}=e;if(!n||n.length===0)return o;const s=t.find(l=>"type"in l&&l.type==="constructor");if(!s)throw new lU({docsPath:mm});if(!("inputs"in s))throw new W2({docsPath:mm});if(!s.inputs||s.inputs.length===0)throw new W2({docsPath:mm});const u=op(s.inputs,n);return Rs([o,u])}function e3(){let e=()=>{},t=()=>{};return{promise:new Promise((o,s)=>{e=o,t=s}),resolve:e,reject:t}}const bm=new Map;function $j({fn:e,id:t,shouldSplitBatch:n,wait:o=0,sort:s}){const u=async()=>{const p=h();l();const y=p.map(({args:g})=>g);y.length!==0&&e(y).then(g=>{s&&Array.isArray(g)&&g.sort(s);for(let b=0;b<p.length;b++){const{resolve:w}=p[b];w==null||w([g[b],g])}}).catch(g=>{for(let b=0;b<p.length;b++){const{reject:w}=p[b];w==null||w(g)}})},l=()=>bm.delete(t),c=()=>h().map(({args:p})=>p),h=()=>bm.get(t)||[],f=p=>bm.set(t,[...h(),p]);return{flush:l,async schedule(p){const{promise:y,resolve:g,reject:b}=e3();return(n==null?void 0:n([...c(),p]))&&u(),h().length>0?(f({args:p,resolve:g,reject:b}),y):(f({args:p,resolve:g,reject:b}),setTimeout(u,o),y)}}}const Am=new Map,aI=new Map;let qj=0;function Hj(e,t,n){const o=++qj,s=()=>Am.get(e)||[],u=()=>{const p=s();Am.set(e,p.filter(y=>y.id!==o))},l=()=>{const p=s();if(!p.some(g=>g.id===o))return;const y=aI.get(e);if(p.length===1&&y){const g=y();g instanceof Promise&&g.catch(()=>{})}u()},c=s();if(Am.set(e,[...c,{id:o,fns:t}]),c&&c.length>0)return l;const h={};for(const p in t)h[p]=((...y)=>{var b,w;const g=s();if(g.length!==0)for(const B of g)(w=(b=B.fns)[p])==null||w.call(b,...y)});const f=n(h);return typeof f=="function"&&aI.set(e,f),l}async function Fb(e){return new Promise(t=>setTimeout(t,e))}function Qj(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let s=!0;const u=()=>s=!1;return(async()=>{let c;c=await e({unpoll:u});const h=await(n==null?void 0:n(c))??o;await Fb(h);const f=async()=>{s&&(await e({unpoll:u}),await Fb(o),f())};f()})(),u}class Sa extends Ze{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
61
|
+
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class ed extends Ze{constructor({docsPath:t,metaMessages:n,type:o}){super(`Account type "${o}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function t3({chain:e,currentChainId:t}){if(!e)throw new WM;if(t!==e.id)throw new VM({chain:e,currentChainId:t})}function r3(e,{docsPath:t,...n}){const o=(()=>{const s=WO(e,n);return s instanceof iv?e:s})();return new zM(o,{docsPath:t,...n})}async function n3(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const vm=new ep(128);async function ap(e,t){var A,I,R,T;const{account:n=e.account,chain:o=e.chain,accessList:s,authorizationList:u,blobs:l,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,type:w,value:B,..._}=t;if(typeof n>"u")throw new Sa({docsPath:"/docs/actions/wallet/sendTransaction"});const M=n?Mn(n):null;try{sp(t);const $=await(async()=>{if(t.to)return t.to;if(t.to!==null&&u&&u.length>0)return await VO({authorization:u[0]}).catch(()=>{throw new Ze("`to` is required. Could not infer from `authorizationList`.")})})();if((M==null?void 0:M.type)==="json-rpc"||M===null){let k;o!==null&&(k=await tn(e,af,"getChainId")({}),t3({currentChainId:k,chain:o}));const L=(R=(I=(A=e.chain)==null?void 0:A.formatters)==null?void 0:I.transactionRequest)==null?void 0:R.format,j=(L||pv)({...XO(_,{format:L}),accessList:s,authorizationList:u,blobs:l,chainId:k,data:c,from:M==null?void 0:M.address,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,to:$,type:w,value:B}),Q=vm.get(e.uid),P=Q?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:P,params:[j]},{retryCount:0})}catch(re){if(Q===!1)throw re;const le=re;if(le.name==="InvalidInputRpcError"||le.name==="InvalidParamsRpcError"||le.name==="MethodNotFoundRpcError"||le.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[j]},{retryCount:0}).then(oe=>(vm.set(e.uid,!0),oe)).catch(oe=>{const X=oe;throw X.name==="MethodNotFoundRpcError"||X.name==="MethodNotSupportedRpcError"?(vm.set(e.uid,!1),le):X});throw le}}if((M==null?void 0:M.type)==="local"){const k=await tn(e,gv,"prepareTransactionRequest")({account:M,accessList:s,authorizationList:u,blobs:l,chain:o,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:b,nonceManager:M.nonceManager,parameters:[...JO,"sidecars"],type:w,value:B,..._,to:$}),L=(T=o==null?void 0:o.serializers)==null?void 0:T.transaction,U=await M.signTransaction(k,{serializer:L});return await tn(e,n3,"sendRawTransaction")({serializedTransaction:U})}throw(M==null?void 0:M.type)==="smart"?new ed({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new ed({docsPath:"/docs/actions/wallet/sendTransaction",type:M==null?void 0:M.type})}catch($){throw $ instanceof ed?$:r3($,{...t,account:M,chain:t.chain||void 0})}}async function Gj(e,t){const{abi:n,account:o=e.account,address:s,args:u,dataSuffix:l,functionName:c,...h}=t;if(typeof o>"u")throw new Sa({docsPath:"/docs/contract/writeContract"});const f=o?Mn(o):null,p=KO({abi:n,args:u,functionName:c});try{return await tn(e,ap,"sendTransaction")({data:`${p}${l?l.replace("0x",""):""}`,to:s,account:f,...h})}catch(y){throw bj(y,{abi:n,address:s,args:u,docsPath:"/docs/contract/writeContract",functionName:c,sender:f==null?void 0:f.address})}}class Kj extends Ze{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}function i3(e,{delay:t=100,retryCount:n=2,shouldRetry:o=()=>!0}={}){return new Promise((s,u)=>{const l=async({count:c=0}={})=>{const h=async({error:f})=>{const p=typeof t=="function"?t({count:c,error:f}):t;p&&await Fb(p),l({count:c+1})};try{const f=await e();s(f)}catch(f){if(c<n&&await o({count:c,error:f}))return h({error:f});u(f)}};l()})}const Yj={"0x0":"reverted","0x1":"success"},o3="0x5792579257925792579257925792579257925792579257925792579257925792",s3=st(0,{size:32});async function Vj(e,t){const{account:n=e.account,capabilities:o,chain:s=e.chain,experimental_fallback:u,experimental_fallbackDelay:l=32,forceAtomic:c=!1,id:h,version:f="2.0.0"}=t,p=n?Mn(n):null,y=t.calls.map(g=>{const b=g,w=b.abi?KO({abi:b.abi,functionName:b.functionName,args:b.args}):b.data;return{data:b.dataSuffix&&w?Xi([w,b.dataSuffix]):w,to:b.to,value:b.value?st(b.value):void 0}});try{const g=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:c,calls:y,capabilities:o,chainId:st(s.id),from:p==null?void 0:p.address,id:h,version:f}]},{retryCount:0});return typeof g=="string"?{id:g}:g}catch(g){const b=g;if(u&&(b.name==="MethodNotFoundRpcError"||b.name==="MethodNotSupportedRpcError"||b.name==="UnknownRpcError"||b.details.toLowerCase().includes("does not exist / is not available")||b.details.toLowerCase().includes("missing or invalid. request()")||b.details.toLowerCase().includes("did not match any variant of untagged enum")||b.details.toLowerCase().includes("account upgraded to unsupported contract")||b.details.toLowerCase().includes("eip-7702 not supported")||b.details.toLowerCase().includes("unsupported wc_ method")||b.details.toLowerCase().includes("feature toggled misconfigured"))){if(o&&Object.values(o).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new Pu(new Ze(A,{details:A}))}if(c&&y.length>1){const M="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new ku(new Ze(M,{details:M}))}const w=[];for(const M of y){const A=ap(e,{account:p,chain:s,data:M.data,to:M.to,value:M.value?Wi(M.value):void 0});w.push(A),l>0&&await new Promise(I=>setTimeout(I,l))}const B=await Promise.allSettled(w);if(B.every(M=>M.status==="rejected"))throw B[0].reason;const _=B.map(M=>M.status==="fulfilled"?M.value:s3);return{id:Xi([..._,st(s.id,{size:32}),o3])}}throw r3(g,{...t,account:p,chain:t.chain})}}async function a3(e,t){async function n(p){if(p.endsWith(o3.slice(2))){const g=Ts(Sb(p,-64,-32)),b=Sb(p,0,-64).slice(2).match(/.{1,64}/g),w=await Promise.all(b.map(_=>s3.slice(2)!==_?e.request({method:"eth_getTransactionReceipt",params:[`0x${_}`]},{dedupe:!0}):void 0)),B=w.some(_=>_===null)?100:w.every(_=>(_==null?void 0:_.status)==="0x1")?200:w.every(_=>(_==null?void 0:_.status)==="0x0")?500:600;return{atomic:!1,chainId:Po(g),receipts:w.filter(Boolean),status:B,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[p]})}const{atomic:o=!1,chainId:s,receipts:u,version:l="2.0.0",...c}=await n(t.id),[h,f]=(()=>{const p=c.status;return p>=100&&p<200?["pending",p]:p>=200&&p<300?["success",p]:p>=300&&p<700?["failure",p]:p==="CONFIRMED"?["success",200]:p==="PENDING"?["pending",100]:[void 0,p]})();return{...c,atomic:o,chainId:s?Po(s):void 0,receipts:(u==null?void 0:u.map(p=>({...p,blockNumber:Wi(p.blockNumber),gasUsed:Wi(p.gasUsed),status:Yj[p.status]})))??[],statusCode:f,status:h,version:l}}async function Wj(e,t){const{id:n,pollingInterval:o=e.pollingInterval,status:s=({statusCode:B})=>B===200||B>=300,retryCount:u=4,retryDelay:l=({count:B})=>~~(1<<B)*200,timeout:c=6e4,throwOnFailure:h=!1}=t,f=Bi(["waitForCallsStatus",e.uid,n]),{promise:p,resolve:y,reject:g}=e3();let b;const w=Hj(f,{resolve:y,reject:g},B=>{const _=Qj(async()=>{const M=A=>{clearTimeout(b),_(),A(),w()};try{const A=await i3(async()=>{const I=await tn(e,a3,"getCallsStatus")({id:n});if(h&&I.status==="failure")throw new Kj(I);return I},{retryCount:u,delay:l});if(!s(A))return;M(()=>B.resolve(A))}catch(A){M(()=>B.reject(A))}},{interval:o,emitOnBegin:!0});return _});return b=c?setTimeout(()=>{w(),clearTimeout(b),g(new Xj({id:n}))},c):void 0,await p}class Xj extends Ze{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Ob=256;let $h=Ob,qh;function u3(e=11){if(!qh||$h+e>Ob*2){qh="",$h=0;for(let t=0;t<Ob;t++)qh+=(256+Math.random()*256|0).toString(16).substring(1)}return qh.substring($h,$h+++e)}function Zj(e){const{batch:t,chain:n,ccipRead:o,key:s="base",name:u="Base Client",type:l="base"}=e,c=e.experimental_blockTag??(typeof(n==null?void 0:n.experimental_preconfirmationTime)=="number"?"pending":void 0),h=(n==null?void 0:n.blockTime)??12e3,f=Math.min(Math.max(Math.floor(h/2),500),4e3),p=e.pollingInterval??f,y=e.cacheTime??p,g=e.account?Mn(e.account):void 0,{config:b,request:w,value:B}=e.transport({chain:n,pollingInterval:p}),_={...b,...B},M={account:g,batch:t,cacheTime:y,ccipRead:o,chain:n,key:s,name:u,pollingInterval:p,request:w,transport:_,type:l,uid:u3(),...c?{experimental_blockTag:c}:{}};function A(I){return R=>{const T=R(I);for(const k in M)delete T[k];const $={...I,...T};return Object.assign($,{extend:A($)})}}return Object.assign(M,{extend:A(M)})}const Hh=new ep(8192);function Jj(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Hh.get(n))return Hh.get(n);const o=e().finally(()=>Hh.delete(n));return Hh.set(n,o),o}function eD(e,t={}){return async(n,o={})=>{var y;const{dedupe:s=!1,methods:u,retryDelay:l=150,retryCount:c=3,uid:h}={...t,...o},{method:f}=n;if((y=u==null?void 0:u.exclude)!=null&&y.includes(f))throw new fa(new Error("method not supported"),{method:f});if(u!=null&&u.include&&!u.include.includes(f))throw new fa(new Error("method not supported"),{method:f});const p=s?ju(`${h}.${Bi(n)}`):void 0;return Jj(()=>i3(async()=>{try{return await e(n)}catch(g){const b=g;switch(b.code){case _c.code:throw new _c(b);case Cc.code:throw new Cc(b);case Fc.code:throw new Fc(b,{method:n.method});case Oc.code:throw new Oc(b);case wa.code:throw new wa(b);case Bc.code:throw new Bc(b);case Tc.code:throw new Tc(b);case Rc.code:throw new Rc(b);case Mc.code:throw new Mc(b);case fa.code:throw new fa(b,{method:n.method});case Nu.code:throw new Nu(b);case Uc.code:throw new Uc(b);case Bu.code:throw new Bu(b);case jc.code:throw new jc(b);case Dc.code:throw new Dc(b);case Nc.code:throw new Nc(b);case Pc.code:throw new Pc(b);case kc.code:throw new kc(b);case Pu.code:throw new Pu(b);case Lc.code:throw new Lc(b);case zc.code:throw new zc(b);case $c.code:throw new $c(b);case qc.code:throw new qc(b);case Hc.code:throw new Hc(b);case ku.code:throw new ku(b);case 5e3:throw new Bu(b);default:throw g instanceof Ze?g:new gj(b)}}},{delay:({count:g,error:b})=>{var w;if(b&&b instanceof gc){const B=(w=b==null?void 0:b.headers)==null?void 0:w.get("Retry-After");if(B!=null&&B.match(/\d/))return Number.parseInt(B,10)*1e3}return~~(1<<g)*l},retryCount:c,shouldRetry:({error:g})=>tD(g)}),{enabled:s,id:p})}}function tD(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Nu.code||e.code===wa.code:e instanceof gc&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:!0}function rD(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function nD(e,{errorInstance:t=new Error("timed out"),timeout:n,signal:o}){return new Promise((s,u)=>{(async()=>{let l;try{const c=new AbortController;n>0&&(l=setTimeout(()=>{o&&c.abort()},n)),s(await e({signal:(c==null?void 0:c.signal)||null}))}catch(c){(c==null?void 0:c.name)==="AbortError"&&u(t),u(c)}finally{clearTimeout(l)}})()})}function iD(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const uI=iD();function oD(e,t={}){return{async request(n){var g;const{body:o,fetchFn:s=t.fetchFn??fetch,onRequest:u=t.onRequest,onResponse:l=t.onResponse,timeout:c=t.timeout??1e4}=n,h={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:f,method:p,signal:y}=h;try{const b=await nD(async({signal:B})=>{const _={...h,body:Array.isArray(o)?Bi(o.map(R=>({jsonrpc:"2.0",id:R.id??uI.take(),...R}))):Bi({jsonrpc:"2.0",id:o.id??uI.take(),...o}),headers:{"Content-Type":"application/json",...f},method:p||"POST",signal:y||(c>0?B:null)},M=new Request(e,_),A=await(u==null?void 0:u(M,_))??{..._,url:e};return await s(A.url??e,A)},{errorInstance:new tI({body:o,url:e}),timeout:c,signal:!0});l&&await l(b);let w;if((g=b.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))w=await b.json();else{w=await b.text();try{w=JSON.parse(w||"{}")}catch(B){if(b.ok)throw B;w={error:w}}}if(!b.ok)throw new gc({body:o,details:Bi(w.error)||b.statusText,headers:b.headers,status:b.status,url:e});return w}catch(b){throw b instanceof gc||b instanceof tI?b:new gc({body:o,cause:b,url:e})}}}}async function sD(e,{chain:t}){const{id:n,name:o,nativeCurrency:s,rpcUrls:u,blockExplorers:l}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:st(n),chainName:o,nativeCurrency:s,rpcUrls:u.default.http,blockExplorerUrls:l?Object.values(l).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}function aD(e,t){const{abi:n,args:o,bytecode:s,...u}=t,l=zj({abi:n,args:o,bytecode:s});return ap(e,{...u,...u.authorizationList?{to:null}:{},data:l})}async function uD(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(o=>nf(o))}async function lD(e,t={}){const{account:n=e.account,chainId:o}=t,s=n?Mn(n):void 0,u=o?[s==null?void 0:s.address,[st(o)]]:[s==null?void 0:s.address],l=await e.request({method:"wallet_getCapabilities",params:u}),c={};for(const[h,f]of Object.entries(l)){c[Number(h)]={};for(let[p,y]of Object.entries(f))p==="addSubAccount"&&(p="unstable_addSubAccount"),c[Number(h)][p]=y}return typeof o=="number"?c[o]:c}async function cD(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function l3(e,t){var h;const{account:n=e.account,chainId:o,nonce:s}=t;if(!n)throw new Sa({docsPath:"/docs/eip7702/prepareAuthorization"});const u=Mn(n),l=(()=>{if(t.executor)return t.executor==="self"?t.executor:Mn(t.executor)})(),c={address:t.contractAddress??t.address,chainId:o,nonce:s};return typeof c.chainId>"u"&&(c.chainId=((h=e.chain)==null?void 0:h.id)??await tn(e,af,"getChainId")({})),typeof c.nonce>"u"&&(c.nonce=await tn(e,yO,"getTransactionCount")({address:u.address,blockTag:"pending"}),(l==="self"||l!=null&&l.address&&Lj(l.address,u.address))&&(c.nonce+=1)),c}async function fD(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>wM(n))}async function hD(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function dD(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function pD(e,t){const{account:n=e.account}=t;if(!n)throw new Sa({docsPath:"/docs/eip7702/signAuthorization"});const o=Mn(n);if(!o.signAuthorization)throw new ed({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const s=await l3(e,t);return o.signAuthorization(s)}async function yD(e,{account:t=e.account,message:n}){if(!t)throw new Sa({docsPath:"/docs/actions/wallet/signMessage"});const o=Mn(t);if(o.signMessage)return o.signMessage({message:n});const s=typeof n=="string"?ju(n):n.raw instanceof Uint8Array?Vi(n.raw):n.raw;return e.request({method:"personal_sign",params:[s,o.address]},{retryCount:0})}async function gD(e,t){var f,p,y,g;const{account:n=e.account,chain:o=e.chain,...s}=t;if(!n)throw new Sa({docsPath:"/docs/actions/wallet/signTransaction"});const u=Mn(n);sp({account:u,...t});const l=await tn(e,af,"getChainId")({});o!==null&&t3({currentChainId:l,chain:o});const c=(o==null?void 0:o.formatters)||((f=e.chain)==null?void 0:f.formatters),h=((p=c==null?void 0:c.transactionRequest)==null?void 0:p.format)||pv;return u.signTransaction?u.signTransaction({...s,chainId:l},{serializer:(g=(y=e.chain)==null?void 0:y.serializers)==null?void 0:g.transaction}):await e.request({method:"eth_signTransaction",params:[{...h(s),chainId:st(l),from:u.address}]},{retryCount:0})}async function mD(e,t){const{account:n=e.account,domain:o,message:s,primaryType:u}=t;if(!n)throw new Sa({docsPath:"/docs/actions/wallet/signTypedData"});const l=Mn(n),c={EIP712Domain:kO({domain:o}),...t.types};if(PO({domain:o,message:s,primaryType:u,types:c}),l.signTypedData)return l.signTypedData({domain:o,message:s,primaryType:u,types:c});const h=RU({domain:o,message:s,primaryType:u,types:c});return e.request({method:"eth_signTypedData_v4",params:[l.address,h]},{retryCount:0})}async function bD(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:st(t)}]},{retryCount:0})}async function AD(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}function vD(e){return{addChain:t=>sD(e,t),deployContract:t=>aD(e,t),getAddresses:()=>uD(e),getCallsStatus:t=>a3(e,t),getCapabilities:t=>lD(e,t),getChainId:()=>af(e),getPermissions:()=>cD(e),prepareAuthorization:t=>l3(e,t),prepareTransactionRequest:t=>gv(e,t),requestAddresses:()=>fD(e),requestPermissions:t=>hD(e,t),sendCalls:t=>Vj(e,t),sendRawTransaction:t=>n3(e,t),sendTransaction:t=>ap(e,t),showCallsStatus:t=>dD(e,t),signAuthorization:t=>pD(e,t),signMessage:t=>yD(e,t),signTransaction:t=>gD(e,t),signTypedData:t=>mD(e,t),switchChain:t=>bD(e,t),waitForCallsStatus:t=>Wj(e,t),watchAsset:t=>AD(e,t),writeContract:t=>Gj(e,t)}}function td(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return Zj({...e,key:t,name:n,transport:o,type:"walletClient"}).extend(vD)}function wD({key:e,methods:t,name:n,request:o,retryCount:s=3,retryDelay:u=150,timeout:l,type:c},h){const f=u3();return{config:{key:e,methods:t,name:n,request:o,retryCount:s,retryDelay:u,timeout:l,type:c},request:eD(o,{methods:t,retryCount:s,retryDelay:u,uid:f}),value:h}}class xD extends Ze{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function rd(e,t={}){const{batch:n,fetchFn:o,fetchOptions:s,key:u="http",methods:l,name:c="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:f,retryDelay:p,raw:y}=t;return({chain:g,retryCount:b,timeout:w})=>{const{batchSize:B=1e3,wait:_=0}=typeof n=="object"?n:{},M=t.retryCount??b,A=w??t.timeout??1e4,I=g==null?void 0:g.rpcUrls.default.http[0];if(!I)throw new xD;const R=oD(I,{fetchFn:o,fetchOptions:s,onRequest:h,onResponse:f,timeout:A});return wD({key:u,methods:l,name:c,async request({method:T,params:$}){const k={method:T,params:$},{schedule:L}=$j({id:I,wait:_,shouldSplitBatch(P){return P.length>B},fn:P=>R.request({body:P}),sort:(P,re)=>P.id-re.id}),U=async P=>n?L(P):[await R.request({body:P})],[{error:j,result:Q}]=await U(k);if(y)return{error:j,result:Q};if(j)throw new dv({body:k,error:j,url:I});return Q},retryCount:M,retryDelay:p,timeout:A,type:"http"},{fetchOptions:s,url:I})}}const nd=rD({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),bi={EFFECTSTREAM_API_PORT:"9999",BATCHER_PORT:"3334"},ic={evm:"#4caf50",evmParallel:"#ff9800",cardano:"#2196f3",midnight:"#9c27b0"};function ED(e){const t={};return e.filter(o=>o.networkType!=="ntp").forEach((o,s)=>{var y,g,b;const u=o.network,l=o.syncProtocol;let c=u.name;u.type==="evm"&&u.chainId?c=`evm_${u.chainId}`:u.type==="evm"&&u.id&&(c=`evm_${u.id}`),t[c]&&(c=`${c}_${s}`);let h;u.type==="evm"?(b=(g=(y=u.rpcUrls)==null?void 0:y.default)==null?void 0:g.http)!=null&&b[0]?h=u.rpcUrls.default.http[0]:l.chainUri&&(h=l.chainUri):(u.type==="midnight"||u.type==="avail"||u.type==="cardano")&&(h=u.nodeUrl);let f=ic.evm;u.type==="cardano"?f=ic.cardano:u.type==="midnight"?f=ic.midnight:u.name.toLowerCase().includes("arbitrum")?f=ic.evm:(u.name.toLowerCase().includes("ethereum")||u.name.toLowerCase().includes("l1"))&&(f=ic.evmParallel);const p={type:u.type.toUpperCase(),name:u.name,blockTime:u.blockTimeMS??l.pollingInterval??void 0,color:f,blocks:[],currentBlock:u.type==="evm"?5e5:1e5,rpcEndpoint:h,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1,protocolName:l.name};t[c]=p}),t}async function SD(){var s;const e=await fetch(c3);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json(),n=ED(t);return{Paima:{type:"EVM",name:"Paima Engine",blockTime:((s=t.find(u=>u.syncProtocol.name==="mainNtp"))==null?void 0:s.network.blockTimeMS)??1e3,color:"#667eea",blocks:[],currentBlock:1e6,rpcEndpoint:`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/rpc/evm`,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1},...n}}const c3="http://127.0.0.1:9999/config",ID=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/block-heights`,_D=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/primitives`,lI=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/tables`,CD=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/scheduled-data`,FD=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/primitives-schema`,OD=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/table-schema`,cI=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/sync-protocols`,BD=`http://localhost:${bi.BATCHER_PORT}/send-input`,fI=`http://localhost:${bi.BATCHER_PORT}/documentation`,hI=`http://localhost:${bi.EFFECTSTREAM_API_PORT}/documentation`,dI="https://effectstream.github.io/docs/",TD=`http://127.0.0.1:${bi.EFFECTSTREAM_API_PORT}/addresses`;function RD(e){return Cr(e)&&!Pn(e)&&!lf(e)&&Symbol.asyncIterator in e}function Pn(e){return Array.isArray(e)}function f3(e){return typeof e=="bigint"}function uf(e){return typeof e=="boolean"}function mv(e){return e instanceof globalThis.Date}function MD(e){return typeof e=="function"}function UD(e){return Cr(e)&&!Pn(e)&&!lf(e)&&Symbol.iterator in e}function jD(e){return e===null}function Zi(e){return typeof e=="number"}function Cr(e){return typeof e=="object"&&e!==null}function h3(e){return e instanceof globalThis.RegExp}function mr(e){return typeof e=="string"}function DD(e){return typeof e=="symbol"}function lf(e){return e instanceof globalThis.Uint8Array}function Ir(e){return e===void 0}function ND(e){return e.map(t=>Ld(t))}function PD(e){return new Date(e.getTime())}function kD(e){return new Uint8Array(e)}function LD(e){return new RegExp(e.source,e.flags)}function zD(e){const t={};for(const n of Object.getOwnPropertyNames(e))t[n]=Ld(e[n]);for(const n of Object.getOwnPropertySymbols(e))t[n]=Ld(e[n]);return t}function Ld(e){return Pn(e)?ND(e):mv(e)?PD(e):lf(e)?kD(e):h3(e)?LD(e):Cr(e)?zD(e):e}function Xn(e){return Ld(e)}function bv(e,t){return Xn(t===void 0?e:{...t,...e})}function d3(e){return Ia(e)&&globalThis.Symbol.asyncIterator in e}function p3(e){return Ia(e)&&globalThis.Symbol.iterator in e}function y3(e){return e instanceof globalThis.Promise}function Av(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function vv(e){return e instanceof globalThis.Uint8Array}function $D(e,t){return t in e}function Ia(e){return e!==null&&typeof e=="object"}function ko(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}function _a(e){return e===void 0}function up(e){return e===null}function lp(e){return typeof e=="boolean"}function Uo(e){return typeof e=="number"}function g3(e){return globalThis.Number.isInteger(e)}function cp(e){return typeof e=="bigint"}function Yi(e){return typeof e=="string"}function m3(e){return typeof e=="function"}function fp(e){return typeof e=="symbol"}function qD(e){return cp(e)||lp(e)||up(e)||Uo(e)||Yi(e)||fp(e)||_a(e)}var Un;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function t(l,c){return e.ExactOptionalPropertyTypes?c in l:l[c]!==void 0}e.IsExactOptionalProperty=t;function n(l){const c=Ia(l);return e.AllowArrayObject?c:c&&!ko(l)}e.IsObjectLike=n;function o(l){return n(l)&&!(l instanceof Date)&&!(l instanceof Uint8Array)}e.IsRecordLike=o;function s(l){return e.AllowNaN?Uo(l):Number.isFinite(l)}e.IsNumberLike=s;function u(l){const c=_a(l);return e.AllowNullVoid?c||l===null:c}e.IsVoidLike=u})(Un||(Un={}));function HD(e){return globalThis.Object.freeze(e).map(t=>zd(t))}function QD(e){const t={};for(const n of Object.getOwnPropertyNames(e))t[n]=zd(e[n]);for(const n of Object.getOwnPropertySymbols(e))t[n]=zd(e[n]);return globalThis.Object.freeze(t)}function zd(e){return Pn(e)?HD(e):mv(e)?e:lf(e)?e:h3(e)?e:Cr(e)?QD(e):e}function nt(e,t){const n=t!==void 0?{...t,...e}:e;switch(Un.InstanceMode){case"freeze":return zd(n);case"clone":return Xn(n);default:return n}}class ri extends Error{constructor(t){super(t)}}const Vn=Symbol.for("TypeBox.Transform"),cf=Symbol.for("TypeBox.Readonly"),qo=Symbol.for("TypeBox.Optional"),hp=Symbol.for("TypeBox.Hint"),at=Symbol.for("TypeBox.Kind");function wv(e){return Cr(e)&&e[cf]==="Readonly"}function Ms(e){return Cr(e)&&e[qo]==="Optional"}function b3(e){return Tt(e,"Any")}function A3(e){return Tt(e,"Argument")}function Ku(e){return Tt(e,"Array")}function dp(e){return Tt(e,"AsyncIterator")}function pp(e){return Tt(e,"BigInt")}function ff(e){return Tt(e,"Boolean")}function Yu(e){return Tt(e,"Computed")}function Vu(e){return Tt(e,"Constructor")}function GD(e){return Tt(e,"Date")}function Wu(e){return Tt(e,"Function")}function Xu(e){return Tt(e,"Integer")}function Ai(e){return Tt(e,"Intersect")}function yp(e){return Tt(e,"Iterator")}function Tt(e,t){return Cr(e)&&at in e&&e[at]===t}function v3(e){return uf(e)||Zi(e)||mr(e)}function Ca(e){return Tt(e,"Literal")}function Fa(e){return Tt(e,"MappedKey")}function ni(e){return Tt(e,"MappedResult")}function hf(e){return Tt(e,"Never")}function KD(e){return Tt(e,"Not")}function xv(e){return Tt(e,"Null")}function Zu(e){return Tt(e,"Number")}function Ni(e){return Tt(e,"Object")}function gp(e){return Tt(e,"Promise")}function mp(e){return Tt(e,"Record")}function jn(e){return Tt(e,"Ref")}function w3(e){return Tt(e,"RegExp")}function df(e){return Tt(e,"String")}function Ev(e){return Tt(e,"Symbol")}function Oa(e){return Tt(e,"TemplateLiteral")}function YD(e){return Tt(e,"This")}function sr(e){return Cr(e)&&Vn in e}function Ba(e){return Tt(e,"Tuple")}function bp(e){return Tt(e,"Undefined")}function Qr(e){return Tt(e,"Union")}function VD(e){return Tt(e,"Uint8Array")}function WD(e){return Tt(e,"Unknown")}function XD(e){return Tt(e,"Unsafe")}function ZD(e){return Tt(e,"Void")}function JD(e){return Cr(e)&&at in e&&mr(e[at])}function Wn(e){return b3(e)||A3(e)||Ku(e)||ff(e)||pp(e)||dp(e)||Yu(e)||Vu(e)||GD(e)||Wu(e)||Xu(e)||Ai(e)||yp(e)||Ca(e)||Fa(e)||ni(e)||hf(e)||KD(e)||xv(e)||Zu(e)||Ni(e)||gp(e)||mp(e)||jn(e)||w3(e)||df(e)||Ev(e)||Oa(e)||YD(e)||Ba(e)||bp(e)||Qr(e)||VD(e)||WD(e)||XD(e)||ZD(e)||JD(e)}const eN=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function x3(e){try{return new RegExp(e),!0}catch{return!1}}function Sv(e){if(!mr(e))return!1;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n>=7&&n<=13||n===27||n===127)return!1}return!0}function E3(e){return Iv(e)||nn(e)}function oc(e){return Ir(e)||f3(e)}function Wt(e){return Ir(e)||Zi(e)}function Iv(e){return Ir(e)||uf(e)}function $t(e){return Ir(e)||mr(e)}function tN(e){return Ir(e)||mr(e)&&Sv(e)&&x3(e)}function rN(e){return Ir(e)||mr(e)&&Sv(e)}function S3(e){return Ir(e)||nn(e)}function $d(e){return Cr(e)&&e[qo]==="Optional"}function Ri(e){return Rt(e,"Any")&&$t(e.$id)}function nN(e){return Rt(e,"Argument")&&Zi(e.index)}function Ta(e){return Rt(e,"Array")&&e.type==="array"&&$t(e.$id)&&nn(e.items)&&Wt(e.minItems)&&Wt(e.maxItems)&&Iv(e.uniqueItems)&&S3(e.contains)&&Wt(e.minContains)&&Wt(e.maxContains)}function _v(e){return Rt(e,"AsyncIterator")&&e.type==="AsyncIterator"&&$t(e.$id)&&nn(e.items)}function Ap(e){return Rt(e,"BigInt")&&e.type==="bigint"&&$t(e.$id)&&oc(e.exclusiveMaximum)&&oc(e.exclusiveMinimum)&&oc(e.maximum)&&oc(e.minimum)&&oc(e.multipleOf)}function Ra(e){return Rt(e,"Boolean")&&e.type==="boolean"&&$t(e.$id)}function iN(e){return Rt(e,"Computed")&&mr(e.target)&&Pn(e.parameters)&&e.parameters.every(t=>nn(t))}function vp(e){return Rt(e,"Constructor")&&e.type==="Constructor"&&$t(e.$id)&&Pn(e.parameters)&&e.parameters.every(t=>nn(t))&&nn(e.returns)}function wp(e){return Rt(e,"Date")&&e.type==="Date"&&$t(e.$id)&&Wt(e.exclusiveMaximumTimestamp)&&Wt(e.exclusiveMinimumTimestamp)&&Wt(e.maximumTimestamp)&&Wt(e.minimumTimestamp)&&Wt(e.multipleOfTimestamp)}function xp(e){return Rt(e,"Function")&&e.type==="Function"&&$t(e.$id)&&Pn(e.parameters)&&e.parameters.every(t=>nn(t))&&nn(e.returns)}function Ho(e){return Rt(e,"Integer")&&e.type==="integer"&&$t(e.$id)&&Wt(e.exclusiveMaximum)&&Wt(e.exclusiveMinimum)&&Wt(e.maximum)&&Wt(e.minimum)&&Wt(e.multipleOf)}function I3(e){return Cr(e)&&Object.entries(e).every(([t,n])=>Sv(t)&&nn(n))}function Ma(e){return Rt(e,"Intersect")&&!(mr(e.type)&&e.type!=="object")&&Pn(e.allOf)&&e.allOf.every(t=>nn(t)&&!cN(t))&&$t(e.type)&&(Iv(e.unevaluatedProperties)||S3(e.unevaluatedProperties))&&$t(e.$id)}function Cv(e){return Rt(e,"Iterator")&&e.type==="Iterator"&&$t(e.$id)&&nn(e.items)}function Rt(e,t){return Cr(e)&&at in e&&e[at]===t}function _3(e){return Us(e)&&mr(e.const)}function C3(e){return Us(e)&&Zi(e.const)}function F3(e){return Us(e)&&uf(e.const)}function Us(e){return Rt(e,"Literal")&&$t(e.$id)&&oN(e.const)}function oN(e){return uf(e)||Zi(e)||mr(e)}function sN(e){return Rt(e,"MappedKey")&&Pn(e.keys)&&e.keys.every(t=>Zi(t)||mr(t))}function aN(e){return Rt(e,"MappedResult")&&I3(e.properties)}function js(e){return Rt(e,"Never")&&Cr(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function Lu(e){return Rt(e,"Not")&&nn(e.not)}function Fv(e){return Rt(e,"Null")&&e.type==="null"&&$t(e.$id)}function Bn(e){return Rt(e,"Number")&&e.type==="number"&&$t(e.$id)&&Wt(e.exclusiveMaximum)&&Wt(e.exclusiveMinimum)&&Wt(e.maximum)&&Wt(e.minimum)&&Wt(e.multipleOf)}function lr(e){return Rt(e,"Object")&&e.type==="object"&&$t(e.$id)&&I3(e.properties)&&E3(e.additionalProperties)&&Wt(e.minProperties)&&Wt(e.maxProperties)}function Ov(e){return Rt(e,"Promise")&&e.type==="Promise"&&$t(e.$id)&&nn(e.item)}function rn(e){return Rt(e,"Record")&&e.type==="object"&&$t(e.$id)&&E3(e.additionalProperties)&&Cr(e.patternProperties)&&(t=>{const n=Object.getOwnPropertyNames(t.patternProperties);return n.length===1&&x3(n[0])&&Cr(t.patternProperties)&&nn(t.patternProperties[n[0]])})(e)}function uN(e){return Rt(e,"Ref")&&$t(e.$id)&&mr(e.$ref)}function Qc(e){return Rt(e,"RegExp")&&$t(e.$id)&&mr(e.source)&&mr(e.flags)&&Wt(e.maxLength)&&Wt(e.minLength)}function Mi(e){return Rt(e,"String")&&e.type==="string"&&$t(e.$id)&&Wt(e.minLength)&&Wt(e.maxLength)&&tN(e.pattern)&&rN(e.format)}function Gc(e){return Rt(e,"Symbol")&&e.type==="symbol"&&$t(e.$id)}function Kc(e){return Rt(e,"TemplateLiteral")&&e.type==="string"&&mr(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function lN(e){return Rt(e,"This")&&$t(e.$id)&&mr(e.$ref)}function cN(e){return Cr(e)&&Vn in e}function Ep(e){return Rt(e,"Tuple")&&e.type==="array"&&$t(e.$id)&&Zi(e.minItems)&&Zi(e.maxItems)&&e.minItems===e.maxItems&&(Ir(e.items)&&Ir(e.additionalItems)&&e.minItems===0||Pn(e.items)&&e.items.every(t=>nn(t)))}function xa(e){return Rt(e,"Undefined")&&e.type==="undefined"&&$t(e.$id)}function Lo(e){return Rt(e,"Union")&&$t(e.$id)&&Cr(e)&&Pn(e.anyOf)&&e.anyOf.every(t=>nn(t))}function pf(e){return Rt(e,"Uint8Array")&&e.type==="Uint8Array"&&$t(e.$id)&&Wt(e.minByteLength)&&Wt(e.maxByteLength)}function Ui(e){return Rt(e,"Unknown")&&$t(e.$id)}function fN(e){return Rt(e,"Unsafe")}function Sp(e){return Rt(e,"Void")&&e.type==="void"&&$t(e.$id)}function hN(e){return Cr(e)&&at in e&&mr(e[at])&&!eN.includes(e[at])}function nn(e){return Cr(e)&&(Ri(e)||nN(e)||Ta(e)||Ra(e)||Ap(e)||_v(e)||iN(e)||vp(e)||wp(e)||xp(e)||Ho(e)||Ma(e)||Cv(e)||Us(e)||sN(e)||aN(e)||js(e)||Lu(e)||Fv(e)||Bn(e)||lr(e)||Ov(e)||rn(e)||uN(e)||Qc(e)||Mi(e)||Gc(e)||Kc(e)||lN(e)||Ep(e)||xa(e)||Lo(e)||pf(e)||Ui(e)||fN(e)||Sp(e)||hN(e))}const dN="(true|false)",id="(0|[1-9][0-9]*)",O3="(.*)",pN="(?!.*)",zu=`^${id}$`,$u=`^${O3}$`,yN=`^${pN}$`,Bv=new Map;function B3(e){return Bv.has(e)}function eo(e,t){Bv.set(e,t)}function T3(e){return Bv.get(e)}const R3=new Map;function Tv(e){return R3.has(e)}function M3(e){return R3.get(e)}function gN(e,t){return e.includes(t)}function mN(e){return[...new Set(e)]}function bN(e,t){return e.filter(n=>t.includes(n))}function AN(e,t){return e.reduce((n,o)=>bN(n,o),t)}function vN(e){return e.length===1?e[0]:e.length>1?AN(e.slice(1),e[0]):[]}function wN(e){const t=[];for(const n of e)t.push(...n);return t}function Yc(e){return nt({[at]:"Any"},e)}function Rv(e,t){return nt({[at]:"Array",type:"array",items:e},t)}function xN(e){return nt({[at]:"Argument",index:e})}function Mv(e,t){return nt({[at]:"AsyncIterator",type:"AsyncIterator",items:e},t)}function Dr(e,t,n){return nt({[at]:"Computed",target:e,parameters:t},n)}function EN(e,t){const{[t]:n,...o}=e;return o}function Zn(e,t){return t.reduce((n,o)=>EN(n,o),e)}function pr(e){return nt({[at]:"Never",not:{}},e)}function on(e){return nt({[at]:"MappedResult",properties:e})}function Uv(e,t,n){return nt({[at]:"Constructor",type:"Constructor",parameters:e,returns:t},n)}function yf(e,t,n){return nt({[at]:"Function",type:"Function",parameters:e,returns:t},n)}function Bb(e,t){return nt({[at]:"Union",anyOf:e},t)}function SN(e){return e.some(t=>Ms(t))}function pI(e){return e.map(t=>Ms(t)?IN(t):t)}function IN(e){return Zn(e,[qo])}function _N(e,t){return SN(e)?Ps(Bb(pI(e),t)):Bb(pI(e),t)}function Ju(e,t){return e.length===1?nt(e[0],t):e.length===0?pr(t):_N(e,t)}function sn(e,t){return e.length===0?pr(t):e.length===1?nt(e[0],t):Bb(e,t)}class yI extends ri{}function CN(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function jv(e,t,n){return e[t]===n&&e.charCodeAt(t-1)!==92}function jo(e,t){return jv(e,t,"(")}function Vc(e,t){return jv(e,t,")")}function U3(e,t){return jv(e,t,"|")}function FN(e){if(!(jo(e,0)&&Vc(e,e.length-1)))return!1;let t=0;for(let n=0;n<e.length;n++)if(jo(e,n)&&(t+=1),Vc(e,n)&&(t-=1),t===0&&n!==e.length-1)return!1;return!0}function ON(e){return e.slice(1,e.length-1)}function BN(e){let t=0;for(let n=0;n<e.length;n++)if(jo(e,n)&&(t+=1),Vc(e,n)&&(t-=1),U3(e,n)&&t===0)return!0;return!1}function TN(e){for(let t=0;t<e.length;t++)if(jo(e,t))return!0;return!1}function RN(e){let[t,n]=[0,0];const o=[];for(let u=0;u<e.length;u++)if(jo(e,u)&&(t+=1),Vc(e,u)&&(t-=1),U3(e,u)&&t===0){const l=e.slice(n,u);l.length>0&&o.push(qu(l)),n=u+1}const s=e.slice(n);return s.length>0&&o.push(qu(s)),o.length===0?{type:"const",const:""}:o.length===1?o[0]:{type:"or",expr:o}}function MN(e){function t(s,u){if(!jo(s,u))throw new yI("TemplateLiteralParser: Index must point to open parens");let l=0;for(let c=u;c<s.length;c++)if(jo(s,c)&&(l+=1),Vc(s,c)&&(l-=1),l===0)return[u,c];throw new yI("TemplateLiteralParser: Unclosed group parens in expression")}function n(s,u){for(let l=u;l<s.length;l++)if(jo(s,l))return[u,l];return[u,s.length]}const o=[];for(let s=0;s<e.length;s++)if(jo(e,s)){const[u,l]=t(e,s),c=e.slice(u,l+1);o.push(qu(c)),s=l}else{const[u,l]=n(e,s),c=e.slice(u,l);c.length>0&&o.push(qu(c)),s=l-1}return o.length===0?{type:"const",const:""}:o.length===1?o[0]:{type:"and",expr:o}}function qu(e){return FN(e)?qu(ON(e)):BN(e)?RN(e):TN(e)?MN(e):{type:"const",const:CN(e)}}function Dv(e){return qu(e.slice(1,e.length-1))}class UN extends ri{}function jN(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}function DN(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}function NN(e){return e.type==="const"&&e.const===".*"}function Wc(e){return jN(e)||NN(e)?!1:DN(e)?!0:e.type==="and"?e.expr.every(t=>Wc(t)):e.type==="or"?e.expr.every(t=>Wc(t)):e.type==="const"?!0:(()=>{throw new UN("Unknown expression type")})()}function PN(e){const t=Dv(e.pattern);return Wc(t)}class kN extends ri{}function*j3(e){if(e.length===1)return yield*e[0];for(const t of e[0])for(const n of j3(e.slice(1)))yield`${t}${n}`}function*LN(e){return yield*j3(e.expr.map(t=>[...Ip(t)]))}function*zN(e){for(const t of e.expr)yield*Ip(t)}function*$N(e){return yield e.const}function*Ip(e){return e.type==="and"?yield*LN(e):e.type==="or"?yield*zN(e):e.type==="const"?yield*$N(e):(()=>{throw new kN("Unknown expression")})()}function D3(e){const t=Dv(e.pattern);return Wc(t)?[...Ip(t)]:[]}function _r(e,t){return nt({[at]:"Literal",const:e,type:typeof e},t)}function N3(e){return nt({[at]:"Boolean",type:"boolean"},e)}function Nv(e){return nt({[at]:"BigInt",type:"bigint"},e)}function Ua(e){return nt({[at]:"Number",type:"number"},e)}function Ea(e){return nt({[at]:"String",type:"string"},e)}function*qN(e){const t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield N3():t==="number"?yield Ua():t==="bigint"?yield Nv():t==="string"?yield Ea():yield(()=>{const n=t.split("|").map(o=>_r(o.trim()));return n.length===0?pr():n.length===1?n[0]:Ju(n)})()}function*HN(e){if(e[1]!=="{"){const t=_r("$"),n=Tb(e.slice(1));return yield*[t,...n]}for(let t=2;t<e.length;t++)if(e[t]==="}"){const n=qN(e.slice(2,t)),o=Tb(e.slice(t+1));return yield*[...n,...o]}yield _r(e)}function*Tb(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){const n=_r(e.slice(0,t)),o=HN(e.slice(t));return yield*[n,...o]}yield _r(e)}function QN(e){return[...Tb(e)]}class GN extends ri{}function KN(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P3(e,t){return Oa(e)?e.pattern.slice(1,e.pattern.length-1):Qr(e)?`(${e.anyOf.map(n=>P3(n,t)).join("|")})`:Zu(e)?`${t}${id}`:Xu(e)?`${t}${id}`:pp(e)?`${t}${id}`:df(e)?`${t}${O3}`:Ca(e)?`${t}${KN(e.const.toString())}`:ff(e)?`${t}${dN}`:(()=>{throw new GN(`Unexpected Kind '${e[at]}'`)})()}function gI(e){return`^${e.map(t=>P3(t,"")).join("")}$`}function qd(e){const n=D3(e).map(o=>_r(o));return Ju(n)}function k3(e,t){const n=mr(e)?gI(QN(e)):gI(e);return nt({[at]:"TemplateLiteral",type:"string",pattern:n},t)}function YN(e){return D3(e).map(n=>n.toString())}function VN(e){const t=[];for(const n of e)t.push(...Ds(n));return t}function WN(e){return[e.toString()]}function Ds(e){return[...new Set(Oa(e)?YN(e):Qr(e)?VN(e.anyOf):Ca(e)?WN(e.const):Zu(e)?["[number]"]:Xu(e)?["[number]"]:[])]}function XN(e,t,n){const o={};for(const s of Object.getOwnPropertyNames(t))o[s]=_p(e,Ds(t[s]),n);return o}function ZN(e,t,n){return XN(e,t.properties,n)}function JN(e,t,n){const o=ZN(e,t,n);return on(o)}function L3(e,t){return e.map(n=>z3(n,t))}function eP(e){return e.filter(t=>!hf(t))}function tP(e,t){return H3(eP(L3(e,t)))}function rP(e){return e.some(t=>hf(t))?[]:e}function nP(e,t){return Ju(rP(L3(e,t)))}function iP(e,t){return t in e?e[t]:t==="[number]"?Ju(e):pr()}function oP(e,t){return t==="[number]"?e:pr()}function sP(e,t){return t in e?e[t]:pr()}function z3(e,t){return Ai(e)?tP(e.allOf,t):Qr(e)?nP(e.anyOf,t):Ba(e)?iP(e.items??[],t):Ku(e)?oP(e.items,t):Ni(e)?sP(e.properties,t):pr()}function Pv(e,t){return t.map(n=>z3(e,n))}function mI(e,t){return Ju(Pv(e,t))}function _p(e,t,n){if(jn(e)||jn(t)){const o="Index types using Ref parameters require both Type and Key to be of TSchema";if(!Wn(e)||!Wn(t))throw new ri(o);return Dr("Index",[e,t])}return ni(t)?JN(e,t,n):Fa(t)?cP(e,t,n):nt(Wn(t)?mI(e,Ds(t)):mI(e,t),n)}function aP(e,t,n){return{[t]:_p(e,[t],Xn(n))}}function uP(e,t,n){return t.reduce((o,s)=>({...o,...aP(e,s,n)}),{})}function lP(e,t,n){return uP(e,t.keys,n)}function cP(e,t,n){const o=lP(e,t,n);return on(o)}function kv(e,t){return nt({[at]:"Iterator",type:"Iterator",items:e},t)}function fP(e){const t=[];for(let n in e)Ms(e[n])||t.push(n);return t}function hP(e,t){const n=fP(e),o=n.length>0?{[at]:"Object",type:"object",properties:e,required:n}:{[at]:"Object",type:"object",properties:e};return nt(o,t)}var Hr=hP;function $3(e,t){return nt({[at]:"Promise",type:"Promise",item:e},t)}function dP(e){return nt(Zn(e,[cf]))}function pP(e){return nt({...e,[cf]:"Readonly"})}function yP(e,t){return t===!1?dP(e):pP(e)}function Ns(e,t){const n=t??!0;return ni(e)?bP(e,n):yP(e,n)}function gP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Ns(e[o],t);return n}function mP(e,t){return gP(e.properties,t)}function bP(e,t){const n=mP(e,t);return on(n)}function el(e,t){return nt(e.length>0?{[at]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[at]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},t)}function q3(e,t){return e in t?gi(e,t[e]):on(t)}function AP(e){return{[e]:_r(e)}}function vP(e){const t={};for(const n of e)t[n]=_r(n);return t}function wP(e,t){return gN(t,e)?AP(e):vP(t)}function xP(e,t){const n=wP(e,t);return q3(e,n)}function sc(e,t){return t.map(n=>gi(e,n))}function EP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(t))n[o]=gi(e,t[o]);return n}function gi(e,t){const n={...t};return Ms(t)?Ps(gi(e,Zn(t,[qo]))):wv(t)?Ns(gi(e,Zn(t,[cf]))):ni(t)?q3(e,t.properties):Fa(t)?xP(e,t.keys):Vu(t)?Uv(sc(e,t.parameters),gi(e,t.returns),n):Wu(t)?yf(sc(e,t.parameters),gi(e,t.returns),n):dp(t)?Mv(gi(e,t.items),n):yp(t)?kv(gi(e,t.items),n):Ai(t)?ks(sc(e,t.allOf),n):Qr(t)?sn(sc(e,t.anyOf),n):Ba(t)?el(sc(e,t.items??[]),n):Ni(t)?Hr(EP(e,t.properties),n):Ku(t)?Rv(gi(e,t.items),n):gp(t)?$3(gi(e,t.item),n):t}function SP(e,t){const n={};for(const o of e)n[o]=gi(o,t);return n}function IP(e,t,n){const o=Wn(e)?Ds(e):e,s=t({[at]:"MappedKey",keys:o}),u=SP(o,s);return Hr(u,n)}function _P(e){return nt(Zn(e,[qo]))}function CP(e){return nt({...e,[qo]:"Optional"})}function FP(e,t){return t===!1?_P(e):CP(e)}function Ps(e,t){const n=t??!0;return ni(e)?TP(e,n):FP(e,n)}function OP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Ps(e[o],t);return n}function BP(e,t){return OP(e.properties,t)}function TP(e,t){const n=BP(e,t);return on(n)}function Rb(e,t={}){const n=e.every(s=>Ni(s)),o=Wn(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return nt(t.unevaluatedProperties===!1||Wn(t.unevaluatedProperties)||n?{...o,[at]:"Intersect",type:"object",allOf:e}:{...o,[at]:"Intersect",allOf:e},t)}function RP(e){return e.every(t=>Ms(t))}function MP(e){return Zn(e,[qo])}function bI(e){return e.map(t=>Ms(t)?MP(t):t)}function UP(e,t){return RP(e)?Ps(Rb(bI(e),t)):Rb(bI(e),t)}function H3(e,t={}){if(e.length===1)return nt(e[0],t);if(e.length===0)return pr(t);if(e.some(n=>sr(n)))throw new Error("Cannot intersect transform types");return UP(e,t)}function ks(e,t){if(e.length===1)return nt(e[0],t);if(e.length===0)return pr(t);if(e.some(n=>sr(n)))throw new Error("Cannot intersect transform types");return Rb(e,t)}function gf(...e){const[t,n]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof t!="string")throw new ri("Ref: $ref must be a string");return nt({[at]:"Ref",$ref:t},n)}function jP(e,t){return Dr("Awaited",[Dr(e,t)])}function DP(e){return Dr("Awaited",[gf(e)])}function NP(e){return ks(Q3(e))}function PP(e){return sn(Q3(e))}function kP(e){return Cp(e)}function Q3(e){return e.map(t=>Cp(t))}function Cp(e,t){return nt(Yu(e)?jP(e.target,e.parameters):Ai(e)?NP(e.allOf):Qr(e)?PP(e.anyOf):gp(e)?kP(e.item):jn(e)?DP(e.$ref):e,t)}function G3(e){const t=[];for(const n of e)t.push(tl(n));return t}function LP(e){const t=G3(e);return wN(t)}function zP(e){const t=G3(e);return vN(t)}function $P(e){return e.map((t,n)=>n.toString())}function qP(e){return["[number]"]}function HP(e){return globalThis.Object.getOwnPropertyNames(e)}function QP(e){return Mb?globalThis.Object.getOwnPropertyNames(e).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}function tl(e){return Ai(e)?LP(e.allOf):Qr(e)?zP(e.anyOf):Ba(e)?$P(e.items??[]):Ku(e)?qP(e.items):Ni(e)?HP(e.properties):mp(e)?QP(e.patternProperties):[]}let Mb=!1;function Hd(e){Mb=!0;const t=tl(e);return Mb=!1,`^(${t.map(o=>`(${o})`).join("|")})$`}function GP(e,t){return Dr("KeyOf",[Dr(e,t)])}function KP(e){return Dr("KeyOf",[gf(e)])}function YP(e,t){const n=tl(e),o=VP(n),s=Ju(o);return nt(s,t)}function VP(e){return e.map(t=>t==="[number]"?Ua():_r(t))}function Lv(e,t){return Yu(e)?GP(e.target,e.parameters):jn(e)?KP(e.$ref):ni(e)?ZP(e,t):YP(e,t)}function WP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Lv(e[o],Xn(t));return n}function XP(e,t){return WP(e.properties,t)}function ZP(e,t){const n=XP(e,t);return on(n)}function JP(e){const t=tl(e),n=Pv(e,t);return t.map((o,s)=>[t[s],n[s]])}function e5(e){const t=[];for(const n of e)t.push(...tl(n));return mN(t)}function t5(e){return e.filter(t=>!hf(t))}function r5(e,t){const n=[];for(const o of e)n.push(...Pv(o,[t]));return t5(n)}function n5(e,t){const n={};for(const o of t)n[o]=H3(r5(e,o));return n}function i5(e,t){const n=e5(e),o=n5(e,n);return Hr(o,t)}function K3(e){return nt({[at]:"Date",type:"Date"},e)}function Y3(e){return nt({[at]:"Null",type:"null"},e)}function V3(e){return nt({[at]:"Symbol",type:"symbol"},e)}function W3(e){return nt({[at]:"Undefined",type:"undefined"},e)}function X3(e){return nt({[at]:"Uint8Array",type:"Uint8Array"},e)}function Fp(e){return nt({[at]:"Unknown"},e)}function o5(e){return e.map(t=>zv(t,!1))}function s5(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ns(zv(e[n],!1));return t}function Qh(e,t){return t===!0?e:Ns(e)}function zv(e,t){return RD(e)||UD(e)?Qh(Yc(),t):Pn(e)?Ns(el(o5(e))):lf(e)?X3():mv(e)?K3():Cr(e)?Qh(Hr(s5(e)),t):MD(e)?Qh(yf([],Fp()),t):Ir(e)?W3():jD(e)?Y3():DD(e)?V3():f3(e)?Nv():Zi(e)||uf(e)||mr(e)?_r(e):Hr({})}function a5(e,t){return nt(zv(e,!0),t)}function u5(e,t){return Vu(e)?el(e.parameters,t):pr(t)}function l5(e,t){if(Ir(e))throw new Error("Enum undefined or empty");const n=globalThis.Object.getOwnPropertyNames(e).filter(u=>isNaN(u)).map(u=>e[u]),s=[...new Set(n)].map(u=>_r(u));return sn(s,{...t,[hp]:"Enum"})}class c5 extends ri{}var ze;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(ze||(ze={}));function mi(e){return e===ze.False?e:ze.True}function rl(e){throw new c5(e)}function Fr(e){return js(e)||Ma(e)||Lo(e)||Ui(e)||Ri(e)}function Or(e,t){return js(t)?eB():Ma(t)?Op(e,t):Lo(t)?qv(e,t):Ui(t)?iB():Ri(t)?$v():rl("StructuralRight")}function $v(e,t){return ze.True}function f5(e,t){return Ma(t)?Op(e,t):Lo(t)&&t.anyOf.some(n=>Ri(n)||Ui(n))?ze.True:Lo(t)?ze.Union:Ui(t)||Ri(t)?ze.True:ze.Union}function h5(e,t){return Ui(e)?ze.False:Ri(e)?ze.Union:js(e)?ze.True:ze.False}function d5(e,t){return lr(t)&&Bp(t)?ze.True:Fr(t)?Or(e,t):Ta(t)?mi(zt(e.items,t.items)):ze.False}function p5(e,t){return Fr(t)?Or(e,t):_v(t)?mi(zt(e.items,t.items)):ze.False}function y5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Ap(t)?ze.True:ze.False}function Z3(e,t){return F3(e)||Ra(e)?ze.True:ze.False}function g5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Ra(t)?ze.True:ze.False}function m5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):vp(t)?e.parameters.length>t.parameters.length?ze.False:e.parameters.every((n,o)=>mi(zt(t.parameters[o],n))===ze.True)?mi(zt(e.returns,t.returns)):ze.False:ze.False}function b5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):wp(t)?ze.True:ze.False}function A5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):xp(t)?e.parameters.length>t.parameters.length?ze.False:e.parameters.every((n,o)=>mi(zt(t.parameters[o],n))===ze.True)?mi(zt(e.returns,t.returns)):ze.False:ze.False}function J3(e,t){return Us(e)&&Zi(e.const)||Bn(e)||Ho(e)?ze.True:ze.False}function v5(e,t){return Ho(t)||Bn(t)?ze.True:Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):ze.False}function Op(e,t){return t.allOf.every(n=>zt(e,n)===ze.True)?ze.True:ze.False}function w5(e,t){return e.allOf.some(n=>zt(n,t)===ze.True)?ze.True:ze.False}function x5(e,t){return Fr(t)?Or(e,t):Cv(t)?mi(zt(e.items,t.items)):ze.False}function E5(e,t){return Us(t)&&t.const===e.const?ze.True:Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Mi(t)?nB(e):Bn(t)?tB(e):Ho(t)?J3(e):Ra(t)?Z3(e):ze.False}function eB(e,t){return ze.False}function S5(e,t){return ze.True}function AI(e){let[t,n]=[e,0];for(;Lu(t);)t=t.not,n+=1;return n%2===0?t:Fp()}function I5(e,t){return Lu(e)?zt(AI(e),t):Lu(t)?zt(e,AI(t)):rl("Invalid fallthrough for Not")}function _5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Fv(t)?ze.True:ze.False}function tB(e,t){return C3(e)||Bn(e)||Ho(e)?ze.True:ze.False}function C5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Ho(t)||Bn(t)?ze.True:ze.False}function Dn(e,t){return Object.getOwnPropertyNames(e.properties).length===t}function vI(e){return Bp(e)}function wI(e){return Dn(e,0)||Dn(e,1)&&"description"in e.properties&&Lo(e.properties.description)&&e.properties.description.anyOf.length===2&&(Mi(e.properties.description.anyOf[0])&&xa(e.properties.description.anyOf[1])||Mi(e.properties.description.anyOf[1])&&xa(e.properties.description.anyOf[0]))}function wm(e){return Dn(e,0)}function xI(e){return Dn(e,0)}function F5(e){return Dn(e,0)}function O5(e){return Dn(e,0)}function B5(e){return Bp(e)}function T5(e){const t=Ua();return Dn(e,0)||Dn(e,1)&&"length"in e.properties&&mi(zt(e.properties.length,t))===ze.True}function R5(e){return Dn(e,0)}function Bp(e){const t=Ua();return Dn(e,0)||Dn(e,1)&&"length"in e.properties&&mi(zt(e.properties.length,t))===ze.True}function M5(e){const t=yf([Yc()],Yc());return Dn(e,0)||Dn(e,1)&&"then"in e.properties&&mi(zt(e.properties.then,t))===ze.True}function rB(e,t){return zt(e,t)===ze.False||$d(e)&&!$d(t)?ze.False:ze.True}function yn(e,t){return Ui(e)?ze.False:Ri(e)?ze.Union:js(e)||_3(e)&&vI(t)||C3(e)&&wm(t)||F3(e)&&xI(t)||Gc(e)&&wI(t)||Ap(e)&&F5(t)||Mi(e)&&vI(t)||Gc(e)&&wI(t)||Bn(e)&&wm(t)||Ho(e)&&wm(t)||Ra(e)&&xI(t)||pf(e)&&B5(t)||wp(e)&&O5(t)||vp(e)&&R5(t)||xp(e)&&T5(t)?ze.True:rn(e)&&Mi(Ub(e))?t[hp]==="Record"?ze.True:ze.False:rn(e)&&Bn(Ub(e))?Dn(t,0)?ze.True:ze.False:ze.False}function U5(e,t){return Fr(t)?Or(e,t):rn(t)?vi(e,t):lr(t)?(()=>{for(const n of Object.getOwnPropertyNames(t.properties)){if(!(n in e.properties)&&!$d(t.properties[n]))return ze.False;if($d(t.properties[n]))return ze.True;if(rB(e.properties[n],t.properties[n])===ze.False)return ze.False}return ze.True})():ze.False}function j5(e,t){return Fr(t)?Or(e,t):lr(t)&&M5(t)?ze.True:Ov(t)?mi(zt(e.item,t.item)):ze.False}function Ub(e){return zu in e.patternProperties?Ua():$u in e.patternProperties?Ea():rl("Unknown record key pattern")}function jb(e){return zu in e.patternProperties?e.patternProperties[zu]:$u in e.patternProperties?e.patternProperties[$u]:rl("Unable to get record value schema")}function vi(e,t){const[n,o]=[Ub(t),jb(t)];return _3(e)&&Bn(n)&&mi(zt(e,o))===ze.True?ze.True:pf(e)&&Bn(n)||Mi(e)&&Bn(n)||Ta(e)&&Bn(n)?zt(e,o):lr(e)?(()=>{for(const s of Object.getOwnPropertyNames(e.properties))if(rB(o,e.properties[s])===ze.False)return ze.False;return ze.True})():ze.False}function D5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?zt(jb(e),jb(t)):ze.False}function N5(e,t){const n=Qc(e)?Ea():e,o=Qc(t)?Ea():t;return zt(n,o)}function nB(e,t){return Us(e)&&mr(e.const)||Mi(e)?ze.True:ze.False}function P5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Mi(t)?ze.True:ze.False}function k5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Gc(t)?ze.True:ze.False}function L5(e,t){return Kc(e)?zt(qd(e),t):Kc(t)?zt(e,qd(t)):rl("Invalid fallthrough for TemplateLiteral")}function z5(e,t){return Ta(t)&&e.items!==void 0&&e.items.every(n=>zt(n,t.items)===ze.True)}function $5(e,t){return js(e)?ze.True:Ui(e)?ze.False:Ri(e)?ze.Union:ze.False}function q5(e,t){return Fr(t)?Or(e,t):lr(t)&&Bp(t)||Ta(t)&&z5(e,t)?ze.True:Ep(t)?Ir(e.items)&&!Ir(t.items)||!Ir(e.items)&&Ir(t.items)?ze.False:Ir(e.items)&&!Ir(t.items)||e.items.every((n,o)=>zt(n,t.items[o])===ze.True)?ze.True:ze.False:ze.False}function H5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):pf(t)?ze.True:ze.False}function Q5(e,t){return Fr(t)?Or(e,t):lr(t)?yn(e,t):rn(t)?vi(e,t):Sp(t)?Y5(e):xa(t)?ze.True:ze.False}function qv(e,t){return t.anyOf.some(n=>zt(e,n)===ze.True)?ze.True:ze.False}function G5(e,t){return e.anyOf.every(n=>zt(n,t)===ze.True)?ze.True:ze.False}function iB(e,t){return ze.True}function K5(e,t){return js(t)?eB():Ma(t)?Op(e,t):Lo(t)?qv(e,t):Ri(t)?$v():Mi(t)?nB(e):Bn(t)?tB(e):Ho(t)?J3(e):Ra(t)?Z3(e):Ta(t)?h5(e):Ep(t)?$5(e):lr(t)?yn(e,t):Ui(t)?ze.True:ze.False}function Y5(e,t){return xa(e)||xa(e)?ze.True:ze.False}function V5(e,t){return Ma(t)?Op(e,t):Lo(t)?qv(e,t):Ui(t)?iB():Ri(t)?$v():lr(t)?yn(e,t):Sp(t)?ze.True:ze.False}function zt(e,t){return Kc(e)||Kc(t)?L5(e,t):Qc(e)||Qc(t)?N5(e,t):Lu(e)||Lu(t)?I5(e,t):Ri(e)?f5(e,t):Ta(e)?d5(e,t):Ap(e)?y5(e,t):Ra(e)?g5(e,t):_v(e)?p5(e,t):vp(e)?m5(e,t):wp(e)?b5(e,t):xp(e)?A5(e,t):Ho(e)?v5(e,t):Ma(e)?w5(e,t):Cv(e)?x5(e,t):Us(e)?E5(e,t):js(e)?S5():Fv(e)?_5(e,t):Bn(e)?C5(e,t):lr(e)?U5(e,t):rn(e)?D5(e,t):Mi(e)?P5(e,t):Gc(e)?k5(e,t):Ep(e)?q5(e,t):Ov(e)?j5(e,t):pf(e)?H5(e,t):xa(e)?Q5(e,t):Lo(e)?G5(e,t):Ui(e)?K5(e,t):Sp(e)?V5(e,t):rl(`Unknown left type operand '${e[at]}'`)}function mf(e,t){return zt(e,t)}function W5(e,t,n,o,s){const u={};for(const l of globalThis.Object.getOwnPropertyNames(e))u[l]=Hv(e[l],t,n,o,Xn(s));return u}function X5(e,t,n,o,s){return W5(e.properties,t,n,o,s)}function Z5(e,t,n,o,s){const u=X5(e,t,n,o,s);return on(u)}function J5(e,t,n,o){const s=mf(e,t);return s===ze.Union?sn([n,o]):s===ze.True?n:o}function Hv(e,t,n,o,s){return ni(e)?Z5(e,t,n,o,s):Fa(e)?nt(nk(e,t,n,o,s)):nt(J5(e,t,n,o),s)}function ek(e,t,n,o,s){return{[e]:Hv(_r(e),t,n,o,Xn(s))}}function tk(e,t,n,o,s){return e.reduce((u,l)=>({...u,...ek(l,t,n,o,s)}),{})}function rk(e,t,n,o,s){return tk(e.keys,t,n,o,s)}function nk(e,t,n,o,s){const u=rk(e,t,n,o,s);return on(u)}function ik(e){return e.allOf.every(t=>bf(t))}function ok(e){return e.anyOf.some(t=>bf(t))}function sk(e){return!bf(e.not)}function bf(e){return e[at]==="Intersect"?ik(e):e[at]==="Union"?ok(e):e[at]==="Not"?sk(e):e[at]==="Undefined"}function ak(e,t){return Qv(qd(e),t)}function uk(e,t){const n=e.filter(o=>mf(o,t)===ze.False);return n.length===1?n[0]:sn(n)}function Qv(e,t,n={}){return Oa(e)?nt(ak(e,t),n):ni(e)?nt(fk(e,t),n):nt(Qr(e)?uk(e.anyOf,t):mf(e,t)!==ze.False?pr():e,n)}function lk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Qv(e[o],t);return n}function ck(e,t){return lk(e.properties,t)}function fk(e,t){const n=ck(e,t);return on(n)}function hk(e,t){return Gv(qd(e),t)}function dk(e,t){const n=e.filter(o=>mf(o,t)!==ze.False);return n.length===1?n[0]:sn(n)}function Gv(e,t,n){return Oa(e)?nt(hk(e,t),n):ni(e)?nt(gk(e,t),n):nt(Qr(e)?dk(e.anyOf,t):mf(e,t)!==ze.False?e:pr(),n)}function pk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Gv(e[o],t);return n}function yk(e,t){return pk(e.properties,t)}function gk(e,t){const n=yk(e,t);return on(n)}function mk(e,t){return Vu(e)?nt(e.returns,t):pr(t)}function oB(e){return Ns(Ps(e))}function ja(e,t,n){return nt({[at]:"Record",type:"object",patternProperties:{[e]:t}},n)}function Kv(e,t,n){const o={};for(const s of e)o[s]=t;return Hr(o,{...n,[hp]:"Record"})}function bk(e,t,n){return PN(e)?Kv(Ds(e),t,n):ja(e.pattern,t,n)}function Ak(e,t,n){return Kv(Ds(sn(e)),t,n)}function vk(e,t,n){return Kv([e.toString()],t,n)}function wk(e,t,n){return ja(e.source,t,n)}function xk(e,t,n){const o=Ir(e.pattern)?$u:e.pattern;return ja(o,t,n)}function Ek(e,t,n){return ja($u,t,n)}function Sk(e,t,n){return ja(yN,t,n)}function Ik(e,t,n){return Hr({true:t,false:t},n)}function _k(e,t,n){return ja(zu,t,n)}function Ck(e,t,n){return ja(zu,t,n)}function sB(e,t,n={}){return Qr(e)?Ak(e.anyOf,t,n):Oa(e)?bk(e,t,n):Ca(e)?vk(e.const,t,n):ff(e)?Ik(e,t,n):Xu(e)?_k(e,t,n):Zu(e)?Ck(e,t,n):w3(e)?wk(e,t,n):df(e)?xk(e,t,n):b3(e)?Ek(e,t,n):hf(e)?Sk(e,t,n):pr(n)}function Yv(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function Fk(e){const t=Yv(e);return t===$u?Ea():t===zu?Ua():Ea({pattern:t})}function aB(e){return e.patternProperties[Yv(e)]}function Ok(e,t){return t.parameters=Af(e,t.parameters),t.returns=ji(e,t.returns),t}function Bk(e,t){return t.parameters=Af(e,t.parameters),t.returns=ji(e,t.returns),t}function Tk(e,t){return t.allOf=Af(e,t.allOf),t}function Rk(e,t){return t.anyOf=Af(e,t.anyOf),t}function Mk(e,t){return Ir(t.items)||(t.items=Af(e,t.items)),t}function Uk(e,t){return t.items=ji(e,t.items),t}function jk(e,t){return t.items=ji(e,t.items),t}function Dk(e,t){return t.items=ji(e,t.items),t}function Nk(e,t){return t.item=ji(e,t.item),t}function Pk(e,t){const n=$k(e,t.properties);return{...t,...Hr(n)}}function kk(e,t){const n=ji(e,Fk(t)),o=ji(e,aB(t)),s=sB(n,o);return{...t,...s}}function Lk(e,t){return t.index in e?e[t.index]:Fp()}function zk(e,t){const n=wv(t),o=Ms(t),s=ji(e,t);return n&&o?oB(s):n&&!o?Ns(s):!n&&o?Ps(s):s}function $k(e,t){return globalThis.Object.getOwnPropertyNames(t).reduce((n,o)=>({...n,[o]:zk(e,t[o])}),{})}function Af(e,t){return t.map(n=>ji(e,n))}function ji(e,t){return Vu(t)?Ok(e,t):Wu(t)?Bk(e,t):Ai(t)?Tk(e,t):Qr(t)?Rk(e,t):Ba(t)?Mk(e,t):Ku(t)?Uk(e,t):dp(t)?jk(e,t):yp(t)?Dk(e,t):gp(t)?Nk(e,t):Ni(t)?Pk(e,t):mp(t)?kk(e,t):A3(t)?Lk(e,t):t}function qk(e,t){return ji(t,bv(e))}function Hk(e){return nt({[at]:"Integer",type:"integer"},e)}function Qk(e,t,n){return{[e]:nl(_r(e),t,Xn(n))}}function Gk(e,t,n){return e.reduce((s,u)=>({...s,...Qk(u,t,n)}),{})}function Kk(e,t,n){return Gk(e.keys,t,n)}function Yk(e,t,n){const o=Kk(e,t,n);return on(o)}function Vk(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),n].join("")}function Wk(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),n].join("")}function Xk(e){return e.toUpperCase()}function Zk(e){return e.toLowerCase()}function Jk(e,t,n){const o=Dv(e.pattern);if(!Wc(o))return{...e,pattern:uB(e.pattern,t)};const l=[...Ip(o)].map(f=>_r(f)),c=lB(l,t),h=sn(c);return k3([h],n)}function uB(e,t){return typeof e=="string"?t==="Uncapitalize"?Vk(e):t==="Capitalize"?Wk(e):t==="Uppercase"?Xk(e):t==="Lowercase"?Zk(e):e:e.toString()}function lB(e,t){return e.map(n=>nl(n,t))}function nl(e,t,n={}){return Fa(e)?Yk(e,t,n):Oa(e)?Jk(e,t,n):Qr(e)?sn(lB(e.anyOf,t),n):Ca(e)?_r(uB(e.const,t),n):nt(e,n)}function eL(e,t={}){return nl(e,"Capitalize",t)}function tL(e,t={}){return nl(e,"Lowercase",t)}function rL(e,t={}){return nl(e,"Uncapitalize",t)}function nL(e,t={}){return nl(e,"Uppercase",t)}function iL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Tp(e[s],t,Xn(n));return o}function oL(e,t,n){return iL(e.properties,t,n)}function sL(e,t,n){const o=oL(e,t,n);return on(o)}function aL(e,t){return e.map(n=>Vv(n,t))}function uL(e,t){return e.map(n=>Vv(n,t))}function lL(e,t){const{[t]:n,...o}=e;return o}function cL(e,t){return t.reduce((n,o)=>lL(n,o),e)}function fL(e,t){const n=Zn(e,[Vn,"$id","required","properties"]),o=cL(e.properties,t);return Hr(o,n)}function hL(e){const t=e.reduce((n,o)=>v3(o)?[...n,_r(o)]:n,[]);return sn(t)}function Vv(e,t){return Ai(e)?ks(aL(e.allOf,t)):Qr(e)?sn(uL(e.anyOf,t)):Ni(e)?fL(e,t):Hr({})}function Tp(e,t,n){const o=Pn(t)?hL(t):t,s=Wn(t)?Ds(t):t,u=jn(e),l=jn(t);return ni(e)?sL(e,s,n):Fa(t)?gL(e,t,n):u&&l?Dr("Omit",[e,o],n):!u&&l?Dr("Omit",[e,o],n):u&&!l?Dr("Omit",[e,o],n):nt({...Vv(e,s),...n})}function dL(e,t,n){return{[t]:Tp(e,[t],Xn(n))}}function pL(e,t,n){return t.reduce((o,s)=>({...o,...dL(e,s,n)}),{})}function yL(e,t,n){return pL(e,t.keys,n)}function gL(e,t,n){const o=yL(e,t,n);return on(o)}function mL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Rp(e[s],t,Xn(n));return o}function bL(e,t,n){return mL(e.properties,t,n)}function AL(e,t,n){const o=bL(e,t,n);return on(o)}function vL(e,t){return e.map(n=>Wv(n,t))}function wL(e,t){return e.map(n=>Wv(n,t))}function xL(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function EL(e,t){const n=Zn(e,[Vn,"$id","required","properties"]),o=xL(e.properties,t);return Hr(o,n)}function SL(e){const t=e.reduce((n,o)=>v3(o)?[...n,_r(o)]:n,[]);return sn(t)}function Wv(e,t){return Ai(e)?ks(vL(e.allOf,t)):Qr(e)?sn(wL(e.anyOf,t)):Ni(e)?EL(e,t):Hr({})}function Rp(e,t,n){const o=Pn(t)?SL(t):t,s=Wn(t)?Ds(t):t,u=jn(e),l=jn(t);return ni(e)?AL(e,s,n):Fa(t)?FL(e,t,n):u&&l?Dr("Pick",[e,o],n):!u&&l?Dr("Pick",[e,o],n):u&&!l?Dr("Pick",[e,o],n):nt({...Wv(e,s),...n})}function IL(e,t,n){return{[t]:Rp(e,[t],Xn(n))}}function _L(e,t,n){return t.reduce((o,s)=>({...o,...IL(e,s,n)}),{})}function CL(e,t,n){return _L(e,t.keys,n)}function FL(e,t,n){const o=CL(e,t,n);return on(o)}function OL(e,t){return Dr("Partial",[Dr(e,t)])}function BL(e){return Dr("Partial",[gf(e)])}function TL(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ps(e[n]);return t}function RL(e){const t=Zn(e,[Vn,"$id","required","properties"]),n=TL(e.properties);return Hr(n,t)}function EI(e){return e.map(t=>cB(t))}function cB(e){return Yu(e)?OL(e.target,e.parameters):jn(e)?BL(e.$ref):Ai(e)?ks(EI(e.allOf)):Qr(e)?sn(EI(e.anyOf)):Ni(e)?RL(e):pp(e)||ff(e)||Xu(e)||Ca(e)||xv(e)||Zu(e)||df(e)||Ev(e)||bp(e)?e:Hr({})}function Xv(e,t){return ni(e)?jL(e,t):nt({...cB(e),...t})}function ML(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Xv(e[o],Xn(t));return n}function UL(e,t){return ML(e.properties,t)}function jL(e,t){const n=UL(e,t);return on(n)}function DL(e,t){return Dr("Required",[Dr(e,t)])}function NL(e){return Dr("Required",[gf(e)])}function PL(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Zn(e[n],[qo]);return t}function kL(e){const t=Zn(e,[Vn,"$id","required","properties"]),n=PL(e.properties);return Hr(n,t)}function SI(e){return e.map(t=>fB(t))}function fB(e){return Yu(e)?DL(e.target,e.parameters):jn(e)?NL(e.$ref):Ai(e)?ks(SI(e.allOf)):Qr(e)?sn(SI(e.anyOf)):Ni(e)?kL(e):pp(e)||ff(e)||Xu(e)||Ca(e)||xv(e)||Zu(e)||df(e)||Ev(e)||bp(e)?e:Hr({})}function Zv(e,t){return ni(e)?$L(e,t):nt({...fB(e),...t})}function LL(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Zv(e[o],t);return n}function zL(e,t){return LL(e.properties,t)}function $L(e,t){const n=zL(e,t);return on(n)}function qL(e,t){return t.map(n=>jn(n)?Jv(e,n.$ref):Jn(e,n))}function Jv(e,t){return t in e?jn(e[t])?Jv(e,e[t].$ref):Jn(e,e[t]):pr()}function HL(e){return Cp(e[0])}function QL(e){return _p(e[0],e[1])}function GL(e){return Lv(e[0])}function KL(e){return Xv(e[0])}function YL(e){return Tp(e[0],e[1])}function VL(e){return Rp(e[0],e[1])}function WL(e){return Zv(e[0])}function XL(e,t,n){const o=qL(e,n);return t==="Awaited"?HL(o):t==="Index"?QL(o):t==="KeyOf"?GL(o):t==="Partial"?KL(o):t==="Omit"?YL(o):t==="Pick"?VL(o):t==="Required"?WL(o):pr()}function ZL(e,t){return Rv(Jn(e,t))}function JL(e,t){return Mv(Jn(e,t))}function e7(e,t,n){return Uv(vf(e,t),Jn(e,n))}function t7(e,t,n){return yf(vf(e,t),Jn(e,n))}function r7(e,t){return ks(vf(e,t))}function n7(e,t){return kv(Jn(e,t))}function i7(e,t){return Hr(globalThis.Object.keys(t).reduce((n,o)=>({...n,[o]:Jn(e,t[o])}),{}))}function o7(e,t){const[n,o]=[Jn(e,aB(t)),Yv(t)],s=bv(t);return s.patternProperties[o]=n,s}function s7(e,t){return jn(t)?{...Jv(e,t.$ref),[Vn]:t[Vn]}:t}function a7(e,t){return el(vf(e,t))}function u7(e,t){return sn(vf(e,t))}function vf(e,t){return t.map(n=>Jn(e,n))}function Jn(e,t){return Ms(t)?nt(Jn(e,Zn(t,[qo])),t):wv(t)?nt(Jn(e,Zn(t,[cf])),t):sr(t)?nt(s7(e,t),t):Ku(t)?nt(ZL(e,t.items),t):dp(t)?nt(JL(e,t.items),t):Yu(t)?nt(XL(e,t.target,t.parameters)):Vu(t)?nt(e7(e,t.parameters,t.returns),t):Wu(t)?nt(t7(e,t.parameters,t.returns),t):Ai(t)?nt(r7(e,t.allOf),t):yp(t)?nt(n7(e,t.items),t):Ni(t)?nt(i7(e,t.properties),t):mp(t)?nt(o7(e,t)):Ba(t)?nt(a7(e,t.items||[]),t):Qr(t)?nt(u7(e,t.anyOf),t):t}function l7(e,t){return t in e?Jn(e,e[t]):pr()}function c7(e){return globalThis.Object.getOwnPropertyNames(e).reduce((t,n)=>({...t,[n]:l7(e,n)}),{})}class f7{constructor(t){const n=c7(t),o=this.WithIdentifiers(n);this.$defs=o}Import(t,n){const o={...this.$defs,[t]:nt(this.$defs[t],n)};return nt({[at]:"Import",$defs:o,$ref:t})}WithIdentifiers(t){return globalThis.Object.getOwnPropertyNames(t).reduce((n,o)=>({...n,[o]:{...t[o],$id:o}}),{})}}function h7(e){return new f7(e)}function d7(e,t){return nt({[at]:"Not",not:e},t)}function p7(e,t){return Wu(e)?el(e.parameters,t):pr()}let y7=0;function g7(e,t={}){Ir(t.$id)&&(t.$id=`T${y7++}`);const n=bv(e({[at]:"This",$ref:`${t.$id}`}));return n.$id=t.$id,nt({[hp]:"Recursive",...n},t)}function m7(e,t){const n=mr(e)?new globalThis.RegExp(e):e;return nt({[at]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},t)}function b7(e){return Ai(e)?e.allOf:Qr(e)?e.anyOf:Ba(e)?e.items??[]:[]}function A7(e){return b7(e)}function v7(e,t){return Wu(e)?nt(e.returns,t):pr(t)}class w7{constructor(t){this.schema=t}Decode(t){return new x7(this.schema,t)}}class x7{constructor(t,n){this.schema=t,this.decode=n}EncodeTransform(t,n){const u={Encode:l=>n[Vn].Encode(t(l)),Decode:l=>this.decode(n[Vn].Decode(l))};return{...n,[Vn]:u}}EncodeSchema(t,n){const o={Decode:this.decode,Encode:t};return{...n,[Vn]:o}}Encode(t){return sr(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}}function E7(e){return new w7(e)}function S7(e={}){return nt({[at]:e[at]??"Unsafe"},e)}function I7(e){return nt({[at]:"Void",type:"void"},e)}const _7=Object.freeze(Object.defineProperty({__proto__:null,Any:Yc,Argument:xN,Array:Rv,AsyncIterator:Mv,Awaited:Cp,BigInt:Nv,Boolean:N3,Capitalize:eL,Composite:i5,Const:a5,Constructor:Uv,ConstructorParameters:u5,Date:K3,Enum:l5,Exclude:Qv,Extends:Hv,Extract:Gv,Function:yf,Index:_p,InstanceType:mk,Instantiate:qk,Integer:Hk,Intersect:ks,Iterator:kv,KeyOf:Lv,Literal:_r,Lowercase:tL,Mapped:IP,Module:h7,Never:pr,Not:d7,Null:Y3,Number:Ua,Object:Hr,Omit:Tp,Optional:Ps,Parameters:p7,Partial:Xv,Pick:Rp,Promise:$3,Readonly:Ns,ReadonlyOptional:oB,Record:sB,Recursive:g7,Ref:gf,RegExp:m7,Required:Zv,Rest:A7,ReturnType:v7,String:Ea,Symbol:V3,TemplateLiteral:k3,Transform:E7,Tuple:el,Uint8Array:X3,Uncapitalize:rL,Undefined:W3,Union:sn,Unknown:Fp,Unsafe:S7,Uppercase:nL,Void:I7},Symbol.toStringTag,{value:"Module"})),je=_7;function C7(e){switch(e.errorType){case De.ArrayContains:return"Expected array to contain at least one matching value";case De.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case De.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case De.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case De.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case De.ArrayUniqueItems:return"Expected array elements to be unique";case De.Array:return"Expected array";case De.AsyncIterator:return"Expected AsyncIterator";case De.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case De.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case De.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case De.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case De.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case De.BigInt:return"Expected bigint";case De.Boolean:return"Expected boolean";case De.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case De.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case De.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case De.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case De.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case De.Date:return"Expected Date";case De.Function:return"Expected function";case De.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case De.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case De.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case De.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case De.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case De.Integer:return"Expected integer";case De.IntersectUnevaluatedProperties:return"Unexpected property";case De.Intersect:return"Expected all values to match";case De.Iterator:return"Expected Iterator";case De.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case De.Never:return"Never";case De.Not:return"Value should not match";case De.Null:return"Expected null";case De.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case De.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case De.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case De.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case De.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case De.Number:return"Expected number";case De.Object:return"Expected object";case De.ObjectAdditionalProperties:return"Unexpected property";case De.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case De.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case De.ObjectRequiredProperty:return"Expected required property";case De.Promise:return"Expected Promise";case De.RegExp:return"Expected string to match regular expression";case De.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case De.StringFormat:return`Expected string to match '${e.schema.format}' format`;case De.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case De.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case De.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case De.String:return"Expected string";case De.Symbol:return"Expected symbol";case De.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case De.Tuple:return"Expected tuple";case De.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case De.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case De.Uint8Array:return"Expected Uint8Array";case De.Undefined:return"Expected undefined";case De.Union:return"Expected union value";case De.Void:return"Expected void";case De.Kind:return`Expected kind '${e.schema[at]}'`;default:return"Unknown error type"}}let F7=C7;function O7(){return F7}class B7 extends ri{constructor(t){super(`Unable to dereference schema with $id '${t.$ref}'`),this.schema=t}}function T7(e,t){const n=t.find(o=>o.$id===e.$ref);if(n===void 0)throw new B7(e);return Qo(n,t)}function ew(e,t){return!Yi(e.$id)||t.some(n=>n.$id===e.$id)||t.push(e),t}function Qo(e,t){return e[at]==="This"||e[at]==="Ref"?T7(e,t):e}class R7 extends ri{constructor(t){super("Unable to hash value"),this.value=t}}var ei;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(ei||(ei={}));let Iu=BigInt("14695981039346656037");const[M7,U7]=[BigInt("1099511628211"),BigInt("18446744073709551616")],j7=Array.from({length:256}).map((e,t)=>BigInt(t)),hB=new Float64Array(1),dB=new DataView(hB.buffer),pB=new Uint8Array(hB.buffer);function*D7(e){const t=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let n=0;n<t;n++)yield e>>8*(t-1-n)&255}function N7(e){pn(ei.Array);for(const t of e)Hu(t)}function P7(e){pn(ei.Boolean),pn(e?1:0)}function k7(e){pn(ei.BigInt),dB.setBigInt64(0,e);for(const t of pB)pn(t)}function L7(e){pn(ei.Date),Hu(e.getTime())}function z7(e){pn(ei.Null)}function $7(e){pn(ei.Number),dB.setFloat64(0,e);for(const t of pB)pn(t)}function q7(e){pn(ei.Object);for(const t of globalThis.Object.getOwnPropertyNames(e).sort())Hu(t),Hu(e[t])}function H7(e){pn(ei.String);for(let t=0;t<e.length;t++)for(const n of D7(e.charCodeAt(t)))pn(n)}function Q7(e){pn(ei.Symbol),Hu(e.description)}function G7(e){pn(ei.Uint8Array);for(let t=0;t<e.length;t++)pn(e[t])}function K7(e){return pn(ei.Undefined)}function Hu(e){if(ko(e))return N7(e);if(lp(e))return P7(e);if(cp(e))return k7(e);if(Av(e))return L7(e);if(up(e))return z7();if(Uo(e))return $7(e);if(Ia(e))return q7(e);if(Yi(e))return H7(e);if(fp(e))return Q7(e);if(vv(e))return G7(e);if(_a(e))return K7();throw new R7(e)}function pn(e){Iu=Iu^j7[e],Iu=Iu*M7%U7}function yB(e){return Iu=BigInt("14695981039346656037"),Hu(e),Iu}class Y7 extends ri{constructor(t){super("Unknown type"),this.schema=t}}function V7(e){return e[at]==="Any"||e[at]==="Unknown"}function Ct(e){return e!==void 0}function W7(e,t,n){return!0}function X7(e,t,n){return!0}function Z7(e,t,n){if(!ko(n)||Ct(e.minItems)&&!(n.length>=e.minItems)||Ct(e.maxItems)&&!(n.length<=e.maxItems)||!n.every(u=>zr(e.items,t,u))||e.uniqueItems===!0&&!(function(){const u=new Set;for(const l of n){const c=yB(l);if(u.has(c))return!1;u.add(c)}return!0})())return!1;if(!(Ct(e.contains)||Uo(e.minContains)||Uo(e.maxContains)))return!0;const o=Ct(e.contains)?e.contains:pr(),s=n.reduce((u,l)=>zr(o,t,l)?u+1:u,0);return!(s===0||Uo(e.minContains)&&s<e.minContains||Uo(e.maxContains)&&s>e.maxContains)}function J7(e,t,n){return d3(n)}function ez(e,t,n){return!(!cp(n)||Ct(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||Ct(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||Ct(e.maximum)&&!(n<=e.maximum)||Ct(e.minimum)&&!(n>=e.minimum)||Ct(e.multipleOf)&&n%e.multipleOf!==BigInt(0))}function tz(e,t,n){return lp(n)}function rz(e,t,n){return zr(e.returns,t,n.prototype)}function nz(e,t,n){return!(!Av(n)||Ct(e.exclusiveMaximumTimestamp)&&!(n.getTime()<e.exclusiveMaximumTimestamp)||Ct(e.exclusiveMinimumTimestamp)&&!(n.getTime()>e.exclusiveMinimumTimestamp)||Ct(e.maximumTimestamp)&&!(n.getTime()<=e.maximumTimestamp)||Ct(e.minimumTimestamp)&&!(n.getTime()>=e.minimumTimestamp)||Ct(e.multipleOfTimestamp)&&n.getTime()%e.multipleOfTimestamp!==0)}function iz(e,t,n){return m3(n)}function oz(e,t,n){const o=globalThis.Object.values(e.$defs),s=e.$defs[e.$ref];return zr(s,[...t,...o],n)}function sz(e,t,n){return!(!g3(n)||Ct(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||Ct(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||Ct(e.maximum)&&!(n<=e.maximum)||Ct(e.minimum)&&!(n>=e.minimum)||Ct(e.multipleOf)&&n%e.multipleOf!==0)}function az(e,t,n){const o=e.allOf.every(s=>zr(s,t,n));if(e.unevaluatedProperties===!1){const s=new RegExp(Hd(e)),u=Object.getOwnPropertyNames(n).every(l=>s.test(l));return o&&u}else if(Wn(e.unevaluatedProperties)){const s=new RegExp(Hd(e)),u=Object.getOwnPropertyNames(n).every(l=>s.test(l)||zr(e.unevaluatedProperties,t,n[l]));return o&&u}else return o}function uz(e,t,n){return p3(n)}function lz(e,t,n){return n===e.const}function cz(e,t,n){return!1}function fz(e,t,n){return!zr(e.not,t,n)}function hz(e,t,n){return up(n)}function dz(e,t,n){return!(!Un.IsNumberLike(n)||Ct(e.exclusiveMaximum)&&!(n<e.exclusiveMaximum)||Ct(e.exclusiveMinimum)&&!(n>e.exclusiveMinimum)||Ct(e.minimum)&&!(n>=e.minimum)||Ct(e.maximum)&&!(n<=e.maximum)||Ct(e.multipleOf)&&n%e.multipleOf!==0)}function pz(e,t,n){if(!Un.IsObjectLike(n)||Ct(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)||Ct(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties))return!1;const o=Object.getOwnPropertyNames(e.properties);for(const s of o){const u=e.properties[s];if(e.required&&e.required.includes(s)){if(!zr(u,t,n[s])||(bf(u)||V7(u))&&!(s in n))return!1}else if(Un.IsExactOptionalProperty(n,s)&&!zr(u,t,n[s]))return!1}if(e.additionalProperties===!1){const s=Object.getOwnPropertyNames(n);return e.required&&e.required.length===o.length&&s.length===o.length?!0:s.every(u=>o.includes(u))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(n).every(u=>o.includes(u)||zr(e.additionalProperties,t,n[u])):!0}function yz(e,t,n){return y3(n)}function gz(e,t,n){if(!Un.IsRecordLike(n)||Ct(e.minProperties)&&!(Object.getOwnPropertyNames(n).length>=e.minProperties)||Ct(e.maxProperties)&&!(Object.getOwnPropertyNames(n).length<=e.maxProperties))return!1;const[o,s]=Object.entries(e.patternProperties)[0],u=new RegExp(o),l=Object.entries(n).every(([f,p])=>u.test(f)?zr(s,t,p):!0),c=typeof e.additionalProperties=="object"?Object.entries(n).every(([f,p])=>u.test(f)?!0:zr(e.additionalProperties,t,p)):!0,h=e.additionalProperties===!1?Object.getOwnPropertyNames(n).every(f=>u.test(f)):!0;return l&&c&&h}function mz(e,t,n){return zr(Qo(e,t),t,n)}function bz(e,t,n){const o=new RegExp(e.source,e.flags);return Ct(e.minLength)&&!(n.length>=e.minLength)||Ct(e.maxLength)&&!(n.length<=e.maxLength)?!1:o.test(n)}function Az(e,t,n){return!Yi(n)||Ct(e.minLength)&&!(n.length>=e.minLength)||Ct(e.maxLength)&&!(n.length<=e.maxLength)||Ct(e.pattern)&&!new RegExp(e.pattern).test(n)?!1:Ct(e.format)?B3(e.format)?T3(e.format)(n):!1:!0}function vz(e,t,n){return fp(n)}function wz(e,t,n){return Yi(n)&&new RegExp(e.pattern).test(n)}function xz(e,t,n){return zr(Qo(e,t),t,n)}function Ez(e,t,n){if(!ko(n)||e.items===void 0&&n.length!==0||n.length!==e.maxItems)return!1;if(!e.items)return!0;for(let o=0;o<e.items.length;o++)if(!zr(e.items[o],t,n[o]))return!1;return!0}function Sz(e,t,n){return _a(n)}function Iz(e,t,n){return e.anyOf.some(o=>zr(o,t,n))}function _z(e,t,n){return!(!vv(n)||Ct(e.maxByteLength)&&!(n.length<=e.maxByteLength)||Ct(e.minByteLength)&&!(n.length>=e.minByteLength))}function Cz(e,t,n){return!0}function Fz(e,t,n){return Un.IsVoidLike(n)}function Oz(e,t,n){return Tv(e[at])?M3(e[at])(e,n):!1}function zr(e,t,n){const o=Ct(e.$id)?ew(e,t):t,s=e;switch(s[at]){case"Any":return W7();case"Argument":return X7();case"Array":return Z7(s,o,n);case"AsyncIterator":return J7(s,o,n);case"BigInt":return ez(s,o,n);case"Boolean":return tz(s,o,n);case"Constructor":return rz(s,o,n);case"Date":return nz(s,o,n);case"Function":return iz(s,o,n);case"Import":return oz(s,o,n);case"Integer":return sz(s,o,n);case"Intersect":return az(s,o,n);case"Iterator":return uz(s,o,n);case"Literal":return lz(s,o,n);case"Never":return cz();case"Not":return fz(s,o,n);case"Null":return hz(s,o,n);case"Number":return dz(s,o,n);case"Object":return pz(s,o,n);case"Promise":return yz(s,o,n);case"Record":return gz(s,o,n);case"Ref":return mz(s,o,n);case"RegExp":return bz(s,o,n);case"String":return Az(s,o,n);case"Symbol":return vz(s,o,n);case"TemplateLiteral":return wz(s,o,n);case"This":return xz(s,o,n);case"Tuple":return Ez(s,o,n);case"Undefined":return Sz(s,o,n);case"Union":return Iz(s,o,n);case"Uint8Array":return _z(s,o,n);case"Unknown":return Cz();case"Void":return Fz(s,o,n);default:if(!Tv(s[at]))throw new Y7(s);return Oz(s,o,n)}}function tw(...e){return e.length===3?zr(e[0],e[1],e[2]):zr(e[0],[],e[1])}var De;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(De||(De={}));class Bz extends ri{constructor(t){super("Unknown type"),this.schema=t}}function Oo(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function _t(e){return e!==void 0}class gB{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){const t=this.iterator.next();return t.done?void 0:t.value}}function it(e,t,n,o,s=[]){return{type:e,schema:t,path:n,value:o,message:O7()({errorType:e,path:n,schema:t,value:o,errors:s}),errors:s}}function*Tz(e,t,n,o){}function*Rz(e,t,n,o){}function*Mz(e,t,n,o){if(!ko(o))return yield it(De.Array,e,n,o);_t(e.minItems)&&!(o.length>=e.minItems)&&(yield it(De.ArrayMinItems,e,n,o)),_t(e.maxItems)&&!(o.length<=e.maxItems)&&(yield it(De.ArrayMaxItems,e,n,o));for(let l=0;l<o.length;l++)yield*$r(e.items,t,`${n}/${l}`,o[l]);if(e.uniqueItems===!0&&!(function(){const l=new Set;for(const c of o){const h=yB(c);if(l.has(h))return!1;l.add(h)}return!0})()&&(yield it(De.ArrayUniqueItems,e,n,o)),!(_t(e.contains)||_t(e.minContains)||_t(e.maxContains)))return;const s=_t(e.contains)?e.contains:pr(),u=o.reduce((l,c,h)=>$r(s,t,`${n}${h}`,c).next().done===!0?l+1:l,0);u===0&&(yield it(De.ArrayContains,e,n,o)),Uo(e.minContains)&&u<e.minContains&&(yield it(De.ArrayMinContains,e,n,o)),Uo(e.maxContains)&&u>e.maxContains&&(yield it(De.ArrayMaxContains,e,n,o))}function*Uz(e,t,n,o){d3(o)||(yield it(De.AsyncIterator,e,n,o))}function*jz(e,t,n,o){if(!cp(o))return yield it(De.BigInt,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield it(De.BigIntExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield it(De.BigIntExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield it(De.BigIntMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield it(De.BigIntMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==BigInt(0)&&(yield it(De.BigIntMultipleOf,e,n,o))}function*Dz(e,t,n,o){lp(o)||(yield it(De.Boolean,e,n,o))}function*Nz(e,t,n,o){yield*$r(e.returns,t,n,o.prototype)}function*Pz(e,t,n,o){if(!Av(o))return yield it(De.Date,e,n,o);_t(e.exclusiveMaximumTimestamp)&&!(o.getTime()<e.exclusiveMaximumTimestamp)&&(yield it(De.DateExclusiveMaximumTimestamp,e,n,o)),_t(e.exclusiveMinimumTimestamp)&&!(o.getTime()>e.exclusiveMinimumTimestamp)&&(yield it(De.DateExclusiveMinimumTimestamp,e,n,o)),_t(e.maximumTimestamp)&&!(o.getTime()<=e.maximumTimestamp)&&(yield it(De.DateMaximumTimestamp,e,n,o)),_t(e.minimumTimestamp)&&!(o.getTime()>=e.minimumTimestamp)&&(yield it(De.DateMinimumTimestamp,e,n,o)),_t(e.multipleOfTimestamp)&&o.getTime()%e.multipleOfTimestamp!==0&&(yield it(De.DateMultipleOfTimestamp,e,n,o))}function*kz(e,t,n,o){m3(o)||(yield it(De.Function,e,n,o))}function*Lz(e,t,n,o){const s=globalThis.Object.values(e.$defs),u=e.$defs[e.$ref];yield*$r(u,[...t,...s],n,o)}function*zz(e,t,n,o){if(!g3(o))return yield it(De.Integer,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield it(De.IntegerExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield it(De.IntegerExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield it(De.IntegerMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield it(De.IntegerMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==0&&(yield it(De.IntegerMultipleOf,e,n,o))}function*$z(e,t,n,o){let s=!1;for(const u of e.allOf)for(const l of $r(u,t,n,o))s=!0,yield l;if(s)return yield it(De.Intersect,e,n,o);if(e.unevaluatedProperties===!1){const u=new RegExp(Hd(e));for(const l of Object.getOwnPropertyNames(o))u.test(l)||(yield it(De.IntersectUnevaluatedProperties,e,`${n}/${l}`,o))}if(typeof e.unevaluatedProperties=="object"){const u=new RegExp(Hd(e));for(const l of Object.getOwnPropertyNames(o))if(!u.test(l)){const c=$r(e.unevaluatedProperties,t,`${n}/${l}`,o[l]).next();c.done||(yield c.value)}}}function*qz(e,t,n,o){p3(o)||(yield it(De.Iterator,e,n,o))}function*Hz(e,t,n,o){o!==e.const&&(yield it(De.Literal,e,n,o))}function*Qz(e,t,n,o){yield it(De.Never,e,n,o)}function*Gz(e,t,n,o){$r(e.not,t,n,o).next().done===!0&&(yield it(De.Not,e,n,o))}function*Kz(e,t,n,o){up(o)||(yield it(De.Null,e,n,o))}function*Yz(e,t,n,o){if(!Un.IsNumberLike(o))return yield it(De.Number,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield it(De.NumberExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield it(De.NumberExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield it(De.NumberMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield it(De.NumberMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==0&&(yield it(De.NumberMultipleOf,e,n,o))}function*Vz(e,t,n,o){if(!Un.IsObjectLike(o))return yield it(De.Object,e,n,o);_t(e.minProperties)&&!(Object.getOwnPropertyNames(o).length>=e.minProperties)&&(yield it(De.ObjectMinProperties,e,n,o)),_t(e.maxProperties)&&!(Object.getOwnPropertyNames(o).length<=e.maxProperties)&&(yield it(De.ObjectMaxProperties,e,n,o));const s=Array.isArray(e.required)?e.required:[],u=Object.getOwnPropertyNames(e.properties),l=Object.getOwnPropertyNames(o);for(const c of s)l.includes(c)||(yield it(De.ObjectRequiredProperty,e.properties[c],`${n}/${Oo(c)}`,void 0));if(e.additionalProperties===!1)for(const c of l)u.includes(c)||(yield it(De.ObjectAdditionalProperties,e,`${n}/${Oo(c)}`,o[c]));if(typeof e.additionalProperties=="object")for(const c of l)u.includes(c)||(yield*$r(e.additionalProperties,t,`${n}/${Oo(c)}`,o[c]));for(const c of u){const h=e.properties[c];e.required&&e.required.includes(c)?(yield*$r(h,t,`${n}/${Oo(c)}`,o[c]),bf(e)&&!(c in o)&&(yield it(De.ObjectRequiredProperty,h,`${n}/${Oo(c)}`,void 0))):Un.IsExactOptionalProperty(o,c)&&(yield*$r(h,t,`${n}/${Oo(c)}`,o[c]))}}function*Wz(e,t,n,o){y3(o)||(yield it(De.Promise,e,n,o))}function*Xz(e,t,n,o){if(!Un.IsRecordLike(o))return yield it(De.Object,e,n,o);_t(e.minProperties)&&!(Object.getOwnPropertyNames(o).length>=e.minProperties)&&(yield it(De.ObjectMinProperties,e,n,o)),_t(e.maxProperties)&&!(Object.getOwnPropertyNames(o).length<=e.maxProperties)&&(yield it(De.ObjectMaxProperties,e,n,o));const[s,u]=Object.entries(e.patternProperties)[0],l=new RegExp(s);for(const[c,h]of Object.entries(o))l.test(c)&&(yield*$r(u,t,`${n}/${Oo(c)}`,h));if(typeof e.additionalProperties=="object")for(const[c,h]of Object.entries(o))l.test(c)||(yield*$r(e.additionalProperties,t,`${n}/${Oo(c)}`,h));if(e.additionalProperties===!1){for(const[c,h]of Object.entries(o))if(!l.test(c))return yield it(De.ObjectAdditionalProperties,e,`${n}/${Oo(c)}`,h)}}function*Zz(e,t,n,o){yield*$r(Qo(e,t),t,n,o)}function*Jz(e,t,n,o){if(!Yi(o))return yield it(De.String,e,n,o);if(_t(e.minLength)&&!(o.length>=e.minLength)&&(yield it(De.StringMinLength,e,n,o)),_t(e.maxLength)&&!(o.length<=e.maxLength)&&(yield it(De.StringMaxLength,e,n,o)),!new RegExp(e.source,e.flags).test(o))return yield it(De.RegExp,e,n,o)}function*e9(e,t,n,o){if(!Yi(o))return yield it(De.String,e,n,o);_t(e.minLength)&&!(o.length>=e.minLength)&&(yield it(De.StringMinLength,e,n,o)),_t(e.maxLength)&&!(o.length<=e.maxLength)&&(yield it(De.StringMaxLength,e,n,o)),Yi(e.pattern)&&(new RegExp(e.pattern).test(o)||(yield it(De.StringPattern,e,n,o))),Yi(e.format)&&(B3(e.format)?T3(e.format)(o)||(yield it(De.StringFormat,e,n,o)):yield it(De.StringFormatUnknown,e,n,o))}function*t9(e,t,n,o){fp(o)||(yield it(De.Symbol,e,n,o))}function*r9(e,t,n,o){if(!Yi(o))return yield it(De.String,e,n,o);new RegExp(e.pattern).test(o)||(yield it(De.StringPattern,e,n,o))}function*n9(e,t,n,o){yield*$r(Qo(e,t),t,n,o)}function*i9(e,t,n,o){if(!ko(o))return yield it(De.Tuple,e,n,o);if(e.items===void 0&&o.length!==0)return yield it(De.TupleLength,e,n,o);if(o.length!==e.maxItems)return yield it(De.TupleLength,e,n,o);if(e.items)for(let s=0;s<e.items.length;s++)yield*$r(e.items[s],t,`${n}/${s}`,o[s])}function*o9(e,t,n,o){_a(o)||(yield it(De.Undefined,e,n,o))}function*s9(e,t,n,o){if(tw(e,t,o))return;const s=e.anyOf.map(u=>new gB($r(u,t,n,o)));yield it(De.Union,e,n,o,s)}function*a9(e,t,n,o){if(!vv(o))return yield it(De.Uint8Array,e,n,o);_t(e.maxByteLength)&&!(o.length<=e.maxByteLength)&&(yield it(De.Uint8ArrayMaxByteLength,e,n,o)),_t(e.minByteLength)&&!(o.length>=e.minByteLength)&&(yield it(De.Uint8ArrayMinByteLength,e,n,o))}function*u9(e,t,n,o){}function*l9(e,t,n,o){Un.IsVoidLike(o)||(yield it(De.Void,e,n,o))}function*c9(e,t,n,o){M3(e[at])(e,o)||(yield it(De.Kind,e,n,o))}function*$r(e,t,n,o){const s=_t(e.$id)?[...t,e]:t,u=e;switch(u[at]){case"Any":return yield*Tz();case"Argument":return yield*Rz();case"Array":return yield*Mz(u,s,n,o);case"AsyncIterator":return yield*Uz(u,s,n,o);case"BigInt":return yield*jz(u,s,n,o);case"Boolean":return yield*Dz(u,s,n,o);case"Constructor":return yield*Nz(u,s,n,o);case"Date":return yield*Pz(u,s,n,o);case"Function":return yield*kz(u,s,n,o);case"Import":return yield*Lz(u,s,n,o);case"Integer":return yield*zz(u,s,n,o);case"Intersect":return yield*$z(u,s,n,o);case"Iterator":return yield*qz(u,s,n,o);case"Literal":return yield*Hz(u,s,n,o);case"Never":return yield*Qz(u,s,n,o);case"Not":return yield*Gz(u,s,n,o);case"Null":return yield*Kz(u,s,n,o);case"Number":return yield*Yz(u,s,n,o);case"Object":return yield*Vz(u,s,n,o);case"Promise":return yield*Wz(u,s,n,o);case"Record":return yield*Xz(u,s,n,o);case"Ref":return yield*Zz(u,s,n,o);case"RegExp":return yield*Jz(u,s,n,o);case"String":return yield*e9(u,s,n,o);case"Symbol":return yield*t9(u,s,n,o);case"TemplateLiteral":return yield*r9(u,s,n,o);case"This":return yield*n9(u,s,n,o);case"Tuple":return yield*i9(u,s,n,o);case"Undefined":return yield*o9(u,s,n,o);case"Union":return yield*s9(u,s,n,o);case"Uint8Array":return yield*a9(u,s,n,o);case"Unknown":return yield*u9();case"Void":return yield*l9(u,s,n,o);default:if(!Tv(u[at]))throw new Bz(e);return yield*c9(u,s,n,o)}}function f9(...e){const t=e.length===3?$r(e[0],e[1],"",e[2]):$r(e[0],[],"",e[1]);return new gB(t)}class h9 extends ri{constructor(t,n,o){super("Unable to decode value as it does not match the expected schema"),this.schema=t,this.value=n,this.error=o}}class d9 extends ri{constructor(t,n,o,s){super(s instanceof Error?s.message:"Unknown error"),this.schema=t,this.path=n,this.value=o,this.error=s}}function or(e,t,n){try{return sr(e)?e[Vn].Decode(n):n}catch(o){throw new d9(e,t,n,o)}}function p9(e,t,n,o){return ko(o)?or(e,n,o.map((s,u)=>Pi(e.items,t,`${n}/${u}`,s))):or(e,n,o)}function y9(e,t,n,o){if(!Ia(o)||qD(o))return or(e,n,o);const s=JP(e),u=s.map(p=>p[0]),l={...o};for(const[p,y]of s)p in l&&(l[p]=Pi(y,t,`${n}/${p}`,l[p]));if(!sr(e.unevaluatedProperties))return or(e,n,l);const c=Object.getOwnPropertyNames(l),h=e.unevaluatedProperties,f={...l};for(const p of c)u.includes(p)||(f[p]=or(h,`${n}/${p}`,f[p]));return or(e,n,f)}function g9(e,t,n,o){const s=globalThis.Object.values(e.$defs),u=e.$defs[e.$ref],l=Pi(u,[...t,...s],n,o);return or(e,n,l)}function m9(e,t,n,o){return or(e,n,Pi(e.not,t,n,o))}function b9(e,t,n,o){if(!Ia(o))return or(e,n,o);const s=tl(e),u={...o};for(const f of s)$D(u,f)&&(_a(u[f])&&(!bp(e.properties[f])||Un.IsExactOptionalProperty(u,f))||(u[f]=Pi(e.properties[f],t,`${n}/${f}`,u[f])));if(!Wn(e.additionalProperties))return or(e,n,u);const l=Object.getOwnPropertyNames(u),c=e.additionalProperties,h={...u};for(const f of l)s.includes(f)||(h[f]=or(c,`${n}/${f}`,h[f]));return or(e,n,h)}function A9(e,t,n,o){if(!Ia(o))return or(e,n,o);const s=Object.getOwnPropertyNames(e.patternProperties)[0],u=new RegExp(s),l={...o};for(const p of Object.getOwnPropertyNames(o))u.test(p)&&(l[p]=Pi(e.patternProperties[s],t,`${n}/${p}`,l[p]));if(!Wn(e.additionalProperties))return or(e,n,l);const c=Object.getOwnPropertyNames(l),h=e.additionalProperties,f={...l};for(const p of c)u.test(p)||(f[p]=or(h,`${n}/${p}`,f[p]));return or(e,n,f)}function v9(e,t,n,o){const s=Qo(e,t);return or(e,n,Pi(s,t,n,o))}function w9(e,t,n,o){const s=Qo(e,t);return or(e,n,Pi(s,t,n,o))}function x9(e,t,n,o){return ko(o)&&ko(e.items)?or(e,n,e.items.map((s,u)=>Pi(s,t,`${n}/${u}`,o[u]))):or(e,n,o)}function E9(e,t,n,o){for(const s of e.anyOf){if(!tw(s,t,o))continue;const u=Pi(s,t,n,o);return or(e,n,u)}return or(e,n,o)}function Pi(e,t,n,o){const s=ew(e,t),u=e;switch(e[at]){case"Array":return p9(u,s,n,o);case"Import":return g9(u,s,n,o);case"Intersect":return y9(u,s,n,o);case"Not":return m9(u,s,n,o);case"Object":return b9(u,s,n,o);case"Record":return A9(u,s,n,o);case"Ref":return v9(u,s,n,o);case"Symbol":return or(u,n,o);case"This":return w9(u,s,n,o);case"Tuple":return x9(u,s,n,o);case"Union":return E9(u,s,n,o);default:return or(u,n,o)}}function S9(e,t,n){return Pi(e,t,"",n)}function I9(e,t){return sr(e)||Nr(e.items,t)}function _9(e,t){return sr(e)||Nr(e.items,t)}function C9(e,t){return sr(e)||Nr(e.returns,t)||e.parameters.some(n=>Nr(n,t))}function F9(e,t){return sr(e)||Nr(e.returns,t)||e.parameters.some(n=>Nr(n,t))}function O9(e,t){return sr(e)||sr(e.unevaluatedProperties)||e.allOf.some(n=>Nr(n,t))}function B9(e,t){const n=globalThis.Object.getOwnPropertyNames(e.$defs).reduce((s,u)=>[...s,e.$defs[u]],[]),o=e.$defs[e.$ref];return sr(e)||Nr(o,[...n,...t])}function T9(e,t){return sr(e)||Nr(e.items,t)}function R9(e,t){return sr(e)||Nr(e.not,t)}function M9(e,t){return sr(e)||Object.values(e.properties).some(n=>Nr(n,t))||Wn(e.additionalProperties)&&Nr(e.additionalProperties,t)}function U9(e,t){return sr(e)||Nr(e.item,t)}function j9(e,t){const n=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[n];return sr(e)||Nr(o,t)||Wn(e.additionalProperties)&&sr(e.additionalProperties)}function D9(e,t){return sr(e)?!0:Nr(Qo(e,t),t)}function N9(e,t){return sr(e)?!0:Nr(Qo(e,t),t)}function P9(e,t){return sr(e)||!_a(e.items)&&e.items.some(n=>Nr(n,t))}function k9(e,t){return sr(e)||e.anyOf.some(n=>Nr(n,t))}function Nr(e,t){const n=ew(e,t),o=e;if(e.$id&&Db.has(e.$id))return!1;switch(e.$id&&Db.add(e.$id),e[at]){case"Array":return I9(o,n);case"AsyncIterator":return _9(o,n);case"Constructor":return C9(o,n);case"Function":return F9(o,n);case"Import":return B9(o,n);case"Intersect":return O9(o,n);case"Iterator":return T9(o,n);case"Not":return R9(o,n);case"Object":return M9(o,n);case"Promise":return U9(o,n);case"Record":return j9(o,n);case"Ref":return D9(o,n);case"This":return N9(o,n);case"Tuple":return P9(o,n);case"Union":return k9(o,n);default:return sr(e)}}const Db=new Set;function L9(e,t){return Db.clear(),Nr(e,t)}function z9(...e){const[t,n,o]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!tw(t,n,o))throw new h9(t,o,f9(t,n,o).First());return L9(t,n)?S9(t,n,o):o}var xo={},xm={exports:{}},Em={},Sm={},Im={},_m,II;function rw(){return II||(II=1,_m=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(var u 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 l=Object.getOwnPropertySymbols(t);if(l.length!==1||l[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,n);if(c.value!==s||c.enumerable!==!0)return!1}return!0}),_m}var Cm,_I;function Mp(){if(_I)return Cm;_I=1;var e=rw();return Cm=function(){return e()&&!!Symbol.toStringTag},Cm}var Fm,CI;function nw(){return CI||(CI=1,Fm=Object),Fm}var Om,FI;function $9(){return FI||(FI=1,Om=Error),Om}var Bm,OI;function q9(){return OI||(OI=1,Bm=EvalError),Bm}var Tm,BI;function H9(){return BI||(BI=1,Tm=RangeError),Tm}var Rm,TI;function Q9(){return TI||(TI=1,Rm=ReferenceError),Rm}var Mm,RI;function mB(){return RI||(RI=1,Mm=SyntaxError),Mm}var Um,MI;function wf(){return MI||(MI=1,Um=TypeError),Um}var jm,UI;function G9(){return UI||(UI=1,jm=URIError),jm}var Dm,jI;function K9(){return jI||(jI=1,Dm=Math.abs),Dm}var Nm,DI;function Y9(){return DI||(DI=1,Nm=Math.floor),Nm}var Pm,NI;function V9(){return NI||(NI=1,Pm=Math.max),Pm}var km,PI;function W9(){return PI||(PI=1,km=Math.min),km}var Lm,kI;function X9(){return kI||(kI=1,Lm=Math.pow),Lm}var zm,LI;function Z9(){return LI||(LI=1,zm=Math.round),zm}var $m,zI;function J9(){return zI||(zI=1,$m=Number.isNaN||function(t){return t!==t}),$m}var qm,$I;function e$(){if($I)return qm;$I=1;var e=J9();return qm=function(n){return e(n)||n===0?n:n<0?-1:1},qm}var Hm,qI;function t$(){return qI||(qI=1,Hm=Object.getOwnPropertyDescriptor),Hm}var Qm,HI;function il(){if(HI)return Qm;HI=1;var e=t$();if(e)try{e([],"length")}catch{e=null}return Qm=e,Qm}var Gm,QI;function Up(){if(QI)return Gm;QI=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Gm=e,Gm}var Km,GI;function r$(){if(GI)return Km;GI=1;var e=typeof Symbol<"u"&&Symbol,t=rw();return Km=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Km}var Ym,KI;function bB(){return KI||(KI=1,Ym=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ym}var Vm,YI;function AB(){if(YI)return Vm;YI=1;var e=nw();return Vm=e.getPrototypeOf||null,Vm}var Wm,VI;function n$(){if(VI)return Wm;VI=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,o="[object Function]",s=function(h,f){for(var p=[],y=0;y<h.length;y+=1)p[y]=h[y];for(var g=0;g<f.length;g+=1)p[g+h.length]=f[g];return p},u=function(h,f){for(var p=[],y=f,g=0;y<h.length;y+=1,g+=1)p[g]=h[y];return p},l=function(c,h){for(var f="",p=0;p<c.length;p+=1)f+=c[p],p+1<c.length&&(f+=h);return f};return Wm=function(h){var f=this;if(typeof f!="function"||t.apply(f)!==o)throw new TypeError(e+f);for(var p=u(arguments,1),y,g=function(){if(this instanceof y){var M=f.apply(this,s(p,arguments));return Object(M)===M?M:this}return f.apply(h,s(p,arguments))},b=n(0,f.length-p.length),w=[],B=0;B<b;B++)w[B]="$"+B;if(y=Function("binder","return function ("+l(w,",")+"){ return binder.apply(this,arguments); }")(g),f.prototype){var _=function(){};_.prototype=f.prototype,y.prototype=new _,_.prototype=null}return y},Wm}var Xm,WI;function xf(){if(WI)return Xm;WI=1;var e=n$();return Xm=Function.prototype.bind||e,Xm}var Zm,XI;function iw(){return XI||(XI=1,Zm=Function.prototype.call),Zm}var Jm,ZI;function ow(){return ZI||(ZI=1,Jm=Function.prototype.apply),Jm}var e0,JI;function i$(){return JI||(JI=1,e0=typeof Reflect<"u"&&Reflect&&Reflect.apply),e0}var t0,e_;function vB(){if(e_)return t0;e_=1;var e=xf(),t=ow(),n=iw(),o=i$();return t0=o||e.call(n,t),t0}var r0,t_;function sw(){if(t_)return r0;t_=1;var e=xf(),t=wf(),n=iw(),o=vB();return r0=function(u){if(u.length<1||typeof u[0]!="function")throw new t("a function is required");return o(e,n,u)},r0}var n0,r_;function o$(){if(r_)return n0;r_=1;var e=sw(),t=il(),n;try{n=[].__proto__===Array.prototype}catch(l){if(!l||typeof l!="object"||!("code"in l)||l.code!=="ERR_PROTO_ACCESS")throw l}var o=!!n&&t&&t(Object.prototype,"__proto__"),s=Object,u=s.getPrototypeOf;return n0=o&&typeof o.get=="function"?e([o.get]):typeof u=="function"?function(c){return u(c==null?c:s(c))}:!1,n0}var i0,n_;function aw(){if(n_)return i0;n_=1;var e=bB(),t=AB(),n=o$();return i0=e?function(s){return e(s)}:t?function(s){if(!s||typeof s!="object"&&typeof s!="function")throw new TypeError("getProto: not an object");return t(s)}:n?function(s){return n(s)}:null,i0}var o0,i_;function wB(){if(i_)return o0;i_=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=xf();return o0=n.call(e,t),o0}var s0,o_;function uw(){if(o_)return s0;o_=1;var e,t=nw(),n=$9(),o=q9(),s=H9(),u=Q9(),l=mB(),c=wf(),h=G9(),f=K9(),p=Y9(),y=V9(),g=W9(),b=X9(),w=Z9(),B=e$(),_=Function,M=function(Z){try{return _('"use strict"; return ('+Z+").constructor;")()}catch{}},A=il(),I=Up(),R=function(){throw new c},T=A?(function(){try{return arguments.callee,R}catch{try{return A(arguments,"callee").get}catch{return R}}})():R,$=r$()(),k=aw(),L=AB(),U=bB(),j=ow(),Q=iw(),P={},re=typeof Uint8Array>"u"||!k?e:k(Uint8Array),le={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":$&&k?k([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":o,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":P,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$||!k?e:k(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":s,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$&&k?k(""[Symbol.iterator]()):e,"%Symbol%":$?Symbol:e,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":re,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":h,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":Q,"%Function.prototype.apply%":j,"%Object.defineProperty%":I,"%Object.getPrototypeOf%":L,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":y,"%Math.min%":g,"%Math.pow%":b,"%Math.round%":w,"%Math.sign%":B,"%Reflect.getPrototypeOf%":U};if(k)try{null.error}catch(Z){var oe=k(k(Z));le["%Error.prototype%"]=oe}var X=function Z(F){var q;if(F==="%AsyncFunction%")q=M("async function () {}");else if(F==="%GeneratorFunction%")q=M("function* () {}");else if(F==="%AsyncGeneratorFunction%")q=M("async function* () {}");else if(F==="%AsyncGenerator%"){var Y=Z("%AsyncGeneratorFunction%");Y&&(q=Y.prototype)}else if(F==="%AsyncIteratorPrototype%"){var se=Z("%AsyncGenerator%");se&&k&&(q=k(se.prototype))}return le[F]=q,q},te={__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"]},pe=xf(),ue=wB(),J=pe.call(Q,Array.prototype.concat),G=pe.call(j,Array.prototype.splice),H=pe.call(Q,String.prototype.replace),K=pe.call(Q,String.prototype.slice),W=pe.call(Q,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fe=/\\(\\)?/g,ae=function(F){var q=K(F,0,1),Y=K(F,-1);if(q==="%"&&Y!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(Y==="%"&&q!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var se=[];return H(F,z,function(ye,ee,S,v){se[se.length]=S?H(v,fe,"$1"):ee||ye}),se},ne=function(F,q){var Y=F,se;if(ue(te,Y)&&(se=te[Y],Y="%"+se[0]+"%"),ue(le,Y)){var ye=le[Y];if(ye===P&&(ye=X(Y)),typeof ye>"u"&&!q)throw new c("intrinsic "+F+" exists, but is not available. Please file an issue!");return{alias:se,name:Y,value:ye}}throw new l("intrinsic "+F+" does not exist!")};return s0=function(F,q){if(typeof F!="string"||F.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new c('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,F)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Y=ae(F),se=Y.length>0?Y[0]:"",ye=ne("%"+se+"%",q),ee=ye.name,S=ye.value,v=!1,C=ye.alias;C&&(se=C[0],G(Y,J([0,1],C)));for(var N=1,he=!0;N<Y.length;N+=1){var ce=Y[N],Ee=K(ce,0,1),Te=K(ce,-1);if((Ee==='"'||Ee==="'"||Ee==="`"||Te==='"'||Te==="'"||Te==="`")&&Ee!==Te)throw new l("property names with quotes must have matching quotes");if((ce==="constructor"||!he)&&(v=!0),se+="."+ce,ee="%"+se+"%",ue(le,ee))S=le[ee];else if(S!=null){if(!(ce in S)){if(!q)throw new c("base intrinsic for "+F+" exists, but the property is not available.");return}if(A&&N+1>=Y.length){var de=A(S,ce);he=!!de,he&&"get"in de&&!("originalValue"in de.get)?S=de.get:S=S[ce]}else he=ue(S,ce),S=S[ce];he&&!v&&(le[ee]=S)}}return S},s0}var a0,s_;function ol(){if(s_)return a0;s_=1;var e=uw(),t=sw(),n=t([e("%String.prototype.indexOf%")]);return a0=function(s,u){var l=e(s,!!u);return typeof l=="function"&&n(s,".prototype.")>-1?t([l]):l},a0}var u0,a_;function s$(){if(a_)return u0;a_=1;var e=Mp()(),t=ol(),n=t("Object.prototype.toString"),o=function(c){return e&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:n(c)==="[object Arguments]"},s=function(c){return o(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&n(c)!=="[object Array]"&&"callee"in c&&n(c.callee)==="[object Function]"},u=(function(){return o(arguments)})();return o.isLegacyArguments=s,u0=u?o:s,u0}var l0,u_;function a$(){if(u_)return l0;u_=1;var e=ol(),t=Mp()(),n=wB(),o=il(),s;if(t){var u=e("RegExp.prototype.exec"),l={},c=function(){throw l},h={toString:c,valueOf:c};typeof Symbol.toPrimitive=="symbol"&&(h[Symbol.toPrimitive]=c),s=function(g){if(!g||typeof g!="object")return!1;var b=o(g,"lastIndex"),w=b&&n(b,"value");if(!w)return!1;try{u(g,h)}catch(B){return B===l}}}else{var f=e("Object.prototype.toString"),p="[object RegExp]";s=function(g){return!g||typeof g!="object"&&typeof g!="function"?!1:f(g)===p}}return l0=s,l0}var c0,l_;function u$(){if(l_)return c0;l_=1;var e=ol(),t=a$(),n=e("RegExp.prototype.exec"),o=wf();return c0=function(u){if(!t(u))throw new o("`regex` must be a RegExp");return function(c){return n(u,c)!==null}},c0}var f0,c_;function l$(){if(c_)return f0;c_=1;const e=(function*(){}).constructor;return f0=()=>e,f0}var h0,f_;function c$(){if(f_)return h0;f_=1;var e=ol(),t=u$(),n=t(/^\s*(?:function)?\*/),o=Mp()(),s=aw(),u=e("Object.prototype.toString"),l=e("Function.prototype.toString"),c=l$();return h0=function(f){if(typeof f!="function")return!1;if(n(l(f)))return!0;if(!o){var p=u(f);return p==="[object GeneratorFunction]"}if(!s)return!1;var y=c();return y&&s(f)===y.prototype},h0}var d0,h_;function f$(){if(h_)return d0;h_=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,o;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw o}}),o={},t(function(){throw 42},null,n)}catch(A){A!==o&&(t=null)}else t=null;var s=/^\s*class\b/,u=function(I){try{var R=e.call(I);return s.test(R)}catch{return!1}},l=function(I){try{return u(I)?!1:(e.call(I),!0)}catch{return!1}},c=Object.prototype.toString,h="[object Object]",f="[object Function]",p="[object GeneratorFunction]",y="[object HTMLAllCollection]",g="[object HTML document.all class]",b="[object HTMLCollection]",w=typeof Symbol=="function"&&!!Symbol.toStringTag,B=!(0 in[,]),_=function(){return!1};if(typeof document=="object"){var M=document.all;c.call(M)===c.call(document.all)&&(_=function(I){if((B||!I)&&(typeof I>"u"||typeof I=="object"))try{var R=c.call(I);return(R===y||R===g||R===b||R===h)&&I("")==null}catch{}return!1})}return d0=t?function(I){if(_(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;try{t(I,null,n)}catch(R){if(R!==o)return!1}return!u(I)&&l(I)}:function(I){if(_(I))return!0;if(!I||typeof I!="function"&&typeof I!="object")return!1;if(w)return l(I);if(u(I))return!1;var R=c.call(I);return R!==f&&R!==p&&!/^\[object HTML/.test(R)?!1:l(I)},d0}var p0,d_;function h$(){if(d_)return p0;d_=1;var e=f$(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=function(h,f,p){for(var y=0,g=h.length;y<g;y++)n.call(h,y)&&(p==null?f(h[y],y,h):f.call(p,h[y],y,h))},s=function(h,f,p){for(var y=0,g=h.length;y<g;y++)p==null?f(h.charAt(y),y,h):f.call(p,h.charAt(y),y,h)},u=function(h,f,p){for(var y in h)n.call(h,y)&&(p==null?f(h[y],y,h):f.call(p,h[y],y,h))};function l(c){return t.call(c)==="[object Array]"}return p0=function(h,f,p){if(!e(f))throw new TypeError("iterator must be a function");var y;arguments.length>=3&&(y=p),l(h)?o(h,f,y):typeof h=="string"?s(h,f,y):u(h,f,y)},p0}var y0,p_;function d$(){return p_||(p_=1,y0=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),y0}var g0,y_;function p$(){if(y_)return g0;y_=1;var e=d$(),t=typeof globalThis>"u"?Jc:globalThis;return g0=function(){for(var o=[],s=0;s<e.length;s++)typeof t[e[s]]=="function"&&(o[o.length]=e[s]);return o},g0}var m0={exports:{}},b0,g_;function xB(){if(g_)return b0;g_=1;var e=Up(),t=mB(),n=wf(),o=il();return b0=function(u,l,c){if(!u||typeof u!="object"&&typeof u!="function")throw new n("`obj` must be an object or a function`");if(typeof l!="string"&&typeof l!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,g=!!o&&o(u,l);if(e)e(u,l,{configurable:p===null&&g?g.configurable:!p,enumerable:h===null&&g?g.enumerable:!h,value:c,writable:f===null&&g?g.writable:!f});else if(y||!h&&!f&&!p)u[l]=c;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},b0}var A0,m_;function EB(){if(m_)return A0;m_=1;var e=Up(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},A0=t,A0}var v0,b_;function y$(){if(b_)return v0;b_=1;var e=uw(),t=xB(),n=EB()(),o=il(),s=wf(),u=e("%Math.floor%");return v0=function(c,h){if(typeof c!="function")throw new s("`fn` is not a function");if(typeof h!="number"||h<0||h>4294967295||u(h)!==h)throw new s("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],p=!0,y=!0;if("length"in c&&o){var g=o(c,"length");g&&!g.configurable&&(p=!1),g&&!g.writable&&(y=!1)}return(p||y||!f)&&(n?t(c,"length",h,!0,!0):t(c,"length",h)),c},v0}var w0,A_;function g$(){if(A_)return w0;A_=1;var e=xf(),t=ow(),n=vB();return w0=function(){return n(e,t,arguments)},w0}var v_;function jp(){return v_||(v_=1,(function(e){var t=y$(),n=Up(),o=sw(),s=g$();e.exports=function(l){var c=o(arguments),h=l.length-(arguments.length-1);return t(c,1+(h>0?h:0),!0)},n?n(e.exports,"apply",{value:s}):e.exports.apply=s})(m0)),m0.exports}var x0,w_;function SB(){if(w_)return x0;w_=1;var e=h$(),t=p$(),n=jp(),o=ol(),s=il(),u=aw(),l=o("Object.prototype.toString"),c=Mp()(),h=typeof globalThis>"u"?Jc:globalThis,f=t(),p=o("String.prototype.slice"),y=o("Array.prototype.indexOf",!0)||function(_,M){for(var A=0;A<_.length;A+=1)if(_[A]===M)return A;return-1},g={__proto__:null};c&&s&&u?e(f,function(B){var _=new h[B];if(Symbol.toStringTag in _&&u){var M=u(_),A=s(M,Symbol.toStringTag);if(!A&&M){var I=u(M);A=s(I,Symbol.toStringTag)}g["$"+B]=n(A.get)}}):e(f,function(B){var _=new h[B],M=_.slice||_.set;M&&(g["$"+B]=n(M))});var b=function(_){var M=!1;return e(g,function(A,I){if(!M)try{"$"+A(_)===I&&(M=p(I,1))}catch{}}),M},w=function(_){var M=!1;return e(g,function(A,I){if(!M)try{A(_),M=p(I,1)}catch{}}),M};return x0=function(_){if(!_||typeof _!="object")return!1;if(!c){var M=p(l(_),8,-1);return y(f,M)>-1?M:M!=="Object"?!1:w(_)}return s?b(_):null},x0}var E0,x_;function m$(){if(x_)return E0;x_=1;var e=SB();return E0=function(n){return!!e(n)},E0}var E_;function b$(){return E_||(E_=1,(function(e){var t=s$(),n=c$(),o=SB(),s=m$();function u(N){return N.call.bind(N)}var l=typeof BigInt<"u",c=typeof Symbol<"u",h=u(Object.prototype.toString),f=u(Number.prototype.valueOf),p=u(String.prototype.valueOf),y=u(Boolean.prototype.valueOf);if(l)var g=u(BigInt.prototype.valueOf);if(c)var b=u(Symbol.prototype.valueOf);function w(N,he){if(typeof N!="object")return!1;try{return he(N),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=s;function B(N){return typeof Promise<"u"&&N instanceof Promise||N!==null&&typeof N=="object"&&typeof N.then=="function"&&typeof N.catch=="function"}e.isPromise=B;function _(N){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(N):s(N)||K(N)}e.isArrayBufferView=_;function M(N){return o(N)==="Uint8Array"}e.isUint8Array=M;function A(N){return o(N)==="Uint8ClampedArray"}e.isUint8ClampedArray=A;function I(N){return o(N)==="Uint16Array"}e.isUint16Array=I;function R(N){return o(N)==="Uint32Array"}e.isUint32Array=R;function T(N){return o(N)==="Int8Array"}e.isInt8Array=T;function $(N){return o(N)==="Int16Array"}e.isInt16Array=$;function k(N){return o(N)==="Int32Array"}e.isInt32Array=k;function L(N){return o(N)==="Float32Array"}e.isFloat32Array=L;function U(N){return o(N)==="Float64Array"}e.isFloat64Array=U;function j(N){return o(N)==="BigInt64Array"}e.isBigInt64Array=j;function Q(N){return o(N)==="BigUint64Array"}e.isBigUint64Array=Q;function P(N){return h(N)==="[object Map]"}P.working=typeof Map<"u"&&P(new Map);function re(N){return typeof Map>"u"?!1:P.working?P(N):N instanceof Map}e.isMap=re;function le(N){return h(N)==="[object Set]"}le.working=typeof Set<"u"&&le(new Set);function oe(N){return typeof Set>"u"?!1:le.working?le(N):N instanceof Set}e.isSet=oe;function X(N){return h(N)==="[object WeakMap]"}X.working=typeof WeakMap<"u"&&X(new WeakMap);function te(N){return typeof WeakMap>"u"?!1:X.working?X(N):N instanceof WeakMap}e.isWeakMap=te;function pe(N){return h(N)==="[object WeakSet]"}pe.working=typeof WeakSet<"u"&&pe(new WeakSet);function ue(N){return pe(N)}e.isWeakSet=ue;function J(N){return h(N)==="[object ArrayBuffer]"}J.working=typeof ArrayBuffer<"u"&&J(new ArrayBuffer);function G(N){return typeof ArrayBuffer>"u"?!1:J.working?J(N):N instanceof ArrayBuffer}e.isArrayBuffer=G;function H(N){return h(N)==="[object DataView]"}H.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&H(new DataView(new ArrayBuffer(1),0,1));function K(N){return typeof DataView>"u"?!1:H.working?H(N):N instanceof DataView}e.isDataView=K;var W=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function z(N){return h(N)==="[object SharedArrayBuffer]"}function fe(N){return typeof W>"u"?!1:(typeof z.working>"u"&&(z.working=z(new W)),z.working?z(N):N instanceof W)}e.isSharedArrayBuffer=fe;function ae(N){return h(N)==="[object AsyncFunction]"}e.isAsyncFunction=ae;function ne(N){return h(N)==="[object Map Iterator]"}e.isMapIterator=ne;function Z(N){return h(N)==="[object Set Iterator]"}e.isSetIterator=Z;function F(N){return h(N)==="[object Generator]"}e.isGeneratorObject=F;function q(N){return h(N)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=q;function Y(N){return w(N,f)}e.isNumberObject=Y;function se(N){return w(N,p)}e.isStringObject=se;function ye(N){return w(N,y)}e.isBooleanObject=ye;function ee(N){return l&&w(N,g)}e.isBigIntObject=ee;function S(N){return c&&w(N,b)}e.isSymbolObject=S;function v(N){return Y(N)||se(N)||ye(N)||ee(N)||S(N)}e.isBoxedPrimitive=v;function C(N){return typeof Uint8Array<"u"&&(G(N)||fe(N))}e.isAnyArrayBuffer=C,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(N){Object.defineProperty(e,N,{enumerable:!1,value:function(){throw new Error(N+" is not supported in userland")}})})})(Im)),Im}var S0,S_;function A$(){return S_||(S_=1,S0=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),S0}var Gh={exports:{}},I_;function v$(){return I_||(I_=1,typeof Object.create=="function"?Gh.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Gh.exports=function(t,n){if(n){t.super_=n;var o=function(){};o.prototype=n.prototype,t.prototype=new o,t.prototype.constructor=t}}),Gh.exports}var __;function Xc(){return __||(__=1,(function(e){var t={},n=Object.getOwnPropertyDescriptors||function(W){for(var z=Object.keys(W),fe={},ae=0;ae<z.length;ae++)fe[z[ae]]=Object.getOwnPropertyDescriptor(W,z[ae]);return fe},o=/%[sdj%]/g;e.format=function(K){if(!$(K)){for(var W=[],z=0;z<arguments.length;z++)W.push(c(arguments[z]));return W.join(" ")}for(var z=1,fe=arguments,ae=fe.length,ne=String(K).replace(o,function(F){if(F==="%%")return"%";if(z>=ae)return F;switch(F){case"%s":return String(fe[z++]);case"%d":return Number(fe[z++]);case"%j":try{return JSON.stringify(fe[z++])}catch{return"[Circular]"}default:return F}}),Z=fe[z];z<ae;Z=fe[++z])I(Z)||!j(Z)?ne+=" "+Z:ne+=" "+c(Z);return ne},e.deprecate=function(K,W){if(typeof Ut<"u"&&Ut.noDeprecation===!0)return K;if(typeof Ut>"u")return function(){return e.deprecate(K,W).apply(this,arguments)};var z=!1;function fe(){if(!z){if(Ut.throwDeprecation)throw new Error(W);Ut.traceDeprecation?console.trace(W):console.error(W),z=!0}return K.apply(this,arguments)}return fe};var s={},u=/^$/;if(t.NODE_DEBUG){var l=t.NODE_DEBUG;l=l.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+l+"$","i")}e.debuglog=function(K){if(K=K.toUpperCase(),!s[K])if(u.test(K)){var W=Ut.pid;s[K]=function(){var z=e.format.apply(e,arguments);console.error("%s %d: %s",K,W,z)}}else s[K]=function(){};return s[K]};function c(K,W){var z={seen:[],stylize:f};return arguments.length>=3&&(z.depth=arguments[2]),arguments.length>=4&&(z.colors=arguments[3]),A(W)?z.showHidden=W:W&&e._extend(z,W),L(z.showHidden)&&(z.showHidden=!1),L(z.depth)&&(z.depth=2),L(z.colors)&&(z.colors=!1),L(z.customInspect)&&(z.customInspect=!0),z.colors&&(z.stylize=h),y(z,K,z.depth)}e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(K,W){var z=c.styles[W];return z?"\x1B["+c.colors[z][0]+"m"+K+"\x1B["+c.colors[z][1]+"m":K}function f(K,W){return K}function p(K){var W={};return K.forEach(function(z,fe){W[z]=!0}),W}function y(K,W,z){if(K.customInspect&&W&&re(W.inspect)&&W.inspect!==e.inspect&&!(W.constructor&&W.constructor.prototype===W)){var fe=W.inspect(z,K);return $(fe)||(fe=y(K,fe,z)),fe}var ae=g(K,W);if(ae)return ae;var ne=Object.keys(W),Z=p(ne);if(K.showHidden&&(ne=Object.getOwnPropertyNames(W)),P(W)&&(ne.indexOf("message")>=0||ne.indexOf("description")>=0))return b(W);if(ne.length===0){if(re(W)){var F=W.name?": "+W.name:"";return K.stylize("[Function"+F+"]","special")}if(U(W))return K.stylize(RegExp.prototype.toString.call(W),"regexp");if(Q(W))return K.stylize(Date.prototype.toString.call(W),"date");if(P(W))return b(W)}var q="",Y=!1,se=["{","}"];if(M(W)&&(Y=!0,se=["[","]"]),re(W)){var ye=W.name?": "+W.name:"";q=" [Function"+ye+"]"}if(U(W)&&(q=" "+RegExp.prototype.toString.call(W)),Q(W)&&(q=" "+Date.prototype.toUTCString.call(W)),P(W)&&(q=" "+b(W)),ne.length===0&&(!Y||W.length==0))return se[0]+q+se[1];if(z<0)return U(W)?K.stylize(RegExp.prototype.toString.call(W),"regexp"):K.stylize("[Object]","special");K.seen.push(W);var ee;return Y?ee=w(K,W,z,Z,ne):ee=ne.map(function(S){return B(K,W,z,Z,S,Y)}),K.seen.pop(),_(ee,q,se)}function g(K,W){if(L(W))return K.stylize("undefined","undefined");if($(W)){var z="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize(z,"string")}if(T(W))return K.stylize(""+W,"number");if(A(W))return K.stylize(""+W,"boolean");if(I(W))return K.stylize("null","null")}function b(K){return"["+Error.prototype.toString.call(K)+"]"}function w(K,W,z,fe,ae){for(var ne=[],Z=0,F=W.length;Z<F;++Z)ue(W,String(Z))?ne.push(B(K,W,z,fe,String(Z),!0)):ne.push("");return ae.forEach(function(q){q.match(/^\d+$/)||ne.push(B(K,W,z,fe,q,!0))}),ne}function B(K,W,z,fe,ae,ne){var Z,F,q;if(q=Object.getOwnPropertyDescriptor(W,ae)||{value:W[ae]},q.get?q.set?F=K.stylize("[Getter/Setter]","special"):F=K.stylize("[Getter]","special"):q.set&&(F=K.stylize("[Setter]","special")),ue(fe,ae)||(Z="["+ae+"]"),F||(K.seen.indexOf(q.value)<0?(I(z)?F=y(K,q.value,null):F=y(K,q.value,z-1),F.indexOf(`
|
|
62
|
+
`)>-1&&(ne?F=F.split(`
|
|
63
|
+
`).map(function(Y){return" "+Y}).join(`
|
|
64
|
+
`).slice(2):F=`
|
|
65
|
+
`+F.split(`
|
|
66
|
+
`).map(function(Y){return" "+Y}).join(`
|
|
67
|
+
`))):F=K.stylize("[Circular]","special")),L(Z)){if(ne&&ae.match(/^\d+$/))return F;Z=JSON.stringify(""+ae),Z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Z=Z.slice(1,-1),Z=K.stylize(Z,"name")):(Z=Z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Z=K.stylize(Z,"string"))}return Z+": "+F}function _(K,W,z){var fe=K.reduce(function(ae,ne){return ne.indexOf(`
|
|
68
|
+
`)>=0,ae+ne.replace(/\u001b\[\d\d?m/g,"").length+1},0);return fe>60?z[0]+(W===""?"":W+`
|
|
69
|
+
`)+" "+K.join(`,
|
|
70
|
+
`)+" "+z[1]:z[0]+W+" "+K.join(", ")+" "+z[1]}e.types=b$();function M(K){return Array.isArray(K)}e.isArray=M;function A(K){return typeof K=="boolean"}e.isBoolean=A;function I(K){return K===null}e.isNull=I;function R(K){return K==null}e.isNullOrUndefined=R;function T(K){return typeof K=="number"}e.isNumber=T;function $(K){return typeof K=="string"}e.isString=$;function k(K){return typeof K=="symbol"}e.isSymbol=k;function L(K){return K===void 0}e.isUndefined=L;function U(K){return j(K)&&oe(K)==="[object RegExp]"}e.isRegExp=U,e.types.isRegExp=U;function j(K){return typeof K=="object"&&K!==null}e.isObject=j;function Q(K){return j(K)&&oe(K)==="[object Date]"}e.isDate=Q,e.types.isDate=Q;function P(K){return j(K)&&(oe(K)==="[object Error]"||K instanceof Error)}e.isError=P,e.types.isNativeError=P;function re(K){return typeof K=="function"}e.isFunction=re;function le(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||typeof K>"u"}e.isPrimitive=le,e.isBuffer=A$();function oe(K){return Object.prototype.toString.call(K)}function X(K){return K<10?"0"+K.toString(10):K.toString(10)}var te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(){var K=new Date,W=[X(K.getHours()),X(K.getMinutes()),X(K.getSeconds())].join(":");return[K.getDate(),te[K.getMonth()],W].join(" ")}e.log=function(){console.log("%s - %s",pe(),e.format.apply(e,arguments))},e.inherits=v$(),e._extend=function(K,W){if(!W||!j(W))return K;for(var z=Object.keys(W),fe=z.length;fe--;)K[z[fe]]=W[z[fe]];return K};function ue(K,W){return Object.prototype.hasOwnProperty.call(K,W)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&W[J]){var z=W[J];if(typeof z!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(z,J,{value:z,enumerable:!1,writable:!1,configurable:!0}),z}function z(){for(var fe,ae,ne=new Promise(function(q,Y){fe=q,ae=Y}),Z=[],F=0;F<arguments.length;F++)Z.push(arguments[F]);Z.push(function(q,Y){q?ae(q):fe(Y)});try{W.apply(this,Z)}catch(q){ae(q)}return ne}return Object.setPrototypeOf(z,Object.getPrototypeOf(W)),J&&Object.defineProperty(z,J,{value:z,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(z,n(W))},e.promisify.custom=J;function G(K,W){if(!K){var z=new Error("Promise was rejected with a falsy value");z.reason=K,K=z}return W(K)}function H(K){if(typeof K!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var z=[],fe=0;fe<arguments.length;fe++)z.push(arguments[fe]);var ae=z.pop();if(typeof ae!="function")throw new TypeError("The last argument must be of type Function");var ne=this,Z=function(){return ae.apply(ne,arguments)};K.apply(this,z).then(function(F){Ut.nextTick(Z.bind(null,null,F))},function(F){Ut.nextTick(G.bind(null,F,Z))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(K)),Object.defineProperties(W,n(K)),W}e.callbackify=H})(Sm)),Sm}var C_;function IB(){if(C_)return Em;C_=1;function e(A){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},e(A)}function t(A,I,R){return Object.defineProperty(A,"prototype",{writable:!1}),A}function n(A,I){if(!(A instanceof I))throw new TypeError("Cannot call a class as a function")}function o(A,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(I&&I.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),I&&s(A,I)}function s(A,I){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,$){return T.__proto__=$,T},s(A,I)}function u(A){var I=h();return function(){var T=f(A),$;if(I){var k=f(this).constructor;$=Reflect.construct(T,arguments,k)}else $=T.apply(this,arguments);return l(this,$)}}function l(A,I){if(I&&(e(I)==="object"||typeof I=="function"))return I;if(I!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(A)}function c(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function h(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function f(A){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},f(A)}var p={},y,g;function b(A,I,R){R||(R=Error);function T(k,L,U){return typeof I=="string"?I:I(k,L,U)}var $=(function(k){o(U,k);var L=u(U);function U(j,Q,P){var re;return n(this,U),re=L.call(this,T(j,Q,P)),re.code=A,re}return t(U)})(R);p[A]=$}function w(A,I){if(Array.isArray(A)){var R=A.length;return A=A.map(function(T){return String(T)}),R>2?"one of ".concat(I," ").concat(A.slice(0,R-1).join(", "),", or ")+A[R-1]:R===2?"one of ".concat(I," ").concat(A[0]," or ").concat(A[1]):"of ".concat(I," ").concat(A[0])}else return"of ".concat(I," ").concat(String(A))}function B(A,I,R){return A.substr(0,I.length)===I}function _(A,I,R){return(R===void 0||R>A.length)&&(R=A.length),A.substring(R-I.length,R)===I}function M(A,I,R){return typeof R!="number"&&(R=0),R+I.length>A.length?!1:A.indexOf(I,R)!==-1}return b("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),b("ERR_INVALID_ARG_TYPE",function(A,I,R){y===void 0&&(y=Nb()),y(typeof A=="string","'name' must be a string");var T;typeof I=="string"&&B(I,"not ")?(T="must not be",I=I.replace(/^not /,"")):T="must be";var $;if(_(A," argument"))$="The ".concat(A," ").concat(T," ").concat(w(I,"type"));else{var k=M(A,".")?"property":"argument";$='The "'.concat(A,'" ').concat(k," ").concat(T," ").concat(w(I,"type"))}return $+=". Received type ".concat(e(R)),$},TypeError),b("ERR_INVALID_ARG_VALUE",function(A,I){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";g===void 0&&(g=Xc());var T=g.inspect(I);return T.length>128&&(T="".concat(T.slice(0,128),"...")),"The argument '".concat(A,"' ").concat(R,". Received ").concat(T)},TypeError),b("ERR_INVALID_RETURN_VALUE",function(A,I,R){var T;return R&&R.constructor&&R.constructor.name?T="instance of ".concat(R.constructor.name):T="type ".concat(e(R)),"Expected ".concat(A,' to be returned from the "').concat(I,'"')+" function but got ".concat(T,".")},TypeError),b("ERR_MISSING_ARGS",function(){for(var A=arguments.length,I=new Array(A),R=0;R<A;R++)I[R]=arguments[R];y===void 0&&(y=Nb()),y(I.length>0,"At least one arg needs to be specified");var T="The ",$=I.length;switch(I=I.map(function(k){return'"'.concat(k,'"')}),$){case 1:T+="".concat(I[0]," argument");break;case 2:T+="".concat(I[0]," and ").concat(I[1]," arguments");break;default:T+=I.slice(0,$-1).join(", "),T+=", and ".concat(I[$-1]," arguments");break}return"".concat(T," must be specified")},TypeError),Em.codes=p,Em}var I0,F_;function w$(){if(F_)return I0;F_=1;function e(ue,J){var G=Object.keys(ue);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(ue);J&&(H=H.filter(function(K){return Object.getOwnPropertyDescriptor(ue,K).enumerable})),G.push.apply(G,H)}return G}function t(ue){for(var J=1;J<arguments.length;J++){var G=arguments[J]!=null?arguments[J]:{};J%2?e(Object(G),!0).forEach(function(H){n(ue,H,G[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(G)):e(Object(G)).forEach(function(H){Object.defineProperty(ue,H,Object.getOwnPropertyDescriptor(G,H))})}return ue}function n(ue,J,G){return J=l(J),J in ue?Object.defineProperty(ue,J,{value:G,enumerable:!0,configurable:!0,writable:!0}):ue[J]=G,ue}function o(ue,J){if(!(ue instanceof J))throw new TypeError("Cannot call a class as a function")}function s(ue,J){for(var G=0;G<J.length;G++){var H=J[G];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(ue,l(H.key),H)}}function u(ue,J,G){return J&&s(ue.prototype,J),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function l(ue){var J=c(ue,"string");return A(J)==="symbol"?J:String(J)}function c(ue,J){if(A(ue)!=="object"||ue===null)return ue;var G=ue[Symbol.toPrimitive];if(G!==void 0){var H=G.call(ue,J);if(A(H)!=="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ue)}function h(ue,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");ue.prototype=Object.create(J&&J.prototype,{constructor:{value:ue,writable:!0,configurable:!0}}),Object.defineProperty(ue,"prototype",{writable:!1}),J&&_(ue,J)}function f(ue){var J=w();return function(){var H=M(ue),K;if(J){var W=M(this).constructor;K=Reflect.construct(H,arguments,W)}else K=H.apply(this,arguments);return p(this,K)}}function p(ue,J){if(J&&(A(J)==="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(ue)}function y(ue){if(ue===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ue}function g(ue){var J=typeof Map=="function"?new Map:void 0;return g=function(H){if(H===null||!B(H))return H;if(typeof H!="function")throw new TypeError("Super expression must either be null or a function");if(typeof J<"u"){if(J.has(H))return J.get(H);J.set(H,K)}function K(){return b(H,arguments,M(this).constructor)}return K.prototype=Object.create(H.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),_(K,H)},g(ue)}function b(ue,J,G){return w()?b=Reflect.construct.bind():b=function(K,W,z){var fe=[null];fe.push.apply(fe,W);var ae=Function.bind.apply(K,fe),ne=new ae;return z&&_(ne,z.prototype),ne},b.apply(null,arguments)}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(ue){return Function.toString.call(ue).indexOf("[native code]")!==-1}function _(ue,J){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(H,K){return H.__proto__=K,H},_(ue,J)}function M(ue){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},M(ue)}function A(ue){"@babel/helpers - typeof";return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},A(ue)}var I=Xc(),R=I.inspect,T=IB(),$=T.codes.ERR_INVALID_ARG_TYPE;function k(ue,J,G){return(G===void 0||G>ue.length)&&(G=ue.length),ue.substring(G-J.length,G)===J}function L(ue,J){if(J=Math.floor(J),ue.length==0||J==0)return"";var G=ue.length*J;for(J=Math.floor(Math.log(J)/Math.log(2));J;)ue+=ue,J--;return ue+=ue.substring(0,G-ue.length),ue}var U="",j="",Q="",P="",re={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},le=10;function oe(ue){var J=Object.keys(ue),G=Object.create(Object.getPrototypeOf(ue));return J.forEach(function(H){G[H]=ue[H]}),Object.defineProperty(G,"message",{value:ue.message}),G}function X(ue){return R(ue,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function te(ue,J,G){var H="",K="",W=0,z="",fe=!1,ae=X(ue),ne=ae.split(`
|
|
71
|
+
`),Z=X(J).split(`
|
|
72
|
+
`),F=0,q="";if(G==="strictEqual"&&A(ue)==="object"&&A(J)==="object"&&ue!==null&&J!==null&&(G="strictEqualObject"),ne.length===1&&Z.length===1&&ne[0]!==Z[0]){var Y=ne[0].length+Z[0].length;if(Y<=le){if((A(ue)!=="object"||ue===null)&&(A(J)!=="object"||J===null)&&(ue!==0||J!==0))return"".concat(re[G],`
|
|
73
|
+
|
|
74
|
+
`)+"".concat(ne[0]," !== ").concat(Z[0],`
|
|
75
|
+
`)}else if(G!=="strictEqualObject"){var se=Ut.stderr&&Ut.stderr.isTTY?Ut.stderr.columns:80;if(Y<se){for(;ne[0][F]===Z[0][F];)F++;F>2&&(q=`
|
|
76
|
+
`.concat(L(" ",F),"^"),F=0)}}}for(var ye=ne[ne.length-1],ee=Z[Z.length-1];ye===ee&&(F++<2?z=`
|
|
77
|
+
`.concat(ye).concat(z):H=ye,ne.pop(),Z.pop(),!(ne.length===0||Z.length===0));)ye=ne[ne.length-1],ee=Z[Z.length-1];var S=Math.max(ne.length,Z.length);if(S===0){var v=ae.split(`
|
|
78
|
+
`);if(v.length>30)for(v[26]="".concat(U,"...").concat(P);v.length>27;)v.pop();return"".concat(re.notIdentical,`
|
|
79
|
+
|
|
80
|
+
`).concat(v.join(`
|
|
81
|
+
`),`
|
|
82
|
+
`)}F>3&&(z=`
|
|
83
|
+
`.concat(U,"...").concat(P).concat(z),fe=!0),H!==""&&(z=`
|
|
84
|
+
`.concat(H).concat(z),H="");var C=0,N=re[G]+`
|
|
85
|
+
`.concat(j,"+ actual").concat(P," ").concat(Q,"- expected").concat(P),he=" ".concat(U,"...").concat(P," Lines skipped");for(F=0;F<S;F++){var ce=F-W;if(ne.length<F+1)ce>1&&F>2&&(ce>4?(K+=`
|
|
86
|
+
`.concat(U,"...").concat(P),fe=!0):ce>3&&(K+=`
|
|
87
|
+
`.concat(Z[F-2]),C++),K+=`
|
|
88
|
+
`.concat(Z[F-1]),C++),W=F,H+=`
|
|
89
|
+
`.concat(Q,"-").concat(P," ").concat(Z[F]),C++;else if(Z.length<F+1)ce>1&&F>2&&(ce>4?(K+=`
|
|
90
|
+
`.concat(U,"...").concat(P),fe=!0):ce>3&&(K+=`
|
|
91
|
+
`.concat(ne[F-2]),C++),K+=`
|
|
92
|
+
`.concat(ne[F-1]),C++),W=F,K+=`
|
|
93
|
+
`.concat(j,"+").concat(P," ").concat(ne[F]),C++;else{var Ee=Z[F],Te=ne[F],de=Te!==Ee&&(!k(Te,",")||Te.slice(0,-1)!==Ee);de&&k(Ee,",")&&Ee.slice(0,-1)===Te&&(de=!1,Te+=","),de?(ce>1&&F>2&&(ce>4?(K+=`
|
|
94
|
+
`.concat(U,"...").concat(P),fe=!0):ce>3&&(K+=`
|
|
95
|
+
`.concat(ne[F-2]),C++),K+=`
|
|
96
|
+
`.concat(ne[F-1]),C++),W=F,K+=`
|
|
97
|
+
`.concat(j,"+").concat(P," ").concat(Te),H+=`
|
|
98
|
+
`.concat(Q,"-").concat(P," ").concat(Ee),C+=2):(K+=H,H="",(ce===1||F===0)&&(K+=`
|
|
99
|
+
`.concat(Te),C++))}if(C>20&&F<S-2)return"".concat(N).concat(he,`
|
|
100
|
+
`).concat(K,`
|
|
101
|
+
`).concat(U,"...").concat(P).concat(H,`
|
|
102
|
+
`)+"".concat(U,"...").concat(P)}return"".concat(N).concat(fe?he:"",`
|
|
103
|
+
`).concat(K).concat(H).concat(z).concat(q)}var pe=(function(ue,J){h(H,ue);var G=f(H);function H(K){var W;if(o(this,H),A(K)!=="object"||K===null)throw new $("options","Object",K);var z=K.message,fe=K.operator,ae=K.stackStartFn,ne=K.actual,Z=K.expected,F=Error.stackTraceLimit;if(Error.stackTraceLimit=0,z!=null)W=G.call(this,String(z));else if(Ut.stderr&&Ut.stderr.isTTY&&(Ut.stderr&&Ut.stderr.getColorDepth&&Ut.stderr.getColorDepth()!==1?(U="\x1B[34m",j="\x1B[32m",P="\x1B[39m",Q="\x1B[31m"):(U="",j="",P="",Q="")),A(ne)==="object"&&ne!==null&&A(Z)==="object"&&Z!==null&&"stack"in ne&&ne instanceof Error&&"stack"in Z&&Z instanceof Error&&(ne=oe(ne),Z=oe(Z)),fe==="deepStrictEqual"||fe==="strictEqual")W=G.call(this,te(ne,Z,fe));else if(fe==="notDeepStrictEqual"||fe==="notStrictEqual"){var q=re[fe],Y=X(ne).split(`
|
|
104
|
+
`);if(fe==="notStrictEqual"&&A(ne)==="object"&&ne!==null&&(q=re.notStrictEqualObject),Y.length>30)for(Y[26]="".concat(U,"...").concat(P);Y.length>27;)Y.pop();Y.length===1?W=G.call(this,"".concat(q," ").concat(Y[0])):W=G.call(this,"".concat(q,`
|
|
105
|
+
|
|
106
|
+
`).concat(Y.join(`
|
|
107
|
+
`),`
|
|
108
|
+
`))}else{var se=X(ne),ye="",ee=re[fe];fe==="notDeepEqual"||fe==="notEqual"?(se="".concat(re[fe],`
|
|
109
|
+
|
|
110
|
+
`).concat(se),se.length>1024&&(se="".concat(se.slice(0,1021),"..."))):(ye="".concat(X(Z)),se.length>512&&(se="".concat(se.slice(0,509),"...")),ye.length>512&&(ye="".concat(ye.slice(0,509),"...")),fe==="deepEqual"||fe==="equal"?se="".concat(ee,`
|
|
111
|
+
|
|
112
|
+
`).concat(se,`
|
|
113
|
+
|
|
114
|
+
should equal
|
|
115
|
+
|
|
116
|
+
`):ye=" ".concat(fe," ").concat(ye)),W=G.call(this,"".concat(se).concat(ye))}return Error.stackTraceLimit=F,W.generatedMessage=!z,Object.defineProperty(y(W),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),W.code="ERR_ASSERTION",W.actual=ne,W.expected=Z,W.operator=fe,Error.captureStackTrace&&Error.captureStackTrace(y(W),ae),W.stack,W.name="AssertionError",p(W)}return u(H,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:J,value:function(W,z){return R(this,t(t({},z),{},{customInspect:!1,depth:0}))}}]),H})(g(Error),R.custom);return I0=pe,I0}var _0,O_;function _B(){if(O_)return _0;O_=1;var e=Object.prototype.toString;return _0=function(n){var o=e.call(n),s=o==="[object Arguments]";return s||(s=o!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&e.call(n.callee)==="[object Function]"),s},_0}var C0,B_;function x$(){if(B_)return C0;B_=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=_B(),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),l=s.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(g){var b=g.constructor;return b&&b.prototype===g},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=(function(){if(typeof window>"u")return!1;for(var g in window)try{if(!f["$"+g]&&t.call(window,g)&&window[g]!==null&&typeof window[g]=="object")try{h(window[g])}catch{return!0}}catch{return!0}return!1})(),y=function(g){if(typeof window>"u"||!p)return h(g);try{return h(g)}catch{return!1}};e=function(b){var w=b!==null&&typeof b=="object",B=n.call(b)==="[object Function]",_=o(b),M=w&&n.call(b)==="[object String]",A=[];if(!w&&!B&&!_)throw new TypeError("Object.keys called on a non-object");var I=l&&B;if(M&&b.length>0&&!t.call(b,0))for(var R=0;R<b.length;++R)A.push(String(R));if(_&&b.length>0)for(var T=0;T<b.length;++T)A.push(String(T));else for(var $ in b)!(I&&$==="prototype")&&t.call(b,$)&&A.push(String($));if(u)for(var k=y(b),L=0;L<c.length;++L)!(k&&c[L]==="constructor")&&t.call(b,c[L])&&A.push(c[L]);return A}}return C0=e,C0}var F0,T_;function CB(){if(T_)return F0;T_=1;var e=Array.prototype.slice,t=_B(),n=Object.keys,o=n?function(l){return n(l)}:x$(),s=Object.keys;return o.shim=function(){if(Object.keys){var l=(function(){var c=Object.keys(arguments);return c&&c.length===arguments.length})(1,2);l||(Object.keys=function(h){return t(h)?s(e.call(h)):s(h)})}else Object.keys=o;return Object.keys||o},F0=o,F0}var O0,R_;function E$(){if(R_)return O0;R_=1;var e=CB(),t=rw()(),n=ol(),o=nw(),s=n("Array.prototype.push"),u=n("Object.prototype.propertyIsEnumerable"),l=t?o.getOwnPropertySymbols:null;return O0=function(h,f){if(h==null)throw new TypeError("target must be an object");var p=o(h);if(arguments.length===1)return p;for(var y=1;y<arguments.length;++y){var g=o(arguments[y]),b=e(g),w=t&&(o.getOwnPropertySymbols||l);if(w)for(var B=w(g),_=0;_<B.length;++_){var M=B[_];u(g,M)&&s(b,M)}for(var A=0;A<b.length;++A){var I=b[A];if(u(g,I)){var R=g[I];p[I]=R}}}return p},O0}var B0,M_;function S$(){if(M_)return B0;M_=1;var e=E$(),t=function(){if(!Object.assign)return!1;for(var o="abcdefghijklmnopqrst",s=o.split(""),u={},l=0;l<s.length;++l)u[s[l]]=s[l];var c=Object.assign({},u),h="";for(var f in c)h+=f;return o!==h},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var o=Object.preventExtensions({1:2});try{Object.assign(o,"xy")}catch{return o[1]==="y"}return!1};return B0=function(){return!Object.assign||t()||n()?e:Object.assign},B0}var T0,U_;function FB(){if(U_)return T0;U_=1;var e=function(t){return t!==t};return T0=function(n,o){return n===0&&o===0?1/n===1/o:!!(n===o||e(n)&&e(o))},T0}var R0,j_;function lw(){if(j_)return R0;j_=1;var e=FB();return R0=function(){return typeof Object.is=="function"?Object.is:e},R0}var M0,D_;function I$(){if(D_)return M0;D_=1;var e=uw(),t=jp(),n=t(e("String.prototype.indexOf"));return M0=function(s,u){var l=e(s,!!u);return typeof l=="function"&&n(s,".prototype.")>-1?t(l):l},M0}var U0,N_;function Dp(){if(N_)return U0;N_=1;var e=CB(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,s=xB(),u=function(f){return typeof f=="function"&&n.call(f)==="[object Function]"},l=EB()(),c=function(f,p,y,g){if(p in f){if(g===!0){if(f[p]===y)return}else if(!u(g)||!g())return}l?s(f,p,y,!0):s(f,p,y)},h=function(f,p){var y=arguments.length>2?arguments[2]:{},g=e(p);t&&(g=o.call(g,Object.getOwnPropertySymbols(p)));for(var b=0;b<g.length;b+=1)c(f,g[b],p[g[b]],y[g[b]])};return h.supportsDescriptors=!!l,U0=h,U0}var j0,P_;function _$(){if(P_)return j0;P_=1;var e=lw(),t=Dp();return j0=function(){var o=e();return t(Object,{is:o},{is:function(){return Object.is!==o}}),o},j0}var D0,k_;function C$(){if(k_)return D0;k_=1;var e=Dp(),t=jp(),n=FB(),o=lw(),s=_$(),u=t(o(),Object);return e(u,{getPolyfill:o,implementation:n,shim:s}),D0=u,D0}var N0,L_;function OB(){return L_||(L_=1,N0=function(t){return t!==t}),N0}var P0,z_;function BB(){if(z_)return P0;z_=1;var e=OB();return P0=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:e},P0}var k0,$_;function F$(){if($_)return k0;$_=1;var e=Dp(),t=BB();return k0=function(){var o=t();return e(Number,{isNaN:o},{isNaN:function(){return Number.isNaN!==o}}),o},k0}var L0,q_;function O$(){if(q_)return L0;q_=1;var e=jp(),t=Dp(),n=OB(),o=BB(),s=F$(),u=e(o(),Number);return t(u,{getPolyfill:o,implementation:n,shim:s}),L0=u,L0}var z0,H_;function B$(){if(H_)return z0;H_=1;function e(de,we){return u(de)||s(de,we)||n(de,we)||t()}function t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
117
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(de,we){if(de){if(typeof de=="string")return o(de,we);var x=Object.prototype.toString.call(de).slice(8,-1);if(x==="Object"&&de.constructor&&(x=de.constructor.name),x==="Map"||x==="Set")return Array.from(de);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return o(de,we)}}function o(de,we){(we==null||we>de.length)&&(we=de.length);for(var x=0,O=new Array(we);x<we;x++)O[x]=de[x];return O}function s(de,we){var x=de==null?null:typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(x!=null){var O,D,ie,me,xe=[],Ce=!0,ve=!1;try{if(ie=(x=x.call(de)).next,we!==0)for(;!(Ce=(O=ie.call(x)).done)&&(xe.push(O.value),xe.length!==we);Ce=!0);}catch(Se){ve=!0,D=Se}finally{try{if(!Ce&&x.return!=null&&(me=x.return(),Object(me)!==me))return}finally{if(ve)throw D}}return xe}}function u(de){if(Array.isArray(de))return de}function l(de){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(we){return typeof we}:function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},l(de)}var c=/a/g.flags!==void 0,h=function(we){var x=[];return we.forEach(function(O){return x.push(O)}),x},f=function(we){var x=[];return we.forEach(function(O,D){return x.push([D,O])}),x},p=Object.is?Object.is:C$(),y=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},g=Number.isNaN?Number.isNaN:O$();function b(de){return de.call.bind(de)}var w=b(Object.prototype.hasOwnProperty),B=b(Object.prototype.propertyIsEnumerable),_=b(Object.prototype.toString),M=Xc().types,A=M.isAnyArrayBuffer,I=M.isArrayBufferView,R=M.isDate,T=M.isMap,$=M.isRegExp,k=M.isSet,L=M.isNativeError,U=M.isBoxedPrimitive,j=M.isNumberObject,Q=M.isStringObject,P=M.isBooleanObject,re=M.isBigIntObject,le=M.isSymbolObject,oe=M.isFloat32Array,X=M.isFloat64Array;function te(de){if(de.length===0||de.length>10)return!0;for(var we=0;we<de.length;we++){var x=de.charCodeAt(we);if(x<48||x>57)return!0}return de.length===10&&de>=Math.pow(2,32)}function pe(de){return Object.keys(de).filter(te).concat(y(de).filter(Object.prototype.propertyIsEnumerable.bind(de)))}/*!
|
|
118
|
+
* The buffer module from node.js, for the browser.
|
|
119
|
+
*
|
|
120
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
121
|
+
* @license MIT
|
|
122
|
+
*/function ue(de,we){if(de===we)return 0;for(var x=de.length,O=we.length,D=0,ie=Math.min(x,O);D<ie;++D)if(de[D]!==we[D]){x=de[D],O=we[D];break}return x<O?-1:O<x?1:0}var J=!0,G=!1,H=0,K=1,W=2,z=3;function fe(de,we){return c?de.source===we.source&&de.flags===we.flags:RegExp.prototype.toString.call(de)===RegExp.prototype.toString.call(we)}function ae(de,we){if(de.byteLength!==we.byteLength)return!1;for(var x=0;x<de.byteLength;x++)if(de[x]!==we[x])return!1;return!0}function ne(de,we){return de.byteLength!==we.byteLength?!1:ue(new Uint8Array(de.buffer,de.byteOffset,de.byteLength),new Uint8Array(we.buffer,we.byteOffset,we.byteLength))===0}function Z(de,we){return de.byteLength===we.byteLength&&ue(new Uint8Array(de),new Uint8Array(we))===0}function F(de,we){return j(de)?j(we)&&p(Number.prototype.valueOf.call(de),Number.prototype.valueOf.call(we)):Q(de)?Q(we)&&String.prototype.valueOf.call(de)===String.prototype.valueOf.call(we):P(de)?P(we)&&Boolean.prototype.valueOf.call(de)===Boolean.prototype.valueOf.call(we):re(de)?re(we)&&BigInt.prototype.valueOf.call(de)===BigInt.prototype.valueOf.call(we):le(we)&&Symbol.prototype.valueOf.call(de)===Symbol.prototype.valueOf.call(we)}function q(de,we,x,O){if(de===we)return de!==0?!0:x?p(de,we):!0;if(x){if(l(de)!=="object")return typeof de=="number"&&g(de)&&g(we);if(l(we)!=="object"||de===null||we===null||Object.getPrototypeOf(de)!==Object.getPrototypeOf(we))return!1}else{if(de===null||l(de)!=="object")return we===null||l(we)!=="object"?de==we:!1;if(we===null||l(we)!=="object")return!1}var D=_(de),ie=_(we);if(D!==ie)return!1;if(Array.isArray(de)){if(de.length!==we.length)return!1;var me=pe(de),xe=pe(we);return me.length!==xe.length?!1:se(de,we,x,O,K,me)}if(D==="[object Object]"&&(!T(de)&&T(we)||!k(de)&&k(we)))return!1;if(R(de)){if(!R(we)||Date.prototype.getTime.call(de)!==Date.prototype.getTime.call(we))return!1}else if($(de)){if(!$(we)||!fe(de,we))return!1}else if(L(de)||de instanceof Error){if(de.message!==we.message||de.name!==we.name)return!1}else if(I(de)){if(!x&&(oe(de)||X(de))){if(!ae(de,we))return!1}else if(!ne(de,we))return!1;var Ce=pe(de),ve=pe(we);return Ce.length!==ve.length?!1:se(de,we,x,O,H,Ce)}else{if(k(de))return!k(we)||de.size!==we.size?!1:se(de,we,x,O,W);if(T(de))return!T(we)||de.size!==we.size?!1:se(de,we,x,O,z);if(A(de)){if(!Z(de,we))return!1}else if(U(de)&&!F(de,we))return!1}return se(de,we,x,O,H)}function Y(de,we){return we.filter(function(x){return B(de,x)})}function se(de,we,x,O,D,ie){if(arguments.length===5){ie=Object.keys(de);var me=Object.keys(we);if(ie.length!==me.length)return!1}for(var xe=0;xe<ie.length;xe++)if(!w(we,ie[xe]))return!1;if(x&&arguments.length===5){var Ce=y(de);if(Ce.length!==0){var ve=0;for(xe=0;xe<Ce.length;xe++){var Se=Ce[xe];if(B(de,Se)){if(!B(we,Se))return!1;ie.push(Se),ve++}else if(B(we,Se))return!1}var He=y(we);if(Ce.length!==He.length&&Y(we,He).length!==ve)return!1}else{var Ke=y(we);if(Ke.length!==0&&Y(we,Ke).length!==0)return!1}}if(ie.length===0&&(D===H||D===K&&de.length===0||de.size===0))return!0;if(O===void 0)O={val1:new Map,val2:new Map,position:0};else{var Ve=O.val1.get(de);if(Ve!==void 0){var et=O.val2.get(we);if(et!==void 0)return Ve===et}O.position++}O.val1.set(de,O.position),O.val2.set(we,O.position);var gt=ce(de,we,x,ie,O,D);return O.val1.delete(de),O.val2.delete(we),gt}function ye(de,we,x,O){for(var D=h(de),ie=0;ie<D.length;ie++){var me=D[ie];if(q(we,me,x,O))return de.delete(me),!0}return!1}function ee(de){switch(l(de)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":de=+de;case"number":if(g(de))return!1}return!0}function S(de,we,x){var O=ee(x);return O??(we.has(O)&&!de.has(O))}function v(de,we,x,O,D){var ie=ee(x);if(ie!=null)return ie;var me=we.get(ie);return me===void 0&&!we.has(ie)||!q(O,me,!1,D)?!1:!de.has(ie)&&q(O,me,!1,D)}function C(de,we,x,O){for(var D=null,ie=h(de),me=0;me<ie.length;me++){var xe=ie[me];if(l(xe)==="object"&&xe!==null)D===null&&(D=new Set),D.add(xe);else if(!we.has(xe)){if(x||!S(de,we,xe))return!1;D===null&&(D=new Set),D.add(xe)}}if(D!==null){for(var Ce=h(we),ve=0;ve<Ce.length;ve++){var Se=Ce[ve];if(l(Se)==="object"&&Se!==null){if(!ye(D,Se,x,O))return!1}else if(!x&&!de.has(Se)&&!ye(D,Se,x,O))return!1}return D.size===0}return!0}function N(de,we,x,O,D,ie){for(var me=h(de),xe=0;xe<me.length;xe++){var Ce=me[xe];if(q(x,Ce,D,ie)&&q(O,we.get(Ce),D,ie))return de.delete(Ce),!0}return!1}function he(de,we,x,O){for(var D=null,ie=f(de),me=0;me<ie.length;me++){var xe=e(ie[me],2),Ce=xe[0],ve=xe[1];if(l(Ce)==="object"&&Ce!==null)D===null&&(D=new Set),D.add(Ce);else{var Se=we.get(Ce);if(Se===void 0&&!we.has(Ce)||!q(ve,Se,x,O)){if(x||!v(de,we,Ce,ve,O))return!1;D===null&&(D=new Set),D.add(Ce)}}}if(D!==null){for(var He=f(we),Ke=0;Ke<He.length;Ke++){var Ve=e(He[Ke],2),et=Ve[0],gt=Ve[1];if(l(et)==="object"&&et!==null){if(!N(D,de,et,gt,x,O))return!1}else if(!x&&(!de.has(et)||!q(de.get(et),gt,!1,O))&&!N(D,de,et,gt,!1,O))return!1}return D.size===0}return!0}function ce(de,we,x,O,D,ie){var me=0;if(ie===W){if(!C(de,we,x,D))return!1}else if(ie===z){if(!he(de,we,x,D))return!1}else if(ie===K)for(;me<de.length;me++)if(w(de,me)){if(!w(we,me)||!q(de[me],we[me],x,D))return!1}else{if(w(we,me))return!1;for(var xe=Object.keys(de);me<xe.length;me++){var Ce=xe[me];if(!w(we,Ce)||!q(de[Ce],we[Ce],x,D))return!1}return xe.length===Object.keys(we).length}for(me=0;me<O.length;me++){var ve=O[me];if(!q(de[ve],we[ve],x,D))return!1}return!0}function Ee(de,we){return q(de,we,G)}function Te(de,we){return q(de,we,J)}return z0={isDeepEqual:Ee,isDeepStrictEqual:Te},z0}var Q_;function Nb(){if(Q_)return xm.exports;Q_=1;function e(W){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},e(W)}function t(W,z,fe){return Object.defineProperty(W,"prototype",{writable:!1}),W}function n(W,z){if(!(W instanceof z))throw new TypeError("Cannot call a class as a function")}var o=IB(),s=o.codes,u=s.ERR_AMBIGUOUS_ARGUMENT,l=s.ERR_INVALID_ARG_TYPE,c=s.ERR_INVALID_ARG_VALUE,h=s.ERR_INVALID_RETURN_VALUE,f=s.ERR_MISSING_ARGS,p=w$(),y=Xc(),g=y.inspect,b=Xc().types,w=b.isPromise,B=b.isRegExp,_=S$()(),M=lw()(),A=I$()("RegExp.prototype.test"),I,R;function T(){var W=B$();I=W.isDeepEqual,R=W.isDeepStrictEqual}var $=!1,k=xm.exports=P,L={};function U(W){throw W.message instanceof Error?W.message:new p(W)}function j(W,z,fe,ae,ne){var Z=arguments.length,F;if(Z===0)F="Failed";else if(Z===1)fe=W,W=void 0;else{if($===!1){$=!0;var q=Ut.emitWarning?Ut.emitWarning:console.warn.bind(console);q("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}Z===2&&(ae="!=")}if(fe instanceof Error)throw fe;var Y={actual:W,expected:z,operator:ae===void 0?"fail":ae,stackStartFn:ne||j};fe!==void 0&&(Y.message=fe);var se=new p(Y);throw F&&(se.message=F,se.generatedMessage=!0),se}k.fail=j,k.AssertionError=p;function Q(W,z,fe,ae){if(!fe){var ne=!1;if(z===0)ne=!0,ae="No value argument passed to `assert.ok()`";else if(ae instanceof Error)throw ae;var Z=new p({actual:fe,expected:!0,message:ae,operator:"==",stackStartFn:W});throw Z.generatedMessage=ne,Z}}function P(){for(var W=arguments.length,z=new Array(W),fe=0;fe<W;fe++)z[fe]=arguments[fe];Q.apply(void 0,[P,z.length].concat(z))}k.ok=P,k.equal=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");z!=fe&&U({actual:z,expected:fe,message:ae,operator:"==",stackStartFn:W})},k.notEqual=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");z==fe&&U({actual:z,expected:fe,message:ae,operator:"!=",stackStartFn:W})},k.deepEqual=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),I(z,fe)||U({actual:z,expected:fe,message:ae,operator:"deepEqual",stackStartFn:W})},k.notDeepEqual=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),I(z,fe)&&U({actual:z,expected:fe,message:ae,operator:"notDeepEqual",stackStartFn:W})},k.deepStrictEqual=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),R(z,fe)||U({actual:z,expected:fe,message:ae,operator:"deepStrictEqual",stackStartFn:W})},k.notDeepStrictEqual=re;function re(W,z,fe){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),R(W,z)&&U({actual:W,expected:z,message:fe,operator:"notDeepStrictEqual",stackStartFn:re})}k.strictEqual=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");M(z,fe)||U({actual:z,expected:fe,message:ae,operator:"strictEqual",stackStartFn:W})},k.notStrictEqual=function W(z,fe,ae){if(arguments.length<2)throw new f("actual","expected");M(z,fe)&&U({actual:z,expected:fe,message:ae,operator:"notStrictEqual",stackStartFn:W})};var le=t(function W(z,fe,ae){var ne=this;n(this,W),fe.forEach(function(Z){Z in z&&(ae!==void 0&&typeof ae[Z]=="string"&&B(z[Z])&&A(z[Z],ae[Z])?ne[Z]=ae[Z]:ne[Z]=z[Z])})});function oe(W,z,fe,ae,ne,Z){if(!(fe in W)||!R(W[fe],z[fe])){if(!ae){var F=new le(W,ne),q=new le(z,ne,W),Y=new p({actual:F,expected:q,operator:"deepStrictEqual",stackStartFn:Z});throw Y.actual=W,Y.expected=z,Y.operator=Z.name,Y}U({actual:W,expected:z,message:ae,operator:Z.name,stackStartFn:Z})}}function X(W,z,fe,ae){if(typeof z!="function"){if(B(z))return A(z,W);if(arguments.length===2)throw new l("expected",["Function","RegExp"],z);if(e(W)!=="object"||W===null){var ne=new p({actual:W,expected:z,message:fe,operator:"deepStrictEqual",stackStartFn:ae});throw ne.operator=ae.name,ne}var Z=Object.keys(z);if(z instanceof Error)Z.push("name","message");else if(Z.length===0)throw new c("error",z,"may not be an empty object");return I===void 0&&T(),Z.forEach(function(F){typeof W[F]=="string"&&B(z[F])&&A(z[F],W[F])||oe(W,z,F,fe,Z,ae)}),!0}return z.prototype!==void 0&&W instanceof z?!0:Error.isPrototypeOf(z)?!1:z.call({},W)===!0}function te(W){if(typeof W!="function")throw new l("fn","Function",W);try{W()}catch(z){return z}return L}function pe(W){return w(W)||W!==null&&e(W)==="object"&&typeof W.then=="function"&&typeof W.catch=="function"}function ue(W){return Promise.resolve().then(function(){var z;if(typeof W=="function"){if(z=W(),!pe(z))throw new h("instance of Promise","promiseFn",z)}else if(pe(W))z=W;else throw new l("promiseFn",["Function","Promise"],W);return Promise.resolve().then(function(){return z}).then(function(){return L}).catch(function(fe){return fe})})}function J(W,z,fe,ae){if(typeof fe=="string"){if(arguments.length===4)throw new l("error",["Object","Error","Function","RegExp"],fe);if(e(z)==="object"&&z!==null){if(z.message===fe)throw new u("error/message",'The error message "'.concat(z.message,'" is identical to the message.'))}else if(z===fe)throw new u("error/message",'The error "'.concat(z,'" is identical to the message.'));ae=fe,fe=void 0}else if(fe!=null&&e(fe)!=="object"&&typeof fe!="function")throw new l("error",["Object","Error","Function","RegExp"],fe);if(z===L){var ne="";fe&&fe.name&&(ne+=" (".concat(fe.name,")")),ne+=ae?": ".concat(ae):".";var Z=W.name==="rejects"?"rejection":"exception";U({actual:void 0,expected:fe,operator:W.name,message:"Missing expected ".concat(Z).concat(ne),stackStartFn:W})}if(fe&&!X(z,fe,ae,W))throw z}function G(W,z,fe,ae){if(z!==L){if(typeof fe=="string"&&(ae=fe,fe=void 0),!fe||X(z,fe)){var ne=ae?": ".concat(ae):".",Z=W.name==="doesNotReject"?"rejection":"exception";U({actual:z,expected:fe,operator:W.name,message:"Got unwanted ".concat(Z).concat(ne,`
|
|
123
|
+
`)+'Actual message: "'.concat(z&&z.message,'"'),stackStartFn:W})}throw z}}k.throws=function W(z){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ae[ne-1]=arguments[ne];J.apply(void 0,[W,te(z)].concat(ae))},k.rejects=function W(z){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ae[ne-1]=arguments[ne];return ue(z).then(function(Z){return J.apply(void 0,[W,Z].concat(ae))})},k.doesNotThrow=function W(z){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ae[ne-1]=arguments[ne];G.apply(void 0,[W,te(z)].concat(ae))},k.doesNotReject=function W(z){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ae[ne-1]=arguments[ne];return ue(z).then(function(Z){return G.apply(void 0,[W,Z].concat(ae))})},k.ifError=function W(z){if(z!=null){var fe="ifError got unwanted exception: ";e(z)==="object"&&typeof z.message=="string"?z.message.length===0&&z.constructor?fe+=z.constructor.name:fe+=z.message:fe+=g(z);var ae=new p({actual:z,expected:null,operator:"ifError",message:fe,stackStartFn:W}),ne=z.stack;if(typeof ne=="string"){var Z=ne.split(`
|
|
124
|
+
`);Z.shift();for(var F=ae.stack.split(`
|
|
125
|
+
`),q=0;q<Z.length;q++){var Y=F.indexOf(Z[q]);if(Y!==-1){F=F.slice(0,Y);break}}ae.stack="".concat(F.join(`
|
|
126
|
+
`),`
|
|
127
|
+
`).concat(Z.join(`
|
|
128
|
+
`))}throw ae}};function H(W,z,fe,ae,ne){if(!B(z))throw new l("regexp","RegExp",z);var Z=ne==="match";if(typeof W!="string"||A(z,W)!==Z){if(fe instanceof Error)throw fe;var F=!fe;fe=fe||(typeof W!="string"?'The "string" argument must be of type string. Received type '+"".concat(e(W)," (").concat(g(W),")"):(Z?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(g(z),`. Input:
|
|
129
|
+
|
|
130
|
+
`).concat(g(W),`
|
|
131
|
+
`));var q=new p({actual:W,expected:z,message:fe,operator:ne,stackStartFn:ae});throw q.generatedMessage=F,q}}k.match=function W(z,fe,ae){H(z,fe,ae,W,"match")},k.doesNotMatch=function W(z,fe,ae){H(z,fe,ae,W,"doesNotMatch")};function K(){for(var W=arguments.length,z=new Array(W),fe=0;fe<W;fe++)z[fe]=arguments[fe];Q.apply(void 0,[K,z.length].concat(z))}return k.strict=_(K,k,{equal:k.strictEqual,deepEqual:k.deepStrictEqual,notEqual:k.notStrictEqual,notDeepEqual:k.notDeepStrictEqual}),k.strict.strict=k.strict,xm.exports}var $0,G_;function T$(){if(G_)return $0;G_=1;function e(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),o=0;o<n.length;o++)n[o]=255;for(var s=0;s<t.length;s++){var u=t.charAt(s),l=u.charCodeAt(0);if(n[l]!==255)throw new TypeError(u+" is ambiguous");n[l]=s}var c=t.length,h=t.charAt(0),f=Math.log(c)/Math.log(256),p=Math.log(256)/Math.log(c);function y(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var B=0,_=0,M=0,A=w.length;M!==A&&w[M]===0;)M++,B++;for(var I=(A-M)*p+1>>>0,R=new Uint8Array(I);M!==A;){for(var T=w[M],$=0,k=I-1;(T!==0||$<_)&&k!==-1;k--,$++)T+=256*R[k]>>>0,R[k]=T%c>>>0,T=T/c>>>0;if(T!==0)throw new Error("Non-zero carry");_=$,M++}for(var L=I-_;L!==I&&R[L]===0;)L++;for(var U=h.repeat(B);L<I;++L)U+=t.charAt(R[L]);return U}function g(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;for(var B=0,_=0,M=0;w[B]===h;)_++,B++;for(var A=(w.length-B)*f+1>>>0,I=new Uint8Array(A);w[B];){var R=w.charCodeAt(B);if(R>255)return;var T=n[R];if(T===255)return;for(var $=0,k=A-1;(T!==0||$<M)&&k!==-1;k--,$++)T+=c*I[k]>>>0,I[k]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");M=$,B++}for(var L=A-M;L!==A&&I[L]===0;)L++;for(var U=new Uint8Array(_+(A-L)),j=_;L!==A;)U[j++]=I[L++];return U}function b(w){var B=g(w);if(B)return B;throw new Error("Non-base"+c+" character")}return{encode:y,decodeUnsafe:g,decode:b}}return $0=e,$0}var un={exports:{}},q0,K_;function TB(){if(K_)return q0;K_=1,q0=t;class e extends Error{}e.prototype.name="AssertionError";function t(n,o){if(!n){var s=new e(o);throw Error.captureStackTrace&&Error.captureStackTrace(s,t),s}}return q0}var Ci={exports:{}},Kh={exports:{}},H0,Y_;function R$(){if(Y_)return H0;Y_=1;function e(o){return o.length}function t(o){const s=o.byteLength;let u="";for(let l=0;l<s;l++)u+=String.fromCharCode(o[l]);return u}function n(o,s){const u=o.byteLength;for(let l=0;l<u;l++)o[l]=s.charCodeAt(l);return u}return H0={byteLength:e,toString:t,write:n},H0}var Q0,V_;function M$(){if(V_)return Q0;V_=1;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256);for(let u=0;u<e.length;u++)t[e.charCodeAt(u)]=u;t[45]=62,t[95]=63;function n(u){let l=u.length;return u.charCodeAt(l-1)===61&&l--,l>1&&u.charCodeAt(l-1)===61&&l--,l*3>>>2}function o(u){const l=u.byteLength;let c="";for(let h=0;h<l;h+=3)c+=e[u[h]>>2]+e[(u[h]&3)<<4|u[h+1]>>4]+e[(u[h+1]&15)<<2|u[h+2]>>6]+e[u[h+2]&63];return l%3===2?c=c.substring(0,c.length-1)+"=":l%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function s(u,l){const c=u.byteLength;for(let h=0,f=0;f<c;h+=4){const p=t[l.charCodeAt(h)],y=t[l.charCodeAt(h+1)],g=t[l.charCodeAt(h+2)],b=t[l.charCodeAt(h+3)];u[f++]=p<<2|y>>4,u[f++]=(y&15)<<4|g>>2,u[f++]=(g&3)<<6|b&63}return c}return Q0={byteLength:n,toString:o,write:s},Q0}var G0,W_;function U$(){if(W_)return G0;W_=1;function e(s){return s.length>>>1}function t(s){const u=s.byteLength;s=new DataView(s.buffer,s.byteOffset,u);let l="",c=0;for(let h=u-u%4;c<h;c+=4)l+=s.getUint32(c).toString(16).padStart(8,"0");for(;c<u;c++)l+=s.getUint8(c).toString(16).padStart(2,"0");return l}function n(s,u){const l=s.byteLength;for(let c=0;c<l;c++){const h=o(u.charCodeAt(c*2)),f=o(u.charCodeAt(c*2+1));if(h===void 0||f===void 0)return s.subarray(0,c);s[c]=h<<4|f}return l}G0={byteLength:e,toString:t,write:n};function o(s){if(s>=48&&s<=57)return s-48;if(s>=65&&s<=70)return s-65+10;if(s>=97&&s<=102)return s-97+10}return G0}var K0,X_;function j$(){if(X_)return K0;X_=1;function e(o){let s=0;for(let u=0,l=o.length;u<l;u++){const c=o.charCodeAt(u);if(c>=55296&&c<=56319&&u+1<l){const h=o.charCodeAt(u+1);if(h>=56320&&h<=57343){s+=4,u++;continue}}c<=127?s+=1:c<=2047?s+=2:s+=3}return s}let t;if(typeof TextDecoder<"u"){const o=new TextDecoder;t=function(u){return o.decode(u)}}else t=function(s){const u=s.byteLength;let l="",c=0;for(;c<u;){let h=s[c];if(h<=127){l+=String.fromCharCode(h),c++;continue}let f=0,p=0;if(h<=223?(f=1,p=h&31):h<=239?(f=2,p=h&15):h<=244&&(f=3,p=h&7),u-c-f>0){let y=0;for(;y<f;)h=s[c+y+1],p=p<<6|h&63,y+=1}else p=65533,f=u-c;l+=String.fromCodePoint(p),c+=f+1}return l};let n;if(typeof TextEncoder<"u"){const o=new TextEncoder;n=function(u,l){return o.encodeInto(l,u).written}}else n=function(s,u){const l=s.byteLength;let c=0,h=0;for(;c<u.length;){const f=u.codePointAt(c);if(f<=127){s[h++]=f,c++;continue}let p=0,y=0;for(f<=2047?(p=6,y=192):f<=65535?(p=12,y=224):f<=2097151&&(p=18,y=240),s[h++]=y|f>>p,p-=6;p>=0;)s[h++]=128|f>>p&63,p-=6;c+=f>=65536?2:1}return l};return K0={byteLength:e,toString:t,write:n},K0}var Y0,Z_;function D$(){if(Z_)return Y0;Z_=1;function e(o){return o.length*2}function t(o){const s=o.byteLength;let u="";for(let l=0;l<s-1;l+=2)u+=String.fromCharCode(o[l]+o[l+1]*256);return u}function n(o,s){const u=o.byteLength;let l=u;for(let c=0;c<s.length&&!((l-=2)<0);++c){const h=s.charCodeAt(c),f=h>>8,p=h%256;o[c*2]=p,o[c*2+1]=f}return u}return Y0={byteLength:e,toString:t,write:n},Y0}var J_;function N$(){return J_||(J_=1,(function(e,t){const n=R$(),o=M$(),s=U$(),u=j$(),l=D$(),c=new Uint8Array(Uint16Array.of(255).buffer)[0]===255;function h(S){switch(S){case"ascii":return n;case"base64":return o;case"hex":return s;case"utf8":case"utf-8":case void 0:case null:return u;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l;default:throw new Error(`Unknown encoding '${S}'`)}}function f(S){return S instanceof Uint8Array}function p(S){try{return h(S),!0}catch{return!1}}function y(S,v,C){const N=new Uint8Array(S);return v!==void 0&&t.fill(N,v,0,N.byteLength,C),N}function g(S){return new Uint8Array(S)}function b(S){return new Uint8Array(S)}function w(S,v){return h(v).byteLength(S)}function B(S,v){if(S===v)return 0;const C=Math.min(S.byteLength,v.byteLength);S=new DataView(S.buffer,S.byteOffset,S.byteLength),v=new DataView(v.buffer,v.byteOffset,v.byteLength);let N=0;for(let he=C-C%4;N<he;N+=4){const ce=S.getUint32(N,c),Ee=v.getUint32(N,c);if(ce!==Ee)break}for(;N<C;N++){const he=S.getUint8(N),ce=v.getUint8(N);if(he<ce)return-1;if(he>ce)return 1}return S.byteLength>v.byteLength?1:S.byteLength<v.byteLength?-1:0}function _(S,v){v===void 0&&(v=S.reduce((he,ce)=>he+ce.byteLength,0));const C=new Uint8Array(v);let N=0;for(const he of S){if(N+he.byteLength>C.byteLength)return C.set(he.subarray(0,C.byteLength-N),N),C;C.set(he,N),N+=he.byteLength}return C}function M(S,v,C=0,N=0,he=S.byteLength){if(C<0&&(C=0),C>=v.byteLength)return 0;const ce=v.byteLength-C;if(N<0&&(N=0),N>=S.byteLength||he<=N)return 0;he>S.byteLength&&(he=S.byteLength),he-N>ce&&(he=N+ce);const Ee=he-N;return S===v?v.copyWithin(C,N,he):((N!==0||he!==S.byteLength)&&(S=S.subarray(N,he)),v.set(S,C)),Ee}function A(S,v){return S===v?!0:S.byteLength!==v.byteLength?!1:B(S,v)===0}function I(S,v,C=0,N=S.byteLength,he="utf8"){if(typeof v=="string"?typeof C=="string"?(he=C,C=0,N=S.byteLength):typeof N=="string"&&(he=N,N=S.byteLength):typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=+v),C<0&&(C=0),C>=S.byteLength||N<=C)return S;if(N>S.byteLength&&(N=S.byteLength),typeof v=="number")return S.fill(v,C,N);typeof v=="string"&&(v=t.from(v,he));const ce=v.byteLength;for(let Ee=0,Te=N-C;Ee<Te;++Ee)S[Ee+C]=v[Ee%ce];return S}function R(S,v,C){return typeof S=="string"?T(S,v):Array.isArray(S)?$(S):ArrayBuffer.isView(S)?k(S):L(S,v,C)}function T(S,v){const C=h(v),N=new Uint8Array(C.byteLength(S));return C.write(N,S),N}function $(S){const v=new Uint8Array(S.length);return v.set(S),v}function k(S){const v=new Uint8Array(S.byteLength);return v.set(S),v}function L(S,v,C){return new Uint8Array(S,v,C)}function U(S,v,C,N){return j(S,v,C,N)!==-1}function j(S,v,C,N){return P(S,v,C,N,!0)}function Q(S,v,C,N){return P(S,v,C,N,!1)}function P(S,v,C,N,he){if(S.byteLength===0)return-1;if(typeof C=="string"?(N=C,C=0):C===void 0?C=he?0:S.length-1:C<0&&(C+=S.byteLength),C>=S.byteLength){if(he)return-1;C=S.byteLength-1}else if(C<0)if(he)C=0;else return-1;if(typeof v=="string")v=R(v,N);else if(typeof v=="number")return v=v&255,he?S.indexOf(v,C):S.lastIndexOf(v,C);if(v.byteLength===0)return-1;if(he){let ce=-1;for(let Ee=C;Ee<S.byteLength;Ee++)if(S[Ee]===v[ce===-1?0:Ee-ce]){if(ce===-1&&(ce=Ee),Ee-ce+1===v.byteLength)return ce}else ce!==-1&&(Ee-=Ee-ce),ce=-1}else{C+v.byteLength>S.byteLength&&(C=S.byteLength-v.byteLength);for(let ce=C;ce>=0;ce--){let Ee=!0;for(let Te=0;Te<v.byteLength;Te++)if(S[ce+Te]!==v[Te]){Ee=!1;break}if(Ee)return ce}}return-1}function re(S,v,C){const N=S[v];S[v]=S[C],S[C]=N}function le(S){const v=S.byteLength;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let C=0;C<v;C+=2)re(S,C,C+1);return S}function oe(S){const v=S.byteLength;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let C=0;C<v;C+=4)re(S,C,C+3),re(S,C+1,C+2);return S}function X(S){const v=S.byteLength;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let C=0;C<v;C+=8)re(S,C,C+7),re(S,C+1,C+6),re(S,C+2,C+5),re(S,C+3,C+4);return S}function te(S){return S}function pe(S,v="utf8",C=0,N=S.byteLength){return arguments.length===1?u.toString(S):arguments.length===2?h(v).toString(S):(C<0&&(C=0),C>=S.byteLength||N<=C?"":(N>S.byteLength&&(N=S.byteLength),(C!==0||N!==S.byteLength)&&(S=S.subarray(C,N)),h(v).toString(S)))}function ue(S,v,C,N,he){if(arguments.length===2)return u.write(S,v);typeof C=="string"?(he=C,C=0,N=S.byteLength):typeof N=="string"&&(he=N,N=S.byteLength-C),N=Math.min(N,t.byteLength(v,he));let ce=C;if(ce<0&&(ce=0),ce>=S.byteLength)return 0;let Ee=C+N;return Ee<=ce?0:(Ee>S.byteLength&&(Ee=S.byteLength),(ce!==0||Ee!==S.byteLength)&&(S=S.subarray(ce,Ee)),h(he).write(S,v))}function J(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getFloat64(v,!1)}function G(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getFloat64(v,!0)}function H(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getFloat32(v,!1)}function K(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getFloat32(v,!0)}function W(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getInt32(v,!1)}function z(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getInt32(v,!0)}function fe(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getUint32(v,!1)}function ae(S,v=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).getUint32(v,!0)}function ne(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setFloat64(C,v,!1),C+8}function Z(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setFloat64(C,v,!0),C+8}function F(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setFloat32(C,v,!1),C+4}function q(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setFloat32(C,v,!0),C+4}function Y(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setInt32(C,v,!1),C+4}function se(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setInt32(C,v,!0),C+4}function ye(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setUint32(C,v,!1),C+4}function ee(S,v,C=0){return new DataView(S.buffer,S.byteOffset,S.byteLength).setUint32(C,v,!0),C+4}e.exports=t={isBuffer:f,isEncoding:p,alloc:y,allocUnsafe:g,allocUnsafeSlow:b,byteLength:w,compare:B,concat:_,copy:M,equals:A,fill:I,from:R,includes:U,indexOf:j,lastIndexOf:Q,swap16:le,swap32:oe,swap64:X,toBuffer:te,toString:pe,write:ue,readDoubleBE:J,readDoubleLE:G,readFloatBE:H,readFloatLE:K,readInt32BE:W,readInt32LE:z,readUInt32BE:fe,readUInt32LE:ae,writeDoubleBE:ne,writeDoubleLE:Z,writeFloatBE:F,writeFloatLE:q,writeInt32BE:Y,writeInt32LE:se,writeUInt32BE:ye,writeUInt32LE:ee}})(Kh,Kh.exports)),Kh.exports}var V0,eC;function P$(){if(eC)return V0;eC=1;var e=(u,l)=>function(){return l||(0,u[Object.keys(u)[0]])((l={exports:{}}).exports,l),l.exports},t=(()=>{for(var u=new Uint8Array(128),l=0;l<64;l++)u[l<26?l+65:l<52?l+71:l<62?l-4:l*4-205]=l;return c=>{for(var h=c.length,f=new Uint8Array((h-(c[h-1]=="=")-(c[h-2]=="="))*3/4|0),p=0,y=0;p<h;){var g=u[c.charCodeAt(p++)],b=u[c.charCodeAt(p++)],w=u[c.charCodeAt(p++)],B=u[c.charCodeAt(p++)];f[y++]=g<<2|b>>4,f[y++]=b<<4|w>>2,f[y++]=w<<6|B}return f}})(),n=e({"wasm-binary:./blake2b.wat"(u,l){l.exports=t("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}}),o=n(),s=WebAssembly.compile(o);return V0=async u=>(await WebAssembly.instantiate(await s,u)).exports,V0}var tC;function k$(){if(tC)return Ci.exports;tC=1;var e=TB(),t=N$(),n=null,o=typeof WebAssembly<"u"&&P$()().then(w=>{n=w}),s=64,u=[];Ci.exports=g;var l=Ci.exports.BYTES_MIN=16,c=Ci.exports.BYTES_MAX=64;Ci.exports.BYTES=32;var h=Ci.exports.KEYBYTES_MIN=16,f=Ci.exports.KEYBYTES_MAX=64;Ci.exports.KEYBYTES=32;var p=Ci.exports.SALTBYTES=16,y=Ci.exports.PERSONALBYTES=16;function g(w,B,_,M,A){if(!(this instanceof g))return new g(w,B,_,M,A);if(!n)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");w||(w=32),A!==!0&&(e(w>=l,"digestLength must be at least "+l+", was given "+w),e(w<=c,"digestLength must be at most "+c+", was given "+w),B!=null&&(e(B instanceof Uint8Array,"key must be Uint8Array or Buffer"),e(B.length>=h,"key must be at least "+h+", was given "+B.length),e(B.length<=f,"key must be at least "+f+", was given "+B.length)),_!=null&&(e(_ instanceof Uint8Array,"salt must be Uint8Array or Buffer"),e(_.length===p,"salt must be exactly "+p+", was given "+_.length)),M!=null&&(e(M instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(M.length===y,"personal must be exactly "+y+", was given "+M.length))),u.length||(u.push(s),s+=216),this.digestLength=w,this.finalized=!1,this.pointer=u.pop(),this._memory=new Uint8Array(n.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=B?B.length:0,this._memory[2]=1,this._memory[3]=1,_&&this._memory.set(_,32),M&&this._memory.set(M,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),n.blake2b_init(this.pointer,this.digestLength),B&&(this.update(B),this._memory.fill(0,s,s+B.length),this._memory[this.pointer+200]=128)}g.prototype._realloc=function(w){n.memory.grow(Math.max(0,Math.ceil(Math.abs(w-this._memory.length)/65536))),this._memory=new Uint8Array(n.memory.buffer)},g.prototype.update=function(w){return e(this.finalized===!1,"Hash instance finalized"),e(w instanceof Uint8Array,"input must be Uint8Array or Buffer"),s+w.length>this._memory.length&&this._realloc(s+w.length),this._memory.set(w,s),n.blake2b_update(this.pointer,s,s+w.length),this},g.prototype.digest=function(w){if(e(this.finalized===!1,"Hash instance finalized"),this.finalized=!0,u.push(this.pointer),n.blake2b_final(this.pointer),!w||w==="binary")return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if(typeof w=="string")return t.toString(this._memory,w,this.pointer+128,this.pointer+128+this.digestLength);e(w instanceof Uint8Array&&w.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var B=0;B<this.digestLength;B++)w[B]=this._memory[this.pointer+128+B];return w},g.prototype.final=g.prototype.digest,g.WASM=n,g.SUPPORTED=typeof WebAssembly<"u",g.ready=function(w){return w||(w=b),o?o.then(()=>w(),w):w(new Error("WebAssembly not supported"))},g.prototype.ready=g.ready,g.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},g.prototype.setPartialHash=function(w){this._memory.set(w,this.pointer)};function b(){}return Ci.exports}var rC;function L$(){if(rC)return un.exports;rC=1;var e=TB(),t=k$();function n(U,j,Q){var P=U[j]+U[Q],re=U[j+1]+U[Q+1];P>=4294967296&&re++,U[j]=P,U[j+1]=re}function o(U,j,Q,P){var re=U[j]+Q;Q<0&&(re+=4294967296);var le=U[j+1]+P;re>=4294967296&&le++,U[j]=re,U[j+1]=le}function s(U,j){return U[j]^U[j+1]<<8^U[j+2]<<16^U[j+3]<<24}function u(U,j,Q,P,re,le){var oe=p[re],X=p[re+1],te=p[le],pe=p[le+1];n(f,U,j),o(f,U,oe,X);var ue=f[P]^f[U],J=f[P+1]^f[U+1];f[P]=J,f[P+1]=ue,n(f,Q,P),ue=f[j]^f[Q],J=f[j+1]^f[Q+1],f[j]=ue>>>24^J<<8,f[j+1]=J>>>24^ue<<8,n(f,U,j),o(f,U,te,pe),ue=f[P]^f[U],J=f[P+1]^f[U+1],f[P]=ue>>>16^J<<16,f[P+1]=J>>>16^ue<<16,n(f,Q,P),ue=f[j]^f[Q],J=f[j+1]^f[Q+1],f[j]=J>>>31^ue<<1,f[j+1]=ue>>>31^J<<1}var l=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],h=new Uint8Array(c.map(function(U){return U*2})),f=new Uint32Array(32),p=new Uint32Array(32);function y(U,j){var Q=0;for(Q=0;Q<16;Q++)f[Q]=U.h[Q],f[Q+16]=l[Q];for(f[24]=f[24]^U.t,f[25]=f[25]^U.t/4294967296,j&&(f[28]=~f[28],f[29]=~f[29]),Q=0;Q<32;Q++)p[Q]=s(U.b,4*Q);for(Q=0;Q<12;Q++)u(0,8,16,24,h[Q*16+0],h[Q*16+1]),u(2,10,18,26,h[Q*16+2],h[Q*16+3]),u(4,12,20,28,h[Q*16+4],h[Q*16+5]),u(6,14,22,30,h[Q*16+6],h[Q*16+7]),u(0,10,20,30,h[Q*16+8],h[Q*16+9]),u(2,12,22,24,h[Q*16+10],h[Q*16+11]),u(4,14,16,26,h[Q*16+12],h[Q*16+13]),u(6,8,18,28,h[Q*16+14],h[Q*16+15]);for(Q=0;Q<16;Q++)U.h[Q]=U.h[Q]^f[Q]^f[Q+16]}var g=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function b(U,j,Q,P){g.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=U,g[0]=U,j&&(g[1]=j.length),g[2]=1,g[3]=1,Q&&g.set(Q,32),P&&g.set(P,48);for(var re=0;re<16;re++)this.h[re]=l[re]^s(g,re*4);j&&(w(this,j),this.c=128)}b.prototype.update=function(U){return e(U instanceof Uint8Array,"input must be Uint8Array or Buffer"),w(this,U),this},b.prototype.digest=function(U){var j=!U||U==="binary"||U==="hex"?new Uint8Array(this.outlen):U;return e(j instanceof Uint8Array,'out must be "binary", "hex", Uint8Array, or Buffer'),e(j.length>=this.outlen,"out must have at least outlen bytes of space"),B(this,j),U==="hex"?_(j):j},b.prototype.final=b.prototype.digest,b.ready=function(U){t.ready(function(){U()})};function w(U,j){for(var Q=0;Q<j.length;Q++)U.c===128&&(U.t+=U.c,y(U,!1),U.c=0),U.b[U.c++]=j[Q]}function B(U,j){for(U.t+=U.c;U.c<128;)U.b[U.c++]=0;y(U,!0);for(var Q=0;Q<U.outlen;Q++)j[Q]=U.h[Q>>2]>>8*(Q&3);return j}function _(U){for(var j="",Q=0;Q<U.length;Q++)j+=M(U[Q]);return j}function M(U){return U<16?"0"+U.toString(16):U.toString(16)}var A=b;un.exports=function(j,Q,P,re,le){return le!==!0&&(e(j>=I,"outlen must be at least "+I+", was given "+j),e(j<=R,"outlen must be at most "+R+", was given "+j),Q!=null&&(e(Q instanceof Uint8Array,"key must be Uint8Array or Buffer"),e(Q.length>=T,"key must be at least "+T+", was given "+Q.length),e(Q.length<=$,"key must be at most "+$+", was given "+Q.length)),P!=null&&(e(P instanceof Uint8Array,"salt must be Uint8Array or Buffer"),e(P.length===k,"salt must be exactly "+k+", was given "+P.length)),re!=null&&(e(re instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(re.length===L,"personal must be exactly "+L+", was given "+re.length))),new A(j,Q,P,re)},un.exports.ready=function(U){t.ready(function(){U()})},un.exports.WASM_SUPPORTED=t.SUPPORTED,un.exports.WASM_LOADED=!1;var I=un.exports.BYTES_MIN=16,R=un.exports.BYTES_MAX=64;un.exports.BYTES=32;var T=un.exports.KEYBYTES_MIN=16,$=un.exports.KEYBYTES_MAX=64;un.exports.KEYBYTES=32;var k=un.exports.SALTBYTES=16,L=un.exports.PERSONALBYTES=16;return t.ready(function(U){U||(un.exports.WASM_LOADED=!0,un.exports=t)}),un.exports}var nC;function z$(){if(nC)return xo;nC=1;var e=xo&&xo.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(xo,"__esModule",{value:!0}),xo.encode=xo.decode=void 0;const t=e(Nb()),n=e(T$()),o=e(L$()),s=(0,n.default)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),u=jr.Buffer.from("SS58PRE"),l=jr.Buffer.alloc(64);function c(y){let g=s.decodeUnsafe(y);if(g==null||g.length<3)throw p(y);let b=g[0],w,B;if(b<64)B=b,w=1;else if(b<128){let M=g[1],A=(b<<2|M>>6)&255,I=M&63;B=A|I<<8,w=2}else throw p(y);let _;switch(g.length-w){case 34:case 35:_=2;break;case 9:case 5:case 3:case 2:_=1;break;default:throw p(y)}f(g,_);for(let M=0;M<_;M++)if(l[M]!=g[g.length-_+M])throw p(y);return{prefix:B,bytes:g.subarray(w,g.length-_)}}xo.decode=c;function h(y){let g=y.prefix;(0,t.default)(Number.isInteger(g)&&g>=0&&g<16384,"invalid prefix");let b=y.bytes.length,w;switch(b){case 1:case 2:case 4:case 8:w=1;break;case 32:case 33:w=2;break;default:(0,t.default)(!1,"invalid address length")}let B,_;g<64?(B=jr.Buffer.allocUnsafe(1+w+b),B[0]=g,_=1):(B=jr.Buffer.allocUnsafe(2+w+b),B[0]=(g&252)>>2|64,B[1]=g>>8|(g&3)<<6,_=2),B.set(y.bytes,_),f(B,w);for(let M=0;M<w;M++)B[_+b+M]=l[M];return s.encode(B)}xo.encode=h;function f(y,g){let b=(0,o.default)(64);b.update(u),b.update(y.subarray(0,y.length-g)),b.digest(l)}function p(y){return new Error("Invalid ss58 address: "+y)}return xo}var $$=z$();function q$(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let f=0;f<t.length;f++)t[f]=255;for(let f=0;f<e.length;f++){const p=e.charAt(f),y=p.charCodeAt(0);if(t[y]!==255)throw new TypeError(p+" is ambiguous");t[y]=f}const n=e.length,o=e.charAt(0),s=Math.log(n)/Math.log(256),u=Math.log(256)/Math.log(n);function l(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";let p=0,y=0,g=0;const b=f.length;for(;g!==b&&f[g]===0;)g++,p++;const w=(b-g)*u+1>>>0,B=new Uint8Array(w);for(;g!==b;){let A=f[g],I=0;for(let R=w-1;(A!==0||I<y)&&R!==-1;R--,I++)A+=256*B[R]>>>0,B[R]=A%n>>>0,A=A/n>>>0;if(A!==0)throw new Error("Non-zero carry");y=I,g++}let _=w-y;for(;_!==w&&B[_]===0;)_++;let M=o.repeat(p);for(;_<w;++_)M+=e.charAt(B[_]);return M}function c(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;let p=0,y=0,g=0;for(;f[p]===o;)y++,p++;const b=(f.length-p)*s+1>>>0,w=new Uint8Array(b);for(;p<f.length;){const A=f.charCodeAt(p);if(A>255)return;let I=t[A];if(I===255)return;let R=0;for(let T=b-1;(I!==0||R<g)&&T!==-1;T--,R++)I+=n*w[T]>>>0,w[T]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");g=R,p++}let B=b-g;for(;B!==b&&w[B]===0;)B++;const _=new Uint8Array(y+(b-B));let M=y;for(;B!==b;)_[M++]=w[B++];return _}function h(f){const p=c(f);if(p)return p;throw new Error("Non-base"+n+" character")}return{encode:l,decodeUnsafe:c,decode:h}}var H$="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const od=q$(H$);function Q$(e){function t(u){var l=Uint8Array.from(u),c=e(l),h=l.length+4,f=new Uint8Array(h);return f.set(l,0),f.set(c.subarray(0,4),l.length),od.encode(f)}function n(u){var l=u.slice(0,-4),c=u.slice(-4),h=e(l);if(!(c[0]^h[0]|c[1]^h[1]|c[2]^h[2]|c[3]^h[3]))return l}function o(u){var l=od.decodeUnsafe(u);if(l!=null)return n(l)}function s(u){var l=od.decode(u),c=n(l);if(c==null)throw new Error("Invalid checksum");return c}return{encode:t,decode:s,decodeUnsafe:o}}function G$(e){return yb(yb(e))}const Np=Q$(G$);var sa={},iC;function K$(){if(iC)return sa;iC=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.bech32m=sa.bech32=void 0;const e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",t={};for(let f=0;f<e.length;f++){const p=e.charAt(f);t[p]=f}function n(f){const p=f>>25;return(f&33554431)<<5^-(p>>0&1)&996825010^-(p>>1&1)&642813549^-(p>>2&1)&513874426^-(p>>3&1)&1027748829^-(p>>4&1)&705979059}function o(f){let p=1;for(let y=0;y<f.length;++y){const g=f.charCodeAt(y);if(g<33||g>126)return"Invalid prefix ("+f+")";p=n(p)^g>>5}p=n(p);for(let y=0;y<f.length;++y){const g=f.charCodeAt(y);p=n(p)^g&31}return p}function s(f,p,y,g){let b=0,w=0;const B=(1<<y)-1,_=[];for(let M=0;M<f.length;++M)for(b=b<<p|f[M],w+=p;w>=y;)w-=y,_.push(b>>w&B);if(g)w>0&&_.push(b<<y-w&B);else{if(w>=p)return"Excess padding";if(b<<y-w&B)return"Non-zero padding"}return _}function u(f){return s(f,8,5,!0)}function l(f){const p=s(f,5,8,!1);if(Array.isArray(p))return p}function c(f){const p=s(f,5,8,!1);if(Array.isArray(p))return p;throw new Error(p)}function h(f){let p;f==="bech32"?p=1:p=734539939;function y(B,_,M){if(M=M||90,B.length+7+_.length>M)throw new TypeError("Exceeds length limit");B=B.toLowerCase();let A=o(B);if(typeof A=="string")throw new Error(A);let I=B+"1";for(let R=0;R<_.length;++R){const T=_[R];if(T>>5!==0)throw new Error("Non 5-bit word");A=n(A)^T,I+=e.charAt(T)}for(let R=0;R<6;++R)A=n(A);A^=p;for(let R=0;R<6;++R){const T=A>>(5-R)*5&31;I+=e.charAt(T)}return I}function g(B,_){if(_=_||90,B.length<8)return B+" too short";if(B.length>_)return"Exceeds length limit";const M=B.toLowerCase(),A=B.toUpperCase();if(B!==M&&B!==A)return"Mixed-case string "+B;B=M;const I=B.lastIndexOf("1");if(I===-1)return"No separator character for "+B;if(I===0)return"Missing prefix for "+B;const R=B.slice(0,I),T=B.slice(I+1);if(T.length<6)return"Data too short";let $=o(R);if(typeof $=="string")return $;const k=[];for(let L=0;L<T.length;++L){const U=T.charAt(L),j=t[U];if(j===void 0)return"Unknown character "+U;$=n($)^j,!(L+6>=T.length)&&k.push(j)}return $!==p?"Invalid checksum for "+B:{prefix:R,words:k}}function b(B,_){const M=g(B,_);if(typeof M=="object")return M}function w(B,_){const M=g(B,_);if(typeof M=="object")return M;throw new Error(M)}return{decodeUnsafe:b,decode:w,encode:y,toWords:u,fromWordsUnsafe:l,fromWords:c}}return sa.bech32=h("bech32"),sa.bech32m=h("bech32m"),sa}var Pb=K$(),W0={exports:{}},oC;function Y$(){return oC||(oC=1,(function(e){(function(){var t=typeof window=="object"?window:{},n=!t.HI_BASE32_NO_NODE_JS&&typeof Ut=="object"&&Ut.versions&&Ut.versions.node;n&&(t=Jc);var o=!t.HI_BASE32_NO_COMMON_JS&&!0&&e.exports,s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),u={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},l=[0,0,0,0,0,0,0,0],c=function(_,M){M.length>10&&(M="..."+M.substr(-10));var A=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+_+" bytes: "+M+" <-");throw A.position=_,A},h=function(_){for(var M="",A=_.length,I=0,R=0,T,$;I<A;){if(T=_[I++],T<=127){M+=String.fromCharCode(T);continue}else T>191&&T<=223?($=T&31,R=1):T<=239?($=T&15,R=2):T<=247?($=T&7,R=3):c(I,M);for(var k=0;k<R;++k)T=_[I++],(T<128||T>191)&&c(I,M),$<<=6,$+=T&63;$>=55296&&$<=57343&&c(I,M),$>1114111&&c(I,M),$<=65535?M+=String.fromCharCode($):($-=65536,M+=String.fromCharCode(($>>10)+55296),M+=String.fromCharCode(($&1023)+56320))}return M},f=function(_){if(_==="")return[];if(!/^[A-Z2-7=]+$/.test(_))throw new Error("Invalid base32 characters");_=_.replace(/=/g,"");for(var M,A,I,R,T,$,k,L,U=[],j=0,Q=_.length,P=0,re=Q>>3<<3;P<re;)M=u[_.charAt(P++)],A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],$=u[_.charAt(P++)],k=u[_.charAt(P++)],L=u[_.charAt(P++)],U[j++]=(M<<3|A>>>2)&255,U[j++]=(A<<6|I<<1|R>>>4)&255,U[j++]=(R<<4|T>>>1)&255,U[j++]=(T<<7|$<<2|k>>>3)&255,U[j++]=(k<<5|L)&255;var le=Q-re;return le===2?(M=u[_.charAt(P++)],A=u[_.charAt(P++)],U[j++]=(M<<3|A>>>2)&255):le===4?(M=u[_.charAt(P++)],A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],U[j++]=(M<<3|A>>>2)&255,U[j++]=(A<<6|I<<1|R>>>4)&255):le===5?(M=u[_.charAt(P++)],A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],U[j++]=(M<<3|A>>>2)&255,U[j++]=(A<<6|I<<1|R>>>4)&255,U[j++]=(R<<4|T>>>1)&255):le===7&&(M=u[_.charAt(P++)],A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],$=u[_.charAt(P++)],k=u[_.charAt(P++)],U[j++]=(M<<3|A>>>2)&255,U[j++]=(A<<6|I<<1|R>>>4)&255,U[j++]=(R<<4|T>>>1)&255,U[j++]=(T<<7|$<<2|k>>>3)&255),U},p=function(_){for(var M,A,I,R,T,$="",k=_.length,L=0,U=parseInt(k/5)*5;L<U;)M=_.charCodeAt(L++),A=_.charCodeAt(L++),I=_.charCodeAt(L++),R=_.charCodeAt(L++),T=_.charCodeAt(L++),$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[(R<<3|T>>>5)&31]+s[T&31];var j=k-U;return j===1?(M=_.charCodeAt(L),$+=s[M>>>3]+s[M<<2&31]+"======"):j===2?(M=_.charCodeAt(L++),A=_.charCodeAt(L),$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):j===3?(M=_.charCodeAt(L++),A=_.charCodeAt(L++),I=_.charCodeAt(L),$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[I<<1&31]+"==="):j===4&&(M=_.charCodeAt(L++),A=_.charCodeAt(L++),I=_.charCodeAt(L++),R=_.charCodeAt(L),$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[R<<3&31]+"="),$},y=function(_){var M,A,I,R,T,$,k=!1,L="",U=0,j,Q=0,P=_.length;if(_==="")return L;do{for(l[0]=l[5],l[1]=l[6],l[2]=l[7],j=Q;U<P&&j<5;++U)$=_.charCodeAt(U),$<128?l[j++]=$:$<2048?(l[j++]=192|$>>6,l[j++]=128|$&63):$<55296||$>=57344?(l[j++]=224|$>>12,l[j++]=128|$>>6&63,l[j++]=128|$&63):($=65536+(($&1023)<<10|_.charCodeAt(++U)&1023),l[j++]=240|$>>18,l[j++]=128|$>>12&63,l[j++]=128|$>>6&63,l[j++]=128|$&63);Q=j-5,U===P&&++U,U>P&&j<6&&(k=!0),M=l[0],j>4?(A=l[1],I=l[2],R=l[3],T=l[4],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[(R<<3|T>>>5)&31]+s[T&31]):j===1?L+=s[M>>>3]+s[M<<2&31]+"======":j===2?(A=l[1],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):j===3?(A=l[1],I=l[2],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[I<<1&31]+"==="):(A=l[1],I=l[2],R=l[3],L+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[R<<3&31]+"=")}while(!k);return L},g=function(_){for(var M,A,I,R,T,$="",k=_.length,L=0,U=parseInt(k/5)*5;L<U;)M=_[L++],A=_[L++],I=_[L++],R=_[L++],T=_[L++],$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[(R<<3|T>>>5)&31]+s[T&31];var j=k-U;return j===1?(M=_[L],$+=s[M>>>3]+s[M<<2&31]+"======"):j===2?(M=_[L++],A=_[L],$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):j===3?(M=_[L++],A=_[L++],I=_[L],$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[I<<1&31]+"==="):j===4&&(M=_[L++],A=_[L++],I=_[L++],R=_[L],$+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[(A<<4|I>>>4)&31]+s[(I<<1|R>>>7)&31]+s[R>>>2&31]+s[R<<3&31]+"="),$},b=function(_,M){var A=typeof _!="string";return A&&_.constructor===ArrayBuffer&&(_=new Uint8Array(_)),A?g(_):M?p(_):y(_)},w=function(_,M){if(!M)return h(f(_));if(_==="")return"";if(!/^[A-Z2-7=]+$/.test(_))throw new Error("Invalid base32 characters");var A,I,R,T,$,k,L,U,j="",Q=_.indexOf("=");Q===-1&&(Q=_.length);for(var P=0,re=Q>>3<<3;P<re;)A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],$=u[_.charAt(P++)],k=u[_.charAt(P++)],L=u[_.charAt(P++)],U=u[_.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|$>>>1)&255)+String.fromCharCode(($<<7|k<<2|L>>>3)&255)+String.fromCharCode((L<<5|U)&255);var le=Q-re;return le===2?(A=u[_.charAt(P++)],I=u[_.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)):le===4?(A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)):le===5?(A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],$=u[_.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|$>>>1)&255)):le===7&&(A=u[_.charAt(P++)],I=u[_.charAt(P++)],R=u[_.charAt(P++)],T=u[_.charAt(P++)],$=u[_.charAt(P++)],k=u[_.charAt(P++)],L=u[_.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|$>>>1)&255)+String.fromCharCode(($<<7|k<<2|L>>>3)&255)),j},B={encode:b,decode:w};w.asBytes=f,o?e.exports=B:t.base32=B})()})(W0)),W0.exports}var V$=Y$();const RB=Wd(V$);var X0={exports:{}},sC;function W$(){return sC||(sC=1,(function(e){(function(){var t="input is invalid type",n="finalize already called",o=typeof window=="object",s=o?window:{};s.JS_SHA512_NO_WINDOW&&(o=!1);var u=!o&&typeof self=="object",l=!s.JS_SHA512_NO_NODE_JS&&typeof Ut=="object"&&Ut.versions&&Ut.versions.node;l?s=Jc:u&&(s=self);var c=!s.JS_SHA512_NO_COMMON_JS&&!0&&e.exports,h=!s.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],y=[24,16,8,0],g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],b=["hex","array","digest","arrayBuffer"],w=[],B=Array.isArray;(s.JS_SHA512_NO_NODE_JS||!B)&&(B=function(U){return Object.prototype.toString.call(U)==="[object Array]"});var _=ArrayBuffer.isView;h&&(s.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!_)&&(_=function(U){return typeof U=="object"&&U.buffer&&U.buffer.constructor===ArrayBuffer});var M=function(U){var j=typeof U;if(j==="string")return[U,!0];if(j!=="object"||U===null)throw new Error(t);if(h&&U.constructor===ArrayBuffer)return[new Uint8Array(U),!1];if(!B(U)&&!_(U))throw new Error(t);return[U,!1]},A=function(U,j){return function(Q){return new $(j,!0).update(Q)[U]()}},I=function(U){var j=A("hex",U);j.create=function(){return new $(U)},j.update=function(re){return j.create().update(re)};for(var Q=0;Q<b.length;++Q){var P=b[Q];j[P]=A(P,U)}return j},R=function(U,j){return function(Q,P){return new k(Q,j,!0).update(P)[U]()}},T=function(U){var j=R("hex",U);j.create=function(re){return new k(re,U)},j.update=function(re,le){return j.create(re).update(le)};for(var Q=0;Q<b.length;++Q){var P=b[Q];j[P]=R(P,U)}return j};function $(U,j){j?(w[0]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=w[16]=w[17]=w[18]=w[19]=w[20]=w[21]=w[22]=w[23]=w[24]=w[25]=w[26]=w[27]=w[28]=w[29]=w[30]=w[31]=w[32]=0,this.blocks=w):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],U==384?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):U==256?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):U==224?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=U,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}$.prototype.update=function(U){if(this.finalized)throw new Error(n);var j=M(U);U=j[0];for(var Q=j[1],P,re=0,le,oe=U.length,X=this.blocks;re<oe;){if(this.hashed&&(this.hashed=!1,X[0]=this.block,this.block=X[1]=X[2]=X[3]=X[4]=X[5]=X[6]=X[7]=X[8]=X[9]=X[10]=X[11]=X[12]=X[13]=X[14]=X[15]=X[16]=X[17]=X[18]=X[19]=X[20]=X[21]=X[22]=X[23]=X[24]=X[25]=X[26]=X[27]=X[28]=X[29]=X[30]=X[31]=X[32]=0),Q)for(le=this.start;re<oe&&le<128;++re)P=U.charCodeAt(re),P<128?X[le>>>2]|=P<<y[le++&3]:P<2048?(X[le>>>2]|=(192|P>>>6)<<y[le++&3],X[le>>>2]|=(128|P&63)<<y[le++&3]):P<55296||P>=57344?(X[le>>>2]|=(224|P>>>12)<<y[le++&3],X[le>>>2]|=(128|P>>>6&63)<<y[le++&3],X[le>>>2]|=(128|P&63)<<y[le++&3]):(P=65536+((P&1023)<<10|U.charCodeAt(++re)&1023),X[le>>>2]|=(240|P>>>18)<<y[le++&3],X[le>>>2]|=(128|P>>>12&63)<<y[le++&3],X[le>>>2]|=(128|P>>>6&63)<<y[le++&3],X[le>>>2]|=(128|P&63)<<y[le++&3]);else for(le=this.start;re<oe&&le<128;++re)X[le>>>2]|=U[re]<<y[le++&3];this.lastByteIndex=le,this.bytes+=le-this.start,le>=128?(this.block=X[32],this.start=le-128,this.hash(),this.hashed=!0):this.start=le}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},$.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var U=this.blocks,j=this.lastByteIndex;U[32]=this.block,U[j>>>2]|=p[j&3],this.block=U[32],j>=112&&(this.hashed||this.hash(),U[0]=this.block,U[1]=U[2]=U[3]=U[4]=U[5]=U[6]=U[7]=U[8]=U[9]=U[10]=U[11]=U[12]=U[13]=U[14]=U[15]=U[16]=U[17]=U[18]=U[19]=U[20]=U[21]=U[22]=U[23]=U[24]=U[25]=U[26]=U[27]=U[28]=U[29]=U[30]=U[31]=U[32]=0),U[30]=this.hBytes<<3|this.bytes>>>29,U[31]=this.bytes<<3,this.hash()}},$.prototype.hash=function(){var U=this.h0h,j=this.h0l,Q=this.h1h,P=this.h1l,re=this.h2h,le=this.h2l,oe=this.h3h,X=this.h3l,te=this.h4h,pe=this.h4l,ue=this.h5h,J=this.h5l,G=this.h6h,H=this.h6l,K=this.h7h,W=this.h7l,z=this.blocks,fe,ae,ne,Z,F,q,Y,se,ye,ee,S,v,C,N,he,ce,Ee,Te,de,we,x,O,D,ie,me;for(fe=32;fe<160;fe+=2)we=z[fe-30],x=z[fe-29],ae=(we>>>1|x<<31)^(we>>>8|x<<24)^we>>>7,ne=(x>>>1|we<<31)^(x>>>8|we<<24)^(x>>>7|we<<25),we=z[fe-4],x=z[fe-3],Z=(we>>>19|x<<13)^(x>>>29|we<<3)^we>>>6,F=(x>>>19|we<<13)^(we>>>29|x<<3)^(x>>>6|we<<26),we=z[fe-32],x=z[fe-31],O=z[fe-14],D=z[fe-13],q=(D&65535)+(x&65535)+(ne&65535)+(F&65535),Y=(D>>>16)+(x>>>16)+(ne>>>16)+(F>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(ae&65535)+(Z&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(ae>>>16)+(Z>>>16)+(se>>>16),z[fe]=ye<<16|se&65535,z[fe+1]=Y<<16|q&65535;var xe=U,Ce=j,ve=Q,Se=P,He=re,Ke=le,Ve=oe,et=X,gt=te,bt=pe,lt=ue,yt=J,tt=G,ft=H,dt=K,At=W;for(ce=ve&He,Ee=Se&Ke,fe=0;fe<160;fe+=8)ae=(xe>>>28|Ce<<4)^(Ce>>>2|xe<<30)^(Ce>>>7|xe<<25),ne=(Ce>>>28|xe<<4)^(xe>>>2|Ce<<30)^(xe>>>7|Ce<<25),Z=(gt>>>14|bt<<18)^(gt>>>18|bt<<14)^(bt>>>9|gt<<23),F=(bt>>>14|gt<<18)^(bt>>>18|gt<<14)^(gt>>>9|bt<<23),ee=xe&ve,S=Ce&Se,Te=ee^xe&He^ce,de=S^Ce&Ke^Ee,ie=gt<^~gt&tt,me=bt&yt^~bt&ft,we=z[fe],x=z[fe+1],O=g[fe],D=g[fe+1],q=(D&65535)+(x&65535)+(me&65535)+(F&65535)+(At&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(F>>>16)+(At>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(ie&65535)+(Z&65535)+(dt&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(ie>>>16)+(Z>>>16)+(dt>>>16)+(se>>>16),we=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Te&65535)+(ae&65535)+(Y>>>16),ye=(Te>>>16)+(ae>>>16)+(se>>>16),O=ye<<16|se&65535,D=Y<<16|q&65535,q=(et&65535)+(x&65535),Y=(et>>>16)+(x>>>16)+(q>>>16),se=(Ve&65535)+(we&65535)+(Y>>>16),ye=(Ve>>>16)+(we>>>16)+(se>>>16),dt=ye<<16|se&65535,At=Y<<16|q&65535,q=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(se>>>16),Ve=ye<<16|se&65535,et=Y<<16|q&65535,ae=(Ve>>>28|et<<4)^(et>>>2|Ve<<30)^(et>>>7|Ve<<25),ne=(et>>>28|Ve<<4)^(Ve>>>2|et<<30)^(Ve>>>7|et<<25),Z=(dt>>>14|At<<18)^(dt>>>18|At<<14)^(At>>>9|dt<<23),F=(At>>>14|dt<<18)^(At>>>18|dt<<14)^(dt>>>9|At<<23),v=Ve&xe,C=et&Ce,Te=v^Ve&ve^ee,de=C^et&Se^S,ie=dt>^~dt<,me=At&bt^~At&yt,we=z[fe+2],x=z[fe+3],O=g[fe+2],D=g[fe+3],q=(D&65535)+(x&65535)+(me&65535)+(F&65535)+(ft&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(F>>>16)+(ft>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(ie&65535)+(Z&65535)+(tt&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(ie>>>16)+(Z>>>16)+(tt>>>16)+(se>>>16),we=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Te&65535)+(ae&65535)+(Y>>>16),ye=(Te>>>16)+(ae>>>16)+(se>>>16),O=ye<<16|se&65535,D=Y<<16|q&65535,q=(Ke&65535)+(x&65535),Y=(Ke>>>16)+(x>>>16)+(q>>>16),se=(He&65535)+(we&65535)+(Y>>>16),ye=(He>>>16)+(we>>>16)+(se>>>16),tt=ye<<16|se&65535,ft=Y<<16|q&65535,q=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(se>>>16),He=ye<<16|se&65535,Ke=Y<<16|q&65535,ae=(He>>>28|Ke<<4)^(Ke>>>2|He<<30)^(Ke>>>7|He<<25),ne=(Ke>>>28|He<<4)^(He>>>2|Ke<<30)^(He>>>7|Ke<<25),Z=(tt>>>14|ft<<18)^(tt>>>18|ft<<14)^(ft>>>9|tt<<23),F=(ft>>>14|tt<<18)^(ft>>>18|tt<<14)^(tt>>>9|ft<<23),N=He&Ve,he=Ke&et,Te=N^He&xe^v,de=he^Ke&Ce^C,ie=tt&dt^~tt>,me=ft&At^~ft&bt,we=z[fe+4],x=z[fe+5],O=g[fe+4],D=g[fe+5],q=(D&65535)+(x&65535)+(me&65535)+(F&65535)+(yt&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(F>>>16)+(yt>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(ie&65535)+(Z&65535)+(lt&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(ie>>>16)+(Z>>>16)+(lt>>>16)+(se>>>16),we=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Te&65535)+(ae&65535)+(Y>>>16),ye=(Te>>>16)+(ae>>>16)+(se>>>16),O=ye<<16|se&65535,D=Y<<16|q&65535,q=(Se&65535)+(x&65535),Y=(Se>>>16)+(x>>>16)+(q>>>16),se=(ve&65535)+(we&65535)+(Y>>>16),ye=(ve>>>16)+(we>>>16)+(se>>>16),lt=ye<<16|se&65535,yt=Y<<16|q&65535,q=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(se>>>16),ve=ye<<16|se&65535,Se=Y<<16|q&65535,ae=(ve>>>28|Se<<4)^(Se>>>2|ve<<30)^(Se>>>7|ve<<25),ne=(Se>>>28|ve<<4)^(ve>>>2|Se<<30)^(ve>>>7|Se<<25),Z=(lt>>>14|yt<<18)^(lt>>>18|yt<<14)^(yt>>>9|lt<<23),F=(yt>>>14|lt<<18)^(yt>>>18|lt<<14)^(lt>>>9|yt<<23),ce=ve&He,Ee=Se&Ke,Te=ce^ve&Ve^N,de=Ee^Se&et^he,ie=lt&tt^~lt&dt,me=yt&ft^~yt&At,we=z[fe+6],x=z[fe+7],O=g[fe+6],D=g[fe+7],q=(D&65535)+(x&65535)+(me&65535)+(F&65535)+(bt&65535),Y=(D>>>16)+(x>>>16)+(me>>>16)+(F>>>16)+(bt>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(ie&65535)+(Z&65535)+(gt&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(ie>>>16)+(Z>>>16)+(gt>>>16)+(se>>>16),we=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Te&65535)+(ae&65535)+(Y>>>16),ye=(Te>>>16)+(ae>>>16)+(se>>>16),O=ye<<16|se&65535,D=Y<<16|q&65535,q=(Ce&65535)+(x&65535),Y=(Ce>>>16)+(x>>>16)+(q>>>16),se=(xe&65535)+(we&65535)+(Y>>>16),ye=(xe>>>16)+(we>>>16)+(se>>>16),gt=ye<<16|se&65535,bt=Y<<16|q&65535,q=(D&65535)+(x&65535),Y=(D>>>16)+(x>>>16)+(q>>>16),se=(O&65535)+(we&65535)+(Y>>>16),ye=(O>>>16)+(we>>>16)+(se>>>16),xe=ye<<16|se&65535,Ce=Y<<16|q&65535;q=(j&65535)+(Ce&65535),Y=(j>>>16)+(Ce>>>16)+(q>>>16),se=(U&65535)+(xe&65535)+(Y>>>16),ye=(U>>>16)+(xe>>>16)+(se>>>16),this.h0h=ye<<16|se&65535,this.h0l=Y<<16|q&65535,q=(P&65535)+(Se&65535),Y=(P>>>16)+(Se>>>16)+(q>>>16),se=(Q&65535)+(ve&65535)+(Y>>>16),ye=(Q>>>16)+(ve>>>16)+(se>>>16),this.h1h=ye<<16|se&65535,this.h1l=Y<<16|q&65535,q=(le&65535)+(Ke&65535),Y=(le>>>16)+(Ke>>>16)+(q>>>16),se=(re&65535)+(He&65535)+(Y>>>16),ye=(re>>>16)+(He>>>16)+(se>>>16),this.h2h=ye<<16|se&65535,this.h2l=Y<<16|q&65535,q=(X&65535)+(et&65535),Y=(X>>>16)+(et>>>16)+(q>>>16),se=(oe&65535)+(Ve&65535)+(Y>>>16),ye=(oe>>>16)+(Ve>>>16)+(se>>>16),this.h3h=ye<<16|se&65535,this.h3l=Y<<16|q&65535,q=(pe&65535)+(bt&65535),Y=(pe>>>16)+(bt>>>16)+(q>>>16),se=(te&65535)+(gt&65535)+(Y>>>16),ye=(te>>>16)+(gt>>>16)+(se>>>16),this.h4h=ye<<16|se&65535,this.h4l=Y<<16|q&65535,q=(J&65535)+(yt&65535),Y=(J>>>16)+(yt>>>16)+(q>>>16),se=(ue&65535)+(lt&65535)+(Y>>>16),ye=(ue>>>16)+(lt>>>16)+(se>>>16),this.h5h=ye<<16|se&65535,this.h5l=Y<<16|q&65535,q=(H&65535)+(ft&65535),Y=(H>>>16)+(ft>>>16)+(q>>>16),se=(G&65535)+(tt&65535)+(Y>>>16),ye=(G>>>16)+(tt>>>16)+(se>>>16),this.h6h=ye<<16|se&65535,this.h6l=Y<<16|q&65535,q=(W&65535)+(At&65535),Y=(W>>>16)+(At>>>16)+(q>>>16),se=(K&65535)+(dt&65535)+(Y>>>16),ye=(K>>>16)+(dt>>>16)+(se>>>16),this.h7h=ye<<16|se&65535,this.h7l=Y<<16|q&65535},$.prototype.hex=function(){this.finalize();var U=this.h0h,j=this.h0l,Q=this.h1h,P=this.h1l,re=this.h2h,le=this.h2l,oe=this.h3h,X=this.h3l,te=this.h4h,pe=this.h4l,ue=this.h5h,J=this.h5l,G=this.h6h,H=this.h6l,K=this.h7h,W=this.h7l,z=this.bits,fe=f[U>>>28&15]+f[U>>>24&15]+f[U>>>20&15]+f[U>>>16&15]+f[U>>>12&15]+f[U>>>8&15]+f[U>>>4&15]+f[U&15]+f[j>>>28&15]+f[j>>>24&15]+f[j>>>20&15]+f[j>>>16&15]+f[j>>>12&15]+f[j>>>8&15]+f[j>>>4&15]+f[j&15]+f[Q>>>28&15]+f[Q>>>24&15]+f[Q>>>20&15]+f[Q>>>16&15]+f[Q>>>12&15]+f[Q>>>8&15]+f[Q>>>4&15]+f[Q&15]+f[P>>>28&15]+f[P>>>24&15]+f[P>>>20&15]+f[P>>>16&15]+f[P>>>12&15]+f[P>>>8&15]+f[P>>>4&15]+f[P&15]+f[re>>>28&15]+f[re>>>24&15]+f[re>>>20&15]+f[re>>>16&15]+f[re>>>12&15]+f[re>>>8&15]+f[re>>>4&15]+f[re&15]+f[le>>>28&15]+f[le>>>24&15]+f[le>>>20&15]+f[le>>>16&15]+f[le>>>12&15]+f[le>>>8&15]+f[le>>>4&15]+f[le&15]+f[oe>>>28&15]+f[oe>>>24&15]+f[oe>>>20&15]+f[oe>>>16&15]+f[oe>>>12&15]+f[oe>>>8&15]+f[oe>>>4&15]+f[oe&15];return z>=256&&(fe+=f[X>>>28&15]+f[X>>>24&15]+f[X>>>20&15]+f[X>>>16&15]+f[X>>>12&15]+f[X>>>8&15]+f[X>>>4&15]+f[X&15]),z>=384&&(fe+=f[te>>>28&15]+f[te>>>24&15]+f[te>>>20&15]+f[te>>>16&15]+f[te>>>12&15]+f[te>>>8&15]+f[te>>>4&15]+f[te&15]+f[pe>>>28&15]+f[pe>>>24&15]+f[pe>>>20&15]+f[pe>>>16&15]+f[pe>>>12&15]+f[pe>>>8&15]+f[pe>>>4&15]+f[pe&15]+f[ue>>>28&15]+f[ue>>>24&15]+f[ue>>>20&15]+f[ue>>>16&15]+f[ue>>>12&15]+f[ue>>>8&15]+f[ue>>>4&15]+f[ue&15]+f[J>>>28&15]+f[J>>>24&15]+f[J>>>20&15]+f[J>>>16&15]+f[J>>>12&15]+f[J>>>8&15]+f[J>>>4&15]+f[J&15]),z==512&&(fe+=f[G>>>28&15]+f[G>>>24&15]+f[G>>>20&15]+f[G>>>16&15]+f[G>>>12&15]+f[G>>>8&15]+f[G>>>4&15]+f[G&15]+f[H>>>28&15]+f[H>>>24&15]+f[H>>>20&15]+f[H>>>16&15]+f[H>>>12&15]+f[H>>>8&15]+f[H>>>4&15]+f[H&15]+f[K>>>28&15]+f[K>>>24&15]+f[K>>>20&15]+f[K>>>16&15]+f[K>>>12&15]+f[K>>>8&15]+f[K>>>4&15]+f[K&15]+f[W>>>28&15]+f[W>>>24&15]+f[W>>>20&15]+f[W>>>16&15]+f[W>>>12&15]+f[W>>>8&15]+f[W>>>4&15]+f[W&15]),fe},$.prototype.toString=$.prototype.hex,$.prototype.digest=function(){this.finalize();var U=this.h0h,j=this.h0l,Q=this.h1h,P=this.h1l,re=this.h2h,le=this.h2l,oe=this.h3h,X=this.h3l,te=this.h4h,pe=this.h4l,ue=this.h5h,J=this.h5l,G=this.h6h,H=this.h6l,K=this.h7h,W=this.h7l,z=this.bits,fe=[U>>>24&255,U>>>16&255,U>>>8&255,U&255,j>>>24&255,j>>>16&255,j>>>8&255,j&255,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255,re>>>24&255,re>>>16&255,re>>>8&255,re&255,le>>>24&255,le>>>16&255,le>>>8&255,le&255,oe>>>24&255,oe>>>16&255,oe>>>8&255,oe&255];return z>=256&&fe.push(X>>>24&255,X>>>16&255,X>>>8&255,X&255),z>=384&&fe.push(te>>>24&255,te>>>16&255,te>>>8&255,te&255,pe>>>24&255,pe>>>16&255,pe>>>8&255,pe&255,ue>>>24&255,ue>>>16&255,ue>>>8&255,ue&255,J>>>24&255,J>>>16&255,J>>>8&255,J&255),z==512&&fe.push(G>>>24&255,G>>>16&255,G>>>8&255,G&255,H>>>24&255,H>>>16&255,H>>>8&255,H&255,K>>>24&255,K>>>16&255,K>>>8&255,K&255,W>>>24&255,W>>>16&255,W>>>8&255,W&255),fe},$.prototype.array=$.prototype.digest,$.prototype.arrayBuffer=function(){this.finalize();var U=this.bits,j=new ArrayBuffer(U/8),Q=new DataView(j);return Q.setUint32(0,this.h0h),Q.setUint32(4,this.h0l),Q.setUint32(8,this.h1h),Q.setUint32(12,this.h1l),Q.setUint32(16,this.h2h),Q.setUint32(20,this.h2l),Q.setUint32(24,this.h3h),U>=256&&Q.setUint32(28,this.h3l),U>=384&&(Q.setUint32(32,this.h4h),Q.setUint32(36,this.h4l),Q.setUint32(40,this.h5h),Q.setUint32(44,this.h5l)),U==512&&(Q.setUint32(48,this.h6h),Q.setUint32(52,this.h6l),Q.setUint32(56,this.h7h),Q.setUint32(60,this.h7l)),j},$.prototype.clone=function(){var U=new $(this.bits,!1);return this.copyTo(U),U},$.prototype.copyTo=function(U){var j=0,Q=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(j=0;j<Q.length;++j)U[Q[j]]=this[Q[j]];for(j=0;j<this.blocks.length;++j)U.blocks[j]=this.blocks[j]};function k(U,j,Q){var P,re=M(U);if(U=re[0],re[1]){for(var le=[],oe=U.length,X=0,te,P=0;P<oe;++P)te=U.charCodeAt(P),te<128?le[X++]=te:te<2048?(le[X++]=192|te>>>6,le[X++]=128|te&63):te<55296||te>=57344?(le[X++]=224|te>>>12,le[X++]=128|te>>>6&63,le[X++]=128|te&63):(te=65536+((te&1023)<<10|U.charCodeAt(++P)&1023),le[X++]=240|te>>>18,le[X++]=128|te>>>12&63,le[X++]=128|te>>>6&63,le[X++]=128|te&63);U=le}U.length>128&&(U=new $(j,!0).update(U).array());for(var pe=[],ue=[],P=0;P<128;++P){var J=U[P]||0;pe[P]=92^J,ue[P]=54^J}$.call(this,j,Q),this.update(ue),this.oKeyPad=pe,this.inner=!0,this.sharedMemory=Q}k.prototype=new $,k.prototype.finalize=function(){if($.prototype.finalize.call(this),this.inner){this.inner=!1;var U=this.array();$.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(U),$.prototype.finalize.call(this)}},k.prototype.clone=function(){var U=new k([],this.bits,!1);this.copyTo(U),U.inner=this.inner;for(var j=0;j<this.oKeyPad.length;++j)U.oKeyPad[j]=this.oKeyPad[j];return U};var L=I(512);L.sha512=L,L.sha384=I(384),L.sha512_256=I(256),L.sha512_224=I(224),L.sha512.hmac=T(512),L.sha384.hmac=T(384),L.sha512_256.hmac=T(256),L.sha512_224.hmac=T(224),c?e.exports=L:(s.sha512=L.sha512,s.sha384=L.sha384,s.sha512_256=L.sha512_256,s.sha512_224=L.sha512_224)})()})(X0)),X0.exports}var X$=W$();const Z$=Wd(X$),MB="3.7.8",J$=MB,sl=typeof jr.Buffer=="function",aC=typeof TextDecoder=="function"?new TextDecoder:void 0,uC=typeof TextEncoder=="function"?new TextEncoder:void 0,eq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",lc=Array.prototype.slice.call(eq),Yh=(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(lc),tq=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Jr=String.fromCharCode.bind(String),lC=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),UB=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),jB=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),DB=e=>{let t,n,o,s,u="";const l=e.length%3;for(let c=0;c<e.length;){if((n=e.charCodeAt(c++))>255||(o=e.charCodeAt(c++))>255||(s=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=n<<16|o<<8|s,u+=lc[t>>18&63]+lc[t>>12&63]+lc[t>>6&63]+lc[t&63]}return l?u.slice(0,l-3)+"===".substring(l):u},cw=typeof btoa=="function"?e=>btoa(e):sl?e=>jr.Buffer.from(e,"binary").toString("base64"):DB,kb=sl?e=>jr.Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,s=e.length;o<s;o+=4096)n.push(Jr.apply(null,e.subarray(o,o+4096)));return cw(n.join(""))},sd=(e,t=!1)=>t?UB(kb(e)):kb(e),rq=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Jr(192|t>>>6)+Jr(128|t&63):Jr(224|t>>>12&15)+Jr(128|t>>>6&63)+Jr(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Jr(240|t>>>18&7)+Jr(128|t>>>12&63)+Jr(128|t>>>6&63)+Jr(128|t&63)}},nq=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,NB=e=>e.replace(nq,rq),cC=sl?e=>jr.Buffer.from(e,"utf8").toString("base64"):uC?e=>kb(uC.encode(e)):e=>cw(NB(e)),Tu=(e,t=!1)=>t?UB(cC(e)):cC(e),fC=e=>Tu(e,!0),iq=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,oq=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return Jr((n>>>10)+55296)+Jr((n&1023)+56320);case 3:return Jr((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Jr((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},PB=e=>e.replace(iq,oq),kB=e=>{if(e=e.replace(/\s+/g,""),!tq.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n,o,s=[];for(let u=0;u<e.length;)t=Yh[e.charAt(u++)]<<18|Yh[e.charAt(u++)]<<12|(n=Yh[e.charAt(u++)])<<6|(o=Yh[e.charAt(u++)]),n===64?s.push(Jr(t>>16&255)):o===64?s.push(Jr(t>>16&255,t>>8&255)):s.push(Jr(t>>16&255,t>>8&255,t&255));return s.join("")},fw=typeof atob=="function"?e=>atob(jB(e)):sl?e=>jr.Buffer.from(e,"base64").toString("binary"):kB,LB=sl?e=>lC(jr.Buffer.from(e,"base64")):e=>lC(fw(e).split("").map(t=>t.charCodeAt(0))),zB=e=>LB($B(e)),sq=sl?e=>jr.Buffer.from(e,"base64").toString("utf8"):aC?e=>aC.decode(LB(e)):e=>PB(fw(e)),$B=e=>jB(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Lb=e=>sq($B(e)),aq=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},qB=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),HB=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,qB(n));e("fromBase64",function(){return Lb(this)}),e("toBase64",function(t){return Tu(this,t)}),e("toBase64URI",function(){return Tu(this,!0)}),e("toBase64URL",function(){return Tu(this,!0)}),e("toUint8Array",function(){return zB(this)})},QB=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,qB(n));e("toBase64",function(t){return sd(this,t)}),e("toBase64URI",function(){return sd(this,!0)}),e("toBase64URL",function(){return sd(this,!0)})},uq=()=>{HB(),QB()},lq={version:MB,VERSION:J$,atob:fw,atobPolyfill:kB,btoa:cw,btoaPolyfill:DB,fromBase64:Lb,toBase64:Tu,encode:Tu,encodeURI:fC,encodeURL:fC,utob:NB,btou:PB,decode:Lb,isValid:aq,fromUint8Array:sd,toUint8Array:zB,extendString:HB,extendUint8Array:QB,extendBuiltins:uq},Da=e=>`${e} is malformed`,GB=e=>`${e} checksum is wrong`,cq=32,hC=32,Vh=36,KB=4,dC=58,pC=32,fq=32,yC=Da("block hash"),hq=Da("tx id"),Z0=Da("address"),dq=GB("address");function pq(e){return Uint8Array.from(Z$.sha512_256.array(e).slice(pC-KB,pC))}function yq(e){if(typeof e!="string")throw new Error(`${Z0}: expected string, got ${typeof e}, ${e}`);if(e.length!==dC)throw new Error(`${Z0}: expected length ${dC}, got ${e.length}: ${e}`);const t=RB.decode.asBytes(e);if(t.length!==Vh)throw new Error(`${Z0}: expected byte length ${Vh}, got ${t.length}`);const n=new Uint8Array(t.slice(0,Vh-KB)),o=new Uint8Array(t.slice(fq,Vh)),s=pq(n);if(!bq(s,o))throw new Error(dq);return!0}function gq(e){const t=lq.toUint8Array("3KYSrPgi16Cl3iLu3r+GaeZkBBrgNFbMB60jsrJtTdI=");if(t.length!==hC)throw new Error(`${hq}: expected byte length ${hC}, got ${t.length}`);return!0}function mq(e){const t=RB.decode.asBytes(e);if(t.length!==cq)throw new Error(`${yC}: expected byte length ${yC}, got ${t.length}`);return!0}function bq(e,t){return e.length!==t.length?!1:Array.from(e).every((n,o)=>n===t[o])}const Aq=34,zb=34,gC=36,vq=Da("block hash"),wq=Da("tx id"),xq=Da("address");function Eq(e){const t=Np.decode(e);if(t.length!==gC)throw new Error(`${xq}: expected byte length ${gC}, got ${t.length}`);return!0}function Sq(e){const t=Np.decode(e);if(t.length!==zb)throw new Error(`${vq}: expected byte length ${Aq}, got ${t.length}`);return!0}function Iq(e){const t=Np.decode(e);if(t.length!==zb)throw new Error(`${wq}: expected byte length ${zb}, got ${t.length}`);return!0}function _q({polynomial:e,numTables:t}){const n=new Uint32Array(256*t);for(let o=0;o<256;o++){let s=o;s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,s=(s&1)*e^s>>>1,n[o]=s}for(let o=256;o<n.length;o++){const s=n[o-256];n[o]=n[s&255]^s>>>8}return n}const Qi=_q({polynomial:3988292384,numTables:8});function Cq(){return-1}function Fq(e,t){const n=t.byteLength,o=new DataView(t.buffer,t.byteOffset,n);let s=e,u=0;const l=-o.byteOffset&3;for(;u<l&&u<n;u++)s=Qi[(s^o.getUint8(u))&255]^s>>>8;if(u===n)return s;u=l;let c=n-u;for(;c>=8;u+=8,c-=8){s^=o.getUint32(u,!0);const h=o.getUint32(u+4,!0);s=Qi[0*256+(h>>>24&255)]^Qi[1*256+(h>>>16&255)]^Qi[2*256+(h>>>8&255)]^Qi[3*256+(h>>>0&255)]^Qi[4*256+(s>>>24&255)]^Qi[5*256+(s>>>16&255)]^Qi[6*256+(s>>>8&255)]^Qi[7*256+(s>>>0&255)]}for(let h=u;h<n;h++)s=Qi[(s^o.getUint8(h))&255]^s>>>8;return s}function Oq(e){return(e^-1)>>>0}function Bq(e){return Oq(Fq(Cq(),e))}const aa=Error,Wh=Error,J0="Unexpected end of buffer",Cu=class Cu{constructor(t){this.initialByte=t}CborInitialByte(t,n){this.initialByte=t<<5|n}static from(t){return new Cu(t)}getInitialByte(){return this.initialByte}getMajorType(){return this.initialByte>>5}getAdditionalInfo(){return this.initialByte&Cu.AdditionalInformationMask}};Cu.IndefiniteLengthBreakByte=255,Cu.AdditionalInformationMask=31;let Os=Cu;var Ro,Fi,Kd,Ru,hr,Yd,Bt,YB,VB,WB,ad,Tn,qb,XB,ud,cc,fc,ua,Hb,la;const Zr=class Zr{constructor(t){Et(this,Bt);Et(this,Ro);Et(this,Fi,0);Et(this,Kd,new Array);Et(this,Ru,!1);Et(this,hr);Et(this,Yd,0);ht(this,Ro,new Uint8Array(jr.Buffer.from(t,"hex"))),ht(this,hr,{currentKeyOffset:null,frameOffset:0,itemsRead:0,type:null})}readStartArray(){var u;const t=We(this,Bt,cc).call(this,4);if(t.getAdditionalInfo()===31)return We(this,Bt,ua).call(this,1),We(this,Bt,Hb).call(this,4),null;const n=We(this,Bt,la).call(this),{length:o,bytesRead:s}=We(u=Zr,Tn,ud).call(u,t,n);return We(this,Bt,ua).call(this,s),We(this,Bt,Hb).call(this,4,o),o}readTag(){const{tag:t,bytesRead:n}=We(this,Bt,XB).call(this);return We(this,Bt,ua).call(this,n),ht(this,Ru,!0),t}readByteString(){var u;const t=We(this,Bt,cc).call(this,2);if(t.getAdditionalInfo()===31){const{val:l,encodingLength:c}=We(this,Bt,WB).call(this,2);return We(this,Bt,ua).call(this,c),We(this,Bt,ad).call(this),l}const n=We(this,Bt,la).call(this),{length:o,bytesRead:s}=We(u=Zr,Tn,ud).call(u,t,n);return We(this,Bt,VB).call(this,s+o),We(this,Bt,ua).call(this,s+o),We(this,Bt,ad).call(this),n.slice(s,s+o)}readInt(){const t=We(this,Bt,YB).call(this);return We(this,Bt,ua).call(this,t.bytesRead),We(this,Bt,ad).call(this),t.signedInt}static ensureReadCapacityInArray(t,n){if(t.length<n)throw new aa(J0)}};Ro=new WeakMap,Fi=new WeakMap,Kd=new WeakMap,Ru=new WeakMap,hr=new WeakMap,Yd=new WeakMap,Bt=new WeakSet,YB=function(){var n,o;const t=We(this,Bt,cc).call(this);switch(t.getMajorType()){case 0:{const{unsignedInt:s,bytesRead:u}=We(n=Zr,Tn,fc).call(n,t,We(this,Bt,la).call(this));return{bytesRead:u,signedInt:BigInt(s)}}case 1:{const{unsignedInt:s,bytesRead:u}=We(o=Zr,Tn,fc).call(o,t,We(this,Bt,la).call(this));return{bytesRead:u,signedInt:BigInt(-1)-s}}default:throw new Wh(`Reader type mismatch, expected 0 or 1 but got ${t.getMajorType()}`)}},VB=function(t){if(Ae(this,Ro).length-Ae(this,Fi)<t)throw new aa(J0)},WB=function(t){var c,h,f;const n=We(this,Bt,la).call(this);let o=jr.Buffer.from([]),s=0,u=1,l=We(c=Zr,Tn,qb).call(c,n.slice(u),t);for(;l.getInitialByte()!==Os.IndefiniteLengthBreakByte;){const{length:p,bytesRead:y}=We(h=Zr,Tn,ud).call(h,l,n.slice(u)),g=y+Number(p);o=jr.Buffer.concat([o,n.slice(u+(g-p),u+g)]),u+=g,l=We(f=Zr,Tn,qb).call(f,n.slice(u),t)}return s=u+1,{encodingLength:s,val:new Uint8Array(o)}},ad=function(){++Ae(this,hr).itemsRead,ht(this,Ru,!1)},Tn=new WeakSet,qb=function(t,n){Zr.ensureReadCapacityInArray(t,1);const o=Os.from(t[0]);if(o.getInitialByte()!==Os.IndefiniteLengthBreakByte&&o.getMajorType()!==n)throw new aa("Indefinite length string contains invalid data item");return o},XB=function(){var s;const t=We(this,Bt,cc).call(this,6),{unsignedInt:n,bytesRead:o}=We(s=Zr,Tn,fc).call(s,t,We(this,Bt,la).call(this));return{bytesRead:o,tag:Number(n)}},ud=function(t,n){var u;const{unsignedInt:o,bytesRead:s}=We(u=Zr,Tn,fc).call(u,t,n);return{bytesRead:s,length:Number(o)}},cc=function(t){if(Ae(this,hr).definiteLength!==void 0&&Ae(this,hr).definiteLength-Ae(this,hr).itemsRead===0)throw new Wh("No more data items to read");if(Ae(this,Fi)===Ae(this,Ro).length)throw Ae(this,hr).type===null&&Ae(this,hr).definiteLength===void 0&&Ae(this,Fi)>0?new Wh("End of root-level. No more data items to read"):new aa(J0);const n=Os.from(Ae(this,Ro)[Ae(this,Fi)]);switch(Ae(this,hr).type){case 2:case 3:if(n.getInitialByte()===Os.IndefiniteLengthBreakByte||n.getMajorType()===Ae(this,hr).type&&n.getAdditionalInfo()!==31)break;throw new aa(`Indefinite length string contains invalid data item, ${n.getMajorType()}`)}if(t&&t!==n.getMajorType())throw new Wh(`Major type mismatch, expected type ${t} but got ${n.getMajorType()}`);return n},fc=function(t,n){if((t.getInitialByte()&Os.AdditionalInformationMask)<24)return{bytesRead:1,unsignedInt:BigInt(t.getAdditionalInfo())};switch(t.getAdditionalInfo()){case 24:return Zr.ensureReadCapacityInArray(n,2),{bytesRead:2,unsignedInt:BigInt(n[1])};case 25:{Zr.ensureReadCapacityInArray(n,3);const s=jr.Buffer.from(n.slice(1)).readUInt16BE();return{bytesRead:3,unsignedInt:BigInt(s)}}case 26:{Zr.ensureReadCapacityInArray(n,5);const s=jr.Buffer.from(n.slice(1)).readUInt32BE();return{bytesRead:5,unsignedInt:BigInt(s)}}case 27:{Zr.ensureReadCapacityInArray(n,9);const o=jr.Buffer.from(n.slice(1,9));let s=BigInt(0);for(const u of o)s=(s<<BigInt(8))+BigInt(u);return{bytesRead:9,unsignedInt:s}}default:throw new aa("Invalid integer encoding")}},ua=function(t){if(Ae(this,Fi)+t>Ae(this,Ro).length)throw new aa("Buffer offset out of bounds");ht(this,Fi,Ae(this,Fi)+t),ht(this,Yd,0)},Hb=function(t,n){const o={currentKeyOffset:Ae(this,hr).currentKeyOffset,definiteLength:Ae(this,hr).definiteLength,frameOffset:Ae(this,hr).frameOffset,itemsRead:Ae(this,hr).itemsRead,type:Ae(this,hr).type};Ae(this,Kd).push(o),Ae(this,hr).type=t,Ae(this,hr).definiteLength=n,Ae(this,hr).itemsRead=0,Ae(this,hr).frameOffset=Ae(this,Fi),ht(this,Ru,!1),Ae(this,hr).currentKeyOffset=null},la=function(){return Ae(this,Ro).slice(Ae(this,Fi))},Et(Zr,Tn);let $b=Zr;const Tq=GB("address");function Rq(e){return ZB(od.decode(e))}function ZB(e){const t=new $b(jr.Buffer.from(e).toString("hex"));t.readStartArray(),t.readTag();const n=t.readByteString();if(Number(t.readInt())!==Bq(n))throw new Error(Tq);return!0}function Mq(e){const t=Pb.bech32.decode(e,Number.MAX_SAFE_INTEGER/2),n=Pb.bech32.fromWords(t.words);if(!["addr","addr_test","stake","stake_test"].includes(t.prefix))return!1;switch(n[0]>>4){case 0:case 1:case 2:case 3:return n.length===57;case 4:case 5:{if(n.length<=29)return!1;let s=29;const u=jr.Buffer.from(n),{bytesRead:l}=eb(u.subarray(s));s+=l;const{bytesRead:c}=eb(u.subarray(s));return s+=c,eb(u.subarray(s)),!0}case 6:case 7:return n.length===47;case 14:case 15:return n.length===47;case 8:return ZB(new Uint8Array(n));default:throw new Error(Da("address"))}}const eb=e=>{let t=!0,n=0n,o=0;for(;t&&o<e.length;){const s=e[o];n<<=7n,n|=BigInt(s&127),t=(s&128)!==0,++o}return{bytesRead:o,value:n}};var Sr=(e=>(e[e.NONE=-1]="NONE",e[e.EVM=0]="EVM",e[e.CARDANO=1]="CARDANO",e[e.SUBSTRATE=2]="SUBSTRATE",e[e.ALGORAND=3]="ALGORAND",e[e.MINA=4]="MINA",e[e.MIDNIGHT=5]="MIDNIGHT",e[e.AVAIL=6]="AVAIL",e[e.POLKADOT=7]="POLKADOT",e))(Sr||{});function Di(e,t,n=()=>!0){try{return n(t(e))}catch{return!1}}eo("algorand-address",e=>Di(e,yq));eo("algorand-blockhash",e=>Di(e,gq));eo("algorand-txid",e=>Di(e,mq));eo("mina-address",e=>Di(e,Eq));eo("mina-blockhash",e=>Di(e,Sq));eo("mina-txid",e=>Di(e,Iq));eo("cardano-address",e=>Di(e,Rq)||Di(e,Mq));eo("ss58",e=>Di(e,$$.decode));eo("bs58check",e=>Di(e,Np.decode));eo("bech32",e=>Di(e,t=>Pb.bech32.decode(t,Number.MAX_SAFE_INTEGER/2)));function ln(e){return je.Transform(e).Decode(t=>t.toLowerCase()).Encode(t=>t.toLowerCase())}function mC(e){return je.Transform(e).Decode(t=>t.toUpperCase()).Encode(t=>t.toUpperCase())}const en={Uint256:je.Transform(je.BigInt({maximum:115792089237316195423570985008687907853269984665640564039457584007913129639935n,minimum:0n})).Decode(e=>e.toString()).Encode(e=>BigInt(e)),Algorand:{BlockHash:je.Unsafe(je.String({format:"algorand-blockhash"})),TxHash:je.Unsafe(mC(je.String({format:"algorand-txid"}))),Address:je.Unsafe(mC(je.String({format:"algorand-address"})))},Substrate:{Address:je.Unsafe(je.String({format:"ss58"}))},Avail:{BlockHash:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{64}$/))),Address:je.Unsafe(je.String({format:"ss58"}))},Cardano:{BlockHash:je.Unsafe(ln(je.RegExp(/^[a-fA-F0-9]{64}$/))),TxHash:je.Unsafe(ln(je.RegExp(/^[a-fA-F0-9]{64}$/))),Address:je.Unsafe(je.String({format:"cardano-address"})),Credential:je.Unsafe(ln(je.RegExp(/^[a-fA-F0-9]{64}$/))),PoolId:je.Unsafe(ln(je.String())),PolicyId:je.Unsafe(ln(je.RegExp(/^[a-fA-F0-9]{56}$/))),AssetName:je.Unsafe(ln(je.RegExp(/^[a-fA-F0-9]{64}$/))),Cip14Fingerprint:je.Unsafe(je.String()),AmountLovelace:je.Unsafe(je.RegExp(/^\d+$/))},Evm:{BlockHash:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{64}$/))),TxHash:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{64}$/))),Address:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{40}$/))),Selector:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{8}$/))),FullSelector:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{64}$/))),Signature:je.Unsafe(je.RegExp(/^0x[a-fA-F0-9]{130}$/)),PrivateKey:je.Unsafe(je.RegExp(/^0x[a-fA-F0-9]{64}$/))},Midnight:{BlockHash:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{64}$/))),TxHash:je.Unsafe(ln(je.RegExp(/^0x[a-fA-F0-9]{64}$/))),Address:je.Unsafe(ln(je.RegExp(/^[a-fA-F0-9]{181}$/)))},Mina:{BlockHash:je.Unsafe(je.String({format:"mina-blockhash"})),TxHash:je.Unsafe(je.String({format:"mina-txid"})),Address:je.Unsafe(je.String({format:"mina-address"}))},Polkadot:{BlockHash:je.Unsafe(je.String({format:"mina-blockhash"})),TxHash:je.Unsafe(je.String({format:"mina-txid"})),Address:je.Unsafe(je.String({format:"mina-address"}))},Caip2:je.Unsafe(je.String()),TimestampMsStr:je.Unsafe(je.RegExp(/^\d+$/)),UnknownFormat:je.Unsafe(je.String()),Lowercase:ln(je.String()),TrueOrFalse:je.Transform(je.Union([je.Literal("T"),je.Literal("F")])).Decode(e=>e==="T").Encode(e=>e?"T":"F"),EvmAbiEvent:je.Unsafe(je.Any())},Uq={[-1]:je.Literal("0x0"),0:en.Evm.Address,1:en.Cardano.Address,2:en.Substrate.Address,6:en.Avail.Address,3:en.Algorand.Address,4:en.Mina.Address,5:en.Midnight.Address,7:en.Polkadot.Address};je.Object({type:je.Literal(-1),address:je.Literal("0x0")}),je.Object({type:je.Literal(0),address:en.Evm.Address}),je.Object({type:je.Literal(1),address:en.Cardano.Address}),je.Object({type:je.Literal(2),address:en.Substrate.Address}),je.Object({type:je.Literal(6),address:en.Avail.Address}),je.Object({type:je.Literal(3),address:en.Algorand.Address}),je.Object({type:je.Literal(4),address:en.Mina.Address}),je.Object({type:je.Literal(5),address:en.Midnight.Address}),je.Object({type:je.Literal(7),address:en.Polkadot.Address});function hw(e){return Object.fromEntries(Object.entries(e).map(([n,o])=>{const s=o.map(([l,c])=>c),u=je.Tuple([je.Literal(n),...s]);return[n,u]}))}function Eo(e){return["userAddress",Uq[e]]}const So=[["userSignature",je.String()],["conciseInput",je.String()],["millisecondTimestamp",je.String()]],jq={[`${Sr.NONE}`]:[Eo(Sr.NONE),...So],[`${Sr.EVM}`]:[Eo(Sr.EVM),...So],[`${Sr.CARDANO}`]:[Eo(Sr.CARDANO),...So],[`${Sr.SUBSTRATE}`]:[Eo(Sr.SUBSTRATE),...So],[`${Sr.AVAIL}`]:[Eo(Sr.AVAIL),...So],[`${Sr.ALGORAND}`]:[Eo(Sr.ALGORAND),...So],[`${Sr.MINA}`]:[Eo(Sr.MINA),...So],[`${Sr.MIDNIGHT}`]:[Eo(Sr.MIDNIGHT),...So],[`${Sr.POLKADOT}`]:[Eo(Sr.POLKADOT),...So]};hw(jq);const Dq={batcherInput:"&B"},Nq={[Dq.batcherInput]:[["input",je.Array(je.String())]]};hw(Nq);const tb={createAccount:"&createAccount",linkAddress:"&linkAddress",unlinkAddress:"&unlinkAddress"},Pq={[tb.createAccount]:[],[tb.linkAddress]:[["account_id",je.Number()],["signature_from_primary",je.String()],["primary_address_type",je.Number()],["new_address",je.String()],["signature_from_new_address",je.String()],["new_address_type",je.Number()],["is_new_primary",je.Boolean()]],[tb.unlinkAddress]:[["account_id",je.Number()],["signature_from_primary",je.String()],["primary_address_type",je.Number()],["target_address",je.String()],["target_address_type",je.Number()],["new_primary_address",je.String()],["new_primary_address_type",je.Number()]]};hw(Pq);var rb={exports:{}},bC;function kq(){return bC||(bC=1,(function(e){(function(){var t="input is invalid type",n="finalize already called",o=typeof window=="object",s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var u=!o&&typeof self=="object",l=!s.JS_SHA3_NO_NODE_JS&&typeof Ut=="object"&&Ut.versions&&Ut.versions.node;l?s=Jc:u&&(s=self);for(var c=!s.JS_SHA3_NO_COMMON_JS&&!0&&e.exports,h=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),p=[31,7936,2031616,520093696],y=[4,1024,262144,67108864],g=[1,256,65536,16777216],b=[6,1536,393216,100663296],w=[0,8,16,24],B=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],_=[224,256,384,512],M=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],I={128:168,256:136},R=s.JS_SHA3_NO_NODE_JS||!Array.isArray?function(F){return Object.prototype.toString.call(F)==="[object Array]"}:Array.isArray,T=h&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)?function(F){return typeof F=="object"&&F.buffer&&F.buffer.constructor===ArrayBuffer}:ArrayBuffer.isView,$=function(F){var q=typeof F;if(q==="string")return[F,!0];if(q!=="object"||F===null)throw new Error(t);if(h&&F.constructor===ArrayBuffer)return[new Uint8Array(F),!1];if(!R(F)&&!T(F))throw new Error(t);return[F,!1]},k=function(F){return $(F)[0].length===0},L=function(F){for(var q=[],Y=0;Y<F.length;++Y)q[Y]=F[Y];return q},U=function(F,q,Y){return function(se){return new ae(F,q,F).update(se)[Y]()}},j=function(F,q,Y){return function(se,ye){return new ae(F,q,ye).update(se)[Y]()}},Q=function(F,q,Y){return function(se,ye,ee,S){return ue["cshake"+F].update(se,ye,ee,S)[Y]()}},P=function(F,q,Y){return function(se,ye,ee,S){return ue["kmac"+F].update(se,ye,ee,S)[Y]()}},re=function(F,q,Y,se){for(var ye=0;ye<A.length;++ye){var ee=A[ye];F[ee]=q(Y,se,ee)}return F},le=function(F,q){var Y=U(F,q,"hex");return Y.create=function(){return new ae(F,q,F)},Y.update=function(se){return Y.create().update(se)},re(Y,U,F,q)},oe=function(F,q){var Y=j(F,q,"hex");return Y.create=function(se){return new ae(F,q,se)},Y.update=function(se,ye){return Y.create(ye).update(se)},re(Y,j,F,q)},X=function(F,q){var Y=I[F],se=Q(F,q,"hex");return se.create=function(ye,ee,S){return k(ee)&&k(S)?ue["shake"+F].create(ye):new ae(F,q,ye).bytepad([ee,S],Y)},se.update=function(ye,ee,S,v){return se.create(ee,S,v).update(ye)},re(se,Q,F,q)},te=function(F,q){var Y=I[F],se=P(F,q,"hex");return se.create=function(ye,ee,S){return new ne(F,q,ee).bytepad(["KMAC",S],Y).bytepad([ye],Y)},se.update=function(ye,ee,S,v){return se.create(ye,S,v).update(ee)},re(se,P,F,q)},pe=[{name:"keccak",padding:g,bits:_,createMethod:le},{name:"sha3",padding:b,bits:_,createMethod:le},{name:"shake",padding:p,bits:M,createMethod:oe},{name:"cshake",padding:y,bits:M,createMethod:X},{name:"kmac",padding:y,bits:M,createMethod:te}],ue={},J=[],G=0;G<pe.length;++G)for(var H=pe[G],K=H.bits,W=0;W<K.length;++W){var z=H.name+"_"+K[W];if(J.push(z),ue[z]=H.createMethod(K[W],H.padding),H.name!=="sha3"){var fe=H.name+K[W];J.push(fe),ue[fe]=ue[z]}}function ae(F,q,Y){this.blocks=[],this.s=[],this.padding=q,this.outputBits=Y,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(F<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Y>>5,this.extraBytes=(Y&31)>>3;for(var se=0;se<50;++se)this.s[se]=0}ae.prototype.update=function(F){if(this.finalized)throw new Error(n);var q=$(F);F=q[0];for(var Y=q[1],se=this.blocks,ye=this.byteCount,ee=F.length,S=this.blockCount,v=0,C=this.s,N,he;v<ee;){if(this.reset)for(this.reset=!1,se[0]=this.block,N=1;N<S+1;++N)se[N]=0;if(Y)for(N=this.start;v<ee&&N<ye;++v)he=F.charCodeAt(v),he<128?se[N>>2]|=he<<w[N++&3]:he<2048?(se[N>>2]|=(192|he>>6)<<w[N++&3],se[N>>2]|=(128|he&63)<<w[N++&3]):he<55296||he>=57344?(se[N>>2]|=(224|he>>12)<<w[N++&3],se[N>>2]|=(128|he>>6&63)<<w[N++&3],se[N>>2]|=(128|he&63)<<w[N++&3]):(he=65536+((he&1023)<<10|F.charCodeAt(++v)&1023),se[N>>2]|=(240|he>>18)<<w[N++&3],se[N>>2]|=(128|he>>12&63)<<w[N++&3],se[N>>2]|=(128|he>>6&63)<<w[N++&3],se[N>>2]|=(128|he&63)<<w[N++&3]);else for(N=this.start;v<ee&&N<ye;++v)se[N>>2]|=F[v]<<w[N++&3];if(this.lastByteIndex=N,N>=ye){for(this.start=N-ye,this.block=se[S],N=0;N<S;++N)C[N]^=se[N];Z(C),this.reset=!0}else this.start=N}return this},ae.prototype.encode=function(F,q){var Y=F&255,se=1,ye=[Y];for(F=F>>8,Y=F&255;Y>0;)ye.unshift(Y),F=F>>8,Y=F&255,++se;return q?ye.push(se):ye.unshift(se),this.update(ye),ye.length},ae.prototype.encodeString=function(F){var q=$(F);F=q[0];var Y=q[1],se=0,ye=F.length;if(Y)for(var ee=0;ee<F.length;++ee){var S=F.charCodeAt(ee);S<128?se+=1:S<2048?se+=2:S<55296||S>=57344?se+=3:(S=65536+((S&1023)<<10|F.charCodeAt(++ee)&1023),se+=4)}else se=ye;return se+=this.encode(se*8),this.update(F),se},ae.prototype.bytepad=function(F,q){for(var Y=this.encode(q),se=0;se<F.length;++se)Y+=this.encodeString(F[se]);var ye=(q-Y%q)%q,ee=[];return ee.length=ye,this.update(ee),this},ae.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var F=this.blocks,q=this.lastByteIndex,Y=this.blockCount,se=this.s;if(F[q>>2]|=this.padding[q&3],this.lastByteIndex===this.byteCount)for(F[0]=F[Y],q=1;q<Y+1;++q)F[q]=0;for(F[Y-1]|=2147483648,q=0;q<Y;++q)se[q]^=F[q];Z(se)}},ae.prototype.toString=ae.prototype.hex=function(){this.finalize();for(var F=this.blockCount,q=this.s,Y=this.outputBlocks,se=this.extraBytes,ye=0,ee=0,S="",v;ee<Y;){for(ye=0;ye<F&&ee<Y;++ye,++ee)v=q[ye],S+=f[v>>4&15]+f[v&15]+f[v>>12&15]+f[v>>8&15]+f[v>>20&15]+f[v>>16&15]+f[v>>28&15]+f[v>>24&15];ee%F===0&&(q=L(q),Z(q),ye=0)}return se&&(v=q[ye],S+=f[v>>4&15]+f[v&15],se>1&&(S+=f[v>>12&15]+f[v>>8&15]),se>2&&(S+=f[v>>20&15]+f[v>>16&15])),S},ae.prototype.arrayBuffer=function(){this.finalize();var F=this.blockCount,q=this.s,Y=this.outputBlocks,se=this.extraBytes,ye=0,ee=0,S=this.outputBits>>3,v;se?v=new ArrayBuffer(Y+1<<2):v=new ArrayBuffer(S);for(var C=new Uint32Array(v);ee<Y;){for(ye=0;ye<F&&ee<Y;++ye,++ee)C[ee]=q[ye];ee%F===0&&(q=L(q),Z(q))}return se&&(C[ee]=q[ye],v=v.slice(0,S)),v},ae.prototype.buffer=ae.prototype.arrayBuffer,ae.prototype.digest=ae.prototype.array=function(){this.finalize();for(var F=this.blockCount,q=this.s,Y=this.outputBlocks,se=this.extraBytes,ye=0,ee=0,S=[],v,C;ee<Y;){for(ye=0;ye<F&&ee<Y;++ye,++ee)v=ee<<2,C=q[ye],S[v]=C&255,S[v+1]=C>>8&255,S[v+2]=C>>16&255,S[v+3]=C>>24&255;ee%F===0&&(q=L(q),Z(q))}return se&&(v=ee<<2,C=q[ye],S[v]=C&255,se>1&&(S[v+1]=C>>8&255),se>2&&(S[v+2]=C>>16&255)),S};function ne(F,q,Y){ae.call(this,F,q,Y)}ne.prototype=new ae,ne.prototype.finalize=function(){return this.encode(this.outputBits,!0),ae.prototype.finalize.call(this)};var Z=function(F){var q,Y,se,ye,ee,S,v,C,N,he,ce,Ee,Te,de,we,x,O,D,ie,me,xe,Ce,ve,Se,He,Ke,Ve,et,gt,bt,lt,yt,tt,ft,dt,At,Xt,br,be,Ie,Ye,Je,ot,qt,tr,Br,Ln,Tr,Ht,rr,Rr,Mr,gn,wn,Pr,Ar,Vo,wi,xi,ki,Ei,ar,$s;for(se=0;se<48;se+=2)ye=F[0]^F[10]^F[20]^F[30]^F[40],ee=F[1]^F[11]^F[21]^F[31]^F[41],S=F[2]^F[12]^F[22]^F[32]^F[42],v=F[3]^F[13]^F[23]^F[33]^F[43],C=F[4]^F[14]^F[24]^F[34]^F[44],N=F[5]^F[15]^F[25]^F[35]^F[45],he=F[6]^F[16]^F[26]^F[36]^F[46],ce=F[7]^F[17]^F[27]^F[37]^F[47],Ee=F[8]^F[18]^F[28]^F[38]^F[48],Te=F[9]^F[19]^F[29]^F[39]^F[49],q=Ee^(S<<1|v>>>31),Y=Te^(v<<1|S>>>31),F[0]^=q,F[1]^=Y,F[10]^=q,F[11]^=Y,F[20]^=q,F[21]^=Y,F[30]^=q,F[31]^=Y,F[40]^=q,F[41]^=Y,q=ye^(C<<1|N>>>31),Y=ee^(N<<1|C>>>31),F[2]^=q,F[3]^=Y,F[12]^=q,F[13]^=Y,F[22]^=q,F[23]^=Y,F[32]^=q,F[33]^=Y,F[42]^=q,F[43]^=Y,q=S^(he<<1|ce>>>31),Y=v^(ce<<1|he>>>31),F[4]^=q,F[5]^=Y,F[14]^=q,F[15]^=Y,F[24]^=q,F[25]^=Y,F[34]^=q,F[35]^=Y,F[44]^=q,F[45]^=Y,q=C^(Ee<<1|Te>>>31),Y=N^(Te<<1|Ee>>>31),F[6]^=q,F[7]^=Y,F[16]^=q,F[17]^=Y,F[26]^=q,F[27]^=Y,F[36]^=q,F[37]^=Y,F[46]^=q,F[47]^=Y,q=he^(ye<<1|ee>>>31),Y=ce^(ee<<1|ye>>>31),F[8]^=q,F[9]^=Y,F[18]^=q,F[19]^=Y,F[28]^=q,F[29]^=Y,F[38]^=q,F[39]^=Y,F[48]^=q,F[49]^=Y,de=F[0],we=F[1],Br=F[11]<<4|F[10]>>>28,Ln=F[10]<<4|F[11]>>>28,et=F[20]<<3|F[21]>>>29,gt=F[21]<<3|F[20]>>>29,ki=F[31]<<9|F[30]>>>23,Ei=F[30]<<9|F[31]>>>23,Je=F[40]<<18|F[41]>>>14,ot=F[41]<<18|F[40]>>>14,ft=F[2]<<1|F[3]>>>31,dt=F[3]<<1|F[2]>>>31,x=F[13]<<12|F[12]>>>20,O=F[12]<<12|F[13]>>>20,Tr=F[22]<<10|F[23]>>>22,Ht=F[23]<<10|F[22]>>>22,bt=F[33]<<13|F[32]>>>19,lt=F[32]<<13|F[33]>>>19,ar=F[42]<<2|F[43]>>>30,$s=F[43]<<2|F[42]>>>30,wn=F[5]<<30|F[4]>>>2,Pr=F[4]<<30|F[5]>>>2,At=F[14]<<6|F[15]>>>26,Xt=F[15]<<6|F[14]>>>26,D=F[25]<<11|F[24]>>>21,ie=F[24]<<11|F[25]>>>21,rr=F[34]<<15|F[35]>>>17,Rr=F[35]<<15|F[34]>>>17,yt=F[45]<<29|F[44]>>>3,tt=F[44]<<29|F[45]>>>3,Se=F[6]<<28|F[7]>>>4,He=F[7]<<28|F[6]>>>4,Ar=F[17]<<23|F[16]>>>9,Vo=F[16]<<23|F[17]>>>9,br=F[26]<<25|F[27]>>>7,be=F[27]<<25|F[26]>>>7,me=F[36]<<21|F[37]>>>11,xe=F[37]<<21|F[36]>>>11,Mr=F[47]<<24|F[46]>>>8,gn=F[46]<<24|F[47]>>>8,qt=F[8]<<27|F[9]>>>5,tr=F[9]<<27|F[8]>>>5,Ke=F[18]<<20|F[19]>>>12,Ve=F[19]<<20|F[18]>>>12,wi=F[29]<<7|F[28]>>>25,xi=F[28]<<7|F[29]>>>25,Ie=F[38]<<8|F[39]>>>24,Ye=F[39]<<8|F[38]>>>24,Ce=F[48]<<14|F[49]>>>18,ve=F[49]<<14|F[48]>>>18,F[0]=de^~x&D,F[1]=we^~O&ie,F[10]=Se^~Ke&et,F[11]=He^~Ve>,F[20]=ft^~At&br,F[21]=dt^~Xt&be,F[30]=qt^~Br&Tr,F[31]=tr^~Ln&Ht,F[40]=wn^~Ar&wi,F[41]=Pr^~Vo&xi,F[2]=x^~D&me,F[3]=O^~ie&xe,F[12]=Ke^~et&bt,F[13]=Ve^~gt<,F[22]=At^~br&Ie,F[23]=Xt^~be&Ye,F[32]=Br^~Tr&rr,F[33]=Ln^~Ht&Rr,F[42]=Ar^~wi&ki,F[43]=Vo^~xi&Ei,F[4]=D^~me&Ce,F[5]=ie^~xe&ve,F[14]=et^~bt&yt,F[15]=gt^~lt&tt,F[24]=br^~Ie&Je,F[25]=be^~Ye&ot,F[34]=Tr^~rr&Mr,F[35]=Ht^~Rr&gn,F[44]=wi^~ki&ar,F[45]=xi^~Ei&$s,F[6]=me^~Ce&de,F[7]=xe^~ve&we,F[16]=bt^~yt&Se,F[17]=lt^~tt&He,F[26]=Ie^~Je&ft,F[27]=Ye^~ot&dt,F[36]=rr^~Mr&qt,F[37]=Rr^~gn&tr,F[46]=ki^~ar&wn,F[47]=Ei^~$s&Pr,F[8]=Ce^~de&x,F[9]=ve^~we&O,F[18]=yt^~Se&Ke,F[19]=tt^~He&Ve,F[28]=Je^~ft&At,F[29]=ot^~dt&Xt,F[38]=Mr^~qt&Br,F[39]=gn^~tr&Ln,F[48]=ar^~wn&Ar,F[49]=$s^~Pr&Vo,F[0]^=B[se],F[1]^=B[se+1]};if(c)e.exports=ue;else for(G=0;G<J.length;++G)s[J[G]]=ue[J[G]]})()})(rb)),rb.exports}var Lq=kq();const JB=Wd(Lq),{keccak_256:OG}=JB;function zq(e,t,n,o,s,u=void 0){let l;switch(o){case Sr.EVM:l=z9(en.Evm.Address,n);break;default:throw new Error("NYI: Unsupported wallet address type: "+o)}return(""+(u??"")+t+l+s).replace(/[^a-zA-Z0-9]/g,"-").toLocaleLowerCase()}const $q={EVM:0};async function qq(e,t,n=void 0){const o=xs(t.privateKey),s=td({account:o,chain:nd,transport:rd()}),u=Date.now().toString(),l=o.address,c=$q.EVM,h=zq(null,u,l,c,e,n),f=await s.signMessage({account:o,message:h});return{addressType:c,address:l,signature:f,input:e,timestamp:u,target:n}}async function Hq(e){const t=await fetch(BD,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:e})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}async function Xh(e,t,n=void 0){console.log("🚀 Creating signed input for:",e);const o=await qq(e,t,n);console.log("✅ Signed input created:",{...o,signature:o.signature.slice(0,10)+"..."}),console.log("📤 Sending to batcher...");const s=await Hq(o);return console.log("🎉 Batcher response:",s),s}function Qq(){const[e,t]=Xe.useState([]),[n,o]=Xe.useState(!0),[s,u]=Xe.useState(null),[l,c]=Xe.useState(10),[h,f]=Xe.useState(0),[p,y]=Xe.useState([void 0]),[g,b]=Xe.useState(!1),[w,B]=Xe.useState([]),[_,M]=Xe.useState(null),[A,I]=Xe.useState([]),[R,T]=Xe.useState(!1),[$,k]=Xe.useState(!1),[L,U]=Xe.useState(!1),[j,Q]=Xe.useState(""),[P,re]=Xe.useState(""),[le,oe]=Xe.useState(""),[X,te]=Xe.useState(null),[pe,ue]=Xe.useState(null),J=(ee,S,v)=>{const C=Date.now(),N={id:C,type:ee,title:S,message:v};I(he=>[...he,N]),setTimeout(()=>{I(he=>he.filter(ce=>ce.id!==C))},5e3)},G=ee=>{I(S=>S.filter(v=>v.id!==ee))},H=()=>{const ee=cM(),S=xs(ee),v={id:Date.now().toString(),privateKey:ee,address:S.address,name:`Wallet ${w.length+1}`};B(C=>[...C,v]),M(v),J("success","Wallet Generated",`New wallet created: ${S.address.slice(0,6)}...${S.address.slice(-4)}`)},K=ee=>{B(S=>S.filter(v=>v.id!==ee)),(_==null?void 0:_.id)===ee&&M(null)},W=async()=>{if(!_){J("error","No Wallet","Please select a wallet first");return}U(!0);try{const S=JSON.stringify(["&createAccount"]);await Xh(S,_),J("success","Account Created","Successfully created account! Use the refresh button to see updated addresses.")}catch(ee){J("error","Create Account Error",`Error creating account: ${ee instanceof Error?ee.message:"Unknown error"}`)}finally{U(!1)}},z=async()=>{if(!_){J("error","No Wallet","Please select a wallet first");return}if(!X){J("error","No Account","Please select an account ID");return}U(!0);try{const ee=["&unlinkAddress",X.toString(),"","",""],S=JSON.stringify(ee);await Xh(S,_),J("success","Self Unlinked","Successfully unlinked self from account! Use the refresh button to see updated addresses.")}catch(ee){J("error","Unlink Self Error",`Error unlinking self: ${ee instanceof Error?ee.message:"Unknown error"}`)}finally{U(!1)}},fe=async()=>{if(!_){J("error","No Wallet","Please select a wallet first");return}if(!X){J("error","No Account","Please select an account ID");return}if(!le.trim()){J("error","No Address","Please enter an address to unlink");return}const ee=td({account:xs(_.privateKey),chain:nd,transport:rd()});U(!0);const S=`unlink:${String(X)}:${le.toString().toLowerCase().trim()}:`,v=await ee.signMessage({account:xs(_.privateKey),message:S});try{const C=["&unlinkAddress",X.toString(),v,le.toString().toLowerCase().trim(),""],N=JSON.stringify(C);await Xh(N,_),J("success","Address Unlinked","Successfully unlinked address from account! Use the refresh button to see updated addresses."),oe("")}catch(C){J("error","Unlink Other Error",`Error unlinking address: ${C instanceof Error?C.message:"Unknown error"}`)}finally{U(!1)}},ae=async()=>{if(!_){J("error","No Wallet","Please select a wallet first");return}if(!X){J("error","No Account","Please select an account ID");return}if(!pe){J("error","No Link Wallet","Please select a wallet to link");return}U(!0);try{const ee=td({account:xs(_.privateKey),chain:nd,transport:rd()}),S=td({account:xs(pe.privateKey),chain:nd,transport:rd()}),v=`link:${X}:${pe.address.toString().toLowerCase().trim()}:false`,C=await ee.signMessage({account:xs(_.privateKey),message:v}),N=`link:${X}:${_.address.toString().toLowerCase().trim()}:false`,he=await S.signMessage({account:xs(pe.privateKey),message:N}),ce=["&linkAddress",X.toString(),C,pe.address.toString().toLowerCase().trim(),he,"false"],Ee=JSON.stringify(ce);await Xh(Ee,_),J("success","Address Linked","Successfully linked address to account! Use the refresh button to see updated addresses."),ue(null)}catch(ee){J("error","Link Address Error",`Error linking address: ${ee instanceof Error?ee.message:"Unknown error"}`)}finally{U(!1)}},ne=async()=>{try{o(!0),u(null);const ee=new URL(TD);ee.searchParams.set("limit",String(l));const S=p[h];S&&ee.searchParams.set("after",S);const v=await fetch(ee.toString());if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);const C=await v.json(),N=C.data??[];t(N),C.pagination&&(b(C.pagination.hasMore??!1),C.pagination.nextCursor&&p.length===h+1&&y(he=>[...he,C.pagination.nextCursor]))}catch(ee){console.error("Error fetching addresses:",ee),u(ee instanceof Error?ee.message:"Unknown error")}finally{o(!1)}};Xe.useEffect(()=>{ne()},[l,h]);const Z=e.reduce((ee,S)=>{const v=ee.find(C=>C.account_id===S.account_id);return v?(v.addresses.includes(S.address)||v.addresses.push(S.address),S.primary_address&&(v.hasPrimaryAddress=!0,v.primaryAddress=S.primary_address)):ee.push({account_id:S.account_id,addresses:[S.address],hasPrimaryAddress:!!S.primary_address,primaryAddress:S.primary_address}),ee},[]),F=[...new Set(Z.map(ee=>ee.account_id).filter(ee=>ee!==null))],q=ee=>{c(Number(ee.target.value)),f(0),y([void 0])},Y=()=>{g&&f(ee=>ee+1)},se=()=>{f(ee=>Math.max(0,ee-1))},ye=()=>{f(0)};return n?_e.jsx("div",{className:"addresses-loading",children:_e.jsx("div",{className:"loading-text",children:"Loading addresses..."})}):s?_e.jsx("div",{className:"addresses-error",children:_e.jsxs("div",{className:"error-text",children:["Error loading addresses: ",s]})}):_e.jsxs("div",{className:"addresses-table-container",children:[_e.jsx("div",{style:{position:"fixed",top:"20px",right:"20px",zIndex:1e3,display:"flex",flexDirection:"column",gap:"10px"},children:A.map(ee=>_e.jsxs("div",{style:{background:ee.type==="success"?"#10b981":ee.type==="error"?"#ef4444":"#3b82f6",color:"white",padding:"12px 16px",borderRadius:"8px",minWidth:"300px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",display:"flex",justifyContent:"space-between",alignItems:"flex-start",animation:"slideIn 0.3s ease-out"},children:[_e.jsxs("div",{children:[_e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:ee.title}),_e.jsx("div",{style:{fontSize:"14px",opacity:.9},children:ee.message})]}),_e.jsx("button",{type:"button",onClick:()=>G(ee.id),style:{background:"none",border:"none",color:"white",cursor:"pointer",fontSize:"18px",padding:"0",marginLeft:"12px",opacity:.7},children:"×"})]},ee.id))}),_e.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",background:"#f8fafc"},children:[_e.jsxs("div",{onClick:()=>T(!R),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:R?0:"20px"},children:[_e.jsx("h3",{style:{margin:0,color:"#333"},children:"Wallet Management"}),_e.jsx("span",{style:{fontSize:"18px",color:"#666",transform:R?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!R&&_e.jsxs(_e.Fragment,{children:[_e.jsx("div",{style:{marginBottom:"20px"},children:_e.jsx("button",{type:"button",onClick:H,style:{padding:"10px 16px",background:"linear-gradient(45deg, #19b17b, #022418)",color:"white",border:"none",borderRadius:"6px",cursor:"pointer",fontWeight:"600",fontSize:"14px"},children:"Generate New EVM Wallet"})}),w.length>0&&_e.jsxs("div",{style:{marginBottom:"20px"},children:[_e.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:"Available Wallets:"}),_e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:w.map(ee=>_e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px",border:(_==null?void 0:_.id)===ee.id?"2px solid #19b17b":"1px solid #ddd",borderRadius:"6px",background:(_==null?void 0:_.id)===ee.id?"#f0fdf4":"white"},children:[_e.jsx("input",{type:"radio",name:"selectedWallet",checked:(_==null?void 0:_.id)===ee.id,onChange:()=>M(ee),style:{margin:0}}),_e.jsx("span",{style:{fontSize:"14px",fontFamily:"monospace",color:"#666",flex:"1"},children:ee.name}),_e.jsx("span",{style:{fontSize:"14px",fontFamily:"monospace",color:"#666",flex:"2"},children:ee.address}),_e.jsx("button",{type:"button",onClick:()=>K(ee.id),style:{padding:"4px 8px",background:"#ef4444",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:"Remove"})]},ee.id))})]})]})]}),_&&_e.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",background:"#fef7ff"},children:[_e.jsxs("div",{onClick:()=>k(!$),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:$?0:"20px"},children:[_e.jsx("h3",{style:{margin:0,color:"#333"},children:"Account Commands"}),_e.jsx("span",{style:{fontSize:"18px",color:"#666",transform:$?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!$&&_e.jsxs(_e.Fragment,{children:[_e.jsxs("div",{style:{marginBottom:"20px"},children:[_e.jsx("label",{style:{display:"block",marginBottom:"10px",fontWeight:"600",fontSize:"16px"},children:"What would you like to do?"}),_e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[_e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:j==="create"?"2px solid #19b17b":"1px solid #ddd",borderRadius:"6px",background:j==="create"?"#f0fdf4":"white",cursor:"pointer"},onClick:()=>Q("create"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="create",onChange:()=>Q("create"),style:{margin:0}}),_e.jsxs("div",{style:{flex:"1"},children:[_e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"1. Create new account"}),_e.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Can only create if not linked to any account"})]})]}),_e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:j==="link"?"2px solid #3b82f6":"1px solid #ddd",borderRadius:"6px",background:j==="link"?"#eff6ff":"white",cursor:"pointer"},onClick:()=>Q("link"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="link",onChange:()=>Q("link"),style:{margin:0}}),_e.jsxs("div",{style:{flex:"1"},children:[_e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"2. Link Account"}),_e.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Only Account Primary can do this Action"})]})]}),_e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:j==="unlink-other"?"2px solid #f59e0b":"1px solid #ddd",borderRadius:"6px",background:j==="unlink-other"?"#fffbeb":"white",cursor:"pointer"},onClick:()=>Q("unlink-other"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="unlink-other",onChange:()=>Q("unlink-other"),style:{margin:0}}),_e.jsxs("div",{style:{flex:"1"},children:[_e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"3. Unlink Account"}),_e.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Only Account Primary can do this Action"})]})]}),_e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"12px",border:j==="unlink-self"?"2px solid #ef4444":"1px solid #ddd",borderRadius:"6px",background:j==="unlink-self"?"#fef2f2":"white",cursor:"pointer"},onClick:()=>Q("unlink-self"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="unlink-self",onChange:()=>Q("unlink-self"),style:{margin:0}}),_e.jsxs("div",{style:{flex:"1"},children:[_e.jsx("div",{style:{fontWeight:"600",marginBottom:"4px"},children:"4. Unlink Self"}),_e.jsx("div",{style:{fontSize:"14px",color:"#666",fontStyle:"italic"},children:"Unlink self from account"})]})]})]})]}),j&&_e.jsxs("div",{style:{marginTop:"20px",padding:"20px",background:"#f8fafc",borderRadius:"8px",border:"1px solid #e2e8f0"},children:[j==="create"&&_e.jsxs("div",{children:[_e.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Create New Account"}),_e.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"This will create a new account with your selected wallet as the primary address."}),_e.jsx("button",{type:"button",onClick:W,disabled:L,style:{padding:"10px 20px",background:L?"#ccc":"linear-gradient(45deg, #19b17b, #022418)",color:"white",border:"none",borderRadius:"6px",cursor:L?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"Creating...":"Create Account"})]}),j==="link"&&_e.jsxs("div",{children:[_e.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Link Account"}),_e.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"Link a wallet to an existing account. You must be the primary address of the account, and the wallet to link must have a private key."}),_e.jsxs("div",{style:{marginBottom:"15px"},children:[_e.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Account ID:"}),_e.jsxs("select",{value:X||"",onChange:ee=>te(ee.target.value?parseInt(ee.target.value):null),style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"200px"},children:[_e.jsx("option",{value:"",children:"-- Select Account ID --"}),F.map(ee=>_e.jsxs("option",{value:ee,children:["Account ",ee]},ee))]})]}),_e.jsxs("div",{style:{marginBottom:"15px"},children:[_e.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Wallet to Link:"}),_e.jsxs("select",{value:(pe==null?void 0:pe.id)||"",onChange:ee=>{const S=w.find(v=>v.id===ee.target.value);ue(S||null)},style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"300px"},children:[_e.jsx("option",{value:"",children:"-- Select a wallet to link --"}),w.filter(ee=>ee.id!==(_==null?void 0:_.id)).map(ee=>_e.jsxs("option",{value:ee.id,children:[ee.name," (",ee.address,")"]},ee.id))]})]}),_e.jsx("button",{type:"button",onClick:ae,disabled:L||!X||!pe,style:{padding:"10px 20px",background:L||!X||!pe?"#ccc":"linear-gradient(45deg, #3b82f6, #1e3a8a)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X||!pe?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"Linking...":"Link Wallet"})]}),j==="unlink-other"&&_e.jsxs("div",{children:[_e.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Unlink Account"}),_e.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"Unlink a specific address from an account. You must be the primary address of the account."}),_e.jsxs("div",{style:{marginBottom:"15px"},children:[_e.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Account ID:"}),_e.jsxs("select",{value:X||"",onChange:ee=>te(ee.target.value?parseInt(ee.target.value):null),style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"200px"},children:[_e.jsx("option",{value:"",children:"-- Select Account ID --"}),F.map(ee=>_e.jsxs("option",{value:ee,children:["Account ",ee]},ee))]})]}),_e.jsxs("div",{style:{marginBottom:"15px"},children:[_e.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Address to Unlink:"}),_e.jsx("input",{type:"text",value:le,onChange:ee=>oe(ee.target.value),placeholder:"Enter address to unlink",style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"300px"}})]}),_e.jsx("button",{type:"button",onClick:fe,disabled:L||!X||!le.trim(),style:{padding:"10px 20px",background:L||!X||!le.trim()?"#ccc":"linear-gradient(45deg, #f59e0b, #92400e)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X||!le.trim()?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"Unlinking...":"Unlink Address"})]}),j==="unlink-self"&&_e.jsxs("div",{children:[_e.jsx("h4",{style:{margin:"0 0 15px 0",color:"#333"},children:"Unlink Self"}),_e.jsx("p",{style:{margin:"0 0 15px 0",color:"#666",fontSize:"14px"},children:"Unlink yourself from an account. This will remove your address from the account."}),_e.jsxs("div",{style:{marginBottom:"15px"},children:[_e.jsx("label",{style:{display:"block",marginBottom:"5px",fontWeight:"600"},children:"Account ID:"}),_e.jsxs("select",{value:X||"",onChange:ee=>te(ee.target.value?parseInt(ee.target.value):null),style:{padding:"8px",border:"1px solid #ddd",borderRadius:"4px",width:"200px"},children:[_e.jsx("option",{value:"",children:"-- Select Account ID --"}),F.map(ee=>_e.jsxs("option",{value:ee,children:["Account ",ee]},ee))]})]}),_e.jsx("button",{type:"button",onClick:z,disabled:L||!X,style:{padding:"10px 20px",background:L||!X?"#ccc":"linear-gradient(45deg, #ef4444, #7f1d1d)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X?"not-allowed":"pointer",fontWeight:"600",fontSize:"14px"},children:L?"Unlinking...":"Unlink Self"})]})]})]})]}),_e.jsxs("div",{className:"addresses-table-wrapper",children:[_e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"15px"},children:[_e.jsx("h3",{style:{margin:0,color:"#333"},children:"Addresses"}),_e.jsx("div",{className:"table-controls",children:_e.jsxs("label",{children:["Rows per page:",_e.jsxs("select",{value:l,onChange:q,children:[_e.jsx("option",{value:10,children:"10"}),_e.jsx("option",{value:20,children:"20"}),_e.jsx("option",{value:50,children:"50"})]})]})})]}),n&&_e.jsx("p",{children:"Loading..."}),s&&_e.jsx("p",{className:"error",children:s}),!n&&!s&&_e.jsxs(_e.Fragment,{children:[_e.jsxs("table",{className:"addresses-table",children:[_e.jsx("thead",{children:_e.jsxs("tr",{children:[_e.jsx("th",{children:"Account ID"}),_e.jsx("th",{children:"Addresses"})]})}),_e.jsx("tbody",{children:Z.map((ee,S)=>_e.jsxs("tr",{className:ee.hasPrimaryAddress?"has-primary-address":"",children:[_e.jsx("td",{className:"account-id-cell",children:_e.jsx("div",{className:"account-id-content",children:ee.account_id??"No Account ID"})}),_e.jsx("td",{className:"addresses-cell",children:ee.addresses.map((v,C)=>_e.jsxs("div",{className:`address-item ${v===ee.primaryAddress?"primary-address":""}`,title:v===ee.primaryAddress?`${v} (Primary)`:v,children:[v,v===ee.primaryAddress&&_e.jsx("span",{className:"primary-badge",children:"Primary"})]},v))})]},ee.account_id??`null-${S}`))})]}),_e.jsxs("div",{className:"pagination-controls",children:[_e.jsx("button",{type:"button",onClick:ye,disabled:h===0,children:"First"}),_e.jsx("button",{type:"button",onClick:se,disabled:h===0,children:"Previous"}),_e.jsx("button",{type:"button",onClick:Y,disabled:!g||e.length<l,children:"Next"})]})]})]}),Z.length===0&&_e.jsx("div",{className:"no-addresses",children:_e.jsx("div",{className:"no-data-text",children:"No addresses found"})}),_e.jsx("style",{children:`
|
|
132
|
+
@keyframes slideIn {
|
|
133
|
+
from {
|
|
134
|
+
transform: translateX(100%);
|
|
135
|
+
opacity: 0;
|
|
136
|
+
}
|
|
137
|
+
to {
|
|
138
|
+
transform: translateX(0);
|
|
139
|
+
opacity: 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`})]})}function nb({latestBlock:e,isConnected:t}){const[n,o]=Xe.useState(!1),[s,u]=Xe.useState(!1),[l,c]=Xe.useState(!1),[h,f]=Xe.useState(!1),p=()=>{o(!0)},y=()=>{o(!1)},g=()=>{u(!0)},b=()=>{u(!1)},w=()=>{c(!0)},B=()=>{c(!1)},_=()=>{f(!0)},M=()=>{f(!1)};return _e.jsxs(_e.Fragment,{children:[_e.jsxs("header",{className:"header",children:[_e.jsx("h1",{className:"title",children:"Paima Explorer"}),_e.jsxs("div",{className:"header-right",children:[_e.jsx("button",{type:"button",className:"batcher-api-button",onClick:p,children:"Batcher API"}),_e.jsx("button",{type:"button",className:"node-api-button",onClick:g,children:"Paima Engine Node API"}),_e.jsx("button",{type:"button",className:"documentation-button",onClick:w,children:"Documentation"}),_e.jsx("button",{type:"button",className:"addresses-button",onClick:_,children:"Addresses"}),_e.jsxs("div",{className:"block-info",children:[_e.jsx("span",{children:"Latest Block:"}),_e.jsx("span",{id:"latest-block",style:{backgroundColor:t?"rgba(76, 175, 80, 0.1)":"rgba(244, 67, 54, 0.1)",color:t?"#4caf50":"#f44336"},children:t?e.toLocaleString():"Connection Error"})]})]})]}),_e.jsx(uc,{isOpen:n,onClose:y,title:"Batcher API Documentation",className:"api",url:fI,children:_e.jsx("div",{className:"documentation-content",children:_e.jsx("iframe",{src:fI,className:"documentation-iframe",title:"Batcher API Documentation"})})}),_e.jsx(uc,{isOpen:s,onClose:b,title:"Paima Engine Node API Documentation",className:"api",url:hI,children:_e.jsx("div",{className:"documentation-content",children:_e.jsx("iframe",{src:hI,className:"documentation-iframe",title:"Paima Engine Node API Documentation"})})}),_e.jsx(uc,{className:"docs",isOpen:l,onClose:B,title:"Documentation",url:dI,children:_e.jsx("div",{className:"documentation-content",children:_e.jsx("iframe",{src:dI,className:"documentation-iframe",title:"Documentation"})})}),_e.jsx(uc,{className:"addresses",isOpen:h,onClose:M,title:"Addresses",children:_e.jsx(Qq,{})})]})}function Gq(e){return e.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Kq({block:e,isNew:t=!1}){const[n,o]=Xe.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e.hash),o(!0),setTimeout(()=>o(!1),300),console.log(`📋 Copied to clipboard: ${e.hash}`)}catch(u){console.error("Failed to copy to clipboard:",u)}};return _e.jsxs("div",{className:`block-item ${t?"new-block":""}`,onClick:s,style:{backgroundColor:n?"rgba(76, 175, 80, 0.2)":void 0,cursor:"pointer"},children:[_e.jsxs("div",{className:"block-header",children:[_e.jsxs("div",{className:"block-number",children:["Block #",e.number.toLocaleString()]}),_e.jsx("div",{className:"block-timestamp",children:Gq(e.timestamp)})]}),_e.jsx("div",{className:"block-hash",children:e.hash})]})}function Yq({title:e,blockTime:t,blocks:n,isMainColumn:o=!1,newBlockIndex:s}){const u=n.filter((l,c,h)=>c===h.findIndex(f=>f.number===l.number&&f.hash===l.hash));return _e.jsxs("div",{className:`row ${o?"main-row":""}`,children:[_e.jsxs("h2",{className:"row-title",children:[e,t?` - Block Time: ${t}`:""]}),_e.jsx("div",{className:"blocks-list",children:u.length===0?_e.jsx("div",{className:"block-item placeholder",children:"No Blocks Fetched"}):u.map((l,c)=>_e.jsx(Kq,{block:l,isNew:s===c},`${c}-${l.number}-${l.hash}`))})]})}function Vq(e,t){if(t.blockTime)return`${t.blockTime/1e3}s`}function AC({chainConfigs:e,newBlockIndices:t}){return _e.jsx("div",{className:"rows-container",children:Object.entries(e).map(([n,o])=>{const u=(o.type||"").toUpperCase()==="CARDANO"?[]:o.blocks;return _e.jsx(Yq,{title:o.name,blockTime:Vq(n,o),blocks:u,isMainColumn:n==="paima",newBlockIndex:t[n]},n)})})}function Wq(e){return e==null?"N/A":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function Xq({isOpen:e,onClose:t,rowData:n,fields:o,title:s="Row Details"}){return!e||!n?null:LF.createPortal(_e.jsx("div",{className:"modal-overlay",onClick:t,children:_e.jsxs("div",{className:"details-modal-content",style:{maxWidth:"80%"},onClick:u=>u.stopPropagation(),children:[_e.jsxs("div",{className:"modal-header",children:[_e.jsx("h3",{className:"modal-title",children:s}),_e.jsx("button",{type:"button",className:"modal-close",onClick:t,children:"×"})]}),_e.jsx("div",{className:"modal-body",children:_e.jsx("table",{className:"details-table",children:_e.jsx("tbody",{children:o.map(u=>_e.jsxs("tr",{children:[_e.jsx("td",{className:"details-key",children:u.name.replace(/_/g," ").toUpperCase()}),_e.jsx("td",{className:"details-value",children:_e.jsx("pre",{children:Wq(n[u.name])})})]},u.name))})})})]})}),document.body)}function Zq(e,t){if(e==null)return"";if(t==="inputs"&&typeof e=="string")try{const n=JSON.parse(e);return`<code style="font-size: 0.75em; background: rgba(0,0,0,0.1); padding: 4px 6px; border-radius: 3px; display: block; white-space: pre-wrap; max-height: 80px; overflow-y: auto;">${JSON.stringify(n,null,1).replace(/\n/g,"<br>")}</code>`}catch{return e.toString()}if(typeof e=="string"&&e.startsWith("0x")&&e.length===42)return`<span class="address-cell" style="overflow: hidden; text-overflow: ellipsis;" title="${e}">${e}</span>`;if(typeof e=="string"&&/^\d+$/.test(e)&&e.length>10){const n=BigInt(e);return t&&t.toLowerCase().includes("balance")?`${(Number(n)/Math.pow(10,18)).toFixed(6)} ETH`:n.toString()}return e.toString()}function Jq({title:e,data:t,pagination:n,onPrev:o,onNext:s,onFirst:u,onLimitChange:l}){const[c,h]=Xe.useState(null),f=t&&t.rows&&t.fields&&t.rows.length>0,p=(t==null?void 0:t.fields)||[],y=(t==null?void 0:t.rows)||[],g=!!n&&n.hasMore&&y.length>=n.limit,b=!!n&&n.currentPage>0,w=!n||!b&&!g;return _e.jsxs(_e.Fragment,{children:[_e.jsxs("div",{className:`primitive-table-container ${y.length>6?"has-scroll":""}`,children:[_e.jsx("h3",{className:"primitive-table-title",children:e}),f?_e.jsx("div",{className:"primitive-table-wrapper",children:_e.jsxs("table",{className:"primitive-table",children:[_e.jsx("thead",{children:_e.jsxs("tr",{children:[_e.jsx("th",{className:"actions-column"}),p.map(B=>_e.jsx("th",{children:B.name.replace(/_/g," ").toUpperCase()},B.name))]})}),_e.jsx("tbody",{children:y.slice().reverse().map((B,_)=>_e.jsxs("tr",{children:[_e.jsx("td",{className:"actions-cell",children:_e.jsx("button",{style:{background:"none",border:"none",cursor:"pointer"},type:"button",onClick:()=>h(B),className:"details-button",children:"🔍"})}),p.map(M=>{const A=B[M.name],I=Zq(A,M.name),R=A?A.toString():"";return _e.jsx("td",{dangerouslySetInnerHTML:{__html:I},title:R.length>30?R:void 0},M.name)})]},_))})]})}):_e.jsx("div",{className:"table-error"}),n&&!w&&_e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:8},children:_e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[_e.jsx("button",{type:"button",onClick:u,disabled:!b,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:b?"white":"#f3f4f6",cursor:b?"pointer":"not-allowed"},children:"First"}),_e.jsx("button",{type:"button",onClick:o,disabled:!b,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:b?"white":"#f3f4f6",cursor:b?"pointer":"not-allowed"},children:"Prev"}),_e.jsx("button",{type:"button",onClick:s,disabled:!g,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:g?"white":"#f3f4f6",cursor:g?"pointer":"not-allowed"},children:"Next"})]})})]}),_e.jsx(Xq,{isOpen:!!c,onClose:()=>h(null),rowData:c,fields:p,title:`${e} Row Details`})]})}function ib({title:e,tables:t,isLoading:n=!1,children:o,pagination:s,onPrev:u,onNext:l,onFirst:c,onLimitChange:h}){const f=Object.entries(t);return _e.jsxs("div",{className:"tables-section",children:[_e.jsx("h2",{className:"section-title",children:e}),o,_e.jsx("div",{className:"primitive-tables",children:f.length===0?_e.jsx("div",{className:"table-error"}):f.map(([p,y])=>_e.jsx(Jq,{title:p,data:y,pagination:s==null?void 0:s[p],onPrev:u?()=>u(p):void 0,onNext:l?()=>l(p):void 0,onFirst:c?()=>c(p):void 0,onLimitChange:h?g=>h(p,g):void 0},p))})]})}function vC({isOpen:e,onClose:t,title:n,tableNames:o,selectedNames:s,onApply:u}){const l=Xe.useMemo(()=>new Set(s),[s]),[c,h]=Xe.useState(l);Xe.useEffect(()=>{h(new Set(s))},[s,e]);const f=b=>{h(w=>{const B=new Set(w);return B.has(b)?B.delete(b):B.add(b),B})},p=()=>h(new Set(o)),y=()=>h(new Set),g=()=>{u(Array.from(c)),t()};return _e.jsx(uc,{isOpen:e,onClose:t,title:n,className:"table-selector",children:_e.jsxs("div",{className:"table-selector-content",children:[_e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[_e.jsx("button",{type:"button",className:"batcher-api-button",onClick:p,children:"Select All"}),_e.jsx("button",{type:"button",className:"batcher-api-button",onClick:y,children:"Deselect All"})]}),_e.jsx("ul",{children:o.map(b=>_e.jsx("li",{children:_e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8},children:[_e.jsx("input",{type:"checkbox",checked:c.has(b),onChange:()=>f(b)}),b]})},b))}),_e.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[_e.jsx("button",{type:"button",className:"batcher-api-button",onClick:g,children:"Apply"}),_e.jsx("button",{type:"button",className:"documentation-button",onClick:t,children:"Cancel"})]})]})})}var ac={},wC;function eH(){if(wC)return ac;wC=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.assertNever=e;function e(t,n){if(typeof n=="string")throw new Error(n);if(typeof n=="function")throw new Error(n(t));if(n)return t;throw new Error("Unhandled discriminated union member: ".concat(JSON.stringify(t)))}return ac.default=e,ac}var tH=eH(),ha=(e=>(e.PaimaEngine="effectstream-engine",e.Batcher="batcher",e))(ha||{}),ld=(e=>(e.Batcher="batcher",e.Node="node",e.App="app",e))(ld||{});function rH(e){switch(e){case"batcher":return"batcher";case"node":return"effectstream-engine";case"app":return"effectstream-engine";default:tH.assertNever(e)}}function eT(e,t,n){return{path:[e,...[n].filter(o=>o),...t.fields.filter(o=>o.indexed).flatMap(o=>[o.hashed===!0?o.name.substring(0,o.name.length-4):o.name,{name:o.name,type:o.type}])],broker:rH(e),type:je.Object(t.fields.filter(o=>!o.indexed).reduce((o,s)=>(o[s.name]=s.type,o),{}))}}function dw(e){for(const{name:t}of e.fields){const n=["$","/","+","#"];for(const o of n)if(t.includes(o))throw new Error(`Event ${e.name} has field ${t} with invalid character ${o}.`)}return e}function nH(e){return{name:e.name,fields:e.fields.flatMap(t=>{if(t.indexed===!1)return t;const n=je.Extends(t.type,je.String(),je.Literal(!0),je.Literal(!1)).const,o=je.Extends(t.type,je.Number(),je.Literal(!0),je.Literal(!1)).const;return n||o?t:[{indexed:!0,type:je.String(),name:`${t.name}Hash`,hashed:!0},{...t,indexed:!1}]})}}const{keccak_256:BG}=JB;function xC(e,t){const n=new Set(Object.keys(t)),o=e.map((c,h)=>[c,h]).filter(([c,h])=>typeof c=="object").map(([c,h])=>h),s=e.map((c,h)=>[c,h]).filter(([c,h])=>typeof c=="object"&&n.has(c.name)).map(([c,h])=>h).reverse();let u=[];const l=c=>{c===e.length-1?u.push("+"):u.push("#")};for(let c=0;c<e.length;c++){const h=e[c];if(s.length===0&&o.length>0&&c<o[o.length-1]&&c>=o[0]){l(c);break}if(typeof h=="string"){u.push(e[c]);continue}t[h.name]===void 0?u.push("+"):u.push(t[h.name]),s.length>0&&c===s[s.length-1]&&s.pop()}return u.join("/")}function iH(e){let t="";for(let n=0;n<e.length;n++){const o=e[n];n>0&&(t+="/"),typeof o=="string"?t+=o:t+=`+${o.name}`}return t}function oH(e){return e.filter(t=>typeof t!="string").map(t=>t.name)}var pw=Object.defineProperty,sH=Object.getOwnPropertyDescriptor,aH=Object.getOwnPropertyNames,uH=Object.prototype.hasOwnProperty,kn=(e,t)=>()=>(e&&(t=e(e=0)),t),qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),al=(e,t)=>{for(var n in t)pw(e,n,{get:t[n],enumerable:!0})},lH=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of aH(t))!uH.call(e,s)&&s!==n&&pw(e,s,{get:()=>t[s],enumerable:!(o=sH(t,s))||o.enumerable});return e},Yt=e=>lH(pw({},"__esModule",{value:!0}),e),Pe=kn(()=>{}),Nt={};al(Nt,{_debugEnd:()=>S1,_debugProcess:()=>E1,_events:()=>k1,_eventsCount:()=>L1,_exiting:()=>l1,_fatalExceptions:()=>v1,_getActiveHandles:()=>aT,_getActiveRequests:()=>sT,_kill:()=>h1,_linkedBinding:()=>iT,_maxListeners:()=>P1,_preload_modules:()=>D1,_rawDebug:()=>s1,_startProfilerIdleNotifier:()=>I1,_stopProfilerIdleNotifier:()=>_1,_tickCallback:()=>x1,abort:()=>B1,addListener:()=>z1,allowedNodeEnvironmentFlags:()=>b1,arch:()=>Gb,argv:()=>Vb,argv0:()=>j1,assert:()=>uT,binding:()=>e1,browser:()=>o1,chdir:()=>n1,config:()=>c1,cpuUsage:()=>hc,cwd:()=>r1,debugPort:()=>U1,default:()=>gw,dlopen:()=>oT,domain:()=>u1,emit:()=>G1,emitWarning:()=>Jb,env:()=>Yb,execArgv:()=>Wb,execPath:()=>M1,exit:()=>g1,features:()=>A1,hasUncaughtExceptionCaptureCallback:()=>lT,hrtime:()=>cd,kill:()=>y1,listeners:()=>fT,memoryUsage:()=>p1,moduleLoadList:()=>a1,nextTick:()=>rT,off:()=>q1,on:()=>Io,once:()=>$1,openStdin:()=>m1,pid:()=>T1,platform:()=>Kb,ppid:()=>R1,prependListener:()=>K1,prependOnceListener:()=>Y1,reallyExit:()=>f1,release:()=>i1,removeAllListeners:()=>Q1,removeListener:()=>H1,resourceUsage:()=>d1,setSourceMapsEnabled:()=>N1,setUncaughtExceptionCaptureCallback:()=>w1,stderr:()=>F1,stdin:()=>O1,stdout:()=>C1,title:()=>Qb,umask:()=>t1,uptime:()=>cT,version:()=>Xb,versions:()=>Zb});function yw(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function cH(){!ga||!da||(ga=!1,da.length?Gi=da.concat(Gi):mc=-1,Gi.length&&tT())}function tT(){if(!ga){var e=setTimeout(cH,0);ga=!0;for(var t=Gi.length;t;){for(da=Gi,Gi=[];++mc<t;)da&&da[mc].run();mc=-1,t=Gi.length}da=null,ga=!1,clearTimeout(e)}}function rT(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Gi.push(new nT(e,t)),Gi.length===1&&!ga&&setTimeout(tT,0)}function nT(e,t){this.fun=e,this.array=t}function cn(){}function iT(e){yw("_linkedBinding")}function oT(e){yw("dlopen")}function sT(){return[]}function aT(){return[]}function uT(e,t){if(!e)throw new Error(t||"assertion error")}function lT(){return!1}function cT(){return Bo.now()/1e3}function cd(e){var t=Math.floor((Date.now()-Bo.now())*.001),n=Bo.now()*.001,o=Math.floor(n)+t,s=Math.floor(n%1*1e9);return e&&(o=o-e[0],s=s-e[1],s<0&&(o--,s+=fd)),[o,s]}function Io(){return gw}function fT(e){return[]}var Gi,ga,da,mc,Qb,Gb,Kb,Yb,Vb,Wb,Xb,Zb,Jb,e1,t1,r1,n1,i1,o1,s1,a1,u1,l1,c1,f1,h1,hc,d1,p1,y1,g1,m1,b1,A1,v1,w1,x1,E1,S1,I1,_1,C1,F1,O1,B1,T1,R1,M1,U1,j1,D1,N1,Bo,ob,fd,P1,k1,L1,z1,$1,q1,H1,Q1,G1,K1,Y1,gw,fH=kn(()=>{Pe(),Le(),ke(),Gi=[],ga=!1,mc=-1,nT.prototype.run=function(){this.fun.apply(null,this.array)},Qb="browser",Gb="x64",Kb="browser",Yb={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},Vb=["/usr/bin/node"],Wb=[],Xb="v16.8.0",Zb={},Jb=function(e,t){console.warn((t?t+": ":"")+e)},e1=function(e){yw("binding")},t1=function(e){return 0},r1=function(){return"/"},n1=function(e){},i1={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},o1=!0,s1=cn,a1=[],u1={},l1=!1,c1={},f1=cn,h1=cn,hc=function(){return{}},d1=hc,p1=hc,y1=cn,g1=cn,m1=cn,b1={},A1={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},v1=cn,w1=cn,x1=cn,E1=cn,S1=cn,I1=cn,_1=cn,C1=void 0,F1=void 0,O1=void 0,B1=cn,T1=2,R1=1,M1="/bin/usr/node",U1=9229,j1="node",D1=[],N1=cn,Bo={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Bo.now===void 0&&(ob=Date.now(),Bo.timing&&Bo.timing.navigationStart&&(ob=Bo.timing.navigationStart),Bo.now=()=>Date.now()-ob),fd=1e9,cd.bigint=function(e){var t=cd(e);return typeof BigInt>"u"?t[0]*fd+t[1]:BigInt(t[0]*fd)+BigInt(t[1])},P1=10,k1={},L1=0,z1=Io,$1=Io,q1=Io,H1=Io,Q1=Io,G1=cn,K1=Io,Y1=Io,gw={version:Xb,versions:Zb,arch:Gb,platform:Kb,browser:o1,release:i1,_rawDebug:s1,moduleLoadList:a1,binding:e1,_linkedBinding:iT,_events:k1,_eventsCount:L1,_maxListeners:P1,on:Io,addListener:z1,once:$1,off:q1,removeListener:H1,removeAllListeners:Q1,emit:G1,prependListener:K1,prependOnceListener:Y1,listeners:fT,domain:u1,_exiting:l1,config:c1,dlopen:oT,uptime:cT,_getActiveRequests:sT,_getActiveHandles:aT,reallyExit:f1,_kill:h1,cpuUsage:hc,resourceUsage:d1,memoryUsage:p1,kill:y1,exit:g1,openStdin:m1,allowedNodeEnvironmentFlags:b1,assert:uT,features:A1,_fatalExceptions:v1,setUncaughtExceptionCaptureCallback:w1,hasUncaughtExceptionCaptureCallback:lT,emitWarning:Jb,nextTick:rT,_tickCallback:x1,_debugProcess:E1,_debugEnd:S1,_startProfilerIdleNotifier:I1,_stopProfilerIdleNotifier:_1,stdout:C1,stdin:O1,stderr:F1,abort:B1,umask:t1,chdir:n1,cwd:r1,env:Yb,title:Qb,argv:Vb,execArgv:Wb,pid:T1,ppid:R1,execPath:M1,debugPort:U1,hrtime:cd,argv0:j1,_preload_modules:D1,setSourceMapsEnabled:N1}}),ke=kn(()=>{fH()});function hH(){if(V1)return wu;V1=!0,wu.byteLength=c,wu.toByteArray=f,wu.fromByteArray=g;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)e[s]=o[s],t[o.charCodeAt(s)]=s;t[45]=62,t[95]=63;function l(b){var w=b.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var B=b.indexOf("=");B===-1&&(B=w);var _=B===w?0:4-B%4;return[B,_]}function c(b){var w=l(b),B=w[0],_=w[1];return(B+_)*3/4-_}function h(b,w,B){return(w+B)*3/4-B}function f(b){var w,B=l(b),_=B[0],M=B[1],A=new n(h(b,_,M)),I=0,R=M>0?_-4:_,T;for(T=0;T<R;T+=4)w=t[b.charCodeAt(T)]<<18|t[b.charCodeAt(T+1)]<<12|t[b.charCodeAt(T+2)]<<6|t[b.charCodeAt(T+3)],A[I++]=w>>16&255,A[I++]=w>>8&255,A[I++]=w&255;return M===2&&(w=t[b.charCodeAt(T)]<<2|t[b.charCodeAt(T+1)]>>4,A[I++]=w&255),M===1&&(w=t[b.charCodeAt(T)]<<10|t[b.charCodeAt(T+1)]<<4|t[b.charCodeAt(T+2)]>>2,A[I++]=w>>8&255,A[I++]=w&255),A}function p(b){return e[b>>18&63]+e[b>>12&63]+e[b>>6&63]+e[b&63]}function y(b,w,B){for(var _,M=[],A=w;A<B;A+=3)_=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),M.push(p(_));return M.join("")}function g(b){for(var w,B=b.length,_=B%3,M=[],A=16383,I=0,R=B-_;I<R;I+=A)M.push(y(b,I,I+A>R?R:I+A));return _===1?(w=b[B-1],M.push(e[w>>2]+e[w<<4&63]+"==")):_===2&&(w=(b[B-2]<<8)+b[B-1],M.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),M.join("")}return wu}function dH(){return W1?dc:(W1=!0,dc.read=function(e,t,n,o,s){var u,l,c=s*8-o-1,h=(1<<c)-1,f=h>>1,p=-7,y=n?s-1:0,g=n?-1:1,b=e[t+y];for(y+=g,u=b&(1<<-p)-1,b>>=-p,p+=c;p>0;u=u*256+e[t+y],y+=g,p-=8);for(l=u&(1<<-p)-1,u>>=-p,p+=o;p>0;l=l*256+e[t+y],y+=g,p-=8);if(u===0)u=1-f;else{if(u===h)return l?NaN:(b?-1:1)*(1/0);l=l+Math.pow(2,o),u=u-f}return(b?-1:1)*l*Math.pow(2,u-o)},dc.write=function(e,t,n,o,s,u){var l,c,h,f=u*8-s-1,p=(1<<f)-1,y=p>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=o?0:u-1,w=o?1:-1,B=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,l=p):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+y>=1?t+=g/h:t+=g*Math.pow(2,1-y),t*h>=2&&(l++,h/=2),l+y>=p?(c=0,l=p):l+y>=1?(c=(t*h-1)*Math.pow(2,s),l=l+y):(c=t*Math.pow(2,y-1)*Math.pow(2,s),l=0));s>=8;e[n+b]=c&255,b+=w,c/=256,s-=8);for(l=l<<s|c,f+=s;f>0;e[n+b]=l&255,b+=w,l/=256,f-=8);e[n+b-w]|=B*128},dc)}function pH(){if(X1)return Es;X1=!0;let e=hH(),t=dH(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Es.Buffer=l,Es.SlowBuffer=M,Es.INSPECT_MAX_BYTES=50;let o=2147483647;Es.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&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 s(){try{let x=new Uint8Array(1),O={foo:function(){return 42}};return Object.setPrototypeOf(O,Uint8Array.prototype),Object.setPrototypeOf(x,O),x.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function u(x){if(x>o)throw new RangeError('The value "'+x+'" is invalid for option "size"');let O=new Uint8Array(x);return Object.setPrototypeOf(O,l.prototype),O}function l(x,O,D){if(typeof x=="number"){if(typeof O=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(x)}return c(x,O,D)}l.poolSize=8192;function c(x,O,D){if(typeof x=="string")return y(x,O);if(ArrayBuffer.isView(x))return b(x);if(x==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(ce(x,ArrayBuffer)||x&&ce(x.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ce(x,SharedArrayBuffer)||x&&ce(x.buffer,SharedArrayBuffer)))return w(x,O,D);if(typeof x=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let ie=x.valueOf&&x.valueOf();if(ie!=null&&ie!==x)return l.from(ie,O,D);let me=B(x);if(me)return me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return l.from(x[Symbol.toPrimitive]("string"),O,D);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}l.from=function(x,O,D){return c(x,O,D)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function h(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 f(x,O,D){return h(x),x<=0?u(x):O!==void 0?typeof D=="string"?u(x).fill(O,D):u(x).fill(O):u(x)}l.alloc=function(x,O,D){return f(x,O,D)};function p(x){return h(x),u(x<0?0:_(x)|0)}l.allocUnsafe=function(x){return p(x)},l.allocUnsafeSlow=function(x){return p(x)};function y(x,O){if((typeof O!="string"||O==="")&&(O="utf8"),!l.isEncoding(O))throw new TypeError("Unknown encoding: "+O);let D=A(x,O)|0,ie=u(D),me=ie.write(x,O);return me!==D&&(ie=ie.slice(0,me)),ie}function g(x){let O=x.length<0?0:_(x.length)|0,D=u(O);for(let ie=0;ie<O;ie+=1)D[ie]=x[ie]&255;return D}function b(x){if(ce(x,Uint8Array)){let O=new Uint8Array(x);return w(O.buffer,O.byteOffset,O.byteLength)}return g(x)}function w(x,O,D){if(O<0||x.byteLength<O)throw new RangeError('"offset" is outside of buffer bounds');if(x.byteLength<O+(D||0))throw new RangeError('"length" is outside of buffer bounds');let ie;return O===void 0&&D===void 0?ie=new Uint8Array(x):D===void 0?ie=new Uint8Array(x,O):ie=new Uint8Array(x,O,D),Object.setPrototypeOf(ie,l.prototype),ie}function B(x){if(l.isBuffer(x)){let O=_(x.length)|0,D=u(O);return D.length===0||x.copy(D,0,0,O),D}if(x.length!==void 0)return typeof x.length!="number"||Ee(x.length)?u(0):g(x);if(x.type==="Buffer"&&Array.isArray(x.data))return g(x.data)}function _(x){if(x>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return x|0}function M(x){return+x!=x&&(x=0),l.alloc(+x)}l.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==l.prototype},l.compare=function(x,O){if(ce(x,Uint8Array)&&(x=l.from(x,x.offset,x.byteLength)),ce(O,Uint8Array)&&(O=l.from(O,O.offset,O.byteLength)),!l.isBuffer(x)||!l.isBuffer(O))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===O)return 0;let D=x.length,ie=O.length;for(let me=0,xe=Math.min(D,ie);me<xe;++me)if(x[me]!==O[me]){D=x[me],ie=O[me];break}return D<ie?-1:ie<D?1:0},l.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}},l.concat=function(x,O){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return l.alloc(0);let D;if(O===void 0)for(O=0,D=0;D<x.length;++D)O+=x[D].length;let ie=l.allocUnsafe(O),me=0;for(D=0;D<x.length;++D){let xe=x[D];if(ce(xe,Uint8Array))me+xe.length>ie.length?(l.isBuffer(xe)||(xe=l.from(xe)),xe.copy(ie,me)):Uint8Array.prototype.set.call(ie,xe,me);else if(l.isBuffer(xe))xe.copy(ie,me);else throw new TypeError('"list" argument must be an Array of Buffers');me+=xe.length}return ie};function A(x,O){if(l.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||ce(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);let D=x.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&D===0)return 0;let me=!1;for(;;)switch(O){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return S(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D*2;case"hex":return D>>>1;case"base64":return N(x).length;default:if(me)return ie?-1:S(x).length;O=(""+O).toLowerCase(),me=!0}}l.byteLength=A;function I(x,O,D){let ie=!1;if((O===void 0||O<0)&&(O=0),O>this.length||((D===void 0||D>this.length)&&(D=this.length),D<=0)||(D>>>=0,O>>>=0,D<=O))return"";for(x||(x="utf8");;)switch(x){case"hex":return pe(this,O,D);case"utf8":case"utf-8":return re(this,O,D);case"ascii":return X(this,O,D);case"latin1":case"binary":return te(this,O,D);case"base64":return P(this,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,O,D);default:if(ie)throw new TypeError("Unknown encoding: "+x);x=(x+"").toLowerCase(),ie=!0}}l.prototype._isBuffer=!0;function R(x,O,D){let ie=x[O];x[O]=x[D],x[D]=ie}l.prototype.swap16=function(){let x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let O=0;O<x;O+=2)R(this,O,O+1);return this},l.prototype.swap32=function(){let x=this.length;if(x%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let O=0;O<x;O+=4)R(this,O,O+3),R(this,O+1,O+2);return this},l.prototype.swap64=function(){let x=this.length;if(x%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let O=0;O<x;O+=8)R(this,O,O+7),R(this,O+1,O+6),R(this,O+2,O+5),R(this,O+3,O+4);return this},l.prototype.toString=function(){let x=this.length;return x===0?"":arguments.length===0?re(this,0,x):I.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(x){if(!l.isBuffer(x))throw new TypeError("Argument must be a Buffer");return this===x?!0:l.compare(this,x)===0},l.prototype.inspect=function(){let x="",O=Es.INSPECT_MAX_BYTES;return x=this.toString("hex",0,O).replace(/(.{2})/g,"$1 ").trim(),this.length>O&&(x+=" ... "),"<Buffer "+x+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(x,O,D,ie,me){if(ce(x,Uint8Array)&&(x=l.from(x,x.offset,x.byteLength)),!l.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(O===void 0&&(O=0),D===void 0&&(D=x?x.length:0),ie===void 0&&(ie=0),me===void 0&&(me=this.length),O<0||D>x.length||ie<0||me>this.length)throw new RangeError("out of range index");if(ie>=me&&O>=D)return 0;if(ie>=me)return-1;if(O>=D)return 1;if(O>>>=0,D>>>=0,ie>>>=0,me>>>=0,this===x)return 0;let xe=me-ie,Ce=D-O,ve=Math.min(xe,Ce),Se=this.slice(ie,me),He=x.slice(O,D);for(let Ke=0;Ke<ve;++Ke)if(Se[Ke]!==He[Ke]){xe=Se[Ke],Ce=He[Ke];break}return xe<Ce?-1:Ce<xe?1:0};function T(x,O,D,ie,me){if(x.length===0)return-1;if(typeof D=="string"?(ie=D,D=0):D>2147483647?D=2147483647:D<-2147483648&&(D=-2147483648),D=+D,Ee(D)&&(D=me?0:x.length-1),D<0&&(D=x.length+D),D>=x.length){if(me)return-1;D=x.length-1}else if(D<0)if(me)D=0;else return-1;if(typeof O=="string"&&(O=l.from(O,ie)),l.isBuffer(O))return O.length===0?-1:$(x,O,D,ie,me);if(typeof O=="number")return O=O&255,typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(x,O,D):Uint8Array.prototype.lastIndexOf.call(x,O,D):$(x,[O],D,ie,me);throw new TypeError("val must be string, number or Buffer")}function $(x,O,D,ie,me){let xe=1,Ce=x.length,ve=O.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(x.length<2||O.length<2)return-1;xe=2,Ce/=2,ve/=2,D/=2}function Se(Ke,Ve){return xe===1?Ke[Ve]:Ke.readUInt16BE(Ve*xe)}let He;if(me){let Ke=-1;for(He=D;He<Ce;He++)if(Se(x,He)===Se(O,Ke===-1?0:He-Ke)){if(Ke===-1&&(Ke=He),He-Ke+1===ve)return Ke*xe}else Ke!==-1&&(He-=He-Ke),Ke=-1}else for(D+ve>Ce&&(D=Ce-ve),He=D;He>=0;He--){let Ke=!0;for(let Ve=0;Ve<ve;Ve++)if(Se(x,He+Ve)!==Se(O,Ve)){Ke=!1;break}if(Ke)return He}return-1}l.prototype.includes=function(x,O,D){return this.indexOf(x,O,D)!==-1},l.prototype.indexOf=function(x,O,D){return T(this,x,O,D,!0)},l.prototype.lastIndexOf=function(x,O,D){return T(this,x,O,D,!1)};function k(x,O,D,ie){D=Number(D)||0;let me=x.length-D;ie?(ie=Number(ie),ie>me&&(ie=me)):ie=me;let xe=O.length;ie>xe/2&&(ie=xe/2);let Ce;for(Ce=0;Ce<ie;++Ce){let ve=parseInt(O.substr(Ce*2,2),16);if(Ee(ve))return Ce;x[D+Ce]=ve}return Ce}function L(x,O,D,ie){return he(S(O,x.length-D),x,D,ie)}function U(x,O,D,ie){return he(v(O),x,D,ie)}function j(x,O,D,ie){return he(N(O),x,D,ie)}function Q(x,O,D,ie){return he(C(O,x.length-D),x,D,ie)}l.prototype.write=function(x,O,D,ie){if(O===void 0)ie="utf8",D=this.length,O=0;else if(D===void 0&&typeof O=="string")ie=O,D=this.length,O=0;else if(isFinite(O))O=O>>>0,isFinite(D)?(D=D>>>0,ie===void 0&&(ie="utf8")):(ie=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let me=this.length-O;if((D===void 0||D>me)&&(D=me),x.length>0&&(D<0||O<0)||O>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");let xe=!1;for(;;)switch(ie){case"hex":return k(this,x,O,D);case"utf8":case"utf-8":return L(this,x,O,D);case"ascii":case"latin1":case"binary":return U(this,x,O,D);case"base64":return j(this,x,O,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,x,O,D);default:if(xe)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),xe=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(x,O,D){return O===0&&D===x.length?e.fromByteArray(x):e.fromByteArray(x.slice(O,D))}function re(x,O,D){D=Math.min(x.length,D);let ie=[],me=O;for(;me<D;){let xe=x[me],Ce=null,ve=xe>239?4:xe>223?3:xe>191?2:1;if(me+ve<=D){let Se,He,Ke,Ve;switch(ve){case 1:xe<128&&(Ce=xe);break;case 2:Se=x[me+1],(Se&192)===128&&(Ve=(xe&31)<<6|Se&63,Ve>127&&(Ce=Ve));break;case 3:Se=x[me+1],He=x[me+2],(Se&192)===128&&(He&192)===128&&(Ve=(xe&15)<<12|(Se&63)<<6|He&63,Ve>2047&&(Ve<55296||Ve>57343)&&(Ce=Ve));break;case 4:Se=x[me+1],He=x[me+2],Ke=x[me+3],(Se&192)===128&&(He&192)===128&&(Ke&192)===128&&(Ve=(xe&15)<<18|(Se&63)<<12|(He&63)<<6|Ke&63,Ve>65535&&Ve<1114112&&(Ce=Ve))}}Ce===null?(Ce=65533,ve=1):Ce>65535&&(Ce-=65536,ie.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),ie.push(Ce),me+=ve}return oe(ie)}let le=4096;function oe(x){let O=x.length;if(O<=le)return String.fromCharCode.apply(String,x);let D="",ie=0;for(;ie<O;)D+=String.fromCharCode.apply(String,x.slice(ie,ie+=le));return D}function X(x,O,D){let ie="";D=Math.min(x.length,D);for(let me=O;me<D;++me)ie+=String.fromCharCode(x[me]&127);return ie}function te(x,O,D){let ie="";D=Math.min(x.length,D);for(let me=O;me<D;++me)ie+=String.fromCharCode(x[me]);return ie}function pe(x,O,D){let ie=x.length;(!O||O<0)&&(O=0),(!D||D<0||D>ie)&&(D=ie);let me="";for(let xe=O;xe<D;++xe)me+=Te[x[xe]];return me}function ue(x,O,D){let ie=x.slice(O,D),me="";for(let xe=0;xe<ie.length-1;xe+=2)me+=String.fromCharCode(ie[xe]+ie[xe+1]*256);return me}l.prototype.slice=function(x,O){let D=this.length;x=~~x,O=O===void 0?D:~~O,x<0?(x+=D,x<0&&(x=0)):x>D&&(x=D),O<0?(O+=D,O<0&&(O=0)):O>D&&(O=D),O<x&&(O=x);let ie=this.subarray(x,O);return Object.setPrototypeOf(ie,l.prototype),ie};function J(x,O,D){if(x%1!==0||x<0)throw new RangeError("offset is not uint");if(x+O>D)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(x,O,D){x=x>>>0,O=O>>>0,D||J(x,O,this.length);let ie=this[x],me=1,xe=0;for(;++xe<O&&(me*=256);)ie+=this[x+xe]*me;return ie},l.prototype.readUintBE=l.prototype.readUIntBE=function(x,O,D){x=x>>>0,O=O>>>0,D||J(x,O,this.length);let ie=this[x+--O],me=1;for(;O>0&&(me*=256);)ie+=this[x+--O]*me;return ie},l.prototype.readUint8=l.prototype.readUInt8=function(x,O){return x=x>>>0,O||J(x,1,this.length),this[x]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(x,O){return x=x>>>0,O||J(x,2,this.length),this[x]|this[x+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(x,O){return x=x>>>0,O||J(x,2,this.length),this[x]<<8|this[x+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(x,O){return x=x>>>0,O||J(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(x,O){return x=x>>>0,O||J(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])},l.prototype.readBigUInt64LE=de(function(x){x=x>>>0,Y(x,"offset");let O=this[x],D=this[x+7];(O===void 0||D===void 0)&&se(x,this.length-8);let ie=O+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,me=this[++x]+this[++x]*2**8+this[++x]*2**16+D*2**24;return BigInt(ie)+(BigInt(me)<<BigInt(32))}),l.prototype.readBigUInt64BE=de(function(x){x=x>>>0,Y(x,"offset");let O=this[x],D=this[x+7];(O===void 0||D===void 0)&&se(x,this.length-8);let ie=O*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],me=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+D;return(BigInt(ie)<<BigInt(32))+BigInt(me)}),l.prototype.readIntLE=function(x,O,D){x=x>>>0,O=O>>>0,D||J(x,O,this.length);let ie=this[x],me=1,xe=0;for(;++xe<O&&(me*=256);)ie+=this[x+xe]*me;return me*=128,ie>=me&&(ie-=Math.pow(2,8*O)),ie},l.prototype.readIntBE=function(x,O,D){x=x>>>0,O=O>>>0,D||J(x,O,this.length);let ie=O,me=1,xe=this[x+--ie];for(;ie>0&&(me*=256);)xe+=this[x+--ie]*me;return me*=128,xe>=me&&(xe-=Math.pow(2,8*O)),xe},l.prototype.readInt8=function(x,O){return x=x>>>0,O||J(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]},l.prototype.readInt16LE=function(x,O){x=x>>>0,O||J(x,2,this.length);let D=this[x]|this[x+1]<<8;return D&32768?D|4294901760:D},l.prototype.readInt16BE=function(x,O){x=x>>>0,O||J(x,2,this.length);let D=this[x+1]|this[x]<<8;return D&32768?D|4294901760:D},l.prototype.readInt32LE=function(x,O){return x=x>>>0,O||J(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},l.prototype.readInt32BE=function(x,O){return x=x>>>0,O||J(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},l.prototype.readBigInt64LE=de(function(x){x=x>>>0,Y(x,"offset");let O=this[x],D=this[x+7];(O===void 0||D===void 0)&&se(x,this.length-8);let ie=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(D<<24);return(BigInt(ie)<<BigInt(32))+BigInt(O+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24)}),l.prototype.readBigInt64BE=de(function(x){x=x>>>0,Y(x,"offset");let O=this[x],D=this[x+7];(O===void 0||D===void 0)&&se(x,this.length-8);let ie=(O<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(ie)<<BigInt(32))+BigInt(this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+D)}),l.prototype.readFloatLE=function(x,O){return x=x>>>0,O||J(x,4,this.length),t.read(this,x,!0,23,4)},l.prototype.readFloatBE=function(x,O){return x=x>>>0,O||J(x,4,this.length),t.read(this,x,!1,23,4)},l.prototype.readDoubleLE=function(x,O){return x=x>>>0,O||J(x,8,this.length),t.read(this,x,!0,52,8)},l.prototype.readDoubleBE=function(x,O){return x=x>>>0,O||J(x,8,this.length),t.read(this,x,!1,52,8)};function G(x,O,D,ie,me,xe){if(!l.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>me||O<xe)throw new RangeError('"value" argument is out of bounds');if(D+ie>x.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(x,O,D,ie){if(x=+x,O=O>>>0,D=D>>>0,!ie){let Ce=Math.pow(2,8*D)-1;G(this,x,O,D,Ce,0)}let me=1,xe=0;for(this[O]=x&255;++xe<D&&(me*=256);)this[O+xe]=x/me&255;return O+D},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(x,O,D,ie){if(x=+x,O=O>>>0,D=D>>>0,!ie){let Ce=Math.pow(2,8*D)-1;G(this,x,O,D,Ce,0)}let me=D-1,xe=1;for(this[O+me]=x&255;--me>=0&&(xe*=256);)this[O+me]=x/xe&255;return O+D},l.prototype.writeUint8=l.prototype.writeUInt8=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,1,255,0),this[O]=x&255,O+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,2,65535,0),this[O]=x&255,this[O+1]=x>>>8,O+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,2,65535,0),this[O]=x>>>8,this[O+1]=x&255,O+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,4,4294967295,0),this[O+3]=x>>>24,this[O+2]=x>>>16,this[O+1]=x>>>8,this[O]=x&255,O+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,4,4294967295,0),this[O]=x>>>24,this[O+1]=x>>>16,this[O+2]=x>>>8,this[O+3]=x&255,O+4};function H(x,O,D,ie,me){q(O,ie,me,x,D,7);let xe=Number(O&BigInt(4294967295));x[D++]=xe,xe=xe>>8,x[D++]=xe,xe=xe>>8,x[D++]=xe,xe=xe>>8,x[D++]=xe;let Ce=Number(O>>BigInt(32)&BigInt(4294967295));return x[D++]=Ce,Ce=Ce>>8,x[D++]=Ce,Ce=Ce>>8,x[D++]=Ce,Ce=Ce>>8,x[D++]=Ce,D}function K(x,O,D,ie,me){q(O,ie,me,x,D,7);let xe=Number(O&BigInt(4294967295));x[D+7]=xe,xe=xe>>8,x[D+6]=xe,xe=xe>>8,x[D+5]=xe,xe=xe>>8,x[D+4]=xe;let Ce=Number(O>>BigInt(32)&BigInt(4294967295));return x[D+3]=Ce,Ce=Ce>>8,x[D+2]=Ce,Ce=Ce>>8,x[D+1]=Ce,Ce=Ce>>8,x[D]=Ce,D+8}l.prototype.writeBigUInt64LE=de(function(x,O=0){return H(this,x,O,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=de(function(x,O=0){return K(this,x,O,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(x,O,D,ie){if(x=+x,O=O>>>0,!ie){let ve=Math.pow(2,8*D-1);G(this,x,O,D,ve-1,-ve)}let me=0,xe=1,Ce=0;for(this[O]=x&255;++me<D&&(xe*=256);)x<0&&Ce===0&&this[O+me-1]!==0&&(Ce=1),this[O+me]=(x/xe>>0)-Ce&255;return O+D},l.prototype.writeIntBE=function(x,O,D,ie){if(x=+x,O=O>>>0,!ie){let ve=Math.pow(2,8*D-1);G(this,x,O,D,ve-1,-ve)}let me=D-1,xe=1,Ce=0;for(this[O+me]=x&255;--me>=0&&(xe*=256);)x<0&&Ce===0&&this[O+me+1]!==0&&(Ce=1),this[O+me]=(x/xe>>0)-Ce&255;return O+D},l.prototype.writeInt8=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,1,127,-128),x<0&&(x=255+x+1),this[O]=x&255,O+1},l.prototype.writeInt16LE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,2,32767,-32768),this[O]=x&255,this[O+1]=x>>>8,O+2},l.prototype.writeInt16BE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,2,32767,-32768),this[O]=x>>>8,this[O+1]=x&255,O+2},l.prototype.writeInt32LE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,4,2147483647,-2147483648),this[O]=x&255,this[O+1]=x>>>8,this[O+2]=x>>>16,this[O+3]=x>>>24,O+4},l.prototype.writeInt32BE=function(x,O,D){return x=+x,O=O>>>0,D||G(this,x,O,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[O]=x>>>24,this[O+1]=x>>>16,this[O+2]=x>>>8,this[O+3]=x&255,O+4},l.prototype.writeBigInt64LE=de(function(x,O=0){return H(this,x,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=de(function(x,O=0){return K(this,x,O,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function W(x,O,D,ie,me,xe){if(D+ie>x.length)throw new RangeError("Index out of range");if(D<0)throw new RangeError("Index out of range")}function z(x,O,D,ie,me){return O=+O,D=D>>>0,me||W(x,O,D,4),t.write(x,O,D,ie,23,4),D+4}l.prototype.writeFloatLE=function(x,O,D){return z(this,x,O,!0,D)},l.prototype.writeFloatBE=function(x,O,D){return z(this,x,O,!1,D)};function fe(x,O,D,ie,me){return O=+O,D=D>>>0,me||W(x,O,D,8),t.write(x,O,D,ie,52,8),D+8}l.prototype.writeDoubleLE=function(x,O,D){return fe(this,x,O,!0,D)},l.prototype.writeDoubleBE=function(x,O,D){return fe(this,x,O,!1,D)},l.prototype.copy=function(x,O,D,ie){if(!l.isBuffer(x))throw new TypeError("argument should be a Buffer");if(D||(D=0),!ie&&ie!==0&&(ie=this.length),O>=x.length&&(O=x.length),O||(O=0),ie>0&&ie<D&&(ie=D),ie===D||x.length===0||this.length===0)return 0;if(O<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=this.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),x.length-O<ie-D&&(ie=x.length-O+D);let me=ie-D;return this===x&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(O,D,ie):Uint8Array.prototype.set.call(x,this.subarray(D,ie),O),me},l.prototype.fill=function(x,O,D,ie){if(typeof x=="string"){if(typeof O=="string"?(ie=O,O=0,D=this.length):typeof D=="string"&&(ie=D,D=this.length),ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!l.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);if(x.length===1){let xe=x.charCodeAt(0);(ie==="utf8"&&xe<128||ie==="latin1")&&(x=xe)}}else typeof x=="number"?x=x&255:typeof x=="boolean"&&(x=Number(x));if(O<0||this.length<O||this.length<D)throw new RangeError("Out of range index");if(D<=O)return this;O=O>>>0,D=D===void 0?this.length:D>>>0,x||(x=0);let me;if(typeof x=="number")for(me=O;me<D;++me)this[me]=x;else{let xe=l.isBuffer(x)?x:l.from(x,ie),Ce=xe.length;if(Ce===0)throw new TypeError('The value "'+x+'" is invalid for argument "value"');for(me=0;me<D-O;++me)this[me+O]=xe[me%Ce]}return this};let ae={};function ne(x,O,D){ae[x]=class extends D{constructor(){super(),Object.defineProperty(this,"message",{value:O.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${x}]`,this.stack,delete this.name}get code(){return x}set code(ie){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ie,writable:!0})}toString(){return`${this.name} [${x}]: ${this.message}`}}}ne("ERR_BUFFER_OUT_OF_BOUNDS",function(x){return x?`${x} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ne("ERR_INVALID_ARG_TYPE",function(x,O){return`The "${x}" argument must be of type number. Received type ${typeof O}`},TypeError),ne("ERR_OUT_OF_RANGE",function(x,O,D){let ie=`The value of "${x}" is out of range.`,me=D;return Number.isInteger(D)&&Math.abs(D)>2**32?me=Z(String(D)):typeof D=="bigint"&&(me=String(D),(D>BigInt(2)**BigInt(32)||D<-(BigInt(2)**BigInt(32)))&&(me=Z(me)),me+="n"),ie+=` It must be ${O}. Received ${me}`,ie},RangeError);function Z(x){let O="",D=x.length,ie=x[0]==="-"?1:0;for(;D>=ie+4;D-=3)O=`_${x.slice(D-3,D)}${O}`;return`${x.slice(0,D)}${O}`}function F(x,O,D){Y(O,"offset"),(x[O]===void 0||x[O+D]===void 0)&&se(O,x.length-(D+1))}function q(x,O,D,ie,me,xe){if(x>D||x<O){let Ce=typeof O=="bigint"?"n":"",ve;throw O===0||O===BigInt(0)?ve=`>= 0${Ce} and < 2${Ce} ** ${(xe+1)*8}${Ce}`:ve=`>= -(2${Ce} ** ${(xe+1)*8-1}${Ce}) and < 2 ** ${(xe+1)*8-1}${Ce}`,new ae.ERR_OUT_OF_RANGE("value",ve,x)}F(ie,me,xe)}function Y(x,O){if(typeof x!="number")throw new ae.ERR_INVALID_ARG_TYPE(O,"number",x)}function se(x,O,D){throw Math.floor(x)!==x?(Y(x,D),new ae.ERR_OUT_OF_RANGE("offset","an integer",x)):O<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${O}`,x)}let ye=/[^+/0-9A-Za-z-_]/g;function ee(x){if(x=x.split("=")[0],x=x.trim().replace(ye,""),x.length<2)return"";for(;x.length%4!==0;)x=x+"=";return x}function S(x,O){O=O||1/0;let D,ie=x.length,me=null,xe=[];for(let Ce=0;Ce<ie;++Ce){if(D=x.charCodeAt(Ce),D>55295&&D<57344){if(!me){if(D>56319){(O-=3)>-1&&xe.push(239,191,189);continue}else if(Ce+1===ie){(O-=3)>-1&&xe.push(239,191,189);continue}me=D;continue}if(D<56320){(O-=3)>-1&&xe.push(239,191,189),me=D;continue}D=(me-55296<<10|D-56320)+65536}else me&&(O-=3)>-1&&xe.push(239,191,189);if(me=null,D<128){if((O-=1)<0)break;xe.push(D)}else if(D<2048){if((O-=2)<0)break;xe.push(D>>6|192,D&63|128)}else if(D<65536){if((O-=3)<0)break;xe.push(D>>12|224,D>>6&63|128,D&63|128)}else if(D<1114112){if((O-=4)<0)break;xe.push(D>>18|240,D>>12&63|128,D>>6&63|128,D&63|128)}else throw new Error("Invalid code point")}return xe}function v(x){let O=[];for(let D=0;D<x.length;++D)O.push(x.charCodeAt(D)&255);return O}function C(x,O){let D,ie,me,xe=[];for(let Ce=0;Ce<x.length&&!((O-=2)<0);++Ce)D=x.charCodeAt(Ce),ie=D>>8,me=D%256,xe.push(me),xe.push(ie);return xe}function N(x){return e.toByteArray(ee(x))}function he(x,O,D,ie){let me;for(me=0;me<ie&&!(me+D>=O.length||me>=x.length);++me)O[me+D]=x[me];return me}function ce(x,O){return x instanceof O||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===O.name}function Ee(x){return x!==x}let Te=(function(){let x="0123456789abcdef",O=new Array(256);for(let D=0;D<16;++D){let ie=D*16;for(let me=0;me<16;++me)O[ie+me]=x[D]+x[me]}return O})();function de(x){return typeof BigInt>"u"?we:x}function we(){throw new Error("BigInt not supported")}return Es}var wu,V1,dc,W1,Es,X1,yH=kn(()=>{Pe(),Le(),ke(),wu={},V1=!1,dc={},W1=!1,Es={},X1=!1}),Gr={};al(Gr,{Buffer:()=>Qd,INSPECT_MAX_BYTES:()=>hT,default:()=>_o,kMaxLength:()=>dT});var _o,Qd,hT,dT,Kr=kn(()=>{Pe(),Le(),ke(),yH(),_o=pH(),_o.Buffer,_o.SlowBuffer,_o.INSPECT_MAX_BYTES,_o.kMaxLength,Qd=_o.Buffer,hT=_o.INSPECT_MAX_BYTES,dT=_o.kMaxLength}),Le=kn(()=>{Kr()}),ur=qe((e,t)=>{Pe(),Le(),ke();var n=class extends Error{constructor(o){if(!Array.isArray(o))throw new TypeError(`Expected input to be an Array, got ${typeof o}`);let s="";for(let u=0;u<o.length;u++)s+=` ${o[u].stack}
|
|
143
|
+
`;super(s),this.name="AggregateError",this.errors=o}};t.exports={AggregateError:n,ArrayIsArray(o){return Array.isArray(o)},ArrayPrototypeIncludes(o,s){return o.includes(s)},ArrayPrototypeIndexOf(o,s){return o.indexOf(s)},ArrayPrototypeJoin(o,s){return o.join(s)},ArrayPrototypeMap(o,s){return o.map(s)},ArrayPrototypePop(o,s){return o.pop(s)},ArrayPrototypePush(o,s){return o.push(s)},ArrayPrototypeSlice(o,s,u){return o.slice(s,u)},Error,FunctionPrototypeCall(o,s,...u){return o.call(s,...u)},FunctionPrototypeSymbolHasInstance(o,s){return Function.prototype[Symbol.hasInstance].call(o,s)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(o,s){return Object.defineProperties(o,s)},ObjectDefineProperty(o,s,u){return Object.defineProperty(o,s,u)},ObjectGetOwnPropertyDescriptor(o,s){return Object.getOwnPropertyDescriptor(o,s)},ObjectKeys(o){return Object.keys(o)},ObjectSetPrototypeOf(o,s){return Object.setPrototypeOf(o,s)},Promise,PromisePrototypeCatch(o,s){return o.catch(s)},PromisePrototypeThen(o,s,u){return o.then(s,u)},PromiseReject(o){return Promise.reject(o)},PromiseResolve(o){return Promise.resolve(o)},ReflectApply:Reflect.apply,RegExpPrototypeTest(o,s){return o.test(s)},SafeSet:Set,String,StringPrototypeSlice(o,s,u){return o.slice(s,u)},StringPrototypeToLowerCase(o){return o.toLowerCase()},StringPrototypeToUpperCase(o){return o.toUpperCase()},StringPrototypeTrim(o){return o.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(o,s,u){return o.set(s,u)},Boolean,Uint8Array}}),pT=qe((e,t)=>{Pe(),Le(),ke(),t.exports={format(n,...o){return n.replace(/%([sdifj])/g,function(...[s,u]){let l=o.shift();return u==="f"?l.toFixed(6):u==="j"?JSON.stringify(l):u==="s"&&typeof l=="object"?`${l.constructor!==Object?l.constructor.name:""} {}`.trim():l.toString()})},inspect(n){switch(typeof n){case"string":if(n.includes("'"))if(n.includes('"')){if(!n.includes("`")&&!n.includes("${"))return`\`${n}\``}else return`"${n}"`;return`'${n}'`;case"number":return isNaN(n)?"NaN":Object.is(n,-0)?String(n):n;case"bigint":return`${String(n)}n`;case"boolean":case"undefined":return String(n);case"object":return"{}"}}}}),vn=qe((e,t)=>{Pe(),Le(),ke();var{format:n,inspect:o}=pT(),{AggregateError:s}=ur(),u=globalThis.AggregateError||s,l=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],h=/^([A-Z][a-z0-9]*)+$/,f="__node_internal_",p={};function y(A,I){if(!A)throw new p.ERR_INTERNAL_ASSERTION(I)}function g(A){let I="",R=A.length,T=A[0]==="-"?1:0;for(;R>=T+4;R-=3)I=`_${A.slice(R-3,R)}${I}`;return`${A.slice(0,R)}${I}`}function b(A,I,R){if(typeof I=="function")return y(I.length<=R.length,`Code: ${A}; The provided arguments length (${R.length}) does not match the required ones (${I.length}).`),I(...R);let T=(I.match(/%[dfijoOs]/g)||[]).length;return y(T===R.length,`Code: ${A}; The provided arguments length (${R.length}) does not match the required ones (${T}).`),R.length===0?I:n(I,...R)}function w(A,I,R){R||(R=Error);class T extends R{constructor(...k){super(b(A,I,k))}toString(){return`${this.name} [${A}]: ${this.message}`}}Object.defineProperties(T.prototype,{name:{value:R.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${A}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),T.prototype.code=A,T.prototype[l]=!0,p[A]=T}function B(A){let I=f+A.name;return Object.defineProperty(A,"name",{value:I}),A}function _(A,I){if(A&&I&&A!==I){if(Array.isArray(I.errors))return I.errors.push(A),I;let R=new u([I,A],I.message);return R.code=I.code,R}return A||I}var M=class extends Error{constructor(A="The operation was aborted",I=void 0){if(I!==void 0&&typeof I!="object")throw new p.ERR_INVALID_ARG_TYPE("options","Object",I);super(A,I),this.code="ABORT_ERR",this.name="AbortError"}};w("ERR_ASSERTION","%s",Error),w("ERR_INVALID_ARG_TYPE",(A,I,R)=>{y(typeof A=="string","'name' must be a string"),Array.isArray(I)||(I=[I]);let T="The ";A.endsWith(" argument")?T+=`${A} `:T+=`"${A}" ${A.includes(".")?"property":"argument"} `,T+="must be ";let $=[],k=[],L=[];for(let j of I)y(typeof j=="string","All expected entries have to be of type string"),c.includes(j)?$.push(j.toLowerCase()):h.test(j)?k.push(j):(y(j!=="object",'The value "object" should be written as "Object"'),L.push(j));if(k.length>0){let j=$.indexOf("object");j!==-1&&($.splice($,j,1),k.push("Object"))}if($.length>0){switch($.length){case 1:T+=`of type ${$[0]}`;break;case 2:T+=`one of type ${$[0]} or ${$[1]}`;break;default:{let j=$.pop();T+=`one of type ${$.join(", ")}, or ${j}`}}(k.length>0||L.length>0)&&(T+=" or ")}if(k.length>0){switch(k.length){case 1:T+=`an instance of ${k[0]}`;break;case 2:T+=`an instance of ${k[0]} or ${k[1]}`;break;default:{let j=k.pop();T+=`an instance of ${k.join(", ")}, or ${j}`}}L.length>0&&(T+=" or ")}switch(L.length){case 0:break;case 1:L[0].toLowerCase()!==L[0]&&(T+="an "),T+=`${L[0]}`;break;case 2:T+=`one of ${L[0]} or ${L[1]}`;break;default:{let j=L.pop();T+=`one of ${L.join(", ")}, or ${j}`}}if(R==null)T+=`. Received ${R}`;else if(typeof R=="function"&&R.name)T+=`. Received function ${R.name}`;else if(typeof R=="object"){var U;if((U=R.constructor)!==null&&U!==void 0&&U.name)T+=`. Received an instance of ${R.constructor.name}`;else{let j=o(R,{depth:-1});T+=`. Received ${j}`}}else{let j=o(R,{colors:!1});j.length>25&&(j=`${j.slice(0,25)}...`),T+=`. Received type ${typeof R} (${j})`}return T},TypeError),w("ERR_INVALID_ARG_VALUE",(A,I,R="is invalid")=>{let T=o(I);return T.length>128&&(T=T.slice(0,128)+"..."),`The ${A.includes(".")?"property":"argument"} '${A}' ${R}. Received ${T}`},TypeError),w("ERR_INVALID_RETURN_VALUE",(A,I,R)=>{var T;let $=R!=null&&(T=R.constructor)!==null&&T!==void 0&&T.name?`instance of ${R.constructor.name}`:`type ${typeof R}`;return`Expected ${A} to be returned from the "${I}" function but got ${$}.`},TypeError),w("ERR_MISSING_ARGS",(...A)=>{y(A.length>0,"At least one arg needs to be specified");let I,R=A.length;switch(A=(Array.isArray(A)?A:[A]).map(T=>`"${T}"`).join(" or "),R){case 1:I+=`The ${A[0]} argument`;break;case 2:I+=`The ${A[0]} and ${A[1]} arguments`;break;default:{let T=A.pop();I+=`The ${A.join(", ")}, and ${T} arguments`}break}return`${I} must be specified`},TypeError),w("ERR_OUT_OF_RANGE",(A,I,R)=>{y(I,'Missing "range" argument');let T;if(Number.isInteger(R)&&Math.abs(R)>2**32)T=g(String(R));else if(typeof R=="bigint"){T=String(R);let $=BigInt(2)**BigInt(32);(R>$||R<-$)&&(T=g(T)),T+="n"}else T=o(R);return`The value of "${A}" is out of range. It must be ${I}. Received ${T}`},RangeError),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),w("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),w("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),w("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),w("ERR_STREAM_WRITE_AFTER_END","write after end",Error),w("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:M,aggregateTwoErrors:B(_),hideStackFrames:B,codes:p}}),Zc=qe((e,t)=>{Pe(),Le(),ke();var{AbortController:n,AbortSignal:o}=typeof self<"u"?self:typeof window<"u"?window:void 0;t.exports=n,t.exports.AbortSignal=o,t.exports.default=n}),Ls={};al(Ls,{EventEmitter:()=>yT,default:()=>xu,defaultMaxListeners:()=>gT,init:()=>mT,listenerCount:()=>bT,on:()=>AT,once:()=>vT});function gH(){if(Z1)return pc;Z1=!0;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(R,T,$){return Function.prototype.apply.call(R,T,$)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(R){return Object.getOwnPropertyNames(R).concat(Object.getOwnPropertySymbols(R))}:n=function(R){return Object.getOwnPropertyNames(R)};function o(R){console&&console.warn&&console.warn(R)}var s=Number.isNaN||function(R){return R!==R};function u(){u.init.call(this)}pc=u,pc.once=M,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var l=10;function c(R){if(typeof R!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof R)}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(R){if(typeof R!="number"||R<0||s(R))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+R+".");l=R}}),u.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(R){if(typeof R!="number"||R<0||s(R))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+R+".");return this._maxListeners=R,this};function h(R){return R._maxListeners===void 0?u.defaultMaxListeners:R._maxListeners}u.prototype.getMaxListeners=function(){return h(this)},u.prototype.emit=function(R){for(var T=[],$=1;$<arguments.length;$++)T.push(arguments[$]);var k=R==="error",L=this._events;if(L!==void 0)k=k&&L.error===void 0;else if(!k)return!1;if(k){var U;if(T.length>0&&(U=T[0]),U instanceof Error)throw U;var j=new Error("Unhandled error."+(U?" ("+U.message+")":""));throw j.context=U,j}var Q=L[R];if(Q===void 0)return!1;if(typeof Q=="function")t(Q,this,T);else for(var P=Q.length,re=w(Q,P),$=0;$<P;++$)t(re[$],this,T);return!0};function f(R,T,$,k){var L,U,j;if(c($),U=R._events,U===void 0?(U=R._events=Object.create(null),R._eventsCount=0):(U.newListener!==void 0&&(R.emit("newListener",T,$.listener?$.listener:$),U=R._events),j=U[T]),j===void 0)j=U[T]=$,++R._eventsCount;else if(typeof j=="function"?j=U[T]=k?[$,j]:[j,$]:k?j.unshift($):j.push($),L=h(R),L>0&&j.length>L&&!j.warned){j.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=R,Q.type=T,Q.count=j.length,o(Q)}return R}u.prototype.addListener=function(R,T){return f(this,R,T,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(R,T){return f(this,R,T,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(R,T,$){var k={fired:!1,wrapFn:void 0,target:R,type:T,listener:$},L=p.bind(k);return L.listener=$,k.wrapFn=L,L}u.prototype.once=function(R,T){return c(T),this.on(R,y(this,R,T)),this},u.prototype.prependOnceListener=function(R,T){return c(T),this.prependListener(R,y(this,R,T)),this},u.prototype.removeListener=function(R,T){var $,k,L,U,j;if(c(T),k=this._events,k===void 0)return this;if($=k[R],$===void 0)return this;if($===T||$.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete k[R],k.removeListener&&this.emit("removeListener",R,$.listener||T));else if(typeof $!="function"){for(L=-1,U=$.length-1;U>=0;U--)if($[U]===T||$[U].listener===T){j=$[U].listener,L=U;break}if(L<0)return this;L===0?$.shift():B($,L),$.length===1&&(k[R]=$[0]),k.removeListener!==void 0&&this.emit("removeListener",R,j||T)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(R){var T,$,k;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[R]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[R]),this;if(arguments.length===0){var L=Object.keys($),U;for(k=0;k<L.length;++k)U=L[k],U!=="removeListener"&&this.removeAllListeners(U);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=$[R],typeof T=="function")this.removeListener(R,T);else if(T!==void 0)for(k=T.length-1;k>=0;k--)this.removeListener(R,T[k]);return this};function g(R,T,$){var k=R._events;if(k===void 0)return[];var L=k[T];return L===void 0?[]:typeof L=="function"?$?[L.listener||L]:[L]:$?_(L):w(L,L.length)}u.prototype.listeners=function(R){return g(this,R,!0)},u.prototype.rawListeners=function(R){return g(this,R,!1)},u.listenerCount=function(R,T){return typeof R.listenerCount=="function"?R.listenerCount(T):b.call(R,T)},u.prototype.listenerCount=b;function b(R){var T=this._events;if(T!==void 0){var $=T[R];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function w(R,T){for(var $=new Array(T),k=0;k<T;++k)$[k]=R[k];return $}function B(R,T){for(;T+1<R.length;T++)R[T]=R[T+1];R.pop()}function _(R){for(var T=new Array(R.length),$=0;$<T.length;++$)T[$]=R[$].listener||R[$];return T}function M(R,T){return new Promise(function($,k){function L(j){R.removeListener(T,U),k(j)}function U(){typeof R.removeListener=="function"&&R.removeListener("error",L),$([].slice.call(arguments))}I(R,T,U,{once:!0}),T!=="error"&&A(R,L,{once:!0})})}function A(R,T,$){typeof R.on=="function"&&I(R,"error",T,$)}function I(R,T,$,k){if(typeof R.on=="function")k.once?R.once(T,$):R.on(T,$);else if(typeof R.addEventListener=="function")R.addEventListener(T,function L(U){k.once&&R.removeEventListener(T,L),$(U)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof R)}return pc}var pc,Z1,xu,yT,gT,mT,bT,AT,vT,Na=kn(()=>{Pe(),Le(),ke(),pc={},Z1=!1,xu=gH(),xu.once,xu.once=function(e,t){return new Promise((n,o)=>{function s(...l){u!==void 0&&e.removeListener("error",u),n(l)}let u;t!=="error"&&(u=l=>{e.removeListener(name,s),o(l)},e.once("error",u)),e.once(t,s)})},xu.on=function(e,t){let n=[],o=[],s=null,u=!1,l={async next(){let f=n.shift();if(f)return createIterResult(f,!1);if(s){let p=Promise.reject(s);return s=null,p}return u?createIterResult(void 0,!0):new Promise((p,y)=>o.push({resolve:p,reject:y}))},async return(){e.removeListener(t,c),e.removeListener("error",h),u=!0;for(let f of o)f.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(f){s=f,e.removeListener(t,c),e.removeListener("error",h)},[Symbol.asyncIterator](){return this}};return e.on(t,c),e.on("error",h),l;function c(...f){let p=o.shift();p?p.resolve(createIterResult(f,!1)):n.push(f)}function h(f){u=!0;let p=o.shift();p?p.reject(f):s=f,l.return()}},{EventEmitter:yT,defaultMaxListeners:gT,init:mT,listenerCount:bT,on:AT,once:vT}=xu}),Rn=qe((e,t)=>{Pe(),Le(),ke();var n=(Kr(),Yt(Gr)),{format:o,inspect:s}=pT(),{codes:{ERR_INVALID_ARG_TYPE:u}}=vn(),{kResistStopPropagation:l,AggregateError:c,SymbolDispose:h}=ur(),f=globalThis.AbortSignal||Zc().AbortSignal,p=globalThis.AbortController||Zc().AbortController,y=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||n.Blob,b=typeof g<"u"?function(_){return _ instanceof g}:function(_){return!1},w=(_,M)=>{if(_!==void 0&&(_===null||typeof _!="object"||!("aborted"in _)))throw new u(M,"AbortSignal",_)},B=(_,M)=>{if(typeof _!="function")throw new u(M,"Function",_)};t.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(_){let M=!1;return function(...A){M||(M=!0,_.apply(this,A))}},createDeferredPromise:function(){let _,M;return{promise:new Promise((A,I)=>{_=A,M=I}),resolve:_,reject:M}},promisify(_){return new Promise((M,A)=>{_((I,...R)=>I?A(I):M(...R))})},debuglog(){return function(){}},format:o,inspect:s,types:{isAsyncFunction(_){return _ instanceof y},isArrayBufferView(_){return ArrayBuffer.isView(_)}},isBlob:b,deprecate(_,M){return _},addAbortListener:(Na(),Yt(Ls)).addAbortListener||function(_,M){if(_===void 0)throw new u("signal","AbortSignal",_);w(_,"signal"),B(M,"listener");let A;return _.aborted?queueMicrotask(()=>M()):(_.addEventListener("abort",M,{__proto__:null,once:!0,[l]:!0}),A=()=>{_.removeEventListener("abort",M)}),{__proto__:null,[h](){var I;(I=A)===null||I===void 0||I()}}},AbortSignalAny:f.any||function(_){if(_.length===1)return _[0];let M=new p,A=()=>M.abort();return _.forEach(I=>{w(I,"signals"),I.addEventListener("abort",A,{once:!0})}),M.signal.addEventListener("abort",()=>{_.forEach(I=>I.removeEventListener("abort",A))},{once:!0}),M.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Ef=qe((e,t)=>{Pe(),Le(),ke();var{ArrayIsArray:n,ArrayPrototypeIncludes:o,ArrayPrototypeJoin:s,ArrayPrototypeMap:u,NumberIsInteger:l,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:h,NumberMIN_SAFE_INTEGER:f,NumberParseInt:p,ObjectPrototypeHasOwnProperty:y,RegExpPrototypeExec:g,String:b,StringPrototypeToUpperCase:w,StringPrototypeTrim:B}=ur(),{hideStackFrames:_,codes:{ERR_SOCKET_BAD_PORT:M,ERR_INVALID_ARG_TYPE:A,ERR_INVALID_ARG_VALUE:I,ERR_OUT_OF_RANGE:R,ERR_UNKNOWN_SIGNAL:T}}=vn(),{normalizeEncoding:$}=Rn(),{isAsyncFunction:k,isArrayBufferView:L}=Rn().types,U={};function j(ce){return ce===(ce|0)}function Q(ce){return ce===ce>>>0}var P=/^[0-7]+$/,re="must be a 32-bit unsigned integer or an octal string";function le(ce,Ee,Te){if(typeof ce>"u"&&(ce=Te),typeof ce=="string"){if(g(P,ce)===null)throw new I(Ee,ce,re);ce=p(ce,8)}return te(ce,Ee),ce}var oe=_((ce,Ee,Te=f,de=h)=>{if(typeof ce!="number")throw new A(Ee,"number",ce);if(!l(ce))throw new R(Ee,"an integer",ce);if(ce<Te||ce>de)throw new R(Ee,`>= ${Te} && <= ${de}`,ce)}),X=_((ce,Ee,Te=-2147483648,de=2147483647)=>{if(typeof ce!="number")throw new A(Ee,"number",ce);if(!l(ce))throw new R(Ee,"an integer",ce);if(ce<Te||ce>de)throw new R(Ee,`>= ${Te} && <= ${de}`,ce)}),te=_((ce,Ee,Te=!1)=>{if(typeof ce!="number")throw new A(Ee,"number",ce);if(!l(ce))throw new R(Ee,"an integer",ce);let de=Te?1:0,we=4294967295;if(ce<de||ce>we)throw new R(Ee,`>= ${de} && <= ${we}`,ce)});function pe(ce,Ee){if(typeof ce!="string")throw new A(Ee,"string",ce)}function ue(ce,Ee,Te=void 0,de){if(typeof ce!="number")throw new A(Ee,"number",ce);if(Te!=null&&ce<Te||de!=null&&ce>de||(Te!=null||de!=null)&&c(ce))throw new R(Ee,`${Te!=null?`>= ${Te}`:""}${Te!=null&&de!=null?" && ":""}${de!=null?`<= ${de}`:""}`,ce)}var J=_((ce,Ee,Te)=>{if(!o(Te,ce)){let de="must be one of: "+s(u(Te,we=>typeof we=="string"?`'${we}'`:b(we)),", ");throw new I(Ee,ce,de)}});function G(ce,Ee){if(typeof ce!="boolean")throw new A(Ee,"boolean",ce)}function H(ce,Ee,Te){return ce==null||!y(ce,Ee)?Te:ce[Ee]}var K=_((ce,Ee,Te=null)=>{let de=H(Te,"allowArray",!1),we=H(Te,"allowFunction",!1);if(!H(Te,"nullable",!1)&&ce===null||!de&&n(ce)||typeof ce!="object"&&(!we||typeof ce!="function"))throw new A(Ee,"Object",ce)}),W=_((ce,Ee)=>{if(ce!=null&&typeof ce!="object"&&typeof ce!="function")throw new A(Ee,"a dictionary",ce)}),z=_((ce,Ee,Te=0)=>{if(!n(ce))throw new A(Ee,"Array",ce);if(ce.length<Te){let de=`must be longer than ${Te}`;throw new I(Ee,ce,de)}});function fe(ce,Ee){z(ce,Ee);for(let Te=0;Te<ce.length;Te++)pe(ce[Te],`${Ee}[${Te}]`)}function ae(ce,Ee){z(ce,Ee);for(let Te=0;Te<ce.length;Te++)G(ce[Te],`${Ee}[${Te}]`)}function ne(ce,Ee){z(ce,Ee);for(let Te=0;Te<ce.length;Te++){let de=ce[Te],we=`${Ee}[${Te}]`;if(de==null)throw new A(we,"AbortSignal",de);se(de,we)}}function Z(ce,Ee="signal"){if(pe(ce,Ee),U[ce]===void 0)throw U[w(ce)]!==void 0?new T(ce+" (signals must use all capital letters)"):new T(ce)}var F=_((ce,Ee="buffer")=>{if(!L(ce))throw new A(Ee,["Buffer","TypedArray","DataView"],ce)});function q(ce,Ee){let Te=$(Ee),de=ce.length;if(Te==="hex"&&de%2!==0)throw new I("encoding",Ee,`is invalid for data of length ${de}`)}function Y(ce,Ee="Port",Te=!0){if(typeof ce!="number"&&typeof ce!="string"||typeof ce=="string"&&B(ce).length===0||+ce!==+ce>>>0||ce>65535||ce===0&&!Te)throw new M(Ee,ce,Te);return ce|0}var se=_((ce,Ee)=>{if(ce!==void 0&&(ce===null||typeof ce!="object"||!("aborted"in ce)))throw new A(Ee,"AbortSignal",ce)}),ye=_((ce,Ee)=>{if(typeof ce!="function")throw new A(Ee,"Function",ce)}),ee=_((ce,Ee)=>{if(typeof ce!="function"||k(ce))throw new A(Ee,"Function",ce)}),S=_((ce,Ee)=>{if(ce!==void 0)throw new A(Ee,"undefined",ce)});function v(ce,Ee,Te){if(!o(Te,ce))throw new A(Ee,`('${s(Te,"|")}')`,ce)}var C=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function N(ce,Ee){if(typeof ce>"u"||!g(C,ce))throw new I(Ee,ce,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function he(ce){if(typeof ce=="string")return N(ce,"hints"),ce;if(n(ce)){let Ee=ce.length,Te="";if(Ee===0)return Te;for(let de=0;de<Ee;de++){let we=ce[de];N(we,"hints"),Te+=we,de!==Ee-1&&(Te+=", ")}return Te}throw new I("hints",ce,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:j,isUint32:Q,parseFileMode:le,validateArray:z,validateStringArray:fe,validateBooleanArray:ae,validateAbortSignalArray:ne,validateBoolean:G,validateBuffer:F,validateDictionary:W,validateEncoding:q,validateFunction:ye,validateInt32:X,validateInteger:oe,validateNumber:ue,validateObject:K,validateOneOf:J,validatePlainFunction:ee,validatePort:Y,validateSignalName:Z,validateString:pe,validateUint32:te,validateUndefined:S,validateUnion:v,validateAbortSignal:se,validateLinkHeaderValue:he}}),Pa=qe((e,t)=>{Pe(),Le(),ke();var n=t.exports={},o,s;function u(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?o=setTimeout:o=u}catch{o=u}try{typeof clearTimeout=="function"?s=clearTimeout:s=l}catch{s=l}})();function c(M){if(o===setTimeout)return setTimeout(M,0);if((o===u||!o)&&setTimeout)return o=setTimeout,setTimeout(M,0);try{return o(M,0)}catch{try{return o.call(null,M,0)}catch{return o.call(this,M,0)}}}function h(M){if(s===clearTimeout)return clearTimeout(M);if((s===l||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(M);try{return s(M)}catch{try{return s.call(null,M)}catch{return s.call(this,M)}}}var f=[],p=!1,y,g=-1;function b(){!p||!y||(p=!1,y.length?f=y.concat(f):g=-1,f.length&&w())}function w(){if(!p){var M=c(b);p=!0;for(var A=f.length;A;){for(y=f,f=[];++g<A;)y&&y[g].run();g=-1,A=f.length}y=null,p=!1,h(M)}}n.nextTick=function(M){var A=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)A[I-1]=arguments[I];f.push(new B(M,A)),f.length===1&&!p&&c(w)};function B(M,A){this.fun=M,this.array=A}B.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={};function _(){}n.on=_,n.addListener=_,n.once=_,n.off=_,n.removeListener=_,n.removeAllListeners=_,n.emit=_,n.prependListener=_,n.prependOnceListener=_,n.listeners=function(M){return[]},n.binding=function(M){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(M){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}}),Go=qe((e,t)=>{Pe(),Le(),ke();var{SymbolAsyncIterator:n,SymbolIterator:o,SymbolFor:s}=ur(),u=s("nodejs.stream.destroyed"),l=s("nodejs.stream.errored"),c=s("nodejs.stream.readable"),h=s("nodejs.stream.writable"),f=s("nodejs.stream.disturbed"),p=s("nodejs.webstream.isClosedPromise"),y=s("nodejs.webstream.controllerErrorFunction");function g(H,K=!1){var W;return!!(H&&typeof H.pipe=="function"&&typeof H.on=="function"&&(!K||typeof H.pause=="function"&&typeof H.resume=="function")&&(!H._writableState||((W=H._readableState)===null||W===void 0?void 0:W.readable)!==!1)&&(!H._writableState||H._readableState))}function b(H){var K;return!!(H&&typeof H.write=="function"&&typeof H.on=="function"&&(!H._readableState||((K=H._writableState)===null||K===void 0?void 0:K.writable)!==!1))}function w(H){return!!(H&&typeof H.pipe=="function"&&H._readableState&&typeof H.on=="function"&&typeof H.write=="function")}function B(H){return H&&(H._readableState||H._writableState||typeof H.write=="function"&&typeof H.on=="function"||typeof H.pipe=="function"&&typeof H.on=="function")}function _(H){return!!(H&&!B(H)&&typeof H.pipeThrough=="function"&&typeof H.getReader=="function"&&typeof H.cancel=="function")}function M(H){return!!(H&&!B(H)&&typeof H.getWriter=="function"&&typeof H.abort=="function")}function A(H){return!!(H&&!B(H)&&typeof H.readable=="object"&&typeof H.writable=="object")}function I(H){return _(H)||M(H)||A(H)}function R(H,K){return H==null?!1:K===!0?typeof H[n]=="function":K===!1?typeof H[o]=="function":typeof H[n]=="function"||typeof H[o]=="function"}function T(H){if(!B(H))return null;let K=H._writableState,W=H._readableState,z=K||W;return!!(H.destroyed||H[u]||z!=null&&z.destroyed)}function $(H){if(!b(H))return null;if(H.writableEnded===!0)return!0;let K=H._writableState;return K!=null&&K.errored?!1:typeof(K==null?void 0:K.ended)!="boolean"?null:K.ended}function k(H,K){if(!b(H))return null;if(H.writableFinished===!0)return!0;let W=H._writableState;return W!=null&&W.errored?!1:typeof(W==null?void 0:W.finished)!="boolean"?null:!!(W.finished||K===!1&&W.ended===!0&&W.length===0)}function L(H){if(!g(H))return null;if(H.readableEnded===!0)return!0;let K=H._readableState;return!K||K.errored?!1:typeof(K==null?void 0:K.ended)!="boolean"?null:K.ended}function U(H,K){if(!g(H))return null;let W=H._readableState;return W!=null&&W.errored?!1:typeof(W==null?void 0:W.endEmitted)!="boolean"?null:!!(W.endEmitted||K===!1&&W.ended===!0&&W.length===0)}function j(H){return H&&H[c]!=null?H[c]:typeof(H==null?void 0:H.readable)!="boolean"?null:T(H)?!1:g(H)&&H.readable&&!U(H)}function Q(H){return H&&H[h]!=null?H[h]:typeof(H==null?void 0:H.writable)!="boolean"?null:T(H)?!1:b(H)&&H.writable&&!$(H)}function P(H,K){return B(H)?T(H)?!0:!((K==null?void 0:K.readable)!==!1&&j(H)||(K==null?void 0:K.writable)!==!1&&Q(H)):null}function re(H){var K,W;return B(H)?H.writableErrored?H.writableErrored:(K=(W=H._writableState)===null||W===void 0?void 0:W.errored)!==null&&K!==void 0?K:null:null}function le(H){var K,W;return B(H)?H.readableErrored?H.readableErrored:(K=(W=H._readableState)===null||W===void 0?void 0:W.errored)!==null&&K!==void 0?K:null:null}function oe(H){if(!B(H))return null;if(typeof H.closed=="boolean")return H.closed;let K=H._writableState,W=H._readableState;return typeof(K==null?void 0:K.closed)=="boolean"||typeof(W==null?void 0:W.closed)=="boolean"?(K==null?void 0:K.closed)||(W==null?void 0:W.closed):typeof H._closed=="boolean"&&X(H)?H._closed:null}function X(H){return typeof H._closed=="boolean"&&typeof H._defaultKeepAlive=="boolean"&&typeof H._removedConnection=="boolean"&&typeof H._removedContLen=="boolean"}function te(H){return typeof H._sent100=="boolean"&&X(H)}function pe(H){var K;return typeof H._consuming=="boolean"&&typeof H._dumped=="boolean"&&((K=H.req)===null||K===void 0?void 0:K.upgradeOrConnect)===void 0}function ue(H){if(!B(H))return null;let K=H._writableState,W=H._readableState,z=K||W;return!z&&te(H)||!!(z&&z.autoDestroy&&z.emitClose&&z.closed===!1)}function J(H){var K;return!!(H&&((K=H[f])!==null&&K!==void 0?K:H.readableDidRead||H.readableAborted))}function G(H){var K,W,z,fe,ae,ne,Z,F,q,Y;return!!(H&&((K=(W=(z=(fe=(ae=(ne=H[l])!==null&&ne!==void 0?ne:H.readableErrored)!==null&&ae!==void 0?ae:H.writableErrored)!==null&&fe!==void 0?fe:(Z=H._readableState)===null||Z===void 0?void 0:Z.errorEmitted)!==null&&z!==void 0?z:(F=H._writableState)===null||F===void 0?void 0:F.errorEmitted)!==null&&W!==void 0?W:(q=H._readableState)===null||q===void 0?void 0:q.errored)!==null&&K!==void 0?K:!((Y=H._writableState)===null||Y===void 0)&&Y.errored))}t.exports={isDestroyed:T,kIsDestroyed:u,isDisturbed:J,kIsDisturbed:f,isErrored:G,kIsErrored:l,isReadable:j,kIsReadable:c,kIsClosedPromise:p,kControllerErrorFunction:y,kIsWritable:h,isClosed:oe,isDuplexNodeStream:w,isFinished:P,isIterable:R,isReadableNodeStream:g,isReadableStream:_,isReadableEnded:L,isReadableFinished:U,isReadableErrored:le,isNodeStream:B,isWebStream:I,isWritable:Q,isWritableNodeStream:b,isWritableStream:M,isWritableEnded:$,isWritableFinished:k,isWritableErrored:re,isServerRequest:pe,isServerResponse:te,willEmitClose:ue,isTransformStream:A}}),zs=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),{AbortError:o,codes:s}=vn(),{ERR_INVALID_ARG_TYPE:u,ERR_STREAM_PREMATURE_CLOSE:l}=s,{kEmptyObject:c,once:h}=Rn(),{validateAbortSignal:f,validateFunction:p,validateObject:y,validateBoolean:g}=Ef(),{Promise:b,PromisePrototypeThen:w,SymbolDispose:B}=ur(),{isClosed:_,isReadable:M,isReadableNodeStream:A,isReadableStream:I,isReadableFinished:R,isReadableErrored:T,isWritable:$,isWritableNodeStream:k,isWritableStream:L,isWritableFinished:U,isWritableErrored:j,isNodeStream:Q,willEmitClose:P,kIsClosedPromise:re}=Go(),le;function oe(J){return J.setHeader&&typeof J.abort=="function"}var X=()=>{};function te(J,G,H){var K,W;if(arguments.length===2?(H=G,G=c):G==null?G=c:y(G,"options"),p(H,"callback"),f(G.signal,"options.signal"),H=h(H),I(J)||L(J))return pe(J,G,H);if(!Q(J))throw new u("stream",["ReadableStream","WritableStream","Stream"],J);let z=(K=G.readable)!==null&&K!==void 0?K:A(J),fe=(W=G.writable)!==null&&W!==void 0?W:k(J),ae=J._writableState,ne=J._readableState,Z=()=>{J.writable||Y()},F=P(J)&&A(J)===z&&k(J)===fe,q=U(J,!1),Y=()=>{q=!0,J.destroyed&&(F=!1),!(F&&(!J.readable||z))&&(!z||se)&&H.call(J)},se=R(J,!1),ye=()=>{se=!0,J.destroyed&&(F=!1),!(F&&(!J.writable||fe))&&(!fe||q)&&H.call(J)},ee=ce=>{H.call(J,ce)},S=_(J),v=()=>{S=!0;let ce=j(J)||T(J);if(ce&&typeof ce!="boolean")return H.call(J,ce);if(z&&!se&&A(J,!0)&&!R(J,!1))return H.call(J,new l);if(fe&&!q&&!U(J,!1))return H.call(J,new l);H.call(J)},C=()=>{S=!0;let ce=j(J)||T(J);if(ce&&typeof ce!="boolean")return H.call(J,ce);H.call(J)},N=()=>{J.req.on("finish",Y)};oe(J)?(J.on("complete",Y),F||J.on("abort",v),J.req?N():J.on("request",N)):fe&&!ae&&(J.on("end",Z),J.on("close",Z)),!F&&typeof J.aborted=="boolean"&&J.on("aborted",v),J.on("end",ye),J.on("finish",Y),G.error!==!1&&J.on("error",ee),J.on("close",v),S?n.nextTick(v):ae!=null&&ae.errorEmitted||ne!=null&&ne.errorEmitted?F||n.nextTick(C):(!z&&(!F||M(J))&&(q||$(J)===!1)||!fe&&(!F||$(J))&&(se||M(J)===!1)||ne&&J.req&&J.aborted)&&n.nextTick(C);let he=()=>{H=X,J.removeListener("aborted",v),J.removeListener("complete",Y),J.removeListener("abort",v),J.removeListener("request",N),J.req&&J.req.removeListener("finish",Y),J.removeListener("end",Z),J.removeListener("close",Z),J.removeListener("finish",Y),J.removeListener("end",ye),J.removeListener("error",ee),J.removeListener("close",v)};if(G.signal&&!S){let ce=()=>{let Ee=H;he(),Ee.call(J,new o(void 0,{cause:G.signal.reason}))};if(G.signal.aborted)n.nextTick(ce);else{le=le||Rn().addAbortListener;let Ee=le(G.signal,ce),Te=H;H=h((...de)=>{Ee[B](),Te.apply(J,de)})}}return he}function pe(J,G,H){let K=!1,W=X;if(G.signal)if(W=()=>{K=!0,H.call(J,new o(void 0,{cause:G.signal.reason}))},G.signal.aborted)n.nextTick(W);else{le=le||Rn().addAbortListener;let fe=le(G.signal,W),ae=H;H=h((...ne)=>{fe[B](),ae.apply(J,ne)})}let z=(...fe)=>{K||n.nextTick(()=>H.apply(J,fe))};return w(J[re].promise,z,z),X}function ue(J,G){var H;let K=!1;return G===null&&(G=c),(H=G)!==null&&H!==void 0&&H.cleanup&&(g(G.cleanup,"cleanup"),K=G.cleanup),new b((W,z)=>{let fe=te(J,G,ae=>{K&&fe(),ae?z(ae):W()})})}t.exports=te,t.exports.finished=ue}),ul=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:s},AbortError:u}=vn(),{Symbol:l}=ur(),{kIsDestroyed:c,isDestroyed:h,isFinished:f,isServerRequest:p}=Go(),y=l("kDestroy"),g=l("kConstruct");function b(P,re,le){P&&(P.stack,re&&!re.errored&&(re.errored=P),le&&!le.errored&&(le.errored=P))}function w(P,re){let le=this._readableState,oe=this._writableState,X=oe||le;return oe!=null&&oe.destroyed||le!=null&&le.destroyed?(typeof re=="function"&&re(),this):(b(P,oe,le),oe&&(oe.destroyed=!0),le&&(le.destroyed=!0),X.constructed?B(this,P,re):this.once(y,function(te){B(this,o(te,P),re)}),this)}function B(P,re,le){let oe=!1;function X(te){if(oe)return;oe=!0;let pe=P._readableState,ue=P._writableState;b(te,ue,pe),ue&&(ue.closed=!0),pe&&(pe.closed=!0),typeof le=="function"&&le(te),te?n.nextTick(_,P,te):n.nextTick(M,P)}try{P._destroy(re||null,X)}catch(te){X(te)}}function _(P,re){A(P,re),M(P)}function M(P){let re=P._readableState,le=P._writableState;le&&(le.closeEmitted=!0),re&&(re.closeEmitted=!0),(le!=null&&le.emitClose||re!=null&&re.emitClose)&&P.emit("close")}function A(P,re){let le=P._readableState,oe=P._writableState;oe!=null&&oe.errorEmitted||le!=null&&le.errorEmitted||(oe&&(oe.errorEmitted=!0),le&&(le.errorEmitted=!0),P.emit("error",re))}function I(){let P=this._readableState,re=this._writableState;P&&(P.constructed=!0,P.closed=!1,P.closeEmitted=!1,P.destroyed=!1,P.errored=null,P.errorEmitted=!1,P.reading=!1,P.ended=P.readable===!1,P.endEmitted=P.readable===!1),re&&(re.constructed=!0,re.destroyed=!1,re.closed=!1,re.closeEmitted=!1,re.errored=null,re.errorEmitted=!1,re.finalCalled=!1,re.prefinished=!1,re.ended=re.writable===!1,re.ending=re.writable===!1,re.finished=re.writable===!1)}function R(P,re,le){let oe=P._readableState,X=P._writableState;if(X!=null&&X.destroyed||oe!=null&&oe.destroyed)return this;oe!=null&&oe.autoDestroy||X!=null&&X.autoDestroy?P.destroy(re):re&&(re.stack,X&&!X.errored&&(X.errored=re),oe&&!oe.errored&&(oe.errored=re),le?n.nextTick(A,P,re):A(P,re))}function T(P,re){if(typeof P._construct!="function")return;let le=P._readableState,oe=P._writableState;le&&(le.constructed=!1),oe&&(oe.constructed=!1),P.once(g,re),!(P.listenerCount(g)>1)&&n.nextTick($,P)}function $(P){let re=!1;function le(oe){if(re){R(P,oe??new s);return}re=!0;let X=P._readableState,te=P._writableState,pe=te||X;X&&(X.constructed=!0),te&&(te.constructed=!0),pe.destroyed?P.emit(y,oe):oe?R(P,oe,!0):n.nextTick(k,P)}try{P._construct(oe=>{n.nextTick(le,oe)})}catch(oe){n.nextTick(le,oe)}}function k(P){P.emit(g)}function L(P){return(P==null?void 0:P.setHeader)&&typeof P.abort=="function"}function U(P){P.emit("close")}function j(P,re){P.emit("error",re),n.nextTick(U,P)}function Q(P,re){!P||h(P)||(!re&&!f(P)&&(re=new u),p(P)?(P.socket=null,P.destroy(re)):L(P)?P.abort():L(P.req)?P.req.abort():typeof P.destroy=="function"?P.destroy(re):typeof P.close=="function"?P.close():re?n.nextTick(j,P,re):n.nextTick(U,P),P.destroyed||(P[c]=!0))}t.exports={construct:T,destroyer:Q,destroy:w,undestroy:I,errorOrDestroy:R}}),mw=qe((e,t)=>{Pe(),Le(),ke();var{ArrayIsArray:n,ObjectSetPrototypeOf:o}=ur(),{EventEmitter:s}=(Na(),Yt(Ls));function u(c){s.call(this,c)}o(u.prototype,s.prototype),o(u,s),u.prototype.pipe=function(c,h){let f=this;function p(M){c.writable&&c.write(M)===!1&&f.pause&&f.pause()}f.on("data",p);function y(){f.readable&&f.resume&&f.resume()}c.on("drain",y),!c._isStdio&&(!h||h.end!==!1)&&(f.on("end",b),f.on("close",w));let g=!1;function b(){g||(g=!0,c.end())}function w(){g||(g=!0,typeof c.destroy=="function"&&c.destroy())}function B(M){_(),s.listenerCount(this,"error")===0&&this.emit("error",M)}l(f,"error",B),l(c,"error",B);function _(){f.removeListener("data",p),c.removeListener("drain",y),f.removeListener("end",b),f.removeListener("close",w),f.removeListener("error",B),c.removeListener("error",B),f.removeListener("end",_),f.removeListener("close",_),c.removeListener("close",_)}return f.on("end",_),f.on("close",_),c.on("close",_),c.emit("pipe",f),c};function l(c,h,f){if(typeof c.prependListener=="function")return c.prependListener(h,f);!c._events||!c._events[h]?c.on(h,f):n(c._events[h])?c._events[h].unshift(f):c._events[h]=[f,c._events[h]]}t.exports={Stream:u,prependListener:l}}),Pp=qe((e,t)=>{Pe(),Le(),ke();var{SymbolDispose:n}=ur(),{AbortError:o,codes:s}=vn(),{isNodeStream:u,isWebStream:l,kControllerErrorFunction:c}=Go(),h=zs(),{ERR_INVALID_ARG_TYPE:f}=s,p,y=(g,b)=>{if(typeof g!="object"||!("aborted"in g))throw new f(b,"AbortSignal",g)};t.exports.addAbortSignal=function(g,b){if(y(g,"signal"),!u(b)&&!l(b))throw new f("stream",["ReadableStream","WritableStream","Stream"],b);return t.exports.addAbortSignalNoValidate(g,b)},t.exports.addAbortSignalNoValidate=function(g,b){if(typeof g!="object"||!("aborted"in g))return b;let w=u(b)?()=>{b.destroy(new o(void 0,{cause:g.reason}))}:()=>{b[c](new o(void 0,{cause:g.reason}))};if(g.aborted)w();else{p=p||Rn().addAbortListener;let B=p(g,w);h(b,B[n])}return b}}),mH=qe((e,t)=>{Pe(),Le(),ke();var{StringPrototypeSlice:n,SymbolIterator:o,TypedArrayPrototypeSet:s,Uint8Array:u}=ur(),{Buffer:l}=(Kr(),Yt(Gr)),{inspect:c}=Rn();t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(h){let f={data:h,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length}unshift(h){let f={data:h,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length}shift(){if(this.length===0)return;let h=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,h}clear(){this.head=this.tail=null,this.length=0}join(h){if(this.length===0)return"";let f=this.head,p=""+f.data;for(;(f=f.next)!==null;)p+=h+f.data;return p}concat(h){if(this.length===0)return l.alloc(0);let f=l.allocUnsafe(h>>>0),p=this.head,y=0;for(;p;)s(f,p.data,y),y+=p.data.length,p=p.next;return f}consume(h,f){let p=this.head.data;if(h<p.length){let y=p.slice(0,h);return this.head.data=p.slice(h),y}return h===p.length?this.shift():f?this._getString(h):this._getBuffer(h)}first(){return this.head.data}*[o](){for(let h=this.head;h;h=h.next)yield h.data}_getString(h){let f="",p=this.head,y=0;do{let g=p.data;if(h>g.length)f+=g,h-=g.length;else{h===g.length?(f+=g,++y,p.next?this.head=p.next:this.head=this.tail=null):(f+=n(g,0,h),this.head=p,p.data=n(g,h));break}++y}while((p=p.next)!==null);return this.length-=y,f}_getBuffer(h){let f=l.allocUnsafe(h),p=h,y=this.head,g=0;do{let b=y.data;if(h>b.length)s(f,b,p-h),h-=b.length;else{h===b.length?(s(f,b,p-h),++g,y.next?this.head=y.next:this.head=this.tail=null):(s(f,new u(b.buffer,b.byteOffset,h),p-h),this.head=y,y.data=b.slice(h));break}++g}while((y=y.next)!==null);return this.length-=g,f}[Symbol.for("nodejs.util.inspect.custom")](h,f){return c(this,{...f,depth:0,customInspect:!1})}}}),kp=qe((e,t)=>{Pe(),Le(),ke();var{MathFloor:n,NumberIsInteger:o}=ur(),{validateInteger:s}=Ef(),{ERR_INVALID_ARG_VALUE:u}=vn().codes,l=16*1024,c=16;function h(g,b,w){return g.highWaterMark!=null?g.highWaterMark:b?g[w]:null}function f(g){return g?c:l}function p(g,b){s(b,"value",0),g?c=b:l=b}function y(g,b,w,B){let _=h(b,B,w);if(_!=null){if(!o(_)||_<0){let M=B?`options.${w}`:"options.highWaterMark";throw new u(M,_)}return n(_)}return f(g.objectMode)}t.exports={getHighWaterMark:y,getDefaultHighWaterMark:f,setDefaultHighWaterMark:p}}),bH=qe((e,t)=>{Pe(),Le(),ke();var n=(Kr(),Yt(Gr)),o=n.Buffer;function s(l,c){for(var h in l)c[h]=l[h]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=u);function u(l,c,h){return o(l,c,h)}u.prototype=Object.create(o.prototype),s(o,u),u.from=function(l,c,h){if(typeof l=="number")throw new TypeError("Argument must not be a number");return o(l,c,h)},u.alloc=function(l,c,h){if(typeof l!="number")throw new TypeError("Argument must be a number");var f=o(l);return c!==void 0?typeof h=="string"?f.fill(c,h):f.fill(c):f.fill(0),f},u.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return o(l)},u.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(l)}}),AH=qe(e=>{Pe(),Le(),ke();var t=bH().Buffer,n=t.isEncoding||function(A){switch(A=""+A,A&&A.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 o(A){if(!A)return"utf8";for(var I;;)switch(A){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 A;default:if(I)return;A=(""+A).toLowerCase(),I=!0}}function s(A){var I=o(A);if(typeof I!="string"&&(t.isEncoding===n||!n(A)))throw new Error("Unknown encoding: "+A);return I||A}e.StringDecoder=u;function u(A){this.encoding=s(A);var I;switch(this.encoding){case"utf16le":this.text=g,this.end=b,I=4;break;case"utf8":this.fillLast=f,I=4;break;case"base64":this.text=w,this.end=B,I=3;break;default:this.write=_,this.end=M;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(I)}u.prototype.write=function(A){if(A.length===0)return"";var I,R;if(this.lastNeed){if(I=this.fillLast(A),I===void 0)return"";R=this.lastNeed,this.lastNeed=0}else R=0;return R<A.length?I?I+this.text(A,R):this.text(A,R):I||""},u.prototype.end=y,u.prototype.text=p,u.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function l(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function c(A,I,R){var T=I.length-1;if(T<R)return 0;var $=l(I[T]);return $>=0?($>0&&(A.lastNeed=$-1),$):--T<R||$===-2?0:($=l(I[T]),$>=0?($>0&&(A.lastNeed=$-2),$):--T<R||$===-2?0:($=l(I[T]),$>=0?($>0&&($===2?$=0:A.lastNeed=$-3),$):0))}function h(A,I,R){if((I[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&I.length>1){if((I[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&I.length>2&&(I[2]&192)!==128)return A.lastNeed=2,"�"}}function f(A){var I=this.lastTotal-this.lastNeed,R=h(this,A);if(R!==void 0)return R;if(this.lastNeed<=A.length)return A.copy(this.lastChar,I,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,I,0,A.length),this.lastNeed-=A.length}function p(A,I){var R=c(this,A,I);if(!this.lastNeed)return A.toString("utf8",I);this.lastTotal=R;var T=A.length-(R-this.lastNeed);return A.copy(this.lastChar,0,T),A.toString("utf8",I,T)}function y(A){var I=A&&A.length?this.write(A):"";return this.lastNeed?I+"�":I}function g(A,I){if((A.length-I)%2===0){var R=A.toString("utf16le",I);if(R){var T=R.charCodeAt(R.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],R.slice(0,-1)}return R}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",I,A.length-1)}function b(A){var I=A&&A.length?this.write(A):"";if(this.lastNeed){var R=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,R)}return I}function w(A,I){var R=(A.length-I)%3;return R===0?A.toString("base64",I):(this.lastNeed=3-R,this.lastTotal=3,R===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",I,A.length-R))}function B(A){var I=A&&A.length?this.write(A):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function _(A){return A.toString(this.encoding)}function M(A){return A&&A.length?this.write(A):""}}),wT=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),{PromisePrototypeThen:o,SymbolAsyncIterator:s,SymbolIterator:u}=ur(),{Buffer:l}=(Kr(),Yt(Gr)),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:h}=vn().codes;function f(p,y,g){let b;if(typeof y=="string"||y instanceof l)return new p({objectMode:!0,...g,read(){this.push(y),this.push(null)}});let w;if(y&&y[s])w=!0,b=y[s]();else if(y&&y[u])w=!1,b=y[u]();else throw new c("iterable",["Iterable"],y);let B=new p({objectMode:!0,highWaterMark:1,...g}),_=!1;B._read=function(){_||(_=!0,A())},B._destroy=function(I,R){o(M(I),()=>n.nextTick(R,I),T=>n.nextTick(R,T||I))};async function M(I){let R=I!=null,T=typeof b.throw=="function";if(R&&T){let{value:$,done:k}=await b.throw(I);if(await $,k)return}if(typeof b.return=="function"){let{value:$}=await b.return();await $}}async function A(){for(;;){try{let{value:I,done:R}=w?await b.next():b.next();if(R)B.push(null);else{let T=I&&typeof I.then=="function"?await I:I;if(T===null)throw _=!1,new h;if(B.push(T))continue;_=!1}}catch(I){B.destroy(I)}break}}return B}t.exports=f}),Lp=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),{ArrayPrototypeIndexOf:o,NumberIsInteger:s,NumberIsNaN:u,NumberParseInt:l,ObjectDefineProperties:c,ObjectKeys:h,ObjectSetPrototypeOf:f,Promise:p,SafeSet:y,SymbolAsyncDispose:g,SymbolAsyncIterator:b,Symbol:w}=ur();t.exports=de,de.ReadableState=Te;var{EventEmitter:B}=(Na(),Yt(Ls)),{Stream:_,prependListener:M}=mw(),{Buffer:A}=(Kr(),Yt(Gr)),{addAbortSignal:I}=Pp(),R=zs(),T=Rn().debuglog("stream",be=>{T=be}),$=mH(),k=ul(),{getHighWaterMark:L,getDefaultHighWaterMark:U}=kp(),{aggregateTwoErrors:j,codes:{ERR_INVALID_ARG_TYPE:Q,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_OUT_OF_RANGE:re,ERR_STREAM_PUSH_AFTER_EOF:le,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:oe},AbortError:X}=vn(),{validateObject:te}=Ef(),pe=w("kPaused"),{StringDecoder:ue}=AH(),J=wT();f(de.prototype,_.prototype),f(de,_);var G=()=>{},{errorOrDestroy:H}=k,K=1,W=2,z=4,fe=8,ae=16,ne=32,Z=64,F=128,q=256,Y=512,se=1024,ye=2048,ee=4096,S=8192,v=16384,C=32768,N=65536,he=1<<17,ce=1<<18;function Ee(be){return{enumerable:!1,get(){return(this.state&be)!==0},set(Ie){Ie?this.state|=be:this.state&=~be}}}c(Te.prototype,{objectMode:Ee(K),ended:Ee(W),endEmitted:Ee(z),reading:Ee(fe),constructed:Ee(ae),sync:Ee(ne),needReadable:Ee(Z),emittedReadable:Ee(F),readableListening:Ee(q),resumeScheduled:Ee(Y),errorEmitted:Ee(se),emitClose:Ee(ye),autoDestroy:Ee(ee),destroyed:Ee(S),closed:Ee(v),closeEmitted:Ee(C),multiAwaitDrain:Ee(N),readingMore:Ee(he),dataEmitted:Ee(ce)});function Te(be,Ie,Ye){typeof Ye!="boolean"&&(Ye=Ie instanceof zo()),this.state=ye|ee|ae|ne,be&&be.objectMode&&(this.state|=K),Ye&&be&&be.readableObjectMode&&(this.state|=K),this.highWaterMark=be?L(this,be,"readableHighWaterMark",Ye):U(!1),this.buffer=new $,this.length=0,this.pipes=[],this.flowing=null,this[pe]=null,be&&be.emitClose===!1&&(this.state&=~ye),be&&be.autoDestroy===!1&&(this.state&=~ee),this.errored=null,this.defaultEncoding=be&&be.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,be&&be.encoding&&(this.decoder=new ue(be.encoding),this.encoding=be.encoding)}function de(be){if(!(this instanceof de))return new de(be);let Ie=this instanceof zo();this._readableState=new Te(be,this,Ie),be&&(typeof be.read=="function"&&(this._read=be.read),typeof be.destroy=="function"&&(this._destroy=be.destroy),typeof be.construct=="function"&&(this._construct=be.construct),be.signal&&!Ie&&I(be.signal,this)),_.call(this,be),k.construct(this,()=>{this._readableState.needReadable&&ve(this,this._readableState)})}de.prototype.destroy=k.destroy,de.prototype._undestroy=k.undestroy,de.prototype._destroy=function(be,Ie){Ie(be)},de.prototype[B.captureRejectionSymbol]=function(be){this.destroy(be)},de.prototype[g]=function(){let be;return this.destroyed||(be=this.readableEnded?null:new X,this.destroy(be)),new p((Ie,Ye)=>R(this,Je=>Je&&Je!==be?Ye(Je):Ie(null)))},de.prototype.push=function(be,Ie){return we(this,be,Ie,!1)},de.prototype.unshift=function(be,Ie){return we(this,be,Ie,!0)};function we(be,Ie,Ye,Je){T("readableAddChunk",Ie);let ot=be._readableState,qt;if((ot.state&K)===0&&(typeof Ie=="string"?(Ye=Ye||ot.defaultEncoding,ot.encoding!==Ye&&(Je&&ot.encoding?Ie=A.from(Ie,Ye).toString(ot.encoding):(Ie=A.from(Ie,Ye),Ye=""))):Ie instanceof A?Ye="":_._isUint8Array(Ie)?(Ie=_._uint8ArrayToBuffer(Ie),Ye=""):Ie!=null&&(qt=new Q("chunk",["string","Buffer","Uint8Array"],Ie))),qt)H(be,qt);else if(Ie===null)ot.state&=~fe,me(be,ot);else if((ot.state&K)!==0||Ie&&Ie.length>0)if(Je)if((ot.state&z)!==0)H(be,new oe);else{if(ot.destroyed||ot.errored)return!1;x(be,ot,Ie,!0)}else if(ot.ended)H(be,new le);else{if(ot.destroyed||ot.errored)return!1;ot.state&=~fe,ot.decoder&&!Ye?(Ie=ot.decoder.write(Ie),ot.objectMode||Ie.length!==0?x(be,ot,Ie,!1):ve(be,ot)):x(be,ot,Ie,!1)}else Je||(ot.state&=~fe,ve(be,ot));return!ot.ended&&(ot.length<ot.highWaterMark||ot.length===0)}function x(be,Ie,Ye,Je){Ie.flowing&&Ie.length===0&&!Ie.sync&&be.listenerCount("data")>0?((Ie.state&N)!==0?Ie.awaitDrainWriters.clear():Ie.awaitDrainWriters=null,Ie.dataEmitted=!0,be.emit("data",Ye)):(Ie.length+=Ie.objectMode?1:Ye.length,Je?Ie.buffer.unshift(Ye):Ie.buffer.push(Ye),(Ie.state&Z)!==0&&xe(be)),ve(be,Ie)}de.prototype.isPaused=function(){let be=this._readableState;return be[pe]===!0||be.flowing===!1},de.prototype.setEncoding=function(be){let Ie=new ue(be);this._readableState.decoder=Ie,this._readableState.encoding=this._readableState.decoder.encoding;let Ye=this._readableState.buffer,Je="";for(let ot of Ye)Je+=Ie.write(ot);return Ye.clear(),Je!==""&&Ye.push(Je),this._readableState.length=Je.length,this};var O=1073741824;function D(be){if(be>O)throw new re("size","<= 1GiB",be);return be--,be|=be>>>1,be|=be>>>2,be|=be>>>4,be|=be>>>8,be|=be>>>16,be++,be}function ie(be,Ie){return be<=0||Ie.length===0&&Ie.ended?0:(Ie.state&K)!==0?1:u(be)?Ie.flowing&&Ie.length?Ie.buffer.first().length:Ie.length:be<=Ie.length?be:Ie.ended?Ie.length:0}de.prototype.read=function(be){T("read",be),be===void 0?be=NaN:s(be)||(be=l(be,10));let Ie=this._readableState,Ye=be;if(be>Ie.highWaterMark&&(Ie.highWaterMark=D(be)),be!==0&&(Ie.state&=~F),be===0&&Ie.needReadable&&((Ie.highWaterMark!==0?Ie.length>=Ie.highWaterMark:Ie.length>0)||Ie.ended))return T("read: emitReadable",Ie.length,Ie.ended),Ie.length===0&&Ie.ended?ft(this):xe(this),null;if(be=ie(be,Ie),be===0&&Ie.ended)return Ie.length===0&&ft(this),null;let Je=(Ie.state&Z)!==0;if(T("need readable",Je),(Ie.length===0||Ie.length-be<Ie.highWaterMark)&&(Je=!0,T("length less than watermark",Je)),Ie.ended||Ie.reading||Ie.destroyed||Ie.errored||!Ie.constructed)Je=!1,T("reading, ended or constructing",Je);else if(Je){T("do read"),Ie.state|=fe|ne,Ie.length===0&&(Ie.state|=Z);try{this._read(Ie.highWaterMark)}catch(qt){H(this,qt)}Ie.state&=~ne,Ie.reading||(be=ie(Ye,Ie))}let ot;return be>0?ot=tt(be,Ie):ot=null,ot===null?(Ie.needReadable=Ie.length<=Ie.highWaterMark,be=0):(Ie.length-=be,Ie.multiAwaitDrain?Ie.awaitDrainWriters.clear():Ie.awaitDrainWriters=null),Ie.length===0&&(Ie.ended||(Ie.needReadable=!0),Ye!==be&&Ie.ended&&ft(this)),ot!==null&&!Ie.errorEmitted&&!Ie.closeEmitted&&(Ie.dataEmitted=!0,this.emit("data",ot)),ot};function me(be,Ie){if(T("onEofChunk"),!Ie.ended){if(Ie.decoder){let Ye=Ie.decoder.end();Ye&&Ye.length&&(Ie.buffer.push(Ye),Ie.length+=Ie.objectMode?1:Ye.length)}Ie.ended=!0,Ie.sync?xe(be):(Ie.needReadable=!1,Ie.emittedReadable=!0,Ce(be))}}function xe(be){let Ie=be._readableState;T("emitReadable",Ie.needReadable,Ie.emittedReadable),Ie.needReadable=!1,Ie.emittedReadable||(T("emitReadable",Ie.flowing),Ie.emittedReadable=!0,n.nextTick(Ce,be))}function Ce(be){let Ie=be._readableState;T("emitReadable_",Ie.destroyed,Ie.length,Ie.ended),!Ie.destroyed&&!Ie.errored&&(Ie.length||Ie.ended)&&(be.emit("readable"),Ie.emittedReadable=!1),Ie.needReadable=!Ie.flowing&&!Ie.ended&&Ie.length<=Ie.highWaterMark,bt(be)}function ve(be,Ie){!Ie.readingMore&&Ie.constructed&&(Ie.readingMore=!0,n.nextTick(Se,be,Ie))}function Se(be,Ie){for(;!Ie.reading&&!Ie.ended&&(Ie.length<Ie.highWaterMark||Ie.flowing&&Ie.length===0);){let Ye=Ie.length;if(T("maybeReadMore read 0"),be.read(0),Ye===Ie.length)break}Ie.readingMore=!1}de.prototype._read=function(be){throw new P("_read()")},de.prototype.pipe=function(be,Ie){let Ye=this,Je=this._readableState;Je.pipes.length===1&&(Je.multiAwaitDrain||(Je.multiAwaitDrain=!0,Je.awaitDrainWriters=new y(Je.awaitDrainWriters?[Je.awaitDrainWriters]:[]))),Je.pipes.push(be),T("pipe count=%d opts=%j",Je.pipes.length,Ie);let ot=(!Ie||Ie.end!==!1)&&be!==n.stdout&&be!==n.stderr?tr:wn;Je.endEmitted?n.nextTick(ot):Ye.once("end",ot),be.on("unpipe",qt);function qt(Pr,Ar){T("onunpipe"),Pr===Ye&&Ar&&Ar.hasUnpiped===!1&&(Ar.hasUnpiped=!0,Tr())}function tr(){T("onend"),be.end()}let Br,Ln=!1;function Tr(){T("cleanup"),be.removeListener("close",Mr),be.removeListener("finish",gn),Br&&be.removeListener("drain",Br),be.removeListener("error",Rr),be.removeListener("unpipe",qt),Ye.removeListener("end",tr),Ye.removeListener("end",wn),Ye.removeListener("data",rr),Ln=!0,Br&&Je.awaitDrainWriters&&(!be._writableState||be._writableState.needDrain)&&Br()}function Ht(){Ln||(Je.pipes.length===1&&Je.pipes[0]===be?(T("false write response, pause",0),Je.awaitDrainWriters=be,Je.multiAwaitDrain=!1):Je.pipes.length>1&&Je.pipes.includes(be)&&(T("false write response, pause",Je.awaitDrainWriters.size),Je.awaitDrainWriters.add(be)),Ye.pause()),Br||(Br=He(Ye,be),be.on("drain",Br))}Ye.on("data",rr);function rr(Pr){T("ondata");let Ar=be.write(Pr);T("dest.write",Ar),Ar===!1&&Ht()}function Rr(Pr){if(T("onerror",Pr),wn(),be.removeListener("error",Rr),be.listenerCount("error")===0){let Ar=be._writableState||be._readableState;Ar&&!Ar.errorEmitted?H(be,Pr):be.emit("error",Pr)}}M(be,"error",Rr);function Mr(){be.removeListener("finish",gn),wn()}be.once("close",Mr);function gn(){T("onfinish"),be.removeListener("close",Mr),wn()}be.once("finish",gn);function wn(){T("unpipe"),Ye.unpipe(be)}return be.emit("pipe",Ye),be.writableNeedDrain===!0?Ht():Je.flowing||(T("pipe resume"),Ye.resume()),be};function He(be,Ie){return function(){let Ye=be._readableState;Ye.awaitDrainWriters===Ie?(T("pipeOnDrain",1),Ye.awaitDrainWriters=null):Ye.multiAwaitDrain&&(T("pipeOnDrain",Ye.awaitDrainWriters.size),Ye.awaitDrainWriters.delete(Ie)),(!Ye.awaitDrainWriters||Ye.awaitDrainWriters.size===0)&&be.listenerCount("data")&&be.resume()}}de.prototype.unpipe=function(be){let Ie=this._readableState,Ye={hasUnpiped:!1};if(Ie.pipes.length===0)return this;if(!be){let ot=Ie.pipes;Ie.pipes=[],this.pause();for(let qt=0;qt<ot.length;qt++)ot[qt].emit("unpipe",this,{hasUnpiped:!1});return this}let Je=o(Ie.pipes,be);return Je===-1?this:(Ie.pipes.splice(Je,1),Ie.pipes.length===0&&this.pause(),be.emit("unpipe",this,Ye),this)},de.prototype.on=function(be,Ie){let Ye=_.prototype.on.call(this,be,Ie),Je=this._readableState;return be==="data"?(Je.readableListening=this.listenerCount("readable")>0,Je.flowing!==!1&&this.resume()):be==="readable"&&!Je.endEmitted&&!Je.readableListening&&(Je.readableListening=Je.needReadable=!0,Je.flowing=!1,Je.emittedReadable=!1,T("on readable",Je.length,Je.reading),Je.length?xe(this):Je.reading||n.nextTick(Ve,this)),Ye},de.prototype.addListener=de.prototype.on,de.prototype.removeListener=function(be,Ie){let Ye=_.prototype.removeListener.call(this,be,Ie);return be==="readable"&&n.nextTick(Ke,this),Ye},de.prototype.off=de.prototype.removeListener,de.prototype.removeAllListeners=function(be){let Ie=_.prototype.removeAllListeners.apply(this,arguments);return(be==="readable"||be===void 0)&&n.nextTick(Ke,this),Ie};function Ke(be){let Ie=be._readableState;Ie.readableListening=be.listenerCount("readable")>0,Ie.resumeScheduled&&Ie[pe]===!1?Ie.flowing=!0:be.listenerCount("data")>0?be.resume():Ie.readableListening||(Ie.flowing=null)}function Ve(be){T("readable nexttick read 0"),be.read(0)}de.prototype.resume=function(){let be=this._readableState;return be.flowing||(T("resume"),be.flowing=!be.readableListening,et(this,be)),be[pe]=!1,this};function et(be,Ie){Ie.resumeScheduled||(Ie.resumeScheduled=!0,n.nextTick(gt,be,Ie))}function gt(be,Ie){T("resume",Ie.reading),Ie.reading||be.read(0),Ie.resumeScheduled=!1,be.emit("resume"),bt(be),Ie.flowing&&!Ie.reading&&be.read(0)}de.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[pe]=!0,this};function bt(be){let Ie=be._readableState;for(T("flow",Ie.flowing);Ie.flowing&&be.read()!==null;);}de.prototype.wrap=function(be){let Ie=!1;be.on("data",Je=>{!this.push(Je)&&be.pause&&(Ie=!0,be.pause())}),be.on("end",()=>{this.push(null)}),be.on("error",Je=>{H(this,Je)}),be.on("close",()=>{this.destroy()}),be.on("destroy",()=>{this.destroy()}),this._read=()=>{Ie&&be.resume&&(Ie=!1,be.resume())};let Ye=h(be);for(let Je=1;Je<Ye.length;Je++){let ot=Ye[Je];this[ot]===void 0&&typeof be[ot]=="function"&&(this[ot]=be[ot].bind(be))}return this},de.prototype[b]=function(){return lt(this)},de.prototype.iterator=function(be){return be!==void 0&&te(be,"options"),lt(this,be)};function lt(be,Ie){typeof be.read!="function"&&(be=de.wrap(be,{objectMode:!0}));let Ye=yt(be,Ie);return Ye.stream=be,Ye}async function*yt(be,Ie){let Ye=G;function Je(tr){this===be?(Ye(),Ye=G):Ye=tr}be.on("readable",Je);let ot,qt=R(be,{writable:!1},tr=>{ot=tr?j(ot,tr):null,Ye(),Ye=G});try{for(;;){let tr=be.destroyed?null:be.read();if(tr!==null)yield tr;else{if(ot)throw ot;if(ot===null)return;await new p(Je)}}}catch(tr){throw ot=j(ot,tr),ot}finally{(ot||(Ie==null?void 0:Ie.destroyOnReturn)!==!1)&&(ot===void 0||be._readableState.autoDestroy)?k.destroyer(be,null):(be.off("readable",Je),qt())}}c(de.prototype,{readable:{__proto__:null,get(){let be=this._readableState;return!!be&&be.readable!==!1&&!be.destroyed&&!be.errorEmitted&&!be.endEmitted},set(be){this._readableState&&(this._readableState.readable=!!be)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(be){this._readableState&&(this._readableState.flowing=be)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(be){this._readableState&&(this._readableState.destroyed=be)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),c(Te.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[pe]!==!1},set(be){this[pe]=!!be}}}),de._fromList=tt;function tt(be,Ie){if(Ie.length===0)return null;let Ye;return Ie.objectMode?Ye=Ie.buffer.shift():!be||be>=Ie.length?(Ie.decoder?Ye=Ie.buffer.join(""):Ie.buffer.length===1?Ye=Ie.buffer.first():Ye=Ie.buffer.concat(Ie.length),Ie.buffer.clear()):Ye=Ie.buffer.consume(be,Ie.decoder),Ye}function ft(be){let Ie=be._readableState;T("endReadable",Ie.endEmitted),Ie.endEmitted||(Ie.ended=!0,n.nextTick(dt,Ie,be))}function dt(be,Ie){if(T("endReadableNT",be.endEmitted,be.length),!be.errored&&!be.closeEmitted&&!be.endEmitted&&be.length===0){if(be.endEmitted=!0,Ie.emit("end"),Ie.writable&&Ie.allowHalfOpen===!1)n.nextTick(At,Ie);else if(be.autoDestroy){let Ye=Ie._writableState;(!Ye||Ye.autoDestroy&&(Ye.finished||Ye.writable===!1))&&Ie.destroy()}}}function At(be){be.writable&&!be.writableEnded&&!be.destroyed&&be.end()}de.from=function(be,Ie){return J(de,be,Ie)};var Xt;function br(){return Xt===void 0&&(Xt={}),Xt}de.fromWeb=function(be,Ie){return br().newStreamReadableFromReadableStream(be,Ie)},de.toWeb=function(be,Ie){return br().newReadableStreamFromStreamReadable(be,Ie)},de.wrap=function(be,Ie){var Ye,Je;return new de({objectMode:(Ye=(Je=be.readableObjectMode)!==null&&Je!==void 0?Je:be.objectMode)!==null&&Ye!==void 0?Ye:!0,...Ie,destroy(ot,qt){k.destroyer(be,ot),qt(ot)}}).wrap(be)}}),bw=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),{ArrayPrototypeSlice:o,Error:s,FunctionPrototypeSymbolHasInstance:u,ObjectDefineProperty:l,ObjectDefineProperties:c,ObjectSetPrototypeOf:h,StringPrototypeToLowerCase:f,Symbol:p,SymbolHasInstance:y}=ur();t.exports=te,te.WritableState=oe;var{EventEmitter:g}=(Na(),Yt(Ls)),b=mw().Stream,{Buffer:w}=(Kr(),Yt(Gr)),B=ul(),{addAbortSignal:_}=Pp(),{getHighWaterMark:M,getDefaultHighWaterMark:A}=kp(),{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:R,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:$,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:L,ERR_STREAM_NULL_VALUES:U,ERR_STREAM_WRITE_AFTER_END:j,ERR_UNKNOWN_ENCODING:Q}=vn().codes,{errorOrDestroy:P}=B;h(te.prototype,b.prototype),h(te,b);function re(){}var le=p("kOnFinished");function oe(ee,S,v){typeof v!="boolean"&&(v=S instanceof zo()),this.objectMode=!!(ee&&ee.objectMode),v&&(this.objectMode=this.objectMode||!!(ee&&ee.writableObjectMode)),this.highWaterMark=ee?M(this,ee,"writableHighWaterMark",v):A(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let C=!!(ee&&ee.decodeStrings===!1);this.decodeStrings=!C,this.defaultEncoding=ee&&ee.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=H.bind(void 0,S),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,X(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!ee||ee.emitClose!==!1,this.autoDestroy=!ee||ee.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[le]=[]}function X(ee){ee.buffered=[],ee.bufferedIndex=0,ee.allBuffers=!0,ee.allNoop=!0}oe.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},l(oe.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function te(ee){let S=this instanceof zo();if(!S&&!u(te,this))return new te(ee);this._writableState=new oe(ee,this,S),ee&&(typeof ee.write=="function"&&(this._write=ee.write),typeof ee.writev=="function"&&(this._writev=ee.writev),typeof ee.destroy=="function"&&(this._destroy=ee.destroy),typeof ee.final=="function"&&(this._final=ee.final),typeof ee.construct=="function"&&(this._construct=ee.construct),ee.signal&&_(ee.signal,this)),b.call(this,ee),B.construct(this,()=>{let v=this._writableState;v.writing||fe(this,v),F(this,v)})}l(te,y,{__proto__:null,value:function(ee){return u(this,ee)?!0:this!==te?!1:ee&&ee._writableState instanceof oe}}),te.prototype.pipe=function(){P(this,new $)};function pe(ee,S,v,C){let N=ee._writableState;if(typeof v=="function")C=v,v=N.defaultEncoding;else{if(!v)v=N.defaultEncoding;else if(v!=="buffer"&&!w.isEncoding(v))throw new Q(v);typeof C!="function"&&(C=re)}if(S===null)throw new U;if(!N.objectMode)if(typeof S=="string")N.decodeStrings!==!1&&(S=w.from(S,v),v="buffer");else if(S instanceof w)v="buffer";else if(b._isUint8Array(S))S=b._uint8ArrayToBuffer(S),v="buffer";else throw new I("chunk",["string","Buffer","Uint8Array"],S);let he;return N.ending?he=new j:N.destroyed&&(he=new k("write")),he?(n.nextTick(C,he),P(ee,he,!0),he):(N.pendingcb++,ue(ee,N,S,v,C))}te.prototype.write=function(ee,S,v){return pe(this,ee,S,v)===!0},te.prototype.cork=function(){this._writableState.corked++},te.prototype.uncork=function(){let ee=this._writableState;ee.corked&&(ee.corked--,ee.writing||fe(this,ee))},te.prototype.setDefaultEncoding=function(ee){if(typeof ee=="string"&&(ee=f(ee)),!w.isEncoding(ee))throw new Q(ee);return this._writableState.defaultEncoding=ee,this};function ue(ee,S,v,C,N){let he=S.objectMode?1:v.length;S.length+=he;let ce=S.length<S.highWaterMark;return ce||(S.needDrain=!0),S.writing||S.corked||S.errored||!S.constructed?(S.buffered.push({chunk:v,encoding:C,callback:N}),S.allBuffers&&C!=="buffer"&&(S.allBuffers=!1),S.allNoop&&N!==re&&(S.allNoop=!1)):(S.writelen=he,S.writecb=N,S.writing=!0,S.sync=!0,ee._write(v,C,S.onwrite),S.sync=!1),ce&&!S.errored&&!S.destroyed}function J(ee,S,v,C,N,he,ce){S.writelen=C,S.writecb=ce,S.writing=!0,S.sync=!0,S.destroyed?S.onwrite(new k("write")):v?ee._writev(N,S.onwrite):ee._write(N,he,S.onwrite),S.sync=!1}function G(ee,S,v,C){--S.pendingcb,C(v),z(S),P(ee,v)}function H(ee,S){let v=ee._writableState,C=v.sync,N=v.writecb;if(typeof N!="function"){P(ee,new T);return}v.writing=!1,v.writecb=null,v.length-=v.writelen,v.writelen=0,S?(S.stack,v.errored||(v.errored=S),ee._readableState&&!ee._readableState.errored&&(ee._readableState.errored=S),C?n.nextTick(G,ee,v,S,N):G(ee,v,S,N)):(v.buffered.length>v.bufferedIndex&&fe(ee,v),C?v.afterWriteTickInfo!==null&&v.afterWriteTickInfo.cb===N?v.afterWriteTickInfo.count++:(v.afterWriteTickInfo={count:1,cb:N,stream:ee,state:v},n.nextTick(K,v.afterWriteTickInfo)):W(ee,v,1,N))}function K({stream:ee,state:S,count:v,cb:C}){return S.afterWriteTickInfo=null,W(ee,S,v,C)}function W(ee,S,v,C){for(!S.ending&&!ee.destroyed&&S.length===0&&S.needDrain&&(S.needDrain=!1,ee.emit("drain"));v-- >0;)S.pendingcb--,C();S.destroyed&&z(S),F(ee,S)}function z(ee){if(ee.writing)return;for(let N=ee.bufferedIndex;N<ee.buffered.length;++N){var S;let{chunk:he,callback:ce}=ee.buffered[N],Ee=ee.objectMode?1:he.length;ee.length-=Ee,ce((S=ee.errored)!==null&&S!==void 0?S:new k("write"))}let v=ee[le].splice(0);for(let N=0;N<v.length;N++){var C;v[N]((C=ee.errored)!==null&&C!==void 0?C:new k("end"))}X(ee)}function fe(ee,S){if(S.corked||S.bufferProcessing||S.destroyed||!S.constructed)return;let{buffered:v,bufferedIndex:C,objectMode:N}=S,he=v.length-C;if(!he)return;let ce=C;if(S.bufferProcessing=!0,he>1&&ee._writev){S.pendingcb-=he-1;let Ee=S.allNoop?re:de=>{for(let we=ce;we<v.length;++we)v[we].callback(de)},Te=S.allNoop&&ce===0?v:o(v,ce);Te.allBuffers=S.allBuffers,J(ee,S,!0,S.length,Te,"",Ee),X(S)}else{do{let{chunk:Ee,encoding:Te,callback:de}=v[ce];v[ce++]=null;let we=N?1:Ee.length;J(ee,S,!1,we,Ee,Te,de)}while(ce<v.length&&!S.writing);ce===v.length?X(S):ce>256?(v.splice(0,ce),S.bufferedIndex=0):S.bufferedIndex=ce}S.bufferProcessing=!1}te.prototype._write=function(ee,S,v){if(this._writev)this._writev([{chunk:ee,encoding:S}],v);else throw new R("_write()")},te.prototype._writev=null,te.prototype.end=function(ee,S,v){let C=this._writableState;typeof ee=="function"?(v=ee,ee=null,S=null):typeof S=="function"&&(v=S,S=null);let N;if(ee!=null){let he=pe(this,ee,S);he instanceof s&&(N=he)}return C.corked&&(C.corked=1,this.uncork()),N||(!C.errored&&!C.ending?(C.ending=!0,F(this,C,!0),C.ended=!0):C.finished?N=new L("end"):C.destroyed&&(N=new k("end"))),typeof v=="function"&&(N||C.finished?n.nextTick(v,N):C[le].push(v)),this};function ae(ee){return ee.ending&&!ee.destroyed&&ee.constructed&&ee.length===0&&!ee.errored&&ee.buffered.length===0&&!ee.finished&&!ee.writing&&!ee.errorEmitted&&!ee.closeEmitted}function ne(ee,S){let v=!1;function C(N){if(v){P(ee,N??T());return}if(v=!0,S.pendingcb--,N){let he=S[le].splice(0);for(let ce=0;ce<he.length;ce++)he[ce](N);P(ee,N,S.sync)}else ae(S)&&(S.prefinished=!0,ee.emit("prefinish"),S.pendingcb++,n.nextTick(q,ee,S))}S.sync=!0,S.pendingcb++;try{ee._final(C)}catch(N){C(N)}S.sync=!1}function Z(ee,S){!S.prefinished&&!S.finalCalled&&(typeof ee._final=="function"&&!S.destroyed?(S.finalCalled=!0,ne(ee,S)):(S.prefinished=!0,ee.emit("prefinish")))}function F(ee,S,v){ae(S)&&(Z(ee,S),S.pendingcb===0&&(v?(S.pendingcb++,n.nextTick((C,N)=>{ae(N)?q(C,N):N.pendingcb--},ee,S)):ae(S)&&(S.pendingcb++,q(ee,S))))}function q(ee,S){S.pendingcb--,S.finished=!0;let v=S[le].splice(0);for(let C=0;C<v.length;C++)v[C]();if(ee.emit("finish"),S.autoDestroy){let C=ee._readableState;(!C||C.autoDestroy&&(C.endEmitted||C.readable===!1))&&ee.destroy()}}c(te.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(ee){this._writableState&&(this._writableState.destroyed=ee)}},writable:{__proto__:null,get(){let ee=this._writableState;return!!ee&&ee.writable!==!1&&!ee.destroyed&&!ee.errored&&!ee.ending&&!ee.ended},set(ee){this._writableState&&(this._writableState.writable=!!ee)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let ee=this._writableState;return ee?!ee.destroyed&&!ee.ending&&ee.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Y=B.destroy;te.prototype.destroy=function(ee,S){let v=this._writableState;return!v.destroyed&&(v.bufferedIndex<v.buffered.length||v[le].length)&&n.nextTick(z,v),Y.call(this,ee,S),this},te.prototype._undestroy=B.undestroy,te.prototype._destroy=function(ee,S){S(ee)},te.prototype[g.captureRejectionSymbol]=function(ee){this.destroy(ee)};var se;function ye(){return se===void 0&&(se={}),se}te.fromWeb=function(ee,S){return ye().newStreamWritableFromWritableStream(ee,S)},te.toWeb=function(ee){return ye().newWritableStreamFromStreamWritable(ee)}}),vH=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),o=(Kr(),Yt(Gr)),{isReadable:s,isWritable:u,isIterable:l,isNodeStream:c,isReadableNodeStream:h,isWritableNodeStream:f,isDuplexNodeStream:p,isReadableStream:y,isWritableStream:g}=Go(),b=zs(),{AbortError:w,codes:{ERR_INVALID_ARG_TYPE:B,ERR_INVALID_RETURN_VALUE:_}}=vn(),{destroyer:M}=ul(),A=zo(),I=Lp(),R=bw(),{createDeferredPromise:T}=Rn(),$=wT(),k=globalThis.Blob||o.Blob,L=typeof k<"u"?function(le){return le instanceof k}:function(le){return!1},U=globalThis.AbortController||Zc().AbortController,{FunctionPrototypeCall:j}=ur(),Q=class extends A{constructor(le){super(le),(le==null?void 0:le.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(le==null?void 0:le.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function le(oe,X){if(p(oe))return oe;if(h(oe))return re({readable:oe});if(f(oe))return re({writable:oe});if(c(oe))return re({writable:!1,readable:!1});if(y(oe))return re({readable:I.fromWeb(oe)});if(g(oe))return re({writable:R.fromWeb(oe)});if(typeof oe=="function"){let{value:pe,write:ue,final:J,destroy:G}=P(oe);if(l(pe))return $(Q,pe,{objectMode:!0,write:ue,final:J,destroy:G});let H=pe==null?void 0:pe.then;if(typeof H=="function"){let K,W=j(H,pe,z=>{if(z!=null)throw new _("nully","body",z)},z=>{M(K,z)});return K=new Q({objectMode:!0,readable:!1,write:ue,final(z){J(async()=>{try{await W,n.nextTick(z,null)}catch(fe){n.nextTick(z,fe)}})},destroy:G})}throw new _("Iterable, AsyncIterable or AsyncFunction",X,pe)}if(L(oe))return le(oe.arrayBuffer());if(l(oe))return $(Q,oe,{objectMode:!0,writable:!1});if(y(oe==null?void 0:oe.readable)&&g(oe==null?void 0:oe.writable))return Q.fromWeb(oe);if(typeof(oe==null?void 0:oe.writable)=="object"||typeof(oe==null?void 0:oe.readable)=="object"){let pe=oe!=null&&oe.readable?h(oe==null?void 0:oe.readable)?oe==null?void 0:oe.readable:le(oe.readable):void 0,ue=oe!=null&&oe.writable?f(oe==null?void 0:oe.writable)?oe==null?void 0:oe.writable:le(oe.writable):void 0;return re({readable:pe,writable:ue})}let te=oe==null?void 0:oe.then;if(typeof te=="function"){let pe;return j(te,oe,ue=>{ue!=null&&pe.push(ue),pe.push(null)},ue=>{M(pe,ue)}),pe=new Q({objectMode:!0,writable:!1,read(){}})}throw new B(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],oe)};function P(le){let{promise:oe,resolve:X}=T(),te=new U,pe=te.signal;return{value:le((async function*(){for(;;){let ue=oe;oe=null;let{chunk:J,done:G,cb:H}=await ue;if(n.nextTick(H),G)return;if(pe.aborted)throw new w(void 0,{cause:pe.reason});({promise:oe,resolve:X}=T()),yield J}})(),{signal:pe}),write(ue,J,G){let H=X;X=null,H({chunk:ue,done:!1,cb:G})},final(ue){let J=X;X=null,J({done:!0,cb:ue})},destroy(ue,J){te.abort(),J(ue)}}}function re(le){let oe=le.readable&&typeof le.readable.read!="function"?I.wrap(le.readable):le.readable,X=le.writable,te=!!s(oe),pe=!!u(X),ue,J,G,H,K;function W(z){let fe=H;H=null,fe?fe(z):z&&K.destroy(z)}return K=new Q({readableObjectMode:!!(oe!=null&&oe.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:te,writable:pe}),pe&&(b(X,z=>{pe=!1,z&&M(oe,z),W(z)}),K._write=function(z,fe,ae){X.write(z,fe)?ae():ue=ae},K._final=function(z){X.end(),J=z},X.on("drain",function(){if(ue){let z=ue;ue=null,z()}}),X.on("finish",function(){if(J){let z=J;J=null,z()}})),te&&(b(oe,z=>{te=!1,z&&M(oe,z),W(z)}),oe.on("readable",function(){if(G){let z=G;G=null,z()}}),oe.on("end",function(){K.push(null)}),K._read=function(){for(;;){let z=oe.read();if(z===null){G=K._read;return}if(!K.push(z))return}}),K._destroy=function(z,fe){!z&&H!==null&&(z=new w),G=null,ue=null,J=null,H===null?fe(z):(H=fe,M(X,z),M(oe,z))},K}}),zo=qe((e,t)=>{Pe(),Le(),ke();var{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:s,ObjectSetPrototypeOf:u}=ur();t.exports=h;var l=Lp(),c=bw();u(h.prototype,l.prototype),u(h,l);{let g=s(c.prototype);for(let b=0;b<g.length;b++){let w=g[b];h.prototype[w]||(h.prototype[w]=c.prototype[w])}}function h(g){if(!(this instanceof h))return new h(g);l.call(this,g),c.call(this,g),g?(this.allowHalfOpen=g.allowHalfOpen!==!1,g.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),g.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}n(h.prototype,{writable:{__proto__:null,...o(c.prototype,"writable")},writableHighWaterMark:{__proto__:null,...o(c.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...o(c.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...o(c.prototype,"writableBuffer")},writableLength:{__proto__:null,...o(c.prototype,"writableLength")},writableFinished:{__proto__:null,...o(c.prototype,"writableFinished")},writableCorked:{__proto__:null,...o(c.prototype,"writableCorked")},writableEnded:{__proto__:null,...o(c.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...o(c.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(g){this._readableState&&this._writableState&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}}});var f;function p(){return f===void 0&&(f={}),f}h.fromWeb=function(g,b){return p().newStreamDuplexFromReadableWritablePair(g,b)},h.toWeb=function(g){return p().newReadableWritablePairFromDuplex(g)};var y;h.from=function(g){return y||(y=vH()),y(g,"body")}}),xT=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n,Symbol:o}=ur();t.exports=h;var{ERR_METHOD_NOT_IMPLEMENTED:s}=vn().codes,u=zo(),{getHighWaterMark:l}=kp();n(h.prototype,u.prototype),n(h,u);var c=o("kCallback");function h(y){if(!(this instanceof h))return new h(y);let g=y?l(this,y,"readableHighWaterMark",!0):null;g===0&&(y={...y,highWaterMark:null,readableHighWaterMark:g,writableHighWaterMark:y.writableHighWaterMark||0}),u.call(this,y),this._readableState.sync=!1,this[c]=null,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",p)}function f(y){typeof this._flush=="function"&&!this.destroyed?this._flush((g,b)=>{if(g){y?y(g):this.destroy(g);return}b!=null&&this.push(b),this.push(null),y&&y()}):(this.push(null),y&&y())}function p(){this._final!==f&&f.call(this)}h.prototype._final=f,h.prototype._transform=function(y,g,b){throw new s("_transform()")},h.prototype._write=function(y,g,b){let w=this._readableState,B=this._writableState,_=w.length;this._transform(y,g,(M,A)=>{if(M){b(M);return}A!=null&&this.push(A),B.ended||_===w.length||w.length<w.highWaterMark?b():this[c]=b})},h.prototype._read=function(){if(this[c]){let y=this[c];this[c]=null,y()}}}),ET=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n}=ur();t.exports=s;var o=xT();n(s.prototype,o.prototype),n(s,o);function s(u){if(!(this instanceof s))return new s(u);o.call(this,u)}s.prototype._transform=function(u,l,c){c(null,u)}}),Aw=qe((e,t)=>{Pe(),Le(),ke();var n=Pa(),{ArrayIsArray:o,Promise:s,SymbolAsyncIterator:u,SymbolDispose:l}=ur(),c=zs(),{once:h}=Rn(),f=ul(),p=zo(),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:b,ERR_MISSING_ARGS:w,ERR_STREAM_DESTROYED:B,ERR_STREAM_PREMATURE_CLOSE:_},AbortError:M}=vn(),{validateFunction:A,validateAbortSignal:I}=Ef(),{isIterable:R,isReadable:T,isReadableNodeStream:$,isNodeStream:k,isTransformStream:L,isWebStream:U,isReadableStream:j,isReadableFinished:Q}=Go(),P=globalThis.AbortController||Zc().AbortController,re,le,oe;function X(z,fe,ae){let ne=!1;z.on("close",()=>{ne=!0});let Z=c(z,{readable:fe,writable:ae},F=>{ne=!F});return{destroy:F=>{ne||(ne=!0,f.destroyer(z,F||new B("pipe")))},cleanup:Z}}function te(z){return A(z[z.length-1],"streams[stream.length - 1]"),z.pop()}function pe(z){if(R(z))return z;if($(z))return ue(z);throw new g("val",["Readable","Iterable","AsyncIterable"],z)}async function*ue(z){le||(le=Lp()),yield*le.prototype[u].call(z)}async function J(z,fe,ae,{end:ne}){let Z,F=null,q=ye=>{if(ye&&(Z=ye),F){let ee=F;F=null,ee()}},Y=()=>new s((ye,ee)=>{Z?ee(Z):F=()=>{Z?ee(Z):ye()}});fe.on("drain",q);let se=c(fe,{readable:!1},q);try{fe.writableNeedDrain&&await Y();for await(let ye of z)fe.write(ye)||await Y();ne&&(fe.end(),await Y()),ae()}catch(ye){ae(Z!==ye?y(Z,ye):ye)}finally{se(),fe.off("drain",q)}}async function G(z,fe,ae,{end:ne}){L(fe)&&(fe=fe.writable);let Z=fe.getWriter();try{for await(let F of z)await Z.ready,Z.write(F).catch(()=>{});await Z.ready,ne&&await Z.close(),ae()}catch(F){try{await Z.abort(F),ae(F)}catch(q){ae(q)}}}function H(...z){return K(z,h(te(z)))}function K(z,fe,ae){if(z.length===1&&o(z[0])&&(z=z[0]),z.length<2)throw new w("streams");let ne=new P,Z=ne.signal,F=ae==null?void 0:ae.signal,q=[];I(F,"options.signal");function Y(){N(new M)}oe=oe||Rn().addAbortListener;let se;F&&(se=oe(F,Y));let ye,ee,S=[],v=0;function C(Te){N(Te,--v===0)}function N(Te,de){var we;if(Te&&(!ye||ye.code==="ERR_STREAM_PREMATURE_CLOSE")&&(ye=Te),!(!ye&&!de)){for(;S.length;)S.shift()(ye);(we=se)===null||we===void 0||we[l](),ne.abort(),de&&(ye||q.forEach(x=>x()),n.nextTick(fe,ye,ee))}}let he;for(let Te=0;Te<z.length;Te++){let de=z[Te],we=Te<z.length-1,x=Te>0,O=we||(ae==null?void 0:ae.end)!==!1,D=Te===z.length-1;if(k(de)){let ie=function(me){me&&me.name!=="AbortError"&&me.code!=="ERR_STREAM_PREMATURE_CLOSE"&&C(me)};if(O){let{destroy:me,cleanup:xe}=X(de,we,x);S.push(me),T(de)&&D&&q.push(xe)}de.on("error",ie),T(de)&&D&&q.push(()=>{de.removeListener("error",ie)})}if(Te===0)if(typeof de=="function"){if(he=de({signal:Z}),!R(he))throw new b("Iterable, AsyncIterable or Stream","source",he)}else R(de)||$(de)||L(de)?he=de:he=p.from(de);else if(typeof de=="function"){if(L(he)){var ce;he=pe((ce=he)===null||ce===void 0?void 0:ce.readable)}else he=pe(he);if(he=de(he,{signal:Z}),we){if(!R(he,!0))throw new b("AsyncIterable",`transform[${Te-1}]`,he)}else{var Ee;re||(re=ET());let ie=new re({objectMode:!0}),me=(Ee=he)===null||Ee===void 0?void 0:Ee.then;if(typeof me=="function")v++,me.call(he,ve=>{ee=ve,ve!=null&&ie.write(ve),O&&ie.end(),n.nextTick(C)},ve=>{ie.destroy(ve),n.nextTick(C,ve)});else if(R(he,!0))v++,J(he,ie,C,{end:O});else if(j(he)||L(he)){let ve=he.readable||he;v++,J(ve,ie,C,{end:O})}else throw new b("AsyncIterable or Promise","destination",he);he=ie;let{destroy:xe,cleanup:Ce}=X(he,!1,!0);S.push(xe),D&&q.push(Ce)}}else if(k(de)){if($(he)){v+=2;let ie=W(he,de,C,{end:O});T(de)&&D&&q.push(ie)}else if(L(he)||j(he)){let ie=he.readable||he;v++,J(ie,de,C,{end:O})}else if(R(he))v++,J(he,de,C,{end:O});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],he);he=de}else if(U(de)){if($(he))v++,G(pe(he),de,C,{end:O});else if(j(he)||R(he))v++,G(he,de,C,{end:O});else if(L(he))v++,G(he.readable,de,C,{end:O});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],he);he=de}else he=p.from(de)}return(Z!=null&&Z.aborted||F!=null&&F.aborted)&&n.nextTick(Y),he}function W(z,fe,ae,{end:ne}){let Z=!1;if(fe.on("close",()=>{Z||ae(new _)}),z.pipe(fe,{end:!1}),ne){let F=function(){Z=!0,fe.end()};Q(z)?n.nextTick(F):z.once("end",F)}else ae();return c(z,{readable:!0,writable:!1},F=>{let q=z._readableState;F&&F.code==="ERR_STREAM_PREMATURE_CLOSE"&&q&&q.ended&&!q.errored&&!q.errorEmitted?z.once("end",ae).once("error",ae):ae(F)}),c(fe,{readable:!1,writable:!0},ae)}t.exports={pipelineImpl:K,pipeline:H}}),ST=qe((e,t)=>{Pe(),Le(),ke();var{pipeline:n}=Aw(),o=zo(),{destroyer:s}=ul(),{isNodeStream:u,isReadable:l,isWritable:c,isWebStream:h,isTransformStream:f,isWritableStream:p,isReadableStream:y}=Go(),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:b,ERR_MISSING_ARGS:w}}=vn(),B=zs();t.exports=function(..._){if(_.length===0)throw new w("streams");if(_.length===1)return o.from(_[0]);let M=[..._];if(typeof _[0]=="function"&&(_[0]=o.from(_[0])),typeof _[_.length-1]=="function"){let P=_.length-1;_[P]=o.from(_[P])}for(let P=0;P<_.length;++P)if(!(!u(_[P])&&!h(_[P]))){if(P<_.length-1&&!(l(_[P])||y(_[P])||f(_[P])))throw new b(`streams[${P}]`,M[P],"must be readable");if(P>0&&!(c(_[P])||p(_[P])||f(_[P])))throw new b(`streams[${P}]`,M[P],"must be writable")}let A,I,R,T,$;function k(P){let re=T;T=null,re?re(P):P?$.destroy(P):!Q&&!j&&$.destroy()}let L=_[0],U=n(_,k),j=!!(c(L)||p(L)||f(L)),Q=!!(l(U)||y(U)||f(U));if($=new o({writableObjectMode:!!(L!=null&&L.writableObjectMode),readableObjectMode:!!(U!=null&&U.readableObjectMode),writable:j,readable:Q}),j){if(u(L))$._write=function(re,le,oe){L.write(re,le)?oe():A=oe},$._final=function(re){L.end(),I=re},L.on("drain",function(){if(A){let re=A;A=null,re()}});else if(h(L)){let re=(f(L)?L.writable:L).getWriter();$._write=async function(le,oe,X){try{await re.ready,re.write(le).catch(()=>{}),X()}catch(te){X(te)}},$._final=async function(le){try{await re.ready,re.close().catch(()=>{}),I=le}catch(oe){le(oe)}}}let P=f(U)?U.readable:U;B(P,()=>{if(I){let re=I;I=null,re()}})}if(Q){if(u(U))U.on("readable",function(){if(R){let P=R;R=null,P()}}),U.on("end",function(){$.push(null)}),$._read=function(){for(;;){let P=U.read();if(P===null){R=$._read;return}if(!$.push(P))return}};else if(h(U)){let P=(f(U)?U.readable:U).getReader();$._read=async function(){for(;;)try{let{value:re,done:le}=await P.read();if(!$.push(re))return;if(le){$.push(null);return}}catch{return}}}}return $._destroy=function(P,re){!P&&T!==null&&(P=new g),R=null,A=null,I=null,T===null?re(P):(T=re,u(U)&&s(U,P))},$}}),wH=qe((e,t)=>{Pe(),Le(),ke();var n=globalThis.AbortController||Zc().AbortController,{codes:{ERR_INVALID_ARG_VALUE:o,ERR_INVALID_ARG_TYPE:s,ERR_MISSING_ARGS:u,ERR_OUT_OF_RANGE:l},AbortError:c}=vn(),{validateAbortSignal:h,validateInteger:f,validateObject:p}=Ef(),y=ur().Symbol("kWeak"),g=ur().Symbol("kResistStopPropagation"),{finished:b}=zs(),w=ST(),{addAbortSignalNoValidate:B}=Pp(),{isWritable:_,isNodeStream:M}=Go(),{deprecate:A}=Rn(),{ArrayPrototypePush:I,Boolean:R,MathFloor:T,Number:$,NumberIsNaN:k,Promise:L,PromiseReject:U,PromiseResolve:j,PromisePrototypeThen:Q,Symbol:P}=ur(),re=P("kEmpty"),le=P("kEof");function oe(F,q){if(q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal"),M(F)&&!_(F))throw new o("stream",F,"must be writable");let Y=w(this,F);return q!=null&&q.signal&&B(q.signal,Y),Y}function X(F,q){if(typeof F!="function")throw new s("fn",["Function","AsyncFunction"],F);q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal");let Y=1;(q==null?void 0:q.concurrency)!=null&&(Y=T(q.concurrency));let se=Y-1;return(q==null?void 0:q.highWaterMark)!=null&&(se=T(q.highWaterMark)),f(Y,"options.concurrency",1),f(se,"options.highWaterMark",0),se+=Y,(async function*(){let ye=Rn().AbortSignalAny([q==null?void 0:q.signal].filter(R)),ee=this,S=[],v={signal:ye},C,N,he=!1,ce=0;function Ee(){he=!0,Te()}function Te(){ce-=1,de()}function de(){N&&!he&&ce<Y&&S.length<se&&(N(),N=null)}async function we(){try{for await(let x of ee){if(he)return;if(ye.aborted)throw new c;try{if(x=F(x,v),x===re)continue;x=j(x)}catch(O){x=U(O)}ce+=1,Q(x,Te,Ee),S.push(x),C&&(C(),C=null),!he&&(S.length>=se||ce>=Y)&&await new L(O=>{N=O})}S.push(le)}catch(x){let O=U(x);Q(O,Te,Ee),S.push(O)}finally{he=!0,C&&(C(),C=null)}}we();try{for(;;){for(;S.length>0;){let x=await S[0];if(x===le)return;if(ye.aborted)throw new c;x!==re&&(yield x),S.shift(),de()}await new L(x=>{C=x})}}finally{he=!0,N&&(N(),N=null)}}).call(this)}function te(F=void 0){return F!=null&&p(F,"options"),(F==null?void 0:F.signal)!=null&&h(F.signal,"options.signal"),(async function*(){let q=0;for await(let se of this){var Y;if(F!=null&&(Y=F.signal)!==null&&Y!==void 0&&Y.aborted)throw new c({cause:F.signal.reason});yield[q++,se]}}).call(this)}async function pe(F,q=void 0){for await(let Y of H.call(this,F,q))return!0;return!1}async function ue(F,q=void 0){if(typeof F!="function")throw new s("fn",["Function","AsyncFunction"],F);return!await pe.call(this,async(...Y)=>!await F(...Y),q)}async function J(F,q){for await(let Y of H.call(this,F,q))return Y}async function G(F,q){if(typeof F!="function")throw new s("fn",["Function","AsyncFunction"],F);async function Y(se,ye){return await F(se,ye),re}for await(let se of X.call(this,Y,q));}function H(F,q){if(typeof F!="function")throw new s("fn",["Function","AsyncFunction"],F);async function Y(se,ye){return await F(se,ye)?se:re}return X.call(this,Y,q)}var K=class extends u{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function W(F,q,Y){var se;if(typeof F!="function")throw new s("reducer",["Function","AsyncFunction"],F);Y!=null&&p(Y,"options"),(Y==null?void 0:Y.signal)!=null&&h(Y.signal,"options.signal");let ye=arguments.length>1;if(Y!=null&&(se=Y.signal)!==null&&se!==void 0&&se.aborted){let N=new c(void 0,{cause:Y.signal.reason});throw this.once("error",()=>{}),await b(this.destroy(N)),N}let ee=new n,S=ee.signal;if(Y!=null&&Y.signal){let N={once:!0,[y]:this,[g]:!0};Y.signal.addEventListener("abort",()=>ee.abort(),N)}let v=!1;try{for await(let N of this){var C;if(v=!0,Y!=null&&(C=Y.signal)!==null&&C!==void 0&&C.aborted)throw new c;ye?q=await F(q,N,{signal:S}):(q=N,ye=!0)}if(!v&&!ye)throw new K}finally{ee.abort()}return q}async function z(F){F!=null&&p(F,"options"),(F==null?void 0:F.signal)!=null&&h(F.signal,"options.signal");let q=[];for await(let se of this){var Y;if(F!=null&&(Y=F.signal)!==null&&Y!==void 0&&Y.aborted)throw new c(void 0,{cause:F.signal.reason});I(q,se)}return q}function fe(F,q){let Y=X.call(this,F,q);return(async function*(){for await(let se of Y)yield*se}).call(this)}function ae(F){if(F=$(F),k(F))return 0;if(F<0)throw new l("number",">= 0",F);return F}function ne(F,q=void 0){return q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal"),F=ae(F),(async function*(){var Y;if(q!=null&&(Y=q.signal)!==null&&Y!==void 0&&Y.aborted)throw new c;for await(let ye of this){var se;if(q!=null&&(se=q.signal)!==null&&se!==void 0&&se.aborted)throw new c;F--<=0&&(yield ye)}}).call(this)}function Z(F,q=void 0){return q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal"),F=ae(F),(async function*(){var Y;if(q!=null&&(Y=q.signal)!==null&&Y!==void 0&&Y.aborted)throw new c;for await(let ye of this){var se;if(q!=null&&(se=q.signal)!==null&&se!==void 0&&se.aborted)throw new c;if(F-- >0&&(yield ye),F<=0)return}}).call(this)}t.exports.streamReturningOperators={asIndexedPairs:A(te,"readable.asIndexedPairs will be removed in a future version."),drop:ne,filter:H,flatMap:fe,map:X,take:Z,compose:oe},t.exports.promiseReturningOperators={every:ue,forEach:G,reduce:W,toArray:z,some:pe,find:J}}),IT=qe((e,t)=>{Pe(),Le(),ke();var{ArrayPrototypePop:n,Promise:o}=ur(),{isIterable:s,isNodeStream:u,isWebStream:l}=Go(),{pipelineImpl:c}=Aw(),{finished:h}=zs();_T();function f(...p){return new o((y,g)=>{let b,w,B=p[p.length-1];if(B&&typeof B=="object"&&!u(B)&&!s(B)&&!l(B)){let _=n(p);b=_.signal,w=_.end}c(p,(_,M)=>{_?g(_):y(M)},{signal:b,end:w})})}t.exports={finished:h,pipeline:f}}),_T=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Kr(),Yt(Gr)),{ObjectDefineProperty:o,ObjectKeys:s,ReflectApply:u}=ur(),{promisify:{custom:l}}=Rn(),{streamReturningOperators:c,promiseReturningOperators:h}=wH(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:f}}=vn(),p=ST(),{setDefaultHighWaterMark:y,getDefaultHighWaterMark:g}=kp(),{pipeline:b}=Aw(),{destroyer:w}=ul(),B=zs(),_=IT(),M=Go(),A=t.exports=mw().Stream;A.isDestroyed=M.isDestroyed,A.isDisturbed=M.isDisturbed,A.isErrored=M.isErrored,A.isReadable=M.isReadable,A.isWritable=M.isWritable,A.Readable=Lp();for(let R of s(c)){let T=function(...k){if(new.target)throw f();return A.Readable.from(u($,this,k))},$=c[R];o(T,"name",{__proto__:null,value:$.name}),o(T,"length",{__proto__:null,value:$.length}),o(A.Readable.prototype,R,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}for(let R of s(h)){let T=function(...k){if(new.target)throw f();return u($,this,k)},$=h[R];o(T,"name",{__proto__:null,value:$.name}),o(T,"length",{__proto__:null,value:$.length}),o(A.Readable.prototype,R,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}A.Writable=bw(),A.Duplex=zo(),A.Transform=xT(),A.PassThrough=ET(),A.pipeline=b;var{addAbortSignal:I}=Pp();A.addAbortSignal=I,A.finished=B,A.destroy=w,A.compose=p,A.setDefaultHighWaterMark=y,A.getDefaultHighWaterMark=g,o(A,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return _}}),o(b,l,{__proto__:null,enumerable:!0,get(){return _.pipeline}}),o(B,l,{__proto__:null,enumerable:!0,get(){return _.finished}}),A.Stream=A,A._isUint8Array=function(R){return R instanceof Uint8Array},A._uint8ArrayToBuffer=function(R){return n.from(R.buffer,R.byteOffset,R.byteLength)}}),ka=qe((e,t)=>{Pe(),Le(),ke();var n=_T(),o=IT(),s=n.Readable.destroy;t.exports=n.Readable,t.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,t.exports._isUint8Array=n._isUint8Array,t.exports.isDisturbed=n.isDisturbed,t.exports.isErrored=n.isErrored,t.exports.isReadable=n.isReadable,t.exports.Readable=n.Readable,t.exports.Writable=n.Writable,t.exports.Duplex=n.Duplex,t.exports.Transform=n.Transform,t.exports.PassThrough=n.PassThrough,t.exports.addAbortSignal=n.addAbortSignal,t.exports.finished=n.finished,t.exports.destroy=n.destroy,t.exports.destroy=s,t.exports.pipeline=n.pipeline,t.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get(){return o}}),t.exports.Stream=n.Stream,t.exports.default=t.exports}),xH=qe((e,t)=>{Pe(),Le(),ke(),typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var s=function(){};s.prototype=o.prototype,n.prototype=new s,n.prototype.constructor=n}}}),EH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Kr(),Yt(Gr)),o=Symbol.for("BufferList");function s(u){if(!(this instanceof s))return new s(u);s._init.call(this,u)}s._init=function(u){Object.defineProperty(this,o,{value:!0}),this._bufs=[],this.length=0,u&&this.append(u)},s.prototype._new=function(u){return new s(u)},s.prototype._offset=function(u){if(u===0)return[0,0];let l=0;for(let c=0;c<this._bufs.length;c++){let h=l+this._bufs[c].length;if(u<h||c===this._bufs.length-1)return[c,u-l];l=h}},s.prototype._reverseOffset=function(u){let l=u[0],c=u[1];for(let h=0;h<l;h++)c+=this._bufs[h].length;return c},s.prototype.getBuffers=function(){return this._bufs},s.prototype.get=function(u){if(u>this.length||u<0)return;let l=this._offset(u);return this._bufs[l[0]][l[1]]},s.prototype.slice=function(u,l){return typeof u=="number"&&u<0&&(u+=this.length),typeof l=="number"&&l<0&&(l+=this.length),this.copy(null,0,u,l)},s.prototype.copy=function(u,l,c,h){if((typeof c!="number"||c<0)&&(c=0),(typeof h!="number"||h>this.length)&&(h=this.length),c>=this.length||h<=0)return u||n.alloc(0);let f=!!u,p=this._offset(c),y=h-c,g=y,b=f&&l||0,w=p[1];if(c===0&&h===this.length){if(!f)return this._bufs.length===1?this._bufs[0]:n.concat(this._bufs,this.length);for(let B=0;B<this._bufs.length;B++)this._bufs[B].copy(u,b),b+=this._bufs[B].length;return u}if(g<=this._bufs[p[0]].length-w)return f?this._bufs[p[0]].copy(u,l,w,w+g):this._bufs[p[0]].slice(w,w+g);f||(u=n.allocUnsafe(y));for(let B=p[0];B<this._bufs.length;B++){let _=this._bufs[B].length-w;if(g>_)this._bufs[B].copy(u,b,w),b+=_;else{this._bufs[B].copy(u,b,w,w+g),b+=_;break}g-=_,w&&(w=0)}return u.length>b?u.slice(0,b):u},s.prototype.shallowSlice=function(u,l){if(u=u||0,l=typeof l!="number"?this.length:l,u<0&&(u+=this.length),l<0&&(l+=this.length),u===l)return this._new();let c=this._offset(u),h=this._offset(l),f=this._bufs.slice(c[0],h[0]+1);return h[1]===0?f.pop():f[f.length-1]=f[f.length-1].slice(0,h[1]),c[1]!==0&&(f[0]=f[0].slice(c[1])),this._new(f)},s.prototype.toString=function(u,l,c){return this.slice(l,c).toString(u)},s.prototype.consume=function(u){if(u=Math.trunc(u),Number.isNaN(u)||u<=0)return this;for(;this._bufs.length;)if(u>=this._bufs[0].length)u-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(u),this.length-=u;break}return this},s.prototype.duplicate=function(){let u=this._new();for(let l=0;l<this._bufs.length;l++)u.append(this._bufs[l]);return u},s.prototype.append=function(u){return this._attach(u,s.prototype._appendBuffer)},s.prototype.prepend=function(u){return this._attach(u,s.prototype._prependBuffer,!0)},s.prototype._attach=function(u,l,c){if(u==null)return this;if(u.buffer)l.call(this,n.from(u.buffer,u.byteOffset,u.byteLength));else if(Array.isArray(u)){let[h,f]=c?[u.length-1,-1]:[0,1];for(let p=h;p>=0&&p<u.length;p+=f)this._attach(u[p],l,c)}else if(this._isBufferList(u)){let[h,f]=c?[u._bufs.length-1,-1]:[0,1];for(let p=h;p>=0&&p<u._bufs.length;p+=f)this._attach(u._bufs[p],l,c)}else typeof u=="number"&&(u=u.toString()),l.call(this,n.from(u));return this},s.prototype._appendBuffer=function(u){this._bufs.push(u),this.length+=u.length},s.prototype._prependBuffer=function(u){this._bufs.unshift(u),this.length+=u.length},s.prototype.indexOf=function(u,l,c){if(c===void 0&&typeof l=="string"&&(c=l,l=void 0),typeof u=="function"||Array.isArray(u))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof u=="number"?u=n.from([u]):typeof u=="string"?u=n.from(u,c):this._isBufferList(u)?u=u.slice():Array.isArray(u.buffer)?u=n.from(u.buffer,u.byteOffset,u.byteLength):n.isBuffer(u)||(u=n.from(u)),l=Number(l||0),isNaN(l)&&(l=0),l<0&&(l=this.length+l),l<0&&(l=0),u.length===0)return l>this.length?this.length:l;let h=this._offset(l),f=h[0],p=h[1];for(;f<this._bufs.length;f++){let y=this._bufs[f];for(;p<y.length;)if(y.length-p>=u.length){let g=y.indexOf(u,p);if(g!==-1)return this._reverseOffset([f,g]);p=y.length-u.length+1}else{let g=this._reverseOffset([f,p]);if(this._match(g,u))return g;p++}p=0}return-1},s.prototype._match=function(u,l){if(this.length-u<l.length)return!1;for(let c=0;c<l.length;c++)if(this.get(u+c)!==l[c])return!1;return!0},(function(){let u={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,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(let l in u)(function(c){u[c]===null?s.prototype[c]=function(h,f){return this.slice(h,h+f)[c](0,f)}:s.prototype[c]=function(h=0){return this.slice(h,h+u[c])[c](0)}})(l)})(),s.prototype._isBufferList=function(u){return u instanceof s||s.isBufferList(u)},s.isBufferList=function(u){return u!=null&&u[o]},t.exports=s}),SH=qe((e,t)=>{Pe(),Le(),ke();var n=ka().Duplex,o=xH(),s=EH();function u(l){if(!(this instanceof u))return new u(l);if(typeof l=="function"){this._callback=l;let c=(function(h){this._callback&&(this._callback(h),this._callback=null)}).bind(this);this.on("pipe",function(h){h.on("error",c)}),this.on("unpipe",function(h){h.removeListener("error",c)}),l=null}s._init.call(this,l),n.call(this)}o(u,n),Object.assign(u.prototype,s.prototype),u.prototype._new=function(l){return new u(l)},u.prototype._write=function(l,c,h){this._appendBuffer(l),typeof h=="function"&&h()},u.prototype._read=function(l){if(!this.length)return this.push(null);l=Math.min(l,this.length),this.push(this.slice(0,l)),this.consume(l)},u.prototype.end=function(l){n.prototype.end.call(this,l),this._callback&&(this._callback(null,this.slice()),this._callback=null)},u.prototype._destroy=function(l,c){this._bufs.length=0,this.length=0,c(l)},u.prototype._isBufferList=function(l){return l instanceof u||l instanceof s||u.isBufferList(l)},u.isBufferList=s.isBufferList,t.exports=u,t.exports.BufferListStream=u,t.exports.BufferList=s}),IH=qe((e,t)=>{Pe(),Le(),ke();var n=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};t.exports=n}),CT=qe((e,t)=>{Pe(),Le(),ke();var n=t.exports,{Buffer:o}=(Kr(),Yt(Gr));n.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"},n.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},n.requiredHeaderFlagsErrors={};for(let u in n.requiredHeaderFlags){let l=n.requiredHeaderFlags[u];n.requiredHeaderFlagsErrors[u]="Invalid header flag bits, must be 0x"+l.toString(16)+" for "+n.types[u]+" packet"}n.codes={};for(let u in n.types){let l=n.types[u];n.codes[l]=u}n.CMD_SHIFT=4,n.CMD_MASK=240,n.DUP_MASK=8,n.QOS_MASK=3,n.QOS_SHIFT=1,n.RETAIN_MASK=1,n.VARBYTEINT_MASK=127,n.VARBYTEINT_FIN_MASK=128,n.VARBYTEINT_MAX=268435455,n.SESSIONPRESENT_MASK=1,n.SESSIONPRESENT_HEADER=o.from([n.SESSIONPRESENT_MASK]),n.CONNACK_HEADER=o.from([n.codes.connack<<n.CMD_SHIFT]),n.USERNAME_MASK=128,n.PASSWORD_MASK=64,n.WILL_RETAIN_MASK=32,n.WILL_QOS_MASK=24,n.WILL_QOS_SHIFT=3,n.WILL_FLAG_MASK=4,n.CLEAN_SESSION_MASK=2,n.CONNECT_HEADER=o.from([n.codes.connect<<n.CMD_SHIFT]),n.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},n.propertiesCodes={};for(let u in n.properties){let l=n.properties[u];n.propertiesCodes[l]=u}n.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"};function s(u){return[0,1,2].map(l=>[0,1].map(c=>[0,1].map(h=>{let f=o.alloc(1);return f.writeUInt8(n.codes[u]<<n.CMD_SHIFT|(c?n.DUP_MASK:0)|l<<n.QOS_SHIFT|h,0,!0),f})))}n.PUBLISH_HEADER=s("publish"),n.SUBSCRIBE_HEADER=s("subscribe"),n.SUBSCRIBE_OPTIONS_QOS_MASK=3,n.SUBSCRIBE_OPTIONS_NL_MASK=1,n.SUBSCRIBE_OPTIONS_NL_SHIFT=2,n.SUBSCRIBE_OPTIONS_RAP_MASK=1,n.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,n.SUBSCRIBE_OPTIONS_RH_MASK=3,n.SUBSCRIBE_OPTIONS_RH_SHIFT=4,n.SUBSCRIBE_OPTIONS_RH=[0,16,32],n.SUBSCRIBE_OPTIONS_NL=4,n.SUBSCRIBE_OPTIONS_RAP=8,n.SUBSCRIBE_OPTIONS_QOS=[0,1,2],n.UNSUBSCRIBE_HEADER=s("unsubscribe"),n.ACKS={unsuback:s("unsuback"),puback:s("puback"),pubcomp:s("pubcomp"),pubrel:s("pubrel"),pubrec:s("pubrec")},n.SUBACK_HEADER=o.from([n.codes.suback<<n.CMD_SHIFT]),n.VERSION3=o.from([3]),n.VERSION4=o.from([4]),n.VERSION5=o.from([5]),n.VERSION131=o.from([131]),n.VERSION132=o.from([132]),n.QOS=[0,1,2].map(u=>o.from([u])),n.EMPTY={pingreq:o.from([n.codes.pingreq<<4,0]),pingresp:o.from([n.codes.pingresp<<4,0]),disconnect:o.from([n.codes.disconnect<<4,0])},n.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},n.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},n.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},n.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},n.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",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"},n.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),_H=qe((e,t)=>{Pe(),Le(),ke();var n=1e3,o=n*60,s=o*60,u=s*24,l=u*7,c=u*365.25;t.exports=function(g,b){b=b||{};var w=typeof g;if(w==="string"&&g.length>0)return h(g);if(w==="number"&&isFinite(g))return b.long?p(g):f(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function h(g){if(g=String(g),!(g.length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(g);if(b){var w=parseFloat(b[1]),B=(b[2]||"ms").toLowerCase();switch(B){case"years":case"year":case"yrs":case"yr":case"y":return w*c;case"weeks":case"week":case"w":return w*l;case"days":case"day":case"d":return w*u;case"hours":case"hour":case"hrs":case"hr":case"h":return w*s;case"minutes":case"minute":case"mins":case"min":case"m":return w*o;case"seconds":case"second":case"secs":case"sec":case"s":return w*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return w;default:return}}}}function f(g){var b=Math.abs(g);return b>=u?Math.round(g/u)+"d":b>=s?Math.round(g/s)+"h":b>=o?Math.round(g/o)+"m":b>=n?Math.round(g/n)+"s":g+"ms"}function p(g){var b=Math.abs(g);return b>=u?y(g,b,u,"day"):b>=s?y(g,b,s,"hour"):b>=o?y(g,b,o,"minute"):b>=n?y(g,b,n,"second"):g+" ms"}function y(g,b,w,B){var _=b>=w*1.5;return Math.round(g/w)+" "+B+(_?"s":"")}}),CH=qe((e,t)=>{Pe(),Le(),ke();function n(o){u.debug=u,u.default=u,u.coerce=y,u.disable=f,u.enable=c,u.enabled=p,u.humanize=_H(),u.destroy=g,Object.keys(o).forEach(b=>{u[b]=o[b]}),u.names=[],u.skips=[],u.formatters={};function s(b){let w=0;for(let B=0;B<b.length;B++)w=(w<<5)-w+b.charCodeAt(B),w|=0;return u.colors[Math.abs(w)%u.colors.length]}u.selectColor=s;function u(b){let w,B=null,_,M;function A(...I){if(!A.enabled)return;let R=A,T=Number(new Date),$=T-(w||T);R.diff=$,R.prev=w,R.curr=T,w=T,I[0]=u.coerce(I[0]),typeof I[0]!="string"&&I.unshift("%O");let k=0;I[0]=I[0].replace(/%([a-zA-Z%])/g,(L,U)=>{if(L==="%%")return"%";k++;let j=u.formatters[U];if(typeof j=="function"){let Q=I[k];L=j.call(R,Q),I.splice(k,1),k--}return L}),u.formatArgs.call(R,I),(R.log||u.log).apply(R,I)}return A.namespace=b,A.useColors=u.useColors(),A.color=u.selectColor(b),A.extend=l,A.destroy=u.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>B!==null?B:(_!==u.namespaces&&(_=u.namespaces,M=u.enabled(b)),M),set:I=>{B=I}}),typeof u.init=="function"&&u.init(A),A}function l(b,w){let B=u(this.namespace+(typeof w>"u"?":":w)+b);return B.log=this.log,B}function c(b){u.save(b),u.namespaces=b,u.names=[],u.skips=[];let w=(typeof b=="string"?b:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let B of w)B[0]==="-"?u.skips.push(B.slice(1)):u.names.push(B)}function h(b,w){let B=0,_=0,M=-1,A=0;for(;B<b.length;)if(_<w.length&&(w[_]===b[B]||w[_]==="*"))w[_]==="*"?(M=_,A=B,_++):(B++,_++);else if(M!==-1)_=M+1,A++,B=A;else return!1;for(;_<w.length&&w[_]==="*";)_++;return _===w.length}function f(){let b=[...u.names,...u.skips.map(w=>"-"+w)].join(",");return u.enable(""),b}function p(b){for(let w of u.skips)if(h(b,w))return!1;for(let w of u.names)if(h(b,w))return!0;return!1}function y(b){return b instanceof Error?b.stack||b.message:b}function g(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return u.enable(u.load()),u}t.exports=n}),$o=qe((e,t)=>{Pe(),Le(),ke(),e.formatArgs=o,e.save=s,e.load=u,e.useColors=n,e.storage=l(),e.destroy=(()=>{let h=!1;return()=>{h||(h=!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`."))}})(),e.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"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let h;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(h=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(h[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(h){if(h[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+h[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let f="color: "+this.color;h.splice(1,0,f,"color: inherit");let p=0,y=0;h[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(p++,g==="%c"&&(y=p))}),h.splice(y,0,f)}e.log=console.debug||console.log||(()=>{});function s(h){try{h?e.storage.setItem("debug",h):e.storage.removeItem("debug")}catch{}}function u(){let h;try{h=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!h&&typeof Nt<"u"&&"env"in Nt&&(h=Nt.env.DEBUG),h}function l(){try{return localStorage}catch{}}t.exports=CH()(e);var{formatters:c}=t.exports;c.j=function(h){try{return JSON.stringify(h)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}),FH=qe((e,t)=>{Pe(),Le(),ke();var n=SH(),{EventEmitter:o}=(Na(),Yt(Ls)),s=IH(),u=CT(),l=$o()("mqtt-packet:parser"),c=class J1 extends o{constructor(){super(),this.parser=this.constructor.parser}static parser(f){return this instanceof J1?(this.settings=f||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new J1().parser(f)}_resetState(){l("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new s,this.error=null,this._list=n(),this._stateCounter=0}parse(f){for(this.error&&this._resetState(),this._list.append(f),l("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++,l("parse: state complete. _stateCounter is now: %d",this._stateCounter),l("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return l("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let f=this._list.readUInt8(0),p=f>>u.CMD_SHIFT;this.packet.cmd=u.types[p];let y=f&15,g=u.requiredHeaderFlags[p];return g!=null&&y!==g?this._emitError(new Error(u.requiredHeaderFlagsErrors[p])):(this.packet.retain=(f&u.RETAIN_MASK)!==0,this.packet.qos=f>>u.QOS_SHIFT&u.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(f&u.DUP_MASK)!==0,l("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let f=this._parseVarByteNum(!0);return f&&(this.packet.length=f.value,this._list.consume(f.bytes)),l("_parseLength %d",f.value),!!f}_parsePayload(){l("_parsePayload: payload %O",this._list);let f=!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"))}f=!0}return l("_parsePayload complete result: %s",f),f}_parseConnect(){l("_parseConnect");let f,p,y,g,b={},w=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(w.protocolId=B,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(w.protocolVersion=this._list.readUInt8(this._pos),w.protocolVersion>=128&&(w.bridgeMode=!0,w.protocolVersion=w.protocolVersion-128),w.protocolVersion!==3&&w.protocolVersion!==4&&w.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(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));b.username=this._list.readUInt8(this._pos)&u.USERNAME_MASK,b.password=this._list.readUInt8(this._pos)&u.PASSWORD_MASK,b.will=this._list.readUInt8(this._pos)&u.WILL_FLAG_MASK;let _=!!(this._list.readUInt8(this._pos)&u.WILL_RETAIN_MASK),M=(this._list.readUInt8(this._pos)&u.WILL_QOS_MASK)>>u.WILL_QOS_SHIFT;if(b.will)w.will={},w.will.retain=_,w.will.qos=M;else{if(_)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(M)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(w.clean=(this._list.readUInt8(this._pos)&u.CLEAN_SESSION_MASK)!==0,this._pos++,w.keepalive=this._parseNum(),w.keepalive===-1)return this._emitError(new Error("Packet too short"));if(w.protocolVersion===5){let I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(w.properties=I)}let A=this._parseString();if(A===null)return this._emitError(new Error("Packet too short"));if(w.clientId=A,l("_parseConnect: packet.clientId: %s",w.clientId),b.will){if(w.protocolVersion===5){let I=this._parseProperties();Object.getOwnPropertyNames(I).length&&(w.will.properties=I)}if(f=this._parseString(),f===null)return this._emitError(new Error("Cannot parse will topic"));if(w.will.topic=f,l("_parseConnect: packet.will.topic: %s",w.will.topic),p=this._parseBuffer(),p===null)return this._emitError(new Error("Cannot parse will payload"));w.will.payload=p,l("_parseConnect: packet.will.paylaod: %s",w.will.payload)}if(b.username){if(g=this._parseString(),g===null)return this._emitError(new Error("Cannot parse username"));w.username=g,l("_parseConnect: packet.username: %s",w.username)}if(b.password){if(y=this._parseBuffer(),y===null)return this._emitError(new Error("Cannot parse password"));w.password=y}return this.settings=w,l("_parseConnect: complete"),w}_parseConnack(){l("_parseConnack");let f=this.packet;if(this._list.length<1)return null;let p=this._list.readUInt8(this._pos++);if(p>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(f.sessionPresent=!!(p&u.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?f.reasonCode=this._list.readUInt8(this._pos++):f.reasonCode=0;else{if(this._list.length<2)return null;f.returnCode=this._list.readUInt8(this._pos++)}if(f.returnCode===-1||f.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let y=this._parseProperties();Object.getOwnPropertyNames(y).length&&(f.properties=y)}l("_parseConnack: complete")}_parsePublish(){l("_parsePublish");let f=this.packet;if(f.topic=this._parseString(),f.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(f.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}f.payload=this._list.slice(this._pos,f.length),l("_parsePublish: payload from buffer list: %o",f.payload)}}_parseSubscribe(){l("_parseSubscribe");let f=this.packet,p,y,g,b,w,B,_;if(f.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let M=this._parseProperties();Object.getOwnPropertyNames(M).length&&(f.properties=M)}if(f.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<f.length;){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=f.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(y=this._parseByte(),this.settings.protocolVersion===5){if(y&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(y&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(g=y&u.SUBSCRIBE_OPTIONS_QOS_MASK,g>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(B=(y>>u.SUBSCRIBE_OPTIONS_NL_SHIFT&u.SUBSCRIBE_OPTIONS_NL_MASK)!==0,w=(y>>u.SUBSCRIBE_OPTIONS_RAP_SHIFT&u.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,b=y>>u.SUBSCRIBE_OPTIONS_RH_SHIFT&u.SUBSCRIBE_OPTIONS_RH_MASK,b>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));_={topic:p,qos:g},this.settings.protocolVersion===5?(_.nl=B,_.rap=w,_.rh=b):this.settings.bridgeMode&&(_.rh=0,_.rap=!0,_.nl=!0),l("_parseSubscribe: push subscription `%s` to subscription",_),f.subscriptions.push(_)}}}_parseSuback(){l("_parseSuback");let f=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}if(f.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let p=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!u.MQTT5_SUBACK_CODES[p])return this._emitError(new Error("Invalid suback code"))}else if(p>2&&p!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(p)}}}_parseUnsubscribe(){l("_parseUnsubscribe");let f=this.packet;if(f.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}if(f.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<f.length;){let p=this._parseString();if(p===null)return this._emitError(new Error("Cannot parse topic"));l("_parseUnsubscribe: push topic `%s` to unsubscriptions",p),f.unsubscriptions.push(p)}}}_parseUnsuback(){l("_parseUnsuback");let f=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&f.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(f.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let p=this._parseProperties();for(Object.getOwnPropertyNames(p).length&&(f.properties=p),f.granted=[];this._pos<this.packet.length;){let y=this._list.readUInt8(this._pos++);if(!u.MQTT5_UNSUBACK_CODES[y])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(y)}}}_parseConfirmation(){l("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let f=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(f.length>2){switch(f.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!u.MQTT5_PUBACK_PUBREC_CODES[f.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!u.MQTT5_PUBREL_PUBCOMP_CODES[f.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}l("_parseConfirmation: packet.reasonCode `%d`",f.reasonCode)}else f.reasonCode=0;if(f.length>3){let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}}return!0}_parseDisconnect(){let f=this.packet;if(l("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(f.reasonCode=this._parseByte(),u.MQTT5_DISCONNECT_CODES[f.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):f.reasonCode=0;let p=this._parseProperties();Object.getOwnPropertyNames(p).length&&(f.properties=p)}return l("_parseDisconnect result: true"),!0}_parseAuth(){l("_parseAuth");let f=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(f.reasonCode=this._parseByte(),!u.MQTT5_AUTH_CODES[f.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let p=this._parseProperties();return Object.getOwnPropertyNames(p).length&&(f.properties=p),l("_parseAuth: result: true"),!0}_parseMessageId(){let f=this.packet;return f.messageId=this._parseNum(),f.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(l("_parseMessageId: packet.messageId %d",f.messageId),!0)}_parseString(f){let p=this._parseNum(),y=p+this._pos;if(p===-1||y>this._list.length||y>this.packet.length)return null;let g=this._list.toString("utf8",this._pos,y);return this._pos+=p,l("_parseString: result: %s",g),g}_parseStringPair(){return l("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let f=this._parseNum(),p=f+this._pos;if(f===-1||p>this._list.length||p>this.packet.length)return null;let y=this._list.slice(this._pos,p);return this._pos+=f,l("_parseBuffer: result: %o",y),y}_parseNum(){if(this._list.length-this._pos<2)return-1;let f=this._list.readUInt16BE(this._pos);return this._pos+=2,l("_parseNum: result: %s",f),f}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let f=this._list.readUInt32BE(this._pos);return this._pos+=4,l("_parse4ByteNum: result: %s",f),f}_parseVarByteNum(f){l("_parseVarByteNum");let p=4,y=0,g=1,b=0,w=!1,B,_=this._pos?this._pos:0;for(;y<p&&_+y<this._list.length;){if(B=this._list.readUInt8(_+y++),b+=g*(B&u.VARBYTEINT_MASK),g*=128,(B&u.VARBYTEINT_FIN_MASK)===0){w=!0;break}if(this._list.length<=y)break}return!w&&y===p&&this._list.length>=y&&this._emitError(new Error("Invalid variable byte integer")),_&&(this._pos+=y),w?f?w={bytes:y,value:b}:w=b:w=!1,l("_parseVarByteNum: result: %o",w),w}_parseByte(){let f;return this._pos<this._list.length&&(f=this._list.readUInt8(this._pos),this._pos++),l("_parseByte: result: %o",f),f}_parseByType(f){switch(l("_parseByType: type: %s",f),f){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(){l("_parseProperties");let f=this._parseVarByteNum(),p=this._pos+f,y={};for(;this._pos<p;){let g=this._parseByte();if(!g)return this._emitError(new Error("Cannot parse property code type")),!1;let b=u.propertiesCodes[g];if(!b)return this._emitError(new Error("Unknown property")),!1;if(b==="userProperties"){y[b]||(y[b]=Object.create(null));let w=this._parseByType(u.propertiesTypes[b]);if(y[b][w.name])if(Array.isArray(y[b][w.name]))y[b][w.name].push(w.value);else{let B=y[b][w.name];y[b][w.name]=[B],y[b][w.name].push(w.value)}else y[b][w.name]=w.value;continue}y[b]?Array.isArray(y[b])?y[b].push(this._parseByType(u.propertiesTypes[b])):(y[b]=[y[b]],y[b].push(this._parseByType(u.propertiesTypes[b]))):y[b]=this._parseByType(u.propertiesTypes[b])}return y}_newPacket(){return l("_newPacket"),this.packet&&(this._list.consume(this.packet.length),l("_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)),l("_newPacket: new packet"),this.packet=new s,this._pos=0,!0}_emitError(f){l("_emitError",f),this.error=f,this.emit("error",f)}};t.exports=c}),OH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Kr(),Yt(Gr)),o=65536,s={},u=n.isBuffer(n.from([1,2]).subarray(0,1));function l(p){let y=n.allocUnsafe(2);return y.writeUInt8(p>>8,0),y.writeUInt8(p&255,1),y}function c(){for(let p=0;p<o;p++)s[p]=l(p)}function h(p){let y=0,g=0,b=n.allocUnsafe(4);do y=p%128|0,p=p/128|0,p>0&&(y=y|128),b.writeUInt8(y,g++);while(p>0&&g<4);return p>0&&(g=0),u?b.subarray(0,g):b.slice(0,g)}function f(p){let y=n.allocUnsafe(4);return y.writeUInt32BE(p,0),y}t.exports={cache:s,generateCache:c,generateNumber:l,genBufVariableByteInt:h,generate4ByteBuffer:f}}),BH=qe((e,t)=>{Pe(),Le(),ke(),typeof Nt>"u"||!Nt.version||Nt.version.indexOf("v0.")===0||Nt.version.indexOf("v1.")===0&&Nt.version.indexOf("v1.8.")!==0?t.exports={nextTick:n}:t.exports=Nt;function n(o,s,u,l){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var c=arguments.length,h,f;switch(c){case 0:case 1:return Nt.nextTick(o);case 2:return Nt.nextTick(function(){o.call(null,s)});case 3:return Nt.nextTick(function(){o.call(null,s,u)});case 4:return Nt.nextTick(function(){o.call(null,s,u,l)});default:for(h=new Array(c-1),f=0;f<h.length;)h[f++]=arguments[f];return Nt.nextTick(function(){o.apply(null,h)})}}}),FT=qe((e,t)=>{Pe(),Le(),ke();var n=CT(),{Buffer:o}=(Kr(),Yt(Gr)),s=o.allocUnsafe(0),u=o.from([0]),l=OH(),c=BH().nextTick,h=$o()("mqtt-packet:writeToStream"),f=l.cache,p=l.generateNumber,y=l.generateCache,g=l.genBufVariableByteInt,b=l.generate4ByteBuffer,w=te,B=!0;function _(ae,ne,Z){switch(h("generate called"),ne.cork&&(ne.cork(),c(M,ne)),B&&(B=!1,y()),h("generate: packet.cmd: %s",ae.cmd),ae.cmd){case"connect":return A(ae,ne);case"connack":return I(ae,ne,Z);case"publish":return R(ae,ne,Z);case"puback":case"pubrec":case"pubrel":case"pubcomp":return T(ae,ne,Z);case"subscribe":return $(ae,ne,Z);case"suback":return k(ae,ne,Z);case"unsubscribe":return L(ae,ne,Z);case"unsuback":return U(ae,ne,Z);case"pingreq":case"pingresp":return j(ae,ne);case"disconnect":return Q(ae,ne,Z);case"auth":return P(ae,ne,Z);default:return ne.destroy(new Error("Unknown command")),!1}}Object.defineProperty(_,"cacheNumbers",{get(){return w===te},set(ae){ae?((!f||Object.keys(f).length===0)&&(B=!0),w=te):(B=!1,w=pe)}});function M(ae){ae.uncork()}function A(ae,ne,Z){let F=ae||{},q=F.protocolId||"MQTT",Y=F.protocolVersion||4,se=F.will,ye=F.clean,ee=F.keepalive||0,S=F.clientId||"",v=F.username,C=F.password,N=F.properties;ye===void 0&&(ye=!0);let he=0;if(typeof q!="string"&&!o.isBuffer(q))return ne.destroy(new Error("Invalid protocolId")),!1;if(he+=q.length+2,Y!==3&&Y!==4&&Y!==5)return ne.destroy(new Error("Invalid protocol version")),!1;if(he+=1,(typeof S=="string"||o.isBuffer(S))&&(S||Y>=4)&&(S||ye))he+=o.byteLength(S)+2;else{if(Y<4)return ne.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(ye*1===0)return ne.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof ee!="number"||ee<0||ee>65535||ee%1!==0)return ne.destroy(new Error("Invalid keepalive")),!1;he+=2,he+=1;let ce,Ee;if(Y===5){if(ce=G(ne,N),!ce)return!1;he+=ce.length}if(se){if(typeof se!="object")return ne.destroy(new Error("Invalid will")),!1;if(!se.topic||typeof se.topic!="string")return ne.destroy(new Error("Invalid will topic")),!1;if(he+=o.byteLength(se.topic)+2,he+=2,se.payload)if(se.payload.length>=0)typeof se.payload=="string"?he+=o.byteLength(se.payload):he+=se.payload.length;else return ne.destroy(new Error("Invalid will payload")),!1;if(Ee={},Y===5){if(Ee=G(ne,se.properties),!Ee)return!1;he+=Ee.length}}let Te=!1;if(v!=null)if(fe(v))Te=!0,he+=o.byteLength(v)+2;else return ne.destroy(new Error("Invalid username")),!1;if(C!=null){if(!Te)return ne.destroy(new Error("Username is required to use password")),!1;if(fe(C))he+=z(C)+2;else return ne.destroy(new Error("Invalid password")),!1}ne.write(n.CONNECT_HEADER),le(ne,he),J(ne,q),F.bridgeMode&&(Y+=128),ne.write(Y===131?n.VERSION131:Y===132?n.VERSION132:Y===4?n.VERSION4:Y===5?n.VERSION5:n.VERSION3);let de=0;return de|=v!=null?n.USERNAME_MASK:0,de|=C!=null?n.PASSWORD_MASK:0,de|=se&&se.retain?n.WILL_RETAIN_MASK:0,de|=se&&se.qos?se.qos<<n.WILL_QOS_SHIFT:0,de|=se?n.WILL_FLAG_MASK:0,de|=ye?n.CLEAN_SESSION_MASK:0,ne.write(o.from([de])),w(ne,ee),Y===5&&ce.write(),J(ne,S),se&&(Y===5&&Ee.write(),oe(ne,se.topic),J(ne,se.payload)),v!=null&&J(ne,v),C!=null&&J(ne,C),!0}function I(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=F===5?q.reasonCode:q.returnCode,se=q.properties,ye=2;if(typeof Y!="number")return ne.destroy(new Error("Invalid return code")),!1;let ee=null;if(F===5){if(ee=G(ne,se),!ee)return!1;ye+=ee.length}return ne.write(n.CONNACK_HEADER),le(ne,ye),ne.write(q.sessionPresent?n.SESSIONPRESENT_HEADER:u),ne.write(o.from([Y])),ee==null||ee.write(),!0}function R(ae,ne,Z){h("publish: packet: %o",ae);let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.qos||0,se=q.retain?n.RETAIN_MASK:0,ye=q.topic,ee=q.payload||s,S=q.messageId,v=q.properties,C=0;if(typeof ye=="string")C+=o.byteLength(ye)+2;else if(o.isBuffer(ye))C+=ye.length+2;else return ne.destroy(new Error("Invalid topic")),!1;if(o.isBuffer(ee)?C+=ee.length:C+=o.byteLength(ee),Y&&typeof S!="number")return ne.destroy(new Error("Invalid messageId")),!1;Y&&(C+=2);let N=null;if(F===5){if(N=G(ne,v),!N)return!1;C+=N.length}return ne.write(n.PUBLISH_HEADER[Y][q.dup?1:0][se?1:0]),le(ne,C),w(ne,z(ye)),ne.write(ye),Y>0&&w(ne,S),N==null||N.write(),h("publish: payload: %o",ee),ne.write(ee)}function T(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.cmd||"puback",se=q.messageId,ye=q.dup&&Y==="pubrel"?n.DUP_MASK:0,ee=0,S=q.reasonCode,v=q.properties,C=F===5?3:2;if(Y==="pubrel"&&(ee=1),typeof se!="number")return ne.destroy(new Error("Invalid messageId")),!1;let N=null;if(F===5&&typeof v=="object"){if(N=H(ne,v,Z,C),!N)return!1;C+=N.length}return ne.write(n.ACKS[Y][ee][ye][0]),C===3&&(C+=S!==0?1:-1),le(ne,C),w(ne,se),F===5&&C!==2&&ne.write(o.from([S])),N!==null?N.write():C===4&&ne.write(o.from([0])),!0}function $(ae,ne,Z){h("subscribe: packet: ");let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.dup?n.DUP_MASK:0,se=q.messageId,ye=q.subscriptions,ee=q.properties,S=0;if(typeof se!="number")return ne.destroy(new Error("Invalid messageId")),!1;S+=2;let v=null;if(F===5){if(v=G(ne,ee),!v)return!1;S+=v.length}if(typeof ye=="object"&&ye.length)for(let N=0;N<ye.length;N+=1){let he=ye[N].topic,ce=ye[N].qos;if(typeof he!="string")return ne.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof ce!="number")return ne.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if(F===5){if(typeof(ye[N].nl||!1)!="boolean")return ne.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ye[N].rap||!1)!="boolean")return ne.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let Ee=ye[N].rh||0;if(typeof Ee!="number"||Ee>2)return ne.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}S+=o.byteLength(he)+2+1}else return ne.destroy(new Error("Invalid subscriptions")),!1;h("subscribe: writing to stream: %o",n.SUBSCRIBE_HEADER),ne.write(n.SUBSCRIBE_HEADER[1][Y?1:0][0]),le(ne,S),w(ne,se),v!==null&&v.write();let C=!0;for(let N of ye){let he=N.topic,ce=N.qos,Ee=+N.nl,Te=+N.rap,de=N.rh,we;oe(ne,he),we=n.SUBSCRIBE_OPTIONS_QOS[ce],F===5&&(we|=Ee?n.SUBSCRIBE_OPTIONS_NL:0,we|=Te?n.SUBSCRIBE_OPTIONS_RAP:0,we|=de?n.SUBSCRIBE_OPTIONS_RH[de]:0),C=ne.write(o.from([we]))}return C}function k(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.messageId,se=q.granted,ye=q.properties,ee=0;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(ee+=2,typeof se=="object"&&se.length)for(let v=0;v<se.length;v+=1){if(typeof se[v]!="number")return ne.destroy(new Error("Invalid qos vector")),!1;ee+=1}else return ne.destroy(new Error("Invalid qos vector")),!1;let S=null;if(F===5){if(S=H(ne,ye,Z,ee),!S)return!1;ee+=S.length}return ne.write(n.SUBACK_HEADER),le(ne,ee),w(ne,Y),S!==null&&S.write(),ne.write(o.from(se))}function L(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.messageId,se=q.dup?n.DUP_MASK:0,ye=q.unsubscriptions,ee=q.properties,S=0;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(S+=2,typeof ye=="object"&&ye.length)for(let N=0;N<ye.length;N+=1){if(typeof ye[N]!="string")return ne.destroy(new Error("Invalid unsubscriptions")),!1;S+=o.byteLength(ye[N])+2}else return ne.destroy(new Error("Invalid unsubscriptions")),!1;let v=null;if(F===5){if(v=G(ne,ee),!v)return!1;S+=v.length}ne.write(n.UNSUBSCRIBE_HEADER[1][se?1:0][0]),le(ne,S),w(ne,Y),v!==null&&v.write();let C=!0;for(let N=0;N<ye.length;N++)C=oe(ne,ye[N]);return C}function U(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.messageId,se=q.dup?n.DUP_MASK:0,ye=q.granted,ee=q.properties,S=q.cmd,v=0,C=2;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(F===5)if(typeof ye=="object"&&ye.length)for(let he=0;he<ye.length;he+=1){if(typeof ye[he]!="number")return ne.destroy(new Error("Invalid qos vector")),!1;C+=1}else return ne.destroy(new Error("Invalid qos vector")),!1;let N=null;if(F===5){if(N=H(ne,ee,Z,C),!N)return!1;C+=N.length}return ne.write(n.ACKS[S][v][se][0]),le(ne,C),w(ne,Y),N!==null&&N.write(),F===5&&ne.write(o.from(ye)),!0}function j(ae,ne,Z){return ne.write(n.EMPTY[ae.cmd])}function Q(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.reasonCode,se=q.properties,ye=F===5?1:0,ee=null;if(F===5){if(ee=H(ne,se,Z,ye),!ee)return!1;ye+=ee.length}return ne.write(o.from([n.codes.disconnect<<4])),le(ne,ye),F===5&&ne.write(o.from([Y])),ee!==null&&ee.write(),!0}function P(ae,ne,Z){let F=Z?Z.protocolVersion:4,q=ae||{},Y=q.reasonCode,se=q.properties,ye=F===5?1:0;F!==5&&ne.destroy(new Error("Invalid mqtt version for auth packet"));let ee=H(ne,se,Z,ye);return ee?(ye+=ee.length,ne.write(o.from([n.codes.auth<<4])),le(ne,ye),ne.write(o.from([Y])),ee!==null&&ee.write(),!0):!1}var re={};function le(ae,ne){if(ne>n.VARBYTEINT_MAX)return ae.destroy(new Error(`Invalid variable byte integer: ${ne}`)),!1;let Z=re[ne];return Z||(Z=g(ne),ne<16384&&(re[ne]=Z)),h("writeVarByteInt: writing to stream: %o",Z),ae.write(Z)}function oe(ae,ne){let Z=o.byteLength(ne);return w(ae,Z),h("writeString: %s",ne),ae.write(ne,"utf8")}function X(ae,ne,Z){oe(ae,ne),oe(ae,Z)}function te(ae,ne){return h("writeNumberCached: number: %d",ne),h("writeNumberCached: %o",f[ne]),ae.write(f[ne])}function pe(ae,ne){let Z=p(ne);return h("writeNumberGenerated: %o",Z),ae.write(Z)}function ue(ae,ne){let Z=b(ne);return h("write4ByteNumber: %o",Z),ae.write(Z)}function J(ae,ne){typeof ne=="string"?oe(ae,ne):ne?(w(ae,ne.length),ae.write(ne)):w(ae,0)}function G(ae,ne){if(typeof ne!="object"||ne.length!=null)return{length:1,write(){W(ae,{},0)}};let Z=0;function F(q,Y){let se=n.propertiesTypes[q],ye=0;switch(se){case"byte":{if(typeof Y!="boolean")return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=2;break}case"int8":{if(typeof Y!="number"||Y<0||Y>255)return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=2;break}case"binary":{if(Y&&Y===null)return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=1+o.byteLength(Y)+2;break}case"int16":{if(typeof Y!="number"||Y<0||Y>65535)return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=3;break}case"int32":{if(typeof Y!="number"||Y<0||Y>4294967295)return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=5;break}case"var":{if(typeof Y!="number"||Y<0||Y>268435455)return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=1+o.byteLength(g(Y));break}case"string":{if(typeof Y!="string")return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=3+o.byteLength(Y.toString());break}case"pair":{if(typeof Y!="object")return ae.destroy(new Error(`Invalid ${q}: ${Y}`)),!1;ye+=Object.getOwnPropertyNames(Y).reduce((ee,S)=>{let v=Y[S];return Array.isArray(v)?ee+=v.reduce((C,N)=>(C+=3+o.byteLength(S.toString())+2+o.byteLength(N.toString()),C),0):ee+=3+o.byteLength(S.toString())+2+o.byteLength(Y[S].toString()),ee},0);break}default:return ae.destroy(new Error(`Invalid property ${q}: ${Y}`)),!1}return ye}if(ne)for(let q in ne){let Y=0,se=0,ye=ne[q];if(ye!==void 0){if(Array.isArray(ye))for(let ee=0;ee<ye.length;ee++){if(se=F(q,ye[ee]),!se)return!1;Y+=se}else{if(se=F(q,ye),!se)return!1;Y=se}if(!Y)return!1;Z+=Y}}return{length:o.byteLength(g(Z))+Z,write(){W(ae,ne,Z)}}}function H(ae,ne,Z,F){let q=["reasonString","userProperties"],Y=Z&&Z.properties&&Z.properties.maximumPacketSize?Z.properties.maximumPacketSize:0,se=G(ae,ne);if(Y)for(;F+se.length>Y;){let ye=q.shift();if(ye&&ne[ye])delete ne[ye],se=G(ae,ne);else return!1}return se}function K(ae,ne,Z){switch(n.propertiesTypes[ne]){case"byte":{ae.write(o.from([n.properties[ne]])),ae.write(o.from([+Z]));break}case"int8":{ae.write(o.from([n.properties[ne]])),ae.write(o.from([Z]));break}case"binary":{ae.write(o.from([n.properties[ne]])),J(ae,Z);break}case"int16":{ae.write(o.from([n.properties[ne]])),w(ae,Z);break}case"int32":{ae.write(o.from([n.properties[ne]])),ue(ae,Z);break}case"var":{ae.write(o.from([n.properties[ne]])),le(ae,Z);break}case"string":{ae.write(o.from([n.properties[ne]])),oe(ae,Z);break}case"pair":{Object.getOwnPropertyNames(Z).forEach(F=>{let q=Z[F];Array.isArray(q)?q.forEach(Y=>{ae.write(o.from([n.properties[ne]])),X(ae,F.toString(),Y.toString())}):(ae.write(o.from([n.properties[ne]])),X(ae,F.toString(),q.toString()))});break}default:return ae.destroy(new Error(`Invalid property ${ne} value: ${Z}`)),!1}}function W(ae,ne,Z){le(ae,Z);for(let F in ne)if(Object.prototype.hasOwnProperty.call(ne,F)&&ne[F]!=null){let q=ne[F];if(Array.isArray(q))for(let Y=0;Y<q.length;Y++)K(ae,F,q[Y]);else K(ae,F,q)}}function z(ae){return ae?ae instanceof o?ae.length:o.byteLength(ae):0}function fe(ae){return typeof ae=="string"||ae instanceof o}t.exports=_}),TH=qe((e,t)=>{Pe(),Le(),ke();var n=FT(),{EventEmitter:o}=(Na(),Yt(Ls)),{Buffer:s}=(Kr(),Yt(Gr));function u(c,h){let f=new l;return n(c,f,h),f.concat()}var l=class extends o{constructor(){super(),this._array=new Array(20),this._i=0}write(c){return this._array[this._i++]=c,!0}concat(){let c=0,h=new Array(this._array.length),f=this._array,p=0,y;for(y=0;y<f.length&&f[y]!==void 0;y++)typeof f[y]!="string"?h[y]=f[y].length:h[y]=s.byteLength(f[y]),c+=h[y];let g=s.allocUnsafe(c);for(y=0;y<f.length&&f[y]!==void 0;y++)typeof f[y]!="string"?(f[y].copy(g,p),p+=h[y]):(g.write(f[y],p),p+=h[y]);return g}destroy(c){c&&this.emit("error",c)}};t.exports=u}),RH=qe(e=>{Pe(),Le(),ke(),e.parser=FH().parser,e.generate=TH(),e.writeToStream=FT()}),MH=qe((e,t)=>{Pe(),Le(),ke(),t.exports=o;function n(u){return u instanceof Qd?Qd.from(u):new u.constructor(u.buffer.slice(),u.byteOffset,u.length)}function o(u){if(u=u||{},u.circles)return s(u);let l=new Map;if(l.set(Date,y=>new Date(y)),l.set(Map,(y,g)=>new Map(h(Array.from(y),g))),l.set(Set,(y,g)=>new Set(h(Array.from(y),g))),u.constructorHandlers)for(let y of u.constructorHandlers)l.set(y[0],y[1]);let c=null;return u.proto?p:f;function h(y,g){let b=Object.keys(y),w=new Array(b.length);for(let B=0;B<b.length;B++){let _=b[B],M=y[_];typeof M!="object"||M===null?w[_]=M:M.constructor!==Object&&(c=l.get(M.constructor))?w[_]=c(M,g):ArrayBuffer.isView(M)?w[_]=n(M):w[_]=g(M)}return w}function f(y){if(typeof y!="object"||y===null)return y;if(Array.isArray(y))return h(y,f);if(y.constructor!==Object&&(c=l.get(y.constructor)))return c(y,f);let g={};for(let b in y){if(Object.hasOwnProperty.call(y,b)===!1)continue;let w=y[b];typeof w!="object"||w===null?g[b]=w:w.constructor!==Object&&(c=l.get(w.constructor))?g[b]=c(w,f):ArrayBuffer.isView(w)?g[b]=n(w):g[b]=f(w)}return g}function p(y){if(typeof y!="object"||y===null)return y;if(Array.isArray(y))return h(y,p);if(y.constructor!==Object&&(c=l.get(y.constructor)))return c(y,p);let g={};for(let b in y){let w=y[b];typeof w!="object"||w===null?g[b]=w:w.constructor!==Object&&(c=l.get(w.constructor))?g[b]=c(w,p):ArrayBuffer.isView(w)?g[b]=n(w):g[b]=p(w)}return g}}function s(u){let l=[],c=[],h=new Map;if(h.set(Date,b=>new Date(b)),h.set(Map,(b,w)=>new Map(p(Array.from(b),w))),h.set(Set,(b,w)=>new Set(p(Array.from(b),w))),u.constructorHandlers)for(let b of u.constructorHandlers)h.set(b[0],b[1]);let f=null;return u.proto?g:y;function p(b,w){let B=Object.keys(b),_=new Array(B.length);for(let M=0;M<B.length;M++){let A=B[M],I=b[A];if(typeof I!="object"||I===null)_[A]=I;else if(I.constructor!==Object&&(f=h.get(I.constructor)))_[A]=f(I,w);else if(ArrayBuffer.isView(I))_[A]=n(I);else{let R=l.indexOf(I);R!==-1?_[A]=c[R]:_[A]=w(I)}}return _}function y(b){if(typeof b!="object"||b===null)return b;if(Array.isArray(b))return p(b,y);if(b.constructor!==Object&&(f=h.get(b.constructor)))return f(b,y);let w={};l.push(b),c.push(w);for(let B in b){if(Object.hasOwnProperty.call(b,B)===!1)continue;let _=b[B];if(typeof _!="object"||_===null)w[B]=_;else if(_.constructor!==Object&&(f=h.get(_.constructor)))w[B]=f(_,y);else if(ArrayBuffer.isView(_))w[B]=n(_);else{let M=l.indexOf(_);M!==-1?w[B]=c[M]:w[B]=y(_)}}return l.pop(),c.pop(),w}function g(b){if(typeof b!="object"||b===null)return b;if(Array.isArray(b))return p(b,g);if(b.constructor!==Object&&(f=h.get(b.constructor)))return f(b,g);let w={};l.push(b),c.push(w);for(let B in b){let _=b[B];if(typeof _!="object"||_===null)w[B]=_;else if(_.constructor!==Object&&(f=h.get(_.constructor)))w[B]=f(_,g);else if(ArrayBuffer.isView(_))w[B]=n(_);else{let M=l.indexOf(_);M!==-1?w[B]=c[M]:w[B]=g(_)}}return l.pop(),c.pop(),w}}}),UH=qe((e,t)=>{Pe(),Le(),ke(),t.exports=MH()()}),jH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.validateTopic=t,e.validateTopics=n;function t(o){let s=o.split("/");for(let u=0;u<s.length;u++)if(s[u]!=="+"){if(s[u]==="#")return u===s.length-1;if(s[u].indexOf("+")!==-1||s[u].indexOf("#")!==-1)return!1}return!0}function n(o){if(o.length===0)return"empty_topic_list";for(let s=0;s<o.length;s++)if(!t(o[s]))return o[s];return null}}),OT=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=ka(),n={objectMode:!0},o={clean:!0},s=class{constructor(u){rt(this,"options");rt(this,"_inflights");this.options=u||{},this.options={...o,...u},this._inflights=new Map}put(u,l){return this._inflights.set(u.messageId,u),l&&l(),this}createStream(){let u=new t.Readable(n),l=[],c=!1,h=0;return this._inflights.forEach((f,p)=>{l.push(f)}),u._read=()=>{!c&&h<l.length?u.push(l[h++]):u.push(null)},u.destroy=f=>{if(!c)return c=!0,setTimeout(()=>{u.emit("close")},0),u},u}del(u,l){let c=this._inflights.get(u.messageId);return c?(this._inflights.delete(u.messageId),l(null,c)):l&&l(new Error("missing packet")),this}get(u,l){let c=this._inflights.get(u.messageId);return c?l(null,c):l&&l(new Error("missing packet")),this}close(u){this.options.clean&&(this._inflights=null),u&&u()}};e.default=s}),DH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=[0,16,128,131,135,144,145,151,153],n=(o,s,u)=>{o.log("handlePublish: packet %o",s),u=typeof u<"u"?u:o.noop;let l=s.topic.toString(),c=s.payload,{qos:h}=s,{messageId:f}=s,{options:p}=o;if(o.options.protocolVersion===5){let y;if(s.properties&&(y=s.properties.topicAlias),typeof y<"u")if(l.length===0)if(y>0&&y<=65535){let g=o.topicAliasRecv.getTopicByAlias(y);if(g)l=g,o.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",l,y);else{o.log("handlePublish :: unregistered topic alias. alias: %d",y),o.emit("error",new Error("Received unregistered Topic Alias"));return}}else{o.log("handlePublish :: topic alias out of range. alias: %d",y),o.emit("error",new Error("Received Topic Alias is out of range"));return}else if(o.topicAliasRecv.put(l,y))o.log("handlePublish :: registered topic: %s - alias: %d",l,y);else{o.log("handlePublish :: topic alias out of range. alias: %d",y),o.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(o.log("handlePublish: qos %d",h),h){case 2:{p.customHandleAcks(l,c,s,(y,g)=>{if(typeof y=="number"&&(g=y,y=null),y)return o.emit("error",y);if(t.indexOf(g)===-1)return o.emit("error",new Error("Wrong reason code for pubrec"));g?o._sendPacket({cmd:"pubrec",messageId:f,reasonCode:g},u):o.incomingStore.put(s,()=>{o._sendPacket({cmd:"pubrec",messageId:f},u)})});break}case 1:{p.customHandleAcks(l,c,s,(y,g)=>{if(typeof y=="number"&&(g=y,y=null),y)return o.emit("error",y);if(t.indexOf(g)===-1)return o.emit("error",new Error("Wrong reason code for puback"));g||o.emit("message",l,c,s),o.handleMessage(s,b=>{if(b)return u&&u(b);o._sendPacket({cmd:"puback",messageId:f,reasonCode:g},u)})});break}case 0:o.emit("message",l,c,s),o.handleMessage(s,u);break;default:o.log("handlePublish: unknown QoS. Doing nothing.");break}};e.default=n}),NH=qe((e,t)=>{t.exports={version:"5.14.1"}}),ll=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.MQTTJS_VERSION=e.nextTick=e.ErrorWithSubackPacket=e.ErrorWithReasonCode=void 0,e.applyMixin=o;var t=class BT extends Error{constructor(l,c){super(l);rt(this,"code");this.code=c,Object.setPrototypeOf(this,BT.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=t;var n=class TT extends Error{constructor(l,c){super(l);rt(this,"packet");this.packet=c,Object.setPrototypeOf(this,TT.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};e.ErrorWithSubackPacket=n;function o(s,u,l=!1){let c=[u];for(;;){let h=c[0],f=Object.getPrototypeOf(h);if(f!=null&&f.prototype)c.unshift(f);else break}for(let h of c)for(let f of Object.getOwnPropertyNames(h.prototype))(l||f!=="constructor")&&Object.defineProperty(s.prototype,f,Object.getOwnPropertyDescriptor(h.prototype,f)??Object.create(null))}e.nextTick=typeof(Nt==null?void 0:Nt.nextTick)=="function"?Nt.nextTick:s=>{setTimeout(s,0)},e.MQTTJS_VERSION=NH().version}),zp=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var t=ll();e.ReasonCodes={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"};var n=(o,s)=>{let{messageId:u}=s,l=s.cmd,c=null,h=o.outgoing[u]?o.outgoing[u].cb:null,f=null;if(!h){o.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(o.log("_handleAck :: packet type",l),l){case"pubcomp":case"puback":{let p=s.reasonCode;p&&p>0&&p!==16?(f=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[p]}`,p),o._removeOutgoingAndStoreMessage(u,()=>{h(f,s)})):o._removeOutgoingAndStoreMessage(u,h);break}case"pubrec":{c={cmd:"pubrel",qos:2,messageId:u};let p=s.reasonCode;p&&p>0&&p!==16?(f=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[p]}`,p),o._removeOutgoingAndStoreMessage(u,()=>{h(f,s)})):o._sendPacket(c);break}case"suback":{delete o.outgoing[u],o.messageIdProvider.deallocate(u);let p=s.granted;for(let y=0;y<p.length;y++){let g=p[y];if((g&128)!==0){f=new Error(`Subscribe error: ${e.ReasonCodes[g]}`),f.code=g;let b=o.messageIdToTopic[u];b&&b.forEach(w=>{delete o._resubscribeTopics[w]})}}delete o.messageIdToTopic[u],o._invokeStoreProcessingQueue(),h(f,s);break}case"unsuback":{delete o.outgoing[u],o.messageIdProvider.deallocate(u),o._invokeStoreProcessingQueue(),h(null,s);break}default:o.emit("error",new Error("unrecognized packet type"))}o.disconnecting&&Object.keys(o.outgoing).length===0&&o.emit("outgoingEmpty")};e.default=n}),PH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=ll(),n=zp(),o=(s,u)=>{let{options:l}=s,c=l.protocolVersion,h=c===5?u.reasonCode:u.returnCode;if(c!==5){let f=new t.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${c}`,h);s.emit("error",f);return}s.handleAuth(u,(f,p)=>{if(f){s.emit("error",f);return}if(h===24)s.reconnecting=!1,s._sendPacket(p);else{let y=new t.ErrorWithReasonCode(`Connection refused: ${n.ReasonCodes[h]}`,h);s.emit("error",y)}})};e.default=o}),kH=qe(e=>{var b,w,B,_,M,A,I,R,T,$,k,L,U,j,Q,P,re,le,oe,X,te,pe,ue,J,G,H,K,W,z,eA,ae,ne,Z,F,RT,Y,se,ye,Ss,Is,tA,hd,dd,er,rA,yc,_s,nA,we;Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,n=new Set,o=typeof Nt=="object"&&Nt?Nt:{},s=(x,O,D,ie)=>{typeof o.emitWarning=="function"?o.emitWarning(x,O,D,ie):console.error(`[${D}] ${O}: ${x}`)},u=globalThis.AbortController,l=globalThis.AbortSignal;if(typeof u>"u"){l=class{constructor(){rt(this,"onabort");rt(this,"_onabort",[]);rt(this,"reason");rt(this,"aborted",!1)}addEventListener(D,ie){this._onabort.push(ie)}},u=class{constructor(){rt(this,"signal",new l);O()}abort(D){var ie,me;if(!this.signal.aborted){this.signal.reason=D,this.signal.aborted=!0;for(let xe of this.signal._onabort)xe(D);(me=(ie=this.signal).onabort)==null||me.call(ie,D)}}};let x=((b=o.env)==null?void 0:b.LRU_CACHE_IGNORE_AC_WARNING)!=="1",O=()=>{x&&(x=!1,s("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",O))}}var c=x=>!n.has(x),h=x=>x&&x===Math.floor(x)&&x>0&&isFinite(x),f=x=>h(x)?x<=Math.pow(2,8)?Uint8Array:x<=Math.pow(2,16)?Uint16Array:x<=Math.pow(2,32)?Uint32Array:x<=Number.MAX_SAFE_INTEGER?p:null:null,p=class extends Array{constructor(x){super(x),this.fill(0)}},y=(w=class{constructor(O,D){rt(this,"heap");rt(this,"length");if(!Ae(w,B))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new D(O),this.length=0}static create(O){let D=f(O);if(!D)return[];ht(w,B,!0);let ie=new w(O,D);return ht(w,B,!1),ie}push(O){this.heap[this.length++]=O}pop(){return this.heap[--this.length]}},B=new WeakMap,Et(w,B,!1),w),g=(we=class{constructor(O){Et(this,z);Et(this,A);Et(this,I);Et(this,R);Et(this,T);Et(this,$);Et(this,k);rt(this,"ttl");rt(this,"ttlResolution");rt(this,"ttlAutopurge");rt(this,"updateAgeOnGet");rt(this,"updateAgeOnHas");rt(this,"allowStale");rt(this,"noDisposeOnSet");rt(this,"noUpdateTTL");rt(this,"maxEntrySize");rt(this,"sizeCalculation");rt(this,"noDeleteOnFetchRejection");rt(this,"noDeleteOnStaleGet");rt(this,"allowStaleOnFetchAbort");rt(this,"allowStaleOnFetchRejection");rt(this,"ignoreFetchAbort");Et(this,L);Et(this,U);Et(this,j);Et(this,Q);Et(this,P);Et(this,re);Et(this,le);Et(this,oe);Et(this,X);Et(this,te);Et(this,pe);Et(this,ue);Et(this,J);Et(this,G);Et(this,H);Et(this,K);Et(this,W);Et(this,ae,()=>{});Et(this,ne,()=>{});Et(this,Z,()=>{});Et(this,F,()=>!1);Et(this,Y,O=>{});Et(this,se,(O,D,ie)=>{});Et(this,ye,(O,D,ie,me)=>{if(ie||me)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});rt(this,_,"LRUCache");let{max:D=0,ttl:ie,ttlResolution:me=1,ttlAutopurge:xe,updateAgeOnGet:Ce,updateAgeOnHas:ve,allowStale:Se,dispose:He,disposeAfter:Ke,noDisposeOnSet:Ve,noUpdateTTL:et,maxSize:gt=0,maxEntrySize:bt=0,sizeCalculation:lt,fetchMethod:yt,memoMethod:tt,noDeleteOnFetchRejection:ft,noDeleteOnStaleGet:dt,allowStaleOnFetchRejection:At,allowStaleOnFetchAbort:Xt,ignoreFetchAbort:br}=O;if(D!==0&&!h(D))throw new TypeError("max option must be a nonnegative integer");let be=D?f(D):Array;if(!be)throw new Error("invalid max value: "+D);if(ht(this,A,D),ht(this,I,gt),this.maxEntrySize=bt||Ae(this,I),this.sizeCalculation=lt,this.sizeCalculation){if(!Ae(this,I)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(tt!==void 0&&typeof tt!="function")throw new TypeError("memoMethod must be a function if defined");if(ht(this,k,tt),yt!==void 0&&typeof yt!="function")throw new TypeError("fetchMethod must be a function if specified");if(ht(this,$,yt),ht(this,K,!!yt),ht(this,j,new Map),ht(this,Q,new Array(D).fill(void 0)),ht(this,P,new Array(D).fill(void 0)),ht(this,re,new be(D)),ht(this,le,new be(D)),ht(this,oe,0),ht(this,X,0),ht(this,te,y.create(D)),ht(this,L,0),ht(this,U,0),typeof He=="function"&&ht(this,R,He),typeof Ke=="function"?(ht(this,T,Ke),ht(this,pe,[])):(ht(this,T,void 0),ht(this,pe,void 0)),ht(this,H,!!Ae(this,R)),ht(this,W,!!Ae(this,T)),this.noDisposeOnSet=!!Ve,this.noUpdateTTL=!!et,this.noDeleteOnFetchRejection=!!ft,this.allowStaleOnFetchRejection=!!At,this.allowStaleOnFetchAbort=!!Xt,this.ignoreFetchAbort=!!br,this.maxEntrySize!==0){if(Ae(this,I)!==0&&!h(Ae(this,I)))throw new TypeError("maxSize must be a positive integer if specified");if(!h(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");We(this,z,RT).call(this)}if(this.allowStale=!!Se,this.noDeleteOnStaleGet=!!dt,this.updateAgeOnGet=!!Ce,this.updateAgeOnHas=!!ve,this.ttlResolution=h(me)||me===0?me:1,this.ttlAutopurge=!!xe,this.ttl=ie||0,this.ttl){if(!h(this.ttl))throw new TypeError("ttl must be a positive integer if specified");We(this,z,eA).call(this)}if(Ae(this,A)===0&&this.ttl===0&&Ae(this,I)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Ae(this,A)&&!Ae(this,I)){let Ie="LRU_CACHE_UNBOUNDED";c(Ie)&&(n.add(Ie),s("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ie,we))}}static unsafeExposeInternals(O){return{starts:Ae(O,J),ttls:Ae(O,G),sizes:Ae(O,ue),keyMap:Ae(O,j),keyList:Ae(O,Q),valList:Ae(O,P),next:Ae(O,re),prev:Ae(O,le),get head(){return Ae(O,oe)},get tail(){return Ae(O,X)},free:Ae(O,te),isBackgroundFetch:D=>{var ie;return We(ie=O,z,er).call(ie,D)},backgroundFetch:(D,ie,me,xe)=>{var Ce;return We(Ce=O,z,dd).call(Ce,D,ie,me,xe)},moveToTail:D=>{var ie;return We(ie=O,z,yc).call(ie,D)},indexes:D=>{var ie;return We(ie=O,z,Ss).call(ie,D)},rindexes:D=>{var ie;return We(ie=O,z,Is).call(ie,D)},isStale:D=>{var ie;return Ae(ie=O,F).call(ie,D)}}}get max(){return Ae(this,A)}get maxSize(){return Ae(this,I)}get calculatedSize(){return Ae(this,U)}get size(){return Ae(this,L)}get fetchMethod(){return Ae(this,$)}get memoMethod(){return Ae(this,k)}get dispose(){return Ae(this,R)}get disposeAfter(){return Ae(this,T)}getRemainingTTL(O){return Ae(this,j).has(O)?1/0:0}*entries(){for(let O of We(this,z,Ss).call(this))Ae(this,P)[O]!==void 0&&Ae(this,Q)[O]!==void 0&&!We(this,z,er).call(this,Ae(this,P)[O])&&(yield[Ae(this,Q)[O],Ae(this,P)[O]])}*rentries(){for(let O of We(this,z,Is).call(this))Ae(this,P)[O]!==void 0&&Ae(this,Q)[O]!==void 0&&!We(this,z,er).call(this,Ae(this,P)[O])&&(yield[Ae(this,Q)[O],Ae(this,P)[O]])}*keys(){for(let O of We(this,z,Ss).call(this)){let D=Ae(this,Q)[O];D!==void 0&&!We(this,z,er).call(this,Ae(this,P)[O])&&(yield D)}}*rkeys(){for(let O of We(this,z,Is).call(this)){let D=Ae(this,Q)[O];D!==void 0&&!We(this,z,er).call(this,Ae(this,P)[O])&&(yield D)}}*values(){for(let O of We(this,z,Ss).call(this))Ae(this,P)[O]!==void 0&&!We(this,z,er).call(this,Ae(this,P)[O])&&(yield Ae(this,P)[O])}*rvalues(){for(let O of We(this,z,Is).call(this))Ae(this,P)[O]!==void 0&&!We(this,z,er).call(this,Ae(this,P)[O])&&(yield Ae(this,P)[O])}[(M=Symbol.iterator,_=Symbol.toStringTag,M)](){return this.entries()}find(O,D={}){for(let ie of We(this,z,Ss).call(this)){let me=Ae(this,P)[ie],xe=We(this,z,er).call(this,me)?me.__staleWhileFetching:me;if(xe!==void 0&&O(xe,Ae(this,Q)[ie],this))return this.get(Ae(this,Q)[ie],D)}}forEach(O,D=this){for(let ie of We(this,z,Ss).call(this)){let me=Ae(this,P)[ie],xe=We(this,z,er).call(this,me)?me.__staleWhileFetching:me;xe!==void 0&&O.call(D,xe,Ae(this,Q)[ie],this)}}rforEach(O,D=this){for(let ie of We(this,z,Is).call(this)){let me=Ae(this,P)[ie],xe=We(this,z,er).call(this,me)?me.__staleWhileFetching:me;xe!==void 0&&O.call(D,xe,Ae(this,Q)[ie],this)}}purgeStale(){let O=!1;for(let D of We(this,z,Is).call(this,{allowStale:!0}))Ae(this,F).call(this,D)&&(We(this,z,_s).call(this,Ae(this,Q)[D],"expire"),O=!0);return O}info(O){let D=Ae(this,j).get(O);if(D===void 0)return;let ie=Ae(this,P)[D],me=We(this,z,er).call(this,ie)?ie.__staleWhileFetching:ie;if(me===void 0)return;let xe={value:me};if(Ae(this,G)&&Ae(this,J)){let Ce=Ae(this,G)[D],ve=Ae(this,J)[D];if(Ce&&ve){let Se=Ce-(t.now()-ve);xe.ttl=Se,xe.start=Date.now()}}return Ae(this,ue)&&(xe.size=Ae(this,ue)[D]),xe}dump(){let O=[];for(let D of We(this,z,Ss).call(this,{allowStale:!0})){let ie=Ae(this,Q)[D],me=Ae(this,P)[D],xe=We(this,z,er).call(this,me)?me.__staleWhileFetching:me;if(xe===void 0||ie===void 0)continue;let Ce={value:xe};if(Ae(this,G)&&Ae(this,J)){Ce.ttl=Ae(this,G)[D];let ve=t.now()-Ae(this,J)[D];Ce.start=Math.floor(Date.now()-ve)}Ae(this,ue)&&(Ce.size=Ae(this,ue)[D]),O.unshift([ie,Ce])}return O}load(O){this.clear();for(let[D,ie]of O){if(ie.start){let me=Date.now()-ie.start;ie.start=t.now()-me}this.set(D,ie.value,ie)}}set(O,D,ie={}){var et,gt,bt,lt,yt;if(D===void 0)return this.delete(O),this;let{ttl:me=this.ttl,start:xe,noDisposeOnSet:Ce=this.noDisposeOnSet,sizeCalculation:ve=this.sizeCalculation,status:Se}=ie,{noUpdateTTL:He=this.noUpdateTTL}=ie,Ke=Ae(this,ye).call(this,O,D,ie.size||0,ve);if(this.maxEntrySize&&Ke>this.maxEntrySize)return Se&&(Se.set="miss",Se.maxEntrySizeExceeded=!0),We(this,z,_s).call(this,O,"set"),this;let Ve=Ae(this,L)===0?void 0:Ae(this,j).get(O);if(Ve===void 0)Ve=Ae(this,L)===0?Ae(this,X):Ae(this,te).length!==0?Ae(this,te).pop():Ae(this,L)===Ae(this,A)?We(this,z,hd).call(this,!1):Ae(this,L),Ae(this,Q)[Ve]=O,Ae(this,P)[Ve]=D,Ae(this,j).set(O,Ve),Ae(this,re)[Ae(this,X)]=Ve,Ae(this,le)[Ve]=Ae(this,X),ht(this,X,Ve),Nh(this,L)._++,Ae(this,se).call(this,Ve,Ke,Se),Se&&(Se.set="add"),He=!1;else{We(this,z,yc).call(this,Ve);let tt=Ae(this,P)[Ve];if(D!==tt){if(Ae(this,K)&&We(this,z,er).call(this,tt)){tt.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:ft}=tt;ft!==void 0&&!Ce&&(Ae(this,H)&&((et=Ae(this,R))==null||et.call(this,ft,O,"set")),Ae(this,W)&&((gt=Ae(this,pe))==null||gt.push([ft,O,"set"])))}else Ce||(Ae(this,H)&&((bt=Ae(this,R))==null||bt.call(this,tt,O,"set")),Ae(this,W)&&((lt=Ae(this,pe))==null||lt.push([tt,O,"set"])));if(Ae(this,Y).call(this,Ve),Ae(this,se).call(this,Ve,Ke,Se),Ae(this,P)[Ve]=D,Se){Se.set="replace";let ft=tt&&We(this,z,er).call(this,tt)?tt.__staleWhileFetching:tt;ft!==void 0&&(Se.oldValue=ft)}}else Se&&(Se.set="update")}if(me!==0&&!Ae(this,G)&&We(this,z,eA).call(this),Ae(this,G)&&(He||Ae(this,Z).call(this,Ve,me,xe),Se&&Ae(this,ne).call(this,Se,Ve)),!Ce&&Ae(this,W)&&Ae(this,pe)){let tt=Ae(this,pe),ft;for(;ft=tt==null?void 0:tt.shift();)(yt=Ae(this,T))==null||yt.call(this,...ft)}return this}pop(){var O;try{for(;Ae(this,L);){let D=Ae(this,P)[Ae(this,oe)];if(We(this,z,hd).call(this,!0),We(this,z,er).call(this,D)){if(D.__staleWhileFetching)return D.__staleWhileFetching}else if(D!==void 0)return D}}finally{if(Ae(this,W)&&Ae(this,pe)){let D=Ae(this,pe),ie;for(;ie=D==null?void 0:D.shift();)(O=Ae(this,T))==null||O.call(this,...ie)}}}has(O,D={}){let{updateAgeOnHas:ie=this.updateAgeOnHas,status:me}=D,xe=Ae(this,j).get(O);if(xe!==void 0){let Ce=Ae(this,P)[xe];if(We(this,z,er).call(this,Ce)&&Ce.__staleWhileFetching===void 0)return!1;if(Ae(this,F).call(this,xe))me&&(me.has="stale",Ae(this,ne).call(this,me,xe));else return ie&&Ae(this,ae).call(this,xe),me&&(me.has="hit",Ae(this,ne).call(this,me,xe)),!0}else me&&(me.has="miss");return!1}peek(O,D={}){let{allowStale:ie=this.allowStale}=D,me=Ae(this,j).get(O);if(me===void 0||!ie&&Ae(this,F).call(this,me))return;let xe=Ae(this,P)[me];return We(this,z,er).call(this,xe)?xe.__staleWhileFetching:xe}async fetch(O,D={}){let{allowStale:ie=this.allowStale,updateAgeOnGet:me=this.updateAgeOnGet,noDeleteOnStaleGet:xe=this.noDeleteOnStaleGet,ttl:Ce=this.ttl,noDisposeOnSet:ve=this.noDisposeOnSet,size:Se=0,sizeCalculation:He=this.sizeCalculation,noUpdateTTL:Ke=this.noUpdateTTL,noDeleteOnFetchRejection:Ve=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:et=this.allowStaleOnFetchRejection,ignoreFetchAbort:gt=this.ignoreFetchAbort,allowStaleOnFetchAbort:bt=this.allowStaleOnFetchAbort,context:lt,forceRefresh:yt=!1,status:tt,signal:ft}=D;if(!Ae(this,K))return tt&&(tt.fetch="get"),this.get(O,{allowStale:ie,updateAgeOnGet:me,noDeleteOnStaleGet:xe,status:tt});let dt={allowStale:ie,updateAgeOnGet:me,noDeleteOnStaleGet:xe,ttl:Ce,noDisposeOnSet:ve,size:Se,sizeCalculation:He,noUpdateTTL:Ke,noDeleteOnFetchRejection:Ve,allowStaleOnFetchRejection:et,allowStaleOnFetchAbort:bt,ignoreFetchAbort:gt,status:tt,signal:ft},At=Ae(this,j).get(O);if(At===void 0){tt&&(tt.fetch="miss");let Xt=We(this,z,dd).call(this,O,At,dt,lt);return Xt.__returned=Xt}else{let Xt=Ae(this,P)[At];if(We(this,z,er).call(this,Xt)){let Ye=ie&&Xt.__staleWhileFetching!==void 0;return tt&&(tt.fetch="inflight",Ye&&(tt.returnedStale=!0)),Ye?Xt.__staleWhileFetching:Xt.__returned=Xt}let br=Ae(this,F).call(this,At);if(!yt&&!br)return tt&&(tt.fetch="hit"),We(this,z,yc).call(this,At),me&&Ae(this,ae).call(this,At),tt&&Ae(this,ne).call(this,tt,At),Xt;let be=We(this,z,dd).call(this,O,At,dt,lt),Ie=be.__staleWhileFetching!==void 0&&ie;return tt&&(tt.fetch=br?"stale":"refresh",Ie&&br&&(tt.returnedStale=!0)),Ie?be.__staleWhileFetching:be.__returned=be}}async forceFetch(O,D={}){let ie=await this.fetch(O,D);if(ie===void 0)throw new Error("fetch() returned undefined");return ie}memo(O,D={}){let ie=Ae(this,k);if(!ie)throw new Error("no memoMethod provided to constructor");let{context:me,forceRefresh:xe,...Ce}=D,ve=this.get(O,Ce);if(!xe&&ve!==void 0)return ve;let Se=ie(O,ve,{options:Ce,context:me});return this.set(O,Se,Ce),Se}get(O,D={}){let{allowStale:ie=this.allowStale,updateAgeOnGet:me=this.updateAgeOnGet,noDeleteOnStaleGet:xe=this.noDeleteOnStaleGet,status:Ce}=D,ve=Ae(this,j).get(O);if(ve!==void 0){let Se=Ae(this,P)[ve],He=We(this,z,er).call(this,Se);return Ce&&Ae(this,ne).call(this,Ce,ve),Ae(this,F).call(this,ve)?(Ce&&(Ce.get="stale"),He?(Ce&&ie&&Se.__staleWhileFetching!==void 0&&(Ce.returnedStale=!0),ie?Se.__staleWhileFetching:void 0):(xe||We(this,z,_s).call(this,O,"expire"),Ce&&ie&&(Ce.returnedStale=!0),ie?Se:void 0)):(Ce&&(Ce.get="hit"),He?Se.__staleWhileFetching:(We(this,z,yc).call(this,ve),me&&Ae(this,ae).call(this,ve),Se))}else Ce&&(Ce.get="miss")}delete(O){return We(this,z,_s).call(this,O,"delete")}clear(){return We(this,z,nA).call(this,"delete")}},A=new WeakMap,I=new WeakMap,R=new WeakMap,T=new WeakMap,$=new WeakMap,k=new WeakMap,L=new WeakMap,U=new WeakMap,j=new WeakMap,Q=new WeakMap,P=new WeakMap,re=new WeakMap,le=new WeakMap,oe=new WeakMap,X=new WeakMap,te=new WeakMap,pe=new WeakMap,ue=new WeakMap,J=new WeakMap,G=new WeakMap,H=new WeakMap,K=new WeakMap,W=new WeakMap,z=new WeakSet,eA=function(){let O=new p(Ae(this,A)),D=new p(Ae(this,A));ht(this,G,O),ht(this,J,D),ht(this,Z,(xe,Ce,ve=t.now())=>{if(D[xe]=Ce!==0?ve:0,O[xe]=Ce,Ce!==0&&this.ttlAutopurge){let Se=setTimeout(()=>{Ae(this,F).call(this,xe)&&We(this,z,_s).call(this,Ae(this,Q)[xe],"expire")},Ce+1);Se.unref&&Se.unref()}}),ht(this,ae,xe=>{D[xe]=O[xe]!==0?t.now():0}),ht(this,ne,(xe,Ce)=>{if(O[Ce]){let ve=O[Ce],Se=D[Ce];if(!ve||!Se)return;xe.ttl=ve,xe.start=Se,xe.now=ie||me();let He=xe.now-Se;xe.remainingTTL=ve-He}});let ie=0,me=()=>{let xe=t.now();if(this.ttlResolution>0){ie=xe;let Ce=setTimeout(()=>ie=0,this.ttlResolution);Ce.unref&&Ce.unref()}return xe};this.getRemainingTTL=xe=>{let Ce=Ae(this,j).get(xe);if(Ce===void 0)return 0;let ve=O[Ce],Se=D[Ce];if(!ve||!Se)return 1/0;let He=(ie||me())-Se;return ve-He},ht(this,F,xe=>{let Ce=D[xe],ve=O[xe];return!!ve&&!!Ce&&(ie||me())-Ce>ve})},ae=new WeakMap,ne=new WeakMap,Z=new WeakMap,F=new WeakMap,RT=function(){let O=new p(Ae(this,A));ht(this,U,0),ht(this,ue,O),ht(this,Y,D=>{ht(this,U,Ae(this,U)-O[D]),O[D]=0}),ht(this,ye,(D,ie,me,xe)=>{if(We(this,z,er).call(this,ie))return 0;if(!h(me))if(xe){if(typeof xe!="function")throw new TypeError("sizeCalculation must be a function");if(me=xe(ie,D),!h(me))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return me}),ht(this,se,(D,ie,me)=>{if(O[D]=ie,Ae(this,I)){let xe=Ae(this,I)-O[D];for(;Ae(this,U)>xe;)We(this,z,hd).call(this,!0)}ht(this,U,Ae(this,U)+O[D]),me&&(me.entrySize=ie,me.totalCalculatedSize=Ae(this,U))})},Y=new WeakMap,se=new WeakMap,ye=new WeakMap,Ss=function*({allowStale:O=this.allowStale}={}){if(Ae(this,L))for(let D=Ae(this,X);!(!We(this,z,tA).call(this,D)||((O||!Ae(this,F).call(this,D))&&(yield D),D===Ae(this,oe)));)D=Ae(this,le)[D]},Is=function*({allowStale:O=this.allowStale}={}){if(Ae(this,L))for(let D=Ae(this,oe);!(!We(this,z,tA).call(this,D)||((O||!Ae(this,F).call(this,D))&&(yield D),D===Ae(this,X)));)D=Ae(this,re)[D]},tA=function(O){return O!==void 0&&Ae(this,j).get(Ae(this,Q)[O])===O},hd=function(O){var xe,Ce;let D=Ae(this,oe),ie=Ae(this,Q)[D],me=Ae(this,P)[D];return Ae(this,K)&&We(this,z,er).call(this,me)?me.__abortController.abort(new Error("evicted")):(Ae(this,H)||Ae(this,W))&&(Ae(this,H)&&((xe=Ae(this,R))==null||xe.call(this,me,ie,"evict")),Ae(this,W)&&((Ce=Ae(this,pe))==null||Ce.push([me,ie,"evict"]))),Ae(this,Y).call(this,D),O&&(Ae(this,Q)[D]=void 0,Ae(this,P)[D]=void 0,Ae(this,te).push(D)),Ae(this,L)===1?(ht(this,oe,ht(this,X,0)),Ae(this,te).length=0):ht(this,oe,Ae(this,re)[D]),Ae(this,j).delete(ie),Nh(this,L)._--,D},dd=function(O,D,ie,me){let xe=D===void 0?void 0:Ae(this,P)[D];if(We(this,z,er).call(this,xe))return xe;let Ce=new u,{signal:ve}=ie;ve==null||ve.addEventListener("abort",()=>Ce.abort(ve.reason),{signal:Ce.signal});let Se={signal:Ce.signal,options:ie,context:me},He=(lt,yt=!1)=>{let{aborted:tt}=Ce.signal,ft=ie.ignoreFetchAbort&<!==void 0;if(ie.status&&(tt&&!yt?(ie.status.fetchAborted=!0,ie.status.fetchError=Ce.signal.reason,ft&&(ie.status.fetchAbortIgnored=!0)):ie.status.fetchResolved=!0),tt&&!ft&&!yt)return Ve(Ce.signal.reason);let dt=gt;return Ae(this,P)[D]===gt&&(lt===void 0?dt.__staleWhileFetching?Ae(this,P)[D]=dt.__staleWhileFetching:We(this,z,_s).call(this,O,"fetch"):(ie.status&&(ie.status.fetchUpdated=!0),this.set(O,lt,Se.options))),lt},Ke=lt=>(ie.status&&(ie.status.fetchRejected=!0,ie.status.fetchError=lt),Ve(lt)),Ve=lt=>{let{aborted:yt}=Ce.signal,tt=yt&&ie.allowStaleOnFetchAbort,ft=tt||ie.allowStaleOnFetchRejection,dt=ft||ie.noDeleteOnFetchRejection,At=gt;if(Ae(this,P)[D]===gt&&(!dt||At.__staleWhileFetching===void 0?We(this,z,_s).call(this,O,"fetch"):tt||(Ae(this,P)[D]=At.__staleWhileFetching)),ft)return ie.status&&At.__staleWhileFetching!==void 0&&(ie.status.returnedStale=!0),At.__staleWhileFetching;if(At.__returned===At)throw lt},et=(lt,yt)=>{var ft;let tt=(ft=Ae(this,$))==null?void 0:ft.call(this,O,xe,Se);tt&&tt instanceof Promise&&tt.then(dt=>lt(dt===void 0?void 0:dt),yt),Ce.signal.addEventListener("abort",()=>{(!ie.ignoreFetchAbort||ie.allowStaleOnFetchAbort)&&(lt(void 0),ie.allowStaleOnFetchAbort&&(lt=dt=>He(dt,!0)))})};ie.status&&(ie.status.fetchDispatched=!0);let gt=new Promise(et).then(He,Ke),bt=Object.assign(gt,{__abortController:Ce,__staleWhileFetching:xe,__returned:void 0});return D===void 0?(this.set(O,bt,{...Se.options,status:void 0}),D=Ae(this,j).get(O)):Ae(this,P)[D]=bt,bt},er=function(O){if(!Ae(this,K))return!1;let D=O;return!!D&&D instanceof Promise&&D.hasOwnProperty("__staleWhileFetching")&&D.__abortController instanceof u},rA=function(O,D){Ae(this,le)[D]=O,Ae(this,re)[O]=D},yc=function(O){O!==Ae(this,X)&&(O===Ae(this,oe)?ht(this,oe,Ae(this,re)[O]):We(this,z,rA).call(this,Ae(this,le)[O],Ae(this,re)[O]),We(this,z,rA).call(this,Ae(this,X),O),ht(this,X,O))},_s=function(O,D){var me,xe,Ce,ve;let ie=!1;if(Ae(this,L)!==0){let Se=Ae(this,j).get(O);if(Se!==void 0)if(ie=!0,Ae(this,L)===1)We(this,z,nA).call(this,D);else{Ae(this,Y).call(this,Se);let He=Ae(this,P)[Se];if(We(this,z,er).call(this,He)?He.__abortController.abort(new Error("deleted")):(Ae(this,H)||Ae(this,W))&&(Ae(this,H)&&((me=Ae(this,R))==null||me.call(this,He,O,D)),Ae(this,W)&&((xe=Ae(this,pe))==null||xe.push([He,O,D]))),Ae(this,j).delete(O),Ae(this,Q)[Se]=void 0,Ae(this,P)[Se]=void 0,Se===Ae(this,X))ht(this,X,Ae(this,le)[Se]);else if(Se===Ae(this,oe))ht(this,oe,Ae(this,re)[Se]);else{let Ke=Ae(this,le)[Se];Ae(this,re)[Ke]=Ae(this,re)[Se];let Ve=Ae(this,re)[Se];Ae(this,le)[Ve]=Ae(this,le)[Se]}Nh(this,L)._--,Ae(this,te).push(Se)}}if(Ae(this,W)&&((Ce=Ae(this,pe))!=null&&Ce.length)){let Se=Ae(this,pe),He;for(;He=Se==null?void 0:Se.shift();)(ve=Ae(this,T))==null||ve.call(this,...He)}return ie},nA=function(O){var D,ie,me;for(let xe of We(this,z,Is).call(this,{allowStale:!0})){let Ce=Ae(this,P)[xe];if(We(this,z,er).call(this,Ce))Ce.__abortController.abort(new Error("deleted"));else{let ve=Ae(this,Q)[xe];Ae(this,H)&&((D=Ae(this,R))==null||D.call(this,Ce,ve,O)),Ae(this,W)&&((ie=Ae(this,pe))==null||ie.push([Ce,ve,O]))}}if(Ae(this,j).clear(),Ae(this,P).fill(void 0),Ae(this,Q).fill(void 0),Ae(this,G)&&Ae(this,J)&&(Ae(this,G).fill(0),Ae(this,J).fill(0)),Ae(this,ue)&&Ae(this,ue).fill(0),ht(this,oe,0),ht(this,X,0),Ae(this,te).length=0,ht(this,U,0),ht(this,L,0),Ae(this,W)&&Ae(this,pe)){let xe=Ae(this,pe),Ce;for(;Ce=xe==null?void 0:xe.shift();)(me=Ae(this,T))==null||me.call(this,...Ce)}},we);e.LRUCache=g}),Ko=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.ContainerIterator=e.Container=e.Base=void 0;var t=class{constructor(s=0){this.iteratorType=s}equals(s){return this.o===s.o}};e.ContainerIterator=t;var n=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};e.Base=n;var o=class extends n{};e.Container=o}),LH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Ko(),n=class extends t.Base{constructor(s=[]){super(),this.S=[];let u=this;s.forEach(function(l){u.push(l)})}clear(){this.i=0,this.S=[]}push(s){return this.S.push(s),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},o=n;e.default=o}),zH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Ko(),n=class extends t.Base{constructor(s=[]){super(),this.j=0,this.q=[];let u=this;s.forEach(function(l){u.push(l)})}clear(){this.q=[],this.i=this.j=0}push(s){let u=this.q.length;if(this.j/u>.5&&this.j+this.i>=u&&u>4096){let l=this.i;for(let c=0;c<l;++c)this.q[c]=this.q[this.j+c];this.j=0,this.q[this.i]=s}else this.q[this.j+this.i]=s;return++this.i}pop(){if(this.i===0)return;let s=this.q[this.j++];return this.i-=1,s}front(){if(this.i!==0)return this.q[this.j]}},o=n;e.default=o}),$H=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Ko(),n=class extends t.Base{constructor(s=[],u=function(c,h){return c>h?-1:c<h?1:0},l=!0){if(super(),this.v=u,Array.isArray(s))this.C=l?[...s]:s;else{this.C=[];let h=this;s.forEach(function(f){h.C.push(f)})}this.i=this.C.length;let c=this.i>>1;for(let h=this.i-1>>1;h>=0;--h)this.k(h,c)}m(s){let u=this.C[s];for(;s>0;){let l=s-1>>1,c=this.C[l];if(this.v(c,u)<=0)break;this.C[s]=c,s=l}this.C[s]=u}k(s,u){let l=this.C[s];for(;s<u;){let c=s<<1|1,h=c+1,f=this.C[c];if(h<this.i&&this.v(f,this.C[h])>0&&(c=h,f=this.C[h]),this.v(f,l)>=0)break;this.C[s]=f,s=c}this.C[s]=l}clear(){this.i=0,this.C.length=0}push(s){this.C.push(s),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let s=this.C[0],u=this.C.pop();return this.i-=1,this.i&&(this.C[0]=u,this.k(0,this.i>>1)),s}top(){return this.C[0]}find(s){return this.C.indexOf(s)>=0}remove(s){let u=this.C.indexOf(s);return u<0?!1:(u===0?this.pop():u===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(u,1,this.C.pop()),this.i-=1,this.m(u),this.k(u,this.i>>1)),!0)}updateItem(s){let u=this.C.indexOf(s);return u<0?!1:(this.m(u),this.k(u,this.i>>1),!0)}toArray(){return[...this.C]}},o=n;e.default=o}),vw=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Ko(),n=class extends t.Container{},o=n;e.default=o}),Yo=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.throwIteratorAccessError=t;function t(){throw new RangeError("Iterator access denied!")}}),MT=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.RandomIterator=void 0;var t=Ko(),n=Yo(),o=class extends t.ContainerIterator{constructor(s,u){super(u),this.o=s,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,n.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,n.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,n.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,n.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(s){this.container.setElementByPos(this.o,s)}};e.RandomIterator=o}),qH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(vw()),n=MT();function o(c){return c&&c.t?c:{default:c}}var s=class UT extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new UT(this.o,this.container,this.iteratorType)}},u=class extends t.default{constructor(c=[],h=!0){if(super(),Array.isArray(c))this.J=h?[...c]:c,this.i=c.length;else{this.J=[];let f=this;c.forEach(function(p){f.pushBack(p)})}}clear(){this.i=0,this.J.length=0}begin(){return new s(0,this)}end(){return new s(this.i,this)}rBegin(){return new s(this.i-1,this,1)}rEnd(){return new s(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;return this.J[c]}eraseElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;return this.J.splice(c,1),this.i-=1,this.i}eraseElementByValue(c){let h=0;for(let f=0;f<this.i;++f)this.J[f]!==c&&(this.J[h++]=this.J[f]);return this.i=this.J.length=h,this.i}eraseElementByIterator(c){let h=c.o;return c=c.next(),this.eraseElementByPos(h),c}pushBack(c){return this.J.push(c),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(c,h){if(c<0||c>this.i-1)throw new RangeError;this.J[c]=h}insert(c,h,f=1){if(c<0||c>this.i)throw new RangeError;return this.J.splice(c,0,...new Array(f).fill(h)),this.i+=f,this.i}find(c){for(let h=0;h<this.i;++h)if(this.J[h]===c)return new s(h,this);return this.end()}reverse(){this.J.reverse()}unique(){let c=1;for(let h=1;h<this.i;++h)this.J[h]!==this.J[h-1]&&(this.J[c++]=this.J[h]);return this.i=this.J.length=c,this.i}sort(c){this.J.sort(c)}forEach(c){for(let h=0;h<this.i;++h)c(this.J[h],h,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},l=u;e.default=l}),HH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(vw()),n=Ko(),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class jT extends n.ContainerIterator{constructor(f,p,y,g){super(g),this.o=f,this.h=p,this.container=y,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.l}set pointer(f){this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.l=f}copy(){return new jT(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.default{constructor(h=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let f=this;h.forEach(function(p){f.pushBack(p)})}V(h){let{L:f,B:p}=h;f.B=p,p.L=f,h===this.p&&(this.p=p),h===this._&&(this._=f),this.i-=1}G(h,f){let p=f.B,y={l:h,L:f,B:p};f.B=y,p.L=y,f===this.h&&(this.p=y),p===this.h&&(this._=y),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new u(this.p,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this._,this.h,this,1)}rEnd(){return new u(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(h){if(h<0||h>this.i-1)throw new RangeError;let f=this.p;for(;h--;)f=f.B;return f.l}eraseElementByPos(h){if(h<0||h>this.i-1)throw new RangeError;let f=this.p;for(;h--;)f=f.B;return this.V(f),this.i}eraseElementByValue(h){let f=this.p;for(;f!==this.h;)f.l===h&&this.V(f),f=f.B;return this.i}eraseElementByIterator(h){let f=h.o;return f===this.h&&(0,o.throwIteratorAccessError)(),h=h.next(),this.V(f),h}pushBack(h){return this.G(h,this._),this.i}popBack(){if(this.i===0)return;let h=this._.l;return this.V(this._),h}pushFront(h){return this.G(h,this.h),this.i}popFront(){if(this.i===0)return;let h=this.p.l;return this.V(this.p),h}setElementByPos(h,f){if(h<0||h>this.i-1)throw new RangeError;let p=this.p;for(;h--;)p=p.B;p.l=f}insert(h,f,p=1){if(h<0||h>this.i)throw new RangeError;if(p<=0)return this.i;if(h===0)for(;p--;)this.pushFront(f);else if(h===this.i)for(;p--;)this.pushBack(f);else{let y=this.p;for(let b=1;b<h;++b)y=y.B;let g=y.B;for(this.i+=p;p--;)y.B={l:f,L:y},y.B.L=y,y=y.B;y.B=g,g.L=y}return this.i}find(h){let f=this.p;for(;f!==this.h;){if(f.l===h)return new u(f,this.h,this);f=f.B}return this.end()}reverse(){if(this.i<=1)return;let h=this.p,f=this._,p=0;for(;p<<1<this.i;){let y=h.l;h.l=f.l,f.l=y,h=h.B,f=f.L,p+=1}}unique(){if(this.i<=1)return this.i;let h=this.p;for(;h!==this.h;){let f=h;for(;f.B!==this.h&&f.l===f.B.l;)f=f.B,this.i-=1;h.B=f.B,h.B.L=h,h=h.B}return this.i}sort(h){if(this.i<=1)return;let f=[];this.forEach(function(y){f.push(y)}),f.sort(h);let p=this.p;f.forEach(function(y){p.l=y,p=p.B})}merge(h){let f=this;if(this.i===0)h.forEach(function(p){f.pushBack(p)});else{let p=this.p;h.forEach(function(y){for(;p!==f.h&&p.l<=y;)p=p.B;f.G(y,p.L)})}return this.i}forEach(h){let f=this.p,p=0;for(;f!==this.h;)h(f.l,p++,this),f=f.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let h=this.p;for(;h!==this.h;)yield h.l,h=h.B}).bind(this)()}},c=l;e.default=c}),QH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(vw()),n=MT();function o(c){return c&&c.t?c:{default:c}}var s=class DT extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new DT(this.o,this.container,this.iteratorType)}},u=class extends t.default{constructor(c=[],h=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let f=(()=>{if(typeof c.length=="number")return c.length;if(typeof c.size=="number")return c.size;if(typeof c.size=="function")return c.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=h,this.P=Math.max(Math.ceil(f/this.F),1);for(let g=0;g<this.P;++g)this.A.push(new Array(this.F));let p=Math.ceil(f/this.F);this.j=this.R=(this.P>>1)-(p>>1),this.D=this.N=this.F-f%this.F>>1;let y=this;c.forEach(function(g){y.pushBack(g)})}T(){let c=[],h=Math.max(this.P>>1,1);for(let f=0;f<h;++f)c[f]=new Array(this.F);for(let f=this.j;f<this.P;++f)c[c.length]=this.A[f];for(let f=0;f<this.R;++f)c[c.length]=this.A[f];c[c.length]=[...this.A[this.R]],this.j=h,this.R=c.length-1;for(let f=0;f<h;++f)c[c.length]=new Array(this.F);this.A=c,this.P=c.length}O(c){let h=this.D+c+1,f=h%this.F,p=f-1,y=this.j+(h-f)/this.F;return f===0&&(y-=1),y%=this.P,p<0&&(p+=this.F),{curNodeBucketIndex:y,curNodePointerIndex:p}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new s(0,this)}end(){return new s(this.i,this)}rBegin(){return new s(this.i-1,this,1)}rEnd(){return new s(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(c){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=c,this.i}popBack(){if(this.i===0)return;let c=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,c}pushFront(c){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=c,this.i}popFront(){if(this.i===0)return;let c=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,c}getElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;let{curNodeBucketIndex:h,curNodePointerIndex:f}=this.O(c);return this.A[h][f]}setElementByPos(c,h){if(c<0||c>this.i-1)throw new RangeError;let{curNodeBucketIndex:f,curNodePointerIndex:p}=this.O(c);this.A[f][p]=h}insert(c,h,f=1){if(c<0||c>this.i)throw new RangeError;if(c===0)for(;f--;)this.pushFront(h);else if(c===this.i)for(;f--;)this.pushBack(h);else{let p=[];for(let y=c;y<this.i;++y)p.push(this.getElementByPos(y));this.cut(c-1);for(let y=0;y<f;++y)this.pushBack(h);for(let y=0;y<p.length;++y)this.pushBack(p[y])}return this.i}cut(c){if(c<0)return this.clear(),0;let{curNodeBucketIndex:h,curNodePointerIndex:f}=this.O(c);return this.R=h,this.N=f,this.i=c+1,this.i}eraseElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;if(c===0)this.popFront();else if(c===this.i-1)this.popBack();else{let h=[];for(let p=c+1;p<this.i;++p)h.push(this.getElementByPos(p));this.cut(c),this.popBack();let f=this;h.forEach(function(p){f.pushBack(p)})}return this.i}eraseElementByValue(c){if(this.i===0)return 0;let h=[];for(let p=0;p<this.i;++p){let y=this.getElementByPos(p);y!==c&&h.push(y)}let f=h.length;for(let p=0;p<f;++p)this.setElementByPos(p,h[p]);return this.cut(f-1)}eraseElementByIterator(c){let h=c.o;return this.eraseElementByPos(h),c=c.next(),c}find(c){for(let h=0;h<this.i;++h)if(this.getElementByPos(h)===c)return new s(h,this);return this.end()}reverse(){let c=0,h=this.i-1;for(;c<h;){let f=this.getElementByPos(c);this.setElementByPos(c,this.getElementByPos(h)),this.setElementByPos(h,f),c+=1,h-=1}}unique(){if(this.i<=1)return this.i;let c=1,h=this.getElementByPos(0);for(let f=1;f<this.i;++f){let p=this.getElementByPos(f);p!==h&&(h=p,this.setElementByPos(c++,p))}for(;this.i>c;)this.popBack();return this.i}sort(c){let h=[];for(let f=0;f<this.i;++f)h.push(this.getElementByPos(f));h.sort(c);for(let f=0;f<this.i;++f)this.setElementByPos(f,h[f])}shrinkToFit(){if(this.i===0)return;let c=[];this.forEach(function(h){c.push(h)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let h=0;h<this.P;++h)this.A.push(new Array(this.F));for(let h=0;h<c.length;++h)this.pushBack(c[h])}forEach(c){for(let h=0;h<this.i;++h)c(this.getElementByPos(h),h,this)}[Symbol.iterator](){return(function*(){for(let c=0;c<this.i;++c)yield this.getElementByPos(c)}).bind(this)()}},l=u;e.default=l}),GH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.TreeNodeEnableIndex=e.TreeNode=void 0;var t=class{constructor(o,s){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=o,this.l=s}L(){let o=this;if(o.ee===1&&o.tt.tt===o)o=o.W;else if(o.U)for(o=o.U;o.W;)o=o.W;else{let s=o.tt;for(;s.U===o;)o=s,s=o.tt;o=s}return o}B(){let o=this;if(o.W){for(o=o.W;o.U;)o=o.U;return o}else{let s=o.tt;for(;s.W===o;)o=s,s=o.tt;return o.W!==s?s:o}}te(){let o=this.tt,s=this.W,u=s.U;return o.tt===this?o.tt=s:o.U===this?o.U=s:o.W=s,s.tt=o,s.U=this,this.tt=s,this.W=u,u&&(u.tt=this),s}se(){let o=this.tt,s=this.U,u=s.W;return o.tt===this?o.tt=s:o.U===this?o.U=s:o.W=s,s.tt=o,s.W=this,this.tt=s,this.U=u,u&&(u.tt=this),s}};e.TreeNode=t;var n=class extends t{constructor(){super(...arguments),this.rt=1}te(){let o=super.te();return this.ie(),o.ie(),o}se(){let o=super.se();return this.ie(),o.ie(),o}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};e.TreeNodeEnableIndex=n}),NT=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=GH(),n=Ko(),o=Yo(),s=class extends n.Container{constructor(l=function(h,f){return h<f?-1:h>f?1:0},c=!1){super(),this.Y=void 0,this.v=l,c?(this.re=t.TreeNodeEnableIndex,this.M=function(h,f,p){let y=this.ne(h,f,p);if(y){let g=y.tt;for(;g!==this.h;)g.rt+=1,g=g.tt;let b=this.he(y);if(b){let{parentNode:w,grandParent:B,curNode:_}=b;w.ie(),B.ie(),_.ie()}}return this.i},this.V=function(h){let f=this.fe(h);for(;f!==this.h;)f.rt-=1,f=f.tt}):(this.re=t.TreeNode,this.M=function(h,f,p){let y=this.ne(h,f,p);return y&&this.he(y),this.i},this.V=this.fe),this.h=new this.re}X(l,c){let h=this.h;for(;l;){let f=this.v(l.u,c);if(f<0)l=l.W;else if(f>0)h=l,l=l.U;else return l}return h}Z(l,c){let h=this.h;for(;l;)this.v(l.u,c)<=0?l=l.W:(h=l,l=l.U);return h}$(l,c){let h=this.h;for(;l;){let f=this.v(l.u,c);if(f<0)h=l,l=l.W;else if(f>0)l=l.U;else return l}return h}rr(l,c){let h=this.h;for(;l;)this.v(l.u,c)<0?(h=l,l=l.W):l=l.U;return h}ue(l){for(;;){let c=l.tt;if(c===this.h)return;if(l.ee===1){l.ee=0;return}if(l===c.U){let h=c.W;if(h.ee===1)h.ee=0,c.ee=1,c===this.Y?this.Y=c.te():c.te();else if(h.W&&h.W.ee===1){h.ee=c.ee,c.ee=0,h.W.ee=0,c===this.Y?this.Y=c.te():c.te();return}else h.U&&h.U.ee===1?(h.ee=1,h.U.ee=0,h.se()):(h.ee=1,l=c)}else{let h=c.U;if(h.ee===1)h.ee=0,c.ee=1,c===this.Y?this.Y=c.se():c.se();else if(h.U&&h.U.ee===1){h.ee=c.ee,c.ee=0,h.U.ee=0,c===this.Y?this.Y=c.se():c.se();return}else h.W&&h.W.ee===1?(h.ee=1,h.W.ee=0,h.te()):(h.ee=1,l=c)}}}fe(l){if(this.i===1)return this.clear(),this.h;let c=l;for(;c.U||c.W;){if(c.W)for(c=c.W;c.U;)c=c.U;else c=c.U;[l.u,c.u]=[c.u,l.u],[l.l,c.l]=[c.l,l.l],l=c}this.h.U===c?this.h.U=c.tt:this.h.W===c&&(this.h.W=c.tt),this.ue(c);let h=c.tt;return c===h.U?h.U=void 0:h.W=void 0,this.i-=1,this.Y.ee=0,h}oe(l,c){return l===void 0?!1:this.oe(l.U,c)||c(l)?!0:this.oe(l.W,c)}he(l){for(;;){let c=l.tt;if(c.ee===0)return;let h=c.tt;if(c===h.U){let f=h.W;if(f&&f.ee===1){if(f.ee=c.ee=0,h===this.Y)return;h.ee=1,l=h;continue}else if(l===c.W){if(l.ee=0,l.U&&(l.U.tt=c),l.W&&(l.W.tt=h),c.W=l.U,h.U=l.W,l.U=c,l.W=h,h===this.Y)this.Y=l,this.h.tt=l;else{let p=h.tt;p.U===h?p.U=l:p.W=l}return l.tt=h.tt,c.tt=l,h.tt=l,h.ee=1,{parentNode:c,grandParent:h,curNode:l}}else c.ee=0,h===this.Y?this.Y=h.se():h.se(),h.ee=1}else{let f=h.U;if(f&&f.ee===1){if(f.ee=c.ee=0,h===this.Y)return;h.ee=1,l=h;continue}else if(l===c.U){if(l.ee=0,l.U&&(l.U.tt=h),l.W&&(l.W.tt=c),h.W=l.U,c.U=l.W,l.U=h,l.W=c,h===this.Y)this.Y=l,this.h.tt=l;else{let p=h.tt;p.U===h?p.U=l:p.W=l}return l.tt=h.tt,c.tt=l,h.tt=l,h.ee=1,{parentNode:c,grandParent:h,curNode:l}}else c.ee=0,h===this.Y?this.Y=h.te():h.te(),h.ee=1}return}}ne(l,c,h){if(this.Y===void 0){this.i+=1,this.Y=new this.re(l,c),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let f,p=this.h.U,y=this.v(p.u,l);if(y===0){p.l=c;return}else if(y>0)p.U=new this.re(l,c),p.U.tt=p,f=p.U,this.h.U=f;else{let g=this.h.W,b=this.v(g.u,l);if(b===0){g.l=c;return}else if(b<0)g.W=new this.re(l,c),g.W.tt=g,f=g.W,this.h.W=f;else{if(h!==void 0){let w=h.o;if(w!==this.h){let B=this.v(w.u,l);if(B===0){w.l=c;return}else if(B>0){let _=w.L(),M=this.v(_.u,l);if(M===0){_.l=c;return}else M<0&&(f=new this.re(l,c),_.W===void 0?(_.W=f,f.tt=_):(w.U=f,f.tt=w))}}}if(f===void 0)for(f=this.Y;;){let w=this.v(f.u,l);if(w>0){if(f.U===void 0){f.U=new this.re(l,c),f.U.tt=f,f=f.U;break}f=f.U}else if(w<0){if(f.W===void 0){f.W=new this.re(l,c),f.W.tt=f,f=f.W;break}f=f.W}else{f.l=c;return}}}}return this.i+=1,f}I(l,c){for(;l;){let h=this.v(l.u,c);if(h<0)l=l.W;else if(h>0)l=l.U;else return l}return l||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(l,c){let h=l.o;if(h===this.h&&(0,o.throwIteratorAccessError)(),this.i===1)return h.u=c,!0;if(h===this.h.U)return this.v(h.B().u,c)>0?(h.u=c,!0):!1;if(h===this.h.W)return this.v(h.L().u,c)<0?(h.u=c,!0):!1;let f=h.L().u;if(this.v(f,c)>=0)return!1;let p=h.B().u;return this.v(p,c)<=0?!1:(h.u=c,!0)}eraseElementByPos(l){if(l<0||l>this.i-1)throw new RangeError;let c=0,h=this;return this.oe(this.Y,function(f){return l===c?(h.V(f),!0):(c+=1,!1)}),this.i}eraseElementByKey(l){if(this.i===0)return!1;let c=this.I(this.Y,l);return c===this.h?!1:(this.V(c),!0)}eraseElementByIterator(l){let c=l.o;c===this.h&&(0,o.throwIteratorAccessError)();let h=c.W===void 0;return l.iteratorType===0?h&&l.next():(!h||c.U===void 0)&&l.next(),this.V(c),l}forEach(l){let c=0;for(let h of this)l(h,c++,this)}getElementByPos(l){if(l<0||l>this.i-1)throw new RangeError;let c,h=0;for(let f of this){if(h===l){c=f;break}h+=1}return c}getHeight(){if(this.i===0)return 0;let l=function(c){return c?Math.max(l(c.U),l(c.W))+1:0};return l(this.Y)}},u=s;e.default=u}),PT=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Ko(),n=Yo(),o=class extends t.ContainerIterator{constructor(u,l,c){super(c),this.o=u,this.h=l,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,n.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,n.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,n.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,n.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let u=this.o,l=this.h.tt;if(u===this.h)return l?l.rt-1:0;let c=0;for(u.U&&(c+=u.U.rt);u!==l;){let h=u.tt;u===h.W&&(c+=1,h.U&&(c+=h.U.rt)),u=h}return c}},s=o;e.default=s}),KH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(NT()),n=s(PT()),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class kT extends n.default{constructor(f,p,y,g){super(f,p,g),this.container=y}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.u}copy(){return new kT(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.default{constructor(h=[],f,p){super(f,p);let y=this;h.forEach(function(g){y.insert(g)})}*K(h){h!==void 0&&(yield*this.K(h.U),yield h.u,yield*this.K(h.W))}begin(){return new u(this.h.U||this.h,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this.h.W||this.h,this.h,this,1)}rEnd(){return new u(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(h,f){return this.M(h,void 0,f)}find(h){let f=this.I(this.Y,h);return new u(f,this.h,this)}lowerBound(h){let f=this.X(this.Y,h);return new u(f,this.h,this)}upperBound(h){let f=this.Z(this.Y,h);return new u(f,this.h,this)}reverseLowerBound(h){let f=this.$(this.Y,h);return new u(f,this.h,this)}reverseUpperBound(h){let f=this.rr(this.Y,h);return new u(f,this.h,this)}union(h){let f=this;return h.forEach(function(p){f.insert(p)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},c=l;e.default=c}),YH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(NT()),n=s(PT()),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class LT extends n.default{constructor(f,p,y,g){super(f,p,g),this.container=y}get pointer(){this.o===this.h&&(0,o.throwIteratorAccessError)();let f=this;return new Proxy([],{get(p,y){if(y==="0")return f.o.u;if(y==="1")return f.o.l},set(p,y,g){if(y!=="1")throw new TypeError("props must be 1");return f.o.l=g,!0}})}copy(){return new LT(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.default{constructor(h=[],f,p){super(f,p);let y=this;h.forEach(function(g){y.setElement(g[0],g[1])})}*K(h){h!==void 0&&(yield*this.K(h.U),yield[h.u,h.l],yield*this.K(h.W))}begin(){return new u(this.h.U||this.h,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this.h.W||this.h,this.h,this,1)}rEnd(){return new u(this.h,this.h,this,1)}front(){if(this.i===0)return;let h=this.h.U;return[h.u,h.l]}back(){if(this.i===0)return;let h=this.h.W;return[h.u,h.l]}lowerBound(h){let f=this.X(this.Y,h);return new u(f,this.h,this)}upperBound(h){let f=this.Z(this.Y,h);return new u(f,this.h,this)}reverseLowerBound(h){let f=this.$(this.Y,h);return new u(f,this.h,this)}reverseUpperBound(h){let f=this.rr(this.Y,h);return new u(f,this.h,this)}setElement(h,f,p){return this.M(h,f,p)}find(h){let f=this.I(this.Y,h);return new u(f,this.h,this)}getElementByKey(h){return this.I(this.Y,h).l}union(h){let f=this;return h.forEach(function(p){f.setElement(p[0],p[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},c=l;e.default=c}),zT=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=t;function t(n){let o=typeof n;return o==="object"&&n!==null||o==="function"}}),$T=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var t=Ko(),n=s(zT()),o=Yo();function s(c){return c&&c.t?c:{default:c}}var u=class extends t.ContainerIterator{constructor(c,h,f){super(f),this.o=c,this.h=h,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this})}};e.HashContainerIterator=u;var l=class extends t.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(c){let{L:h,B:f}=c;h.B=f,f.L=h,c===this.p&&(this.p=f),c===this._&&(this._=h),this.i-=1}M(c,h,f){f===void 0&&(f=(0,n.default)(c));let p;if(f){let y=c[this.HASH_TAG];if(y!==void 0)return this.H[y].l=h,this.i;Object.defineProperty(c,this.HASH_TAG,{value:this.H.length,configurable:!0}),p={u:c,l:h,L:this._,B:this.h},this.H.push(p)}else{let y=this.g[c];if(y)return y.l=h,this.i;p={u:c,l:h,L:this._,B:this.h},this.g[c]=p}return this.i===0?(this.p=p,this.h.B=p):this._.B=p,this._=p,this.h.L=p,++this.i}I(c,h){if(h===void 0&&(h=(0,n.default)(c)),h){let f=c[this.HASH_TAG];return f===void 0?this.h:this.H[f]}else return this.g[c]||this.h}clear(){let c=this.HASH_TAG;this.H.forEach(function(h){delete h.u[c]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(c,h){let f;if(h===void 0&&(h=(0,n.default)(c)),h){let p=c[this.HASH_TAG];if(p===void 0)return!1;delete c[this.HASH_TAG],f=this.H[p],delete this.H[p]}else{if(f=this.g[c],f===void 0)return!1;delete this.g[c]}return this.V(f),!0}eraseElementByIterator(c){let h=c.o;return h===this.h&&(0,o.throwIteratorAccessError)(),this.V(h),c.next()}eraseElementByPos(c){if(c<0||c>this.i-1)throw new RangeError;let h=this.p;for(;c--;)h=h.B;return this.V(h),this.i}};e.HashContainer=l}),VH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=$T(),n=Yo(),o=class qT extends t.HashContainerIterator{constructor(c,h,f,p){super(c,h,p),this.container=f}get pointer(){return this.o===this.h&&(0,n.throwIteratorAccessError)(),this.o.u}copy(){return new qT(this.o,this.h,this.container,this.iteratorType)}},s=class extends t.HashContainer{constructor(l=[]){super();let c=this;l.forEach(function(h){c.insert(h)})}begin(){return new o(this.p,this.h,this)}end(){return new o(this.h,this.h,this)}rBegin(){return new o(this._,this.h,this,1)}rEnd(){return new o(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(l,c){return this.M(l,void 0,c)}getElementByPos(l){if(l<0||l>this.i-1)throw new RangeError;let c=this.p;for(;l--;)c=c.B;return c.u}find(l,c){let h=this.I(l,c);return new o(h,this.h,this)}forEach(l){let c=0,h=this.p;for(;h!==this.h;)l(h.u,c++,this),h=h.B}[Symbol.iterator](){return(function*(){let l=this.p;for(;l!==this.h;)yield l.u,l=l.B}).bind(this)()}},u=s;e.default=u}),WH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=$T(),n=s(zT()),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class HT extends t.HashContainerIterator{constructor(f,p,y,g){super(f,p,g),this.container=y}get pointer(){this.o===this.h&&(0,o.throwIteratorAccessError)();let f=this;return new Proxy([],{get(p,y){if(y==="0")return f.o.u;if(y==="1")return f.o.l},set(p,y,g){if(y!=="1")throw new TypeError("props must be 1");return f.o.l=g,!0}})}copy(){return new HT(this.o,this.h,this.container,this.iteratorType)}},l=class extends t.HashContainer{constructor(h=[]){super();let f=this;h.forEach(function(p){f.setElement(p[0],p[1])})}begin(){return new u(this.p,this.h,this)}end(){return new u(this.h,this.h,this)}rBegin(){return new u(this._,this.h,this,1)}rEnd(){return new u(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(h,f,p){return this.M(h,f,p)}getElementByKey(h,f){if(f===void 0&&(f=(0,n.default)(h)),f){let y=h[this.HASH_TAG];return y!==void 0?this.H[y].l:void 0}let p=this.g[h];return p?p.l:void 0}getElementByPos(h){if(h<0||h>this.i-1)throw new RangeError;let f=this.p;for(;h--;)f=f.B;return[f.u,f.l]}find(h,f){let p=this.I(h,f);return new u(p,this.h,this)}forEach(h){let f=0,p=this.p;for(;p!==this.h;)h([p.u,p.l],f++,this),p=p.B}[Symbol.iterator](){return(function*(){let h=this.p;for(;h!==this.h;)yield[h.u,h.l],h=h.B}).bind(this)()}},c=l;e.default=c}),XH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),Object.defineProperty(e,"Deque",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"HashMap",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"HashSet",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"LinkList",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"OrderedMap",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"OrderedSet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"PriorityQueue",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"Queue",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"Stack",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return s.default}});var t=y(LH()),n=y(zH()),o=y($H()),s=y(qH()),u=y(HH()),l=y(QH()),c=y(KH()),h=y(YH()),f=y(VH()),p=y(WH());function y(g){return g&&g.t?g:{default:g}}}),ZH=qe((e,t)=>{Pe(),Le(),ke();var n=XH().OrderedSet,o=$o()("number-allocator:trace"),s=$o()("number-allocator:error");function u(c,h){this.low=c,this.high=h}u.prototype.equals=function(c){return this.low===c.low&&this.high===c.high},u.prototype.compare=function(c){return this.low<c.low&&this.high<c.low?-1:c.low<this.low&&c.high<this.low?1:0};function l(c,h){if(!(this instanceof l))return new l(c,h);this.min=c,this.max=h,this.ss=new n([],(f,p)=>f.compare(p)),o("Create"),this.clear()}l.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},l.prototype.alloc=function(){if(this.ss.size()===0)return o("alloc():empty"),null;let c=this.ss.begin(),h=c.pointer.low,f=c.pointer.high,p=h;return p+1<=f?this.ss.updateKeyByIterator(c,new u(h+1,f)):this.ss.eraseElementByPos(0),o("alloc():"+p),p},l.prototype.use=function(c){let h=new u(c,c),f=this.ss.lowerBound(h);if(!f.equals(this.ss.end())){let p=f.pointer.low,y=f.pointer.high;return f.pointer.equals(h)?(this.ss.eraseElementByIterator(f),o("use():"+c),!0):p>c?!1:p===c?(this.ss.updateKeyByIterator(f,new u(p+1,y)),o("use():"+c),!0):y===c?(this.ss.updateKeyByIterator(f,new u(p,y-1)),o("use():"+c),!0):(this.ss.updateKeyByIterator(f,new u(c+1,y)),this.ss.insert(new u(p,c-1)),o("use():"+c),!0)}return o("use():failed"),!1},l.prototype.free=function(c){if(c<this.min||c>this.max){s("free():"+c+" is out of range");return}let h=new u(c,c),f=this.ss.upperBound(h);if(f.equals(this.ss.end())){if(f.equals(this.ss.begin())){this.ss.insert(h);return}f.pre();let p=f.pointer.high;f.pointer.high+1===c?this.ss.updateKeyByIterator(f,new u(p,c)):this.ss.insert(h)}else if(f.equals(this.ss.begin()))if(c+1===f.pointer.low){let p=f.pointer.high;this.ss.updateKeyByIterator(f,new u(c,p))}else this.ss.insert(h);else{let p=f.pointer.low,y=f.pointer.high;f.pre();let g=f.pointer.low;f.pointer.high+1===c?c+1===p?(this.ss.eraseElementByIterator(f),this.ss.updateKeyByIterator(f,new u(g,y))):this.ss.updateKeyByIterator(f,new u(g,c)):c+1===p?(this.ss.eraseElementByIterator(f.next()),this.ss.insert(new u(c,y))):this.ss.insert(h)}o("free():"+c)},l.prototype.clear=function(){o("clear()"),this.ss.clear(),this.ss.insert(new u(this.min,this.max))},l.prototype.intervalCount=function(){return this.ss.size()},l.prototype.dump=function(){console.log("length:"+this.ss.size());for(let c of this.ss)console.log(c)},t.exports=l}),QT=qe((e,t)=>{Pe(),Le(),ke();var n=ZH();t.exports.NumberAllocator=n}),JH=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=kH(),n=QT(),o=class{constructor(s){rt(this,"aliasToTopic");rt(this,"topicToAlias");rt(this,"max");rt(this,"numberAllocator");rt(this,"length");s>0&&(this.aliasToTopic=new t.LRUCache({max:s}),this.topicToAlias={},this.numberAllocator=new n.NumberAllocator(1,s),this.max=s,this.length=0)}put(s,u){if(u===0||u>this.max)return!1;let l=this.aliasToTopic.get(u);return l&&delete this.topicToAlias[l],this.aliasToTopic.set(u,s),this.topicToAlias[s]=u,this.numberAllocator.use(u),this.length=this.aliasToTopic.size,!0}getTopicByAlias(s){return this.aliasToTopic.get(s)}getAliasByTopic(s){let u=this.topicToAlias[s];return typeof u<"u"&&this.aliasToTopic.get(u),u}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};e.default=o}),eQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0});var n=zp(),o=t(JH()),s=ll(),u=(l,c)=>{l.log("_handleConnack");let{options:h}=l,f=h.protocolVersion===5?c.reasonCode:c.returnCode;if(clearTimeout(l.connackTimer),delete l.topicAliasSend,c.properties){if(c.properties.topicAliasMaximum){if(c.properties.topicAliasMaximum>65535){l.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}c.properties.topicAliasMaximum>0&&(l.topicAliasSend=new o.default(c.properties.topicAliasMaximum))}c.properties.serverKeepAlive&&h.keepalive&&(h.keepalive=c.properties.serverKeepAlive),c.properties.maximumPacketSize&&(h.properties||(h.properties={}),h.properties.maximumPacketSize=c.properties.maximumPacketSize)}if(f===0)l.reconnecting=!1,l._onConnect(c);else if(f>0){let p=new s.ErrorWithReasonCode(`Connection refused: ${n.ReasonCodes[f]}`,f);l.emit("error",p),l.options.reconnectOnConnackError&&l._cleanUp(!0)}};e.default=u}),tQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(n,o,s)=>{n.log("handling pubrel packet");let u=typeof s<"u"?s:n.noop,{messageId:l}=o,c={cmd:"pubcomp",messageId:l};n.incomingStore.get(o,(h,f)=>{h?n._sendPacket(c,u):(n.emit("message",f.topic,f.payload,f),n.handleMessage(f,p=>{if(p)return u(p);n.incomingStore.del(f,n.noop),n._sendPacket(c,u)}))})};e.default=t}),rQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0});var n=t(DH()),o=t(PH()),s=t(eQ()),u=t(zp()),l=t(tQ()),c=(h,f,p)=>{let{options:y}=h;if(y.protocolVersion===5&&y.properties&&y.properties.maximumPacketSize&&y.properties.maximumPacketSize<f.length)return h.emit("error",new Error(`exceeding packets size ${f.cmd}`)),h.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),h;switch(h.log("_handlePacket :: emitting packetreceive"),h.emit("packetreceive",f),f.cmd){case"publish":(0,n.default)(h,f,p);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":h.reschedulePing(),(0,u.default)(h,f),p();break;case"pubrel":h.reschedulePing(),(0,l.default)(h,f,p);break;case"connack":(0,s.default)(h,f),p();break;case"auth":h.reschedulePing(),(0,o.default)(h,f),p();break;case"pingresp":h.log("_handlePacket :: received pingresp"),h.reschedulePing(!0),p();break;case"disconnect":h.emit("disconnect",f),p();break;default:h.log("_handlePacket :: unknown command"),p();break}};e.default=c}),GT=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=class{constructor(){rt(this,"nextId");this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let n=this.nextId++;return this.nextId===65536&&(this.nextId=1),n}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(n){return!0}deallocate(n){}clear(){}};e.default=t}),nQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=class{constructor(n){rt(this,"aliasToTopic");rt(this,"max");rt(this,"length");this.aliasToTopic={},this.max=n}put(n,o){return o===0||o>this.max?!1:(this.aliasToTopic[o]=n,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(n){return this.aliasToTopic[n]}clear(){this.aliasToTopic={}}};e.default=t}),iQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var n=t((Na(),Yt(Ls))),o=ll(),s=class{};e.TypedEventEmitter=s,(0,o.applyMixin)(s,n.default)}),$p=qe((e,t)=>{Pe(),Le(),ke();function n(o){"@babel/helpers - typeof";return t.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),oQ=qe((e,t)=>{Pe(),Le(),ke();var n=$p().default;function o(s,u){if(n(s)!="object"||!s)return s;var l=s[Symbol.toPrimitive];if(l!==void 0){var c=l.call(s,u||"default");if(n(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(s)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),sQ=qe((e,t)=>{Pe(),Le(),ke();var n=$p().default,o=oQ();function s(u){var l=o(u,"string");return n(l)=="symbol"?l:l+""}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),aQ=qe((e,t)=>{Pe(),Le(),ke();var n=sQ();function o(s,u,l){return(u=n(u))in s?Object.defineProperty(s,u,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[u]=l,s}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),uQ=qe((e,t)=>{Pe(),Le(),ke();function n(o){if(Array.isArray(o))return o}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),lQ=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){var u=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(u!=null){var l,c,h,f,p=[],y=!0,g=!1;try{if(h=(u=u.call(o)).next,s===0){if(Object(u)!==u)return;y=!1}else for(;!(y=(l=h.call(u)).done)&&(p.push(l.value),p.length!==s);y=!0);}catch(b){g=!0,c=b}finally{try{if(!y&&u.return!=null&&(f=u.return(),Object(f)!==f))return}finally{if(g)throw c}}return p}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),cQ=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){(s==null||s>o.length)&&(s=o.length);for(var u=0,l=Array(s);u<s;u++)l[u]=o[u];return l}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),fQ=qe((e,t)=>{Pe(),Le(),ke();var n=cQ();function o(s,u){if(s){if(typeof s=="string")return n(s,u);var l={}.toString.call(s).slice(8,-1);return l==="Object"&&s.constructor&&(l=s.constructor.name),l==="Map"||l==="Set"?Array.from(s):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?n(s,u):void 0}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),hQ=qe((e,t)=>{Pe(),Le(),ke();function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
144
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),dQ=qe((e,t)=>{Pe(),Le(),ke();var n=uQ(),o=lQ(),s=fQ(),u=hQ();function l(c,h){return n(c)||o(c,h)||s(c,h)||u()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports}),KT=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.fastUniqueNumbers={}))})(e,function(n){var o=function(b){return function(w){var B=b(w);return w.add(B),B}},s=function(b){return function(w,B){return b.set(w,B),B}},u=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,l=536870912,c=l*2,h=function(b,w){return function(B){var _=w.get(B),M=_===void 0?B.size:_<c?_+1:0;if(!B.has(M))return b(B,M);if(B.size<l){for(;B.has(M);)M=Math.floor(Math.random()*c);return b(B,M)}if(B.size>u)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;B.has(M);)M=Math.floor(Math.random()*u);return b(B,M)}},f=new WeakMap,p=s(f),y=h(p,f),g=o(y);n.addUniqueNumber=g,n.generateUniqueNumber=y})}),pQ=qe((e,t)=>{Pe(),Le(),ke();function n(s,u,l,c,h,f,p){try{var y=s[f](p),g=y.value}catch(b){return void l(b)}y.done?u(g):Promise.resolve(g).then(c,h)}function o(s){return function(){var u=this,l=arguments;return new Promise(function(c,h){var f=s.apply(u,l);function p(g){n(f,c,h,p,y,"next",g)}function y(g){n(f,c,h,p,y,"throw",g)}p(void 0)})}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),YT=qe((e,t)=>{Pe(),Le(),ke();function n(o,s){this.v=o,this.k=s}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),VT=qe((e,t)=>{Pe(),Le(),ke();function n(o,s,u,l){var c=Object.defineProperty;try{c({},"",{})}catch{c=0}t.exports=n=function(h,f,p,y){function g(b,w){n(h,b,function(B){return this._invoke(b,w,B)})}f?c?c(h,f,{value:p,enumerable:!y,configurable:!y,writable:!y}):h[f]=p:(g("next",0),g("throw",1),g("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,n(o,s,u,l)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),WT=qe((e,t)=>{Pe(),Le(),ke();var n=VT();function o(){var s,u,l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",h=l.toStringTag||"@@toStringTag";function f(M,A,I,R){var T=A&&A.prototype instanceof y?A:y,$=Object.create(T.prototype);return n($,"_invoke",(function(k,L,U){var j,Q,P,re=0,le=U||[],oe=!1,X={p:0,n:0,v:s,a:te,f:te.bind(s,4),d:function(pe,ue){return j=pe,Q=0,P=s,X.n=ue,p}};function te(pe,ue){for(Q=pe,P=ue,u=0;!oe&&re&&!J&&u<le.length;u++){var J,G=le[u],H=X.p,K=G[2];pe>3?(J=K===ue)&&(P=G[(Q=G[4])?5:(Q=3,3)],G[4]=G[5]=s):G[0]<=H&&((J=pe<2&&H<G[1])?(Q=0,X.v=ue,X.n=G[1]):H<K&&(J=pe<3||G[0]>ue||ue>K)&&(G[4]=pe,G[5]=ue,X.n=K,Q=0))}if(J||pe>1)return p;throw oe=!0,ue}return function(pe,ue,J){if(re>1)throw TypeError("Generator is already running");for(oe&&ue===1&&te(ue,J),Q=ue,P=J;(u=Q<2?s:P)||!oe;){j||(Q?Q<3?(Q>1&&(X.n=-1),te(Q,P)):X.n=P:X.v=P);try{if(re=2,j){if(Q||(pe="next"),u=j[pe]){if(!(u=u.call(j,P)))throw TypeError("iterator result is not an object");if(!u.done)return u;P=u.value,Q<2&&(Q=0)}else Q===1&&(u=j.return)&&u.call(j),Q<2&&(P=TypeError("The iterator does not provide a '"+pe+"' method"),Q=1);j=s}else if((u=(oe=X.n<0)?P:k.call(L,X))!==p)break}catch(G){j=s,Q=1,P=G}finally{re=1}}return{value:u,done:oe}}})(M,I,R),!0),$}var p={};function y(){}function g(){}function b(){}u=Object.getPrototypeOf;var w=[][c]?u(u([][c]())):(n(u={},c,function(){return this}),u),B=b.prototype=y.prototype=Object.create(w);function _(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,b):(M.__proto__=b,n(M,h,"GeneratorFunction")),M.prototype=Object.create(B),M}return g.prototype=b,n(B,"constructor",b),n(b,"constructor",g),g.displayName="GeneratorFunction",n(b,h,"GeneratorFunction"),n(B),n(B,h,"Generator"),n(B,c,function(){return this}),n(B,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:f,m:_}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),XT=qe((e,t)=>{Pe(),Le(),ke();var n=YT(),o=VT();function s(u,l){function c(f,p,y,g){try{var b=u[f](p),w=b.value;return w instanceof n?l.resolve(w.v).then(function(B){c("next",B,y,g)},function(B){c("throw",B,y,g)}):l.resolve(w).then(function(B){b.value=B,y(b)},function(B){return c("throw",B,y,g)})}catch(B){g(B)}}var h;this.next||(o(s.prototype),o(s.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(f,p,y){function g(){return new l(function(b,w){c(f,y,b,w)})}return h=h?h.then(g,g):g()},!0)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),ZT=qe((e,t)=>{Pe(),Le(),ke();var n=WT(),o=XT();function s(u,l,c,h,f){return new o(n().w(u,l,c,h),f||Promise)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),yQ=qe((e,t)=>{Pe(),Le(),ke();var n=ZT();function o(s,u,l,c,h){var f=n(s,u,l,c,h);return f.next().then(function(p){return p.done?p.value:f.next()})}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),gQ=qe((e,t)=>{Pe(),Le(),ke();function n(o){var s=Object(o),u=[];for(var l in s)u.unshift(l);return function c(){for(;u.length;)if((l=u.pop())in s)return c.value=l,c.done=!1,c;return c.done=!0,c}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}),mQ=qe((e,t)=>{Pe(),Le(),ke();var n=$p().default;function o(s){if(s!=null){var u=s[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],l=0;if(u)return u.call(s);if(typeof s.next=="function")return s;if(!isNaN(s.length))return{next:function(){return s&&l>=s.length&&(s=void 0),{value:s&&s[l++],done:!s}}}}throw new TypeError(n(s)+" is not iterable")}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),bQ=qe((e,t)=>{Pe(),Le(),ke();var n=YT(),o=WT(),s=yQ(),u=ZT(),l=XT(),c=gQ(),h=mQ();function f(){var p=o(),y=p.m(f),g=(Object.getPrototypeOf?Object.getPrototypeOf(y):y.__proto__).constructor;function b(_){var M=typeof _=="function"&&_.constructor;return!!M&&(M===g||(M.displayName||M.name)==="GeneratorFunction")}var w={throw:1,return:2,break:3,continue:3};function B(_){var M,A;return function(I){M||(M={stop:function(){return A(I.a,2)},catch:function(){return I.v},abrupt:function(R,T){return A(I.a,w[R],T)},delegateYield:function(R,T,$){return M.resultName=T,A(I.d,h(R),$)},finish:function(R){return A(I.f,R)}},A=function(R,T,$){I.p=M.prev,I.n=M.next;try{return R(T,$)}finally{M.next=I.n}}),M.resultName&&(M[M.resultName]=I.v,M.resultName=void 0),M.sent=I.v,M.next=I.n;try{return _.call(this,M)}finally{I.p=M.prev,I.n=M.next}}}return(t.exports=f=function(){return{wrap:function(_,M,A,I){return p.w(B(_),M,A,I&&I.reverse())},isGeneratorFunction:b,mark:p.m,awrap:function(_,M){return new n(_,M)},AsyncIterator:l,async:function(_,M,A,I,R){return(b(M)?u:s)(B(_),M,A,I,R)},keys:c,values:h}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=f,t.exports.__esModule=!0,t.exports.default=t.exports}),AQ=qe((e,t)=>{Pe(),Le(),ke();var n=bQ()();t.exports=n;try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}),vQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,aQ(),dQ(),KT(),pQ(),AQ()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/slicedToArray","fast-unique-numbers","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.brokerFactory={},n._defineProperty,n._slicedToArray,n.fastUniqueNumbers,n._asyncToGenerator,n._regeneratorRuntime))})(e,function(n,o,s,u,l,c){var h=function(A){return typeof A.start=="function"},f=new WeakMap;function p(A,I){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);I&&(T=T.filter(function($){return Object.getOwnPropertyDescriptor(A,$).enumerable})),R.push.apply(R,T)}return R}function y(A){for(var I=1;I<arguments.length;I++){var R=arguments[I]!=null?arguments[I]:{};I%2?p(Object(R),!0).forEach(function(T){o(A,T,R[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(R)):p(Object(R)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(R,T))})}return A}var g=function(A){return y(y({},A),{},{connect:function(I){var R=I.call;return l(c.mark(function T(){var $,k,L,U;return c.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return $=new MessageChannel,k=$.port1,L=$.port2,j.next=1,R("connect",{port:k},[k]);case 1:return U=j.sent,f.set(L,U),j.abrupt("return",L);case 2:case"end":return j.stop()}},T)}))},disconnect:function(I){var R=I.call;return(function(){var T=l(c.mark(function $(k){var L;return c.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(L=f.get(k),L!==void 0){U.next=1;break}throw new Error("The given port is not connected.");case 1:return U.next=2,R("disconnect",{portId:L});case 2:case"end":return U.stop()}},$)}));return function($){return T.apply(this,arguments)}})()},isSupported:function(I){var R=I.call;return function(){return R("isSupported")}}})};function b(A,I){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);I&&(T=T.filter(function($){return Object.getOwnPropertyDescriptor(A,$).enumerable})),R.push.apply(R,T)}return R}function w(A){for(var I=1;I<arguments.length;I++){var R=arguments[I]!=null?arguments[I]:{};I%2?b(Object(R),!0).forEach(function(T){o(A,T,R[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(R)):b(Object(R)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(R,T))})}return A}var B=new WeakMap,_=function(A){if(B.has(A))return B.get(A);var I=new Map;return B.set(A,I),I},M=function(A){var I=g(A);return function(R){var T=_(R);R.addEventListener("message",function(le){var oe=le.data,X=oe.id;if(X!==null&&T.has(X)){var te=T.get(X),pe=te.reject,ue=te.resolve;T.delete(X),oe.error===void 0?ue(oe.result):pe(new Error(oe.error.message))}}),h(R)&&R.start();for(var $=function(le){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return new Promise(function(te,pe){var ue=u.generateUniqueNumber(T);T.set(ue,{reject:pe,resolve:te}),oe===null?R.postMessage({id:ue,method:le},X):R.postMessage({id:ue,method:le,params:oe},X)})},k=function(le,oe){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];R.postMessage({id:null,method:le,params:oe},X)},L={},U=0,j=Object.entries(I);U<j.length;U++){var Q=s(j[U],2),P=Q[0],re=Q[1];L=w(w({},L),{},o({},P,re({call:$,notify:k})))}return w({},L)}};n.createBroker=M})}),wQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,$p(),vQ(),KT()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/typeof","broker-factory","fast-unique-numbers"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.workerTimersBroker={},n._typeof,n.brokerFactory,n.fastUniqueNumbers))})(e,function(n,o,s,u){var l=new Map([[0,null]]),c=new Map([[0,null]]),h=s.createBroker({clearInterval:function(p){var y=p.call;return function(g){o(l.get(g))==="symbol"&&(l.set(g,null),y("clear",{timerId:g,timerType:"interval"}).then(function(){l.delete(g)}))}},clearTimeout:function(p){var y=p.call;return function(g){o(c.get(g))==="symbol"&&(c.set(g,null),y("clear",{timerId:g,timerType:"timeout"}).then(function(){c.delete(g)}))}},setInterval:function(p){var y=p.call;return function(g){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=arguments.length,B=new Array(w>2?w-2:0),_=2;_<w;_++)B[_-2]=arguments[_];var M=Symbol(),A=u.generateUniqueNumber(l);l.set(A,M);var I=function(){return y("set",{delay:b,now:performance.timeOrigin+performance.now(),timerId:A,timerType:"interval"}).then(function(){var R=l.get(A);if(R===void 0)throw new Error("The timer is in an undefined state.");R===M&&(g.apply(void 0,B),l.get(A)===M&&I())})};return I(),A}},setTimeout:function(p){var y=p.call;return function(g){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=arguments.length,B=new Array(w>2?w-2:0),_=2;_<w;_++)B[_-2]=arguments[_];var M=Symbol(),A=u.generateUniqueNumber(c);return c.set(A,M),y("set",{delay:b,now:performance.timeOrigin+performance.now(),timerId:A,timerType:"timeout"}).then(function(){var I=c.get(A);if(I===void 0)throw new Error("The timer is in an undefined state.");I===M&&(c.delete(A),g.apply(void 0,B))}),A}}}),f=function(p){var y=new Worker(p);return h(y)};n.load=f,n.wrap=h})}),xQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,wQ()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.workerTimers={},n.workerTimersBroker))})(e,function(n,o){var s=function(y,g){var b=null;return function(){if(b!==null)return b;var w=new Blob([g],{type:"application/javascript; charset=utf-8"}),B=URL.createObjectURL(w);return b=y(B),setTimeout(function(){return URL.revokeObjectURL(B)}),b}},u=`(()=>{var e={45:(e,t,r)=>{var n=r(738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},122:(e,t,r)=>{var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,a,i=[],s=!0,c=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},293:e=>{function t(e,t,r,n,o,u,a){try{var i=e[u](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,u){var a=e.apply(r,n);function i(e){t(a,o,u,i,s,"next",e)}function s(e){t(a,o,u,i,s,"throw",e)}i(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},389:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,u=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<u?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*u);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,s=r(i),c=a(s,i),f=t(c);e.addUniqueNumber=f,e.generateUniqueNumber=c}(t)},472:function(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return function(r){var o=t.get(r);if(void 0===o)return Promise.resolve(!1);var u=n(o,2),a=u[0],i=u[1];return e(a),t.delete(r),i(!1),Promise.resolve(!0)}},u=function(e,t){var r=function(n,o,u,a){var i=n-e.now();i>0?o.set(a,[t(r,i,n,o,u,a),u]):(o.delete(a),u(!0))};return r},a=function(e,t,r,n){return function(o,u,a){var i=o+u-t.timeOrigin,s=i-t.now();return new Promise((function(t){e.set(a,[r(n,s,i,e,t,a),t])}))}},i=new Map,s=o(globalThis.clearTimeout,i),c=new Map,f=o(globalThis.clearTimeout,c),l=u(performance,globalThis.setTimeout),p=a(i,performance,globalThis.setTimeout,l),d=a(c,performance,globalThis.setTimeout,l);r.createWorker(self,{clear:function(){var r=e(t.mark((function e(r){var n,o,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.timerId,o=r.timerType,e.next=1,"interval"===o?s(n):f(n);case 1:return u=e.sent,e.abrupt("return",{result:u});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}(),set:function(){var r=e(t.mark((function e(r){var n,o,u,a,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.delay,o=r.now,u=r.timerId,a=r.timerType,e.next=1,("interval"===a?p:d)(n,o,u);case 1:return i=e.sent,e.abrupt("return",{result:i});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},546:e=>{function t(r,n,o,u){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){if(r)a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n;else{var u=function(r,n){t(e,r,(function(e){return this._invoke(r,n,e)}))};u("next",0),u("throw",1),u("return",2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,u)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var n=r(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},623:function(e,t,r){!function(e,t,r,n,o){"use strict";var u={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(e,t){return Object.assign(new Error(e),{status:t})},i=function(e){return a('The requested method called "'.concat(e,'" is not supported.'),u.METHOD_NOT_FOUND)},s=function(e){return a('The handler of the method called "'.concat(e,'" returned no required result.'),u.INTERNAL_ERROR)},c=function(e){return a('The handler of the method called "'.concat(e,'" returned an unexpected result.'),u.INTERNAL_ERROR)},f=function(e){return a('The specified parameter called "portId" with the given value "'.concat(e,'" does not identify a port connected to this worker.'),u.INVALID_PARAMS)},l=function(e,n){return function(){var o=t(r.mark((function t(o){var u,a,f,l,p,d,v,x,y,b,h,m,_,g,w;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=o.data,a=u.id,f=u.method,l=u.params,p=n[f],t.prev=1,void 0!==p){t.next=2;break}throw i(f);case 2:if(void 0!==(d=void 0===l?p():p(l))){t.next=3;break}throw s(f);case 3:if(!(d instanceof Promise)){t.next=5;break}return t.next=4,d;case 4:g=t.sent,t.next=6;break;case 5:g=d;case 6:if(v=g,null!==a){t.next=8;break}if(void 0===v.result){t.next=7;break}throw c(f);case 7:t.next=10;break;case 8:if(void 0!==v.result){t.next=9;break}throw c(f);case 9:x=v.result,y=v.transferables,b=void 0===y?[]:y,e.postMessage({id:a,result:x},b);case 10:t.next=12;break;case 11:t.prev=11,w=t.catch(1),h=w.message,m=w.status,_=void 0===m?-32603:m,e.postMessage({error:{code:_,message:h},id:a});case 12:case"end":return t.stop()}}),t,null,[[1,11]])})));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=new Map,y=function(e,n,u){return v(v({},n),{},{connect:function(t){var r=t.port;r.start();var u=e(r,n),a=o.generateUniqueNumber(x);return x.set(a,(function(){u(),r.close(),x.delete(a)})),{result:a}},disconnect:function(e){var t=e.portId,r=x.get(t);if(void 0===r)throw f(t);return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,p();case 1:if(!e.sent){e.next=5;break}if(!((t=u())instanceof Promise)){e.next=3;break}return e.next=2,t;case 2:o=e.sent,e.next=4;break;case 3:o=t;case 4:return n=o,e.abrupt("return",{result:n});case 5:return e.abrupt("return",{result:!1});case 6:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},b=function(e,t){var r=y(b,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(e,r);return e.addEventListener("message",n),function(){return e.removeEventListener("message",n)}};e.createWorker=b,e.isSupported=p}(t,r(293),r(756),r(693),r(389))},633:(e,t,r)=>{var n=r(172),o=r(993),u=r(869),a=r(887),i=r(791),s=r(373),c=r(579);function f(){"use strict";var t=o(),r=t.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,u){return t.resultName=o,r(n.d,c(e),u)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=f=function(){return{wrap:function(e,r,n,o){return t.w(v(e),r,n,o&&o.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:i,async:function(e,t,r,n,o){return(p(t)?a:u)(v(e),t,r,n,o)},keys:s,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},693:(e,t,r)=>{var n=r(736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},715:(e,t,r)=>{var n=r(987),o=r(156),u=r(122),a=r(752);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var n=r(738).default,o=r(45);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},791:(e,t,r)=>{var n=r(172),o=r(546);e.exports=function e(t,r){function u(e,o,a,i){try{var s=t[e](o),c=s.value;return c instanceof n?r.resolve(c.v).then((function(e){u("next",e,a,i)}),(function(e){u("throw",e,a,i)})):r.resolve(c).then((function(e){s.value=e,a(s)}),(function(e){return u("throw",e,a,i)}))}catch(e){i(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),o(this,"_invoke",(function(e,t,n){function o(){return new r((function(t,r){u(e,n,t,r)}))}return a=a?a.then(o,o):o()}),!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,r)=>{var n=r(887);e.exports=function(e,t,r,o,u){var a=n(e,t,r,o,u);return a.next().then((function(e){return e.done?e.value:a.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,r)=>{var n=r(993),o=r(791);e.exports=function(e,t,r,u,a){return new o(n().w(e,t,r,u),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,r)=>{var n=r(546);function o(){var t,r,u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",i=u.toStringTag||"@@toStringTag";function s(e,o,u,a){var i=o&&o.prototype instanceof f?o:f,s=Object.create(i.prototype);return n(s,"_invoke",function(e,n,o){var u,a,i,s=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return u=e,a=0,i=t,p.n=r,c}};function d(e,n){for(a=e,i=n,r=0;!l&&s&&!o&&r<f.length;r++){var o,u=f[r],d=p.p,v=u[2];e>3?(o=v===n)&&(i=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=t):u[0]<=d&&((o=e<2&&d<u[1])?(a=0,p.v=n,p.n=u[1]):d<v&&(o=e<3||u[0]>n||n>v)&&(u[4]=e,u[5]=n,p.n=v,a=0))}if(o||e>1)return c;throw l=!0,n}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),a=f,i=v;(r=a<2?t:i)||!l;){u||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(s=2,u){if(a||(o="next"),r=u[o]){if(!(r=r.call(u,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,a<2&&(a=0)}else 1===a&&(r=u.return)&&r.call(u),a<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=t}else if((r=(l=p.n<0)?i:e.call(n,p))!==c)break}catch(e){u=t,a=1,i=e}finally{s=1}}return{value:r,done:l}}}(e,u,a),!0),s}var c={};function f(){}function l(){}function p(){}r=Object.getPrototypeOf;var d=[][a]?r(r([][a]())):(n(r={},a,(function(){return this})),r),v=p.prototype=f.prototype=Object.create(d);function x(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=p,n(v,"constructor",p),n(p,"constructor",l),l.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,a,(function(){return this})),n(v,"toString",(function(){return"[object Generator]"})),(e.exports=o=function(){return{w:s,m:x}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n].call(u.exports,u,u.exports,r),u.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,l=s(o.load,u),c=function(y){return l().clearInterval(y)},h=function(y){return l().clearTimeout(y)},f=function(){var y;return(y=l()).setInterval.apply(y,arguments)},p=function(){var y;return(y=l()).setTimeout.apply(y,arguments)};n.clearInterval=c,n.clearTimeout=h,n.setInterval=f,n.setTimeout=p})}),qp=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.isReactNativeBrowser=e.isWebWorker=void 0;var t=()=>{var u;return typeof window<"u"?typeof navigator<"u"&&((u=navigator.userAgent)==null?void 0:u.toLowerCase().indexOf(" electron/"))>-1&&(Nt!=null&&Nt.versions)?!Object.prototype.hasOwnProperty.call(Nt.versions,"electron"):typeof window.document<"u":!1},n=()=>{var u,l;return!!(typeof self=="object"&&((l=(u=self==null?void 0:self.constructor)==null?void 0:u.name)!=null&&l.includes("WorkerGlobalScope"))&&typeof Deno>"u")},o=()=>typeof navigator<"u"&&navigator.product==="ReactNative",s=t()||n()||o();e.isWebWorker=n(),e.isReactNativeBrowser=o(),e.default=s}),EQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(f,p,y,g){g===void 0&&(g=y);var b=Object.getOwnPropertyDescriptor(p,y);(!b||("get"in b?!p.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return p[y]}}),Object.defineProperty(f,g,b)}:function(f,p,y,g){g===void 0&&(g=y),f[g]=p[y]}),n=e&&e.__setModuleDefault||(Object.create?function(f,p){Object.defineProperty(f,"default",{enumerable:!0,value:p})}:function(f,p){f.default=p}),o=e&&e.__importStar||(function(){var f=function(p){return f=Object.getOwnPropertyNames||function(y){var g=[];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[g.length]=b);return g},f(p)};return function(p){if(p&&p.__esModule)return p;var y={};if(p!=null)for(var g=f(p),b=0;b<g.length;b++)g[b]!=="default"&&t(y,p,g[b]);return n(y,p),y}})();Object.defineProperty(e,"__esModule",{value:!0});var s=xQ(),u=o(qp()),l={set:s.setInterval,clear:s.clearInterval},c={set:(f,p)=>setInterval(f,p),clear:f=>clearInterval(f)},h=f=>{switch(f){case"native":return c;case"worker":return l;case"auto":default:return u.default&&!u.isWebWorker&&!u.isReactNativeBrowser?l:c}};e.default=h}),JT=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var n=t(EQ()),o=class{constructor(s,u){rt(this,"_keepalive");rt(this,"timerId");rt(this,"timer");rt(this,"destroyed",!1);rt(this,"counter");rt(this,"client");rt(this,"_keepaliveTimeoutTimestamp");rt(this,"_intervalEvery");this.client=s,this.timer=typeof u=="object"&&"set"in u&&"clear"in u?u:(0,n.default)(u),this.setKeepalive(s.options.keepalive)}get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(s){if(s*=1e3,isNaN(s)||s<=0||s>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${s}`);this._keepalive=s,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${s}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let s=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+s,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};e.default=o}),iA=qe(e=>{var T;Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function($,k,L,U){U===void 0&&(U=L);var j=Object.getOwnPropertyDescriptor(k,L);(!j||("get"in j?!k.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return k[L]}}),Object.defineProperty($,U,j)}:function($,k,L,U){U===void 0&&(U=L),$[U]=k[L]}),n=e&&e.__setModuleDefault||(Object.create?function($,k){Object.defineProperty($,"default",{enumerable:!0,value:k})}:function($,k){$.default=k}),o=e&&e.__importStar||(function(){var $=function(k){return $=Object.getOwnPropertyNames||function(L){var U=[];for(var j in L)Object.prototype.hasOwnProperty.call(L,j)&&(U[U.length]=j);return U},$(k)};return function(k){if(k&&k.__esModule)return k;var L={};if(k!=null)for(var U=$(k),j=0;j<U.length;j++)U[j]!=="default"&&t(L,k,U[j]);return n(L,k),L}})(),s=e&&e.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(RH()),l=ka(),c=s(UH()),h=s($o()),f=o(jH()),p=s(OT()),y=s(rQ()),g=s(GT()),b=s(nQ()),w=ll(),B=iQ(),_=s(JT()),M=o(qp()),A=globalThis.setImmediate||((...$)=>{let k=$.shift();(0,w.nextTick)(()=>{k(...$)})}),I={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},R=(T=class extends B.TypedEventEmitter{constructor(L,U){super();rt(this,"connected");rt(this,"disconnecting");rt(this,"disconnected");rt(this,"reconnecting");rt(this,"incomingStore");rt(this,"outgoingStore");rt(this,"options");rt(this,"queueQoSZero");rt(this,"_reconnectCount");rt(this,"log");rt(this,"messageIdProvider");rt(this,"outgoing");rt(this,"messageIdToTopic");rt(this,"noop");rt(this,"keepaliveManager");rt(this,"stream");rt(this,"queue");rt(this,"streamBuilder");rt(this,"_resubscribeTopics");rt(this,"connackTimer");rt(this,"reconnectTimer");rt(this,"_storeProcessing");rt(this,"_packetIdsDuringStoreProcessing");rt(this,"_storeProcessingQueue");rt(this,"_firstConnection");rt(this,"topicAliasRecv");rt(this,"topicAliasSend");rt(this,"_deferredReconnect");rt(this,"connackPacket");this.options=U||{};for(let j in I)typeof this.options[j]>"u"?this.options[j]=I[j]:this.options[j]=U[j];this.log=this.options.log||(0,h.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",T.VERSION),M.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",M.default?"browser":"node"),this.log("MqttClient :: options.protocol",U.protocol),this.log("MqttClient :: options.protocolVersion",U.protocolVersion),this.log("MqttClient :: options.username",U.username),this.log("MqttClient :: options.keepalive",U.keepalive),this.log("MqttClient :: options.reconnectPeriod",U.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",U.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",U.properties?U.properties.topicAliasMaximum:void 0),this.options.clientId=typeof U.clientId=="string"?U.clientId:T.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=U.protocolVersion===5&&U.customHandleAcks?U.customHandleAcks:(...j)=>{j[3](null,0)},this.options.writeCache||(u.default.writeToStream.cacheNumbers=!1),this.streamBuilder=L,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new g.default:this.options.messageIdProvider,this.outgoingStore=U.outgoingStore||new p.default,this.incomingStore=U.incomingStore||new p.default,this.queueQoSZero=U.queueQoSZero===void 0?!0:U.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,U.properties&&U.properties.topicAliasMaximum>0&&(U.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new b.default(U.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:j}=this,Q=()=>{let P=j.shift();this.log("deliver :: entry %o",P);let re=null;if(!P){this._resubscribe();return}re=P.packet,this.log("deliver :: call _sendPacket for %o",re);let le=!0;re.messageId&&re.messageId!==0&&(this.messageIdProvider.register(re.messageId)||(le=!1)),le?this._sendPacket(re,oe=>{P.cb&&P.cb(oe),Q()}):(this.log("messageId: %d has already used. The message is skipped and removed.",re.messageId),Q())};this.log("connect :: sending queued packets"),Q()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}handleAuth(L,U){U()}handleMessage(L,U){U()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){var X;let L=new l.Writable,U=u.default.parser(this.options),j=null,Q=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),U.on("packet",te=>{this.log("parser :: on packet push to packets array."),Q.push(te)});let P=()=>{this.log("work :: getting next packet in queue");let te=Q.shift();if(te)this.log("work :: packet pulled from queue"),(0,y.default)(this,te,re);else{this.log("work :: no packets in queue");let pe=j;j=null,this.log("work :: done flag is %s",!!pe),pe&&pe()}},re=()=>{if(Q.length)(0,w.nextTick)(P);else{let te=j;j=null,te()}};L._write=(te,pe,ue)=>{j=ue,this.log("writable stream :: parsing buffer"),U.parse(te),P()};let le=te=>{this.log("streamErrorHandler :: error",te.message),te.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",te)):this.noop(te)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(L),this.stream.on("error",le),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let oe={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(oe.will={...this.options.will,payload:(X=this.options.will)==null?void 0:X.payload}),this.topicAliasRecv&&(oe.properties||(oe.properties={}),this.topicAliasRecv&&(oe.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(oe),U.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let te={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(te)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(L,U,j,Q){this.log("publish :: message `%s` to topic `%s`",U,L);let{options:P}=this;typeof j=="function"&&(Q=j,j=null),j=j||{},j={qos:0,retain:!1,dup:!1,...j};let{qos:re,retain:le,dup:oe,properties:X,cbStorePut:te}=j;if(this._checkDisconnecting(Q))return this;let pe=()=>{let ue=0;if((re===1||re===2)&&(ue=this._nextId(),ue===null))return this.log("No messageId left"),!1;let J={cmd:"publish",topic:L,payload:U,qos:re,retain:le,messageId:ue,dup:oe};switch(P.protocolVersion===5&&(J.properties=X),this.log("publish :: qos",re),re){case 1:case 2:this.outgoing[J.messageId]={volatile:!1,cb:Q||this.noop},this.log("MqttClient:publish: packet cmd: %s",J.cmd),this._sendPacket(J,void 0,te);break;default:this.log("MqttClient:publish: packet cmd: %s",J.cmd),this._sendPacket(J,Q,te);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!pe())&&this._storeProcessingQueue.push({invoke:pe,cbStorePut:j.cbStorePut,callback:Q}),this}publishAsync(L,U,j){return new Promise((Q,P)=>{this.publish(L,U,j,(re,le)=>{re?P(re):Q(le)})})}subscribe(L,U,j){let Q=this.options.protocolVersion;typeof U=="function"&&(j=U),j=j||this.noop;let P=!1,re=[];typeof L=="string"?(L=[L],re=L):Array.isArray(L)?re=L:typeof L=="object"&&(P=L.resubscribe,delete L.resubscribe,re=Object.keys(L));let le=f.validateTopics(re);if(le!==null)return A(j,new Error(`Invalid topic ${le}`)),this;if(this._checkDisconnecting(j))return this.log("subscribe: discconecting true"),this;let oe={qos:0};Q===5&&(oe.nl=!1,oe.rap=!1,oe.rh=0),U={...oe,...U};let{properties:X}=U,te=[],pe=(G,H)=>{if(H=H||U,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,G)||this._resubscribeTopics[G].qos<H.qos||P){let K={topic:G,qos:H.qos};Q===5&&(K.nl=H.nl,K.rap=H.rap,K.rh=H.rh,K.properties=X),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",K.topic,K.qos),te.push(K)}};if(Array.isArray(L)?L.forEach(G=>{this.log("subscribe: array topic %s",G),pe(G)}):Object.keys(L).forEach(G=>{this.log("subscribe: object topic %s, %o",G,L[G]),pe(G,L[G])}),!te.length)return j(null,[]),this;let ue=(G,H)=>{let K={cmd:"subscribe",subscriptions:G,messageId:H};if(X&&(K.properties=X),this.options.resubscribe){this.log("subscribe :: resubscribe true");let z=[];G.forEach(fe=>{if(this.options.reconnectPeriod>0){let ae={qos:fe.qos};Q===5&&(ae.nl=fe.nl||!1,ae.rap=fe.rap||!1,ae.rh=fe.rh||0,ae.properties=fe.properties),this._resubscribeTopics[fe.topic]=ae,z.push(fe.topic)}}),this.messageIdToTopic[K.messageId]=z}let W=new Promise((z,fe)=>{this.outgoing[K.messageId]={volatile:!0,cb(ae,ne){if(!ae){let{granted:Z}=ne;for(let F=0;F<Z.length;F+=1)G[F].qos=Z[F]}ae?fe(new w.ErrorWithSubackPacket(ae.message,ne)):z(ne)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(K),W},J=()=>{let G=this.options.subscribeBatchSize??te.length,H=[];for(let K=0;K<te.length;K+=G){let W=te.slice(K,K+G),z=this._nextId();if(z===null)return this.log("No messageId left"),!1;H.push(ue(W,z))}return Promise.all(H).then(K=>{j(null,te,K.at(-1))}).catch(K=>{j(K,te,K.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!J())&&this._storeProcessingQueue.push({invoke:J,callback:j}),this}subscribeAsync(L,U){return new Promise((j,Q)=>{this.subscribe(L,U,(P,re)=>{P?Q(P):j(re)})})}unsubscribe(L,U,j){typeof L=="string"&&(L=[L]),typeof U=="function"&&(j=U),j=j||this.noop;let Q=f.validateTopics(L);if(Q!==null)return A(j,new Error(`Invalid topic ${Q}`)),this;if(this._checkDisconnecting(j))return this;let P=()=>{let re=this._nextId();if(re===null)return this.log("No messageId left"),!1;let le={cmd:"unsubscribe",messageId:re,unsubscriptions:[]};return typeof L=="string"?le.unsubscriptions=[L]:Array.isArray(L)&&(le.unsubscriptions=L),this.options.resubscribe&&le.unsubscriptions.forEach(oe=>{delete this._resubscribeTopics[oe]}),typeof U=="object"&&U.properties&&(le.properties=U.properties),this.outgoing[le.messageId]={volatile:!0,cb:j},this.log("unsubscribe: call _sendPacket"),this._sendPacket(le),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!P())&&this._storeProcessingQueue.push({invoke:P,callback:j}),this}unsubscribeAsync(L,U){return new Promise((j,Q)=>{this.unsubscribe(L,U,(P,re)=>{P?Q(P):j(re)})})}end(L,U,j){this.log("end :: (%s)",this.options.clientId),(L==null||typeof L!="boolean")&&(j=j||U,U=L,L=!1),typeof U!="object"&&(j=j||U,U=null),this.log("end :: cb? %s",!!j),(!j||typeof j!="function")&&(j=this.noop);let Q=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(re=>{this.outgoingStore.close(le=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),j){let oe=re||le;this.log("end :: closeStores: invoking callback with args"),j(oe)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},P=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,L),this._cleanUp(L,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,w.nextTick)(Q)},U)};return this.disconnecting?(j(),this):(this._clearReconnect(),this.disconnecting=!0,!L&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,P,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),P()),this)}endAsync(L,U){return new Promise((j,Q)=>{this.end(L,U,P=>{P?Q(P):j()})})}removeOutgoingMessage(L){if(this.outgoing[L]){let{cb:U}=this.outgoing[L];this._removeOutgoingAndStoreMessage(L,()=>{U(new Error("Message removed"))})}return this}reconnect(L){this.log("client reconnect");let U=()=>{L?(this.options.incomingStore=L.incomingStore,this.options.outgoingStore=L.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new p.default,this.outgoingStore=this.options.outgoingStore||new p.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=U:U(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(L=>{this.outgoing[L].volatile&&typeof this.outgoing[L].cb=="function"&&(this.outgoing[L].cb(new Error("Connection closed")),delete this.outgoing[L])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(L=>{typeof this.outgoing[L].cb=="function"&&(this.outgoing[L].cb(new Error("Connection closed")),delete this.outgoing[L])}))}_removeTopicAliasAndRecoverTopicName(L){let U;L.properties&&(U=L.properties.topicAlias);let j=L.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",U,j),j.length===0){if(typeof U>"u")return new Error("Unregistered Topic Alias");if(j=this.topicAliasSend.getTopicByAlias(U),typeof j>"u")return new Error("Unregistered Topic Alias");L.topic=j}U&&delete L.properties.topicAlias}_checkDisconnecting(L){return this.disconnecting&&(L&&L!==this.noop?L(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(L,U,j={}){if(U&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",U)),this.log("_cleanUp :: forced? %s",L),L)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let Q={cmd:"disconnect",...j};this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(Q,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),A(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),U&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",U),U())}_storeAndSend(L,U,j){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",L.cmd);let Q=L,P;if(Q.cmd==="publish"&&(Q=(0,c.default)(L),P=this._removeTopicAliasAndRecoverTopicName(Q),P))return U&&U(P);this.outgoingStore.put(Q,re=>{if(re)return U&&U(re);j(),this._writePacket(L,U)})}_applyTopicAlias(L){if(this.options.protocolVersion===5&&L.cmd==="publish"){let U;L.properties&&(U=L.properties.topicAlias);let j=L.topic.toString();if(this.topicAliasSend)if(U){if(j.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",j,U),!this.topicAliasSend.put(j,U)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",j,U),new Error("Sending Topic Alias out of range")}else j.length!==0&&(this.options.autoAssignTopicAlias?(U=this.topicAliasSend.getAliasByTopic(j),U?(L.topic="",L.properties={...L.properties,topicAlias:U},this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",j,U)):(U=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(j,U),L.properties={...L.properties,topicAlias:U},this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",j,U))):this.options.autoUseTopicAlias&&(U=this.topicAliasSend.getAliasByTopic(j),U&&(L.topic="",L.properties={...L.properties,topicAlias:U},this.log("applyTopicAlias :: auto use topic: %s - alias: %d",j,U))));else if(U)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",j,U),new Error("Sending Topic Alias out of range")}}_noop(L){this.log("noop ::",L)}_writePacket(L,U){this.log("_writePacket :: packet: %O",L),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",L),this.log("_writePacket :: writing to stream");let j=u.default.writeToStream(L,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",j),!j&&U&&U!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",U)):U&&(this.log("_writePacket :: invoking cb"),U())}_sendPacket(L,U,j,Q){this.log("_sendPacket :: (%s) :: start",this.options.clientId),j=j||this.noop,U=U||this.noop;let P=this._applyTopicAlias(L);if(P){U(P);return}if(!this.connected){if(L.cmd==="auth"){this._writePacket(L,U);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(L,U,j);return}if(Q){this._writePacket(L,U);return}switch(L.cmd){case"publish":break;case"pubrel":this._storeAndSend(L,U,j);return;default:this._writePacket(L,U);return}switch(L.qos){case 2:case 1:this._storeAndSend(L,U,j);break;case 0:default:this._writePacket(L,U);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(L,U,j){this.log("_storePacket :: packet: %o",L),this.log("_storePacket :: cb? %s",!!U),j=j||this.noop;let Q=L;if(Q.cmd==="publish"){Q=(0,c.default)(L);let re=this._removeTopicAliasAndRecoverTopicName(Q);if(re)return U&&U(re)}let P=Q.qos||0;P===0&&this.queueQoSZero||Q.cmd!=="publish"?this.queue.push({packet:Q,cb:U}):P>0?(U=this.outgoing[Q.messageId]?this.outgoing[Q.messageId].cb:null,this.outgoingStore.put(Q,re=>{if(re)return U&&U(re);j()})):U&&U(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new _.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(L=!1){this.keepaliveManager&&this.options.keepalive&&(L||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let L=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&L.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let U=0;U<L.length;U++){let j={};j[L[U]]=this._resubscribeTopics[L[U]],j.resubscribe=!0,this.subscribe(j,{properties:j[L[U]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(L){if(this.disconnected){this.emit("connect",L);return}this.connackPacket=L,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let U=()=>{let j=this.outgoingStore.createStream(),Q=()=>{j.destroy(),j=null,this._flushStoreProcessingQueue(),P()},P=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",Q),j.on("error",le=>{P(),this._flushStoreProcessingQueue(),this.removeListener("close",Q),this.emit("error",le)});let re=()=>{if(!j)return;let le=j.read(1),oe;if(!le){j.once("readable",re);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[le.messageId]){re();return}!this.disconnecting&&!this.reconnectTimer?(oe=this.outgoing[le.messageId]?this.outgoing[le.messageId].cb:null,this.outgoing[le.messageId]={volatile:!1,cb(X,te){oe&&oe(X,te),re()}},this._packetIdsDuringStoreProcessing[le.messageId]=!0,this.messageIdProvider.register(le.messageId)?this._sendPacket(le,void 0,void 0,!0):this.log("messageId: %d has already used.",le.messageId)):j.destroy&&j.destroy()};j.on("end",()=>{let le=!0;for(let oe in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[oe]){le=!1;break}this.removeListener("close",Q),le?(P(),this._invokeAllStoreProcessingQueue(),this.emit("connect",L)):U()}),re()};U()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let L=this._storeProcessingQueue[0];if(L&&L.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let L of this._storeProcessingQueue)L.cbStorePut&&L.cbStorePut(new Error("Connection closed")),L.callback&&L.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(L,U){delete this.outgoing[L],this.outgoingStore.del({messageId:L},(j,Q)=>{U(j,Q),this.messageIdProvider.deallocate(L),this._invokeStoreProcessingQueue()})}},rt(T,"VERSION",w.MQTTJS_VERSION),T);e.default=R}),SQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=QT(),n=class{constructor(){rt(this,"numberAllocator");rt(this,"lastId");this.numberAllocator=new t.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(o){return this.numberAllocator.use(o)}deallocate(o){this.numberAllocator.free(o)}clear(){this.numberAllocator.clear()}};e.default=n});function IQ(){if(oA)return pd;oA=!0;let e=2147483647,t=36,n=1,o=26,s=38,u=700,l=72,c=128,h="-",f=/^xn--/,p=/[^\0-\x7F]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=t-n,w=Math.floor,B=String.fromCharCode;function _(j){throw new RangeError(g[j])}function M(j,Q){let P=[],re=j.length;for(;re--;)P[re]=Q(j[re]);return P}function A(j,Q){let P=j.split("@"),re="";P.length>1&&(re=P[0]+"@",j=P[1]),j=j.replace(y,".");let le=j.split("."),oe=M(le,Q).join(".");return re+oe}function I(j){let Q=[],P=0,re=j.length;for(;P<re;){let le=j.charCodeAt(P++);if(le>=55296&&le<=56319&&P<re){let oe=j.charCodeAt(P++);(oe&64512)==56320?Q.push(((le&1023)<<10)+(oe&1023)+65536):(Q.push(le),P--)}else Q.push(le)}return Q}let R=j=>String.fromCodePoint(...j),T=function(j){return j>=48&&j<58?26+(j-48):j>=65&&j<91?j-65:j>=97&&j<123?j-97:t},$=function(j,Q){return j+22+75*(j<26)-((Q!=0)<<5)},k=function(j,Q,P){let re=0;for(j=P?w(j/u):j>>1,j+=w(j/Q);j>b*o>>1;re+=t)j=w(j/b);return w(re+(b+1)*j/(j+s))},L=function(j){let Q=[],P=j.length,re=0,le=c,oe=l,X=j.lastIndexOf(h);X<0&&(X=0);for(let te=0;te<X;++te)j.charCodeAt(te)>=128&&_("not-basic"),Q.push(j.charCodeAt(te));for(let te=X>0?X+1:0;te<P;){let pe=re;for(let J=1,G=t;;G+=t){te>=P&&_("invalid-input");let H=T(j.charCodeAt(te++));H>=t&&_("invalid-input"),H>w((e-re)/J)&&_("overflow"),re+=H*J;let K=G<=oe?n:G>=oe+o?o:G-oe;if(H<K)break;let W=t-K;J>w(e/W)&&_("overflow"),J*=W}let ue=Q.length+1;oe=k(re-pe,ue,pe==0),w(re/ue)>e-le&&_("overflow"),le+=w(re/ue),re%=ue,Q.splice(re++,0,le)}return String.fromCodePoint(...Q)},U=function(j){let Q=[];j=I(j);let P=j.length,re=c,le=0,oe=l;for(let pe of j)pe<128&&Q.push(B(pe));let X=Q.length,te=X;for(X&&Q.push(h);te<P;){let pe=e;for(let J of j)J>=re&&J<pe&&(pe=J);let ue=te+1;pe-re>w((e-le)/ue)&&_("overflow"),le+=(pe-re)*ue,re=pe;for(let J of j)if(J<re&&++le>e&&_("overflow"),J===re){let G=le;for(let H=t;;H+=t){let K=H<=oe?n:H>=oe+o?o:H-oe;if(G<K)break;let W=G-K,z=t-K;Q.push(B($(K+W%z,0))),G=w(W/z)}Q.push(B($(G,0))),oe=k(le,ue,te===X),le=0,++te}++le,++re}return Q.join("")};return pd={version:"2.3.1",ucs2:{decode:I,encode:R},decode:L,encode:U,toASCII:function(j){return A(j,function(Q){return p.test(Q)?"xn--"+U(Q):Q})},toUnicode:function(j){return A(j,function(Q){return f.test(Q)?L(Q.slice(4).toLowerCase()):Q})}},pd}var pd,oA,Cs,_Q=kn(()=>{Pe(),Le(),ke(),pd={},oA=!1,Cs=IQ(),Cs.decode,Cs.encode,Cs.toASCII,Cs.toUnicode,Cs.ucs2,Cs.version});function CQ(){return aA||(aA=!0,sA=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t 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 s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==o||u.enumerable!==!0)return!1}return!0}),sA}function FQ(){return lA||(lA=!0,uA=Error),uA}function OQ(){return fA||(fA=!0,cA=EvalError),cA}function BQ(){return dA||(dA=!0,hA=RangeError),hA}function TQ(){return yA||(yA=!0,pA=ReferenceError),pA}function e6(){return mA||(mA=!0,gA=SyntaxError),gA}function Sf(){return AA||(AA=!0,bA=TypeError),bA}function RQ(){return wA||(wA=!0,vA=URIError),vA}function MQ(){if(xA)return yd;xA=!0;var e=typeof Symbol<"u"&&Symbol,t=CQ();return yd=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},yd}function UQ(){if(EA)return gd;EA=!0;var e={__proto__:null,foo:{}},t=Object;return gd=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},gd}function jQ(){if(SA)return md;SA=!0;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,o="[object Function]",s=function(c,h){for(var f=[],p=0;p<c.length;p+=1)f[p]=c[p];for(var y=0;y<h.length;y+=1)f[y+c.length]=h[y];return f},u=function(c,h){for(var f=[],p=h,y=0;p<c.length;p+=1,y+=1)f[y]=c[p];return f},l=function(c,h){for(var f="",p=0;p<c.length;p+=1)f+=c[p],p+1<c.length&&(f+=h);return f};return md=function(c){var h=this;if(typeof h!="function"||t.apply(h)!==o)throw new TypeError(e+h);for(var f=u(arguments,1),p,y=function(){if(this instanceof p){var _=h.apply(this,s(f,arguments));return Object(_)===_?_:this}return h.apply(c,s(f,arguments))},g=n(0,h.length-f.length),b=[],w=0;w<g;w++)b[w]="$"+w;if(p=Function("binder","return function ("+l(b,",")+"){ return binder.apply(this,arguments); }")(y),h.prototype){var B=function(){};B.prototype=h.prototype,p.prototype=new B,B.prototype=null}return p},md}function ww(){if(IA)return bd;IA=!0;var e=jQ();return bd=Function.prototype.bind||e,bd}function DQ(){if(_A)return Ad;_A=!0;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=ww();return Ad=n.call(e,t),Ad}function cl(){if(CA)return vd;CA=!0;var e,t=FQ(),n=OQ(),o=BQ(),s=TQ(),u=e6(),l=Sf(),c=RQ(),h=Function,f=function(te){try{return h('"use strict"; return ('+te+").constructor;")()}catch{}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch{p=null}var y=function(){throw new l},g=p?(function(){try{return arguments.callee,y}catch{try{return p(arguments,"callee").get}catch{return y}}})():y,b=MQ()(),w=UQ()(),B=Object.getPrototypeOf||(w?function(te){return te.__proto__}:null),_={},M=typeof Uint8Array>"u"||!B?e:B(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":b&&B?B([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":_,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&B?B(B([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!B?e:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!B?e:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&B?B(""[Symbol.iterator]()):e,"%Symbol%":b?Symbol:e,"%SyntaxError%":u,"%ThrowTypeError%":g,"%TypedArray%":M,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(B)try{null.error}catch(te){var I=B(B(te));A["%Error.prototype%"]=I}var R=function te(pe){var ue;if(pe==="%AsyncFunction%")ue=f("async function () {}");else if(pe==="%GeneratorFunction%")ue=f("function* () {}");else if(pe==="%AsyncGeneratorFunction%")ue=f("async function* () {}");else if(pe==="%AsyncGenerator%"){var J=te("%AsyncGeneratorFunction%");J&&(ue=J.prototype)}else if(pe==="%AsyncIteratorPrototype%"){var G=te("%AsyncGenerator%");G&&B&&(ue=B(G.prototype))}return A[pe]=ue,ue},T={__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"]},$=ww(),k=DQ(),L=$.call(Function.call,Array.prototype.concat),U=$.call(Function.apply,Array.prototype.splice),j=$.call(Function.call,String.prototype.replace),Q=$.call(Function.call,String.prototype.slice),P=$.call(Function.call,RegExp.prototype.exec),re=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,le=/\\(\\)?/g,oe=function(te){var pe=Q(te,0,1),ue=Q(te,-1);if(pe==="%"&&ue!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(ue==="%"&&pe!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var J=[];return j(te,re,function(G,H,K,W){J[J.length]=K?j(W,le,"$1"):H||G}),J},X=function(te,pe){var ue=te,J;if(k(T,ue)&&(J=T[ue],ue="%"+J[0]+"%"),k(A,ue)){var G=A[ue];if(G===_&&(G=R(ue)),typeof G>"u"&&!pe)throw new l("intrinsic "+te+" exists, but is not available. Please file an issue!");return{alias:J,name:ue,value:G}}throw new u("intrinsic "+te+" does not exist!")};return vd=function(te,pe){if(typeof te!="string"||te.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new l('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,te)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ue=oe(te),J=ue.length>0?ue[0]:"",G=X("%"+J+"%",pe),H=G.name,K=G.value,W=!1,z=G.alias;z&&(J=z[0],U(ue,L([0,1],z)));for(var fe=1,ae=!0;fe<ue.length;fe+=1){var ne=ue[fe],Z=Q(ne,0,1),F=Q(ne,-1);if((Z==='"'||Z==="'"||Z==="`"||F==='"'||F==="'"||F==="`")&&Z!==F)throw new u("property names with quotes must have matching quotes");if((ne==="constructor"||!ae)&&(W=!0),J+="."+ne,H="%"+J+"%",k(A,H))K=A[H];else if(K!=null){if(!(ne in K)){if(!pe)throw new l("base intrinsic for "+te+" exists, but the property is not available.");return}if(p&&fe+1>=ue.length){var q=p(K,ne);ae=!!q,ae&&"get"in q&&!("originalValue"in q.get)?K=q.get:K=K[ne]}else ae=k(K,ne),K=K[ne];ae&&!W&&(A[H]=K)}}return K},vd}function xw(){if(FA)return wd;FA=!0;var e=cl(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return wd=t,wd}function t6(){if(OA)return xd;OA=!0;var e=cl(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return xd=t,xd}function NQ(){if(BA)return Ed;BA=!0;var e=xw(),t=e6(),n=Sf(),o=t6();return Ed=function(s,u,l){if(!s||typeof s!="object"&&typeof s!="function")throw new n("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,y=!!o&&o(s,u);if(e)e(s,u,{configurable:f===null&&y?y.configurable:!f,enumerable:c===null&&y?y.enumerable:!c,value:l,writable:h===null&&y?y.writable:!h});else if(p||!c&&!h&&!f)s[u]=l;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ed}function PQ(){if(TA)return Sd;TA=!0;var e=xw(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Sd=t,Sd}function kQ(){if(RA)return Id;RA=!0;var e=cl(),t=NQ(),n=PQ()(),o=t6(),s=Sf(),u=e("%Math.floor%");return Id=function(l,c){if(typeof l!="function")throw new s("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||u(c)!==c)throw new s("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],f=!0,p=!0;if("length"in l&&o){var y=o(l,"length");y&&!y.configurable&&(f=!1),y&&!y.writable&&(p=!1)}return(f||p||!h)&&(n?t(l,"length",c,!0,!0):t(l,"length",c)),l},Id}function LQ(){if(MA)return Eu;MA=!0;var e=ww(),t=cl(),n=kQ(),o=Sf(),s=t("%Function.prototype.apply%"),u=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(u,s),c=xw(),h=t("%Math.max%");Eu=function(p){if(typeof p!="function")throw new o("a function is required");var y=l(e,u,arguments);return n(y,1+h(0,p.length-(arguments.length-1)),!0)};var f=function(){return l(e,s,arguments)};return c?c(Eu,"apply",{value:f}):Eu.apply=f,Eu}function zQ(){if(UA)return _d;UA=!0;var e=cl(),t=LQ(),n=t(e("String.prototype.indexOf"));return _d=function(o,s){var u=e(o,!!s);return typeof u=="function"&&n(o,".prototype.")>-1?t(u):u},_d}var sA,aA,uA,lA,cA,fA,hA,dA,pA,yA,gA,mA,bA,AA,vA,wA,yd,xA,gd,EA,md,SA,bd,IA,Ad,_A,vd,CA,wd,FA,xd,OA,Ed,BA,Sd,TA,Id,RA,Eu,MA,_d,UA,$Q=kn(()=>{Pe(),Le(),ke(),sA={},aA=!1,uA={},lA=!1,cA={},fA=!1,hA={},dA=!1,pA={},yA=!1,gA={},mA=!1,bA={},AA=!1,vA={},wA=!1,yd={},xA=!1,gd={},EA=!1,md={},SA=!1,bd={},IA=!1,Ad={},_A=!1,vd={},CA=!1,wd={},FA=!1,xd={},OA=!1,Ed={},BA=!1,Sd={},TA=!1,Id={},RA=!1,Eu={},MA=!1,_d={},UA=!1});function Ew(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function qQ(){!ma||!pa||(ma=!1,pa.length?Ki=pa.concat(Ki):bc=-1,Ki.length&&r6())}function r6(){if(!ma){var e=setTimeout(qQ,0);ma=!0;for(var t=Ki.length;t;){for(pa=Ki,Ki=[];++bc<t;)pa&&pa[bc].run();bc=-1,t=Ki.length}pa=null,ma=!1,clearTimeout(e)}}function HQ(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ki.push(new n6(e,t)),Ki.length===1&&!ma&&setTimeout(r6,0)}function n6(e,t){this.fun=e,this.array=t}function fn(){}function QQ(e){Ew("_linkedBinding")}function GQ(e){Ew("dlopen")}function KQ(){return[]}function YQ(){return[]}function VQ(e,t){if(!e)throw new Error(t||"assertion error")}function WQ(){return!1}function XQ(){return To.now()/1e3}function sb(e){var t=Math.floor((Date.now()-To.now())*.001),n=To.now()*.001,o=Math.floor(n)+t,s=Math.floor(n%1*1e9);return e&&(o=o-e[0],s=s-e[1],s<0&&(o--,s+=Cd)),[o,s]}function ws(){return Sw}function ZQ(e){return[]}var Ki,ma,pa,bc,EC,SC,IC,_C,CC,FC,OC,BC,TC,RC,MC,UC,jC,DC,NC,PC,kC,LC,zC,$C,qC,Zh,HC,QC,GC,KC,YC,VC,WC,XC,ZC,JC,eF,tF,rF,nF,iF,oF,sF,aF,uF,lF,cF,fF,hF,dF,pF,To,ab,Cd,yF,gF,mF,bF,AF,vF,wF,xF,EF,SF,IF,Sw,i6=kn(()=>{Pe(),Le(),ke(),Ki=[],ma=!1,bc=-1,n6.prototype.run=function(){this.fun.apply(null,this.array)},EC="browser",SC="x64",IC="browser",_C={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},CC=["/usr/bin/node"],FC=[],OC="v16.8.0",BC={},TC=function(e,t){console.warn((t?t+": ":"")+e)},RC=function(e){Ew("binding")},MC=function(e){return 0},UC=function(){return"/"},jC=function(e){},DC={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},NC=fn,PC=[],kC={},LC=!1,zC={},$C=fn,qC=fn,Zh=function(){return{}},HC=Zh,QC=Zh,GC=fn,KC=fn,YC=fn,VC={},WC={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},XC=fn,ZC=fn,JC=fn,eF=fn,tF=fn,rF=fn,nF=fn,iF=void 0,oF=void 0,sF=void 0,aF=fn,uF=2,lF=1,cF="/bin/usr/node",fF=9229,hF="node",dF=[],pF=fn,To={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},To.now===void 0&&(ab=Date.now(),To.timing&&To.timing.navigationStart&&(ab=To.timing.navigationStart),To.now=()=>Date.now()-ab),Cd=1e9,sb.bigint=function(e){var t=sb(e);return typeof BigInt>"u"?t[0]*Cd+t[1]:BigInt(t[0]*Cd)+BigInt(t[1])},yF=10,gF={},mF=0,bF=ws,AF=ws,vF=ws,wF=ws,xF=ws,EF=fn,SF=ws,IF=ws,Sw={version:OC,versions:BC,arch:SC,platform:IC,release:DC,_rawDebug:NC,moduleLoadList:PC,binding:RC,_linkedBinding:QQ,_events:gF,_eventsCount:mF,_maxListeners:yF,on:ws,addListener:bF,once:AF,off:vF,removeListener:wF,removeAllListeners:xF,emit:EF,prependListener:SF,prependOnceListener:IF,listeners:ZQ,domain:kC,_exiting:LC,config:zC,dlopen:GQ,uptime:XQ,_getActiveRequests:KQ,_getActiveHandles:YQ,reallyExit:$C,_kill:qC,cpuUsage:Zh,resourceUsage:HC,memoryUsage:QC,kill:GC,exit:KC,openStdin:YC,allowedNodeEnvironmentFlags:VC,assert:VQ,features:WC,_fatalExceptions:XC,setUncaughtExceptionCaptureCallback:ZC,hasUncaughtExceptionCaptureCallback:WQ,emitWarning:TC,nextTick:HQ,_tickCallback:JC,_debugProcess:eF,_debugEnd:tF,_startProfilerIdleNotifier:rF,_stopProfilerIdleNotifier:nF,stdout:iF,stdin:sF,stderr:oF,abort:aF,umask:MC,chdir:jC,cwd:UC,env:_C,title:EC,argv:CC,execArgv:FC,pid:uF,ppid:lF,execPath:cF,debugPort:fF,hrtime:sb,argv0:hF,_preload_modules:dF,setSourceMapsEnabled:pF}});function JQ(){if(jA)return Fd;jA=!0;var e=Sw;function t(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function n(u,l){for(var c="",h=0,f=-1,p=0,y,g=0;g<=u.length;++g){if(g<u.length)y=u.charCodeAt(g);else{if(y===47)break;y=47}if(y===47){if(!(f===g-1||p===1))if(f!==g-1&&p===2){if(c.length<2||h!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var b=c.lastIndexOf("/");if(b!==c.length-1){b===-1?(c="",h=0):(c=c.slice(0,b),h=c.length-1-c.lastIndexOf("/")),f=g,p=0;continue}}else if(c.length===2||c.length===1){c="",h=0,f=g,p=0;continue}}l&&(c.length>0?c+="/..":c="..",h=2)}else c.length>0?c+="/"+u.slice(f+1,g):c=u.slice(f+1,g),h=g-f-1;f=g,p=0}else y===46&&p!==-1?++p:p=-1}return c}function o(u,l){var c=l.dir||l.root,h=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+h:c+u+h:h}var s={resolve:function(){for(var u="",l=!1,c,h=arguments.length-1;h>=-1&&!l;h--){var f;h>=0?f=arguments[h]:(c===void 0&&(c=e.cwd()),f=c),t(f),f.length!==0&&(u=f+"/"+u,l=f.charCodeAt(0)===47)}return u=n(u,!l),l?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(u){if(t(u),u.length===0)return".";var l=u.charCodeAt(0)===47,c=u.charCodeAt(u.length-1)===47;return u=n(u,!l),u.length===0&&!l&&(u="."),u.length>0&&c&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return t(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l<arguments.length;++l){var c=arguments[l];t(c),c.length>0&&(u===void 0?u=c:u+="/"+c)}return u===void 0?".":s.normalize(u)},relative:function(u,l){if(t(u),t(l),u===l||(u=s.resolve(u),l=s.resolve(l),u===l))return"";for(var c=1;c<u.length&&u.charCodeAt(c)===47;++c);for(var h=u.length,f=h-c,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var y=l.length,g=y-p,b=f<g?f:g,w=-1,B=0;B<=b;++B){if(B===b){if(g>b){if(l.charCodeAt(p+B)===47)return l.slice(p+B+1);if(B===0)return l.slice(p+B)}else f>b&&(u.charCodeAt(c+B)===47?w=B:B===0&&(w=0));break}var _=u.charCodeAt(c+B),M=l.charCodeAt(p+B);if(_!==M)break;_===47&&(w=B)}var A="";for(B=c+w+1;B<=h;++B)(B===h||u.charCodeAt(B)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+l.slice(p+w):(p+=w,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(u){return u},dirname:function(u){if(t(u),u.length===0)return".";for(var l=u.charCodeAt(0),c=l===47,h=-1,f=!0,p=u.length-1;p>=1;--p)if(l=u.charCodeAt(p),l===47){if(!f){h=p;break}}else f=!1;return h===-1?c?"/":".":c&&h===1?"//":u.slice(0,h)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');t(u);var c=0,h=-1,f=!0,p;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var y=l.length-1,g=-1;for(p=u.length-1;p>=0;--p){var b=u.charCodeAt(p);if(b===47){if(!f){c=p+1;break}}else g===-1&&(f=!1,g=p+1),y>=0&&(b===l.charCodeAt(y)?--y===-1&&(h=p):(y=-1,h=g))}return c===h?h=g:h===-1&&(h=u.length),u.slice(c,h)}else{for(p=u.length-1;p>=0;--p)if(u.charCodeAt(p)===47){if(!f){c=p+1;break}}else h===-1&&(f=!1,h=p+1);return h===-1?"":u.slice(c,h)}},extname:function(u){t(u);for(var l=-1,c=0,h=-1,f=!0,p=0,y=u.length-1;y>=0;--y){var g=u.charCodeAt(y);if(g===47){if(!f){c=y+1;break}continue}h===-1&&(f=!1,h=y+1),g===46?l===-1?l=y:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||h===-1||p===0||p===1&&l===h-1&&l===c+1?"":u.slice(l,h)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return o("/",u)},parse:function(u){t(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var c=u.charCodeAt(0),h=c===47,f;h?(l.root="/",f=1):f=0;for(var p=-1,y=0,g=-1,b=!0,w=u.length-1,B=0;w>=f;--w){if(c=u.charCodeAt(w),c===47){if(!b){y=w+1;break}continue}g===-1&&(b=!1,g=w+1),c===46?p===-1?p=w:B!==1&&(B=1):p!==-1&&(B=-1)}return p===-1||g===-1||B===0||B===1&&p===g-1&&p===y+1?g!==-1&&(y===0&&h?l.base=l.name=u.slice(1,g):l.base=l.name=u.slice(y,g)):(y===0&&h?(l.name=u.slice(1,p),l.base=u.slice(1,g)):(l.name=u.slice(y,p),l.base=u.slice(y,g)),l.ext=u.slice(p,g)),y>0?l.dir=u.slice(0,y-1):h&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};return s.posix=s,Fd=s,Fd}var Fd,jA,DA,eG=kn(()=>{Pe(),Le(),ke(),i6(),Fd={},jA=!1,DA=JQ()}),o6={};al(o6,{URL:()=>y6,Url:()=>c6,default:()=>hn,fileURLToPath:()=>a6,format:()=>f6,parse:()=>p6,pathToFileURL:()=>u6,resolve:()=>h6,resolveObject:()=>d6});function tG(){if(NA)return Od;NA=!0;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,o=e&&Map.prototype.forEach,s=typeof Set=="function"&&Set.prototype,u=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&u&&typeof u.get=="function"?u.get:null,c=s&&Set.prototype.forEach,h=typeof WeakMap=="function"&&WeakMap.prototype,f=h?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,y=p?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,b=g?WeakRef.prototype.deref:null,w=Boolean.prototype.valueOf,B=Object.prototype.toString,_=Function.prototype.toString,M=String.prototype.match,A=String.prototype.slice,I=String.prototype.replace,R=String.prototype.toUpperCase,T=String.prototype.toLowerCase,$=RegExp.prototype.test,k=Array.prototype.concat,L=Array.prototype.join,U=Array.prototype.slice,j=Math.floor,Q=typeof BigInt=="function"?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,le=typeof Symbol=="function"&&typeof Symbol.iterator=="object",oe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===le||!0)?Symbol.toStringTag:null,X=Object.prototype.propertyIsEnumerable,te=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ve){return ve.__proto__}:null);function pe(ve,Se){if(ve===1/0||ve===-1/0||ve!==ve||ve&&ve>-1e3&&ve<1e3||$.call(/e/,Se))return Se;var He=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ve=="number"){var Ke=ve<0?-j(-ve):j(ve);if(Ke!==ve){var Ve=String(Ke),et=A.call(Se,Ve.length+1);return I.call(Ve,He,"$&_")+"."+I.call(I.call(et,/([0-9]{3})/g,"$&_"),/_$/,"")}}return I.call(Se,He,"$&_")}var ue=l6,J=ue.custom,G=q(J)?J:null;Od=function ve(Se,He,Ke,Ve){var et=He||{};if(ye(et,"quoteStyle")&&et.quoteStyle!=="single"&&et.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(et,"maxStringLength")&&(typeof et.maxStringLength=="number"?et.maxStringLength<0&&et.maxStringLength!==1/0:et.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var gt=ye(et,"customInspect")?et.customInspect:!0;if(typeof gt!="boolean"&>!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ye(et,"indent")&&et.indent!==null&&et.indent!==" "&&!(parseInt(et.indent,10)===et.indent&&et.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ye(et,"numericSeparator")&&typeof et.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var bt=et.numericSeparator;if(typeof Se>"u")return"undefined";if(Se===null)return"null";if(typeof Se=="boolean")return Se?"true":"false";if(typeof Se=="string")return de(Se,et);if(typeof Se=="number"){if(Se===0)return 1/0/Se>0?"0":"-0";var lt=String(Se);return bt?pe(Se,lt):lt}if(typeof Se=="bigint"){var yt=String(Se)+"n";return bt?pe(Se,yt):yt}var tt=typeof et.depth>"u"?5:et.depth;if(typeof Ke>"u"&&(Ke=0),Ke>=tt&&tt>0&&typeof Se=="object")return W(Se)?"[Array]":"[Object]";var ft=me(et,Ke);if(typeof Ve>"u")Ve=[];else if(v(Ve,Se)>=0)return"[Circular]";function dt(Mr,gn,wn){if(gn&&(Ve=U.call(Ve),Ve.push(gn)),wn){var Pr={depth:et.depth};return ye(et,"quoteStyle")&&(Pr.quoteStyle=et.quoteStyle),ve(Mr,Pr,Ke+1,Ve)}return ve(Mr,et,Ke+1,Ve)}if(typeof Se=="function"&&!fe(Se)){var At=S(Se),Xt=Ce(Se,dt);return"[Function"+(At?": "+At:" (anonymous)")+"]"+(Xt.length>0?" { "+L.call(Xt,", ")+" }":"")}if(q(Se)){var br=le?I.call(String(Se),/^(Symbol\(.*\))_[^)]*$/,"$1"):re.call(Se);return typeof Se=="object"&&!le?x(br):br}if(Te(Se)){for(var be="<"+T.call(String(Se.nodeName)),Ie=Se.attributes||[],Ye=0;Ye<Ie.length;Ye++)be+=" "+Ie[Ye].name+"="+H(K(Ie[Ye].value),"double",et);return be+=">",Se.childNodes&&Se.childNodes.length&&(be+="..."),be+="</"+T.call(String(Se.nodeName))+">",be}if(W(Se)){if(Se.length===0)return"[]";var Je=Ce(Se,dt);return ft&&!ie(Je)?"["+xe(Je,ft)+"]":"[ "+L.call(Je,", ")+" ]"}if(ae(Se)){var ot=Ce(Se,dt);return!("cause"in Error.prototype)&&"cause"in Se&&!X.call(Se,"cause")?"{ ["+String(Se)+"] "+L.call(k.call("[cause]: "+dt(Se.cause),ot),", ")+" }":ot.length===0?"["+String(Se)+"]":"{ ["+String(Se)+"] "+L.call(ot,", ")+" }"}if(typeof Se=="object"&>){if(G&&typeof Se[G]=="function"&&ue)return ue(Se,{depth:tt-Ke});if(gt!=="symbol"&&typeof Se.inspect=="function")return Se.inspect()}if(C(Se)){var qt=[];return o&&o.call(Se,function(Mr,gn){qt.push(dt(gn,Se,!0)+" => "+dt(Mr,Se))}),D("Map",n.call(Se),qt,ft)}if(ce(Se)){var tr=[];return c&&c.call(Se,function(Mr){tr.push(dt(Mr,Se))}),D("Set",l.call(Se),tr,ft)}if(N(Se))return O("WeakMap");if(Ee(Se))return O("WeakSet");if(he(Se))return O("WeakRef");if(Z(Se))return x(dt(Number(Se)));if(Y(Se))return x(dt(Q.call(Se)));if(F(Se))return x(w.call(Se));if(ne(Se))return x(dt(String(Se)));if(typeof window<"u"&&Se===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Se===globalThis||typeof Bd<"u"&&Se===Bd)return"{ [object globalThis] }";if(!z(Se)&&!fe(Se)){var Br=Ce(Se,dt),Ln=te?te(Se)===Object.prototype:Se instanceof Object||Se.constructor===Object,Tr=Se instanceof Object?"":"null prototype",Ht=!Ln&&oe&&Object(Se)===Se&&oe in Se?A.call(ee(Se),8,-1):Tr?"Object":"",rr=Ln||typeof Se.constructor!="function"?"":Se.constructor.name?Se.constructor.name+" ":"",Rr=rr+(Ht||Tr?"["+L.call(k.call([],Ht||[],Tr||[]),": ")+"] ":"");return Br.length===0?Rr+"{}":ft?Rr+"{"+xe(Br,ft)+"}":Rr+"{ "+L.call(Br,", ")+" }"}return String(Se)};function H(ve,Se,He){var Ke=(He.quoteStyle||Se)==="double"?'"':"'";return Ke+ve+Ke}function K(ve){return I.call(String(ve),/"/g,""")}function W(ve){return ee(ve)==="[object Array]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function z(ve){return ee(ve)==="[object Date]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function fe(ve){return ee(ve)==="[object RegExp]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function ae(ve){return ee(ve)==="[object Error]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function ne(ve){return ee(ve)==="[object String]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function Z(ve){return ee(ve)==="[object Number]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function F(ve){return ee(ve)==="[object Boolean]"&&(!oe||!(typeof ve=="object"&&oe in ve))}function q(ve){if(le)return ve&&typeof ve=="object"&&ve instanceof Symbol;if(typeof ve=="symbol")return!0;if(!ve||typeof ve!="object"||!re)return!1;try{return re.call(ve),!0}catch{}return!1}function Y(ve){if(!ve||typeof ve!="object"||!Q)return!1;try{return Q.call(ve),!0}catch{}return!1}var se=Object.prototype.hasOwnProperty||function(ve){return ve in(this||Bd)};function ye(ve,Se){return se.call(ve,Se)}function ee(ve){return B.call(ve)}function S(ve){if(ve.name)return ve.name;var Se=M.call(_.call(ve),/^function\s*([\w$]+)/);return Se?Se[1]:null}function v(ve,Se){if(ve.indexOf)return ve.indexOf(Se);for(var He=0,Ke=ve.length;He<Ke;He++)if(ve[He]===Se)return He;return-1}function C(ve){if(!n||!ve||typeof ve!="object")return!1;try{n.call(ve);try{l.call(ve)}catch{return!0}return ve instanceof Map}catch{}return!1}function N(ve){if(!f||!ve||typeof ve!="object")return!1;try{f.call(ve,f);try{y.call(ve,y)}catch{return!0}return ve instanceof WeakMap}catch{}return!1}function he(ve){if(!b||!ve||typeof ve!="object")return!1;try{return b.call(ve),!0}catch{}return!1}function ce(ve){if(!l||!ve||typeof ve!="object")return!1;try{l.call(ve);try{n.call(ve)}catch{return!0}return ve instanceof Set}catch{}return!1}function Ee(ve){if(!y||!ve||typeof ve!="object")return!1;try{y.call(ve,y);try{f.call(ve,f)}catch{return!0}return ve instanceof WeakSet}catch{}return!1}function Te(ve){return!ve||typeof ve!="object"?!1:typeof HTMLElement<"u"&&ve instanceof HTMLElement?!0:typeof ve.nodeName=="string"&&typeof ve.getAttribute=="function"}function de(ve,Se){if(ve.length>Se.maxStringLength){var He=ve.length-Se.maxStringLength,Ke="... "+He+" more character"+(He>1?"s":"");return de(A.call(ve,0,Se.maxStringLength),Se)+Ke}var Ve=I.call(I.call(ve,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,we);return H(Ve,"single",Se)}function we(ve){var Se=ve.charCodeAt(0),He={8:"b",9:"t",10:"n",12:"f",13:"r"}[Se];return He?"\\"+He:"\\x"+(Se<16?"0":"")+R.call(Se.toString(16))}function x(ve){return"Object("+ve+")"}function O(ve){return ve+" { ? }"}function D(ve,Se,He,Ke){var Ve=Ke?xe(He,Ke):L.call(He,", ");return ve+" ("+Se+") {"+Ve+"}"}function ie(ve){for(var Se=0;Se<ve.length;Se++)if(v(ve[Se],`
|
|
145
|
+
`)>=0)return!1;return!0}function me(ve,Se){var He;if(ve.indent===" ")He=" ";else if(typeof ve.indent=="number"&&ve.indent>0)He=L.call(Array(ve.indent+1)," ");else return null;return{base:He,prev:L.call(Array(Se+1),He)}}function xe(ve,Se){if(ve.length===0)return"";var He=`
|
|
146
|
+
`+Se.prev+Se.base;return He+L.call(ve,","+He)+`
|
|
147
|
+
`+Se.prev}function Ce(ve,Se){var He=W(ve),Ke=[];if(He){Ke.length=ve.length;for(var Ve=0;Ve<ve.length;Ve++)Ke[Ve]=ye(ve,Ve)?Se(ve[Ve],ve):""}var et=typeof P=="function"?P(ve):[],gt;if(le){gt={};for(var bt=0;bt<et.length;bt++)gt["$"+et[bt]]=et[bt]}for(var lt in ve)ye(ve,lt)&&(He&&String(Number(lt))===lt&<<ve.length||le&>["$"+lt]instanceof Symbol||($.call(/[^\w$]/,lt)?Ke.push(Se(lt,ve)+": "+Se(ve[lt],ve)):Ke.push(lt+": "+Se(ve[lt],ve))));if(typeof P=="function")for(var yt=0;yt<et.length;yt++)X.call(ve,et[yt])&&Ke.push("["+Se(et[yt])+"]: "+Se(ve[et[yt]],ve));return Ke}return Od}function rG(){if(PA)return Td;PA=!0;var e=cl(),t=zQ(),n=tG(),o=Sf(),s=e("%WeakMap%",!0),u=e("%Map%",!0),l=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),h=t("WeakMap.prototype.has",!0),f=t("Map.prototype.get",!0),p=t("Map.prototype.set",!0),y=t("Map.prototype.has",!0),g=function(_,M){for(var A=_,I;(I=A.next)!==null;A=I)if(I.key===M)return A.next=I.next,I.next=_.next,_.next=I,I},b=function(_,M){var A=g(_,M);return A&&A.value},w=function(_,M,A){var I=g(_,M);I?I.value=A:_.next={key:M,next:_.next,value:A}},B=function(_,M){return!!g(_,M)};return Td=function(){var _,M,A,I={assert:function(R){if(!I.has(R))throw new o("Side channel does not contain "+n(R))},get:function(R){if(s&&R&&(typeof R=="object"||typeof R=="function")){if(_)return l(_,R)}else if(u){if(M)return f(M,R)}else if(A)return b(A,R)},has:function(R){if(s&&R&&(typeof R=="object"||typeof R=="function")){if(_)return h(_,R)}else if(u){if(M)return y(M,R)}else if(A)return B(A,R);return!1},set:function(R,T){s&&R&&(typeof R=="object"||typeof R=="function")?(_||(_=new s),c(_,R,T)):u?(M||(M=new u),p(M,R,T)):(A||(A={key:{},next:null}),w(A,R,T))}};return I},Td}function Iw(){if(kA)return Rd;kA=!0;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Rd={default:n.RFC3986,formatters:{RFC1738:function(o){return e.call(o,t,"+")},RFC3986:function(o){return String(o)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Rd}function s6(){if(LA)return Md;LA=!0;var e=Iw(),t=Object.prototype.hasOwnProperty,n=Array.isArray,o=(function(){for(var _=[],M=0;M<256;++M)_.push("%"+((M<16?"0":"")+M.toString(16)).toUpperCase());return _})(),s=function(_){for(;_.length>1;){var M=_.pop(),A=M.obj[M.prop];if(n(A)){for(var I=[],R=0;R<A.length;++R)typeof A[R]<"u"&&I.push(A[R]);M.obj[M.prop]=I}}},u=function(_,M){for(var A=M&&M.plainObjects?Object.create(null):{},I=0;I<_.length;++I)typeof _[I]<"u"&&(A[I]=_[I]);return A},l=function _(M,A,I){if(!A)return M;if(typeof A!="object"){if(n(M))M.push(A);else if(M&&typeof M=="object")(I&&(I.plainObjects||I.allowPrototypes)||!t.call(Object.prototype,A))&&(M[A]=!0);else return[M,A];return M}if(!M||typeof M!="object")return[M].concat(A);var R=M;return n(M)&&!n(A)&&(R=u(M,I)),n(M)&&n(A)?(A.forEach(function(T,$){if(t.call(M,$)){var k=M[$];k&&typeof k=="object"&&T&&typeof T=="object"?M[$]=_(k,T,I):M.push(T)}else M[$]=T}),M):Object.keys(A).reduce(function(T,$){var k=A[$];return t.call(T,$)?T[$]=_(T[$],k,I):T[$]=k,T},R)},c=function(_,M){return Object.keys(M).reduce(function(A,I){return A[I]=M[I],A},_)},h=function(_,M,A){var I=_.replace(/\+/g," ");if(A==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},f=1024,p=function(_,M,A,I,R){if(_.length===0)return _;var T=_;if(typeof _=="symbol"?T=Symbol.prototype.toString.call(_):typeof _!="string"&&(T=String(_)),A==="iso-8859-1")return escape(T).replace(/%u[0-9a-f]{4}/gi,function(P){return"%26%23"+parseInt(P.slice(2),16)+"%3B"});for(var $="",k=0;k<T.length;k+=f){for(var L=T.length>=f?T.slice(k,k+f):T,U=[],j=0;j<L.length;++j){var Q=L.charCodeAt(j);if(Q===45||Q===46||Q===95||Q===126||Q>=48&&Q<=57||Q>=65&&Q<=90||Q>=97&&Q<=122||R===e.RFC1738&&(Q===40||Q===41)){U[U.length]=L.charAt(j);continue}if(Q<128){U[U.length]=o[Q];continue}if(Q<2048){U[U.length]=o[192|Q>>6]+o[128|Q&63];continue}if(Q<55296||Q>=57344){U[U.length]=o[224|Q>>12]+o[128|Q>>6&63]+o[128|Q&63];continue}j+=1,Q=65536+((Q&1023)<<10|L.charCodeAt(j)&1023),U[U.length]=o[240|Q>>18]+o[128|Q>>12&63]+o[128|Q>>6&63]+o[128|Q&63]}$+=U.join("")}return $},y=function(_){for(var M=[{obj:{o:_},prop:"o"}],A=[],I=0;I<M.length;++I)for(var R=M[I],T=R.obj[R.prop],$=Object.keys(T),k=0;k<$.length;++k){var L=$[k],U=T[L];typeof U=="object"&&U!==null&&A.indexOf(U)===-1&&(M.push({obj:T,prop:L}),A.push(U))}return s(M),_},g=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},b=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},w=function(_,M){return[].concat(_,M)},B=function(_,M){if(n(_)){for(var A=[],I=0;I<_.length;I+=1)A.push(M(_[I]));return A}return M(_)};return Md={arrayToObject:u,assign:c,combine:w,compact:y,decode:h,encode:p,isBuffer:b,isRegExp:g,maybeMap:B,merge:l},Md}function nG(){if(zA)return Ud;zA=!0;var e=rG(),t=s6(),n=Iw(),o=Object.prototype.hasOwnProperty,s={brackets:function(B){return B+"[]"},comma:"comma",indices:function(B,_){return B+"["+_+"]"},repeat:function(B){return B}},u=Array.isArray,l=Array.prototype.push,c=function(B,_){l.apply(B,u(_)?_:[_])},h=Date.prototype.toISOString,f=n.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,format:f,formatter:n.formatters[f],indices:!1,serializeDate:function(B){return h.call(B)},skipNulls:!1,strictNullHandling:!1},y=function(B){return typeof B=="string"||typeof B=="number"||typeof B=="boolean"||typeof B=="symbol"||typeof B=="bigint"},g={},b=function B(_,M,A,I,R,T,$,k,L,U,j,Q,P,re,le,oe,X,te){for(var pe=_,ue=te,J=0,G=!1;(ue=ue.get(g))!==void 0&&!G;){var H=ue.get(_);if(J+=1,typeof H<"u"){if(H===J)throw new RangeError("Cyclic object value");G=!0}typeof ue.get(g)>"u"&&(J=0)}if(typeof U=="function"?pe=U(M,pe):pe instanceof Date?pe=P(pe):A==="comma"&&u(pe)&&(pe=t.maybeMap(pe,function(ee){return ee instanceof Date?P(ee):ee})),pe===null){if(T)return L&&!oe?L(M,p.encoder,X,"key",re):M;pe=""}if(y(pe)||t.isBuffer(pe)){if(L){var K=oe?M:L(M,p.encoder,X,"key",re);return[le(K)+"="+le(L(pe,p.encoder,X,"value",re))]}return[le(M)+"="+le(String(pe))]}var W=[];if(typeof pe>"u")return W;var z;if(A==="comma"&&u(pe))oe&&L&&(pe=t.maybeMap(pe,L)),z=[{value:pe.length>0?pe.join(",")||null:void 0}];else if(u(U))z=U;else{var fe=Object.keys(pe);z=j?fe.sort(j):fe}var ae=k?M.replace(/\./g,"%2E"):M,ne=I&&u(pe)&&pe.length===1?ae+"[]":ae;if(R&&u(pe)&&pe.length===0)return ne+"[]";for(var Z=0;Z<z.length;++Z){var F=z[Z],q=typeof F=="object"&&typeof F.value<"u"?F.value:pe[F];if(!($&&q===null)){var Y=Q&&k?F.replace(/\./g,"%2E"):F,se=u(pe)?typeof A=="function"?A(ne,Y):ne:ne+(Q?"."+Y:"["+Y+"]");te.set(_,J);var ye=e();ye.set(g,te),c(W,B(q,se,A,I,R,T,$,k,A==="comma"&&oe&&u(pe)?null:L,U,j,Q,P,re,le,oe,X,ye))}}return W},w=function(B){if(!B)return p;if(typeof B.allowEmptyArrays<"u"&&typeof B.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof B.encodeDotInKeys<"u"&&typeof B.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(B.encoder!==null&&typeof B.encoder<"u"&&typeof B.encoder!="function")throw new TypeError("Encoder has to be a function.");var _=B.charset||p.charset;if(typeof B.charset<"u"&&B.charset!=="utf-8"&&B.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var M=n.default;if(typeof B.format<"u"){if(!o.call(n.formatters,B.format))throw new TypeError("Unknown format option provided.");M=B.format}var A=n.formatters[M],I=p.filter;(typeof B.filter=="function"||u(B.filter))&&(I=B.filter);var R;if(B.arrayFormat in s?R=B.arrayFormat:"indices"in B?R=B.indices?"indices":"repeat":R=p.arrayFormat,"commaRoundTrip"in B&&typeof B.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof B.allowDots>"u"?B.encodeDotInKeys===!0?!0:p.allowDots:!!B.allowDots;return{addQueryPrefix:typeof B.addQueryPrefix=="boolean"?B.addQueryPrefix:p.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof B.allowEmptyArrays=="boolean"?!!B.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:R,charset:_,charsetSentinel:typeof B.charsetSentinel=="boolean"?B.charsetSentinel:p.charsetSentinel,commaRoundTrip:B.commaRoundTrip,delimiter:typeof B.delimiter>"u"?p.delimiter:B.delimiter,encode:typeof B.encode=="boolean"?B.encode:p.encode,encodeDotInKeys:typeof B.encodeDotInKeys=="boolean"?B.encodeDotInKeys:p.encodeDotInKeys,encoder:typeof B.encoder=="function"?B.encoder:p.encoder,encodeValuesOnly:typeof B.encodeValuesOnly=="boolean"?B.encodeValuesOnly:p.encodeValuesOnly,filter:I,format:M,formatter:A,serializeDate:typeof B.serializeDate=="function"?B.serializeDate:p.serializeDate,skipNulls:typeof B.skipNulls=="boolean"?B.skipNulls:p.skipNulls,sort:typeof B.sort=="function"?B.sort:null,strictNullHandling:typeof B.strictNullHandling=="boolean"?B.strictNullHandling:p.strictNullHandling}};return Ud=function(B,_){var M=B,A=w(_),I,R;typeof A.filter=="function"?(R=A.filter,M=R("",M)):u(A.filter)&&(R=A.filter,I=R);var T=[];if(typeof M!="object"||M===null)return"";var $=s[A.arrayFormat],k=$==="comma"&&A.commaRoundTrip;I||(I=Object.keys(M)),A.sort&&I.sort(A.sort);for(var L=e(),U=0;U<I.length;++U){var j=I[U];A.skipNulls&&M[j]===null||c(T,b(M[j],j,$,k,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,L))}var Q=T.join(A.delimiter),P=A.addQueryPrefix===!0?"?":"";return A.charsetSentinel&&(A.charset==="iso-8859-1"?P+="utf8=%26%2310003%3B&":P+="utf8=%E2%9C%93&"),Q.length>0?P+Q:""},Ud}function iG(){if($A)return jd;$A=!0;var e=s6(),t=Object.prototype.hasOwnProperty,n=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},s=function(g){return g.replace(/&#(\d+);/g,function(b,w){return String.fromCharCode(parseInt(w,10))})},u=function(g,b){return g&&typeof g=="string"&&b.comma&&g.indexOf(",")>-1?g.split(","):g},l="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",h=function(g,b){var w={__proto__:null},B=b.ignoreQueryPrefix?g.replace(/^\?/,""):g;B=B.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var _=b.parameterLimit===1/0?void 0:b.parameterLimit,M=B.split(b.delimiter,_),A=-1,I,R=b.charset;if(b.charsetSentinel)for(I=0;I<M.length;++I)M[I].indexOf("utf8=")===0&&(M[I]===c?R="utf-8":M[I]===l&&(R="iso-8859-1"),A=I,I=M.length);for(I=0;I<M.length;++I)if(I!==A){var T=M[I],$=T.indexOf("]="),k=$===-1?T.indexOf("="):$+1,L,U;k===-1?(L=b.decoder(T,o.decoder,R,"key"),U=b.strictNullHandling?null:""):(L=b.decoder(T.slice(0,k),o.decoder,R,"key"),U=e.maybeMap(u(T.slice(k+1),b),function(Q){return b.decoder(Q,o.decoder,R,"value")})),U&&b.interpretNumericEntities&&R==="iso-8859-1"&&(U=s(U)),T.indexOf("[]=")>-1&&(U=n(U)?[U]:U);var j=t.call(w,L);j&&b.duplicates==="combine"?w[L]=e.combine(w[L],U):(!j||b.duplicates==="last")&&(w[L]=U)}return w},f=function(g,b,w,B){for(var _=B?b:u(b,w),M=g.length-1;M>=0;--M){var A,I=g[M];if(I==="[]"&&w.parseArrays)A=w.allowEmptyArrays&&(_===""||w.strictNullHandling&&_===null)?[]:[].concat(_);else{A=w.plainObjects?Object.create(null):{};var R=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,T=w.decodeDotInKeys?R.replace(/%2E/g,"."):R,$=parseInt(T,10);!w.parseArrays&&T===""?A={0:_}:!isNaN($)&&I!==T&&String($)===T&&$>=0&&w.parseArrays&&$<=w.arrayLimit?(A=[],A[$]=_):T!=="__proto__"&&(A[T]=_)}_=A}return _},p=function(g,b,w,B){if(g){var _=w.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g,M=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,I=w.depth>0&&M.exec(_),R=I?_.slice(0,I.index):_,T=[];if(R){if(!w.plainObjects&&t.call(Object.prototype,R)&&!w.allowPrototypes)return;T.push(R)}for(var $=0;w.depth>0&&(I=A.exec(_))!==null&&$<w.depth;){if($+=1,!w.plainObjects&&t.call(Object.prototype,I[1].slice(1,-1))&&!w.allowPrototypes)return;T.push(I[1])}if(I){if(w.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+w.depth+" and strictDepth is true");T.push("["+_.slice(I.index)+"]")}return f(T,b,w,B)}},y=function(g){if(!g)return o;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=typeof g.charset>"u"?o.charset:g.charset,w=typeof g.duplicates>"u"?o.duplicates:g.duplicates;if(w!=="combine"&&w!=="first"&&w!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var B=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:o.allowDots:!!g.allowDots;return{allowDots:B,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:o.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:o.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:o.arrayLimit,charset:b,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:o.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:o.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:o.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:o.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:o.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:o.depth,duplicates:w,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:o.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:o.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:o.strictDepth,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:o.strictNullHandling}};return jd=function(g,b){var w=y(b);if(g===""||g===null||typeof g>"u")return w.plainObjects?Object.create(null):{};for(var B=typeof g=="string"?h(g,w):g,_=w.plainObjects?Object.create(null):{},M=Object.keys(B),A=0;A<M.length;++A){var I=M[A],R=p(I,B[I],w,typeof g=="string");_=e.merge(_,R,w)}return w.allowSparse===!0?_:e.compact(_)},jd}function oG(){if(qA)return Dd;qA=!0;var e=nG(),t=iG(),n=Iw();return Dd={formats:n,parse:t,stringify:e},Dd}function sG(){if(HA)return Fs;HA=!0;var e=Cs;function t(){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}var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["<",">",'"',"`"," ","\r",`
|
|
148
|
+
`," "],l=["{","}","|","\\","^","`"].concat(u),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},B={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=oG();function M(T,$,k){if(T&&typeof T=="object"&&T instanceof t)return T;var L=new t;return L.parse(T,$,k),L}t.prototype.parse=function(T,$,k){if(typeof T!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof T);var L=T.indexOf("?"),U=L!==-1&&L<T.indexOf("#")?"?":"#",j=T.split(U),Q=/\\/g;j[0]=j[0].replace(Q,"/"),T=j.join(U);var P=T;if(P=P.trim(),!k&&T.split("#").length===1){var re=s.exec(P);if(re)return this.path=P,this.href=P,this.pathname=re[1],re[2]?(this.search=re[2],$?this.query=_.parse(this.search.substr(1)):this.query=this.search.substr(1)):$&&(this.search="",this.query={}),this}var le=n.exec(P);if(le){le=le[0];var oe=le.toLowerCase();this.protocol=oe,P=P.substr(le.length)}if(k||le||P.match(/^\/\/[^@/]+@[^@/]+/)){var X=P.substr(0,2)==="//";X&&!(le&&w[le])&&(P=P.substr(2),this.slashes=!0)}if(!w[le]&&(X||le&&!B[le])){for(var te=-1,pe=0;pe<f.length;pe++){var ue=P.indexOf(f[pe]);ue!==-1&&(te===-1||ue<te)&&(te=ue)}var J,G;te===-1?G=P.lastIndexOf("@"):G=P.lastIndexOf("@",te),G!==-1&&(J=P.slice(0,G),P=P.slice(G+1),this.auth=decodeURIComponent(J)),te=-1;for(var pe=0;pe<h.length;pe++){var ue=P.indexOf(h[pe]);ue!==-1&&(te===-1||ue<te)&&(te=ue)}te===-1&&(te=P.length),this.host=P.slice(0,te),P=P.slice(te),this.parseHost(),this.hostname=this.hostname||"";var H=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!H)for(var K=this.hostname.split(/\./),pe=0,W=K.length;pe<W;pe++){var z=K[pe];if(z&&!z.match(y)){for(var fe="",ae=0,ne=z.length;ae<ne;ae++)z.charCodeAt(ae)>127?fe+="x":fe+=z[ae];if(!fe.match(y)){var Z=K.slice(0,pe),F=K.slice(pe+1),q=z.match(g);q&&(Z.push(q[1]),F.unshift(q[2])),F.length&&(P="/"+F.join(".")+P),this.hostname=Z.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),H||(this.hostname=e.toASCII(this.hostname));var Y=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+Y,this.href+=this.host,H&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),P[0]!=="/"&&(P="/"+P))}if(!b[oe])for(var pe=0,W=c.length;pe<W;pe++){var ye=c[pe];if(P.indexOf(ye)!==-1){var ee=encodeURIComponent(ye);ee===ye&&(ee=escape(ye)),P=P.split(ye).join(ee)}}var S=P.indexOf("#");S!==-1&&(this.hash=P.substr(S),P=P.slice(0,S));var v=P.indexOf("?");if(v!==-1?(this.search=P.substr(v),this.query=P.substr(v+1),$&&(this.query=_.parse(this.query)),P=P.slice(0,v)):$&&(this.search="",this.query={}),P&&(this.pathname=P),B[oe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Y=this.pathname||"",C=this.search||"";this.path=Y+C}return this.href=this.format(),this};function A(T){return typeof T=="string"&&(T=M(T)),T instanceof t?T.format():t.prototype.format.call(T)}t.prototype.format=function(){var T=this.auth||"";T&&(T=encodeURIComponent(T),T=T.replace(/%3A/i,":"),T+="@");var $=this.protocol||"",k=this.pathname||"",L=this.hash||"",U=!1,j="";this.host?U=T+this.host:this.hostname&&(U=T+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(U+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(j=_.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var Q=this.search||j&&"?"+j||"";return $&&$.substr(-1)!==":"&&($+=":"),this.slashes||(!$||B[$])&&U!==!1?(U="//"+(U||""),k&&k.charAt(0)!=="/"&&(k="/"+k)):U||(U=""),L&&L.charAt(0)!=="#"&&(L="#"+L),Q&&Q.charAt(0)!=="?"&&(Q="?"+Q),k=k.replace(/[?#]/g,function(P){return encodeURIComponent(P)}),Q=Q.replace("#","%23"),$+U+k+Q+L};function I(T,$){return M(T,!1,!0).resolve($)}t.prototype.resolve=function(T){return this.resolveObject(M(T,!1,!0)).format()};function R(T,$){return T?M(T,!1,!0).resolveObject($):$}return t.prototype.resolveObject=function(T){if(typeof T=="string"){var $=new t;$.parse(T,!1,!0),T=$}for(var k=new t,L=Object.keys(this),U=0;U<L.length;U++){var j=L[U];k[j]=this[j]}if(k.hash=T.hash,T.href==="")return k.href=k.format(),k;if(T.slashes&&!T.protocol){for(var Q=Object.keys(T),P=0;P<Q.length;P++){var re=Q[P];re!=="protocol"&&(k[re]=T[re])}return B[k.protocol]&&k.hostname&&!k.pathname&&(k.pathname="/",k.path=k.pathname),k.href=k.format(),k}if(T.protocol&&T.protocol!==k.protocol){if(!B[T.protocol]){for(var le=Object.keys(T),oe=0;oe<le.length;oe++){var X=le[oe];k[X]=T[X]}return k.href=k.format(),k}if(k.protocol=T.protocol,!T.host&&!w[T.protocol]){for(var W=(T.pathname||"").split("/");W.length&&!(T.host=W.shift()););T.host||(T.host=""),T.hostname||(T.hostname=""),W[0]!==""&&W.unshift(""),W.length<2&&W.unshift(""),k.pathname=W.join("/")}else k.pathname=T.pathname;if(k.search=T.search,k.query=T.query,k.host=T.host||"",k.auth=T.auth,k.hostname=T.hostname||T.host,k.port=T.port,k.pathname||k.search){var te=k.pathname||"",pe=k.search||"";k.path=te+pe}return k.slashes=k.slashes||T.slashes,k.href=k.format(),k}var ue=k.pathname&&k.pathname.charAt(0)==="/",J=T.host||T.pathname&&T.pathname.charAt(0)==="/",G=J||ue||k.host&&T.pathname,H=G,K=k.pathname&&k.pathname.split("/")||[],W=T.pathname&&T.pathname.split("/")||[],z=k.protocol&&!B[k.protocol];if(z&&(k.hostname="",k.port=null,k.host&&(K[0]===""?K[0]=k.host:K.unshift(k.host)),k.host="",T.protocol&&(T.hostname=null,T.port=null,T.host&&(W[0]===""?W[0]=T.host:W.unshift(T.host)),T.host=null),G=G&&(W[0]===""||K[0]==="")),J)k.host=T.host||T.host===""?T.host:k.host,k.hostname=T.hostname||T.hostname===""?T.hostname:k.hostname,k.search=T.search,k.query=T.query,K=W;else if(W.length)K||(K=[]),K.pop(),K=K.concat(W),k.search=T.search,k.query=T.query;else if(T.search!=null){if(z){k.host=K.shift(),k.hostname=k.host;var fe=k.host&&k.host.indexOf("@")>0?k.host.split("@"):!1;fe&&(k.auth=fe.shift(),k.hostname=fe.shift(),k.host=k.hostname)}return k.search=T.search,k.query=T.query,(k.pathname!==null||k.search!==null)&&(k.path=(k.pathname?k.pathname:"")+(k.search?k.search:"")),k.href=k.format(),k}if(!K.length)return k.pathname=null,k.search?k.path="/"+k.search:k.path=null,k.href=k.format(),k;for(var ae=K.slice(-1)[0],ne=(k.host||T.host||K.length>1)&&(ae==="."||ae==="..")||ae==="",Z=0,F=K.length;F>=0;F--)ae=K[F],ae==="."?K.splice(F,1):ae===".."?(K.splice(F,1),Z++):Z&&(K.splice(F,1),Z--);if(!G&&!H)for(;Z--;Z)K.unshift("..");G&&K[0]!==""&&(!K[0]||K[0].charAt(0)!=="/")&&K.unshift(""),ne&&K.join("/").substr(-1)!=="/"&&K.push("");var q=K[0]===""||K[0]&&K[0].charAt(0)==="/";if(z){k.hostname=q?"":K.length?K.shift():"",k.host=k.hostname;var fe=k.host&&k.host.indexOf("@")>0?k.host.split("@"):!1;fe&&(k.auth=fe.shift(),k.hostname=fe.shift(),k.host=k.hostname)}return G=G||k.host&&K.length,G&&!q&&K.unshift(""),K.length>0?k.pathname=K.join("/"):(k.pathname=null,k.path=null),(k.pathname!==null||k.search!==null)&&(k.path=(k.pathname?k.pathname:"")+(k.search?k.search:"")),k.auth=T.auth||k.auth,k.slashes=k.slashes||T.slashes,k.href=k.format(),k},t.prototype.parseHost=function(){var T=this.host,$=o.exec(T);$&&($=$[0],$!==":"&&(this.port=$.substr(1)),T=T.substr(0,T.length-$.length)),T&&(this.hostname=T)},Fs.parse=M,Fs.resolve=I,Fs.resolveObject=R,Fs.format=A,Fs.Url=t,Fs}function a6(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return Gd?aG(e):uG(e)}function aG(e){let t=e.hostname,n=e.pathname;for(let o=0;o<n.length;o++)if(n[o]==="%"){let s=n.codePointAt(o+2)||32;if(n[o+1]==="2"&&s===102||n[o+1]==="5"&&s===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(n=n.replace(v6,"\\"),n=decodeURIComponent(n),t!=="")return`\\\\${t}${n}`;{let o=n.codePointAt(1)|32,s=n[2];if(o<b6||o>A6||s!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return n.slice(1)}}function uG(e){if(e.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let t=e.pathname;for(let n=0;n<t.length;n++)if(t[n]==="%"){let o=t.codePointAt(n+2)||32;if(t[n+1]==="2"&&o===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(t)}function u6(e){let t=DA.resolve(e),n=e.charCodeAt(e.length-1);(n===m6||Gd&&n===g6)&&t[t.length-1]!==DA.sep&&(t+="/");let o=new URL("file://");return t.includes("%")&&(t=t.replace(w6,"%25")),!Gd&&t.includes("\\")&&(t=t.replace(x6,"%5C")),t.includes(`
|
|
149
|
+
`)&&(t=t.replace(E6,"%0A")),t.includes("\r")&&(t=t.replace(S6,"%0D")),t.includes(" ")&&(t=t.replace(I6,"%09")),o.pathname=t,o}var l6,Od,NA,Bd,Td,PA,Rd,kA,Md,LA,Ud,zA,jd,$A,Dd,qA,Fs,HA,hn,_F,c6,f6,h6,d6,p6,y6,g6,m6,b6,A6,Gd,v6,w6,x6,E6,S6,I6,lG=kn(()=>{Pe(),Le(),ke(),_Q(),$Q(),eG(),i6(),l6=Object.freeze(Object.create(null)),Od={},NA=!1,Bd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:Z4,Td={},PA=!1,Rd={},kA=!1,Md={},LA=!1,Ud={},zA=!1,jd={},$A=!1,Dd={},qA=!1,Fs={},HA=!1,hn=sG(),hn.parse,hn.resolve,hn.resolveObject,hn.format,hn.Url,_F=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,hn.URL=typeof URL<"u"?URL:null,hn.pathToFileURL=u6,hn.fileURLToPath=a6,c6=hn.Url,f6=hn.format,h6=hn.resolve,d6=hn.resolveObject,p6=hn.parse,y6=hn.URL,g6=92,m6=47,b6=97,A6=122,Gd=_F==="win32",v6=/\//g,w6=/%/g,x6=/\\/g,E6=/\n/g,S6=/\r/g,I6=/\t/g}),cG=qe((e,t)=>{Pe(),Le(),ke(),t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),_w=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=void 0,e.writev=o;var t=ka(),n=(Kr(),Yt(Gr));function o(u,l){let c=new Array(u.length);for(let h=0;h<u.length;h++)typeof u[h].chunk=="string"?c[h]=n.Buffer.from(u[h].chunk,"utf8"):c[h]=u[h].chunk;this._write(n.Buffer.concat(c),"binary",l)}var s=class extends t.Duplex{constructor(l,c,h){super({objectMode:!0});rt(this,"socket");rt(this,"proxy");rt(this,"isSocketOpen");rt(this,"writeQueue");this.proxy=c,this.socket=h,this.writeQueue=[],l.objectMode||(this._writev=o.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",f=>{!this.destroyed&&this.readable&&this.push(f)})}_read(l){this.proxy.read(l)}_write(l,c,h){this.isSocketOpen?this.writeToProxy(l,c,h):this.writeQueue.push({chunk:l,encoding:c,cb:h})}_final(l){this.writeQueue=[],this.proxy.end(l)}_destroy(l,c){this.writeQueue=[],this.proxy.destroy(),c(l)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(l,c,h){this.proxy.write(l,c)===!1?this.proxy.once("drain",h):h()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:l,encoding:c,cb:h}=this.writeQueue.shift();this.writeToProxy(l,c,h)}}};e.BufferedDuplex=s}),Jh=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var n=(Kr(),Yt(Gr)),o=t(cG()),s=t($o()),u=ka(),l=t(qp()),c=_w(),h=(0,s.default)("mqttjs:ws"),f=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function p(M,A){let I=`${M.protocol}://${M.hostname}:${M.port}${M.path}`;return typeof M.transformWsUrl=="function"&&(I=M.transformWsUrl(I,M,A)),I}function y(M){let A=M;return M.port||(M.protocol==="wss"?A.port=443:A.port=80),M.path||(A.path="/"),M.wsOptions||(A.wsOptions={}),!l.default&&!M.forceNativeWebSocket&&M.protocol==="wss"&&f.forEach(I=>{Object.prototype.hasOwnProperty.call(M,I)&&!Object.prototype.hasOwnProperty.call(M.wsOptions,I)&&(A.wsOptions[I]=M[I])}),A}function g(M){let A=y(M);if(A.hostname||(A.hostname=A.host),!A.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let I=new URL(document.URL);A.hostname=I.hostname,A.port||(A.port=Number(I.port))}return A.objectMode===void 0&&(A.objectMode=!(A.binary===!0||A.binary===void 0)),A}function b(M,A,I){h("createWebSocket"),h(`protocol: ${I.protocolId} ${I.protocolVersion}`);let R=I.protocolId==="MQIsdp"&&I.protocolVersion===3?"mqttv3.1":"mqtt";h(`creating new Websocket for url: ${A} and protocol: ${R}`);let T;return I.createWebsocket?T=I.createWebsocket(A,[R],I):T=new o.default(A,[R],I.wsOptions),T}function w(M,A){let I=A.protocolId==="MQIsdp"&&A.protocolVersion===3?"mqttv3.1":"mqtt",R=p(A,M),T;return A.createWebsocket?T=A.createWebsocket(R,[I],A):T=new WebSocket(R,[I]),T.binaryType="arraybuffer",T}var B=(M,A)=>{h("streamBuilder");let I=y(A);I.hostname=I.hostname||I.host||"localhost";let R=p(I,M),T=b(M,R,I),$=o.default.createWebSocketStream(T,I.wsOptions);return $.url=R,T.on("close",()=>{$.destroy()}),$};e.streamBuilder=B;var _=(M,A)=>{h("browserStreamBuilder");let I,R=g(A).browserBufferSize||1024*512,T=A.browserBufferTimeout||1e3,$=!A.objectMode,k=w(M,A),L=j(A,oe,X);A.objectMode||(L._writev=c.writev.bind(L)),L.on("close",()=>{k.close()});let U=typeof k.addEventListener<"u";k.readyState===k.OPEN?(I=L,I.socket=k):(I=new c.BufferedDuplex(A,L,k),U?k.addEventListener("open",Q):k.onopen=Q),U?(k.addEventListener("close",P),k.addEventListener("error",re),k.addEventListener("message",le)):(k.onclose=P,k.onerror=re,k.onmessage=le);function j(te,pe,ue){let J=new u.Transform({objectMode:te.objectMode});return J._write=pe,J._flush=ue,J}function Q(){h("WebSocket onOpen"),I instanceof c.BufferedDuplex&&I.socketReady()}function P(te){h("WebSocket onClose",te),I.end(),I.destroy()}function re(te){h("WebSocket onError",te);let pe=new Error("WebSocket error");pe.event=te,I.destroy(pe)}async function le(te){if(!L||!L.readable||!L.writable)return;let{data:pe}=te;pe instanceof ArrayBuffer?pe=n.Buffer.from(pe):pe instanceof Blob?pe=n.Buffer.from(await new Response(pe).arrayBuffer()):pe=n.Buffer.from(pe,"utf8"),L.push(pe)}function oe(te,pe,ue){if(k.bufferedAmount>R){setTimeout(oe,T,te,pe,ue);return}$&&typeof te=="string"&&(te=n.Buffer.from(te,"utf8"));try{k.send(te)}catch(J){return ue(J)}ue()}function X(te){k.close(),te()}return I};e.browserStreamBuilder=_}),Cw={};al(Cw,{Server:()=>ir,Socket:()=>ir,Stream:()=>ir,_createServerHandle:()=>ir,_normalizeArgs:()=>ir,_setSimultaneousAccepts:()=>ir,connect:()=>ir,createConnection:()=>ir,createServer:()=>ir,default:()=>_6,isIP:()=>ir,isIPv4:()=>ir,isIPv6:()=>ir});function ir(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var _6,C6=kn(()=>{Pe(),Le(),ke(),_6={_createServerHandle:ir,_normalizeArgs:ir,_setSimultaneousAccepts:ir,connect:ir,createConnection:ir,createServer:ir,isIP:ir,isIPv4:ir,isIPv6:ir,Server:ir,Socket:ir,Stream:ir}}),F6=qe((e,t)=>{Pe(),Le(),ke(),t.exports={}}),CF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0});var n=t((C6(),Yt(Cw))),o=t($o()),s=t(F6()),u=(0,o.default)("mqttjs:tcp"),l=(c,h)=>{if(h.port=h.port||1883,h.hostname=h.hostname||h.host||"localhost",h.socksProxy)return(0,s.default)(h.hostname,h.port,h.socksProxy,{timeout:h.socksTimeout});let{port:f,path:p}=h,y=h.hostname;return u("port %d and host %s",f,y),n.default.createConnection({port:f,host:y,path:p})};e.default=l}),O6={};al(O6,{default:()=>B6});var B6,fG=kn(()=>{Pe(),Le(),ke(),B6={}}),FF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0});var n=(fG(),Yt(O6)),o=t((C6(),Yt(Cw))),s=t($o()),u=t(F6()),l=(0,s.default)("mqttjs:tls");function c(f){let{host:p,port:y,socksProxy:g,...b}=f;if(g!==void 0){let w=(0,u.default)(p,y,g,{timeout:f.socksTimeout});return(0,n.connect)({...b,socket:w})}return(0,n.connect)(f)}var h=(f,p)=>{p.port=p.port||8883,p.host=p.hostname||p.host||"localhost",o.default.isIP(p.host)===0&&(p.servername=p.host),p.rejectUnauthorized=p.rejectUnauthorized!==!1,delete p.path,l("port %d host %s rejectUnauthorized %b",p.port,p.host,p.rejectUnauthorized);let y=c(p);y.on("secureConnect",()=>{p.rejectUnauthorized&&!y.authorized?y.emit("error",new Error("TLS not authorized")):y.removeListener("error",g)});function g(b){p.rejectUnauthorized&&f.emit("error",b),y.end()}return y.on("error",g),y};e.default=h}),OF=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(Kr(),Yt(Gr)),n=ka(),o=_w(),s,u,l;function c(){let g=new n.Transform;return g._write=(b,w,B)=>{s.send({data:b.buffer,success(){B()},fail(_){B(new Error(_))}})},g._flush=b=>{s.close({success(){b()}})},g}function h(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function f(g,b){let w=g.protocol==="wxs"?"wss":"ws",B=`${w}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(B=`${w}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(B=g.transformWsUrl(B,g,b)),B}function p(){s.onOpen(()=>{l.socketReady()}),s.onMessage(g=>{let{data:b}=g;b instanceof ArrayBuffer?b=t.Buffer.from(b):b=t.Buffer.from(b,"utf8"),u.push(b)}),s.onClose(()=>{l.emit("close"),l.end(),l.destroy()}),s.onError(g=>{let b=new Error(g.errMsg);l.destroy(b)})}var y=(g,b)=>{if(b.hostname=b.hostname||b.host,!b.hostname)throw new Error("Could not determine host. Specify host manually.");let w=b.protocolId==="MQIsdp"&&b.protocolVersion===3?"mqttv3.1":"mqtt";h(b);let B=f(b,g);s=wx.connectSocket({url:B,protocols:[w]}),u=c(),l=new o.BufferedDuplex(b,u,s),l._destroy=(M,A)=>{s.close({success(){A&&A(M)}})};let _=l.destroy;return l.destroy=(M,A)=>(l.destroy=_,setTimeout(()=>{s.close({fail(){l._destroy(M,A)}})},0),l),p(),l};e.default=y}),BF=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(Kr(),Yt(Gr)),n=ka(),o=_w(),s,u,l,c=!1;function h(){let b=new n.Transform;return b._write=(w,B,_)=>{s.sendSocketMessage({data:w.buffer,success(){_()},fail(){_(new Error)}})},b._flush=w=>{s.closeSocket({success(){w()}})},b}function f(b){b.hostname||(b.hostname="localhost"),b.path||(b.path="/"),b.wsOptions||(b.wsOptions={})}function p(b,w){let B=b.protocol==="alis"?"wss":"ws",_=`${B}://${b.hostname}${b.path}`;return b.port&&b.port!==80&&b.port!==443&&(_=`${B}://${b.hostname}:${b.port}${b.path}`),typeof b.transformWsUrl=="function"&&(_=b.transformWsUrl(_,b,w)),_}function y(){c||(c=!0,s.onSocketOpen(()=>{l.socketReady()}),s.onSocketMessage(b=>{if(typeof b.data=="string"){let w=t.Buffer.from(b.data,"base64");u.push(w)}else{let w=new FileReader;w.addEventListener("load",()=>{if(w.result instanceof ArrayBuffer){u.push(t.Buffer.from(w.result));return}u.push(t.Buffer.from(w.result,"utf-8"))}),w.readAsArrayBuffer(b.data)}}),s.onSocketClose(()=>{l.end(),l.destroy()}),s.onSocketError(b=>{l.destroy(b)}))}var g=(b,w)=>{if(w.hostname=w.hostname||w.host,!w.hostname)throw new Error("Could not determine host. Specify host manually.");let B=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt";f(w);let _=p(w,b);return s=w.my,s.connectSocket({url:_,protocols:B}),u=h(),l=new o.BufferedDuplex(w,u,s),y(),l};e.default=g}),hG=qe(e=>{Pe(),Le(),ke();var t=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.connectAsync=p;var n=t($o()),o=t((lG(),Yt(o6))),s=t(iA()),u=t(qp());typeof(Nt==null?void 0:Nt.nextTick)!="function"&&(Nt.nextTick=setImmediate);var l=(0,n.default)("mqttjs"),c=null;function h(y){let g;if(y.auth)if(g=y.auth.match(/^(.+):(.+)$/),g){let[,b,w]=g;y.username=b,y.password=w}else y.username=y.auth}function f(y,g){var B,_,M;if(l("connecting to an MQTT broker..."),typeof y=="object"&&!g&&(g=y,y=""),g=g||{},y&&typeof y=="string"){let A=o.default.parse(y,!0),I={};if(A.port!=null&&(I.port=Number(A.port)),I.host=A.hostname,I.query=A.query,I.auth=A.auth,I.protocol=A.protocol,I.path=A.path,g={...I,...g},!g.protocol)throw new Error("Missing protocol");g.protocol=g.protocol.replace(/:$/,"")}if(g.unixSocket=g.unixSocket||((B=g.protocol)==null?void 0:B.includes("+unix")),g.unixSocket?g.protocol=g.protocol.replace("+unix",""):!((_=g.protocol)!=null&&_.startsWith("ws"))&&!((M=g.protocol)!=null&&M.startsWith("wx"))&&delete g.path,h(g),g.query&&typeof g.query.clientId=="string"&&(g.clientId=g.query.clientId),u.default||g.unixSocket?g.socksProxy=void 0:g.socksProxy===void 0&&typeof Nt<"u"&&(g.socksProxy=Nt.env.MQTTJS_SOCKS_PROXY),g.cert&&g.key)if(g.protocol){if(["mqtts","wss","wxs","alis"].indexOf(g.protocol)===-1)switch(g.protocol){case"mqtt":g.protocol="mqtts";break;case"ws":g.protocol="wss";break;case"wx":g.protocol="wxs";break;case"ali":g.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${g.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(c||(c={},!u.default&&!g.forceNativeWebSocket?(c.ws=Jh().streamBuilder,c.wss=Jh().streamBuilder,c.mqtt=CF().default,c.tcp=CF().default,c.ssl=FF().default,c.tls=c.ssl,c.mqtts=FF().default):(c.ws=Jh().browserStreamBuilder,c.wss=Jh().browserStreamBuilder,c.wx=OF().default,c.wxs=OF().default,c.ali=BF().default,c.alis=BF().default)),!c[g.protocol]){let A=["mqtts","wss"].indexOf(g.protocol)!==-1;g.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((I,R)=>A&&R%2===0?!1:typeof c[I]=="function")[0]}if(g.clean===!1&&!g.clientId)throw new Error("Missing clientId for unclean clients");g.protocol&&(g.defaultProtocol=g.protocol);function b(A){return g.servers&&((!A._reconnectCount||A._reconnectCount===g.servers.length)&&(A._reconnectCount=0),g.host=g.servers[A._reconnectCount].host,g.port=g.servers[A._reconnectCount].port,g.protocol=g.servers[A._reconnectCount].protocol?g.servers[A._reconnectCount].protocol:g.defaultProtocol,g.hostname=g.host,A._reconnectCount++),l("calling streambuilder for",g.protocol),c[g.protocol](A,g)}let w=new s.default(b,g);return w.on("error",()=>{}),w}function p(y,g,b=!0){return new Promise((w,B)=>{let _=f(y,g),M={connect:I=>{A(),w(_)},end:()=>{A(),w(_)},error:I=>{A(),_.end(),B(I)}};b===!1&&(M.close=()=>{M.error(new Error("Couldn't connect to server"))});function A(){Object.keys(M).forEach(I=>{_.off(I,M[I])})}Object.keys(M).forEach(I=>{_.on(I,M[I])})})}e.default=f}),TF=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(b,w,B,_){_===void 0&&(_=B);var M=Object.getOwnPropertyDescriptor(w,B);(!M||("get"in M?!w.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return w[B]}}),Object.defineProperty(b,_,M)}:function(b,w,B,_){_===void 0&&(_=B),b[_]=w[B]}),n=e&&e.__setModuleDefault||(Object.create?function(b,w){Object.defineProperty(b,"default",{enumerable:!0,value:w})}:function(b,w){b.default=w}),o=e&&e.__importStar||(function(){var b=function(w){return b=Object.getOwnPropertyNames||function(B){var _=[];for(var M in B)Object.prototype.hasOwnProperty.call(B,M)&&(_[_.length]=M);return _},b(w)};return function(w){if(w&&w.__esModule)return w;var B={};if(w!=null)for(var _=b(w),M=0;M<_.length;M++)_[M]!=="default"&&t(B,w,_[M]);return n(B,w),B}})(),s=e&&e.__exportStar||function(b,w){for(var B in b)B!=="default"&&!Object.prototype.hasOwnProperty.call(w,B)&&t(w,b,B)},u=e&&e.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=e.KeepaliveManager=e.UniqueMessageIdProvider=e.DefaultMessageIdProvider=e.Store=e.MqttClient=e.connectAsync=e.connect=e.Client=void 0;var l=u(iA());e.MqttClient=l.default;var c=u(GT());e.DefaultMessageIdProvider=c.default;var h=u(SQ());e.UniqueMessageIdProvider=h.default;var f=u(OT());e.Store=f.default;var p=o(hG());e.connect=p.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return p.connectAsync}});var y=u(JT());e.KeepaliveManager=y.default,e.Client=l.default,s(iA(),e),s(ll(),e);var g=zp();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return g.ReasonCodes}})}),dG=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(l,c,h,f){f===void 0&&(f=h);var p=Object.getOwnPropertyDescriptor(c,h);(!p||("get"in p?!c.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return c[h]}}),Object.defineProperty(l,f,p)}:function(l,c,h,f){f===void 0&&(f=h),l[f]=c[h]}),n=e&&e.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),o=e&&e.__importStar||(function(){var l=function(c){return l=Object.getOwnPropertyNames||function(h){var f=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(f[f.length]=p);return f},l(c)};return function(c){if(c&&c.__esModule)return c;var h={};if(c!=null)for(var f=l(c),p=0;p<f.length;p++)f[p]!=="default"&&t(h,c,f[p]);return n(h,c),h}})(),s=e&&e.__exportStar||function(l,c){for(var h in l)h!=="default"&&!Object.prototype.hasOwnProperty.call(c,h)&&t(c,l,h)};Object.defineProperty(e,"__esModule",{value:!0});var u=o(TF());e.default=u,s(TF(),e)});const pG=dG();/*! Bundled license information:
|
|
150
|
+
|
|
151
|
+
@jspm/core/nodelibs/browser/chunk-DtuTasat.js:
|
|
152
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
153
|
+
|
|
154
|
+
safe-buffer/index.js:
|
|
155
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
156
|
+
|
|
157
|
+
@babel/runtime/helpers/regenerator.js:
|
|
158
|
+
(*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)
|
|
159
|
+
*/var T6=(e=>(e.Posting="posting",e.Finalizing="finalizing",e.Finalized="finalized",e.Rejected="rejected",e))(T6||{});const yG=dw({name:"BatcherHash",fields:[{name:"batch",type:je.String(),indexed:!0},{name:"status",type:je.Enum(T6),indexed:!0},{name:"blockHeight",type:je.Optional(je.Integer())},{name:"transactionHash",type:je.String()}]}),gG=dw({name:"RollupBlock",fields:[{name:"block",type:je.Integer(),indexed:!0},{name:"timestamp",type:je.Optional(je.Integer())}]}),mG=dw({name:"SyncChains",fields:[{name:"chain",type:je.String(),indexed:!0},{name:"block",type:je.Integer(),indexed:!0},{name:"rollup",type:je.Integer(),indexed:!1}]}),R6=[[ld.Batcher,yG],[ld.Node,gG],[ld.Node,mG]],bG=e=>{let t={};for(const n of e)t[n[1].name]=eT(n[0],n[1]);return t},AG=e=>{let t={};for(const n of e)t[n[1].name]=eT(n[0],nH(n[1]));return t},QA=bG(R6);AG(R6);let RF=0;async function MF(e){await Qu.Instance.subscribe({topic:QA.RollupBlock,filter:{block:void 0}},t=>{RF=Math.max(t.block,RF)})}var ub,UF;function vG(){if(UF)return ub;UF=1;var e="/",t="+",n="#";ub={matches:s,extract:l,exec:o,fill:u,clean:c};function o(h,f){return s(h,f)?l(h,f):null}function s(h,f){for(var p=h.split(e),y=f.split(e),g=p.length,b=y.length,w=g-1,B=0;B<g;B++){var _=p[B],M=_[0],A=y[B];if(!(!A&&!_)){if(!A&&_!==n)return!1;if(M===n)return B===w;if(M!==t&&_!==A)return!1}}return g===b}function u(h,f){for(var p=h.split(e),y=p.length,g=[],b=0;b<y;b++){var w=p[b],B=w[0],_=w.slice(1),M=f[_];if(B===n){M!==void 0&&g.push([].concat(M).join(e));break}else B===t?g.push(""+M):g.push(w)}return g.join(e)}function l(h,f){for(var p={},y=h.split(e),g=f.split(e),b=y.length,w=0;w<b;w++){var B=y[w],_=B[0];if(B.length!==1)if(_===n){p[B.slice(1)]=g.slice(w);break}else _===t&&(p[B.slice(1)]=g[w])}return p}function c(h){for(var f=h.split(e),p=f.length,y=[],g=0;g<p;g++){var b=f[g],w=b[0];w===n?y.push(n):w===t?y.push(t):y.push(b)}return y.join("/")}return ub}var jF=vG();const DF={MQTT_ENGINE_BROKER_URL:"ws://localhost:8883",MQTT_BATCHER_BROKER_URL:"ws://localhost:8884"},Co=class Co{constructor(){this.getClient.bind(this),this.setupClient.bind(this),this.connectPaimaEngine.bind(this),this.connectBatcher.bind(this)}async getClient(t){switch(t){case ha.PaimaEngine:return await this.connectPaimaEngine();case ha.Batcher:return await this.connectBatcher()}}async setupClient(t){const n=await pG.connectAsync(t);return n.on("message",(o,s)=>{for(const[u,l]of Object.entries(Qu.Instance.callbacksForTopic))for(const[c,h]of Object.entries(l))if(jF.matches(c,o))for(const f of Object.getOwnPropertySymbols(h).map(p=>h[p])){const p=JSON.parse(s.toString()),y=jF.extract(iH(f.event.path),o);f.callback({val:p,resolvedPath:y})}}),n}async connectPaimaEngine(){return Co.clients.engine||(ha.PaimaEngine,Co.clients.engine=await this.setupClient(DF.MQTT_ENGINE_BROKER_URL),await MF()),Co.clients.engine}async connectBatcher(){return Co.clients.batcher||(ha.Batcher,Co.clients.batcher=await this.setupClient(DF.MQTT_BATCHER_BROKER_URL),await MF()),Co.clients.batcher}};Co.clients={};let Ac=Co;const Vd=class Vd{constructor(){this.callbacksForTopic={[ha.PaimaEngine]:{},[ha.Batcher]:{}},this.symbolToSubscription={},this.subscribe.bind(this),this.subscribeExplicit.bind(this),this.unsubscribe.bind(this),this.sendMessage.bind(this),this.sendMessageExplicit.bind(this)}async subscribe(t,n){return await this.subscribeExplicit({topic:t.topic,filter:t.filter},({val:o,resolvedPath:s})=>n({...o,...s}))}async subscribeExplicit(t,n){const o=await new Ac().getClient(t.topic.broker),s=xC(t.topic.path,t.filter),u=async()=>{try{await o.subscribeAsync(s,{qos:2})}catch(h){console.log(`MQTT[${t.topic.broker}] ERROR`,h)}};o.connected?await u():await new Promise(h=>{o.on("connect",async()=>{await u(),h()})});const l=Symbol(s);this.symbolToSubscription[l]={broker:t.topic.broker,topic:s};const c=this.callbacksForTopic[t.topic.broker][s]??{};return c[l]={callback:n,event:t.topic},this.callbacksForTopic[t.topic.broker][s]=c,l}async unsubscribe(t){const{topic:n,broker:o}=this.symbolToSubscription[t];if(n==null){console.error("Subscription not found",t.description);return}delete this.symbolToSubscription[t];const s=this.callbacksForTopic[o][n];if(delete s[t],Object.keys(s).length-1===0){const l=await new Ac().getClient(o);delete this.callbacksForTopic[o][n];const c=async()=>{try{await l.unsubscribeAsync(n)}catch(h){console.log(`MQTT[${o}] ERROR`,h)}};l.connected?await c():await new Promise(h=>{l.on("connect",async()=>{await c(),h()})})}}async sendMessage(t,n){const o=new Set(oH(t.path)),s=Object.fromEntries(Object.entries(n).filter(([l,c])=>o.has(l))),u=Object.fromEntries(Object.entries(n).filter(([l,c])=>!o.has(l)));return await this.sendMessageExplicit({topic:t,filter:s},u)}async sendMessageExplicit(t,n){const o=await new Ac().getClient(t.topic.broker),s=xC(t.topic.path,t.filter);await o.publishAsync(s,JSON.stringify(n),{qos:2})}};Vd.Instance=new Vd;let Qu=Vd;class _u{constructor(){this.latestBlock={},this.initializationPromise=null}static get Instance(){return _u._instance||(_u._instance=new _u),_u._instance}async waitForBlock(t="__main__",n){await this.ensureInitialized();const o=t;let s=this.latestBlock[o]??0;const u=Number(n??s+1);for(;s<u;)await new Promise(l=>setTimeout(l,500)),s=this.latestBlock[o]??0}getLatestBlock(t="__main__"){return this.latestBlock[t]??0}ensureInitialized(){return this.initializationPromise||(this.initializationPromise=this.initBlockSubscription()),this.initializationPromise}async initBlockSubscription(){console.log("Initializing block subscriptions..."),this.latestBlock.__main__=0,await Promise.all([Qu.Instance.subscribe({topic:QA.RollupBlock,filter:{block:void 0}},t=>{const n=isNaN(this.latestBlock.__main__)?0:this.latestBlock.__main__;this.latestBlock.__main__=Math.max(Number(t.block),n)}),Qu.Instance.subscribe({topic:QA.SyncChains,filter:{chain:void 0,block:void 0}},t=>{const n=this.latestBlock[t.chain]||0;this.latestBlock[t.chain]=Math.max(t.block,n)})]),console.log("Block subscriptions initialized.")}}const NF=_u.Instance;function lb(){return"0x"+Array.from({length:64},()=>Math.floor(Math.random()*16).toString(16)).join("")}let wG=1e3;const xG=async(e,t,n,o)=>{const s=t===n?`${cI}/${encodeURIComponent(e)}/blocks?page=${t}`:`${cI}/${encodeURIComponent(e)}/blocks?from=${t}&to=${n}`,u=await fetch(s);if(!u.ok)return console.warn(`Failed to fetch blocks ${t}-${n} for ${e}: ${u.status}`),[];const l=await u.json(),c=l==null?void 0:l.blocks;return!c||!Array.isArray(c)?[]:c.map(h=>EG(h,o,t)).filter(h=>h!==null)},PF={EVM:e=>({number:Number(e.number),hash:e.hash??"",timestamp:e.timestamp!=null?new Date(Number(e.timestamp)*1e3):new Date}),MIDNIGHT:e=>{var s,u;const t=(s=e==null?void 0:e.header)==null?void 0:s.number,n=t?parseInt(t,16):void 0;return{number:Number(e.height??(n!==void 0?n:void 0)),hash:e.hash??((u=e.header)==null?void 0:u.parentHash)??"",timestamp:new Date}},CARDANO:e=>{var t,n,o,s,u,l;return{number:Number(((n=(t=e.block)==null?void 0:t.header)==null?void 0:n.height)??((o=e.header)==null?void 0:o.height)),hash:((u=(s=e.block)==null?void 0:s.header)==null?void 0:u.hash)??((l=e.header)==null?void 0:l.hash)??"",timestamp:new Date(Number(e.timestamp??0))}},DEFAULT:(e,t)=>({number:Number(e.blockNumber??t),hash:e.hash??"",timestamp:e.received_at!=null?new Date(Number(e.received_at)):new Date}),AVAIL:e=>({number:Number(e.number),hash:e.hash??"",timestamp:e.received_at!=null?new Date(Number(e.received_at)):new Date})},EG=(e,t,n)=>{const s=(PF[t]??PF.DEFAULT)(e,n);return s.number==null||Number.isNaN(s.number)?null:s};function SG(){const[e,t]=Xe.useState({}),[n,o]=Xe.useState(!0),[s,u]=Xe.useState(null),[l,c]=Xe.useState({}),h=Xe.useRef(!1),f=Xe.useRef(!1),p=Xe.useRef(null),y=Xe.useRef({}),g=Xe.useCallback((A,I=e)=>{const R=I[A];if(!R)return;const T=R.rpcEndpoint?R.latestBlockNumber||0:R.currentBlock++,$=lb(),L={number:T,hash:$,timestamp:new Date};t(U=>{const j={...U},Q=j[A];return Q.blocks.some(re=>re.number===T)||(Q.blocks.unshift(L),Q.blocks.length>20&&(Q.blocks=Q.blocks.slice(0,20))),j}),c(U=>({...U,[A]:0})),setTimeout(()=>{c(U=>({...U,[A]:void 0}))},250)},[e]),b=Xe.useCallback(async()=>{o(!0),u(null);try{const A=await SD();wG=A.Paima.blockTime??1e3,t(A),console.log("✅ Loaded chain configs from API:",A)}catch(A){const I=A instanceof Error?A.message:"Unknown error";u(I),console.error("❌ Failed to load chain configs, using fallback:",I),t({})}finally{o(!1)}},[]),w=Xe.useCallback(A=>{t(I=>{const R={...I};return Object.keys(A).forEach(T=>{const $=R[T];if($&&!$.rpcEndpoint){const k=[];for(let L=-5;L<0;L++){const U=$.currentBlock+L,j=lb(),Q=new Date(Date.now()+L*($.blockTime??1e3));k.push({number:U,hash:j,timestamp:Q})}$.blocks=k.reverse(),$.currentBlock=$.currentBlock+1}}),R})},[]);Xe.useEffect(()=>{b()},[b]),Xe.useEffect(()=>{n||h.current||Object.keys(e).length!==0&&(w(e),h.current=!0)},[n]),Xe.useEffect(()=>{if(n||f.current||Object.keys(e).length===0)return;const A=[];return Object.keys(e).forEach(I=>{const R=e[I];if(!R.rpcEndpoint){const T=setInterval(()=>{g(I)},R.blockTime);A.push(T)}}),f.current=!0,()=>{A.forEach(I=>clearInterval(I)),f.current=!1}},[n]),Xe.useEffect(()=>{if(n)return;NF.waitForBlock("__main__");const A=setInterval(()=>{t(I=>{const R={...I};let T=!1;for(const $ in R){const k=R[$],L=$==="Paima"?"__main__":k.protocolName||$,U=NF.getLatestBlock(L);if(U>(k.latestBlockNumber||0)&&(T=!0,k.previousLatestBlockNumber=k.latestBlockNumber||0,k.latestBlockNumber=U,k.isConnected=!0,k.previousLatestBlockNumber>0)){const j=lb(),P={number:U,hash:j,timestamp:new Date};k.blocks.some(le=>le.number===U)||(k.blocks.unshift(P),k.blocks.length>20&&(k.blocks=k.blocks.slice(0,20)),c(le=>({...le,[$]:0})),setTimeout(()=>{c(le=>({...le,[$]:void 0}))},500))}}return T?{...R}:I})},500);return()=>clearInterval(A)},[n]),Xe.useEffect(()=>{if(n||p.current!=null)return;const A=()=>{const T=Object.entries(e).filter(([k])=>k!=="Paima");let $=Number.POSITIVE_INFINITY;for(const[,k]of T)typeof k.blockTime=="number"&&k.blockTime>0&&k.blockTime<$&&($=k.blockTime);return Number.isFinite($)?Math.max(1e3,$):1e4},I=async()=>{try{const T=await fetch(ID);if(!T.ok)throw new Error(`block-heights HTTP ${T.status}`);const $=await T.json(),k=[];for(const[L,U]of Object.entries(e)){if(L==="Paima")continue;const j=U.protocolName;if(!j)continue;const Q=$.find(re=>re.protocol_name===j);if(!Q||Q.synced_page==null)continue;const P=y.current[j]||0;if(!(Q.synced_page<=P))try{const re=[],le=await xG(j,Q.synced_page,Q.synced_page,U.type);re.push(...le),re.length>0&&(k.push({key:L,blocks:re}),y.current[j]=Q.synced_page)}catch{}}k.length>0&&t(L=>{const U={...L};for(const j of k){const Q=U[j.key];if(!Q||!j.blocks||j.blocks.length===0)continue;const P=j.blocks.filter(re=>!Q.blocks.some(le=>le.number===re.number));if(P.length>0){const re=P.sort((le,oe)=>oe.number-le.number);Q.blocks.unshift(...re),Q.blocks.length>20&&(Q.blocks=Q.blocks.slice(0,20))}}return U})}catch{}};I();const R=A();return console.log(`[Explorer] Engine block-heights polling interval resolved to ${R} ms`),p.current=setInterval(I,R),()=>{p.current!=null&&(clearInterval(p.current),p.current=null)}},[n]);const B=e.Paima,_=(B==null?void 0:B.latestBlockNumber)||0,M=(B==null?void 0:B.isConnected)||!1;return{chainConfigs:e,newBlockIndices:l,latestBlock:_,isConnected:M,isLoadingConfig:n,configError:s}}function IG(){const[t,n]=Xe.useState([]),[o,s]=Xe.useState([]),[u,l]=Xe.useState({}),[c,h]=Xe.useState({}),[f,p]=Xe.useState({}),[y,g]=Xe.useState({}),[b,w]=Xe.useState({}),[B,_]=Xe.useState({}),[M,A]=Xe.useState({}),I=Xe.useRef(!1),R=Xe.useRef([]),T=Xe.useRef([]),$=Xe.useRef({}),k=Xe.useRef({}),L=Xe.useRef({}),U=Xe.useRef({}),j=Xe.useRef(new Set),Q=Xe.useRef(new Set);Xe.useEffect(()=>{R.current=t},[t]),Xe.useEffect(()=>{T.current=o},[o]),Xe.useEffect(()=>{$.current=B},[B]),Xe.useEffect(()=>{k.current=M},[M]),Xe.useEffect(()=>{L.current=y},[y]),Xe.useEffect(()=>{U.current=b},[b]);const P=Xe.useCallback(Z=>Z.map(F=>({name:F.column_name,dataTypeID:25})),[]),re=Xe.useCallback((Z,F,q)=>{const Y=Array.isArray(Z)?Z:[];let se=[];return q&&q.length>0?se=P(q):Y.length>0&&(se=Object.keys(Y[0]).map(ye=>({name:ye,dataTypeID:25}))),{command:"SELECT",rowCount:Y.length,rows:Y,fields:se}},[P]),le=Xe.useCallback((Z,F,q)=>{const Y=Array.isArray(Z)?Z:[];let se=[];return q&&q.length>0?se=P(q):Y.length>0&&(se=Object.keys(Y[0]).map(ye=>({name:ye,dataTypeID:25}))),{command:"SELECT",rowCount:Y.length,rows:Y,fields:se}},[P]),oe=Xe.useCallback(async Z=>{try{if(j.current.has(Z))return null;const F=$.current[Z];if(F)return F;const q=await fetch(`${FD}/${Z}`);if(!q.ok){if(q.status===404)return console.log(`🚫 Schema for primitive ${Z} not found (404)`),j.current.add(Z),null;throw new Error(`HTTP error! status: ${q.status}`)}const Y=await q.json();return console.log(`📋 Fetched schema for ${Z}:`,Y),Y}catch(F){return console.error(`Error fetching schema for primitive ${Z}:`,F),null}},[]),X=Xe.useCallback(async Z=>{try{const F=await fetch(`${OD}/${Z}`);if(!F.ok){if(F.status===404)return console.log(`🚫 Schema for table ${Z} not found (404)`),null;throw new Error(`HTTP error! status: ${F.status}`)}const q=await F.json();return console.log(`📋 Fetched schema for ${Z}:`,q),q}catch(F){return console.error(`Error fetching schema for table ${Z}:`,F),null}},[]),te=Xe.useCallback(async()=>{try{const Z=await fetch(c3);if(!Z.ok)throw new Error(`HTTP error! status: ${Z.status}`);const F=await Z.json();return console.log("📋 Fetched config:",F),F}catch(Z){return console.error("Error fetching config:",Z),null}},[]),pe=Xe.useCallback(async()=>{try{const Z=await fetch(lI);if(!Z.ok)throw new Error(`HTTP error! status: ${Z.status}`);const F=await Z.json();return console.log("📋 Fetched user table names:",F),F.map(q=>q.table_name)}catch(Z){return console.error("Error fetching user table names:",Z),[]}},[]),ue=Xe.useCallback(Z=>{const F=[];return!Z||!Array.isArray(Z)?F:(Z.forEach(q=>{q.primitives&&Array.isArray(q.primitives)&&q.primitives.forEach(Y=>{Y.primitive&&Y.primitive.name&&Y.primitive.type!=="evm-rpc-effectstream-l2"&&F.push(Y.primitive.name)})}),[...new Set(F)])},[]),J=Xe.useCallback(async(Z,F,q)=>{try{if(Q.current.has(Z))return null;const Y=q??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},se=new URL(`${_D}/${Z}`);se.searchParams.set("limit",String(Y.limit));const ye=Y.cursors[Y.currentPage];ye&&se.searchParams.set("after",ye);const ee=await fetch(se.toString());if(!ee.ok){if(ee.status===404)return console.log(`🚫 Primitive ${Z} not found (404)`),Q.current.add(Z),null;throw new Error(`HTTP error! status: ${ee.status}`)}const S=await ee.json(),v=Array.isArray(S)?S:S.data??[],C=S.pagination;return C&&g(N=>{const he=[...N[Z].cursors];return C.nextCursor&&he.length===N[Z].currentPage+1&&he.push(C.nextCursor),{...N,[Z]:{...N[Z],hasMore:C.hasMore,cursors:he}}}),console.log(`📊 Fetched data for ${Z}:`,v),re(v,Z,F)}catch(Y){return console.error(`Error fetching primitive data for ${Z}:`,Y),null}},[re]),G=Xe.useCallback(async(Z,F,q)=>{try{const Y=q??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},se=new URL(`${lI}/${Z}`);se.searchParams.set("limit",String(Y.limit));const ye=Y.cursors[Y.currentPage];ye&&se.searchParams.set("after",ye);const ee=await fetch(se.toString());if(!ee.ok){if(ee.status===404)return console.log(`🚫 Table ${Z} not found (404)`),null;throw new Error(`HTTP error! status: ${ee.status}`)}const S=await ee.json();console.log(`📊 Fetched table data for ${Z}:`,S);const v=S.data??[],C=S.pagination;return C&&w(N=>{const he=[...N[Z].cursors];return C.nextCursor&&he.length===N[Z].currentPage+1&&he.push(C.nextCursor),{...N,[Z]:{...N[Z],hasMore:C.hasMore,cursors:he}}}),le(v,Z,F)}catch(Y){return console.error(`Error fetching table data for ${Z}:`,Y),null}},[le]),H=Xe.useCallback(async()=>{try{const Z=await fetch(CD);if(!Z.ok)throw new Error(`HTTP error! status: ${Z.status}`);const q=(await Z.json()).data??[];console.log("📊 Fetched scheduled data:",q);const Y=[{name:"id",dataTypeID:23},{name:"from_address",dataTypeID:25},{name:"input_data",dataTypeID:25},{name:"primitive_name",dataTypeID:25},{name:"caip2",dataTypeID:25},{name:"contract_address",dataTypeID:25},{name:"origin_tx_hash",dataTypeID:25},{name:"future_block_height",dataTypeID:23},{name:"future_ms_timestamp",dataTypeID:25}];return{command:"SELECT",rowCount:q.length,rows:q,fields:Y}}catch(Z){return console.error("Error fetching scheduled data:",Z),null}},[]),K=Xe.useCallback(async()=>{if(!(R.current.length===0||!I.current))try{const Z=R.current.map(async q=>{const Y=$.current[q],se=L.current[q],ye=await J(q,Y,se);return{primitiveName:q,data:ye}}),F=await Promise.all(Z);F.length>0&&l(q=>{const Y={...q};return F.forEach(({primitiveName:se,data:ye})=>{ye!==null&&(Y[se]=ye)}),Y})}catch(Z){console.error("Error refreshing primitive data:",Z)}},[J]),W=Xe.useCallback(async()=>{if(!(!I.current||T.current.length===0))try{const Z=T.current.map(async q=>{const Y=k.current[q],se=U.current[q],ye=await G(q,Y,se);return{tableName:q,data:ye}}),F=await Promise.all(Z);F.length>0&&h(q=>{const Y={...q};return F.forEach(({tableName:se,data:ye})=>{ye!==null&&(Y[se]=ye)}),Y})}catch(Z){console.error("Error refreshing user table data:",Z)}},[G]),z=Xe.useCallback(async()=>{if(I.current)try{const Z=await H();Z!==null&&p({scheduled_data:Z})}catch(Z){console.error("Error refreshing scheduled data:",Z)}},[H]),fe=Xe.useCallback(async()=>{console.log("📋 Initializing primitive tables...");try{const Z=await te();if(!Z){console.error("Failed to fetch config");return}const F=ue(Z);if(n(F),console.log("📊 Found primitives:",F),F.length===0){console.log("No primitives found in config");return}const q=F.map(async v=>{const C=await oe(v);return{primitiveName:v,schema:C}}),Y=await Promise.all(q),se={};Y.forEach(({primitiveName:v,schema:C})=>{C&&(se[v]=C)}),_(se),g(v=>{const C={...v};return F.forEach(N=>{C[N]||(C[N]={limit:20,cursors:[void 0],currentPage:0,hasMore:!1})}),C});const ye=F.map(async v=>{const C=se[v],N=L.current[v]??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},he=await J(v,C,N);return{primitiveName:v,data:he}}),ee=await Promise.all(ye),S={};ee.forEach(({primitiveName:v,data:C})=>{S[v]=C}),l(S),console.log("✅ Primitive tables initialized")}catch(Z){console.error("Error initializing primitive tables:",Z)}},[te,ue,oe,J]),ae=Xe.useCallback(async()=>{console.log("📋 Initializing state machine tables...");try{const Z=await pe();if(s(Z),Z.length===0){console.log("No user tables found");return}const F=Z.map(async S=>{const v=await X(S);return{tableName:S,schema:v}}),q=await Promise.all(F),Y={};q.forEach(({tableName:S,schema:v})=>{v&&(Y[S]=v)}),A(Y),w(S=>{const v={...S};return Z.forEach(C=>{v[C]||(v[C]={limit:20,cursors:[void 0],currentPage:0,hasMore:!1})}),v});const se=Z.map(async S=>{const v=Y[S],C=U.current[S]??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},N=await G(S,v||void 0,C);return{tableName:S,data:N}}),ye=await Promise.all(se),ee={};ye.forEach(({tableName:S,data:v})=>{ee[S]=v}),h(ee),console.log("✅ State machine tables initialized")}catch(Z){console.error("Error initializing state machine tables:",Z)}},[X,G,pe]),ne=Xe.useCallback(async()=>{console.log("📋 Initializing scheduled data...");try{const Z=await H();p({scheduled_data:Z}),console.log("✅ Scheduled data initialized")}catch(Z){console.error("Error initializing scheduled data:",Z)}},[H]);return Xe.useEffect(()=>{let Z,F,q;return(async()=>{await Promise.all([fe(),ae(),ne()]),I.current=!0,Z=setInterval(()=>{K()},5e3),setTimeout(()=>{W(),F=setInterval(()=>{W()},5e3)},1500),setTimeout(()=>{z(),q=setInterval(()=>{z()},5e3)},3e3)})(),()=>{Z&&clearInterval(Z),F&&clearInterval(F),q&&clearInterval(q)}},[]),{primitiveData:u,userTableData:c,scheduledData:f,primitiveNames:t,userTableNames:o,refreshPrimitiveData:K,refreshUserTableData:W,refreshScheduledData:z,primitivePagination:y,userTablePagination:b,setPrimitiveLimit:async(Z,F)=>{const q={limit:F,cursors:[void 0],currentPage:0,hasMore:!1};g(ye=>({...ye,[Z]:q}));const Y=$.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},nextPrimitivePage:async Z=>{const F=L.current[Z];if(!F||!F.hasMore)return;const q={...F,currentPage:F.currentPage+1};g(ye=>({...ye,[Z]:q}));const Y=$.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},prevPrimitivePage:async Z=>{const F=L.current[Z];if(!F||F.currentPage===0)return;const q={...F,currentPage:F.currentPage-1};g(ye=>({...ye,[Z]:q}));const Y=$.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},firstPrimitivePage:async Z=>{const F=L.current[Z];if(!F)return;const q={...F,cursors:[void 0],currentPage:0};g(ye=>({...ye,[Z]:q}));const Y=$.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},setUserTableLimit:async(Z,F)=>{const q={limit:F,cursors:[void 0],currentPage:0,hasMore:!1};w(ye=>({...ye,[Z]:q}));const Y=k.current[Z],se=await G(Z,Y,q);h(ye=>({...ye,[Z]:se}))},nextUserTablePage:async Z=>{const F=U.current[Z];if(!F||!F.hasMore)return;const q={...F,currentPage:F.currentPage+1};w(ye=>({...ye,[Z]:q}));const Y=k.current[Z],se=await G(Z,Y,q);h(ye=>({...ye,[Z]:se}))},prevUserTablePage:async Z=>{const F=U.current[Z];if(!F||F.currentPage===0)return;const q={...F,currentPage:F.currentPage-1};w(ye=>({...ye,[Z]:q}));const Y=k.current[Z],se=await G(Z,Y,q);h(ye=>({...ye,[Z]:se}))},firstUserTablePage:async Z=>{const F=U.current[Z];if(!F)return;const q={...F,cursors:[void 0],currentPage:0};w(ye=>({...ye,[Z]:q}));const Y=k.current[Z],se=await G(Z,Y,q);h(ye=>({...ye,[Z]:se}))}}}function _G(){const[e,t]=Xe.useState([]),[n,o]=Xe.useState([]),[s,u]=Xe.useState(!1),[l,c]=Xe.useState(!1),[h,f]=Xe.useState(!1),[p,y]=Xe.useState(!1),{chainConfigs:g,newBlockIndices:b,latestBlock:w,isConnected:B,isLoadingConfig:_,configError:M}=SG(),{primitiveData:A,userTableData:I,scheduledData:R,primitiveNames:T,userTableNames:$,primitivePagination:k,userTablePagination:L,nextPrimitivePage:U,prevPrimitivePage:j,firstPrimitivePage:Q,setPrimitiveLimit:P,nextUserTablePage:re,prevUserTablePage:le,firstUserTablePage:oe,setUserTableLimit:X}=IG();return Xe.useEffect(()=>{T.length>0&&!s&&(t(T),u(!0))},[T,s]),Xe.useEffect(()=>{$.length>0&&!l&&(o($.slice(0,4)),c(!0))},[$,l]),Xe.useEffect(()=>{const te=pe=>{console.error("Unhandled promise rejection:",pe.reason)};return globalThis.addEventListener("unhandledrejection",te),()=>{globalThis.removeEventListener("unhandledrejection",te)}},[]),Xe.useEffect(()=>{const te=pe=>{pe.key==="r"&&pe.ctrlKey&&(pe.preventDefault(),console.log("🔄 Manually refreshed (keyboard shortcut)"))};return document.addEventListener("keydown",te),()=>{document.removeEventListener("keydown",te)}},[]),_?_e.jsxs("div",{className:"container",children:[_e.jsx(nb,{latestBlock:w,isConnected:B}),_e.jsx("div",{style:{padding:"20px",textAlign:"center",fontSize:"18px",color:"#667eea"},children:"🔄 Loading chain configurations..."})]}):M?_e.jsxs("div",{className:"container",children:[_e.jsx(nb,{latestBlock:w,isConnected:B}),_e.jsxs("div",{style:{padding:"20px",textAlign:"center",fontSize:"16px",color:"#f44336",backgroundColor:"rgba(244, 67, 54, 0.1)",border:"1px solid rgba(244, 67, 54, 0.3)",borderRadius:"8px",margin:"20px"},children:["⚠️ Failed to load chain configurations: ",M,_e.jsx("br",{}),_e.jsx("small",{style:{color:"#666",marginTop:"8px",display:"block"},children:"Using fallback configuration. Some features may not work correctly."})]}),_e.jsx(AC,{chainConfigs:g,newBlockIndices:b})]}):_e.jsxs("div",{className:"container",children:[_e.jsx(nb,{latestBlock:w,isConnected:B}),_e.jsx(AC,{chainConfigs:g,newBlockIndices:b}),_e.jsxs(ib,{title:"Primitive Data",tables:Object.fromEntries(Object.entries(A).filter(([te])=>e.includes(te))),pagination:k,onPrev:te=>j(te),onNext:te=>U(te),onFirst:te=>Q(te),onLimitChange:(te,pe)=>P(te,pe),children:[_e.jsx("div",{style:{display:"flex",gap:8,marginBottom:12},children:_e.jsx("button",{type:"button",className:"batcher-api-button",onClick:()=>f(!0),children:"Select Primitives"})}),_e.jsx(vC,{isOpen:h,onClose:()=>f(!1),title:"Select Primitives",tableNames:T,selectedNames:e,onApply:te=>t(te)})]}),_e.jsxs(ib,{title:"State Machine Tables",tables:Object.fromEntries(Object.entries(I).filter(([te])=>n.includes(te))),pagination:L,onPrev:te=>le(te),onNext:te=>re(te),onFirst:te=>oe(te),onLimitChange:(te,pe)=>X(te,pe),children:[_e.jsx("div",{style:{display:"flex",gap:8,marginBottom:12},children:_e.jsx("button",{type:"button",className:"batcher-api-button",onClick:()=>y(!0),children:"Select Tables"})}),_e.jsx(vC,{isOpen:p,onClose:()=>y(!1),title:"Select Custom Tables",tableNames:$,selectedNames:n,onApply:te=>o(te)})]}),_e.jsx(ib,{title:"Scheduled Data",tables:R})]})}oR.createRoot(document.getElementById("root")).render(_e.jsx(Xe.StrictMode,{children:_e.jsx(_G,{})}));
|