@paimaexample/explorer 0.3.115 → 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.
@@ -1,159 +0,0 @@
1
- var o4=Object.defineProperty;var F2=e=>{throw TypeError(e)};var s4=(e,t,n)=>t in e?o4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var rt=(e,t,n)=>s4(e,typeof t!="symbol"?t+"":t,n),rm=(e,t,n)=>t.has(e)||F2("Cannot "+n);var Ae=(e,t,n)=>(rm(e,t,"read from private field"),n?n.call(e):t.get(e)),Et=(e,t,n)=>t.has(e)?F2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ht=(e,t,n,o)=>(rm(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),We=(e,t,n)=>(rm(e,t,"access private method"),n);var $h=(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 nf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nm={exports:{}},ec={};/**
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 O2;function a4(){if(O2)return ec;O2=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 ec.Fragment=t,ec.jsx=n,ec.jsxs=n,ec}var T2;function u4(){return T2||(T2=1,nm.exports=a4()),nm.exports}var _e=u4(),im={exports:{}},om={},tc={},B2;function l4(){if(B2)return tc;B2=1,tc.byteLength=c,tc.toByteArray=f,tc.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(m){var w=m.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=m.indexOf("=");F===-1&&(F=w);var S=F===w?0:4-F%4;return[F,S]}function c(m){var w=l(m),F=w[0],S=w[1];return(F+S)*3/4-S}function h(m,w,F){return(w+F)*3/4-F}function f(m){var w,F=l(m),S=F[0],M=F[1],A=new n(h(m,S,M)),I=0,R=M>0?S-4:S,T;for(T=0;T<R;T+=4)w=t[m.charCodeAt(T)]<<18|t[m.charCodeAt(T+1)]<<12|t[m.charCodeAt(T+2)]<<6|t[m.charCodeAt(T+3)],A[I++]=w>>16&255,A[I++]=w>>8&255,A[I++]=w&255;return M===2&&(w=t[m.charCodeAt(T)]<<2|t[m.charCodeAt(T+1)]>>4,A[I++]=w&255),M===1&&(w=t[m.charCodeAt(T)]<<10|t[m.charCodeAt(T+1)]<<4|t[m.charCodeAt(T+2)]>>2,A[I++]=w>>8&255,A[I++]=w&255),A}function p(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function y(m,w,F){for(var S,M=[],A=w;A<F;A+=3)S=(m[A]<<16&16711680)+(m[A+1]<<8&65280)+(m[A+2]&255),M.push(p(S));return M.join("")}function g(m){for(var w,F=m.length,S=F%3,M=[],A=16383,I=0,R=F-S;I<R;I+=A)M.push(y(m,I,I+A>R?R:I+A));return S===1?(w=m[F-1],M.push(e[w>>2]+e[w<<4&63]+"==")):S===2&&(w=(m[F-2]<<8)+m[F-1],M.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),M.join("")}return tc}var qh={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var R2;function c4(){return R2||(R2=1,qh.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,m=e[t+y];for(y+=g,u=m&(1<<-p)-1,m>>=-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:(m?-1:1)*(1/0);l=l+Math.pow(2,o),u=u-f}return(m?-1:1)*l*Math.pow(2,u-o)},qh.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,m=o?0:u-1,w=o?1:-1,F=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+m]=c&255,m+=w,c/=256,s-=8);for(l=l<<s|c,f+=s;f>0;e[n+m]=l&255,m+=w,l/=256,f-=8);e[n+m-w]|=F*128}),qh}/*!
10
- * The buffer module from node.js, for the browser.
11
- *
12
- * @author Feross Aboukhadijeh <https://feross.org>
13
- * @license MIT
14
- */var M2;function f4(){return M2||(M2=1,(function(e){var t=l4(),n=c4(),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 _=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(_,v),_.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(_){if(_>s)throw new RangeError('The value "'+_+'" is invalid for option "size"');var v=new Uint8Array(_);return Object.setPrototypeOf(v,c.prototype),v}function c(_,v,C){if(typeof _=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(_)}return h(_,v,C)}c.poolSize=8192;function h(_,v,C){if(typeof _=="string")return g(_,v);if(ArrayBuffer.isView(_))return w(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(se(_,ArrayBuffer)||_&&se(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(_,SharedArrayBuffer)||_&&se(_.buffer,SharedArrayBuffer)))return F(_,v,C);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var D=_.valueOf&&_.valueOf();if(D!=null&&D!==_)return c.from(D,v,C);var he=S(_);if(he)return he;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return c.from(_[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 _)}c.from=function(_,v,C){return h(_,v,C)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function f(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function p(_,v,C){return f(_),_<=0?l(_):v!==void 0?typeof C=="string"?l(_).fill(v,C):l(_).fill(v):l(_)}c.alloc=function(_,v,C){return p(_,v,C)};function y(_){return f(_),l(_<0?0:M(_)|0)}c.allocUnsafe=function(_){return y(_)},c.allocUnsafeSlow=function(_){return y(_)};function g(_,v){if((typeof v!="string"||v==="")&&(v="utf8"),!c.isEncoding(v))throw new TypeError("Unknown encoding: "+v);var C=I(_,v)|0,D=l(C),he=D.write(_,v);return he!==C&&(D=D.slice(0,he)),D}function m(_){for(var v=_.length<0?0:M(_.length)|0,C=l(v),D=0;D<v;D+=1)C[D]=_[D]&255;return C}function w(_){if(se(_,Uint8Array)){var v=new Uint8Array(_);return F(v.buffer,v.byteOffset,v.byteLength)}return m(_)}function F(_,v,C){if(v<0||_.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<v+(C||0))throw new RangeError('"length" is outside of buffer bounds');var D;return v===void 0&&C===void 0?D=new Uint8Array(_):C===void 0?D=new Uint8Array(_,v):D=new Uint8Array(_,v,C),Object.setPrototypeOf(D,c.prototype),D}function S(_){if(c.isBuffer(_)){var v=M(_.length)|0,C=l(v);return C.length===0||_.copy(C,0,0,v),C}if(_.length!==void 0)return typeof _.length!="number"||ye(_.length)?l(0):m(_);if(_.type==="Buffer"&&Array.isArray(_.data))return m(_.data)}function M(_){if(_>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return _|0}function A(_){return+_!=_&&(_=0),c.alloc(+_)}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 D=v.length,he=C.length,ce=0,Ee=Math.min(D,he);ce<Ee;++ce)if(v[ce]!==C[ce]){D=v[ce],he=C[ce];break}return D<he?-1:he<D?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 D;if(C===void 0)for(C=0,D=0;D<v.length;++D)C+=v[D].length;var he=c.allocUnsafe(C),ce=0;for(D=0;D<v.length;++D){var Ee=v[D];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(_,v){if(c.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||se(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);var C=_.length,D=arguments.length>2&&arguments[2]===!0;if(!D&&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(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return q(_).length;default:if(he)return D?-1:ne(_).length;v=(""+v).toLowerCase(),he=!0}}c.byteLength=I;function R(_,v,C){var D=!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(_||(_="utf8");;)switch(_){case"hex":return le(this,v,C);case"utf8":case"utf-8":return ue(this,v,C);case"ascii":return re(this,v,C);case"latin1":case"binary":return pe(this,v,C);case"base64":return te(this,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,v,C);default:if(D)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),D=!0}}c.prototype._isBuffer=!0;function T(_,v,C){var D=_[v];_[v]=_[C],_[C]=D}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?ue(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,D,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),D===void 0&&(D=v?v.length:0),he===void 0&&(he=0),ce===void 0&&(ce=this.length),C<0||D>v.length||he<0||ce>this.length)throw new RangeError("out of range index");if(he>=ce&&C>=D)return 0;if(he>=ce)return-1;if(C>=D)return 1;if(C>>>=0,D>>>=0,he>>>=0,ce>>>=0,this===v)return 0;for(var Ee=ce-he,Be=D-C,de=Math.min(Ee,Be),ve=this.slice(he,ce),x=v.slice(C,D),B=0;B<de;++B)if(ve[B]!==x[B]){Ee=ve[B],Be=x[B];break}return Ee<Be?-1:Be<Ee?1:0};function z(_,v,C,D,he){if(_.length===0)return-1;if(typeof C=="string"?(D=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,ye(C)&&(C=he?0:_.length-1),C<0&&(C=_.length+C),C>=_.length){if(he)return-1;C=_.length-1}else if(C<0)if(he)C=0;else return-1;if(typeof v=="string"&&(v=c.from(v,D)),c.isBuffer(v))return v.length===0?-1:k(_,v,C,D,he);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(_,v,C):Uint8Array.prototype.lastIndexOf.call(_,v,C):k(_,[v],C,D,he);throw new TypeError("val must be string, number or Buffer")}function k(_,v,C,D,he){var ce=1,Ee=_.length,Be=v.length;if(D!==void 0&&(D=String(D).toLowerCase(),D==="ucs2"||D==="ucs-2"||D==="utf16le"||D==="utf-16le")){if(_.length<2||v.length<2)return-1;ce=2,Ee/=2,Be/=2,C/=2}function de(ie,me){return ce===1?ie[me]:ie.readUInt16BE(me*ce)}var ve;if(he){var x=-1;for(ve=C;ve<Ee;ve++)if(de(_,ve)===de(v,x===-1?0:ve-x)){if(x===-1&&(x=ve),ve-x+1===Be)return x*ce}else x!==-1&&(ve-=ve-x),x=-1}else for(C+Be>Ee&&(C=Ee-Be),ve=C;ve>=0;ve--){for(var B=!0,N=0;N<Be;N++)if(de(_,ve+N)!==de(v,N)){B=!1;break}if(B)return ve}return-1}c.prototype.includes=function(v,C,D){return this.indexOf(v,C,D)!==-1},c.prototype.indexOf=function(v,C,D){return z(this,v,C,D,!0)},c.prototype.lastIndexOf=function(v,C,D){return z(this,v,C,D,!1)};function L(_,v,C,D){C=Number(C)||0;var he=_.length-C;D?(D=Number(D),D>he&&(D=he)):D=he;var ce=v.length;D>ce/2&&(D=ce/2);for(var Ee=0;Ee<D;++Ee){var Be=parseInt(v.substr(Ee*2,2),16);if(ye(Be))return Ee;_[C+Ee]=Be}return Ee}function U(_,v,C,D){return Y(ne(v,_.length-C),_,C,D)}function j(_,v,C,D){return Y(Z(v),_,C,D)}function H(_,v,C,D){return Y(q(v),_,C,D)}function P(_,v,C,D){return Y(O(v,_.length-C),_,C,D)}c.prototype.write=function(v,C,D,he){if(C===void 0)he="utf8",D=this.length,C=0;else if(D===void 0&&typeof C=="string")he=C,D=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(D)?(D=D>>>0,he===void 0&&(he="utf8")):(he=D,D=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-C;if((D===void 0||D>ce)&&(D=ce),v.length>0&&(D<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,D);case"utf8":case"utf-8":return U(this,v,C,D);case"ascii":case"latin1":case"binary":return j(this,v,C,D);case"base64":return H(this,v,C,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,v,C,D);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 te(_,v,C){return v===0&&C===_.length?t.fromByteArray(_):t.fromByteArray(_.slice(v,C))}function ue(_,v,C){C=Math.min(_.length,C);for(var D=[],he=v;he<C;){var ce=_[he],Ee=null,Be=ce>239?4:ce>223?3:ce>191?2:1;if(he+Be<=C){var de,ve,x,B;switch(Be){case 1:ce<128&&(Ee=ce);break;case 2:de=_[he+1],(de&192)===128&&(B=(ce&31)<<6|de&63,B>127&&(Ee=B));break;case 3:de=_[he+1],ve=_[he+2],(de&192)===128&&(ve&192)===128&&(B=(ce&15)<<12|(de&63)<<6|ve&63,B>2047&&(B<55296||B>57343)&&(Ee=B));break;case 4:de=_[he+1],ve=_[he+2],x=_[he+3],(de&192)===128&&(ve&192)===128&&(x&192)===128&&(B=(ce&15)<<18|(de&63)<<12|(ve&63)<<6|x&63,B>65535&&B<1114112&&(Ee=B))}}Ee===null?(Ee=65533,Be=1):Ee>65535&&(Ee-=65536,D.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),D.push(Ee),he+=Be}return X(D)}var oe=4096;function X(_){var v=_.length;if(v<=oe)return String.fromCharCode.apply(String,_);for(var C="",D=0;D<v;)C+=String.fromCharCode.apply(String,_.slice(D,D+=oe));return C}function re(_,v,C){var D="";C=Math.min(_.length,C);for(var he=v;he<C;++he)D+=String.fromCharCode(_[he]&127);return D}function pe(_,v,C){var D="";C=Math.min(_.length,C);for(var he=v;he<C;++he)D+=String.fromCharCode(_[he]);return D}function le(_,v,C){var D=_.length;(!v||v<0)&&(v=0),(!C||C<0||C>D)&&(C=D);for(var he="",ce=v;ce<C;++ce)he+=ee[_[ce]];return he}function J(_,v,C){for(var D=_.slice(v,C),he="",ce=0;ce<D.length-1;ce+=2)he+=String.fromCharCode(D[ce]+D[ce+1]*256);return he}c.prototype.slice=function(v,C){var D=this.length;v=~~v,C=C===void 0?D:~~C,v<0?(v+=D,v<0&&(v=0)):v>D&&(v=D),C<0?(C+=D,C<0&&(C=0)):C>D&&(C=D),C<v&&(C=v);var he=this.subarray(v,C);return Object.setPrototypeOf(he,c.prototype),he};function G(_,v,C){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+v>C)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(v,C,D){v=v>>>0,C=C>>>0,D||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,D){v=v>>>0,C=C>>>0,D||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,D){v=v>>>0,C=C>>>0,D||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,D){v=v>>>0,C=C>>>0,D||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 D=this[v]|this[v+1]<<8;return D&32768?D|4294901760:D},c.prototype.readInt16BE=function(v,C){v=v>>>0,C||G(v,2,this.length);var D=this[v+1]|this[v]<<8;return D&32768?D|4294901760:D},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 Q(_,v,C,D,he,ce){if(!c.isBuffer(_))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+D>_.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(v,C,D,he){if(v=+v,C=C>>>0,D=D>>>0,!he){var ce=Math.pow(2,8*D)-1;Q(this,v,C,D,ce,0)}var Ee=1,Be=0;for(this[C]=v&255;++Be<D&&(Ee*=256);)this[C+Be]=v/Ee&255;return C+D},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(v,C,D,he){if(v=+v,C=C>>>0,D=D>>>0,!he){var ce=Math.pow(2,8*D)-1;Q(this,v,C,D,ce,0)}var Ee=D-1,Be=1;for(this[C+Ee]=v&255;--Ee>=0&&(Be*=256);)this[C+Ee]=v/Be&255;return C+D},c.prototype.writeUint8=c.prototype.writeUInt8=function(v,C,D){return v=+v,C=C>>>0,D||Q(this,v,C,1,255,0),this[C]=v&255,C+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(v,C,D){return v=+v,C=C>>>0,D||Q(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,D){return v=+v,C=C>>>0,D||Q(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,D){return v=+v,C=C>>>0,D||Q(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,D){return v=+v,C=C>>>0,D||Q(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,D,he){if(v=+v,C=C>>>0,!he){var ce=Math.pow(2,8*D-1);Q(this,v,C,D,ce-1,-ce)}var Ee=0,Be=1,de=0;for(this[C]=v&255;++Ee<D&&(Be*=256);)v<0&&de===0&&this[C+Ee-1]!==0&&(de=1),this[C+Ee]=(v/Be>>0)-de&255;return C+D},c.prototype.writeIntBE=function(v,C,D,he){if(v=+v,C=C>>>0,!he){var ce=Math.pow(2,8*D-1);Q(this,v,C,D,ce-1,-ce)}var Ee=D-1,Be=1,de=0;for(this[C+Ee]=v&255;--Ee>=0&&(Be*=256);)v<0&&de===0&&this[C+Ee+1]!==0&&(de=1),this[C+Ee]=(v/Be>>0)-de&255;return C+D},c.prototype.writeInt8=function(v,C,D){return v=+v,C=C>>>0,D||Q(this,v,C,1,127,-128),v<0&&(v=255+v+1),this[C]=v&255,C+1},c.prototype.writeInt16LE=function(v,C,D){return v=+v,C=C>>>0,D||Q(this,v,C,2,32767,-32768),this[C]=v&255,this[C+1]=v>>>8,C+2},c.prototype.writeInt16BE=function(v,C,D){return v=+v,C=C>>>0,D||Q(this,v,C,2,32767,-32768),this[C]=v>>>8,this[C+1]=v&255,C+2},c.prototype.writeInt32LE=function(v,C,D){return v=+v,C=C>>>0,D||Q(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,D){return v=+v,C=C>>>0,D||Q(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(_,v,C,D,he,ce){if(C+D>_.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function W(_,v,C,D,he){return v=+v,C=C>>>0,he||K(_,v,C,4),n.write(_,v,C,D,23,4),C+4}c.prototype.writeFloatLE=function(v,C,D){return W(this,v,C,!0,D)},c.prototype.writeFloatBE=function(v,C,D){return W(this,v,C,!1,D)};function $(_,v,C,D,he){return v=+v,C=C>>>0,he||K(_,v,C,8),n.write(_,v,C,D,52,8),C+8}c.prototype.writeDoubleLE=function(v,C,D){return $(this,v,C,!0,D)},c.prototype.writeDoubleBE=function(v,C,D){return $(this,v,C,!1,D)},c.prototype.copy=function(v,C,D,he){if(!c.isBuffer(v))throw new TypeError("argument should be a Buffer");if(D||(D=0),!he&&he!==0&&(he=this.length),C>=v.length&&(C=v.length),C||(C=0),he>0&&he<D&&(he=D),he===D||v.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(D<0||D>=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-D&&(he=v.length-C+D);var ce=he-D;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(C,D,he):Uint8Array.prototype.set.call(v,this.subarray(D,he),C),ce},c.prototype.fill=function(v,C,D,he){if(typeof v=="string"){if(typeof C=="string"?(he=C,C=0,D=this.length):typeof D=="string"&&(he=D,D=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<D)throw new RangeError("Out of range index");if(D<=C)return this;C=C>>>0,D=D===void 0?this.length:D>>>0,v||(v=0);var Ee;if(typeof v=="number")for(Ee=C;Ee<D;++Ee)this[Ee]=v;else{var Be=c.isBuffer(v)?v:c.from(v,he),de=Be.length;if(de===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(Ee=0;Ee<D-C;++Ee)this[Ee+C]=Be[Ee%de]}return this};var fe=/[^+/0-9A-Za-z-_]/g;function ae(_){if(_=_.split("=")[0],_=_.trim().replace(fe,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function ne(_,v){v=v||1/0;for(var C,D=_.length,he=null,ce=[],Ee=0;Ee<D;++Ee){if(C=_.charCodeAt(Ee),C>55295&&C<57344){if(!he){if(C>56319){(v-=3)>-1&&ce.push(239,191,189);continue}else if(Ee+1===D){(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(_){for(var v=[],C=0;C<_.length;++C)v.push(_.charCodeAt(C)&255);return v}function O(_,v){for(var C,D,he,ce=[],Ee=0;Ee<_.length&&!((v-=2)<0);++Ee)C=_.charCodeAt(Ee),D=C>>8,he=C%256,ce.push(he),ce.push(D);return ce}function q(_){return t.toByteArray(ae(_))}function Y(_,v,C,D){for(var he=0;he<D&&!(he+C>=v.length||he>=_.length);++he)v[he+C]=_[he];return he}function se(_,v){return _ instanceof v||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===v.name}function ye(_){return _!==_}var ee=(function(){for(var _="0123456789abcdef",v=new Array(256),C=0;C<16;++C)for(var D=C*16,he=0;he<16;++he)v[D+he]=_[C]+_[he];return v})()})(om)),om}var Nr=f4(),Hh={exports:{}},U2;function h4(){return U2||(U2=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(le){if(s===setTimeout)return setTimeout(le,0);if((s===l||!s)&&setTimeout)return s=setTimeout,setTimeout(le,0);try{return s(le,0)}catch{try{return s.call(null,le,0)}catch{return s.call(this,le,0)}}}function f(le){if(u===clearTimeout)return clearTimeout(le);if((u===c||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(le);try{return u(le)}catch{try{return u.call(null,le)}catch{return u.call(this,le)}}}var p=[],y=!1,g,m=-1;function w(){!y||!g||(y=!1,g.length?p=g.concat(p):m=-1,p.length&&F())}function F(){if(!y){var le=h(w);y=!0;for(var J=p.length;J;){for(g=p,p=[];++m<J;)g&&g[m].run();m=-1,J=p.length}g=null,y=!1,f(le)}}o.nextTick=function(le){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 S(le,J)),p.length===1&&!y&&h(F)};function S(le,J){this.fun=le,this.array=J}S.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(le){return[]},o.binding=function(le){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(le){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,z=A,k=1,L={},U=A,j=A,H=A,P=A,te=A,ue="browser",oe="browser",X="browser",re=[],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:z,pid:k,features:L,kill:U,dlopen:j,uptime:H,memoryUsage:P,uvCounters:te,platform:ue,arch:oe,execPath:X,execArgv:re};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=re,t.execPath=X,t.exit=z,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=ue,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=H,t.uvCounters=te,t.version=n.exports.version,t.versions=n.exports.versions,t=e.exports=pe})(Hh,Hh.exports)),Hh.exports}var d4=h4();const Ut=tp(d4);var p4=(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),y4=p4,wt={},j2;function g4(){if(j2)return wt;j2=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 m(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(){}},F=Object.assign,S={};function M(G,Q,K){this.props=G,this.context=Q,this.refs=S,this.updater=K||w}M.prototype.isReactComponent={},M.prototype.setState=function(G,Q){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,Q,"setState")},M.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function A(){}A.prototype=M.prototype;function I(G,Q,K){this.props=G,this.context=Q,this.refs=S,this.updater=K||w}var R=I.prototype=new A;R.constructor=I,F(R,M.prototype),R.isPureReactComponent=!0;var T=Array.isArray;function z(){}var k={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function U(G,Q,K){var W=K.ref;return{$$typeof:e,type:G,key:Q,ref:W!==void 0?W:null,props:K}}function j(G,Q){return U(G.type,Q,G.props)}function H(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function P(G){var Q={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(K){return Q[K]})}var te=/\/+/g;function ue(G,Q){return typeof G=="object"&&G!==null&&G.key!=null?P(""+G.key):Q.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(z,z):(G.status="pending",G.then(function(Q){G.status==="pending"&&(G.status="fulfilled",G.value=Q)},function(Q){G.status==="pending"&&(G.status="rejected",G.reason=Q)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function X(G,Q,K,W,$){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),Q,K,W,$)}}if(ae)return $=$(G),ae=W===""?"."+ue(G,0):W,T($)?(K="",ae!=null&&(K=ae.replace(te,"$&/")+"/"),X($,Q,K,"",function(O){return O})):$!=null&&(H($)&&($=j($,K+($.key==null||G&&G.key===$.key?"":(""+$.key).replace(te,"$&/")+"/")+ae)),Q.push($)),1;ae=0;var ne=W===""?".":W+":";if(T(G))for(var Z=0;Z<G.length;Z++)W=G[Z],fe=ne+ue(W,Z),ae+=X(W,Q,K,fe,$);else if(Z=m(G),typeof Z=="function")for(G=Z.call(G),Z=0;!(W=G.next()).done;)W=W.value,fe=ne+ue(W,Z++),ae+=X(W,Q,K,fe,$);else if(fe==="object"){if(typeof G.then=="function")return X(oe(G),Q,K,W,$);throw Q=String(G),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ae}function re(G,Q,K){if(G==null)return G;var W=[],$=0;return X(G,W,"","",function(fe){return Q.call(K,fe,$++)}),W}function pe(G){if(G._status===-1){var Q=G._result;Q=Q(),Q.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=Q)}if(G._status===1)return G._result.default;throw G._result}var le=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=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(Q))return}else if(typeof Ut=="object"&&typeof Ut.emit=="function"){Ut.emit("uncaughtException",G);return}console.error(G)},J={map:re,forEach:function(G,Q,K){re(G,function(){Q.apply(this,arguments)},K)},count:function(G){var Q=0;return re(G,function(){Q++}),Q},toArray:function(G){return re(G,function(Q){return Q})||[]},only:function(G){if(!H(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return wt.Activity=y,wt.Children=J,wt.Component=M,wt.Fragment=n,wt.Profiler=s,wt.PureComponent=I,wt.StrictMode=o,wt.Suspense=h,wt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,wt.__COMPILER_RUNTIME={__proto__:null,c:function(G){return k.H.useMemoCache(G)}},wt.cache=function(G){return function(){return G.apply(null,arguments)}},wt.cacheSignal=function(){return null},wt.cloneElement=function(G,Q,K){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var W=F({},G.props),$=G.key;if(Q!=null)for(fe in Q.key!==void 0&&($=""+Q.key),Q)!L.call(Q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Q.ref===void 0||(W[fe]=Q[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,$,W)},wt.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},wt.createElement=function(G,Q,K){var W,$={},fe=null;if(Q!=null)for(W in Q.key!==void 0&&(fe=""+Q.key),Q)L.call(Q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&($[W]=Q[W]);var ae=arguments.length-2;if(ae===1)$.children=K;else if(1<ae){for(var ne=Array(ae),Z=0;Z<ae;Z++)ne[Z]=arguments[Z+2];$.children=ne}if(G&&G.defaultProps)for(W in ae=G.defaultProps,ae)$[W]===void 0&&($[W]=ae[W]);return U(G,fe,$)},wt.createRef=function(){return{current:null}},wt.forwardRef=function(G){return{$$typeof:c,render:G}},wt.isValidElement=H,wt.lazy=function(G){return{$$typeof:p,_payload:{_status:-1,_result:G},_init:pe}},wt.memo=function(G,Q){return{$$typeof:f,type:G,compare:Q===void 0?null:Q}},wt.startTransition=function(G){var Q=k.T,K={};k.T=K;try{var W=G(),$=k.S;$!==null&&$(K,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(z,le)}catch(fe){le(fe)}finally{Q!==null&&K.types!==null&&(Q.types=K.types),k.T=Q}},wt.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},wt.use=function(G){return k.H.use(G)},wt.useActionState=function(G,Q,K){return k.H.useActionState(G,Q,K)},wt.useCallback=function(G,Q){return k.H.useCallback(G,Q)},wt.useContext=function(G){return k.H.useContext(G)},wt.useDebugValue=function(){},wt.useDeferredValue=function(G,Q){return k.H.useDeferredValue(G,Q)},wt.useEffect=function(G,Q){return k.H.useEffect(G,Q)},wt.useEffectEvent=function(G){return k.H.useEffectEvent(G)},wt.useId=function(){return k.H.useId()},wt.useImperativeHandle=function(G,Q,K){return k.H.useImperativeHandle(G,Q,K)},wt.useInsertionEffect=function(G,Q){return k.H.useInsertionEffect(G,Q)},wt.useLayoutEffect=function(G,Q){return k.H.useLayoutEffect(G,Q)},wt.useMemo=function(G,Q){return k.H.useMemo(G,Q)},wt.useOptimistic=function(G,Q){return k.H.useOptimistic(G,Q)},wt.useReducer=function(G,Q,K){return k.H.useReducer(G,Q,K)},wt.useRef=function(G){return k.H.useRef(G)},wt.useState=function(G){return k.H.useState(G)},wt.useSyncExternalStore=function(G,Q,K){return k.H.useSyncExternalStore(G,Q,K)},wt.useTransition=function(){return k.H.useTransition()},wt.version="19.2.0",wt}var N2;function JA(){return N2||(N2=1,im.exports=g4()),im.exports}var Xe=JA(),sm={exports:{}},rc={},am={exports:{}},um={};/**
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 D2;function m4(){return D2||(D2=1,(function(e){function t(X,re){var pe=X.length;X.push(re);e:for(;0<pe;){var le=pe-1>>>1,J=X[le];if(0<s(J,re))X[le]=re,X[pe]=J,pe=le;else break e}}function n(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var re=X[0],pe=X.pop();if(pe!==re){X[0]=pe;e:for(var le=0,J=X.length,G=J>>>1;le<G;){var Q=2*(le+1)-1,K=X[Q],W=Q+1,$=X[W];if(0>s(K,pe))W<J&&0>s($,K)?(X[le]=$,X[W]=pe,le=W):(X[le]=K,X[Q]=pe,le=Q);else if(W<J&&0>s($,pe))X[le]=$,X[W]=pe,le=W;else break e}}return re}function s(X,re){var pe=X.sortIndex-re.sortIndex;return pe!==0?pe:X.id-re.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,m=!1,w=!1,F=!1,S=!1,M=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function R(X){for(var re=n(f);re!==null;){if(re.callback===null)o(f);else if(re.startTime<=X)o(f),re.sortIndex=re.expirationTime,t(h,re);else break;re=n(f)}}function T(X){if(F=!1,R(X),!w)if(n(h)!==null)w=!0,z||(z=!0,P());else{var re=n(f);re!==null&&oe(T,re.startTime-X)}}var z=!1,k=-1,L=5,U=-1;function j(){return S?!0:!(e.unstable_now()-U<L)}function H(){if(S=!1,z){var X=e.unstable_now();U=X;var re=!0;try{e:{w=!1,F&&(F=!1,A(k),k=-1),m=!0;var pe=g;try{t:{for(R(X),y=n(h);y!==null&&!(y.expirationTime>X&&j());){var le=y.callback;if(typeof le=="function"){y.callback=null,g=y.priorityLevel;var J=le(y.expirationTime<=X);if(X=e.unstable_now(),typeof J=="function"){y.callback=J,R(X),re=!0;break t}y===n(h)&&o(h),R(X)}else o(h);y=n(h)}if(y!==null)re=!0;else{var G=n(f);G!==null&&oe(T,G.startTime-X),re=!1}}break e}finally{y=null,g=pe,m=!1}re=void 0}}finally{re?P():z=!1}}}var P;if(typeof I=="function")P=function(){I(H)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ue=te.port2;te.port1.onmessage=H,P=function(){ue.postMessage(null)}}else P=function(){M(H,0)};function oe(X,re){k=M(function(){X(e.unstable_now())},re)}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 re=3;break;default:re=g}var pe=g;g=re;try{return X()}finally{g=pe}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(X,re){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var pe=g;g=X;try{return re()}finally{g=pe}},e.unstable_scheduleCallback=function(X,re,pe){var le=e.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?le+pe:le):pe=le,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:re,priorityLevel:X,startTime:pe,expirationTime:J,sortIndex:-1},pe>le?(X.sortIndex=pe,t(f,X),n(h)===null&&X===n(f)&&(F?(A(k),k=-1):F=!0,oe(T,pe-le))):(X.sortIndex=J,t(h,X),w||m||(w=!0,z||(z=!0,P()))),X},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(X){var re=g;return function(){var pe=g;g=re;try{return X.apply(this,arguments)}finally{g=pe}}}})(um)),um}var P2;function b4(){return P2||(P2=1,am.exports=m4()),am.exports}var lm={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 k2;function A4(){if(k2)return an;k2=1;var e=JA();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,m=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:m}):p==="script"&&o.d.X(h,{crossOrigin:y,integrity:g,fetchPriority:m,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 L2;function WF(){if(L2)return lm.exports;L2=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(),lm.exports=A4(),lm.exports}var z2;function w4(){if(z2)return rc;z2=1;var e=b4(),t=JA(),n=WF();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 b=a.return;if(b===null)break;var E=b.alternate;if(E===null){if(d=b.return,d!==null){a=d;continue}break}if(b.child===E.child){for(E=b.child;E;){if(E===a)return h(b),r;if(E===d)return h(b),i;E=E.sibling}throw Error(o(188))}if(a.return!==d.return)a=b,d=E;else{for(var V=!1,ge=b.child;ge;){if(ge===a){V=!0,a=b,d=E;break}if(ge===d){V=!0,d=b,a=E;break}ge=ge.sibling}if(!V){for(ge=E.child;ge;){if(ge===a){V=!0,a=E,d=b;break}if(ge===d){V=!0,d=E,a=b;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"),m=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),S=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"),z=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"),H=Symbol.iterator;function P(r){return r===null||typeof r!="object"?null:(r=H&&r[H]||r["@@iterator"],typeof r=="function"?r:null)}var te=Symbol.for("react.client.reference");function ue(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===te?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case F:return"Fragment";case M:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case z: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:ue(r.type)||"Memo";case L:i=r._payload,r=r._init;try{return ue(r(i))}catch{}}return null}var oe=Array.isArray,X=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},le=[],J=-1;function G(r){return{current:r}}function Q(r){0>J||(r.current=le[J],le[J]=null,J--)}function K(r,i){J++,le[J]=r.current,r.current=i}var W=G(null),$=G(null),fe=G(null),ae=G(null);function ne(r,i){switch(K(fe,i),K($,r),K(W,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?XS(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=XS(i),r=ZS(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Q(W),K(W,r)}function Z(){Q(W),Q($),Q(fe)}function O(r){r.memoizedState!==null&&K(ae,r);var i=W.current,a=ZS(i,r.type);i!==a&&(K($,r),K(W,a))}function q(r){$.current===r&&(Q(W),Q($)),ae.current===r&&(Q(ae),Wl._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 _(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(De){var Ue=De}Reflect.construct(r,[],Ge)}else{try{Ge.call()}catch(De){Ue=De}r.call(Ge.prototype)}}else{try{throw Error()}catch(De){Ue=De}(Ge=r())&&typeof Ge.catch=="function"&&Ge.catch(function(){})}}catch(De){if(De&&Ue&&typeof De.stack=="string")return[De.stack,Ue.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");b&&b.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(b=d=0;d<Fe.length&&!Fe[d].includes("DetermineComponentFrameRoot");)d++;for(;b<Me.length&&!Me[b].includes("DetermineComponentFrameRoot");)b++;if(d===Fe.length||b===Me.length)for(d=Fe.length-1,b=Me.length-1;1<=d&&0<=b&&Fe[d]!==Me[b];)b--;for(;1<=d&&0<=b;d--,b--)if(Fe[d]!==Me[b]){if(d!==1||b!==1)do if(d--,b--,0>b||Fe[d]!==Me[b]){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<=b);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 _(r.type,!1);case 11:return _(r.type.render,!1);case 1:return _(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 D=Object.prototype.hasOwnProperty,he=e.unstable_scheduleCallback,ce=e.unstable_cancelCallback,Ee=e.unstable_shouldYield,Be=e.unstable_requestPaint,de=e.unstable_now,ve=e.unstable_getCurrentPriorityLevel,x=e.unstable_ImmediatePriority,B=e.unstable_UserBlockingPriority,N=e.unstable_NormalPriority,ie=e.unstable_LowPriority,me=e.unstable_IdlePriority,xe=e.log,Ce=e.unstable_setDisableYieldValue,we=null,Se=null;function He(r){if(typeof xe=="function"&&Ce(r),Se&&typeof Se.setStrictMode=="function")try{Se.setStrictMode(we,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 b=0,E=r.suspendedLanes,V=r.pingedLanes;r=r.warmLanes;var ge=d&134217727;return ge!==0?(d=ge&~E,d!==0?b=tt(d):(V&=ge,V!==0?b=tt(V):a||(a=ge&~r,a!==0&&(b=tt(a))))):(ge=d&~E,ge!==0?b=tt(ge):V!==0?b=tt(V):a||(a=d&~r,a!==0&&(b=tt(a)))),b===0?0:i!==0&&i!==b&&(i&E)===0&&(E=b&-b,a=i&-i,E>=a||E===32&&(a&4194048)!==0)?i:b}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 Zt(){var r=yt;return yt<<=1,(yt&62914560)===0&&(yt=4194304),r}function Ar(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,b,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 De=Ue[$e];De!==null&&(De.lane&=-536870913)}a&=~Ge}d!==0&&Ye(r,d,0),E!==0&&b===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),b=1<<d;b&i|r[d]&i&&(r[d]|=i),a&=~b}}function st(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 rr(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Br(){var r=re.p;return r!==0?r:(r=window.event,r===void 0?32:v2(r.type))}function zn(r,i){var a=re.p;try{return re.p=r,i()}finally{re.p=a}}var Rr=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Rr,nr="__reactProps$"+Rr,Mr="__reactContainer$"+Rr,Ur="__reactEvents$"+Rr,gn="__reactListeners$"+Rr,xn="__reactHandles$"+Rr,kr="__reactResources$"+Rr,wr="__reactMarker$"+Rr;function Vo(r){delete r[Ht],delete r[nr],delete r[Ur],delete r[gn],delete r[xn]}function xi(r){var i=r[Ht];if(i)return i;for(var a=r.parentNode;a;){if(i=a[Mr]||a[Ht]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(r=o2(r);r!==null;){if(a=r[Ht])return a;r=o2(r)}return i}r=a,a=r.parentNode}return null}function Ei(r){if(r=r[Ht]||r[Mr]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Li(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(o(33))}function Si(r){var i=r[kr];return i||(i=r[kr]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function ur(r){r[wr]=!0}var qs=new Set,kv={};function Hs(r,i){za(r,i),za(r+"Capture",i)}function za(r,i){for(kv[r]=i,r=0;r<i.length;r++)qs.add(i[r])}var W6=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]*$"),Lv={},zv={};function X6(r){return D.call(zv,r)?!0:D.call(Lv,r)?!1:W6.test(r)?zv[r]=!0:(Lv[r]=!0,!1)}function Tf(r,i,a){if(X6(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 Bf(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 ro(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 oi(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function $v(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Z6(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 b=d.get,E=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return b.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 Vp(r){if(!r._valueTracker){var i=$v(r)?"checked":"value";r._valueTracker=Z6(r,i,""+r[i])}}function qv(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),d="";return r&&(d=$v(r)?r.checked?"true":"false":r.value),r=d,r!==a?(i.setValue(r),!0):!1}function Rf(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 J6=/[\n"\\]/g;function si(r){return r.replace(J6,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Wp(r,i,a,d,b,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=""+oi(i)):r.value!==""+oi(i)&&(r.value=""+oi(i)):V!=="submit"&&V!=="reset"||r.removeAttribute("value"),i!=null?Xp(r,V,oi(i)):a!=null?Xp(r,V,oi(a)):d!=null&&r.removeAttribute("value"),b==null&&E!=null&&(r.defaultChecked=!!E),b!=null&&(r.checked=b&&typeof b!="function"&&typeof b!="symbol"),ge!=null&&typeof ge!="function"&&typeof ge!="symbol"&&typeof ge!="boolean"?r.name=""+oi(ge):r.removeAttribute("name")}function Hv(r,i,a,d,b,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)){Vp(r);return}a=a!=null?""+oi(a):"",i=i!=null?""+oi(i):a,ge||i===r.value||(r.value=i),r.defaultValue=i}d=d??b,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),Vp(r)}function Xp(r,i,a){i==="number"&&Rf(r.ownerDocument)===r||r.defaultValue===""+a||(r.defaultValue=""+a)}function $a(r,i,a,d){if(r=r.options,i){i={};for(var b=0;b<a.length;b++)i["$"+a[b]]=!0;for(a=0;a<r.length;a++)b=i.hasOwnProperty("$"+r[a].value),r[a].selected!==b&&(r[a].selected=b),b&&d&&(r[a].defaultSelected=!0)}else{for(a=""+oi(a),i=null,b=0;b<r.length;b++){if(r[b].value===a){r[b].selected=!0,d&&(r[b].defaultSelected=!0);return}i!==null||r[b].disabled||(i=r[b])}i!==null&&(i.selected=!0)}}function Qv(r,i,a){if(i!=null&&(i=""+oi(i),i!==r.value&&(r.value=i),a==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=a!=null?""+oi(a):""}function Gv(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=oi(i),r.defaultValue=a,d=r.textContent,d===a&&d!==""&&d!==null&&(r.value=d),Vp(r)}function qa(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var e8=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 Kv(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||e8.has(i)?i==="float"?r.cssFloat=a:r[i]=(""+a).trim():r[i]=a+"px"}function Yv(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 b in i)d=i[b],i.hasOwnProperty(b)&&a[b]!==d&&Kv(r,b,d)}else for(var E in i)i.hasOwnProperty(E)&&Kv(r,E,i[E])}function Zp(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 t8=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"]]),r8=/^[\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 Mf(r){return r8.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function no(){}var Jp=null;function ey(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ha=null,Qa=null;function Vv(r){var i=Ei(r);if(i&&(r=i.stateNode)){var a=r[nr]||null;e:switch(r=i.stateNode,i.type){case"input":if(Wp(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="'+si(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var d=a[i];if(d!==r&&d.form===r.form){var b=d[nr]||null;if(!b)throw Error(o(90));Wp(d,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(i=0;i<a.length;i++)d=a[i],d.form===r.form&&qv(d)}break e;case"textarea":Qv(r,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&$a(r,!!a.multiple,i,!1)}}}var ty=!1;function Wv(r,i,a){if(ty)return r(i,a);ty=!0;try{var d=r(i);return d}finally{if(ty=!1,(Ha!==null||Qa!==null)&&(wh(),Ha&&(i=Ha,r=Qa,Qa=Ha=null,Vv(i),r)))for(i=0;i<r.length;i++)Vv(r[i])}}function dl(r,i){var a=r.stateNode;if(a===null)return null;var d=a[nr]||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 io=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ry=!1;if(io)try{var pl={};Object.defineProperty(pl,"passive",{get:function(){ry=!0}}),window.addEventListener("test",pl,pl),window.removeEventListener("test",pl,pl)}catch{ry=!1}var Wo=null,ny=null,Uf=null;function Xv(){if(Uf)return Uf;var r,i=ny,a=i.length,d,b="value"in Wo?Wo.value:Wo.textContent,E=b.length;for(r=0;r<a&&i[r]===b[r];r++);var V=a-r;for(d=1;d<=V&&i[a-d]===b[E-d];d++);return Uf=b.slice(r,1<d?1-d:void 0)}function jf(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 Nf(){return!0}function Zv(){return!1}function En(r){function i(a,d,b,E,V){this._reactName=a,this._targetInst=b,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)?Nf:Zv,this.isPropagationStopped=Zv,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=Nf)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Nf)},persist:function(){},isPersistent:Nf}),i}var Qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Df=En(Qs),yl=y({},Qs,{view:0,detail:0}),n8=En(yl),iy,oy,gl,Pf=y({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ay,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!==gl&&(gl&&r.type==="mousemove"?(iy=r.screenX-gl.screenX,oy=r.screenY-gl.screenY):oy=iy=0,gl=r),iy)},movementY:function(r){return"movementY"in r?r.movementY:oy}}),Jv=En(Pf),i8=y({},Pf,{dataTransfer:0}),o8=En(i8),s8=y({},yl,{relatedTarget:0}),sy=En(s8),a8=y({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),u8=En(a8),l8=y({},Qs,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),c8=En(l8),f8=y({},Qs,{data:0}),ex=En(f8),h8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d8={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"},p8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function y8(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=p8[r])?!!i[r]:!1}function ay(){return y8}var g8=y({},yl,{key:function(r){if(r.key){var i=h8[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=jf(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?d8[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ay,charCode:function(r){return r.type==="keypress"?jf(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?jf(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),m8=En(g8),b8=y({},Pf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tx=En(b8),A8=y({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ay}),w8=En(A8),v8=y({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),x8=En(v8),E8=y({},Pf,{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}),S8=En(E8),I8=y({},Qs,{newState:0,oldState:0}),_8=En(I8),C8=[9,13,27,32],uy=io&&"CompositionEvent"in window,ml=null;io&&"documentMode"in document&&(ml=document.documentMode);var F8=io&&"TextEvent"in window&&!ml,rx=io&&(!uy||ml&&8<ml&&11>=ml),nx=" ",ix=!1;function ox(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 sx(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ga=!1;function O8(r,i){switch(r){case"compositionend":return sx(i);case"keypress":return i.which!==32?null:(ix=!0,nx);case"textInput":return r=i.data,r===nx&&ix?null:r;default:return null}}function T8(r,i){if(Ga)return r==="compositionend"||!uy&&ox(r,i)?(r=Xv(),Uf=ny=Wo=null,Ga=!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 rx&&i.locale!=="ko"?null:i.data;default:return null}}var B8={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 ax(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!B8[r.type]:i==="textarea"}function ux(r,i,a,d){Ha?Qa?Qa.push(d):Qa=[d]:Ha=d,i=Ch(i,"onChange"),0<i.length&&(a=new Df("onChange","change",null,a,d),r.push({event:a,listeners:i}))}var bl=null,Al=null;function R8(r){QS(r,0)}function kf(r){var i=Li(r);if(qv(i))return r}function lx(r,i){if(r==="change")return i}var cx=!1;if(io){var ly;if(io){var cy="oninput"in document;if(!cy){var fx=document.createElement("div");fx.setAttribute("oninput","return;"),cy=typeof fx.oninput=="function"}ly=cy}else ly=!1;cx=ly&&(!document.documentMode||9<document.documentMode)}function hx(){bl&&(bl.detachEvent("onpropertychange",dx),Al=bl=null)}function dx(r){if(r.propertyName==="value"&&kf(Al)){var i=[];ux(i,Al,r,ey(r)),Wv(R8,i)}}function M8(r,i,a){r==="focusin"?(hx(),bl=i,Al=a,bl.attachEvent("onpropertychange",dx)):r==="focusout"&&hx()}function U8(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return kf(Al)}function j8(r,i){if(r==="click")return kf(i)}function N8(r,i){if(r==="input"||r==="change")return kf(i)}function D8(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var $n=typeof Object.is=="function"?Object.is:D8;function wl(r,i){if($n(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 b=a[d];if(!D.call(i,b)||!$n(r[b],i[b]))return!1}return!0}function px(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function yx(r,i){var a=px(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=px(a)}}function gx(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?gx(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function mx(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Rf(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=Rf(r.document)}return i}function fy(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 P8=io&&"documentMode"in document&&11>=document.documentMode,Ka=null,hy=null,vl=null,dy=!1;function bx(r,i,a){var d=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;dy||Ka==null||Ka!==Rf(d)||(d=Ka,"selectionStart"in d&&fy(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}),vl&&wl(vl,d)||(vl=d,d=Ch(hy,"onSelect"),0<d.length&&(i=new Df("onSelect","select",null,i,a),r.push({event:i,listeners:d}),i.target=Ka)))}function Gs(r,i){var a={};return a[r.toLowerCase()]=i.toLowerCase(),a["Webkit"+r]="webkit"+i,a["Moz"+r]="moz"+i,a}var Ya={animationend:Gs("Animation","AnimationEnd"),animationiteration:Gs("Animation","AnimationIteration"),animationstart:Gs("Animation","AnimationStart"),transitionrun:Gs("Transition","TransitionRun"),transitionstart:Gs("Transition","TransitionStart"),transitioncancel:Gs("Transition","TransitionCancel"),transitionend:Gs("Transition","TransitionEnd")},py={},Ax={};io&&(Ax=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function Ks(r){if(py[r])return py[r];if(!Ya[r])return r;var i=Ya[r],a;for(a in i)if(i.hasOwnProperty(a)&&a in Ax)return py[r]=i[a];return r}var vx=Ks("animationend"),xx=Ks("animationiteration"),Ex=Ks("animationstart"),k8=Ks("transitionrun"),L8=Ks("transitionstart"),z8=Ks("transitioncancel"),Sx=Ks("transitionend"),Ix=new Map,yy="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(" ");yy.push("scrollEnd");function Ii(r,i){Ix.set(r,i),Hs(i,[r])}var Lf=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)},ai=[],Va=0,gy=0;function zf(){for(var r=Va,i=gy=Va=0;i<r;){var a=ai[i];ai[i++]=null;var d=ai[i];ai[i++]=null;var b=ai[i];ai[i++]=null;var E=ai[i];if(ai[i++]=null,d!==null&&b!==null){var V=d.pending;V===null?b.next=b:(b.next=V.next,V.next=b),d.pending=b}E!==0&&_x(a,b,E)}}function $f(r,i,a,d){ai[Va++]=r,ai[Va++]=i,ai[Va++]=a,ai[Va++]=d,gy|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function my(r,i,a,d){return $f(r,i,a,d),qf(r)}function Ys(r,i){return $f(r,null,null,i),qf(r)}function _x(r,i,a){r.lanes|=a;var d=r.alternate;d!==null&&(d.lanes|=a);for(var b=!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||(b=!0)),r=E,E=E.return;return r.tag===3?(E=r.stateNode,b&&i!==null&&(b=31-Ke(a),r=E.hiddenUpdates,d=r[b],d===null?r[b]=[i]:d.push(i),i.lane=a|536870912),E):null}function qf(r){if(50<ql)throw ql=0,_g=null,Error(o(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Wa={};function $8(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 qn(r,i,a,d){return new $8(r,i,a,d)}function by(r){return r=r.prototype,!(!r||!r.isReactComponent)}function oo(r,i){var a=r.alternate;return a===null?(a=qn(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 Cx(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 Hf(r,i,a,d,b,E){var V=0;if(d=r,typeof r=="function")by(r)&&(V=1);else if(typeof r=="string")V=KR(r,a,W.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case U:return r=qn(31,a,i,b),r.elementType=U,r.lanes=E,r;case F:return Vs(a.children,b,E,i);case S:V=8,b|=24;break;case M:return r=qn(12,a,i,b|2),r.elementType=M,r.lanes=E,r;case T:return r=qn(13,a,i,b),r.elementType=T,r.lanes=E,r;case z:return r=qn(19,a,i,b),r.elementType=z,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=qn(V,a,i,b),i.elementType=r,i.type=d,i.lanes=E,i}function Vs(r,i,a,d){return r=qn(7,r,d,i),r.lanes=a,r}function Ay(r,i,a){return r=qn(6,r,null,i),r.lanes=a,r}function Fx(r){var i=qn(18,null,null,0);return i.stateNode=r,i}function wy(r,i,a){return i=qn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Ox=new WeakMap;function ui(r,i){if(typeof r=="object"&&r!==null){var a=Ox.get(r);return a!==void 0?a:(i={value:r,source:i,stack:C(i)},Ox.set(r,i),i)}return{value:r,source:i,stack:C(i)}}var Xa=[],Za=0,Qf=null,xl=0,li=[],ci=0,Xo=null,zi=1,$i="";function so(r,i){Xa[Za++]=xl,Xa[Za++]=Qf,Qf=r,xl=i}function Tx(r,i,a){li[ci++]=zi,li[ci++]=$i,li[ci++]=Xo,Xo=r;var d=zi;r=$i;var b=32-Ke(d)-1;d&=~(1<<b),a+=1;var E=32-Ke(i)+b;if(30<E){var V=b-b%5;E=(d&(1<<V)-1).toString(32),d>>=V,b-=V,zi=1<<32-Ke(i)+b|a<<b|d,$i=E+r}else zi=1<<E|a<<b|d,$i=r}function vy(r){r.return!==null&&(so(r,1),Tx(r,1,0))}function xy(r){for(;r===Qf;)Qf=Xa[--Za],Xa[Za]=null,xl=Xa[--Za],Xa[Za]=null;for(;r===Xo;)Xo=li[--ci],li[ci]=null,$i=li[--ci],li[ci]=null,zi=li[--ci],li[ci]=null}function Bx(r,i){li[ci++]=zi,li[ci++]=$i,li[ci++]=Xo,zi=i.id,$i=i.overflow,Xo=r}var Vr=null,Jt=null,Mt=!1,Zo=null,fi=!1,Ey=Error(o(519));function Jo(r){var i=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw El(ui(i,r)),Ey}function Rx(r){var i=r.stateNode,a=r.type,d=r.memoizedProps;switch(i[Ht]=r,i[nr]=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),Hv(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),Gv(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||VS(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=no),i=!0):i=!1,i||Jo(r,!0)}function Mx(r){for(Vr=r.return;Vr;)switch(Vr.tag){case 5:case 31:case 13:fi=!1;return;case 27:case 3:fi=!0;return;default:Vr=Vr.return}}function Ja(r){if(r!==Vr)return!1;if(!Mt)return Mx(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")||zg(r.type,r.memoizedProps)),a=!a),a&&Jt&&Jo(r),Mx(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));Jt=i2(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));Jt=i2(r)}else i===27?(i=Jt,ds(r.type)?(r=Gg,Gg=null,Jt=r):Jt=i):Jt=Vr?di(r.stateNode.nextSibling):null;return!0}function Ws(){Jt=Vr=null,Mt=!1}function Sy(){var r=Zo;return r!==null&&(Cn===null?Cn=r:Cn.push.apply(Cn,r),Zo=null),r}function El(r){Zo===null?Zo=[r]:Zo.push(r)}var Iy=G(null),Xs=null,ao=null;function es(r,i,a){K(Iy,i._currentValue),i._currentValue=a}function uo(r){r._currentValue=Iy.current,Q(Iy)}function _y(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 Cy(r,i,a,d){var b=r.child;for(b!==null&&(b.return=r);b!==null;){var E=b.dependencies;if(E!==null){var V=b.child;E=E.firstContext;e:for(;E!==null;){var ge=E;E=b;for(var Fe=0;Fe<i.length;Fe++)if(ge.context===i[Fe]){E.lanes|=a,ge=E.alternate,ge!==null&&(ge.lanes|=a),_y(E.return,a,r),d||(V=null);break e}E=ge.next}}else if(b.tag===18){if(V=b.return,V===null)throw Error(o(341));V.lanes|=a,E=V.alternate,E!==null&&(E.lanes|=a),_y(V,a,r),V=null}else V=b.child;if(V!==null)V.return=b;else for(V=b;V!==null;){if(V===r){V=null;break}if(b=V.sibling,b!==null){b.return=V.return,V=b;break}V=V.return}b=V}}function eu(r,i,a,d){r=null;for(var b=i,E=!1;b!==null;){if(!E){if((b.flags&524288)!==0)E=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var V=b.alternate;if(V===null)throw Error(o(387));if(V=V.memoizedProps,V!==null){var ge=b.type;$n(b.pendingProps.value,V.value)||(r!==null?r.push(ge):r=[ge])}}else if(b===ae.current){if(V=b.alternate,V===null)throw Error(o(387));V.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(r!==null?r.push(Wl):r=[Wl])}b=b.return}r!==null&&Cy(i,r,a,d),i.flags|=262144}function Gf(r){for(r=r.firstContext;r!==null;){if(!$n(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Zs(r){Xs=r,ao=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Wr(r){return Ux(Xs,r)}function Kf(r,i){return Xs===null&&Zs(r),Ux(r,i)}function Ux(r,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},ao===null){if(r===null)throw Error(o(308));ao=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else ao=ao.next=i;return a}var q8=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()})}},H8=e.unstable_scheduleCallback,Q8=e.unstable_NormalPriority,vr={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fy(){return{controller:new q8,data:new Map,refCount:0}}function Sl(r){r.refCount--,r.refCount===0&&H8(Q8,function(){r.controller.abort()})}var Il=null,Oy=0,tu=0,ru=null;function G8(r,i){if(Il===null){var a=Il=[];Oy=0,tu=Rg(),ru={status:"pending",value:void 0,then:function(d){a.push(d)}}}return Oy++,i.then(jx,jx),i}function jx(){if(--Oy===0&&Il!==null){ru!==null&&(ru.status="fulfilled");var r=Il;Il=null,tu=0,ru=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function K8(r,i){var a=[],d={status:"pending",value:null,reason:null,then:function(b){a.push(b)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var b=0;b<a.length;b++)(0,a[b])(i)},function(b){for(d.status="rejected",d.reason=b,b=0;b<a.length;b++)(0,a[b])(void 0)}),d}var Nx=X.S;X.S=function(r,i){AS=de(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&G8(r,i),Nx!==null&&Nx(r,i)};var Js=G(null);function Ty(){var r=Js.current;return r!==null?r:Wt.pooledCache}function Yf(r,i){i===null?K(Js,Js.current):K(Js,i.pool)}function Dx(){var r=Ty();return r===null?null:{parent:vr._currentValue,pool:r}}var nu=Error(o(460)),By=Error(o(474)),Vf=Error(o(542)),Wf={then:function(){}};function Px(r){return r=r.status,r==="fulfilled"||r==="rejected"}function kx(r,i,a){switch(a=r[a],a===void 0?r.push(i):a!==i&&(i.then(no,no),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,zx(r),r;default:if(typeof i.status=="string")i.then(no,no);else{if(r=Wt,r!==null&&100<r.shellSuspendCounter)throw Error(o(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var b=i;b.status="fulfilled",b.value=d}},function(d){if(i.status==="pending"){var b=i;b.status="rejected",b.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,zx(r),r}throw ta=i,nu}}function ea(r){try{var i=r._init;return i(r._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ta=a,nu):a}}var ta=null;function Lx(){if(ta===null)throw Error(o(459));var r=ta;return ta=null,r}function zx(r){if(r===nu||r===Vf)throw Error(o(483))}var iu=null,_l=0;function Xf(r){var i=_l;return _l+=1,iu===null&&(iu=[]),kx(iu,r,i)}function Cl(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Zf(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 $x(r){function i(Te,Oe){if(r){var Re=Te.deletions;Re===null?(Te.deletions=[Oe],Te.flags|=16):Re.push(Oe)}}function a(Te,Oe){if(!r)return null;for(;Oe!==null;)i(Te,Oe),Oe=Oe.sibling;return null}function d(Te){for(var Oe=new Map;Te!==null;)Te.key!==null?Oe.set(Te.key,Te):Oe.set(Te.index,Te),Te=Te.sibling;return Oe}function b(Te,Oe){return Te=oo(Te,Oe),Te.index=0,Te.sibling=null,Te}function E(Te,Oe,Re){return Te.index=Re,r?(Re=Te.alternate,Re!==null?(Re=Re.index,Re<Oe?(Te.flags|=67108866,Oe):Re):(Te.flags|=67108866,Oe)):(Te.flags|=1048576,Oe)}function V(Te){return r&&Te.alternate===null&&(Te.flags|=67108866),Te}function ge(Te,Oe,Re,Qe){return Oe===null||Oe.tag!==6?(Oe=Ay(Re,Te.mode,Qe),Oe.return=Te,Oe):(Oe=b(Oe,Re),Oe.return=Te,Oe)}function Fe(Te,Oe,Re,Qe){var pt=Re.type;return pt===F?$e(Te,Oe,Re.props.children,Qe,Re.key):Oe!==null&&(Oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===L&&ea(pt)===Oe.type)?(Oe=b(Oe,Re.props),Cl(Oe,Re),Oe.return=Te,Oe):(Oe=Hf(Re.type,Re.key,Re.props,null,Te.mode,Qe),Cl(Oe,Re),Oe.return=Te,Oe)}function Me(Te,Oe,Re,Qe){return Oe===null||Oe.tag!==4||Oe.stateNode.containerInfo!==Re.containerInfo||Oe.stateNode.implementation!==Re.implementation?(Oe=wy(Re,Te.mode,Qe),Oe.return=Te,Oe):(Oe=b(Oe,Re.children||[]),Oe.return=Te,Oe)}function $e(Te,Oe,Re,Qe,pt){return Oe===null||Oe.tag!==7?(Oe=Vs(Re,Te.mode,Qe,pt),Oe.return=Te,Oe):(Oe=b(Oe,Re),Oe.return=Te,Oe)}function Ge(Te,Oe,Re){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number"||typeof Oe=="bigint")return Oe=Ay(""+Oe,Te.mode,Re),Oe.return=Te,Oe;if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case m:return Re=Hf(Oe.type,Oe.key,Oe.props,null,Te.mode,Re),Cl(Re,Oe),Re.return=Te,Re;case w:return Oe=wy(Oe,Te.mode,Re),Oe.return=Te,Oe;case L:return Oe=ea(Oe),Ge(Te,Oe,Re)}if(oe(Oe)||P(Oe))return Oe=Vs(Oe,Te.mode,Re,null),Oe.return=Te,Oe;if(typeof Oe.then=="function")return Ge(Te,Xf(Oe),Re);if(Oe.$$typeof===I)return Ge(Te,Kf(Te,Oe),Re);Zf(Te,Oe)}return null}function Ue(Te,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(Te,Oe,""+Re,Qe);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case m:return Re.key===pt?Fe(Te,Oe,Re,Qe):null;case w:return Re.key===pt?Me(Te,Oe,Re,Qe):null;case L:return Re=ea(Re),Ue(Te,Oe,Re,Qe)}if(oe(Re)||P(Re))return pt!==null?null:$e(Te,Oe,Re,Qe,null);if(typeof Re.then=="function")return Ue(Te,Oe,Xf(Re),Qe);if(Re.$$typeof===I)return Ue(Te,Oe,Kf(Te,Re),Qe);Zf(Te,Re)}return null}function De(Te,Oe,Re,Qe,pt){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"||typeof Qe=="bigint")return Te=Te.get(Re)||null,ge(Oe,Te,""+Qe,pt);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case m:return Te=Te.get(Qe.key===null?Re:Qe.key)||null,Fe(Oe,Te,Qe,pt);case w:return Te=Te.get(Qe.key===null?Re:Qe.key)||null,Me(Oe,Te,Qe,pt);case L:return Qe=ea(Qe),De(Te,Oe,Re,Qe,pt)}if(oe(Qe)||P(Qe))return Te=Te.get(Re)||null,$e(Oe,Te,Qe,pt,null);if(typeof Qe.then=="function")return De(Te,Oe,Re,Xf(Qe),pt);if(Qe.$$typeof===I)return De(Te,Oe,Re,Kf(Oe,Qe),pt);Zf(Oe,Qe)}return null}function ut(Te,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 Nt=Ue(Te,ct,Re[xt],Qe);if(Nt===null){ct===null&&(ct=Ot);break}r&&ct&&Nt.alternate===null&&i(Te,ct),Oe=E(Nt,Oe,xt),jt===null?pt=Nt:jt.sibling=Nt,jt=Nt,ct=Ot}if(xt===Re.length)return a(Te,ct),Mt&&so(Te,xt),pt;if(ct===null){for(;xt<Re.length;xt++)ct=Ge(Te,Re[xt],Qe),ct!==null&&(Oe=E(ct,Oe,xt),jt===null?pt=ct:jt.sibling=ct,jt=ct);return Mt&&so(Te,xt),pt}for(ct=d(ct);xt<Re.length;xt++)Ot=De(ct,Te,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(Te,bs)}),Mt&&so(Te,xt),pt}function mt(Te,Oe,Re,Qe){if(Re==null)throw Error(o(151));for(var pt=null,jt=null,ct=Oe,xt=Oe=0,Ot=null,Nt=Re.next();ct!==null&&!Nt.done;xt++,Nt=Re.next()){ct.index>xt?(Ot=ct,ct=null):Ot=ct.sibling;var bs=Ue(Te,ct,Nt.value,Qe);if(bs===null){ct===null&&(ct=Ot);break}r&&ct&&bs.alternate===null&&i(Te,ct),Oe=E(bs,Oe,xt),jt===null?pt=bs:jt.sibling=bs,jt=bs,ct=Ot}if(Nt.done)return a(Te,ct),Mt&&so(Te,xt),pt;if(ct===null){for(;!Nt.done;xt++,Nt=Re.next())Nt=Ge(Te,Nt.value,Qe),Nt!==null&&(Oe=E(Nt,Oe,xt),jt===null?pt=Nt:jt.sibling=Nt,jt=Nt);return Mt&&so(Te,xt),pt}for(ct=d(ct);!Nt.done;xt++,Nt=Re.next())Nt=De(ct,Te,xt,Nt.value,Qe),Nt!==null&&(r&&Nt.alternate!==null&&ct.delete(Nt.key===null?xt:Nt.key),Oe=E(Nt,Oe,xt),jt===null?pt=Nt:jt.sibling=Nt,jt=Nt);return r&&ct.forEach(function(i4){return i(Te,i4)}),Mt&&so(Te,xt),pt}function Kt(Te,Oe,Re,Qe){if(typeof Re=="object"&&Re!==null&&Re.type===F&&Re.key===null&&(Re=Re.props.children),typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case m:e:{for(var pt=Re.key;Oe!==null;){if(Oe.key===pt){if(pt=Re.type,pt===F){if(Oe.tag===7){a(Te,Oe.sibling),Qe=b(Oe,Re.props.children),Qe.return=Te,Te=Qe;break e}}else if(Oe.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===L&&ea(pt)===Oe.type){a(Te,Oe.sibling),Qe=b(Oe,Re.props),Cl(Qe,Re),Qe.return=Te,Te=Qe;break e}a(Te,Oe);break}else i(Te,Oe);Oe=Oe.sibling}Re.type===F?(Qe=Vs(Re.props.children,Te.mode,Qe,Re.key),Qe.return=Te,Te=Qe):(Qe=Hf(Re.type,Re.key,Re.props,null,Te.mode,Qe),Cl(Qe,Re),Qe.return=Te,Te=Qe)}return V(Te);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(Te,Oe.sibling),Qe=b(Oe,Re.children||[]),Qe.return=Te,Te=Qe;break e}else{a(Te,Oe);break}else i(Te,Oe);Oe=Oe.sibling}Qe=wy(Re,Te.mode,Qe),Qe.return=Te,Te=Qe}return V(Te);case L:return Re=ea(Re),Kt(Te,Oe,Re,Qe)}if(oe(Re))return ut(Te,Oe,Re,Qe);if(P(Re)){if(pt=P(Re),typeof pt!="function")throw Error(o(150));return Re=pt.call(Re),mt(Te,Oe,Re,Qe)}if(typeof Re.then=="function")return Kt(Te,Oe,Xf(Re),Qe);if(Re.$$typeof===I)return Kt(Te,Oe,Kf(Te,Re),Qe);Zf(Te,Re)}return typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint"?(Re=""+Re,Oe!==null&&Oe.tag===6?(a(Te,Oe.sibling),Qe=b(Oe,Re),Qe.return=Te,Te=Qe):(a(Te,Oe),Qe=Ay(Re,Te.mode,Qe),Qe.return=Te,Te=Qe),V(Te)):a(Te,Oe)}return function(Te,Oe,Re,Qe){try{_l=0;var pt=Kt(Te,Oe,Re,Qe);return iu=null,pt}catch(ct){if(ct===nu||ct===Vf)throw ct;var jt=qn(29,ct,null,Te.mode);return jt.lanes=Qe,jt.return=Te,jt}finally{}}}var ra=$x(!0),qx=$x(!1),ts=!1;function Ry(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function My(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 b=d.pending;return b===null?i.next=i:(i.next=b.next,b.next=i),d.pending=i,i=qf(r),_x(r,null,a),i}return $f(r,d,i,a),qf(r)}function Fl(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 Uy(r,i){var a=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,a===d)){var b=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?b=E=V:E=E.next=V,a=a.next}while(a!==null);E===null?b=E=i:E=E.next=i}else b=E=i;a={baseState:d.baseState,firstBaseUpdate:b,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 jy=!1;function Ol(){if(jy){var r=ru;if(r!==null)throw r}}function Tl(r,i,a,d){jy=!1;var b=r.updateQueue;ts=!1;var E=b.firstBaseUpdate,V=b.lastBaseUpdate,ge=b.shared.pending;if(ge!==null){b.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=b.baseState;V=0,$e=Me=Fe=null,ge=E;do{var Ue=ge.lane&-536870913,De=Ue!==ge.lane;if(De?(Ft&Ue)===Ue:(d&Ue)===Ue){Ue!==0&&Ue===tu&&(jy=!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,De&&(r.flags|=8192),De=b.callbacks,De===null?b.callbacks=[Ue]:De.push(Ue))}else De={lane:Ue,tag:ge.tag,payload:ge.payload,callback:ge.callback,next:null},$e===null?(Me=$e=De,Fe=Ge):$e=$e.next=De,V|=Ue;if(ge=ge.next,ge===null){if(ge=b.shared.pending,ge===null)break;De=ge,ge=De.next,De.next=null,b.lastBaseUpdate=De,b.shared.pending=null}}while(!0);$e===null&&(Fe=Ge),b.baseState=Fe,b.firstBaseUpdate=Me,b.lastBaseUpdate=$e,E===null&&(b.shared.lanes=0),us|=V,r.lanes=V,r.memoizedState=Ge}}function Hx(r,i){if(typeof r!="function")throw Error(o(191,r));r.call(i)}function Qx(r,i){var a=r.callbacks;if(a!==null)for(r.callbacks=null,r=0;r<a.length;r++)Hx(a[r],i)}var ou=G(null),Jf=G(0);function Gx(r,i){r=bo,K(Jf,r),K(ou,i),bo=r|i.baseLanes}function Ny(){K(Jf,bo),K(ou,ou.current)}function Dy(){bo=Jf.current,Q(ou),Q(Jf)}var Hn=G(null),hi=null;function is(r){var i=r.alternate;K(gr,gr.current&1),K(Hn,r),hi===null&&(i===null||ou.current!==null||i.memoizedState!==null)&&(hi=r)}function Py(r){K(gr,gr.current),K(Hn,r),hi===null&&(hi=r)}function Kx(r){r.tag===22?(K(gr,gr.current),K(Hn,r),hi===null&&(hi=r)):os()}function os(){K(gr,gr.current),K(Hn,Hn.current)}function Qn(r){Q(Hn),hi===r&&(hi=null),Q(gr)}var gr=G(0);function eh(r){for(var i=r;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Hg(a)||Qg(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 lo=0,vt=null,Qt=null,xr=null,th=!1,su=!1,na=!1,rh=0,Bl=0,au=null,Y8=0;function fr(){throw Error(o(321))}function ky(r,i){if(i===null)return!1;for(var a=0;a<i.length&&a<r.length;a++)if(!$n(r[a],i[a]))return!1;return!0}function Ly(r,i,a,d,b,E){return lo=E,vt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,X.H=r===null||r.memoizedState===null?TE:tg,na=!1,E=a(d,b),na=!1,su&&(E=Vx(i,a,d,b)),Yx(r),E}function Yx(r){X.H=Ul;var i=Qt!==null&&Qt.next!==null;if(lo=0,xr=Qt=vt=null,th=!1,Bl=0,au=null,i)throw Error(o(300));r===null||Er||(r=r.dependencies,r!==null&&Gf(r)&&(Er=!0))}function Vx(r,i,a,d){vt=r;var b=0;do{if(su&&(au=null),Bl=0,su=!1,25<=b)throw Error(o(301));if(b+=1,xr=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=BE,E=i(a,d)}while(su);return E}function V8(){var r=X.H,i=r.useState()[0];return i=typeof i.then=="function"?Rl(i):i,r=r.useState()[0],(Qt!==null?Qt.memoizedState:null)!==r&&(vt.flags|=1024),i}function zy(){var r=rh!==0;return rh=0,r}function $y(r,i,a){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~a}function qy(r){if(th){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}th=!1}lo=0,xr=Qt=vt=null,su=!1,Bl=rh=0,au=null}function mn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xr===null?vt.memoizedState=xr=r:xr=xr.next=r,xr}function mr(){if(Qt===null){var r=vt.alternate;r=r!==null?r.memoizedState:null}else r=Qt.next;var i=xr===null?vt.memoizedState:xr.next;if(i!==null)xr=i,Qt=r;else{if(r===null)throw vt.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},xr===null?vt.memoizedState=xr=r:xr=xr.next=r}return xr}function nh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rl(r){var i=Bl;return Bl+=1,au===null&&(au=[]),r=kx(au,r,i),i=vt,(xr===null?i.memoizedState:xr.next)===null&&(i=i.alternate,X.H=i===null||i.memoizedState===null?TE:tg),r}function ih(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Rl(r);if(r.$$typeof===I)return Wr(r)}throw Error(o(438,String(r)))}function Hy(r){var i=null,a=vt.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var d=vt.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(b){return b.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=nh(),vt.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 co(r,i){return typeof i=="function"?i(r):i}function oh(r){var i=mr();return Qy(i,Qt,r)}function Qy(r,i,a){var d=r.queue;if(d===null)throw Error(o(311));d.lastRenderedReducer=a;var b=r.baseQueue,E=d.pending;if(E!==null){if(b!==null){var V=b.next;b.next=E.next,E.next=V}i.baseQueue=b=E,d.pending=null}if(E=r.baseState,b===null)r.memoizedState=E;else{i=b.next;var ge=V=null,Fe=null,Me=i,$e=!1;do{var Ge=Me.lane&-536870913;if(Ge!==Me.lane?(Ft&Ge)===Ge:(lo&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===tu&&($e=!0);else if((lo&Ue)===Ue){Me=Me.next,Ue===tu&&($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,vt.lanes|=Ue,us|=Ue;Ge=Me.action,na&&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,vt.lanes|=Ge,us|=Ge;Me=Me.next}while(Me!==null&&Me!==i);if(Fe===null?V=E:Fe.next=ge,!$n(E,r.memoizedState)&&(Er=!0,$e&&(a=ru,a!==null)))throw a;r.memoizedState=E,r.baseState=V,r.baseQueue=Fe,d.lastRenderedState=E}return b===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function Gy(r){var i=mr(),a=i.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=r;var d=a.dispatch,b=a.pending,E=i.memoizedState;if(b!==null){a.pending=null;var V=b=b.next;do E=r(E,V.action),V=V.next;while(V!==b);$n(E,i.memoizedState)||(Er=!0),i.memoizedState=E,i.baseQueue===null&&(i.baseState=E),a.lastRenderedState=E}return[E,d]}function Wx(r,i,a){var d=vt,b=mr(),E=Mt;if(E){if(a===void 0)throw Error(o(407));a=a()}else a=i();var V=!$n((Qt||b).memoizedState,a);if(V&&(b.memoizedState=a,Er=!0),b=b.queue,Vy(Jx.bind(null,d,b,r),[r]),b.getSnapshot!==i||V||xr!==null&&xr.memoizedState.tag&1){if(d.flags|=2048,uu(9,{destroy:void 0},Zx.bind(null,d,b,a,i),null),Wt===null)throw Error(o(349));E||(lo&127)!==0||Xx(d,i,a)}return a}function Xx(r,i,a){r.flags|=16384,r={getSnapshot:i,value:a},i=vt.updateQueue,i===null?(i=nh(),vt.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,eE(i)&&tE(r)}function Jx(r,i,a){return a(function(){eE(i)&&tE(r)})}function eE(r){var i=r.getSnapshot;r=r.value;try{var a=i();return!$n(r,a)}catch{return!0}}function tE(r){var i=Ys(r,2);i!==null&&Fn(i,r,2)}function Ky(r){var i=mn();if(typeof r=="function"){var a=r;if(r=a(),na){He(!0);try{a()}finally{He(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:r},i}function rE(r,i,a,d){return r.baseState=a,Qy(r,Qt,typeof d=="function"?d:co)}function W8(r,i,a,d,b){if(uh(r))throw Error(o(485));if(r=i.action,r!==null){var E={payload:b,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,nE(i,E)):(E.next=a.next,i.pending=a.next=E)}}function nE(r,i){var a=i.action,d=i.payload,b=r.state;if(i.isTransition){var E=X.T,V={};X.T=V;try{var ge=a(b,d),Fe=X.S;Fe!==null&&Fe(V,ge),iE(r,i,ge)}catch(Me){Yy(r,i,Me)}finally{E!==null&&V.types!==null&&(E.types=V.types),X.T=E}}else try{E=a(b,d),iE(r,i,E)}catch(Me){Yy(r,i,Me)}}function iE(r,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(d){oE(r,i,d)},function(d){return Yy(r,i,d)}):oE(r,i,a)}function oE(r,i,a){i.status="fulfilled",i.value=a,sE(i),r.state=a,i=r.pending,i!==null&&(a=i.next,a===i?r.pending=null:(a=a.next,i.next=a,nE(r,a)))}function Yy(r,i,a){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=a,sE(i),i=i.next;while(i!==d)}r.action=null}function sE(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function aE(r,i){return i}function uE(r,i){if(Mt){var a=Wt.formState;if(a!==null){e:{var d=vt;if(Mt){if(Jt){t:{for(var b=Jt,E=fi;b.nodeType!==8;){if(!E){b=null;break t}if(b=di(b.nextSibling),b===null){b=null;break t}}E=b.data,b=E==="F!"||E==="F"?b:null}if(b){Jt=di(b.nextSibling),d=b.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:aE,lastRenderedState:i},a.queue=d,a=CE.bind(null,vt,d),d.dispatch=a,d=Ky(!1),E=eg.bind(null,vt,!1,d.queue),d=mn(),b={state:i,dispatch:null,action:r,pending:null},d.queue=b,a=W8.bind(null,vt,b,E,a),b.dispatch=a,d.memoizedState=r,[i,a,!1]}function lE(r){var i=mr();return cE(i,Qt,r)}function cE(r,i,a){if(i=Qy(r,i,aE)[0],r=oh(co)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=Rl(i)}catch(V){throw V===nu?Vf:V}else d=i;i=mr();var b=i.queue,E=b.dispatch;return a!==i.memoizedState&&(vt.flags|=2048,uu(9,{destroy:void 0},X8.bind(null,b,a),null)),[d,E,r]}function X8(r,i){r.action=i}function fE(r){var i=mr(),a=Qt;if(a!==null)return cE(i,a,r);mr(),i=i.memoizedState,a=mr();var d=a.queue.dispatch;return a.memoizedState=r,[i,d,!1]}function uu(r,i,a,d){return r={tag:r,create:a,deps:d,inst:i,next:null},i=vt.updateQueue,i===null&&(i=nh(),vt.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 hE(){return mr().memoizedState}function sh(r,i,a,d){var b=mn();vt.flags|=r,b.memoizedState=uu(1|i,{destroy:void 0},a,d===void 0?null:d)}function ah(r,i,a,d){var b=mr();d=d===void 0?null:d;var E=b.memoizedState.inst;Qt!==null&&d!==null&&ky(d,Qt.memoizedState.deps)?b.memoizedState=uu(i,E,a,d):(vt.flags|=r,b.memoizedState=uu(1|i,E,a,d))}function dE(r,i){sh(8390656,8,r,i)}function Vy(r,i){ah(2048,8,r,i)}function Z8(r){vt.flags|=4;var i=vt.updateQueue;if(i===null)i=nh(),vt.updateQueue=i,i.events=[r];else{var a=i.events;a===null?i.events=[r]:a.push(r)}}function pE(r){var i=mr().memoizedState;return Z8({ref:i,nextImpl:r}),function(){if((Pt&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}function yE(r,i){return ah(4,2,r,i)}function gE(r,i){return ah(4,4,r,i)}function mE(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 bE(r,i,a){a=a!=null?a.concat([r]):null,ah(4,4,mE.bind(null,i,r),a)}function Wy(){}function AE(r,i){var a=mr();i=i===void 0?null:i;var d=a.memoizedState;return i!==null&&ky(i,d[1])?d[0]:(a.memoizedState=[r,i],r)}function wE(r,i){var a=mr();i=i===void 0?null:i;var d=a.memoizedState;if(i!==null&&ky(i,d[1]))return d[0];if(d=r(),na){He(!0);try{r()}finally{He(!1)}}return a.memoizedState=[d,i],d}function Xy(r,i,a){return a===void 0||(lo&1073741824)!==0&&(Ft&261930)===0?r.memoizedState=i:(r.memoizedState=a,r=vS(),vt.lanes|=r,us|=r,a)}function vE(r,i,a,d){return $n(a,i)?a:ou.current!==null?(r=Xy(r,a,d),$n(r,i)||(Er=!0),r):(lo&42)===0||(lo&1073741824)!==0&&(Ft&261930)===0?(Er=!0,r.memoizedState=a):(r=vS(),vt.lanes|=r,us|=r,i)}function xE(r,i,a,d,b){var E=re.p;re.p=E!==0&&8>E?E:8;var V=X.T,ge={};X.T=ge,eg(r,!1,i,a);try{var Fe=b(),Me=X.S;if(Me!==null&&Me(ge,Fe),Fe!==null&&typeof Fe=="object"&&typeof Fe.then=="function"){var $e=K8(Fe,d);Ml(r,i,$e,Yn(r))}else Ml(r,i,d,Yn(r))}catch(Ge){Ml(r,i,{then:function(){},status:"rejected",reason:Ge},Yn())}finally{re.p=E,V!==null&&ge.types!==null&&(V.types=ge.types),X.T=V}}function J8(){}function Zy(r,i,a,d){if(r.tag!==5)throw Error(o(476));var b=EE(r).queue;xE(r,b,i,pe,a===null?J8:function(){return SE(r),a(d)})}function EE(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:co,lastRenderedState:pe},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:a},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function SE(r){var i=EE(r);i.next===null&&(i=r.alternate.memoizedState),Ml(r,i.next.queue,{},Yn())}function Jy(){return Wr(Wl)}function IE(){return mr().memoizedState}function _E(){return mr().memoizedState}function eR(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var a=Yn();r=rs(a);var d=ns(i,r,a);d!==null&&(Fn(d,i,a),Fl(d,i,a)),i={cache:Fy()},r.payload=i;return}i=i.return}}function tR(r,i,a){var d=Yn();a={lane:d,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},uh(r)?FE(i,a):(a=my(r,i,a,d),a!==null&&(Fn(a,r,d),OE(a,i,d)))}function CE(r,i,a){var d=Yn();Ml(r,i,a,d)}function Ml(r,i,a,d){var b={lane:d,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(uh(r))FE(i,b);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(b.hasEagerState=!0,b.eagerState=ge,$n(ge,V))return $f(r,i,b,0),Wt===null&&zf(),!1}catch{}finally{}if(a=my(r,i,b,d),a!==null)return Fn(a,r,d),OE(a,i,d),!0}return!1}function eg(r,i,a,d){if(d={lane:2,revertLane:Rg(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},uh(r)){if(i)throw Error(o(479))}else i=my(r,a,d,2),i!==null&&Fn(i,r,2)}function uh(r){var i=r.alternate;return r===vt||i!==null&&i===vt}function FE(r,i){su=th=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function OE(r,i,a){if((a&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,a|=d,i.lanes=a,Je(r,a)}}var Ul={readContext:Wr,use:ih,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useLayoutEffect:fr,useInsertionEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useSyncExternalStore:fr,useId:fr,useHostTransitionStatus:fr,useFormState:fr,useActionState:fr,useOptimistic:fr,useMemoCache:fr,useCacheRefresh:fr};Ul.useEffectEvent=fr;var TE={readContext:Wr,use:ih,useCallback:function(r,i){return mn().memoizedState=[r,i===void 0?null:i],r},useContext:Wr,useEffect:dE,useImperativeHandle:function(r,i,a){a=a!=null?a.concat([r]):null,sh(4194308,4,mE.bind(null,i,r),a)},useLayoutEffect:function(r,i){return sh(4194308,4,r,i)},useInsertionEffect:function(r,i){sh(4,2,r,i)},useMemo:function(r,i){var a=mn();i=i===void 0?null:i;var d=r();if(na){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 b=a(i);if(na){He(!0);try{a(i)}finally{He(!1)}}}else b=i;return d.memoizedState=d.baseState=b,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:b},d.queue=r,r=r.dispatch=tR.bind(null,vt,r),[d.memoizedState,r]},useRef:function(r){var i=mn();return r={current:r},i.memoizedState=r},useState:function(r){r=Ky(r);var i=r.queue,a=CE.bind(null,vt,i);return i.dispatch=a,[r.memoizedState,a]},useDebugValue:Wy,useDeferredValue:function(r,i){var a=mn();return Xy(a,r,i)},useTransition:function(){var r=Ky(!1);return r=xE.bind(null,vt,r.queue,!0,!1),mn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,a){var d=vt,b=mn();if(Mt){if(a===void 0)throw Error(o(407));a=a()}else{if(a=i(),Wt===null)throw Error(o(349));(Ft&127)!==0||Xx(d,i,a)}b.memoizedState=a;var E={value:a,getSnapshot:i};return b.queue=E,dE(Jx.bind(null,d,E,r),[r]),d.flags|=2048,uu(9,{destroy:void 0},Zx.bind(null,d,E,a,i),null),a},useId:function(){var r=mn(),i=Wt.identifierPrefix;if(Mt){var a=$i,d=zi;a=(d&~(1<<32-Ke(d)-1)).toString(32)+a,i="_"+i+"R_"+a,a=rh++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=Y8++,i="_"+i+"r_"+a.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Jy,useFormState:uE,useActionState:uE,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=eg.bind(null,vt,!0,a),a.dispatch=i,[r,i]},useMemoCache:Hy,useCacheRefresh:function(){return mn().memoizedState=eR.bind(null,vt)},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)}}},tg={readContext:Wr,use:ih,useCallback:AE,useContext:Wr,useEffect:Vy,useImperativeHandle:bE,useInsertionEffect:yE,useLayoutEffect:gE,useMemo:wE,useReducer:oh,useRef:hE,useState:function(){return oh(co)},useDebugValue:Wy,useDeferredValue:function(r,i){var a=mr();return vE(a,Qt.memoizedState,r,i)},useTransition:function(){var r=oh(co)[0],i=mr().memoizedState;return[typeof r=="boolean"?r:Rl(r),i]},useSyncExternalStore:Wx,useId:IE,useHostTransitionStatus:Jy,useFormState:lE,useActionState:lE,useOptimistic:function(r,i){var a=mr();return rE(a,Qt,r,i)},useMemoCache:Hy,useCacheRefresh:_E};tg.useEffectEvent=pE;var BE={readContext:Wr,use:ih,useCallback:AE,useContext:Wr,useEffect:Vy,useImperativeHandle:bE,useInsertionEffect:yE,useLayoutEffect:gE,useMemo:wE,useReducer:Gy,useRef:hE,useState:function(){return Gy(co)},useDebugValue:Wy,useDeferredValue:function(r,i){var a=mr();return Qt===null?Xy(a,r,i):vE(a,Qt.memoizedState,r,i)},useTransition:function(){var r=Gy(co)[0],i=mr().memoizedState;return[typeof r=="boolean"?r:Rl(r),i]},useSyncExternalStore:Wx,useId:IE,useHostTransitionStatus:Jy,useFormState:fE,useActionState:fE,useOptimistic:function(r,i){var a=mr();return Qt!==null?rE(a,Qt,r,i):(a.baseState=r,[r,a.queue.dispatch])},useMemoCache:Hy,useCacheRefresh:_E};BE.useEffectEvent=pE;function rg(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 ng={enqueueSetState:function(r,i,a){r=r._reactInternals;var d=Yn(),b=rs(d);b.payload=i,a!=null&&(b.callback=a),i=ns(r,b,d),i!==null&&(Fn(i,r,d),Fl(i,r,d))},enqueueReplaceState:function(r,i,a){r=r._reactInternals;var d=Yn(),b=rs(d);b.tag=1,b.payload=i,a!=null&&(b.callback=a),i=ns(r,b,d),i!==null&&(Fn(i,r,d),Fl(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var a=Yn(),d=rs(a);d.tag=2,i!=null&&(d.callback=i),i=ns(r,d,a),i!==null&&(Fn(i,r,a),Fl(i,r,a))}};function RE(r,i,a,d,b,E,V){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,E,V):i.prototype&&i.prototype.isPureReactComponent?!wl(a,d)||!wl(b,E):!0}function ME(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&&ng.enqueueReplaceState(i,i.state,null)}function ia(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 b in r)a[b]===void 0&&(a[b]=r[b])}return a}function UE(r){Lf(r)}function jE(r){console.error(r)}function NE(r){Lf(r)}function lh(r,i){try{var a=r.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function DE(r,i,a){try{var d=r.onCaughtError;d(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function ig(r,i,a){return a=rs(a),a.tag=3,a.payload={element:null},a.callback=function(){lh(r,i)},a}function PE(r){return r=rs(r),r.tag=3,r}function kE(r,i,a,d){var b=a.type.getDerivedStateFromError;if(typeof b=="function"){var E=d.value;r.payload=function(){return b(E)},r.callback=function(){DE(i,a,d)}}var V=a.stateNode;V!==null&&typeof V.componentDidCatch=="function"&&(r.callback=function(){DE(i,a,d),typeof b!="function"&&(ls===null?ls=new Set([this]):ls.add(this));var ge=d.stack;this.componentDidCatch(d.value,{componentStack:ge!==null?ge:""})})}function rR(r,i,a,d,b){if(a.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=a.alternate,i!==null&&eu(i,a,b,!0),a=Hn.current,a!==null){switch(a.tag){case 31:case 13:return hi===null?vh():a.alternate===null&&hr===0&&(hr=3),a.flags&=-257,a.flags|=65536,a.lanes=b,d===Wf?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([d]):i.add(d),Og(r,d,b)),!1;case 22:return a.flags|=65536,d===Wf?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)),Og(r,d,b)),!1}throw Error(o(435,a.tag))}return Og(r,d,b),vh(),!1}if(Mt)return i=Hn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=b,d!==Ey&&(r=Error(o(422),{cause:d}),El(ui(r,a)))):(d!==Ey&&(i=Error(o(423),{cause:d}),El(ui(i,a))),r=r.current.alternate,r.flags|=65536,b&=-b,r.lanes|=b,d=ui(d,a),b=ig(r.stateNode,d,b),Uy(r,b),hr!==4&&(hr=2)),!1;var E=Error(o(520),{cause:d});if(E=ui(E,a),$l===null?$l=[E]:$l.push(E),hr!==4&&(hr=2),i===null)return!0;d=ui(d,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,r=b&-b,a.lanes|=r,r=ig(a.stateNode,d,r),Uy(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,b&=-b,a.lanes|=b,b=PE(b),kE(b,r,a,d),Uy(a,b),!1}a=a.return}while(a!==null);return!1}var og=Error(o(461)),Er=!1;function Xr(r,i,a,d){i.child=r===null?qx(i,null,a,d):ra(i,r.child,a,d)}function LE(r,i,a,d,b){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 Zs(i),d=Ly(r,i,a,V,E,b),ge=zy(),r!==null&&!Er?($y(r,i,b),fo(r,i,b)):(Mt&&ge&&vy(i),i.flags|=1,Xr(r,i,d,b),i.child)}function zE(r,i,a,d,b){if(r===null){var E=a.type;return typeof E=="function"&&!by(E)&&E.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=E,$E(r,i,E,d,b)):(r=Hf(a.type,null,d,i,i.mode,b),r.ref=i.ref,r.return=i,i.child=r)}if(E=r.child,!dg(r,b)){var V=E.memoizedProps;if(a=a.compare,a=a!==null?a:wl,a(V,d)&&r.ref===i.ref)return fo(r,i,b)}return i.flags|=1,r=oo(E,d),r.ref=i.ref,r.return=i,i.child=r}function $E(r,i,a,d,b){if(r!==null){var E=r.memoizedProps;if(wl(E,d)&&r.ref===i.ref)if(Er=!1,i.pendingProps=d=E,dg(r,b))(r.flags&131072)!==0&&(Er=!0);else return i.lanes=r.lanes,fo(r,i,b)}return sg(r,i,a,d,b)}function qE(r,i,a,d){var b=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,b=0;d!==null;)b=b|d.lanes|d.childLanes,d=d.sibling;d=b&~E}else d=0,i.child=null;return HE(r,i,E,a,d)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Yf(i,E!==null?E.cachePool:null),E!==null?Gx(i,E):Ny(),Kx(i);else return d=i.lanes=536870912,HE(r,i,E!==null?E.baseLanes|a:a,a,d)}else E!==null?(Yf(i,E.cachePool),Gx(i,E),os(),i.memoizedState=null):(r!==null&&Yf(i,null),Ny(),os());return Xr(r,i,b,a),i.child}function jl(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function HE(r,i,a,d,b){var E=Ty();return E=E===null?null:{parent:vr._currentValue,pool:E},i.memoizedState={baseLanes:a,cachePool:E},r!==null&&Yf(i,null),Ny(),Kx(i),r!==null&&eu(r,i,d,!0),i.childLanes=b,null}function ch(r,i){return i=hh({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function QE(r,i,a){return ra(i,r.child,null,a),r=ch(i,i.pendingProps),r.flags|=2,Qn(i),i.memoizedState=null,r}function nR(r,i,a){var d=i.pendingProps,b=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Mt){if(d.mode==="hidden")return r=ch(i,d),i.lanes=536870912,jl(null,r);if(Py(i),(r=Jt)?(r=n2(r,fi),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xo!==null?{id:zi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},a=Fx(r),a.return=i,i.child=a,Vr=i,Jt=null)):r=null,r===null)throw Jo(i);return i.lanes=536870912,null}return ch(i,d)}var E=r.memoizedState;if(E!==null){var V=E.dehydrated;if(Py(i),b)if(i.flags&256)i.flags&=-257,i=QE(r,i,a);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(o(558));else if(Er||eu(r,i,a,!1),b=(a&r.childLanes)!==0,Er||b){if(d=Wt,d!==null&&(V=st(d,a),V!==0&&V!==E.retryLane))throw E.retryLane=V,Ys(r,V),Fn(d,r,V),og;vh(),i=QE(r,i,a)}else r=E.treeContext,Jt=di(V.nextSibling),Vr=i,Mt=!0,Zo=null,fi=!1,r!==null&&Bx(i,r),i=ch(i,d),i.flags|=4096;return i}return r=oo(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function fh(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 sg(r,i,a,d,b){return Zs(i),a=Ly(r,i,a,d,void 0,b),d=zy(),r!==null&&!Er?($y(r,i,b),fo(r,i,b)):(Mt&&d&&vy(i),i.flags|=1,Xr(r,i,a,b),i.child)}function GE(r,i,a,d,b,E){return Zs(i),i.updateQueue=null,a=Vx(i,d,a,b),Yx(r),d=zy(),r!==null&&!Er?($y(r,i,E),fo(r,i,E)):(Mt&&d&&vy(i),i.flags|=1,Xr(r,i,a,E),i.child)}function KE(r,i,a,d,b){if(Zs(i),i.stateNode===null){var E=Wa,V=a.contextType;typeof V=="object"&&V!==null&&(E=Wr(V)),E=new a(d,E),i.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=ng,i.stateNode=E,E._reactInternals=i,E=i.stateNode,E.props=d,E.state=i.memoizedState,E.refs={},Ry(i),V=a.contextType,E.context=typeof V=="object"&&V!==null?Wr(V):Wa,E.state=i.memoizedState,V=a.getDerivedStateFromProps,typeof V=="function"&&(rg(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&&ng.enqueueReplaceState(E,E.state,null),Tl(i,d,E,b),Ol(),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=ia(a,ge);E.props=Fe;var Me=E.context,$e=a.contextType;V=Wa,typeof $e=="object"&&$e!==null&&(V=Wr($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)&&ME(i,E,d,V),ts=!1;var Ue=i.memoizedState;E.state=Ue,Tl(i,d,E,b),Ol(),Me=i.memoizedState,ge||Ue!==Me||ts?(typeof Ge=="function"&&(rg(i,a,Ge,d),Me=i.memoizedState),(Fe=ts||RE(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,My(r,i),V=i.memoizedProps,$e=ia(a,V),E.props=$e,Ge=i.pendingProps,Ue=E.context,Me=a.contextType,Fe=Wa,typeof Me=="object"&&Me!==null&&(Fe=Wr(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)&&ME(i,E,d,Fe),ts=!1,Ue=i.memoizedState,E.state=Ue,Tl(i,d,E,b),Ol();var De=i.memoizedState;V!==Ge||Ue!==De||ts||r!==null&&r.dependencies!==null&&Gf(r.dependencies)?(typeof ge=="function"&&(rg(i,a,ge,d),De=i.memoizedState),($e=ts||RE(i,a,$e,d,Ue,De,Fe)||r!==null&&r.dependencies!==null&&Gf(r.dependencies))?(Me||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(d,De,Fe),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(d,De,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=De),E.props=d,E.state=De,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,fh(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=ra(i,r.child,null,b),i.child=ra(i,null,a,b)):Xr(r,i,a,b),i.memoizedState=E.state,r=i.child):r=fo(r,i,b),r}function YE(r,i,a,d){return Ws(),i.flags|=256,Xr(r,i,a,d),i.child}var ag={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ug(r){return{baseLanes:r,cachePool:Dx()}}function lg(r,i,a){return r=r!==null?r.childLanes&~a:0,i&&(r|=Kn),r}function VE(r,i,a){var d=i.pendingProps,b=!1,E=(i.flags&128)!==0,V;if((V=E)||(V=r!==null&&r.memoizedState===null?!1:(gr.current&2)!==0),V&&(b=!0,i.flags&=-129),V=(i.flags&32)!==0,i.flags&=-33,r===null){if(Mt){if(b?is(i):os(),(r=Jt)?(r=n2(r,fi),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Xo!==null?{id:zi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},a=Fx(r),a.return=i,i.child=a,Vr=i,Jt=null)):r=null,r===null)throw Jo(i);return Qg(r)?i.lanes=32:i.lanes=536870912,null}var ge=d.children;return d=d.fallback,b?(os(),b=i.mode,ge=hh({mode:"hidden",children:ge},b),d=Vs(d,b,a,null),ge.return=i,d.return=i,ge.sibling=d,i.child=ge,d=i.child,d.memoizedState=ug(a),d.childLanes=lg(r,V,a),i.memoizedState=ag,jl(null,d)):(is(i),cg(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=fg(r,i,a)):i.memoizedState!==null?(os(),i.child=r.child,i.flags|=128,i=null):(os(),ge=d.fallback,b=i.mode,d=hh({mode:"visible",children:d.children},b),ge=Vs(ge,b,a,null),ge.flags|=2,d.return=i,ge.return=i,d.sibling=ge,i.child=d,ra(i,r.child,null,a),d=i.child,d.memoizedState=ug(a),d.childLanes=lg(r,V,a),i.memoizedState=ag,i=jl(null,d));else if(is(i),Qg(ge)){if(V=ge.nextSibling&&ge.nextSibling.dataset,V)var Me=V.dgst;V=Me,d=Error(o(419)),d.stack="",d.digest=V,El({value:d,source:null,stack:null}),i=fg(r,i,a)}else if(Er||eu(r,i,a,!1),V=(a&r.childLanes)!==0,Er||V){if(V=Wt,V!==null&&(d=st(V,a),d!==0&&d!==Fe.retryLane))throw Fe.retryLane=d,Ys(r,d),Fn(V,r,d),og;Hg(ge)||vh(),i=fg(r,i,a)}else Hg(ge)?(i.flags|=192,i.child=r.child,i=null):(r=Fe.treeContext,Jt=di(ge.nextSibling),Vr=i,Mt=!0,Zo=null,fi=!1,r!==null&&Bx(i,r),i=cg(i,d.children),i.flags|=4096);return i}return b?(os(),ge=d.fallback,b=i.mode,Fe=r.child,Me=Fe.sibling,d=oo(Fe,{mode:"hidden",children:d.children}),d.subtreeFlags=Fe.subtreeFlags&65011712,Me!==null?ge=oo(Me,ge):(ge=Vs(ge,b,a,null),ge.flags|=2),ge.return=i,d.return=i,d.sibling=ge,i.child=d,jl(null,d),d=i.child,ge=r.child.memoizedState,ge===null?ge=ug(a):(b=ge.cachePool,b!==null?(Fe=vr._currentValue,b=b.parent!==Fe?{parent:Fe,pool:Fe}:b):b=Dx(),ge={baseLanes:ge.baseLanes|a,cachePool:b}),d.memoizedState=ge,d.childLanes=lg(r,V,a),i.memoizedState=ag,jl(r.child,d)):(is(i),a=r.child,r=a.sibling,a=oo(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 cg(r,i){return i=hh({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function hh(r,i){return r=qn(22,r,null,i),r.lanes=0,r}function fg(r,i,a){return ra(i,r.child,null,a),r=cg(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function WE(r,i,a){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),_y(r.return,i,a)}function hg(r,i,a,d,b,E){var V=r.memoizedState;V===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:a,tailMode:b,treeForkCount:E}:(V.isBackwards=i,V.rendering=null,V.renderingStartTime=0,V.last=d,V.tail=a,V.tailMode=b,V.treeForkCount=E)}function XE(r,i,a){var d=i.pendingProps,b=d.revealOrder,E=d.tail;d=d.children;var V=gr.current,ge=(V&2)!==0;if(ge?(V=V&1|2,i.flags|=128):V&=1,K(gr,V),Xr(r,i,d,a),d=Mt?xl:0,!ge&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&WE(r,a,i);else if(r.tag===19)WE(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(b){case"forwards":for(a=i.child,b=null;a!==null;)r=a.alternate,r!==null&&eh(r)===null&&(b=a),a=a.sibling;a=b,a===null?(b=i.child,i.child=null):(b=a.sibling,a.sibling=null),hg(i,!1,b,a,E,d);break;case"backwards":case"unstable_legacy-backwards":for(a=null,b=i.child,i.child=null;b!==null;){if(r=b.alternate,r!==null&&eh(r)===null){i.child=b;break}r=b.sibling,b.sibling=a,a=b,b=r}hg(i,!0,a,null,E,d);break;case"together":hg(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function fo(r,i,a){if(r!==null&&(i.dependencies=r.dependencies),us|=i.lanes,(a&i.childLanes)===0)if(r!==null){if(eu(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=oo(r,r.pendingProps),i.child=a,a.return=i;r.sibling!==null;)r=r.sibling,a=a.sibling=oo(r,r.pendingProps),a.return=i;a.sibling=null}return i.child}function dg(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Gf(r)))}function iR(r,i,a){switch(i.tag){case 3:ne(i,i.stateNode.containerInfo),es(i,vr,r.memoizedState.cache),Ws();break;case 27:case 5:O(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,Py(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?VE(r,i,a):(is(i),r=fo(r,i,a),r!==null?r.sibling:null);is(i);break;case 19:var b=(r.flags&128)!==0;if(d=(a&i.childLanes)!==0,d||(eu(r,i,a,!1),d=(a&i.childLanes)!==0),b){if(d)return XE(r,i,a);i.flags|=128}if(b=i.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),K(gr,gr.current),d)break;return null;case 22:return i.lanes=0,qE(r,i,a,i.pendingProps);case 24:es(i,vr,r.memoizedState.cache)}return fo(r,i,a)}function ZE(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps)Er=!0;else{if(!dg(r,a)&&(i.flags&128)===0)return Er=!1,iR(r,i,a);Er=(r.flags&131072)!==0}else Er=!1,Mt&&(i.flags&1048576)!==0&&Tx(i,xl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=ea(i.elementType),i.type=r,typeof r=="function")by(r)?(d=ia(r,d),i.tag=1,i=KE(null,i,r,d,a)):(i.tag=0,i=sg(null,i,r,d,a));else{if(r!=null){var b=r.$$typeof;if(b===R){i.tag=11,i=LE(null,i,r,d,a);break e}else if(b===k){i.tag=14,i=zE(null,i,r,d,a);break e}}throw i=ue(r)||r,Error(o(306,i,""))}}return i;case 0:return sg(r,i,i.type,i.pendingProps,a);case 1:return d=i.type,b=ia(d,i.pendingProps),KE(r,i,d,b,a);case 3:e:{if(ne(i,i.stateNode.containerInfo),r===null)throw Error(o(387));d=i.pendingProps;var E=i.memoizedState;b=E.element,My(r,i),Tl(i,d,null,a);var V=i.memoizedState;if(d=V.cache,es(i,vr,d),d!==E.cache&&Cy(i,[vr],a,!0),Ol(),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=YE(r,i,d,a);break e}else if(d!==b){b=ui(Error(o(424)),i),El(b),i=YE(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(Jt=di(r.firstChild),Vr=i,Mt=!0,Zo=null,fi=!0,a=qx(i,null,d,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ws(),d===b){i=fo(r,i,a);break e}Xr(r,i,d,a)}i=i.child}return i;case 26:return fh(r,i),r===null?(a=l2(i.type,null,i.pendingProps,null))?i.memoizedState=a:Mt||(a=i.type,r=i.pendingProps,d=Fh(fe.current).createElement(a),d[Ht]=i,d[nr]=r,Zr(d,a,r),ur(d),i.stateNode=d):i.memoizedState=l2(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return O(i),r===null&&Mt&&(d=i.stateNode=s2(i.type,i.pendingProps,fe.current),Vr=i,fi=!0,b=Jt,ds(i.type)?(Gg=b,Jt=di(d.firstChild)):Jt=b),Xr(r,i,i.pendingProps.children,a),fh(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Mt&&((b=d=Jt)&&(d=UR(d,i.type,i.pendingProps,fi),d!==null?(i.stateNode=d,Vr=i,Jt=di(d.firstChild),fi=!1,b=!0):b=!1),b||Jo(i)),O(i),b=i.type,E=i.pendingProps,V=r!==null?r.memoizedProps:null,d=E.children,zg(b,E)?d=null:V!==null&&zg(b,V)&&(i.flags|=32),i.memoizedState!==null&&(b=Ly(r,i,V8,null,null,a),Wl._currentValue=b),fh(r,i),Xr(r,i,d,a),i.child;case 6:return r===null&&Mt&&((r=a=Jt)&&(a=jR(a,i.pendingProps,fi),a!==null?(i.stateNode=a,Vr=i,Jt=null,r=!0):r=!1),r||Jo(i)),null;case 13:return VE(r,i,a);case 4:return ne(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=ra(i,null,d,a):Xr(r,i,d,a),i.child;case 11:return LE(r,i,i.type,i.pendingProps,a);case 7:return Xr(r,i,i.pendingProps,a),i.child;case 8:return Xr(r,i,i.pendingProps.children,a),i.child;case 12:return Xr(r,i,i.pendingProps.children,a),i.child;case 10:return d=i.pendingProps,es(i,i.type,d.value),Xr(r,i,d.children,a),i.child;case 9:return b=i.type._context,d=i.pendingProps.children,Zs(i),b=Wr(b),d=d(b),i.flags|=1,Xr(r,i,d,a),i.child;case 14:return zE(r,i,i.type,i.pendingProps,a);case 15:return $E(r,i,i.type,i.pendingProps,a);case 19:return XE(r,i,a);case 31:return nR(r,i,a);case 22:return qE(r,i,a,i.pendingProps);case 24:return Zs(i),d=Wr(vr),r===null?(b=Ty(),b===null&&(b=Wt,E=Fy(),b.pooledCache=E,E.refCount++,E!==null&&(b.pooledCacheLanes|=a),b=E),i.memoizedState={parent:d,cache:b},Ry(i),es(i,vr,b)):((r.lanes&a)!==0&&(My(r,i),Tl(i,null,null,a),Ol()),b=r.memoizedState,E=i.memoizedState,b.parent!==d?(b={parent:d,cache:d},i.memoizedState=b,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=b),es(i,vr,d)):(d=E.cache,es(i,vr,d),d!==b.cache&&Cy(i,[vr],a,!0))),Xr(r,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(o(156,i.tag))}function ho(r){r.flags|=4}function pg(r,i,a,d,b){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(b&335544128)===b)if(r.stateNode.complete)r.flags|=8192;else if(IS())r.flags|=8192;else throw ta=Wf,By}else r.flags&=-16777217}function JE(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!p2(i))if(IS())r.flags|=8192;else throw ta=Wf,By}function dh(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?Zt():536870912,r.lanes|=i,hu|=i)}function Nl(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 er(r){var i=r.alternate!==null&&r.alternate.child===r.child,a=0,d=0;if(i)for(var b=r.child;b!==null;)a|=b.lanes|b.childLanes,d|=b.subtreeFlags&65011712,d|=b.flags&65011712,b.return=r,b=b.sibling;else for(b=r.child;b!==null;)a|=b.lanes|b.childLanes,d|=b.subtreeFlags,d|=b.flags,b.return=r,b=b.sibling;return r.subtreeFlags|=d,r.childLanes=a,i}function oR(r,i,a){var d=i.pendingProps;switch(xy(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(i),null;case 1:return er(i),null;case 3:return a=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),uo(vr),Z(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(r===null||r.child===null)&&(Ja(i)?ho(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Sy())),er(i),null;case 26:var b=i.type,E=i.memoizedState;return r===null?(ho(i),E!==null?(er(i),JE(i,E)):(er(i),pg(i,b,null,d,a))):E?E!==r.memoizedState?(ho(i),er(i),JE(i,E)):(er(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&ho(i),er(i),pg(i,b,r,d,a)),null;case 27:if(q(i),a=fe.current,b=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&ho(i);else{if(!d){if(i.stateNode===null)throw Error(o(166));return er(i),null}r=W.current,Ja(i)?Rx(i):(r=s2(b,d,a),i.stateNode=r,ho(i))}return er(i),null;case 5:if(q(i),b=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&ho(i);else{if(!d){if(i.stateNode===null)throw Error(o(166));return er(i),null}if(E=W.current,Ja(i))Rx(i);else{var V=Fh(fe.current);switch(E){case 1:E=V.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:E=V.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":E=V.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":E=V.createElementNS("http://www.w3.org/1998/Math/MathML",b);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(b,{is:d.is}):V.createElement(b)}}E[Ht]=i,E[nr]=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(Zr(E,b,d),b){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&ho(i)}}return er(i),pg(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,a),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&ho(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(o(166));if(r=fe.current,Ja(i)){if(r=i.stateNode,a=i.memoizedProps,d=null,b=Vr,b!==null)switch(b.tag){case 27:case 5:d=b.memoizedProps}r[Ht]=i,r=!!(r.nodeValue===a||d!==null&&d.suppressHydrationWarning===!0||VS(r.nodeValue,a)),r||Jo(i,!0)}else r=Fh(r).createTextNode(d),r[Ht]=i,i.stateNode=r}return er(i),null;case 31:if(a=i.memoizedState,r===null||r.memoizedState!==null){if(d=Ja(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 Ws(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;er(i),r=!1}else a=Sy(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=a),r=!0;if(!r)return i.flags&256?(Qn(i),i):(Qn(i),null);if((i.flags&128)!==0)throw Error(o(558))}return er(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(b=Ja(i),d!==null&&d.dehydrated!==null){if(r===null){if(!b)throw Error(o(318));if(b=i.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(o(317));b[Ht]=i}else Ws(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;er(i),b=!1}else b=Sy(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=b),b=!0;if(!b)return i.flags&256?(Qn(i),i):(Qn(i),null)}return Qn(i),(i.flags&128)!==0?(i.lanes=a,i):(a=d!==null,r=r!==null&&r.memoizedState!==null,a&&(d=i.child,b=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(b=d.alternate.memoizedState.cachePool.pool),E=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(E=d.memoizedState.cachePool.pool),E!==b&&(d.flags|=2048)),a!==r&&a&&(i.child.flags|=8192),dh(i,i.updateQueue),er(i),null);case 4:return Z(),r===null&&Ng(i.stateNode.containerInfo),er(i),null;case 10:return uo(i.type),er(i),null;case 19:if(Q(gr),d=i.memoizedState,d===null)return er(i),null;if(b=(i.flags&128)!==0,E=d.rendering,E===null)if(b)Nl(d,!1);else{if(hr!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(E=eh(r),E!==null){for(i.flags|=128,Nl(d,!1),r=E.updateQueue,i.updateQueue=r,dh(i,r),i.subtreeFlags=0,r=a,a=i.child;a!==null;)Cx(a,r),a=a.sibling;return K(gr,gr.current&1|2),Mt&&so(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&de()>bh&&(i.flags|=128,b=!0,Nl(d,!1),i.lanes=4194304)}else{if(!b)if(r=eh(E),r!==null){if(i.flags|=128,b=!0,r=r.updateQueue,i.updateQueue=r,dh(i,r),Nl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!E.alternate&&!Mt)return er(i),null}else 2*de()-d.renderingStartTime>bh&&a!==536870912&&(i.flags|=128,b=!0,Nl(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=gr.current,K(gr,b?a&1|2:a&1),Mt&&so(i,d.treeForkCount),r):(er(i),null);case 22:case 23:return Qn(i),Dy(),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&&(er(i),i.subtreeFlags&6&&(i.flags|=8192)):er(i),a=i.updateQueue,a!==null&&dh(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&&Q(Js),null;case 24:return a=null,r!==null&&(a=r.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),uo(vr),er(i),null;case 25:return null;case 30:return null}throw Error(o(156,i.tag))}function sR(r,i){switch(xy(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return uo(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(Qn(i),i.alternate===null)throw Error(o(340));Ws()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Qn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(o(340));Ws()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Q(gr),null;case 4:return Z(),null;case 10:return uo(i.type),null;case 22:case 23:return Qn(i),Dy(),r!==null&&Q(Js),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return uo(vr),null;case 25:return null;default:return null}}function eS(r,i){switch(xy(i),i.tag){case 3:uo(vr),Z();break;case 26:case 27:case 5:q(i);break;case 4:Z();break;case 31:i.memoizedState!==null&&Qn(i);break;case 13:Qn(i);break;case 19:Q(gr);break;case 10:uo(i.type);break;case 22:case 23:Qn(i),Dy(),r!==null&&Q(Js);break;case 24:uo(vr)}}function Dl(r,i){try{var a=i.updateQueue,d=a!==null?a.lastEffect:null;if(d!==null){var b=d.next;a=b;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!==b)}}catch(ge){Lt(i,i.return,ge)}}function ss(r,i,a){try{var d=i.updateQueue,b=d!==null?d.lastEffect:null;if(b!==null){var E=b.next;d=E;do{if((d.tag&r)===r){var V=d.inst,ge=V.destroy;if(ge!==void 0){V.destroy=void 0,b=i;var Fe=a,Me=ge;try{Me()}catch($e){Lt(b,Fe,$e)}}}d=d.next}while(d!==E)}}catch($e){Lt(i,i.return,$e)}}function tS(r){var i=r.updateQueue;if(i!==null){var a=r.stateNode;try{Qx(i,a)}catch(d){Lt(r,r.return,d)}}}function rS(r,i,a){a.props=ia(r.type,r.memoizedProps),a.state=r.memoizedState;try{a.componentWillUnmount()}catch(d){Lt(r,i,d)}}function Pl(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(b){Lt(r,i,b)}}function qi(r,i){var a=r.ref,d=r.refCleanup;if(a!==null)if(typeof d=="function")try{d()}catch(b){Lt(r,i,b)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(b){Lt(r,i,b)}else a.current=null}function nS(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(b){Lt(r,r.return,b)}}function yg(r,i,a){try{var d=r.stateNode;FR(d,r.type,a,i),d[nr]=i}catch(b){Lt(r,r.return,b)}}function iS(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ds(r.type)||r.tag===4}function gg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||iS(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 mg(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=no));else if(d!==4&&(d===27&&ds(r.type)&&(a=r.stateNode,i=null),r=r.child,r!==null))for(mg(r,i,a),r=r.sibling;r!==null;)mg(r,i,a),r=r.sibling}function ph(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(ph(r,i,a),r=r.sibling;r!==null;)ph(r,i,a),r=r.sibling}function oS(r){var i=r.stateNode,a=r.memoizedProps;try{for(var d=r.type,b=i.attributes;b.length;)i.removeAttributeNode(b[0]);Zr(i,d,a),i[Ht]=r,i[nr]=a}catch(E){Lt(r,r.return,E)}}var po=!1,Sr=!1,bg=!1,sS=typeof WeakSet=="function"?WeakSet:Set,Lr=null;function aR(r,i){if(r=r.containerInfo,kg=jh,r=mx(r),fy(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 b=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 De;Ge!==a||b!==0&&Ge.nodeType!==3||(ge=V+b),Ge!==E||d!==0&&Ge.nodeType!==3||(Fe=V+d),Ge.nodeType===3&&(V+=Ge.nodeValue.length),(De=Ge.firstChild)!==null;)Ue=Ge,Ge=De;for(;;){if(Ge===r)break t;if(Ue===a&&++Me===b&&(ge=V),Ue===E&&++$e===d&&(Fe=V),(De=Ge.nextSibling)!==null)break;Ge=Ue,Ue=Ge.parentNode}Ge=De}a=ge===-1||Fe===-1?null:{start:ge,end:Fe}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lg={focusedElem:r,selectionRange:a},jh=!1,Lr=i;Lr!==null;)if(i=Lr,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Lr=r;else for(;Lr!==null;){switch(i=Lr,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++)b=r[a],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&E!==null){r=void 0,a=i,b=E.memoizedProps,E=E.memoizedState,d=a.stateNode;try{var ut=ia(a.type,b);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)qg(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":qg(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,Lr=r;break}Lr=i.return}}function aS(r,i,a){var d=a.flags;switch(a.tag){case 0:case 11:case 15:go(r,a),d&4&&Dl(5,a);break;case 1:if(go(r,a),d&4)if(r=a.stateNode,i===null)try{r.componentDidMount()}catch(V){Lt(a,a.return,V)}else{var b=ia(a.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(b,i,r.__reactInternalSnapshotBeforeUpdate)}catch(V){Lt(a,a.return,V)}}d&64&&tS(a),d&512&&Pl(a,a.return);break;case 3:if(go(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{Qx(r,i)}catch(V){Lt(a,a.return,V)}}break;case 27:i===null&&d&4&&oS(a);case 26:case 5:go(r,a),i===null&&d&4&&nS(a),d&512&&Pl(a,a.return);break;case 12:go(r,a);break;case 31:go(r,a),d&4&&cS(r,a);break;case 13:go(r,a),d&4&&fS(r,a),d&64&&(r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(a=gR.bind(null,a),NR(r,a))));break;case 22:if(d=a.memoizedState!==null||po,!d){i=i!==null&&i.memoizedState!==null||Sr,b=po;var E=Sr;po=d,(Sr=i)&&!E?mo(r,a,(a.subtreeFlags&8772)!==0):go(r,a),po=b,Sr=E}break;case 30:break;default:go(r,a)}}function uS(r){var i=r.alternate;i!==null&&(r.alternate=null,uS(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 ir=null,Sn=!1;function yo(r,i,a){for(a=a.child;a!==null;)lS(r,i,a),a=a.sibling}function lS(r,i,a){if(Se&&typeof Se.onCommitFiberUnmount=="function")try{Se.onCommitFiberUnmount(we,a)}catch{}switch(a.tag){case 26:Sr||qi(a,i),yo(r,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Sr||qi(a,i);var d=ir,b=Sn;ds(a.type)&&(ir=a.stateNode,Sn=!1),yo(r,i,a),Kl(a.stateNode),ir=d,Sn=b;break;case 5:Sr||qi(a,i);case 6:if(d=ir,b=Sn,ir=null,yo(r,i,a),ir=d,Sn=b,ir!==null)if(Sn)try{(ir.nodeType===9?ir.body:ir.nodeName==="HTML"?ir.ownerDocument.body:ir).removeChild(a.stateNode)}catch(E){Lt(a,i,E)}else try{ir.removeChild(a.stateNode)}catch(E){Lt(a,i,E)}break;case 18:ir!==null&&(Sn?(r=ir,t2(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.stateNode),wu(r)):t2(ir,a.stateNode));break;case 4:d=ir,b=Sn,ir=a.stateNode.containerInfo,Sn=!0,yo(r,i,a),ir=d,Sn=b;break;case 0:case 11:case 14:case 15:ss(2,a,i),Sr||ss(4,a,i),yo(r,i,a);break;case 1:Sr||(qi(a,i),d=a.stateNode,typeof d.componentWillUnmount=="function"&&rS(a,i,d)),yo(r,i,a);break;case 21:yo(r,i,a);break;case 22:Sr=(d=Sr)||a.memoizedState!==null,yo(r,i,a),Sr=d;break;default:yo(r,i,a)}}function cS(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{wu(r)}catch(a){Lt(i,i.return,a)}}}function fS(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{wu(r)}catch(a){Lt(i,i.return,a)}}function uR(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new sS),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new sS),i;default:throw Error(o(435,r.tag))}}function yh(r,i){var a=uR(r);i.forEach(function(d){if(!a.has(d)){a.add(d);var b=mR.bind(null,r,d);d.then(b,b)}})}function In(r,i){var a=i.deletions;if(a!==null)for(var d=0;d<a.length;d++){var b=a[d],E=r,V=i,ge=V;e:for(;ge!==null;){switch(ge.tag){case 27:if(ds(ge.type)){ir=ge.stateNode,Sn=!1;break e}break;case 5:ir=ge.stateNode,Sn=!1;break e;case 3:case 4:ir=ge.stateNode.containerInfo,Sn=!0;break e}ge=ge.return}if(ir===null)throw Error(o(160));lS(E,V,b),ir=null,Sn=!1,E=b.alternate,E!==null&&(E.return=null),b.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)hS(i,r),i=i.sibling}var _i=null;function hS(r,i){var a=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:In(i,r),_n(r),d&4&&(ss(3,r,r.return),Dl(3,r),ss(5,r,r.return));break;case 1:In(i,r),_n(r),d&512&&(Sr||a===null||qi(a,a.return)),d&64&&po&&(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 b=_i;if(In(i,r),_n(r),d&512&&(Sr||a===null||qi(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,b=b.ownerDocument||b;t:switch(d){case"title":E=b.getElementsByTagName("title")[0],(!E||E[wr]||E[Ht]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=b.createElement(d),b.head.insertBefore(E,b.querySelector("head > title"))),Zr(E,d,a),E[Ht]=r,ur(E),d=E;break e;case"link":var V=h2("link","href",b).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=b.createElement(d),Zr(E,d,a),b.head.appendChild(E);break;case"meta":if(V=h2("meta","content",b).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=b.createElement(d),Zr(E,d,a),b.head.appendChild(E);break;default:throw Error(o(468,d))}E[Ht]=r,ur(E),d=E}r.stateNode=d}else d2(b,r.type,r.stateNode);else r.stateNode=f2(b,d,r.memoizedProps);else E!==d?(E===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):E.count--,d===null?d2(b,r.type,r.stateNode):f2(b,d,r.memoizedProps)):d===null&&r.stateNode!==null&&yg(r,r.memoizedProps,a.memoizedProps)}break;case 27:In(i,r),_n(r),d&512&&(Sr||a===null||qi(a,a.return)),a!==null&&d&4&&yg(r,r.memoizedProps,a.memoizedProps);break;case 5:if(In(i,r),_n(r),d&512&&(Sr||a===null||qi(a,a.return)),r.flags&32){b=r.stateNode;try{qa(b,"")}catch(ut){Lt(r,r.return,ut)}}d&4&&r.stateNode!=null&&(b=r.memoizedProps,yg(r,b,a!==null?a.memoizedProps:b)),d&1024&&(bg=!0);break;case 6:if(In(i,r),_n(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(Bh=null,b=_i,_i=Oh(i.containerInfo),In(i,r),_i=b,_n(r),d&4&&a!==null&&a.memoizedState.isDehydrated)try{wu(i.containerInfo)}catch(ut){Lt(r,r.return,ut)}bg&&(bg=!1,dS(r));break;case 4:d=_i,_i=Oh(r.stateNode.containerInfo),In(i,r),_n(r),_i=d;break;case 12:In(i,r),_n(r);break;case 31:In(i,r),_n(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,yh(r,d)));break;case 13:In(i,r),_n(r),r.child.flags&8192&&r.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(mh=de()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,yh(r,d)));break;case 22:b=r.memoizedState!==null;var Fe=a!==null&&a.memoizedState!==null,Me=po,$e=Sr;if(po=Me||b,Sr=$e||Fe,In(i,r),Sr=$e,po=Me,_n(r),d&8192)e:for(i=r.stateNode,i._visibility=b?i._visibility&-2:i._visibility|1,b&&(a===null||Fe||po||Sr||oa(r)),a=null,i=r;;){if(i.tag===5||i.tag===26){if(a===null){Fe=a=i;try{if(E=Fe.stateNode,b)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=b?"":Fe.memoizedProps}catch(ut){Lt(Fe,Fe.return,ut)}}}else if(i.tag===18){if(a===null){Fe=i;try{var De=Fe.stateNode;b?r2(De,!0):r2(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,yh(r,a))));break;case 19:In(i,r),_n(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,yh(r,d)));break;case 30:break;case 21:break;default:In(i,r),_n(r)}}function _n(r){var i=r.flags;if(i&2){try{for(var a,d=r.return;d!==null;){if(iS(d)){a=d;break}d=d.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var b=a.stateNode,E=gg(r);ph(r,E,b);break;case 5:var V=a.stateNode;a.flags&32&&(qa(V,""),a.flags&=-33);var ge=gg(r);ph(r,ge,V);break;case 3:case 4:var Fe=a.stateNode.containerInfo,Me=gg(r);mg(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 dS(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;dS(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function go(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)aS(r,i.alternate,i),i=i.sibling}function oa(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),oa(i);break;case 1:qi(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&rS(i,i.return,a),oa(i);break;case 27:Kl(i.stateNode);case 26:case 5:qi(i,i.return),oa(i);break;case 22:i.memoizedState===null&&oa(i);break;case 30:oa(i);break;default:oa(i)}r=r.sibling}}function mo(r,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,b=r,E=i,V=E.flags;switch(E.tag){case 0:case 11:case 15:mo(b,E,a),Dl(4,E);break;case 1:if(mo(b,E,a),d=E,b=d.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(Me){Lt(d,d.return,Me)}if(d=E,b=d.updateQueue,b!==null){var ge=d.stateNode;try{var Fe=b.shared.hiddenCallbacks;if(Fe!==null)for(b.shared.hiddenCallbacks=null,b=0;b<Fe.length;b++)Hx(Fe[b],ge)}catch(Me){Lt(d,d.return,Me)}}a&&V&64&&tS(E),Pl(E,E.return);break;case 27:oS(E);case 26:case 5:mo(b,E,a),a&&d===null&&V&4&&nS(E),Pl(E,E.return);break;case 12:mo(b,E,a);break;case 31:mo(b,E,a),a&&V&4&&cS(b,E);break;case 13:mo(b,E,a),a&&V&4&&fS(b,E);break;case 22:E.memoizedState===null&&mo(b,E,a),Pl(E,E.return);break;case 30:break;default:mo(b,E,a)}i=i.sibling}}function Ag(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&&Sl(a))}function wg(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Sl(r))}function Ci(r,i,a,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)pS(r,i,a,d),i=i.sibling}function pS(r,i,a,d){var b=i.flags;switch(i.tag){case 0:case 11:case 15:Ci(r,i,a,d),b&2048&&Dl(9,i);break;case 1:Ci(r,i,a,d);break;case 3:Ci(r,i,a,d),b&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Sl(r)));break;case 12:if(b&2048){Ci(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 Ci(r,i,a,d);break;case 31:Ci(r,i,a,d);break;case 13:Ci(r,i,a,d);break;case 23:break;case 22:E=i.stateNode,V=i.alternate,i.memoizedState!==null?E._visibility&2?Ci(r,i,a,d):kl(r,i):E._visibility&2?Ci(r,i,a,d):(E._visibility|=2,lu(r,i,a,d,(i.subtreeFlags&10256)!==0||!1)),b&2048&&Ag(V,i);break;case 24:Ci(r,i,a,d),b&2048&&wg(i.alternate,i);break;default:Ci(r,i,a,d)}}function lu(r,i,a,d,b){for(b=b&&((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:lu(E,V,ge,Fe,b),Dl(8,V);break;case 23:break;case 22:var $e=V.stateNode;V.memoizedState!==null?$e._visibility&2?lu(E,V,ge,Fe,b):kl(E,V):($e._visibility|=2,lu(E,V,ge,Fe,b)),b&&Me&2048&&Ag(V.alternate,V);break;case 24:lu(E,V,ge,Fe,b),b&&Me&2048&&wg(V.alternate,V);break;default:lu(E,V,ge,Fe,b)}i=i.sibling}}function kl(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=r,d=i,b=d.flags;switch(d.tag){case 22:kl(a,d),b&2048&&Ag(d.alternate,d);break;case 24:kl(a,d),b&2048&&wg(d.alternate,d);break;default:kl(a,d)}i=i.sibling}}var Ll=8192;function cu(r,i,a){if(r.subtreeFlags&Ll)for(r=r.child;r!==null;)yS(r,i,a),r=r.sibling}function yS(r,i,a){switch(r.tag){case 26:cu(r,i,a),r.flags&Ll&&r.memoizedState!==null&&YR(a,_i,r.memoizedState,r.memoizedProps);break;case 5:cu(r,i,a);break;case 3:case 4:var d=_i;_i=Oh(r.stateNode.containerInfo),cu(r,i,a),_i=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Ll,Ll=16777216,cu(r,i,a),Ll=d):cu(r,i,a));break;default:cu(r,i,a)}}function gS(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 zl(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];Lr=d,bS(d,r)}gS(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)mS(r),r=r.sibling}function mS(r){switch(r.tag){case 0:case 11:case 15:zl(r),r.flags&2048&&ss(9,r,r.return);break;case 3:zl(r);break;case 12:zl(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,gh(r)):zl(r);break;default:zl(r)}}function gh(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];Lr=d,bS(d,r)}gS(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:ss(8,i,i.return),gh(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,gh(i));break;default:gh(i)}r=r.sibling}}function bS(r,i){for(;Lr!==null;){var a=Lr;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:Sl(a.memoizedState.cache)}if(d=a.child,d!==null)d.return=a,Lr=d;else e:for(a=r;Lr!==null;){d=Lr;var b=d.sibling,E=d.return;if(uS(d),d===a){Lr=null;break e}if(b!==null){b.return=E,Lr=b;break e}Lr=E}}}var lR={getCacheForType:function(r){var i=Wr(vr),a=i.data.get(r);return a===void 0&&(a=r(),i.data.set(r,a)),a},cacheSignal:function(){return Wr(vr).controller.signal}},cR=typeof WeakMap=="function"?WeakMap:Map,Pt=0,Wt=null,St=null,Ft=0,kt=0,Gn=null,as=!1,fu=!1,vg=!1,bo=0,hr=0,us=0,sa=0,xg=0,Kn=0,hu=0,$l=null,Cn=null,Eg=!1,mh=0,AS=0,bh=1/0,Ah=null,ls=null,jr=0,cs=null,du=null,Ao=0,Sg=0,Ig=null,wS=null,ql=0,_g=null;function Yn(){return(Pt&2)!==0&&Ft!==0?Ft&-Ft:X.T!==null?Rg():Br()}function vS(){if(Kn===0)if((Ft&536870912)===0||Mt){var r=lt;lt<<=1,(lt&3932160)===0&&(lt=262144),Kn=r}else Kn=536870912;return r=Hn.current,r!==null&&(r.flags|=32),Kn}function Fn(r,i,a){(r===Wt&&(kt===2||kt===9)||r.cancelPendingCommit!==null)&&(pu(r,0),fs(r,Ft,Kn,!1)),be(r,a),((Pt&2)===0||r!==Wt)&&(r===Wt&&((Pt&2)===0&&(sa|=a),hr===4&&fs(r,Ft,Kn,!1)),Hi(r))}function xS(r,i,a){if((Pt&6)!==0)throw Error(o(327));var d=!a&&(i&127)===0&&(i&r.expiredLanes)===0||dt(r,i),b=d?dR(r,i):Fg(r,i,!0),E=d;do{if(b===0){fu&&!d&&fs(r,i,0,!1);break}else{if(a=r.current.alternate,E&&!fR(a)){b=Fg(r,i,!1),E=!1;continue}if(b===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;b=$l;var Fe=ge.current.memoizedState.isDehydrated;if(Fe&&(pu(ge,V).flags|=256),V=Fg(ge,V,!1),V!==2){if(vg&&!Fe){ge.errorRecoveryDisabledLanes|=E,sa|=E,b=4;break e}E=Cn,Cn=b,E!==null&&(Cn===null?Cn=E:Cn.push.apply(Cn,E))}b=V}if(E=!1,b!==2)continue}}if(b===1){pu(r,0),fs(r,i,0,!0);break}e:{switch(d=r,E=b,E){case 0:case 1:throw Error(o(345));case 4:if((i&4194048)!==i)break;case 6:fs(d,i,Kn,!as);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((i&62914560)===i&&(b=mh+300-de(),10<b)){if(fs(d,i,Kn,!as),ft(d,0,!0)!==0)break e;Ao=i,d.timeoutHandle=JS(ES.bind(null,d,a,Cn,Ah,Eg,i,Kn,sa,hu,as,E,"Throttled",-0,0),b);break e}ES(d,a,Cn,Ah,Eg,i,Kn,sa,hu,as,E,null,-0,0)}}break}while(!0);Hi(r)}function ES(r,i,a,d,b,E,V,ge,Fe,Me,$e,Ge,Ue,De){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:no},yS(i,E,Ge);var ut=(E&62914560)===E?mh-de():(E&4194048)===E?AS-de():0;if(ut=VR(Ge,ut),ut!==null){Ao=E,r.cancelPendingCommit=ut(BS.bind(null,r,i,E,a,d,b,V,ge,Fe,$e,Ge,null,Ue,De)),fs(r,E,V,!Me);return}}BS(r,i,E,a,d,b,V,ge,Fe)}function fR(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 b=a[d],E=b.getSnapshot;b=b.value;try{if(!$n(E(),b))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&=~xg,i&=~sa,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var b=i;0<b;){var E=31-Ke(b),V=1<<E;d[E]=-1,b&=~V}a!==0&&Ye(r,a,i)}function wh(){return(Pt&6)===0?(Hl(0),!1):!0}function Cg(){if(St!==null){if(kt===0)var r=St.return;else r=St,ao=Xs=null,qy(r),iu=null,_l=0,r=St;for(;r!==null;)eS(r.alternate,r),r=r.return;St=null}}function pu(r,i){var a=r.timeoutHandle;a!==-1&&(r.timeoutHandle=-1,BR(a)),a=r.cancelPendingCommit,a!==null&&(r.cancelPendingCommit=null,a()),Ao=0,Cg(),Wt=r,St=a=oo(r.current,null),Ft=i,kt=0,Gn=null,as=!1,fu=dt(r,i),vg=!1,hu=Kn=xg=sa=us=hr=0,Cn=$l=null,Eg=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var b=31-Ke(d),E=1<<b;i|=r[b],d&=~E}return bo=i,zf(),a}function SS(r,i){vt=null,X.H=Ul,i===nu||i===Vf?(i=Lx(),kt=3):i===By?(i=Lx(),kt=4):kt=i===og?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Gn=i,St===null&&(hr=1,lh(r,ui(i,r.current)))}function IS(){var r=Hn.current;return r===null?!0:(Ft&4194048)===Ft?hi===null:(Ft&62914560)===Ft||(Ft&536870912)!==0?r===hi:!1}function _S(){var r=X.H;return X.H=Ul,r===null?Ul:r}function CS(){var r=X.A;return X.A=lR,r}function vh(){hr=4,as||(Ft&4194048)!==Ft&&Hn.current!==null||(fu=!0),(us&134217727)===0&&(sa&134217727)===0||Wt===null||fs(Wt,Ft,Kn,!1)}function Fg(r,i,a){var d=Pt;Pt|=2;var b=_S(),E=CS();(Wt!==r||Ft!==i)&&(Ah=null,pu(r,i)),i=!1;var V=hr;e:do try{if(kt!==0&&St!==null){var ge=St,Fe=Gn;switch(kt){case 8:Cg(),V=6;break e;case 3:case 2:case 9:case 6:Hn.current===null&&(i=!0);var Me=kt;if(kt=0,Gn=null,yu(r,ge,Fe,Me),a&&fu){V=0;break e}break;default:Me=kt,kt=0,Gn=null,yu(r,ge,Fe,Me)}}hR(),V=hr;break}catch($e){SS(r,$e)}while(!0);return i&&r.shellSuspendCounter++,ao=Xs=null,Pt=d,X.H=b,X.A=E,St===null&&(Wt=null,Ft=0,zf()),V}function hR(){for(;St!==null;)FS(St)}function dR(r,i){var a=Pt;Pt|=2;var d=_S(),b=CS();Wt!==r||Ft!==i?(Ah=null,bh=de()+500,pu(r,i)):fu=dt(r,i);e:do try{if(kt!==0&&St!==null){i=St;var E=Gn;t:switch(kt){case 1:kt=0,Gn=null,yu(r,i,E,1);break;case 2:case 9:if(Px(E)){kt=0,Gn=null,OS(i);break}i=function(){kt!==2&&kt!==9||Wt!==r||(kt=7),Hi(r)},E.then(i,i);break e;case 3:kt=7;break e;case 4:kt=5;break e;case 7:Px(E)?(kt=0,Gn=null,OS(i)):(kt=0,Gn=null,yu(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?p2(V):ge.stateNode.complete){kt=0,Gn=null;var Fe=ge.sibling;if(Fe!==null)St=Fe;else{var Me=ge.return;Me!==null?(St=Me,xh(Me)):St=null}break t}}kt=0,Gn=null,yu(r,i,E,5);break;case 6:kt=0,Gn=null,yu(r,i,E,6);break;case 8:Cg(),hr=6;break e;default:throw Error(o(462))}}pR();break}catch($e){SS(r,$e)}while(!0);return ao=Xs=null,X.H=d,X.A=b,Pt=a,St!==null?0:(Wt=null,Ft=0,zf(),hr)}function pR(){for(;St!==null&&!Ee();)FS(St)}function FS(r){var i=ZE(r.alternate,r,bo);r.memoizedProps=r.pendingProps,i===null?xh(r):St=i}function OS(r){var i=r,a=i.alternate;switch(i.tag){case 15:case 0:i=GE(a,i,i.pendingProps,i.type,void 0,Ft);break;case 11:i=GE(a,i,i.pendingProps,i.type.render,i.ref,Ft);break;case 5:qy(i);default:eS(a,i),i=St=Cx(i,bo),i=ZE(a,i,bo)}r.memoizedProps=r.pendingProps,i===null?xh(r):St=i}function yu(r,i,a,d){ao=Xs=null,qy(i),iu=null,_l=0;var b=i.return;try{if(rR(r,b,i,a,Ft)){hr=1,lh(r,ui(a,r.current)),St=null;return}}catch(E){if(b!==null)throw St=b,E;hr=1,lh(r,ui(a,r.current)),St=null;return}i.flags&32768?(Mt||d===1?r=!0:fu||(Ft&536870912)!==0?r=!1:(as=r=!0,(d===2||d===9||d===3||d===6)&&(d=Hn.current,d!==null&&d.tag===13&&(d.flags|=16384))),TS(i,r)):xh(i)}function xh(r){var i=r;do{if((i.flags&32768)!==0){TS(i,as);return}r=i.return;var a=oR(i.alternate,i,bo);if(a!==null){St=a;return}if(i=i.sibling,i!==null){St=i;return}St=i=r}while(i!==null);hr===0&&(hr=5)}function TS(r,i){do{var a=sR(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);hr=6,St=null}function BS(r,i,a,d,b,E,V,ge,Fe){r.cancelPendingCommit=null;do Eh();while(jr!==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|=gy,Ie(r,a,E,V,ge,Fe),r===Wt&&(St=Wt=null,Ft=0),du=i,cs=r,Ao=a,Sg=E,Ig=b,wS=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,bR(N,function(){return NS(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=X.T,X.T=null,b=re.p,re.p=2,V=Pt,Pt|=4;try{aR(r,i,a)}finally{Pt=V,re.p=b,X.T=d}}jr=1,RS(),MS(),US()}}function RS(){if(jr===1){jr=0;var r=cs,i=du,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=X.T,X.T=null;var d=re.p;re.p=2;var b=Pt;Pt|=4;try{hS(i,r);var E=Lg,V=mx(r.containerInfo),ge=E.focusedElem,Fe=E.selectionRange;if(V!==ge&&ge&&ge.ownerDocument&&gx(ge.ownerDocument.documentElement,ge)){if(Fe!==null&&fy(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 De=Ue.getSelection(),ut=ge.textContent.length,mt=Math.min(Fe.start,ut),Kt=Fe.end===void 0?mt:Math.min(Fe.end,ut);!De.extend&&mt>Kt&&(V=Kt,Kt=mt,mt=V);var Te=yx(ge,mt),Oe=yx(ge,Kt);if(Te&&Oe&&(De.rangeCount!==1||De.anchorNode!==Te.node||De.anchorOffset!==Te.offset||De.focusNode!==Oe.node||De.focusOffset!==Oe.offset)){var Re=Ge.createRange();Re.setStart(Te.node,Te.offset),De.removeAllRanges(),mt>Kt?(De.addRange(Re),De.extend(Oe.node,Oe.offset)):(Re.setEnd(Oe.node,Oe.offset),De.addRange(Re))}}}}for(Ge=[],De=ge;De=De.parentNode;)De.nodeType===1&&Ge.push({element:De,left:De.scrollLeft,top:De.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}}jh=!!kg,Lg=kg=null}finally{Pt=b,re.p=d,X.T=a}}r.current=i,jr=2}}function MS(){if(jr===2){jr=0;var r=cs,i=du,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=X.T,X.T=null;var d=re.p;re.p=2;var b=Pt;Pt|=4;try{aS(r,i.alternate,i)}finally{Pt=b,re.p=d,X.T=a}}jr=3}}function US(){if(jr===4||jr===3){jr=0,Be();var r=cs,i=du,a=Ao,d=wS;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?jr=5:(jr=0,du=cs=null,jS(r,r.pendingLanes));var b=r.pendingLanes;if(b===0&&(ls=null),rr(a),i=i.stateNode,Se&&typeof Se.onCommitFiberRoot=="function")try{Se.onCommitFiberRoot(we,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=X.T,b=re.p,re.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,re.p=b}}(Ao&3)!==0&&Eh(),Hi(r),b=r.pendingLanes,(a&261930)!==0&&(b&42)!==0?r===_g?ql++:(ql=0,_g=r):ql=0,Hl(0)}}function jS(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Sl(i)))}function Eh(){return RS(),MS(),US(),NS()}function NS(){if(jr!==5)return!1;var r=cs,i=Sg;Sg=0;var a=rr(Ao),d=X.T,b=re.p;try{re.p=32>a?32:a,X.T=null,a=Ig,Ig=null;var E=cs,V=Ao;if(jr=0,du=cs=null,Ao=0,(Pt&6)!==0)throw Error(o(331));var ge=Pt;if(Pt|=4,mS(E.current),pS(E,E.current,V,a),Pt=ge,Hl(0,!1),Se&&typeof Se.onPostCommitFiberRoot=="function")try{Se.onPostCommitFiberRoot(we,E)}catch{}return!0}finally{re.p=b,X.T=d,jS(r,i)}}function DS(r,i,a){i=ui(a,i),i=ig(r.stateNode,i,2),r=ns(r,i,2),r!==null&&(be(r,2),Hi(r))}function Lt(r,i,a){if(r.tag===3)DS(r,r,a);else for(;i!==null;){if(i.tag===3){DS(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=ui(a,r),a=PE(2),d=ns(i,a,2),d!==null&&(kE(a,d,i,r),be(d,2),Hi(d));break}}i=i.return}}function Og(r,i,a){var d=r.pingCache;if(d===null){d=r.pingCache=new cR;var b=new Set;d.set(i,b)}else b=d.get(i),b===void 0&&(b=new Set,d.set(i,b));b.has(a)||(vg=!0,b.add(a),r=yR.bind(null,r,i,a),i.then(r,r))}function yR(r,i,a){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&a,r.warmLanes&=~a,Wt===r&&(Ft&a)===a&&(hr===4||hr===3&&(Ft&62914560)===Ft&&300>de()-mh?(Pt&2)===0&&pu(r,0):xg|=a,hu===Ft&&(hu=0)),Hi(r)}function PS(r,i){i===0&&(i=Zt()),r=Ys(r,i),r!==null&&(be(r,i),Hi(r))}function gR(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),PS(r,a)}function mR(r,i){var a=0;switch(r.tag){case 31:case 13:var d=r.stateNode,b=r.memoizedState;b!==null&&(a=b.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),PS(r,a)}function bR(r,i){return he(r,i)}var Sh=null,gu=null,Tg=!1,Ih=!1,Bg=!1,hs=0;function Hi(r){r!==gu&&r.next===null&&(gu===null?Sh=gu=r:gu=gu.next=r),Ih=!0,Tg||(Tg=!0,wR())}function Hl(r,i){if(!Bg&&Ih){Bg=!0;do for(var a=!1,d=Sh;d!==null;){if(r!==0){var b=d.pendingLanes;if(b===0)var E=0;else{var V=d.suspendedLanes,ge=d.pingedLanes;E=(1<<31-Ke(42|r)+1)-1,E&=b&~(V&~ge),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(a=!0,$S(d,E))}else E=Ft,E=ft(d,d===Wt?E:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(E&3)===0||dt(d,E)||(a=!0,$S(d,E));d=d.next}while(a);Bg=!1}}function AR(){kS()}function kS(){Ih=Tg=!1;var r=0;hs!==0&&TR()&&(r=hs);for(var i=de(),a=null,d=Sh;d!==null;){var b=d.next,E=LS(d,i);E===0?(d.next=null,a===null?Sh=b:a.next=b,b===null&&(gu=a)):(a=d,(r!==0||(E&3)!==0)&&(Ih=!0)),d=b}jr!==0&&jr!==5||Hl(r),hs!==0&&(hs=0)}function LS(r,i){for(var a=r.suspendedLanes,d=r.pingedLanes,b=r.expirationTimes,E=r.pendingLanes&-62914561;0<E;){var V=31-Ke(E),ge=1<<V,Fe=b[V];Fe===-1?((ge&a)===0||(ge&d)!==0)&&(b[V]=At(ge,i)):Fe<=i&&(r.expiredLanes|=ge),E&=~ge}if(i=Wt,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),rr(a)){case 2:case 8:a=B;break;case 32:a=N;break;case 268435456:a=me;break;default:a=N}return d=zS.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 zS(r,i){if(jr!==0&&jr!==5)return r.callbackNode=null,r.callbackPriority=0,null;var a=r.callbackNode;if(Eh()&&r.callbackNode!==a)return null;var d=Ft;return d=ft(r,r===Wt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(xS(r,d,i),LS(r,de()),r.callbackNode!=null&&r.callbackNode===a?zS.bind(null,r):null)}function $S(r,i){if(Eh())return null;xS(r,i,!0)}function wR(){RR(function(){(Pt&6)!==0?he(x,AR):kS()})}function Rg(){if(hs===0){var r=tu;r===0&&(r=bt,bt<<=1,(bt&261888)===0&&(bt=256)),hs=r}return hs}function qS(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Mf(""+r)}function HS(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 vR(r,i,a,d,b){if(i==="submit"&&a&&a.stateNode===b){var E=qS((b[nr]||null).action),V=d.submitter;V&&(i=(i=V[nr]||null)?qS(i.formAction):V.getAttribute("formAction"),i!==null&&(E=i,V=null));var ge=new Df("action","action",null,d,b);r.push({event:ge,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(hs!==0){var Fe=V?HS(b,V):new FormData(b);Zy(a,{pending:!0,data:Fe,method:b.method,action:E},null,Fe)}}else typeof E=="function"&&(ge.preventDefault(),Fe=V?HS(b,V):new FormData(b),Zy(a,{pending:!0,data:Fe,method:b.method,action:E},E,Fe))},currentTarget:b}]})}}for(var Mg=0;Mg<yy.length;Mg++){var Ug=yy[Mg],xR=Ug.toLowerCase(),ER=Ug[0].toUpperCase()+Ug.slice(1);Ii(xR,"on"+ER)}Ii(vx,"onAnimationEnd"),Ii(xx,"onAnimationIteration"),Ii(Ex,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(k8,"onTransitionRun"),Ii(L8,"onTransitionStart"),Ii(z8,"onTransitionCancel"),Ii(Sx,"onTransitionEnd"),za("onMouseEnter",["mouseout","mouseover"]),za("onMouseLeave",["mouseout","mouseover"]),za("onPointerEnter",["pointerout","pointerover"]),za("onPointerLeave",["pointerout","pointerover"]),Hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hs("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(" "),SR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function QS(r,i){i=(i&4)!==0;for(var a=0;a<r.length;a++){var d=r[a],b=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&&b.isPropagationStopped())break e;E=ge,b.currentTarget=Me;try{E(b)}catch($e){Lf($e)}b.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&&b.isPropagationStopped())break e;E=ge,b.currentTarget=Me;try{E(b)}catch($e){Lf($e)}b.currentTarget=null,E=Fe}}}}function It(r,i){var a=i[Ur];a===void 0&&(a=i[Ur]=new Set);var d=r+"__bubble";a.has(d)||(GS(i,r,2,!1),a.add(d))}function jg(r,i,a){var d=0;i&&(d|=4),GS(a,r,d,i)}var _h="_reactListening"+Math.random().toString(36).slice(2);function Ng(r){if(!r[_h]){r[_h]=!0,qs.forEach(function(a){a!=="selectionchange"&&(SR.has(a)||jg(a,!1,r),jg(a,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[_h]||(i[_h]=!0,jg("selectionchange",!1,i))}}function GS(r,i,a,d){switch(v2(i)){case 2:var b=ZR;break;case 8:b=JR;break;default:b=Xg}a=b.bind(null,i,a,r),b=void 0,!ry||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(b=!0),d?b!==void 0?r.addEventListener(i,a,{capture:!0,passive:b}):r.addEventListener(i,a,!0):b!==void 0?r.addEventListener(i,a,{passive:b}):r.addEventListener(i,a,!1)}function Dg(r,i,a,d,b){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===b)break;if(V===4)for(V=d.return;V!==null;){var Fe=V.tag;if((Fe===3||Fe===4)&&V.stateNode.containerInfo===b)return;V=V.return}for(;ge!==null;){if(V=xi(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}Wv(function(){var Me=E,$e=ey(a),Ge=[];e:{var Ue=Ix.get(r);if(Ue!==void 0){var De=Df,ut=r;switch(r){case"keypress":if(jf(a)===0)break e;case"keydown":case"keyup":De=m8;break;case"focusin":ut="focus",De=sy;break;case"focusout":ut="blur",De=sy;break;case"beforeblur":case"afterblur":De=sy;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":De=Jv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":De=o8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":De=w8;break;case vx:case xx:case Ex:De=u8;break;case Sx:De=x8;break;case"scroll":case"scrollend":De=n8;break;case"wheel":De=S8;break;case"copy":case"cut":case"paste":De=c8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":De=tx;break;case"toggle":case"beforetoggle":De=_8}var mt=(i&4)!==0,Kt=!mt&&(r==="scroll"||r==="scrollend"),Te=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||Te===null||(Qe=dl(Oe,Te),Qe!=null&&mt.push(Gl(Oe,Qe,Re))),Kt)break;Oe=Oe.return}0<mt.length&&(Ue=new De(Ue,ut,null,a,$e),Ge.push({event:Ue,listeners:mt}))}}if((i&7)===0){e:{if(Ue=r==="mouseover"||r==="pointerover",De=r==="mouseout"||r==="pointerout",Ue&&a!==Jp&&(ut=a.relatedTarget||a.fromElement)&&(xi(ut)||ut[Mr]))break e;if((De||Ue)&&(Ue=$e.window===$e?$e:(Ue=$e.ownerDocument)?Ue.defaultView||Ue.parentWindow:window,De?(ut=a.relatedTarget||a.toElement,De=Me,ut=ut?xi(ut):null,ut!==null&&(Kt=u(ut),mt=ut.tag,ut!==Kt||mt!==5&&mt!==27&&mt!==6)&&(ut=null)):(De=null,ut=Me),De!==ut)){if(mt=Jv,Qe="onMouseLeave",Te="onMouseEnter",Oe="mouse",(r==="pointerout"||r==="pointerover")&&(mt=tx,Qe="onPointerLeave",Te="onPointerEnter",Oe="pointer"),Kt=De==null?Ue:Li(De),Re=ut==null?Ue:Li(ut),Ue=new mt(Qe,Oe+"leave",De,a,$e),Ue.target=Kt,Ue.relatedTarget=Re,Qe=null,xi($e)===Me&&(mt=new mt(Te,Oe+"enter",ut,a,$e),mt.target=Re,mt.relatedTarget=Kt,Qe=mt),Kt=Qe,De&&ut)t:{for(mt=IR,Te=De,Oe=ut,Re=0,Qe=Te;Qe;Qe=mt(Qe))Re++;Qe=0;for(var pt=Oe;pt;pt=mt(pt))Qe++;for(;0<Re-Qe;)Te=mt(Te),Re--;for(;0<Qe-Re;)Oe=mt(Oe),Qe--;for(;Re--;){if(Te===Oe||Oe!==null&&Te===Oe.alternate){mt=Te;break t}Te=mt(Te),Oe=mt(Oe)}mt=null}else mt=null;De!==null&&KS(Ge,Ue,De,mt,!1),ut!==null&&Kt!==null&&KS(Ge,Kt,ut,mt,!0)}}e:{if(Ue=Me?Li(Me):window,De=Ue.nodeName&&Ue.nodeName.toLowerCase(),De==="select"||De==="input"&&Ue.type==="file")var jt=lx;else if(ax(Ue))if(cx)jt=N8;else{jt=U8;var ct=M8}else De=Ue.nodeName,!De||De.toLowerCase()!=="input"||Ue.type!=="checkbox"&&Ue.type!=="radio"?Me&&Zp(Me.elementType)&&(jt=lx):jt=j8;if(jt&&(jt=jt(r,Me))){ux(Ge,jt,a,$e);break e}ct&&ct(r,Ue,Me),r==="focusout"&&Me&&Ue.type==="number"&&Me.memoizedProps.value!=null&&Xp(Ue,"number",Ue.value)}switch(ct=Me?Li(Me):window,r){case"focusin":(ax(ct)||ct.contentEditable==="true")&&(Ka=ct,hy=Me,vl=null);break;case"focusout":vl=hy=Ka=null;break;case"mousedown":dy=!0;break;case"contextmenu":case"mouseup":case"dragend":dy=!1,bx(Ge,a,$e);break;case"selectionchange":if(P8)break;case"keydown":case"keyup":bx(Ge,a,$e)}var xt;if(uy)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 Ga?ox(r,a)&&(Ot="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(Ot="onCompositionStart");Ot&&(rx&&a.locale!=="ko"&&(Ga||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&Ga&&(xt=Xv()):(Wo=$e,ny="value"in Wo?Wo.value:Wo.textContent,Ga=!0)),ct=Ch(Me,Ot),0<ct.length&&(Ot=new ex(Ot,r,null,a,$e),Ge.push({event:Ot,listeners:ct}),xt?Ot.data=xt:(xt=sx(a),xt!==null&&(Ot.data=xt)))),(xt=F8?O8(r,a):T8(r,a))&&(Ot=Ch(Me,"onBeforeInput"),0<Ot.length&&(ct=new ex("onBeforeInput","beforeinput",null,a,$e),Ge.push({event:ct,listeners:Ot}),ct.data=xt)),vR(Ge,r,Me,a,$e)}QS(Ge,i)})}function Gl(r,i,a){return{instance:r,listener:i,currentTarget:a}}function Ch(r,i){for(var a=i+"Capture",d=[];r!==null;){var b=r,E=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||E===null||(b=dl(r,a),b!=null&&d.unshift(Gl(r,b,E)),b=dl(r,i),b!=null&&d.push(Gl(r,b,E))),r.tag===3)return d;r=r.return}return[]}function IR(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function KS(r,i,a,d,b){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,b?(Me=dl(a,E),Me!=null&&V.unshift(Gl(a,Me,Fe))):b||(Me=dl(a,E),Me!=null&&V.push(Gl(a,Me,Fe)))),a=a.return}V.length!==0&&r.push({event:i,listeners:V})}var _R=/\r\n?/g,CR=/\u0000|\uFFFD/g;function YS(r){return(typeof r=="string"?r:""+r).replace(_R,`
38
- `).replace(CR,"")}function VS(r,i){return i=YS(i),YS(r)===i}function Gt(r,i,a,d,b,E){switch(a){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||qa(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&qa(r,""+d);break;case"className":Bf(r,"class",d);break;case"tabIndex":Bf(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Bf(r,a,d);break;case"style":Yv(r,d,E);break;case"data":if(i!=="object"){Bf(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=Mf(""+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",b.name,b,null),Gt(r,i,"formEncType",b.formEncType,b,null),Gt(r,i,"formMethod",b.formMethod,b,null),Gt(r,i,"formTarget",b.formTarget,b,null)):(Gt(r,i,"encType",b.encType,b,null),Gt(r,i,"method",b.method,b,null),Gt(r,i,"target",b.target,b,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(a);break}d=Mf(""+d),r.setAttribute(a,d);break;case"onClick":d!=null&&(r.onclick=no);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(b.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=Mf(""+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),Tf(r,"popover",d);break;case"xlinkActuate":ro(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":ro(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":ro(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":ro(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":ro(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":ro(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":ro(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":ro(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":ro(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Tf(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=t8.get(a)||a,Tf(r,a,d))}}function Pg(r,i,a,d,b,E){switch(a){case"style":Yv(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(b.children!=null)throw Error(o(60));r.innerHTML=a}}break;case"children":typeof d=="string"?qa(r,d):(typeof d=="number"||typeof d=="bigint")&&qa(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=no);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kv.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(b=a.endsWith("Capture"),i=a.slice(2,b?a.length-7:void 0),E=r[nr]||null,E=E!=null?E[a]:null,typeof E=="function"&&r.removeEventListener(i,E,b),typeof d=="function")){typeof E!="function"&&E!==null&&(a in r?r[a]=null:r.hasAttribute(a)&&r.removeAttribute(a)),r.addEventListener(i,d,b);break e}a in r?r[a]=d:d===!0?r.setAttribute(a,""):Tf(r,a,d)}}}function Zr(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,b=!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":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Gt(r,i,E,V,a,null)}}b&&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=b=null,Fe=null,Me=null;for(d in a)if(a.hasOwnProperty(d)){var $e=a[d];if($e!=null)switch(d){case"name":b=$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)}}Hv(r,E,ge,Fe,Me,V,b,!1);return;case"select":It("invalid",r),d=V=E=null;for(b in a)if(a.hasOwnProperty(b)&&(ge=a[b],ge!=null))switch(b){case"value":E=ge;break;case"defaultValue":V=ge;break;case"multiple":d=ge;default:Gt(r,i,b,ge,a,null)}i=E,a=V,r.multiple=!!d,i!=null?$a(r,!!d,i,!1):a!=null&&$a(r,!!d,a,!0);return;case"textarea":It("invalid",r),E=b=d=null;for(V in a)if(a.hasOwnProperty(V)&&(ge=a[V],ge!=null))switch(V){case"value":d=ge;break;case"defaultValue":b=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)}Gv(r,d,b,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(Zp(i)){for($e in a)a.hasOwnProperty($e)&&(d=a[$e],d!==void 0&&Pg(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 FR(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 b=null,E=null,V=null,ge=null,Fe=null,Me=null,$e=null;for(De in a){var Ge=a[De];if(a.hasOwnProperty(De)&&Ge!=null)switch(De){case"checked":break;case"value":break;case"defaultValue":Fe=Ge;default:d.hasOwnProperty(De)||Gt(r,i,De,null,d,Ge)}}for(var Ue in d){var De=d[Ue];if(Ge=a[Ue],d.hasOwnProperty(Ue)&&(De!=null||Ge!=null))switch(Ue){case"type":E=De;break;case"name":b=De;break;case"checked":Me=De;break;case"defaultChecked":$e=De;break;case"value":V=De;break;case"defaultValue":ge=De;break;case"children":case"dangerouslySetInnerHTML":if(De!=null)throw Error(o(137,i));break;default:De!==Ge&&Gt(r,i,Ue,De,d,Ge)}}Wp(r,V,ge,Fe,Me,$e,E,b);return;case"select":De=V=ge=Ue=null;for(E in a)if(Fe=a[E],a.hasOwnProperty(E)&&Fe!=null)switch(E){case"value":break;case"multiple":De=Fe;default:d.hasOwnProperty(E)||Gt(r,i,E,null,d,Fe)}for(b in d)if(E=d[b],Fe=a[b],d.hasOwnProperty(b)&&(E!=null||Fe!=null))switch(b){case"value":Ue=E;break;case"defaultValue":ge=E;break;case"multiple":V=E;default:E!==Fe&&Gt(r,i,b,E,d,Fe)}i=ge,a=V,d=De,Ue!=null?$a(r,!!a,Ue,!1):!!d!=!!a&&(i!=null?$a(r,!!a,i,!0):$a(r,!!a,a?[]:"",!1));return;case"textarea":De=Ue=null;for(ge in a)if(b=a[ge],a.hasOwnProperty(ge)&&b!=null&&!d.hasOwnProperty(ge))switch(ge){case"value":break;case"children":break;default:Gt(r,i,ge,null,d,b)}for(V in d)if(b=d[V],E=a[V],d.hasOwnProperty(V)&&(b!=null||E!=null))switch(V){case"value":Ue=b;break;case"defaultValue":De=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:b!==E&&Gt(r,i,V,b,d,E)}Qv(r,Ue,De);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],De=a[Fe],d.hasOwnProperty(Fe)&&Ue!==De&&(Ue!=null||De!=null))switch(Fe){case"selected":r.selected=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;default:Gt(r,i,Fe,Ue,d,De)}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],De=a[Me],d.hasOwnProperty(Me)&&Ue!==De&&(Ue!=null||De!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":if(Ue!=null)throw Error(o(137,i));break;default:Gt(r,i,Me,Ue,d,De)}return;default:if(Zp(i)){for(var Kt in a)Ue=a[Kt],a.hasOwnProperty(Kt)&&Ue!==void 0&&!d.hasOwnProperty(Kt)&&Pg(r,i,Kt,void 0,d,Ue);for($e in d)Ue=d[$e],De=a[$e],!d.hasOwnProperty($e)||Ue===De||Ue===void 0&&De===void 0||Pg(r,i,$e,Ue,d,De);return}}for(var Te in a)Ue=a[Te],a.hasOwnProperty(Te)&&Ue!=null&&!d.hasOwnProperty(Te)&&Gt(r,i,Te,null,d,Ue);for(Ge in d)Ue=d[Ge],De=a[Ge],!d.hasOwnProperty(Ge)||Ue===De||Ue==null&&De==null||Gt(r,i,Ge,Ue,d,De)}function WS(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OR(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,a=performance.getEntriesByType("resource"),d=0;d<a.length;d++){var b=a[d],E=b.transferSize,V=b.initiatorType,ge=b.duration;if(E&&ge&&WS(V)){for(V=0,ge=b.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&&WS(Ge)&&(Fe=Fe.responseEnd,V+=$e*(Fe<ge?1:(ge-Me)/(Fe-Me)))}if(--d,i+=8*(E+V)/(b.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 kg=null,Lg=null;function Fh(r){return r.nodeType===9?r:r.ownerDocument}function XS(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 zg(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 $g=null;function TR(){var r=window.event;return r&&r.type==="popstate"?r===$g?!1:($g=r,!0):($g=null,!1)}var JS=typeof setTimeout=="function"?setTimeout:void 0,BR=typeof clearTimeout=="function"?clearTimeout:void 0,e2=typeof Promise=="function"?Promise:void 0,RR=typeof queueMicrotask=="function"?queueMicrotask:typeof e2<"u"?function(r){return e2.resolve(null).then(r).catch(MR)}:JS;function MR(r){setTimeout(function(){throw r})}function ds(r){return r==="head"}function t2(r,i){var a=i,d=0;do{var b=a.nextSibling;if(r.removeChild(a),b&&b.nodeType===8)if(a=b.data,a==="/$"||a==="/&"){if(d===0){r.removeChild(b),wu(i);return}d--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")d++;else if(a==="html")Kl(r.ownerDocument.documentElement);else if(a==="head"){a=r.ownerDocument.head,Kl(a);for(var E=a.firstChild;E;){var V=E.nextSibling,ge=E.nodeName;E[wr]||ge==="SCRIPT"||ge==="STYLE"||ge==="LINK"&&E.rel.toLowerCase()==="stylesheet"||a.removeChild(E),E=V}}else a==="body"&&Kl(r.ownerDocument.body);a=b}while(a);wu(i)}function r2(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 qg(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":qg(a),Vo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}r.removeChild(a)}}function UR(r,i,a,d){for(;r.nodeType===1;){var b=a;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[wr])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!==b.rel||r.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||r.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||r.getAttribute("title")!==(b.title==null?null:b.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(E=r.getAttribute("src"),(E!==(b.src==null?null:b.src)||r.getAttribute("type")!==(b.type==null?null:b.type)||r.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&E&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var E=b.name==null?null:""+b.name;if(b.type==="hidden"&&r.getAttribute("name")===E)return r}else return r;if(r=di(r.nextSibling),r===null)break}return null}function jR(r,i,a){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=di(r.nextSibling),r===null))return null;return r}function n2(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=di(r.nextSibling),r===null))return null;return r}function Hg(r){return r.data==="$?"||r.data==="$~"}function Qg(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function NR(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 di(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 Gg=null;function i2(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"||a==="/&"){if(i===0)return di(r.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}r=r.nextSibling}return null}function o2(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 s2(r,i,a){switch(i=Fh(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 Kl(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Vo(r)}var pi=new Map,a2=new Set;function Oh(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var wo=re.d;re.d={f:DR,r:PR,D:kR,C:LR,L:zR,m:$R,X:HR,S:qR,M:QR};function DR(){var r=wo.f(),i=wh();return r||i}function PR(r){var i=Ei(r);i!==null&&i.tag===5&&i.type==="form"?SE(i):wo.r(r)}var mu=typeof document>"u"?null:document;function u2(r,i,a){var d=mu;if(d&&typeof i=="string"&&i){var b=si(i);b='link[rel="'+r+'"][href="'+b+'"]',typeof a=="string"&&(b+='[crossorigin="'+a+'"]'),a2.has(b)||(a2.add(b),r={rel:r,crossOrigin:a,href:i},d.querySelector(b)===null&&(i=d.createElement("link"),Zr(i,"link",r),ur(i),d.head.appendChild(i)))}}function kR(r){wo.D(r),u2("dns-prefetch",r,null)}function LR(r,i){wo.C(r,i),u2("preconnect",r,i)}function zR(r,i,a){wo.L(r,i,a);var d=mu;if(d&&r&&i){var b='link[rel="preload"][as="'+si(i)+'"]';i==="image"&&a&&a.imageSrcSet?(b+='[imagesrcset="'+si(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(b+='[imagesizes="'+si(a.imageSizes)+'"]')):b+='[href="'+si(r)+'"]';var E=b;switch(i){case"style":E=bu(r);break;case"script":E=Au(r)}pi.has(E)||(r=y({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:r,as:i},a),pi.set(E,r),d.querySelector(b)!==null||i==="style"&&d.querySelector(Yl(E))||i==="script"&&d.querySelector(Vl(E))||(i=d.createElement("link"),Zr(i,"link",r),ur(i),d.head.appendChild(i)))}}function $R(r,i){wo.m(r,i);var a=mu;if(a&&r){var d=i&&typeof i.as=="string"?i.as:"script",b='link[rel="modulepreload"][as="'+si(d)+'"][href="'+si(r)+'"]',E=b;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Au(r)}if(!pi.has(E)&&(r=y({rel:"modulepreload",href:r},i),pi.set(E,r),a.querySelector(b)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Vl(E)))return}d=a.createElement("link"),Zr(d,"link",r),ur(d),a.head.appendChild(d)}}}function qR(r,i,a){wo.S(r,i,a);var d=mu;if(d&&r){var b=Si(d).hoistableStyles,E=bu(r);i=i||"default";var V=b.get(E);if(!V){var ge={loading:0,preload:null};if(V=d.querySelector(Yl(E)))ge.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":i},a),(a=pi.get(E))&&Kg(r,a);var Fe=V=d.createElement("link");ur(Fe),Zr(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,Th(V,i,d)}V={type:"stylesheet",instance:V,count:1,state:ge},b.set(E,V)}}}function HR(r,i){wo.X(r,i);var a=mu;if(a&&r){var d=Si(a).hoistableScripts,b=Au(r),E=d.get(b);E||(E=a.querySelector(Vl(b)),E||(r=y({src:r,async:!0},i),(i=pi.get(b))&&Yg(r,i),E=a.createElement("script"),ur(E),Zr(E,"link",r),a.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},d.set(b,E))}}function QR(r,i){wo.M(r,i);var a=mu;if(a&&r){var d=Si(a).hoistableScripts,b=Au(r),E=d.get(b);E||(E=a.querySelector(Vl(b)),E||(r=y({src:r,async:!0,type:"module"},i),(i=pi.get(b))&&Yg(r,i),E=a.createElement("script"),ur(E),Zr(E,"link",r),a.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},d.set(b,E))}}function l2(r,i,a,d){var b=(b=fe.current)?Oh(b):null;if(!b)throw Error(o(446));switch(r){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=bu(a.href),a=Si(b).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=bu(a.href);var E=Si(b).hoistableStyles,V=E.get(r);if(V||(b=b.ownerDocument||b,V={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(r,V),(E=b.querySelector(Yl(r)))&&!E._p&&(V.instance=E,V.state.loading=5),pi.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},pi.set(r,a),E||GR(b,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=Au(a),a=Si(b).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 bu(r){return'href="'+si(r)+'"'}function Yl(r){return'link[rel="stylesheet"]['+r+"]"}function c2(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function GR(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}),Zr(i,"link",a),ur(i),r.head.appendChild(i))}function Au(r){return'[src="'+si(r)+'"]'}function Vl(r){return"script[async]"+r}function f2(r,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+si(a.href)+'"]');if(d)return i.instance=d,ur(d),d;var b=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),ur(d),Zr(d,"style",b),Th(d,a.precedence,r),i.instance=d;case"stylesheet":b=bu(a.href);var E=r.querySelector(Yl(b));if(E)return i.state.loading|=4,i.instance=E,ur(E),E;d=c2(a),(b=pi.get(b))&&Kg(d,b),E=(r.ownerDocument||r).createElement("link"),ur(E);var V=E;return V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Zr(E,"link",d),i.state.loading|=4,Th(E,a.precedence,r),i.instance=E;case"script":return E=Au(a.src),(b=r.querySelector(Vl(E)))?(i.instance=b,ur(b),b):(d=a,(b=pi.get(E))&&(d=y({},a),Yg(d,b)),r=r.ownerDocument||r,b=r.createElement("script"),ur(b),Zr(b,"link",d),r.head.appendChild(b),i.instance=b);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,Th(d,a.precedence,r));return i.instance}function Th(r,i,a){for(var d=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=d.length?d[d.length-1]:null,E=b,V=0;V<d.length;V++){var ge=d[V];if(ge.dataset.precedence===i)E=ge;else if(E!==b)break}E?E.parentNode.insertBefore(r,E.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(r,i.firstChild))}function Kg(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Yg(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Bh=null;function h2(r,i,a){if(Bh===null){var d=new Map,b=Bh=new Map;b.set(a,d)}else b=Bh,d=b.get(a),d||(d=new Map,b.set(a,d));if(d.has(r))return d;for(d.set(r,null),a=a.getElementsByTagName(r),b=0;b<a.length;b++){var E=a[b];if(!(E[wr]||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 d2(r,i,a){r=r.ownerDocument||r,r.head.insertBefore(a,i==="title"?r.querySelector("head > title"):null)}function KR(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 p2(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function YR(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 b=bu(d.href),E=i.querySelector(Yl(b));if(E){i=E._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Rh.bind(r),i.then(r,r)),a.state.loading|=4,a.instance=E,ur(E);return}E=i.ownerDocument||i,d=c2(d),(b=pi.get(b))&&Kg(d,b),E=E.createElement("link"),ur(E);var V=E;V._p=new Promise(function(ge,Fe){V.onload=ge,V.onerror=Fe}),Zr(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=Rh.bind(r),i.addEventListener("load",a),i.addEventListener("error",a))}}var Vg=0;function VR(r,i){return r.stylesheets&&r.count===0&&Uh(r,r.stylesheets),0<r.count||0<r.imgCount?function(a){var d=setTimeout(function(){if(r.stylesheets&&Uh(r,r.stylesheets),r.unsuspend){var E=r.unsuspend;r.unsuspend=null,E()}},6e4+i);0<r.imgBytes&&Vg===0&&(Vg=62500*OR());var b=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Uh(r,r.stylesheets),r.unsuspend)){var E=r.unsuspend;r.unsuspend=null,E()}},(r.imgBytes>Vg?50:800)+i);return r.unsuspend=a,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(b)}}:null}function Rh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uh(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Mh=null;function Uh(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Mh=new Map,i.forEach(WR,r),Mh=null,Rh.call(r))}function WR(r,i){if(!(i.state.loading&4)){var a=Mh.get(r);if(a)var d=a.get(null);else{a=new Map,Mh.set(r,a);for(var b=r.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<b.length;E++){var V=b[E];(V.nodeName==="LINK"||V.getAttribute("media")!=="not all")&&(a.set(V.dataset.precedence,V),d=V)}d&&a.set(null,d)}b=i.instance,V=b.getAttribute("data-precedence"),E=a.get(V)||d,E===d&&a.set(null,b),a.set(V,b),this.count++,d=Rh.bind(this),b.addEventListener("load",d),b.addEventListener("error",d),E?E.parentNode.insertBefore(b,E.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(b,r.firstChild)),i.state.loading|=4}}var Wl={$$typeof:I,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function XR(r,i,a,d,b,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=Ar(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ar(0),this.hiddenUpdates=Ar(null),this.identifierPrefix=d,this.onUncaughtError=b,this.onCaughtError=E,this.onRecoverableError=V,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Fe,this.incompleteTransitions=new Map}function y2(r,i,a,d,b,E,V,ge,Fe,Me,$e,Ge){return r=new XR(r,i,a,V,Fe,Me,$e,Ge,ge),i=1,E===!0&&(i|=24),E=qn(3,null,null,i),r.current=E,E.stateNode=r,i=Fy(),i.refCount++,r.pooledCache=i,i.refCount++,E.memoizedState={element:d,isDehydrated:a,cache:i},Ry(E),r}function g2(r){return r?(r=Wa,r):Wa}function m2(r,i,a,d,b,E){b=g2(b),d.context===null?d.context=b:d.pendingContext=b,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&&(Fn(a,r,i),Fl(a,r,i))}function b2(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<i?a:i}}function Wg(r,i){b2(r,i),(r=r.alternate)&&b2(r,i)}function A2(r){if(r.tag===13||r.tag===31){var i=Ys(r,67108864);i!==null&&Fn(i,r,67108864),Wg(r,67108864)}}function w2(r){if(r.tag===13||r.tag===31){var i=Yn();i=qt(i);var a=Ys(r,i);a!==null&&Fn(a,r,i),Wg(r,i)}}var jh=!0;function ZR(r,i,a,d){var b=X.T;X.T=null;var E=re.p;try{re.p=2,Xg(r,i,a,d)}finally{re.p=E,X.T=b}}function JR(r,i,a,d){var b=X.T;X.T=null;var E=re.p;try{re.p=8,Xg(r,i,a,d)}finally{re.p=E,X.T=b}}function Xg(r,i,a,d){if(jh){var b=Zg(d);if(b===null)Dg(r,i,d,Nh,a),x2(r,d);else if(t4(b,r,i,a,d))d.stopPropagation();else if(x2(r,d),i&4&&-1<e4.indexOf(r)){for(;b!==null;){var E=Ei(b);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}Hi(E),(Pt&6)===0&&(bh=de()+500,Hl(0))}}break;case 31:case 13:ge=Ys(E,2),ge!==null&&Fn(ge,E,2),wh(),Wg(E,2)}if(E=Zg(d),E===null&&Dg(r,i,d,Nh,a),E===b)break;b=E}b!==null&&d.stopPropagation()}else Dg(r,i,d,null,a)}}function Zg(r){return r=ey(r),Jg(r)}var Nh=null;function Jg(r){if(Nh=null,r=xi(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 Nh=r,null}function v2(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(ve()){case x:return 2;case B:return 8;case N:case ie:return 32;case me:return 268435456;default:return 32}default:return 32}}var em=!1,ps=null,ys=null,gs=null,Xl=new Map,Zl=new Map,ms=[],e4="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 x2(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":Xl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zl.delete(i.pointerId)}}function Jl(r,i,a,d,b,E){return r===null||r.nativeEvent!==E?(r={blockedOn:i,domEventName:a,eventSystemFlags:d,nativeEvent:E,targetContainers:[b]},i!==null&&(i=Ei(i),i!==null&&A2(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,b!==null&&i.indexOf(b)===-1&&i.push(b),r)}function t4(r,i,a,d,b){switch(i){case"focusin":return ps=Jl(ps,r,i,a,d,b),!0;case"dragenter":return ys=Jl(ys,r,i,a,d,b),!0;case"mouseover":return gs=Jl(gs,r,i,a,d,b),!0;case"pointerover":var E=b.pointerId;return Xl.set(E,Jl(Xl.get(E)||null,r,i,a,d,b)),!0;case"gotpointercapture":return E=b.pointerId,Zl.set(E,Jl(Zl.get(E)||null,r,i,a,d,b)),!0}return!1}function E2(r){var i=xi(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,zn(r.priority,function(){w2(a)});return}}else if(i===31){if(i=c(a),i!==null){r.blockedOn=i,zn(r.priority,function(){w2(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 Dh(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var a=Zg(r.nativeEvent);if(a===null){a=r.nativeEvent;var d=new a.constructor(a.type,a);Jp=d,a.target.dispatchEvent(d),Jp=null}else return i=Ei(a),i!==null&&A2(i),r.blockedOn=a,!1;i.shift()}return!0}function S2(r,i,a){Dh(r)&&a.delete(i)}function r4(){em=!1,ps!==null&&Dh(ps)&&(ps=null),ys!==null&&Dh(ys)&&(ys=null),gs!==null&&Dh(gs)&&(gs=null),Xl.forEach(S2),Zl.forEach(S2)}function Ph(r,i){r.blockedOn===i&&(r.blockedOn=null,em||(em=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,r4)))}var kh=null;function I2(r){kh!==r&&(kh=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){kh===r&&(kh=null);for(var i=0;i<r.length;i+=3){var a=r[i],d=r[i+1],b=r[i+2];if(typeof d!="function"){if(Jg(d||a)===null)continue;break}var E=Ei(a);E!==null&&(r.splice(i,3),i-=3,Zy(E,{pending:!0,data:b,method:a.method,action:d},d,b))}}))}function wu(r){function i(Fe){return Ph(Fe,r)}ps!==null&&Ph(ps,r),ys!==null&&Ph(ys,r),gs!==null&&Ph(gs,r),Xl.forEach(i),Zl.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);)E2(a),a.blockedOn===null&&ms.shift();if(a=(r.ownerDocument||r).$$reactFormReplay,a!=null)for(d=0;d<a.length;d+=3){var b=a[d],E=a[d+1],V=b[nr]||null;if(typeof E=="function")V||I2(a);else if(V){var ge=null;if(E&&E.hasAttribute("formAction")){if(b=E,V=E[nr]||null)ge=V.formAction;else if(Jg(b)!==null)continue}else ge=V.action;typeof ge=="function"?a[d+1]=ge:(a.splice(d,3),d-=3),I2(a)}}}function _2(){function r(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(V){return b=V})},focusReset:"manual",scroll:"manual"})}function i(){b!==null&&(b(),b=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,b=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),b!==null&&(b(),b=null)}}}function tm(r){this._internalRoot=r}Lh.prototype.render=tm.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(o(409));var a=i.current,d=Yn();m2(a,d,r,i,null,null)},Lh.prototype.unmount=tm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;m2(r.current,2,null,r,null,null),wh(),i[Mr]=null}};function Lh(r){this._internalRoot=r}Lh.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&&E2(r)}};var C2=t.version;if(C2!=="19.2.0")throw Error(o(527,C2,"19.2.0"));re.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 n4={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zh.isDisabled&&zh.supportsFiber)try{we=zh.inject(n4),Se=zh}catch{}}return rc.createRoot=function(r,i){if(!s(r))throw Error(o(299));var a=!1,d="",b=UE,E=jE,V=NE;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(b=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(V=i.onRecoverableError)),i=y2(r,1,!1,null,null,a,d,null,b,E,V,_2),r[Mr]=i.current,Ng(r),new tm(i)},rc.hydrateRoot=function(r,i,a){if(!s(r))throw Error(o(299));var d=!1,b="",E=UE,V=jE,ge=NE,Fe=null;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(b=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=y2(r,1,!0,i,a??null,d,b,Fe,E,V,ge,_2),i.context=g2(null),a=i.current,d=Yn(),d=qt(d),b=rs(d),b.callback=null,ns(a,b,d),a=d,i.current.lanes=a,be(i,a),Hi(i),r[Mr]=i.current,Ng(r),new Lh(i)},rc.version="19.2.0",rc}var $2;function v4(){if($2)return sm.exports;$2=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(),sm.exports=w4(),sm.exports}var x4=v4(),XF=WF();function cc({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?XF.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 E4(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function xc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function wa(e,...t){if(!E4(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 S4(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");xc(e.outputLen),xc(e.blockLen)}function Uu(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){wa(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function I4(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ju(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function cm(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Qi(e,t){return e<<32-t|e>>>t}const _4=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function C4(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function F4(e){for(let t=0;t<e.length;t++)e[t]=C4(e[t]);return e}const q2=_4?e=>e:F4;function O4(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function rp(e){return typeof e=="string"&&(e=O4(e)),wa(e),e}function T4(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];wa(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 ew=class{};function JF(e){const t=o=>e().update(rp(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function B4(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 tw=BigInt(0),mb=BigInt(1);function of(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function rw(e){if(!of(e))throw new Error("Uint8Array expected")}function Ec(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Qh(e){const t=e.toString(16);return t.length&1?"0"+t:t}function eO(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?tw:BigInt("0x"+e)}const tO=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",R4=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Sc(e){if(rw(e),tO)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=R4[e[n]];return t}const vo={_0:48,_9:57,A:65,F:70,a:97,f:102};function H2(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 zd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(tO)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=H2(e.charCodeAt(u)),c=H2(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 ga(e){return eO(Sc(e))}function rO(e){return rw(e),eO(Sc(Uint8Array.from(e).reverse()))}function sf(e,t){return zd(e.toString(16).padStart(t*2,"0"))}function nO(e,t){return sf(e,t).reverse()}function gi(e,t,n){let o;if(typeof t=="string")try{o=zd(t)}catch(u){throw new Error(e+" must be hex string or Uint8Array, cause: "+u)}else if(of(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 $d(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];rw(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 fm=e=>typeof e=="bigint"&&tw<=e;function nw(e,t,n){return fm(e)&&fm(t)&&fm(n)&&t<=e&&e<n}function Ou(e,t,n,o){if(!nw(t,n,o))throw new Error("expected valid "+e+": "+n+" <= n < "+o+", got "+t)}function M4(e){let t;for(t=0;e>tw;e>>=mb,t+=1);return t}const np=e=>(mb<<BigInt(e))-mb,hm=e=>new Uint8Array(e),Q2=e=>Uint8Array.from(e);function U4(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=hm(e),s=hm(e),u=0;const l=()=>{o.fill(1),s.fill(0),u=0},c=(...y)=>n(s,o,...y),h=(y=hm(0))=>{s=c(Q2([0]),y),o=c(),y.length!==0&&(s=c(Q2([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 m=o.slice();g.push(m),y+=o.length}return $d(...g)};return(y,g)=>{l(),h(y);let m;for(;!(m=g(f()));)h();return l(),m}}const j4={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"||of(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 ip(e,t,n={}){const o=(s,u,l)=>{const c=j4[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 G2(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 Tn=BigInt(0),bn=BigInt(1),fa=BigInt(2),N4=BigInt(3),iO=BigInt(4),oO=BigInt(5),sO=BigInt(8);function On(e,t){const n=e%t;return n>=Tn?n:t+n}function yi(e,t,n){let o=e;for(;t-- >Tn;)o*=o,o%=n;return o}function bb(e,t){if(e===Tn)throw new Error("invert: expected non-zero number");if(t<=Tn)throw new Error("invert: expected positive modulus, got "+t);let n=On(e,t),o=t,s=Tn,u=bn;for(;n!==Tn;){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 On(s,t)}function aO(e,t){const n=(e.ORDER+bn)/iO,o=e.pow(t,n);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function D4(e,t){const n=(e.ORDER-oO)/sO,o=e.mul(t,fa),s=e.pow(o,n),u=e.mul(t,s),l=e.mul(e.mul(u,fa),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 P4(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-bn,n=0;for(;t%fa===Tn;)t/=fa,n++;let o=fa;const s=iw(e);for(;K2(s,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return aO;let u=s.pow(o,t);const l=(t+bn)/fa;return function(h,f){if(h.is0(f))return f;if(K2(h,f)!==1)throw new Error("Cannot find square root");let p=n,y=h.mul(h.ONE,u),g=h.pow(f,t),m=h.pow(f,l);for(;!h.eql(g,h.ONE);){if(h.is0(g))return h.ZERO;let w=1,F=h.sqr(g);for(;!h.eql(F,h.ONE);)if(w++,F=h.sqr(F),w===p)throw new Error("Cannot find square root");const S=bn<<BigInt(p-w-1),M=h.pow(y,S);p=w,y=h.sqr(M),g=h.mul(g,y),m=h.mul(m,M)}return m}}function k4(e){return e%iO===N4?aO:e%sO===oO?D4:P4(e)}const L4=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function z4(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=L4.reduce((o,s)=>(o[s]="function",o),t);return ip(e,n)}function $4(e,t,n){if(n<Tn)throw new Error("invalid exponent, negatives unsupported");if(n===Tn)return e.ONE;if(n===bn)return t;let o=e.ONE,s=t;for(;n>Tn;)n&bn&&(o=e.mul(o,s)),s=e.sqr(s),n>>=bn;return o}function uO(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 K2(e,t){const n=(e.ORDER-bn)/fa,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 lO(e,t){t!==void 0&&xc(t);const n=t!==void 0?t:e.toString(2).length,o=Math.ceil(n/8);return{nBitLength:n,nByteLength:o}}function iw(e,t,n=!1,o={}){if(e<=Tn)throw new Error("invalid field: expected ORDER > 0, got "+e);const{nBitLength:s,nByteLength:u}=lO(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:np(s),ZERO:Tn,ONE:bn,create:h=>On(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return Tn<=h&&h<e},is0:h=>h===Tn,isOdd:h=>(h&bn)===bn,neg:h=>On(-h,e),eql:(h,f)=>h===f,sqr:h=>On(h*h,e),add:(h,f)=>On(h+f,e),sub:(h,f)=>On(h-f,e),mul:(h,f)=>On(h*f,e),pow:(h,f)=>$4(c,h,f),div:(h,f)=>On(h*bb(f,e),e),sqrN:h=>h*h,addN:(h,f)=>h+f,subN:(h,f)=>h-f,mulN:(h,f)=>h*f,inv:h=>bb(h,e),sqrt:o.sqrt||(h=>(l||(l=k4(e)),l(c,h))),toBytes:h=>n?nO(h,u):sf(h,u),fromBytes:h=>{if(h.length!==u)throw new Error("Field.fromBytes: expected "+u+" bytes, got "+h.length);return n?rO(h):ga(h)},invertBatch:h=>uO(c,h),cmov:(h,f,p)=>p?f:h});return Object.freeze(c)}function cO(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 fO(e){const t=cO(e);return t+Math.ceil(t/2)}function q4(e,t,n=!1){const o=e.length,s=cO(t),u=fO(t);if(o<16||o<u||o>1024)throw new Error("expected "+u+"-1024 bytes of input, got "+o);const l=n?rO(e):ga(e),c=On(l,t-bn)+bn;return n?nO(c,s):sf(c,s)}function H4(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 Q4(e,t,n){return e&t^~e&n}function G4(e,t,n){return e&t^e&n^t&n}class K4 extends ew{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=cm(this.buffer)}update(t){Uu(this),t=rp(t),wa(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=cm(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){Uu(this),ZF(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:s,isLE:u}=this;let{pos:l}=this;n[l++]=128,ju(this.buffer.subarray(l)),this.padOffset>s-l&&(this.process(o,0),l=0);for(let y=l;y<s;y++)n[y]=0;H4(o,s-8,BigInt(this.length*8),u),this.process(o,0);const c=cm(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]),Gh=BigInt(2**32-1),Y2=BigInt(32);function Y4(e,t=!1){return t?{h:Number(e&Gh),l:Number(e>>Y2&Gh)}:{h:Number(e>>Y2&Gh)|0,l:Number(e&Gh)|0}}function V4(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}=Y4(e[u],t);[o[u],s[u]]=[l,c]}return[o,s]}const W4=(e,t,n)=>e<<n|t>>>32-n,X4=(e,t,n)=>t<<n|e>>>32-n,Z4=(e,t,n)=>t<<n-32|e>>>64-n,J4=(e,t,n)=>e<<n-32|t>>>64-n,eM=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]),ws=new Uint32Array(64);class tM extends K4{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)ws[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const g=ws[y-15],m=ws[y-2],w=Qi(g,7)^Qi(g,18)^g>>>3,F=Qi(m,17)^Qi(m,19)^m>>>10;ws[y]=F+ws[y-7]+w+ws[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=Qi(c,6)^Qi(c,11)^Qi(c,25),m=p+g+Q4(c,h,f)+eM[y]+ws[y]|0,F=(Qi(o,2)^Qi(o,13)^Qi(o,22))+G4(o,s,u)|0;p=f,f=h,h=c,c=l+m|0,l=u,u=s,s=o,o=m+F|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(){ju(ws)}destroy(){this.set(0,0,0,0,0,0,0,0),ju(this.buffer)}}const hO=JF(()=>new tM);class dO extends ew{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,S4(t);const o=rp(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),ju(u)}update(t){return Uu(this),this.iHash.update(t),this}digestInto(t){Uu(this),wa(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 pO=(e,t,n)=>new dO(e,t).update(n).digest();pO.create=(e,t)=>new dO(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const V2=BigInt(0),Ab=BigInt(1);function dm(e,t){const n=t.negate();return e?n:t}function yO(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function pm(e,t){yO(e,t);const n=Math.ceil(t/e)+1,o=2**(e-1),s=2**e,u=np(e),l=BigInt(e);return{windows:n,windowSize:o,mask:u,maxNumber:s,shiftBy:l}}function W2(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+=Ab);const f=t*o,p=f+Math.abs(c)-1,y=c===0,g=c<0,m=t%2!==0;return{nextN:h,offset:p,isZero:y,isNeg:g,isNegF:m,offsetF:f}}function rM(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 nM(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 ym=new WeakMap,gO=new WeakMap;function gm(e){return gO.get(e)||1}function iM(e,t){return{constTimeNegate:dm,hasPrecomputes(n){return gm(n)!==1},unsafeLadder(n,o,s=e.ZERO){let u=n;for(;o>V2;)o&Ab&&(s=s.add(u)),u=u.double(),o>>=Ab;return s},precomputeWindow(n,o){const{windows:s,windowSize:u}=pm(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=pm(n,t);for(let h=0;h<c.windows;h++){const{nextN:f,offset:p,isZero:y,isNeg:g,isNegF:m,offsetF:w}=W2(s,h,c);s=f,y?l=l.add(dm(m,o[w])):u=u.add(dm(g,o[p]))}return{p:u,f:l}},wNAFUnsafe(n,o,s,u=e.ZERO){const l=pm(n,t);for(let c=0;c<l.windows&&s!==V2;c++){const{nextN:h,offset:f,isZero:p,isNeg:y}=W2(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=ym.get(o);return u||(u=this.precomputeWindow(o,n),n!==1&&ym.set(o,s(u))),u},wNAFCached(n,o,s){const u=gm(n);return this.wNAF(u,this.getPrecomputes(u,n,s),o)},wNAFCachedUnsafe(n,o,s,u){const l=gm(n);return l===1?this.unsafeLadder(n,o,u):this.wNAFUnsafe(l,this.getPrecomputes(l,n,s),o,u)},setWindowSize(n,o){yO(o,t),gO.set(n,o),ym.delete(n)}}}function oM(e,t,n,o){rM(n,e),nM(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=M4(BigInt(s));let h=1;c>12?h=c-3:c>4?h=c-2:c>0&&(h=2);const f=np(h),p=new Array(Number(f)+1).fill(l),y=Math.floor((t.BITS-1)/h)*h;let g=l;for(let m=y;m>=0;m-=h){p.fill(l);for(let F=0;F<u;F++){const S=o[F],M=Number(S>>BigInt(m)&f);p[M]=p[M].add(n[F])}let w=l;for(let F=p.length-1,S=l;F>0;F--)S=S.add(p[F]),w=w.add(S);if(g=g.add(w),m!==0)for(let F=0;F<h;F++)g=g.double()}return g}function mO(e){return z4(e.Fp),ip(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...lO(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function X2(e){e.lowS!==void 0&&Ec("lowS",e.lowS),e.prehash!==void 0&&Ec("prehash",e.prehash)}function sM(e){const t=mO(e);ip(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 aM extends Error{constructor(t=""){super(t)}}const Oo={Err:aM,_tlv:{encode:(e,t)=>{const{Err:n}=Oo;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=Qh(o);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const u=o>127?Qh(s.length/2|128):"";return Qh(e)+u+s+t},decode(e,t){const{Err:n}=Oo;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}=Oo;if(e<Uo)throw new t("integer: negative integers are not allowed");let n=Qh(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}=Oo;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 ga(e)}},toSig(e){const{Err:t,_int:n,_tlv:o}=Oo,s=gi("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}=Oo,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 mm(e,t){return Sc(sf(e,t))}const Uo=BigInt(0),zr=BigInt(1);BigInt(2);const bm=BigInt(3),uM=BigInt(4);function lM(e){const t=sM(e),{Fp:n}=t,o=iw(t.n,t.nBitLength),s=t.toBytes||((I,R,T)=>{const z=R.toAffine();return $d(Uint8Array.from([4]),n.toBytes(z.x),n.toBytes(z.y))}),u=t.fromBytes||(I=>{const R=I.subarray(1),T=n.fromBytes(R.subarray(0,n.BYTES)),z=n.fromBytes(R.subarray(n.BYTES,2*n.BYTES));return{x:T,y:z}});function l(I){const{a:R,b:T}=t,z=n.sqr(I),k=n.mul(z,I);return n.add(n.add(k,n.mul(I,R)),T)}function c(I,R){const T=n.sqr(R),z=l(I);return n.eql(T,z)}if(!c(t.Gx,t.Gy))throw new Error("bad curve params: generator point");const h=n.mul(n.pow(t.a,bm),uM),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 nw(I,zr,t.n)}function y(I){const{allowedPrivateKeyLengths:R,nByteLength:T,wrapPrivateKey:z,n:k}=t;if(R&&typeof I!="bigint"){if(of(I)&&(I=Sc(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:ga(gi("private key",I,T))}catch{throw new Error("invalid private key, expected hex or "+T+" bytes, got "+typeof I)}return z&&(L=On(L,k)),Ou("private key",L,zr,k),L}function g(I){if(!(I instanceof F))throw new Error("ProjectivePoint expected")}const m=G2((I,R)=>{const{px:T,py:z,pz:k}=I;if(n.eql(k,n.ONE))return{x:T,y:z};const L=I.is0();R==null&&(R=L?n.ONE:n.inv(k));const U=n.mul(T,R),j=n.mul(z,R),H=n.mul(k,R);if(L)return{x:n.ZERO,y:n.ZERO};if(!n.eql(H,n.ONE))throw new Error("invZ was invalid");return{x:U,y:j}}),w=G2(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 F{constructor(R,T,z){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(z==null||!n.isValid(z))throw new Error("z required");this.px=R,this.py=T,this.pz=z,Object.freeze(this)}static fromAffine(R){const{x:T,y:z}=R||{};if(!R||!n.isValid(T)||!n.isValid(z))throw new Error("invalid affine point");if(R instanceof F)throw new Error("projective point not allowed");const k=L=>n.eql(L,n.ZERO);return k(T)&&k(z)?F.ZERO:new F(T,z,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(R){const T=uO(n,R.map(z=>z.pz));return R.map((z,k)=>z.toAffine(T[k])).map(F.fromAffine)}static fromHex(R){const T=F.fromAffine(u(gi("pointHex",R)));return T.assertValidity(),T}static fromPrivateKey(R){return F.BASE.multiply(y(R))}static msm(R,T){return oM(F,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:z,pz:k}=this,{px:L,py:U,pz:j}=R,H=n.eql(n.mul(T,j),n.mul(L,k)),P=n.eql(n.mul(z,j),n.mul(U,k));return H&&P}negate(){return new F(this.px,n.neg(this.py),this.pz)}double(){const{a:R,b:T}=t,z=n.mul(T,bm),{px:k,py:L,pz:U}=this;let j=n.ZERO,H=n.ZERO,P=n.ZERO,te=n.mul(k,k),ue=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),H=n.mul(z,oe),H=n.add(j,H),j=n.sub(ue,H),H=n.add(ue,H),H=n.mul(j,H),j=n.mul(X,j),P=n.mul(z,P),oe=n.mul(R,oe),X=n.sub(te,oe),X=n.mul(R,X),X=n.add(X,P),P=n.add(te,te),te=n.add(P,te),te=n.add(te,oe),te=n.mul(te,X),H=n.add(H,te),oe=n.mul(L,U),oe=n.add(oe,oe),te=n.mul(oe,X),j=n.sub(j,te),P=n.mul(oe,ue),P=n.add(P,P),P=n.add(P,P),new F(j,H,P)}add(R){g(R);const{px:T,py:z,pz:k}=this,{px:L,py:U,pz:j}=R;let H=n.ZERO,P=n.ZERO,te=n.ZERO;const ue=t.a,oe=n.mul(t.b,bm);let X=n.mul(T,L),re=n.mul(z,U),pe=n.mul(k,j),le=n.add(T,z),J=n.add(L,U);le=n.mul(le,J),J=n.add(X,re),le=n.sub(le,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(z,k),H=n.add(U,j),G=n.mul(G,H),H=n.add(re,pe),G=n.sub(G,H),te=n.mul(ue,J),H=n.mul(oe,pe),te=n.add(H,te),H=n.sub(re,te),te=n.add(re,te),P=n.mul(H,te),re=n.add(X,X),re=n.add(re,X),pe=n.mul(ue,pe),J=n.mul(oe,J),re=n.add(re,pe),pe=n.sub(X,pe),pe=n.mul(ue,pe),J=n.add(J,pe),X=n.mul(re,J),P=n.add(P,X),X=n.mul(G,J),H=n.mul(le,H),H=n.sub(H,X),X=n.mul(le,re),te=n.mul(G,te),te=n.add(te,X),new F(H,P,te)}subtract(R){return this.add(R.negate())}is0(){return this.equals(F.ZERO)}wNAF(R){return A.wNAFCached(this,R,F.normalizeZ)}multiplyUnsafe(R){const{endo:T,n:z}=t;Ou("scalar",R,Uo,z);const k=F.ZERO;if(R===Uo)return k;if(this.is0()||R===zr)return this;if(!T||A.hasPrecomputes(this))return A.wNAFCachedUnsafe(this,R,F.normalizeZ);let{k1neg:L,k1:U,k2neg:j,k2:H}=T.splitScalar(R),P=k,te=k,ue=this;for(;U>Uo||H>Uo;)U&zr&&(P=P.add(ue)),H&zr&&(te=te.add(ue)),ue=ue.double(),U>>=zr,H>>=zr;return L&&(P=P.negate()),j&&(te=te.negate()),te=new F(n.mul(te.px,T.beta),te.py,te.pz),P.add(te)}multiply(R){const{endo:T,n:z}=t;Ou("scalar",R,zr,z);let k,L;if(T){const{k1neg:U,k1:j,k2neg:H,k2:P}=T.splitScalar(R);let{p:te,f:ue}=this.wNAF(j),{p:oe,f:X}=this.wNAF(P);te=A.constTimeNegate(U,te),oe=A.constTimeNegate(H,oe),oe=new F(n.mul(oe.px,T.beta),oe.py,oe.pz),k=te.add(oe),L=ue.add(X)}else{const{p:U,f:j}=this.wNAF(R);k=U,L=j}return F.normalizeZ([k,L])[0]}multiplyAndAddUnsafe(R,T,z){const k=F.BASE,L=(j,H)=>H===Uo||H===zr||!j.equals(k)?j.multiplyUnsafe(H):j.multiply(H),U=L(this,T).add(L(R,z));return U.is0()?void 0:U}toAffine(R){return m(this,R)}isTorsionFree(){const{h:R,isTorsionFree:T}=t;if(R===zr)return!0;if(T)return T(F,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:R,clearCofactor:T}=t;return R===zr?this:T?T(F,this):this.multiplyUnsafe(t.h)}toRawBytes(R=!0){return Ec("isCompressed",R),this.assertValidity(),s(F,this,R)}toHex(R=!0){return Ec("isCompressed",R),Sc(this.toRawBytes(R))}}F.BASE=new F(t.Gx,t.Gy,n.ONE),F.ZERO=new F(n.ZERO,n.ONE,n.ZERO);const{endo:S,nBitLength:M}=t,A=iM(F,S?Math.ceil(M/2):M);return{CURVE:t,ProjectivePoint:F,normPrivateKeyToScalar:y,weierstrassEquation:l,isWithinCurveOrder:p}}function cM(e){const t=mO(e);return ip(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function fM(e){const t=cM(e),{Fp:n,n:o,nByteLength:s,nBitLength:u}=t,l=n.BYTES+1,c=2*n.BYTES+1;function h(oe){return On(oe,o)}function f(oe){return bb(oe,o)}const{ProjectivePoint:p,normPrivateKeyToScalar:y,weierstrassEquation:g,isWithinCurveOrder:m}=lM({...t,toBytes(oe,X,re){const pe=X.toAffine(),le=n.toBytes(pe.x),J=$d;return Ec("isCompressed",re),re?J(Uint8Array.from([X.hasEvenY()?2:3]),le):J(Uint8Array.from([4]),le,n.toBytes(pe.y))},fromBytes(oe){const X=oe.length,re=oe[0],pe=oe.subarray(1);if(X===l&&(re===2||re===3)){const le=ga(pe);if(!nw(le,zr,n.ORDER))throw new Error("Point is not on curve");const J=g(le);let G;try{G=n.sqrt(J)}catch(W){const $=W instanceof Error?": "+W.message:"";throw new Error("Point is not on curve"+$)}const Q=(G&zr)===zr;return(re&1)===1!==Q&&(G=n.neg(G)),{x:le,y:G}}else if(X===c&&re===4){const le=n.fromBytes(pe.subarray(0,n.BYTES)),J=n.fromBytes(pe.subarray(n.BYTES,2*n.BYTES));return{x:le,y:J}}else{const le=l,J=c;throw new Error("invalid Point, expected length of "+le+", or uncompressed "+J+", got "+X)}}});function w(oe){const X=o>>zr;return oe>X}function F(oe){return w(oe)?h(-oe):oe}const S=(oe,X,re)=>ga(oe.slice(X,re));class M{constructor(X,re,pe){Ou("r",X,zr,o),Ou("s",re,zr,o),this.r=X,this.s=re,pe!=null&&(this.recovery=pe),Object.freeze(this)}static fromCompact(X){const re=s;return X=gi("compactSignature",X,re*2),new M(S(X,0,re),S(X,re,2*re))}static fromDER(X){const{r:re,s:pe}=Oo.toSig(gi("DER",X));return new M(re,pe)}assertValidity(){}addRecoveryBit(X){return new M(this.r,this.s,X)}recoverPublicKey(X){const{r:re,s:pe,recovery:le}=this,J=k(gi("msgHash",X));if(le==null||![0,1,2,3].includes(le))throw new Error("recovery id invalid");const G=le===2||le===3?re+t.n:re;if(G>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const Q=(le&1)===0?"02":"03",K=p.fromHex(Q+mm(G,n.BYTES)),W=f(G),$=h(-J*W),fe=h(pe*W),ae=p.BASE.multiplyAndAddUnsafe(K,$,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 zd(this.toDERHex())}toDERHex(){return Oo.hexFromSig(this)}toCompactRawBytes(){return zd(this.toCompactHex())}toCompactHex(){const X=s;return mm(this.r,X)+mm(this.s,X)}}const A={isValidPrivateKey(oe){try{return y(oe),!0}catch{return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const oe=fO(t.n);return q4(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 re=gi("key",oe).length,pe=n.BYTES,le=pe+1,J=2*pe+1;if(!(t.allowedPrivateKeyLengths||s===le))return re===le||re===J}function T(oe,X,re=!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(re)}const z=t.bits2int||function(oe){if(oe.length>8192)throw new Error("input is too large");const X=ga(oe),re=oe.length*8-u;return re>0?X>>BigInt(re):X},k=t.bits2int_modN||function(oe){return h(z(oe))},L=np(u);function U(oe){return Ou("num < 2^"+u,oe,Uo,L),sf(oe,s)}function j(oe,X,re=H){if(["recovered","canonical"].some(Z=>Z in re))throw new Error("sign() legacy options not supported");const{hash:pe,randomBytes:le}=t;let{lowS:J,prehash:G,extraEntropy:Q}=re;J==null&&(J=!0),oe=gi("msgHash",oe),X2(re),G&&(oe=gi("prehashed msgHash",pe(oe)));const K=k(oe),W=y(X),$=[U(W),U(K)];if(Q!=null&&Q!==!1){const Z=Q===!0?le(n.BYTES):Q;$.push(gi("extraEntropy",Z))}const fe=$d(...$),ae=K;function ne(Z){const O=z(Z);if(!m(O))return;const q=f(O),Y=p.BASE.multiply(O).toAffine(),se=h(Y.x);if(se===Uo)return;const ye=h(q*h(ae+se*W));if(ye===Uo)return;let ee=(Y.x===se?0:2)|Number(Y.y&zr),_=ye;return J&&w(ye)&&(_=F(ye),ee^=1),new M(se,_,ee)}return{seed:fe,k2sig:ne}}const H={lowS:t.lowS,prehash:!1},P={lowS:t.lowS,prehash:!1};function te(oe,X,re=H){const{seed:pe,k2sig:le}=j(oe,X,re),J=t;return U4(J.hash.outputLen,J.nByteLength,J.hmac)(pe,le)}p.BASE._setWindowSize(8);function ue(oe,X,re,pe=P){var ee;const le=oe;X=gi("msgHash",X),re=gi("publicKey",re);const{lowS:J,prehash:G,format:Q}=pe;if(X2(pe),"strict"in pe)throw new Error("options.strict was renamed to lowS");if(Q!==void 0&&Q!=="compact"&&Q!=="der")throw new Error("format must be compact or der");const K=typeof le=="string"||of(le),W=!K&&!Q&&typeof le=="object"&&le!==null&&typeof le.r=="bigint"&&typeof le.s=="bigint";if(!K&&!W)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let $,fe;try{if(W&&($=new M(le.r,le.s)),K){try{Q!=="compact"&&($=M.fromDER(le))}catch(_){if(!(_ instanceof Oo.Err))throw _}!$&&Q!=="der"&&($=M.fromCompact(le))}fe=p.fromHex(re)}catch{return!1}if(!$||J&&$.hasHighS())return!1;G&&(X=t.hash(X));const{r:ae,s:ne}=$,Z=k(X),O=f(ne),q=h(Z*O),Y=h(ae*O),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:te,verify:ue,ProjectivePoint:p,Signature:M,utils:A}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function hM(e){return{hash:e,hmac:(t,...n)=>pO(e,t,T4(...n)),randomBytes:B4}}function dM(e,t){const n=o=>fM({...e,...hM(o)});return{...n(t),create:n}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const bO=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Z2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),pM=BigInt(0),yM=BigInt(1),wb=BigInt(2),J2=(e,t)=>(e+t/wb)/t;function gM(e){const t=bO,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=yi(p,n,t)*p%t,g=yi(y,n,t)*p%t,m=yi(g,wb,t)*f%t,w=yi(m,s,t)*m%t,F=yi(w,u,t)*w%t,S=yi(F,c,t)*F%t,M=yi(S,h,t)*S%t,A=yi(M,c,t)*F%t,I=yi(A,n,t)*p%t,R=yi(I,l,t)*w%t,T=yi(R,o,t)*f%t,z=yi(T,wb,t);if(!vb.eql(vb.sqr(z),e))throw new Error("Cannot find square root");return z}const vb=iw(bO,void 0,void 0,{sqrt:gM}),af=dM({a:pM,b:BigInt(7),Fp:vb,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=-yM*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),u=n,l=BigInt("0x100000000000000000000000000000000"),c=J2(u*e,t),h=J2(-o*e,t);let f=On(e-c*n-h*s,t),p=On(-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}}}},hO),mM=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:af},Symbol.toStringTag,{value:"Module"})),AO="2.38.6";let nc={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${AO}`};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=nc.getDocsUrl)==null?void 0:c.call(nc,{...n,docsPath:s}),l=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...o?[`Details: ${o}`]:[],...nc.version?[`Version: ${nc.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=AO}walk(t){return wO(this,t)}}function wO(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?wO(e.cause,t):t?null:e}class vO 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 bM 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 AM extends Ze{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Po(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function pr(e){return Po(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function Bs(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 xO 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 EO 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 eI 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 Ku(e,{dir:t,size:n=32}={}){return typeof e=="string"?Ts(e,{dir:t,size:n}):wM(e,{dir:t,size:n})}function Ts(e,{dir:t,size:n=32}={}){if(n===null)return e;const o=e.replace("0x","");if(o.length>n*2)throw new EO({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function wM(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new EO({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 vM=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Wi(e,t={}){return typeof e=="number"||typeof e=="bigint"?it(e,t):typeof e=="string"?Nu(e,t):typeof e=="boolean"?SO(e,t):dn(e,t)}function SO(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(eo(n,{size:t.size}),Ku(n,{size:t.size})):n}function dn(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=vM[e[s]];const o=`0x${n}`;return typeof t.size=="number"?(eo(o,{size:t.size}),Ku(o,{dir:"right",size:t.size})):o}function it(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 vO({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?Ku(c,{size:o}):c}const xM=new TextEncoder;function Nu(e,t={}){const n=xM.encode(e);return dn(n,t)}const EM=new TextEncoder;function ow(e,t={}){return typeof e=="number"||typeof e=="bigint"?IM(e,t):typeof e=="boolean"?SM(e,t):Po(e)?Bi(e,t):IO(e,t)}function SM(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(eo(n,{size:t.size}),Ku(n,{size:t.size})):n}const xo={zero:48,nine:57,A:65,F:70,a:97,f:102};function tI(e){if(e>=xo.zero&&e<=xo.nine)return e-xo.zero;if(e>=xo.A&&e<=xo.F)return e-(xo.A-10);if(e>=xo.a&&e<=xo.f)return e-(xo.a-10)}function Bi(e,t={}){let n=e;t.size&&(eo(n,{size:t.size}),n=Ku(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=tI(o.charCodeAt(c++)),f=tI(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 IM(e,t){const n=it(e,t);return Bi(n)}function IO(e,t={}){const n=EM.encode(e);return typeof t.size=="number"?(eo(n,{size:t.size}),Ku(n,{dir:"right",size:t.size})):n}function eo(e,{size:t}){if(pr(e)>t)throw new AM({givenSize:pr(e),maxSize:t})}function Ri(e,t={}){const{signed:n}=t;t.size&&eo(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 Xi(e,t={}){return Number(Ri(e,t))}async function _O(e,{address:t,blockTag:n="latest",blockNumber:o}){const s=await e.request({method:"eth_getTransactionCount",params:[t,typeof o=="bigint"?it(o):n]},{dedupe:!!o});return Xi(s)}class uf 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 _M({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 af.Signature(Ri(e),Ri(t)).toCompactHex()}${u===0?"1b":"1c"}`;return n==="hex"?l:Bi(l)}function CM(){return Wi(af.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),ic=BigInt(1),OM=BigInt(2),TM=BigInt(7),BM=BigInt(256),RM=BigInt(113),CO=[],FO=[],OO=[];for(let e=0,t=ic,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],CO.push(2*(5*o+n)),FO.push((e+1)*(e+2)/2%64);let s=FM;for(let u=0;u<7;u++)t=(t<<ic^(t>>TM)*RM)%BM,t&OM&&(s^=ic<<(ic<<BigInt(u))-ic);OO.push(s)}const TO=V4(OO,!0),MM=TO[0],UM=TO[1],rI=(e,t,n)=>n>32?Z4(e,t,n):W4(e,t,n),nI=(e,t,n)=>n>32?J4(e,t,n):X4(e,t,n);function jM(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=rI(f,p,1)^n[c],g=nI(f,p,1)^n[c+1];for(let m=0;m<50;m+=10)e[l+m]^=y,e[l+m+1]^=g}let s=e[2],u=e[3];for(let l=0;l<24;l++){const c=FO[l],h=rI(s,u,c),f=nI(s,u,c),p=CO[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]^=MM[o],e[1]^=UM[o]}ju(n)}class sw extends ew{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,xc(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=I4(this.state)}clone(){return this._cloneInto()}keccak(){q2(this.state32),jM(this.state32,this.rounds),q2(this.state32),this.posOut=0,this.pos=0}update(t){Uu(this),t=rp(t),wa(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){Uu(this,!1),wa(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 xc(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,ju(this.state)}_cloneInto(t){const{blockLen:n,suffix:o,outputLen:s,rounds:u,enableXOF:l}=this;return t||(t=new sw(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 NM=(e,t,n)=>JF(()=>new sw(t,e,n)),DM=NM(1,136,256/8);function Vn(e,t){const n=t||"hex",o=DM(Po(e,{strict:!1})?ow(e):e);return n==="bytes"?o:Wi(o)}const Am=new uf(8192);function lf(e,t){if(Am.has(`${e}.${t}`))return Am.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),o=Vn(IO(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 Am.set(`${e}.${t}`,u),u}function PM(e,t){if(!Hr(e,{strict:!1}))throw new An({address:e});return lf(e,t)}const kM=/^0x[a-fA-F0-9]{40}$/,wm=new uf(8192);function Hr(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if(wm.has(o))return wm.get(o);const s=kM.test(e)?e.toLowerCase()===e?!0:n?lf(e)===e:!0:!1;return wm.set(o,s),s}function LM(e){if(typeof e=="string"){if(!Hr(e,{strict:!1}))throw new An({address:e});return{address:e,type:"json-rpc"}}if(!Hr(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 BO(e){const t=Vn(`0x${e.substring(4)}`).substring(26);return lf(`0x${t}`)}let vm=!1;async function cf({hash:e,privateKey:t,to:n="object"}){const{r:o,s,recovery:u}=af.sign(e.slice(2),t.slice(2),{lowS:!0,extraEntropy:Po(vm,{strict:!1})?Bi(vm):vm}),l={r:it(o,{size:32}),s:it(s,{size:32}),v:u?28n:27n,yParity:u};return n==="bytes"||n==="hex"?_M({...l,to:n}):l}function Zi(e){return typeof e[0]=="string"?Rs(e):zM(e)}function zM(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 iI extends Ze{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class $M extends Ze{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class qM extends Ze{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const HM={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 qM({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new $M({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new iI({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 iI({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 aw(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(HM);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function va(e,t="hex"){const n=RO(e),o=aw(new Uint8Array(n.length));return n.encode(o),t==="hex"?dn(o.bytes):o.bytes}function RO(e){return Array.isArray(e)?QM(e.map(t=>RO(t))):GM(e)}function QM(e){const t=e.reduce((s,u)=>s+u.length,0),n=MO(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 GM(e){const t=typeof e=="string"?Bi(e):e,n=MO(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 MO(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 UO(e){const{chainId:t,nonce:n,to:o}=e,s=e.contractAddress??e.address,u=Vn(Rs(["0x05",va([t?it(t):"0x",s,n?it(n):"0x"])]));return o==="bytes"?Bi(u):u}async function KM(e){const{chainId:t,nonce:n,privateKey:o,to:s="object"}=e,u=e.contractAddress??e.address,l=await cf({hash:UO({address:u,chainId:t,nonce:n}),privateKey:o,to:s});return s==="object"?{address:u,chainId:t,nonce:n,...l}:l}const YM=`Ethereum Signed Message:
40
- `;function VM(e){const t=typeof e=="string"?Nu(e):typeof e.raw=="string"?e.raw:dn(e.raw),n=Nu(`${YM}${pr(t)}`);return Zi([n,t])}function WM(e,t){return Vn(VM(e),t)}async function XM({message:e,privateKey:t}){return await cf({hash:WM(e),privateKey:t,to:"hex"})}const ZM={gwei:9,wei:18},JM={ether:-9,wei:9};function jO(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 NO(e,t="wei"){return jO(e,ZM[t])}function Ti(e,t="wei"){return jO(e,JM[t])}function op(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 eU 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 tU extends Ze{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class rU extends Ze{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",op(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 nU 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 iU 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 m=op({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"&&`${NO(g)} ${((w=s==null?void 0:s.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:u,gas:l,gasPrice:typeof c<"u"&&`${Ti(c)} gwei`,maxFeePerGas:typeof h<"u"&&`${Ti(h)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Ti(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class DO extends Ze{constructor({blockHash:t,blockNumber:n,blockTag:o,hash:s,index:u}){let l="Transaction";o&&u!==void 0&&(l=`Transaction at block time "${o}" at index "${u}"`),t&&u!==void 0&&(l=`Transaction at block hash "${t}" at index "${u}"`),n&&u!==void 0&&(l=`Transaction at block number "${n}" at index "${u}"`),s&&(l=`Transaction with hash "${s}"`),super(`${l} could not be found.`,{name:"TransactionNotFoundError"})}}class PO extends Ze{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class kO extends Ze{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class oU extends Ze{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function sU(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?Wi(o):"0x",l,s?Wi(s):"0x",...ff({},u)])}return t}function uw(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=>Bi(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 lw(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=>Bi(l)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(l=>Bi(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 xb=hO;function aU(e,t){return xb(Po(e,{strict:!1})?ow(e):e)}function uU(e){const{commitment:t,version:n=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),s=aU(t);return s.set([n],0),o==="bytes"?s:dn(s)}function LO(e){const{commitments:t,version:n}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const u of t)s.push(uU({commitment:u,to:o,version:n}));return s}const oI=6,zO=32,cw=4096,$O=zO*cw,sI=$O*oI-1-1*cw*oI,qO=1;class lU extends Ze{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class HO extends Ze{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class cU extends Ze{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class fU extends Ze{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${qO}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function hU(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?Bi(e.data):e.data,o=pr(n);if(!o)throw new HO;if(o>sI)throw new lU({maxSize:sI,size:o});const s=[];let u=!0,l=0;for(;u;){const c=aw(new Uint8Array($O));let h=0;for(;h<cw;){const f=n.slice(l,l+(zO-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 QO(e){const{data:t,kzg:n,to:o}=e,s=e.blobs??hU({data:t,to:o}),u=e.commitments??uw({blobs:s,kzg:n,to:o}),l=e.proofs??lw({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 sp=2n**256n-1n;class dU 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 pU 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 ap extends Ze{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Iu 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(Iu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Iu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class xa extends Ze{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ti(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(xa,"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 Eb extends Ze{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ti(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Eb,"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 Sb 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(Sb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class Ib 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(Ib,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class _b 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(_b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class Cb 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(Cb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class Fb 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(Fb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Ob 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(Ob,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class Tb extends Ze{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(Tb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ic extends Ze{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Ti(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${Ti(o)} gwei`:""}).`].join(`
46
- `),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ic,"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 fw extends Ze{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function _c(e,t,n,{strict:o}={}){return Po(e,{strict:!1})?Bb(e,t,n,{strict:o}):YO(e,t,n,{strict:o})}function GO(e,t){if(typeof t=="number"&&t>0&&t>pr(e)-1)throw new xO({offset:t,position:"start",size:pr(e)})}function KO(e,t,n){if(typeof t=="number"&&typeof n=="number"&&pr(e)!==n-t)throw new xO({offset:n,position:"end",size:pr(e)})}function YO(e,t,n,{strict:o}={}){GO(e,t);const s=e.slice(t,n);return o&&KO(s,t,n),s}function Bb(e,t,n,{strict:o}={}){GO(e,t);const s=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return o&&KO(s,t,n),s}function yU(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:o}=n,s=n.address;if(!Hr(s))throw new An({address:s});if(o<0)throw new ap({chainId:o})}hw(e)}function gU(e){const{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new HO;for(const n of t){const o=pr(n),s=Xi(_c(n,0,1));if(o!==32)throw new cU({hash:n,size:o});if(s!==qO)throw new fU({hash:n,version:s})}}hw(e)}function hw(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:o,to:s}=e;if(t<=0)throw new ap({chainId:t});if(s&&!Hr(s))throw new An({address:s});if(o&&o>sp)throw new xa({maxFeePerGas:o});if(n&&o&&n>o)throw new Ic({maxFeePerGas:o,maxPriorityFeePerGas:n})}function mU(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:u}=e;if(t<=0)throw new ap({chainId:t});if(u&&!Hr(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>sp)throw new xa({maxFeePerGas:o})}function bU(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:o,maxFeePerGas:s,to:u}=e;if(u&&!Hr(u))throw new An({address:u});if(typeof t<"u"&&t<=0)throw new ap({chainId:t});if(n||s)throw new Ze("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>sp)throw new xa({maxFeePerGas:o})}function VO(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 rU({transaction:e})}function up(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 nU({storageKey:s[u]});if(!Hr(o,{strict:!1}))throw new An({address:o});t.push([o,s])}return t}function AU(e,t){const n=VO(e);return n==="eip1559"?xU(e,t):n==="eip2930"?EU(e,t):n==="eip4844"?vU(e,t):n==="eip7702"?wU(e,t):SU(e,t)}function wU(e,t){const{authorizationList:n,chainId:o,gas:s,nonce:u,to:l,value:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;yU(e);const g=up(p),m=sU(n);return Rs(["0x04",va([it(o),u?it(u):"0x",f?it(f):"0x",h?it(h):"0x",s?it(s):"0x",l??"0x",c?it(c):"0x",y??"0x",g,m,...ff(e,t)])])}function vU(e,t){const{chainId:n,gas:o,nonce:s,to:u,value:l,maxFeePerBlobGas:c,maxFeePerGas:h,maxPriorityFeePerGas:f,accessList:p,data:y}=e;gU(e);let g=e.blobVersionedHashes,m=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof m>"u")){const I=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(z=>dn(z)),R=e.kzg,T=uw({blobs:I,kzg:R});if(typeof g>"u"&&(g=LO({commitments:T})),typeof m>"u"){const z=lw({blobs:I,commitments:T,kzg:R});m=QO({blobs:I,commitments:T,proofs:z})}}const w=up(p),F=[it(n),s?it(s):"0x",f?it(f):"0x",h?it(h):"0x",o?it(o):"0x",u??"0x",l?it(l):"0x",y??"0x",w,c?it(c):"0x",g??[],...ff(e,t)],S=[],M=[],A=[];if(m)for(let I=0;I<m.length;I++){const{blob:R,commitment:T,proof:z}=m[I];S.push(R),M.push(T),A.push(z)}return Rs(["0x03",va(m?[F,S,M,A]:F)])}function xU(e,t){const{chainId:n,gas:o,nonce:s,to:u,value:l,maxFeePerGas:c,maxPriorityFeePerGas:h,accessList:f,data:p}=e;hw(e);const y=up(f),g=[it(n),s?it(s):"0x",h?it(h):"0x",c?it(c):"0x",o?it(o):"0x",u??"0x",l?it(l):"0x",p??"0x",y,...ff(e,t)];return Rs(["0x02",va(g)])}function EU(e,t){const{chainId:n,gas:o,data:s,nonce:u,to:l,value:c,accessList:h,gasPrice:f}=e;mU(e);const p=up(h),y=[it(n),u?it(u):"0x",f?it(f):"0x",o?it(o):"0x",l??"0x",c?it(c):"0x",s??"0x",p,...ff(e,t)];return Rs(["0x01",va(y)])}function SU(e,t){const{chainId:n=0,gas:o,data:s,nonce:u,to:l,value:c,gasPrice:h}=e;bU(e);let f=[u?it(u):"0x",h?it(h):"0x",o?it(o):"0x",l??"0x",c?it(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 m=27n+(t.v===27n?0n:1n);if(t.v!==m)throw new tU({v:t.v});return m})(),y=Bs(t.r),g=Bs(t.s);f=[...f,it(p),y==="0x00"?"0x":y,g==="0x00"?"0x":g]}else n>0&&(f=[...f,it(n),"0x","0x"]);return va(f)}function ff(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=Bs(n.r),l=Bs(n.s);return[typeof s=="number"?s?it(1):"0x":o===0n?"0x":o===1n?it(1):o===27n?"0x":it(1),u==="0x00"?"0x":u,l==="0x00"?"0x":l]}async function IU(e){const{privateKey:t,transaction:n,serializer:o=AU}=e,s=n.type==="eip4844"?{...n,sidecars:!1}:n,u=await cf({hash:Vn(await o(s)),privateKey:t});return await o(n,u)}function Du(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new DU(e.type);return`${e.name}(${dw(e.inputs,{includeName:t})})`}function dw(e,{includeName:t=!1}={}){return e?e.map(n=>_U(n,{includeName:t})).join(t?", ":","):""}function _U(e,{includeName:t}){return e.type.startsWith("tuple")?`(${dw(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class CU 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 aI 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 FU 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: (${dw(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 pw extends Ze{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class OU 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 TU extends Ze{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${pr(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class BU 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 WO 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 uI 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 RU 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 MU extends Ze{constructor({expectedSize:t,givenSize:n}){super(`Expected bytes${t}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class UU 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 jU 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 NU extends Ze{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
56
- `),{name:"InvalidArrayError"})}}class DU extends Ze{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
57
- `),{name:"InvalidDefinitionTypeError"})}}const PU=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,XO=/^(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 lp(e,t){if(e.length!==t.length)throw new BU({expectedLength:e.length,givenLength:t.length});const n=kU({params:e,values:t}),o=gw(n);return o.length===0?"0x":o}function kU({params:e,values:t}){const n=[];for(let o=0;o<e.length;o++)n.push(yw({param:e[o],value:t[o]}));return n}function yw({param:e,value:t}){const n=mw(e.type);if(n){const[o,s]=n;return zU(t,{length:o,param:{...e,type:s}})}if(e.type==="tuple")return GU(t,{param:e});if(e.type==="address")return LU(t);if(e.type==="bool")return qU(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const o=e.type.startsWith("int"),[,,s="256"]=XO.exec(e.type)??[];return HU(t,{signed:o,size:Number(s)})}if(e.type.startsWith("bytes"))return $U(t,{param:e});if(e.type==="string")return QU(t);throw new UU(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function gw(e){let t=0;for(let u=0;u<e.length;u++){const{dynamic:l,encoded:c}=e[u];l?t+=32:t+=pr(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(it(t+s,{size:32})),o.push(c),s+=pr(c)):n.push(c)}return Zi([...n,...o])}function LU(e){if(!Hr(e))throw new An({address:e});return{dynamic:!1,encoded:Ts(e.toLowerCase())}}function zU(e,{length:t,param:n}){const o=t===null;if(!Array.isArray(e))throw new NU(e);if(!o&&e.length!==t)throw new OU({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let s=!1;const u=[];for(let l=0;l<e.length;l++){const c=yw({param:n,value:e[l]});c.dynamic&&(s=!0),u.push(c)}if(o||s){const l=gw(u);if(o){const c=it(u.length,{size:32});return{dynamic:!0,encoded:u.length>0?Zi([c,l]):c}}if(s)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:Zi(u.map(({encoded:l})=>l))}}function $U(e,{param:t}){const[,n]=t.type.split("bytes"),o=pr(e);if(!n){let s=e;return o%32!==0&&(s=Ts(s,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:Zi([Ts(it(o,{size:32})),s])}}if(o!==Number.parseInt(n,10))throw new TU({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:Ts(e,{dir:"right"})}}function qU(e){if(typeof e!="boolean")throw new Ze(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Ts(SO(e))}}function HU(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 vO({max:o.toString(),min:s.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:it(e,{size:32,signed:t})}}function QU(e){const t=Nu(e),n=Math.ceil(pr(t)/32),o=[];for(let s=0;s<n;s++)o.push(Ts(_c(t,s*32,(s+1)*32),{dir:"right"}));return{dynamic:!0,encoded:Zi([Ts(it(pr(t),{size:32})),...o])}}function GU(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=yw({param:u,value:e[l]});o.push(c),c.dynamic&&(n=!0)}return{dynamic:n,encoded:n?gw(o):Zi(o.map(({encoded:s})=>s))}}function mw(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const Mn=(e,t,n)=>JSON.stringify(e,(o,s)=>typeof s=="bigint"?s.toString():s,n);class KU extends Ze{constructor({domain:t}){super(`Invalid domain "${Mn(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class YU 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 VU extends Ze{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function WU(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:m}=y;m==="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 Mn({domain:l,message:c,primaryType:o,types:s})}function ZO(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(XO);if(g&&(typeof y=="number"||typeof y=="bigint")){const[F,S,M]=g;it(y,{signed:S==="int",size:Number.parseInt(M,10)/8})}if(p==="address"&&typeof y=="string"&&!Hr(y))throw new An({address:y});const m=p.match(PU);if(m){const[F,S]=m;if(S&&pr(y)!==Number.parseInt(S,10))throw new MU({expectedSize:Number.parseInt(S,10),givenSize:pr(y)})}const w=s[p];w&&(XU(p),u(w,y))}};if(s.EIP712Domain&&t){if(typeof t!="object")throw new KU({domain:t});u(s.EIP712Domain,t)}if(o!=="EIP712Domain")if(s[o])u(s[o],n);else throw new YU({primaryType:o,types:s})}function JO({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 XU(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new VU({type:e})}function ZU(e){const{domain:t={},message:n,primaryType:o}=e,s={EIP712Domain:JO({domain:t}),...e.types};ZO({domain:t,message:n,primaryType:o,types:s});const u=["0x1901"];return t&&u.push(JU({domain:t,types:s})),o!=="EIP712Domain"&&u.push(eT({data:n,primaryType:o,types:s})),Vn(Zi(u))}function JU({domain:e,types:t}){return eT({data:e,primaryType:"EIP712Domain",types:t})}function eT({data:e,primaryType:t,types:n}){const o=tT({data:e,primaryType:t,types:n});return Vn(o)}function tT({data:e,primaryType:t,types:n}){const o=[{type:"bytes32"}],s=[ej({primaryType:t,types:n})];for(const u of n[t]){const[l,c]=nT({types:n,name:u.name,type:u.type,value:e[u.name]});o.push(l),s.push(c)}return lp(o,s)}function ej({primaryType:e,types:t}){const n=Wi(tj({primaryType:e,types:t}));return Vn(n)}function tj({primaryType:e,types:t}){let n="";const o=rT({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 rT({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])rT({primaryType:u.type,types:t},n);return n}function nT({types:e,name:t,type:n,value:o}){if(e[n]!==void 0)return[{type:"bytes32"},Vn(tT({data:o,primaryType:n,types:e}))];if(n==="bytes")return o=`0x${(o.length%2?"0":"")+o.slice(2)}`,[{type:"bytes32"},Vn(o)];if(n==="string")return[{type:"bytes32"},Vn(Wi(o))];if(n.lastIndexOf("]")===n.length-1){const s=n.slice(0,n.lastIndexOf("[")),u=o.map(l=>nT({name:t,type:s,types:e,value:l}));return[{type:"bytes32"},Vn(lp(u.map(([l])=>l),u.map(([,l])=>l)))]}return[{type:n},o]}async function rj(e){const{privateKey:t,...n}=e;return await cf({hash:ZU(n),privateKey:t,to:"hex"})}function xs(e,t={}){const{nonceManager:n}=t,o=Wi(af.getPublicKey(e.slice(2),!1)),s=BO(o);return{...LM({address:s,nonceManager:n,async sign({hash:l}){return cf({hash:l,privateKey:e,to:"hex"})},async signAuthorization(l){return KM({...l,privateKey:e})},async signMessage({message:l}){return XM({message:l,privateKey:e})},async signTransaction(l,{serializer:c}={}){return IU({privateKey:e,transaction:l,serializer:c})},async signTypedData(l){return rj({...l,privateKey:e})}}),publicKey:o,source:"privateKey"}}function wn(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}function nj(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const lI=/^tuple(?<array>(\[(\d*)\])*)$/;function Rb(e){let t=e.type;if(lI.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+=Rb(u),s<n-1&&(t+=", ")}const o=nj(lI,e.type);return t+=`)${(o==null?void 0:o.array)??""}`,Rb({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function oc(e){let t="";const n=e.length;for(let o=0;o<n;o++){const s=e[o];t+=Rb(s),o!==n-1&&(t+=", ")}return t}function ij(e){var t;return e.type==="function"?`function ${e.name}(${oc(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${oc(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${oc(e.inputs)})`:e.type==="error"?`error ${e.name}(${oc(e.inputs)})`:e.type==="constructor"?`constructor(${oc(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function Yt(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 oj=e=>Vn(ow(e));function sj(e){return oj(e)}function aj(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 uj=e=>{const t=typeof e=="string"?e:ij(e);return aj(t)};function iT(e){return sj(uj(e))}const lj=iT,bw=e=>_c(iT(e),0,4);function oT(e){const{abi:t,args:n=[],name:o}=e,s=Po(o,{strict:!1}),u=t.filter(c=>s?c.type==="function"?bw(c)===o:c.type==="event"?lj(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?Mb(f,y):!1})){if(l&&"inputs"in l&&l.inputs){const f=sT(c.inputs,l.inputs,n);if(f)throw new RU({abiItem:c,type:f[0]},{abiItem:l,type:f[1]})}l=c}}return l||u[0]}function Mb(e,t){const n=typeof e,o=t.type;switch(o){case"address":return Hr(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)=>Mb(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=>Mb(s,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function sT(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 sT(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")?Hr(n[o],{strict:!1}):l.includes("address")&&l.includes("bytes")?Hr(n[o],{strict:!1}):!1)return l}}const cI="/docs/contract/encodeFunctionData";function cj(e){const{abi:t,args:n,functionName:o}=e;let s=t[0];if(o){const u=oT({abi:t,args:n,name:o});if(!u)throw new uI(o,{docsPath:cI});s=u}if(s.type!=="function")throw new uI(void 0,{docsPath:cI});return{abi:[s],functionName:bw(Du(s))}}function aT(e){const{args:t}=e,{abi:n,functionName:o}=(()=>{var c;return e.abi.length===1&&((c=e.functionName)!=null&&c.startsWith("0x"))?e:cj(e)})(),s=n[0],u=o,l="inputs"in s&&s.inputs?lp(s.inputs,t??[]):void 0;return Rs([u,l??"0x"])}const fj={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."},hj={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},dj={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function pj(e,t={}){typeof t.size<"u"&&eo(e,{size:t.size});const n=dn(e,t);return Ri(n,t)}function yj(e,t={}){let n=e;if(typeof t.size<"u"&&(eo(n,{size:t.size}),n=Bs(n)),n.length>1||n[0]>1)throw new bM(n);return!!n[0]}function Do(e,t={}){typeof t.size<"u"&&eo(e,{size:t.size});const n=dn(e,t);return Xi(n,t)}function gj(e,t={}){let n=e;return typeof t.size<"u"&&(eo(n,{size:t.size}),n=Bs(n,{dir:"right"})),new TextDecoder().decode(n)}function mj(e,t){const n=typeof t=="string"?Bi(t):t,o=aw(n);if(pr(n)===0&&e.length>0)throw new pw;if(pr(t)&&pr(t)<32)throw new FU({data:typeof t=="string"?t:dn(t),params:e,size:pr(t)});let s=0;const u=[];for(let l=0;l<e.length;++l){const c=e[l];o.setPosition(s);const[h,f]=Tu(o,c,{staticPosition:0});s+=f,u.push(h)}return u}function Tu(e,t,{staticPosition:n}){const o=mw(t.type);if(o){const[s,u]=o;return Aj(e,{...t,type:u},{length:s,staticPosition:n})}if(t.type==="tuple")return Ej(e,t,{staticPosition:n});if(t.type==="address")return bj(e);if(t.type==="bool")return wj(e);if(t.type.startsWith("bytes"))return vj(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return xj(e,t);if(t.type==="string")return Sj(e,{staticPosition:n});throw new jU(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const fI=32,Ub=32;function bj(e){const t=e.readBytes(32);return[lf(dn(YO(t,-20))),32]}function Aj(e,t,{length:n,staticPosition:o}){if(!n){const l=Do(e.readBytes(Ub)),c=o+l,h=c+fI;e.setPosition(c);const f=Do(e.readBytes(fI)),p=Cc(t);let y=0;const g=[];for(let m=0;m<f;++m){e.setPosition(h+(p?m*32:y));const[w,F]=Tu(e,t,{staticPosition:h});y+=F,g.push(w)}return e.setPosition(o+32),[g,32]}if(Cc(t)){const l=Do(e.readBytes(Ub)),c=o+l,h=[];for(let f=0;f<n;++f){e.setPosition(c+f*32);const[p]=Tu(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]=Tu(e,t,{staticPosition:o+s});s+=h,u.push(c)}return[u,s]}function wj(e){return[yj(e.readBytes(32),{size:32}),32]}function vj(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 xj(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?pj(s,{signed:n}):Do(s,{signed:n}),32]}function Ej(e,t,{staticPosition:n}){const o=t.components.length===0||t.components.some(({name:l})=>!l),s=o?[]:{};let u=0;if(Cc(t)){const l=Do(e.readBytes(Ub)),c=n+l;for(let h=0;h<t.components.length;++h){const f=t.components[h];e.setPosition(c+u);const[p,y]=Tu(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]=Tu(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=gj(Bs(u));return e.setPosition(t+32),[l,32]}function Cc(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(Cc);const n=mw(e.type);return!!(n&&Cc({...e,type:n[1]}))}function Ij(e){const{abi:t,data:n}=e,o=_c(n,0,4);if(o==="0x")throw new pw;const u=[...t||[],hj,dj].find(l=>l.type==="error"&&o===bw(Du(l)));if(!u)throw new WO(o,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?mj(u.inputs,_c(n,4)):void 0,errorName:u.name}}function uT({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"?Mn(t[u]):t[u]}`).join(", ")})`}class _j extends Ze{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class Cj extends Ze{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}const Fj=e=>e,Aw=e=>e;class Oj extends Ze{constructor(t,{abi:n,args:o,contractAddress:s,docsPath:u,functionName:l,sender:c}){const h=oT({abi:n,args:o,name:l}),f=h?uT({abiItem:h,args:o,includeFunctionName:!1,includeName:!1}):void 0,p=h?Du(h,{includeName:!0}):void 0,y=op({address:s&&Fj(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 Tj extends Ze{constructor({abi:t,data:n,functionName:o,message:s}){let u,l,c,h;if(n&&n!=="0x")try{l=Ij({abi:t,data:n});const{abiItem:p,errorName:y,args:g}=l;if(y==="Error")h=g[0];else if(y==="Panic"){const[m]=g;h=fj[m]}else{const m=p?Du(p,{includeName:!0}):void 0,w=p&&g?uT({abiItem:p,args:g,includeFunctionName:!1,includeName:!1}):void 0;c=[m?`Error: ${m}`:"",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 WO&&(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 Bj 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 Rj 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 bc 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: ${Aw(l)}`,t&&`Request body: ${Mn(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 ww extends Ze{constructor({body:t,error:n,url:o}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Aw(o)}`,`Request body: ${Mn(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 hI extends Ze{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${Aw(n)}`,`Request body: ${Mn(t)}`],name:"TimeoutError"})}}const Mj=-1;class Pn 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 ww?t.code:n??Mj}}class ri extends Pn{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class Fc extends Pn{constructor(t){super(t,{code:Fc.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Fc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Oc extends Pn{constructor(t){super(t,{code:Oc.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Oc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Tc extends Pn{constructor(t,{method:n}={}){super(t,{code:Tc.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(Tc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Bc extends Pn{constructor(t){super(t,{code:Bc.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
59
- `)})}}Object.defineProperty(Bc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ea extends Pn{constructor(t){super(t,{code:Ea.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Ea,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Rc extends Pn{constructor(t){super(t,{code:Rc.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
60
- `)})}}Object.defineProperty(Rc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class Mc extends Pn{constructor(t){super(t,{code:Mc.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(Mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Uc extends Pn{constructor(t){super(t,{code:Uc.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Uc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class jc extends Pn{constructor(t){super(t,{code:jc.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(jc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class ha extends Pn{constructor(t,{method:n}={}){super(t,{code:ha.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`})}}Object.defineProperty(ha,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Pu extends Pn{constructor(t){super(t,{code:Pu.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Pu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Nc extends Pn{constructor(t){super(t,{code:Nc.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Nc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Bu extends ri{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 Dc extends ri{constructor(t){super(t,{code:Dc.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(Dc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Pc extends ri{constructor(t,{method:n}={}){super(t,{code:Pc.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(Pc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class kc extends ri{constructor(t){super(t,{code:kc.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(kc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Lc extends ri{constructor(t){super(t,{code:Lc.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(Lc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class zc extends ri{constructor(t){super(t,{code:zc.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(zc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ku extends ri{constructor(t){super(t,{code:ku.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(ku,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class $c extends ri{constructor(t){super(t,{code:$c.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty($c,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class qc extends ri{constructor(t){super(t,{code:qc.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(qc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class Hc extends ri{constructor(t){super(t,{code:Hc.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(Hc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class Qc extends ri{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 Gc extends ri{constructor(t){super(t,{code:Gc.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(Gc,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class Lu extends ri{constructor(t){super(t,{code:Lu.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(Lu,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class Uj extends Pn{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}const jj=3;function Nj(e,{abi:t,address:n,args:o,docsPath:s,functionName:u,sender:l}){const c=e instanceof Rj?e:e instanceof Ze?e.walk(w=>"data"in w)||e.walk():{},{code:h,data:f,details:p,message:y,shortMessage:g}=c,m=e instanceof pw?new Bj({functionName:u}):[jj,Ea.code].includes(h)&&(f||p||y||g)?new Tj({abi:t,data:typeof f=="object"?f.data:f,functionName:u,message:c instanceof ww?p:g??y}):e;return new Oj(m,{abi:t,args:o,contractAddress:n,docsPath:s,functionName:u,sender:l})}const Dj="modulepreload",Pj=function(e){return"/"+e},dI={},kj=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=Pj(f),f in dI)return;dI[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":Dj,p||(g.as="script"),g.crossOrigin="",g.href=f,h&&g.setAttribute("nonce",h),document.head.appendChild(g),p)return new Promise((m,w)=>{g.addEventListener("load",m),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 Lj({hash:e,signature:t}){const n=Po(e)?e:Wi(e),{secp256k1:o}=await kj(async()=>{const{secp256k1:l}=await Promise.resolve().then(()=>mM);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,m=Number(g??y),w=pI(m);return new o.Signature(Ri(f),Ri(p)).addRecoveryBit(w)}const l=Po(t)?t:Wi(t);if(pr(l)!==65)throw new Error("invalid signature length");const c=Xi(`0x${l.slice(130)}`),h=pI(c);return o.Signature.fromCompact(l.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function pI(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 zj({hash:e,signature:t}){return BO(await Lj({hash:e,signature:t}))}async function vw(e){const{authorization:t,signature:n}=e;return zj({hash:UO(t),signature:n??t})}class $j 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 m=op({from:n==null?void 0:n.address,to:y,value:typeof g<"u"&&`${NO(g)} ${((w=s==null?void 0:s.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:u,gas:l,gasPrice:typeof c<"u"&&`${Ti(c)} gwei`,maxFeePerGas:typeof h<"u"&&`${Ti(h)} gwei`,maxPriorityFeePerGas:typeof f<"u"&&`${Ti(f)} gwei`,nonce:p});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}function lT(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof Ze?e.walk(s=>(s==null?void 0:s.code)===Iu.code):e;return o instanceof Ze?new Iu({cause:e,message:o.details}):Iu.nodeMessage.test(n)?new Iu({cause:e,message:e.details}):xa.nodeMessage.test(n)?new xa({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Eb.nodeMessage.test(n)?new Eb({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Sb.nodeMessage.test(n)?new Sb({cause:e,nonce:t==null?void 0:t.nonce}):Ib.nodeMessage.test(n)?new Ib({cause:e,nonce:t==null?void 0:t.nonce}):_b.nodeMessage.test(n)?new _b({cause:e,nonce:t==null?void 0:t.nonce}):Cb.nodeMessage.test(n)?new Cb({cause:e}):Fb.nodeMessage.test(n)?new Fb({cause:e,gas:t==null?void 0:t.gas}):Ob.nodeMessage.test(n)?new Ob({cause:e,gas:t==null?void 0:t.gas}):Tb.nodeMessage.test(n)?new Tb({cause:e}):Ic.nodeMessage.test(n)?new Ic({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new fw({cause:e})}function qj(e,{docsPath:t,...n}){const o=(()=>{const s=lT(e,n);return s instanceof fw?e:s})();return new $j(o,{docsPath:t,...n})}function xw(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 Hj={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function cp(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=Qj(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(o=>dn(o)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=it(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=it(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=it(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=it(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=it(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=it(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Hj[e.type]),typeof e.value<"u"&&(n.value=it(e.value)),n}function Qj(e){return e.map(t=>({address:t.address,r:t.r?it(BigInt(t.r)):t.r,s:t.s?it(BigInt(t.s)):t.s,chainId:it(t.chainId),nonce:it(t.nonce),...typeof t.yParity<"u"?{yParity:it(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:it(t.v)}:{}}))}function yI(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:o})=>{if(n.length!==66)throw new eI({size:n.length,targetSize:66,type:"hex"});if(o.length!==66)throw new eI({size:o.length,targetSize:66,type:"hex"});return t[n]=o,t},{})}function Gj(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=it(t)),n!==void 0&&(l.nonce=it(n)),o!==void 0&&(l.state=yI(o)),s!==void 0){if(l.state)throw new Cj;l.stateDiff=yI(s)}return l}function Kj(e){if(!e)return;const t={};for(const{address:n,...o}of e){if(!Hr(n,{strict:!1}))throw new An({address:n});if(t[n])throw new _j({address:n});t[n]=Gj(o)}return t}function hf(e){const{account:t,gasPrice:n,maxFeePerGas:o,maxPriorityFeePerGas:s,to:u}=e,l=t?wn(t):void 0;if(l&&!Hr(l.address))throw new An({address:l.address});if(u&&!Hr(u))throw new An({address:u});if(typeof n<"u"&&(typeof o<"u"||typeof s<"u"))throw new eU;if(o&&o>sp)throw new xa({maxFeePerGas:o});if(s&&o&&s>o)throw new Ic({maxFeePerGas:o,maxPriorityFeePerGas:s})}class Yj extends Ze{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Ew extends Ze{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class Vj extends Ze{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Ti(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class cT 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 fT={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function hT(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?Xi(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?Xi(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?fT[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&&(n.authorizationList=Wj(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function Wj(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 Xj(e,t){const n=(e.transactions??[]).map(o=>typeof o=="string"?o:hT(o));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:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function Kc(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?it(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 cT({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)||Xj)(c,"getBlock")}async function dT(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Zj(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 Yt(e,Kc,"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 Ri(h)}catch{const[c,h]=await Promise.all([n?Promise.resolve(n):Yt(e,Kc,"getBlock")({}),Yt(e,dT,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new Ew;const f=h-c.baseFeePerGas;return f<0n?0n:f}}async function gI(e,t){var g,m;const{block:n,chain:o=e.chain,request:s,type:u="eip1559"}=t||{},l=await(async()=>{var w,F;return typeof((w=o==null?void 0:o.fees)==null?void 0:w.baseFeeMultiplier)=="function"?o.fees.baseFeeMultiplier({block:n,client:e,request:s}):((F=o==null?void 0:o.fees)==null?void 0:F.baseFeeMultiplier)??1.2})();if(l<1)throw new Yj;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 Yt(e,Kc,"getBlock")({});if(typeof((m=o==null?void 0:o.fees)==null?void 0:m.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 Ew;const w=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await Zj(e,{block:p,chain:o,request:s}),F=f(p.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??F+w,maxPriorityFeePerGas:w}}return{gasPrice:(s==null?void 0:s.gasPrice)??f(await Yt(e,dT,"getGasPrice")({}))}}async function Yu(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return Xi(t)}const Sw=["blobVersionedHashes","chainId","fees","gas","nonce","type"],mI=new Map;async function fp(e,t){const{account:n=e.account,blobs:o,chain:s,gas:u,kzg:l,nonce:c,nonceManager:h,parameters:f=Sw,type:p}=t,y=n&&wn(n),g={...t,...y?{from:y==null?void 0:y.address}:{}};let m;async function w(){return m||(m=await Yt(e,Kc,"getBlock")({blockTag:"latest"}),m)}let F;async function S(){return F||(s?s.id:typeof t.chainId<"u"?t.chainId:(F=await Yt(e,Yu,"getChainId")({}),F))}if(f.includes("nonce")&&typeof c>"u"&&y)if(h){const M=await S();g.nonce=await h.consume({address:y.address,chainId:M,client:e})}else g.nonce=await Yt(e,_O,"getTransactionCount")({address:y.address,blockTag:"pending"});if((f.includes("blobVersionedHashes")||f.includes("sidecars"))&&o&&l){const M=uw({blobs:o,kzg:l});if(f.includes("blobVersionedHashes")){const A=LO({commitments:M,to:"hex"});g.blobVersionedHashes=A}if(f.includes("sidecars")){const A=lw({blobs:o,commitments:M,kzg:l}),I=QO({blobs:o,commitments:M,proofs:A,to:"hex"});g.sidecars=I}}if(f.includes("chainId")&&(g.chainId=await S()),(f.includes("fees")||f.includes("type"))&&typeof p>"u")try{g.type=VO(g)}catch{let M=mI.get(e.uid);if(typeof M>"u"){const A=await w();M=typeof(A==null?void 0:A.baseFeePerGas)=="bigint",mI.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 gI(e,{block:M,chain:s,request:g});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<I)throw new Vj({maxPriorityFeePerGas:I});g.maxPriorityFeePerGas=I,g.maxFeePerGas=A}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new Ew;if(typeof t.gasPrice>"u"){const M=await w(),{gasPrice:A}=await gI(e,{block:M,chain:s,request:g,type:"legacy"});g.gasPrice=A}}return f.includes("gas")&&typeof u>"u"&&(g.gas=await Yt(e,Jj,"estimateGas")({...g,account:y,prepare:(y==null?void 0:y.type)==="local"?[]:["blobVersionedHashes"]})),hf(g),delete g.parameters,g}async function Jj(e,t){var l,c,h;const{account:n=e.account,prepare:o=!0}=t,s=n?wn(n):void 0,u=(()=>{if(Array.isArray(o))return o;if((s==null?void 0:s.type)!=="local")return["blobVersionedHashes"]})();try{const{accessList:f,authorizationList:p,blobs:y,blobVersionedHashes:g,blockNumber:m,blockTag:w,data:F,gas:S,gasPrice:M,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:R,nonce:T,value:z,stateOverride:k,...L}=o?await fp(e,{...t,parameters:u}):t,j=(typeof m=="bigint"?it(m):void 0)||w,H=Kj(k),P=await(async()=>{if(L.to)return L.to;if(p&&p.length>0)return await vw({authorization:p[0]}).catch(()=>{throw new Ze("`to` is required. Could not infer from `authorizationList`")})})();hf(t);const te=(h=(c=(l=e.chain)==null?void 0:l.formatters)==null?void 0:c.transactionRequest)==null?void 0:h.format,oe=(te||cp)({...xw(L,{format:te}),account:s,accessList:f,authorizationList:p,blobs:y,blobVersionedHashes:g,data:F,gas:S,gasPrice:M,maxFeePerBlobGas:A,maxFeePerGas:I,maxPriorityFeePerGas:R,nonce:T,to:P,value:z},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:H?[oe,j??e.experimental_blockTag??"latest",H]:j?[oe,j]:[oe]}))}catch(f){throw qj(f,{...t,account:s,chain:e.chain})}}function eN(e,t){if(!Hr(e,{strict:!1}))throw new An({address:e});if(!Hr(t,{strict:!1}))throw new An({address:t});return e.toLowerCase()===t.toLowerCase()}function tN(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const xm="/docs/contract/encodeDeployData";function rN(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 CU({docsPath:xm});if(!("inputs"in s))throw new aI({docsPath:xm});if(!s.inputs||s.inputs.length===0)throw new aI({docsPath:xm});const u=lp(s.inputs,n);return Rs([o,u])}function Iw(){let e=()=>{},t=()=>{};return{promise:new Promise((o,s)=>{e=o,t=s}),resolve:e,reject:t}}const Em=new Map;function nN({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 m=0;m<p.length;m++){const{resolve:w}=p[m];w==null||w([g[m],g])}}).catch(g=>{for(let m=0;m<p.length;m++){const{reject:w}=p[m];w==null||w(g)}})},l=()=>Em.delete(t),c=()=>h().map(({args:p})=>p),h=()=>Em.get(t)||[],f=p=>Em.set(t,[...h(),p]);return{flush:l,async schedule(p){const{promise:y,resolve:g,reject:m}=Iw();return(n==null?void 0:n([...c(),p]))&&u(),h().length>0?(f({args:p,resolve:g,reject:m}),y):(f({args:p,resolve:g,reject:m}),setTimeout(u,o),y)}}}const Sm=new Map,bI=new Map;let iN=0;function qd(e,t,n){const o=++iN,s=()=>Sm.get(e)||[],u=()=>{const p=s();Sm.set(e,p.filter(y=>y.id!==o))},l=()=>{const p=s();if(!p.some(g=>g.id===o))return;const y=bI.get(e);if(p.length===1&&y){const g=y();g instanceof Promise&&g.catch(()=>{})}u()},c=s();if(Sm.set(e,[...c,{id:o,fns:t}]),c&&c.length>0)return l;const h={};for(const p in t)h[p]=((...y)=>{var m,w;const g=s();if(g.length!==0)for(const F of g)(w=(m=F.fns)[p])==null||w.call(m,...y)});const f=n(h);return typeof f=="function"&&bI.set(e,f),l}async function jb(e){return new Promise(t=>setTimeout(t,e))}function pT(e,{emitOnBegin:t,initialWaitTime:n,interval:o}){let s=!0;const u=()=>s=!1;return(async()=>{let c;t&&(c=await e({unpoll:u}));const h=await(n==null?void 0:n(c))??o;await jb(h);const f=async()=>{s&&(await e({unpoll:u}),await jb(o),f())};f()})(),u}const oN=new Map,sN=new Map;function aN(e){const t=(s,u)=>({clear:()=>u.delete(s),get:()=>u.get(s),set:l=>u.set(s,l)}),n=t(e,oN),o=t(e,sN);return{clear:()=>{n.clear(),o.clear()},promise:n,response:o}}async function uN(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const o=aN(t),s=o.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let u=o.promise.get();u||(u=e(),o.promise.set(u));try{const l=await u;return o.response.set({created:new Date,data:l}),l}finally{o.promise.clear()}}const lN=e=>`blockNumber.${e}`;async function cN(e,{cacheTime:t=e.cacheTime}={}){const n=await uN(()=>e.request({method:"eth_blockNumber"}),{cacheKey:lN(e.uid),cacheTime:t});return BigInt(n)}class Ms 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 ma extends Ze{constructor({docsPath:t,metaMessages:n,type:o}){super(`Account type "${o}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function _w({chain:e,currentChainId:t}){if(!e)throw new pU;if(t!==e.id)throw new dU({chain:e,currentChainId:t})}function Cw(e,{docsPath:t,...n}){const o=(()=>{const s=lT(e,n);return s instanceof fw?e:s})();return new iU(o,{docsPath:t,...n})}async function yT(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Im=new uf(128);async function hp(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:m,type:w,value:F,...S}=t;if(typeof n>"u")throw new Ms({docsPath:"/docs/actions/wallet/sendTransaction"});const M=n?wn(n):null;try{hf(t);const z=await(async()=>{if(t.to)return t.to;if(t.to!==null&&u&&u.length>0)return await vw({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 Yt(e,Yu,"getChainId")({}),_w({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||cp)({...xw(S,{format:L}),accessList:s,account:M,authorizationList:u,blobs:l,chainId:k,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:m,to:z,type:w,value:F},"sendTransaction"),H=Im.get(e.uid),P=H?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:P,params:[j]},{retryCount:0})}catch(te){if(H===!1)throw te;const ue=te;if(ue.name==="InvalidInputRpcError"||ue.name==="InvalidParamsRpcError"||ue.name==="MethodNotFoundRpcError"||ue.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[j]},{retryCount:0}).then(oe=>(Im.set(e.uid,!0),oe)).catch(oe=>{const X=oe;throw X.name==="MethodNotFoundRpcError"||X.name==="MethodNotSupportedRpcError"?(Im.set(e.uid,!1),ue):X});throw ue}}if((M==null?void 0:M.type)==="local"){const k=await Yt(e,fp,"prepareTransactionRequest")({account:M,accessList:s,authorizationList:u,blobs:l,chain:o,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:m,nonceManager:M.nonceManager,parameters:[...Sw,"sidecars"],type:w,value:F,...S,to:z}),L=(T=o==null?void 0:o.serializers)==null?void 0:T.transaction,U=await M.signTransaction(k,{serializer:L});return await Yt(e,yT,"sendRawTransaction")({serializedTransaction:U})}throw(M==null?void 0:M.type)==="smart"?new ma({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new ma({docsPath:"/docs/actions/wallet/sendTransaction",type:M==null?void 0:M.type})}catch(z){throw z instanceof ma?z:Cw(z,{...t,account:M,chain:t.chain||void 0})}}async function Yc(e,t){return Yc.internal(e,hp,"sendTransaction",t)}(function(e){async function t(n,o,s,u){const{abi:l,account:c=n.account,address:h,args:f,dataSuffix:p,functionName:y,...g}=u;if(typeof c>"u")throw new Ms({docsPath:"/docs/contract/writeContract"});const m=c?wn(c):null,w=aT({abi:l,args:f,functionName:y});try{return await Yt(n,o,s)({data:`${w}${p?p.replace("0x",""):""}`,to:h,account:m,...g})}catch(F){throw Nj(F,{abi:l,address:h,args:f,docsPath:"/docs/contract/writeContract",functionName:y,sender:m==null?void 0:m.address})}}e.internal=t})(Yc||(Yc={}));class fN 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 Hd(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 jb(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 gT={"0x0":"reverted","0x1":"success"};function mT(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>tN(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Xi(e.transactionIndex):null,status:e.status?gT[e.status]:null,type:e.type?fT[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const bT="0x5792579257925792579257925792579257925792579257925792579257925792",AT=it(0,{size:32});async function wT(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?wn(n):null,y=t.calls.map(g=>{const m=g,w=m.abi?aT({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&w?Zi([w,m.dataSuffix]):w,to:m.to,value:m.value?it(m.value):void 0}});try{const g=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:c,calls:y,capabilities:o,chainId:it(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 m=g;if(u&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did not match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(o&&Object.values(o).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new ku(new Ze(A,{details:A}))}if(c&&y.length>1){const M="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new Lu(new Ze(M,{details:M}))}const w=[];for(const M of y){const A=hp(e,{account:p,chain:s,data:M.data,to:M.to,value:M.value?Ri(M.value):void 0});w.push(A),l>0&&await new Promise(I=>setTimeout(I,l))}const F=await Promise.allSettled(w);if(F.every(M=>M.status==="rejected"))throw F[0].reason;const S=F.map(M=>M.status==="fulfilled"?M.value:AT);return{id:Zi([...S,it(s.id,{size:32}),bT])}}throw Cw(g,{...t,account:p,chain:t.chain})}}async function vT(e,t){async function n(p){if(p.endsWith(bT.slice(2))){const g=Bs(Bb(p,-64,-32)),m=Bb(p,0,-64).slice(2).match(/.{1,64}/g),w=await Promise.all(m.map(S=>AT.slice(2)!==S?e.request({method:"eth_getTransactionReceipt",params:[`0x${S}`]},{dedupe:!0}):void 0)),F=w.some(S=>S===null)?100:w.every(S=>(S==null?void 0:S.status)==="0x1")?200:w.every(S=>(S==null?void 0:S.status)==="0x0")?500:600;return{atomic:!1,chainId:Xi(g),receipts:w.filter(Boolean),status:F,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?Xi(s):void 0,receipts:(u==null?void 0:u.map(p=>({...p,blockNumber:Ri(p.blockNumber),gasUsed:Ri(p.gasUsed),status:gT[p.status]})))??[],statusCode:f,status:h,version:l}}async function xT(e,t){const{id:n,pollingInterval:o=e.pollingInterval,status:s=({statusCode:F})=>F===200||F>=300,retryCount:u=4,retryDelay:l=({count:F})=>~~(1<<F)*200,timeout:c=6e4,throwOnFailure:h=!1}=t,f=Mn(["waitForCallsStatus",e.uid,n]),{promise:p,resolve:y,reject:g}=Iw();let m;const w=qd(f,{resolve:y,reject:g},F=>{const S=pT(async()=>{const M=A=>{clearTimeout(m),S(),A(),w()};try{const A=await Hd(async()=>{const I=await Yt(e,vT,"getCallsStatus")({id:n});if(h&&I.status==="failure")throw new fN(I);return I},{retryCount:u,delay:l});if(!s(A))return;M(()=>F.resolve(A))}catch(A){M(()=>F.reject(A))}},{interval:o,emitOnBegin:!0});return S});return m=c?setTimeout(()=>{w(),clearTimeout(m),g(new hN({id:n}))},c):void 0,await p}class hN extends Ze{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}const Nb=256;let Kh=Nb,Yh;function ET(e=11){if(!Yh||Kh+e>Nb*2){Yh="",Kh=0;for(let t=0;t<Nb;t++)Yh+=(256+Math.random()*256|0).toString(16).substring(1)}return Yh.substring(Kh,Kh+++e)}function dN(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?wn(e.account):void 0,{config:m,request:w,value:F}=e.transport({chain:n,pollingInterval:p}),S={...m,...F},M={account:g,batch:t,cacheTime:y,ccipRead:o,chain:n,key:s,name:u,pollingInterval:p,request:w,transport:S,type:l,uid:ET(),...c?{experimental_blockTag:c}:{}};function A(I){return R=>{const T=R(I);for(const k in M)delete T[k];const z={...I,...T};return Object.assign(z,{extend:A(z)})}}return Object.assign(M,{extend:A(M)})}const Vh=new uf(8192);function pN(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(Vh.get(n))return Vh.get(n);const o=e().finally(()=>Vh.delete(n));return Vh.set(n,o),o}function yN(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 ha(new Error("method not supported"),{method:f});if(u!=null&&u.include&&!u.include.includes(f))throw new ha(new Error("method not supported"),{method:f});const p=s?Nu(`${h}.${Mn(n)}`):void 0;return pN(()=>Hd(async()=>{try{return await e(n)}catch(g){const m=g;switch(m.code){case Fc.code:throw new Fc(m);case Oc.code:throw new Oc(m);case Tc.code:throw new Tc(m,{method:n.method});case Bc.code:throw new Bc(m);case Ea.code:throw new Ea(m);case Rc.code:throw new Rc(m);case Mc.code:throw new Mc(m);case Uc.code:throw new Uc(m);case jc.code:throw new jc(m);case ha.code:throw new ha(m,{method:n.method});case Pu.code:throw new Pu(m);case Nc.code:throw new Nc(m);case Bu.code:throw new Bu(m);case Dc.code:throw new Dc(m);case Pc.code:throw new Pc(m);case kc.code:throw new kc(m);case Lc.code:throw new Lc(m);case zc.code:throw new zc(m);case ku.code:throw new ku(m);case $c.code:throw new $c(m);case qc.code:throw new qc(m);case Hc.code:throw new Hc(m);case Qc.code:throw new Qc(m);case Gc.code:throw new Gc(m);case Lu.code:throw new Lu(m);case 5e3:throw new Bu(m);default:throw g instanceof Ze?g:new Uj(m)}}},{delay:({count:g,error:m})=>{var w;if(m&&m instanceof bc){const F=(w=m==null?void 0:m.headers)==null?void 0:w.get("Retry-After");if(F!=null&&F.match(/\d/))return Number.parseInt(F,10)*1e3}return~~(1<<g)*l},retryCount:c,shouldRetry:({error:g})=>gN(g)}),{enabled:s,id:p})}}function gN(e){return"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Pu.code||e.code===Ea.code:e instanceof bc&&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 mN(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}function bN(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 AN(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const AI=AN();function wN(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 m=await bN(async({signal:F})=>{const S={...h,body:Array.isArray(o)?Mn(o.map(R=>({jsonrpc:"2.0",id:R.id??AI.take(),...R}))):Mn({jsonrpc:"2.0",id:o.id??AI.take(),...o}),headers:{"Content-Type":"application/json",...f},method:p||"POST",signal:y||(c>0?F:null)},M=new Request(e,S),A=await(u==null?void 0:u(M,S))??{...S,url:e};return await s(A.url??e,A)},{errorInstance:new hI({body:o,url:e}),timeout:c,signal:!0});l&&await l(m);let w;if((g=m.headers.get("Content-Type"))!=null&&g.startsWith("application/json"))w=await m.json();else{w=await m.text();try{w=JSON.parse(w||"{}")}catch(F){if(m.ok)throw F;w={error:w}}}if(!m.ok)throw new bc({body:o,details:Mn(w.error)||m.statusText,headers:m.headers,status:m.status,url:e});return w}catch(m){throw m instanceof bc||m instanceof hI?m:new bc({body:o,cause:m,url:e})}}}}async function vN(e,{blockHash:t,blockNumber:n,blockTag:o,hash:s,index:u}){var p,y,g;const l=o||"latest",c=n!==void 0?it(n):void 0;let h=null;if(s?h=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?h=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,it(u)]},{dedupe:!0}):h=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[c||l,it(u)]},{dedupe:!!c}),!h)throw new DO({blockHash:t,blockNumber:n,blockTag:l,hash:s,index:u});return(((g=(y=(p=e.chain)==null?void 0:p.formatters)==null?void 0:y.transaction)==null?void 0:g.format)||hT)(h,"getTransaction")}async function _m(e,{hash:t}){var s,u,l;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new PO({hash:t});return(((l=(u=(s=e.chain)==null?void 0:s.formatters)==null?void 0:u.transactionReceipt)==null?void 0:l.format)||mT)(n,"getTransactionReceipt")}function xN(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:o,onError:s,poll:u,pollingInterval:l=e.pollingInterval}){const c=typeof u<"u"?u:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let h;return c?(()=>{const y=Mn(["watchBlockNumber",e.uid,t,n,l]);return qd(y,{onBlockNumber:o,onError:s},g=>pT(async()=>{var m;try{const w=await Yt(e,cN,"getBlockNumber")({cacheTime:0});if(h!==void 0){if(w===h)return;if(w-h>1&&n)for(let F=h+1n;F<w;F++)g.onBlockNumber(F,h),h=F}(h===void 0||w>h)&&(g.onBlockNumber(w,h),h=w)}catch(w){(m=g.onError)==null||m.call(g,w)}},{emitOnBegin:t,interval:l}))})():(()=>{const y=Mn(["watchBlockNumber",e.uid,t,n]);return qd(y,{onBlockNumber:o,onError:s},g=>{let m=!0,w=()=>m=!1;return(async()=>{try{const F=(()=>{if(e.transport.type==="fallback"){const M=e.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return M?M.value:e.transport}return e.transport})(),{unsubscribe:S}=await F.subscribe({params:["newHeads"],onData(M){var I;if(!m)return;const A=Ri((I=M.result)==null?void 0:I.number);g.onBlockNumber(A,h),h=A},onError(M){var A;(A=g.onError)==null||A.call(g,M)}});w=S,m||w()}catch(F){s==null||s(F)}})(),()=>w()})})()}async function EN(e,t){const{checkReplacement:n=!0,confirmations:o=1,hash:s,onReplaced:u,retryCount:l=6,retryDelay:c=({count:T})=>~~(1<<T)*200,timeout:h=18e4}=t,f=Mn(["waitForTransactionReceipt",e.uid,s]),p=(()=>{var T;return t.pollingInterval?t.pollingInterval:(T=e.chain)!=null&&T.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let y,g,m,w=!1,F,S;const{promise:M,resolve:A,reject:I}=Iw(),R=h?setTimeout(()=>{S==null||S(),F==null||F(),I(new oU({hash:s}))},h):void 0;return F=qd(f,{onReplaced:u,resolve:A,reject:I},async T=>{if(m=await Yt(e,_m,"getTransactionReceipt")({hash:s}).catch(()=>{}),m&&o<=1){clearTimeout(R),T.resolve(m),F==null||F();return}S=Yt(e,xN,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:p,async onBlockNumber(z){const k=U=>{clearTimeout(R),S==null||S(),U(),F==null||F()};let L=z;if(!w)try{if(m){if(o>1&&(!m.blockNumber||L-m.blockNumber+1n<o))return;k(()=>T.resolve(m));return}if(n&&!y&&(w=!0,await Hd(async()=>{y=await Yt(e,vN,"getTransaction")({hash:s}),y.blockNumber&&(L=y.blockNumber)},{delay:c,retryCount:l}),w=!1),m=await Yt(e,_m,"getTransactionReceipt")({hash:s}),o>1&&(!m.blockNumber||L-m.blockNumber+1n<o))return;k(()=>T.resolve(m))}catch(U){if(U instanceof DO||U instanceof PO){if(!y){w=!1;return}try{g=y,w=!0;const j=await Hd(()=>Yt(e,Kc,"getBlock")({blockNumber:L,includeTransactions:!0}),{delay:c,retryCount:l,shouldRetry:({error:te})=>te instanceof cT});w=!1;const H=j.transactions.find(({from:te,nonce:ue})=>te===g.from&&ue===g.nonce);if(!H||(m=await Yt(e,_m,"getTransactionReceipt")({hash:H.hash}),o>1&&(!m.blockNumber||L-m.blockNumber+1n<o)))return;let P="replaced";H.to===g.to&&H.value===g.value&&H.input===g.input?P="repriced":H.from===H.to&&H.value===0n&&(P="cancelled"),k(()=>{var te;(te=T.onReplaced)==null||te.call(T,{reason:P,replacedTransaction:g,transaction:H,transactionReceipt:m}),T.resolve(m)})}catch(j){k(()=>T.reject(j))}}else k(()=>T.reject(U))}}})}),M}async function ST(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:o}){var c,h,f;const s=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,it(o)]:[t]},{retryCount:0}),l=(((f=(h=(c=e.chain)==null?void 0:c.formatters)==null?void 0:h.transactionReceipt)==null?void 0:f.format)||mT)(s);if(l.status==="reverted"&&n)throw new kO({receipt:l});return l}async function SN(e,{chain:t}){const{id:n,name:o,nativeCurrency:s,rpcUrls:u,blockExplorers:l}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:it(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 IN(e,t){const{abi:n,args:o,bytecode:s,...u}=t,l=rN({abi:n,args:o,bytecode:s});return hp(e,{...u,...u.authorizationList?{to:null}:{},data:l})}async function _N(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=>lf(o))}async function CN(e,t={}){const{account:n=e.account,chainId:o}=t,s=n?wn(n):void 0,u=o?[s==null?void 0:s.address,[it(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 FN(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function IT(e,t){var h;const{account:n=e.account,chainId:o,nonce:s}=t;if(!n)throw new Ms({docsPath:"/docs/eip7702/prepareAuthorization"});const u=wn(n),l=(()=>{if(t.executor)return t.executor==="self"?t.executor:wn(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 Yt(e,Yu,"getChainId")({})),typeof c.nonce>"u"&&(c.nonce=await Yt(e,_O,"getTransactionCount")({address:u.address,blockTag:"pending"}),(l==="self"||l!=null&&l.address&&eN(l.address,u.address))&&(c.nonce+=1)),c}async function ON(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>PM(n))}async function TN(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function BN(e,t){const{chain:n=e.chain}=t,o=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),s=await wT(e,t);return await xT(e,{...t,id:s.id,timeout:o})}const Cm=new uf(128);async function _T(e,t){var T,z,k,L;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:m,pollingInterval:w,throwOnReceiptRevert:F,type:S,value:M,...A}=t,I=t.timeout??Math.max(((o==null?void 0:o.blockTime)??0)*3,5e3);if(typeof n>"u")throw new Ms({docsPath:"/docs/actions/wallet/sendTransactionSync"});const R=n?wn(n):null;try{hf(t);const U=await(async()=>{if(t.to)return t.to;if(t.to!==null&&u&&u.length>0)return await vw({authorization:u[0]}).catch(()=>{throw new Ze("`to` is required. Could not infer from `authorizationList`.")})})();if((R==null?void 0:R.type)==="json-rpc"||R===null){let j;o!==null&&(j=await Yt(e,Yu,"getChainId")({}),_w({currentChainId:j,chain:o}));const H=(k=(z=(T=e.chain)==null?void 0:T.formatters)==null?void 0:z.transactionRequest)==null?void 0:k.format,te=(H||cp)({...xw(A,{format:H}),accessList:s,account:R,authorizationList:u,blobs:l,chainId:j,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:m,to:U,type:S,value:M},"sendTransaction"),ue=Cm.get(e.uid),oe=ue?"wallet_sendTransaction":"eth_sendTransaction",X=await(async()=>{try{return await e.request({method:oe,params:[te]},{retryCount:0})}catch(pe){if(ue===!1)throw pe;const le=pe;if(le.name==="InvalidInputRpcError"||le.name==="InvalidParamsRpcError"||le.name==="MethodNotFoundRpcError"||le.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[te]},{retryCount:0}).then(J=>(Cm.set(e.uid,!0),J)).catch(J=>{const G=J;throw G.name==="MethodNotFoundRpcError"||G.name==="MethodNotSupportedRpcError"?(Cm.set(e.uid,!1),le):G});throw le}})(),re=await Yt(e,EN,"waitForTransactionReceipt")({checkReplacement:!1,hash:X,pollingInterval:w,timeout:I});if(F&&re.status==="reverted")throw new kO({receipt:re});return re}if((R==null?void 0:R.type)==="local"){const j=await Yt(e,fp,"prepareTransactionRequest")({account:R,accessList:s,authorizationList:u,blobs:l,chain:o,data:c,gas:h,gasPrice:f,maxFeePerBlobGas:p,maxFeePerGas:y,maxPriorityFeePerGas:g,nonce:m,nonceManager:R.nonceManager,parameters:[...Sw,"sidecars"],type:S,value:M,...A,to:U}),H=(L=o==null?void 0:o.serializers)==null?void 0:L.transaction,P=await R.signTransaction(j,{serializer:H});return await Yt(e,ST,"sendRawTransactionSync")({serializedTransaction:P,throwOnReceiptRevert:F})}throw(R==null?void 0:R.type)==="smart"?new ma({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new ma({docsPath:"/docs/actions/wallet/sendTransactionSync",type:R==null?void 0:R.type})}catch(U){throw U instanceof ma?U:Cw(U,{...t,account:R,chain:t.chain||void 0})}}async function RN(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function MN(e,t){const{account:n=e.account}=t;if(!n)throw new Ms({docsPath:"/docs/eip7702/signAuthorization"});const o=wn(n);if(!o.signAuthorization)throw new ma({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:o.type});const s=await IT(e,t);return o.signAuthorization(s)}async function UN(e,{account:t=e.account,message:n}){if(!t)throw new Ms({docsPath:"/docs/actions/wallet/signMessage"});const o=wn(t);if(o.signMessage)return o.signMessage({message:n});const s=typeof n=="string"?Nu(n):n.raw instanceof Uint8Array?Wi(n.raw):n.raw;return e.request({method:"personal_sign",params:[s,o.address]},{retryCount:0})}async function jN(e,t){var f,p,y,g;const{account:n=e.account,chain:o=e.chain,...s}=t;if(!n)throw new Ms({docsPath:"/docs/actions/wallet/signTransaction"});const u=wn(n);hf({account:u,...t});const l=await Yt(e,Yu,"getChainId")({});o!==null&&_w({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)||cp;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,account:u},"signTransaction"),chainId:it(l),from:u.address}]},{retryCount:0})}async function NN(e,t){const{account:n=e.account,domain:o,message:s,primaryType:u}=t;if(!n)throw new Ms({docsPath:"/docs/actions/wallet/signTypedData"});const l=wn(n),c={EIP712Domain:JO({domain:o}),...t.types};if(ZO({domain:o,message:s,primaryType:u,types:c}),l.signTypedData)return l.signTypedData({domain:o,message:s,primaryType:u,types:c});const h=WU({domain:o,message:s,primaryType:u,types:c});return e.request({method:"eth_signTypedData_v4",params:[l.address,h]},{retryCount:0})}async function DN(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:it(t)}]},{retryCount:0})}async function PN(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function kN(e,t){return Yc.internal(e,_T,"sendTransactionSync",t)}function LN(e){return{addChain:t=>SN(e,t),deployContract:t=>IN(e,t),getAddresses:()=>_N(e),getCallsStatus:t=>vT(e,t),getCapabilities:t=>CN(e,t),getChainId:()=>Yu(e),getPermissions:()=>FN(e),prepareAuthorization:t=>IT(e,t),prepareTransactionRequest:t=>fp(e,t),requestAddresses:()=>ON(e),requestPermissions:t=>TN(e,t),sendCalls:t=>wT(e,t),sendCallsSync:t=>BN(e,t),sendRawTransaction:t=>yT(e,t),sendRawTransactionSync:t=>ST(e,t),sendTransaction:t=>hp(e,t),sendTransactionSync:t=>_T(e,t),showCallsStatus:t=>RN(e,t),signAuthorization:t=>MN(e,t),signMessage:t=>UN(e,t),signTransaction:t=>jN(e,t),signTypedData:t=>NN(e,t),switchChain:t=>DN(e,t),waitForCallsStatus:t=>xT(e,t),watchAsset:t=>PN(e,t),writeContract:t=>Yc(e,t),writeContractSync:t=>kN(e,t)}}function od(e){const{key:t="wallet",name:n="Wallet Client",transport:o}=e;return dN({...e,key:t,name:n,transport:o,type:"walletClient"}).extend(LN)}function zN({key:e,methods:t,name:n,request:o,retryCount:s=3,retryDelay:u=150,timeout:l,type:c},h){const f=ET();return{config:{key:e,methods:t,name:n,request:o,retryCount:s,retryDelay:u,timeout:l,type:c},request:yN(o,{methods:t,retryCount:s,retryDelay:u,uid:f}),value:h}}class $N 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 sd(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:m,timeout:w})=>{const{batchSize:F=1e3,wait:S=0}=typeof n=="object"?n:{},M=t.retryCount??m,A=w??t.timeout??1e4,I=g==null?void 0:g.rpcUrls.default.http[0];if(!I)throw new $N;const R=wN(I,{fetchFn:o,fetchOptions:s,onRequest:h,onResponse:f,timeout:A});return zN({key:u,methods:l,name:c,async request({method:T,params:z}){const k={method:T,params:z},{schedule:L}=nN({id:I,wait:S,shouldSplitBatch(P){return P.length>F},fn:P=>R.request({body:P}),sort:(P,te)=>P.id-te.id}),U=async P=>n?L(P):[await R.request({body:P})],[{error:j,result:H}]=await U(k);if(y)return{error:j,result:H};if(j)throw new ww({body:k,error:j,url:I});return H},retryCount:M,retryDelay:p,timeout:A,type:"http"},{fetchOptions:s,url:I})}}const ad=mN({id:31337,name:"Hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}}),Ai={EFFECTSTREAM_API_PORT:"9999",BATCHER_PORT:"3334"},sc={evm:"#4caf50",evmParallel:"#ff9800",cardano:"#2196f3",midnight:"#9c27b0"};function qN(e){const t={};return e.filter(o=>o.networkType!=="ntp").forEach((o,s)=>{var y,g,m;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"?(m=(g=(y=u.rpcUrls)==null?void 0:y.default)==null?void 0:g.http)!=null&&m[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=sc.evm;u.type==="cardano"?f=sc.cardano:u.type==="midnight"?f=sc.midnight:u.name.toLowerCase().includes("arbitrum")?f=sc.evm:(u.name.toLowerCase().includes("ethereum")||u.name.toLowerCase().includes("l1"))&&(f=sc.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 HN(){var s;const e=await fetch(CT);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json(),n=qN(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:${Ai.EFFECTSTREAM_API_PORT}/rpc/evm`,latestBlockNumber:0,previousLatestBlockNumber:0,isConnected:!1},...n}}const CT="http://127.0.0.1:9999/config",QN=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/block-heights`,GN=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/primitives`,wI=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/tables`,KN=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/scheduled-data`,YN=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/primitives-schema`,VN=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/table-schema`,vI=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/sync-protocols`,WN=`http://localhost:${Ai.BATCHER_PORT}/send-input`,xI=`http://localhost:${Ai.BATCHER_PORT}/documentation`,EI=`http://localhost:${Ai.EFFECTSTREAM_API_PORT}/documentation`,SI="https://effectstream.github.io/docs/",XN=`http://127.0.0.1:${Ai.EFFECTSTREAM_API_PORT}/addresses`;function ZN(e){return Fr(e)&&!kn(e)&&!pf(e)&&Symbol.asyncIterator in e}function kn(e){return Array.isArray(e)}function FT(e){return typeof e=="bigint"}function df(e){return typeof e=="boolean"}function Fw(e){return e instanceof globalThis.Date}function JN(e){return typeof e=="function"}function eD(e){return Fr(e)&&!kn(e)&&!pf(e)&&Symbol.iterator in e}function tD(e){return e===null}function Ji(e){return typeof e=="number"}function Fr(e){return typeof e=="object"&&e!==null}function OT(e){return e instanceof globalThis.RegExp}function br(e){return typeof e=="string"}function rD(e){return typeof e=="symbol"}function pf(e){return e instanceof globalThis.Uint8Array}function _r(e){return e===void 0}function nD(e){return e.map(t=>Qd(t))}function iD(e){return new Date(e.getTime())}function oD(e){return new Uint8Array(e)}function sD(e){return new RegExp(e.source,e.flags)}function aD(e){const t={};for(const n of Object.getOwnPropertyNames(e))t[n]=Qd(e[n]);for(const n of Object.getOwnPropertySymbols(e))t[n]=Qd(e[n]);return t}function Qd(e){return kn(e)?nD(e):Fw(e)?iD(e):pf(e)?oD(e):OT(e)?sD(e):Fr(e)?aD(e):e}function Zn(e){return Qd(e)}function Ow(e,t){return Zn(t===void 0?e:{...t,...e})}function TT(e){return _a(e)&&globalThis.Symbol.asyncIterator in e}function BT(e){return _a(e)&&globalThis.Symbol.iterator in e}function RT(e){return e instanceof globalThis.Promise}function Tw(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function Bw(e){return e instanceof globalThis.Uint8Array}function uD(e,t){return t in e}function _a(e){return e!==null&&typeof e=="object"}function ko(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}function Ca(e){return e===void 0}function dp(e){return e===null}function pp(e){return typeof e=="boolean"}function jo(e){return typeof e=="number"}function MT(e){return globalThis.Number.isInteger(e)}function yp(e){return typeof e=="bigint"}function Vi(e){return typeof e=="string"}function UT(e){return typeof e=="function"}function gp(e){return typeof e=="symbol"}function lD(e){return yp(e)||pp(e)||dp(e)||jo(e)||Vi(e)||gp(e)||Ca(e)}var jn;(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=_a(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?jo(l):Number.isFinite(l)}e.IsNumberLike=s;function u(l){const c=Ca(l);return e.AllowNullVoid?c||l===null:c}e.IsVoidLike=u})(jn||(jn={}));function cD(e){return globalThis.Object.freeze(e).map(t=>Gd(t))}function fD(e){const t={};for(const n of Object.getOwnPropertyNames(e))t[n]=Gd(e[n]);for(const n of Object.getOwnPropertySymbols(e))t[n]=Gd(e[n]);return globalThis.Object.freeze(t)}function Gd(e){return kn(e)?cD(e):Fw(e)?e:pf(e)?e:OT(e)?e:Fr(e)?fD(e):e}function nt(e,t){const n=t!==void 0?{...t,...e}:e;switch(jn.InstanceMode){case"freeze":return Gd(n);case"clone":return Zn(n);default:return n}}class ni extends Error{constructor(t){super(t)}}const Wn=Symbol.for("TypeBox.Transform"),yf=Symbol.for("TypeBox.Readonly"),qo=Symbol.for("TypeBox.Optional"),mp=Symbol.for("TypeBox.Hint"),at=Symbol.for("TypeBox.Kind");function Rw(e){return Fr(e)&&e[yf]==="Readonly"}function Us(e){return Fr(e)&&e[qo]==="Optional"}function jT(e){return Bt(e,"Any")}function NT(e){return Bt(e,"Argument")}function Vu(e){return Bt(e,"Array")}function bp(e){return Bt(e,"AsyncIterator")}function Ap(e){return Bt(e,"BigInt")}function gf(e){return Bt(e,"Boolean")}function Wu(e){return Bt(e,"Computed")}function Xu(e){return Bt(e,"Constructor")}function hD(e){return Bt(e,"Date")}function Zu(e){return Bt(e,"Function")}function Ju(e){return Bt(e,"Integer")}function wi(e){return Bt(e,"Intersect")}function wp(e){return Bt(e,"Iterator")}function Bt(e,t){return Fr(e)&&at in e&&e[at]===t}function DT(e){return df(e)||Ji(e)||br(e)}function Fa(e){return Bt(e,"Literal")}function Oa(e){return Bt(e,"MappedKey")}function ii(e){return Bt(e,"MappedResult")}function mf(e){return Bt(e,"Never")}function dD(e){return Bt(e,"Not")}function Mw(e){return Bt(e,"Null")}function el(e){return Bt(e,"Number")}function Pi(e){return Bt(e,"Object")}function vp(e){return Bt(e,"Promise")}function xp(e){return Bt(e,"Record")}function Nn(e){return Bt(e,"Ref")}function PT(e){return Bt(e,"RegExp")}function bf(e){return Bt(e,"String")}function Uw(e){return Bt(e,"Symbol")}function Ta(e){return Bt(e,"TemplateLiteral")}function pD(e){return Bt(e,"This")}function ar(e){return Fr(e)&&Wn in e}function Ba(e){return Bt(e,"Tuple")}function Ep(e){return Bt(e,"Undefined")}function Gr(e){return Bt(e,"Union")}function yD(e){return Bt(e,"Uint8Array")}function gD(e){return Bt(e,"Unknown")}function mD(e){return Bt(e,"Unsafe")}function bD(e){return Bt(e,"Void")}function AD(e){return Fr(e)&&at in e&&br(e[at])}function Xn(e){return jT(e)||NT(e)||Vu(e)||gf(e)||Ap(e)||bp(e)||Wu(e)||Xu(e)||hD(e)||Zu(e)||Ju(e)||wi(e)||wp(e)||Fa(e)||Oa(e)||ii(e)||mf(e)||dD(e)||Mw(e)||el(e)||Pi(e)||vp(e)||xp(e)||Nn(e)||PT(e)||bf(e)||Uw(e)||Ta(e)||pD(e)||Ba(e)||Ep(e)||Gr(e)||yD(e)||gD(e)||mD(e)||bD(e)||AD(e)}const wD=["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 kT(e){try{return new RegExp(e),!0}catch{return!1}}function jw(e){if(!br(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 LT(e){return Nw(e)||nn(e)}function ac(e){return _r(e)||FT(e)}function Xt(e){return _r(e)||Ji(e)}function Nw(e){return _r(e)||df(e)}function $t(e){return _r(e)||br(e)}function vD(e){return _r(e)||br(e)&&jw(e)&&kT(e)}function xD(e){return _r(e)||br(e)&&jw(e)}function zT(e){return _r(e)||nn(e)}function Kd(e){return Fr(e)&&e[qo]==="Optional"}function Mi(e){return Rt(e,"Any")&&$t(e.$id)}function ED(e){return Rt(e,"Argument")&&Ji(e.index)}function Ra(e){return Rt(e,"Array")&&e.type==="array"&&$t(e.$id)&&nn(e.items)&&Xt(e.minItems)&&Xt(e.maxItems)&&Nw(e.uniqueItems)&&zT(e.contains)&&Xt(e.minContains)&&Xt(e.maxContains)}function Dw(e){return Rt(e,"AsyncIterator")&&e.type==="AsyncIterator"&&$t(e.$id)&&nn(e.items)}function Sp(e){return Rt(e,"BigInt")&&e.type==="bigint"&&$t(e.$id)&&ac(e.exclusiveMaximum)&&ac(e.exclusiveMinimum)&&ac(e.maximum)&&ac(e.minimum)&&ac(e.multipleOf)}function Ma(e){return Rt(e,"Boolean")&&e.type==="boolean"&&$t(e.$id)}function SD(e){return Rt(e,"Computed")&&br(e.target)&&kn(e.parameters)&&e.parameters.every(t=>nn(t))}function Ip(e){return Rt(e,"Constructor")&&e.type==="Constructor"&&$t(e.$id)&&kn(e.parameters)&&e.parameters.every(t=>nn(t))&&nn(e.returns)}function _p(e){return Rt(e,"Date")&&e.type==="Date"&&$t(e.$id)&&Xt(e.exclusiveMaximumTimestamp)&&Xt(e.exclusiveMinimumTimestamp)&&Xt(e.maximumTimestamp)&&Xt(e.minimumTimestamp)&&Xt(e.multipleOfTimestamp)}function Cp(e){return Rt(e,"Function")&&e.type==="Function"&&$t(e.$id)&&kn(e.parameters)&&e.parameters.every(t=>nn(t))&&nn(e.returns)}function Ho(e){return Rt(e,"Integer")&&e.type==="integer"&&$t(e.$id)&&Xt(e.exclusiveMaximum)&&Xt(e.exclusiveMinimum)&&Xt(e.maximum)&&Xt(e.minimum)&&Xt(e.multipleOf)}function $T(e){return Fr(e)&&Object.entries(e).every(([t,n])=>jw(t)&&nn(n))}function Ua(e){return Rt(e,"Intersect")&&!(br(e.type)&&e.type!=="object")&&kn(e.allOf)&&e.allOf.every(t=>nn(t)&&!TD(t))&&$t(e.type)&&(Nw(e.unevaluatedProperties)||zT(e.unevaluatedProperties))&&$t(e.$id)}function Pw(e){return Rt(e,"Iterator")&&e.type==="Iterator"&&$t(e.$id)&&nn(e.items)}function Rt(e,t){return Fr(e)&&at in e&&e[at]===t}function qT(e){return js(e)&&br(e.const)}function HT(e){return js(e)&&Ji(e.const)}function QT(e){return js(e)&&df(e.const)}function js(e){return Rt(e,"Literal")&&$t(e.$id)&&ID(e.const)}function ID(e){return df(e)||Ji(e)||br(e)}function _D(e){return Rt(e,"MappedKey")&&kn(e.keys)&&e.keys.every(t=>Ji(t)||br(t))}function CD(e){return Rt(e,"MappedResult")&&$T(e.properties)}function Ns(e){return Rt(e,"Never")&&Fr(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function zu(e){return Rt(e,"Not")&&nn(e.not)}function kw(e){return Rt(e,"Null")&&e.type==="null"&&$t(e.$id)}function Bn(e){return Rt(e,"Number")&&e.type==="number"&&$t(e.$id)&&Xt(e.exclusiveMaximum)&&Xt(e.exclusiveMinimum)&&Xt(e.maximum)&&Xt(e.minimum)&&Xt(e.multipleOf)}function cr(e){return Rt(e,"Object")&&e.type==="object"&&$t(e.$id)&&$T(e.properties)&&LT(e.additionalProperties)&&Xt(e.minProperties)&&Xt(e.maxProperties)}function Lw(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)&&LT(e.additionalProperties)&&Fr(e.patternProperties)&&(t=>{const n=Object.getOwnPropertyNames(t.patternProperties);return n.length===1&&kT(n[0])&&Fr(t.patternProperties)&&nn(t.patternProperties[n[0]])})(e)}function FD(e){return Rt(e,"Ref")&&$t(e.$id)&&br(e.$ref)}function Vc(e){return Rt(e,"RegExp")&&$t(e.$id)&&br(e.source)&&br(e.flags)&&Xt(e.maxLength)&&Xt(e.minLength)}function Ui(e){return Rt(e,"String")&&e.type==="string"&&$t(e.$id)&&Xt(e.minLength)&&Xt(e.maxLength)&&vD(e.pattern)&&xD(e.format)}function Wc(e){return Rt(e,"Symbol")&&e.type==="symbol"&&$t(e.$id)}function Xc(e){return Rt(e,"TemplateLiteral")&&e.type==="string"&&br(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function OD(e){return Rt(e,"This")&&$t(e.$id)&&br(e.$ref)}function TD(e){return Fr(e)&&Wn in e}function Fp(e){return Rt(e,"Tuple")&&e.type==="array"&&$t(e.$id)&&Ji(e.minItems)&&Ji(e.maxItems)&&e.minItems===e.maxItems&&(_r(e.items)&&_r(e.additionalItems)&&e.minItems===0||kn(e.items)&&e.items.every(t=>nn(t)))}function Sa(e){return Rt(e,"Undefined")&&e.type==="undefined"&&$t(e.$id)}function Lo(e){return Rt(e,"Union")&&$t(e.$id)&&Fr(e)&&kn(e.anyOf)&&e.anyOf.every(t=>nn(t))}function Af(e){return Rt(e,"Uint8Array")&&e.type==="Uint8Array"&&$t(e.$id)&&Xt(e.minByteLength)&&Xt(e.maxByteLength)}function ji(e){return Rt(e,"Unknown")&&$t(e.$id)}function BD(e){return Rt(e,"Unsafe")}function Op(e){return Rt(e,"Void")&&e.type==="void"&&$t(e.$id)}function RD(e){return Fr(e)&&at in e&&br(e[at])&&!wD.includes(e[at])}function nn(e){return Fr(e)&&(Mi(e)||ED(e)||Ra(e)||Ma(e)||Sp(e)||Dw(e)||SD(e)||Ip(e)||_p(e)||Cp(e)||Ho(e)||Ua(e)||Pw(e)||js(e)||_D(e)||CD(e)||Ns(e)||zu(e)||kw(e)||Bn(e)||cr(e)||Lw(e)||rn(e)||FD(e)||Vc(e)||Ui(e)||Wc(e)||Xc(e)||OD(e)||Fp(e)||Sa(e)||Lo(e)||Af(e)||ji(e)||BD(e)||Op(e)||RD(e))}const MD="(true|false)",ud="(0|[1-9][0-9]*)",GT="(.*)",UD="(?!.*)",$u=`^${ud}$`,qu=`^${GT}$`,jD=`^${UD}$`,zw=new Map;function KT(e){return zw.has(e)}function to(e,t){zw.set(e,t)}function YT(e){return zw.get(e)}const VT=new Map;function $w(e){return VT.has(e)}function WT(e){return VT.get(e)}function ND(e,t){return e.includes(t)}function DD(e){return[...new Set(e)]}function PD(e,t){return e.filter(n=>t.includes(n))}function kD(e,t){return e.reduce((n,o)=>PD(n,o),t)}function LD(e){return e.length===1?e[0]:e.length>1?kD(e.slice(1),e[0]):[]}function zD(e){const t=[];for(const n of e)t.push(...n);return t}function Zc(e){return nt({[at]:"Any"},e)}function qw(e,t){return nt({[at]:"Array",type:"array",items:e},t)}function $D(e){return nt({[at]:"Argument",index:e})}function Hw(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 qD(e,t){const{[t]:n,...o}=e;return o}function Jn(e,t){return t.reduce((n,o)=>qD(n,o),e)}function yr(e){return nt({[at]:"Never",not:{}},e)}function on(e){return nt({[at]:"MappedResult",properties:e})}function Qw(e,t,n){return nt({[at]:"Constructor",type:"Constructor",parameters:e,returns:t},n)}function wf(e,t,n){return nt({[at]:"Function",type:"Function",parameters:e,returns:t},n)}function Db(e,t){return nt({[at]:"Union",anyOf:e},t)}function HD(e){return e.some(t=>Us(t))}function II(e){return e.map(t=>Us(t)?QD(t):t)}function QD(e){return Jn(e,[qo])}function GD(e,t){return HD(e)?ks(Db(II(e),t)):Db(II(e),t)}function tl(e,t){return e.length===1?nt(e[0],t):e.length===0?yr(t):GD(e,t)}function sn(e,t){return e.length===0?yr(t):e.length===1?nt(e[0],t):Db(e,t)}class _I extends ni{}function KD(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function Gw(e,t,n){return e[t]===n&&e.charCodeAt(t-1)!==92}function No(e,t){return Gw(e,t,"(")}function Jc(e,t){return Gw(e,t,")")}function XT(e,t){return Gw(e,t,"|")}function YD(e){if(!(No(e,0)&&Jc(e,e.length-1)))return!1;let t=0;for(let n=0;n<e.length;n++)if(No(e,n)&&(t+=1),Jc(e,n)&&(t-=1),t===0&&n!==e.length-1)return!1;return!0}function VD(e){return e.slice(1,e.length-1)}function WD(e){let t=0;for(let n=0;n<e.length;n++)if(No(e,n)&&(t+=1),Jc(e,n)&&(t-=1),XT(e,n)&&t===0)return!0;return!1}function XD(e){for(let t=0;t<e.length;t++)if(No(e,t))return!0;return!1}function ZD(e){let[t,n]=[0,0];const o=[];for(let u=0;u<e.length;u++)if(No(e,u)&&(t+=1),Jc(e,u)&&(t-=1),XT(e,u)&&t===0){const l=e.slice(n,u);l.length>0&&o.push(Hu(l)),n=u+1}const s=e.slice(n);return s.length>0&&o.push(Hu(s)),o.length===0?{type:"const",const:""}:o.length===1?o[0]:{type:"or",expr:o}}function JD(e){function t(s,u){if(!No(s,u))throw new _I("TemplateLiteralParser: Index must point to open parens");let l=0;for(let c=u;c<s.length;c++)if(No(s,c)&&(l+=1),Jc(s,c)&&(l-=1),l===0)return[u,c];throw new _I("TemplateLiteralParser: Unclosed group parens in expression")}function n(s,u){for(let l=u;l<s.length;l++)if(No(s,l))return[u,l];return[u,s.length]}const o=[];for(let s=0;s<e.length;s++)if(No(e,s)){const[u,l]=t(e,s),c=e.slice(u,l+1);o.push(Hu(c)),s=l}else{const[u,l]=n(e,s),c=e.slice(u,l);c.length>0&&o.push(Hu(c)),s=l-1}return o.length===0?{type:"const",const:""}:o.length===1?o[0]:{type:"and",expr:o}}function Hu(e){return YD(e)?Hu(VD(e)):WD(e)?ZD(e):XD(e)?JD(e):{type:"const",const:KD(e)}}function Kw(e){return Hu(e.slice(1,e.length-1))}class eP extends ni{}function tP(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 rP(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 nP(e){return e.type==="const"&&e.const===".*"}function ef(e){return tP(e)||nP(e)?!1:rP(e)?!0:e.type==="and"?e.expr.every(t=>ef(t)):e.type==="or"?e.expr.every(t=>ef(t)):e.type==="const"?!0:(()=>{throw new eP("Unknown expression type")})()}function iP(e){const t=Kw(e.pattern);return ef(t)}class oP extends ni{}function*ZT(e){if(e.length===1)return yield*e[0];for(const t of e[0])for(const n of ZT(e.slice(1)))yield`${t}${n}`}function*sP(e){return yield*ZT(e.expr.map(t=>[...Tp(t)]))}function*aP(e){for(const t of e.expr)yield*Tp(t)}function*uP(e){return yield e.const}function*Tp(e){return e.type==="and"?yield*sP(e):e.type==="or"?yield*aP(e):e.type==="const"?yield*uP(e):(()=>{throw new oP("Unknown expression")})()}function JT(e){const t=Kw(e.pattern);return ef(t)?[...Tp(t)]:[]}function Cr(e,t){return nt({[at]:"Literal",const:e,type:typeof e},t)}function e3(e){return nt({[at]:"Boolean",type:"boolean"},e)}function Yw(e){return nt({[at]:"BigInt",type:"bigint"},e)}function ja(e){return nt({[at]:"Number",type:"number"},e)}function Ia(e){return nt({[at]:"String",type:"string"},e)}function*lP(e){const t=e.trim().replace(/"|'/g,"");return t==="boolean"?yield e3():t==="number"?yield ja():t==="bigint"?yield Yw():t==="string"?yield Ia():yield(()=>{const n=t.split("|").map(o=>Cr(o.trim()));return n.length===0?yr():n.length===1?n[0]:tl(n)})()}function*cP(e){if(e[1]!=="{"){const t=Cr("$"),n=Pb(e.slice(1));return yield*[t,...n]}for(let t=2;t<e.length;t++)if(e[t]==="}"){const n=lP(e.slice(2,t)),o=Pb(e.slice(t+1));return yield*[...n,...o]}yield Cr(e)}function*Pb(e){for(let t=0;t<e.length;t++)if(e[t]==="$"){const n=Cr(e.slice(0,t)),o=cP(e.slice(t));return yield*[n,...o]}yield Cr(e)}function fP(e){return[...Pb(e)]}class hP extends ni{}function dP(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function t3(e,t){return Ta(e)?e.pattern.slice(1,e.pattern.length-1):Gr(e)?`(${e.anyOf.map(n=>t3(n,t)).join("|")})`:el(e)?`${t}${ud}`:Ju(e)?`${t}${ud}`:Ap(e)?`${t}${ud}`:bf(e)?`${t}${GT}`:Fa(e)?`${t}${dP(e.const.toString())}`:gf(e)?`${t}${MD}`:(()=>{throw new hP(`Unexpected Kind '${e[at]}'`)})()}function CI(e){return`^${e.map(t=>t3(t,"")).join("")}$`}function Yd(e){const n=JT(e).map(o=>Cr(o));return tl(n)}function r3(e,t){const n=br(e)?CI(fP(e)):CI(e);return nt({[at]:"TemplateLiteral",type:"string",pattern:n},t)}function pP(e){return JT(e).map(n=>n.toString())}function yP(e){const t=[];for(const n of e)t.push(...Ds(n));return t}function gP(e){return[e.toString()]}function Ds(e){return[...new Set(Ta(e)?pP(e):Gr(e)?yP(e.anyOf):Fa(e)?gP(e.const):el(e)?["[number]"]:Ju(e)?["[number]"]:[])]}function mP(e,t,n){const o={};for(const s of Object.getOwnPropertyNames(t))o[s]=Bp(e,Ds(t[s]),n);return o}function bP(e,t,n){return mP(e,t.properties,n)}function AP(e,t,n){const o=bP(e,t,n);return on(o)}function n3(e,t){return e.map(n=>i3(n,t))}function wP(e){return e.filter(t=>!mf(t))}function vP(e,t){return a3(wP(n3(e,t)))}function xP(e){return e.some(t=>mf(t))?[]:e}function EP(e,t){return tl(xP(n3(e,t)))}function SP(e,t){return t in e?e[t]:t==="[number]"?tl(e):yr()}function IP(e,t){return t==="[number]"?e:yr()}function _P(e,t){return t in e?e[t]:yr()}function i3(e,t){return wi(e)?vP(e.allOf,t):Gr(e)?EP(e.anyOf,t):Ba(e)?SP(e.items??[],t):Vu(e)?IP(e.items,t):Pi(e)?_P(e.properties,t):yr()}function Vw(e,t){return t.map(n=>i3(e,n))}function FI(e,t){return tl(Vw(e,t))}function Bp(e,t,n){if(Nn(e)||Nn(t)){const o="Index types using Ref parameters require both Type and Key to be of TSchema";if(!Xn(e)||!Xn(t))throw new ni(o);return Dr("Index",[e,t])}return ii(t)?AP(e,t,n):Oa(t)?TP(e,t,n):nt(Xn(t)?FI(e,Ds(t)):FI(e,t),n)}function CP(e,t,n){return{[t]:Bp(e,[t],Zn(n))}}function FP(e,t,n){return t.reduce((o,s)=>({...o,...CP(e,s,n)}),{})}function OP(e,t,n){return FP(e,t.keys,n)}function TP(e,t,n){const o=OP(e,t,n);return on(o)}function Ww(e,t){return nt({[at]:"Iterator",type:"Iterator",items:e},t)}function BP(e){const t=[];for(let n in e)Us(e[n])||t.push(n);return t}function RP(e,t){const n=BP(e),o=n.length>0?{[at]:"Object",type:"object",properties:e,required:n}:{[at]:"Object",type:"object",properties:e};return nt(o,t)}var Qr=RP;function o3(e,t){return nt({[at]:"Promise",type:"Promise",item:e},t)}function MP(e){return nt(Jn(e,[yf]))}function UP(e){return nt({...e,[yf]:"Readonly"})}function jP(e,t){return t===!1?MP(e):UP(e)}function Ps(e,t){const n=t??!0;return ii(e)?PP(e,n):jP(e,n)}function NP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Ps(e[o],t);return n}function DP(e,t){return NP(e.properties,t)}function PP(e,t){const n=DP(e,t);return on(n)}function rl(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 s3(e,t){return e in t?mi(e,t[e]):on(t)}function kP(e){return{[e]:Cr(e)}}function LP(e){const t={};for(const n of e)t[n]=Cr(n);return t}function zP(e,t){return ND(t,e)?kP(e):LP(t)}function $P(e,t){const n=zP(e,t);return s3(e,n)}function uc(e,t){return t.map(n=>mi(e,n))}function qP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(t))n[o]=mi(e,t[o]);return n}function mi(e,t){const n={...t};return Us(t)?ks(mi(e,Jn(t,[qo]))):Rw(t)?Ps(mi(e,Jn(t,[yf]))):ii(t)?s3(e,t.properties):Oa(t)?$P(e,t.keys):Xu(t)?Qw(uc(e,t.parameters),mi(e,t.returns),n):Zu(t)?wf(uc(e,t.parameters),mi(e,t.returns),n):bp(t)?Hw(mi(e,t.items),n):wp(t)?Ww(mi(e,t.items),n):wi(t)?Ls(uc(e,t.allOf),n):Gr(t)?sn(uc(e,t.anyOf),n):Ba(t)?rl(uc(e,t.items??[]),n):Pi(t)?Qr(qP(e,t.properties),n):Vu(t)?qw(mi(e,t.items),n):vp(t)?o3(mi(e,t.item),n):t}function HP(e,t){const n={};for(const o of e)n[o]=mi(o,t);return n}function QP(e,t,n){const o=Xn(e)?Ds(e):e,s=t({[at]:"MappedKey",keys:o}),u=HP(o,s);return Qr(u,n)}function GP(e){return nt(Jn(e,[qo]))}function KP(e){return nt({...e,[qo]:"Optional"})}function YP(e,t){return t===!1?GP(e):KP(e)}function ks(e,t){const n=t??!0;return ii(e)?XP(e,n):YP(e,n)}function VP(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=ks(e[o],t);return n}function WP(e,t){return VP(e.properties,t)}function XP(e,t){const n=WP(e,t);return on(n)}function kb(e,t={}){const n=e.every(s=>Pi(s)),o=Xn(t.unevaluatedProperties)?{unevaluatedProperties:t.unevaluatedProperties}:{};return nt(t.unevaluatedProperties===!1||Xn(t.unevaluatedProperties)||n?{...o,[at]:"Intersect",type:"object",allOf:e}:{...o,[at]:"Intersect",allOf:e},t)}function ZP(e){return e.every(t=>Us(t))}function JP(e){return Jn(e,[qo])}function OI(e){return e.map(t=>Us(t)?JP(t):t)}function e5(e,t){return ZP(e)?ks(kb(OI(e),t)):kb(OI(e),t)}function a3(e,t={}){if(e.length===1)return nt(e[0],t);if(e.length===0)return yr(t);if(e.some(n=>ar(n)))throw new Error("Cannot intersect transform types");return e5(e,t)}function Ls(e,t){if(e.length===1)return nt(e[0],t);if(e.length===0)return yr(t);if(e.some(n=>ar(n)))throw new Error("Cannot intersect transform types");return kb(e,t)}function vf(...e){const[t,n]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof t!="string")throw new ni("Ref: $ref must be a string");return nt({[at]:"Ref",$ref:t},n)}function t5(e,t){return Dr("Awaited",[Dr(e,t)])}function r5(e){return Dr("Awaited",[vf(e)])}function n5(e){return Ls(u3(e))}function i5(e){return sn(u3(e))}function o5(e){return Rp(e)}function u3(e){return e.map(t=>Rp(t))}function Rp(e,t){return nt(Wu(e)?t5(e.target,e.parameters):wi(e)?n5(e.allOf):Gr(e)?i5(e.anyOf):vp(e)?o5(e.item):Nn(e)?r5(e.$ref):e,t)}function l3(e){const t=[];for(const n of e)t.push(nl(n));return t}function s5(e){const t=l3(e);return zD(t)}function a5(e){const t=l3(e);return LD(t)}function u5(e){return e.map((t,n)=>n.toString())}function l5(e){return["[number]"]}function c5(e){return globalThis.Object.getOwnPropertyNames(e)}function f5(e){return Lb?globalThis.Object.getOwnPropertyNames(e).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}function nl(e){return wi(e)?s5(e.allOf):Gr(e)?a5(e.anyOf):Ba(e)?u5(e.items??[]):Vu(e)?l5(e.items):Pi(e)?c5(e.properties):xp(e)?f5(e.patternProperties):[]}let Lb=!1;function Vd(e){Lb=!0;const t=nl(e);return Lb=!1,`^(${t.map(o=>`(${o})`).join("|")})$`}function h5(e,t){return Dr("KeyOf",[Dr(e,t)])}function d5(e){return Dr("KeyOf",[vf(e)])}function p5(e,t){const n=nl(e),o=y5(n),s=tl(o);return nt(s,t)}function y5(e){return e.map(t=>t==="[number]"?ja():Cr(t))}function Xw(e,t){return Wu(e)?h5(e.target,e.parameters):Nn(e)?d5(e.$ref):ii(e)?b5(e,t):p5(e,t)}function g5(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=Xw(e[o],Zn(t));return n}function m5(e,t){return g5(e.properties,t)}function b5(e,t){const n=m5(e,t);return on(n)}function A5(e){const t=nl(e),n=Vw(e,t);return t.map((o,s)=>[t[s],n[s]])}function w5(e){const t=[];for(const n of e)t.push(...nl(n));return DD(t)}function v5(e){return e.filter(t=>!mf(t))}function x5(e,t){const n=[];for(const o of e)n.push(...Vw(o,[t]));return v5(n)}function E5(e,t){const n={};for(const o of t)n[o]=a3(x5(e,o));return n}function S5(e,t){const n=w5(e),o=E5(e,n);return Qr(o,t)}function c3(e){return nt({[at]:"Date",type:"Date"},e)}function f3(e){return nt({[at]:"Null",type:"null"},e)}function h3(e){return nt({[at]:"Symbol",type:"symbol"},e)}function d3(e){return nt({[at]:"Undefined",type:"undefined"},e)}function p3(e){return nt({[at]:"Uint8Array",type:"Uint8Array"},e)}function Mp(e){return nt({[at]:"Unknown"},e)}function I5(e){return e.map(t=>Zw(t,!1))}function _5(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Ps(Zw(e[n],!1));return t}function Wh(e,t){return t===!0?e:Ps(e)}function Zw(e,t){return ZN(e)||eD(e)?Wh(Zc(),t):kn(e)?Ps(rl(I5(e))):pf(e)?p3():Fw(e)?c3():Fr(e)?Wh(Qr(_5(e)),t):JN(e)?Wh(wf([],Mp()),t):_r(e)?d3():tD(e)?f3():rD(e)?h3():FT(e)?Yw():Ji(e)||df(e)||br(e)?Cr(e):Qr({})}function C5(e,t){return nt(Zw(e,!0),t)}function F5(e,t){return Xu(e)?rl(e.parameters,t):yr(t)}function O5(e,t){if(_r(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=>Cr(u));return sn(s,{...t,[mp]:"Enum"})}class T5 extends ni{}var ze;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(ze||(ze={}));function bi(e){return e===ze.False?e:ze.True}function il(e){throw new T5(e)}function Or(e){return Ns(e)||Ua(e)||Lo(e)||ji(e)||Mi(e)}function Tr(e,t){return Ns(t)?m3():Ua(t)?Up(e,t):Lo(t)?ev(e,t):ji(t)?v3():Mi(t)?Jw():il("StructuralRight")}function Jw(e,t){return ze.True}function B5(e,t){return Ua(t)?Up(e,t):Lo(t)&&t.anyOf.some(n=>Mi(n)||ji(n))?ze.True:Lo(t)?ze.Union:ji(t)||Mi(t)?ze.True:ze.Union}function R5(e,t){return ji(e)?ze.False:Mi(e)?ze.Union:Ns(e)?ze.True:ze.False}function M5(e,t){return cr(t)&&jp(t)?ze.True:Or(t)?Tr(e,t):Ra(t)?bi(zt(e.items,t.items)):ze.False}function U5(e,t){return Or(t)?Tr(e,t):Dw(t)?bi(zt(e.items,t.items)):ze.False}function j5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Sp(t)?ze.True:ze.False}function y3(e,t){return QT(e)||Ma(e)?ze.True:ze.False}function N5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Ma(t)?ze.True:ze.False}function D5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):Ip(t)?e.parameters.length>t.parameters.length?ze.False:e.parameters.every((n,o)=>bi(zt(t.parameters[o],n))===ze.True)?bi(zt(e.returns,t.returns)):ze.False:ze.False}function P5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):_p(t)?ze.True:ze.False}function k5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):Cp(t)?e.parameters.length>t.parameters.length?ze.False:e.parameters.every((n,o)=>bi(zt(t.parameters[o],n))===ze.True)?bi(zt(e.returns,t.returns)):ze.False:ze.False}function g3(e,t){return js(e)&&Ji(e.const)||Bn(e)||Ho(e)?ze.True:ze.False}function L5(e,t){return Ho(t)||Bn(t)?ze.True:Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):ze.False}function Up(e,t){return t.allOf.every(n=>zt(e,n)===ze.True)?ze.True:ze.False}function z5(e,t){return e.allOf.some(n=>zt(n,t)===ze.True)?ze.True:ze.False}function $5(e,t){return Or(t)?Tr(e,t):Pw(t)?bi(zt(e.items,t.items)):ze.False}function q5(e,t){return js(t)&&t.const===e.const?ze.True:Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Ui(t)?w3(e):Bn(t)?b3(e):Ho(t)?g3(e):Ma(t)?y3(e):ze.False}function m3(e,t){return ze.False}function H5(e,t){return ze.True}function TI(e){let[t,n]=[e,0];for(;zu(t);)t=t.not,n+=1;return n%2===0?t:Mp()}function Q5(e,t){return zu(e)?zt(TI(e),t):zu(t)?zt(e,TI(t)):il("Invalid fallthrough for Not")}function G5(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):kw(t)?ze.True:ze.False}function b3(e,t){return HT(e)||Bn(e)||Ho(e)?ze.True:ze.False}function K5(e,t){return Or(t)?Tr(e,t):cr(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 BI(e){return jp(e)}function RI(e){return Dn(e,0)||Dn(e,1)&&"description"in e.properties&&Lo(e.properties.description)&&e.properties.description.anyOf.length===2&&(Ui(e.properties.description.anyOf[0])&&Sa(e.properties.description.anyOf[1])||Ui(e.properties.description.anyOf[1])&&Sa(e.properties.description.anyOf[0]))}function Fm(e){return Dn(e,0)}function MI(e){return Dn(e,0)}function Y5(e){return Dn(e,0)}function V5(e){return Dn(e,0)}function W5(e){return jp(e)}function X5(e){const t=ja();return Dn(e,0)||Dn(e,1)&&"length"in e.properties&&bi(zt(e.properties.length,t))===ze.True}function Z5(e){return Dn(e,0)}function jp(e){const t=ja();return Dn(e,0)||Dn(e,1)&&"length"in e.properties&&bi(zt(e.properties.length,t))===ze.True}function J5(e){const t=wf([Zc()],Zc());return Dn(e,0)||Dn(e,1)&&"then"in e.properties&&bi(zt(e.properties.then,t))===ze.True}function A3(e,t){return zt(e,t)===ze.False||Kd(e)&&!Kd(t)?ze.False:ze.True}function yn(e,t){return ji(e)?ze.False:Mi(e)?ze.Union:Ns(e)||qT(e)&&BI(t)||HT(e)&&Fm(t)||QT(e)&&MI(t)||Wc(e)&&RI(t)||Sp(e)&&Y5(t)||Ui(e)&&BI(t)||Wc(e)&&RI(t)||Bn(e)&&Fm(t)||Ho(e)&&Fm(t)||Ma(e)&&MI(t)||Af(e)&&W5(t)||_p(e)&&V5(t)||Ip(e)&&Z5(t)||Cp(e)&&X5(t)?ze.True:rn(e)&&Ui(zb(e))?t[mp]==="Record"?ze.True:ze.False:rn(e)&&Bn(zb(e))?Dn(t,0)?ze.True:ze.False:ze.False}function ek(e,t){return Or(t)?Tr(e,t):rn(t)?vi(e,t):cr(t)?(()=>{for(const n of Object.getOwnPropertyNames(t.properties)){if(!(n in e.properties)&&!Kd(t.properties[n]))return ze.False;if(Kd(t.properties[n]))return ze.True;if(A3(e.properties[n],t.properties[n])===ze.False)return ze.False}return ze.True})():ze.False}function tk(e,t){return Or(t)?Tr(e,t):cr(t)&&J5(t)?ze.True:Lw(t)?bi(zt(e.item,t.item)):ze.False}function zb(e){return $u in e.patternProperties?ja():qu in e.patternProperties?Ia():il("Unknown record key pattern")}function $b(e){return $u in e.patternProperties?e.patternProperties[$u]:qu in e.patternProperties?e.patternProperties[qu]:il("Unable to get record value schema")}function vi(e,t){const[n,o]=[zb(t),$b(t)];return qT(e)&&Bn(n)&&bi(zt(e,o))===ze.True?ze.True:Af(e)&&Bn(n)||Ui(e)&&Bn(n)||Ra(e)&&Bn(n)?zt(e,o):cr(e)?(()=>{for(const s of Object.getOwnPropertyNames(e.properties))if(A3(o,e.properties[s])===ze.False)return ze.False;return ze.True})():ze.False}function rk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?zt($b(e),$b(t)):ze.False}function nk(e,t){const n=Vc(e)?Ia():e,o=Vc(t)?Ia():t;return zt(n,o)}function w3(e,t){return js(e)&&br(e.const)||Ui(e)?ze.True:ze.False}function ik(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Ui(t)?ze.True:ze.False}function ok(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Wc(t)?ze.True:ze.False}function sk(e,t){return Xc(e)?zt(Yd(e),t):Xc(t)?zt(e,Yd(t)):il("Invalid fallthrough for TemplateLiteral")}function ak(e,t){return Ra(t)&&e.items!==void 0&&e.items.every(n=>zt(n,t.items)===ze.True)}function uk(e,t){return Ns(e)?ze.True:ji(e)?ze.False:Mi(e)?ze.Union:ze.False}function lk(e,t){return Or(t)?Tr(e,t):cr(t)&&jp(t)||Ra(t)&&ak(e,t)?ze.True:Fp(t)?_r(e.items)&&!_r(t.items)||!_r(e.items)&&_r(t.items)?ze.False:_r(e.items)&&!_r(t.items)||e.items.every((n,o)=>zt(n,t.items[o])===ze.True)?ze.True:ze.False:ze.False}function ck(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Af(t)?ze.True:ze.False}function fk(e,t){return Or(t)?Tr(e,t):cr(t)?yn(e,t):rn(t)?vi(e,t):Op(t)?pk(e):Sa(t)?ze.True:ze.False}function ev(e,t){return t.anyOf.some(n=>zt(e,n)===ze.True)?ze.True:ze.False}function hk(e,t){return e.anyOf.every(n=>zt(n,t)===ze.True)?ze.True:ze.False}function v3(e,t){return ze.True}function dk(e,t){return Ns(t)?m3():Ua(t)?Up(e,t):Lo(t)?ev(e,t):Mi(t)?Jw():Ui(t)?w3(e):Bn(t)?b3(e):Ho(t)?g3(e):Ma(t)?y3(e):Ra(t)?R5(e):Fp(t)?uk(e):cr(t)?yn(e,t):ji(t)?ze.True:ze.False}function pk(e,t){return Sa(e)||Sa(e)?ze.True:ze.False}function yk(e,t){return Ua(t)?Up(e,t):Lo(t)?ev(e,t):ji(t)?v3():Mi(t)?Jw():cr(t)?yn(e,t):Op(t)?ze.True:ze.False}function zt(e,t){return Xc(e)||Xc(t)?sk(e,t):Vc(e)||Vc(t)?nk(e,t):zu(e)||zu(t)?Q5(e,t):Mi(e)?B5(e,t):Ra(e)?M5(e,t):Sp(e)?j5(e,t):Ma(e)?N5(e,t):Dw(e)?U5(e,t):Ip(e)?D5(e,t):_p(e)?P5(e,t):Cp(e)?k5(e,t):Ho(e)?L5(e,t):Ua(e)?z5(e,t):Pw(e)?$5(e,t):js(e)?q5(e,t):Ns(e)?H5():kw(e)?G5(e,t):Bn(e)?K5(e,t):cr(e)?ek(e,t):rn(e)?rk(e,t):Ui(e)?ik(e,t):Wc(e)?ok(e,t):Fp(e)?lk(e,t):Lw(e)?tk(e,t):Af(e)?ck(e,t):Sa(e)?fk(e,t):Lo(e)?hk(e,t):ji(e)?dk(e,t):Op(e)?yk(e,t):il(`Unknown left type operand '${e[at]}'`)}function xf(e,t){return zt(e,t)}function gk(e,t,n,o,s){const u={};for(const l of globalThis.Object.getOwnPropertyNames(e))u[l]=tv(e[l],t,n,o,Zn(s));return u}function mk(e,t,n,o,s){return gk(e.properties,t,n,o,s)}function bk(e,t,n,o,s){const u=mk(e,t,n,o,s);return on(u)}function Ak(e,t,n,o){const s=xf(e,t);return s===ze.Union?sn([n,o]):s===ze.True?n:o}function tv(e,t,n,o,s){return ii(e)?bk(e,t,n,o,s):Oa(e)?nt(Ek(e,t,n,o,s)):nt(Ak(e,t,n,o),s)}function wk(e,t,n,o,s){return{[e]:tv(Cr(e),t,n,o,Zn(s))}}function vk(e,t,n,o,s){return e.reduce((u,l)=>({...u,...wk(l,t,n,o,s)}),{})}function xk(e,t,n,o,s){return vk(e.keys,t,n,o,s)}function Ek(e,t,n,o,s){const u=xk(e,t,n,o,s);return on(u)}function Sk(e){return e.allOf.every(t=>Ef(t))}function Ik(e){return e.anyOf.some(t=>Ef(t))}function _k(e){return!Ef(e.not)}function Ef(e){return e[at]==="Intersect"?Sk(e):e[at]==="Union"?Ik(e):e[at]==="Not"?_k(e):e[at]==="Undefined"}function Ck(e,t){return rv(Yd(e),t)}function Fk(e,t){const n=e.filter(o=>xf(o,t)===ze.False);return n.length===1?n[0]:sn(n)}function rv(e,t,n={}){return Ta(e)?nt(Ck(e,t),n):ii(e)?nt(Bk(e,t),n):nt(Gr(e)?Fk(e.anyOf,t):xf(e,t)!==ze.False?yr():e,n)}function Ok(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=rv(e[o],t);return n}function Tk(e,t){return Ok(e.properties,t)}function Bk(e,t){const n=Tk(e,t);return on(n)}function Rk(e,t){return nv(Yd(e),t)}function Mk(e,t){const n=e.filter(o=>xf(o,t)!==ze.False);return n.length===1?n[0]:sn(n)}function nv(e,t,n){return Ta(e)?nt(Rk(e,t),n):ii(e)?nt(Nk(e,t),n):nt(Gr(e)?Mk(e.anyOf,t):xf(e,t)!==ze.False?e:yr(),n)}function Uk(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=nv(e[o],t);return n}function jk(e,t){return Uk(e.properties,t)}function Nk(e,t){const n=jk(e,t);return on(n)}function Dk(e,t){return Xu(e)?nt(e.returns,t):yr(t)}function x3(e){return Ps(ks(e))}function Na(e,t,n){return nt({[at]:"Record",type:"object",patternProperties:{[e]:t}},n)}function iv(e,t,n){const o={};for(const s of e)o[s]=t;return Qr(o,{...n,[mp]:"Record"})}function Pk(e,t,n){return iP(e)?iv(Ds(e),t,n):Na(e.pattern,t,n)}function kk(e,t,n){return iv(Ds(sn(e)),t,n)}function Lk(e,t,n){return iv([e.toString()],t,n)}function zk(e,t,n){return Na(e.source,t,n)}function $k(e,t,n){const o=_r(e.pattern)?qu:e.pattern;return Na(o,t,n)}function qk(e,t,n){return Na(qu,t,n)}function Hk(e,t,n){return Na(jD,t,n)}function Qk(e,t,n){return Qr({true:t,false:t},n)}function Gk(e,t,n){return Na($u,t,n)}function Kk(e,t,n){return Na($u,t,n)}function E3(e,t,n={}){return Gr(e)?kk(e.anyOf,t,n):Ta(e)?Pk(e,t,n):Fa(e)?Lk(e.const,t,n):gf(e)?Qk(e,t,n):Ju(e)?Gk(e,t,n):el(e)?Kk(e,t,n):PT(e)?zk(e,t,n):bf(e)?$k(e,t,n):jT(e)?qk(e,t,n):mf(e)?Hk(e,t,n):yr(n)}function ov(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function Yk(e){const t=ov(e);return t===qu?Ia():t===$u?ja():Ia({pattern:t})}function S3(e){return e.patternProperties[ov(e)]}function Vk(e,t){return t.parameters=Sf(e,t.parameters),t.returns=Ni(e,t.returns),t}function Wk(e,t){return t.parameters=Sf(e,t.parameters),t.returns=Ni(e,t.returns),t}function Xk(e,t){return t.allOf=Sf(e,t.allOf),t}function Zk(e,t){return t.anyOf=Sf(e,t.anyOf),t}function Jk(e,t){return _r(t.items)||(t.items=Sf(e,t.items)),t}function eL(e,t){return t.items=Ni(e,t.items),t}function tL(e,t){return t.items=Ni(e,t.items),t}function rL(e,t){return t.items=Ni(e,t.items),t}function nL(e,t){return t.item=Ni(e,t.item),t}function iL(e,t){const n=uL(e,t.properties);return{...t,...Qr(n)}}function oL(e,t){const n=Ni(e,Yk(t)),o=Ni(e,S3(t)),s=E3(n,o);return{...t,...s}}function sL(e,t){return t.index in e?e[t.index]:Mp()}function aL(e,t){const n=Rw(t),o=Us(t),s=Ni(e,t);return n&&o?x3(s):n&&!o?Ps(s):!n&&o?ks(s):s}function uL(e,t){return globalThis.Object.getOwnPropertyNames(t).reduce((n,o)=>({...n,[o]:aL(e,t[o])}),{})}function Sf(e,t){return t.map(n=>Ni(e,n))}function Ni(e,t){return Xu(t)?Vk(e,t):Zu(t)?Wk(e,t):wi(t)?Xk(e,t):Gr(t)?Zk(e,t):Ba(t)?Jk(e,t):Vu(t)?eL(e,t):bp(t)?tL(e,t):wp(t)?rL(e,t):vp(t)?nL(e,t):Pi(t)?iL(e,t):xp(t)?oL(e,t):NT(t)?sL(e,t):t}function lL(e,t){return Ni(t,Ow(e))}function cL(e){return nt({[at]:"Integer",type:"integer"},e)}function fL(e,t,n){return{[e]:ol(Cr(e),t,Zn(n))}}function hL(e,t,n){return e.reduce((s,u)=>({...s,...fL(u,t,n)}),{})}function dL(e,t,n){return hL(e.keys,t,n)}function pL(e,t,n){const o=dL(e,t,n);return on(o)}function yL(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toLowerCase(),n].join("")}function gL(e){const[t,n]=[e.slice(0,1),e.slice(1)];return[t.toUpperCase(),n].join("")}function mL(e){return e.toUpperCase()}function bL(e){return e.toLowerCase()}function AL(e,t,n){const o=Kw(e.pattern);if(!ef(o))return{...e,pattern:I3(e.pattern,t)};const l=[...Tp(o)].map(f=>Cr(f)),c=_3(l,t),h=sn(c);return r3([h],n)}function I3(e,t){return typeof e=="string"?t==="Uncapitalize"?yL(e):t==="Capitalize"?gL(e):t==="Uppercase"?mL(e):t==="Lowercase"?bL(e):e:e.toString()}function _3(e,t){return e.map(n=>ol(n,t))}function ol(e,t,n={}){return Oa(e)?pL(e,t,n):Ta(e)?AL(e,t,n):Gr(e)?sn(_3(e.anyOf,t),n):Fa(e)?Cr(I3(e.const,t),n):nt(e,n)}function wL(e,t={}){return ol(e,"Capitalize",t)}function vL(e,t={}){return ol(e,"Lowercase",t)}function xL(e,t={}){return ol(e,"Uncapitalize",t)}function EL(e,t={}){return ol(e,"Uppercase",t)}function SL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Np(e[s],t,Zn(n));return o}function IL(e,t,n){return SL(e.properties,t,n)}function _L(e,t,n){const o=IL(e,t,n);return on(o)}function CL(e,t){return e.map(n=>sv(n,t))}function FL(e,t){return e.map(n=>sv(n,t))}function OL(e,t){const{[t]:n,...o}=e;return o}function TL(e,t){return t.reduce((n,o)=>OL(n,o),e)}function BL(e,t){const n=Jn(e,[Wn,"$id","required","properties"]),o=TL(e.properties,t);return Qr(o,n)}function RL(e){const t=e.reduce((n,o)=>DT(o)?[...n,Cr(o)]:n,[]);return sn(t)}function sv(e,t){return wi(e)?Ls(CL(e.allOf,t)):Gr(e)?sn(FL(e.anyOf,t)):Pi(e)?BL(e,t):Qr({})}function Np(e,t,n){const o=kn(t)?RL(t):t,s=Xn(t)?Ds(t):t,u=Nn(e),l=Nn(t);return ii(e)?_L(e,s,n):Oa(t)?NL(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({...sv(e,s),...n})}function ML(e,t,n){return{[t]:Np(e,[t],Zn(n))}}function UL(e,t,n){return t.reduce((o,s)=>({...o,...ML(e,s,n)}),{})}function jL(e,t,n){return UL(e,t.keys,n)}function NL(e,t,n){const o=jL(e,t,n);return on(o)}function DL(e,t,n){const o={};for(const s of globalThis.Object.getOwnPropertyNames(e))o[s]=Dp(e[s],t,Zn(n));return o}function PL(e,t,n){return DL(e.properties,t,n)}function kL(e,t,n){const o=PL(e,t,n);return on(o)}function LL(e,t){return e.map(n=>av(n,t))}function zL(e,t){return e.map(n=>av(n,t))}function $L(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function qL(e,t){const n=Jn(e,[Wn,"$id","required","properties"]),o=$L(e.properties,t);return Qr(o,n)}function HL(e){const t=e.reduce((n,o)=>DT(o)?[...n,Cr(o)]:n,[]);return sn(t)}function av(e,t){return wi(e)?Ls(LL(e.allOf,t)):Gr(e)?sn(zL(e.anyOf,t)):Pi(e)?qL(e,t):Qr({})}function Dp(e,t,n){const o=kn(t)?HL(t):t,s=Xn(t)?Ds(t):t,u=Nn(e),l=Nn(t);return ii(e)?kL(e,s,n):Oa(t)?YL(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({...av(e,s),...n})}function QL(e,t,n){return{[t]:Dp(e,[t],Zn(n))}}function GL(e,t,n){return t.reduce((o,s)=>({...o,...QL(e,s,n)}),{})}function KL(e,t,n){return GL(e,t.keys,n)}function YL(e,t,n){const o=KL(e,t,n);return on(o)}function VL(e,t){return Dr("Partial",[Dr(e,t)])}function WL(e){return Dr("Partial",[vf(e)])}function XL(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=ks(e[n]);return t}function ZL(e){const t=Jn(e,[Wn,"$id","required","properties"]),n=XL(e.properties);return Qr(n,t)}function UI(e){return e.map(t=>C3(t))}function C3(e){return Wu(e)?VL(e.target,e.parameters):Nn(e)?WL(e.$ref):wi(e)?Ls(UI(e.allOf)):Gr(e)?sn(UI(e.anyOf)):Pi(e)?ZL(e):Ap(e)||gf(e)||Ju(e)||Fa(e)||Mw(e)||el(e)||bf(e)||Uw(e)||Ep(e)?e:Qr({})}function uv(e,t){return ii(e)?tz(e,t):nt({...C3(e),...t})}function JL(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=uv(e[o],Zn(t));return n}function ez(e,t){return JL(e.properties,t)}function tz(e,t){const n=ez(e,t);return on(n)}function rz(e,t){return Dr("Required",[Dr(e,t)])}function nz(e){return Dr("Required",[vf(e)])}function iz(e){const t={};for(const n of globalThis.Object.getOwnPropertyNames(e))t[n]=Jn(e[n],[qo]);return t}function oz(e){const t=Jn(e,[Wn,"$id","required","properties"]),n=iz(e.properties);return Qr(n,t)}function jI(e){return e.map(t=>F3(t))}function F3(e){return Wu(e)?rz(e.target,e.parameters):Nn(e)?nz(e.$ref):wi(e)?Ls(jI(e.allOf)):Gr(e)?sn(jI(e.anyOf)):Pi(e)?oz(e):Ap(e)||gf(e)||Ju(e)||Fa(e)||Mw(e)||el(e)||bf(e)||Uw(e)||Ep(e)?e:Qr({})}function lv(e,t){return ii(e)?uz(e,t):nt({...F3(e),...t})}function sz(e,t){const n={};for(const o of globalThis.Object.getOwnPropertyNames(e))n[o]=lv(e[o],t);return n}function az(e,t){return sz(e.properties,t)}function uz(e,t){const n=az(e,t);return on(n)}function lz(e,t){return t.map(n=>Nn(n)?cv(e,n.$ref):ei(e,n))}function cv(e,t){return t in e?Nn(e[t])?cv(e,e[t].$ref):ei(e,e[t]):yr()}function cz(e){return Rp(e[0])}function fz(e){return Bp(e[0],e[1])}function hz(e){return Xw(e[0])}function dz(e){return uv(e[0])}function pz(e){return Np(e[0],e[1])}function yz(e){return Dp(e[0],e[1])}function gz(e){return lv(e[0])}function mz(e,t,n){const o=lz(e,n);return t==="Awaited"?cz(o):t==="Index"?fz(o):t==="KeyOf"?hz(o):t==="Partial"?dz(o):t==="Omit"?pz(o):t==="Pick"?yz(o):t==="Required"?gz(o):yr()}function bz(e,t){return qw(ei(e,t))}function Az(e,t){return Hw(ei(e,t))}function wz(e,t,n){return Qw(If(e,t),ei(e,n))}function vz(e,t,n){return wf(If(e,t),ei(e,n))}function xz(e,t){return Ls(If(e,t))}function Ez(e,t){return Ww(ei(e,t))}function Sz(e,t){return Qr(globalThis.Object.keys(t).reduce((n,o)=>({...n,[o]:ei(e,t[o])}),{}))}function Iz(e,t){const[n,o]=[ei(e,S3(t)),ov(t)],s=Ow(t);return s.patternProperties[o]=n,s}function _z(e,t){return Nn(t)?{...cv(e,t.$ref),[Wn]:t[Wn]}:t}function Cz(e,t){return rl(If(e,t))}function Fz(e,t){return sn(If(e,t))}function If(e,t){return t.map(n=>ei(e,n))}function ei(e,t){return Us(t)?nt(ei(e,Jn(t,[qo])),t):Rw(t)?nt(ei(e,Jn(t,[yf])),t):ar(t)?nt(_z(e,t),t):Vu(t)?nt(bz(e,t.items),t):bp(t)?nt(Az(e,t.items),t):Wu(t)?nt(mz(e,t.target,t.parameters)):Xu(t)?nt(wz(e,t.parameters,t.returns),t):Zu(t)?nt(vz(e,t.parameters,t.returns),t):wi(t)?nt(xz(e,t.allOf),t):wp(t)?nt(Ez(e,t.items),t):Pi(t)?nt(Sz(e,t.properties),t):xp(t)?nt(Iz(e,t)):Ba(t)?nt(Cz(e,t.items||[]),t):Gr(t)?nt(Fz(e,t.anyOf),t):t}function Oz(e,t){return t in e?ei(e,e[t]):yr()}function Tz(e){return globalThis.Object.getOwnPropertyNames(e).reduce((t,n)=>({...t,[n]:Oz(e,n)}),{})}class Bz{constructor(t){const n=Tz(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 Rz(e){return new Bz(e)}function Mz(e,t){return nt({[at]:"Not",not:e},t)}function Uz(e,t){return Zu(e)?rl(e.parameters,t):yr()}let jz=0;function Nz(e,t={}){_r(t.$id)&&(t.$id=`T${jz++}`);const n=Ow(e({[at]:"This",$ref:`${t.$id}`}));return n.$id=t.$id,nt({[mp]:"Recursive",...n},t)}function Dz(e,t){const n=br(e)?new globalThis.RegExp(e):e;return nt({[at]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},t)}function Pz(e){return wi(e)?e.allOf:Gr(e)?e.anyOf:Ba(e)?e.items??[]:[]}function kz(e){return Pz(e)}function Lz(e,t){return Zu(e)?nt(e.returns,t):yr(t)}class zz{constructor(t){this.schema=t}Decode(t){return new $z(this.schema,t)}}class $z{constructor(t,n){this.schema=t,this.decode=n}EncodeTransform(t,n){const u={Encode:l=>n[Wn].Encode(t(l)),Decode:l=>this.decode(n[Wn].Decode(l))};return{...n,[Wn]:u}}EncodeSchema(t,n){const o={Decode:this.decode,Encode:t};return{...n,[Wn]:o}}Encode(t){return ar(this.schema)?this.EncodeTransform(t,this.schema):this.EncodeSchema(t,this.schema)}}function qz(e){return new zz(e)}function Hz(e={}){return nt({[at]:e[at]??"Unsafe"},e)}function Qz(e){return nt({[at]:"Void",type:"void"},e)}const Gz=Object.freeze(Object.defineProperty({__proto__:null,Any:Zc,Argument:$D,Array:qw,AsyncIterator:Hw,Awaited:Rp,BigInt:Yw,Boolean:e3,Capitalize:wL,Composite:S5,Const:C5,Constructor:Qw,ConstructorParameters:F5,Date:c3,Enum:O5,Exclude:rv,Extends:tv,Extract:nv,Function:wf,Index:Bp,InstanceType:Dk,Instantiate:lL,Integer:cL,Intersect:Ls,Iterator:Ww,KeyOf:Xw,Literal:Cr,Lowercase:vL,Mapped:QP,Module:Rz,Never:yr,Not:Mz,Null:f3,Number:ja,Object:Qr,Omit:Np,Optional:ks,Parameters:Uz,Partial:uv,Pick:Dp,Promise:o3,Readonly:Ps,ReadonlyOptional:x3,Record:E3,Recursive:Nz,Ref:vf,RegExp:Dz,Required:lv,Rest:kz,ReturnType:Lz,String:Ia,Symbol:h3,TemplateLiteral:r3,Transform:qz,Tuple:rl,Uint8Array:p3,Uncapitalize:xL,Undefined:d3,Union:sn,Unknown:Mp,Unsafe:Hz,Uppercase:EL,Void:Qz},Symbol.toStringTag,{value:"Module"})),je=Gz;function Kz(e){switch(e.errorType){case Ne.ArrayContains:return"Expected array to contain at least one matching value";case Ne.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case Ne.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case Ne.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case Ne.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case Ne.ArrayUniqueItems:return"Expected array elements to be unique";case Ne.Array:return"Expected array";case Ne.AsyncIterator:return"Expected AsyncIterator";case Ne.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case Ne.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case Ne.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case Ne.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case Ne.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case Ne.BigInt:return"Expected bigint";case Ne.Boolean:return"Expected boolean";case Ne.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case Ne.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case Ne.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case Ne.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case Ne.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case Ne.Date:return"Expected Date";case Ne.Function:return"Expected function";case Ne.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case Ne.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case Ne.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case Ne.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case Ne.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case Ne.Integer:return"Expected integer";case Ne.IntersectUnevaluatedProperties:return"Unexpected property";case Ne.Intersect:return"Expected all values to match";case Ne.Iterator:return"Expected Iterator";case Ne.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case Ne.Never:return"Never";case Ne.Not:return"Value should not match";case Ne.Null:return"Expected null";case Ne.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case Ne.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case Ne.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case Ne.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case Ne.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case Ne.Number:return"Expected number";case Ne.Object:return"Expected object";case Ne.ObjectAdditionalProperties:return"Unexpected property";case Ne.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case Ne.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case Ne.ObjectRequiredProperty:return"Expected required property";case Ne.Promise:return"Expected Promise";case Ne.RegExp:return"Expected string to match regular expression";case Ne.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case Ne.StringFormat:return`Expected string to match '${e.schema.format}' format`;case Ne.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case Ne.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case Ne.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case Ne.String:return"Expected string";case Ne.Symbol:return"Expected symbol";case Ne.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case Ne.Tuple:return"Expected tuple";case Ne.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case Ne.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case Ne.Uint8Array:return"Expected Uint8Array";case Ne.Undefined:return"Expected undefined";case Ne.Union:return"Expected union value";case Ne.Void:return"Expected void";case Ne.Kind:return`Expected kind '${e.schema[at]}'`;default:return"Unknown error type"}}let Yz=Kz;function Vz(){return Yz}class Wz extends ni{constructor(t){super(`Unable to dereference schema with $id '${t.$ref}'`),this.schema=t}}function Xz(e,t){const n=t.find(o=>o.$id===e.$ref);if(n===void 0)throw new Wz(e);return Qo(n,t)}function fv(e,t){return!Vi(e.$id)||t.some(n=>n.$id===e.$id)||t.push(e),t}function Qo(e,t){return e[at]==="This"||e[at]==="Ref"?Xz(e,t):e}class Zz extends ni{constructor(t){super("Unable to hash value"),this.value=t}}var ti;(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"})(ti||(ti={}));let _u=BigInt("14695981039346656037");const[Jz,e7]=[BigInt("1099511628211"),BigInt("18446744073709551616")],t7=Array.from({length:256}).map((e,t)=>BigInt(t)),O3=new Float64Array(1),T3=new DataView(O3.buffer),B3=new Uint8Array(O3.buffer);function*r7(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(ti.Array);for(const t of e)Qu(t)}function i7(e){pn(ti.Boolean),pn(e?1:0)}function o7(e){pn(ti.BigInt),T3.setBigInt64(0,e);for(const t of B3)pn(t)}function s7(e){pn(ti.Date),Qu(e.getTime())}function a7(e){pn(ti.Null)}function u7(e){pn(ti.Number),T3.setFloat64(0,e);for(const t of B3)pn(t)}function l7(e){pn(ti.Object);for(const t of globalThis.Object.getOwnPropertyNames(e).sort())Qu(t),Qu(e[t])}function c7(e){pn(ti.String);for(let t=0;t<e.length;t++)for(const n of r7(e.charCodeAt(t)))pn(n)}function f7(e){pn(ti.Symbol),Qu(e.description)}function h7(e){pn(ti.Uint8Array);for(let t=0;t<e.length;t++)pn(e[t])}function d7(e){return pn(ti.Undefined)}function Qu(e){if(ko(e))return n7(e);if(pp(e))return i7(e);if(yp(e))return o7(e);if(Tw(e))return s7(e);if(dp(e))return a7();if(jo(e))return u7(e);if(_a(e))return l7(e);if(Vi(e))return c7(e);if(gp(e))return f7(e);if(Bw(e))return h7(e);if(Ca(e))return d7();throw new Zz(e)}function pn(e){_u=_u^t7[e],_u=_u*Jz%e7}function R3(e){return _u=BigInt("14695981039346656037"),Qu(e),_u}class p7 extends ni{constructor(t){super("Unknown type"),this.schema=t}}function y7(e){return e[at]==="Any"||e[at]==="Unknown"}function Ct(e){return e!==void 0}function g7(e,t,n){return!0}function m7(e,t,n){return!0}function b7(e,t,n){if(!ko(n)||Ct(e.minItems)&&!(n.length>=e.minItems)||Ct(e.maxItems)&&!(n.length<=e.maxItems)||!n.every(u=>$r(e.items,t,u))||e.uniqueItems===!0&&!(function(){const u=new Set;for(const l of n){const c=R3(l);if(u.has(c))return!1;u.add(c)}return!0})())return!1;if(!(Ct(e.contains)||jo(e.minContains)||jo(e.maxContains)))return!0;const o=Ct(e.contains)?e.contains:yr(),s=n.reduce((u,l)=>$r(o,t,l)?u+1:u,0);return!(s===0||jo(e.minContains)&&s<e.minContains||jo(e.maxContains)&&s>e.maxContains)}function A7(e,t,n){return TT(n)}function w7(e,t,n){return!(!yp(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 v7(e,t,n){return pp(n)}function x7(e,t,n){return $r(e.returns,t,n.prototype)}function E7(e,t,n){return!(!Tw(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 S7(e,t,n){return UT(n)}function I7(e,t,n){const o=globalThis.Object.values(e.$defs),s=e.$defs[e.$ref];return $r(s,[...t,...o],n)}function _7(e,t,n){return!(!MT(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 C7(e,t,n){const o=e.allOf.every(s=>$r(s,t,n));if(e.unevaluatedProperties===!1){const s=new RegExp(Vd(e)),u=Object.getOwnPropertyNames(n).every(l=>s.test(l));return o&&u}else if(Xn(e.unevaluatedProperties)){const s=new RegExp(Vd(e)),u=Object.getOwnPropertyNames(n).every(l=>s.test(l)||$r(e.unevaluatedProperties,t,n[l]));return o&&u}else return o}function F7(e,t,n){return BT(n)}function O7(e,t,n){return n===e.const}function T7(e,t,n){return!1}function B7(e,t,n){return!$r(e.not,t,n)}function R7(e,t,n){return dp(n)}function M7(e,t,n){return!(!jn.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 U7(e,t,n){if(!jn.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(!$r(u,t,n[s])||(Ef(u)||y7(u))&&!(s in n))return!1}else if(jn.IsExactOptionalProperty(n,s)&&!$r(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)||$r(e.additionalProperties,t,n[u])):!0}function j7(e,t,n){return RT(n)}function N7(e,t,n){if(!jn.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)?$r(s,t,p):!0),c=typeof e.additionalProperties=="object"?Object.entries(n).every(([f,p])=>u.test(f)?!0:$r(e.additionalProperties,t,p)):!0,h=e.additionalProperties===!1?Object.getOwnPropertyNames(n).every(f=>u.test(f)):!0;return l&&c&&h}function D7(e,t,n){return $r(Qo(e,t),t,n)}function P7(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 k7(e,t,n){return!Vi(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)?KT(e.format)?YT(e.format)(n):!1:!0}function L7(e,t,n){return gp(n)}function z7(e,t,n){return Vi(n)&&new RegExp(e.pattern).test(n)}function $7(e,t,n){return $r(Qo(e,t),t,n)}function q7(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(!$r(e.items[o],t,n[o]))return!1;return!0}function H7(e,t,n){return Ca(n)}function Q7(e,t,n){return e.anyOf.some(o=>$r(o,t,n))}function G7(e,t,n){return!(!Bw(n)||Ct(e.maxByteLength)&&!(n.length<=e.maxByteLength)||Ct(e.minByteLength)&&!(n.length>=e.minByteLength))}function K7(e,t,n){return!0}function Y7(e,t,n){return jn.IsVoidLike(n)}function V7(e,t,n){return $w(e[at])?WT(e[at])(e,n):!1}function $r(e,t,n){const o=Ct(e.$id)?fv(e,t):t,s=e;switch(s[at]){case"Any":return g7();case"Argument":return m7();case"Array":return b7(s,o,n);case"AsyncIterator":return A7(s,o,n);case"BigInt":return w7(s,o,n);case"Boolean":return v7(s,o,n);case"Constructor":return x7(s,o,n);case"Date":return E7(s,o,n);case"Function":return S7(s,o,n);case"Import":return I7(s,o,n);case"Integer":return _7(s,o,n);case"Intersect":return C7(s,o,n);case"Iterator":return F7(s,o,n);case"Literal":return O7(s,o,n);case"Never":return T7();case"Not":return B7(s,o,n);case"Null":return R7(s,o,n);case"Number":return M7(s,o,n);case"Object":return U7(s,o,n);case"Promise":return j7(s,o,n);case"Record":return N7(s,o,n);case"Ref":return D7(s,o,n);case"RegExp":return P7(s,o,n);case"String":return k7(s,o,n);case"Symbol":return L7(s,o,n);case"TemplateLiteral":return z7(s,o,n);case"This":return $7(s,o,n);case"Tuple":return q7(s,o,n);case"Undefined":return H7(s,o,n);case"Union":return Q7(s,o,n);case"Uint8Array":return G7(s,o,n);case"Unknown":return K7();case"Void":return Y7(s,o,n);default:if(!$w(s[at]))throw new p7(s);return V7(s,o,n)}}function hv(...e){return e.length===3?$r(e[0],e[1],e[2]):$r(e[0],[],e[1])}var Ne;(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"})(Ne||(Ne={}));class W7 extends ni{constructor(t){super("Unknown type"),this.schema=t}}function To(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function _t(e){return e!==void 0}class M3{constructor(t){this.iterator=t}[Symbol.iterator](){return this.iterator}First(){const t=this.iterator.next();return t.done?void 0:t.value}}function ot(e,t,n,o,s=[]){return{type:e,schema:t,path:n,value:o,message:Vz()({errorType:e,path:n,schema:t,value:o,errors:s}),errors:s}}function*X7(e,t,n,o){}function*Z7(e,t,n,o){}function*J7(e,t,n,o){if(!ko(o))return yield ot(Ne.Array,e,n,o);_t(e.minItems)&&!(o.length>=e.minItems)&&(yield ot(Ne.ArrayMinItems,e,n,o)),_t(e.maxItems)&&!(o.length<=e.maxItems)&&(yield ot(Ne.ArrayMaxItems,e,n,o));for(let l=0;l<o.length;l++)yield*qr(e.items,t,`${n}/${l}`,o[l]);if(e.uniqueItems===!0&&!(function(){const l=new Set;for(const c of o){const h=R3(c);if(l.has(h))return!1;l.add(h)}return!0})()&&(yield ot(Ne.ArrayUniqueItems,e,n,o)),!(_t(e.contains)||_t(e.minContains)||_t(e.maxContains)))return;const s=_t(e.contains)?e.contains:yr(),u=o.reduce((l,c,h)=>qr(s,t,`${n}${h}`,c).next().done===!0?l+1:l,0);u===0&&(yield ot(Ne.ArrayContains,e,n,o)),jo(e.minContains)&&u<e.minContains&&(yield ot(Ne.ArrayMinContains,e,n,o)),jo(e.maxContains)&&u>e.maxContains&&(yield ot(Ne.ArrayMaxContains,e,n,o))}function*e9(e,t,n,o){TT(o)||(yield ot(Ne.AsyncIterator,e,n,o))}function*t9(e,t,n,o){if(!yp(o))return yield ot(Ne.BigInt,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield ot(Ne.BigIntExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield ot(Ne.BigIntExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield ot(Ne.BigIntMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield ot(Ne.BigIntMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==BigInt(0)&&(yield ot(Ne.BigIntMultipleOf,e,n,o))}function*r9(e,t,n,o){pp(o)||(yield ot(Ne.Boolean,e,n,o))}function*n9(e,t,n,o){yield*qr(e.returns,t,n,o.prototype)}function*i9(e,t,n,o){if(!Tw(o))return yield ot(Ne.Date,e,n,o);_t(e.exclusiveMaximumTimestamp)&&!(o.getTime()<e.exclusiveMaximumTimestamp)&&(yield ot(Ne.DateExclusiveMaximumTimestamp,e,n,o)),_t(e.exclusiveMinimumTimestamp)&&!(o.getTime()>e.exclusiveMinimumTimestamp)&&(yield ot(Ne.DateExclusiveMinimumTimestamp,e,n,o)),_t(e.maximumTimestamp)&&!(o.getTime()<=e.maximumTimestamp)&&(yield ot(Ne.DateMaximumTimestamp,e,n,o)),_t(e.minimumTimestamp)&&!(o.getTime()>=e.minimumTimestamp)&&(yield ot(Ne.DateMinimumTimestamp,e,n,o)),_t(e.multipleOfTimestamp)&&o.getTime()%e.multipleOfTimestamp!==0&&(yield ot(Ne.DateMultipleOfTimestamp,e,n,o))}function*o9(e,t,n,o){UT(o)||(yield ot(Ne.Function,e,n,o))}function*s9(e,t,n,o){const s=globalThis.Object.values(e.$defs),u=e.$defs[e.$ref];yield*qr(u,[...t,...s],n,o)}function*a9(e,t,n,o){if(!MT(o))return yield ot(Ne.Integer,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield ot(Ne.IntegerExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield ot(Ne.IntegerExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield ot(Ne.IntegerMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield ot(Ne.IntegerMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==0&&(yield ot(Ne.IntegerMultipleOf,e,n,o))}function*u9(e,t,n,o){let s=!1;for(const u of e.allOf)for(const l of qr(u,t,n,o))s=!0,yield l;if(s)return yield ot(Ne.Intersect,e,n,o);if(e.unevaluatedProperties===!1){const u=new RegExp(Vd(e));for(const l of Object.getOwnPropertyNames(o))u.test(l)||(yield ot(Ne.IntersectUnevaluatedProperties,e,`${n}/${l}`,o))}if(typeof e.unevaluatedProperties=="object"){const u=new RegExp(Vd(e));for(const l of Object.getOwnPropertyNames(o))if(!u.test(l)){const c=qr(e.unevaluatedProperties,t,`${n}/${l}`,o[l]).next();c.done||(yield c.value)}}}function*l9(e,t,n,o){BT(o)||(yield ot(Ne.Iterator,e,n,o))}function*c9(e,t,n,o){o!==e.const&&(yield ot(Ne.Literal,e,n,o))}function*f9(e,t,n,o){yield ot(Ne.Never,e,n,o)}function*h9(e,t,n,o){qr(e.not,t,n,o).next().done===!0&&(yield ot(Ne.Not,e,n,o))}function*d9(e,t,n,o){dp(o)||(yield ot(Ne.Null,e,n,o))}function*p9(e,t,n,o){if(!jn.IsNumberLike(o))return yield ot(Ne.Number,e,n,o);_t(e.exclusiveMaximum)&&!(o<e.exclusiveMaximum)&&(yield ot(Ne.NumberExclusiveMaximum,e,n,o)),_t(e.exclusiveMinimum)&&!(o>e.exclusiveMinimum)&&(yield ot(Ne.NumberExclusiveMinimum,e,n,o)),_t(e.maximum)&&!(o<=e.maximum)&&(yield ot(Ne.NumberMaximum,e,n,o)),_t(e.minimum)&&!(o>=e.minimum)&&(yield ot(Ne.NumberMinimum,e,n,o)),_t(e.multipleOf)&&o%e.multipleOf!==0&&(yield ot(Ne.NumberMultipleOf,e,n,o))}function*y9(e,t,n,o){if(!jn.IsObjectLike(o))return yield ot(Ne.Object,e,n,o);_t(e.minProperties)&&!(Object.getOwnPropertyNames(o).length>=e.minProperties)&&(yield ot(Ne.ObjectMinProperties,e,n,o)),_t(e.maxProperties)&&!(Object.getOwnPropertyNames(o).length<=e.maxProperties)&&(yield ot(Ne.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 ot(Ne.ObjectRequiredProperty,e.properties[c],`${n}/${To(c)}`,void 0));if(e.additionalProperties===!1)for(const c of l)u.includes(c)||(yield ot(Ne.ObjectAdditionalProperties,e,`${n}/${To(c)}`,o[c]));if(typeof e.additionalProperties=="object")for(const c of l)u.includes(c)||(yield*qr(e.additionalProperties,t,`${n}/${To(c)}`,o[c]));for(const c of u){const h=e.properties[c];e.required&&e.required.includes(c)?(yield*qr(h,t,`${n}/${To(c)}`,o[c]),Ef(e)&&!(c in o)&&(yield ot(Ne.ObjectRequiredProperty,h,`${n}/${To(c)}`,void 0))):jn.IsExactOptionalProperty(o,c)&&(yield*qr(h,t,`${n}/${To(c)}`,o[c]))}}function*g9(e,t,n,o){RT(o)||(yield ot(Ne.Promise,e,n,o))}function*m9(e,t,n,o){if(!jn.IsRecordLike(o))return yield ot(Ne.Object,e,n,o);_t(e.minProperties)&&!(Object.getOwnPropertyNames(o).length>=e.minProperties)&&(yield ot(Ne.ObjectMinProperties,e,n,o)),_t(e.maxProperties)&&!(Object.getOwnPropertyNames(o).length<=e.maxProperties)&&(yield ot(Ne.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*qr(u,t,`${n}/${To(c)}`,h));if(typeof e.additionalProperties=="object")for(const[c,h]of Object.entries(o))l.test(c)||(yield*qr(e.additionalProperties,t,`${n}/${To(c)}`,h));if(e.additionalProperties===!1){for(const[c,h]of Object.entries(o))if(!l.test(c))return yield ot(Ne.ObjectAdditionalProperties,e,`${n}/${To(c)}`,h)}}function*b9(e,t,n,o){yield*qr(Qo(e,t),t,n,o)}function*A9(e,t,n,o){if(!Vi(o))return yield ot(Ne.String,e,n,o);if(_t(e.minLength)&&!(o.length>=e.minLength)&&(yield ot(Ne.StringMinLength,e,n,o)),_t(e.maxLength)&&!(o.length<=e.maxLength)&&(yield ot(Ne.StringMaxLength,e,n,o)),!new RegExp(e.source,e.flags).test(o))return yield ot(Ne.RegExp,e,n,o)}function*w9(e,t,n,o){if(!Vi(o))return yield ot(Ne.String,e,n,o);_t(e.minLength)&&!(o.length>=e.minLength)&&(yield ot(Ne.StringMinLength,e,n,o)),_t(e.maxLength)&&!(o.length<=e.maxLength)&&(yield ot(Ne.StringMaxLength,e,n,o)),Vi(e.pattern)&&(new RegExp(e.pattern).test(o)||(yield ot(Ne.StringPattern,e,n,o))),Vi(e.format)&&(KT(e.format)?YT(e.format)(o)||(yield ot(Ne.StringFormat,e,n,o)):yield ot(Ne.StringFormatUnknown,e,n,o))}function*v9(e,t,n,o){gp(o)||(yield ot(Ne.Symbol,e,n,o))}function*x9(e,t,n,o){if(!Vi(o))return yield ot(Ne.String,e,n,o);new RegExp(e.pattern).test(o)||(yield ot(Ne.StringPattern,e,n,o))}function*E9(e,t,n,o){yield*qr(Qo(e,t),t,n,o)}function*S9(e,t,n,o){if(!ko(o))return yield ot(Ne.Tuple,e,n,o);if(e.items===void 0&&o.length!==0)return yield ot(Ne.TupleLength,e,n,o);if(o.length!==e.maxItems)return yield ot(Ne.TupleLength,e,n,o);if(e.items)for(let s=0;s<e.items.length;s++)yield*qr(e.items[s],t,`${n}/${s}`,o[s])}function*I9(e,t,n,o){Ca(o)||(yield ot(Ne.Undefined,e,n,o))}function*_9(e,t,n,o){if(hv(e,t,o))return;const s=e.anyOf.map(u=>new M3(qr(u,t,n,o)));yield ot(Ne.Union,e,n,o,s)}function*C9(e,t,n,o){if(!Bw(o))return yield ot(Ne.Uint8Array,e,n,o);_t(e.maxByteLength)&&!(o.length<=e.maxByteLength)&&(yield ot(Ne.Uint8ArrayMaxByteLength,e,n,o)),_t(e.minByteLength)&&!(o.length>=e.minByteLength)&&(yield ot(Ne.Uint8ArrayMinByteLength,e,n,o))}function*F9(e,t,n,o){}function*O9(e,t,n,o){jn.IsVoidLike(o)||(yield ot(Ne.Void,e,n,o))}function*T9(e,t,n,o){WT(e[at])(e,o)||(yield ot(Ne.Kind,e,n,o))}function*qr(e,t,n,o){const s=_t(e.$id)?[...t,e]:t,u=e;switch(u[at]){case"Any":return yield*X7();case"Argument":return yield*Z7();case"Array":return yield*J7(u,s,n,o);case"AsyncIterator":return yield*e9(u,s,n,o);case"BigInt":return yield*t9(u,s,n,o);case"Boolean":return yield*r9(u,s,n,o);case"Constructor":return yield*n9(u,s,n,o);case"Date":return yield*i9(u,s,n,o);case"Function":return yield*o9(u,s,n,o);case"Import":return yield*s9(u,s,n,o);case"Integer":return yield*a9(u,s,n,o);case"Intersect":return yield*u9(u,s,n,o);case"Iterator":return yield*l9(u,s,n,o);case"Literal":return yield*c9(u,s,n,o);case"Never":return yield*f9(u,s,n,o);case"Not":return yield*h9(u,s,n,o);case"Null":return yield*d9(u,s,n,o);case"Number":return yield*p9(u,s,n,o);case"Object":return yield*y9(u,s,n,o);case"Promise":return yield*g9(u,s,n,o);case"Record":return yield*m9(u,s,n,o);case"Ref":return yield*b9(u,s,n,o);case"RegExp":return yield*A9(u,s,n,o);case"String":return yield*w9(u,s,n,o);case"Symbol":return yield*v9(u,s,n,o);case"TemplateLiteral":return yield*x9(u,s,n,o);case"This":return yield*E9(u,s,n,o);case"Tuple":return yield*S9(u,s,n,o);case"Undefined":return yield*I9(u,s,n,o);case"Union":return yield*_9(u,s,n,o);case"Uint8Array":return yield*C9(u,s,n,o);case"Unknown":return yield*F9();case"Void":return yield*O9(u,s,n,o);default:if(!$w(u[at]))throw new W7(e);return yield*T9(u,s,n,o)}}function B9(...e){const t=e.length===3?qr(e[0],e[1],"",e[2]):qr(e[0],[],"",e[1]);return new M3(t)}class R9 extends ni{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 M9 extends ni{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 sr(e,t,n){try{return ar(e)?e[Wn].Decode(n):n}catch(o){throw new M9(e,t,n,o)}}function U9(e,t,n,o){return ko(o)?sr(e,n,o.map((s,u)=>ki(e.items,t,`${n}/${u}`,s))):sr(e,n,o)}function j9(e,t,n,o){if(!_a(o)||lD(o))return sr(e,n,o);const s=A5(e),u=s.map(p=>p[0]),l={...o};for(const[p,y]of s)p in l&&(l[p]=ki(y,t,`${n}/${p}`,l[p]));if(!ar(e.unevaluatedProperties))return sr(e,n,l);const c=Object.getOwnPropertyNames(l),h=e.unevaluatedProperties,f={...l};for(const p of c)u.includes(p)||(f[p]=sr(h,`${n}/${p}`,f[p]));return sr(e,n,f)}function N9(e,t,n,o){const s=globalThis.Object.values(e.$defs),u=e.$defs[e.$ref],l=ki(u,[...t,...s],n,o);return sr(e,n,l)}function D9(e,t,n,o){return sr(e,n,ki(e.not,t,n,o))}function P9(e,t,n,o){if(!_a(o))return sr(e,n,o);const s=nl(e),u={...o};for(const f of s)uD(u,f)&&(Ca(u[f])&&(!Ep(e.properties[f])||jn.IsExactOptionalProperty(u,f))||(u[f]=ki(e.properties[f],t,`${n}/${f}`,u[f])));if(!Xn(e.additionalProperties))return sr(e,n,u);const l=Object.getOwnPropertyNames(u),c=e.additionalProperties,h={...u};for(const f of l)s.includes(f)||(h[f]=sr(c,`${n}/${f}`,h[f]));return sr(e,n,h)}function k9(e,t,n,o){if(!_a(o))return sr(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]=ki(e.patternProperties[s],t,`${n}/${p}`,l[p]));if(!Xn(e.additionalProperties))return sr(e,n,l);const c=Object.getOwnPropertyNames(l),h=e.additionalProperties,f={...l};for(const p of c)u.test(p)||(f[p]=sr(h,`${n}/${p}`,f[p]));return sr(e,n,f)}function L9(e,t,n,o){const s=Qo(e,t);return sr(e,n,ki(s,t,n,o))}function z9(e,t,n,o){const s=Qo(e,t);return sr(e,n,ki(s,t,n,o))}function $9(e,t,n,o){return ko(o)&&ko(e.items)?sr(e,n,e.items.map((s,u)=>ki(s,t,`${n}/${u}`,o[u]))):sr(e,n,o)}function q9(e,t,n,o){for(const s of e.anyOf){if(!hv(s,t,o))continue;const u=ki(s,t,n,o);return sr(e,n,u)}return sr(e,n,o)}function ki(e,t,n,o){const s=fv(e,t),u=e;switch(e[at]){case"Array":return U9(u,s,n,o);case"Import":return N9(u,s,n,o);case"Intersect":return j9(u,s,n,o);case"Not":return D9(u,s,n,o);case"Object":return P9(u,s,n,o);case"Record":return k9(u,s,n,o);case"Ref":return L9(u,s,n,o);case"Symbol":return sr(u,n,o);case"This":return z9(u,s,n,o);case"Tuple":return $9(u,s,n,o);case"Union":return q9(u,s,n,o);default:return sr(u,n,o)}}function H9(e,t,n){return ki(e,t,"",n)}function Q9(e,t){return ar(e)||Pr(e.items,t)}function G9(e,t){return ar(e)||Pr(e.items,t)}function K9(e,t){return ar(e)||Pr(e.returns,t)||e.parameters.some(n=>Pr(n,t))}function Y9(e,t){return ar(e)||Pr(e.returns,t)||e.parameters.some(n=>Pr(n,t))}function V9(e,t){return ar(e)||ar(e.unevaluatedProperties)||e.allOf.some(n=>Pr(n,t))}function W9(e,t){const n=globalThis.Object.getOwnPropertyNames(e.$defs).reduce((s,u)=>[...s,e.$defs[u]],[]),o=e.$defs[e.$ref];return ar(e)||Pr(o,[...n,...t])}function X9(e,t){return ar(e)||Pr(e.items,t)}function Z9(e,t){return ar(e)||Pr(e.not,t)}function J9(e,t){return ar(e)||Object.values(e.properties).some(n=>Pr(n,t))||Xn(e.additionalProperties)&&Pr(e.additionalProperties,t)}function e$(e,t){return ar(e)||Pr(e.item,t)}function t$(e,t){const n=Object.getOwnPropertyNames(e.patternProperties)[0],o=e.patternProperties[n];return ar(e)||Pr(o,t)||Xn(e.additionalProperties)&&ar(e.additionalProperties)}function r$(e,t){return ar(e)?!0:Pr(Qo(e,t),t)}function n$(e,t){return ar(e)?!0:Pr(Qo(e,t),t)}function i$(e,t){return ar(e)||!Ca(e.items)&&e.items.some(n=>Pr(n,t))}function o$(e,t){return ar(e)||e.anyOf.some(n=>Pr(n,t))}function Pr(e,t){const n=fv(e,t),o=e;if(e.$id&&qb.has(e.$id))return!1;switch(e.$id&&qb.add(e.$id),e[at]){case"Array":return Q9(o,n);case"AsyncIterator":return G9(o,n);case"Constructor":return K9(o,n);case"Function":return Y9(o,n);case"Import":return W9(o,n);case"Intersect":return V9(o,n);case"Iterator":return X9(o,n);case"Not":return Z9(o,n);case"Object":return J9(o,n);case"Promise":return e$(o,n);case"Record":return t$(o,n);case"Ref":return r$(o,n);case"This":return n$(o,n);case"Tuple":return i$(o,n);case"Union":return o$(o,n);default:return ar(e)}}const qb=new Set;function s$(e,t){return qb.clear(),Pr(e,t)}function a$(...e){const[t,n,o]=e.length===3?[e[0],e[1],e[2]]:[e[0],[],e[1]];if(!hv(t,n,o))throw new R9(t,o,B9(t,n,o).First());return s$(t,n)?H9(t,n,o):o}var Eo={},Om={exports:{}},Tm={},Bm={},Rm={},Mm,NI;function dv(){return NI||(NI=1,Mm=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}),Mm}var Um,DI;function Pp(){if(DI)return Um;DI=1;var e=dv();return Um=function(){return e()&&!!Symbol.toStringTag},Um}var jm,PI;function pv(){return PI||(PI=1,jm=Object),jm}var Nm,kI;function u$(){return kI||(kI=1,Nm=Error),Nm}var Dm,LI;function l$(){return LI||(LI=1,Dm=EvalError),Dm}var Pm,zI;function c$(){return zI||(zI=1,Pm=RangeError),Pm}var km,$I;function f$(){return $I||($I=1,km=ReferenceError),km}var Lm,qI;function U3(){return qI||(qI=1,Lm=SyntaxError),Lm}var zm,HI;function _f(){return HI||(HI=1,zm=TypeError),zm}var $m,QI;function h$(){return QI||(QI=1,$m=URIError),$m}var qm,GI;function d$(){return GI||(GI=1,qm=Math.abs),qm}var Hm,KI;function p$(){return KI||(KI=1,Hm=Math.floor),Hm}var Qm,YI;function y$(){return YI||(YI=1,Qm=Math.max),Qm}var Gm,VI;function g$(){return VI||(VI=1,Gm=Math.min),Gm}var Km,WI;function m$(){return WI||(WI=1,Km=Math.pow),Km}var Ym,XI;function b$(){return XI||(XI=1,Ym=Math.round),Ym}var Vm,ZI;function A$(){return ZI||(ZI=1,Vm=Number.isNaN||function(t){return t!==t}),Vm}var Wm,JI;function w$(){if(JI)return Wm;JI=1;var e=A$();return Wm=function(n){return e(n)||n===0?n:n<0?-1:1},Wm}var Xm,e_;function v$(){return e_||(e_=1,Xm=Object.getOwnPropertyDescriptor),Xm}var Zm,t_;function sl(){if(t_)return Zm;t_=1;var e=v$();if(e)try{e([],"length")}catch{e=null}return Zm=e,Zm}var Jm,r_;function kp(){if(r_)return Jm;r_=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Jm=e,Jm}var e0,n_;function x$(){if(n_)return e0;n_=1;var e=typeof Symbol<"u"&&Symbol,t=dv();return e0=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},e0}var t0,i_;function j3(){return i_||(i_=1,t0=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),t0}var r0,o_;function N3(){if(o_)return r0;o_=1;var e=pv();return r0=e.getPrototypeOf||null,r0}var n0,s_;function E$(){if(s_)return n0;s_=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 n0=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))},m=n(0,f.length-p.length),w=[],F=0;F<m;F++)w[F]="$"+F;if(y=Function("binder","return function ("+l(w,",")+"){ return binder.apply(this,arguments); }")(g),f.prototype){var S=function(){};S.prototype=f.prototype,y.prototype=new S,S.prototype=null}return y},n0}var i0,a_;function Cf(){if(a_)return i0;a_=1;var e=E$();return i0=Function.prototype.bind||e,i0}var o0,u_;function yv(){return u_||(u_=1,o0=Function.prototype.call),o0}var s0,l_;function gv(){return l_||(l_=1,s0=Function.prototype.apply),s0}var a0,c_;function S$(){return c_||(c_=1,a0=typeof Reflect<"u"&&Reflect&&Reflect.apply),a0}var u0,f_;function D3(){if(f_)return u0;f_=1;var e=Cf(),t=gv(),n=yv(),o=S$();return u0=o||e.call(n,t),u0}var l0,h_;function mv(){if(h_)return l0;h_=1;var e=Cf(),t=_f(),n=yv(),o=D3();return l0=function(u){if(u.length<1||typeof u[0]!="function")throw new t("a function is required");return o(e,n,u)},l0}var c0,d_;function I$(){if(d_)return c0;d_=1;var e=mv(),t=sl(),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 c0=o&&typeof o.get=="function"?e([o.get]):typeof u=="function"?function(c){return u(c==null?c:s(c))}:!1,c0}var f0,p_;function bv(){if(p_)return f0;p_=1;var e=j3(),t=N3(),n=I$();return f0=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,f0}var h0,y_;function P3(){if(y_)return h0;y_=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Cf();return h0=n.call(e,t),h0}var d0,g_;function Av(){if(g_)return d0;g_=1;var e,t=pv(),n=u$(),o=l$(),s=c$(),u=f$(),l=U3(),c=_f(),h=h$(),f=d$(),p=p$(),y=y$(),g=g$(),m=m$(),w=b$(),F=w$(),S=Function,M=function(Z){try{return S('"use strict"; return ('+Z+").constructor;")()}catch{}},A=sl(),I=kp(),R=function(){throw new c},T=A?(function(){try{return arguments.callee,R}catch{try{return A(arguments,"callee").get}catch{return R}}})():R,z=x$()(),k=bv(),L=N3(),U=j3(),j=gv(),H=yv(),P={},te=typeof Uint8Array>"u"||!k?e:k(Uint8Array),ue={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":z&&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%":S,"%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%":z&&k?k(k([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!z||!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"||!z||!k?e:k(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&k?k(""[Symbol.iterator]()):e,"%Symbol%":z?Symbol:e,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":te,"%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%":H,"%Function.prototype.apply%":j,"%Object.defineProperty%":I,"%Object.getPrototypeOf%":L,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":y,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":w,"%Math.sign%":F,"%Reflect.getPrototypeOf%":U};if(k)try{null.error}catch(Z){var oe=k(k(Z));ue["%Error.prototype%"]=oe}var X=function Z(O){var q;if(O==="%AsyncFunction%")q=M("async function () {}");else if(O==="%GeneratorFunction%")q=M("function* () {}");else if(O==="%AsyncGeneratorFunction%")q=M("async function* () {}");else if(O==="%AsyncGenerator%"){var Y=Z("%AsyncGeneratorFunction%");Y&&(q=Y.prototype)}else if(O==="%AsyncIteratorPrototype%"){var se=Z("%AsyncGenerator%");se&&k&&(q=k(se.prototype))}return ue[O]=q,q},re={__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=Cf(),le=P3(),J=pe.call(H,Array.prototype.concat),G=pe.call(j,Array.prototype.splice),Q=pe.call(H,String.prototype.replace),K=pe.call(H,String.prototype.slice),W=pe.call(H,RegExp.prototype.exec),$=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fe=/\\(\\)?/g,ae=function(O){var q=K(O,0,1),Y=K(O,-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 Q(O,$,function(ye,ee,_,v){se[se.length]=_?Q(v,fe,"$1"):ee||ye}),se},ne=function(O,q){var Y=O,se;if(le(re,Y)&&(se=re[Y],Y="%"+se[0]+"%"),le(ue,Y)){var ye=ue[Y];if(ye===P&&(ye=X(Y)),typeof ye>"u"&&!q)throw new c("intrinsic "+O+" exists, but is not available. Please file an issue!");return{alias:se,name:Y,value:ye}}throw new l("intrinsic "+O+" does not exist!")};return d0=function(O,q){if(typeof O!="string"||O.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(/^%?[^%]*%?$/,O)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Y=ae(O),se=Y.length>0?Y[0]:"",ye=ne("%"+se+"%",q),ee=ye.name,_=ye.value,v=!1,C=ye.alias;C&&(se=C[0],G(Y,J([0,1],C)));for(var D=1,he=!0;D<Y.length;D+=1){var ce=Y[D],Ee=K(ce,0,1),Be=K(ce,-1);if((Ee==='"'||Ee==="'"||Ee==="`"||Be==='"'||Be==="'"||Be==="`")&&Ee!==Be)throw new l("property names with quotes must have matching quotes");if((ce==="constructor"||!he)&&(v=!0),se+="."+ce,ee="%"+se+"%",le(ue,ee))_=ue[ee];else if(_!=null){if(!(ce in _)){if(!q)throw new c("base intrinsic for "+O+" exists, but the property is not available.");return}if(A&&D+1>=Y.length){var de=A(_,ce);he=!!de,he&&"get"in de&&!("originalValue"in de.get)?_=de.get:_=_[ce]}else he=le(_,ce),_=_[ce];he&&!v&&(ue[ee]=_)}}return _},d0}var p0,m_;function al(){if(m_)return p0;m_=1;var e=Av(),t=mv(),n=t([e("%String.prototype.indexOf%")]);return p0=function(s,u){var l=e(s,!!u);return typeof l=="function"&&n(s,".prototype.")>-1?t([l]):l},p0}var y0,b_;function _$(){if(b_)return y0;b_=1;var e=Pp()(),t=al(),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,y0=u?o:s,y0}var g0,A_;function C$(){if(A_)return g0;A_=1;var e=al(),t=Pp()(),n=P3(),o=sl(),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 m=o(g,"lastIndex"),w=m&&n(m,"value");if(!w)return!1;try{u(g,h)}catch(F){return F===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 g0=s,g0}var m0,w_;function F$(){if(w_)return m0;w_=1;var e=al(),t=C$(),n=e("RegExp.prototype.exec"),o=_f();return m0=function(u){if(!t(u))throw new o("`regex` must be a RegExp");return function(c){return n(u,c)!==null}},m0}var b0,v_;function O$(){if(v_)return b0;v_=1;const e=(function*(){}).constructor;return b0=()=>e,b0}var A0,x_;function T$(){if(x_)return A0;x_=1;var e=al(),t=F$(),n=t(/^\s*(?:function)?\*/),o=Pp()(),s=bv(),u=e("Object.prototype.toString"),l=e("Function.prototype.toString"),c=O$();return A0=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},A0}var w0,E_;function B$(){if(E_)return w0;E_=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]",m="[object HTMLCollection]",w=typeof Symbol=="function"&&!!Symbol.toStringTag,F=!(0 in[,]),S=function(){return!1};if(typeof document=="object"){var M=document.all;c.call(M)===c.call(document.all)&&(S=function(I){if((F||!I)&&(typeof I>"u"||typeof I=="object"))try{var R=c.call(I);return(R===y||R===g||R===m||R===h)&&I("")==null}catch{}return!1})}return w0=t?function(I){if(S(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(S(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)},w0}var v0,S_;function R$(){if(S_)return v0;S_=1;var e=B$(),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 v0=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)},v0}var x0,I_;function M$(){return I_||(I_=1,x0=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),x0}var E0,__;function U$(){if(__)return E0;__=1;var e=M$(),t=typeof globalThis>"u"?nf:globalThis;return E0=function(){for(var o=[],s=0;s<e.length;s++)typeof t[e[s]]=="function"&&(o[o.length]=e[s]);return o},E0}var S0={exports:{}},I0,C_;function k3(){if(C_)return I0;C_=1;var e=kp(),t=U3(),n=_f(),o=sl();return I0=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.")},I0}var _0,F_;function L3(){if(F_)return _0;F_=1;var e=kp(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},_0=t,_0}var C0,O_;function j$(){if(O_)return C0;O_=1;var e=Av(),t=k3(),n=L3()(),o=sl(),s=_f(),u=e("%Math.floor%");return C0=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},C0}var F0,T_;function N$(){if(T_)return F0;T_=1;var e=Cf(),t=gv(),n=D3();return F0=function(){return n(e,t,arguments)},F0}var B_;function Lp(){return B_||(B_=1,(function(e){var t=j$(),n=kp(),o=mv(),s=N$();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})(S0)),S0.exports}var O0,R_;function z3(){if(R_)return O0;R_=1;var e=R$(),t=U$(),n=Lp(),o=al(),s=sl(),u=bv(),l=o("Object.prototype.toString"),c=Pp()(),h=typeof globalThis>"u"?nf:globalThis,f=t(),p=o("String.prototype.slice"),y=o("Array.prototype.indexOf",!0)||function(S,M){for(var A=0;A<S.length;A+=1)if(S[A]===M)return A;return-1},g={__proto__:null};c&&s&&u?e(f,function(F){var S=new h[F];if(Symbol.toStringTag in S&&u){var M=u(S),A=s(M,Symbol.toStringTag);if(!A&&M){var I=u(M);A=s(I,Symbol.toStringTag)}g["$"+F]=n(A.get)}}):e(f,function(F){var S=new h[F],M=S.slice||S.set;M&&(g["$"+F]=n(M))});var m=function(S){var M=!1;return e(g,function(A,I){if(!M)try{"$"+A(S)===I&&(M=p(I,1))}catch{}}),M},w=function(S){var M=!1;return e(g,function(A,I){if(!M)try{A(S),M=p(I,1)}catch{}}),M};return O0=function(S){if(!S||typeof S!="object")return!1;if(!c){var M=p(l(S),8,-1);return y(f,M)>-1?M:M!=="Object"?!1:w(S)}return s?m(S):null},O0}var T0,M_;function D$(){if(M_)return T0;M_=1;var e=z3();return T0=function(n){return!!e(n)},T0}var U_;function P$(){return U_||(U_=1,(function(e){var t=_$(),n=T$(),o=z3(),s=D$();function u(D){return D.call.bind(D)}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 m=u(Symbol.prototype.valueOf);function w(D,he){if(typeof D!="object")return!1;try{return he(D),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=s;function F(D){return typeof Promise<"u"&&D instanceof Promise||D!==null&&typeof D=="object"&&typeof D.then=="function"&&typeof D.catch=="function"}e.isPromise=F;function S(D){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(D):s(D)||K(D)}e.isArrayBufferView=S;function M(D){return o(D)==="Uint8Array"}e.isUint8Array=M;function A(D){return o(D)==="Uint8ClampedArray"}e.isUint8ClampedArray=A;function I(D){return o(D)==="Uint16Array"}e.isUint16Array=I;function R(D){return o(D)==="Uint32Array"}e.isUint32Array=R;function T(D){return o(D)==="Int8Array"}e.isInt8Array=T;function z(D){return o(D)==="Int16Array"}e.isInt16Array=z;function k(D){return o(D)==="Int32Array"}e.isInt32Array=k;function L(D){return o(D)==="Float32Array"}e.isFloat32Array=L;function U(D){return o(D)==="Float64Array"}e.isFloat64Array=U;function j(D){return o(D)==="BigInt64Array"}e.isBigInt64Array=j;function H(D){return o(D)==="BigUint64Array"}e.isBigUint64Array=H;function P(D){return h(D)==="[object Map]"}P.working=typeof Map<"u"&&P(new Map);function te(D){return typeof Map>"u"?!1:P.working?P(D):D instanceof Map}e.isMap=te;function ue(D){return h(D)==="[object Set]"}ue.working=typeof Set<"u"&&ue(new Set);function oe(D){return typeof Set>"u"?!1:ue.working?ue(D):D instanceof Set}e.isSet=oe;function X(D){return h(D)==="[object WeakMap]"}X.working=typeof WeakMap<"u"&&X(new WeakMap);function re(D){return typeof WeakMap>"u"?!1:X.working?X(D):D instanceof WeakMap}e.isWeakMap=re;function pe(D){return h(D)==="[object WeakSet]"}pe.working=typeof WeakSet<"u"&&pe(new WeakSet);function le(D){return pe(D)}e.isWeakSet=le;function J(D){return h(D)==="[object ArrayBuffer]"}J.working=typeof ArrayBuffer<"u"&&J(new ArrayBuffer);function G(D){return typeof ArrayBuffer>"u"?!1:J.working?J(D):D instanceof ArrayBuffer}e.isArrayBuffer=G;function Q(D){return h(D)==="[object DataView]"}Q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Q(new DataView(new ArrayBuffer(1),0,1));function K(D){return typeof DataView>"u"?!1:Q.working?Q(D):D instanceof DataView}e.isDataView=K;var W=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function $(D){return h(D)==="[object SharedArrayBuffer]"}function fe(D){return typeof W>"u"?!1:(typeof $.working>"u"&&($.working=$(new W)),$.working?$(D):D instanceof W)}e.isSharedArrayBuffer=fe;function ae(D){return h(D)==="[object AsyncFunction]"}e.isAsyncFunction=ae;function ne(D){return h(D)==="[object Map Iterator]"}e.isMapIterator=ne;function Z(D){return h(D)==="[object Set Iterator]"}e.isSetIterator=Z;function O(D){return h(D)==="[object Generator]"}e.isGeneratorObject=O;function q(D){return h(D)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=q;function Y(D){return w(D,f)}e.isNumberObject=Y;function se(D){return w(D,p)}e.isStringObject=se;function ye(D){return w(D,y)}e.isBooleanObject=ye;function ee(D){return l&&w(D,g)}e.isBigIntObject=ee;function _(D){return c&&w(D,m)}e.isSymbolObject=_;function v(D){return Y(D)||se(D)||ye(D)||ee(D)||_(D)}e.isBoxedPrimitive=v;function C(D){return typeof Uint8Array<"u"&&(G(D)||fe(D))}e.isAnyArrayBuffer=C,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(D){Object.defineProperty(e,D,{enumerable:!1,value:function(){throw new Error(D+" is not supported in userland")}})})})(Rm)),Rm}var B0,j_;function k$(){return j_||(j_=1,B0=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),B0}var Xh={exports:{}},N_;function L$(){return N_||(N_=1,typeof Object.create=="function"?Xh.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Xh.exports=function(t,n){if(n){t.super_=n;var o=function(){};o.prototype=n.prototype,t.prototype=new o,t.prototype.constructor=t}}),Xh.exports}var D_;function tf(){return D_||(D_=1,(function(e){var t={},n=Object.getOwnPropertyDescriptors||function(W){for(var $=Object.keys(W),fe={},ae=0;ae<$.length;ae++)fe[$[ae]]=Object.getOwnPropertyDescriptor(W,$[ae]);return fe},o=/%[sdj%]/g;e.format=function(K){if(!z(K)){for(var W=[],$=0;$<arguments.length;$++)W.push(c(arguments[$]));return W.join(" ")}for(var $=1,fe=arguments,ae=fe.length,ne=String(K).replace(o,function(O){if(O==="%%")return"%";if($>=ae)return O;switch(O){case"%s":return String(fe[$++]);case"%d":return Number(fe[$++]);case"%j":try{return JSON.stringify(fe[$++])}catch{return"[Circular]"}default:return O}}),Z=fe[$];$<ae;Z=fe[++$])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 $=!1;function fe(){if(!$){if(Ut.throwDeprecation)throw new Error(W);Ut.traceDeprecation?console.trace(W):console.error(W),$=!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 $=e.format.apply(e,arguments);console.error("%s %d: %s",K,W,$)}}else s[K]=function(){};return s[K]};function c(K,W){var $={seen:[],stylize:f};return arguments.length>=3&&($.depth=arguments[2]),arguments.length>=4&&($.colors=arguments[3]),A(W)?$.showHidden=W:W&&e._extend($,W),L($.showHidden)&&($.showHidden=!1),L($.depth)&&($.depth=2),L($.colors)&&($.colors=!1),L($.customInspect)&&($.customInspect=!0),$.colors&&($.stylize=h),y($,K,$.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 $=c.styles[W];return $?"\x1B["+c.colors[$][0]+"m"+K+"\x1B["+c.colors[$][1]+"m":K}function f(K,W){return K}function p(K){var W={};return K.forEach(function($,fe){W[$]=!0}),W}function y(K,W,$){if(K.customInspect&&W&&te(W.inspect)&&W.inspect!==e.inspect&&!(W.constructor&&W.constructor.prototype===W)){var fe=W.inspect($,K);return z(fe)||(fe=y(K,fe,$)),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 m(W);if(ne.length===0){if(te(W)){var O=W.name?": "+W.name:"";return K.stylize("[Function"+O+"]","special")}if(U(W))return K.stylize(RegExp.prototype.toString.call(W),"regexp");if(H(W))return K.stylize(Date.prototype.toString.call(W),"date");if(P(W))return m(W)}var q="",Y=!1,se=["{","}"];if(M(W)&&(Y=!0,se=["[","]"]),te(W)){var ye=W.name?": "+W.name:"";q=" [Function"+ye+"]"}if(U(W)&&(q=" "+RegExp.prototype.toString.call(W)),H(W)&&(q=" "+Date.prototype.toUTCString.call(W)),P(W)&&(q=" "+m(W)),ne.length===0&&(!Y||W.length==0))return se[0]+q+se[1];if($<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,ne):ee=ne.map(function(_){return F(K,W,$,Z,_,Y)}),K.seen.pop(),S(ee,q,se)}function g(K,W){if(L(W))return K.stylize("undefined","undefined");if(z(W)){var $="'"+JSON.stringify(W).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return K.stylize($,"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 m(K){return"["+Error.prototype.toString.call(K)+"]"}function w(K,W,$,fe,ae){for(var ne=[],Z=0,O=W.length;Z<O;++Z)le(W,String(Z))?ne.push(F(K,W,$,fe,String(Z),!0)):ne.push("");return ae.forEach(function(q){q.match(/^\d+$/)||ne.push(F(K,W,$,fe,q,!0))}),ne}function F(K,W,$,fe,ae,ne){var Z,O,q;if(q=Object.getOwnPropertyDescriptor(W,ae)||{value:W[ae]},q.get?q.set?O=K.stylize("[Getter/Setter]","special"):O=K.stylize("[Getter]","special"):q.set&&(O=K.stylize("[Setter]","special")),le(fe,ae)||(Z="["+ae+"]"),O||(K.seen.indexOf(q.value)<0?(I($)?O=y(K,q.value,null):O=y(K,q.value,$-1),O.indexOf(`
62
- `)>-1&&(ne?O=O.split(`
63
- `).map(function(Y){return" "+Y}).join(`
64
- `).slice(2):O=`
65
- `+O.split(`
66
- `).map(function(Y){return" "+Y}).join(`
67
- `))):O=K.stylize("[Circular]","special")),L(Z)){if(ne&&ae.match(/^\d+$/))return O;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+": "+O}function S(K,W,$){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?$[0]+(W===""?"":W+`
69
- `)+" "+K.join(`,
70
- `)+" "+$[1]:$[0]+W+" "+K.join(", ")+" "+$[1]}e.types=P$();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 z(K){return typeof K=="string"}e.isString=z;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 H(K){return j(K)&&oe(K)==="[object Date]"}e.isDate=H,e.types.isDate=H;function P(K){return j(K)&&(oe(K)==="[object Error]"||K instanceof Error)}e.isError=P,e.types.isNativeError=P;function te(K){return typeof K=="function"}e.isFunction=te;function ue(K){return K===null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||typeof K=="symbol"||typeof K>"u"}e.isPrimitive=ue,e.isBuffer=k$();function oe(K){return Object.prototype.toString.call(K)}function X(K){return K<10?"0"+K.toString(10):K.toString(10)}var re=["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(),re[K.getMonth()],W].join(" ")}e.log=function(){console.log("%s - %s",pe(),e.format.apply(e,arguments))},e.inherits=L$(),e._extend=function(K,W){if(!W||!j(W))return K;for(var $=Object.keys(W),fe=$.length;fe--;)K[$[fe]]=W[$[fe]];return K};function le(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 $=W[J];if(typeof $!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty($,J,{value:$,enumerable:!1,writable:!1,configurable:!0}),$}function $(){for(var fe,ae,ne=new Promise(function(q,Y){fe=q,ae=Y}),Z=[],O=0;O<arguments.length;O++)Z.push(arguments[O]);Z.push(function(q,Y){q?ae(q):fe(Y)});try{W.apply(this,Z)}catch(q){ae(q)}return ne}return Object.setPrototypeOf($,Object.getPrototypeOf(W)),J&&Object.defineProperty($,J,{value:$,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties($,n(W))},e.promisify.custom=J;function G(K,W){if(!K){var $=new Error("Promise was rejected with a falsy value");$.reason=K,K=$}return W(K)}function Q(K){if(typeof K!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var $=[],fe=0;fe<arguments.length;fe++)$.push(arguments[fe]);var ae=$.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,$).then(function(O){Ut.nextTick(Z.bind(null,null,O))},function(O){Ut.nextTick(G.bind(null,O,Z))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(K)),Object.defineProperties(W,n(K)),W}e.callbackify=Q})(Bm)),Bm}var P_;function $3(){if(P_)return Tm;P_=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,z){return T.__proto__=z,T},s(A,I)}function u(A){var I=h();return function(){var T=f(A),z;if(I){var k=f(this).constructor;z=Reflect.construct(T,arguments,k)}else z=T.apply(this,arguments);return l(this,z)}}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 m(A,I,R){R||(R=Error);function T(k,L,U){return typeof I=="string"?I:I(k,L,U)}var z=(function(k){o(U,k);var L=u(U);function U(j,H,P){var te;return n(this,U),te=L.call(this,T(j,H,P)),te.code=A,te}return t(U)})(R);p[A]=z}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 F(A,I,R){return A.substr(0,I.length)===I}function S(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 m("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),m("ERR_INVALID_ARG_TYPE",function(A,I,R){y===void 0&&(y=Hb()),y(typeof A=="string","'name' must be a string");var T;typeof I=="string"&&F(I,"not ")?(T="must not be",I=I.replace(/^not /,"")):T="must be";var z;if(S(A," argument"))z="The ".concat(A," ").concat(T," ").concat(w(I,"type"));else{var k=M(A,".")?"property":"argument";z='The "'.concat(A,'" ').concat(k," ").concat(T," ").concat(w(I,"type"))}return z+=". Received type ".concat(e(R)),z},TypeError),m("ERR_INVALID_ARG_VALUE",function(A,I){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";g===void 0&&(g=tf());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),m("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),m("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=Hb()),y(I.length>0,"At least one arg needs to be specified");var T="The ",z=I.length;switch(I=I.map(function(k){return'"'.concat(k,'"')}),z){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,z-1).join(", "),T+=", and ".concat(I[z-1]," arguments");break}return"".concat(T," must be specified")},TypeError),Tm.codes=p,Tm}var R0,k_;function z$(){if(k_)return R0;k_=1;function e(le,J){var G=Object.keys(le);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(le);J&&(Q=Q.filter(function(K){return Object.getOwnPropertyDescriptor(le,K).enumerable})),G.push.apply(G,Q)}return G}function t(le){for(var J=1;J<arguments.length;J++){var G=arguments[J]!=null?arguments[J]:{};J%2?e(Object(G),!0).forEach(function(Q){n(le,Q,G[Q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(G)):e(Object(G)).forEach(function(Q){Object.defineProperty(le,Q,Object.getOwnPropertyDescriptor(G,Q))})}return le}function n(le,J,G){return J=l(J),J in le?Object.defineProperty(le,J,{value:G,enumerable:!0,configurable:!0,writable:!0}):le[J]=G,le}function o(le,J){if(!(le instanceof J))throw new TypeError("Cannot call a class as a function")}function s(le,J){for(var G=0;G<J.length;G++){var Q=J[G];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(le,l(Q.key),Q)}}function u(le,J,G){return J&&s(le.prototype,J),Object.defineProperty(le,"prototype",{writable:!1}),le}function l(le){var J=c(le,"string");return A(J)==="symbol"?J:String(J)}function c(le,J){if(A(le)!=="object"||le===null)return le;var G=le[Symbol.toPrimitive];if(G!==void 0){var Q=G.call(le,J);if(A(Q)!=="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(le)}function h(le,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(J&&J.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),Object.defineProperty(le,"prototype",{writable:!1}),J&&S(le,J)}function f(le){var J=w();return function(){var Q=M(le),K;if(J){var W=M(this).constructor;K=Reflect.construct(Q,arguments,W)}else K=Q.apply(this,arguments);return p(this,K)}}function p(le,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(le)}function y(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function g(le){var J=typeof Map=="function"?new Map:void 0;return g=function(Q){if(Q===null||!F(Q))return Q;if(typeof Q!="function")throw new TypeError("Super expression must either be null or a function");if(typeof J<"u"){if(J.has(Q))return J.get(Q);J.set(Q,K)}function K(){return m(Q,arguments,M(this).constructor)}return K.prototype=Object.create(Q.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),S(K,Q)},g(le)}function m(le,J,G){return w()?m=Reflect.construct.bind():m=function(K,W,$){var fe=[null];fe.push.apply(fe,W);var ae=Function.bind.apply(K,fe),ne=new ae;return $&&S(ne,$.prototype),ne},m.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 F(le){return Function.toString.call(le).indexOf("[native code]")!==-1}function S(le,J){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,K){return Q.__proto__=K,Q},S(le,J)}function M(le){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},M(le)}function A(le){"@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(le)}var I=tf(),R=I.inspect,T=$3(),z=T.codes.ERR_INVALID_ARG_TYPE;function k(le,J,G){return(G===void 0||G>le.length)&&(G=le.length),le.substring(G-J.length,G)===J}function L(le,J){if(J=Math.floor(J),le.length==0||J==0)return"";var G=le.length*J;for(J=Math.floor(Math.log(J)/Math.log(2));J;)le+=le,J--;return le+=le.substring(0,G-le.length),le}var U="",j="",H="",P="",te={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:"},ue=10;function oe(le){var J=Object.keys(le),G=Object.create(Object.getPrototypeOf(le));return J.forEach(function(Q){G[Q]=le[Q]}),Object.defineProperty(G,"message",{value:le.message}),G}function X(le){return R(le,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function re(le,J,G){var Q="",K="",W=0,$="",fe=!1,ae=X(le),ne=ae.split(`
71
- `),Z=X(J).split(`
72
- `),O=0,q="";if(G==="strictEqual"&&A(le)==="object"&&A(J)==="object"&&le!==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<=ue){if((A(le)!=="object"||le===null)&&(A(J)!=="object"||J===null)&&(le!==0||J!==0))return"".concat(te[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][O]===Z[0][O];)O++;O>2&&(q=`
76
- `.concat(L(" ",O),"^"),O=0)}}}for(var ye=ne[ne.length-1],ee=Z[Z.length-1];ye===ee&&(O++<2?$=`
77
- `.concat(ye).concat($):Q=ye,ne.pop(),Z.pop(),!(ne.length===0||Z.length===0));)ye=ne[ne.length-1],ee=Z[Z.length-1];var _=Math.max(ne.length,Z.length);if(_===0){var v=ae.split(`
78
- `);if(v.length>30)for(v[26]="".concat(U,"...").concat(P);v.length>27;)v.pop();return"".concat(te.notIdentical,`
79
-
80
- `).concat(v.join(`
81
- `),`
82
- `)}O>3&&($=`
83
- `.concat(U,"...").concat(P).concat($),fe=!0),Q!==""&&($=`
84
- `.concat(Q).concat($),Q="");var C=0,D=te[G]+`
85
- `.concat(j,"+ actual").concat(P," ").concat(H,"- expected").concat(P),he=" ".concat(U,"...").concat(P," Lines skipped");for(O=0;O<_;O++){var ce=O-W;if(ne.length<O+1)ce>1&&O>2&&(ce>4?(K+=`
86
- `.concat(U,"...").concat(P),fe=!0):ce>3&&(K+=`
87
- `.concat(Z[O-2]),C++),K+=`
88
- `.concat(Z[O-1]),C++),W=O,Q+=`
89
- `.concat(H,"-").concat(P," ").concat(Z[O]),C++;else if(Z.length<O+1)ce>1&&O>2&&(ce>4?(K+=`
90
- `.concat(U,"...").concat(P),fe=!0):ce>3&&(K+=`
91
- `.concat(ne[O-2]),C++),K+=`
92
- `.concat(ne[O-1]),C++),W=O,K+=`
93
- `.concat(j,"+").concat(P," ").concat(ne[O]),C++;else{var Ee=Z[O],Be=ne[O],de=Be!==Ee&&(!k(Be,",")||Be.slice(0,-1)!==Ee);de&&k(Ee,",")&&Ee.slice(0,-1)===Be&&(de=!1,Be+=","),de?(ce>1&&O>2&&(ce>4?(K+=`
94
- `.concat(U,"...").concat(P),fe=!0):ce>3&&(K+=`
95
- `.concat(ne[O-2]),C++),K+=`
96
- `.concat(ne[O-1]),C++),W=O,K+=`
97
- `.concat(j,"+").concat(P," ").concat(Be),Q+=`
98
- `.concat(H,"-").concat(P," ").concat(Ee),C+=2):(K+=Q,Q="",(ce===1||O===0)&&(K+=`
99
- `.concat(Be),C++))}if(C>20&&O<_-2)return"".concat(D).concat(he,`
100
- `).concat(K,`
101
- `).concat(U,"...").concat(P).concat(Q,`
102
- `)+"".concat(U,"...").concat(P)}return"".concat(D).concat(fe?he:"",`
103
- `).concat(K).concat(Q).concat($).concat(q)}var pe=(function(le,J){h(Q,le);var G=f(Q);function Q(K){var W;if(o(this,Q),A(K)!=="object"||K===null)throw new z("options","Object",K);var $=K.message,fe=K.operator,ae=K.stackStartFn,ne=K.actual,Z=K.expected,O=Error.stackTraceLimit;if(Error.stackTraceLimit=0,$!=null)W=G.call(this,String($));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",H="\x1B[31m"):(U="",j="",P="",H="")),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,re(ne,Z,fe));else if(fe==="notDeepStrictEqual"||fe==="notStrictEqual"){var q=te[fe],Y=X(ne).split(`
104
- `);if(fe==="notStrictEqual"&&A(ne)==="object"&&ne!==null&&(q=te.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=te[fe];fe==="notDeepEqual"||fe==="notEqual"?(se="".concat(te[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=O,W.generatedMessage=!$,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(Q,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:J,value:function(W,$){return R(this,t(t({},$),{},{customInspect:!1,depth:0}))}}]),Q})(g(Error),R.custom);return R0=pe,R0}var M0,L_;function q3(){if(L_)return M0;L_=1;var e=Object.prototype.toString;return M0=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},M0}var U0,z_;function $$(){if(z_)return U0;z_=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=q3(),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 m=g.constructor;return m&&m.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(m){var w=m!==null&&typeof m=="object",F=n.call(m)==="[object Function]",S=o(m),M=w&&n.call(m)==="[object String]",A=[];if(!w&&!F&&!S)throw new TypeError("Object.keys called on a non-object");var I=l&&F;if(M&&m.length>0&&!t.call(m,0))for(var R=0;R<m.length;++R)A.push(String(R));if(S&&m.length>0)for(var T=0;T<m.length;++T)A.push(String(T));else for(var z in m)!(I&&z==="prototype")&&t.call(m,z)&&A.push(String(z));if(u)for(var k=y(m),L=0;L<c.length;++L)!(k&&c[L]==="constructor")&&t.call(m,c[L])&&A.push(c[L]);return A}}return U0=e,U0}var j0,$_;function H3(){if($_)return j0;$_=1;var e=Array.prototype.slice,t=q3(),n=Object.keys,o=n?function(l){return n(l)}:$$(),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},j0=o,j0}var N0,q_;function q$(){if(q_)return N0;q_=1;var e=H3(),t=dv()(),n=al(),o=pv(),s=n("Array.prototype.push"),u=n("Object.prototype.propertyIsEnumerable"),l=t?o.getOwnPropertySymbols:null;return N0=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]),m=e(g),w=t&&(o.getOwnPropertySymbols||l);if(w)for(var F=w(g),S=0;S<F.length;++S){var M=F[S];u(g,M)&&s(m,M)}for(var A=0;A<m.length;++A){var I=m[A];if(u(g,I)){var R=g[I];p[I]=R}}}return p},N0}var D0,H_;function H$(){if(H_)return D0;H_=1;var e=q$(),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 D0=function(){return!Object.assign||t()||n()?e:Object.assign},D0}var P0,Q_;function Q3(){if(Q_)return P0;Q_=1;var e=function(t){return t!==t};return P0=function(n,o){return n===0&&o===0?1/n===1/o:!!(n===o||e(n)&&e(o))},P0}var k0,G_;function wv(){if(G_)return k0;G_=1;var e=Q3();return k0=function(){return typeof Object.is=="function"?Object.is:e},k0}var L0,K_;function Q$(){if(K_)return L0;K_=1;var e=Av(),t=Lp(),n=t(e("String.prototype.indexOf"));return L0=function(s,u){var l=e(s,!!u);return typeof l=="function"&&n(s,".prototype.")>-1?t(l):l},L0}var z0,Y_;function zp(){if(Y_)return z0;Y_=1;var e=H3(),t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,o=Array.prototype.concat,s=k3(),u=function(f){return typeof f=="function"&&n.call(f)==="[object Function]"},l=L3()(),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 m=0;m<g.length;m+=1)c(f,g[m],p[g[m]],y[g[m]])};return h.supportsDescriptors=!!l,z0=h,z0}var $0,V_;function G$(){if(V_)return $0;V_=1;var e=wv(),t=zp();return $0=function(){var o=e();return t(Object,{is:o},{is:function(){return Object.is!==o}}),o},$0}var q0,W_;function K$(){if(W_)return q0;W_=1;var e=zp(),t=Lp(),n=Q3(),o=wv(),s=G$(),u=t(o(),Object);return e(u,{getPolyfill:o,implementation:n,shim:s}),q0=u,q0}var H0,X_;function G3(){return X_||(X_=1,H0=function(t){return t!==t}),H0}var Q0,Z_;function K3(){if(Z_)return Q0;Z_=1;var e=G3();return Q0=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:e},Q0}var G0,J_;function Y$(){if(J_)return G0;J_=1;var e=zp(),t=K3();return G0=function(){var o=t();return e(Number,{isNaN:o},{isNaN:function(){return Number.isNaN!==o}}),o},G0}var K0,eC;function V$(){if(eC)return K0;eC=1;var e=Lp(),t=zp(),n=G3(),o=K3(),s=Y$(),u=e(o(),Number);return t(u,{getPolyfill:o,implementation:n,shim:s}),K0=u,K0}var Y0,tC;function W$(){if(tC)return Y0;tC=1;function e(de,ve){return u(de)||s(de,ve)||n(de,ve)||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,ve){if(de){if(typeof de=="string")return o(de,ve);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,ve)}}function o(de,ve){(ve==null||ve>de.length)&&(ve=de.length);for(var x=0,B=new Array(ve);x<ve;x++)B[x]=de[x];return B}function s(de,ve){var x=de==null?null:typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(x!=null){var B,N,ie,me,xe=[],Ce=!0,we=!1;try{if(ie=(x=x.call(de)).next,ve!==0)for(;!(Ce=(B=ie.call(x)).done)&&(xe.push(B.value),xe.length!==ve);Ce=!0);}catch(Se){we=!0,N=Se}finally{try{if(!Ce&&x.return!=null&&(me=x.return(),Object(me)!==me))return}finally{if(we)throw N}}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(ve){return typeof ve}:function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},l(de)}var c=/a/g.flags!==void 0,h=function(ve){var x=[];return ve.forEach(function(B){return x.push(B)}),x},f=function(ve){var x=[];return ve.forEach(function(B,N){return x.push([N,B])}),x},p=Object.is?Object.is:K$(),y=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},g=Number.isNaN?Number.isNaN:V$();function m(de){return de.call.bind(de)}var w=m(Object.prototype.hasOwnProperty),F=m(Object.prototype.propertyIsEnumerable),S=m(Object.prototype.toString),M=tf().types,A=M.isAnyArrayBuffer,I=M.isArrayBufferView,R=M.isDate,T=M.isMap,z=M.isRegExp,k=M.isSet,L=M.isNativeError,U=M.isBoxedPrimitive,j=M.isNumberObject,H=M.isStringObject,P=M.isBooleanObject,te=M.isBigIntObject,ue=M.isSymbolObject,oe=M.isFloat32Array,X=M.isFloat64Array;function re(de){if(de.length===0||de.length>10)return!0;for(var ve=0;ve<de.length;ve++){var x=de.charCodeAt(ve);if(x<48||x>57)return!0}return de.length===10&&de>=Math.pow(2,32)}function pe(de){return Object.keys(de).filter(re).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 le(de,ve){if(de===ve)return 0;for(var x=de.length,B=ve.length,N=0,ie=Math.min(x,B);N<ie;++N)if(de[N]!==ve[N]){x=de[N],B=ve[N];break}return x<B?-1:B<x?1:0}var J=!0,G=!1,Q=0,K=1,W=2,$=3;function fe(de,ve){return c?de.source===ve.source&&de.flags===ve.flags:RegExp.prototype.toString.call(de)===RegExp.prototype.toString.call(ve)}function ae(de,ve){if(de.byteLength!==ve.byteLength)return!1;for(var x=0;x<de.byteLength;x++)if(de[x]!==ve[x])return!1;return!0}function ne(de,ve){return de.byteLength!==ve.byteLength?!1:le(new Uint8Array(de.buffer,de.byteOffset,de.byteLength),new Uint8Array(ve.buffer,ve.byteOffset,ve.byteLength))===0}function Z(de,ve){return de.byteLength===ve.byteLength&&le(new Uint8Array(de),new Uint8Array(ve))===0}function O(de,ve){return j(de)?j(ve)&&p(Number.prototype.valueOf.call(de),Number.prototype.valueOf.call(ve)):H(de)?H(ve)&&String.prototype.valueOf.call(de)===String.prototype.valueOf.call(ve):P(de)?P(ve)&&Boolean.prototype.valueOf.call(de)===Boolean.prototype.valueOf.call(ve):te(de)?te(ve)&&BigInt.prototype.valueOf.call(de)===BigInt.prototype.valueOf.call(ve):ue(ve)&&Symbol.prototype.valueOf.call(de)===Symbol.prototype.valueOf.call(ve)}function q(de,ve,x,B){if(de===ve)return de!==0?!0:x?p(de,ve):!0;if(x){if(l(de)!=="object")return typeof de=="number"&&g(de)&&g(ve);if(l(ve)!=="object"||de===null||ve===null||Object.getPrototypeOf(de)!==Object.getPrototypeOf(ve))return!1}else{if(de===null||l(de)!=="object")return ve===null||l(ve)!=="object"?de==ve:!1;if(ve===null||l(ve)!=="object")return!1}var N=S(de),ie=S(ve);if(N!==ie)return!1;if(Array.isArray(de)){if(de.length!==ve.length)return!1;var me=pe(de),xe=pe(ve);return me.length!==xe.length?!1:se(de,ve,x,B,K,me)}if(N==="[object Object]"&&(!T(de)&&T(ve)||!k(de)&&k(ve)))return!1;if(R(de)){if(!R(ve)||Date.prototype.getTime.call(de)!==Date.prototype.getTime.call(ve))return!1}else if(z(de)){if(!z(ve)||!fe(de,ve))return!1}else if(L(de)||de instanceof Error){if(de.message!==ve.message||de.name!==ve.name)return!1}else if(I(de)){if(!x&&(oe(de)||X(de))){if(!ae(de,ve))return!1}else if(!ne(de,ve))return!1;var Ce=pe(de),we=pe(ve);return Ce.length!==we.length?!1:se(de,ve,x,B,Q,Ce)}else{if(k(de))return!k(ve)||de.size!==ve.size?!1:se(de,ve,x,B,W);if(T(de))return!T(ve)||de.size!==ve.size?!1:se(de,ve,x,B,$);if(A(de)){if(!Z(de,ve))return!1}else if(U(de)&&!O(de,ve))return!1}return se(de,ve,x,B,Q)}function Y(de,ve){return ve.filter(function(x){return F(de,x)})}function se(de,ve,x,B,N,ie){if(arguments.length===5){ie=Object.keys(de);var me=Object.keys(ve);if(ie.length!==me.length)return!1}for(var xe=0;xe<ie.length;xe++)if(!w(ve,ie[xe]))return!1;if(x&&arguments.length===5){var Ce=y(de);if(Ce.length!==0){var we=0;for(xe=0;xe<Ce.length;xe++){var Se=Ce[xe];if(F(de,Se)){if(!F(ve,Se))return!1;ie.push(Se),we++}else if(F(ve,Se))return!1}var He=y(ve);if(Ce.length!==He.length&&Y(ve,He).length!==we)return!1}else{var Ke=y(ve);if(Ke.length!==0&&Y(ve,Ke).length!==0)return!1}}if(ie.length===0&&(N===Q||N===K&&de.length===0||de.size===0))return!0;if(B===void 0)B={val1:new Map,val2:new Map,position:0};else{var Ve=B.val1.get(de);if(Ve!==void 0){var et=B.val2.get(ve);if(et!==void 0)return Ve===et}B.position++}B.val1.set(de,B.position),B.val2.set(ve,B.position);var gt=ce(de,ve,x,ie,B,N);return B.val1.delete(de),B.val2.delete(ve),gt}function ye(de,ve,x,B){for(var N=h(de),ie=0;ie<N.length;ie++){var me=N[ie];if(q(ve,me,x,B))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 _(de,ve,x){var B=ee(x);return B??(ve.has(B)&&!de.has(B))}function v(de,ve,x,B,N){var ie=ee(x);if(ie!=null)return ie;var me=ve.get(ie);return me===void 0&&!ve.has(ie)||!q(B,me,!1,N)?!1:!de.has(ie)&&q(B,me,!1,N)}function C(de,ve,x,B){for(var N=null,ie=h(de),me=0;me<ie.length;me++){var xe=ie[me];if(l(xe)==="object"&&xe!==null)N===null&&(N=new Set),N.add(xe);else if(!ve.has(xe)){if(x||!_(de,ve,xe))return!1;N===null&&(N=new Set),N.add(xe)}}if(N!==null){for(var Ce=h(ve),we=0;we<Ce.length;we++){var Se=Ce[we];if(l(Se)==="object"&&Se!==null){if(!ye(N,Se,x,B))return!1}else if(!x&&!de.has(Se)&&!ye(N,Se,x,B))return!1}return N.size===0}return!0}function D(de,ve,x,B,N,ie){for(var me=h(de),xe=0;xe<me.length;xe++){var Ce=me[xe];if(q(x,Ce,N,ie)&&q(B,ve.get(Ce),N,ie))return de.delete(Ce),!0}return!1}function he(de,ve,x,B){for(var N=null,ie=f(de),me=0;me<ie.length;me++){var xe=e(ie[me],2),Ce=xe[0],we=xe[1];if(l(Ce)==="object"&&Ce!==null)N===null&&(N=new Set),N.add(Ce);else{var Se=ve.get(Ce);if(Se===void 0&&!ve.has(Ce)||!q(we,Se,x,B)){if(x||!v(de,ve,Ce,we,B))return!1;N===null&&(N=new Set),N.add(Ce)}}}if(N!==null){for(var He=f(ve),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(!D(N,de,et,gt,x,B))return!1}else if(!x&&(!de.has(et)||!q(de.get(et),gt,!1,B))&&!D(N,de,et,gt,!1,B))return!1}return N.size===0}return!0}function ce(de,ve,x,B,N,ie){var me=0;if(ie===W){if(!C(de,ve,x,N))return!1}else if(ie===$){if(!he(de,ve,x,N))return!1}else if(ie===K)for(;me<de.length;me++)if(w(de,me)){if(!w(ve,me)||!q(de[me],ve[me],x,N))return!1}else{if(w(ve,me))return!1;for(var xe=Object.keys(de);me<xe.length;me++){var Ce=xe[me];if(!w(ve,Ce)||!q(de[Ce],ve[Ce],x,N))return!1}return xe.length===Object.keys(ve).length}for(me=0;me<B.length;me++){var we=B[me];if(!q(de[we],ve[we],x,N))return!1}return!0}function Ee(de,ve){return q(de,ve,G)}function Be(de,ve){return q(de,ve,J)}return Y0={isDeepEqual:Ee,isDeepStrictEqual:Be},Y0}var rC;function Hb(){if(rC)return Om.exports;rC=1;function e(W){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},e(W)}function t(W,$,fe){return Object.defineProperty(W,"prototype",{writable:!1}),W}function n(W,$){if(!(W instanceof $))throw new TypeError("Cannot call a class as a function")}var o=$3(),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=z$(),y=tf(),g=y.inspect,m=tf().types,w=m.isPromise,F=m.isRegExp,S=H$()(),M=wv()(),A=Q$()("RegExp.prototype.test"),I,R;function T(){var W=W$();I=W.isDeepEqual,R=W.isDeepStrictEqual}var z=!1,k=Om.exports=P,L={};function U(W){throw W.message instanceof Error?W.message:new p(W)}function j(W,$,fe,ae,ne){var Z=arguments.length,O;if(Z===0)O="Failed";else if(Z===1)fe=W,W=void 0;else{if(z===!1){z=!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:$,operator:ae===void 0?"fail":ae,stackStartFn:ne||j};fe!==void 0&&(Y.message=fe);var se=new p(Y);throw O&&(se.message=O,se.generatedMessage=!0),se}k.fail=j,k.AssertionError=p;function H(W,$,fe,ae){if(!fe){var ne=!1;if($===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,$=new Array(W),fe=0;fe<W;fe++)$[fe]=arguments[fe];H.apply(void 0,[P,$.length].concat($))}k.ok=P,k.equal=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");$!=fe&&U({actual:$,expected:fe,message:ae,operator:"==",stackStartFn:W})},k.notEqual=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");$==fe&&U({actual:$,expected:fe,message:ae,operator:"!=",stackStartFn:W})},k.deepEqual=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),I($,fe)||U({actual:$,expected:fe,message:ae,operator:"deepEqual",stackStartFn:W})},k.notDeepEqual=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),I($,fe)&&U({actual:$,expected:fe,message:ae,operator:"notDeepEqual",stackStartFn:W})},k.deepStrictEqual=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),R($,fe)||U({actual:$,expected:fe,message:ae,operator:"deepStrictEqual",stackStartFn:W})},k.notDeepStrictEqual=te;function te(W,$,fe){if(arguments.length<2)throw new f("actual","expected");I===void 0&&T(),R(W,$)&&U({actual:W,expected:$,message:fe,operator:"notDeepStrictEqual",stackStartFn:te})}k.strictEqual=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");M($,fe)||U({actual:$,expected:fe,message:ae,operator:"strictEqual",stackStartFn:W})},k.notStrictEqual=function W($,fe,ae){if(arguments.length<2)throw new f("actual","expected");M($,fe)&&U({actual:$,expected:fe,message:ae,operator:"notStrictEqual",stackStartFn:W})};var ue=t(function W($,fe,ae){var ne=this;n(this,W),fe.forEach(function(Z){Z in $&&(ae!==void 0&&typeof ae[Z]=="string"&&F($[Z])&&A($[Z],ae[Z])?ne[Z]=ae[Z]:ne[Z]=$[Z])})});function oe(W,$,fe,ae,ne,Z){if(!(fe in W)||!R(W[fe],$[fe])){if(!ae){var O=new ue(W,ne),q=new ue($,ne,W),Y=new p({actual:O,expected:q,operator:"deepStrictEqual",stackStartFn:Z});throw Y.actual=W,Y.expected=$,Y.operator=Z.name,Y}U({actual:W,expected:$,message:ae,operator:Z.name,stackStartFn:Z})}}function X(W,$,fe,ae){if(typeof $!="function"){if(F($))return A($,W);if(arguments.length===2)throw new l("expected",["Function","RegExp"],$);if(e(W)!=="object"||W===null){var ne=new p({actual:W,expected:$,message:fe,operator:"deepStrictEqual",stackStartFn:ae});throw ne.operator=ae.name,ne}var Z=Object.keys($);if($ instanceof Error)Z.push("name","message");else if(Z.length===0)throw new c("error",$,"may not be an empty object");return I===void 0&&T(),Z.forEach(function(O){typeof W[O]=="string"&&F($[O])&&A($[O],W[O])||oe(W,$,O,fe,Z,ae)}),!0}return $.prototype!==void 0&&W instanceof $?!0:Error.isPrototypeOf($)?!1:$.call({},W)===!0}function re(W){if(typeof W!="function")throw new l("fn","Function",W);try{W()}catch($){return $}return L}function pe(W){return w(W)||W!==null&&e(W)==="object"&&typeof W.then=="function"&&typeof W.catch=="function"}function le(W){return Promise.resolve().then(function(){var $;if(typeof W=="function"){if($=W(),!pe($))throw new h("instance of Promise","promiseFn",$)}else if(pe(W))$=W;else throw new l("promiseFn",["Function","Promise"],W);return Promise.resolve().then(function(){return $}).then(function(){return L}).catch(function(fe){return fe})})}function J(W,$,fe,ae){if(typeof fe=="string"){if(arguments.length===4)throw new l("error",["Object","Error","Function","RegExp"],fe);if(e($)==="object"&&$!==null){if($.message===fe)throw new u("error/message",'The error message "'.concat($.message,'" is identical to the message.'))}else if($===fe)throw new u("error/message",'The error "'.concat($,'" 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($===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($,fe,ae,W))throw $}function G(W,$,fe,ae){if($!==L){if(typeof fe=="string"&&(ae=fe,fe=void 0),!fe||X($,fe)){var ne=ae?": ".concat(ae):".",Z=W.name==="doesNotReject"?"rejection":"exception";U({actual:$,expected:fe,operator:W.name,message:"Got unwanted ".concat(Z).concat(ne,`
123
- `)+'Actual message: "'.concat($&&$.message,'"'),stackStartFn:W})}throw $}}k.throws=function W($){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,re($)].concat(ae))},k.rejects=function W($){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ae[ne-1]=arguments[ne];return le($).then(function(Z){return J.apply(void 0,[W,Z].concat(ae))})},k.doesNotThrow=function W($){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,re($)].concat(ae))},k.doesNotReject=function W($){for(var fe=arguments.length,ae=new Array(fe>1?fe-1:0),ne=1;ne<fe;ne++)ae[ne-1]=arguments[ne];return le($).then(function(Z){return G.apply(void 0,[W,Z].concat(ae))})},k.ifError=function W($){if($!=null){var fe="ifError got unwanted exception: ";e($)==="object"&&typeof $.message=="string"?$.message.length===0&&$.constructor?fe+=$.constructor.name:fe+=$.message:fe+=g($);var ae=new p({actual:$,expected:null,operator:"ifError",message:fe,stackStartFn:W}),ne=$.stack;if(typeof ne=="string"){var Z=ne.split(`
124
- `);Z.shift();for(var O=ae.stack.split(`
125
- `),q=0;q<Z.length;q++){var Y=O.indexOf(Z[q]);if(Y!==-1){O=O.slice(0,Y);break}}ae.stack="".concat(O.join(`
126
- `),`
127
- `).concat(Z.join(`
128
- `))}throw ae}};function Q(W,$,fe,ae,ne){if(!F($))throw new l("regexp","RegExp",$);var Z=ne==="match";if(typeof W!="string"||A($,W)!==Z){if(fe instanceof Error)throw fe;var O=!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($),`. Input:
129
-
130
- `).concat(g(W),`
131
- `));var q=new p({actual:W,expected:$,message:fe,operator:ne,stackStartFn:ae});throw q.generatedMessage=O,q}}k.match=function W($,fe,ae){Q($,fe,ae,W,"match")},k.doesNotMatch=function W($,fe,ae){Q($,fe,ae,W,"doesNotMatch")};function K(){for(var W=arguments.length,$=new Array(W),fe=0;fe<W;fe++)$[fe]=arguments[fe];H.apply(void 0,[K,$.length].concat($))}return k.strict=S(K,k,{equal:k.strictEqual,deepEqual:k.deepStrictEqual,notEqual:k.notStrictEqual,notDeepEqual:k.notDeepStrictEqual}),k.strict.strict=k.strict,Om.exports}var V0,nC;function X$(){if(nC)return V0;nC=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 F=0,S=0,M=0,A=w.length;M!==A&&w[M]===0;)M++,F++;for(var I=(A-M)*p+1>>>0,R=new Uint8Array(I);M!==A;){for(var T=w[M],z=0,k=I-1;(T!==0||z<S)&&k!==-1;k--,z++)T+=256*R[k]>>>0,R[k]=T%c>>>0,T=T/c>>>0;if(T!==0)throw new Error("Non-zero carry");S=z,M++}for(var L=I-S;L!==I&&R[L]===0;)L++;for(var U=h.repeat(F);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 F=0,S=0,M=0;w[F]===h;)S++,F++;for(var A=(w.length-F)*f+1>>>0,I=new Uint8Array(A);w[F];){var R=w.charCodeAt(F);if(R>255)return;var T=n[R];if(T===255)return;for(var z=0,k=A-1;(T!==0||z<M)&&k!==-1;k--,z++)T+=c*I[k]>>>0,I[k]=T%256>>>0,T=T/256>>>0;if(T!==0)throw new Error("Non-zero carry");M=z,F++}for(var L=A-M;L!==A&&I[L]===0;)L++;for(var U=new Uint8Array(S+(A-L)),j=S;L!==A;)U[j++]=I[L++];return U}function m(w){var F=g(w);if(F)return F;throw new Error("Non-base"+c+" character")}return{encode:y,decodeUnsafe:g,decode:m}}return V0=e,V0}var un={exports:{}},W0,iC;function Y3(){if(iC)return W0;iC=1,W0=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 W0}var Fi={exports:{}},Zh={exports:{}},X0,oC;function Z$(){if(oC)return X0;oC=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 X0={byteLength:e,toString:t,write:n},X0}var Z0,sC;function J$(){if(sC)return Z0;sC=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)],m=t[l.charCodeAt(h+3)];u[f++]=p<<2|y>>4,u[f++]=(y&15)<<4|g>>2,u[f++]=(g&3)<<6|m&63}return c}return Z0={byteLength:n,toString:o,write:s},Z0}var J0,aC;function eq(){if(aC)return J0;aC=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}J0={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 J0}var eb,uC;function tq(){if(uC)return eb;uC=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 eb={byteLength:e,toString:t,write:n},eb}var tb,lC;function rq(){if(lC)return tb;lC=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 tb={byteLength:e,toString:t,write:n},tb}var cC;function nq(){return cC||(cC=1,(function(e,t){const n=Z$(),o=J$(),s=eq(),u=tq(),l=rq(),c=new Uint8Array(Uint16Array.of(255).buffer)[0]===255;function h(_){switch(_){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 '${_}'`)}}function f(_){return _ instanceof Uint8Array}function p(_){try{return h(_),!0}catch{return!1}}function y(_,v,C){const D=new Uint8Array(_);return v!==void 0&&t.fill(D,v,0,D.byteLength,C),D}function g(_){return new Uint8Array(_)}function m(_){return new Uint8Array(_)}function w(_,v){return h(v).byteLength(_)}function F(_,v){if(_===v)return 0;const C=Math.min(_.byteLength,v.byteLength);_=new DataView(_.buffer,_.byteOffset,_.byteLength),v=new DataView(v.buffer,v.byteOffset,v.byteLength);let D=0;for(let he=C-C%4;D<he;D+=4){const ce=_.getUint32(D,c),Ee=v.getUint32(D,c);if(ce!==Ee)break}for(;D<C;D++){const he=_.getUint8(D),ce=v.getUint8(D);if(he<ce)return-1;if(he>ce)return 1}return _.byteLength>v.byteLength?1:_.byteLength<v.byteLength?-1:0}function S(_,v){v===void 0&&(v=_.reduce((he,ce)=>he+ce.byteLength,0));const C=new Uint8Array(v);let D=0;for(const he of _){if(D+he.byteLength>C.byteLength)return C.set(he.subarray(0,C.byteLength-D),D),C;C.set(he,D),D+=he.byteLength}return C}function M(_,v,C=0,D=0,he=_.byteLength){if(C<0&&(C=0),C>=v.byteLength)return 0;const ce=v.byteLength-C;if(D<0&&(D=0),D>=_.byteLength||he<=D)return 0;he>_.byteLength&&(he=_.byteLength),he-D>ce&&(he=D+ce);const Ee=he-D;return _===v?v.copyWithin(C,D,he):((D!==0||he!==_.byteLength)&&(_=_.subarray(D,he)),v.set(_,C)),Ee}function A(_,v){return _===v?!0:_.byteLength!==v.byteLength?!1:F(_,v)===0}function I(_,v,C=0,D=_.byteLength,he="utf8"){if(typeof v=="string"?typeof C=="string"?(he=C,C=0,D=_.byteLength):typeof D=="string"&&(he=D,D=_.byteLength):typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=+v),C<0&&(C=0),C>=_.byteLength||D<=C)return _;if(D>_.byteLength&&(D=_.byteLength),typeof v=="number")return _.fill(v,C,D);typeof v=="string"&&(v=t.from(v,he));const ce=v.byteLength;for(let Ee=0,Be=D-C;Ee<Be;++Ee)_[Ee+C]=v[Ee%ce];return _}function R(_,v,C){return typeof _=="string"?T(_,v):Array.isArray(_)?z(_):ArrayBuffer.isView(_)?k(_):L(_,v,C)}function T(_,v){const C=h(v),D=new Uint8Array(C.byteLength(_));return C.write(D,_),D}function z(_){const v=new Uint8Array(_.length);return v.set(_),v}function k(_){const v=new Uint8Array(_.byteLength);return v.set(_),v}function L(_,v,C){return new Uint8Array(_,v,C)}function U(_,v,C,D){return j(_,v,C,D)!==-1}function j(_,v,C,D){return P(_,v,C,D,!0)}function H(_,v,C,D){return P(_,v,C,D,!1)}function P(_,v,C,D,he){if(_.byteLength===0)return-1;if(typeof C=="string"?(D=C,C=0):C===void 0?C=he?0:_.length-1:C<0&&(C+=_.byteLength),C>=_.byteLength){if(he)return-1;C=_.byteLength-1}else if(C<0)if(he)C=0;else return-1;if(typeof v=="string")v=R(v,D);else if(typeof v=="number")return v=v&255,he?_.indexOf(v,C):_.lastIndexOf(v,C);if(v.byteLength===0)return-1;if(he){let ce=-1;for(let Ee=C;Ee<_.byteLength;Ee++)if(_[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>_.byteLength&&(C=_.byteLength-v.byteLength);for(let ce=C;ce>=0;ce--){let Ee=!0;for(let Be=0;Be<v.byteLength;Be++)if(_[ce+Be]!==v[Be]){Ee=!1;break}if(Ee)return ce}}return-1}function te(_,v,C){const D=_[v];_[v]=_[C],_[C]=D}function ue(_){const v=_.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)te(_,C,C+1);return _}function oe(_){const v=_.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)te(_,C,C+3),te(_,C+1,C+2);return _}function X(_){const v=_.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)te(_,C,C+7),te(_,C+1,C+6),te(_,C+2,C+5),te(_,C+3,C+4);return _}function re(_){return _}function pe(_,v="utf8",C=0,D=_.byteLength){return arguments.length===1?u.toString(_):arguments.length===2?h(v).toString(_):(C<0&&(C=0),C>=_.byteLength||D<=C?"":(D>_.byteLength&&(D=_.byteLength),(C!==0||D!==_.byteLength)&&(_=_.subarray(C,D)),h(v).toString(_)))}function le(_,v,C,D,he){if(arguments.length===2)return u.write(_,v);typeof C=="string"?(he=C,C=0,D=_.byteLength):typeof D=="string"&&(he=D,D=_.byteLength-C),D=Math.min(D,t.byteLength(v,he));let ce=C;if(ce<0&&(ce=0),ce>=_.byteLength)return 0;let Ee=C+D;return Ee<=ce?0:(Ee>_.byteLength&&(Ee=_.byteLength),(ce!==0||Ee!==_.byteLength)&&(_=_.subarray(ce,Ee)),h(he).write(_,v))}function J(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat64(v,!1)}function G(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat64(v,!0)}function Q(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat32(v,!1)}function K(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getFloat32(v,!0)}function W(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getInt32(v,!1)}function $(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getInt32(v,!0)}function fe(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getUint32(v,!1)}function ae(_,v=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).getUint32(v,!0)}function ne(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat64(C,v,!1),C+8}function Z(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat64(C,v,!0),C+8}function O(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat32(C,v,!1),C+4}function q(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setFloat32(C,v,!0),C+4}function Y(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setInt32(C,v,!1),C+4}function se(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setInt32(C,v,!0),C+4}function ye(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setUint32(C,v,!1),C+4}function ee(_,v,C=0){return new DataView(_.buffer,_.byteOffset,_.byteLength).setUint32(C,v,!0),C+4}e.exports=t={isBuffer:f,isEncoding:p,alloc:y,allocUnsafe:g,allocUnsafeSlow:m,byteLength:w,compare:F,concat:S,copy:M,equals:A,fill:I,from:R,includes:U,indexOf:j,lastIndexOf:H,swap16:ue,swap32:oe,swap64:X,toBuffer:re,toString:pe,write:le,readDoubleBE:J,readDoubleLE:G,readFloatBE:Q,readFloatLE:K,readInt32BE:W,readInt32LE:$,readUInt32BE:fe,readUInt32LE:ae,writeDoubleBE:ne,writeDoubleLE:Z,writeFloatBE:O,writeFloatLE:q,writeInt32BE:Y,writeInt32LE:se,writeUInt32BE:ye,writeUInt32LE:ee}})(Zh,Zh.exports)),Zh.exports}var rb,fC;function iq(){if(fC)return rb;fC=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++)],m=u[c.charCodeAt(p++)],w=u[c.charCodeAt(p++)],F=u[c.charCodeAt(p++)];f[y++]=g<<2|m>>4,f[y++]=m<<4|w>>2,f[y++]=w<<6|F}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 rb=async u=>(await WebAssembly.instantiate(await s,u)).exports,rb}var hC;function oq(){if(hC)return Fi.exports;hC=1;var e=Y3(),t=nq(),n=null,o=typeof WebAssembly<"u"&&iq()().then(w=>{n=w}),s=64,u=[];Fi.exports=g;var l=Fi.exports.BYTES_MIN=16,c=Fi.exports.BYTES_MAX=64;Fi.exports.BYTES=32;var h=Fi.exports.KEYBYTES_MIN=16,f=Fi.exports.KEYBYTES_MAX=64;Fi.exports.KEYBYTES=32;var p=Fi.exports.SALTBYTES=16,y=Fi.exports.PERSONALBYTES=16;function g(w,F,S,M,A){if(!(this instanceof g))return new g(w,F,S,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),F!=null&&(e(F instanceof Uint8Array,"key must be Uint8Array or Buffer"),e(F.length>=h,"key must be at least "+h+", was given "+F.length),e(F.length<=f,"key must be at least "+f+", was given "+F.length)),S!=null&&(e(S instanceof Uint8Array,"salt must be Uint8Array or Buffer"),e(S.length===p,"salt must be exactly "+p+", was given "+S.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]=F?F.length:0,this._memory[2]=1,this._memory[3]=1,S&&this._memory.set(S,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),F&&(this.update(F),this._memory.fill(0,s,s+F.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 F=0;F<this.digestLength;F++)w[F]=this._memory[this.pointer+128+F];return w},g.prototype.final=g.prototype.digest,g.WASM=n,g.SUPPORTED=typeof WebAssembly<"u",g.ready=function(w){return w||(w=m),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 m(){}return Fi.exports}var dC;function sq(){if(dC)return un.exports;dC=1;var e=Y3(),t=oq();function n(U,j,H){var P=U[j]+U[H],te=U[j+1]+U[H+1];P>=4294967296&&te++,U[j]=P,U[j+1]=te}function o(U,j,H,P){var te=U[j]+H;H<0&&(te+=4294967296);var ue=U[j+1]+P;te>=4294967296&&ue++,U[j]=te,U[j+1]=ue}function s(U,j){return U[j]^U[j+1]<<8^U[j+2]<<16^U[j+3]<<24}function u(U,j,H,P,te,ue){var oe=p[te],X=p[te+1],re=p[ue],pe=p[ue+1];n(f,U,j),o(f,U,oe,X);var le=f[P]^f[U],J=f[P+1]^f[U+1];f[P]=J,f[P+1]=le,n(f,H,P),le=f[j]^f[H],J=f[j+1]^f[H+1],f[j]=le>>>24^J<<8,f[j+1]=J>>>24^le<<8,n(f,U,j),o(f,U,re,pe),le=f[P]^f[U],J=f[P+1]^f[U+1],f[P]=le>>>16^J<<16,f[P+1]=J>>>16^le<<16,n(f,H,P),le=f[j]^f[H],J=f[j+1]^f[H+1],f[j]=J>>>31^le<<1,f[j+1]=le>>>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 H=0;for(H=0;H<16;H++)f[H]=U.h[H],f[H+16]=l[H];for(f[24]=f[24]^U.t,f[25]=f[25]^U.t/4294967296,j&&(f[28]=~f[28],f[29]=~f[29]),H=0;H<32;H++)p[H]=s(U.b,4*H);for(H=0;H<12;H++)u(0,8,16,24,h[H*16+0],h[H*16+1]),u(2,10,18,26,h[H*16+2],h[H*16+3]),u(4,12,20,28,h[H*16+4],h[H*16+5]),u(6,14,22,30,h[H*16+6],h[H*16+7]),u(0,10,20,30,h[H*16+8],h[H*16+9]),u(2,12,22,24,h[H*16+10],h[H*16+11]),u(4,14,16,26,h[H*16+12],h[H*16+13]),u(6,8,18,28,h[H*16+14],h[H*16+15]);for(H=0;H<16;H++)U.h[H]=U.h[H]^f[H]^f[H+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 m(U,j,H,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,H&&g.set(H,32),P&&g.set(P,48);for(var te=0;te<16;te++)this.h[te]=l[te]^s(g,te*4);j&&(w(this,j),this.c=128)}m.prototype.update=function(U){return e(U instanceof Uint8Array,"input must be Uint8Array or Buffer"),w(this,U),this},m.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"),F(this,j),U==="hex"?S(j):j},m.prototype.final=m.prototype.digest,m.ready=function(U){t.ready(function(){U()})};function w(U,j){for(var H=0;H<j.length;H++)U.c===128&&(U.t+=U.c,y(U,!1),U.c=0),U.b[U.c++]=j[H]}function F(U,j){for(U.t+=U.c;U.c<128;)U.b[U.c++]=0;y(U,!0);for(var H=0;H<U.outlen;H++)j[H]=U.h[H>>2]>>8*(H&3);return j}function S(U){for(var j="",H=0;H<U.length;H++)j+=M(U[H]);return j}function M(U){return U<16?"0"+U.toString(16):U.toString(16)}var A=m;un.exports=function(j,H,P,te,ue){return ue!==!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),H!=null&&(e(H instanceof Uint8Array,"key must be Uint8Array or Buffer"),e(H.length>=T,"key must be at least "+T+", was given "+H.length),e(H.length<=z,"key must be at most "+z+", was given "+H.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)),te!=null&&(e(te instanceof Uint8Array,"personal must be Uint8Array or Buffer"),e(te.length===L,"personal must be exactly "+L+", was given "+te.length))),new A(j,H,P,te)},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,z=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 pC;function aq(){if(pC)return Eo;pC=1;var e=Eo&&Eo.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.encode=Eo.decode=void 0;const t=e(Hb()),n=e(X$()),o=e(sq()),s=(0,n.default)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),u=Nr.Buffer.from("SS58PRE"),l=Nr.Buffer.alloc(64);function c(y){let g=s.decodeUnsafe(y);if(g==null||g.length<3)throw p(y);let m=g[0],w,F;if(m<64)F=m,w=1;else if(m<128){let M=g[1],A=(m<<2|M>>6)&255,I=M&63;F=A|I<<8,w=2}else throw p(y);let S;switch(g.length-w){case 34:case 35:S=2;break;case 9:case 5:case 3:case 2:S=1;break;default:throw p(y)}f(g,S);for(let M=0;M<S;M++)if(l[M]!=g[g.length-S+M])throw p(y);return{prefix:F,bytes:g.subarray(w,g.length-S)}}Eo.decode=c;function h(y){let g=y.prefix;(0,t.default)(Number.isInteger(g)&&g>=0&&g<16384,"invalid prefix");let m=y.bytes.length,w;switch(m){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 F,S;g<64?(F=Nr.Buffer.allocUnsafe(1+w+m),F[0]=g,S=1):(F=Nr.Buffer.allocUnsafe(2+w+m),F[0]=(g&252)>>2|64,F[1]=g>>8|(g&3)<<6,S=2),F.set(y.bytes,S),f(F,w);for(let M=0;M<w;M++)F[S+m+M]=l[M];return s.encode(F)}Eo.encode=h;function f(y,g){let m=(0,o.default)(64);m.update(u),m.update(y.subarray(0,y.length-g)),m.digest(l)}function p(y){return new Error("Invalid ss58 address: "+y)}return Eo}var uq=aq();function lq(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 m=f.length;for(;g!==m&&f[g]===0;)g++,p++;const w=(m-g)*u+1>>>0,F=new Uint8Array(w);for(;g!==m;){let A=f[g],I=0;for(let R=w-1;(A!==0||I<y)&&R!==-1;R--,I++)A+=256*F[R]>>>0,F[R]=A%n>>>0,A=A/n>>>0;if(A!==0)throw new Error("Non-zero carry");y=I,g++}let S=w-y;for(;S!==w&&F[S]===0;)S++;let M=o.repeat(p);for(;S<w;++S)M+=e.charAt(F[S]);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 m=(f.length-p)*s+1>>>0,w=new Uint8Array(m);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=m-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 F=m-g;for(;F!==m&&w[F]===0;)F++;const S=new Uint8Array(y+(m-F));let M=y;for(;F!==m;)S[M++]=w[F++];return S}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 cq="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const ld=lq(cq);function fq(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),ld.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=ld.decodeUnsafe(u);if(l!=null)return n(l)}function s(u){var l=ld.decode(u),c=n(l);if(c==null)throw new Error("Invalid checksum");return c}return{encode:t,decode:s,decodeUnsafe:o}}function hq(e){return xb(xb(e))}const $p=fq(hq);var aa={},yC;function dq(){if(yC)return aa;yC=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.bech32m=aa.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 m=0,w=0;const F=(1<<y)-1,S=[];for(let M=0;M<f.length;++M)for(m=m<<p|f[M],w+=p;w>=y;)w-=y,S.push(m>>w&F);if(g)w>0&&S.push(m<<y-w&F);else{if(w>=p)return"Excess padding";if(m<<y-w&F)return"Non-zero padding"}return S}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(F,S,M){if(M=M||90,F.length+7+S.length>M)throw new TypeError("Exceeds length limit");F=F.toLowerCase();let A=o(F);if(typeof A=="string")throw new Error(A);let I=F+"1";for(let R=0;R<S.length;++R){const T=S[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(F,S){if(S=S||90,F.length<8)return F+" too short";if(F.length>S)return"Exceeds length limit";const M=F.toLowerCase(),A=F.toUpperCase();if(F!==M&&F!==A)return"Mixed-case string "+F;F=M;const I=F.lastIndexOf("1");if(I===-1)return"No separator character for "+F;if(I===0)return"Missing prefix for "+F;const R=F.slice(0,I),T=F.slice(I+1);if(T.length<6)return"Data too short";let z=o(R);if(typeof z=="string")return z;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;z=n(z)^j,!(L+6>=T.length)&&k.push(j)}return z!==p?"Invalid checksum for "+F:{prefix:R,words:k}}function m(F,S){const M=g(F,S);if(typeof M=="object")return M}function w(F,S){const M=g(F,S);if(typeof M=="object")return M;throw new Error(M)}return{decodeUnsafe:m,decode:w,encode:y,toWords:u,fromWordsUnsafe:l,fromWords:c}}return aa.bech32=h("bech32"),aa.bech32m=h("bech32m"),aa}var Qb=dq(),nb={exports:{}},gC;function pq(){return gC||(gC=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=nf);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(S,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 "+S+" bytes: "+M+" <-");throw A.position=S,A},h=function(S){for(var M="",A=S.length,I=0,R=0,T,z;I<A;){if(T=S[I++],T<=127){M+=String.fromCharCode(T);continue}else T>191&&T<=223?(z=T&31,R=1):T<=239?(z=T&15,R=2):T<=247?(z=T&7,R=3):c(I,M);for(var k=0;k<R;++k)T=S[I++],(T<128||T>191)&&c(I,M),z<<=6,z+=T&63;z>=55296&&z<=57343&&c(I,M),z>1114111&&c(I,M),z<=65535?M+=String.fromCharCode(z):(z-=65536,M+=String.fromCharCode((z>>10)+55296),M+=String.fromCharCode((z&1023)+56320))}return M},f=function(S){if(S==="")return[];if(!/^[A-Z2-7=]+$/.test(S))throw new Error("Invalid base32 characters");S=S.replace(/=/g,"");for(var M,A,I,R,T,z,k,L,U=[],j=0,H=S.length,P=0,te=H>>3<<3;P<te;)M=u[S.charAt(P++)],A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.charAt(P++)],z=u[S.charAt(P++)],k=u[S.charAt(P++)],L=u[S.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|z<<2|k>>>3)&255,U[j++]=(k<<5|L)&255;var ue=H-te;return ue===2?(M=u[S.charAt(P++)],A=u[S.charAt(P++)],U[j++]=(M<<3|A>>>2)&255):ue===4?(M=u[S.charAt(P++)],A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],U[j++]=(M<<3|A>>>2)&255,U[j++]=(A<<6|I<<1|R>>>4)&255):ue===5?(M=u[S.charAt(P++)],A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.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):ue===7&&(M=u[S.charAt(P++)],A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.charAt(P++)],z=u[S.charAt(P++)],k=u[S.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|z<<2|k>>>3)&255),U},p=function(S){for(var M,A,I,R,T,z="",k=S.length,L=0,U=parseInt(k/5)*5;L<U;)M=S.charCodeAt(L++),A=S.charCodeAt(L++),I=S.charCodeAt(L++),R=S.charCodeAt(L++),T=S.charCodeAt(L++),z+=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=S.charCodeAt(L),z+=s[M>>>3]+s[M<<2&31]+"======"):j===2?(M=S.charCodeAt(L++),A=S.charCodeAt(L),z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):j===3?(M=S.charCodeAt(L++),A=S.charCodeAt(L++),I=S.charCodeAt(L),z+=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=S.charCodeAt(L++),A=S.charCodeAt(L++),I=S.charCodeAt(L++),R=S.charCodeAt(L),z+=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]+"="),z},y=function(S){var M,A,I,R,T,z,k=!1,L="",U=0,j,H=0,P=S.length;if(S==="")return L;do{for(l[0]=l[5],l[1]=l[6],l[2]=l[7],j=H;U<P&&j<5;++U)z=S.charCodeAt(U),z<128?l[j++]=z:z<2048?(l[j++]=192|z>>6,l[j++]=128|z&63):z<55296||z>=57344?(l[j++]=224|z>>12,l[j++]=128|z>>6&63,l[j++]=128|z&63):(z=65536+((z&1023)<<10|S.charCodeAt(++U)&1023),l[j++]=240|z>>18,l[j++]=128|z>>12&63,l[j++]=128|z>>6&63,l[j++]=128|z&63);H=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(S){for(var M,A,I,R,T,z="",k=S.length,L=0,U=parseInt(k/5)*5;L<U;)M=S[L++],A=S[L++],I=S[L++],R=S[L++],T=S[L++],z+=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=S[L],z+=s[M>>>3]+s[M<<2&31]+"======"):j===2?(M=S[L++],A=S[L],z+=s[M>>>3]+s[(M<<2|A>>>6)&31]+s[A>>>1&31]+s[A<<4&31]+"===="):j===3?(M=S[L++],A=S[L++],I=S[L],z+=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=S[L++],A=S[L++],I=S[L++],R=S[L],z+=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]+"="),z},m=function(S,M){var A=typeof S!="string";return A&&S.constructor===ArrayBuffer&&(S=new Uint8Array(S)),A?g(S):M?p(S):y(S)},w=function(S,M){if(!M)return h(f(S));if(S==="")return"";if(!/^[A-Z2-7=]+$/.test(S))throw new Error("Invalid base32 characters");var A,I,R,T,z,k,L,U,j="",H=S.indexOf("=");H===-1&&(H=S.length);for(var P=0,te=H>>3<<3;P<te;)A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.charAt(P++)],z=u[S.charAt(P++)],k=u[S.charAt(P++)],L=u[S.charAt(P++)],U=u[S.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)+String.fromCharCode((z<<7|k<<2|L>>>3)&255)+String.fromCharCode((L<<5|U)&255);var ue=H-te;return ue===2?(A=u[S.charAt(P++)],I=u[S.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)):ue===4?(A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)):ue===5?(A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.charAt(P++)],z=u[S.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)):ue===7&&(A=u[S.charAt(P++)],I=u[S.charAt(P++)],R=u[S.charAt(P++)],T=u[S.charAt(P++)],z=u[S.charAt(P++)],k=u[S.charAt(P++)],L=u[S.charAt(P++)],j+=String.fromCharCode((A<<3|I>>>2)&255)+String.fromCharCode((I<<6|R<<1|T>>>4)&255)+String.fromCharCode((T<<4|z>>>1)&255)+String.fromCharCode((z<<7|k<<2|L>>>3)&255)),j},F={encode:m,decode:w};w.asBytes=f,o?e.exports=F:t.base32=F})()})(nb)),nb.exports}var yq=pq();const V3=tp(yq);var ib={exports:{}},mC;function gq(){return mC||(mC=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=nf: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],m=["hex","array","digest","arrayBuffer"],w=[],F=Array.isArray;(s.JS_SHA512_NO_NODE_JS||!F)&&(F=function(U){return Object.prototype.toString.call(U)==="[object Array]"});var S=ArrayBuffer.isView;h&&(s.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!S)&&(S=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(!F(U)&&!S(U))throw new Error(t);return[U,!1]},A=function(U,j){return function(H){return new z(j,!0).update(H)[U]()}},I=function(U){var j=A("hex",U);j.create=function(){return new z(U)},j.update=function(te){return j.create().update(te)};for(var H=0;H<m.length;++H){var P=m[H];j[P]=A(P,U)}return j},R=function(U,j){return function(H,P){return new k(H,j,!0).update(P)[U]()}},T=function(U){var j=R("hex",U);j.create=function(te){return new k(te,U)},j.update=function(te,ue){return j.create(te).update(ue)};for(var H=0;H<m.length;++H){var P=m[H];j[P]=R(P,U)}return j};function z(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}z.prototype.update=function(U){if(this.finalized)throw new Error(n);var j=M(U);U=j[0];for(var H=j[1],P,te=0,ue,oe=U.length,X=this.blocks;te<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),H)for(ue=this.start;te<oe&&ue<128;++te)P=U.charCodeAt(te),P<128?X[ue>>>2]|=P<<y[ue++&3]:P<2048?(X[ue>>>2]|=(192|P>>>6)<<y[ue++&3],X[ue>>>2]|=(128|P&63)<<y[ue++&3]):P<55296||P>=57344?(X[ue>>>2]|=(224|P>>>12)<<y[ue++&3],X[ue>>>2]|=(128|P>>>6&63)<<y[ue++&3],X[ue>>>2]|=(128|P&63)<<y[ue++&3]):(P=65536+((P&1023)<<10|U.charCodeAt(++te)&1023),X[ue>>>2]|=(240|P>>>18)<<y[ue++&3],X[ue>>>2]|=(128|P>>>12&63)<<y[ue++&3],X[ue>>>2]|=(128|P>>>6&63)<<y[ue++&3],X[ue>>>2]|=(128|P&63)<<y[ue++&3]);else for(ue=this.start;te<oe&&ue<128;++te)X[ue>>>2]|=U[te]<<y[ue++&3];this.lastByteIndex=ue,this.bytes+=ue-this.start,ue>=128?(this.block=X[32],this.start=ue-128,this.hash(),this.hashed=!0):this.start=ue}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},z.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()}},z.prototype.hash=function(){var U=this.h0h,j=this.h0l,H=this.h1h,P=this.h1l,te=this.h2h,ue=this.h2l,oe=this.h3h,X=this.h3l,re=this.h4h,pe=this.h4l,le=this.h5h,J=this.h5l,G=this.h6h,Q=this.h6l,K=this.h7h,W=this.h7l,$=this.blocks,fe,ae,ne,Z,O,q,Y,se,ye,ee,_,v,C,D,he,ce,Ee,Be,de,ve,x,B,N,ie,me;for(fe=32;fe<160;fe+=2)ve=$[fe-30],x=$[fe-29],ae=(ve>>>1|x<<31)^(ve>>>8|x<<24)^ve>>>7,ne=(x>>>1|ve<<31)^(x>>>8|ve<<24)^(x>>>7|ve<<25),ve=$[fe-4],x=$[fe-3],Z=(ve>>>19|x<<13)^(x>>>29|ve<<3)^ve>>>6,O=(x>>>19|ve<<13)^(ve>>>29|x<<3)^(x>>>6|ve<<26),ve=$[fe-32],x=$[fe-31],B=$[fe-14],N=$[fe-13],q=(N&65535)+(x&65535)+(ne&65535)+(O&65535),Y=(N>>>16)+(x>>>16)+(ne>>>16)+(O>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(ae&65535)+(Z&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>16)+(ae>>>16)+(Z>>>16)+(se>>>16),$[fe]=ye<<16|se&65535,$[fe+1]=Y<<16|q&65535;var xe=U,Ce=j,we=H,Se=P,He=te,Ke=ue,Ve=oe,et=X,gt=re,bt=pe,lt=le,yt=J,tt=G,ft=Q,dt=K,At=W;for(ce=we&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),O=(bt>>>14|gt<<18)^(bt>>>18|gt<<14)^(gt>>>9|bt<<23),ee=xe&we,_=Ce&Se,Be=ee^xe&He^ce,de=_^Ce&Ke^Ee,ie=gt&lt^~gt&tt,me=bt&yt^~bt&ft,ve=$[fe],x=$[fe+1],B=g[fe],N=g[fe+1],q=(N&65535)+(x&65535)+(me&65535)+(O&65535)+(At&65535),Y=(N>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(At>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(ie&65535)+(Z&65535)+(dt&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>16)+(ie>>>16)+(Z>>>16)+(dt>>>16)+(se>>>16),ve=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),ye=(Be>>>16)+(ae>>>16)+(se>>>16),B=ye<<16|se&65535,N=Y<<16|q&65535,q=(et&65535)+(x&65535),Y=(et>>>16)+(x>>>16)+(q>>>16),se=(Ve&65535)+(ve&65535)+(Y>>>16),ye=(Ve>>>16)+(ve>>>16)+(se>>>16),dt=ye<<16|se&65535,At=Y<<16|q&65535,q=(N&65535)+(x&65535),Y=(N>>>16)+(x>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>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),O=(At>>>14|dt<<18)^(At>>>18|dt<<14)^(dt>>>9|At<<23),v=Ve&xe,C=et&Ce,Be=v^Ve&we^ee,de=C^et&Se^_,ie=dt&gt^~dt&lt,me=At&bt^~At&yt,ve=$[fe+2],x=$[fe+3],B=g[fe+2],N=g[fe+3],q=(N&65535)+(x&65535)+(me&65535)+(O&65535)+(ft&65535),Y=(N>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(ft>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(ie&65535)+(Z&65535)+(tt&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>16)+(ie>>>16)+(Z>>>16)+(tt>>>16)+(se>>>16),ve=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),ye=(Be>>>16)+(ae>>>16)+(se>>>16),B=ye<<16|se&65535,N=Y<<16|q&65535,q=(Ke&65535)+(x&65535),Y=(Ke>>>16)+(x>>>16)+(q>>>16),se=(He&65535)+(ve&65535)+(Y>>>16),ye=(He>>>16)+(ve>>>16)+(se>>>16),tt=ye<<16|se&65535,ft=Y<<16|q&65535,q=(N&65535)+(x&65535),Y=(N>>>16)+(x>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>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),O=(ft>>>14|tt<<18)^(ft>>>18|tt<<14)^(tt>>>9|ft<<23),D=He&Ve,he=Ke&et,Be=D^He&xe^v,de=he^Ke&Ce^C,ie=tt&dt^~tt&gt,me=ft&At^~ft&bt,ve=$[fe+4],x=$[fe+5],B=g[fe+4],N=g[fe+5],q=(N&65535)+(x&65535)+(me&65535)+(O&65535)+(yt&65535),Y=(N>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(yt>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(ie&65535)+(Z&65535)+(lt&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>16)+(ie>>>16)+(Z>>>16)+(lt>>>16)+(se>>>16),ve=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),ye=(Be>>>16)+(ae>>>16)+(se>>>16),B=ye<<16|se&65535,N=Y<<16|q&65535,q=(Se&65535)+(x&65535),Y=(Se>>>16)+(x>>>16)+(q>>>16),se=(we&65535)+(ve&65535)+(Y>>>16),ye=(we>>>16)+(ve>>>16)+(se>>>16),lt=ye<<16|se&65535,yt=Y<<16|q&65535,q=(N&65535)+(x&65535),Y=(N>>>16)+(x>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>16)+(se>>>16),we=ye<<16|se&65535,Se=Y<<16|q&65535,ae=(we>>>28|Se<<4)^(Se>>>2|we<<30)^(Se>>>7|we<<25),ne=(Se>>>28|we<<4)^(we>>>2|Se<<30)^(we>>>7|Se<<25),Z=(lt>>>14|yt<<18)^(lt>>>18|yt<<14)^(yt>>>9|lt<<23),O=(yt>>>14|lt<<18)^(yt>>>18|lt<<14)^(lt>>>9|yt<<23),ce=we&He,Ee=Se&Ke,Be=ce^we&Ve^D,de=Ee^Se&et^he,ie=lt&tt^~lt&dt,me=yt&ft^~yt&At,ve=$[fe+6],x=$[fe+7],B=g[fe+6],N=g[fe+7],q=(N&65535)+(x&65535)+(me&65535)+(O&65535)+(bt&65535),Y=(N>>>16)+(x>>>16)+(me>>>16)+(O>>>16)+(bt>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(ie&65535)+(Z&65535)+(gt&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>16)+(ie>>>16)+(Z>>>16)+(gt>>>16)+(se>>>16),ve=ye<<16|se&65535,x=Y<<16|q&65535,q=(de&65535)+(ne&65535),Y=(de>>>16)+(ne>>>16)+(q>>>16),se=(Be&65535)+(ae&65535)+(Y>>>16),ye=(Be>>>16)+(ae>>>16)+(se>>>16),B=ye<<16|se&65535,N=Y<<16|q&65535,q=(Ce&65535)+(x&65535),Y=(Ce>>>16)+(x>>>16)+(q>>>16),se=(xe&65535)+(ve&65535)+(Y>>>16),ye=(xe>>>16)+(ve>>>16)+(se>>>16),gt=ye<<16|se&65535,bt=Y<<16|q&65535,q=(N&65535)+(x&65535),Y=(N>>>16)+(x>>>16)+(q>>>16),se=(B&65535)+(ve&65535)+(Y>>>16),ye=(B>>>16)+(ve>>>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=(H&65535)+(we&65535)+(Y>>>16),ye=(H>>>16)+(we>>>16)+(se>>>16),this.h1h=ye<<16|se&65535,this.h1l=Y<<16|q&65535,q=(ue&65535)+(Ke&65535),Y=(ue>>>16)+(Ke>>>16)+(q>>>16),se=(te&65535)+(He&65535)+(Y>>>16),ye=(te>>>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=(re&65535)+(gt&65535)+(Y>>>16),ye=(re>>>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=(le&65535)+(lt&65535)+(Y>>>16),ye=(le>>>16)+(lt>>>16)+(se>>>16),this.h5h=ye<<16|se&65535,this.h5l=Y<<16|q&65535,q=(Q&65535)+(ft&65535),Y=(Q>>>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},z.prototype.hex=function(){this.finalize();var U=this.h0h,j=this.h0l,H=this.h1h,P=this.h1l,te=this.h2h,ue=this.h2l,oe=this.h3h,X=this.h3l,re=this.h4h,pe=this.h4l,le=this.h5h,J=this.h5l,G=this.h6h,Q=this.h6l,K=this.h7h,W=this.h7l,$=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[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[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[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[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[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 $>=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]),$>=384&&(fe+=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[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[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[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]),$==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[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[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},z.prototype.toString=z.prototype.hex,z.prototype.digest=function(){this.finalize();var U=this.h0h,j=this.h0l,H=this.h1h,P=this.h1l,te=this.h2h,ue=this.h2l,oe=this.h3h,X=this.h3l,re=this.h4h,pe=this.h4l,le=this.h5h,J=this.h5l,G=this.h6h,Q=this.h6l,K=this.h7h,W=this.h7l,$=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,H>>>24&255,H>>>16&255,H>>>8&255,H&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255,te>>>24&255,te>>>16&255,te>>>8&255,te&255,ue>>>24&255,ue>>>16&255,ue>>>8&255,ue&255,oe>>>24&255,oe>>>16&255,oe>>>8&255,oe&255];return $>=256&&fe.push(X>>>24&255,X>>>16&255,X>>>8&255,X&255),$>=384&&fe.push(re>>>24&255,re>>>16&255,re>>>8&255,re&255,pe>>>24&255,pe>>>16&255,pe>>>8&255,pe&255,le>>>24&255,le>>>16&255,le>>>8&255,le&255,J>>>24&255,J>>>16&255,J>>>8&255,J&255),$==512&&fe.push(G>>>24&255,G>>>16&255,G>>>8&255,G&255,Q>>>24&255,Q>>>16&255,Q>>>8&255,Q&255,K>>>24&255,K>>>16&255,K>>>8&255,K&255,W>>>24&255,W>>>16&255,W>>>8&255,W&255),fe},z.prototype.array=z.prototype.digest,z.prototype.arrayBuffer=function(){this.finalize();var U=this.bits,j=new ArrayBuffer(U/8),H=new DataView(j);return H.setUint32(0,this.h0h),H.setUint32(4,this.h0l),H.setUint32(8,this.h1h),H.setUint32(12,this.h1l),H.setUint32(16,this.h2h),H.setUint32(20,this.h2l),H.setUint32(24,this.h3h),U>=256&&H.setUint32(28,this.h3l),U>=384&&(H.setUint32(32,this.h4h),H.setUint32(36,this.h4l),H.setUint32(40,this.h5h),H.setUint32(44,this.h5l)),U==512&&(H.setUint32(48,this.h6h),H.setUint32(52,this.h6l),H.setUint32(56,this.h7h),H.setUint32(60,this.h7l)),j},z.prototype.clone=function(){var U=new z(this.bits,!1);return this.copyTo(U),U},z.prototype.copyTo=function(U){var j=0,H=["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<H.length;++j)U[H[j]]=this[H[j]];for(j=0;j<this.blocks.length;++j)U.blocks[j]=this.blocks[j]};function k(U,j,H){var P,te=M(U);if(U=te[0],te[1]){for(var ue=[],oe=U.length,X=0,re,P=0;P<oe;++P)re=U.charCodeAt(P),re<128?ue[X++]=re:re<2048?(ue[X++]=192|re>>>6,ue[X++]=128|re&63):re<55296||re>=57344?(ue[X++]=224|re>>>12,ue[X++]=128|re>>>6&63,ue[X++]=128|re&63):(re=65536+((re&1023)<<10|U.charCodeAt(++P)&1023),ue[X++]=240|re>>>18,ue[X++]=128|re>>>12&63,ue[X++]=128|re>>>6&63,ue[X++]=128|re&63);U=ue}U.length>128&&(U=new z(j,!0).update(U).array());for(var pe=[],le=[],P=0;P<128;++P){var J=U[P]||0;pe[P]=92^J,le[P]=54^J}z.call(this,j,H),this.update(le),this.oKeyPad=pe,this.inner=!0,this.sharedMemory=H}k.prototype=new z,k.prototype.finalize=function(){if(z.prototype.finalize.call(this),this.inner){this.inner=!1;var U=this.array();z.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(U),z.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)})()})(ib)),ib.exports}var mq=gq();const bq=tp(mq),W3="3.7.8",Aq=W3,ul=typeof Nr.Buffer=="function",bC=typeof TextDecoder=="function"?new TextDecoder:void 0,AC=typeof TextEncoder=="function"?new TextEncoder:void 0,wq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",fc=Array.prototype.slice.call(wq),Jh=(e=>{let t={};return e.forEach((n,o)=>t[n]=o),t})(fc),vq=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,en=String.fromCharCode.bind(String),wC=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),X3=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Z3=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),J3=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+=fc[t>>18&63]+fc[t>>12&63]+fc[t>>6&63]+fc[t&63]}return l?u.slice(0,l-3)+"===".substring(l):u},vv=typeof btoa=="function"?e=>btoa(e):ul?e=>Nr.Buffer.from(e,"binary").toString("base64"):J3,Gb=ul?e=>Nr.Buffer.from(e).toString("base64"):e=>{let n=[];for(let o=0,s=e.length;o<s;o+=4096)n.push(en.apply(null,e.subarray(o,o+4096)));return vv(n.join(""))},cd=(e,t=!1)=>t?X3(Gb(e)):Gb(e),xq=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?en(192|t>>>6)+en(128|t&63):en(224|t>>>12&15)+en(128|t>>>6&63)+en(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return en(240|t>>>18&7)+en(128|t>>>12&63)+en(128|t>>>6&63)+en(128|t&63)}},Eq=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,eB=e=>e.replace(Eq,xq),vC=ul?e=>Nr.Buffer.from(e,"utf8").toString("base64"):AC?e=>Gb(AC.encode(e)):e=>vv(eB(e)),Ru=(e,t=!1)=>t?X3(vC(e)):vC(e),xC=e=>Ru(e,!0),Sq=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Iq=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 en((n>>>10)+55296)+en((n&1023)+56320);case 3:return en((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return en((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},tB=e=>e.replace(Sq,Iq),rB=e=>{if(e=e.replace(/\s+/g,""),!vq.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=Jh[e.charAt(u++)]<<18|Jh[e.charAt(u++)]<<12|(n=Jh[e.charAt(u++)])<<6|(o=Jh[e.charAt(u++)]),n===64?s.push(en(t>>16&255)):o===64?s.push(en(t>>16&255,t>>8&255)):s.push(en(t>>16&255,t>>8&255,t&255));return s.join("")},xv=typeof atob=="function"?e=>atob(Z3(e)):ul?e=>Nr.Buffer.from(e,"base64").toString("binary"):rB,nB=ul?e=>wC(Nr.Buffer.from(e,"base64")):e=>wC(xv(e).split("").map(t=>t.charCodeAt(0))),iB=e=>nB(oB(e)),_q=ul?e=>Nr.Buffer.from(e,"base64").toString("utf8"):bC?e=>bC.decode(nB(e)):e=>tB(xv(e)),oB=e=>Z3(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Kb=e=>_q(oB(e)),Cq=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)},sB=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),aB=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,sB(n));e("fromBase64",function(){return Kb(this)}),e("toBase64",function(t){return Ru(this,t)}),e("toBase64URI",function(){return Ru(this,!0)}),e("toBase64URL",function(){return Ru(this,!0)}),e("toUint8Array",function(){return iB(this)})},uB=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,sB(n));e("toBase64",function(t){return cd(this,t)}),e("toBase64URI",function(){return cd(this,!0)}),e("toBase64URL",function(){return cd(this,!0)})},Fq=()=>{aB(),uB()},Oq={version:W3,VERSION:Aq,atob:xv,atobPolyfill:rB,btoa:vv,btoaPolyfill:J3,fromBase64:Kb,toBase64:Ru,encode:Ru,encodeURI:xC,encodeURL:xC,utob:eB,btou:tB,decode:Kb,isValid:Cq,fromUint8Array:cd,toUint8Array:iB,extendString:aB,extendUint8Array:uB,extendBuiltins:Fq},Da=e=>`${e} is malformed`,lB=e=>`${e} checksum is wrong`,Tq=32,EC=32,ed=36,cB=4,SC=58,IC=32,Bq=32,_C=Da("block hash"),Rq=Da("tx id"),ob=Da("address"),Mq=lB("address");function Uq(e){return Uint8Array.from(bq.sha512_256.array(e).slice(IC-cB,IC))}function jq(e){if(typeof e!="string")throw new Error(`${ob}: expected string, got ${typeof e}, ${e}`);if(e.length!==SC)throw new Error(`${ob}: expected length ${SC}, got ${e.length}: ${e}`);const t=V3.decode.asBytes(e);if(t.length!==ed)throw new Error(`${ob}: expected byte length ${ed}, got ${t.length}`);const n=new Uint8Array(t.slice(0,ed-cB)),o=new Uint8Array(t.slice(Bq,ed)),s=Uq(n);if(!Pq(s,o))throw new Error(Mq);return!0}function Nq(e){const t=Oq.toUint8Array("3KYSrPgi16Cl3iLu3r+GaeZkBBrgNFbMB60jsrJtTdI=");if(t.length!==EC)throw new Error(`${Rq}: expected byte length ${EC}, got ${t.length}`);return!0}function Dq(e){const t=V3.decode.asBytes(e);if(t.length!==Tq)throw new Error(`${_C}: expected byte length ${_C}, got ${t.length}`);return!0}function Pq(e,t){return e.length!==t.length?!1:Array.from(e).every((n,o)=>n===t[o])}const kq=34,Yb=34,CC=36,Lq=Da("block hash"),zq=Da("tx id"),$q=Da("address");function qq(e){const t=$p.decode(e);if(t.length!==CC)throw new Error(`${$q}: expected byte length ${CC}, got ${t.length}`);return!0}function Hq(e){const t=$p.decode(e);if(t.length!==Yb)throw new Error(`${Lq}: expected byte length ${kq}, got ${t.length}`);return!0}function Qq(e){const t=$p.decode(e);if(t.length!==Yb)throw new Error(`${zq}: expected byte length ${Yb}, got ${t.length}`);return!0}function Gq({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 Gi=Gq({polynomial:3988292384,numTables:8});function Kq(){return-1}function Yq(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=Gi[(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=Gi[0*256+(h>>>24&255)]^Gi[1*256+(h>>>16&255)]^Gi[2*256+(h>>>8&255)]^Gi[3*256+(h>>>0&255)]^Gi[4*256+(s>>>24&255)]^Gi[5*256+(s>>>16&255)]^Gi[6*256+(s>>>8&255)]^Gi[7*256+(s>>>0&255)]}for(let h=u;h<n;h++)s=Gi[(s^o.getUint8(h))&255]^s>>>8;return s}function Vq(e){return(e^-1)>>>0}function Wq(e){return Vq(Yq(Kq(),e))}const ua=Error,td=Error,sb="Unexpected end of buffer",Fu=class Fu{constructor(t){this.initialByte=t}CborInitialByte(t,n){this.initialByte=t<<5|n}static from(t){return new Fu(t)}getInitialByte(){return this.initialByte}getMajorType(){return this.initialByte>>5}getAdditionalInfo(){return this.initialByte&Fu.AdditionalInformationMask}};Fu.IndefiniteLengthBreakByte=255,Fu.AdditionalInformationMask=31;let Os=Fu;var Mo,Oi,Zd,Mu,dr,Jd,Tt,fB,hB,dB,fd,Rn,Wb,pB,hd,hc,dc,la,Xb,ca;const Jr=class Jr{constructor(t){Et(this,Tt);Et(this,Mo);Et(this,Oi,0);Et(this,Zd,new Array);Et(this,Mu,!1);Et(this,dr);Et(this,Jd,0);ht(this,Mo,new Uint8Array(Nr.Buffer.from(t,"hex"))),ht(this,dr,{currentKeyOffset:null,frameOffset:0,itemsRead:0,type:null})}readStartArray(){var u;const t=We(this,Tt,hc).call(this,4);if(t.getAdditionalInfo()===31)return We(this,Tt,la).call(this,1),We(this,Tt,Xb).call(this,4),null;const n=We(this,Tt,ca).call(this),{length:o,bytesRead:s}=We(u=Jr,Rn,hd).call(u,t,n);return We(this,Tt,la).call(this,s),We(this,Tt,Xb).call(this,4,o),o}readTag(){const{tag:t,bytesRead:n}=We(this,Tt,pB).call(this);return We(this,Tt,la).call(this,n),ht(this,Mu,!0),t}readByteString(){var u;const t=We(this,Tt,hc).call(this,2);if(t.getAdditionalInfo()===31){const{val:l,encodingLength:c}=We(this,Tt,dB).call(this,2);return We(this,Tt,la).call(this,c),We(this,Tt,fd).call(this),l}const n=We(this,Tt,ca).call(this),{length:o,bytesRead:s}=We(u=Jr,Rn,hd).call(u,t,n);return We(this,Tt,hB).call(this,s+o),We(this,Tt,la).call(this,s+o),We(this,Tt,fd).call(this),n.slice(s,s+o)}readInt(){const t=We(this,Tt,fB).call(this);return We(this,Tt,la).call(this,t.bytesRead),We(this,Tt,fd).call(this),t.signedInt}static ensureReadCapacityInArray(t,n){if(t.length<n)throw new ua(sb)}};Mo=new WeakMap,Oi=new WeakMap,Zd=new WeakMap,Mu=new WeakMap,dr=new WeakMap,Jd=new WeakMap,Tt=new WeakSet,fB=function(){var n,o;const t=We(this,Tt,hc).call(this);switch(t.getMajorType()){case 0:{const{unsignedInt:s,bytesRead:u}=We(n=Jr,Rn,dc).call(n,t,We(this,Tt,ca).call(this));return{bytesRead:u,signedInt:BigInt(s)}}case 1:{const{unsignedInt:s,bytesRead:u}=We(o=Jr,Rn,dc).call(o,t,We(this,Tt,ca).call(this));return{bytesRead:u,signedInt:BigInt(-1)-s}}default:throw new td(`Reader type mismatch, expected 0 or 1 but got ${t.getMajorType()}`)}},hB=function(t){if(Ae(this,Mo).length-Ae(this,Oi)<t)throw new ua(sb)},dB=function(t){var c,h,f;const n=We(this,Tt,ca).call(this);let o=Nr.Buffer.from([]),s=0,u=1,l=We(c=Jr,Rn,Wb).call(c,n.slice(u),t);for(;l.getInitialByte()!==Os.IndefiniteLengthBreakByte;){const{length:p,bytesRead:y}=We(h=Jr,Rn,hd).call(h,l,n.slice(u)),g=y+Number(p);o=Nr.Buffer.concat([o,n.slice(u+(g-p),u+g)]),u+=g,l=We(f=Jr,Rn,Wb).call(f,n.slice(u),t)}return s=u+1,{encodingLength:s,val:new Uint8Array(o)}},fd=function(){++Ae(this,dr).itemsRead,ht(this,Mu,!1)},Rn=new WeakSet,Wb=function(t,n){Jr.ensureReadCapacityInArray(t,1);const o=Os.from(t[0]);if(o.getInitialByte()!==Os.IndefiniteLengthBreakByte&&o.getMajorType()!==n)throw new ua("Indefinite length string contains invalid data item");return o},pB=function(){var s;const t=We(this,Tt,hc).call(this,6),{unsignedInt:n,bytesRead:o}=We(s=Jr,Rn,dc).call(s,t,We(this,Tt,ca).call(this));return{bytesRead:o,tag:Number(n)}},hd=function(t,n){var u;const{unsignedInt:o,bytesRead:s}=We(u=Jr,Rn,dc).call(u,t,n);return{bytesRead:s,length:Number(o)}},hc=function(t){if(Ae(this,dr).definiteLength!==void 0&&Ae(this,dr).definiteLength-Ae(this,dr).itemsRead===0)throw new td("No more data items to read");if(Ae(this,Oi)===Ae(this,Mo).length)throw Ae(this,dr).type===null&&Ae(this,dr).definiteLength===void 0&&Ae(this,Oi)>0?new td("End of root-level. No more data items to read"):new ua(sb);const n=Os.from(Ae(this,Mo)[Ae(this,Oi)]);switch(Ae(this,dr).type){case 2:case 3:if(n.getInitialByte()===Os.IndefiniteLengthBreakByte||n.getMajorType()===Ae(this,dr).type&&n.getAdditionalInfo()!==31)break;throw new ua(`Indefinite length string contains invalid data item, ${n.getMajorType()}`)}if(t&&t!==n.getMajorType())throw new td(`Major type mismatch, expected type ${t} but got ${n.getMajorType()}`);return n},dc=function(t,n){if((t.getInitialByte()&Os.AdditionalInformationMask)<24)return{bytesRead:1,unsignedInt:BigInt(t.getAdditionalInfo())};switch(t.getAdditionalInfo()){case 24:return Jr.ensureReadCapacityInArray(n,2),{bytesRead:2,unsignedInt:BigInt(n[1])};case 25:{Jr.ensureReadCapacityInArray(n,3);const s=Nr.Buffer.from(n.slice(1)).readUInt16BE();return{bytesRead:3,unsignedInt:BigInt(s)}}case 26:{Jr.ensureReadCapacityInArray(n,5);const s=Nr.Buffer.from(n.slice(1)).readUInt32BE();return{bytesRead:5,unsignedInt:BigInt(s)}}case 27:{Jr.ensureReadCapacityInArray(n,9);const o=Nr.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 ua("Invalid integer encoding")}},la=function(t){if(Ae(this,Oi)+t>Ae(this,Mo).length)throw new ua("Buffer offset out of bounds");ht(this,Oi,Ae(this,Oi)+t),ht(this,Jd,0)},Xb=function(t,n){const o={currentKeyOffset:Ae(this,dr).currentKeyOffset,definiteLength:Ae(this,dr).definiteLength,frameOffset:Ae(this,dr).frameOffset,itemsRead:Ae(this,dr).itemsRead,type:Ae(this,dr).type};Ae(this,Zd).push(o),Ae(this,dr).type=t,Ae(this,dr).definiteLength=n,Ae(this,dr).itemsRead=0,Ae(this,dr).frameOffset=Ae(this,Oi),ht(this,Mu,!1),Ae(this,dr).currentKeyOffset=null},ca=function(){return Ae(this,Mo).slice(Ae(this,Oi))},Et(Jr,Rn);let Vb=Jr;const Xq=lB("address");function Zq(e){return yB(ld.decode(e))}function yB(e){const t=new Vb(Nr.Buffer.from(e).toString("hex"));t.readStartArray(),t.readTag();const n=t.readByteString();if(Number(t.readInt())!==Wq(n))throw new Error(Xq);return!0}function Jq(e){const t=Qb.bech32.decode(e,Number.MAX_SAFE_INTEGER/2),n=Qb.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=Nr.Buffer.from(n),{bytesRead:l}=ab(u.subarray(s));s+=l;const{bytesRead:c}=ab(u.subarray(s));return s+=c,ab(u.subarray(s)),!0}case 6:case 7:return n.length===47;case 14:case 15:return n.length===47;case 8:return yB(new Uint8Array(n));default:throw new Error(Da("address"))}}const ab=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 Ir=(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))(Ir||{});function Di(e,t,n=()=>!0){try{return n(t(e))}catch{return!1}}to("algorand-address",e=>Di(e,jq));to("algorand-blockhash",e=>Di(e,Nq));to("algorand-txid",e=>Di(e,Dq));to("mina-address",e=>Di(e,qq));to("mina-blockhash",e=>Di(e,Hq));to("mina-txid",e=>Di(e,Qq));to("cardano-address",e=>Di(e,Zq)||Di(e,Jq));to("ss58",e=>Di(e,uq.decode));to("bs58check",e=>Di(e,$p.decode));to("bech32",e=>Di(e,t=>Qb.bech32.decode(t,Number.MAX_SAFE_INTEGER/2)));function ln(e){return je.Transform(e).Decode(t=>t.toLowerCase()).Encode(t=>t.toLowerCase())}function FC(e){return je.Transform(e).Decode(t=>t.toUpperCase()).Encode(t=>t.toUpperCase())}const tn={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(FC(je.String({format:"algorand-txid"}))),Address:je.Unsafe(FC(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())},eH={[-1]:je.Literal("0x0"),0:tn.Evm.Address,1:tn.Cardano.Address,2:tn.Substrate.Address,6:tn.Avail.Address,3:tn.Algorand.Address,4:tn.Mina.Address,5:tn.Midnight.Address,7:tn.Polkadot.Address};je.Object({type:je.Literal(-1),address:je.Literal("0x0")}),je.Object({type:je.Literal(0),address:tn.Evm.Address}),je.Object({type:je.Literal(1),address:tn.Cardano.Address}),je.Object({type:je.Literal(2),address:tn.Substrate.Address}),je.Object({type:je.Literal(6),address:tn.Avail.Address}),je.Object({type:je.Literal(3),address:tn.Algorand.Address}),je.Object({type:je.Literal(4),address:tn.Mina.Address}),je.Object({type:je.Literal(5),address:tn.Midnight.Address}),je.Object({type:je.Literal(7),address:tn.Polkadot.Address});function Ev(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 So(e){return["userAddress",eH[e]]}const Io=[["userSignature",je.String()],["conciseInput",je.String()],["millisecondTimestamp",je.String()]],tH={[`${Ir.NONE}`]:[So(Ir.NONE),...Io],[`${Ir.EVM}`]:[So(Ir.EVM),...Io],[`${Ir.CARDANO}`]:[So(Ir.CARDANO),...Io],[`${Ir.SUBSTRATE}`]:[So(Ir.SUBSTRATE),...Io],[`${Ir.AVAIL}`]:[So(Ir.AVAIL),...Io],[`${Ir.ALGORAND}`]:[So(Ir.ALGORAND),...Io],[`${Ir.MINA}`]:[So(Ir.MINA),...Io],[`${Ir.MIDNIGHT}`]:[So(Ir.MIDNIGHT),...Io],[`${Ir.POLKADOT}`]:[So(Ir.POLKADOT),...Io]};Ev(tH);const rH={batcherInput:"&B"},nH={[rH.batcherInput]:[["input",je.Array(je.String())]]};Ev(nH);const ub={createAccount:"&createAccount",linkAddress:"&linkAddress",unlinkAddress:"&unlinkAddress"},iH={[ub.createAccount]:[],[ub.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()]],[ub.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()]]};Ev(iH);var lb={exports:{}},OC;function oH(){return OC||(OC=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=nf: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],m=[6,1536,393216,100663296],w=[0,8,16,24],F=[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],S=[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(O){return Object.prototype.toString.call(O)==="[object Array]"}:Array.isArray,T=h&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)?function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer}:ArrayBuffer.isView,z=function(O){var q=typeof O;if(q==="string")return[O,!0];if(q!=="object"||O===null)throw new Error(t);if(h&&O.constructor===ArrayBuffer)return[new Uint8Array(O),!1];if(!R(O)&&!T(O))throw new Error(t);return[O,!1]},k=function(O){return z(O)[0].length===0},L=function(O){for(var q=[],Y=0;Y<O.length;++Y)q[Y]=O[Y];return q},U=function(O,q,Y){return function(se){return new ae(O,q,O).update(se)[Y]()}},j=function(O,q,Y){return function(se,ye){return new ae(O,q,ye).update(se)[Y]()}},H=function(O,q,Y){return function(se,ye,ee,_){return le["cshake"+O].update(se,ye,ee,_)[Y]()}},P=function(O,q,Y){return function(se,ye,ee,_){return le["kmac"+O].update(se,ye,ee,_)[Y]()}},te=function(O,q,Y,se){for(var ye=0;ye<A.length;++ye){var ee=A[ye];O[ee]=q(Y,se,ee)}return O},ue=function(O,q){var Y=U(O,q,"hex");return Y.create=function(){return new ae(O,q,O)},Y.update=function(se){return Y.create().update(se)},te(Y,U,O,q)},oe=function(O,q){var Y=j(O,q,"hex");return Y.create=function(se){return new ae(O,q,se)},Y.update=function(se,ye){return Y.create(ye).update(se)},te(Y,j,O,q)},X=function(O,q){var Y=I[O],se=H(O,q,"hex");return se.create=function(ye,ee,_){return k(ee)&&k(_)?le["shake"+O].create(ye):new ae(O,q,ye).bytepad([ee,_],Y)},se.update=function(ye,ee,_,v){return se.create(ee,_,v).update(ye)},te(se,H,O,q)},re=function(O,q){var Y=I[O],se=P(O,q,"hex");return se.create=function(ye,ee,_){return new ne(O,q,ee).bytepad(["KMAC",_],Y).bytepad([ye],Y)},se.update=function(ye,ee,_,v){return se.create(ye,_,v).update(ee)},te(se,P,O,q)},pe=[{name:"keccak",padding:g,bits:S,createMethod:ue},{name:"sha3",padding:m,bits:S,createMethod:ue},{name:"shake",padding:p,bits:M,createMethod:oe},{name:"cshake",padding:y,bits:M,createMethod:X},{name:"kmac",padding:y,bits:M,createMethod:re}],le={},J=[],G=0;G<pe.length;++G)for(var Q=pe[G],K=Q.bits,W=0;W<K.length;++W){var $=Q.name+"_"+K[W];if(J.push($),le[$]=Q.createMethod(K[W],Q.padding),Q.name!=="sha3"){var fe=Q.name+K[W];J.push(fe),le[fe]=le[$]}}function ae(O,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-(O<<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(O){if(this.finalized)throw new Error(n);var q=z(O);O=q[0];for(var Y=q[1],se=this.blocks,ye=this.byteCount,ee=O.length,_=this.blockCount,v=0,C=this.s,D,he;v<ee;){if(this.reset)for(this.reset=!1,se[0]=this.block,D=1;D<_+1;++D)se[D]=0;if(Y)for(D=this.start;v<ee&&D<ye;++v)he=O.charCodeAt(v),he<128?se[D>>2]|=he<<w[D++&3]:he<2048?(se[D>>2]|=(192|he>>6)<<w[D++&3],se[D>>2]|=(128|he&63)<<w[D++&3]):he<55296||he>=57344?(se[D>>2]|=(224|he>>12)<<w[D++&3],se[D>>2]|=(128|he>>6&63)<<w[D++&3],se[D>>2]|=(128|he&63)<<w[D++&3]):(he=65536+((he&1023)<<10|O.charCodeAt(++v)&1023),se[D>>2]|=(240|he>>18)<<w[D++&3],se[D>>2]|=(128|he>>12&63)<<w[D++&3],se[D>>2]|=(128|he>>6&63)<<w[D++&3],se[D>>2]|=(128|he&63)<<w[D++&3]);else for(D=this.start;v<ee&&D<ye;++v)se[D>>2]|=O[v]<<w[D++&3];if(this.lastByteIndex=D,D>=ye){for(this.start=D-ye,this.block=se[_],D=0;D<_;++D)C[D]^=se[D];Z(C),this.reset=!0}else this.start=D}return this},ae.prototype.encode=function(O,q){var Y=O&255,se=1,ye=[Y];for(O=O>>8,Y=O&255;Y>0;)ye.unshift(Y),O=O>>8,Y=O&255,++se;return q?ye.push(se):ye.unshift(se),this.update(ye),ye.length},ae.prototype.encodeString=function(O){var q=z(O);O=q[0];var Y=q[1],se=0,ye=O.length;if(Y)for(var ee=0;ee<O.length;++ee){var _=O.charCodeAt(ee);_<128?se+=1:_<2048?se+=2:_<55296||_>=57344?se+=3:(_=65536+((_&1023)<<10|O.charCodeAt(++ee)&1023),se+=4)}else se=ye;return se+=this.encode(se*8),this.update(O),se},ae.prototype.bytepad=function(O,q){for(var Y=this.encode(q),se=0;se<O.length;++se)Y+=this.encodeString(O[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 O=this.blocks,q=this.lastByteIndex,Y=this.blockCount,se=this.s;if(O[q>>2]|=this.padding[q&3],this.lastByteIndex===this.byteCount)for(O[0]=O[Y],q=1;q<Y+1;++q)O[q]=0;for(O[Y-1]|=2147483648,q=0;q<Y;++q)se[q]^=O[q];Z(se)}},ae.prototype.toString=ae.prototype.hex=function(){this.finalize();for(var O=this.blockCount,q=this.s,Y=this.outputBlocks,se=this.extraBytes,ye=0,ee=0,_="",v;ee<Y;){for(ye=0;ye<O&&ee<Y;++ye,++ee)v=q[ye],_+=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%O===0&&(q=L(q),Z(q),ye=0)}return se&&(v=q[ye],_+=f[v>>4&15]+f[v&15],se>1&&(_+=f[v>>12&15]+f[v>>8&15]),se>2&&(_+=f[v>>20&15]+f[v>>16&15])),_},ae.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,q=this.s,Y=this.outputBlocks,se=this.extraBytes,ye=0,ee=0,_=this.outputBits>>3,v;se?v=new ArrayBuffer(Y+1<<2):v=new ArrayBuffer(_);for(var C=new Uint32Array(v);ee<Y;){for(ye=0;ye<O&&ee<Y;++ye,++ee)C[ee]=q[ye];ee%O===0&&(q=L(q),Z(q))}return se&&(C[ee]=q[ye],v=v.slice(0,_)),v},ae.prototype.buffer=ae.prototype.arrayBuffer,ae.prototype.digest=ae.prototype.array=function(){this.finalize();for(var O=this.blockCount,q=this.s,Y=this.outputBlocks,se=this.extraBytes,ye=0,ee=0,_=[],v,C;ee<Y;){for(ye=0;ye<O&&ee<Y;++ye,++ee)v=ee<<2,C=q[ye],_[v]=C&255,_[v+1]=C>>8&255,_[v+2]=C>>16&255,_[v+3]=C>>24&255;ee%O===0&&(q=L(q),Z(q))}return se&&(v=ee<<2,C=q[ye],_[v]=C&255,se>1&&(_[v+1]=C>>8&255),se>2&&(_[v+2]=C>>16&255)),_};function ne(O,q,Y){ae.call(this,O,q,Y)}ne.prototype=new ae,ne.prototype.finalize=function(){return this.encode(this.outputBits,!0),ae.prototype.finalize.call(this)};var Z=function(O){var q,Y,se,ye,ee,_,v,C,D,he,ce,Ee,Be,de,ve,x,B,N,ie,me,xe,Ce,we,Se,He,Ke,Ve,et,gt,bt,lt,yt,tt,ft,dt,At,Zt,Ar,be,Ie,Ye,Je,st,qt,rr,Br,zn,Rr,Ht,nr,Mr,Ur,gn,xn,kr,wr,Vo,xi,Ei,Li,Si,ur,qs;for(se=0;se<48;se+=2)ye=O[0]^O[10]^O[20]^O[30]^O[40],ee=O[1]^O[11]^O[21]^O[31]^O[41],_=O[2]^O[12]^O[22]^O[32]^O[42],v=O[3]^O[13]^O[23]^O[33]^O[43],C=O[4]^O[14]^O[24]^O[34]^O[44],D=O[5]^O[15]^O[25]^O[35]^O[45],he=O[6]^O[16]^O[26]^O[36]^O[46],ce=O[7]^O[17]^O[27]^O[37]^O[47],Ee=O[8]^O[18]^O[28]^O[38]^O[48],Be=O[9]^O[19]^O[29]^O[39]^O[49],q=Ee^(_<<1|v>>>31),Y=Be^(v<<1|_>>>31),O[0]^=q,O[1]^=Y,O[10]^=q,O[11]^=Y,O[20]^=q,O[21]^=Y,O[30]^=q,O[31]^=Y,O[40]^=q,O[41]^=Y,q=ye^(C<<1|D>>>31),Y=ee^(D<<1|C>>>31),O[2]^=q,O[3]^=Y,O[12]^=q,O[13]^=Y,O[22]^=q,O[23]^=Y,O[32]^=q,O[33]^=Y,O[42]^=q,O[43]^=Y,q=_^(he<<1|ce>>>31),Y=v^(ce<<1|he>>>31),O[4]^=q,O[5]^=Y,O[14]^=q,O[15]^=Y,O[24]^=q,O[25]^=Y,O[34]^=q,O[35]^=Y,O[44]^=q,O[45]^=Y,q=C^(Ee<<1|Be>>>31),Y=D^(Be<<1|Ee>>>31),O[6]^=q,O[7]^=Y,O[16]^=q,O[17]^=Y,O[26]^=q,O[27]^=Y,O[36]^=q,O[37]^=Y,O[46]^=q,O[47]^=Y,q=he^(ye<<1|ee>>>31),Y=ce^(ee<<1|ye>>>31),O[8]^=q,O[9]^=Y,O[18]^=q,O[19]^=Y,O[28]^=q,O[29]^=Y,O[38]^=q,O[39]^=Y,O[48]^=q,O[49]^=Y,de=O[0],ve=O[1],Br=O[11]<<4|O[10]>>>28,zn=O[10]<<4|O[11]>>>28,et=O[20]<<3|O[21]>>>29,gt=O[21]<<3|O[20]>>>29,Li=O[31]<<9|O[30]>>>23,Si=O[30]<<9|O[31]>>>23,Je=O[40]<<18|O[41]>>>14,st=O[41]<<18|O[40]>>>14,ft=O[2]<<1|O[3]>>>31,dt=O[3]<<1|O[2]>>>31,x=O[13]<<12|O[12]>>>20,B=O[12]<<12|O[13]>>>20,Rr=O[22]<<10|O[23]>>>22,Ht=O[23]<<10|O[22]>>>22,bt=O[33]<<13|O[32]>>>19,lt=O[32]<<13|O[33]>>>19,ur=O[42]<<2|O[43]>>>30,qs=O[43]<<2|O[42]>>>30,xn=O[5]<<30|O[4]>>>2,kr=O[4]<<30|O[5]>>>2,At=O[14]<<6|O[15]>>>26,Zt=O[15]<<6|O[14]>>>26,N=O[25]<<11|O[24]>>>21,ie=O[24]<<11|O[25]>>>21,nr=O[34]<<15|O[35]>>>17,Mr=O[35]<<15|O[34]>>>17,yt=O[45]<<29|O[44]>>>3,tt=O[44]<<29|O[45]>>>3,Se=O[6]<<28|O[7]>>>4,He=O[7]<<28|O[6]>>>4,wr=O[17]<<23|O[16]>>>9,Vo=O[16]<<23|O[17]>>>9,Ar=O[26]<<25|O[27]>>>7,be=O[27]<<25|O[26]>>>7,me=O[36]<<21|O[37]>>>11,xe=O[37]<<21|O[36]>>>11,Ur=O[47]<<24|O[46]>>>8,gn=O[46]<<24|O[47]>>>8,qt=O[8]<<27|O[9]>>>5,rr=O[9]<<27|O[8]>>>5,Ke=O[18]<<20|O[19]>>>12,Ve=O[19]<<20|O[18]>>>12,xi=O[29]<<7|O[28]>>>25,Ei=O[28]<<7|O[29]>>>25,Ie=O[38]<<8|O[39]>>>24,Ye=O[39]<<8|O[38]>>>24,Ce=O[48]<<14|O[49]>>>18,we=O[49]<<14|O[48]>>>18,O[0]=de^~x&N,O[1]=ve^~B&ie,O[10]=Se^~Ke&et,O[11]=He^~Ve&gt,O[20]=ft^~At&Ar,O[21]=dt^~Zt&be,O[30]=qt^~Br&Rr,O[31]=rr^~zn&Ht,O[40]=xn^~wr&xi,O[41]=kr^~Vo&Ei,O[2]=x^~N&me,O[3]=B^~ie&xe,O[12]=Ke^~et&bt,O[13]=Ve^~gt&lt,O[22]=At^~Ar&Ie,O[23]=Zt^~be&Ye,O[32]=Br^~Rr&nr,O[33]=zn^~Ht&Mr,O[42]=wr^~xi&Li,O[43]=Vo^~Ei&Si,O[4]=N^~me&Ce,O[5]=ie^~xe&we,O[14]=et^~bt&yt,O[15]=gt^~lt&tt,O[24]=Ar^~Ie&Je,O[25]=be^~Ye&st,O[34]=Rr^~nr&Ur,O[35]=Ht^~Mr&gn,O[44]=xi^~Li&ur,O[45]=Ei^~Si&qs,O[6]=me^~Ce&de,O[7]=xe^~we&ve,O[16]=bt^~yt&Se,O[17]=lt^~tt&He,O[26]=Ie^~Je&ft,O[27]=Ye^~st&dt,O[36]=nr^~Ur&qt,O[37]=Mr^~gn&rr,O[46]=Li^~ur&xn,O[47]=Si^~qs&kr,O[8]=Ce^~de&x,O[9]=we^~ve&B,O[18]=yt^~Se&Ke,O[19]=tt^~He&Ve,O[28]=Je^~ft&At,O[29]=st^~dt&Zt,O[38]=Ur^~qt&Br,O[39]=gn^~rr&zn,O[48]=ur^~xn&wr,O[49]=qs^~kr&Vo,O[0]^=F[se],O[1]^=F[se+1]};if(c)e.exports=le;else for(G=0;G<J.length;++G)s[J[G]]=le[J[G]]})()})(lb)),lb.exports}var sH=oH();const gB=tp(sH),{keccak_256:VG}=gB;function aH(e,t,n,o,s,u=void 0){let l;switch(o){case Ir.EVM:l=a$(tn.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 uH={EVM:0};async function lH(e,t,n=void 0){const o=xs(t.privateKey),s=od({account:o,chain:ad,transport:sd()}),u=Date.now().toString(),l=o.address,c=uH.EVM,h=aH(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 cH(e){const t=await fetch(WN,{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 rd(e,t,n=void 0){console.log("🚀 Creating signed input for:",e);const o=await lH(e,t,n);console.log("✅ Signed input created:",{...o,signature:o.signature.slice(0,10)+"..."}),console.log("📤 Sending to batcher...");const s=await cH(o);return console.log("🎉 Batcher response:",s),s}function fH(){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,m]=Xe.useState(!1),[w,F]=Xe.useState([]),[S,M]=Xe.useState(null),[A,I]=Xe.useState([]),[R,T]=Xe.useState(!1),[z,k]=Xe.useState(!1),[L,U]=Xe.useState(!1),[j,H]=Xe.useState(""),[P,te]=Xe.useState(""),[ue,oe]=Xe.useState(""),[X,re]=Xe.useState(null),[pe,le]=Xe.useState(null),J=(ee,_,v)=>{const C=Date.now(),D={id:C,type:ee,title:_,message:v};I(he=>[...he,D]),setTimeout(()=>{I(he=>he.filter(ce=>ce.id!==C))},5e3)},G=ee=>{I(_=>_.filter(v=>v.id!==ee))},Q=()=>{const ee=CM(),_=xs(ee),v={id:Date.now().toString(),privateKey:ee,address:_.address,name:`Wallet ${w.length+1}`};F(C=>[...C,v]),M(v),J("success","Wallet Generated",`New wallet created: ${_.address.slice(0,6)}...${_.address.slice(-4)}`)},K=ee=>{F(_=>_.filter(v=>v.id!==ee)),(S==null?void 0:S.id)===ee&&M(null)},W=async()=>{if(!S){J("error","No Wallet","Please select a wallet first");return}U(!0);try{const _=JSON.stringify(["&createAccount"]);await rd(_,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)}},$=async()=>{if(!S){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(),"","",""],_=JSON.stringify(ee);await rd(_,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(!S){J("error","No Wallet","Please select a wallet first");return}if(!X){J("error","No Account","Please select an account ID");return}if(!ue.trim()){J("error","No Address","Please enter an address to unlink");return}const ee=od({account:xs(S.privateKey),chain:ad,transport:sd()});U(!0);const _=`unlink:${String(X)}:${ue.toString().toLowerCase().trim()}:`,v=await ee.signMessage({account:xs(S.privateKey),message:_});try{const C=["&unlinkAddress",X.toString(),v,ue.toString().toLowerCase().trim(),""],D=JSON.stringify(C);await rd(D,S),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(!S){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=od({account:xs(S.privateKey),chain:ad,transport:sd()}),_=od({account:xs(pe.privateKey),chain:ad,transport:sd()}),v=`link:${X}:${pe.address.toString().toLowerCase().trim()}:false`,C=await ee.signMessage({account:xs(S.privateKey),message:v}),D=`link:${X}:${S.address.toString().toLowerCase().trim()}:false`,he=await _.signMessage({account:xs(pe.privateKey),message:D}),ce=["&linkAddress",X.toString(),C,pe.address.toString().toLowerCase().trim(),he,"false"],Ee=JSON.stringify(ce);await rd(Ee,S),J("success","Address Linked","Successfully linked address to account! Use the refresh button to see updated addresses."),le(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(XN);ee.searchParams.set("limit",String(l));const _=p[h];_&&ee.searchParams.set("after",_);const v=await fetch(ee.toString());if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);const C=await v.json(),D=C.data??[];t(D),C.pagination&&(m(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,_)=>{const v=ee.find(C=>C.account_id===_.account_id);return v?(v.addresses.includes(_.address)||v.addresses.push(_.address),_.primary_address&&(v.hasPrimaryAddress=!0,v.primaryAddress=_.primary_address)):ee.push({account_id:_.account_id,addresses:[_.address],hasPrimaryAddress:!!_.primary_address,primaryAddress:_.primary_address}),ee},[]),O=[...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:Q,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:(S==null?void 0:S.id)===ee.id?"2px solid #19b17b":"1px solid #ddd",borderRadius:"6px",background:(S==null?void 0:S.id)===ee.id?"#f0fdf4":"white"},children:[_e.jsx("input",{type:"radio",name:"selectedWallet",checked:(S==null?void 0:S.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))})]})]})]}),S&&_e.jsxs("div",{style:{marginBottom:"20px",padding:"20px",border:"1px solid #ddd",borderRadius:"8px",background:"#fef7ff"},children:[_e.jsxs("div",{onClick:()=>k(!z),style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",marginBottom:z?0:"20px"},children:[_e.jsx("h3",{style:{margin:0,color:"#333"},children:"Account Commands"}),_e.jsx("span",{style:{fontSize:"18px",color:"#666",transform:z?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease-in-out"},children:"▼"})]}),!z&&_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:()=>H("create"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="create",onChange:()=>H("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:()=>H("link"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="link",onChange:()=>H("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:()=>H("unlink-other"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="unlink-other",onChange:()=>H("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:()=>H("unlink-self"),children:[_e.jsx("input",{type:"radio",name:"action",checked:j==="unlink-self",onChange:()=>H("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=>re(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 --"}),O.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 _=w.find(v=>v.id===ee.target.value);le(_||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!==(S==null?void 0:S.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=>re(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 --"}),O.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:ue,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||!ue.trim(),style:{padding:"10px 20px",background:L||!X||!ue.trim()?"#ccc":"linear-gradient(45deg, #f59e0b, #92400e)",color:"white",border:"none",borderRadius:"6px",cursor:L||!X||!ue.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=>re(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 --"}),O.map(ee=>_e.jsxs("option",{value:ee,children:["Account ",ee]},ee))]})]}),_e.jsx("button",{type:"button",onClick:$,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,_)=>_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-${_}`))})]}),_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 cb({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)},m=()=>{u(!1)},w=()=>{c(!0)},F=()=>{c(!1)},S=()=>{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:S,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(cc,{isOpen:n,onClose:y,title:"Batcher API Documentation",className:"api",url:xI,children:_e.jsx("div",{className:"documentation-content",children:_e.jsx("iframe",{src:xI,className:"documentation-iframe",title:"Batcher API Documentation"})})}),_e.jsx(cc,{isOpen:s,onClose:m,title:"Paima Engine Node API Documentation",className:"api",url:EI,children:_e.jsx("div",{className:"documentation-content",children:_e.jsx("iframe",{src:EI,className:"documentation-iframe",title:"Paima Engine Node API Documentation"})})}),_e.jsx(cc,{className:"docs",isOpen:l,onClose:F,title:"Documentation",url:SI,children:_e.jsx("div",{className:"documentation-content",children:_e.jsx("iframe",{src:SI,className:"documentation-iframe",title:"Documentation"})})}),_e.jsx(cc,{className:"addresses",isOpen:h,onClose:M,title:"Addresses",children:_e.jsx(fH,{})})]})}function hH(e){return e.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function dH({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:hH(e.timestamp)})]}),_e.jsx("div",{className:"block-hash",children:e.hash})]})}function pH({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(dH,{block:l,isNew:s===c},`${c}-${l.number}-${l.hash}`))})]})}function yH(e,t){if(t.blockTime)return`${t.blockTime/1e3}s`}function TC({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(pH,{title:o.name,blockTime:yH(n,o),blocks:u,isMainColumn:n==="paima",newBlockIndex:t[n]},n)})})}function gH(e){return e==null?"N/A":typeof e=="object"?JSON.stringify(e,null,2):String(e)}function mH({isOpen:e,onClose:t,rowData:n,fields:o,title:s="Row Details"}){return!e||!n?null:XF.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:gH(n[u.name])})})]},u.name))})})})]})}),document.body)}function bH(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 AH({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,m=!!n&&n.currentPage>0,w=!n||!m&&!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(F=>_e.jsx("th",{children:F.name.replace(/_/g," ").toUpperCase()},F.name))]})}),_e.jsx("tbody",{children:y.slice().reverse().map((F,S)=>_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(F),className:"details-button",children:"🔍"})}),p.map(M=>{const A=F[M.name],I=bH(A,M.name),R=A?A.toString():"";return _e.jsx("td",{dangerouslySetInnerHTML:{__html:I},title:R.length>30?R:void 0},M.name)})]},S))})]})}):_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:!m,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:m?"white":"#f3f4f6",cursor:m?"pointer":"not-allowed"},children:"First"}),_e.jsx("button",{type:"button",onClick:o,disabled:!m,style:{padding:"6px 10px",borderRadius:6,border:"1px solid #ddd",background:m?"white":"#f3f4f6",cursor:m?"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(mH,{isOpen:!!c,onClose:()=>h(null),rowData:c,fields:p,title:`${e} Row Details`})]})}function fb({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(AH,{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 BC({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=m=>{h(w=>{const F=new Set(w);return F.has(m)?F.delete(m):F.add(m),F})},p=()=>h(new Set(o)),y=()=>h(new Set),g=()=>{u(Array.from(c)),t()};return _e.jsx(cc,{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(m=>_e.jsx("li",{children:_e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8},children:[_e.jsx("input",{type:"checkbox",checked:c.has(m),onChange:()=>f(m)}),m]})},m))}),_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 lc={},RC;function wH(){if(RC)return lc;RC=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.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 lc.default=e,lc}var vH=wH(),da=(e=>(e.PaimaEngine="effectstream-engine",e.Batcher="batcher",e))(da||{}),dd=(e=>(e.Batcher="batcher",e.Node="node",e.App="app",e))(dd||{});function xH(e){switch(e){case"batcher":return"batcher";case"node":return"effectstream-engine";case"app":return"effectstream-engine";default:vH.assertNever(e)}}function mB(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:xH(e),type:je.Object(t.fields.filter(o=>!o.indexed).reduce((o,s)=>(o[s.name]=s.type,o),{}))}}function Sv(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 EH(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:WG}=gB;function MC(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 SH(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 IH(e){return e.filter(t=>typeof t!="string").map(t=>t.name)}var Iv=Object.defineProperty,_H=Object.getOwnPropertyDescriptor,CH=Object.getOwnPropertyNames,FH=Object.prototype.hasOwnProperty,Ln=(e,t)=>()=>(e&&(t=e(e=0)),t),qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ll=(e,t)=>{for(var n in t)Iv(e,n,{get:t[n],enumerable:!0})},OH=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of CH(t))!FH.call(e,s)&&s!==n&&Iv(e,s,{get:()=>t[s],enumerable:!(o=_H(t,s))||o.enumerable});return e},Vt=e=>OH(Iv({},"__esModule",{value:!0}),e),Pe=Ln(()=>{}),Dt={};ll(Dt,{_debugEnd:()=>B1,_debugProcess:()=>T1,_events:()=>G1,_eventsCount:()=>K1,_exiting:()=>g1,_fatalExceptions:()=>C1,_getActiveHandles:()=>SB,_getActiveRequests:()=>EB,_kill:()=>A1,_linkedBinding:()=>vB,_maxListeners:()=>Q1,_preload_modules:()=>q1,_rawDebug:()=>d1,_startProfilerIdleNotifier:()=>R1,_stopProfilerIdleNotifier:()=>M1,_tickCallback:()=>O1,abort:()=>D1,addListener:()=>Y1,allowedNodeEnvironmentFlags:()=>I1,arch:()=>Jb,argv:()=>r1,argv0:()=>$1,assert:()=>IB,binding:()=>a1,browser:()=>h1,chdir:()=>c1,config:()=>m1,cpuUsage:()=>pc,cwd:()=>l1,debugPort:()=>z1,default:()=>Cv,dlopen:()=>xB,domain:()=>y1,emit:()=>J1,emitWarning:()=>s1,env:()=>t1,execArgv:()=>n1,execPath:()=>L1,exit:()=>E1,features:()=>_1,hasUncaughtExceptionCaptureCallback:()=>_B,hrtime:()=>pd,kill:()=>x1,listeners:()=>FB,memoryUsage:()=>v1,moduleLoadList:()=>p1,nextTick:()=>AB,off:()=>W1,on:()=>_o,once:()=>V1,openStdin:()=>S1,pid:()=>P1,platform:()=>e1,ppid:()=>k1,prependListener:()=>eA,prependOnceListener:()=>tA,reallyExit:()=>b1,release:()=>f1,removeAllListeners:()=>Z1,removeListener:()=>X1,resourceUsage:()=>w1,setSourceMapsEnabled:()=>H1,setUncaughtExceptionCaptureCallback:()=>F1,stderr:()=>j1,stdin:()=>N1,stdout:()=>U1,title:()=>Zb,umask:()=>u1,uptime:()=>CB,version:()=>i1,versions:()=>o1});function _v(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function TH(){!ba||!pa||(ba=!1,pa.length?Ki=pa.concat(Ki):Ac=-1,Ki.length&&bB())}function bB(){if(!ba){var e=setTimeout(TH,0);ba=!0;for(var t=Ki.length;t;){for(pa=Ki,Ki=[];++Ac<t;)pa&&pa[Ac].run();Ac=-1,t=Ki.length}pa=null,ba=!1,clearTimeout(e)}}function AB(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 wB(e,t)),Ki.length===1&&!ba&&setTimeout(bB,0)}function wB(e,t){this.fun=e,this.array=t}function cn(){}function vB(e){_v("_linkedBinding")}function xB(e){_v("dlopen")}function EB(){return[]}function SB(){return[]}function IB(e,t){if(!e)throw new Error(t||"assertion error")}function _B(){return!1}function CB(){return Bo.now()/1e3}function pd(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+=yd)),[o,s]}function _o(){return Cv}function FB(e){return[]}var Ki,ba,pa,Ac,Zb,Jb,e1,t1,r1,n1,i1,o1,s1,a1,u1,l1,c1,f1,h1,d1,p1,y1,g1,m1,b1,A1,pc,w1,v1,x1,E1,S1,I1,_1,C1,F1,O1,T1,B1,R1,M1,U1,j1,N1,D1,P1,k1,L1,z1,$1,q1,H1,Bo,hb,yd,Q1,G1,K1,Y1,V1,W1,X1,Z1,J1,eA,tA,Cv,BH=Ln(()=>{Pe(),Le(),ke(),Ki=[],ba=!1,Ac=-1,wB.prototype.run=function(){this.fun.apply(null,this.array)},Zb="browser",Jb="x64",e1="browser",t1={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},r1=["/usr/bin/node"],n1=[],i1="v16.8.0",o1={},s1=function(e,t){console.warn((t?t+": ":"")+e)},a1=function(e){_v("binding")},u1=function(e){return 0},l1=function(){return"/"},c1=function(e){},f1={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},h1=!0,d1=cn,p1=[],y1={},g1=!1,m1={},b1=cn,A1=cn,pc=function(){return{}},w1=pc,v1=pc,x1=cn,E1=cn,S1=cn,I1={},_1={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},C1=cn,F1=cn,O1=cn,T1=cn,B1=cn,R1=cn,M1=cn,U1=void 0,j1=void 0,N1=void 0,D1=cn,P1=2,k1=1,L1="/bin/usr/node",z1=9229,$1="node",q1=[],H1=cn,Bo={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Bo.now===void 0&&(hb=Date.now(),Bo.timing&&Bo.timing.navigationStart&&(hb=Bo.timing.navigationStart),Bo.now=()=>Date.now()-hb),yd=1e9,pd.bigint=function(e){var t=pd(e);return typeof BigInt>"u"?t[0]*yd+t[1]:BigInt(t[0]*yd)+BigInt(t[1])},Q1=10,G1={},K1=0,Y1=_o,V1=_o,W1=_o,X1=_o,Z1=_o,J1=cn,eA=_o,tA=_o,Cv={version:i1,versions:o1,arch:Jb,platform:e1,browser:h1,release:f1,_rawDebug:d1,moduleLoadList:p1,binding:a1,_linkedBinding:vB,_events:G1,_eventsCount:K1,_maxListeners:Q1,on:_o,addListener:Y1,once:V1,off:W1,removeListener:X1,removeAllListeners:Z1,emit:J1,prependListener:eA,prependOnceListener:tA,listeners:FB,domain:y1,_exiting:g1,config:m1,dlopen:xB,uptime:CB,_getActiveRequests:EB,_getActiveHandles:SB,reallyExit:b1,_kill:A1,cpuUsage:pc,resourceUsage:w1,memoryUsage:v1,kill:x1,exit:E1,openStdin:S1,allowedNodeEnvironmentFlags:I1,assert:IB,features:_1,_fatalExceptions:C1,setUncaughtExceptionCaptureCallback:F1,hasUncaughtExceptionCaptureCallback:_B,emitWarning:s1,nextTick:AB,_tickCallback:O1,_debugProcess:T1,_debugEnd:B1,_startProfilerIdleNotifier:R1,_stopProfilerIdleNotifier:M1,stdout:U1,stdin:N1,stderr:j1,abort:D1,umask:u1,chdir:c1,cwd:l1,env:t1,title:Zb,argv:r1,execArgv:n1,pid:P1,ppid:k1,execPath:L1,debugPort:z1,hrtime:pd,argv0:$1,_preload_modules:q1,setSourceMapsEnabled:H1}}),ke=Ln(()=>{BH()});function RH(){if(rA)return xu;rA=!0,xu.byteLength=c,xu.toByteArray=f,xu.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(m){var w=m.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=m.indexOf("=");F===-1&&(F=w);var S=F===w?0:4-F%4;return[F,S]}function c(m){var w=l(m),F=w[0],S=w[1];return(F+S)*3/4-S}function h(m,w,F){return(w+F)*3/4-F}function f(m){var w,F=l(m),S=F[0],M=F[1],A=new n(h(m,S,M)),I=0,R=M>0?S-4:S,T;for(T=0;T<R;T+=4)w=t[m.charCodeAt(T)]<<18|t[m.charCodeAt(T+1)]<<12|t[m.charCodeAt(T+2)]<<6|t[m.charCodeAt(T+3)],A[I++]=w>>16&255,A[I++]=w>>8&255,A[I++]=w&255;return M===2&&(w=t[m.charCodeAt(T)]<<2|t[m.charCodeAt(T+1)]>>4,A[I++]=w&255),M===1&&(w=t[m.charCodeAt(T)]<<10|t[m.charCodeAt(T+1)]<<4|t[m.charCodeAt(T+2)]>>2,A[I++]=w>>8&255,A[I++]=w&255),A}function p(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function y(m,w,F){for(var S,M=[],A=w;A<F;A+=3)S=(m[A]<<16&16711680)+(m[A+1]<<8&65280)+(m[A+2]&255),M.push(p(S));return M.join("")}function g(m){for(var w,F=m.length,S=F%3,M=[],A=16383,I=0,R=F-S;I<R;I+=A)M.push(y(m,I,I+A>R?R:I+A));return S===1?(w=m[F-1],M.push(e[w>>2]+e[w<<4&63]+"==")):S===2&&(w=(m[F-2]<<8)+m[F-1],M.push(e[w>>10]+e[w>>4&63]+e[w<<2&63]+"=")),M.join("")}return xu}function MH(){return nA?yc:(nA=!0,yc.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,m=e[t+y];for(y+=g,u=m&(1<<-p)-1,m>>=-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:(m?-1:1)*(1/0);l=l+Math.pow(2,o),u=u-f}return(m?-1:1)*l*Math.pow(2,u-o)},yc.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,m=o?0:u-1,w=o?1:-1,F=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+m]=c&255,m+=w,c/=256,s-=8);for(l=l<<s|c,f+=s;f>0;e[n+m]=l&255,m+=w,l/=256,f-=8);e[n+m-w]|=F*128},yc)}function UH(){if(iA)return Es;iA=!0;let e=RH(),t=MH(),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),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(x,B),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 B=new Uint8Array(x);return Object.setPrototypeOf(B,l.prototype),B}function l(x,B,N){if(typeof x=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(x)}return c(x,B,N)}l.poolSize=8192;function c(x,B,N){if(typeof x=="string")return y(x,B);if(ArrayBuffer.isView(x))return m(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,B,N);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,B,N);let me=F(x);if(me)return me;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return l.from(x[Symbol.toPrimitive]("string"),B,N);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,B,N){return c(x,B,N)},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,B,N){return h(x),x<=0?u(x):B!==void 0?typeof N=="string"?u(x).fill(B,N):u(x).fill(B):u(x)}l.alloc=function(x,B,N){return f(x,B,N)};function p(x){return h(x),u(x<0?0:S(x)|0)}l.allocUnsafe=function(x){return p(x)},l.allocUnsafeSlow=function(x){return p(x)};function y(x,B){if((typeof B!="string"||B==="")&&(B="utf8"),!l.isEncoding(B))throw new TypeError("Unknown encoding: "+B);let N=A(x,B)|0,ie=u(N),me=ie.write(x,B);return me!==N&&(ie=ie.slice(0,me)),ie}function g(x){let B=x.length<0?0:S(x.length)|0,N=u(B);for(let ie=0;ie<B;ie+=1)N[ie]=x[ie]&255;return N}function m(x){if(ce(x,Uint8Array)){let B=new Uint8Array(x);return w(B.buffer,B.byteOffset,B.byteLength)}return g(x)}function w(x,B,N){if(B<0||x.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(x.byteLength<B+(N||0))throw new RangeError('"length" is outside of buffer bounds');let ie;return B===void 0&&N===void 0?ie=new Uint8Array(x):N===void 0?ie=new Uint8Array(x,B):ie=new Uint8Array(x,B,N),Object.setPrototypeOf(ie,l.prototype),ie}function F(x){if(l.isBuffer(x)){let B=S(x.length)|0,N=u(B);return N.length===0||x.copy(N,0,0,B),N}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 S(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,B){if(ce(x,Uint8Array)&&(x=l.from(x,x.offset,x.byteLength)),ce(B,Uint8Array)&&(B=l.from(B,B.offset,B.byteLength)),!l.isBuffer(x)||!l.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===B)return 0;let N=x.length,ie=B.length;for(let me=0,xe=Math.min(N,ie);me<xe;++me)if(x[me]!==B[me]){N=x[me],ie=B[me];break}return N<ie?-1:ie<N?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,B){if(!Array.isArray(x))throw new TypeError('"list" argument must be an Array of Buffers');if(x.length===0)return l.alloc(0);let N;if(B===void 0)for(B=0,N=0;N<x.length;++N)B+=x[N].length;let ie=l.allocUnsafe(B),me=0;for(N=0;N<x.length;++N){let xe=x[N];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,B){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 N=x.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&N===0)return 0;let me=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":return _(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N*2;case"hex":return N>>>1;case"base64":return D(x).length;default:if(me)return ie?-1:_(x).length;B=(""+B).toLowerCase(),me=!0}}l.byteLength=A;function I(x,B,N){let ie=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((N===void 0||N>this.length)&&(N=this.length),N<=0)||(N>>>=0,B>>>=0,N<=B))return"";for(x||(x="utf8");;)switch(x){case"hex":return pe(this,B,N);case"utf8":case"utf-8":return te(this,B,N);case"ascii":return X(this,B,N);case"latin1":case"binary":return re(this,B,N);case"base64":return P(this,B,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,B,N);default:if(ie)throw new TypeError("Unknown encoding: "+x);x=(x+"").toLowerCase(),ie=!0}}l.prototype._isBuffer=!0;function R(x,B,N){let ie=x[B];x[B]=x[N],x[N]=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 B=0;B<x;B+=2)R(this,B,B+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 B=0;B<x;B+=4)R(this,B,B+3),R(this,B+1,B+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 B=0;B<x;B+=8)R(this,B,B+7),R(this,B+1,B+6),R(this,B+2,B+5),R(this,B+3,B+4);return this},l.prototype.toString=function(){let x=this.length;return x===0?"":arguments.length===0?te(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="",B=Es.INSPECT_MAX_BYTES;return x=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(x+=" ... "),"<Buffer "+x+">"},n&&(l.prototype[n]=l.prototype.inspect),l.prototype.compare=function(x,B,N,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(B===void 0&&(B=0),N===void 0&&(N=x?x.length:0),ie===void 0&&(ie=0),me===void 0&&(me=this.length),B<0||N>x.length||ie<0||me>this.length)throw new RangeError("out of range index");if(ie>=me&&B>=N)return 0;if(ie>=me)return-1;if(B>=N)return 1;if(B>>>=0,N>>>=0,ie>>>=0,me>>>=0,this===x)return 0;let xe=me-ie,Ce=N-B,we=Math.min(xe,Ce),Se=this.slice(ie,me),He=x.slice(B,N);for(let Ke=0;Ke<we;++Ke)if(Se[Ke]!==He[Ke]){xe=Se[Ke],Ce=He[Ke];break}return xe<Ce?-1:Ce<xe?1:0};function T(x,B,N,ie,me){if(x.length===0)return-1;if(typeof N=="string"?(ie=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,Ee(N)&&(N=me?0:x.length-1),N<0&&(N=x.length+N),N>=x.length){if(me)return-1;N=x.length-1}else if(N<0)if(me)N=0;else return-1;if(typeof B=="string"&&(B=l.from(B,ie)),l.isBuffer(B))return B.length===0?-1:z(x,B,N,ie,me);if(typeof B=="number")return B=B&255,typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(x,B,N):Uint8Array.prototype.lastIndexOf.call(x,B,N):z(x,[B],N,ie,me);throw new TypeError("val must be string, number or Buffer")}function z(x,B,N,ie,me){let xe=1,Ce=x.length,we=B.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(x.length<2||B.length<2)return-1;xe=2,Ce/=2,we/=2,N/=2}function Se(Ke,Ve){return xe===1?Ke[Ve]:Ke.readUInt16BE(Ve*xe)}let He;if(me){let Ke=-1;for(He=N;He<Ce;He++)if(Se(x,He)===Se(B,Ke===-1?0:He-Ke)){if(Ke===-1&&(Ke=He),He-Ke+1===we)return Ke*xe}else Ke!==-1&&(He-=He-Ke),Ke=-1}else for(N+we>Ce&&(N=Ce-we),He=N;He>=0;He--){let Ke=!0;for(let Ve=0;Ve<we;Ve++)if(Se(x,He+Ve)!==Se(B,Ve)){Ke=!1;break}if(Ke)return He}return-1}l.prototype.includes=function(x,B,N){return this.indexOf(x,B,N)!==-1},l.prototype.indexOf=function(x,B,N){return T(this,x,B,N,!0)},l.prototype.lastIndexOf=function(x,B,N){return T(this,x,B,N,!1)};function k(x,B,N,ie){N=Number(N)||0;let me=x.length-N;ie?(ie=Number(ie),ie>me&&(ie=me)):ie=me;let xe=B.length;ie>xe/2&&(ie=xe/2);let Ce;for(Ce=0;Ce<ie;++Ce){let we=parseInt(B.substr(Ce*2,2),16);if(Ee(we))return Ce;x[N+Ce]=we}return Ce}function L(x,B,N,ie){return he(_(B,x.length-N),x,N,ie)}function U(x,B,N,ie){return he(v(B),x,N,ie)}function j(x,B,N,ie){return he(D(B),x,N,ie)}function H(x,B,N,ie){return he(C(B,x.length-N),x,N,ie)}l.prototype.write=function(x,B,N,ie){if(B===void 0)ie="utf8",N=this.length,B=0;else if(N===void 0&&typeof B=="string")ie=B,N=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(N)?(N=N>>>0,ie===void 0&&(ie="utf8")):(ie=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let me=this.length-B;if((N===void 0||N>me)&&(N=me),x.length>0&&(N<0||B<0)||B>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,B,N);case"utf8":case"utf-8":return L(this,x,B,N);case"ascii":case"latin1":case"binary":return U(this,x,B,N);case"base64":return j(this,x,B,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,x,B,N);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,B,N){return B===0&&N===x.length?e.fromByteArray(x):e.fromByteArray(x.slice(B,N))}function te(x,B,N){N=Math.min(x.length,N);let ie=[],me=B;for(;me<N;){let xe=x[me],Ce=null,we=xe>239?4:xe>223?3:xe>191?2:1;if(me+we<=N){let Se,He,Ke,Ve;switch(we){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,we=1):Ce>65535&&(Ce-=65536,ie.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),ie.push(Ce),me+=we}return oe(ie)}let ue=4096;function oe(x){let B=x.length;if(B<=ue)return String.fromCharCode.apply(String,x);let N="",ie=0;for(;ie<B;)N+=String.fromCharCode.apply(String,x.slice(ie,ie+=ue));return N}function X(x,B,N){let ie="";N=Math.min(x.length,N);for(let me=B;me<N;++me)ie+=String.fromCharCode(x[me]&127);return ie}function re(x,B,N){let ie="";N=Math.min(x.length,N);for(let me=B;me<N;++me)ie+=String.fromCharCode(x[me]);return ie}function pe(x,B,N){let ie=x.length;(!B||B<0)&&(B=0),(!N||N<0||N>ie)&&(N=ie);let me="";for(let xe=B;xe<N;++xe)me+=Be[x[xe]];return me}function le(x,B,N){let ie=x.slice(B,N),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,B){let N=this.length;x=~~x,B=B===void 0?N:~~B,x<0?(x+=N,x<0&&(x=0)):x>N&&(x=N),B<0?(B+=N,B<0&&(B=0)):B>N&&(B=N),B<x&&(B=x);let ie=this.subarray(x,B);return Object.setPrototypeOf(ie,l.prototype),ie};function J(x,B,N){if(x%1!==0||x<0)throw new RangeError("offset is not uint");if(x+B>N)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(x,B,N){x=x>>>0,B=B>>>0,N||J(x,B,this.length);let ie=this[x],me=1,xe=0;for(;++xe<B&&(me*=256);)ie+=this[x+xe]*me;return ie},l.prototype.readUintBE=l.prototype.readUIntBE=function(x,B,N){x=x>>>0,B=B>>>0,N||J(x,B,this.length);let ie=this[x+--B],me=1;for(;B>0&&(me*=256);)ie+=this[x+--B]*me;return ie},l.prototype.readUint8=l.prototype.readUInt8=function(x,B){return x=x>>>0,B||J(x,1,this.length),this[x]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(x,B){return x=x>>>0,B||J(x,2,this.length),this[x]|this[x+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(x,B){return x=x>>>0,B||J(x,2,this.length),this[x]<<8|this[x+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(x,B){return x=x>>>0,B||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,B){return x=x>>>0,B||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 B=this[x],N=this[x+7];(B===void 0||N===void 0)&&se(x,this.length-8);let ie=B+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,me=this[++x]+this[++x]*2**8+this[++x]*2**16+N*2**24;return BigInt(ie)+(BigInt(me)<<BigInt(32))}),l.prototype.readBigUInt64BE=de(function(x){x=x>>>0,Y(x,"offset");let B=this[x],N=this[x+7];(B===void 0||N===void 0)&&se(x,this.length-8);let ie=B*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+N;return(BigInt(ie)<<BigInt(32))+BigInt(me)}),l.prototype.readIntLE=function(x,B,N){x=x>>>0,B=B>>>0,N||J(x,B,this.length);let ie=this[x],me=1,xe=0;for(;++xe<B&&(me*=256);)ie+=this[x+xe]*me;return me*=128,ie>=me&&(ie-=Math.pow(2,8*B)),ie},l.prototype.readIntBE=function(x,B,N){x=x>>>0,B=B>>>0,N||J(x,B,this.length);let ie=B,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*B)),xe},l.prototype.readInt8=function(x,B){return x=x>>>0,B||J(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]},l.prototype.readInt16LE=function(x,B){x=x>>>0,B||J(x,2,this.length);let N=this[x]|this[x+1]<<8;return N&32768?N|4294901760:N},l.prototype.readInt16BE=function(x,B){x=x>>>0,B||J(x,2,this.length);let N=this[x+1]|this[x]<<8;return N&32768?N|4294901760:N},l.prototype.readInt32LE=function(x,B){return x=x>>>0,B||J(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},l.prototype.readInt32BE=function(x,B){return x=x>>>0,B||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 B=this[x],N=this[x+7];(B===void 0||N===void 0)&&se(x,this.length-8);let ie=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(N<<24);return(BigInt(ie)<<BigInt(32))+BigInt(B+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 B=this[x],N=this[x+7];(B===void 0||N===void 0)&&se(x,this.length-8);let ie=(B<<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+N)}),l.prototype.readFloatLE=function(x,B){return x=x>>>0,B||J(x,4,this.length),t.read(this,x,!0,23,4)},l.prototype.readFloatBE=function(x,B){return x=x>>>0,B||J(x,4,this.length),t.read(this,x,!1,23,4)},l.prototype.readDoubleLE=function(x,B){return x=x>>>0,B||J(x,8,this.length),t.read(this,x,!0,52,8)},l.prototype.readDoubleBE=function(x,B){return x=x>>>0,B||J(x,8,this.length),t.read(this,x,!1,52,8)};function G(x,B,N,ie,me,xe){if(!l.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>me||B<xe)throw new RangeError('"value" argument is out of bounds');if(N+ie>x.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(x,B,N,ie){if(x=+x,B=B>>>0,N=N>>>0,!ie){let Ce=Math.pow(2,8*N)-1;G(this,x,B,N,Ce,0)}let me=1,xe=0;for(this[B]=x&255;++xe<N&&(me*=256);)this[B+xe]=x/me&255;return B+N},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(x,B,N,ie){if(x=+x,B=B>>>0,N=N>>>0,!ie){let Ce=Math.pow(2,8*N)-1;G(this,x,B,N,Ce,0)}let me=N-1,xe=1;for(this[B+me]=x&255;--me>=0&&(xe*=256);)this[B+me]=x/xe&255;return B+N},l.prototype.writeUint8=l.prototype.writeUInt8=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,1,255,0),this[B]=x&255,B+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,2,65535,0),this[B]=x&255,this[B+1]=x>>>8,B+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,2,65535,0),this[B]=x>>>8,this[B+1]=x&255,B+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,4,4294967295,0),this[B+3]=x>>>24,this[B+2]=x>>>16,this[B+1]=x>>>8,this[B]=x&255,B+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,4,4294967295,0),this[B]=x>>>24,this[B+1]=x>>>16,this[B+2]=x>>>8,this[B+3]=x&255,B+4};function Q(x,B,N,ie,me){q(B,ie,me,x,N,7);let xe=Number(B&BigInt(4294967295));x[N++]=xe,xe=xe>>8,x[N++]=xe,xe=xe>>8,x[N++]=xe,xe=xe>>8,x[N++]=xe;let Ce=Number(B>>BigInt(32)&BigInt(4294967295));return x[N++]=Ce,Ce=Ce>>8,x[N++]=Ce,Ce=Ce>>8,x[N++]=Ce,Ce=Ce>>8,x[N++]=Ce,N}function K(x,B,N,ie,me){q(B,ie,me,x,N,7);let xe=Number(B&BigInt(4294967295));x[N+7]=xe,xe=xe>>8,x[N+6]=xe,xe=xe>>8,x[N+5]=xe,xe=xe>>8,x[N+4]=xe;let Ce=Number(B>>BigInt(32)&BigInt(4294967295));return x[N+3]=Ce,Ce=Ce>>8,x[N+2]=Ce,Ce=Ce>>8,x[N+1]=Ce,Ce=Ce>>8,x[N]=Ce,N+8}l.prototype.writeBigUInt64LE=de(function(x,B=0){return Q(this,x,B,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=de(function(x,B=0){return K(this,x,B,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(x,B,N,ie){if(x=+x,B=B>>>0,!ie){let we=Math.pow(2,8*N-1);G(this,x,B,N,we-1,-we)}let me=0,xe=1,Ce=0;for(this[B]=x&255;++me<N&&(xe*=256);)x<0&&Ce===0&&this[B+me-1]!==0&&(Ce=1),this[B+me]=(x/xe>>0)-Ce&255;return B+N},l.prototype.writeIntBE=function(x,B,N,ie){if(x=+x,B=B>>>0,!ie){let we=Math.pow(2,8*N-1);G(this,x,B,N,we-1,-we)}let me=N-1,xe=1,Ce=0;for(this[B+me]=x&255;--me>=0&&(xe*=256);)x<0&&Ce===0&&this[B+me+1]!==0&&(Ce=1),this[B+me]=(x/xe>>0)-Ce&255;return B+N},l.prototype.writeInt8=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,1,127,-128),x<0&&(x=255+x+1),this[B]=x&255,B+1},l.prototype.writeInt16LE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,2,32767,-32768),this[B]=x&255,this[B+1]=x>>>8,B+2},l.prototype.writeInt16BE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,2,32767,-32768),this[B]=x>>>8,this[B+1]=x&255,B+2},l.prototype.writeInt32LE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,4,2147483647,-2147483648),this[B]=x&255,this[B+1]=x>>>8,this[B+2]=x>>>16,this[B+3]=x>>>24,B+4},l.prototype.writeInt32BE=function(x,B,N){return x=+x,B=B>>>0,N||G(this,x,B,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[B]=x>>>24,this[B+1]=x>>>16,this[B+2]=x>>>8,this[B+3]=x&255,B+4},l.prototype.writeBigInt64LE=de(function(x,B=0){return Q(this,x,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=de(function(x,B=0){return K(this,x,B,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function W(x,B,N,ie,me,xe){if(N+ie>x.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function $(x,B,N,ie,me){return B=+B,N=N>>>0,me||W(x,B,N,4),t.write(x,B,N,ie,23,4),N+4}l.prototype.writeFloatLE=function(x,B,N){return $(this,x,B,!0,N)},l.prototype.writeFloatBE=function(x,B,N){return $(this,x,B,!1,N)};function fe(x,B,N,ie,me){return B=+B,N=N>>>0,me||W(x,B,N,8),t.write(x,B,N,ie,52,8),N+8}l.prototype.writeDoubleLE=function(x,B,N){return fe(this,x,B,!0,N)},l.prototype.writeDoubleBE=function(x,B,N){return fe(this,x,B,!1,N)},l.prototype.copy=function(x,B,N,ie){if(!l.isBuffer(x))throw new TypeError("argument should be a Buffer");if(N||(N=0),!ie&&ie!==0&&(ie=this.length),B>=x.length&&(B=x.length),B||(B=0),ie>0&&ie<N&&(ie=N),ie===N||x.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=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-B<ie-N&&(ie=x.length-B+N);let me=ie-N;return this===x&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,N,ie):Uint8Array.prototype.set.call(x,this.subarray(N,ie),B),me},l.prototype.fill=function(x,B,N,ie){if(typeof x=="string"){if(typeof B=="string"?(ie=B,B=0,N=this.length):typeof N=="string"&&(ie=N,N=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(B<0||this.length<B||this.length<N)throw new RangeError("Out of range index");if(N<=B)return this;B=B>>>0,N=N===void 0?this.length:N>>>0,x||(x=0);let me;if(typeof x=="number")for(me=B;me<N;++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<N-B;++me)this[me+B]=xe[me%Ce]}return this};let ae={};function ne(x,B,N){ae[x]=class extends N{constructor(){super(),Object.defineProperty(this,"message",{value:B.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,B){return`The "${x}" argument must be of type number. Received type ${typeof B}`},TypeError),ne("ERR_OUT_OF_RANGE",function(x,B,N){let ie=`The value of "${x}" is out of range.`,me=N;return Number.isInteger(N)&&Math.abs(N)>2**32?me=Z(String(N)):typeof N=="bigint"&&(me=String(N),(N>BigInt(2)**BigInt(32)||N<-(BigInt(2)**BigInt(32)))&&(me=Z(me)),me+="n"),ie+=` It must be ${B}. Received ${me}`,ie},RangeError);function Z(x){let B="",N=x.length,ie=x[0]==="-"?1:0;for(;N>=ie+4;N-=3)B=`_${x.slice(N-3,N)}${B}`;return`${x.slice(0,N)}${B}`}function O(x,B,N){Y(B,"offset"),(x[B]===void 0||x[B+N]===void 0)&&se(B,x.length-(N+1))}function q(x,B,N,ie,me,xe){if(x>N||x<B){let Ce=typeof B=="bigint"?"n":"",we;throw B===0||B===BigInt(0)?we=`>= 0${Ce} and < 2${Ce} ** ${(xe+1)*8}${Ce}`:we=`>= -(2${Ce} ** ${(xe+1)*8-1}${Ce}) and < 2 ** ${(xe+1)*8-1}${Ce}`,new ae.ERR_OUT_OF_RANGE("value",we,x)}O(ie,me,xe)}function Y(x,B){if(typeof x!="number")throw new ae.ERR_INVALID_ARG_TYPE(B,"number",x)}function se(x,B,N){throw Math.floor(x)!==x?(Y(x,N),new ae.ERR_OUT_OF_RANGE("offset","an integer",x)):B<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${B}`,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 _(x,B){B=B||1/0;let N,ie=x.length,me=null,xe=[];for(let Ce=0;Ce<ie;++Ce){if(N=x.charCodeAt(Ce),N>55295&&N<57344){if(!me){if(N>56319){(B-=3)>-1&&xe.push(239,191,189);continue}else if(Ce+1===ie){(B-=3)>-1&&xe.push(239,191,189);continue}me=N;continue}if(N<56320){(B-=3)>-1&&xe.push(239,191,189),me=N;continue}N=(me-55296<<10|N-56320)+65536}else me&&(B-=3)>-1&&xe.push(239,191,189);if(me=null,N<128){if((B-=1)<0)break;xe.push(N)}else if(N<2048){if((B-=2)<0)break;xe.push(N>>6|192,N&63|128)}else if(N<65536){if((B-=3)<0)break;xe.push(N>>12|224,N>>6&63|128,N&63|128)}else if(N<1114112){if((B-=4)<0)break;xe.push(N>>18|240,N>>12&63|128,N>>6&63|128,N&63|128)}else throw new Error("Invalid code point")}return xe}function v(x){let B=[];for(let N=0;N<x.length;++N)B.push(x.charCodeAt(N)&255);return B}function C(x,B){let N,ie,me,xe=[];for(let Ce=0;Ce<x.length&&!((B-=2)<0);++Ce)N=x.charCodeAt(Ce),ie=N>>8,me=N%256,xe.push(me),xe.push(ie);return xe}function D(x){return e.toByteArray(ee(x))}function he(x,B,N,ie){let me;for(me=0;me<ie&&!(me+N>=B.length||me>=x.length);++me)B[me+N]=x[me];return me}function ce(x,B){return x instanceof B||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===B.name}function Ee(x){return x!==x}let Be=(function(){let x="0123456789abcdef",B=new Array(256);for(let N=0;N<16;++N){let ie=N*16;for(let me=0;me<16;++me)B[ie+me]=x[N]+x[me]}return B})();function de(x){return typeof BigInt>"u"?ve:x}function ve(){throw new Error("BigInt not supported")}return Es}var xu,rA,yc,nA,Es,iA,jH=Ln(()=>{Pe(),Le(),ke(),xu={},rA=!1,yc={},nA=!1,Es={},iA=!1}),Kr={};ll(Kr,{Buffer:()=>Wd,INSPECT_MAX_BYTES:()=>OB,default:()=>Co,kMaxLength:()=>TB});var Co,Wd,OB,TB,Yr=Ln(()=>{Pe(),Le(),ke(),jH(),Co=UH(),Co.Buffer,Co.SlowBuffer,Co.INSPECT_MAX_BYTES,Co.kMaxLength,Wd=Co.Buffer,OB=Co.INSPECT_MAX_BYTES,TB=Co.kMaxLength}),Le=Ln(()=>{Yr()}),lr=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}}),BB=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}=BB(),{AggregateError:s}=lr(),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 m(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(m(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 F(A){let I=f+A.name;return Object.defineProperty(A,"name",{value:I}),A}function S(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 z=[],k=[],L=[];for(let j of I)y(typeof j=="string","All expected entries have to be of type string"),c.includes(j)?z.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=z.indexOf("object");j!==-1&&(z.splice(z,j,1),k.push("Object"))}if(z.length>0){switch(z.length){case 1:T+=`of type ${z[0]}`;break;case 2:T+=`one of type ${z[0]} or ${z[1]}`;break;default:{let j=z.pop();T+=`one of type ${z.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 z=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 ${z}.`},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 z=BigInt(2)**BigInt(32);(R>z||R<-z)&&(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:F(S),hideStackFrames:F,codes:p}}),rf=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}),zs={};ll(zs,{EventEmitter:()=>RB,default:()=>Eu,defaultMaxListeners:()=>MB,init:()=>UB,listenerCount:()=>jB,on:()=>NB,once:()=>DB});function NH(){if(oA)return gc;oA=!0;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(R,T,z){return Function.prototype.apply.call(R,T,z)},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)}gc=u,gc.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=[],z=1;z<arguments.length;z++)T.push(arguments[z]);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 H=L[R];if(H===void 0)return!1;if(typeof H=="function")t(H,this,T);else for(var P=H.length,te=w(H,P),z=0;z<P;++z)t(te[z],this,T);return!0};function f(R,T,z,k){var L,U,j;if(c(z),U=R._events,U===void 0?(U=R._events=Object.create(null),R._eventsCount=0):(U.newListener!==void 0&&(R.emit("newListener",T,z.listener?z.listener:z),U=R._events),j=U[T]),j===void 0)j=U[T]=z,++R._eventsCount;else if(typeof j=="function"?j=U[T]=k?[z,j]:[j,z]:k?j.unshift(z):j.push(z),L=h(R),L>0&&j.length>L&&!j.warned){j.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");H.name="MaxListenersExceededWarning",H.emitter=R,H.type=T,H.count=j.length,o(H)}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,z){var k={fired:!1,wrapFn:void 0,target:R,type:T,listener:z},L=p.bind(k);return L.listener=z,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 z,k,L,U,j;if(c(T),k=this._events,k===void 0)return this;if(z=k[R],z===void 0)return this;if(z===T||z.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete k[R],k.removeListener&&this.emit("removeListener",R,z.listener||T));else if(typeof z!="function"){for(L=-1,U=z.length-1;U>=0;U--)if(z[U]===T||z[U].listener===T){j=z[U].listener,L=U;break}if(L<0)return this;L===0?z.shift():F(z,L),z.length===1&&(k[R]=z[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,z,k;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[R]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[R]),this;if(arguments.length===0){var L=Object.keys(z),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=z[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,z){var k=R._events;if(k===void 0)return[];var L=k[T];return L===void 0?[]:typeof L=="function"?z?[L.listener||L]:[L]:z?S(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):m.call(R,T)},u.prototype.listenerCount=m;function m(R){var T=this._events;if(T!==void 0){var z=T[R];if(typeof z=="function")return 1;if(z!==void 0)return z.length}return 0}u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function w(R,T){for(var z=new Array(T),k=0;k<T;++k)z[k]=R[k];return z}function F(R,T){for(;T+1<R.length;T++)R[T]=R[T+1];R.pop()}function S(R){for(var T=new Array(R.length),z=0;z<T.length;++z)T[z]=R[z].listener||R[z];return T}function M(R,T){return new Promise(function(z,k){function L(j){R.removeListener(T,U),k(j)}function U(){typeof R.removeListener=="function"&&R.removeListener("error",L),z([].slice.call(arguments))}I(R,T,U,{once:!0}),T!=="error"&&A(R,L,{once:!0})})}function A(R,T,z){typeof R.on=="function"&&I(R,"error",T,z)}function I(R,T,z,k){if(typeof R.on=="function")k.once?R.once(T,z):R.on(T,z);else if(typeof R.addEventListener=="function")R.addEventListener(T,function L(U){k.once&&R.removeEventListener(T,L),z(U)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof R)}return gc}var gc,oA,Eu,RB,MB,UB,jB,NB,DB,Pa=Ln(()=>{Pe(),Le(),ke(),gc={},oA=!1,Eu=NH(),Eu.once,Eu.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)})},Eu.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:RB,defaultMaxListeners:MB,init:UB,listenerCount:jB,on:NB,once:DB}=Eu}),Un=qe((e,t)=>{Pe(),Le(),ke();var n=(Yr(),Vt(Kr)),{format:o,inspect:s}=BB(),{codes:{ERR_INVALID_ARG_TYPE:u}}=vn(),{kResistStopPropagation:l,AggregateError:c,SymbolDispose:h}=lr(),f=globalThis.AbortSignal||rf().AbortSignal,p=globalThis.AbortController||rf().AbortController,y=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||n.Blob,m=typeof g<"u"?function(S){return S instanceof g}:function(S){return!1},w=(S,M)=>{if(S!==void 0&&(S===null||typeof S!="object"||!("aborted"in S)))throw new u(M,"AbortSignal",S)},F=(S,M)=>{if(typeof S!="function")throw new u(M,"Function",S)};t.exports={AggregateError:c,kEmptyObject:Object.freeze({}),once(S){let M=!1;return function(...A){M||(M=!0,S.apply(this,A))}},createDeferredPromise:function(){let S,M;return{promise:new Promise((A,I)=>{S=A,M=I}),resolve:S,reject:M}},promisify(S){return new Promise((M,A)=>{S((I,...R)=>I?A(I):M(...R))})},debuglog(){return function(){}},format:o,inspect:s,types:{isAsyncFunction(S){return S instanceof y},isArrayBufferView(S){return ArrayBuffer.isView(S)}},isBlob:m,deprecate(S,M){return S},addAbortListener:(Pa(),Vt(zs)).addAbortListener||function(S,M){if(S===void 0)throw new u("signal","AbortSignal",S);w(S,"signal"),F(M,"listener");let A;return S.aborted?queueMicrotask(()=>M()):(S.addEventListener("abort",M,{__proto__:null,once:!0,[l]:!0}),A=()=>{S.removeEventListener("abort",M)}),{__proto__:null,[h](){var I;(I=A)===null||I===void 0||I()}}},AbortSignalAny:f.any||function(S){if(S.length===1)return S[0];let M=new p,A=()=>M.abort();return S.forEach(I=>{w(I,"signals"),I.addEventListener("abort",A,{once:!0})}),M.signal.addEventListener("abort",()=>{S.forEach(I=>I.removeEventListener("abort",A))},{once:!0}),M.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Ff=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:m,StringPrototypeToUpperCase:w,StringPrototypeTrim:F}=lr(),{hideStackFrames:S,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:z}=Un(),{isAsyncFunction:k,isArrayBufferView:L}=Un().types,U={};function j(ce){return ce===(ce|0)}function H(ce){return ce===ce>>>0}var P=/^[0-7]+$/,te="must be a 32-bit unsigned integer or an octal string";function ue(ce,Ee,Be){if(typeof ce>"u"&&(ce=Be),typeof ce=="string"){if(g(P,ce)===null)throw new I(Ee,ce,te);ce=p(ce,8)}return re(ce,Ee),ce}var oe=S((ce,Ee,Be=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<Be||ce>de)throw new R(Ee,`>= ${Be} && <= ${de}`,ce)}),X=S((ce,Ee,Be=-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<Be||ce>de)throw new R(Ee,`>= ${Be} && <= ${de}`,ce)}),re=S((ce,Ee,Be=!1)=>{if(typeof ce!="number")throw new A(Ee,"number",ce);if(!l(ce))throw new R(Ee,"an integer",ce);let de=Be?1:0,ve=4294967295;if(ce<de||ce>ve)throw new R(Ee,`>= ${de} && <= ${ve}`,ce)});function pe(ce,Ee){if(typeof ce!="string")throw new A(Ee,"string",ce)}function le(ce,Ee,Be=void 0,de){if(typeof ce!="number")throw new A(Ee,"number",ce);if(Be!=null&&ce<Be||de!=null&&ce>de||(Be!=null||de!=null)&&c(ce))throw new R(Ee,`${Be!=null?`>= ${Be}`:""}${Be!=null&&de!=null?" && ":""}${de!=null?`<= ${de}`:""}`,ce)}var J=S((ce,Ee,Be)=>{if(!o(Be,ce)){let de="must be one of: "+s(u(Be,ve=>typeof ve=="string"?`'${ve}'`:m(ve)),", ");throw new I(Ee,ce,de)}});function G(ce,Ee){if(typeof ce!="boolean")throw new A(Ee,"boolean",ce)}function Q(ce,Ee,Be){return ce==null||!y(ce,Ee)?Be:ce[Ee]}var K=S((ce,Ee,Be=null)=>{let de=Q(Be,"allowArray",!1),ve=Q(Be,"allowFunction",!1);if(!Q(Be,"nullable",!1)&&ce===null||!de&&n(ce)||typeof ce!="object"&&(!ve||typeof ce!="function"))throw new A(Ee,"Object",ce)}),W=S((ce,Ee)=>{if(ce!=null&&typeof ce!="object"&&typeof ce!="function")throw new A(Ee,"a dictionary",ce)}),$=S((ce,Ee,Be=0)=>{if(!n(ce))throw new A(Ee,"Array",ce);if(ce.length<Be){let de=`must be longer than ${Be}`;throw new I(Ee,ce,de)}});function fe(ce,Ee){$(ce,Ee);for(let Be=0;Be<ce.length;Be++)pe(ce[Be],`${Ee}[${Be}]`)}function ae(ce,Ee){$(ce,Ee);for(let Be=0;Be<ce.length;Be++)G(ce[Be],`${Ee}[${Be}]`)}function ne(ce,Ee){$(ce,Ee);for(let Be=0;Be<ce.length;Be++){let de=ce[Be],ve=`${Ee}[${Be}]`;if(de==null)throw new A(ve,"AbortSignal",de);se(de,ve)}}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 O=S((ce,Ee="buffer")=>{if(!L(ce))throw new A(Ee,["Buffer","TypedArray","DataView"],ce)});function q(ce,Ee){let Be=z(Ee),de=ce.length;if(Be==="hex"&&de%2!==0)throw new I("encoding",Ee,`is invalid for data of length ${de}`)}function Y(ce,Ee="Port",Be=!0){if(typeof ce!="number"&&typeof ce!="string"||typeof ce=="string"&&F(ce).length===0||+ce!==+ce>>>0||ce>65535||ce===0&&!Be)throw new M(Ee,ce,Be);return ce|0}var se=S((ce,Ee)=>{if(ce!==void 0&&(ce===null||typeof ce!="object"||!("aborted"in ce)))throw new A(Ee,"AbortSignal",ce)}),ye=S((ce,Ee)=>{if(typeof ce!="function")throw new A(Ee,"Function",ce)}),ee=S((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,Be){if(!o(Be,ce))throw new A(Ee,`('${s(Be,"|")}')`,ce)}var C=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function D(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 D(ce,"hints"),ce;if(n(ce)){let Ee=ce.length,Be="";if(Ee===0)return Be;for(let de=0;de<Ee;de++){let ve=ce[de];D(ve,"hints"),Be+=ve,de!==Ee-1&&(Be+=", ")}return Be}throw new I("hints",ce,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:j,isUint32:H,parseFileMode:ue,validateArray:$,validateStringArray:fe,validateBooleanArray:ae,validateAbortSignalArray:ne,validateBoolean:G,validateBuffer:O,validateDictionary:W,validateEncoding:q,validateFunction:ye,validateInt32:X,validateInteger:oe,validateNumber:le,validateObject:K,validateOneOf:J,validatePlainFunction:ee,validatePort:Y,validateSignalName:Z,validateString:pe,validateUint32:re,validateUndefined:_,validateUnion:v,validateAbortSignal:se,validateLinkHeaderValue:he}}),ka=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 m(){!p||!y||(p=!1,y.length?f=y.concat(f):g=-1,f.length&&w())}function w(){if(!p){var M=c(m);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 F(M,A)),f.length===1&&!p&&c(w)};function F(M,A){this.fun=M,this.array=A}F.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={};function S(){}n.on=S,n.addListener=S,n.once=S,n.off=S,n.removeListener=S,n.removeAllListeners=S,n.emit=S,n.prependListener=S,n.prependOnceListener=S,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}=lr(),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(Q,K=!1){var W;return!!(Q&&typeof Q.pipe=="function"&&typeof Q.on=="function"&&(!K||typeof Q.pause=="function"&&typeof Q.resume=="function")&&(!Q._writableState||((W=Q._readableState)===null||W===void 0?void 0:W.readable)!==!1)&&(!Q._writableState||Q._readableState))}function m(Q){var K;return!!(Q&&typeof Q.write=="function"&&typeof Q.on=="function"&&(!Q._readableState||((K=Q._writableState)===null||K===void 0?void 0:K.writable)!==!1))}function w(Q){return!!(Q&&typeof Q.pipe=="function"&&Q._readableState&&typeof Q.on=="function"&&typeof Q.write=="function")}function F(Q){return Q&&(Q._readableState||Q._writableState||typeof Q.write=="function"&&typeof Q.on=="function"||typeof Q.pipe=="function"&&typeof Q.on=="function")}function S(Q){return!!(Q&&!F(Q)&&typeof Q.pipeThrough=="function"&&typeof Q.getReader=="function"&&typeof Q.cancel=="function")}function M(Q){return!!(Q&&!F(Q)&&typeof Q.getWriter=="function"&&typeof Q.abort=="function")}function A(Q){return!!(Q&&!F(Q)&&typeof Q.readable=="object"&&typeof Q.writable=="object")}function I(Q){return S(Q)||M(Q)||A(Q)}function R(Q,K){return Q==null?!1:K===!0?typeof Q[n]=="function":K===!1?typeof Q[o]=="function":typeof Q[n]=="function"||typeof Q[o]=="function"}function T(Q){if(!F(Q))return null;let K=Q._writableState,W=Q._readableState,$=K||W;return!!(Q.destroyed||Q[u]||$!=null&&$.destroyed)}function z(Q){if(!m(Q))return null;if(Q.writableEnded===!0)return!0;let K=Q._writableState;return K!=null&&K.errored?!1:typeof(K==null?void 0:K.ended)!="boolean"?null:K.ended}function k(Q,K){if(!m(Q))return null;if(Q.writableFinished===!0)return!0;let W=Q._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(Q){if(!g(Q))return null;if(Q.readableEnded===!0)return!0;let K=Q._readableState;return!K||K.errored?!1:typeof(K==null?void 0:K.ended)!="boolean"?null:K.ended}function U(Q,K){if(!g(Q))return null;let W=Q._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(Q){return Q&&Q[c]!=null?Q[c]:typeof(Q==null?void 0:Q.readable)!="boolean"?null:T(Q)?!1:g(Q)&&Q.readable&&!U(Q)}function H(Q){return Q&&Q[h]!=null?Q[h]:typeof(Q==null?void 0:Q.writable)!="boolean"?null:T(Q)?!1:m(Q)&&Q.writable&&!z(Q)}function P(Q,K){return F(Q)?T(Q)?!0:!((K==null?void 0:K.readable)!==!1&&j(Q)||(K==null?void 0:K.writable)!==!1&&H(Q)):null}function te(Q){var K,W;return F(Q)?Q.writableErrored?Q.writableErrored:(K=(W=Q._writableState)===null||W===void 0?void 0:W.errored)!==null&&K!==void 0?K:null:null}function ue(Q){var K,W;return F(Q)?Q.readableErrored?Q.readableErrored:(K=(W=Q._readableState)===null||W===void 0?void 0:W.errored)!==null&&K!==void 0?K:null:null}function oe(Q){if(!F(Q))return null;if(typeof Q.closed=="boolean")return Q.closed;let K=Q._writableState,W=Q._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 Q._closed=="boolean"&&X(Q)?Q._closed:null}function X(Q){return typeof Q._closed=="boolean"&&typeof Q._defaultKeepAlive=="boolean"&&typeof Q._removedConnection=="boolean"&&typeof Q._removedContLen=="boolean"}function re(Q){return typeof Q._sent100=="boolean"&&X(Q)}function pe(Q){var K;return typeof Q._consuming=="boolean"&&typeof Q._dumped=="boolean"&&((K=Q.req)===null||K===void 0?void 0:K.upgradeOrConnect)===void 0}function le(Q){if(!F(Q))return null;let K=Q._writableState,W=Q._readableState,$=K||W;return!$&&re(Q)||!!($&&$.autoDestroy&&$.emitClose&&$.closed===!1)}function J(Q){var K;return!!(Q&&((K=Q[f])!==null&&K!==void 0?K:Q.readableDidRead||Q.readableAborted))}function G(Q){var K,W,$,fe,ae,ne,Z,O,q,Y;return!!(Q&&((K=(W=($=(fe=(ae=(ne=Q[l])!==null&&ne!==void 0?ne:Q.readableErrored)!==null&&ae!==void 0?ae:Q.writableErrored)!==null&&fe!==void 0?fe:(Z=Q._readableState)===null||Z===void 0?void 0:Z.errorEmitted)!==null&&$!==void 0?$:(O=Q._writableState)===null||O===void 0?void 0:O.errorEmitted)!==null&&W!==void 0?W:(q=Q._readableState)===null||q===void 0?void 0:q.errored)!==null&&K!==void 0?K:!((Y=Q._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:S,isReadableEnded:L,isReadableFinished:U,isReadableErrored:ue,isNodeStream:F,isWebStream:I,isWritable:H,isWritableNodeStream:m,isWritableStream:M,isWritableEnded:z,isWritableFinished:k,isWritableErrored:te,isServerRequest:pe,isServerResponse:re,willEmitClose:le,isTransformStream:A}}),$s=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{AbortError:o,codes:s}=vn(),{ERR_INVALID_ARG_TYPE:u,ERR_STREAM_PREMATURE_CLOSE:l}=s,{kEmptyObject:c,once:h}=Un(),{validateAbortSignal:f,validateFunction:p,validateObject:y,validateBoolean:g}=Ff(),{Promise:m,PromisePrototypeThen:w,SymbolDispose:F}=lr(),{isClosed:S,isReadable:M,isReadableNodeStream:A,isReadableStream:I,isReadableFinished:R,isReadableErrored:T,isWritable:z,isWritableNodeStream:k,isWritableStream:L,isWritableFinished:U,isWritableErrored:j,isNodeStream:H,willEmitClose:P,kIsClosedPromise:te}=Go(),ue;function oe(J){return J.setHeader&&typeof J.abort=="function"}var X=()=>{};function re(J,G,Q){var K,W;if(arguments.length===2?(Q=G,G=c):G==null?G=c:y(G,"options"),p(Q,"callback"),f(G.signal,"options.signal"),Q=h(Q),I(J)||L(J))return pe(J,G,Q);if(!H(J))throw new u("stream",["ReadableStream","WritableStream","Stream"],J);let $=(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()},O=P(J)&&A(J)===$&&k(J)===fe,q=U(J,!1),Y=()=>{q=!0,J.destroyed&&(O=!1),!(O&&(!J.readable||$))&&(!$||se)&&Q.call(J)},se=R(J,!1),ye=()=>{se=!0,J.destroyed&&(O=!1),!(O&&(!J.writable||fe))&&(!fe||q)&&Q.call(J)},ee=ce=>{Q.call(J,ce)},_=S(J),v=()=>{_=!0;let ce=j(J)||T(J);if(ce&&typeof ce!="boolean")return Q.call(J,ce);if($&&!se&&A(J,!0)&&!R(J,!1))return Q.call(J,new l);if(fe&&!q&&!U(J,!1))return Q.call(J,new l);Q.call(J)},C=()=>{_=!0;let ce=j(J)||T(J);if(ce&&typeof ce!="boolean")return Q.call(J,ce);Q.call(J)},D=()=>{J.req.on("finish",Y)};oe(J)?(J.on("complete",Y),O||J.on("abort",v),J.req?D():J.on("request",D)):fe&&!ae&&(J.on("end",Z),J.on("close",Z)),!O&&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),_?n.nextTick(v):ae!=null&&ae.errorEmitted||ne!=null&&ne.errorEmitted?O||n.nextTick(C):(!$&&(!O||M(J))&&(q||z(J)===!1)||!fe&&(!O||z(J))&&(se||M(J)===!1)||ne&&J.req&&J.aborted)&&n.nextTick(C);let he=()=>{Q=X,J.removeListener("aborted",v),J.removeListener("complete",Y),J.removeListener("abort",v),J.removeListener("request",D),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&&!_){let ce=()=>{let Ee=Q;he(),Ee.call(J,new o(void 0,{cause:G.signal.reason}))};if(G.signal.aborted)n.nextTick(ce);else{ue=ue||Un().addAbortListener;let Ee=ue(G.signal,ce),Be=Q;Q=h((...de)=>{Ee[F](),Be.apply(J,de)})}}return he}function pe(J,G,Q){let K=!1,W=X;if(G.signal)if(W=()=>{K=!0,Q.call(J,new o(void 0,{cause:G.signal.reason}))},G.signal.aborted)n.nextTick(W);else{ue=ue||Un().addAbortListener;let fe=ue(G.signal,W),ae=Q;Q=h((...ne)=>{fe[F](),ae.apply(J,ne)})}let $=(...fe)=>{K||n.nextTick(()=>Q.apply(J,fe))};return w(J[te].promise,$,$),X}function le(J,G){var Q;let K=!1;return G===null&&(G=c),(Q=G)!==null&&Q!==void 0&&Q.cleanup&&(g(G.cleanup,"cleanup"),K=G.cleanup),new m((W,$)=>{let fe=re(J,G,ae=>{K&&fe(),ae?$(ae):W()})})}t.exports=re,t.exports.finished=le}),cl=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:s},AbortError:u}=vn(),{Symbol:l}=lr(),{kIsDestroyed:c,isDestroyed:h,isFinished:f,isServerRequest:p}=Go(),y=l("kDestroy"),g=l("kConstruct");function m(P,te,ue){P&&(P.stack,te&&!te.errored&&(te.errored=P),ue&&!ue.errored&&(ue.errored=P))}function w(P,te){let ue=this._readableState,oe=this._writableState,X=oe||ue;return oe!=null&&oe.destroyed||ue!=null&&ue.destroyed?(typeof te=="function"&&te(),this):(m(P,oe,ue),oe&&(oe.destroyed=!0),ue&&(ue.destroyed=!0),X.constructed?F(this,P,te):this.once(y,function(re){F(this,o(re,P),te)}),this)}function F(P,te,ue){let oe=!1;function X(re){if(oe)return;oe=!0;let pe=P._readableState,le=P._writableState;m(re,le,pe),le&&(le.closed=!0),pe&&(pe.closed=!0),typeof ue=="function"&&ue(re),re?n.nextTick(S,P,re):n.nextTick(M,P)}try{P._destroy(te||null,X)}catch(re){X(re)}}function S(P,te){A(P,te),M(P)}function M(P){let te=P._readableState,ue=P._writableState;ue&&(ue.closeEmitted=!0),te&&(te.closeEmitted=!0),(ue!=null&&ue.emitClose||te!=null&&te.emitClose)&&P.emit("close")}function A(P,te){let ue=P._readableState,oe=P._writableState;oe!=null&&oe.errorEmitted||ue!=null&&ue.errorEmitted||(oe&&(oe.errorEmitted=!0),ue&&(ue.errorEmitted=!0),P.emit("error",te))}function I(){let P=this._readableState,te=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),te&&(te.constructed=!0,te.destroyed=!1,te.closed=!1,te.closeEmitted=!1,te.errored=null,te.errorEmitted=!1,te.finalCalled=!1,te.prefinished=!1,te.ended=te.writable===!1,te.ending=te.writable===!1,te.finished=te.writable===!1)}function R(P,te,ue){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(te):te&&(te.stack,X&&!X.errored&&(X.errored=te),oe&&!oe.errored&&(oe.errored=te),ue?n.nextTick(A,P,te):A(P,te))}function T(P,te){if(typeof P._construct!="function")return;let ue=P._readableState,oe=P._writableState;ue&&(ue.constructed=!1),oe&&(oe.constructed=!1),P.once(g,te),!(P.listenerCount(g)>1)&&n.nextTick(z,P)}function z(P){let te=!1;function ue(oe){if(te){R(P,oe??new s);return}te=!0;let X=P._readableState,re=P._writableState,pe=re||X;X&&(X.constructed=!0),re&&(re.constructed=!0),pe.destroyed?P.emit(y,oe):oe?R(P,oe,!0):n.nextTick(k,P)}try{P._construct(oe=>{n.nextTick(ue,oe)})}catch(oe){n.nextTick(ue,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,te){P.emit("error",te),n.nextTick(U,P)}function H(P,te){!P||h(P)||(!te&&!f(P)&&(te=new u),p(P)?(P.socket=null,P.destroy(te)):L(P)?P.abort():L(P.req)?P.req.abort():typeof P.destroy=="function"?P.destroy(te):typeof P.close=="function"?P.close():te?n.nextTick(j,P,te):n.nextTick(U,P),P.destroyed||(P[c]=!0))}t.exports={construct:T,destroyer:H,destroy:w,undestroy:I,errorOrDestroy:R}}),Fv=qe((e,t)=>{Pe(),Le(),ke();var{ArrayIsArray:n,ObjectSetPrototypeOf:o}=lr(),{EventEmitter:s}=(Pa(),Vt(zs));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",m),f.on("close",w));let g=!1;function m(){g||(g=!0,c.end())}function w(){g||(g=!0,typeof c.destroy=="function"&&c.destroy())}function F(M){S(),s.listenerCount(this,"error")===0&&this.emit("error",M)}l(f,"error",F),l(c,"error",F);function S(){f.removeListener("data",p),c.removeListener("drain",y),f.removeListener("end",m),f.removeListener("close",w),f.removeListener("error",F),c.removeListener("error",F),f.removeListener("end",S),f.removeListener("close",S),c.removeListener("close",S)}return f.on("end",S),f.on("close",S),c.on("close",S),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}}),qp=qe((e,t)=>{Pe(),Le(),ke();var{SymbolDispose:n}=lr(),{AbortError:o,codes:s}=vn(),{isNodeStream:u,isWebStream:l,kControllerErrorFunction:c}=Go(),h=$s(),{ERR_INVALID_ARG_TYPE:f}=s,p,y=(g,m)=>{if(typeof g!="object"||!("aborted"in g))throw new f(m,"AbortSignal",g)};t.exports.addAbortSignal=function(g,m){if(y(g,"signal"),!u(m)&&!l(m))throw new f("stream",["ReadableStream","WritableStream","Stream"],m);return t.exports.addAbortSignalNoValidate(g,m)},t.exports.addAbortSignalNoValidate=function(g,m){if(typeof g!="object"||!("aborted"in g))return m;let w=u(m)?()=>{m.destroy(new o(void 0,{cause:g.reason}))}:()=>{m[c](new o(void 0,{cause:g.reason}))};if(g.aborted)w();else{p=p||Un().addAbortListener;let F=p(g,w);h(m,F[n])}return m}}),DH=qe((e,t)=>{Pe(),Le(),ke();var{StringPrototypeSlice:n,SymbolIterator:o,TypedArrayPrototypeSet:s,Uint8Array:u}=lr(),{Buffer:l}=(Yr(),Vt(Kr)),{inspect:c}=Un();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 m=y.data;if(h>m.length)s(f,m,p-h),h-=m.length;else{h===m.length?(s(f,m,p-h),++g,y.next?this.head=y.next:this.head=this.tail=null):(s(f,new u(m.buffer,m.byteOffset,h),p-h),this.head=y,y.data=m.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})}}}),Hp=qe((e,t)=>{Pe(),Le(),ke();var{MathFloor:n,NumberIsInteger:o}=lr(),{validateInteger:s}=Ff(),{ERR_INVALID_ARG_VALUE:u}=vn().codes,l=16*1024,c=16;function h(g,m,w){return g.highWaterMark!=null?g.highWaterMark:m?g[w]:null}function f(g){return g?c:l}function p(g,m){s(m,"value",0),g?c=m:l=m}function y(g,m,w,F){let S=h(m,F,w);if(S!=null){if(!o(S)||S<0){let M=F?`options.${w}`:"options.highWaterMark";throw new u(M,S)}return n(S)}return f(g.objectMode)}t.exports={getHighWaterMark:y,getDefaultHighWaterMark:f,setDefaultHighWaterMark:p}}),PH=qe((e,t)=>{Pe(),Le(),ke();var n=(Yr(),Vt(Kr)),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)}}),kH=qe(e=>{Pe(),Le(),ke();var t=PH().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=m,I=4;break;case"utf8":this.fillLast=f,I=4;break;case"base64":this.text=w,this.end=F,I=3;break;default:this.write=S,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 z=l(I[T]);return z>=0?(z>0&&(A.lastNeed=z-1),z):--T<R||z===-2?0:(z=l(I[T]),z>=0?(z>0&&(A.lastNeed=z-2),z):--T<R||z===-2?0:(z=l(I[T]),z>=0?(z>0&&(z===2?z=0:A.lastNeed=z-3),z):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 m(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 F(A){var I=A&&A.length?this.write(A):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function S(A){return A.toString(this.encoding)}function M(A){return A&&A.length?this.write(A):""}}),PB=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{PromisePrototypeThen:o,SymbolAsyncIterator:s,SymbolIterator:u}=lr(),{Buffer:l}=(Yr(),Vt(Kr)),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:h}=vn().codes;function f(p,y,g){let m;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,m=y[s]();else if(y&&y[u])w=!1,m=y[u]();else throw new c("iterable",["Iterable"],y);let F=new p({objectMode:!0,highWaterMark:1,...g}),S=!1;F._read=function(){S||(S=!0,A())},F._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 m.throw=="function";if(R&&T){let{value:z,done:k}=await m.throw(I);if(await z,k)return}if(typeof m.return=="function"){let{value:z}=await m.return();await z}}async function A(){for(;;){try{let{value:I,done:R}=w?await m.next():m.next();if(R)F.push(null);else{let T=I&&typeof I.then=="function"?await I:I;if(T===null)throw S=!1,new h;if(F.push(T))continue;S=!1}}catch(I){F.destroy(I)}break}}return F}t.exports=f}),Qp=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayPrototypeIndexOf:o,NumberIsInteger:s,NumberIsNaN:u,NumberParseInt:l,ObjectDefineProperties:c,ObjectKeys:h,ObjectSetPrototypeOf:f,Promise:p,SafeSet:y,SymbolAsyncDispose:g,SymbolAsyncIterator:m,Symbol:w}=lr();t.exports=de,de.ReadableState=Be;var{EventEmitter:F}=(Pa(),Vt(zs)),{Stream:S,prependListener:M}=Fv(),{Buffer:A}=(Yr(),Vt(Kr)),{addAbortSignal:I}=qp(),R=$s(),T=Un().debuglog("stream",be=>{T=be}),z=DH(),k=cl(),{getHighWaterMark:L,getDefaultHighWaterMark:U}=Hp(),{aggregateTwoErrors:j,codes:{ERR_INVALID_ARG_TYPE:H,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_OUT_OF_RANGE:te,ERR_STREAM_PUSH_AFTER_EOF:ue,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:oe},AbortError:X}=vn(),{validateObject:re}=Ff(),pe=w("kPaused"),{StringDecoder:le}=kH(),J=PB();f(de.prototype,S.prototype),f(de,S);var G=()=>{},{errorOrDestroy:Q}=k,K=1,W=2,$=4,fe=8,ae=16,ne=32,Z=64,O=128,q=256,Y=512,se=1024,ye=2048,ee=4096,_=8192,v=16384,C=32768,D=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(Be.prototype,{objectMode:Ee(K),ended:Ee(W),endEmitted:Ee($),reading:Ee(fe),constructed:Ee(ae),sync:Ee(ne),needReadable:Ee(Z),emittedReadable:Ee(O),readableListening:Ee(q),resumeScheduled:Ee(Y),errorEmitted:Ee(se),emitClose:Ee(ye),autoDestroy:Ee(ee),destroyed:Ee(_),closed:Ee(v),closeEmitted:Ee(C),multiAwaitDrain:Ee(D),readingMore:Ee(he),dataEmitted:Ee(ce)});function Be(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 z,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 le(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 Be(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)),S.call(this,be),k.construct(this,()=>{this._readableState.needReadable&&we(this,this._readableState)})}de.prototype.destroy=k.destroy,de.prototype._undestroy=k.undestroy,de.prototype._destroy=function(be,Ie){Ie(be)},de.prototype[F.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 ve(this,be,Ie,!1)},de.prototype.unshift=function(be,Ie){return ve(this,be,Ie,!0)};function ve(be,Ie,Ye,Je){T("readableAddChunk",Ie);let st=be._readableState,qt;if((st.state&K)===0&&(typeof Ie=="string"?(Ye=Ye||st.defaultEncoding,st.encoding!==Ye&&(Je&&st.encoding?Ie=A.from(Ie,Ye).toString(st.encoding):(Ie=A.from(Ie,Ye),Ye=""))):Ie instanceof A?Ye="":S._isUint8Array(Ie)?(Ie=S._uint8ArrayToBuffer(Ie),Ye=""):Ie!=null&&(qt=new H("chunk",["string","Buffer","Uint8Array"],Ie))),qt)Q(be,qt);else if(Ie===null)st.state&=~fe,me(be,st);else if((st.state&K)!==0||Ie&&Ie.length>0)if(Je)if((st.state&$)!==0)Q(be,new oe);else{if(st.destroyed||st.errored)return!1;x(be,st,Ie,!0)}else if(st.ended)Q(be,new ue);else{if(st.destroyed||st.errored)return!1;st.state&=~fe,st.decoder&&!Ye?(Ie=st.decoder.write(Ie),st.objectMode||Ie.length!==0?x(be,st,Ie,!1):we(be,st)):x(be,st,Ie,!1)}else Je||(st.state&=~fe,we(be,st));return!st.ended&&(st.length<st.highWaterMark||st.length===0)}function x(be,Ie,Ye,Je){Ie.flowing&&Ie.length===0&&!Ie.sync&&be.listenerCount("data")>0?((Ie.state&D)!==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)),we(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 le(be);this._readableState.decoder=Ie,this._readableState.encoding=this._readableState.decoder.encoding;let Ye=this._readableState.buffer,Je="";for(let st of Ye)Je+=Ie.write(st);return Ye.clear(),Je!==""&&Ye.push(Je),this._readableState.length=Je.length,this};var B=1073741824;function N(be){if(be>B)throw new te("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=N(be)),be!==0&&(Ie.state&=~O),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){Q(this,qt)}Ie.state&=~ne,Ie.reading||(be=ie(Ye,Ie))}let st;return be>0?st=tt(be,Ie):st=null,st===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)),st!==null&&!Ie.errorEmitted&&!Ie.closeEmitted&&(Ie.dataEmitted=!0,this.emit("data",st)),st};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 we(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 st=(!Ie||Ie.end!==!1)&&be!==n.stdout&&be!==n.stderr?rr:xn;Je.endEmitted?n.nextTick(st):Ye.once("end",st),be.on("unpipe",qt);function qt(kr,wr){T("onunpipe"),kr===Ye&&wr&&wr.hasUnpiped===!1&&(wr.hasUnpiped=!0,Rr())}function rr(){T("onend"),be.end()}let Br,zn=!1;function Rr(){T("cleanup"),be.removeListener("close",Ur),be.removeListener("finish",gn),Br&&be.removeListener("drain",Br),be.removeListener("error",Mr),be.removeListener("unpipe",qt),Ye.removeListener("end",rr),Ye.removeListener("end",xn),Ye.removeListener("data",nr),zn=!0,Br&&Je.awaitDrainWriters&&(!be._writableState||be._writableState.needDrain)&&Br()}function Ht(){zn||(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",nr);function nr(kr){T("ondata");let wr=be.write(kr);T("dest.write",wr),wr===!1&&Ht()}function Mr(kr){if(T("onerror",kr),xn(),be.removeListener("error",Mr),be.listenerCount("error")===0){let wr=be._writableState||be._readableState;wr&&!wr.errorEmitted?Q(be,kr):be.emit("error",kr)}}M(be,"error",Mr);function Ur(){be.removeListener("finish",gn),xn()}be.once("close",Ur);function gn(){T("onfinish"),be.removeListener("close",Ur),xn()}be.once("finish",gn);function xn(){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 st=Ie.pipes;Ie.pipes=[],this.pause();for(let qt=0;qt<st.length;qt++)st[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=S.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=S.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=S.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=>{Q(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 st=Ye[Je];this[st]===void 0&&typeof be[st]=="function"&&(this[st]=be[st].bind(be))}return this},de.prototype[m]=function(){return lt(this)},de.prototype.iterator=function(be){return be!==void 0&&re(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(rr){this===be?(Ye(),Ye=G):Ye=rr}be.on("readable",Je);let st,qt=R(be,{writable:!1},rr=>{st=rr?j(st,rr):null,Ye(),Ye=G});try{for(;;){let rr=be.destroyed?null:be.read();if(rr!==null)yield rr;else{if(st)throw st;if(st===null)return;await new p(Je)}}}catch(rr){throw st=j(st,rr),st}finally{(st||(Ie==null?void 0:Ie.destroyOnReturn)!==!1)&&(st===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(Be.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 Zt;function Ar(){return Zt===void 0&&(Zt={}),Zt}de.fromWeb=function(be,Ie){return Ar().newStreamReadableFromReadableStream(be,Ie)},de.toWeb=function(be,Ie){return Ar().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(st,qt){k.destroyer(be,st),qt(st)}}).wrap(be)}}),Ov=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayPrototypeSlice:o,Error:s,FunctionPrototypeSymbolHasInstance:u,ObjectDefineProperty:l,ObjectDefineProperties:c,ObjectSetPrototypeOf:h,StringPrototypeToLowerCase:f,Symbol:p,SymbolHasInstance:y}=lr();t.exports=re,re.WritableState=oe;var{EventEmitter:g}=(Pa(),Vt(zs)),m=Fv().Stream,{Buffer:w}=(Yr(),Vt(Kr)),F=cl(),{addAbortSignal:S}=qp(),{getHighWaterMark:M,getDefaultHighWaterMark:A}=Hp(),{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:R,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:z,ERR_STREAM_DESTROYED:k,ERR_STREAM_ALREADY_FINISHED:L,ERR_STREAM_NULL_VALUES:U,ERR_STREAM_WRITE_AFTER_END:j,ERR_UNKNOWN_ENCODING:H}=vn().codes,{errorOrDestroy:P}=F;h(re.prototype,m.prototype),h(re,m);function te(){}var ue=p("kOnFinished");function oe(ee,_,v){typeof v!="boolean"&&(v=_ 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=Q.bind(void 0,_),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[ue]=[]}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 re(ee){let _=this instanceof zo();if(!_&&!u(re,this))return new re(ee);this._writableState=new oe(ee,this,_),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&&S(ee.signal,this)),m.call(this,ee),F.construct(this,()=>{let v=this._writableState;v.writing||fe(this,v),O(this,v)})}l(re,y,{__proto__:null,value:function(ee){return u(this,ee)?!0:this!==re?!1:ee&&ee._writableState instanceof oe}}),re.prototype.pipe=function(){P(this,new z)};function pe(ee,_,v,C){let D=ee._writableState;if(typeof v=="function")C=v,v=D.defaultEncoding;else{if(!v)v=D.defaultEncoding;else if(v!=="buffer"&&!w.isEncoding(v))throw new H(v);typeof C!="function"&&(C=te)}if(_===null)throw new U;if(!D.objectMode)if(typeof _=="string")D.decodeStrings!==!1&&(_=w.from(_,v),v="buffer");else if(_ instanceof w)v="buffer";else if(m._isUint8Array(_))_=m._uint8ArrayToBuffer(_),v="buffer";else throw new I("chunk",["string","Buffer","Uint8Array"],_);let he;return D.ending?he=new j:D.destroyed&&(he=new k("write")),he?(n.nextTick(C,he),P(ee,he,!0),he):(D.pendingcb++,le(ee,D,_,v,C))}re.prototype.write=function(ee,_,v){return pe(this,ee,_,v)===!0},re.prototype.cork=function(){this._writableState.corked++},re.prototype.uncork=function(){let ee=this._writableState;ee.corked&&(ee.corked--,ee.writing||fe(this,ee))},re.prototype.setDefaultEncoding=function(ee){if(typeof ee=="string"&&(ee=f(ee)),!w.isEncoding(ee))throw new H(ee);return this._writableState.defaultEncoding=ee,this};function le(ee,_,v,C,D){let he=_.objectMode?1:v.length;_.length+=he;let ce=_.length<_.highWaterMark;return ce||(_.needDrain=!0),_.writing||_.corked||_.errored||!_.constructed?(_.buffered.push({chunk:v,encoding:C,callback:D}),_.allBuffers&&C!=="buffer"&&(_.allBuffers=!1),_.allNoop&&D!==te&&(_.allNoop=!1)):(_.writelen=he,_.writecb=D,_.writing=!0,_.sync=!0,ee._write(v,C,_.onwrite),_.sync=!1),ce&&!_.errored&&!_.destroyed}function J(ee,_,v,C,D,he,ce){_.writelen=C,_.writecb=ce,_.writing=!0,_.sync=!0,_.destroyed?_.onwrite(new k("write")):v?ee._writev(D,_.onwrite):ee._write(D,he,_.onwrite),_.sync=!1}function G(ee,_,v,C){--_.pendingcb,C(v),$(_),P(ee,v)}function Q(ee,_){let v=ee._writableState,C=v.sync,D=v.writecb;if(typeof D!="function"){P(ee,new T);return}v.writing=!1,v.writecb=null,v.length-=v.writelen,v.writelen=0,_?(_.stack,v.errored||(v.errored=_),ee._readableState&&!ee._readableState.errored&&(ee._readableState.errored=_),C?n.nextTick(G,ee,v,_,D):G(ee,v,_,D)):(v.buffered.length>v.bufferedIndex&&fe(ee,v),C?v.afterWriteTickInfo!==null&&v.afterWriteTickInfo.cb===D?v.afterWriteTickInfo.count++:(v.afterWriteTickInfo={count:1,cb:D,stream:ee,state:v},n.nextTick(K,v.afterWriteTickInfo)):W(ee,v,1,D))}function K({stream:ee,state:_,count:v,cb:C}){return _.afterWriteTickInfo=null,W(ee,_,v,C)}function W(ee,_,v,C){for(!_.ending&&!ee.destroyed&&_.length===0&&_.needDrain&&(_.needDrain=!1,ee.emit("drain"));v-- >0;)_.pendingcb--,C();_.destroyed&&$(_),O(ee,_)}function $(ee){if(ee.writing)return;for(let D=ee.bufferedIndex;D<ee.buffered.length;++D){var _;let{chunk:he,callback:ce}=ee.buffered[D],Ee=ee.objectMode?1:he.length;ee.length-=Ee,ce((_=ee.errored)!==null&&_!==void 0?_:new k("write"))}let v=ee[ue].splice(0);for(let D=0;D<v.length;D++){var C;v[D]((C=ee.errored)!==null&&C!==void 0?C:new k("end"))}X(ee)}function fe(ee,_){if(_.corked||_.bufferProcessing||_.destroyed||!_.constructed)return;let{buffered:v,bufferedIndex:C,objectMode:D}=_,he=v.length-C;if(!he)return;let ce=C;if(_.bufferProcessing=!0,he>1&&ee._writev){_.pendingcb-=he-1;let Ee=_.allNoop?te:de=>{for(let ve=ce;ve<v.length;++ve)v[ve].callback(de)},Be=_.allNoop&&ce===0?v:o(v,ce);Be.allBuffers=_.allBuffers,J(ee,_,!0,_.length,Be,"",Ee),X(_)}else{do{let{chunk:Ee,encoding:Be,callback:de}=v[ce];v[ce++]=null;let ve=D?1:Ee.length;J(ee,_,!1,ve,Ee,Be,de)}while(ce<v.length&&!_.writing);ce===v.length?X(_):ce>256?(v.splice(0,ce),_.bufferedIndex=0):_.bufferedIndex=ce}_.bufferProcessing=!1}re.prototype._write=function(ee,_,v){if(this._writev)this._writev([{chunk:ee,encoding:_}],v);else throw new R("_write()")},re.prototype._writev=null,re.prototype.end=function(ee,_,v){let C=this._writableState;typeof ee=="function"?(v=ee,ee=null,_=null):typeof _=="function"&&(v=_,_=null);let D;if(ee!=null){let he=pe(this,ee,_);he instanceof s&&(D=he)}return C.corked&&(C.corked=1,this.uncork()),D||(!C.errored&&!C.ending?(C.ending=!0,O(this,C,!0),C.ended=!0):C.finished?D=new L("end"):C.destroyed&&(D=new k("end"))),typeof v=="function"&&(D||C.finished?n.nextTick(v,D):C[ue].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,_){let v=!1;function C(D){if(v){P(ee,D??T());return}if(v=!0,_.pendingcb--,D){let he=_[ue].splice(0);for(let ce=0;ce<he.length;ce++)he[ce](D);P(ee,D,_.sync)}else ae(_)&&(_.prefinished=!0,ee.emit("prefinish"),_.pendingcb++,n.nextTick(q,ee,_))}_.sync=!0,_.pendingcb++;try{ee._final(C)}catch(D){C(D)}_.sync=!1}function Z(ee,_){!_.prefinished&&!_.finalCalled&&(typeof ee._final=="function"&&!_.destroyed?(_.finalCalled=!0,ne(ee,_)):(_.prefinished=!0,ee.emit("prefinish")))}function O(ee,_,v){ae(_)&&(Z(ee,_),_.pendingcb===0&&(v?(_.pendingcb++,n.nextTick((C,D)=>{ae(D)?q(C,D):D.pendingcb--},ee,_)):ae(_)&&(_.pendingcb++,q(ee,_))))}function q(ee,_){_.pendingcb--,_.finished=!0;let v=_[ue].splice(0);for(let C=0;C<v.length;C++)v[C]();if(ee.emit("finish"),_.autoDestroy){let C=ee._readableState;(!C||C.autoDestroy&&(C.endEmitted||C.readable===!1))&&ee.destroy()}}c(re.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=F.destroy;re.prototype.destroy=function(ee,_){let v=this._writableState;return!v.destroyed&&(v.bufferedIndex<v.buffered.length||v[ue].length)&&n.nextTick($,v),Y.call(this,ee,_),this},re.prototype._undestroy=F.undestroy,re.prototype._destroy=function(ee,_){_(ee)},re.prototype[g.captureRejectionSymbol]=function(ee){this.destroy(ee)};var se;function ye(){return se===void 0&&(se={}),se}re.fromWeb=function(ee,_){return ye().newStreamWritableFromWritableStream(ee,_)},re.toWeb=function(ee){return ye().newWritableStreamFromStreamWritable(ee)}}),LH=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),o=(Yr(),Vt(Kr)),{isReadable:s,isWritable:u,isIterable:l,isNodeStream:c,isReadableNodeStream:h,isWritableNodeStream:f,isDuplexNodeStream:p,isReadableStream:y,isWritableStream:g}=Go(),m=$s(),{AbortError:w,codes:{ERR_INVALID_ARG_TYPE:F,ERR_INVALID_RETURN_VALUE:S}}=vn(),{destroyer:M}=cl(),A=zo(),I=Qp(),R=Ov(),{createDeferredPromise:T}=Un(),z=PB(),k=globalThis.Blob||o.Blob,L=typeof k<"u"?function(ue){return ue instanceof k}:function(ue){return!1},U=globalThis.AbortController||rf().AbortController,{FunctionPrototypeCall:j}=lr(),H=class extends A{constructor(ue){super(ue),(ue==null?void 0:ue.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(ue==null?void 0:ue.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function ue(oe,X){if(p(oe))return oe;if(h(oe))return te({readable:oe});if(f(oe))return te({writable:oe});if(c(oe))return te({writable:!1,readable:!1});if(y(oe))return te({readable:I.fromWeb(oe)});if(g(oe))return te({writable:R.fromWeb(oe)});if(typeof oe=="function"){let{value:pe,write:le,final:J,destroy:G}=P(oe);if(l(pe))return z(H,pe,{objectMode:!0,write:le,final:J,destroy:G});let Q=pe==null?void 0:pe.then;if(typeof Q=="function"){let K,W=j(Q,pe,$=>{if($!=null)throw new S("nully","body",$)},$=>{M(K,$)});return K=new H({objectMode:!0,readable:!1,write:le,final($){J(async()=>{try{await W,n.nextTick($,null)}catch(fe){n.nextTick($,fe)}})},destroy:G})}throw new S("Iterable, AsyncIterable or AsyncFunction",X,pe)}if(L(oe))return ue(oe.arrayBuffer());if(l(oe))return z(H,oe,{objectMode:!0,writable:!1});if(y(oe==null?void 0:oe.readable)&&g(oe==null?void 0:oe.writable))return H.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:ue(oe.readable):void 0,le=oe!=null&&oe.writable?f(oe==null?void 0:oe.writable)?oe==null?void 0:oe.writable:ue(oe.writable):void 0;return te({readable:pe,writable:le})}let re=oe==null?void 0:oe.then;if(typeof re=="function"){let pe;return j(re,oe,le=>{le!=null&&pe.push(le),pe.push(null)},le=>{M(pe,le)}),pe=new H({objectMode:!0,writable:!1,read(){}})}throw new F(X,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],oe)};function P(ue){let{promise:oe,resolve:X}=T(),re=new U,pe=re.signal;return{value:ue((async function*(){for(;;){let le=oe;oe=null;let{chunk:J,done:G,cb:Q}=await le;if(n.nextTick(Q),G)return;if(pe.aborted)throw new w(void 0,{cause:pe.reason});({promise:oe,resolve:X}=T()),yield J}})(),{signal:pe}),write(le,J,G){let Q=X;X=null,Q({chunk:le,done:!1,cb:G})},final(le){let J=X;X=null,J({done:!0,cb:le})},destroy(le,J){re.abort(),J(le)}}}function te(ue){let oe=ue.readable&&typeof ue.readable.read!="function"?I.wrap(ue.readable):ue.readable,X=ue.writable,re=!!s(oe),pe=!!u(X),le,J,G,Q,K;function W($){let fe=Q;Q=null,fe?fe($):$&&K.destroy($)}return K=new H({readableObjectMode:!!(oe!=null&&oe.readableObjectMode),writableObjectMode:!!(X!=null&&X.writableObjectMode),readable:re,writable:pe}),pe&&(m(X,$=>{pe=!1,$&&M(oe,$),W($)}),K._write=function($,fe,ae){X.write($,fe)?ae():le=ae},K._final=function($){X.end(),J=$},X.on("drain",function(){if(le){let $=le;le=null,$()}}),X.on("finish",function(){if(J){let $=J;J=null,$()}})),re&&(m(oe,$=>{re=!1,$&&M(oe,$),W($)}),oe.on("readable",function(){if(G){let $=G;G=null,$()}}),oe.on("end",function(){K.push(null)}),K._read=function(){for(;;){let $=oe.read();if($===null){G=K._read;return}if(!K.push($))return}}),K._destroy=function($,fe){!$&&Q!==null&&($=new w),G=null,le=null,J=null,Q===null?fe($):(Q=fe,M(X,$),M(oe,$))},K}}),zo=qe((e,t)=>{Pe(),Le(),ke();var{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:s,ObjectSetPrototypeOf:u}=lr();t.exports=h;var l=Qp(),c=Ov();u(h.prototype,l.prototype),u(h,l);{let g=s(c.prototype);for(let m=0;m<g.length;m++){let w=g[m];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,m){return p().newStreamDuplexFromReadableWritablePair(g,m)},h.toWeb=function(g){return p().newReadableWritablePairFromDuplex(g)};var y;h.from=function(g){return y||(y=LH()),y(g,"body")}}),kB=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n,Symbol:o}=lr();t.exports=h;var{ERR_METHOD_NOT_IMPLEMENTED:s}=vn().codes,u=zo(),{getHighWaterMark:l}=Hp();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,m)=>{if(g){y?y(g):this.destroy(g);return}m!=null&&this.push(m),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,m){throw new s("_transform()")},h.prototype._write=function(y,g,m){let w=this._readableState,F=this._writableState,S=w.length;this._transform(y,g,(M,A)=>{if(M){m(M);return}A!=null&&this.push(A),F.ended||S===w.length||w.length<w.highWaterMark?m():this[c]=m})},h.prototype._read=function(){if(this[c]){let y=this[c];this[c]=null,y()}}}),LB=qe((e,t)=>{Pe(),Le(),ke();var{ObjectSetPrototypeOf:n}=lr();t.exports=s;var o=kB();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)}}),Tv=qe((e,t)=>{Pe(),Le(),ke();var n=ka(),{ArrayIsArray:o,Promise:s,SymbolAsyncIterator:u,SymbolDispose:l}=lr(),c=$s(),{once:h}=Un(),f=cl(),p=zo(),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:m,ERR_MISSING_ARGS:w,ERR_STREAM_DESTROYED:F,ERR_STREAM_PREMATURE_CLOSE:S},AbortError:M}=vn(),{validateFunction:A,validateAbortSignal:I}=Ff(),{isIterable:R,isReadable:T,isReadableNodeStream:z,isNodeStream:k,isTransformStream:L,isWebStream:U,isReadableStream:j,isReadableFinished:H}=Go(),P=globalThis.AbortController||rf().AbortController,te,ue,oe;function X($,fe,ae){let ne=!1;$.on("close",()=>{ne=!0});let Z=c($,{readable:fe,writable:ae},O=>{ne=!O});return{destroy:O=>{ne||(ne=!0,f.destroyer($,O||new F("pipe")))},cleanup:Z}}function re($){return A($[$.length-1],"streams[stream.length - 1]"),$.pop()}function pe($){if(R($))return $;if(z($))return le($);throw new g("val",["Readable","Iterable","AsyncIterable"],$)}async function*le($){ue||(ue=Qp()),yield*ue.prototype[u].call($)}async function J($,fe,ae,{end:ne}){let Z,O=null,q=ye=>{if(ye&&(Z=ye),O){let ee=O;O=null,ee()}},Y=()=>new s((ye,ee)=>{Z?ee(Z):O=()=>{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 $)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($,fe,ae,{end:ne}){L(fe)&&(fe=fe.writable);let Z=fe.getWriter();try{for await(let O of $)await Z.ready,Z.write(O).catch(()=>{});await Z.ready,ne&&await Z.close(),ae()}catch(O){try{await Z.abort(O),ae(O)}catch(q){ae(q)}}}function Q(...$){return K($,h(re($)))}function K($,fe,ae){if($.length===1&&o($[0])&&($=$[0]),$.length<2)throw new w("streams");let ne=new P,Z=ne.signal,O=ae==null?void 0:ae.signal,q=[];I(O,"options.signal");function Y(){D(new M)}oe=oe||Un().addAbortListener;let se;O&&(se=oe(O,Y));let ye,ee,_=[],v=0;function C(Be){D(Be,--v===0)}function D(Be,de){var ve;if(Be&&(!ye||ye.code==="ERR_STREAM_PREMATURE_CLOSE")&&(ye=Be),!(!ye&&!de)){for(;_.length;)_.shift()(ye);(ve=se)===null||ve===void 0||ve[l](),ne.abort(),de&&(ye||q.forEach(x=>x()),n.nextTick(fe,ye,ee))}}let he;for(let Be=0;Be<$.length;Be++){let de=$[Be],ve=Be<$.length-1,x=Be>0,B=ve||(ae==null?void 0:ae.end)!==!1,N=Be===$.length-1;if(k(de)){let ie=function(me){me&&me.name!=="AbortError"&&me.code!=="ERR_STREAM_PREMATURE_CLOSE"&&C(me)};if(B){let{destroy:me,cleanup:xe}=X(de,ve,x);_.push(me),T(de)&&N&&q.push(xe)}de.on("error",ie),T(de)&&N&&q.push(()=>{de.removeListener("error",ie)})}if(Be===0)if(typeof de=="function"){if(he=de({signal:Z}),!R(he))throw new m("Iterable, AsyncIterable or Stream","source",he)}else R(de)||z(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}),ve){if(!R(he,!0))throw new m("AsyncIterable",`transform[${Be-1}]`,he)}else{var Ee;te||(te=LB());let ie=new te({objectMode:!0}),me=(Ee=he)===null||Ee===void 0?void 0:Ee.then;if(typeof me=="function")v++,me.call(he,we=>{ee=we,we!=null&&ie.write(we),B&&ie.end(),n.nextTick(C)},we=>{ie.destroy(we),n.nextTick(C,we)});else if(R(he,!0))v++,J(he,ie,C,{end:B});else if(j(he)||L(he)){let we=he.readable||he;v++,J(we,ie,C,{end:B})}else throw new m("AsyncIterable or Promise","destination",he);he=ie;let{destroy:xe,cleanup:Ce}=X(he,!1,!0);_.push(xe),N&&q.push(Ce)}}else if(k(de)){if(z(he)){v+=2;let ie=W(he,de,C,{end:B});T(de)&&N&&q.push(ie)}else if(L(he)||j(he)){let ie=he.readable||he;v++,J(ie,de,C,{end:B})}else if(R(he))v++,J(he,de,C,{end:B});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],he);he=de}else if(U(de)){if(z(he))v++,G(pe(he),de,C,{end:B});else if(j(he)||R(he))v++,G(he,de,C,{end:B});else if(L(he))v++,G(he.readable,de,C,{end:B});else throw new g("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],he);he=de}else he=p.from(de)}return(Z!=null&&Z.aborted||O!=null&&O.aborted)&&n.nextTick(Y),he}function W($,fe,ae,{end:ne}){let Z=!1;if(fe.on("close",()=>{Z||ae(new S)}),$.pipe(fe,{end:!1}),ne){let O=function(){Z=!0,fe.end()};H($)?n.nextTick(O):$.once("end",O)}else ae();return c($,{readable:!0,writable:!1},O=>{let q=$._readableState;O&&O.code==="ERR_STREAM_PREMATURE_CLOSE"&&q&&q.ended&&!q.errored&&!q.errorEmitted?$.once("end",ae).once("error",ae):ae(O)}),c(fe,{readable:!1,writable:!0},ae)}t.exports={pipelineImpl:K,pipeline:Q}}),zB=qe((e,t)=>{Pe(),Le(),ke();var{pipeline:n}=Tv(),o=zo(),{destroyer:s}=cl(),{isNodeStream:u,isReadable:l,isWritable:c,isWebStream:h,isTransformStream:f,isWritableStream:p,isReadableStream:y}=Go(),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:m,ERR_MISSING_ARGS:w}}=vn(),F=$s();t.exports=function(...S){if(S.length===0)throw new w("streams");if(S.length===1)return o.from(S[0]);let M=[...S];if(typeof S[0]=="function"&&(S[0]=o.from(S[0])),typeof S[S.length-1]=="function"){let P=S.length-1;S[P]=o.from(S[P])}for(let P=0;P<S.length;++P)if(!(!u(S[P])&&!h(S[P]))){if(P<S.length-1&&!(l(S[P])||y(S[P])||f(S[P])))throw new m(`streams[${P}]`,M[P],"must be readable");if(P>0&&!(c(S[P])||p(S[P])||f(S[P])))throw new m(`streams[${P}]`,M[P],"must be writable")}let A,I,R,T,z;function k(P){let te=T;T=null,te?te(P):P?z.destroy(P):!H&&!j&&z.destroy()}let L=S[0],U=n(S,k),j=!!(c(L)||p(L)||f(L)),H=!!(l(U)||y(U)||f(U));if(z=new o({writableObjectMode:!!(L!=null&&L.writableObjectMode),readableObjectMode:!!(U!=null&&U.readableObjectMode),writable:j,readable:H}),j){if(u(L))z._write=function(te,ue,oe){L.write(te,ue)?oe():A=oe},z._final=function(te){L.end(),I=te},L.on("drain",function(){if(A){let te=A;A=null,te()}});else if(h(L)){let te=(f(L)?L.writable:L).getWriter();z._write=async function(ue,oe,X){try{await te.ready,te.write(ue).catch(()=>{}),X()}catch(re){X(re)}},z._final=async function(ue){try{await te.ready,te.close().catch(()=>{}),I=ue}catch(oe){ue(oe)}}}let P=f(U)?U.readable:U;F(P,()=>{if(I){let te=I;I=null,te()}})}if(H){if(u(U))U.on("readable",function(){if(R){let P=R;R=null,P()}}),U.on("end",function(){z.push(null)}),z._read=function(){for(;;){let P=U.read();if(P===null){R=z._read;return}if(!z.push(P))return}};else if(h(U)){let P=(f(U)?U.readable:U).getReader();z._read=async function(){for(;;)try{let{value:te,done:ue}=await P.read();if(!z.push(te))return;if(ue){z.push(null);return}}catch{return}}}}return z._destroy=function(P,te){!P&&T!==null&&(P=new g),R=null,A=null,I=null,T===null?te(P):(T=te,u(U)&&s(U,P))},z}}),zH=qe((e,t)=>{Pe(),Le(),ke();var n=globalThis.AbortController||rf().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}=Ff(),y=lr().Symbol("kWeak"),g=lr().Symbol("kResistStopPropagation"),{finished:m}=$s(),w=zB(),{addAbortSignalNoValidate:F}=qp(),{isWritable:S,isNodeStream:M}=Go(),{deprecate:A}=Un(),{ArrayPrototypePush:I,Boolean:R,MathFloor:T,Number:z,NumberIsNaN:k,Promise:L,PromiseReject:U,PromiseResolve:j,PromisePrototypeThen:H,Symbol:P}=lr(),te=P("kEmpty"),ue=P("kEof");function oe(O,q){if(q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal"),M(O)&&!S(O))throw new o("stream",O,"must be writable");let Y=w(this,O);return q!=null&&q.signal&&F(q.signal,Y),Y}function X(O,q){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);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=Un().AbortSignalAny([q==null?void 0:q.signal].filter(R)),ee=this,_=[],v={signal:ye},C,D,he=!1,ce=0;function Ee(){he=!0,Be()}function Be(){ce-=1,de()}function de(){D&&!he&&ce<Y&&_.length<se&&(D(),D=null)}async function ve(){try{for await(let x of ee){if(he)return;if(ye.aborted)throw new c;try{if(x=O(x,v),x===te)continue;x=j(x)}catch(B){x=U(B)}ce+=1,H(x,Be,Ee),_.push(x),C&&(C(),C=null),!he&&(_.length>=se||ce>=Y)&&await new L(B=>{D=B})}_.push(ue)}catch(x){let B=U(x);H(B,Be,Ee),_.push(B)}finally{he=!0,C&&(C(),C=null)}}ve();try{for(;;){for(;_.length>0;){let x=await _[0];if(x===ue)return;if(ye.aborted)throw new c;x!==te&&(yield x),_.shift(),de()}await new L(x=>{C=x})}}finally{he=!0,D&&(D(),D=null)}}).call(this)}function re(O=void 0){return O!=null&&p(O,"options"),(O==null?void 0:O.signal)!=null&&h(O.signal,"options.signal"),(async function*(){let q=0;for await(let se of this){var Y;if(O!=null&&(Y=O.signal)!==null&&Y!==void 0&&Y.aborted)throw new c({cause:O.signal.reason});yield[q++,se]}}).call(this)}async function pe(O,q=void 0){for await(let Y of Q.call(this,O,q))return!0;return!1}async function le(O,q=void 0){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);return!await pe.call(this,async(...Y)=>!await O(...Y),q)}async function J(O,q){for await(let Y of Q.call(this,O,q))return Y}async function G(O,q){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);async function Y(se,ye){return await O(se,ye),te}for await(let se of X.call(this,Y,q));}function Q(O,q){if(typeof O!="function")throw new s("fn",["Function","AsyncFunction"],O);async function Y(se,ye){return await O(se,ye)?se:te}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(O,q,Y){var se;if(typeof O!="function")throw new s("reducer",["Function","AsyncFunction"],O);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 D=new c(void 0,{cause:Y.signal.reason});throw this.once("error",()=>{}),await m(this.destroy(D)),D}let ee=new n,_=ee.signal;if(Y!=null&&Y.signal){let D={once:!0,[y]:this,[g]:!0};Y.signal.addEventListener("abort",()=>ee.abort(),D)}let v=!1;try{for await(let D of this){var C;if(v=!0,Y!=null&&(C=Y.signal)!==null&&C!==void 0&&C.aborted)throw new c;ye?q=await O(q,D,{signal:_}):(q=D,ye=!0)}if(!v&&!ye)throw new K}finally{ee.abort()}return q}async function $(O){O!=null&&p(O,"options"),(O==null?void 0:O.signal)!=null&&h(O.signal,"options.signal");let q=[];for await(let se of this){var Y;if(O!=null&&(Y=O.signal)!==null&&Y!==void 0&&Y.aborted)throw new c(void 0,{cause:O.signal.reason});I(q,se)}return q}function fe(O,q){let Y=X.call(this,O,q);return(async function*(){for await(let se of Y)yield*se}).call(this)}function ae(O){if(O=z(O),k(O))return 0;if(O<0)throw new l("number",">= 0",O);return O}function ne(O,q=void 0){return q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal"),O=ae(O),(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;O--<=0&&(yield ye)}}).call(this)}function Z(O,q=void 0){return q!=null&&p(q,"options"),(q==null?void 0:q.signal)!=null&&h(q.signal,"options.signal"),O=ae(O),(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(O-- >0&&(yield ye),O<=0)return}}).call(this)}t.exports.streamReturningOperators={asIndexedPairs:A(re,"readable.asIndexedPairs will be removed in a future version."),drop:ne,filter:Q,flatMap:fe,map:X,take:Z,compose:oe},t.exports.promiseReturningOperators={every:le,forEach:G,reduce:W,toArray:$,some:pe,find:J}}),$B=qe((e,t)=>{Pe(),Le(),ke();var{ArrayPrototypePop:n,Promise:o}=lr(),{isIterable:s,isNodeStream:u,isWebStream:l}=Go(),{pipelineImpl:c}=Tv(),{finished:h}=$s();qB();function f(...p){return new o((y,g)=>{let m,w,F=p[p.length-1];if(F&&typeof F=="object"&&!u(F)&&!s(F)&&!l(F)){let S=n(p);m=S.signal,w=S.end}c(p,(S,M)=>{S?g(S):y(M)},{signal:m,end:w})})}t.exports={finished:h,pipeline:f}}),qB=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),{ObjectDefineProperty:o,ObjectKeys:s,ReflectApply:u}=lr(),{promisify:{custom:l}}=Un(),{streamReturningOperators:c,promiseReturningOperators:h}=zH(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:f}}=vn(),p=zB(),{setDefaultHighWaterMark:y,getDefaultHighWaterMark:g}=Hp(),{pipeline:m}=Tv(),{destroyer:w}=cl(),F=$s(),S=$B(),M=Go(),A=t.exports=Fv().Stream;A.isDestroyed=M.isDestroyed,A.isDisturbed=M.isDisturbed,A.isErrored=M.isErrored,A.isReadable=M.isReadable,A.isWritable=M.isWritable,A.Readable=Qp();for(let R of s(c)){let T=function(...k){if(new.target)throw f();return A.Readable.from(u(z,this,k))},z=c[R];o(T,"name",{__proto__:null,value:z.name}),o(T,"length",{__proto__:null,value:z.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(z,this,k)},z=h[R];o(T,"name",{__proto__:null,value:z.name}),o(T,"length",{__proto__:null,value:z.length}),o(A.Readable.prototype,R,{__proto__:null,value:T,enumerable:!1,configurable:!0,writable:!0})}A.Writable=Ov(),A.Duplex=zo(),A.Transform=kB(),A.PassThrough=LB(),A.pipeline=m;var{addAbortSignal:I}=qp();A.addAbortSignal=I,A.finished=F,A.destroy=w,A.compose=p,A.setDefaultHighWaterMark=y,A.getDefaultHighWaterMark=g,o(A,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return S}}),o(m,l,{__proto__:null,enumerable:!0,get(){return S.pipeline}}),o(F,l,{__proto__:null,enumerable:!0,get(){return S.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)}}),La=qe((e,t)=>{Pe(),Le(),ke();var n=qB(),o=$B(),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}),$H=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}}}),qH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),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,m=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 F=0;F<this._bufs.length;F++)this._bufs[F].copy(u,m),m+=this._bufs[F].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 F=p[0];F<this._bufs.length;F++){let S=this._bufs[F].length-w;if(g>S)this._bufs[F].copy(u,m,w),m+=S;else{this._bufs[F].copy(u,m,w,w+g),m+=S;break}g-=S,w&&(w=0)}return u.length>m?u.slice(0,m):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}),HH=qe((e,t)=>{Pe(),Le(),ke();var n=La().Duplex,o=$H(),s=qH();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}),QH=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}),HB=qe((e,t)=>{Pe(),Le(),ke();var n=t.exports,{Buffer:o}=(Yr(),Vt(Kr));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"}}),GH=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,m){m=m||{};var w=typeof g;if(w==="string"&&g.length>0)return h(g);if(w==="number"&&isFinite(g))return m.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 m=/^(-?(?:\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(m){var w=parseFloat(m[1]),F=(m[2]||"ms").toLowerCase();switch(F){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 m=Math.abs(g);return m>=u?Math.round(g/u)+"d":m>=s?Math.round(g/s)+"h":m>=o?Math.round(g/o)+"m":m>=n?Math.round(g/n)+"s":g+"ms"}function p(g){var m=Math.abs(g);return m>=u?y(g,m,u,"day"):m>=s?y(g,m,s,"hour"):m>=o?y(g,m,o,"minute"):m>=n?y(g,m,n,"second"):g+" ms"}function y(g,m,w,F){var S=m>=w*1.5;return Math.round(g/w)+" "+F+(S?"s":"")}}),KH=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=GH(),u.destroy=g,Object.keys(o).forEach(m=>{u[m]=o[m]}),u.names=[],u.skips=[],u.formatters={};function s(m){let w=0;for(let F=0;F<m.length;F++)w=(w<<5)-w+m.charCodeAt(F),w|=0;return u.colors[Math.abs(w)%u.colors.length]}u.selectColor=s;function u(m){let w,F=null,S,M;function A(...I){if(!A.enabled)return;let R=A,T=Number(new Date),z=T-(w||T);R.diff=z,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 H=I[k];L=j.call(R,H),I.splice(k,1),k--}return L}),u.formatArgs.call(R,I),(R.log||u.log).apply(R,I)}return A.namespace=m,A.useColors=u.useColors(),A.color=u.selectColor(m),A.extend=l,A.destroy=u.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>F!==null?F:(S!==u.namespaces&&(S=u.namespaces,M=u.enabled(m)),M),set:I=>{F=I}}),typeof u.init=="function"&&u.init(A),A}function l(m,w){let F=u(this.namespace+(typeof w>"u"?":":w)+m);return F.log=this.log,F}function c(m){u.save(m),u.namespaces=m,u.names=[],u.skips=[];let w=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of w)F[0]==="-"?u.skips.push(F.slice(1)):u.names.push(F)}function h(m,w){let F=0,S=0,M=-1,A=0;for(;F<m.length;)if(S<w.length&&(w[S]===m[F]||w[S]==="*"))w[S]==="*"?(M=S,A=F,S++):(F++,S++);else if(M!==-1)S=M+1,A++,F=A;else return!1;for(;S<w.length&&w[S]==="*";)S++;return S===w.length}function f(){let m=[...u.names,...u.skips.map(w=>"-"+w)].join(",");return u.enable(""),m}function p(m){for(let w of u.skips)if(h(m,w))return!1;for(let w of u.names)if(h(m,w))return!0;return!1}function y(m){return m instanceof Error?m.stack||m.message:m}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 Dt<"u"&&"env"in Dt&&(h=Dt.env.DEBUG),h}function l(){try{return localStorage}catch{}}t.exports=KH()(e);var{formatters:c}=t.exports;c.j=function(h){try{return JSON.stringify(h)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}),YH=qe((e,t)=>{Pe(),Le(),ke();var n=HH(),{EventEmitter:o}=(Pa(),Vt(zs)),s=QH(),u=HB(),l=$o()("mqtt-packet:parser"),c=class sA extends o{constructor(){super(),this.parser=this.constructor.parser}static parser(f){return this instanceof sA?(this.settings=f||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new sA().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,m={},w=this.packet,F=this._parseString();if(F===null)return this._emitError(new Error("Cannot parse protocolId"));if(F!=="MQTT"&&F!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(w.protocolId=F,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"));m.username=this._list.readUInt8(this._pos)&u.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&u.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&u.WILL_FLAG_MASK;let S=!!(this._list.readUInt8(this._pos)&u.WILL_RETAIN_MASK),M=(this._list.readUInt8(this._pos)&u.WILL_QOS_MASK)>>u.WILL_QOS_SHIFT;if(m.will)w.will={},w.will.retain=S,w.will.qos=M;else{if(S)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),m.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(m.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(m.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,m,w,F,S;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(F=(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,m=y>>u.SUBSCRIBE_OPTIONS_RH_SHIFT&u.SUBSCRIBE_OPTIONS_RH_MASK,m>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));S={topic:p,qos:g},this.settings.protocolVersion===5?(S.nl=F,S.rap=w,S.rh=m):this.settings.bridgeMode&&(S.rh=0,S.rap=!0,S.nl=!0),l("_parseSubscribe: push subscription `%s` to subscription",S),f.subscriptions.push(S)}}}_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,m=0,w=!1,F,S=this._pos?this._pos:0;for(;y<p&&S+y<this._list.length;){if(F=this._list.readUInt8(S+y++),m+=g*(F&u.VARBYTEINT_MASK),g*=128,(F&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")),S&&(this._pos+=y),w?f?w={bytes:y,value:m}:w=m: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 m=u.propertiesCodes[g];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m==="userProperties"){y[m]||(y[m]=Object.create(null));let w=this._parseByType(u.propertiesTypes[m]);if(y[m][w.name])if(Array.isArray(y[m][w.name]))y[m][w.name].push(w.value);else{let F=y[m][w.name];y[m][w.name]=[F],y[m][w.name].push(w.value)}else y[m][w.name]=w.value;continue}y[m]?Array.isArray(y[m])?y[m].push(this._parseByType(u.propertiesTypes[m])):(y[m]=[y[m]],y[m].push(this._parseByType(u.propertiesTypes[m]))):y[m]=this._parseByType(u.propertiesTypes[m])}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}),VH=qe((e,t)=>{Pe(),Le(),ke();var{Buffer:n}=(Yr(),Vt(Kr)),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,m=n.allocUnsafe(4);do y=p%128|0,p=p/128|0,p>0&&(y=y|128),m.writeUInt8(y,g++);while(p>0&&g<4);return p>0&&(g=0),u?m.subarray(0,g):m.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}}),WH=qe((e,t)=>{Pe(),Le(),ke(),typeof Dt>"u"||!Dt.version||Dt.version.indexOf("v0.")===0||Dt.version.indexOf("v1.")===0&&Dt.version.indexOf("v1.8.")!==0?t.exports={nextTick:n}:t.exports=Dt;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 Dt.nextTick(o);case 2:return Dt.nextTick(function(){o.call(null,s)});case 3:return Dt.nextTick(function(){o.call(null,s,u)});case 4:return Dt.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 Dt.nextTick(function(){o.apply(null,h)})}}}),QB=qe((e,t)=>{Pe(),Le(),ke();var n=HB(),{Buffer:o}=(Yr(),Vt(Kr)),s=o.allocUnsafe(0),u=o.from([0]),l=VH(),c=WH().nextTick,h=$o()("mqtt-packet:writeToStream"),f=l.cache,p=l.generateNumber,y=l.generateCache,g=l.genBufVariableByteInt,m=l.generate4ByteBuffer,w=re,F=!0;function S(ae,ne,Z){switch(h("generate called"),ne.cork&&(ne.cork(),c(M,ne)),F&&(F=!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 z(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 H(ae,ne,Z);case"auth":return P(ae,ne,Z);default:return ne.destroy(new Error("Unknown command")),!1}}Object.defineProperty(S,"cacheNumbers",{get(){return w===re},set(ae){ae?((!f||Object.keys(f).length===0)&&(F=!0),w=re):(F=!1,w=pe)}});function M(ae){ae.uncork()}function A(ae,ne,Z){let O=ae||{},q=O.protocolId||"MQTT",Y=O.protocolVersion||4,se=O.will,ye=O.clean,ee=O.keepalive||0,_=O.clientId||"",v=O.username,C=O.password,D=O.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 _=="string"||o.isBuffer(_))&&(_||Y>=4)&&(_||ye))he+=o.byteLength(_)+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,D),!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 Be=!1;if(v!=null)if(fe(v))Be=!0,he+=o.byteLength(v)+2;else return ne.destroy(new Error("Invalid username")),!1;if(C!=null){if(!Be)return ne.destroy(new Error("Username is required to use password")),!1;if(fe(C))he+=$(C)+2;else return ne.destroy(new Error("Invalid password")),!1}ne.write(n.CONNECT_HEADER),ue(ne,he),J(ne,q),O.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,_),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 O=Z?Z.protocolVersion:4,q=ae||{},Y=O===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(O===5){if(ee=G(ne,se),!ee)return!1;ye+=ee.length}return ne.write(n.CONNACK_HEADER),ue(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 O=Z?Z.protocolVersion:4,q=ae||{},Y=q.qos||0,se=q.retain?n.RETAIN_MASK:0,ye=q.topic,ee=q.payload||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 _!="number")return ne.destroy(new Error("Invalid messageId")),!1;Y&&(C+=2);let D=null;if(O===5){if(D=G(ne,v),!D)return!1;C+=D.length}return ne.write(n.PUBLISH_HEADER[Y][q.dup?1:0][se?1:0]),ue(ne,C),w(ne,$(ye)),ne.write(ye),Y>0&&w(ne,_),D==null||D.write(),h("publish: payload: %o",ee),ne.write(ee)}function T(ae,ne,Z){let O=Z?Z.protocolVersion:4,q=ae||{},Y=q.cmd||"puback",se=q.messageId,ye=q.dup&&Y==="pubrel"?n.DUP_MASK:0,ee=0,_=q.reasonCode,v=q.properties,C=O===5?3:2;if(Y==="pubrel"&&(ee=1),typeof se!="number")return ne.destroy(new Error("Invalid messageId")),!1;let D=null;if(O===5&&typeof v=="object"){if(D=Q(ne,v,Z,C),!D)return!1;C+=D.length}return ne.write(n.ACKS[Y][ee][ye][0]),C===3&&(C+=_!==0?1:-1),ue(ne,C),w(ne,se),O===5&&C!==2&&ne.write(o.from([_])),D!==null?D.write():C===4&&ne.write(o.from([0])),!0}function z(ae,ne,Z){h("subscribe: packet: ");let O=Z?Z.protocolVersion:4,q=ae||{},Y=q.dup?n.DUP_MASK:0,se=q.messageId,ye=q.subscriptions,ee=q.properties,_=0;if(typeof se!="number")return ne.destroy(new Error("Invalid messageId")),!1;_+=2;let v=null;if(O===5){if(v=G(ne,ee),!v)return!1;_+=v.length}if(typeof ye=="object"&&ye.length)for(let D=0;D<ye.length;D+=1){let he=ye[D].topic,ce=ye[D].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(O===5){if(typeof(ye[D].nl||!1)!="boolean")return ne.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(ye[D].rap||!1)!="boolean")return ne.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let Ee=ye[D].rh||0;if(typeof Ee!="number"||Ee>2)return ne.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}_+=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]),ue(ne,_),w(ne,se),v!==null&&v.write();let C=!0;for(let D of ye){let he=D.topic,ce=D.qos,Ee=+D.nl,Be=+D.rap,de=D.rh,ve;oe(ne,he),ve=n.SUBSCRIBE_OPTIONS_QOS[ce],O===5&&(ve|=Ee?n.SUBSCRIBE_OPTIONS_NL:0,ve|=Be?n.SUBSCRIBE_OPTIONS_RAP:0,ve|=de?n.SUBSCRIBE_OPTIONS_RH[de]:0),C=ne.write(o.from([ve]))}return C}function k(ae,ne,Z){let O=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 _=null;if(O===5){if(_=Q(ne,ye,Z,ee),!_)return!1;ee+=_.length}return ne.write(n.SUBACK_HEADER),ue(ne,ee),w(ne,Y),_!==null&&_.write(),ne.write(o.from(se))}function L(ae,ne,Z){let O=Z?Z.protocolVersion:4,q=ae||{},Y=q.messageId,se=q.dup?n.DUP_MASK:0,ye=q.unsubscriptions,ee=q.properties,_=0;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(_+=2,typeof ye=="object"&&ye.length)for(let D=0;D<ye.length;D+=1){if(typeof ye[D]!="string")return ne.destroy(new Error("Invalid unsubscriptions")),!1;_+=o.byteLength(ye[D])+2}else return ne.destroy(new Error("Invalid unsubscriptions")),!1;let v=null;if(O===5){if(v=G(ne,ee),!v)return!1;_+=v.length}ne.write(n.UNSUBSCRIBE_HEADER[1][se?1:0][0]),ue(ne,_),w(ne,Y),v!==null&&v.write();let C=!0;for(let D=0;D<ye.length;D++)C=oe(ne,ye[D]);return C}function U(ae,ne,Z){let O=Z?Z.protocolVersion:4,q=ae||{},Y=q.messageId,se=q.dup?n.DUP_MASK:0,ye=q.granted,ee=q.properties,_=q.cmd,v=0,C=2;if(typeof Y!="number")return ne.destroy(new Error("Invalid messageId")),!1;if(O===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 D=null;if(O===5){if(D=Q(ne,ee,Z,C),!D)return!1;C+=D.length}return ne.write(n.ACKS[_][v][se][0]),ue(ne,C),w(ne,Y),D!==null&&D.write(),O===5&&ne.write(o.from(ye)),!0}function j(ae,ne,Z){return ne.write(n.EMPTY[ae.cmd])}function H(ae,ne,Z){let O=Z?Z.protocolVersion:4,q=ae||{},Y=q.reasonCode,se=q.properties,ye=O===5?1:0,ee=null;if(O===5){if(ee=Q(ne,se,Z,ye),!ee)return!1;ye+=ee.length}return ne.write(o.from([n.codes.disconnect<<4])),ue(ne,ye),O===5&&ne.write(o.from([Y])),ee!==null&&ee.write(),!0}function P(ae,ne,Z){let O=Z?Z.protocolVersion:4,q=ae||{},Y=q.reasonCode,se=q.properties,ye=O===5?1:0;O!==5&&ne.destroy(new Error("Invalid mqtt version for auth packet"));let ee=Q(ne,se,Z,ye);return ee?(ye+=ee.length,ne.write(o.from([n.codes.auth<<4])),ue(ne,ye),ne.write(o.from([Y])),ee!==null&&ee.write(),!0):!1}var te={};function ue(ae,ne){if(ne>n.VARBYTEINT_MAX)return ae.destroy(new Error(`Invalid variable byte integer: ${ne}`)),!1;let Z=te[ne];return Z||(Z=g(ne),ne<16384&&(te[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 re(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 le(ae,ne){let Z=m(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 O(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,_)=>{let v=Y[_];return Array.isArray(v)?ee+=v.reduce((C,D)=>(C+=3+o.byteLength(_.toString())+2+o.byteLength(D.toString()),C),0):ee+=3+o.byteLength(_.toString())+2+o.byteLength(Y[_].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=O(q,ye[ee]),!se)return!1;Y+=se}else{if(se=O(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 Q(ae,ne,Z,O){let q=["reasonString","userProperties"],Y=Z&&Z.properties&&Z.properties.maximumPacketSize?Z.properties.maximumPacketSize:0,se=G(ae,ne);if(Y)for(;O+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]])),le(ae,Z);break}case"var":{ae.write(o.from([n.properties[ne]])),ue(ae,Z);break}case"string":{ae.write(o.from([n.properties[ne]])),oe(ae,Z);break}case"pair":{Object.getOwnPropertyNames(Z).forEach(O=>{let q=Z[O];Array.isArray(q)?q.forEach(Y=>{ae.write(o.from([n.properties[ne]])),X(ae,O.toString(),Y.toString())}):(ae.write(o.from([n.properties[ne]])),X(ae,O.toString(),q.toString()))});break}default:return ae.destroy(new Error(`Invalid property ${ne} value: ${Z}`)),!1}}function W(ae,ne,Z){ue(ae,Z);for(let O in ne)if(Object.prototype.hasOwnProperty.call(ne,O)&&ne[O]!=null){let q=ne[O];if(Array.isArray(q))for(let Y=0;Y<q.length;Y++)K(ae,O,q[Y]);else K(ae,O,q)}}function $(ae){return ae?ae instanceof o?ae.length:o.byteLength(ae):0}function fe(ae){return typeof ae=="string"||ae instanceof o}t.exports=S}),XH=qe((e,t)=>{Pe(),Le(),ke();var n=QB(),{EventEmitter:o}=(Pa(),Vt(zs)),{Buffer:s}=(Yr(),Vt(Kr));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}),ZH=qe(e=>{Pe(),Le(),ke(),e.parser=YH().parser,e.generate=XH(),e.writeToStream=QB()}),JH=qe((e,t)=>{Pe(),Le(),ke(),t.exports=o;function n(u){return u instanceof Wd?Wd.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 m=Object.keys(y),w=new Array(m.length);for(let F=0;F<m.length;F++){let S=m[F],M=y[S];typeof M!="object"||M===null?w[S]=M:M.constructor!==Object&&(c=l.get(M.constructor))?w[S]=c(M,g):ArrayBuffer.isView(M)?w[S]=n(M):w[S]=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 m in y){if(Object.hasOwnProperty.call(y,m)===!1)continue;let w=y[m];typeof w!="object"||w===null?g[m]=w:w.constructor!==Object&&(c=l.get(w.constructor))?g[m]=c(w,f):ArrayBuffer.isView(w)?g[m]=n(w):g[m]=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 m in y){let w=y[m];typeof w!="object"||w===null?g[m]=w:w.constructor!==Object&&(c=l.get(w.constructor))?g[m]=c(w,p):ArrayBuffer.isView(w)?g[m]=n(w):g[m]=p(w)}return g}}function s(u){let l=[],c=[],h=new Map;if(h.set(Date,m=>new Date(m)),h.set(Map,(m,w)=>new Map(p(Array.from(m),w))),h.set(Set,(m,w)=>new Set(p(Array.from(m),w))),u.constructorHandlers)for(let m of u.constructorHandlers)h.set(m[0],m[1]);let f=null;return u.proto?g:y;function p(m,w){let F=Object.keys(m),S=new Array(F.length);for(let M=0;M<F.length;M++){let A=F[M],I=m[A];if(typeof I!="object"||I===null)S[A]=I;else if(I.constructor!==Object&&(f=h.get(I.constructor)))S[A]=f(I,w);else if(ArrayBuffer.isView(I))S[A]=n(I);else{let R=l.indexOf(I);R!==-1?S[A]=c[R]:S[A]=w(I)}}return S}function y(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return p(m,y);if(m.constructor!==Object&&(f=h.get(m.constructor)))return f(m,y);let w={};l.push(m),c.push(w);for(let F in m){if(Object.hasOwnProperty.call(m,F)===!1)continue;let S=m[F];if(typeof S!="object"||S===null)w[F]=S;else if(S.constructor!==Object&&(f=h.get(S.constructor)))w[F]=f(S,y);else if(ArrayBuffer.isView(S))w[F]=n(S);else{let M=l.indexOf(S);M!==-1?w[F]=c[M]:w[F]=y(S)}}return l.pop(),c.pop(),w}function g(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return p(m,g);if(m.constructor!==Object&&(f=h.get(m.constructor)))return f(m,g);let w={};l.push(m),c.push(w);for(let F in m){let S=m[F];if(typeof S!="object"||S===null)w[F]=S;else if(S.constructor!==Object&&(f=h.get(S.constructor)))w[F]=f(S,g);else if(ArrayBuffer.isView(S))w[F]=n(S);else{let M=l.indexOf(S);M!==-1?w[F]=c[M]:w[F]=g(S)}}return l.pop(),c.pop(),w}}}),eQ=qe((e,t)=>{Pe(),Le(),ke(),t.exports=JH()()}),tQ=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}}),GB=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=La(),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}),rQ=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,m=>{if(m)return u&&u(m);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}),nQ=qe((e,t)=>{t.exports={version:"5.14.1"}}),fl=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 KB extends Error{constructor(l,c){super(l);rt(this,"code");this.code=c,Object.setPrototypeOf(this,KB.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=t;var n=class YB extends Error{constructor(l,c){super(l);rt(this,"packet");this.packet=c,Object.setPrototypeOf(this,YB.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(Dt==null?void 0:Dt.nextTick)=="function"?Dt.nextTick:s=>{setTimeout(s,0)},e.MQTTJS_VERSION=nQ().version}),Gp=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var t=fl();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 m=o.messageIdToTopic[u];m&&m.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}),iQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=fl(),n=Gp(),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}),oQ=qe(e=>{var m,w,F,S,M,A,I,R,T,z,k,L,U,j,H,P,te,ue,oe,X,re,pe,le,J,G,Q,K,W,$,aA,ae,ne,Z,O,VB,Y,se,ye,Ss,Is,uA,gd,md,tr,lA,mc,_s,cA,ve;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 Dt=="object"&&Dt?Dt:{},s=(x,B,N,ie)=>{typeof o.emitWarning=="function"?o.emitWarning(x,B,N,ie):console.error(`[${N}] ${B}: ${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(N,ie){this._onabort.push(ie)}},u=class{constructor(){rt(this,"signal",new l);B()}abort(N){var ie,me;if(!this.signal.aborted){this.signal.reason=N,this.signal.aborted=!0;for(let xe of this.signal._onabort)xe(N);(me=(ie=this.signal).onabort)==null||me.call(ie,N)}}};let x=((m=o.env)==null?void 0:m.LRU_CACHE_IGNORE_AC_WARNING)!=="1",B=()=>{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",B))}}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(B,N){rt(this,"heap");rt(this,"length");if(!Ae(w,F))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new N(B),this.length=0}static create(B){let N=f(B);if(!N)return[];ht(w,F,!0);let ie=new w(B,N);return ht(w,F,!1),ie}push(B){this.heap[this.length++]=B}pop(){return this.heap[--this.length]}},F=new WeakMap,Et(w,F,!1),w),g=(ve=class{constructor(B){Et(this,$);Et(this,A);Et(this,I);Et(this,R);Et(this,T);Et(this,z);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,H);Et(this,P);Et(this,te);Et(this,ue);Et(this,oe);Et(this,X);Et(this,re);Et(this,pe);Et(this,le);Et(this,J);Et(this,G);Et(this,Q);Et(this,K);Et(this,W);Et(this,ae,()=>{});Et(this,ne,()=>{});Et(this,Z,()=>{});Et(this,O,()=>!1);Et(this,Y,B=>{});Et(this,se,(B,N,ie)=>{});Et(this,ye,(B,N,ie,me)=>{if(ie||me)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});rt(this,S,"LRUCache");let{max:N=0,ttl:ie,ttlResolution:me=1,ttlAutopurge:xe,updateAgeOnGet:Ce,updateAgeOnHas:we,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:Zt,ignoreFetchAbort:Ar}=B;if(N!==0&&!h(N))throw new TypeError("max option must be a nonnegative integer");let be=N?f(N):Array;if(!be)throw new Error("invalid max value: "+N);if(ht(this,A,N),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,z,yt),ht(this,K,!!yt),ht(this,j,new Map),ht(this,H,new Array(N).fill(void 0)),ht(this,P,new Array(N).fill(void 0)),ht(this,te,new be(N)),ht(this,ue,new be(N)),ht(this,oe,0),ht(this,X,0),ht(this,re,y.create(N)),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,Q,!!Ae(this,R)),ht(this,W,!!Ae(this,T)),this.noDisposeOnSet=!!Ve,this.noUpdateTTL=!!et,this.noDeleteOnFetchRejection=!!ft,this.allowStaleOnFetchRejection=!!At,this.allowStaleOnFetchAbort=!!Zt,this.ignoreFetchAbort=!!Ar,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,$,VB).call(this)}if(this.allowStale=!!Se,this.noDeleteOnStaleGet=!!dt,this.updateAgeOnGet=!!Ce,this.updateAgeOnHas=!!we,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,$,aA).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,ve))}}static unsafeExposeInternals(B){return{starts:Ae(B,J),ttls:Ae(B,G),sizes:Ae(B,le),keyMap:Ae(B,j),keyList:Ae(B,H),valList:Ae(B,P),next:Ae(B,te),prev:Ae(B,ue),get head(){return Ae(B,oe)},get tail(){return Ae(B,X)},free:Ae(B,re),isBackgroundFetch:N=>{var ie;return We(ie=B,$,tr).call(ie,N)},backgroundFetch:(N,ie,me,xe)=>{var Ce;return We(Ce=B,$,md).call(Ce,N,ie,me,xe)},moveToTail:N=>{var ie;return We(ie=B,$,mc).call(ie,N)},indexes:N=>{var ie;return We(ie=B,$,Ss).call(ie,N)},rindexes:N=>{var ie;return We(ie=B,$,Is).call(ie,N)},isStale:N=>{var ie;return Ae(ie=B,O).call(ie,N)}}}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,z)}get memoMethod(){return Ae(this,k)}get dispose(){return Ae(this,R)}get disposeAfter(){return Ae(this,T)}getRemainingTTL(B){return Ae(this,j).has(B)?1/0:0}*entries(){for(let B of We(this,$,Ss).call(this))Ae(this,P)[B]!==void 0&&Ae(this,H)[B]!==void 0&&!We(this,$,tr).call(this,Ae(this,P)[B])&&(yield[Ae(this,H)[B],Ae(this,P)[B]])}*rentries(){for(let B of We(this,$,Is).call(this))Ae(this,P)[B]!==void 0&&Ae(this,H)[B]!==void 0&&!We(this,$,tr).call(this,Ae(this,P)[B])&&(yield[Ae(this,H)[B],Ae(this,P)[B]])}*keys(){for(let B of We(this,$,Ss).call(this)){let N=Ae(this,H)[B];N!==void 0&&!We(this,$,tr).call(this,Ae(this,P)[B])&&(yield N)}}*rkeys(){for(let B of We(this,$,Is).call(this)){let N=Ae(this,H)[B];N!==void 0&&!We(this,$,tr).call(this,Ae(this,P)[B])&&(yield N)}}*values(){for(let B of We(this,$,Ss).call(this))Ae(this,P)[B]!==void 0&&!We(this,$,tr).call(this,Ae(this,P)[B])&&(yield Ae(this,P)[B])}*rvalues(){for(let B of We(this,$,Is).call(this))Ae(this,P)[B]!==void 0&&!We(this,$,tr).call(this,Ae(this,P)[B])&&(yield Ae(this,P)[B])}[(M=Symbol.iterator,S=Symbol.toStringTag,M)](){return this.entries()}find(B,N={}){for(let ie of We(this,$,Ss).call(this)){let me=Ae(this,P)[ie],xe=We(this,$,tr).call(this,me)?me.__staleWhileFetching:me;if(xe!==void 0&&B(xe,Ae(this,H)[ie],this))return this.get(Ae(this,H)[ie],N)}}forEach(B,N=this){for(let ie of We(this,$,Ss).call(this)){let me=Ae(this,P)[ie],xe=We(this,$,tr).call(this,me)?me.__staleWhileFetching:me;xe!==void 0&&B.call(N,xe,Ae(this,H)[ie],this)}}rforEach(B,N=this){for(let ie of We(this,$,Is).call(this)){let me=Ae(this,P)[ie],xe=We(this,$,tr).call(this,me)?me.__staleWhileFetching:me;xe!==void 0&&B.call(N,xe,Ae(this,H)[ie],this)}}purgeStale(){let B=!1;for(let N of We(this,$,Is).call(this,{allowStale:!0}))Ae(this,O).call(this,N)&&(We(this,$,_s).call(this,Ae(this,H)[N],"expire"),B=!0);return B}info(B){let N=Ae(this,j).get(B);if(N===void 0)return;let ie=Ae(this,P)[N],me=We(this,$,tr).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)[N],we=Ae(this,J)[N];if(Ce&&we){let Se=Ce-(t.now()-we);xe.ttl=Se,xe.start=Date.now()}}return Ae(this,le)&&(xe.size=Ae(this,le)[N]),xe}dump(){let B=[];for(let N of We(this,$,Ss).call(this,{allowStale:!0})){let ie=Ae(this,H)[N],me=Ae(this,P)[N],xe=We(this,$,tr).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)[N];let we=t.now()-Ae(this,J)[N];Ce.start=Math.floor(Date.now()-we)}Ae(this,le)&&(Ce.size=Ae(this,le)[N]),B.unshift([ie,Ce])}return B}load(B){this.clear();for(let[N,ie]of B){if(ie.start){let me=Date.now()-ie.start;ie.start=t.now()-me}this.set(N,ie.value,ie)}}set(B,N,ie={}){var et,gt,bt,lt,yt;if(N===void 0)return this.delete(B),this;let{ttl:me=this.ttl,start:xe,noDisposeOnSet:Ce=this.noDisposeOnSet,sizeCalculation:we=this.sizeCalculation,status:Se}=ie,{noUpdateTTL:He=this.noUpdateTTL}=ie,Ke=Ae(this,ye).call(this,B,N,ie.size||0,we);if(this.maxEntrySize&&Ke>this.maxEntrySize)return Se&&(Se.set="miss",Se.maxEntrySizeExceeded=!0),We(this,$,_s).call(this,B,"set"),this;let Ve=Ae(this,L)===0?void 0:Ae(this,j).get(B);if(Ve===void 0)Ve=Ae(this,L)===0?Ae(this,X):Ae(this,re).length!==0?Ae(this,re).pop():Ae(this,L)===Ae(this,A)?We(this,$,gd).call(this,!1):Ae(this,L),Ae(this,H)[Ve]=B,Ae(this,P)[Ve]=N,Ae(this,j).set(B,Ve),Ae(this,te)[Ae(this,X)]=Ve,Ae(this,ue)[Ve]=Ae(this,X),ht(this,X,Ve),$h(this,L)._++,Ae(this,se).call(this,Ve,Ke,Se),Se&&(Se.set="add"),He=!1;else{We(this,$,mc).call(this,Ve);let tt=Ae(this,P)[Ve];if(N!==tt){if(Ae(this,K)&&We(this,$,tr).call(this,tt)){tt.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:ft}=tt;ft!==void 0&&!Ce&&(Ae(this,Q)&&((et=Ae(this,R))==null||et.call(this,ft,B,"set")),Ae(this,W)&&((gt=Ae(this,pe))==null||gt.push([ft,B,"set"])))}else Ce||(Ae(this,Q)&&((bt=Ae(this,R))==null||bt.call(this,tt,B,"set")),Ae(this,W)&&((lt=Ae(this,pe))==null||lt.push([tt,B,"set"])));if(Ae(this,Y).call(this,Ve),Ae(this,se).call(this,Ve,Ke,Se),Ae(this,P)[Ve]=N,Se){Se.set="replace";let ft=tt&&We(this,$,tr).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,$,aA).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 B;try{for(;Ae(this,L);){let N=Ae(this,P)[Ae(this,oe)];if(We(this,$,gd).call(this,!0),We(this,$,tr).call(this,N)){if(N.__staleWhileFetching)return N.__staleWhileFetching}else if(N!==void 0)return N}}finally{if(Ae(this,W)&&Ae(this,pe)){let N=Ae(this,pe),ie;for(;ie=N==null?void 0:N.shift();)(B=Ae(this,T))==null||B.call(this,...ie)}}}has(B,N={}){let{updateAgeOnHas:ie=this.updateAgeOnHas,status:me}=N,xe=Ae(this,j).get(B);if(xe!==void 0){let Ce=Ae(this,P)[xe];if(We(this,$,tr).call(this,Ce)&&Ce.__staleWhileFetching===void 0)return!1;if(Ae(this,O).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(B,N={}){let{allowStale:ie=this.allowStale}=N,me=Ae(this,j).get(B);if(me===void 0||!ie&&Ae(this,O).call(this,me))return;let xe=Ae(this,P)[me];return We(this,$,tr).call(this,xe)?xe.__staleWhileFetching:xe}async fetch(B,N={}){let{allowStale:ie=this.allowStale,updateAgeOnGet:me=this.updateAgeOnGet,noDeleteOnStaleGet:xe=this.noDeleteOnStaleGet,ttl:Ce=this.ttl,noDisposeOnSet:we=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}=N;if(!Ae(this,K))return tt&&(tt.fetch="get"),this.get(B,{allowStale:ie,updateAgeOnGet:me,noDeleteOnStaleGet:xe,status:tt});let dt={allowStale:ie,updateAgeOnGet:me,noDeleteOnStaleGet:xe,ttl:Ce,noDisposeOnSet:we,size:Se,sizeCalculation:He,noUpdateTTL:Ke,noDeleteOnFetchRejection:Ve,allowStaleOnFetchRejection:et,allowStaleOnFetchAbort:bt,ignoreFetchAbort:gt,status:tt,signal:ft},At=Ae(this,j).get(B);if(At===void 0){tt&&(tt.fetch="miss");let Zt=We(this,$,md).call(this,B,At,dt,lt);return Zt.__returned=Zt}else{let Zt=Ae(this,P)[At];if(We(this,$,tr).call(this,Zt)){let Ye=ie&&Zt.__staleWhileFetching!==void 0;return tt&&(tt.fetch="inflight",Ye&&(tt.returnedStale=!0)),Ye?Zt.__staleWhileFetching:Zt.__returned=Zt}let Ar=Ae(this,O).call(this,At);if(!yt&&!Ar)return tt&&(tt.fetch="hit"),We(this,$,mc).call(this,At),me&&Ae(this,ae).call(this,At),tt&&Ae(this,ne).call(this,tt,At),Zt;let be=We(this,$,md).call(this,B,At,dt,lt),Ie=be.__staleWhileFetching!==void 0&&ie;return tt&&(tt.fetch=Ar?"stale":"refresh",Ie&&Ar&&(tt.returnedStale=!0)),Ie?be.__staleWhileFetching:be.__returned=be}}async forceFetch(B,N={}){let ie=await this.fetch(B,N);if(ie===void 0)throw new Error("fetch() returned undefined");return ie}memo(B,N={}){let ie=Ae(this,k);if(!ie)throw new Error("no memoMethod provided to constructor");let{context:me,forceRefresh:xe,...Ce}=N,we=this.get(B,Ce);if(!xe&&we!==void 0)return we;let Se=ie(B,we,{options:Ce,context:me});return this.set(B,Se,Ce),Se}get(B,N={}){let{allowStale:ie=this.allowStale,updateAgeOnGet:me=this.updateAgeOnGet,noDeleteOnStaleGet:xe=this.noDeleteOnStaleGet,status:Ce}=N,we=Ae(this,j).get(B);if(we!==void 0){let Se=Ae(this,P)[we],He=We(this,$,tr).call(this,Se);return Ce&&Ae(this,ne).call(this,Ce,we),Ae(this,O).call(this,we)?(Ce&&(Ce.get="stale"),He?(Ce&&ie&&Se.__staleWhileFetching!==void 0&&(Ce.returnedStale=!0),ie?Se.__staleWhileFetching:void 0):(xe||We(this,$,_s).call(this,B,"expire"),Ce&&ie&&(Ce.returnedStale=!0),ie?Se:void 0)):(Ce&&(Ce.get="hit"),He?Se.__staleWhileFetching:(We(this,$,mc).call(this,we),me&&Ae(this,ae).call(this,we),Se))}else Ce&&(Ce.get="miss")}delete(B){return We(this,$,_s).call(this,B,"delete")}clear(){return We(this,$,cA).call(this,"delete")}},A=new WeakMap,I=new WeakMap,R=new WeakMap,T=new WeakMap,z=new WeakMap,k=new WeakMap,L=new WeakMap,U=new WeakMap,j=new WeakMap,H=new WeakMap,P=new WeakMap,te=new WeakMap,ue=new WeakMap,oe=new WeakMap,X=new WeakMap,re=new WeakMap,pe=new WeakMap,le=new WeakMap,J=new WeakMap,G=new WeakMap,Q=new WeakMap,K=new WeakMap,W=new WeakMap,$=new WeakSet,aA=function(){let B=new p(Ae(this,A)),N=new p(Ae(this,A));ht(this,G,B),ht(this,J,N),ht(this,Z,(xe,Ce,we=t.now())=>{if(N[xe]=Ce!==0?we:0,B[xe]=Ce,Ce!==0&&this.ttlAutopurge){let Se=setTimeout(()=>{Ae(this,O).call(this,xe)&&We(this,$,_s).call(this,Ae(this,H)[xe],"expire")},Ce+1);Se.unref&&Se.unref()}}),ht(this,ae,xe=>{N[xe]=B[xe]!==0?t.now():0}),ht(this,ne,(xe,Ce)=>{if(B[Ce]){let we=B[Ce],Se=N[Ce];if(!we||!Se)return;xe.ttl=we,xe.start=Se,xe.now=ie||me();let He=xe.now-Se;xe.remainingTTL=we-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 we=B[Ce],Se=N[Ce];if(!we||!Se)return 1/0;let He=(ie||me())-Se;return we-He},ht(this,O,xe=>{let Ce=N[xe],we=B[xe];return!!we&&!!Ce&&(ie||me())-Ce>we})},ae=new WeakMap,ne=new WeakMap,Z=new WeakMap,O=new WeakMap,VB=function(){let B=new p(Ae(this,A));ht(this,U,0),ht(this,le,B),ht(this,Y,N=>{ht(this,U,Ae(this,U)-B[N]),B[N]=0}),ht(this,ye,(N,ie,me,xe)=>{if(We(this,$,tr).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,N),!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,(N,ie,me)=>{if(B[N]=ie,Ae(this,I)){let xe=Ae(this,I)-B[N];for(;Ae(this,U)>xe;)We(this,$,gd).call(this,!0)}ht(this,U,Ae(this,U)+B[N]),me&&(me.entrySize=ie,me.totalCalculatedSize=Ae(this,U))})},Y=new WeakMap,se=new WeakMap,ye=new WeakMap,Ss=function*({allowStale:B=this.allowStale}={}){if(Ae(this,L))for(let N=Ae(this,X);!(!We(this,$,uA).call(this,N)||((B||!Ae(this,O).call(this,N))&&(yield N),N===Ae(this,oe)));)N=Ae(this,ue)[N]},Is=function*({allowStale:B=this.allowStale}={}){if(Ae(this,L))for(let N=Ae(this,oe);!(!We(this,$,uA).call(this,N)||((B||!Ae(this,O).call(this,N))&&(yield N),N===Ae(this,X)));)N=Ae(this,te)[N]},uA=function(B){return B!==void 0&&Ae(this,j).get(Ae(this,H)[B])===B},gd=function(B){var xe,Ce;let N=Ae(this,oe),ie=Ae(this,H)[N],me=Ae(this,P)[N];return Ae(this,K)&&We(this,$,tr).call(this,me)?me.__abortController.abort(new Error("evicted")):(Ae(this,Q)||Ae(this,W))&&(Ae(this,Q)&&((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,N),B&&(Ae(this,H)[N]=void 0,Ae(this,P)[N]=void 0,Ae(this,re).push(N)),Ae(this,L)===1?(ht(this,oe,ht(this,X,0)),Ae(this,re).length=0):ht(this,oe,Ae(this,te)[N]),Ae(this,j).delete(ie),$h(this,L)._--,N},md=function(B,N,ie,me){let xe=N===void 0?void 0:Ae(this,P)[N];if(We(this,$,tr).call(this,xe))return xe;let Ce=new u,{signal:we}=ie;we==null||we.addEventListener("abort",()=>Ce.abort(we.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&&lt!==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)[N]===gt&&(lt===void 0?dt.__staleWhileFetching?Ae(this,P)[N]=dt.__staleWhileFetching:We(this,$,_s).call(this,B,"fetch"):(ie.status&&(ie.status.fetchUpdated=!0),this.set(B,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)[N]===gt&&(!dt||At.__staleWhileFetching===void 0?We(this,$,_s).call(this,B,"fetch"):tt||(Ae(this,P)[N]=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,z))==null?void 0:ft.call(this,B,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 N===void 0?(this.set(B,bt,{...Se.options,status:void 0}),N=Ae(this,j).get(B)):Ae(this,P)[N]=bt,bt},tr=function(B){if(!Ae(this,K))return!1;let N=B;return!!N&&N instanceof Promise&&N.hasOwnProperty("__staleWhileFetching")&&N.__abortController instanceof u},lA=function(B,N){Ae(this,ue)[N]=B,Ae(this,te)[B]=N},mc=function(B){B!==Ae(this,X)&&(B===Ae(this,oe)?ht(this,oe,Ae(this,te)[B]):We(this,$,lA).call(this,Ae(this,ue)[B],Ae(this,te)[B]),We(this,$,lA).call(this,Ae(this,X),B),ht(this,X,B))},_s=function(B,N){var me,xe,Ce,we;let ie=!1;if(Ae(this,L)!==0){let Se=Ae(this,j).get(B);if(Se!==void 0)if(ie=!0,Ae(this,L)===1)We(this,$,cA).call(this,N);else{Ae(this,Y).call(this,Se);let He=Ae(this,P)[Se];if(We(this,$,tr).call(this,He)?He.__abortController.abort(new Error("deleted")):(Ae(this,Q)||Ae(this,W))&&(Ae(this,Q)&&((me=Ae(this,R))==null||me.call(this,He,B,N)),Ae(this,W)&&((xe=Ae(this,pe))==null||xe.push([He,B,N]))),Ae(this,j).delete(B),Ae(this,H)[Se]=void 0,Ae(this,P)[Se]=void 0,Se===Ae(this,X))ht(this,X,Ae(this,ue)[Se]);else if(Se===Ae(this,oe))ht(this,oe,Ae(this,te)[Se]);else{let Ke=Ae(this,ue)[Se];Ae(this,te)[Ke]=Ae(this,te)[Se];let Ve=Ae(this,te)[Se];Ae(this,ue)[Ve]=Ae(this,ue)[Se]}$h(this,L)._--,Ae(this,re).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();)(we=Ae(this,T))==null||we.call(this,...He)}return ie},cA=function(B){var N,ie,me;for(let xe of We(this,$,Is).call(this,{allowStale:!0})){let Ce=Ae(this,P)[xe];if(We(this,$,tr).call(this,Ce))Ce.__abortController.abort(new Error("deleted"));else{let we=Ae(this,H)[xe];Ae(this,Q)&&((N=Ae(this,R))==null||N.call(this,Ce,we,B)),Ae(this,W)&&((ie=Ae(this,pe))==null||ie.push([Ce,we,B]))}}if(Ae(this,j).clear(),Ae(this,P).fill(void 0),Ae(this,H).fill(void 0),Ae(this,G)&&Ae(this,J)&&(Ae(this,G).fill(0),Ae(this,J).fill(0)),Ae(this,le)&&Ae(this,le).fill(0),ht(this,oe,0),ht(this,X,0),Ae(this,re).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)}},ve);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}),sQ=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}),aQ=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}),uQ=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}),Bv=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!")}}),WB=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}),lQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Bv()),n=WB();function o(c){return c&&c.t?c:{default:c}}var s=class XB extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new XB(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}),cQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(Bv()),n=Ko(),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class ZB 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 ZB(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 m=1;m<h;++m)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}),fQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Bv()),n=WB();function o(c){return c&&c.t?c:{default:c}}var s=class JB extends n.RandomIterator{constructor(h,f,p){super(h,p),this.container=f}copy(){return new JB(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}),hQ=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}),e6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=hQ(),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 m=this.he(y);if(m){let{parentNode:w,grandParent:F,curNode:S}=m;w.ie(),F.ie(),S.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,m=this.v(g.u,l);if(m===0){g.l=c;return}else if(m<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 F=this.v(w.u,l);if(F===0){w.l=c;return}else if(F>0){let S=w.L(),M=this.v(S.u,l);if(M===0){S.l=c;return}else M<0&&(f=new this.re(l,c),S.W===void 0?(S.W=f,f.tt=S):(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}),t6=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}),dQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(e6()),n=s(t6()),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class r6 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 r6(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}),pQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=s(e6()),n=s(t6()),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class n6 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 n6(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}),i6=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"}}),o6=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var t=Ko(),n=s(i6()),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}),yQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o6(),n=Yo(),o=class s6 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 s6(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}),gQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o6(),n=s(i6()),o=Yo();function s(h){return h&&h.t?h:{default:h}}var u=class a6 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 a6(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}),mQ=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(sQ()),n=y(aQ()),o=y(uQ()),s=y(lQ()),u=y(cQ()),l=y(fQ()),c=y(dQ()),h=y(pQ()),f=y(yQ()),p=y(gQ());function y(g){return g&&g.t?g:{default:g}}}),bQ=qe((e,t)=>{Pe(),Le(),ke();var n=mQ().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}),u6=qe((e,t)=>{Pe(),Le(),ke();var n=bQ();t.exports.NumberAllocator=n}),AQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=oQ(),n=u6(),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}),wQ=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=Gp(),o=t(AQ()),s=fl(),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}),vQ=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}),xQ=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(rQ()),o=t(iQ()),s=t(wQ()),u=t(Gp()),l=t(vQ()),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}),l6=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}),EQ=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}),SQ=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((Pa(),Vt(zs))),o=fl(),s=class{};e.TypedEventEmitter=s,(0,o.applyMixin)(s,n.default)}),Kp=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}),IQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().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}),_Q=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().default,o=IQ();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}),CQ=qe((e,t)=>{Pe(),Le(),ke();var n=_Q();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}),FQ=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}),OQ=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(m){g=!0,c=m}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}),TQ=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}),BQ=qe((e,t)=>{Pe(),Le(),ke();var n=TQ();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}),RQ=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}),MQ=qe((e,t)=>{Pe(),Le(),ke();var n=FQ(),o=OQ(),s=BQ(),u=RQ();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}),c6=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(m){return function(w){var F=m(w);return w.add(F),F}},s=function(m){return function(w,F){return m.set(w,F),F}},u=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,l=536870912,c=l*2,h=function(m,w){return function(F){var S=w.get(F),M=S===void 0?F.size:S<c?S+1:0;if(!F.has(M))return m(F,M);if(F.size<l){for(;F.has(M);)M=Math.floor(Math.random()*c);return m(F,M)}if(F.size>u)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;F.has(M);)M=Math.floor(Math.random()*u);return m(F,M)}},f=new WeakMap,p=s(f),y=h(p,f),g=o(y);n.addUniqueNumber=g,n.generateUniqueNumber=y})}),UQ=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(m){return void l(m)}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}),f6=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}),h6=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(m,w){n(h,m,function(F){return this._invoke(m,w,F)})}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}),d6=qe((e,t)=>{Pe(),Le(),ke();var n=h6();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,z=Object.create(T.prototype);return n(z,"_invoke",(function(k,L,U){var j,H,P,te=0,ue=U||[],oe=!1,X={p:0,n:0,v:s,a:re,f:re.bind(s,4),d:function(pe,le){return j=pe,H=0,P=s,X.n=le,p}};function re(pe,le){for(H=pe,P=le,u=0;!oe&&te&&!J&&u<ue.length;u++){var J,G=ue[u],Q=X.p,K=G[2];pe>3?(J=K===le)&&(P=G[(H=G[4])?5:(H=3,3)],G[4]=G[5]=s):G[0]<=Q&&((J=pe<2&&Q<G[1])?(H=0,X.v=le,X.n=G[1]):Q<K&&(J=pe<3||G[0]>le||le>K)&&(G[4]=pe,G[5]=le,X.n=K,H=0))}if(J||pe>1)return p;throw oe=!0,le}return function(pe,le,J){if(te>1)throw TypeError("Generator is already running");for(oe&&le===1&&re(le,J),H=le,P=J;(u=H<2?s:P)||!oe;){j||(H?H<3?(H>1&&(X.n=-1),re(H,P)):X.n=P:X.v=P);try{if(te=2,j){if(H||(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,H<2&&(H=0)}else H===1&&(u=j.return)&&u.call(j),H<2&&(P=TypeError("The iterator does not provide a '"+pe+"' method"),H=1);j=s}else if((u=(oe=X.n<0)?P:k.call(L,X))!==p)break}catch(G){j=s,H=1,P=G}finally{te=1}}return{value:u,done:oe}}})(M,I,R),!0),z}var p={};function y(){}function g(){}function m(){}u=Object.getPrototypeOf;var w=[][c]?u(u([][c]())):(n(u={},c,function(){return this}),u),F=m.prototype=y.prototype=Object.create(w);function S(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,m):(M.__proto__=m,n(M,h,"GeneratorFunction")),M.prototype=Object.create(F),M}return g.prototype=m,n(F,"constructor",m),n(m,"constructor",g),g.displayName="GeneratorFunction",n(m,h,"GeneratorFunction"),n(F),n(F,h,"Generator"),n(F,c,function(){return this}),n(F,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:f,m:S}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),p6=qe((e,t)=>{Pe(),Le(),ke();var n=f6(),o=h6();function s(u,l){function c(f,p,y,g){try{var m=u[f](p),w=m.value;return w instanceof n?l.resolve(w.v).then(function(F){c("next",F,y,g)},function(F){c("throw",F,y,g)}):l.resolve(w).then(function(F){m.value=F,y(m)},function(F){return c("throw",F,y,g)})}catch(F){g(F)}}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(m,w){c(f,y,m,w)})}return h=h?h.then(g,g):g()},!0)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}),y6=qe((e,t)=>{Pe(),Le(),ke();var n=d6(),o=p6();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}),jQ=qe((e,t)=>{Pe(),Le(),ke();var n=y6();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}),NQ=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}),DQ=qe((e,t)=>{Pe(),Le(),ke();var n=Kp().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}),PQ=qe((e,t)=>{Pe(),Le(),ke();var n=f6(),o=d6(),s=jQ(),u=y6(),l=p6(),c=NQ(),h=DQ();function f(){var p=o(),y=p.m(f),g=(Object.getPrototypeOf?Object.getPrototypeOf(y):y.__proto__).constructor;function m(S){var M=typeof S=="function"&&S.constructor;return!!M&&(M===g||(M.displayName||M.name)==="GeneratorFunction")}var w={throw:1,return:2,break:3,continue:3};function F(S){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,z){return M.resultName=T,A(I.d,h(R),z)},finish:function(R){return A(I.f,R)}},A=function(R,T,z){I.p=M.prev,I.n=M.next;try{return R(T,z)}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 S.call(this,M)}finally{I.p=M.prev,I.n=M.next}}}return(t.exports=f=function(){return{wrap:function(S,M,A,I){return p.w(F(S),M,A,I&&I.reverse())},isGeneratorFunction:m,mark:p.m,awrap:function(S,M){return new n(S,M)},AsyncIterator:l,async:function(S,M,A,I,R){return(m(M)?u:s)(F(S),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}),kQ=qe((e,t)=>{Pe(),Le(),ke();var n=PQ()();t.exports=n;try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}),LQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,CQ(),MQ(),c6(),UQ(),kQ()):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(z){return Object.getOwnPropertyDescriptor(A,z).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 z,k,L,U;return c.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return z=new MessageChannel,k=z.port1,L=z.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 z(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()}},z)}));return function(z){return T.apply(this,arguments)}})()},isSupported:function(I){var R=I.call;return function(){return R("isSupported")}}})};function m(A,I){var R=Object.keys(A);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(A);I&&(T=T.filter(function(z){return Object.getOwnPropertyDescriptor(A,z).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?m(Object(R),!0).forEach(function(T){o(A,T,R[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(R)):m(Object(R)).forEach(function(T){Object.defineProperty(A,T,Object.getOwnPropertyDescriptor(R,T))})}return A}var F=new WeakMap,S=function(A){if(F.has(A))return F.get(A);var I=new Map;return F.set(A,I),I},M=function(A){var I=g(A);return function(R){var T=S(R);R.addEventListener("message",function(ue){var oe=ue.data,X=oe.id;if(X!==null&&T.has(X)){var re=T.get(X),pe=re.reject,le=re.resolve;T.delete(X),oe.error===void 0?le(oe.result):pe(new Error(oe.error.message))}}),h(R)&&R.start();for(var z=function(ue){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(re,pe){var le=u.generateUniqueNumber(T);T.set(le,{reject:pe,resolve:re}),oe===null?R.postMessage({id:le,method:ue},X):R.postMessage({id:le,method:ue,params:oe},X)})},k=function(ue,oe){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];R.postMessage({id:null,method:ue,params:oe},X)},L={},U=0,j=Object.entries(I);U<j.length;U++){var H=s(j[U],2),P=H[0],te=H[1];L=w(w({},L),{},o({},P,te({call:z,notify:k})))}return w({},L)}};n.createBroker=M})}),zQ=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,Kp(),LQ(),c6()):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 m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=arguments.length,F=new Array(w>2?w-2:0),S=2;S<w;S++)F[S-2]=arguments[S];var M=Symbol(),A=u.generateUniqueNumber(l);l.set(A,M);var I=function(){return y("set",{delay:m,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,F),l.get(A)===M&&I())})};return I(),A}},setTimeout:function(p){var y=p.call;return function(g){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=arguments.length,F=new Array(w>2?w-2:0),S=2;S<w;S++)F[S-2]=arguments[S];var M=Symbol(),A=u.generateUniqueNumber(c);return c.set(A,M),y("set",{delay:m,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,F))}),A}}}),f=function(p){var y=new Worker(p);return h(y)};n.load=f,n.wrap=h})}),$Q=qe((e,t)=>{Pe(),Le(),ke(),(function(n,o){typeof e=="object"&&typeof t<"u"?o(e,zQ()):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 m=null;return function(){if(m!==null)return m;var w=new Blob([g],{type:"application/javascript; charset=utf-8"}),F=URL.createObjectURL(w);return m=y(F),setTimeout(function(){return URL.revokeObjectURL(F)}),m}},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})}),Yp=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&&(Dt!=null&&Dt.versions)?!Object.prototype.hasOwnProperty.call(Dt.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}),qQ=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(f,p,y,g){g===void 0&&(g=y);var m=Object.getOwnPropertyDescriptor(p,y);(!m||("get"in m?!p.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return p[y]}}),Object.defineProperty(f,g,m)}: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 m in y)Object.prototype.hasOwnProperty.call(y,m)&&(g[g.length]=m);return g},f(p)};return function(p){if(p&&p.__esModule)return p;var y={};if(p!=null)for(var g=f(p),m=0;m<g.length;m++)g[m]!=="default"&&t(y,p,g[m]);return n(y,p),y}})();Object.defineProperty(e,"__esModule",{value:!0});var s=$Q(),u=o(Yp()),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}),g6=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(qQ()),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}),fA=qe(e=>{var T;Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(z,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(z,U,j)}:function(z,k,L,U){U===void 0&&(U=L),z[U]=k[L]}),n=e&&e.__setModuleDefault||(Object.create?function(z,k){Object.defineProperty(z,"default",{enumerable:!0,value:k})}:function(z,k){z.default=k}),o=e&&e.__importStar||(function(){var z=function(k){return z=Object.getOwnPropertyNames||function(L){var U=[];for(var j in L)Object.prototype.hasOwnProperty.call(L,j)&&(U[U.length]=j);return U},z(k)};return function(k){if(k&&k.__esModule)return k;var L={};if(k!=null)for(var U=z(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(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(e,"__esModule",{value:!0});var u=s(ZH()),l=La(),c=s(eQ()),h=s($o()),f=o(tQ()),p=s(GB()),y=s(xQ()),g=s(l6()),m=s(EQ()),w=fl(),F=SQ(),S=s(g6()),M=o(Yp()),A=globalThis.setImmediate||((...z)=>{let k=z.shift();(0,w.nextTick)(()=>{k(...z)})}),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 F.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 m.default(U.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:j}=this,H=()=>{let P=j.shift();this.log("deliver :: entry %o",P);let te=null;if(!P){this._resubscribe();return}te=P.packet,this.log("deliver :: call _sendPacket for %o",te);let ue=!0;te.messageId&&te.messageId!==0&&(this.messageIdProvider.register(te.messageId)||(ue=!1)),ue?this._sendPacket(te,oe=>{P.cb&&P.cb(oe),H()}):(this.log("messageId: %d has already used. The message is skipped and removed.",te.messageId),H())};this.log("connect :: sending queued packets"),H()}),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,H=[];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",re=>{this.log("parser :: on packet push to packets array."),H.push(re)});let P=()=>{this.log("work :: getting next packet in queue");let re=H.shift();if(re)this.log("work :: packet pulled from queue"),(0,y.default)(this,re,te);else{this.log("work :: no packets in queue");let pe=j;j=null,this.log("work :: done flag is %s",!!pe),pe&&pe()}},te=()=>{if(H.length)(0,w.nextTick)(P);else{let re=j;j=null,re()}};L._write=(re,pe,le)=>{j=le,this.log("writable stream :: parsing buffer"),U.parse(re),P()};let ue=re=>{this.log("streamErrorHandler :: error",re.message),re.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",re)):this.noop(re)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(L),this.stream.on("error",ue),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 re={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(re)}}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,H){this.log("publish :: message `%s` to topic `%s`",U,L);let{options:P}=this;typeof j=="function"&&(H=j,j=null),j=j||{},j={qos:0,retain:!1,dup:!1,...j};let{qos:te,retain:ue,dup:oe,properties:X,cbStorePut:re}=j;if(this._checkDisconnecting(H))return this;let pe=()=>{let le=0;if((te===1||te===2)&&(le=this._nextId(),le===null))return this.log("No messageId left"),!1;let J={cmd:"publish",topic:L,payload:U,qos:te,retain:ue,messageId:le,dup:oe};switch(P.protocolVersion===5&&(J.properties=X),this.log("publish :: qos",te),te){case 1:case 2:this.outgoing[J.messageId]={volatile:!1,cb:H||this.noop},this.log("MqttClient:publish: packet cmd: %s",J.cmd),this._sendPacket(J,void 0,re);break;default:this.log("MqttClient:publish: packet cmd: %s",J.cmd),this._sendPacket(J,H,re);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!pe())&&this._storeProcessingQueue.push({invoke:pe,cbStorePut:j.cbStorePut,callback:H}),this}publishAsync(L,U,j){return new Promise((H,P)=>{this.publish(L,U,j,(te,ue)=>{te?P(te):H(ue)})})}subscribe(L,U,j){let H=this.options.protocolVersion;typeof U=="function"&&(j=U),j=j||this.noop;let P=!1,te=[];typeof L=="string"?(L=[L],te=L):Array.isArray(L)?te=L:typeof L=="object"&&(P=L.resubscribe,delete L.resubscribe,te=Object.keys(L));let ue=f.validateTopics(te);if(ue!==null)return A(j,new Error(`Invalid topic ${ue}`)),this;if(this._checkDisconnecting(j))return this.log("subscribe: discconecting true"),this;let oe={qos:0};H===5&&(oe.nl=!1,oe.rap=!1,oe.rh=0),U={...oe,...U};let{properties:X}=U,re=[],pe=(G,Q)=>{if(Q=Q||U,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,G)||this._resubscribeTopics[G].qos<Q.qos||P){let K={topic:G,qos:Q.qos};H===5&&(K.nl=Q.nl,K.rap=Q.rap,K.rh=Q.rh,K.properties=X),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",K.topic,K.qos),re.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])}),!re.length)return j(null,[]),this;let le=(G,Q)=>{let K={cmd:"subscribe",subscriptions:G,messageId:Q};if(X&&(K.properties=X),this.options.resubscribe){this.log("subscribe :: resubscribe true");let $=[];G.forEach(fe=>{if(this.options.reconnectPeriod>0){let ae={qos:fe.qos};H===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,$.push(fe.topic)}}),this.messageIdToTopic[K.messageId]=$}let W=new Promise(($,fe)=>{this.outgoing[K.messageId]={volatile:!0,cb(ae,ne){if(!ae){let{granted:Z}=ne;for(let O=0;O<Z.length;O+=1)G[O].qos=Z[O]}ae?fe(new w.ErrorWithSubackPacket(ae.message,ne)):$(ne)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(K),W},J=()=>{let G=this.options.subscribeBatchSize??re.length,Q=[];for(let K=0;K<re.length;K+=G){let W=re.slice(K,K+G),$=this._nextId();if($===null)return this.log("No messageId left"),!1;Q.push(le(W,$))}return Promise.all(Q).then(K=>{j(null,re,K.at(-1))}).catch(K=>{j(K,re,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,H)=>{this.subscribe(L,U,(P,te)=>{P?H(P):j(te)})})}unsubscribe(L,U,j){typeof L=="string"&&(L=[L]),typeof U=="function"&&(j=U),j=j||this.noop;let H=f.validateTopics(L);if(H!==null)return A(j,new Error(`Invalid topic ${H}`)),this;if(this._checkDisconnecting(j))return this;let P=()=>{let te=this._nextId();if(te===null)return this.log("No messageId left"),!1;let ue={cmd:"unsubscribe",messageId:te,unsubscriptions:[]};return typeof L=="string"?ue.unsubscriptions=[L]:Array.isArray(L)&&(ue.unsubscriptions=L),this.options.resubscribe&&ue.unsubscriptions.forEach(oe=>{delete this._resubscribeTopics[oe]}),typeof U=="object"&&U.properties&&(ue.properties=U.properties),this.outgoing[ue.messageId]={volatile:!0,cb:j},this.log("unsubscribe: call _sendPacket"),this._sendPacket(ue),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!P())&&this._storeProcessingQueue.push({invoke:P,callback:j}),this}unsubscribeAsync(L,U){return new Promise((j,H)=>{this.unsubscribe(L,U,(P,te)=>{P?H(P):j(te)})})}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 H=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(te=>{this.outgoingStore.close(ue=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),j){let oe=te||ue;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)(H)},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,H)=>{this.end(L,U,P=>{P?H(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 H={cmd:"disconnect",...j};this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(H,()=>{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 H=L,P;if(H.cmd==="publish"&&(H=(0,c.default)(L),P=this._removeTopicAliasAndRecoverTopicName(H),P))return U&&U(P);this.outgoingStore.put(H,te=>{if(te)return U&&U(te);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,H){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(H){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 H=L;if(H.cmd==="publish"){H=(0,c.default)(L);let te=this._removeTopicAliasAndRecoverTopicName(H);if(te)return U&&U(te)}let P=H.qos||0;P===0&&this.queueQoSZero||H.cmd!=="publish"?this.queue.push({packet:H,cb:U}):P>0?(U=this.outgoing[H.messageId]?this.outgoing[H.messageId].cb:null,this.outgoingStore.put(H,te=>{if(te)return U&&U(te);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 S.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(),H=()=>{j.destroy(),j=null,this._flushStoreProcessingQueue(),P()},P=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",H),j.on("error",ue=>{P(),this._flushStoreProcessingQueue(),this.removeListener("close",H),this.emit("error",ue)});let te=()=>{if(!j)return;let ue=j.read(1),oe;if(!ue){j.once("readable",te);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[ue.messageId]){te();return}!this.disconnecting&&!this.reconnectTimer?(oe=this.outgoing[ue.messageId]?this.outgoing[ue.messageId].cb:null,this.outgoing[ue.messageId]={volatile:!1,cb(X,re){oe&&oe(X,re),te()}},this._packetIdsDuringStoreProcessing[ue.messageId]=!0,this.messageIdProvider.register(ue.messageId)?this._sendPacket(ue,void 0,void 0,!0):this.log("messageId: %d has already used.",ue.messageId)):j.destroy&&j.destroy()};j.on("end",()=>{let ue=!0;for(let oe in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[oe]){ue=!1;break}this.removeListener("close",H),ue?(P(),this._invokeAllStoreProcessingQueue(),this.emit("connect",L)):U()}),te()};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,H)=>{U(j,H),this.messageIdProvider.deallocate(L),this._invokeStoreProcessingQueue()})}},rt(T,"VERSION",w.MQTTJS_VERSION),T);e.default=R}),HQ=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=u6(),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 QQ(){if(hA)return bd;hA=!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"},m=t-n,w=Math.floor,F=String.fromCharCode;function S(j){throw new RangeError(g[j])}function M(j,H){let P=[],te=j.length;for(;te--;)P[te]=H(j[te]);return P}function A(j,H){let P=j.split("@"),te="";P.length>1&&(te=P[0]+"@",j=P[1]),j=j.replace(y,".");let ue=j.split("."),oe=M(ue,H).join(".");return te+oe}function I(j){let H=[],P=0,te=j.length;for(;P<te;){let ue=j.charCodeAt(P++);if(ue>=55296&&ue<=56319&&P<te){let oe=j.charCodeAt(P++);(oe&64512)==56320?H.push(((ue&1023)<<10)+(oe&1023)+65536):(H.push(ue),P--)}else H.push(ue)}return H}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},z=function(j,H){return j+22+75*(j<26)-((H!=0)<<5)},k=function(j,H,P){let te=0;for(j=P?w(j/u):j>>1,j+=w(j/H);j>m*o>>1;te+=t)j=w(j/m);return w(te+(m+1)*j/(j+s))},L=function(j){let H=[],P=j.length,te=0,ue=c,oe=l,X=j.lastIndexOf(h);X<0&&(X=0);for(let re=0;re<X;++re)j.charCodeAt(re)>=128&&S("not-basic"),H.push(j.charCodeAt(re));for(let re=X>0?X+1:0;re<P;){let pe=te;for(let J=1,G=t;;G+=t){re>=P&&S("invalid-input");let Q=T(j.charCodeAt(re++));Q>=t&&S("invalid-input"),Q>w((e-te)/J)&&S("overflow"),te+=Q*J;let K=G<=oe?n:G>=oe+o?o:G-oe;if(Q<K)break;let W=t-K;J>w(e/W)&&S("overflow"),J*=W}let le=H.length+1;oe=k(te-pe,le,pe==0),w(te/le)>e-ue&&S("overflow"),ue+=w(te/le),te%=le,H.splice(te++,0,ue)}return String.fromCodePoint(...H)},U=function(j){let H=[];j=I(j);let P=j.length,te=c,ue=0,oe=l;for(let pe of j)pe<128&&H.push(F(pe));let X=H.length,re=X;for(X&&H.push(h);re<P;){let pe=e;for(let J of j)J>=te&&J<pe&&(pe=J);let le=re+1;pe-te>w((e-ue)/le)&&S("overflow"),ue+=(pe-te)*le,te=pe;for(let J of j)if(J<te&&++ue>e&&S("overflow"),J===te){let G=ue;for(let Q=t;;Q+=t){let K=Q<=oe?n:Q>=oe+o?o:Q-oe;if(G<K)break;let W=G-K,$=t-K;H.push(F(z(K+W%$,0))),G=w(W/$)}H.push(F(z(G,0))),oe=k(ue,le,re===X),ue=0,++re}++ue,++te}return H.join("")};return bd={version:"2.3.1",ucs2:{decode:I,encode:R},decode:L,encode:U,toASCII:function(j){return A(j,function(H){return p.test(H)?"xn--"+U(H):H})},toUnicode:function(j){return A(j,function(H){return f.test(H)?L(H.slice(4).toLowerCase()):H})}},bd}var bd,hA,Cs,GQ=Ln(()=>{Pe(),Le(),ke(),bd={},hA=!1,Cs=QQ(),Cs.decode,Cs.encode,Cs.toASCII,Cs.toUnicode,Cs.ucs2,Cs.version});function KQ(){return pA||(pA=!0,dA=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}),dA}function YQ(){return gA||(gA=!0,yA=Error),yA}function VQ(){return bA||(bA=!0,mA=EvalError),mA}function WQ(){return wA||(wA=!0,AA=RangeError),AA}function XQ(){return xA||(xA=!0,vA=ReferenceError),vA}function m6(){return SA||(SA=!0,EA=SyntaxError),EA}function Of(){return _A||(_A=!0,IA=TypeError),IA}function ZQ(){return FA||(FA=!0,CA=URIError),CA}function JQ(){if(OA)return Ad;OA=!0;var e=typeof Symbol<"u"&&Symbol,t=KQ();return Ad=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Ad}function eG(){if(TA)return wd;TA=!0;var e={__proto__:null,foo:{}},t=Object;return wd=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},wd}function tG(){if(BA)return vd;BA=!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 vd=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 S=h.apply(this,s(f,arguments));return Object(S)===S?S:this}return h.apply(c,s(f,arguments))},g=n(0,h.length-f.length),m=[],w=0;w<g;w++)m[w]="$"+w;if(p=Function("binder","return function ("+l(m,",")+"){ return binder.apply(this,arguments); }")(y),h.prototype){var F=function(){};F.prototype=h.prototype,p.prototype=new F,F.prototype=null}return p},vd}function Rv(){if(RA)return xd;RA=!0;var e=tG();return xd=Function.prototype.bind||e,xd}function rG(){if(MA)return Ed;MA=!0;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Rv();return Ed=n.call(e,t),Ed}function hl(){if(UA)return Sd;UA=!0;var e,t=YQ(),n=VQ(),o=WQ(),s=XQ(),u=m6(),l=Of(),c=ZQ(),h=Function,f=function(re){try{return h('"use strict"; return ('+re+").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,m=JQ()(),w=eG()(),F=Object.getPrototypeOf||(w?function(re){return re.__proto__}:null),S={},M=typeof Uint8Array>"u"||!F?e:F(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":m&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":S,"%AsyncGenerator%":S,"%AsyncGeneratorFunction%":S,"%AsyncIteratorPrototype%":S,"%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%":S,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m||!F?e:F(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"||!m||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&F?F(""[Symbol.iterator]()):e,"%Symbol%":m?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(F)try{null.error}catch(re){var I=F(F(re));A["%Error.prototype%"]=I}var R=function re(pe){var le;if(pe==="%AsyncFunction%")le=f("async function () {}");else if(pe==="%GeneratorFunction%")le=f("function* () {}");else if(pe==="%AsyncGeneratorFunction%")le=f("async function* () {}");else if(pe==="%AsyncGenerator%"){var J=re("%AsyncGeneratorFunction%");J&&(le=J.prototype)}else if(pe==="%AsyncIteratorPrototype%"){var G=re("%AsyncGenerator%");G&&F&&(le=F(G.prototype))}return A[pe]=le,le},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"]},z=Rv(),k=rG(),L=z.call(Function.call,Array.prototype.concat),U=z.call(Function.apply,Array.prototype.splice),j=z.call(Function.call,String.prototype.replace),H=z.call(Function.call,String.prototype.slice),P=z.call(Function.call,RegExp.prototype.exec),te=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ue=/\\(\\)?/g,oe=function(re){var pe=H(re,0,1),le=H(re,-1);if(pe==="%"&&le!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(le==="%"&&pe!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var J=[];return j(re,te,function(G,Q,K,W){J[J.length]=K?j(W,ue,"$1"):Q||G}),J},X=function(re,pe){var le=re,J;if(k(T,le)&&(J=T[le],le="%"+J[0]+"%"),k(A,le)){var G=A[le];if(G===S&&(G=R(le)),typeof G>"u"&&!pe)throw new l("intrinsic "+re+" exists, but is not available. Please file an issue!");return{alias:J,name:le,value:G}}throw new u("intrinsic "+re+" does not exist!")};return Sd=function(re,pe){if(typeof re!="string"||re.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(/^%?[^%]*%?$/,re)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var le=oe(re),J=le.length>0?le[0]:"",G=X("%"+J+"%",pe),Q=G.name,K=G.value,W=!1,$=G.alias;$&&(J=$[0],U(le,L([0,1],$)));for(var fe=1,ae=!0;fe<le.length;fe+=1){var ne=le[fe],Z=H(ne,0,1),O=H(ne,-1);if((Z==='"'||Z==="'"||Z==="`"||O==='"'||O==="'"||O==="`")&&Z!==O)throw new u("property names with quotes must have matching quotes");if((ne==="constructor"||!ae)&&(W=!0),J+="."+ne,Q="%"+J+"%",k(A,Q))K=A[Q];else if(K!=null){if(!(ne in K)){if(!pe)throw new l("base intrinsic for "+re+" exists, but the property is not available.");return}if(p&&fe+1>=le.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[Q]=K)}}return K},Sd}function Mv(){if(jA)return Id;jA=!0;var e=hl(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Id=t,Id}function b6(){if(NA)return _d;NA=!0;var e=hl(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return _d=t,_d}function nG(){if(DA)return Cd;DA=!0;var e=Mv(),t=m6(),n=Of(),o=b6();return Cd=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.")},Cd}function iG(){if(PA)return Fd;PA=!0;var e=Mv(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Fd=t,Fd}function oG(){if(kA)return Od;kA=!0;var e=hl(),t=nG(),n=iG()(),o=b6(),s=Of(),u=e("%Math.floor%");return Od=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},Od}function sG(){if(LA)return Su;LA=!0;var e=Rv(),t=hl(),n=oG(),o=Of(),s=t("%Function.prototype.apply%"),u=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(u,s),c=Mv(),h=t("%Math.max%");Su=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(Su,"apply",{value:f}):Su.apply=f,Su}function aG(){if(zA)return Td;zA=!0;var e=hl(),t=sG(),n=t(e("String.prototype.indexOf"));return Td=function(o,s){var u=e(o,!!s);return typeof u=="function"&&n(o,".prototype.")>-1?t(u):u},Td}var dA,pA,yA,gA,mA,bA,AA,wA,vA,xA,EA,SA,IA,_A,CA,FA,Ad,OA,wd,TA,vd,BA,xd,RA,Ed,MA,Sd,UA,Id,jA,_d,NA,Cd,DA,Fd,PA,Od,kA,Su,LA,Td,zA,uG=Ln(()=>{Pe(),Le(),ke(),dA={},pA=!1,yA={},gA=!1,mA={},bA=!1,AA={},wA=!1,vA={},xA=!1,EA={},SA=!1,IA={},_A=!1,CA={},FA=!1,Ad={},OA=!1,wd={},TA=!1,vd={},BA=!1,xd={},RA=!1,Ed={},MA=!1,Sd={},UA=!1,Id={},jA=!1,_d={},NA=!1,Cd={},DA=!1,Fd={},PA=!1,Od={},kA=!1,Su={},LA=!1,Td={},zA=!1});function Uv(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function lG(){!Aa||!ya||(Aa=!1,ya.length?Yi=ya.concat(Yi):wc=-1,Yi.length&&A6())}function A6(){if(!Aa){var e=setTimeout(lG,0);Aa=!0;for(var t=Yi.length;t;){for(ya=Yi,Yi=[];++wc<t;)ya&&ya[wc].run();wc=-1,t=Yi.length}ya=null,Aa=!1,clearTimeout(e)}}function cG(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];Yi.push(new w6(e,t)),Yi.length===1&&!Aa&&setTimeout(A6,0)}function w6(e,t){this.fun=e,this.array=t}function fn(){}function fG(e){Uv("_linkedBinding")}function hG(e){Uv("dlopen")}function dG(){return[]}function pG(){return[]}function yG(e,t){if(!e)throw new Error(t||"assertion error")}function gG(){return!1}function mG(){return Ro.now()/1e3}function db(e){var t=Math.floor((Date.now()-Ro.now())*.001),n=Ro.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+=Bd)),[o,s]}function vs(){return jv}function bG(e){return[]}var Yi,Aa,ya,wc,UC,jC,NC,DC,PC,kC,LC,zC,$C,qC,HC,QC,GC,KC,YC,VC,WC,XC,ZC,JC,eF,nd,tF,rF,nF,iF,oF,sF,aF,uF,lF,cF,fF,hF,dF,pF,yF,gF,mF,bF,AF,wF,vF,xF,EF,SF,IF,Ro,pb,Bd,_F,CF,FF,OF,TF,BF,RF,MF,UF,jF,NF,jv,v6=Ln(()=>{Pe(),Le(),ke(),Yi=[],Aa=!1,wc=-1,w6.prototype.run=function(){this.fun.apply(null,this.array)},UC="browser",jC="x64",NC="browser",DC={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},PC=["/usr/bin/node"],kC=[],LC="v16.8.0",zC={},$C=function(e,t){console.warn((t?t+": ":"")+e)},qC=function(e){Uv("binding")},HC=function(e){return 0},QC=function(){return"/"},GC=function(e){},KC={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},YC=fn,VC=[],WC={},XC=!1,ZC={},JC=fn,eF=fn,nd=function(){return{}},tF=nd,rF=nd,nF=fn,iF=fn,oF=fn,sF={},aF={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},uF=fn,lF=fn,cF=fn,fF=fn,hF=fn,dF=fn,pF=fn,yF=void 0,gF=void 0,mF=void 0,bF=fn,AF=2,wF=1,vF="/bin/usr/node",xF=9229,EF="node",SF=[],IF=fn,Ro={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Ro.now===void 0&&(pb=Date.now(),Ro.timing&&Ro.timing.navigationStart&&(pb=Ro.timing.navigationStart),Ro.now=()=>Date.now()-pb),Bd=1e9,db.bigint=function(e){var t=db(e);return typeof BigInt>"u"?t[0]*Bd+t[1]:BigInt(t[0]*Bd)+BigInt(t[1])},_F=10,CF={},FF=0,OF=vs,TF=vs,BF=vs,RF=vs,MF=vs,UF=fn,jF=vs,NF=vs,jv={version:LC,versions:zC,arch:jC,platform:NC,release:KC,_rawDebug:YC,moduleLoadList:VC,binding:qC,_linkedBinding:fG,_events:CF,_eventsCount:FF,_maxListeners:_F,on:vs,addListener:OF,once:TF,off:BF,removeListener:RF,removeAllListeners:MF,emit:UF,prependListener:jF,prependOnceListener:NF,listeners:bG,domain:WC,_exiting:XC,config:ZC,dlopen:hG,uptime:mG,_getActiveRequests:dG,_getActiveHandles:pG,reallyExit:JC,_kill:eF,cpuUsage:nd,resourceUsage:tF,memoryUsage:rF,kill:nF,exit:iF,openStdin:oF,allowedNodeEnvironmentFlags:sF,assert:yG,features:aF,_fatalExceptions:uF,setUncaughtExceptionCaptureCallback:lF,hasUncaughtExceptionCaptureCallback:gG,emitWarning:$C,nextTick:cG,_tickCallback:cF,_debugProcess:fF,_debugEnd:hF,_startProfilerIdleNotifier:dF,_stopProfilerIdleNotifier:pF,stdout:yF,stdin:mF,stderr:gF,abort:bF,umask:HC,chdir:GC,cwd:QC,env:DC,title:UC,argv:PC,execArgv:kC,pid:AF,ppid:wF,execPath:vF,debugPort:xF,hrtime:db,argv0:EF,_preload_modules:SF,setSourceMapsEnabled:IF}});function AG(){if($A)return Rd;$A=!0;var e=jv;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 m=c.lastIndexOf("/");if(m!==c.length-1){m===-1?(c="",h=0):(c=c.slice(0,m),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,m=f<g?f:g,w=-1,F=0;F<=m;++F){if(F===m){if(g>m){if(l.charCodeAt(p+F)===47)return l.slice(p+F+1);if(F===0)return l.slice(p+F)}else f>m&&(u.charCodeAt(c+F)===47?w=F:F===0&&(w=0));break}var S=u.charCodeAt(c+F),M=l.charCodeAt(p+F);if(S!==M)break;S===47&&(w=F)}var A="";for(F=c+w+1;F<=h;++F)(F===h||u.charCodeAt(F)===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 m=u.charCodeAt(p);if(m===47){if(!f){c=p+1;break}}else g===-1&&(f=!1,g=p+1),y>=0&&(m===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,m=!0,w=u.length-1,F=0;w>=f;--w){if(c=u.charCodeAt(w),c===47){if(!m){y=w+1;break}continue}g===-1&&(m=!1,g=w+1),c===46?p===-1?p=w:F!==1&&(F=1):p!==-1&&(F=-1)}return p===-1||g===-1||F===0||F===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,Rd=s,Rd}var Rd,$A,qA,wG=Ln(()=>{Pe(),Le(),ke(),v6(),Rd={},$A=!1,qA=AG()}),x6={};ll(x6,{URL:()=>R6,Url:()=>C6,default:()=>hn,fileURLToPath:()=>S6,format:()=>F6,parse:()=>B6,pathToFileURL:()=>I6,resolve:()=>O6,resolveObject:()=>T6});function vG(){if(HA)return Md;HA=!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,m=g?WeakRef.prototype.deref:null,w=Boolean.prototype.valueOf,F=Object.prototype.toString,S=Function.prototype.toString,M=String.prototype.match,A=String.prototype.slice,I=String.prototype.replace,R=String.prototype.toUpperCase,T=String.prototype.toLowerCase,z=RegExp.prototype.test,k=Array.prototype.concat,L=Array.prototype.join,U=Array.prototype.slice,j=Math.floor,H=typeof BigInt=="function"?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ue=typeof Symbol=="function"&&typeof Symbol.iterator=="object",oe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ue||!0)?Symbol.toStringTag:null,X=Object.prototype.propertyIsEnumerable,re=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(we){return we.__proto__}:null);function pe(we,Se){if(we===1/0||we===-1/0||we!==we||we&&we>-1e3&&we<1e3||z.call(/e/,Se))return Se;var He=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof we=="number"){var Ke=we<0?-j(-we):j(we);if(Ke!==we){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 le=_6,J=le.custom,G=q(J)?J:null;Md=function we(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"&&gt!=="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(Ur,gn,xn){if(gn&&(Ve=U.call(Ve),Ve.push(gn)),xn){var kr={depth:et.depth};return ye(et,"quoteStyle")&&(kr.quoteStyle=et.quoteStyle),we(Ur,kr,Ke+1,Ve)}return we(Ur,et,Ke+1,Ve)}if(typeof Se=="function"&&!fe(Se)){var At=_(Se),Zt=Ce(Se,dt);return"[Function"+(At?": "+At:" (anonymous)")+"]"+(Zt.length>0?" { "+L.call(Zt,", ")+" }":"")}if(q(Se)){var Ar=ue?I.call(String(Se),/^(Symbol\(.*\))_[^)]*$/,"$1"):te.call(Se);return typeof Se=="object"&&!ue?x(Ar):Ar}if(Be(Se)){for(var be="<"+T.call(String(Se.nodeName)),Ie=Se.attributes||[],Ye=0;Ye<Ie.length;Ye++)be+=" "+Ie[Ye].name+"="+Q(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 st=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),st),", ")+" }":st.length===0?"["+String(Se)+"]":"{ ["+String(Se)+"] "+L.call(st,", ")+" }"}if(typeof Se=="object"&&gt){if(G&&typeof Se[G]=="function"&&le)return le(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(Ur,gn){qt.push(dt(gn,Se,!0)+" => "+dt(Ur,Se))}),N("Map",n.call(Se),qt,ft)}if(ce(Se)){var rr=[];return c&&c.call(Se,function(Ur){rr.push(dt(Ur,Se))}),N("Set",l.call(Se),rr,ft)}if(D(Se))return B("WeakMap");if(Ee(Se))return B("WeakSet");if(he(Se))return B("WeakRef");if(Z(Se))return x(dt(Number(Se)));if(Y(Se))return x(dt(H.call(Se)));if(O(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 Ud<"u"&&Se===Ud)return"{ [object globalThis] }";if(!$(Se)&&!fe(Se)){var Br=Ce(Se,dt),zn=re?re(Se)===Object.prototype:Se instanceof Object||Se.constructor===Object,Rr=Se instanceof Object?"":"null prototype",Ht=!zn&&oe&&Object(Se)===Se&&oe in Se?A.call(ee(Se),8,-1):Rr?"Object":"",nr=zn||typeof Se.constructor!="function"?"":Se.constructor.name?Se.constructor.name+" ":"",Mr=nr+(Ht||Rr?"["+L.call(k.call([],Ht||[],Rr||[]),": ")+"] ":"");return Br.length===0?Mr+"{}":ft?Mr+"{"+xe(Br,ft)+"}":Mr+"{ "+L.call(Br,", ")+" }"}return String(Se)};function Q(we,Se,He){var Ke=(He.quoteStyle||Se)==="double"?'"':"'";return Ke+we+Ke}function K(we){return I.call(String(we),/"/g,"&quot;")}function W(we){return ee(we)==="[object Array]"&&(!oe||!(typeof we=="object"&&oe in we))}function $(we){return ee(we)==="[object Date]"&&(!oe||!(typeof we=="object"&&oe in we))}function fe(we){return ee(we)==="[object RegExp]"&&(!oe||!(typeof we=="object"&&oe in we))}function ae(we){return ee(we)==="[object Error]"&&(!oe||!(typeof we=="object"&&oe in we))}function ne(we){return ee(we)==="[object String]"&&(!oe||!(typeof we=="object"&&oe in we))}function Z(we){return ee(we)==="[object Number]"&&(!oe||!(typeof we=="object"&&oe in we))}function O(we){return ee(we)==="[object Boolean]"&&(!oe||!(typeof we=="object"&&oe in we))}function q(we){if(ue)return we&&typeof we=="object"&&we instanceof Symbol;if(typeof we=="symbol")return!0;if(!we||typeof we!="object"||!te)return!1;try{return te.call(we),!0}catch{}return!1}function Y(we){if(!we||typeof we!="object"||!H)return!1;try{return H.call(we),!0}catch{}return!1}var se=Object.prototype.hasOwnProperty||function(we){return we in(this||Ud)};function ye(we,Se){return se.call(we,Se)}function ee(we){return F.call(we)}function _(we){if(we.name)return we.name;var Se=M.call(S.call(we),/^function\s*([\w$]+)/);return Se?Se[1]:null}function v(we,Se){if(we.indexOf)return we.indexOf(Se);for(var He=0,Ke=we.length;He<Ke;He++)if(we[He]===Se)return He;return-1}function C(we){if(!n||!we||typeof we!="object")return!1;try{n.call(we);try{l.call(we)}catch{return!0}return we instanceof Map}catch{}return!1}function D(we){if(!f||!we||typeof we!="object")return!1;try{f.call(we,f);try{y.call(we,y)}catch{return!0}return we instanceof WeakMap}catch{}return!1}function he(we){if(!m||!we||typeof we!="object")return!1;try{return m.call(we),!0}catch{}return!1}function ce(we){if(!l||!we||typeof we!="object")return!1;try{l.call(we);try{n.call(we)}catch{return!0}return we instanceof Set}catch{}return!1}function Ee(we){if(!y||!we||typeof we!="object")return!1;try{y.call(we,y);try{f.call(we,f)}catch{return!0}return we instanceof WeakSet}catch{}return!1}function Be(we){return!we||typeof we!="object"?!1:typeof HTMLElement<"u"&&we instanceof HTMLElement?!0:typeof we.nodeName=="string"&&typeof we.getAttribute=="function"}function de(we,Se){if(we.length>Se.maxStringLength){var He=we.length-Se.maxStringLength,Ke="... "+He+" more character"+(He>1?"s":"");return de(A.call(we,0,Se.maxStringLength),Se)+Ke}var Ve=I.call(I.call(we,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ve);return Q(Ve,"single",Se)}function ve(we){var Se=we.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(we){return"Object("+we+")"}function B(we){return we+" { ? }"}function N(we,Se,He,Ke){var Ve=Ke?xe(He,Ke):L.call(He,", ");return we+" ("+Se+") {"+Ve+"}"}function ie(we){for(var Se=0;Se<we.length;Se++)if(v(we[Se],`
145
- `)>=0)return!1;return!0}function me(we,Se){var He;if(we.indent===" ")He=" ";else if(typeof we.indent=="number"&&we.indent>0)He=L.call(Array(we.indent+1)," ");else return null;return{base:He,prev:L.call(Array(Se+1),He)}}function xe(we,Se){if(we.length===0)return"";var He=`
146
- `+Se.prev+Se.base;return He+L.call(we,","+He)+`
147
- `+Se.prev}function Ce(we,Se){var He=W(we),Ke=[];if(He){Ke.length=we.length;for(var Ve=0;Ve<we.length;Ve++)Ke[Ve]=ye(we,Ve)?Se(we[Ve],we):""}var et=typeof P=="function"?P(we):[],gt;if(ue){gt={};for(var bt=0;bt<et.length;bt++)gt["$"+et[bt]]=et[bt]}for(var lt in we)ye(we,lt)&&(He&&String(Number(lt))===lt&&lt<we.length||ue&&gt["$"+lt]instanceof Symbol||(z.call(/[^\w$]/,lt)?Ke.push(Se(lt,we)+": "+Se(we[lt],we)):Ke.push(lt+": "+Se(we[lt],we))));if(typeof P=="function")for(var yt=0;yt<et.length;yt++)X.call(we,et[yt])&&Ke.push("["+Se(et[yt])+"]: "+Se(we[et[yt]],we));return Ke}return Md}function xG(){if(QA)return jd;QA=!0;var e=hl(),t=aG(),n=vG(),o=Of(),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(S,M){for(var A=S,I;(I=A.next)!==null;A=I)if(I.key===M)return A.next=I.next,I.next=S.next,S.next=I,I},m=function(S,M){var A=g(S,M);return A&&A.value},w=function(S,M,A){var I=g(S,M);I?I.value=A:S.next={key:M,next:S.next,value:A}},F=function(S,M){return!!g(S,M)};return jd=function(){var S,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(S)return l(S,R)}else if(u){if(M)return f(M,R)}else if(A)return m(A,R)},has:function(R){if(s&&R&&(typeof R=="object"||typeof R=="function")){if(S)return h(S,R)}else if(u){if(M)return y(M,R)}else if(A)return F(A,R);return!1},set:function(R,T){s&&R&&(typeof R=="object"||typeof R=="function")?(S||(S=new s),c(S,R,T)):u?(M||(M=new u),p(M,R,T)):(A||(A={key:{},next:null}),w(A,R,T))}};return I},jd}function Nv(){if(GA)return Nd;GA=!0;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Nd={default:n.RFC3986,formatters:{RFC1738:function(o){return e.call(o,t,"+")},RFC3986:function(o){return String(o)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Nd}function E6(){if(KA)return Dd;KA=!0;var e=Nv(),t=Object.prototype.hasOwnProperty,n=Array.isArray,o=(function(){for(var S=[],M=0;M<256;++M)S.push("%"+((M<16?"0":"")+M.toString(16)).toUpperCase());return S})(),s=function(S){for(;S.length>1;){var M=S.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(S,M){for(var A=M&&M.plainObjects?Object.create(null):{},I=0;I<S.length;++I)typeof S[I]<"u"&&(A[I]=S[I]);return A},l=function S(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,z){if(t.call(M,z)){var k=M[z];k&&typeof k=="object"&&T&&typeof T=="object"?M[z]=S(k,T,I):M.push(T)}else M[z]=T}),M):Object.keys(A).reduce(function(T,z){var k=A[z];return t.call(T,z)?T[z]=S(T[z],k,I):T[z]=k,T},R)},c=function(S,M){return Object.keys(M).reduce(function(A,I){return A[I]=M[I],A},S)},h=function(S,M,A){var I=S.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(S,M,A,I,R){if(S.length===0)return S;var T=S;if(typeof S=="symbol"?T=Symbol.prototype.toString.call(S):typeof S!="string"&&(T=String(S)),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 z="",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 H=L.charCodeAt(j);if(H===45||H===46||H===95||H===126||H>=48&&H<=57||H>=65&&H<=90||H>=97&&H<=122||R===e.RFC1738&&(H===40||H===41)){U[U.length]=L.charAt(j);continue}if(H<128){U[U.length]=o[H];continue}if(H<2048){U[U.length]=o[192|H>>6]+o[128|H&63];continue}if(H<55296||H>=57344){U[U.length]=o[224|H>>12]+o[128|H>>6&63]+o[128|H&63];continue}j+=1,H=65536+((H&1023)<<10|L.charCodeAt(j)&1023),U[U.length]=o[240|H>>18]+o[128|H>>12&63]+o[128|H>>6&63]+o[128|H&63]}z+=U.join("")}return z},y=function(S){for(var M=[{obj:{o:S},prop:"o"}],A=[],I=0;I<M.length;++I)for(var R=M[I],T=R.obj[R.prop],z=Object.keys(T),k=0;k<z.length;++k){var L=z[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),S},g=function(S){return Object.prototype.toString.call(S)==="[object RegExp]"},m=function(S){return!S||typeof S!="object"?!1:!!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S))},w=function(S,M){return[].concat(S,M)},F=function(S,M){if(n(S)){for(var A=[],I=0;I<S.length;I+=1)A.push(M(S[I]));return A}return M(S)};return Dd={arrayToObject:u,assign:c,combine:w,compact:y,decode:h,encode:p,isBuffer:m,isRegExp:g,maybeMap:F,merge:l},Dd}function EG(){if(YA)return Pd;YA=!0;var e=xG(),t=E6(),n=Nv(),o=Object.prototype.hasOwnProperty,s={brackets:function(F){return F+"[]"},comma:"comma",indices:function(F,S){return F+"["+S+"]"},repeat:function(F){return F}},u=Array.isArray,l=Array.prototype.push,c=function(F,S){l.apply(F,u(S)?S:[S])},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(F){return h.call(F)},skipNulls:!1,strictNullHandling:!1},y=function(F){return typeof F=="string"||typeof F=="number"||typeof F=="boolean"||typeof F=="symbol"||typeof F=="bigint"},g={},m=function F(S,M,A,I,R,T,z,k,L,U,j,H,P,te,ue,oe,X,re){for(var pe=S,le=re,J=0,G=!1;(le=le.get(g))!==void 0&&!G;){var Q=le.get(S);if(J+=1,typeof Q<"u"){if(Q===J)throw new RangeError("Cyclic object value");G=!0}typeof le.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",te):M;pe=""}if(y(pe)||t.isBuffer(pe)){if(L){var K=oe?M:L(M,p.encoder,X,"key",te);return[ue(K)+"="+ue(L(pe,p.encoder,X,"value",te))]}return[ue(M)+"="+ue(String(pe))]}var W=[];if(typeof pe>"u")return W;var $;if(A==="comma"&&u(pe))oe&&L&&(pe=t.maybeMap(pe,L)),$=[{value:pe.length>0?pe.join(",")||null:void 0}];else if(u(U))$=U;else{var fe=Object.keys(pe);$=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<$.length;++Z){var O=$[Z],q=typeof O=="object"&&typeof O.value<"u"?O.value:pe[O];if(!(z&&q===null)){var Y=H&&k?O.replace(/\./g,"%2E"):O,se=u(pe)?typeof A=="function"?A(ne,Y):ne:ne+(H?"."+Y:"["+Y+"]");re.set(S,J);var ye=e();ye.set(g,re),c(W,F(q,se,A,I,R,T,z,k,A==="comma"&&oe&&u(pe)?null:L,U,j,H,P,te,ue,oe,X,ye))}}return W},w=function(F){if(!F)return p;if(typeof F.allowEmptyArrays<"u"&&typeof F.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof F.encodeDotInKeys<"u"&&typeof F.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(F.encoder!==null&&typeof F.encoder<"u"&&typeof F.encoder!="function")throw new TypeError("Encoder has to be a function.");var S=F.charset||p.charset;if(typeof F.charset<"u"&&F.charset!=="utf-8"&&F.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 F.format<"u"){if(!o.call(n.formatters,F.format))throw new TypeError("Unknown format option provided.");M=F.format}var A=n.formatters[M],I=p.filter;(typeof F.filter=="function"||u(F.filter))&&(I=F.filter);var R;if(F.arrayFormat in s?R=F.arrayFormat:"indices"in F?R=F.indices?"indices":"repeat":R=p.arrayFormat,"commaRoundTrip"in F&&typeof F.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var T=typeof F.allowDots>"u"?F.encodeDotInKeys===!0?!0:p.allowDots:!!F.allowDots;return{addQueryPrefix:typeof F.addQueryPrefix=="boolean"?F.addQueryPrefix:p.addQueryPrefix,allowDots:T,allowEmptyArrays:typeof F.allowEmptyArrays=="boolean"?!!F.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:R,charset:S,charsetSentinel:typeof F.charsetSentinel=="boolean"?F.charsetSentinel:p.charsetSentinel,commaRoundTrip:F.commaRoundTrip,delimiter:typeof F.delimiter>"u"?p.delimiter:F.delimiter,encode:typeof F.encode=="boolean"?F.encode:p.encode,encodeDotInKeys:typeof F.encodeDotInKeys=="boolean"?F.encodeDotInKeys:p.encodeDotInKeys,encoder:typeof F.encoder=="function"?F.encoder:p.encoder,encodeValuesOnly:typeof F.encodeValuesOnly=="boolean"?F.encodeValuesOnly:p.encodeValuesOnly,filter:I,format:M,formatter:A,serializeDate:typeof F.serializeDate=="function"?F.serializeDate:p.serializeDate,skipNulls:typeof F.skipNulls=="boolean"?F.skipNulls:p.skipNulls,sort:typeof F.sort=="function"?F.sort:null,strictNullHandling:typeof F.strictNullHandling=="boolean"?F.strictNullHandling:p.strictNullHandling}};return Pd=function(F,S){var M=F,A=w(S),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 z=s[A.arrayFormat],k=z==="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,m(M[j],j,z,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 H=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&"),H.length>0?P+H:""},Pd}function SG(){if(VA)return kd;VA=!0;var e=E6(),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(m,w){return String.fromCharCode(parseInt(w,10))})},u=function(g,m){return g&&typeof g=="string"&&m.comma&&g.indexOf(",")>-1?g.split(","):g},l="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",h=function(g,m){var w={__proto__:null},F=m.ignoreQueryPrefix?g.replace(/^\?/,""):g;F=F.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var S=m.parameterLimit===1/0?void 0:m.parameterLimit,M=F.split(m.delimiter,S),A=-1,I,R=m.charset;if(m.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],z=T.indexOf("]="),k=z===-1?T.indexOf("="):z+1,L,U;k===-1?(L=m.decoder(T,o.decoder,R,"key"),U=m.strictNullHandling?null:""):(L=m.decoder(T.slice(0,k),o.decoder,R,"key"),U=e.maybeMap(u(T.slice(k+1),m),function(H){return m.decoder(H,o.decoder,R,"value")})),U&&m.interpretNumericEntities&&R==="iso-8859-1"&&(U=s(U)),T.indexOf("[]=")>-1&&(U=n(U)?[U]:U);var j=t.call(w,L);j&&m.duplicates==="combine"?w[L]=e.combine(w[L],U):(!j||m.duplicates==="last")&&(w[L]=U)}return w},f=function(g,m,w,F){for(var S=F?m:u(m,w),M=g.length-1;M>=0;--M){var A,I=g[M];if(I==="[]"&&w.parseArrays)A=w.allowEmptyArrays&&(S===""||w.strictNullHandling&&S===null)?[]:[].concat(S);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,z=parseInt(T,10);!w.parseArrays&&T===""?A={0:S}:!isNaN(z)&&I!==T&&String(z)===T&&z>=0&&w.parseArrays&&z<=w.arrayLimit?(A=[],A[z]=S):T!=="__proto__"&&(A[T]=S)}S=A}return S},p=function(g,m,w,F){if(g){var S=w.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g,M=/(\[[^[\]]*])/,A=/(\[[^[\]]*])/g,I=w.depth>0&&M.exec(S),R=I?S.slice(0,I.index):S,T=[];if(R){if(!w.plainObjects&&t.call(Object.prototype,R)&&!w.allowPrototypes)return;T.push(R)}for(var z=0;w.depth>0&&(I=A.exec(S))!==null&&z<w.depth;){if(z+=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("["+S.slice(I.index)+"]")}return f(T,m,w,F)}},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 m=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 F=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:o.allowDots:!!g.allowDots;return{allowDots:F,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:m,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 kd=function(g,m){var w=y(m);if(g===""||g===null||typeof g>"u")return w.plainObjects?Object.create(null):{};for(var F=typeof g=="string"?h(g,w):g,S=w.plainObjects?Object.create(null):{},M=Object.keys(F),A=0;A<M.length;++A){var I=M[A],R=p(I,F[I],w,typeof g=="string");S=e.merge(S,R,w)}return w.allowSparse===!0?S:e.compact(S)},kd}function IG(){if(WA)return Ld;WA=!0;var e=EG(),t=SG(),n=Nv();return Ld={formats:n,parse:t,stringify:e},Ld}function _G(){if(XA)return Fs;XA=!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})(.*)$/,m={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},F={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=IG();function M(T,z,k){if(T&&typeof T=="object"&&T instanceof t)return T;var L=new t;return L.parse(T,z,k),L}t.prototype.parse=function(T,z,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),H=/\\/g;j[0]=j[0].replace(H,"/"),T=j.join(U);var P=T;if(P=P.trim(),!k&&T.split("#").length===1){var te=s.exec(P);if(te)return this.path=P,this.href=P,this.pathname=te[1],te[2]?(this.search=te[2],z?this.query=S.parse(this.search.substr(1)):this.query=this.search.substr(1)):z&&(this.search="",this.query={}),this}var ue=n.exec(P);if(ue){ue=ue[0];var oe=ue.toLowerCase();this.protocol=oe,P=P.substr(ue.length)}if(k||ue||P.match(/^\/\/[^@/]+@[^@/]+/)){var X=P.substr(0,2)==="//";X&&!(ue&&w[ue])&&(P=P.substr(2),this.slashes=!0)}if(!w[ue]&&(X||ue&&!F[ue])){for(var re=-1,pe=0;pe<f.length;pe++){var le=P.indexOf(f[pe]);le!==-1&&(re===-1||le<re)&&(re=le)}var J,G;re===-1?G=P.lastIndexOf("@"):G=P.lastIndexOf("@",re),G!==-1&&(J=P.slice(0,G),P=P.slice(G+1),this.auth=decodeURIComponent(J)),re=-1;for(var pe=0;pe<h.length;pe++){var le=P.indexOf(h[pe]);le!==-1&&(re===-1||le<re)&&(re=le)}re===-1&&(re=P.length),this.host=P.slice(0,re),P=P.slice(re),this.parseHost(),this.hostname=this.hostname||"";var Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var K=this.hostname.split(/\./),pe=0,W=K.length;pe<W;pe++){var $=K[pe];if($&&!$.match(y)){for(var fe="",ae=0,ne=$.length;ae<ne;ae++)$.charCodeAt(ae)>127?fe+="x":fe+=$[ae];if(!fe.match(y)){var Z=K.slice(0,pe),O=K.slice(pe+1),q=$.match(g);q&&(Z.push(q[1]),O.unshift(q[2])),O.length&&(P="/"+O.join(".")+P),this.hostname=Z.join(".");break}}}this.hostname.length>p?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=e.toASCII(this.hostname));var Y=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+Y,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),P[0]!=="/"&&(P="/"+P))}if(!m[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 _=P.indexOf("#");_!==-1&&(this.hash=P.substr(_),P=P.slice(0,_));var v=P.indexOf("?");if(v!==-1?(this.search=P.substr(v),this.query=P.substr(v+1),z&&(this.query=S.parse(this.query)),P=P.slice(0,v)):z&&(this.search="",this.query={}),P&&(this.pathname=P),F[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 z=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=S.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var H=this.search||j&&"?"+j||"";return z&&z.substr(-1)!==":"&&(z+=":"),this.slashes||(!z||F[z])&&U!==!1?(U="//"+(U||""),k&&k.charAt(0)!=="/"&&(k="/"+k)):U||(U=""),L&&L.charAt(0)!=="#"&&(L="#"+L),H&&H.charAt(0)!=="?"&&(H="?"+H),k=k.replace(/[?#]/g,function(P){return encodeURIComponent(P)}),H=H.replace("#","%23"),z+U+k+H+L};function I(T,z){return M(T,!1,!0).resolve(z)}t.prototype.resolve=function(T){return this.resolveObject(M(T,!1,!0)).format()};function R(T,z){return T?M(T,!1,!0).resolveObject(z):z}return t.prototype.resolveObject=function(T){if(typeof T=="string"){var z=new t;z.parse(T,!1,!0),T=z}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 H=Object.keys(T),P=0;P<H.length;P++){var te=H[P];te!=="protocol"&&(k[te]=T[te])}return F[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(!F[T.protocol]){for(var ue=Object.keys(T),oe=0;oe<ue.length;oe++){var X=ue[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 re=k.pathname||"",pe=k.search||"";k.path=re+pe}return k.slashes=k.slashes||T.slashes,k.href=k.format(),k}var le=k.pathname&&k.pathname.charAt(0)==="/",J=T.host||T.pathname&&T.pathname.charAt(0)==="/",G=J||le||k.host&&T.pathname,Q=G,K=k.pathname&&k.pathname.split("/")||[],W=T.pathname&&T.pathname.split("/")||[],$=k.protocol&&!F[k.protocol];if($&&(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($){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,O=K.length;O>=0;O--)ae=K[O],ae==="."?K.splice(O,1):ae===".."?(K.splice(O,1),Z++):Z&&(K.splice(O,1),Z--);if(!G&&!Q)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($){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,z=o.exec(T);z&&(z=z[0],z!==":"&&(this.port=z.substr(1)),T=T.substr(0,T.length-z.length)),T&&(this.hostname=T)},Fs.parse=M,Fs.resolve=I,Fs.resolveObject=R,Fs.format=A,Fs.Url=t,Fs}function S6(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 Xd?CG(e):FG(e)}function CG(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(D6,"\\"),n=decodeURIComponent(n),t!=="")return`\\\\${t}${n}`;{let o=n.codePointAt(1)|32,s=n[2];if(o<j6||o>N6||s!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return n.slice(1)}}function FG(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 I6(e){let t=qA.resolve(e),n=e.charCodeAt(e.length-1);(n===U6||Xd&&n===M6)&&t[t.length-1]!==qA.sep&&(t+="/");let o=new URL("file://");return t.includes("%")&&(t=t.replace(P6,"%25")),!Xd&&t.includes("\\")&&(t=t.replace(k6,"%5C")),t.includes(`
149
- `)&&(t=t.replace(L6,"%0A")),t.includes("\r")&&(t=t.replace(z6,"%0D")),t.includes(" ")&&(t=t.replace($6,"%09")),o.pathname=t,o}var _6,Md,HA,Ud,jd,QA,Nd,GA,Dd,KA,Pd,YA,kd,VA,Ld,WA,Fs,XA,hn,DF,C6,F6,O6,T6,B6,R6,M6,U6,j6,N6,Xd,D6,P6,k6,L6,z6,$6,OG=Ln(()=>{Pe(),Le(),ke(),GQ(),uG(),wG(),v6(),_6=Object.freeze(Object.create(null)),Md={},HA=!1,Ud=typeof globalThis<"u"?globalThis:typeof self<"u"?self:y4,jd={},QA=!1,Nd={},GA=!1,Dd={},KA=!1,Pd={},YA=!1,kd={},VA=!1,Ld={},WA=!1,Fs={},XA=!1,hn=_G(),hn.parse,hn.resolve,hn.resolveObject,hn.format,hn.Url,DF=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,hn.URL=typeof URL<"u"?URL:null,hn.pathToFileURL=I6,hn.fileURLToPath=S6,C6=hn.Url,F6=hn.format,O6=hn.resolve,T6=hn.resolveObject,B6=hn.parse,R6=hn.URL,M6=92,U6=47,j6=97,N6=122,Xd=DF==="win32",D6=/\//g,P6=/%/g,k6=/\\/g,L6=/\n/g,z6=/\r/g,$6=/\t/g}),TG=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")}}),Dv=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=void 0,e.writev=o;var t=La(),n=(Yr(),Vt(Kr));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}),id=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=(Yr(),Vt(Kr)),o=t(TG()),s=t($o()),u=La(),l=t(Yp()),c=Dv(),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 m(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 F=(M,A)=>{h("streamBuilder");let I=y(A);I.hostname=I.hostname||I.host||"localhost";let R=p(I,M),T=m(M,R,I),z=o.default.createWebSocketStream(T,I.wsOptions);return z.url=R,T.on("close",()=>{z.destroy()}),z};e.streamBuilder=F;var S=(M,A)=>{h("browserStreamBuilder");let I,R=g(A).browserBufferSize||1024*512,T=A.browserBufferTimeout||1e3,z=!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",H):k.onopen=H),U?(k.addEventListener("close",P),k.addEventListener("error",te),k.addEventListener("message",ue)):(k.onclose=P,k.onerror=te,k.onmessage=ue);function j(re,pe,le){let J=new u.Transform({objectMode:re.objectMode});return J._write=pe,J._flush=le,J}function H(){h("WebSocket onOpen"),I instanceof c.BufferedDuplex&&I.socketReady()}function P(re){h("WebSocket onClose",re),I.end(),I.destroy()}function te(re){h("WebSocket onError",re);let pe=new Error("WebSocket error");pe.event=re,I.destroy(pe)}async function ue(re){if(!L||!L.readable||!L.writable)return;let{data:pe}=re;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(re,pe,le){if(k.bufferedAmount>R){setTimeout(oe,T,re,pe,le);return}z&&typeof re=="string"&&(re=n.Buffer.from(re,"utf8"));try{k.send(re)}catch(J){return le(J)}le()}function X(re){k.close(),re()}return I};e.browserStreamBuilder=S}),Pv={};ll(Pv,{Server:()=>or,Socket:()=>or,Stream:()=>or,_createServerHandle:()=>or,_normalizeArgs:()=>or,_setSimultaneousAccepts:()=>or,connect:()=>or,createConnection:()=>or,createServer:()=>or,default:()=>q6,isIP:()=>or,isIPv4:()=>or,isIPv6:()=>or});function or(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var q6,H6=Ln(()=>{Pe(),Le(),ke(),q6={_createServerHandle:or,_normalizeArgs:or,_setSimultaneousAccepts:or,connect:or,createConnection:or,createServer:or,isIP:or,isIPv4:or,isIPv6:or,Server:or,Socket:or,Stream:or}}),Q6=qe((e,t)=>{Pe(),Le(),ke(),t.exports={}}),PF=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((H6(),Vt(Pv))),o=t($o()),s=t(Q6()),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}),G6={};ll(G6,{default:()=>K6});var K6,BG=Ln(()=>{Pe(),Le(),ke(),K6={}}),kF=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=(BG(),Vt(G6)),o=t((H6(),Vt(Pv))),s=t($o()),u=t(Q6()),l=(0,s.default)("mqttjs:tls");function c(f){let{host:p,port:y,socksProxy:g,...m}=f;if(g!==void 0){let w=(0,u.default)(p,y,g,{timeout:f.socksTimeout});return(0,n.connect)({...m,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(m){p.rejectUnauthorized&&f.emit("error",m),y.end()}return y.on("error",g),y};e.default=h}),LF=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(Yr(),Vt(Kr)),n=La(),o=Dv(),s,u,l;function c(){let g=new n.Transform;return g._write=(m,w,F)=>{s.send({data:m.buffer,success(){F()},fail(S){F(new Error(S))}})},g._flush=m=>{s.close({success(){m()}})},g}function h(g){g.hostname||(g.hostname="localhost"),g.path||(g.path="/"),g.wsOptions||(g.wsOptions={})}function f(g,m){let w=g.protocol==="wxs"?"wss":"ws",F=`${w}://${g.hostname}${g.path}`;return g.port&&g.port!==80&&g.port!==443&&(F=`${w}://${g.hostname}:${g.port}${g.path}`),typeof g.transformWsUrl=="function"&&(F=g.transformWsUrl(F,g,m)),F}function p(){s.onOpen(()=>{l.socketReady()}),s.onMessage(g=>{let{data:m}=g;m instanceof ArrayBuffer?m=t.Buffer.from(m):m=t.Buffer.from(m,"utf8"),u.push(m)}),s.onClose(()=>{l.emit("close"),l.end(),l.destroy()}),s.onError(g=>{let m=new Error(g.errMsg);l.destroy(m)})}var y=(g,m)=>{if(m.hostname=m.hostname||m.host,!m.hostname)throw new Error("Could not determine host. Specify host manually.");let w=m.protocolId==="MQIsdp"&&m.protocolVersion===3?"mqttv3.1":"mqtt";h(m);let F=f(m,g);s=wx.connectSocket({url:F,protocols:[w]}),u=c(),l=new o.BufferedDuplex(m,u,s),l._destroy=(M,A)=>{s.close({success(){A&&A(M)}})};let S=l.destroy;return l.destroy=(M,A)=>(l.destroy=S,setTimeout(()=>{s.close({fail(){l._destroy(M,A)}})},0),l),p(),l};e.default=y}),zF=qe(e=>{Pe(),Le(),ke(),Object.defineProperty(e,"__esModule",{value:!0});var t=(Yr(),Vt(Kr)),n=La(),o=Dv(),s,u,l,c=!1;function h(){let m=new n.Transform;return m._write=(w,F,S)=>{s.sendSocketMessage({data:w.buffer,success(){S()},fail(){S(new Error)}})},m._flush=w=>{s.closeSocket({success(){w()}})},m}function f(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})}function p(m,w){let F=m.protocol==="alis"?"wss":"ws",S=`${F}://${m.hostname}${m.path}`;return m.port&&m.port!==80&&m.port!==443&&(S=`${F}://${m.hostname}:${m.port}${m.path}`),typeof m.transformWsUrl=="function"&&(S=m.transformWsUrl(S,m,w)),S}function y(){c||(c=!0,s.onSocketOpen(()=>{l.socketReady()}),s.onSocketMessage(m=>{if(typeof m.data=="string"){let w=t.Buffer.from(m.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(m.data)}}),s.onSocketClose(()=>{l.end(),l.destroy()}),s.onSocketError(m=>{l.destroy(m)}))}var g=(m,w)=>{if(w.hostname=w.hostname||w.host,!w.hostname)throw new Error("Could not determine host. Specify host manually.");let F=w.protocolId==="MQIsdp"&&w.protocolVersion===3?"mqttv3.1":"mqtt";f(w);let S=p(w,m);return s=w.my,s.connectSocket({url:S,protocols:F}),u=h(),l=new o.BufferedDuplex(w,u,s),y(),l};e.default=g}),RG=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((OG(),Vt(x6))),s=t(fA()),u=t(Yp());typeof(Dt==null?void 0:Dt.nextTick)!="function"&&(Dt.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[,m,w]=g;y.username=m,y.password=w}else y.username=y.auth}function f(y,g){var F,S,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||((F=g.protocol)==null?void 0:F.includes("+unix")),g.unixSocket?g.protocol=g.protocol.replace("+unix",""):!((S=g.protocol)!=null&&S.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 Dt<"u"&&(g.socksProxy=Dt.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=id().streamBuilder,c.wss=id().streamBuilder,c.mqtt=PF().default,c.tcp=PF().default,c.ssl=kF().default,c.tls=c.ssl,c.mqtts=kF().default):(c.ws=id().browserStreamBuilder,c.wss=id().browserStreamBuilder,c.wx=LF().default,c.wxs=LF().default,c.ali=zF().default,c.alis=zF().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 m(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(m,g);return w.on("error",()=>{}),w}function p(y,g,m=!0){return new Promise((w,F)=>{let S=f(y,g),M={connect:I=>{A(),w(S)},end:()=>{A(),w(S)},error:I=>{A(),S.end(),F(I)}};m===!1&&(M.close=()=>{M.error(new Error("Couldn't connect to server"))});function A(){Object.keys(M).forEach(I=>{S.off(I,M[I])})}Object.keys(M).forEach(I=>{S.on(I,M[I])})})}e.default=f}),$F=qe(e=>{Pe(),Le(),ke();var t=e&&e.__createBinding||(Object.create?function(m,w,F,S){S===void 0&&(S=F);var M=Object.getOwnPropertyDescriptor(w,F);(!M||("get"in M?!w.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return w[F]}}),Object.defineProperty(m,S,M)}:function(m,w,F,S){S===void 0&&(S=F),m[S]=w[F]}),n=e&&e.__setModuleDefault||(Object.create?function(m,w){Object.defineProperty(m,"default",{enumerable:!0,value:w})}:function(m,w){m.default=w}),o=e&&e.__importStar||(function(){var m=function(w){return m=Object.getOwnPropertyNames||function(F){var S=[];for(var M in F)Object.prototype.hasOwnProperty.call(F,M)&&(S[S.length]=M);return S},m(w)};return function(w){if(w&&w.__esModule)return w;var F={};if(w!=null)for(var S=m(w),M=0;M<S.length;M++)S[M]!=="default"&&t(F,w,S[M]);return n(F,w),F}})(),s=e&&e.__exportStar||function(m,w){for(var F in m)F!=="default"&&!Object.prototype.hasOwnProperty.call(w,F)&&t(w,m,F)},u=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};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(fA());e.MqttClient=l.default;var c=u(l6());e.DefaultMessageIdProvider=c.default;var h=u(HQ());e.UniqueMessageIdProvider=h.default;var f=u(GB());e.Store=f.default;var p=o(RG());e.connect=p.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return p.connectAsync}});var y=u(g6());e.KeepaliveManager=y.default,e.Client=l.default,s(fA(),e),s(fl(),e);var g=Gp();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return g.ReasonCodes}})}),MG=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($F());e.default=u,s($F(),e)});const UG=MG();/*! 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 Y6=(e=>(e.Posting="posting",e.Finalizing="finalizing",e.Finalized="finalized",e.Rejected="rejected",e))(Y6||{});const jG=Sv({name:"BatcherHash",fields:[{name:"batch",type:je.String(),indexed:!0},{name:"status",type:je.Enum(Y6),indexed:!0},{name:"blockHeight",type:je.Optional(je.Integer())},{name:"transactionHash",type:je.String()}]}),NG=Sv({name:"RollupBlock",fields:[{name:"block",type:je.Integer(),indexed:!0},{name:"timestamp",type:je.Optional(je.Integer())}]}),DG=Sv({name:"SyncChains",fields:[{name:"chain",type:je.String(),indexed:!0},{name:"block",type:je.Integer(),indexed:!0},{name:"rollup",type:je.Integer(),indexed:!1}]}),V6=[[dd.Batcher,jG],[dd.Node,NG],[dd.Node,DG]],PG=e=>{let t={};for(const n of e)t[n[1].name]=mB(n[0],n[1]);return t},kG=e=>{let t={};for(const n of e)t[n[1].name]=mB(n[0],EH(n[1]));return t},ZA=PG(V6);kG(V6);let qF=0;async function HF(e){await Gu.Instance.subscribe({topic:ZA.RollupBlock,filter:{block:void 0}},t=>{qF=Math.max(t.block,qF)})}var yb,QF;function LG(){if(QF)return yb;QF=1;var e="/",t="+",n="#";yb={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,m=y.length,w=g-1,F=0;F<g;F++){var S=p[F],M=S[0],A=y[F];if(!(!A&&!S)){if(!A&&S!==n)return!1;if(M===n)return F===w;if(M!==t&&S!==A)return!1}}return g===m}function u(h,f){for(var p=h.split(e),y=p.length,g=[],m=0;m<y;m++){var w=p[m],F=w[0],S=w.slice(1),M=f[S];if(F===n){M!==void 0&&g.push([].concat(M).join(e));break}else F===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),m=y.length,w=0;w<m;w++){var F=y[w],S=F[0];if(F.length!==1)if(S===n){p[F.slice(1)]=g.slice(w);break}else S===t&&(p[F.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 m=f[g],w=m[0];w===n?y.push(n):w===t?y.push(t):y.push(m)}return y.join("/")}return yb}var GF=LG();const KF={MQTT_ENGINE_BROKER_URL:"ws://localhost:8883",MQTT_BATCHER_BROKER_URL:"ws://localhost:8884"},Fo=class Fo{constructor(){this.getClient.bind(this),this.setupClient.bind(this),this.connectPaimaEngine.bind(this),this.connectBatcher.bind(this)}async getClient(t){switch(t){case da.PaimaEngine:return await this.connectPaimaEngine();case da.Batcher:return await this.connectBatcher()}}async setupClient(t){const n=await UG.connectAsync(t);return n.on("message",(o,s)=>{for(const[u,l]of Object.entries(Gu.Instance.callbacksForTopic))for(const[c,h]of Object.entries(l))if(GF.matches(c,o))for(const f of Object.getOwnPropertySymbols(h).map(p=>h[p])){const p=JSON.parse(s.toString()),y=GF.extract(SH(f.event.path),o);f.callback({val:p,resolvedPath:y})}}),n}async connectPaimaEngine(){return Fo.clients.engine||(da.PaimaEngine,Fo.clients.engine=await this.setupClient(KF.MQTT_ENGINE_BROKER_URL),await HF()),Fo.clients.engine}async connectBatcher(){return Fo.clients.batcher||(da.Batcher,Fo.clients.batcher=await this.setupClient(KF.MQTT_BATCHER_BROKER_URL),await HF()),Fo.clients.batcher}};Fo.clients={};let vc=Fo;const ep=class ep{constructor(){this.callbacksForTopic={[da.PaimaEngine]:{},[da.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 vc().getClient(t.topic.broker),s=MC(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 vc().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(IH(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 vc().getClient(t.topic.broker),s=MC(t.topic.path,t.filter);await o.publishAsync(s,JSON.stringify(n),{qos:2})}};ep.Instance=new ep;let Gu=ep;class Cu{constructor(){this.latestBlock={},this.initializationPromise=null}static get Instance(){return Cu._instance||(Cu._instance=new Cu),Cu._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([Gu.Instance.subscribe({topic:ZA.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)}),Gu.Instance.subscribe({topic:ZA.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 YF=Cu.Instance;function gb(){return"0x"+Array.from({length:64},()=>Math.floor(Math.random()*16).toString(16)).join("")}let zG=1e3;const $G=async(e,t,n,o)=>{const s=t===n?`${vI}/${encodeURIComponent(e)}/blocks?page=${t}`:`${vI}/${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=>qG(h,o,t)).filter(h=>h!==null)},VF={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})},qG=(e,t,n)=>{const s=(VF[t]??VF.DEFAULT)(e,n);return s.number==null||Number.isNaN(s.number)?null:s};function HG(){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++,z=gb(),L={number:T,hash:z,timestamp:new Date};t(U=>{const j={...U},H=j[A];return H.blocks.some(te=>te.number===T)||(H.blocks.unshift(L),H.blocks.length>20&&(H.blocks=H.blocks.slice(0,20))),j}),c(U=>({...U,[A]:0})),setTimeout(()=>{c(U=>({...U,[A]:void 0}))},250)},[e]),m=Xe.useCallback(async()=>{o(!0),u(null);try{const A=await HN();zG=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 z=R[T];if(z&&!z.rpcEndpoint){const k=[];for(let L=-5;L<0;L++){const U=z.currentBlock+L,j=gb(),H=new Date(Date.now()+L*(z.blockTime??1e3));k.push({number:U,hash:j,timestamp:H})}z.blocks=k.reverse(),z.currentBlock=z.currentBlock+1}}),R})},[]);Xe.useEffect(()=>{m()},[m]),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;YF.waitForBlock("__main__");const A=setInterval(()=>{t(I=>{const R={...I};let T=!1;for(const z in R){const k=R[z],L=z==="Paima"?"__main__":k.protocolName||z,U=YF.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=gb(),P={number:U,hash:j,timestamp:new Date};k.blocks.some(ue=>ue.number===U)||(k.blocks.unshift(P),k.blocks.length>20&&(k.blocks=k.blocks.slice(0,20)),c(ue=>({...ue,[z]:0})),setTimeout(()=>{c(ue=>({...ue,[z]: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 z=Number.POSITIVE_INFINITY;for(const[,k]of T)typeof k.blockTime=="number"&&k.blockTime>0&&k.blockTime<z&&(z=k.blockTime);return Number.isFinite(z)?Math.max(1e3,z):1e4},I=async()=>{try{const T=await fetch(QN);if(!T.ok)throw new Error(`block-heights HTTP ${T.status}`);const z=await T.json(),k=[];for(const[L,U]of Object.entries(e)){if(L==="Paima")continue;const j=U.protocolName;if(!j)continue;const H=z.find(te=>te.protocol_name===j);if(!H||H.synced_page==null)continue;const P=y.current[j]||0;if(!(H.synced_page<=P))try{const te=[],ue=await $G(j,H.synced_page,H.synced_page,U.type);te.push(...ue),te.length>0&&(k.push({key:L,blocks:te}),y.current[j]=H.synced_page)}catch{}}k.length>0&&t(L=>{const U={...L};for(const j of k){const H=U[j.key];if(!H||!j.blocks||j.blocks.length===0)continue;const P=j.blocks.filter(te=>!H.blocks.some(ue=>ue.number===te.number));if(P.length>0){const te=P.sort((ue,oe)=>oe.number-ue.number);H.blocks.unshift(...te),H.blocks.length>20&&(H.blocks=H.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 F=e.Paima,S=(F==null?void 0:F.latestBlockNumber)||0,M=(F==null?void 0:F.isConnected)||!1;return{chainConfigs:e,newBlockIndices:l,latestBlock:S,isConnected:M,isLoadingConfig:n,configError:s}}function QG(){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({}),[m,w]=Xe.useState({}),[F,S]=Xe.useState({}),[M,A]=Xe.useState({}),I=Xe.useRef(!1),R=Xe.useRef([]),T=Xe.useRef([]),z=Xe.useRef({}),k=Xe.useRef({}),L=Xe.useRef({}),U=Xe.useRef({}),j=Xe.useRef(new Set),H=Xe.useRef(new Set);Xe.useEffect(()=>{R.current=t},[t]),Xe.useEffect(()=>{T.current=o},[o]),Xe.useEffect(()=>{z.current=F},[F]),Xe.useEffect(()=>{k.current=M},[M]),Xe.useEffect(()=>{L.current=y},[y]),Xe.useEffect(()=>{U.current=m},[m]);const P=Xe.useCallback(Z=>Z.map(O=>({name:O.column_name,dataTypeID:25})),[]),te=Xe.useCallback((Z,O,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]),ue=Xe.useCallback((Z,O,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 O=z.current[Z];if(O)return O;const q=await fetch(`${YN}/${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(O){return console.error(`Error fetching schema for primitive ${Z}:`,O),null}},[]),X=Xe.useCallback(async Z=>{try{const O=await fetch(`${VN}/${Z}`);if(!O.ok){if(O.status===404)return console.log(`🚫 Schema for table ${Z} not found (404)`),null;throw new Error(`HTTP error! status: ${O.status}`)}const q=await O.json();return console.log(`📋 Fetched schema for ${Z}:`,q),q}catch(O){return console.error(`Error fetching schema for table ${Z}:`,O),null}},[]),re=Xe.useCallback(async()=>{try{const Z=await fetch(CT);if(!Z.ok)throw new Error(`HTTP error! status: ${Z.status}`);const O=await Z.json();return console.log("📋 Fetched config:",O),O}catch(Z){return console.error("Error fetching config:",Z),null}},[]),pe=Xe.useCallback(async()=>{try{const Z=await fetch(wI);if(!Z.ok)throw new Error(`HTTP error! status: ${Z.status}`);const O=await Z.json();return console.log("📋 Fetched user table names:",O),O.map(q=>q.table_name)}catch(Z){return console.error("Error fetching user table names:",Z),[]}},[]),le=Xe.useCallback(Z=>{const O=[];return!Z||!Array.isArray(Z)?O:(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"&&O.push(Y.primitive.name)})}),[...new Set(O)])},[]),J=Xe.useCallback(async(Z,O,q)=>{try{if(H.current.has(Z))return null;const Y=q??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},se=new URL(`${GN}/${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)`),H.current.add(Z),null;throw new Error(`HTTP error! status: ${ee.status}`)}const _=await ee.json(),v=Array.isArray(_)?_:_.data??[],C=_.pagination;return C&&g(D=>{const he=[...D[Z].cursors];return C.nextCursor&&he.length===D[Z].currentPage+1&&he.push(C.nextCursor),{...D,[Z]:{...D[Z],hasMore:C.hasMore,cursors:he}}}),console.log(`📊 Fetched data for ${Z}:`,v),te(v,Z,O)}catch(Y){return console.error(`Error fetching primitive data for ${Z}:`,Y),null}},[te]),G=Xe.useCallback(async(Z,O,q)=>{try{const Y=q??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},se=new URL(`${wI}/${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 _=await ee.json();console.log(`📊 Fetched table data for ${Z}:`,_);const v=_.data??[],C=_.pagination;return C&&w(D=>{const he=[...D[Z].cursors];return C.nextCursor&&he.length===D[Z].currentPage+1&&he.push(C.nextCursor),{...D,[Z]:{...D[Z],hasMore:C.hasMore,cursors:he}}}),ue(v,Z,O)}catch(Y){return console.error(`Error fetching table data for ${Z}:`,Y),null}},[ue]),Q=Xe.useCallback(async()=>{try{const Z=await fetch(KN);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=z.current[q],se=L.current[q],ye=await J(q,Y,se);return{primitiveName:q,data:ye}}),O=await Promise.all(Z);O.length>0&&l(q=>{const Y={...q};return O.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}}),O=await Promise.all(Z);O.length>0&&h(q=>{const Y={...q};return O.forEach(({tableName:se,data:ye})=>{ye!==null&&(Y[se]=ye)}),Y})}catch(Z){console.error("Error refreshing user table data:",Z)}},[G]),$=Xe.useCallback(async()=>{if(I.current)try{const Z=await Q();Z!==null&&p({scheduled_data:Z})}catch(Z){console.error("Error refreshing scheduled data:",Z)}},[Q]),fe=Xe.useCallback(async()=>{console.log("📋 Initializing primitive tables...");try{const Z=await re();if(!Z){console.error("Failed to fetch config");return}const O=le(Z);if(n(O),console.log("📊 Found primitives:",O),O.length===0){console.log("No primitives found in config");return}const q=O.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)}),S(se),g(v=>{const C={...v};return O.forEach(D=>{C[D]||(C[D]={limit:20,cursors:[void 0],currentPage:0,hasMore:!1})}),C});const ye=O.map(async v=>{const C=se[v],D=L.current[v]??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},he=await J(v,C,D);return{primitiveName:v,data:he}}),ee=await Promise.all(ye),_={};ee.forEach(({primitiveName:v,data:C})=>{_[v]=C}),l(_),console.log("✅ Primitive tables initialized")}catch(Z){console.error("Error initializing primitive tables:",Z)}},[re,le,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 O=Z.map(async _=>{const v=await X(_);return{tableName:_,schema:v}}),q=await Promise.all(O),Y={};q.forEach(({tableName:_,schema:v})=>{v&&(Y[_]=v)}),A(Y),w(_=>{const v={..._};return Z.forEach(C=>{v[C]||(v[C]={limit:20,cursors:[void 0],currentPage:0,hasMore:!1})}),v});const se=Z.map(async _=>{const v=Y[_],C=U.current[_]??{limit:20,cursors:[void 0],currentPage:0,hasMore:!1},D=await G(_,v||void 0,C);return{tableName:_,data:D}}),ye=await Promise.all(se),ee={};ye.forEach(({tableName:_,data:v})=>{ee[_]=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 Q();p({scheduled_data:Z}),console.log("✅ Scheduled data initialized")}catch(Z){console.error("Error initializing scheduled data:",Z)}},[Q]);return Xe.useEffect(()=>{let Z,O,q;return(async()=>{await Promise.all([fe(),ae(),ne()]),I.current=!0,Z=setInterval(()=>{K()},5e3),setTimeout(()=>{W(),O=setInterval(()=>{W()},5e3)},1500),setTimeout(()=>{$(),q=setInterval(()=>{$()},5e3)},3e3)})(),()=>{Z&&clearInterval(Z),O&&clearInterval(O),q&&clearInterval(q)}},[]),{primitiveData:u,userTableData:c,scheduledData:f,primitiveNames:t,userTableNames:o,refreshPrimitiveData:K,refreshUserTableData:W,refreshScheduledData:$,primitivePagination:y,userTablePagination:m,setPrimitiveLimit:async(Z,O)=>{const q={limit:O,cursors:[void 0],currentPage:0,hasMore:!1};g(ye=>({...ye,[Z]:q}));const Y=z.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},nextPrimitivePage:async Z=>{const O=L.current[Z];if(!O||!O.hasMore)return;const q={...O,currentPage:O.currentPage+1};g(ye=>({...ye,[Z]:q}));const Y=z.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},prevPrimitivePage:async Z=>{const O=L.current[Z];if(!O||O.currentPage===0)return;const q={...O,currentPage:O.currentPage-1};g(ye=>({...ye,[Z]:q}));const Y=z.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},firstPrimitivePage:async Z=>{const O=L.current[Z];if(!O)return;const q={...O,cursors:[void 0],currentPage:0};g(ye=>({...ye,[Z]:q}));const Y=z.current[Z],se=await J(Z,Y,q);l(ye=>({...ye,[Z]:se}))},setUserTableLimit:async(Z,O)=>{const q={limit:O,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 O=U.current[Z];if(!O||!O.hasMore)return;const q={...O,currentPage:O.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 O=U.current[Z];if(!O||O.currentPage===0)return;const q={...O,currentPage:O.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 O=U.current[Z];if(!O)return;const q={...O,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 GG(){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:m,latestBlock:w,isConnected:F,isLoadingConfig:S,configError:M}=HG(),{primitiveData:A,userTableData:I,scheduledData:R,primitiveNames:T,userTableNames:z,primitivePagination:k,userTablePagination:L,nextPrimitivePage:U,prevPrimitivePage:j,firstPrimitivePage:H,setPrimitiveLimit:P,nextUserTablePage:te,prevUserTablePage:ue,firstUserTablePage:oe,setUserTableLimit:X}=QG();return Xe.useEffect(()=>{T.length>0&&!s&&(t(T),u(!0))},[T,s]),Xe.useEffect(()=>{z.length>0&&!l&&(o(z.slice(0,4)),c(!0))},[z,l]),Xe.useEffect(()=>{const re=pe=>{console.error("Unhandled promise rejection:",pe.reason)};return globalThis.addEventListener("unhandledrejection",re),()=>{globalThis.removeEventListener("unhandledrejection",re)}},[]),Xe.useEffect(()=>{const re=pe=>{pe.key==="r"&&pe.ctrlKey&&(pe.preventDefault(),console.log("🔄 Manually refreshed (keyboard shortcut)"))};return document.addEventListener("keydown",re),()=>{document.removeEventListener("keydown",re)}},[]),S?_e.jsxs("div",{className:"container",children:[_e.jsx(cb,{latestBlock:w,isConnected:F}),_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(cb,{latestBlock:w,isConnected:F}),_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(TC,{chainConfigs:g,newBlockIndices:m})]}):_e.jsxs("div",{className:"container",children:[_e.jsx(cb,{latestBlock:w,isConnected:F}),_e.jsx(TC,{chainConfigs:g,newBlockIndices:m}),_e.jsxs(fb,{title:"Primitive Data",tables:Object.fromEntries(Object.entries(A).filter(([re])=>e.includes(re))),pagination:k,onPrev:re=>j(re),onNext:re=>U(re),onFirst:re=>H(re),onLimitChange:(re,pe)=>P(re,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(BC,{isOpen:h,onClose:()=>f(!1),title:"Select Primitives",tableNames:T,selectedNames:e,onApply:re=>t(re)})]}),_e.jsxs(fb,{title:"State Machine Tables",tables:Object.fromEntries(Object.entries(I).filter(([re])=>n.includes(re))),pagination:L,onPrev:re=>ue(re),onNext:re=>te(re),onFirst:re=>oe(re),onLimitChange:(re,pe)=>X(re,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(BC,{isOpen:p,onClose:()=>y(!1),title:"Select Custom Tables",tableNames:z,selectedNames:n,onApply:re=>o(re)})]}),_e.jsx(fb,{title:"Scheduled Data",tables:R})]})}x4.createRoot(document.getElementById("root")).render(_e.jsx(Xe.StrictMode,{children:_e.jsx(GG,{})}));