@permaweb/libs 0.0.49 → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -32,7 +32,7 @@ ${JSON.stringify(at.from(f))},${JSON.stringify(at.from(d))},${v} => ${JSON.strin
32
32
  ${x}
33
33
  }
34
34
  }
35
- }`;return a.queryKey&&(T=`${a.queryKey}: ${T}`),T}async function YJ(a){try{return await(await fetch(`https://${a.gateway}/graphql`,{method:"POST",headers:{"Content-Type":"application/json"},body:a.query})).json()}catch(o){throw o}}var s6e=ua.goldsky;async function NE(a,o){let f=[{name:"Authority",value:Ji.mu}];o.tags&&o.tags.length>0&&o.tags.forEach(d=>f.push(d));try{let d=await a.ao.spawn({module:o.module,scheduler:o.scheduler,signer:a.signer,tags:f,data:o.data});return Zo(`Process ID: ${d}`),Zo("Sending initial message..."),await ks(a,{processId:d,action:"Init"}),d}catch(d){throw console.log(d),new Error(d.message??"Error spawning process")}}function CE(a){return async o=>await ks(a,o)}async function ks(a,o){try{let f=[{name:"Action",value:o.action}];o.tags&&f.push(...o.tags);let d=o.useRawData?o.data:JSON.stringify(o.data);return await a.ao.message({process:o.processId,signer:a.signer,tags:f,data:d})}catch(f){throw new Error(f)}}function LE(a){return async o=>await Ih(a,o)}async function Ih(a,o){let d=`${o.node??RE.defaultNode}/${o.processId}~process@1.0/now/${o.path}`;o.serialize&&(d+="/serialize~json@1.0"),console.log("Getting state from HyperBEAM:",d);try{let n=await fetch(d);if(n.ok)return console.log("Returning state from HyperBEAM."),n.json();throw new Error("Error getting state from HyperBEAM.")}catch(n){if(o.fallbackAction){console.log("State not found, dryrunning...");let v=await Sp(a,{processId:o.processId,action:o.fallbackAction});return console.log("Returning state from dryrun."),v}throw n}}function DE(a){return async o=>await Sp(a,o)}async function Sp(a,o){try{let f=[{name:"Action",value:o.action}];o.tags&&f.push(...o.tags);let d;if(typeof o.data=="object")d=JSON.stringify(o.data||{});else if(typeof o.data=="string"){try{JSON.parse(o.data)}catch(v){throw console.error(v),new Error("Invalid JSON data")}d=o.data}let n=await a.ao.dryrun({process:o.processId,tags:f,data:d});if(n.Messages&&n.Messages.length){if(n.Messages[0].Data)return JSON.parse(n.Messages[0].Data);if(n.Messages[0].Tags)return n.Messages[0].Tags.reduce((v,b)=>(v[b.name]=b.value,v),{})}}catch(f){throw new Error(f.message??"Error dryrunning process")}}async function XJ(a,o){try{let{Messages:f}=await a.ao.result({message:o.messageId,process:o.processId});if(f&&f.length){let d={};return f.forEach(n=>{let v=xp(n.Tags,"Action")||o.action,b=null,y=n.Data;if(y)try{b=JSON.parse(y)}catch{b=y}let M=xp(n.Tags,"Status"),w=xp(n.Tags,"Message");d[v]={id:o.messageId,status:M,message:w,data:b}}),d}else return null}catch(f){console.error(f)}}async function Vd(a,o){let f=null;if(o.evalSrc?f=o.evalSrc:o.evalTxId&&(f=await QJ(o.evalTxId)),f)try{let d=await ks(a,{processId:o.processId,action:"Eval",data:f,tags:o.evalTags||null,useRawData:!0});return Zo(`Eval: ${d}`),await XJ(a,{processId:o.processId,messageId:d,action:"Eval"})}catch(d){throw new Error(d.message??"Error sending process eval")}return null}function OE(a){return async(o,f)=>{try{let d={module:o.module||Ji.module,scheduler:o.scheduler||Ji.scheduler};o.data&&(d.data=o.data),o.tags&&(d.tags=o.tags),f&&f("Spawning process...");let n=await NE(a,d);if(o.evalTxId||o.evalSrc){f&&f("Process retrieved!"),f&&f("Sending eval...");try{await Vd(a,{processId:n,evalTxId:o.evalTxId||null,evalSrc:o.evalSrc||null,evalTags:o.evalTags})&&f&&f("Eval complete")}catch(v){throw new Error(v.message??"Error creating process")}}return n}catch(d){throw new Error(d.message??"Error creating process")}}}async function Th(a,o,f){try{let d={module:o.module||Ji.module,scheduler:o.scheduler||Ji.scheduler};o.data&&(d.data=o.data),o.tags&&(d.tags=o.tags),f&&f("Spawning process...");let n=await NE(a,d);if(o.evalTxId||o.evalSrc){f&&f("Process retrieved!"),f&&f("Sending eval...");try{await Vd(a,{processId:n,evalTxId:o.evalTxId||null,evalSrc:o.evalSrc||null,evalTags:o.evalTags})&&f&&f("Eval complete")}catch(v){throw new Error(v.message??"Error creating process")}}return n}catch(d){throw new Error(d.message??"Error creating process")}}async function QJ(a){try{return await(await fetch(bl(a))).text()}catch(o){throw new Error(o)}}var Cke=Ae(Be(),1);Ie();Re();var Ake=Ae(Be(),1);Ie();Re();var aS={};wp(aS,{AVSCTap:()=>sp,AlgorandSigner:()=>X1,AptosSigner:()=>ep,ArconnectSigner:()=>hl,Arweave:()=>vH.default,ArweaveSigner:()=>Pu,Bundle:()=>Zb,BundleItem:()=>nS,CryptoDriver:()=>B6,Curve25519:()=>Sa,DataItem:()=>Kb,EthereumSigner:()=>ja,HexInjectedSolanaSigner:()=>al,HexSolanaSigner:()=>Q1,InjectedAptosSigner:()=>ol,InjectedEthereumSigner:()=>Qx,InjectedSolanaSigner:()=>Nu,InjectedTypedEthereumSigner:()=>eS,KyveSigner:()=>ip,MAX_TAG_BYTES:()=>Hb,MIN_BINARY_SIZE:()=>jb,MultiSignatureAptosSigner:()=>sl,NearSigner:()=>Y1,PolygonSigner:()=>J1,Rsa4096:()=>Bu,SIG_CONFIG:()=>Ir,SignatureConfig:()=>or,Signer:()=>g3,SolanaSigner:()=>e0,Transaction:()=>pH.default,TypedEthereumSigner:()=>fl,bundleAndSignData:()=>gpe,byteArrayToLong:()=>Wi,concatBuffers:()=>fi.concatBuffers,createData:()=>hp,deepHash:()=>J0,deserializeTags:()=>Hd,exportForTesting:()=>ppe,getCryptoDriver:()=>Qi,getSignatureAndId:()=>UG,indexToType:()=>np,keccak256:()=>Y5,longTo16ByteArray:()=>bpe,longTo32ByteArray:()=>zb,longTo8ByteArray:()=>Fb,longToNByteArray:()=>op,secp256k1:()=>nl,serializeTags:()=>rS,shortTo2ByteArray:()=>tS,sign:()=>Wb,stringToBuffer:()=>fi.stringToBuffer,unbundleData:()=>mpe});var aTe=Ae(Be(),1);Ie();Re();var zRe=Ae(Be(),1);Ie();Re();var c6e=Ae(Be(),1);Ie();Re();var g3=class{publicKey;signatureType;signatureLength;ownerLength;pem;static verify(o,f,d,n){throw new Error("You must implement verify method on child")}};var kRe=Ae(Be(),1);Ie();Re();var K6e=Ae(Be(),1);Ie();Re();var QE=Ae(Za(),1);var I6e=Ae(Be(),1);Ie();Re();var or;(function(a){a[a.ARWEAVE=1]="ARWEAVE",a[a.ED25519=2]="ED25519",a[a.ETHEREUM=3]="ETHEREUM",a[a.SOLANA=4]="SOLANA",a[a.INJECTEDAPTOS=5]="INJECTEDAPTOS",a[a.MULTIAPTOS=6]="MULTIAPTOS",a[a.TYPEDETHEREUM=7]="TYPEDETHEREUM",a[a.KYVE=101]="KYVE"})(or||(or={}));var Ir={[or.ARWEAVE]:{sigLength:512,pubLength:512,sigName:"arweave"},[or.ED25519]:{sigLength:64,pubLength:32,sigName:"ed25519"},[or.ETHEREUM]:{sigLength:65,pubLength:65,sigName:"ethereum"},[or.SOLANA]:{sigLength:64,pubLength:32,sigName:"solana"},[or.INJECTEDAPTOS]:{sigLength:64,pubLength:32,sigName:"injectedAptos"},[or.MULTIAPTOS]:{sigLength:64*32+4,pubLength:32*32+1,sigName:"multiAptos"},[or.TYPEDETHEREUM]:{sigLength:65,pubLength:42,sigName:"typedEthereum"},[or.KYVE]:{sigLength:65,pubLength:65,sigName:"kyve"}};var O6e=Ae(Be(),1);Ie();Re();var nY=Ae(x3(),1);var kn=BigInt(0),qr=BigInt(1),gl=BigInt(2),aY=BigInt(8),HE=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),wi=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:HE,n:HE,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")});var VE=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Jd=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),L6e=BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),oY=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),sY=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),fY=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),hY=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),nn=class a{constructor(o,f,d,n){this.x=o,this.y=f,this.z=d,this.t=n}static fromAffine(o){if(!(o instanceof Yi))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return o.equals(Yi.ZERO)?a.ZERO:new a(o.x,o.y,qr,Zt(o.x*o.y))}static toAffineBatch(o){let f=dY(o.map(d=>d.z));return o.map((d,n)=>d.toAffine(f[n]))}static normalizeZ(o){return this.toAffineBatch(o).map(this.fromAffine)}equals(o){jE(o);let{x:f,y:d,z:n}=this,{x:v,y:b,z:y}=o,M=Zt(f*y),w=Zt(v*n),g=Zt(d*y),_=Zt(b*n);return M===w&&g===_}negate(){return new a(Zt(-this.x),this.y,this.z,Zt(-this.t))}double(){let{x:o,y:f,z:d}=this,{a:n}=wi,v=Zt,b=v(o*o),y=v(f*f),M=v(gl*v(d*d)),w=v(n*b),g=o+f,_=v(v(g*g)-b-y),x=w+y,E=x-M,R=w-y,T=v(_*E),N=v(x*R),P=v(_*R),L=v(E*x);return new a(T,N,L,P)}add(o){let{x:f,y:d,z:n,t:v}=this;jE(o);let{x:b,y,z:M,t:w}=o,{a:g,d:_}=wi,x=Zt,E=x(f*b),R=x(d*y),T=x(v*_*w),N=x(n*M),P=x((f+d)*(b+y)-E-R),L=x(N-T),D=x(N+T),Z=x(R-g*E),W=x(P*L),Q=x(D*Z),K=x(P*Z),z=x(L*D);return new a(W,Q,z,K)}subtract(o){return this.add(o.negate())}precomputeWindow(o){let f=1+256/o,d=[],n=this,v=n;for(let b=0;b<f;b++){v=n,d.push(v);for(let y=1;y<2**(o-1);y++)v=v.add(n),d.push(v);n=v.double()}return d}wNAF(o,f){!f&&this.equals(a.BASE)&&(f=Yi.BASE);let d=f&&f._WINDOW_SIZE||1;if(256%d)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=f&&R3.get(f);n||(n=this.precomputeWindow(d),f&&d!==1&&(n=a.normalizeZ(n),R3.set(f,n)));let v=a.ZERO,b=a.BASE,y=1+256/d,M=2**(d-1),w=BigInt(2**d-1),g=2**d,_=BigInt(d);for(let x=0;x<y;x++){let E=x*M,R=Number(o&w);o>>=_,R>M&&(R-=g,o+=qr);let T=E,N=E+Math.abs(R)-1,P=x%2!==0,L=R<0;R===0?b=b.add(KE(P,n[T])):v=v.add(KE(L,n[N]))}return a.normalizeZ([v,b])[0]}multiply(o,f){return this.wNAF(Bp(o,wi.l),f)}multiplyUnsafe(o){let f=Bp(o,wi.l,!1),d=a.BASE,n=a.ZERO;if(f===kn)return n;if(this.equals(n)||f===qr)return this;if(this.equals(d))return this.wNAF(f);let v=n,b=this;for(;f>kn;)f&qr&&(v=v.add(b)),b=b.double(),f>>=qr;return v}isSmallOrder(){return this.multiplyUnsafe(wi.h).equals(a.ZERO)}isTorsionFree(){let o=this.multiplyUnsafe(wi.l/gl).double();return wi.l%gl&&(o=o.add(this)),o.equals(a.ZERO)}toAffine(o){let{x:f,y:d,z:n}=this,v=this.equals(a.ZERO);o==null&&(o=v?aY:Rp(n));let b=Zt(f*o),y=Zt(d*o),M=Zt(n*o);if(v)return Yi.ZERO;if(M!==qr)throw new Error("invZ was invalid");return new Yi(b,y)}fromRistrettoBytes(){E3()}toRistrettoBytes(){E3()}fromRistrettoHash(){E3()}};nn.BASE=new nn(wi.Gx,wi.Gy,qr,Zt(wi.Gx*wi.Gy));nn.ZERO=new nn(kn,qr,qr,kn);function KE(a,o){let f=o.negate();return a?f:o}function jE(a){if(!(a instanceof nn))throw new TypeError("ExtendedPoint expected")}function S3(a){if(!(a instanceof kh))throw new TypeError("RistrettoPoint expected")}function E3(){throw new Error("Legacy method: switch to RistrettoPoint")}var kh=class a{constructor(o){this.ep=o}static calcElligatorRistrettoMap(o){let{d:f}=wi,d=Zt(Jd*o*o),n=Zt((d+qr)*fY),v=BigInt(-1),b=Zt((v-f*d)*Zt(d+f)),{isValid:y,value:M}=k3(n,b),w=Zt(M*o);u0(w)||(w=Zt(-w)),y||(M=w),y||(v=d);let g=Zt(v*(d-qr)*hY-b),_=M*M,x=Zt((M+M)*b),E=Zt(g*oY),R=Zt(qr-_),T=Zt(qr+_);return new nn(Zt(x*T),Zt(R*E),Zt(E*T),Zt(x*R))}static hashToCurve(o){o=l0(o,64);let f=A3(o.slice(0,32)),d=this.calcElligatorRistrettoMap(f),n=A3(o.slice(32,64)),v=this.calcElligatorRistrettoMap(n);return new a(d.add(v))}static fromHex(o){o=l0(o,32);let{a:f,d}=wi,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",v=A3(o);if(!pY(Xd(v),o)||u0(v))throw new Error(n);let b=Zt(v*v),y=Zt(qr+f*b),M=Zt(qr-f*b),w=Zt(y*y),g=Zt(M*M),_=Zt(f*d*w-g),{isValid:x,value:E}=GE(Zt(_*g)),R=Zt(E*M),T=Zt(E*R*_),N=Zt((v+v)*R);u0(N)&&(N=Zt(-N));let P=Zt(y*T),L=Zt(N*P);if(!x||u0(L)||P===kn)throw new Error(n);return new a(new nn(N,P,qr,L))}toRawBytes(){let{x:o,y:f,z:d,t:n}=this.ep,v=Zt(Zt(d+f)*Zt(d-f)),b=Zt(o*f),y=Zt(b*b),{value:M}=GE(Zt(v*y)),w=Zt(M*v),g=Zt(M*b),_=Zt(w*g*n),x;if(u0(n*_)){let R=Zt(f*Jd),T=Zt(o*Jd);o=R,f=T,x=Zt(w*sY)}else x=g;u0(o*_)&&(f=Zt(-f));let E=Zt((d-f)*x);return u0(E)&&(E=Zt(-E)),Xd(E)}toHex(){return Qd(this.toRawBytes())}toString(){return this.toHex()}equals(o){S3(o);let f=this.ep,d=o.ep,n=Zt(f.x*d.y)===Zt(f.y*d.x),v=Zt(f.y*d.y)===Zt(f.x*d.x);return n||v}add(o){return S3(o),new a(this.ep.add(o.ep))}subtract(o){return S3(o),new a(this.ep.subtract(o.ep))}multiply(o){return new a(this.ep.multiply(o))}multiplyUnsafe(o){return new a(this.ep.multiplyUnsafe(o))}};kh.BASE=new kh(nn.BASE);kh.ZERO=new kh(nn.ZERO);var R3=new WeakMap,Yi=class a{constructor(o,f){this.x=o,this.y=f}_setWindowSize(o){this._WINDOW_SIZE=o,R3.delete(this)}static fromHex(o,f=!0){let{d,P:n}=wi;o=l0(o,32);let v=o.slice();v[31]=o[31]&-129;let b=ec(v);if(f&&b>=n)throw new Error("Expected 0 < hex < P");if(!f&&b>=VE)throw new Error("Expected 0 < hex < 2**256");let y=Zt(b*b),M=Zt(y-qr),w=Zt(d*y+qr),{isValid:g,value:_}=k3(M,w);if(!g)throw new Error("Point.fromHex: invalid y coordinate");let x=(_&qr)===qr;return(o[31]&128)!==0!==x&&(_=Zt(-_)),new a(_,b)}static async fromPrivateKey(o){return(await $3(o)).point}toRawBytes(){let o=Xd(this.y);return o[31]|=this.x&qr?128:0,o}toHex(){return Qd(this.toRawBytes())}toX25519(){let{y:o}=this,f=Zt((qr+o)*Rp(qr-o));return Xd(f)}isTorsionFree(){return nn.fromAffine(this).isTorsionFree()}equals(o){return this.x===o.x&&this.y===o.y}negate(){return new a(Zt(-this.x),this.y)}add(o){return nn.fromAffine(this).add(nn.fromAffine(o)).toAffine()}subtract(o){return this.add(o.negate())}multiply(o){return nn.fromAffine(this).multiply(o,this).toAffine()}};Yi.BASE=new Yi(wi.Gx,wi.Gy);Yi.ZERO=new Yi(kn,qr);var Yd=class a{constructor(o,f){this.r=o,this.s=f,this.assertValidity()}static fromHex(o){let f=l0(o,64),d=Yi.fromHex(f.slice(0,32),!1),n=ec(f.slice(32,64));return new a(d,n)}assertValidity(){let{r:o,s:f}=this;if(!(o instanceof Yi))throw new Error("Expected Point instance");return Bp(f,wi.l,!1),this}toRawBytes(){let o=new Uint8Array(64);return o.set(this.r.toRawBytes()),o.set(Xd(this.s),32),o}toHex(){return Qd(this.toRawBytes())}};function JE(a){return a instanceof Uint8Array||ArrayBuffer.isView(a)&&a.constructor.name==="Uint8Array"}function I3(a){if(!JE(a))throw new Error("Uint8Array expected")}function WE(...a){if(a.every(I3),a.length===1)return a[0];let o=a.reduce((d,n)=>d+n.length,0),f=new Uint8Array(o);for(let d=0,n=0;d<a.length;d++){let v=a[d];f.set(v,n),n+=v.length}return f}var uY=Array.from({length:256},(a,o)=>o.toString(16).padStart(2,"0"));function Qd(a){I3(a);let o="";for(let f=0;f<a.length;f++)o+=uY[a[f]];return o}var _f={_0:48,_9:57,A:65,F:70,a:97,f:102};function ZE(a){if(a>=_f._0&&a<=_f._9)return a-_f._0;if(a>=_f.A&&a<=_f.F)return a-(_f.A-10);if(a>=_f.a&&a<=_f.f)return a-(_f.a-10)}function T3(a){if(typeof a!="string")throw new Error("hex string expected, got "+typeof a);let o=a.length,f=o/2;if(o%2)throw new Error("hex string expected, got unpadded hex of length "+o);let d=new Uint8Array(f);for(let n=0,v=0;n<f;n++,v+=2){let b=ZE(a.charCodeAt(v)),y=ZE(a.charCodeAt(v+1));if(b===void 0||y===void 0){let M=a[v]+a[v+1];throw new Error('hex string expected, got non-hex character "'+M+'" at index '+v)}d[n]=b*16+y}return d}function YE(a){let f=a.toString(16).padStart(64,"0");return T3(f)}function Xd(a){return YE(a).reverse()}function u0(a){return(Zt(a)&qr)===qr}function ec(a){return I3(a),BigInt("0x"+Qd(Uint8Array.from(a).reverse()))}var lY=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function A3(a){return Zt(ec(a)&lY)}function Zt(a,o=wi.P){let f=a%o;return f>=kn?f:o+f}function Rp(a,o=wi.P){if(a===kn||o<=kn)throw new Error(`invert: expected positive integers, got n=${a} mod=${o}`);let f=Zt(a,o),d=o,n=kn,v=qr,b=qr,y=kn;for(;f!==kn;){let w=d/f,g=d%f,_=n-b*w,x=v-y*w;d=f,f=g,n=b,v=y,b=_,y=x}if(d!==qr)throw new Error("invert: does not exist");return Zt(n,o)}function dY(a,o=wi.P){let f=new Array(a.length),d=a.reduce((v,b,y)=>b===kn?v:(f[y]=v,Zt(v*b,o)),qr),n=Rp(d,o);return a.reduceRight((v,b,y)=>b===kn?v:(f[y]=Zt(v*f[y],o),Zt(v*b,o)),n),f}function $s(a,o){let{P:f}=wi,d=a;for(;o-- >kn;)d*=d,d%=f;return d}function cY(a){let{P:o}=wi,f=BigInt(5),d=BigInt(10),n=BigInt(20),v=BigInt(40),b=BigInt(80),M=a*a%o*a%o,w=$s(M,gl)*M%o,g=$s(w,qr)*a%o,_=$s(g,f)*g%o,x=$s(_,d)*_%o,E=$s(x,n)*x%o,R=$s(E,v)*E%o,T=$s(R,b)*R%o,N=$s(T,b)*R%o,P=$s(N,d)*_%o;return{pow_p_5_8:$s(P,gl)*a%o,b2:M}}function k3(a,o){let f=Zt(o*o*o),d=Zt(f*f*o),n=cY(a*d).pow_p_5_8,v=Zt(a*f*n),b=Zt(o*v*v),y=v,M=Zt(v*Jd),w=b===a,g=b===Zt(-a),_=b===Zt(-a*Jd);return w&&(v=y),(g||_)&&(v=M),u0(v)&&(v=Zt(-v)),{isValid:w||g,value:v}}function GE(a){return k3(qr,a)}function Ap(a){return Zt(ec(a),wi.l)}function pY(a,o){if(a.length!==o.length)return!1;for(let f=0;f<a.length;f++)if(a[f]!==o[f])return!1;return!0}function l0(a,o){let f=JE(a)?Uint8Array.from(a):T3(a);if(typeof o=="number"&&f.length!==o)throw new Error(`Expected ${o} bytes`);return f}function Bp(a,o,f=!0){if(!o)throw new TypeError("Specify max value");if(typeof a=="number"&&Number.isSafeInteger(a)&&(a=BigInt(a)),typeof a=="bigint"&&a<o){if(f){if(kn<a)return a}else if(kn<=a)return a}throw new TypeError("Expected valid scalar: 0 < scalar < max")}function vY(a){return a[0]&=248,a[31]&=127,a[31]|=64,a}function bY(a){if(a=typeof a=="bigint"||typeof a=="number"?YE(Bp(a,VE)):l0(a),a.length!==32)throw new Error("Expected 32 bytes");return a}function mY(a){let o=vY(a.slice(0,32)),f=a.slice(32,64),d=Ap(o),n=Yi.BASE.multiply(d),v=n.toRawBytes();return{head:o,prefix:f,scalar:d,point:n,pointBytes:v}}var B3;async function $3(a){return mY(await yl.sha512(bY(a)))}async function XE(a,o){a=l0(a);let{prefix:f,scalar:d,pointBytes:n}=await $3(o),v=Ap(await yl.sha512(f,a)),b=Yi.BASE.multiply(v),y=Ap(await yl.sha512(b.toRawBytes(),n,a)),M=Zt(v+y*d,wi.l);return new Yd(b,M).toRawBytes()}function gY(a,o,f){o=l0(o),f instanceof Yi||(f=Yi.fromHex(f,!1));let{r:d,s:n}=a instanceof Yd?a.assertValidity():Yd.fromHex(a),v=nn.BASE.multiplyUnsafe(n);return{r:d,s:n,SB:v,pub:f,msg:o}}function yY(a,o,f,d){let n=Ap(d),v=nn.fromAffine(a).multiplyUnsafe(n);return nn.fromAffine(o).add(v).subtract(f).multiplyUnsafe(wi.h).equals(nn.ZERO)}async function d0(a,o,f){let{r:d,SB:n,msg:v,pub:b}=gY(a,o,f),y=await yl.sha512(d.toRawBytes(),b.toRawBytes(),v);return yY(b,d,n,y)}Yi.BASE._setWindowSize(8);var h0={node:nY,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},yl={bytesToHex:Qd,hexToBytes:T3,concatBytes:WE,getExtendedPublicKey:$3,mod:Zt,invert:Rp,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:a=>{if(a=l0(a),a.length<40||a.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return Zt(ec(a),wi.l-qr)+qr},randomBytes:(a=32)=>{if(h0.web)return h0.web.getRandomValues(new Uint8Array(a));if(h0.node){let{randomBytes:o}=h0.node;return new Uint8Array(o(a).buffer)}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>yl.randomBytes(32),sha512:async(...a)=>{let o=WE(...a);if(h0.web){let f=await h0.web.subtle.digest("SHA-512",o.buffer);return new Uint8Array(f)}else{if(h0.node)return Uint8Array.from(h0.node.createHash("sha512").update(o).digest());throw new Error("The environment doesn't have sha512 function")}},precompute(a=8,o=Yi.BASE){let f=o.equals(Yi.BASE)?o:new Yi(o.x,o.y);return f._setWindowSize(a),f.multiply(gl),f},sha512Sync:void 0};Object.defineProperties(yl,{sha512Sync:{configurable:!1,get(){return B3},set(a){B3||(B3=a)}}});var Sa=class{_key;pk;ownerLength=Ir[2].pubLength;signatureLength=Ir[2].sigLength;_publicKey;get publicKey(){return this._publicKey}signatureType=2;constructor(o,f){this._key=o,this.pk=f}get key(){throw new Error("You must implement `key`")}sign(o){return XE(at.from(o),at.from(this.key))}static async verify(o,f,d){let n=o;return typeof o=="string"&&(n=QE.default.toBuffer(o)),d0(at.from(d),at.from(f),at.from(n))}};var fRe=Ae(Be(),1);Ie();Re();var _ge=Ae(Be(),1);Ie();Re();var Lme=Ae(Be(),1);Ie();Re();var Rme=Ae(Be(),1);Ie();Re();var fi=Ae(Go(),1);var i3e=Ae(Be(),1);Ie();Re();var Ybe=Ae(Be());Ie();Re();var tc={},lA=!1;function TY(){if(lA)return tc;lA=!0,tc.byteLength=y,tc.toByteArray=w,tc.fromByteArray=x;for(var a=[],o=[],f=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,v=d.length;n<v;++n)a[n]=d[n],o[d.charCodeAt(n)]=n;o[45]=62,o[95]=63;function b(E){var R=E.length;if(R%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=E.indexOf("=");T===-1&&(T=R);var N=T===R?0:4-T%4;return[T,N]}function y(E){var R=b(E),T=R[0],N=R[1];return(T+N)*3/4-N}function M(E,R,T){return(R+T)*3/4-T}function w(E){var R,T=b(E),N=T[0],P=T[1],L=new f(M(E,N,P)),D=0,Z=P>0?N-4:N,W;for(W=0;W<Z;W+=4)R=o[E.charCodeAt(W)]<<18|o[E.charCodeAt(W+1)]<<12|o[E.charCodeAt(W+2)]<<6|o[E.charCodeAt(W+3)],L[D++]=R>>16&255,L[D++]=R>>8&255,L[D++]=R&255;return P===2&&(R=o[E.charCodeAt(W)]<<2|o[E.charCodeAt(W+1)]>>4,L[D++]=R&255),P===1&&(R=o[E.charCodeAt(W)]<<10|o[E.charCodeAt(W+1)]<<4|o[E.charCodeAt(W+2)]>>2,L[D++]=R>>8&255,L[D++]=R&255),L}function g(E){return a[E>>18&63]+a[E>>12&63]+a[E>>6&63]+a[E&63]}function _(E,R,T){for(var N,P=[],L=R;L<T;L+=3)N=(E[L]<<16&16711680)+(E[L+1]<<8&65280)+(E[L+2]&255),P.push(g(N));return P.join("")}function x(E){for(var R,T=E.length,N=T%3,P=[],L=16383,D=0,Z=T-N;D<Z;D+=L)P.push(_(E,D,D+L>Z?Z:D+L));return N===1?(R=E[T-1],P.push(a[R>>2]+a[R<<4&63]+"==")):N===2&&(R=(E[T-2]<<8)+E[T-1],P.push(a[R>>10]+a[R>>4&63]+a[R<<2&63]+"=")),P.join("")}return tc}var Tp={},dA=!1;function kY(){return dA||(dA=!0,Tp.read=function(a,o,f,d,n){var v,b,y=n*8-d-1,M=(1<<y)-1,w=M>>1,g=-7,_=f?n-1:0,x=f?-1:1,E=a[o+_];for(_+=x,v=E&(1<<-g)-1,E>>=-g,g+=y;g>0;v=v*256+a[o+_],_+=x,g-=8);for(b=v&(1<<-g)-1,v>>=-g,g+=d;g>0;b=b*256+a[o+_],_+=x,g-=8);if(v===0)v=1-w;else{if(v===M)return b?NaN:(E?-1:1)*(1/0);b=b+Math.pow(2,d),v=v-w}return(E?-1:1)*b*Math.pow(2,v-d)},Tp.write=function(a,o,f,d,n,v){var b,y,M,w=v*8-n-1,g=(1<<w)-1,_=g>>1,x=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=d?0:v-1,R=d?1:-1,T=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(y=isNaN(o)?1:0,b=g):(b=Math.floor(Math.log(o)/Math.LN2),o*(M=Math.pow(2,-b))<1&&(b--,M*=2),b+_>=1?o+=x/M:o+=x*Math.pow(2,1-_),o*M>=2&&(b++,M/=2),b+_>=g?(y=0,b=g):b+_>=1?(y=(o*M-1)*Math.pow(2,n),b=b+_):(y=o*Math.pow(2,_-1)*Math.pow(2,n),b=0));n>=8;a[f+E]=y&255,E+=R,y/=256,n-=8);for(b=b<<n|y,w+=n;w>0;a[f+E]=b&255,E+=R,b/=256,w-=8);a[f+E-R]|=T*128}),Tp}var Ph={},cA=!1;function pn(){if(cA)return Ph;cA=!0;let a=TY(),o=kY(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ph.Buffer=b,Ph.SlowBuffer=P,Ph.INSPECT_MAX_BYTES=50;let d=2147483647;Ph.kMaxLength=d,b.TYPED_ARRAY_SUPPORT=n(),!b.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 n(){try{let $=new Uint8Array(1),A={foo:function(){return 42}};return Object.setPrototypeOf(A,Uint8Array.prototype),Object.setPrototypeOf($,A),$.foo()===42}catch{return!1}}Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.buffer}}),Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.byteOffset}});function v($){if($>d)throw new RangeError('The value "'+$+'" is invalid for option "size"');let A=new Uint8Array($);return Object.setPrototypeOf(A,b.prototype),A}function b($,A,I){if(typeof $=="number"){if(typeof A=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g($)}return y($,A,I)}b.poolSize=8192;function y($,A,I){if(typeof $=="string")return _($,A);if(ArrayBuffer.isView($))return E($);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(he($,ArrayBuffer)||$&&he($.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he($,SharedArrayBuffer)||$&&he($.buffer,SharedArrayBuffer)))return R($,A,I);if(typeof $=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=$.valueOf&&$.valueOf();if(C!=null&&C!==$)return b.from(C,A,I);let H=T($);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]=="function")return b.from($[Symbol.toPrimitive]("string"),A,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}b.from=function($,A,I){return y($,A,I)},Object.setPrototypeOf(b.prototype,Uint8Array.prototype),Object.setPrototypeOf(b,Uint8Array);function M($){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 w($,A,I){return M($),$<=0?v($):A!==void 0?typeof I=="string"?v($).fill(A,I):v($).fill(A):v($)}b.alloc=function($,A,I){return w($,A,I)};function g($){return M($),v($<0?0:N($)|0)}b.allocUnsafe=function($){return g($)},b.allocUnsafeSlow=function($){return g($)};function _($,A){if((typeof A!="string"||A==="")&&(A="utf8"),!b.isEncoding(A))throw new TypeError("Unknown encoding: "+A);let I=L($,A)|0,C=v(I),H=C.write($,A);return H!==I&&(C=C.slice(0,H)),C}function x($){let A=$.length<0?0:N($.length)|0,I=v(A);for(let C=0;C<A;C+=1)I[C]=$[C]&255;return I}function E($){if(he($,Uint8Array)){let A=new Uint8Array($);return R(A.buffer,A.byteOffset,A.byteLength)}return x($)}function R($,A,I){if(A<0||$.byteLength<A)throw new RangeError('"offset" is outside of buffer bounds');if($.byteLength<A+(I||0))throw new RangeError('"length" is outside of buffer bounds');let C;return A===void 0&&I===void 0?C=new Uint8Array($):I===void 0?C=new Uint8Array($,A):C=new Uint8Array($,A,I),Object.setPrototypeOf(C,b.prototype),C}function T($){if(b.isBuffer($)){let A=N($.length)|0,I=v(A);return I.length===0||$.copy(I,0,0,A),I}if($.length!==void 0)return typeof $.length!="number"||nt($.length)?v(0):x($);if($.type==="Buffer"&&Array.isArray($.data))return x($.data)}function N($){if($>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return $|0}function P($){return+$!=$&&($=0),b.alloc(+$)}b.isBuffer=function(A){return A!=null&&A._isBuffer===!0&&A!==b.prototype},b.compare=function(A,I){if(he(A,Uint8Array)&&(A=b.from(A,A.offset,A.byteLength)),he(I,Uint8Array)&&(I=b.from(I,I.offset,I.byteLength)),!b.isBuffer(A)||!b.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(A===I)return 0;let C=A.length,H=I.length;for(let ne=0,J=Math.min(C,H);ne<J;++ne)if(A[ne]!==I[ne]){C=A[ne],H=I[ne];break}return C<H?-1:H<C?1:0},b.isEncoding=function(A){switch(String(A).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}},b.concat=function(A,I){if(!Array.isArray(A))throw new TypeError('"list" argument must be an Array of Buffers');if(A.length===0)return b.alloc(0);let C;if(I===void 0)for(I=0,C=0;C<A.length;++C)I+=A[C].length;let H=b.allocUnsafe(I),ne=0;for(C=0;C<A.length;++C){let J=A[C];if(he(J,Uint8Array))ne+J.length>H.length?(b.isBuffer(J)||(J=b.from(J)),J.copy(H,ne)):Uint8Array.prototype.set.call(H,J,ne);else if(b.isBuffer(J))J.copy(H,ne);else throw new TypeError('"list" argument must be an Array of Buffers');ne+=J.length}return H};function L($,A){if(b.isBuffer($))return $.length;if(ArrayBuffer.isView($)||he($,ArrayBuffer))return $.byteLength;if(typeof $!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);let I=$.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&I===0)return 0;let H=!1;for(;;)switch(A){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return me($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return ye($).length;default:if(H)return C?-1:me($).length;A=(""+A).toLowerCase(),H=!0}}b.byteLength=L;function D($,A,I){let C=!1;if((A===void 0||A<0)&&(A=0),A>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,A>>>=0,I<=A))return"";for($||($="utf8");;)switch($){case"hex":return l(this,A,I);case"utf8":case"utf-8":return i(this,A,I);case"ascii":return c(this,A,I);case"latin1":case"binary":return m(this,A,I);case"base64":return r(this,A,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t(this,A,I);default:if(C)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),C=!0}}b.prototype._isBuffer=!0;function Z($,A,I){let C=$[A];$[A]=$[I],$[I]=C}b.prototype.swap16=function(){let A=this.length;if(A%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;I<A;I+=2)Z(this,I,I+1);return this},b.prototype.swap32=function(){let A=this.length;if(A%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let I=0;I<A;I+=4)Z(this,I,I+3),Z(this,I+1,I+2);return this},b.prototype.swap64=function(){let A=this.length;if(A%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let I=0;I<A;I+=8)Z(this,I,I+7),Z(this,I+1,I+6),Z(this,I+2,I+5),Z(this,I+3,I+4);return this},b.prototype.toString=function(){let A=this.length;return A===0?"":arguments.length===0?i(this,0,A):D.apply(this,arguments)},b.prototype.toLocaleString=b.prototype.toString,b.prototype.equals=function(A){if(!b.isBuffer(A))throw new TypeError("Argument must be a Buffer");return this===A?!0:b.compare(this,A)===0},b.prototype.inspect=function(){let A="",I=Ph.INSPECT_MAX_BYTES;return A=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(A+=" ... "),"<Buffer "+A+">"},f&&(b.prototype[f]=b.prototype.inspect),b.prototype.compare=function(A,I,C,H,ne){if(he(A,Uint8Array)&&(A=b.from(A,A.offset,A.byteLength)),!b.isBuffer(A))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof A);if(I===void 0&&(I=0),C===void 0&&(C=A?A.length:0),H===void 0&&(H=0),ne===void 0&&(ne=this.length),I<0||C>A.length||H<0||ne>this.length)throw new RangeError("out of range index");if(H>=ne&&I>=C)return 0;if(H>=ne)return-1;if(I>=C)return 1;if(I>>>=0,C>>>=0,H>>>=0,ne>>>=0,this===A)return 0;let J=ne-H,de=C-I,st=Math.min(J,de),le=this.slice(H,ne),ve=A.slice(I,C);for(let ot=0;ot<st;++ot)if(le[ot]!==ve[ot]){J=le[ot],de=ve[ot];break}return J<de?-1:de<J?1:0};function W($,A,I,C,H){if($.length===0)return-1;if(typeof I=="string"?(C=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,nt(I)&&(I=H?0:$.length-1),I<0&&(I=$.length+I),I>=$.length){if(H)return-1;I=$.length-1}else if(I<0)if(H)I=0;else return-1;if(typeof A=="string"&&(A=b.from(A,C)),b.isBuffer(A))return A.length===0?-1:Q($,A,I,C,H);if(typeof A=="number")return A=A&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call($,A,I):Uint8Array.prototype.lastIndexOf.call($,A,I):Q($,[A],I,C,H);throw new TypeError("val must be string, number or Buffer")}function Q($,A,I,C,H){let ne=1,J=$.length,de=A.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if($.length<2||A.length<2)return-1;ne=2,J/=2,de/=2,I/=2}function st(ve,ot){return ne===1?ve[ot]:ve.readUInt16BE(ot*ne)}let le;if(H){let ve=-1;for(le=I;le<J;le++)if(st($,le)===st(A,ve===-1?0:le-ve)){if(ve===-1&&(ve=le),le-ve+1===de)return ve*ne}else ve!==-1&&(le-=le-ve),ve=-1}else for(I+de>J&&(I=J-de),le=I;le>=0;le--){let ve=!0;for(let ot=0;ot<de;ot++)if(st($,le+ot)!==st(A,ot)){ve=!1;break}if(ve)return le}return-1}b.prototype.includes=function(A,I,C){return this.indexOf(A,I,C)!==-1},b.prototype.indexOf=function(A,I,C){return W(this,A,I,C,!0)},b.prototype.lastIndexOf=function(A,I,C){return W(this,A,I,C,!1)};function K($,A,I,C){I=Number(I)||0;let H=$.length-I;C?(C=Number(C),C>H&&(C=H)):C=H;let ne=A.length;C>ne/2&&(C=ne/2);let J;for(J=0;J<C;++J){let de=parseInt(A.substr(J*2,2),16);if(nt(de))return J;$[I+J]=de}return J}function z($,A,I,C){return fe(me(A,$.length-I),$,I,C)}function X($,A,I,C){return fe(re(A),$,I,C)}function p($,A,I,C){return fe(ye(A),$,I,C)}function e($,A,I,C){return fe(ae(A,$.length-I),$,I,C)}b.prototype.write=function(A,I,C,H){if(I===void 0)H="utf8",C=this.length,I=0;else if(C===void 0&&typeof I=="string")H=I,C=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(C)?(C=C>>>0,H===void 0&&(H="utf8")):(H=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ne=this.length-I;if((C===void 0||C>ne)&&(C=ne),A.length>0&&(C<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let J=!1;for(;;)switch(H){case"hex":return K(this,A,I,C);case"utf8":case"utf-8":return z(this,A,I,C);case"ascii":case"latin1":case"binary":return X(this,A,I,C);case"base64":return p(this,A,I,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e(this,A,I,C);default:if(J)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),J=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function r($,A,I){return A===0&&I===$.length?a.fromByteArray($):a.fromByteArray($.slice(A,I))}function i($,A,I){I=Math.min($.length,I);let C=[],H=A;for(;H<I;){let ne=$[H],J=null,de=ne>239?4:ne>223?3:ne>191?2:1;if(H+de<=I){let st,le,ve,ot;switch(de){case 1:ne<128&&(J=ne);break;case 2:st=$[H+1],(st&192)===128&&(ot=(ne&31)<<6|st&63,ot>127&&(J=ot));break;case 3:st=$[H+1],le=$[H+2],(st&192)===128&&(le&192)===128&&(ot=(ne&15)<<12|(st&63)<<6|le&63,ot>2047&&(ot<55296||ot>57343)&&(J=ot));break;case 4:st=$[H+1],le=$[H+2],ve=$[H+3],(st&192)===128&&(le&192)===128&&(ve&192)===128&&(ot=(ne&15)<<18|(st&63)<<12|(le&63)<<6|ve&63,ot>65535&&ot<1114112&&(J=ot))}}J===null?(J=65533,de=1):J>65535&&(J-=65536,C.push(J>>>10&1023|55296),J=56320|J&1023),C.push(J),H+=de}return h(C)}let s=4096;function h($){let A=$.length;if(A<=s)return String.fromCharCode.apply(String,$);let I="",C=0;for(;C<A;)I+=String.fromCharCode.apply(String,$.slice(C,C+=s));return I}function c($,A,I){let C="";I=Math.min($.length,I);for(let H=A;H<I;++H)C+=String.fromCharCode($[H]&127);return C}function m($,A,I){let C="";I=Math.min($.length,I);for(let H=A;H<I;++H)C+=String.fromCharCode($[H]);return C}function l($,A,I){let C=$.length;(!A||A<0)&&(A=0),(!I||I<0||I>C)&&(I=C);let H="";for(let ne=A;ne<I;++ne)H+=ce[$[ne]];return H}function t($,A,I){let C=$.slice(A,I),H="";for(let ne=0;ne<C.length-1;ne+=2)H+=String.fromCharCode(C[ne]+C[ne+1]*256);return H}b.prototype.slice=function(A,I){let C=this.length;A=~~A,I=I===void 0?C:~~I,A<0?(A+=C,A<0&&(A=0)):A>C&&(A=C),I<0?(I+=C,I<0&&(I=0)):I>C&&(I=C),I<A&&(I=A);let H=this.subarray(A,I);return Object.setPrototypeOf(H,b.prototype),H};function u($,A,I){if($%1!==0||$<0)throw new RangeError("offset is not uint");if($+A>I)throw new RangeError("Trying to access beyond buffer length")}b.prototype.readUintLE=b.prototype.readUIntLE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=this[A],ne=1,J=0;for(;++J<I&&(ne*=256);)H+=this[A+J]*ne;return H},b.prototype.readUintBE=b.prototype.readUIntBE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=this[A+--I],ne=1;for(;I>0&&(ne*=256);)H+=this[A+--I]*ne;return H},b.prototype.readUint8=b.prototype.readUInt8=function(A,I){return A=A>>>0,I||u(A,1,this.length),this[A]},b.prototype.readUint16LE=b.prototype.readUInt16LE=function(A,I){return A=A>>>0,I||u(A,2,this.length),this[A]|this[A+1]<<8},b.prototype.readUint16BE=b.prototype.readUInt16BE=function(A,I){return A=A>>>0,I||u(A,2,this.length),this[A]<<8|this[A+1]},b.prototype.readUint32LE=b.prototype.readUInt32LE=function(A,I){return A=A>>>0,I||u(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+this[A+3]*16777216},b.prototype.readUint32BE=b.prototype.readUInt32BE=function(A,I){return A=A>>>0,I||u(A,4,this.length),this[A]*16777216+(this[A+1]<<16|this[A+2]<<8|this[A+3])},b.prototype.readBigUInt64LE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=I+this[++A]*2**8+this[++A]*2**16+this[++A]*2**24,ne=this[++A]+this[++A]*2**8+this[++A]*2**16+C*2**24;return BigInt(H)+(BigInt(ne)<<BigInt(32))}),b.prototype.readBigUInt64BE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=I*2**24+this[++A]*2**16+this[++A]*2**8+this[++A],ne=this[++A]*2**24+this[++A]*2**16+this[++A]*2**8+C;return(BigInt(H)<<BigInt(32))+BigInt(ne)}),b.prototype.readIntLE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=this[A],ne=1,J=0;for(;++J<I&&(ne*=256);)H+=this[A+J]*ne;return ne*=128,H>=ne&&(H-=Math.pow(2,8*I)),H},b.prototype.readIntBE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=I,ne=1,J=this[A+--H];for(;H>0&&(ne*=256);)J+=this[A+--H]*ne;return ne*=128,J>=ne&&(J-=Math.pow(2,8*I)),J},b.prototype.readInt8=function(A,I){return A=A>>>0,I||u(A,1,this.length),this[A]&128?(255-this[A]+1)*-1:this[A]},b.prototype.readInt16LE=function(A,I){A=A>>>0,I||u(A,2,this.length);let C=this[A]|this[A+1]<<8;return C&32768?C|4294901760:C},b.prototype.readInt16BE=function(A,I){A=A>>>0,I||u(A,2,this.length);let C=this[A+1]|this[A]<<8;return C&32768?C|4294901760:C},b.prototype.readInt32LE=function(A,I){return A=A>>>0,I||u(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},b.prototype.readInt32BE=function(A,I){return A=A>>>0,I||u(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},b.prototype.readBigInt64LE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=this[A+4]+this[A+5]*2**8+this[A+6]*2**16+(C<<24);return(BigInt(H)<<BigInt(32))+BigInt(I+this[++A]*2**8+this[++A]*2**16+this[++A]*2**24)}),b.prototype.readBigInt64BE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=(I<<24)+this[++A]*2**16+this[++A]*2**8+this[++A];return(BigInt(H)<<BigInt(32))+BigInt(this[++A]*2**24+this[++A]*2**16+this[++A]*2**8+C)}),b.prototype.readFloatLE=function(A,I){return A=A>>>0,I||u(A,4,this.length),o.read(this,A,!0,23,4)},b.prototype.readFloatBE=function(A,I){return A=A>>>0,I||u(A,4,this.length),o.read(this,A,!1,23,4)},b.prototype.readDoubleLE=function(A,I){return A=A>>>0,I||u(A,8,this.length),o.read(this,A,!0,52,8)},b.prototype.readDoubleBE=function(A,I){return A=A>>>0,I||u(A,8,this.length),o.read(this,A,!1,52,8)};function S($,A,I,C,H,ne){if(!b.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>H||A<ne)throw new RangeError('"value" argument is out of bounds');if(I+C>$.length)throw new RangeError("Index out of range")}b.prototype.writeUintLE=b.prototype.writeUIntLE=function(A,I,C,H){if(A=+A,I=I>>>0,C=C>>>0,!H){let de=Math.pow(2,8*C)-1;S(this,A,I,C,de,0)}let ne=1,J=0;for(this[I]=A&255;++J<C&&(ne*=256);)this[I+J]=A/ne&255;return I+C},b.prototype.writeUintBE=b.prototype.writeUIntBE=function(A,I,C,H){if(A=+A,I=I>>>0,C=C>>>0,!H){let de=Math.pow(2,8*C)-1;S(this,A,I,C,de,0)}let ne=C-1,J=1;for(this[I+ne]=A&255;--ne>=0&&(J*=256);)this[I+ne]=A/J&255;return I+C},b.prototype.writeUint8=b.prototype.writeUInt8=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,1,255,0),this[I]=A&255,I+1},b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,65535,0),this[I]=A&255,this[I+1]=A>>>8,I+2},b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,65535,0),this[I]=A>>>8,this[I+1]=A&255,I+2},b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,4294967295,0),this[I+3]=A>>>24,this[I+2]=A>>>16,this[I+1]=A>>>8,this[I]=A&255,I+4},b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,4294967295,0),this[I]=A>>>24,this[I+1]=A>>>16,this[I+2]=A>>>8,this[I+3]=A&255,I+4};function B($,A,I,C,H){Y(A,C,H,$,I,7);let ne=Number(A&BigInt(4294967295));$[I++]=ne,ne=ne>>8,$[I++]=ne,ne=ne>>8,$[I++]=ne,ne=ne>>8,$[I++]=ne;let J=Number(A>>BigInt(32)&BigInt(4294967295));return $[I++]=J,J=J>>8,$[I++]=J,J=J>>8,$[I++]=J,J=J>>8,$[I++]=J,I}function k($,A,I,C,H){Y(A,C,H,$,I,7);let ne=Number(A&BigInt(4294967295));$[I+7]=ne,ne=ne>>8,$[I+6]=ne,ne=ne>>8,$[I+5]=ne,ne=ne>>8,$[I+4]=ne;let J=Number(A>>BigInt(32)&BigInt(4294967295));return $[I+3]=J,J=J>>8,$[I+2]=J,J=J>>8,$[I+1]=J,J=J>>8,$[I]=J,I+8}b.prototype.writeBigUInt64LE=be(function(A,I=0){return B(this,A,I,BigInt(0),BigInt("0xffffffffffffffff"))}),b.prototype.writeBigUInt64BE=be(function(A,I=0){return k(this,A,I,BigInt(0),BigInt("0xffffffffffffffff"))}),b.prototype.writeIntLE=function(A,I,C,H){if(A=+A,I=I>>>0,!H){let st=Math.pow(2,8*C-1);S(this,A,I,C,st-1,-st)}let ne=0,J=1,de=0;for(this[I]=A&255;++ne<C&&(J*=256);)A<0&&de===0&&this[I+ne-1]!==0&&(de=1),this[I+ne]=(A/J>>0)-de&255;return I+C},b.prototype.writeIntBE=function(A,I,C,H){if(A=+A,I=I>>>0,!H){let st=Math.pow(2,8*C-1);S(this,A,I,C,st-1,-st)}let ne=C-1,J=1,de=0;for(this[I+ne]=A&255;--ne>=0&&(J*=256);)A<0&&de===0&&this[I+ne+1]!==0&&(de=1),this[I+ne]=(A/J>>0)-de&255;return I+C},b.prototype.writeInt8=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,1,127,-128),A<0&&(A=255+A+1),this[I]=A&255,I+1},b.prototype.writeInt16LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,32767,-32768),this[I]=A&255,this[I+1]=A>>>8,I+2},b.prototype.writeInt16BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,32767,-32768),this[I]=A>>>8,this[I+1]=A&255,I+2},b.prototype.writeInt32LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,2147483647,-2147483648),this[I]=A&255,this[I+1]=A>>>8,this[I+2]=A>>>16,this[I+3]=A>>>24,I+4},b.prototype.writeInt32BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),this[I]=A>>>24,this[I+1]=A>>>16,this[I+2]=A>>>8,this[I+3]=A&255,I+4},b.prototype.writeBigInt64LE=be(function(A,I=0){return B(this,A,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),b.prototype.writeBigInt64BE=be(function(A,I=0){return k(this,A,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function q($,A,I,C,H,ne){if(I+C>$.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function F($,A,I,C,H){return A=+A,I=I>>>0,H||q($,A,I,4),o.write($,A,I,C,23,4),I+4}b.prototype.writeFloatLE=function(A,I,C){return F(this,A,I,!0,C)},b.prototype.writeFloatBE=function(A,I,C){return F(this,A,I,!1,C)};function ee($,A,I,C,H){return A=+A,I=I>>>0,H||q($,A,I,8),o.write($,A,I,C,52,8),I+8}b.prototype.writeDoubleLE=function(A,I,C){return ee(this,A,I,!0,C)},b.prototype.writeDoubleBE=function(A,I,C){return ee(this,A,I,!1,C)},b.prototype.copy=function(A,I,C,H){if(!b.isBuffer(A))throw new TypeError("argument should be a Buffer");if(C||(C=0),!H&&H!==0&&(H=this.length),I>=A.length&&(I=A.length),I||(I=0),H>0&&H<C&&(H=C),H===C||A.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),A.length-I<H-C&&(H=A.length-I+C);let ne=H-C;return this===A&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(I,C,H):Uint8Array.prototype.set.call(A,this.subarray(C,H),I),ne},b.prototype.fill=function(A,I,C,H){if(typeof A=="string"){if(typeof I=="string"?(H=I,I=0,C=this.length):typeof C=="string"&&(H=C,C=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!b.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(A.length===1){let J=A.charCodeAt(0);(H==="utf8"&&J<128||H==="latin1")&&(A=J)}}else typeof A=="number"?A=A&255:typeof A=="boolean"&&(A=Number(A));if(I<0||this.length<I||this.length<C)throw new RangeError("Out of range index");if(C<=I)return this;I=I>>>0,C=C===void 0?this.length:C>>>0,A||(A=0);let ne;if(typeof A=="number")for(ne=I;ne<C;++ne)this[ne]=A;else{let J=b.isBuffer(A)?A:b.from(A,H),de=J.length;if(de===0)throw new TypeError('The value "'+A+'" is invalid for argument "value"');for(ne=0;ne<C-I;++ne)this[ne+I]=J[ne%de]}return this};let te={};function O($,A,I){te[$]=class extends I{constructor(){super(),Object.defineProperty(this,"message",{value:A.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${$}]`,this.stack,delete this.name}get code(){return $}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${$}]: ${this.message}`}}}O("ERR_BUFFER_OUT_OF_BOUNDS",function($){return $?`${$} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function($,A){return`The "${$}" argument must be of type number. Received type ${typeof A}`},TypeError),O("ERR_OUT_OF_RANGE",function($,A,I){let C=`The value of "${$}" is out of range.`,H=I;return Number.isInteger(I)&&Math.abs(I)>2**32?H=U(String(I)):typeof I=="bigint"&&(H=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(H=U(H)),H+="n"),C+=` It must be ${A}. Received ${H}`,C},RangeError);function U($){let A="",I=$.length,C=$[0]==="-"?1:0;for(;I>=C+4;I-=3)A=`_${$.slice(I-3,I)}${A}`;return`${$.slice(0,I)}${A}`}function oe($,A,I){j(A,"offset"),($[A]===void 0||$[A+I]===void 0)&&V(A,$.length-(I+1))}function Y($,A,I,C,H,ne){if($>I||$<A){let J=typeof A=="bigint"?"n":"",de;throw A===0||A===BigInt(0)?de=`>= 0${J} and < 2${J} ** ${(ne+1)*8}${J}`:de=`>= -(2${J} ** ${(ne+1)*8-1}${J}) and < 2 ** ${(ne+1)*8-1}${J}`,new te.ERR_OUT_OF_RANGE("value",de,$)}oe(C,H,ne)}function j($,A){if(typeof $!="number")throw new te.ERR_INVALID_ARG_TYPE(A,"number",$)}function V($,A,I){throw Math.floor($)!==$?(j($,I),new te.ERR_OUT_OF_RANGE("offset","an integer",$)):A<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${A}`,$)}let G=/[^+/0-9A-Za-z-_]/g;function ie($){if($=$.split("=")[0],$=$.trim().replace(G,""),$.length<2)return"";for(;$.length%4!==0;)$=$+"=";return $}function me($,A){A=A||1/0;let I,C=$.length,H=null,ne=[];for(let J=0;J<C;++J){if(I=$.charCodeAt(J),I>55295&&I<57344){if(!H){if(I>56319){(A-=3)>-1&&ne.push(239,191,189);continue}else if(J+1===C){(A-=3)>-1&&ne.push(239,191,189);continue}H=I;continue}if(I<56320){(A-=3)>-1&&ne.push(239,191,189),H=I;continue}I=(H-55296<<10|I-56320)+65536}else H&&(A-=3)>-1&&ne.push(239,191,189);if(H=null,I<128){if((A-=1)<0)break;ne.push(I)}else if(I<2048){if((A-=2)<0)break;ne.push(I>>6|192,I&63|128)}else if(I<65536){if((A-=3)<0)break;ne.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((A-=4)<0)break;ne.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return ne}function re($){let A=[];for(let I=0;I<$.length;++I)A.push($.charCodeAt(I)&255);return A}function ae($,A){let I,C,H,ne=[];for(let J=0;J<$.length&&!((A-=2)<0);++J)I=$.charCodeAt(J),C=I>>8,H=I%256,ne.push(H),ne.push(C);return ne}function ye($){return a.toByteArray(ie($))}function fe($,A,I,C){let H;for(H=0;H<C&&!(H+I>=A.length||H>=$.length);++H)A[H+I]=$[H];return H}function he($,A){return $ instanceof A||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===A.name}function nt($){return $!==$}let ce=function(){let $="0123456789abcdef",A=new Array(256);for(let I=0;I<16;++I){let C=I*16;for(let H=0;H<16;++H)A[C+H]=$[I]+$[H]}return A}();function be($){return typeof BigInt>"u"?ut:$}function ut(){throw new Error("BigInt not supported")}return Ph}var rc={},pA=!1;function wr(){if(pA)return rc;pA=!0;var a=pn(),o=a.Buffer;function f(n,v){for(var b in n)v[b]=n[b]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?rc=a:(f(a,rc),rc.Buffer=d);function d(n,v,b){return o(n,v,b)}return d.prototype=Object.create(o.prototype),f(o,d),d.from=function(n,v,b){if(typeof n=="number")throw new TypeError("Argument must not be a number");return o(n,v,b)},d.alloc=function(n,v,b){if(typeof n!="number")throw new TypeError("Argument must be a number");var y=o(n);return v!==void 0?typeof b=="string"?y.fill(v,b):y.fill(v):y.fill(0),y},d.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return o(n)},d.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(n)},rc}var N3={},vA=!1;function $Y(){if(vA)return N3;vA=!0;var a=wr().Buffer,o=a.isEncoding||function(P){switch(P=""+P,P&&P.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 f(P){if(!P)return"utf8";for(var L;;)switch(P){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 P;default:if(L)return;P=(""+P).toLowerCase(),L=!0}}function d(P){var L=f(P);if(typeof L!="string"&&(a.isEncoding===o||!o(P)))throw new Error("Unknown encoding: "+P);return L||P}N3.StringDecoder=n;function n(P){this.encoding=d(P);var L;switch(this.encoding){case"utf16le":this.text=_,this.end=x,L=4;break;case"utf8":this.fillLast=M,L=4;break;case"base64":this.text=E,this.end=R,L=3;break;default:this.write=T,this.end=N;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(L)}n.prototype.write=function(P){if(P.length===0)return"";var L,D;if(this.lastNeed){if(L=this.fillLast(P),L===void 0)return"";D=this.lastNeed,this.lastNeed=0}else D=0;return D<P.length?L?L+this.text(P,D):this.text(P,D):L||""},n.prototype.end=g,n.prototype.text=w,n.prototype.fillLast=function(P){if(this.lastNeed<=P.length)return P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,P.length),this.lastNeed-=P.length};function v(P){return P<=127?0:P>>5===6?2:P>>4===14?3:P>>3===30?4:P>>6===2?-1:-2}function b(P,L,D){var Z=L.length-1;if(Z<D)return 0;var W=v(L[Z]);return W>=0?(W>0&&(P.lastNeed=W-1),W):--Z<D||W===-2?0:(W=v(L[Z]),W>=0?(W>0&&(P.lastNeed=W-2),W):--Z<D||W===-2?0:(W=v(L[Z]),W>=0?(W>0&&(W===2?W=0:P.lastNeed=W-3),W):0))}function y(P,L,D){if((L[0]&192)!==128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&L.length>1){if((L[1]&192)!==128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&L.length>2&&(L[2]&192)!==128)return P.lastNeed=2,"\uFFFD"}}function M(P){var L=this.lastTotal-this.lastNeed,D=y(this,P);if(D!==void 0)return D;if(this.lastNeed<=P.length)return P.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,L,0,P.length),this.lastNeed-=P.length}function w(P,L){var D=b(this,P,L);if(!this.lastNeed)return P.toString("utf8",L);this.lastTotal=D;var Z=P.length-(D-this.lastNeed);return P.copy(this.lastChar,0,Z),P.toString("utf8",L,Z)}function g(P){var L=P&&P.length?this.write(P):"";return this.lastNeed?L+"\uFFFD":L}function _(P,L){if((P.length-L)%2===0){var D=P.toString("utf16le",L);if(D){var Z=D.charCodeAt(D.length-1);if(Z>=55296&&Z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",L,P.length-1)}function x(P){var L=P&&P.length?this.write(P):"";if(this.lastNeed){var D=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,D)}return L}function E(P,L){var D=(P.length-L)%3;return D===0?P.toString("base64",L):(this.lastNeed=3-D,this.lastTotal=3,D===1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",L,P.length-D))}function R(P){var L=P&&P.length?this.write(P):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function T(P){return P.toString(this.encoding)}function N(P){return P&&P.length?this.write(P):""}return N3}var w2=$Y();w2.StringDecoder;var rbe=w2.StringDecoder;function z9(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}var Pf=[],Ll=!1,uu,Gv=-1;function PY(){!Ll||!uu||(Ll=!1,uu.length?Pf=uu.concat(Pf):Gv=-1,Pf.length&&dD())}function dD(){if(!Ll){var a=setTimeout(PY,0);Ll=!0;for(var o=Pf.length;o;){for(uu=Pf,Pf=[];++Gv<o;)uu&&uu[Gv].run();Gv=-1,o=Pf.length}uu=null,Ll=!1,clearTimeout(a)}}function NY(a){var o=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)o[f-1]=arguments[f];Pf.push(new cD(a,o)),Pf.length===1&&!Ll&&setTimeout(dD,0)}function cD(a,o){this.fun=a,this.array=o}cD.prototype.run=function(){this.fun.apply(null,this.array)};var CY="browser",LY="x64",DY="browser",OY={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},qY=["/usr/bin/node"],UY=[],FY="v16.8.0",zY={},HY=function(a,o){console.warn((o?o+": ":"")+a)},KY=function(a){z9("binding")},jY=function(a){return 0},WY=function(){return"/"},ZY=function(a){},GY={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function Jn(){}var VY=Jn,JY=[];function YY(a){z9("_linkedBinding")}var XY={},QY=!1,eX={};function tX(a){z9("dlopen")}function rX(){return[]}function iX(){return[]}var nX=Jn,aX=Jn,H9=function(){return{}},oX=H9,sX=H9,fX=Jn,hX=Jn,uX=Jn,lX={};function dX(a,o){if(!a)throw new Error(o||"assertion error")}var cX={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},pX=Jn,vX=Jn;function bX(){return!1}var mX=Jn,gX=Jn,yX=Jn,wX=Jn,MX=Jn,_X=void 0,xX=void 0,SX=void 0,EX=Jn,AX=2,BX=1,RX="/bin/usr/node",IX=9229,TX="node",kX=[],$X=Jn,U0={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};U0.now===void 0&&(C3=Date.now(),U0.timing&&U0.timing.navigationStart&&(C3=U0.timing.navigationStart),U0.now=()=>Date.now()-C3);var C3;function PX(){return U0.now()/1e3}var a9=1e9;function o9(a){var o=Math.floor((Date.now()-U0.now())*.001),f=U0.now()*.001,d=Math.floor(f)+o,n=Math.floor(f%1*1e9);return a&&(d=d-a[0],n=n-a[1],n<0&&(d--,n+=a9)),[d,n]}o9.bigint=function(a){var o=o9(a);return typeof BigInt>"u"?o[0]*a9+o[1]:BigInt(o[0]*a9)+BigInt(o[1])};var NX=10,CX={},LX=0;function K0(){return Eu}var DX=K0,OX=K0,qX=K0,UX=K0,FX=K0,zX=Jn,HX=K0,KX=K0;function jX(a){return[]}var Eu={version:FY,versions:zY,arch:LY,platform:DY,release:GY,_rawDebug:VY,moduleLoadList:JY,binding:KY,_linkedBinding:YY,_events:CX,_eventsCount:LX,_maxListeners:NX,on:K0,addListener:DX,once:OX,off:qX,removeListener:UX,removeAllListeners:FX,emit:zX,prependListener:HX,prependOnceListener:KX,listeners:jX,domain:XY,_exiting:QY,config:eX,dlopen:tX,uptime:PX,_getActiveRequests:rX,_getActiveHandles:iX,reallyExit:nX,_kill:aX,cpuUsage:H9,resourceUsage:oX,memoryUsage:sX,kill:fX,exit:hX,openStdin:uX,allowedNodeEnvironmentFlags:lX,assert:dX,features:cX,_fatalExceptions:pX,setUncaughtExceptionCaptureCallback:vX,hasUncaughtExceptionCaptureCallback:bX,emitWarning:HY,nextTick:NY,_tickCallback:mX,_debugProcess:gX,_debugEnd:yX,_startProfilerIdleNotifier:wX,_stopProfilerIdleNotifier:MX,stdout:_X,stdin:SX,stderr:xX,abort:EX,umask:jY,chdir:ZY,cwd:WY,env:OY,title:CY,argv:qY,execArgv:UY,pid:AX,ppid:BX,execPath:RX,debugPort:IX,hrtime:o9,argv0:TX,_preload_modules:kX,setSourceMapsEnabled:$X},kp={},bA=!1;function Sr(){return bA||(bA=!0,typeof Object.create=="function"?kp=function(o,f){f&&(o.super_=f,o.prototype=Object.create(f.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:kp=function(o,f){if(f){o.super_=f;var d=function(){};d.prototype=f.prototype,o.prototype=new d,o.prototype.constructor=o}}),kp}var pD,vD,Dl=typeof Reflect=="object"?Reflect:null,mA=Dl&&typeof Dl.apply=="function"?Dl.apply:function(a,o,f){return Function.prototype.apply.call(a,o,f)};vD=Dl&&typeof Dl.ownKeys=="function"?Dl.ownKeys:Object.getOwnPropertySymbols?function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:function(a){return Object.getOwnPropertyNames(a)};var gA=Number.isNaN||function(a){return a!=a};function di(){di.init.call(this)}pD=di,di.EventEmitter=di,di.prototype._events=void 0,di.prototype._eventsCount=0,di.prototype._maxListeners=void 0;var yA=10;function Vv(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}function bD(a){return a._maxListeners===void 0?di.defaultMaxListeners:a._maxListeners}function wA(a,o,f,d){var n,v,b,y;if(Vv(f),(v=a._events)===void 0?(v=a._events=Object.create(null),a._eventsCount=0):(v.newListener!==void 0&&(a.emit("newListener",o,f.listener?f.listener:f),v=a._events),b=v[o]),b===void 0)b=v[o]=f,++a._eventsCount;else if(typeof b=="function"?b=v[o]=d?[f,b]:[b,f]:d?b.unshift(f):b.push(f),(n=bD(a))>0&&b.length>n&&!b.warned){b.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+b.length+" "+String(o)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=a,M.type=o,M.count=b.length,y=M,console&&console.warn&&console.warn(y)}return a}function WX(){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 MA(a,o,f){var d={fired:!1,wrapFn:void 0,target:a,type:o,listener:f},n=WX.bind(d);return n.listener=f,d.wrapFn=n,n}function _A(a,o,f){var d=a._events;if(d===void 0)return[];var n=d[o];return n===void 0?[]:typeof n=="function"?f?[n.listener||n]:[n]:f?function(v){for(var b=new Array(v.length),y=0;y<b.length;++y)b[y]=v[y].listener||v[y];return b}(n):mD(n,n.length)}function xA(a){var o=this._events;if(o!==void 0){var f=o[a];if(typeof f=="function")return 1;if(f!==void 0)return f.length}return 0}function mD(a,o){for(var f=new Array(o),d=0;d<o;++d)f[d]=a[d];return f}Object.defineProperty(di,"defaultMaxListeners",{enumerable:!0,get:function(){return yA},set:function(a){if(typeof a!="number"||a<0||gA(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");yA=a}}),di.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},di.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||gA(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this},di.prototype.getMaxListeners=function(){return bD(this)},di.prototype.emit=function(a){for(var o=[],f=1;f<arguments.length;f++)o.push(arguments[f]);var d=a==="error",n=this._events;if(n!==void 0)d=d&&n.error===void 0;else if(!d)return!1;if(d){var v;if(o.length>0&&(v=o[0]),v instanceof Error)throw v;var b=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw b.context=v,b}var y=n[a];if(y===void 0)return!1;if(typeof y=="function")mA(y,this,o);else{var M=y.length,w=mD(y,M);for(f=0;f<M;++f)mA(w[f],this,o)}return!0},di.prototype.addListener=function(a,o){return wA(this,a,o,!1)},di.prototype.on=di.prototype.addListener,di.prototype.prependListener=function(a,o){return wA(this,a,o,!0)},di.prototype.once=function(a,o){return Vv(o),this.on(a,MA(this,a,o)),this},di.prototype.prependOnceListener=function(a,o){return Vv(o),this.prependListener(a,MA(this,a,o)),this},di.prototype.removeListener=function(a,o){var f,d,n,v,b;if(Vv(o),(d=this._events)===void 0)return this;if((f=d[a])===void 0)return this;if(f===o||f.listener===o)--this._eventsCount==0?this._events=Object.create(null):(delete d[a],d.removeListener&&this.emit("removeListener",a,f.listener||o));else if(typeof f!="function"){for(n=-1,v=f.length-1;v>=0;v--)if(f[v]===o||f[v].listener===o){b=f[v].listener,n=v;break}if(n<0)return this;n===0?f.shift():function(y,M){for(;M+1<y.length;M++)y[M]=y[M+1];y.pop()}(f,n),f.length===1&&(d[a]=f[0]),d.removeListener!==void 0&&this.emit("removeListener",a,b||o)}return this},di.prototype.off=di.prototype.removeListener,di.prototype.removeAllListeners=function(a){var o,f,d;if((f=this._events)===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[a]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete f[a]),this;if(arguments.length===0){var n,v=Object.keys(f);for(d=0;d<v.length;++d)(n=v[d])!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(o=f[a])=="function")this.removeListener(a,o);else if(o!==void 0)for(d=o.length-1;d>=0;d--)this.removeListener(a,o[d]);return this},di.prototype.listeners=function(a){return _A(this,a,!0)},di.prototype.rawListeners=function(a){return _A(this,a,!1)},di.listenerCount=function(a,o){return typeof a.listenerCount=="function"?a.listenerCount(o):xA.call(a,o)},di.prototype.listenerCount=xA,di.prototype.eventNames=function(){return this._eventsCount>0?vD(this._events):[]};var Hi=pD;Hi.EventEmitter;Hi.defaultMaxListeners;Hi.init;Hi.listenerCount;Hi.EventEmitter;Hi.defaultMaxListeners;Hi.init;Hi.listenerCount;Hi.once=function(a,o){return new Promise((f,d)=>{function n(...b){v!==void 0&&a.removeListener("error",v),f(b)}let v;o!=="error"&&(v=b=>{a.removeListener(name,n),d(b)},a.once("error",v)),a.once(o,n)})};Hi.on=function(a,o){let f=[],d=[],n=null,v=!1,b={async next(){let w=f.shift();if(w)return createIterResult(w,!1);if(n){let g=Promise.reject(n);return n=null,g}return v?createIterResult(void 0,!0):new Promise((g,_)=>d.push({resolve:g,reject:_}))},async return(){a.removeListener(o,y),a.removeListener("error",M),v=!0;for(let w of d)w.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(w){n=w,a.removeListener(o,y),a.removeListener("error",M)},[Symbol.asyncIterator](){return this}};return a.on(o,y),a.on("error",M),b;function y(...w){let g=d.shift();g?g.resolve(createIterResult(w,!1)):f.push(w)}function M(w){v=!0;let g=d.shift();g?g.reject(w):n=w,b.return()}};var gD,Af,Bf,zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,Xi=gD={};function s9(){throw new Error("setTimeout has not been defined")}function f9(){throw new Error("clearTimeout has not been defined")}function yD(a){if(Af===setTimeout)return setTimeout(a,0);if((Af===s9||!Af)&&setTimeout)return Af=setTimeout,setTimeout(a,0);try{return Af(a,0)}catch{try{return Af.call(null,a,0)}catch{return Af.call(this||zl,a,0)}}}(function(){try{Af=typeof setTimeout=="function"?setTimeout:s9}catch{Af=s9}try{Bf=typeof clearTimeout=="function"?clearTimeout:f9}catch{Bf=f9}})();var lu,Nf=[],Ol=!1,Jv=-1;function ZX(){Ol&&lu&&(Ol=!1,lu.length?Nf=lu.concat(Nf):Jv=-1,Nf.length&&wD())}function wD(){if(!Ol){var a=yD(ZX);Ol=!0;for(var o=Nf.length;o;){for(lu=Nf,Nf=[];++Jv<o;)lu&&lu[Jv].run();Jv=-1,o=Nf.length}lu=null,Ol=!1,function(f){if(Bf===clearTimeout)return clearTimeout(f);if((Bf===f9||!Bf)&&clearTimeout)return Bf=clearTimeout,clearTimeout(f);try{Bf(f)}catch{try{return Bf.call(null,f)}catch{return Bf.call(this||zl,f)}}}(a)}}function SA(a,o){(this||zl).fun=a,(this||zl).array=o}function xf(){}Xi.nextTick=function(a){var o=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)o[f-1]=arguments[f];Nf.push(new SA(a,o)),Nf.length!==1||Ol||yD(wD)},SA.prototype.run=function(){(this||zl).fun.apply(null,(this||zl).array)},Xi.title="browser",Xi.browser=!0,Xi.env={},Xi.argv=[],Xi.version="",Xi.versions={},Xi.on=xf,Xi.addListener=xf,Xi.once=xf,Xi.off=xf,Xi.removeListener=xf,Xi.removeAllListeners=xf,Xi.emit=xf,Xi.prependListener=xf,Xi.prependOnceListener=xf,Xi.listeners=function(a){return[]},Xi.binding=function(a){throw new Error("process.binding is not supported")},Xi.cwd=function(){return"/"},Xi.chdir=function(a){throw new Error("process.chdir is not supported")},Xi.umask=function(){return 0};var ar=gD;ar.addListener;ar.argv;ar.binding;ar.browser;ar.chdir;ar.cwd;ar.emit;ar.env;ar.listeners;ar.nextTick;ar.off;ar.on;ar.once;ar.prependListener;ar.prependOnceListener;ar.removeAllListeners;ar.removeListener;ar.title;ar.umask;ar.version;ar.versions;var GX=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",h9=Object.prototype.toString,U2=function(a){return!(GX&&a&&typeof a=="object"&&Symbol.toStringTag in a)&&h9.call(a)==="[object Arguments]"},MD=function(a){return!!U2(a)||a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&h9.call(a)!=="[object Array]"&&h9.call(a.callee)==="[object Function]"},VX=function(){return U2(arguments)}();U2.isLegacyArguments=MD;var JX=VX?U2:MD,YX=Object.prototype.toString,XX=Function.prototype.toString,QX=/^\s*(?:function)?\*/,_D=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",xD=Object.getPrototypeOf,EA=function(){if(!_D)return!1;try{return Function("return function*() {}")()}catch{}}(),eQ=EA?xD(EA):{},tQ=function(a){return typeof a=="function"&&(!!QX.test(XX.call(a))||(_D?xD(a)===eQ:YX.call(a)==="[object GeneratorFunction]"))},vr=typeof Object.create=="function"?function(a,o){o&&(a.super_=o,a.prototype=Object.create(o.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:function(a,o){if(o){a.super_=o;var f=function(){};f.prototype=o.prototype,a.prototype=new f,a.prototype.constructor=a}},SD=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"},Tr={},rQ=SD,iQ=JX,nQ=tQ;function Au(a){return a.call.bind(a)}var ED=typeof BigInt<"u",K9=typeof Symbol<"u",Da=K9&&Symbol.toStringTag!==void 0,ya=typeof Uint8Array<"u",aQ=typeof ArrayBuffer<"u";if(ya&&Da)var oQ=Object.getPrototypeOf(Uint8Array.prototype),Mo=Au(Object.getOwnPropertyDescriptor(oQ,Symbol.toStringTag).get);var Ti=Au(Object.prototype.toString),sQ=Au(Number.prototype.valueOf),fQ=Au(String.prototype.valueOf),hQ=Au(Boolean.prototype.valueOf);if(ED)var uQ=Au(BigInt.prototype.valueOf);if(K9)var lQ=Au(Symbol.prototype.valueOf);function Qc(a,o){if(typeof a!="object")return!1;try{return o(a),!0}catch{return!1}}function AA(a){return ya&&Da?Mo(a)!==void 0:AD(a)||BD(a)||RD(a)||ID(a)||TD(a)||kD(a)||$D(a)||PD(a)||ND(a)||CD(a)||LD(a)}function AD(a){return ya&&Da?Mo(a)==="Uint8Array":Ti(a)==="[object Uint8Array]"||rQ(a)&&a.buffer!==void 0}function BD(a){return ya&&Da?Mo(a)==="Uint8ClampedArray":Ti(a)==="[object Uint8ClampedArray]"}function RD(a){return ya&&Da?Mo(a)==="Uint16Array":Ti(a)==="[object Uint16Array]"}function ID(a){return ya&&Da?Mo(a)==="Uint32Array":Ti(a)==="[object Uint32Array]"}function TD(a){return ya&&Da?Mo(a)==="Int8Array":Ti(a)==="[object Int8Array]"}function kD(a){return ya&&Da?Mo(a)==="Int16Array":Ti(a)==="[object Int16Array]"}function $D(a){return ya&&Da?Mo(a)==="Int32Array":Ti(a)==="[object Int32Array]"}function PD(a){return ya&&Da?Mo(a)==="Float32Array":Ti(a)==="[object Float32Array]"}function ND(a){return ya&&Da?Mo(a)==="Float64Array":Ti(a)==="[object Float64Array]"}function CD(a){return ya&&Da?Mo(a)==="BigInt64Array":Ti(a)==="[object BigInt64Array]"}function LD(a){return ya&&Da?Mo(a)==="BigUint64Array":Ti(a)==="[object BigUint64Array]"}function $p(a){return Ti(a)==="[object Map]"}function Pp(a){return Ti(a)==="[object Set]"}function Np(a){return Ti(a)==="[object WeakMap]"}function L3(a){return Ti(a)==="[object WeakSet]"}function M2(a){return Ti(a)==="[object ArrayBuffer]"}function BA(a){return typeof ArrayBuffer<"u"&&(M2.working?M2(a):a instanceof ArrayBuffer)}function _2(a){return Ti(a)==="[object DataView]"}function RA(a){return typeof DataView<"u"&&(_2.working?_2(a):a instanceof DataView)}function x2(a){return Ti(a)==="[object SharedArrayBuffer]"}function IA(a){return typeof SharedArrayBuffer<"u"&&(x2.working?x2(a):a instanceof SharedArrayBuffer)}function TA(a){return Qc(a,sQ)}function kA(a){return Qc(a,fQ)}function $A(a){return Qc(a,hQ)}function PA(a){return ED&&Qc(a,uQ)}function NA(a){return K9&&Qc(a,lQ)}Tr.isArgumentsObject=iQ,Tr.isGeneratorFunction=nQ,Tr.isPromise=function(a){return typeof Promise<"u"&&a instanceof Promise||a!==null&&typeof a=="object"&&typeof a.then=="function"&&typeof a.catch=="function"},Tr.isArrayBufferView=function(a){return aQ&&ArrayBuffer.isView?ArrayBuffer.isView(a):AA(a)||RA(a)},Tr.isTypedArray=AA,Tr.isUint8Array=AD,Tr.isUint8ClampedArray=BD,Tr.isUint16Array=RD,Tr.isUint32Array=ID,Tr.isInt8Array=TD,Tr.isInt16Array=kD,Tr.isInt32Array=$D,Tr.isFloat32Array=PD,Tr.isFloat64Array=ND,Tr.isBigInt64Array=CD,Tr.isBigUint64Array=LD,$p.working=typeof Map<"u"&&$p(new Map),Tr.isMap=function(a){return typeof Map<"u"&&($p.working?$p(a):a instanceof Map)},Pp.working=typeof Set<"u"&&Pp(new Set),Tr.isSet=function(a){return typeof Set<"u"&&(Pp.working?Pp(a):a instanceof Set)},Np.working=typeof WeakMap<"u"&&Np(new WeakMap),Tr.isWeakMap=function(a){return typeof WeakMap<"u"&&(Np.working?Np(a):a instanceof WeakMap)},L3.working=typeof WeakSet<"u"&&L3(new WeakSet),Tr.isWeakSet=function(a){return L3(a)},M2.working=typeof ArrayBuffer<"u"&&M2(new ArrayBuffer),Tr.isArrayBuffer=BA,_2.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&_2(new DataView(new ArrayBuffer(1),0,1)),Tr.isDataView=RA,x2.working=typeof SharedArrayBuffer<"u"&&x2(new SharedArrayBuffer),Tr.isSharedArrayBuffer=IA,Tr.isAsyncFunction=function(a){return Ti(a)==="[object AsyncFunction]"},Tr.isMapIterator=function(a){return Ti(a)==="[object Map Iterator]"},Tr.isSetIterator=function(a){return Ti(a)==="[object Set Iterator]"},Tr.isGeneratorObject=function(a){return Ti(a)==="[object Generator]"},Tr.isWebAssemblyCompiledModule=function(a){return Ti(a)==="[object WebAssembly.Module]"},Tr.isNumberObject=TA,Tr.isStringObject=kA,Tr.isBooleanObject=$A,Tr.isBigIntObject=PA,Tr.isSymbolObject=NA,Tr.isBoxedPrimitive=function(a){return TA(a)||kA(a)||$A(a)||PA(a)||NA(a)},Tr.isAnyArrayBuffer=function(a){return ya&&(BA(a)||IA(a))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(a){Object.defineProperty(Tr,a,{enumerable:!1,value:function(){throw new Error(a+" is not supported in userland")}})});var Lc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,wt={},Gs=ar,CA=Object.getOwnPropertyDescriptors||function(a){for(var o=Object.keys(a),f={},d=0;d<o.length;d++)f[o[d]]=Object.getOwnPropertyDescriptor(a,o[d]);return f},dQ=/%[sdj%]/g;wt.format=function(a){if(!E2(a)){for(var o=[],f=0;f<arguments.length;f++)o.push(H0(arguments[f]));return o.join(" ")}f=1;for(var d=arguments,n=d.length,v=String(a).replace(dQ,function(y){if(y==="%%")return"%";if(f>=n)return y;switch(y){case"%s":return String(d[f++]);case"%d":return Number(d[f++]);case"%j":try{return JSON.stringify(d[f++])}catch{return"[Circular]"}default:return y}}),b=d[f];f<n;b=d[++f])F2(b)||!Wl(b)?v+=" "+b:v+=" "+H0(b);return v},wt.deprecate=function(a,o){if(Gs!==void 0&&Gs.noDeprecation===!0)return a;if(Gs===void 0)return function(){return wt.deprecate(a,o).apply(this||Lc,arguments)};var f=!1;return function(){if(!f){if(Gs.throwDeprecation)throw new Error(o);Gs.traceDeprecation?console.trace(o):console.error(o),f=!0}return a.apply(this||Lc,arguments)}};var Cp={},DD=/^$/;Gs.env.NODE_DEBUG&&(Lp=Gs.env.NODE_DEBUG,Lp=Lp.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),DD=new RegExp("^"+Lp+"$","i"));var Lp;function H0(a,o){var f={seen:[],stylize:pQ};return arguments.length>=3&&(f.depth=arguments[2]),arguments.length>=4&&(f.colors=arguments[3]),j9(o)?f.showHidden=o:o&&wt._extend(f,o),du(f.showHidden)&&(f.showHidden=!1),du(f.depth)&&(f.depth=2),du(f.colors)&&(f.colors=!1),du(f.customInspect)&&(f.customInspect=!0),f.colors&&(f.stylize=cQ),S2(f,a,f.depth)}function cQ(a,o){var f=H0.styles[o];return f?"\x1B["+H0.colors[f][0]+"m"+a+"\x1B["+H0.colors[f][1]+"m":a}function pQ(a,o){return a}function S2(a,o,f){if(a.customInspect&&o&&Yv(o.inspect)&&o.inspect!==wt.inspect&&(!o.constructor||o.constructor.prototype!==o)){var d=o.inspect(f,a);return E2(d)||(d=S2(a,d,f)),d}var n=function(x,E){if(du(E))return x.stylize("undefined","undefined");if(E2(E)){var R="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(R,"string")}if(qD(E))return x.stylize(""+E,"number");if(j9(E))return x.stylize(""+E,"boolean");if(F2(E))return x.stylize("null","null")}(a,o);if(n)return n;var v=Object.keys(o),b=function(x){var E={};return x.forEach(function(R,T){E[R]=!0}),E}(v);if(a.showHidden&&(v=Object.getOwnPropertyNames(o)),Oc(o)&&(v.indexOf("message")>=0||v.indexOf("description")>=0))return D3(o);if(v.length===0){if(Yv(o)){var y=o.name?": "+o.name:"";return a.stylize("[Function"+y+"]","special")}if(Dc(o))return a.stylize(RegExp.prototype.toString.call(o),"regexp");if(A2(o))return a.stylize(Date.prototype.toString.call(o),"date");if(Oc(o))return D3(o)}var M,w="",g=!1,_=["{","}"];return OD(o)&&(g=!0,_=["[","]"]),Yv(o)&&(w=" [Function"+(o.name?": "+o.name:"")+"]"),Dc(o)&&(w=" "+RegExp.prototype.toString.call(o)),A2(o)&&(w=" "+Date.prototype.toUTCString.call(o)),Oc(o)&&(w=" "+D3(o)),v.length!==0||g&&o.length!=0?f<0?Dc(o)?a.stylize(RegExp.prototype.toString.call(o),"regexp"):a.stylize("[Object]","special"):(a.seen.push(o),M=g?function(x,E,R,T,N){for(var P=[],L=0,D=E.length;L<D;++L)UD(E,String(L))?P.push(O3(x,E,R,T,String(L),!0)):P.push("");return N.forEach(function(Z){Z.match(/^\d+$/)||P.push(O3(x,E,R,T,Z,!0))}),P}(a,o,f,b,v):v.map(function(x){return O3(a,o,f,b,x,g)}),a.seen.pop(),function(x,E,R){var T=0;return x.reduce(function(N,P){return T++,P.indexOf(`
35
+ }`;return a.queryKey&&(T=`${a.queryKey}: ${T}`),T}async function YJ(a){try{return await(await fetch(`https://${a.gateway}/graphql`,{method:"POST",headers:{"Content-Type":"application/json"},body:a.query})).json()}catch(o){throw o}}var s6e=ua.goldsky;async function NE(a,o){let f=[{name:"Authority",value:Ji.mu}];o.tags&&o.tags.length>0&&o.tags.forEach(d=>f.push(d));try{let d=await a.ao.spawn({module:o.module,scheduler:o.scheduler,signer:a.signer,tags:f,data:o.data});return Zo(`Process ID: ${d}`),Zo("Sending initial message..."),await ks(a,{processId:d,action:"Init"}),d}catch(d){throw console.log(d),new Error(d.message??"Error spawning process")}}function CE(a){return async o=>await ks(a,o)}async function ks(a,o){try{let f=[{name:"Action",value:o.action}];o.tags&&f.push(...o.tags);let d=o.useRawData?o.data:JSON.stringify(o.data);return await a.ao.message({process:o.processId,signer:a.signer,tags:f,data:d})}catch(f){throw new Error(f)}}function LE(a){return async o=>await Ih(a,o)}async function Ih(a,o){let d=`${a.node??RE.defaultNode}/${o.processId}~process@1.0/now/${o.path}`;o.serialize&&(d+="/serialize~json@1.0"),console.log("Getting state from HyperBEAM:",d);try{let n=await fetch(d);if(n.ok)return console.log("Returning state from HyperBEAM."),n.json();throw new Error("Error getting state from HyperBEAM.")}catch(n){if(o.fallbackAction){console.log("State not found, dryrunning...");let v=await Sp(a,{processId:o.processId,action:o.fallbackAction});return console.log("Returning state from dryrun."),v}throw n}}function DE(a){return async o=>await Sp(a,o)}async function Sp(a,o){try{let f=[{name:"Action",value:o.action}];o.tags&&f.push(...o.tags);let d;if(typeof o.data=="object")d=JSON.stringify(o.data||{});else if(typeof o.data=="string"){try{JSON.parse(o.data)}catch(v){throw console.error(v),new Error("Invalid JSON data")}d=o.data}let n=await a.ao.dryrun({process:o.processId,tags:f,data:d});if(n.Messages&&n.Messages.length){if(n.Messages[0].Data)return JSON.parse(n.Messages[0].Data);if(n.Messages[0].Tags)return n.Messages[0].Tags.reduce((v,b)=>(v[b.name]=b.value,v),{})}}catch(f){throw new Error(f.message??"Error dryrunning process")}}async function XJ(a,o){try{let{Messages:f}=await a.ao.result({message:o.messageId,process:o.processId});if(f&&f.length){let d={};return f.forEach(n=>{let v=xp(n.Tags,"Action")||o.action,b=null,y=n.Data;if(y)try{b=JSON.parse(y)}catch{b=y}let M=xp(n.Tags,"Status"),w=xp(n.Tags,"Message");d[v]={id:o.messageId,status:M,message:w,data:b}}),d}else return null}catch(f){console.error(f)}}async function Vd(a,o){let f=null;if(o.evalSrc?f=o.evalSrc:o.evalTxId&&(f=await QJ(o.evalTxId)),f)try{let d=await ks(a,{processId:o.processId,action:"Eval",data:f,tags:o.evalTags||null,useRawData:!0});return Zo(`Eval: ${d}`),await XJ(a,{processId:o.processId,messageId:d,action:"Eval"})}catch(d){throw new Error(d.message??"Error sending process eval")}return null}function OE(a){return async(o,f)=>{try{let d={module:o.module||Ji.module,scheduler:o.scheduler||Ji.scheduler};o.data&&(d.data=o.data),o.tags&&(d.tags=o.tags),f&&f("Spawning process...");let n=await NE(a,d);if(o.evalTxId||o.evalSrc){f&&f("Process retrieved!"),f&&f("Sending eval...");try{await Vd(a,{processId:n,evalTxId:o.evalTxId||null,evalSrc:o.evalSrc||null,evalTags:o.evalTags})&&f&&f("Eval complete")}catch(v){throw new Error(v.message??"Error creating process")}}return n}catch(d){throw new Error(d.message??"Error creating process")}}}async function Th(a,o,f){try{let d={module:o.module||Ji.module,scheduler:o.scheduler||Ji.scheduler};o.data&&(d.data=o.data),o.tags&&(d.tags=o.tags),f&&f("Spawning process...");let n=await NE(a,d);if(o.evalTxId||o.evalSrc){f&&f("Process retrieved!"),f&&f("Sending eval...");try{await Vd(a,{processId:n,evalTxId:o.evalTxId||null,evalSrc:o.evalSrc||null,evalTags:o.evalTags})&&f&&f("Eval complete")}catch(v){throw new Error(v.message??"Error creating process")}}return n}catch(d){throw new Error(d.message??"Error creating process")}}async function QJ(a){try{return await(await fetch(bl(a))).text()}catch(o){throw new Error(o)}}var Cke=Ae(Be(),1);Ie();Re();var Ake=Ae(Be(),1);Ie();Re();var aS={};wp(aS,{AVSCTap:()=>sp,AlgorandSigner:()=>X1,AptosSigner:()=>ep,ArconnectSigner:()=>hl,Arweave:()=>vH.default,ArweaveSigner:()=>Pu,Bundle:()=>Zb,BundleItem:()=>nS,CryptoDriver:()=>B6,Curve25519:()=>Sa,DataItem:()=>Kb,EthereumSigner:()=>ja,HexInjectedSolanaSigner:()=>al,HexSolanaSigner:()=>Q1,InjectedAptosSigner:()=>ol,InjectedEthereumSigner:()=>Qx,InjectedSolanaSigner:()=>Nu,InjectedTypedEthereumSigner:()=>eS,KyveSigner:()=>ip,MAX_TAG_BYTES:()=>Hb,MIN_BINARY_SIZE:()=>jb,MultiSignatureAptosSigner:()=>sl,NearSigner:()=>Y1,PolygonSigner:()=>J1,Rsa4096:()=>Bu,SIG_CONFIG:()=>Ir,SignatureConfig:()=>or,Signer:()=>g3,SolanaSigner:()=>e0,Transaction:()=>pH.default,TypedEthereumSigner:()=>fl,bundleAndSignData:()=>gpe,byteArrayToLong:()=>Wi,concatBuffers:()=>fi.concatBuffers,createData:()=>hp,deepHash:()=>J0,deserializeTags:()=>Hd,exportForTesting:()=>ppe,getCryptoDriver:()=>Qi,getSignatureAndId:()=>UG,indexToType:()=>np,keccak256:()=>Y5,longTo16ByteArray:()=>bpe,longTo32ByteArray:()=>zb,longTo8ByteArray:()=>Fb,longToNByteArray:()=>op,secp256k1:()=>nl,serializeTags:()=>rS,shortTo2ByteArray:()=>tS,sign:()=>Wb,stringToBuffer:()=>fi.stringToBuffer,unbundleData:()=>mpe});var aTe=Ae(Be(),1);Ie();Re();var zRe=Ae(Be(),1);Ie();Re();var c6e=Ae(Be(),1);Ie();Re();var g3=class{publicKey;signatureType;signatureLength;ownerLength;pem;static verify(o,f,d,n){throw new Error("You must implement verify method on child")}};var kRe=Ae(Be(),1);Ie();Re();var K6e=Ae(Be(),1);Ie();Re();var QE=Ae(Za(),1);var I6e=Ae(Be(),1);Ie();Re();var or;(function(a){a[a.ARWEAVE=1]="ARWEAVE",a[a.ED25519=2]="ED25519",a[a.ETHEREUM=3]="ETHEREUM",a[a.SOLANA=4]="SOLANA",a[a.INJECTEDAPTOS=5]="INJECTEDAPTOS",a[a.MULTIAPTOS=6]="MULTIAPTOS",a[a.TYPEDETHEREUM=7]="TYPEDETHEREUM",a[a.KYVE=101]="KYVE"})(or||(or={}));var Ir={[or.ARWEAVE]:{sigLength:512,pubLength:512,sigName:"arweave"},[or.ED25519]:{sigLength:64,pubLength:32,sigName:"ed25519"},[or.ETHEREUM]:{sigLength:65,pubLength:65,sigName:"ethereum"},[or.SOLANA]:{sigLength:64,pubLength:32,sigName:"solana"},[or.INJECTEDAPTOS]:{sigLength:64,pubLength:32,sigName:"injectedAptos"},[or.MULTIAPTOS]:{sigLength:64*32+4,pubLength:32*32+1,sigName:"multiAptos"},[or.TYPEDETHEREUM]:{sigLength:65,pubLength:42,sigName:"typedEthereum"},[or.KYVE]:{sigLength:65,pubLength:65,sigName:"kyve"}};var O6e=Ae(Be(),1);Ie();Re();var nY=Ae(x3(),1);var kn=BigInt(0),qr=BigInt(1),gl=BigInt(2),aY=BigInt(8),HE=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),wi=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:HE,n:HE,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")});var VE=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Jd=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),L6e=BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),oY=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),sY=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),fY=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),hY=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),nn=class a{constructor(o,f,d,n){this.x=o,this.y=f,this.z=d,this.t=n}static fromAffine(o){if(!(o instanceof Yi))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return o.equals(Yi.ZERO)?a.ZERO:new a(o.x,o.y,qr,Zt(o.x*o.y))}static toAffineBatch(o){let f=dY(o.map(d=>d.z));return o.map((d,n)=>d.toAffine(f[n]))}static normalizeZ(o){return this.toAffineBatch(o).map(this.fromAffine)}equals(o){jE(o);let{x:f,y:d,z:n}=this,{x:v,y:b,z:y}=o,M=Zt(f*y),w=Zt(v*n),g=Zt(d*y),_=Zt(b*n);return M===w&&g===_}negate(){return new a(Zt(-this.x),this.y,this.z,Zt(-this.t))}double(){let{x:o,y:f,z:d}=this,{a:n}=wi,v=Zt,b=v(o*o),y=v(f*f),M=v(gl*v(d*d)),w=v(n*b),g=o+f,_=v(v(g*g)-b-y),x=w+y,E=x-M,R=w-y,T=v(_*E),N=v(x*R),P=v(_*R),L=v(E*x);return new a(T,N,L,P)}add(o){let{x:f,y:d,z:n,t:v}=this;jE(o);let{x:b,y,z:M,t:w}=o,{a:g,d:_}=wi,x=Zt,E=x(f*b),R=x(d*y),T=x(v*_*w),N=x(n*M),P=x((f+d)*(b+y)-E-R),L=x(N-T),D=x(N+T),Z=x(R-g*E),W=x(P*L),Q=x(D*Z),K=x(P*Z),z=x(L*D);return new a(W,Q,z,K)}subtract(o){return this.add(o.negate())}precomputeWindow(o){let f=1+256/o,d=[],n=this,v=n;for(let b=0;b<f;b++){v=n,d.push(v);for(let y=1;y<2**(o-1);y++)v=v.add(n),d.push(v);n=v.double()}return d}wNAF(o,f){!f&&this.equals(a.BASE)&&(f=Yi.BASE);let d=f&&f._WINDOW_SIZE||1;if(256%d)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let n=f&&R3.get(f);n||(n=this.precomputeWindow(d),f&&d!==1&&(n=a.normalizeZ(n),R3.set(f,n)));let v=a.ZERO,b=a.BASE,y=1+256/d,M=2**(d-1),w=BigInt(2**d-1),g=2**d,_=BigInt(d);for(let x=0;x<y;x++){let E=x*M,R=Number(o&w);o>>=_,R>M&&(R-=g,o+=qr);let T=E,N=E+Math.abs(R)-1,P=x%2!==0,L=R<0;R===0?b=b.add(KE(P,n[T])):v=v.add(KE(L,n[N]))}return a.normalizeZ([v,b])[0]}multiply(o,f){return this.wNAF(Bp(o,wi.l),f)}multiplyUnsafe(o){let f=Bp(o,wi.l,!1),d=a.BASE,n=a.ZERO;if(f===kn)return n;if(this.equals(n)||f===qr)return this;if(this.equals(d))return this.wNAF(f);let v=n,b=this;for(;f>kn;)f&qr&&(v=v.add(b)),b=b.double(),f>>=qr;return v}isSmallOrder(){return this.multiplyUnsafe(wi.h).equals(a.ZERO)}isTorsionFree(){let o=this.multiplyUnsafe(wi.l/gl).double();return wi.l%gl&&(o=o.add(this)),o.equals(a.ZERO)}toAffine(o){let{x:f,y:d,z:n}=this,v=this.equals(a.ZERO);o==null&&(o=v?aY:Rp(n));let b=Zt(f*o),y=Zt(d*o),M=Zt(n*o);if(v)return Yi.ZERO;if(M!==qr)throw new Error("invZ was invalid");return new Yi(b,y)}fromRistrettoBytes(){E3()}toRistrettoBytes(){E3()}fromRistrettoHash(){E3()}};nn.BASE=new nn(wi.Gx,wi.Gy,qr,Zt(wi.Gx*wi.Gy));nn.ZERO=new nn(kn,qr,qr,kn);function KE(a,o){let f=o.negate();return a?f:o}function jE(a){if(!(a instanceof nn))throw new TypeError("ExtendedPoint expected")}function S3(a){if(!(a instanceof kh))throw new TypeError("RistrettoPoint expected")}function E3(){throw new Error("Legacy method: switch to RistrettoPoint")}var kh=class a{constructor(o){this.ep=o}static calcElligatorRistrettoMap(o){let{d:f}=wi,d=Zt(Jd*o*o),n=Zt((d+qr)*fY),v=BigInt(-1),b=Zt((v-f*d)*Zt(d+f)),{isValid:y,value:M}=k3(n,b),w=Zt(M*o);u0(w)||(w=Zt(-w)),y||(M=w),y||(v=d);let g=Zt(v*(d-qr)*hY-b),_=M*M,x=Zt((M+M)*b),E=Zt(g*oY),R=Zt(qr-_),T=Zt(qr+_);return new nn(Zt(x*T),Zt(R*E),Zt(E*T),Zt(x*R))}static hashToCurve(o){o=l0(o,64);let f=A3(o.slice(0,32)),d=this.calcElligatorRistrettoMap(f),n=A3(o.slice(32,64)),v=this.calcElligatorRistrettoMap(n);return new a(d.add(v))}static fromHex(o){o=l0(o,32);let{a:f,d}=wi,n="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",v=A3(o);if(!pY(Xd(v),o)||u0(v))throw new Error(n);let b=Zt(v*v),y=Zt(qr+f*b),M=Zt(qr-f*b),w=Zt(y*y),g=Zt(M*M),_=Zt(f*d*w-g),{isValid:x,value:E}=GE(Zt(_*g)),R=Zt(E*M),T=Zt(E*R*_),N=Zt((v+v)*R);u0(N)&&(N=Zt(-N));let P=Zt(y*T),L=Zt(N*P);if(!x||u0(L)||P===kn)throw new Error(n);return new a(new nn(N,P,qr,L))}toRawBytes(){let{x:o,y:f,z:d,t:n}=this.ep,v=Zt(Zt(d+f)*Zt(d-f)),b=Zt(o*f),y=Zt(b*b),{value:M}=GE(Zt(v*y)),w=Zt(M*v),g=Zt(M*b),_=Zt(w*g*n),x;if(u0(n*_)){let R=Zt(f*Jd),T=Zt(o*Jd);o=R,f=T,x=Zt(w*sY)}else x=g;u0(o*_)&&(f=Zt(-f));let E=Zt((d-f)*x);return u0(E)&&(E=Zt(-E)),Xd(E)}toHex(){return Qd(this.toRawBytes())}toString(){return this.toHex()}equals(o){S3(o);let f=this.ep,d=o.ep,n=Zt(f.x*d.y)===Zt(f.y*d.x),v=Zt(f.y*d.y)===Zt(f.x*d.x);return n||v}add(o){return S3(o),new a(this.ep.add(o.ep))}subtract(o){return S3(o),new a(this.ep.subtract(o.ep))}multiply(o){return new a(this.ep.multiply(o))}multiplyUnsafe(o){return new a(this.ep.multiplyUnsafe(o))}};kh.BASE=new kh(nn.BASE);kh.ZERO=new kh(nn.ZERO);var R3=new WeakMap,Yi=class a{constructor(o,f){this.x=o,this.y=f}_setWindowSize(o){this._WINDOW_SIZE=o,R3.delete(this)}static fromHex(o,f=!0){let{d,P:n}=wi;o=l0(o,32);let v=o.slice();v[31]=o[31]&-129;let b=ec(v);if(f&&b>=n)throw new Error("Expected 0 < hex < P");if(!f&&b>=VE)throw new Error("Expected 0 < hex < 2**256");let y=Zt(b*b),M=Zt(y-qr),w=Zt(d*y+qr),{isValid:g,value:_}=k3(M,w);if(!g)throw new Error("Point.fromHex: invalid y coordinate");let x=(_&qr)===qr;return(o[31]&128)!==0!==x&&(_=Zt(-_)),new a(_,b)}static async fromPrivateKey(o){return(await $3(o)).point}toRawBytes(){let o=Xd(this.y);return o[31]|=this.x&qr?128:0,o}toHex(){return Qd(this.toRawBytes())}toX25519(){let{y:o}=this,f=Zt((qr+o)*Rp(qr-o));return Xd(f)}isTorsionFree(){return nn.fromAffine(this).isTorsionFree()}equals(o){return this.x===o.x&&this.y===o.y}negate(){return new a(Zt(-this.x),this.y)}add(o){return nn.fromAffine(this).add(nn.fromAffine(o)).toAffine()}subtract(o){return this.add(o.negate())}multiply(o){return nn.fromAffine(this).multiply(o,this).toAffine()}};Yi.BASE=new Yi(wi.Gx,wi.Gy);Yi.ZERO=new Yi(kn,qr);var Yd=class a{constructor(o,f){this.r=o,this.s=f,this.assertValidity()}static fromHex(o){let f=l0(o,64),d=Yi.fromHex(f.slice(0,32),!1),n=ec(f.slice(32,64));return new a(d,n)}assertValidity(){let{r:o,s:f}=this;if(!(o instanceof Yi))throw new Error("Expected Point instance");return Bp(f,wi.l,!1),this}toRawBytes(){let o=new Uint8Array(64);return o.set(this.r.toRawBytes()),o.set(Xd(this.s),32),o}toHex(){return Qd(this.toRawBytes())}};function JE(a){return a instanceof Uint8Array||ArrayBuffer.isView(a)&&a.constructor.name==="Uint8Array"}function I3(a){if(!JE(a))throw new Error("Uint8Array expected")}function WE(...a){if(a.every(I3),a.length===1)return a[0];let o=a.reduce((d,n)=>d+n.length,0),f=new Uint8Array(o);for(let d=0,n=0;d<a.length;d++){let v=a[d];f.set(v,n),n+=v.length}return f}var uY=Array.from({length:256},(a,o)=>o.toString(16).padStart(2,"0"));function Qd(a){I3(a);let o="";for(let f=0;f<a.length;f++)o+=uY[a[f]];return o}var _f={_0:48,_9:57,A:65,F:70,a:97,f:102};function ZE(a){if(a>=_f._0&&a<=_f._9)return a-_f._0;if(a>=_f.A&&a<=_f.F)return a-(_f.A-10);if(a>=_f.a&&a<=_f.f)return a-(_f.a-10)}function T3(a){if(typeof a!="string")throw new Error("hex string expected, got "+typeof a);let o=a.length,f=o/2;if(o%2)throw new Error("hex string expected, got unpadded hex of length "+o);let d=new Uint8Array(f);for(let n=0,v=0;n<f;n++,v+=2){let b=ZE(a.charCodeAt(v)),y=ZE(a.charCodeAt(v+1));if(b===void 0||y===void 0){let M=a[v]+a[v+1];throw new Error('hex string expected, got non-hex character "'+M+'" at index '+v)}d[n]=b*16+y}return d}function YE(a){let f=a.toString(16).padStart(64,"0");return T3(f)}function Xd(a){return YE(a).reverse()}function u0(a){return(Zt(a)&qr)===qr}function ec(a){return I3(a),BigInt("0x"+Qd(Uint8Array.from(a).reverse()))}var lY=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function A3(a){return Zt(ec(a)&lY)}function Zt(a,o=wi.P){let f=a%o;return f>=kn?f:o+f}function Rp(a,o=wi.P){if(a===kn||o<=kn)throw new Error(`invert: expected positive integers, got n=${a} mod=${o}`);let f=Zt(a,o),d=o,n=kn,v=qr,b=qr,y=kn;for(;f!==kn;){let w=d/f,g=d%f,_=n-b*w,x=v-y*w;d=f,f=g,n=b,v=y,b=_,y=x}if(d!==qr)throw new Error("invert: does not exist");return Zt(n,o)}function dY(a,o=wi.P){let f=new Array(a.length),d=a.reduce((v,b,y)=>b===kn?v:(f[y]=v,Zt(v*b,o)),qr),n=Rp(d,o);return a.reduceRight((v,b,y)=>b===kn?v:(f[y]=Zt(v*f[y],o),Zt(v*b,o)),n),f}function $s(a,o){let{P:f}=wi,d=a;for(;o-- >kn;)d*=d,d%=f;return d}function cY(a){let{P:o}=wi,f=BigInt(5),d=BigInt(10),n=BigInt(20),v=BigInt(40),b=BigInt(80),M=a*a%o*a%o,w=$s(M,gl)*M%o,g=$s(w,qr)*a%o,_=$s(g,f)*g%o,x=$s(_,d)*_%o,E=$s(x,n)*x%o,R=$s(E,v)*E%o,T=$s(R,b)*R%o,N=$s(T,b)*R%o,P=$s(N,d)*_%o;return{pow_p_5_8:$s(P,gl)*a%o,b2:M}}function k3(a,o){let f=Zt(o*o*o),d=Zt(f*f*o),n=cY(a*d).pow_p_5_8,v=Zt(a*f*n),b=Zt(o*v*v),y=v,M=Zt(v*Jd),w=b===a,g=b===Zt(-a),_=b===Zt(-a*Jd);return w&&(v=y),(g||_)&&(v=M),u0(v)&&(v=Zt(-v)),{isValid:w||g,value:v}}function GE(a){return k3(qr,a)}function Ap(a){return Zt(ec(a),wi.l)}function pY(a,o){if(a.length!==o.length)return!1;for(let f=0;f<a.length;f++)if(a[f]!==o[f])return!1;return!0}function l0(a,o){let f=JE(a)?Uint8Array.from(a):T3(a);if(typeof o=="number"&&f.length!==o)throw new Error(`Expected ${o} bytes`);return f}function Bp(a,o,f=!0){if(!o)throw new TypeError("Specify max value");if(typeof a=="number"&&Number.isSafeInteger(a)&&(a=BigInt(a)),typeof a=="bigint"&&a<o){if(f){if(kn<a)return a}else if(kn<=a)return a}throw new TypeError("Expected valid scalar: 0 < scalar < max")}function vY(a){return a[0]&=248,a[31]&=127,a[31]|=64,a}function bY(a){if(a=typeof a=="bigint"||typeof a=="number"?YE(Bp(a,VE)):l0(a),a.length!==32)throw new Error("Expected 32 bytes");return a}function mY(a){let o=vY(a.slice(0,32)),f=a.slice(32,64),d=Ap(o),n=Yi.BASE.multiply(d),v=n.toRawBytes();return{head:o,prefix:f,scalar:d,point:n,pointBytes:v}}var B3;async function $3(a){return mY(await yl.sha512(bY(a)))}async function XE(a,o){a=l0(a);let{prefix:f,scalar:d,pointBytes:n}=await $3(o),v=Ap(await yl.sha512(f,a)),b=Yi.BASE.multiply(v),y=Ap(await yl.sha512(b.toRawBytes(),n,a)),M=Zt(v+y*d,wi.l);return new Yd(b,M).toRawBytes()}function gY(a,o,f){o=l0(o),f instanceof Yi||(f=Yi.fromHex(f,!1));let{r:d,s:n}=a instanceof Yd?a.assertValidity():Yd.fromHex(a),v=nn.BASE.multiplyUnsafe(n);return{r:d,s:n,SB:v,pub:f,msg:o}}function yY(a,o,f,d){let n=Ap(d),v=nn.fromAffine(a).multiplyUnsafe(n);return nn.fromAffine(o).add(v).subtract(f).multiplyUnsafe(wi.h).equals(nn.ZERO)}async function d0(a,o,f){let{r:d,SB:n,msg:v,pub:b}=gY(a,o,f),y=await yl.sha512(d.toRawBytes(),b.toRawBytes(),v);return yY(b,d,n,y)}Yi.BASE._setWindowSize(8);var h0={node:nY,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},yl={bytesToHex:Qd,hexToBytes:T3,concatBytes:WE,getExtendedPublicKey:$3,mod:Zt,invert:Rp,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:a=>{if(a=l0(a),a.length<40||a.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return Zt(ec(a),wi.l-qr)+qr},randomBytes:(a=32)=>{if(h0.web)return h0.web.getRandomValues(new Uint8Array(a));if(h0.node){let{randomBytes:o}=h0.node;return new Uint8Array(o(a).buffer)}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>yl.randomBytes(32),sha512:async(...a)=>{let o=WE(...a);if(h0.web){let f=await h0.web.subtle.digest("SHA-512",o.buffer);return new Uint8Array(f)}else{if(h0.node)return Uint8Array.from(h0.node.createHash("sha512").update(o).digest());throw new Error("The environment doesn't have sha512 function")}},precompute(a=8,o=Yi.BASE){let f=o.equals(Yi.BASE)?o:new Yi(o.x,o.y);return f._setWindowSize(a),f.multiply(gl),f},sha512Sync:void 0};Object.defineProperties(yl,{sha512Sync:{configurable:!1,get(){return B3},set(a){B3||(B3=a)}}});var Sa=class{_key;pk;ownerLength=Ir[2].pubLength;signatureLength=Ir[2].sigLength;_publicKey;get publicKey(){return this._publicKey}signatureType=2;constructor(o,f){this._key=o,this.pk=f}get key(){throw new Error("You must implement `key`")}sign(o){return XE(at.from(o),at.from(this.key))}static async verify(o,f,d){let n=o;return typeof o=="string"&&(n=QE.default.toBuffer(o)),d0(at.from(d),at.from(f),at.from(n))}};var fRe=Ae(Be(),1);Ie();Re();var _ge=Ae(Be(),1);Ie();Re();var Lme=Ae(Be(),1);Ie();Re();var Rme=Ae(Be(),1);Ie();Re();var fi=Ae(Go(),1);var i3e=Ae(Be(),1);Ie();Re();var Ybe=Ae(Be());Ie();Re();var tc={},lA=!1;function TY(){if(lA)return tc;lA=!0,tc.byteLength=y,tc.toByteArray=w,tc.fromByteArray=x;for(var a=[],o=[],f=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,v=d.length;n<v;++n)a[n]=d[n],o[d.charCodeAt(n)]=n;o[45]=62,o[95]=63;function b(E){var R=E.length;if(R%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=E.indexOf("=");T===-1&&(T=R);var N=T===R?0:4-T%4;return[T,N]}function y(E){var R=b(E),T=R[0],N=R[1];return(T+N)*3/4-N}function M(E,R,T){return(R+T)*3/4-T}function w(E){var R,T=b(E),N=T[0],P=T[1],L=new f(M(E,N,P)),D=0,Z=P>0?N-4:N,W;for(W=0;W<Z;W+=4)R=o[E.charCodeAt(W)]<<18|o[E.charCodeAt(W+1)]<<12|o[E.charCodeAt(W+2)]<<6|o[E.charCodeAt(W+3)],L[D++]=R>>16&255,L[D++]=R>>8&255,L[D++]=R&255;return P===2&&(R=o[E.charCodeAt(W)]<<2|o[E.charCodeAt(W+1)]>>4,L[D++]=R&255),P===1&&(R=o[E.charCodeAt(W)]<<10|o[E.charCodeAt(W+1)]<<4|o[E.charCodeAt(W+2)]>>2,L[D++]=R>>8&255,L[D++]=R&255),L}function g(E){return a[E>>18&63]+a[E>>12&63]+a[E>>6&63]+a[E&63]}function _(E,R,T){for(var N,P=[],L=R;L<T;L+=3)N=(E[L]<<16&16711680)+(E[L+1]<<8&65280)+(E[L+2]&255),P.push(g(N));return P.join("")}function x(E){for(var R,T=E.length,N=T%3,P=[],L=16383,D=0,Z=T-N;D<Z;D+=L)P.push(_(E,D,D+L>Z?Z:D+L));return N===1?(R=E[T-1],P.push(a[R>>2]+a[R<<4&63]+"==")):N===2&&(R=(E[T-2]<<8)+E[T-1],P.push(a[R>>10]+a[R>>4&63]+a[R<<2&63]+"=")),P.join("")}return tc}var Tp={},dA=!1;function kY(){return dA||(dA=!0,Tp.read=function(a,o,f,d,n){var v,b,y=n*8-d-1,M=(1<<y)-1,w=M>>1,g=-7,_=f?n-1:0,x=f?-1:1,E=a[o+_];for(_+=x,v=E&(1<<-g)-1,E>>=-g,g+=y;g>0;v=v*256+a[o+_],_+=x,g-=8);for(b=v&(1<<-g)-1,v>>=-g,g+=d;g>0;b=b*256+a[o+_],_+=x,g-=8);if(v===0)v=1-w;else{if(v===M)return b?NaN:(E?-1:1)*(1/0);b=b+Math.pow(2,d),v=v-w}return(E?-1:1)*b*Math.pow(2,v-d)},Tp.write=function(a,o,f,d,n,v){var b,y,M,w=v*8-n-1,g=(1<<w)-1,_=g>>1,x=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=d?0:v-1,R=d?1:-1,T=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(y=isNaN(o)?1:0,b=g):(b=Math.floor(Math.log(o)/Math.LN2),o*(M=Math.pow(2,-b))<1&&(b--,M*=2),b+_>=1?o+=x/M:o+=x*Math.pow(2,1-_),o*M>=2&&(b++,M/=2),b+_>=g?(y=0,b=g):b+_>=1?(y=(o*M-1)*Math.pow(2,n),b=b+_):(y=o*Math.pow(2,_-1)*Math.pow(2,n),b=0));n>=8;a[f+E]=y&255,E+=R,y/=256,n-=8);for(b=b<<n|y,w+=n;w>0;a[f+E]=b&255,E+=R,b/=256,w-=8);a[f+E-R]|=T*128}),Tp}var Ph={},cA=!1;function pn(){if(cA)return Ph;cA=!0;let a=TY(),o=kY(),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ph.Buffer=b,Ph.SlowBuffer=P,Ph.INSPECT_MAX_BYTES=50;let d=2147483647;Ph.kMaxLength=d,b.TYPED_ARRAY_SUPPORT=n(),!b.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 n(){try{let $=new Uint8Array(1),A={foo:function(){return 42}};return Object.setPrototypeOf(A,Uint8Array.prototype),Object.setPrototypeOf($,A),$.foo()===42}catch{return!1}}Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.buffer}}),Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.byteOffset}});function v($){if($>d)throw new RangeError('The value "'+$+'" is invalid for option "size"');let A=new Uint8Array($);return Object.setPrototypeOf(A,b.prototype),A}function b($,A,I){if(typeof $=="number"){if(typeof A=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g($)}return y($,A,I)}b.poolSize=8192;function y($,A,I){if(typeof $=="string")return _($,A);if(ArrayBuffer.isView($))return E($);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(he($,ArrayBuffer)||$&&he($.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(he($,SharedArrayBuffer)||$&&he($.buffer,SharedArrayBuffer)))return R($,A,I);if(typeof $=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=$.valueOf&&$.valueOf();if(C!=null&&C!==$)return b.from(C,A,I);let H=T($);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]=="function")return b.from($[Symbol.toPrimitive]("string"),A,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}b.from=function($,A,I){return y($,A,I)},Object.setPrototypeOf(b.prototype,Uint8Array.prototype),Object.setPrototypeOf(b,Uint8Array);function M($){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 w($,A,I){return M($),$<=0?v($):A!==void 0?typeof I=="string"?v($).fill(A,I):v($).fill(A):v($)}b.alloc=function($,A,I){return w($,A,I)};function g($){return M($),v($<0?0:N($)|0)}b.allocUnsafe=function($){return g($)},b.allocUnsafeSlow=function($){return g($)};function _($,A){if((typeof A!="string"||A==="")&&(A="utf8"),!b.isEncoding(A))throw new TypeError("Unknown encoding: "+A);let I=L($,A)|0,C=v(I),H=C.write($,A);return H!==I&&(C=C.slice(0,H)),C}function x($){let A=$.length<0?0:N($.length)|0,I=v(A);for(let C=0;C<A;C+=1)I[C]=$[C]&255;return I}function E($){if(he($,Uint8Array)){let A=new Uint8Array($);return R(A.buffer,A.byteOffset,A.byteLength)}return x($)}function R($,A,I){if(A<0||$.byteLength<A)throw new RangeError('"offset" is outside of buffer bounds');if($.byteLength<A+(I||0))throw new RangeError('"length" is outside of buffer bounds');let C;return A===void 0&&I===void 0?C=new Uint8Array($):I===void 0?C=new Uint8Array($,A):C=new Uint8Array($,A,I),Object.setPrototypeOf(C,b.prototype),C}function T($){if(b.isBuffer($)){let A=N($.length)|0,I=v(A);return I.length===0||$.copy(I,0,0,A),I}if($.length!==void 0)return typeof $.length!="number"||nt($.length)?v(0):x($);if($.type==="Buffer"&&Array.isArray($.data))return x($.data)}function N($){if($>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return $|0}function P($){return+$!=$&&($=0),b.alloc(+$)}b.isBuffer=function(A){return A!=null&&A._isBuffer===!0&&A!==b.prototype},b.compare=function(A,I){if(he(A,Uint8Array)&&(A=b.from(A,A.offset,A.byteLength)),he(I,Uint8Array)&&(I=b.from(I,I.offset,I.byteLength)),!b.isBuffer(A)||!b.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(A===I)return 0;let C=A.length,H=I.length;for(let ne=0,J=Math.min(C,H);ne<J;++ne)if(A[ne]!==I[ne]){C=A[ne],H=I[ne];break}return C<H?-1:H<C?1:0},b.isEncoding=function(A){switch(String(A).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}},b.concat=function(A,I){if(!Array.isArray(A))throw new TypeError('"list" argument must be an Array of Buffers');if(A.length===0)return b.alloc(0);let C;if(I===void 0)for(I=0,C=0;C<A.length;++C)I+=A[C].length;let H=b.allocUnsafe(I),ne=0;for(C=0;C<A.length;++C){let J=A[C];if(he(J,Uint8Array))ne+J.length>H.length?(b.isBuffer(J)||(J=b.from(J)),J.copy(H,ne)):Uint8Array.prototype.set.call(H,J,ne);else if(b.isBuffer(J))J.copy(H,ne);else throw new TypeError('"list" argument must be an Array of Buffers');ne+=J.length}return H};function L($,A){if(b.isBuffer($))return $.length;if(ArrayBuffer.isView($)||he($,ArrayBuffer))return $.byteLength;if(typeof $!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);let I=$.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&I===0)return 0;let H=!1;for(;;)switch(A){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return me($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return ye($).length;default:if(H)return C?-1:me($).length;A=(""+A).toLowerCase(),H=!0}}b.byteLength=L;function D($,A,I){let C=!1;if((A===void 0||A<0)&&(A=0),A>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,A>>>=0,I<=A))return"";for($||($="utf8");;)switch($){case"hex":return l(this,A,I);case"utf8":case"utf-8":return i(this,A,I);case"ascii":return c(this,A,I);case"latin1":case"binary":return m(this,A,I);case"base64":return r(this,A,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t(this,A,I);default:if(C)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),C=!0}}b.prototype._isBuffer=!0;function Z($,A,I){let C=$[A];$[A]=$[I],$[I]=C}b.prototype.swap16=function(){let A=this.length;if(A%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;I<A;I+=2)Z(this,I,I+1);return this},b.prototype.swap32=function(){let A=this.length;if(A%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let I=0;I<A;I+=4)Z(this,I,I+3),Z(this,I+1,I+2);return this},b.prototype.swap64=function(){let A=this.length;if(A%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let I=0;I<A;I+=8)Z(this,I,I+7),Z(this,I+1,I+6),Z(this,I+2,I+5),Z(this,I+3,I+4);return this},b.prototype.toString=function(){let A=this.length;return A===0?"":arguments.length===0?i(this,0,A):D.apply(this,arguments)},b.prototype.toLocaleString=b.prototype.toString,b.prototype.equals=function(A){if(!b.isBuffer(A))throw new TypeError("Argument must be a Buffer");return this===A?!0:b.compare(this,A)===0},b.prototype.inspect=function(){let A="",I=Ph.INSPECT_MAX_BYTES;return A=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(A+=" ... "),"<Buffer "+A+">"},f&&(b.prototype[f]=b.prototype.inspect),b.prototype.compare=function(A,I,C,H,ne){if(he(A,Uint8Array)&&(A=b.from(A,A.offset,A.byteLength)),!b.isBuffer(A))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof A);if(I===void 0&&(I=0),C===void 0&&(C=A?A.length:0),H===void 0&&(H=0),ne===void 0&&(ne=this.length),I<0||C>A.length||H<0||ne>this.length)throw new RangeError("out of range index");if(H>=ne&&I>=C)return 0;if(H>=ne)return-1;if(I>=C)return 1;if(I>>>=0,C>>>=0,H>>>=0,ne>>>=0,this===A)return 0;let J=ne-H,de=C-I,st=Math.min(J,de),le=this.slice(H,ne),ve=A.slice(I,C);for(let ot=0;ot<st;++ot)if(le[ot]!==ve[ot]){J=le[ot],de=ve[ot];break}return J<de?-1:de<J?1:0};function W($,A,I,C,H){if($.length===0)return-1;if(typeof I=="string"?(C=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,nt(I)&&(I=H?0:$.length-1),I<0&&(I=$.length+I),I>=$.length){if(H)return-1;I=$.length-1}else if(I<0)if(H)I=0;else return-1;if(typeof A=="string"&&(A=b.from(A,C)),b.isBuffer(A))return A.length===0?-1:Q($,A,I,C,H);if(typeof A=="number")return A=A&255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call($,A,I):Uint8Array.prototype.lastIndexOf.call($,A,I):Q($,[A],I,C,H);throw new TypeError("val must be string, number or Buffer")}function Q($,A,I,C,H){let ne=1,J=$.length,de=A.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if($.length<2||A.length<2)return-1;ne=2,J/=2,de/=2,I/=2}function st(ve,ot){return ne===1?ve[ot]:ve.readUInt16BE(ot*ne)}let le;if(H){let ve=-1;for(le=I;le<J;le++)if(st($,le)===st(A,ve===-1?0:le-ve)){if(ve===-1&&(ve=le),le-ve+1===de)return ve*ne}else ve!==-1&&(le-=le-ve),ve=-1}else for(I+de>J&&(I=J-de),le=I;le>=0;le--){let ve=!0;for(let ot=0;ot<de;ot++)if(st($,le+ot)!==st(A,ot)){ve=!1;break}if(ve)return le}return-1}b.prototype.includes=function(A,I,C){return this.indexOf(A,I,C)!==-1},b.prototype.indexOf=function(A,I,C){return W(this,A,I,C,!0)},b.prototype.lastIndexOf=function(A,I,C){return W(this,A,I,C,!1)};function K($,A,I,C){I=Number(I)||0;let H=$.length-I;C?(C=Number(C),C>H&&(C=H)):C=H;let ne=A.length;C>ne/2&&(C=ne/2);let J;for(J=0;J<C;++J){let de=parseInt(A.substr(J*2,2),16);if(nt(de))return J;$[I+J]=de}return J}function z($,A,I,C){return fe(me(A,$.length-I),$,I,C)}function X($,A,I,C){return fe(re(A),$,I,C)}function p($,A,I,C){return fe(ye(A),$,I,C)}function e($,A,I,C){return fe(ae(A,$.length-I),$,I,C)}b.prototype.write=function(A,I,C,H){if(I===void 0)H="utf8",C=this.length,I=0;else if(C===void 0&&typeof I=="string")H=I,C=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(C)?(C=C>>>0,H===void 0&&(H="utf8")):(H=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let ne=this.length-I;if((C===void 0||C>ne)&&(C=ne),A.length>0&&(C<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let J=!1;for(;;)switch(H){case"hex":return K(this,A,I,C);case"utf8":case"utf-8":return z(this,A,I,C);case"ascii":case"latin1":case"binary":return X(this,A,I,C);case"base64":return p(this,A,I,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e(this,A,I,C);default:if(J)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),J=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function r($,A,I){return A===0&&I===$.length?a.fromByteArray($):a.fromByteArray($.slice(A,I))}function i($,A,I){I=Math.min($.length,I);let C=[],H=A;for(;H<I;){let ne=$[H],J=null,de=ne>239?4:ne>223?3:ne>191?2:1;if(H+de<=I){let st,le,ve,ot;switch(de){case 1:ne<128&&(J=ne);break;case 2:st=$[H+1],(st&192)===128&&(ot=(ne&31)<<6|st&63,ot>127&&(J=ot));break;case 3:st=$[H+1],le=$[H+2],(st&192)===128&&(le&192)===128&&(ot=(ne&15)<<12|(st&63)<<6|le&63,ot>2047&&(ot<55296||ot>57343)&&(J=ot));break;case 4:st=$[H+1],le=$[H+2],ve=$[H+3],(st&192)===128&&(le&192)===128&&(ve&192)===128&&(ot=(ne&15)<<18|(st&63)<<12|(le&63)<<6|ve&63,ot>65535&&ot<1114112&&(J=ot))}}J===null?(J=65533,de=1):J>65535&&(J-=65536,C.push(J>>>10&1023|55296),J=56320|J&1023),C.push(J),H+=de}return h(C)}let s=4096;function h($){let A=$.length;if(A<=s)return String.fromCharCode.apply(String,$);let I="",C=0;for(;C<A;)I+=String.fromCharCode.apply(String,$.slice(C,C+=s));return I}function c($,A,I){let C="";I=Math.min($.length,I);for(let H=A;H<I;++H)C+=String.fromCharCode($[H]&127);return C}function m($,A,I){let C="";I=Math.min($.length,I);for(let H=A;H<I;++H)C+=String.fromCharCode($[H]);return C}function l($,A,I){let C=$.length;(!A||A<0)&&(A=0),(!I||I<0||I>C)&&(I=C);let H="";for(let ne=A;ne<I;++ne)H+=ce[$[ne]];return H}function t($,A,I){let C=$.slice(A,I),H="";for(let ne=0;ne<C.length-1;ne+=2)H+=String.fromCharCode(C[ne]+C[ne+1]*256);return H}b.prototype.slice=function(A,I){let C=this.length;A=~~A,I=I===void 0?C:~~I,A<0?(A+=C,A<0&&(A=0)):A>C&&(A=C),I<0?(I+=C,I<0&&(I=0)):I>C&&(I=C),I<A&&(I=A);let H=this.subarray(A,I);return Object.setPrototypeOf(H,b.prototype),H};function u($,A,I){if($%1!==0||$<0)throw new RangeError("offset is not uint");if($+A>I)throw new RangeError("Trying to access beyond buffer length")}b.prototype.readUintLE=b.prototype.readUIntLE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=this[A],ne=1,J=0;for(;++J<I&&(ne*=256);)H+=this[A+J]*ne;return H},b.prototype.readUintBE=b.prototype.readUIntBE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=this[A+--I],ne=1;for(;I>0&&(ne*=256);)H+=this[A+--I]*ne;return H},b.prototype.readUint8=b.prototype.readUInt8=function(A,I){return A=A>>>0,I||u(A,1,this.length),this[A]},b.prototype.readUint16LE=b.prototype.readUInt16LE=function(A,I){return A=A>>>0,I||u(A,2,this.length),this[A]|this[A+1]<<8},b.prototype.readUint16BE=b.prototype.readUInt16BE=function(A,I){return A=A>>>0,I||u(A,2,this.length),this[A]<<8|this[A+1]},b.prototype.readUint32LE=b.prototype.readUInt32LE=function(A,I){return A=A>>>0,I||u(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+this[A+3]*16777216},b.prototype.readUint32BE=b.prototype.readUInt32BE=function(A,I){return A=A>>>0,I||u(A,4,this.length),this[A]*16777216+(this[A+1]<<16|this[A+2]<<8|this[A+3])},b.prototype.readBigUInt64LE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=I+this[++A]*2**8+this[++A]*2**16+this[++A]*2**24,ne=this[++A]+this[++A]*2**8+this[++A]*2**16+C*2**24;return BigInt(H)+(BigInt(ne)<<BigInt(32))}),b.prototype.readBigUInt64BE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=I*2**24+this[++A]*2**16+this[++A]*2**8+this[++A],ne=this[++A]*2**24+this[++A]*2**16+this[++A]*2**8+C;return(BigInt(H)<<BigInt(32))+BigInt(ne)}),b.prototype.readIntLE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=this[A],ne=1,J=0;for(;++J<I&&(ne*=256);)H+=this[A+J]*ne;return ne*=128,H>=ne&&(H-=Math.pow(2,8*I)),H},b.prototype.readIntBE=function(A,I,C){A=A>>>0,I=I>>>0,C||u(A,I,this.length);let H=I,ne=1,J=this[A+--H];for(;H>0&&(ne*=256);)J+=this[A+--H]*ne;return ne*=128,J>=ne&&(J-=Math.pow(2,8*I)),J},b.prototype.readInt8=function(A,I){return A=A>>>0,I||u(A,1,this.length),this[A]&128?(255-this[A]+1)*-1:this[A]},b.prototype.readInt16LE=function(A,I){A=A>>>0,I||u(A,2,this.length);let C=this[A]|this[A+1]<<8;return C&32768?C|4294901760:C},b.prototype.readInt16BE=function(A,I){A=A>>>0,I||u(A,2,this.length);let C=this[A+1]|this[A]<<8;return C&32768?C|4294901760:C},b.prototype.readInt32LE=function(A,I){return A=A>>>0,I||u(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},b.prototype.readInt32BE=function(A,I){return A=A>>>0,I||u(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},b.prototype.readBigInt64LE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=this[A+4]+this[A+5]*2**8+this[A+6]*2**16+(C<<24);return(BigInt(H)<<BigInt(32))+BigInt(I+this[++A]*2**8+this[++A]*2**16+this[++A]*2**24)}),b.prototype.readBigInt64BE=be(function(A){A=A>>>0,j(A,"offset");let I=this[A],C=this[A+7];(I===void 0||C===void 0)&&V(A,this.length-8);let H=(I<<24)+this[++A]*2**16+this[++A]*2**8+this[++A];return(BigInt(H)<<BigInt(32))+BigInt(this[++A]*2**24+this[++A]*2**16+this[++A]*2**8+C)}),b.prototype.readFloatLE=function(A,I){return A=A>>>0,I||u(A,4,this.length),o.read(this,A,!0,23,4)},b.prototype.readFloatBE=function(A,I){return A=A>>>0,I||u(A,4,this.length),o.read(this,A,!1,23,4)},b.prototype.readDoubleLE=function(A,I){return A=A>>>0,I||u(A,8,this.length),o.read(this,A,!0,52,8)},b.prototype.readDoubleBE=function(A,I){return A=A>>>0,I||u(A,8,this.length),o.read(this,A,!1,52,8)};function S($,A,I,C,H,ne){if(!b.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>H||A<ne)throw new RangeError('"value" argument is out of bounds');if(I+C>$.length)throw new RangeError("Index out of range")}b.prototype.writeUintLE=b.prototype.writeUIntLE=function(A,I,C,H){if(A=+A,I=I>>>0,C=C>>>0,!H){let de=Math.pow(2,8*C)-1;S(this,A,I,C,de,0)}let ne=1,J=0;for(this[I]=A&255;++J<C&&(ne*=256);)this[I+J]=A/ne&255;return I+C},b.prototype.writeUintBE=b.prototype.writeUIntBE=function(A,I,C,H){if(A=+A,I=I>>>0,C=C>>>0,!H){let de=Math.pow(2,8*C)-1;S(this,A,I,C,de,0)}let ne=C-1,J=1;for(this[I+ne]=A&255;--ne>=0&&(J*=256);)this[I+ne]=A/J&255;return I+C},b.prototype.writeUint8=b.prototype.writeUInt8=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,1,255,0),this[I]=A&255,I+1},b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,65535,0),this[I]=A&255,this[I+1]=A>>>8,I+2},b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,65535,0),this[I]=A>>>8,this[I+1]=A&255,I+2},b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,4294967295,0),this[I+3]=A>>>24,this[I+2]=A>>>16,this[I+1]=A>>>8,this[I]=A&255,I+4},b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,4294967295,0),this[I]=A>>>24,this[I+1]=A>>>16,this[I+2]=A>>>8,this[I+3]=A&255,I+4};function B($,A,I,C,H){Y(A,C,H,$,I,7);let ne=Number(A&BigInt(4294967295));$[I++]=ne,ne=ne>>8,$[I++]=ne,ne=ne>>8,$[I++]=ne,ne=ne>>8,$[I++]=ne;let J=Number(A>>BigInt(32)&BigInt(4294967295));return $[I++]=J,J=J>>8,$[I++]=J,J=J>>8,$[I++]=J,J=J>>8,$[I++]=J,I}function k($,A,I,C,H){Y(A,C,H,$,I,7);let ne=Number(A&BigInt(4294967295));$[I+7]=ne,ne=ne>>8,$[I+6]=ne,ne=ne>>8,$[I+5]=ne,ne=ne>>8,$[I+4]=ne;let J=Number(A>>BigInt(32)&BigInt(4294967295));return $[I+3]=J,J=J>>8,$[I+2]=J,J=J>>8,$[I+1]=J,J=J>>8,$[I]=J,I+8}b.prototype.writeBigUInt64LE=be(function(A,I=0){return B(this,A,I,BigInt(0),BigInt("0xffffffffffffffff"))}),b.prototype.writeBigUInt64BE=be(function(A,I=0){return k(this,A,I,BigInt(0),BigInt("0xffffffffffffffff"))}),b.prototype.writeIntLE=function(A,I,C,H){if(A=+A,I=I>>>0,!H){let st=Math.pow(2,8*C-1);S(this,A,I,C,st-1,-st)}let ne=0,J=1,de=0;for(this[I]=A&255;++ne<C&&(J*=256);)A<0&&de===0&&this[I+ne-1]!==0&&(de=1),this[I+ne]=(A/J>>0)-de&255;return I+C},b.prototype.writeIntBE=function(A,I,C,H){if(A=+A,I=I>>>0,!H){let st=Math.pow(2,8*C-1);S(this,A,I,C,st-1,-st)}let ne=C-1,J=1,de=0;for(this[I+ne]=A&255;--ne>=0&&(J*=256);)A<0&&de===0&&this[I+ne+1]!==0&&(de=1),this[I+ne]=(A/J>>0)-de&255;return I+C},b.prototype.writeInt8=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,1,127,-128),A<0&&(A=255+A+1),this[I]=A&255,I+1},b.prototype.writeInt16LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,32767,-32768),this[I]=A&255,this[I+1]=A>>>8,I+2},b.prototype.writeInt16BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,2,32767,-32768),this[I]=A>>>8,this[I+1]=A&255,I+2},b.prototype.writeInt32LE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,2147483647,-2147483648),this[I]=A&255,this[I+1]=A>>>8,this[I+2]=A>>>16,this[I+3]=A>>>24,I+4},b.prototype.writeInt32BE=function(A,I,C){return A=+A,I=I>>>0,C||S(this,A,I,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),this[I]=A>>>24,this[I+1]=A>>>16,this[I+2]=A>>>8,this[I+3]=A&255,I+4},b.prototype.writeBigInt64LE=be(function(A,I=0){return B(this,A,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),b.prototype.writeBigInt64BE=be(function(A,I=0){return k(this,A,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function q($,A,I,C,H,ne){if(I+C>$.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function F($,A,I,C,H){return A=+A,I=I>>>0,H||q($,A,I,4),o.write($,A,I,C,23,4),I+4}b.prototype.writeFloatLE=function(A,I,C){return F(this,A,I,!0,C)},b.prototype.writeFloatBE=function(A,I,C){return F(this,A,I,!1,C)};function ee($,A,I,C,H){return A=+A,I=I>>>0,H||q($,A,I,8),o.write($,A,I,C,52,8),I+8}b.prototype.writeDoubleLE=function(A,I,C){return ee(this,A,I,!0,C)},b.prototype.writeDoubleBE=function(A,I,C){return ee(this,A,I,!1,C)},b.prototype.copy=function(A,I,C,H){if(!b.isBuffer(A))throw new TypeError("argument should be a Buffer");if(C||(C=0),!H&&H!==0&&(H=this.length),I>=A.length&&(I=A.length),I||(I=0),H>0&&H<C&&(H=C),H===C||A.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),A.length-I<H-C&&(H=A.length-I+C);let ne=H-C;return this===A&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(I,C,H):Uint8Array.prototype.set.call(A,this.subarray(C,H),I),ne},b.prototype.fill=function(A,I,C,H){if(typeof A=="string"){if(typeof I=="string"?(H=I,I=0,C=this.length):typeof C=="string"&&(H=C,C=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!b.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(A.length===1){let J=A.charCodeAt(0);(H==="utf8"&&J<128||H==="latin1")&&(A=J)}}else typeof A=="number"?A=A&255:typeof A=="boolean"&&(A=Number(A));if(I<0||this.length<I||this.length<C)throw new RangeError("Out of range index");if(C<=I)return this;I=I>>>0,C=C===void 0?this.length:C>>>0,A||(A=0);let ne;if(typeof A=="number")for(ne=I;ne<C;++ne)this[ne]=A;else{let J=b.isBuffer(A)?A:b.from(A,H),de=J.length;if(de===0)throw new TypeError('The value "'+A+'" is invalid for argument "value"');for(ne=0;ne<C-I;++ne)this[ne+I]=J[ne%de]}return this};let te={};function O($,A,I){te[$]=class extends I{constructor(){super(),Object.defineProperty(this,"message",{value:A.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${$}]`,this.stack,delete this.name}get code(){return $}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${$}]: ${this.message}`}}}O("ERR_BUFFER_OUT_OF_BOUNDS",function($){return $?`${$} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function($,A){return`The "${$}" argument must be of type number. Received type ${typeof A}`},TypeError),O("ERR_OUT_OF_RANGE",function($,A,I){let C=`The value of "${$}" is out of range.`,H=I;return Number.isInteger(I)&&Math.abs(I)>2**32?H=U(String(I)):typeof I=="bigint"&&(H=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(H=U(H)),H+="n"),C+=` It must be ${A}. Received ${H}`,C},RangeError);function U($){let A="",I=$.length,C=$[0]==="-"?1:0;for(;I>=C+4;I-=3)A=`_${$.slice(I-3,I)}${A}`;return`${$.slice(0,I)}${A}`}function oe($,A,I){j(A,"offset"),($[A]===void 0||$[A+I]===void 0)&&V(A,$.length-(I+1))}function Y($,A,I,C,H,ne){if($>I||$<A){let J=typeof A=="bigint"?"n":"",de;throw A===0||A===BigInt(0)?de=`>= 0${J} and < 2${J} ** ${(ne+1)*8}${J}`:de=`>= -(2${J} ** ${(ne+1)*8-1}${J}) and < 2 ** ${(ne+1)*8-1}${J}`,new te.ERR_OUT_OF_RANGE("value",de,$)}oe(C,H,ne)}function j($,A){if(typeof $!="number")throw new te.ERR_INVALID_ARG_TYPE(A,"number",$)}function V($,A,I){throw Math.floor($)!==$?(j($,I),new te.ERR_OUT_OF_RANGE("offset","an integer",$)):A<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${A}`,$)}let G=/[^+/0-9A-Za-z-_]/g;function ie($){if($=$.split("=")[0],$=$.trim().replace(G,""),$.length<2)return"";for(;$.length%4!==0;)$=$+"=";return $}function me($,A){A=A||1/0;let I,C=$.length,H=null,ne=[];for(let J=0;J<C;++J){if(I=$.charCodeAt(J),I>55295&&I<57344){if(!H){if(I>56319){(A-=3)>-1&&ne.push(239,191,189);continue}else if(J+1===C){(A-=3)>-1&&ne.push(239,191,189);continue}H=I;continue}if(I<56320){(A-=3)>-1&&ne.push(239,191,189),H=I;continue}I=(H-55296<<10|I-56320)+65536}else H&&(A-=3)>-1&&ne.push(239,191,189);if(H=null,I<128){if((A-=1)<0)break;ne.push(I)}else if(I<2048){if((A-=2)<0)break;ne.push(I>>6|192,I&63|128)}else if(I<65536){if((A-=3)<0)break;ne.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((A-=4)<0)break;ne.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return ne}function re($){let A=[];for(let I=0;I<$.length;++I)A.push($.charCodeAt(I)&255);return A}function ae($,A){let I,C,H,ne=[];for(let J=0;J<$.length&&!((A-=2)<0);++J)I=$.charCodeAt(J),C=I>>8,H=I%256,ne.push(H),ne.push(C);return ne}function ye($){return a.toByteArray(ie($))}function fe($,A,I,C){let H;for(H=0;H<C&&!(H+I>=A.length||H>=$.length);++H)A[H+I]=$[H];return H}function he($,A){return $ instanceof A||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===A.name}function nt($){return $!==$}let ce=function(){let $="0123456789abcdef",A=new Array(256);for(let I=0;I<16;++I){let C=I*16;for(let H=0;H<16;++H)A[C+H]=$[I]+$[H]}return A}();function be($){return typeof BigInt>"u"?ut:$}function ut(){throw new Error("BigInt not supported")}return Ph}var rc={},pA=!1;function wr(){if(pA)return rc;pA=!0;var a=pn(),o=a.Buffer;function f(n,v){for(var b in n)v[b]=n[b]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?rc=a:(f(a,rc),rc.Buffer=d);function d(n,v,b){return o(n,v,b)}return d.prototype=Object.create(o.prototype),f(o,d),d.from=function(n,v,b){if(typeof n=="number")throw new TypeError("Argument must not be a number");return o(n,v,b)},d.alloc=function(n,v,b){if(typeof n!="number")throw new TypeError("Argument must be a number");var y=o(n);return v!==void 0?typeof b=="string"?y.fill(v,b):y.fill(v):y.fill(0),y},d.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return o(n)},d.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return a.SlowBuffer(n)},rc}var N3={},vA=!1;function $Y(){if(vA)return N3;vA=!0;var a=wr().Buffer,o=a.isEncoding||function(P){switch(P=""+P,P&&P.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 f(P){if(!P)return"utf8";for(var L;;)switch(P){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 P;default:if(L)return;P=(""+P).toLowerCase(),L=!0}}function d(P){var L=f(P);if(typeof L!="string"&&(a.isEncoding===o||!o(P)))throw new Error("Unknown encoding: "+P);return L||P}N3.StringDecoder=n;function n(P){this.encoding=d(P);var L;switch(this.encoding){case"utf16le":this.text=_,this.end=x,L=4;break;case"utf8":this.fillLast=M,L=4;break;case"base64":this.text=E,this.end=R,L=3;break;default:this.write=T,this.end=N;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(L)}n.prototype.write=function(P){if(P.length===0)return"";var L,D;if(this.lastNeed){if(L=this.fillLast(P),L===void 0)return"";D=this.lastNeed,this.lastNeed=0}else D=0;return D<P.length?L?L+this.text(P,D):this.text(P,D):L||""},n.prototype.end=g,n.prototype.text=w,n.prototype.fillLast=function(P){if(this.lastNeed<=P.length)return P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,P.length),this.lastNeed-=P.length};function v(P){return P<=127?0:P>>5===6?2:P>>4===14?3:P>>3===30?4:P>>6===2?-1:-2}function b(P,L,D){var Z=L.length-1;if(Z<D)return 0;var W=v(L[Z]);return W>=0?(W>0&&(P.lastNeed=W-1),W):--Z<D||W===-2?0:(W=v(L[Z]),W>=0?(W>0&&(P.lastNeed=W-2),W):--Z<D||W===-2?0:(W=v(L[Z]),W>=0?(W>0&&(W===2?W=0:P.lastNeed=W-3),W):0))}function y(P,L,D){if((L[0]&192)!==128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&L.length>1){if((L[1]&192)!==128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&L.length>2&&(L[2]&192)!==128)return P.lastNeed=2,"\uFFFD"}}function M(P){var L=this.lastTotal-this.lastNeed,D=y(this,P);if(D!==void 0)return D;if(this.lastNeed<=P.length)return P.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,L,0,P.length),this.lastNeed-=P.length}function w(P,L){var D=b(this,P,L);if(!this.lastNeed)return P.toString("utf8",L);this.lastTotal=D;var Z=P.length-(D-this.lastNeed);return P.copy(this.lastChar,0,Z),P.toString("utf8",L,Z)}function g(P){var L=P&&P.length?this.write(P):"";return this.lastNeed?L+"\uFFFD":L}function _(P,L){if((P.length-L)%2===0){var D=P.toString("utf16le",L);if(D){var Z=D.charCodeAt(D.length-1);if(Z>=55296&&Z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",L,P.length-1)}function x(P){var L=P&&P.length?this.write(P):"";if(this.lastNeed){var D=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,D)}return L}function E(P,L){var D=(P.length-L)%3;return D===0?P.toString("base64",L):(this.lastNeed=3-D,this.lastTotal=3,D===1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",L,P.length-D))}function R(P){var L=P&&P.length?this.write(P):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function T(P){return P.toString(this.encoding)}function N(P){return P&&P.length?this.write(P):""}return N3}var w2=$Y();w2.StringDecoder;var rbe=w2.StringDecoder;function z9(a){throw new Error("Node.js process "+a+" is not supported by JSPM core outside of Node.js")}var Pf=[],Ll=!1,uu,Gv=-1;function PY(){!Ll||!uu||(Ll=!1,uu.length?Pf=uu.concat(Pf):Gv=-1,Pf.length&&dD())}function dD(){if(!Ll){var a=setTimeout(PY,0);Ll=!0;for(var o=Pf.length;o;){for(uu=Pf,Pf=[];++Gv<o;)uu&&uu[Gv].run();Gv=-1,o=Pf.length}uu=null,Ll=!1,clearTimeout(a)}}function NY(a){var o=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)o[f-1]=arguments[f];Pf.push(new cD(a,o)),Pf.length===1&&!Ll&&setTimeout(dD,0)}function cD(a,o){this.fun=a,this.array=o}cD.prototype.run=function(){this.fun.apply(null,this.array)};var CY="browser",LY="x64",DY="browser",OY={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},qY=["/usr/bin/node"],UY=[],FY="v16.8.0",zY={},HY=function(a,o){console.warn((o?o+": ":"")+a)},KY=function(a){z9("binding")},jY=function(a){return 0},WY=function(){return"/"},ZY=function(a){},GY={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};function Jn(){}var VY=Jn,JY=[];function YY(a){z9("_linkedBinding")}var XY={},QY=!1,eX={};function tX(a){z9("dlopen")}function rX(){return[]}function iX(){return[]}var nX=Jn,aX=Jn,H9=function(){return{}},oX=H9,sX=H9,fX=Jn,hX=Jn,uX=Jn,lX={};function dX(a,o){if(!a)throw new Error(o||"assertion error")}var cX={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},pX=Jn,vX=Jn;function bX(){return!1}var mX=Jn,gX=Jn,yX=Jn,wX=Jn,MX=Jn,_X=void 0,xX=void 0,SX=void 0,EX=Jn,AX=2,BX=1,RX="/bin/usr/node",IX=9229,TX="node",kX=[],$X=Jn,U0={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0};U0.now===void 0&&(C3=Date.now(),U0.timing&&U0.timing.navigationStart&&(C3=U0.timing.navigationStart),U0.now=()=>Date.now()-C3);var C3;function PX(){return U0.now()/1e3}var a9=1e9;function o9(a){var o=Math.floor((Date.now()-U0.now())*.001),f=U0.now()*.001,d=Math.floor(f)+o,n=Math.floor(f%1*1e9);return a&&(d=d-a[0],n=n-a[1],n<0&&(d--,n+=a9)),[d,n]}o9.bigint=function(a){var o=o9(a);return typeof BigInt>"u"?o[0]*a9+o[1]:BigInt(o[0]*a9)+BigInt(o[1])};var NX=10,CX={},LX=0;function K0(){return Eu}var DX=K0,OX=K0,qX=K0,UX=K0,FX=K0,zX=Jn,HX=K0,KX=K0;function jX(a){return[]}var Eu={version:FY,versions:zY,arch:LY,platform:DY,release:GY,_rawDebug:VY,moduleLoadList:JY,binding:KY,_linkedBinding:YY,_events:CX,_eventsCount:LX,_maxListeners:NX,on:K0,addListener:DX,once:OX,off:qX,removeListener:UX,removeAllListeners:FX,emit:zX,prependListener:HX,prependOnceListener:KX,listeners:jX,domain:XY,_exiting:QY,config:eX,dlopen:tX,uptime:PX,_getActiveRequests:rX,_getActiveHandles:iX,reallyExit:nX,_kill:aX,cpuUsage:H9,resourceUsage:oX,memoryUsage:sX,kill:fX,exit:hX,openStdin:uX,allowedNodeEnvironmentFlags:lX,assert:dX,features:cX,_fatalExceptions:pX,setUncaughtExceptionCaptureCallback:vX,hasUncaughtExceptionCaptureCallback:bX,emitWarning:HY,nextTick:NY,_tickCallback:mX,_debugProcess:gX,_debugEnd:yX,_startProfilerIdleNotifier:wX,_stopProfilerIdleNotifier:MX,stdout:_X,stdin:SX,stderr:xX,abort:EX,umask:jY,chdir:ZY,cwd:WY,env:OY,title:CY,argv:qY,execArgv:UY,pid:AX,ppid:BX,execPath:RX,debugPort:IX,hrtime:o9,argv0:TX,_preload_modules:kX,setSourceMapsEnabled:$X},kp={},bA=!1;function Sr(){return bA||(bA=!0,typeof Object.create=="function"?kp=function(o,f){f&&(o.super_=f,o.prototype=Object.create(f.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:kp=function(o,f){if(f){o.super_=f;var d=function(){};d.prototype=f.prototype,o.prototype=new d,o.prototype.constructor=o}}),kp}var pD,vD,Dl=typeof Reflect=="object"?Reflect:null,mA=Dl&&typeof Dl.apply=="function"?Dl.apply:function(a,o,f){return Function.prototype.apply.call(a,o,f)};vD=Dl&&typeof Dl.ownKeys=="function"?Dl.ownKeys:Object.getOwnPropertySymbols?function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:function(a){return Object.getOwnPropertyNames(a)};var gA=Number.isNaN||function(a){return a!=a};function di(){di.init.call(this)}pD=di,di.EventEmitter=di,di.prototype._events=void 0,di.prototype._eventsCount=0,di.prototype._maxListeners=void 0;var yA=10;function Vv(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}function bD(a){return a._maxListeners===void 0?di.defaultMaxListeners:a._maxListeners}function wA(a,o,f,d){var n,v,b,y;if(Vv(f),(v=a._events)===void 0?(v=a._events=Object.create(null),a._eventsCount=0):(v.newListener!==void 0&&(a.emit("newListener",o,f.listener?f.listener:f),v=a._events),b=v[o]),b===void 0)b=v[o]=f,++a._eventsCount;else if(typeof b=="function"?b=v[o]=d?[f,b]:[b,f]:d?b.unshift(f):b.push(f),(n=bD(a))>0&&b.length>n&&!b.warned){b.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+b.length+" "+String(o)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=a,M.type=o,M.count=b.length,y=M,console&&console.warn&&console.warn(y)}return a}function WX(){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 MA(a,o,f){var d={fired:!1,wrapFn:void 0,target:a,type:o,listener:f},n=WX.bind(d);return n.listener=f,d.wrapFn=n,n}function _A(a,o,f){var d=a._events;if(d===void 0)return[];var n=d[o];return n===void 0?[]:typeof n=="function"?f?[n.listener||n]:[n]:f?function(v){for(var b=new Array(v.length),y=0;y<b.length;++y)b[y]=v[y].listener||v[y];return b}(n):mD(n,n.length)}function xA(a){var o=this._events;if(o!==void 0){var f=o[a];if(typeof f=="function")return 1;if(f!==void 0)return f.length}return 0}function mD(a,o){for(var f=new Array(o),d=0;d<o;++d)f[d]=a[d];return f}Object.defineProperty(di,"defaultMaxListeners",{enumerable:!0,get:function(){return yA},set:function(a){if(typeof a!="number"||a<0||gA(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");yA=a}}),di.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},di.prototype.setMaxListeners=function(a){if(typeof a!="number"||a<0||gA(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+a+".");return this._maxListeners=a,this},di.prototype.getMaxListeners=function(){return bD(this)},di.prototype.emit=function(a){for(var o=[],f=1;f<arguments.length;f++)o.push(arguments[f]);var d=a==="error",n=this._events;if(n!==void 0)d=d&&n.error===void 0;else if(!d)return!1;if(d){var v;if(o.length>0&&(v=o[0]),v instanceof Error)throw v;var b=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw b.context=v,b}var y=n[a];if(y===void 0)return!1;if(typeof y=="function")mA(y,this,o);else{var M=y.length,w=mD(y,M);for(f=0;f<M;++f)mA(w[f],this,o)}return!0},di.prototype.addListener=function(a,o){return wA(this,a,o,!1)},di.prototype.on=di.prototype.addListener,di.prototype.prependListener=function(a,o){return wA(this,a,o,!0)},di.prototype.once=function(a,o){return Vv(o),this.on(a,MA(this,a,o)),this},di.prototype.prependOnceListener=function(a,o){return Vv(o),this.prependListener(a,MA(this,a,o)),this},di.prototype.removeListener=function(a,o){var f,d,n,v,b;if(Vv(o),(d=this._events)===void 0)return this;if((f=d[a])===void 0)return this;if(f===o||f.listener===o)--this._eventsCount==0?this._events=Object.create(null):(delete d[a],d.removeListener&&this.emit("removeListener",a,f.listener||o));else if(typeof f!="function"){for(n=-1,v=f.length-1;v>=0;v--)if(f[v]===o||f[v].listener===o){b=f[v].listener,n=v;break}if(n<0)return this;n===0?f.shift():function(y,M){for(;M+1<y.length;M++)y[M]=y[M+1];y.pop()}(f,n),f.length===1&&(d[a]=f[0]),d.removeListener!==void 0&&this.emit("removeListener",a,b||o)}return this},di.prototype.off=di.prototype.removeListener,di.prototype.removeAllListeners=function(a){var o,f,d;if((f=this._events)===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[a]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete f[a]),this;if(arguments.length===0){var n,v=Object.keys(f);for(d=0;d<v.length;++d)(n=v[d])!=="removeListener"&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(o=f[a])=="function")this.removeListener(a,o);else if(o!==void 0)for(d=o.length-1;d>=0;d--)this.removeListener(a,o[d]);return this},di.prototype.listeners=function(a){return _A(this,a,!0)},di.prototype.rawListeners=function(a){return _A(this,a,!1)},di.listenerCount=function(a,o){return typeof a.listenerCount=="function"?a.listenerCount(o):xA.call(a,o)},di.prototype.listenerCount=xA,di.prototype.eventNames=function(){return this._eventsCount>0?vD(this._events):[]};var Hi=pD;Hi.EventEmitter;Hi.defaultMaxListeners;Hi.init;Hi.listenerCount;Hi.EventEmitter;Hi.defaultMaxListeners;Hi.init;Hi.listenerCount;Hi.once=function(a,o){return new Promise((f,d)=>{function n(...b){v!==void 0&&a.removeListener("error",v),f(b)}let v;o!=="error"&&(v=b=>{a.removeListener(name,n),d(b)},a.once("error",v)),a.once(o,n)})};Hi.on=function(a,o){let f=[],d=[],n=null,v=!1,b={async next(){let w=f.shift();if(w)return createIterResult(w,!1);if(n){let g=Promise.reject(n);return n=null,g}return v?createIterResult(void 0,!0):new Promise((g,_)=>d.push({resolve:g,reject:_}))},async return(){a.removeListener(o,y),a.removeListener("error",M),v=!0;for(let w of d)w.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(w){n=w,a.removeListener(o,y),a.removeListener("error",M)},[Symbol.asyncIterator](){return this}};return a.on(o,y),a.on("error",M),b;function y(...w){let g=d.shift();g?g.resolve(createIterResult(w,!1)):f.push(w)}function M(w){v=!0;let g=d.shift();g?g.reject(w):n=w,b.return()}};var gD,Af,Bf,zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,Xi=gD={};function s9(){throw new Error("setTimeout has not been defined")}function f9(){throw new Error("clearTimeout has not been defined")}function yD(a){if(Af===setTimeout)return setTimeout(a,0);if((Af===s9||!Af)&&setTimeout)return Af=setTimeout,setTimeout(a,0);try{return Af(a,0)}catch{try{return Af.call(null,a,0)}catch{return Af.call(this||zl,a,0)}}}(function(){try{Af=typeof setTimeout=="function"?setTimeout:s9}catch{Af=s9}try{Bf=typeof clearTimeout=="function"?clearTimeout:f9}catch{Bf=f9}})();var lu,Nf=[],Ol=!1,Jv=-1;function ZX(){Ol&&lu&&(Ol=!1,lu.length?Nf=lu.concat(Nf):Jv=-1,Nf.length&&wD())}function wD(){if(!Ol){var a=yD(ZX);Ol=!0;for(var o=Nf.length;o;){for(lu=Nf,Nf=[];++Jv<o;)lu&&lu[Jv].run();Jv=-1,o=Nf.length}lu=null,Ol=!1,function(f){if(Bf===clearTimeout)return clearTimeout(f);if((Bf===f9||!Bf)&&clearTimeout)return Bf=clearTimeout,clearTimeout(f);try{Bf(f)}catch{try{return Bf.call(null,f)}catch{return Bf.call(this||zl,f)}}}(a)}}function SA(a,o){(this||zl).fun=a,(this||zl).array=o}function xf(){}Xi.nextTick=function(a){var o=new Array(arguments.length-1);if(arguments.length>1)for(var f=1;f<arguments.length;f++)o[f-1]=arguments[f];Nf.push(new SA(a,o)),Nf.length!==1||Ol||yD(wD)},SA.prototype.run=function(){(this||zl).fun.apply(null,(this||zl).array)},Xi.title="browser",Xi.browser=!0,Xi.env={},Xi.argv=[],Xi.version="",Xi.versions={},Xi.on=xf,Xi.addListener=xf,Xi.once=xf,Xi.off=xf,Xi.removeListener=xf,Xi.removeAllListeners=xf,Xi.emit=xf,Xi.prependListener=xf,Xi.prependOnceListener=xf,Xi.listeners=function(a){return[]},Xi.binding=function(a){throw new Error("process.binding is not supported")},Xi.cwd=function(){return"/"},Xi.chdir=function(a){throw new Error("process.chdir is not supported")},Xi.umask=function(){return 0};var ar=gD;ar.addListener;ar.argv;ar.binding;ar.browser;ar.chdir;ar.cwd;ar.emit;ar.env;ar.listeners;ar.nextTick;ar.off;ar.on;ar.once;ar.prependListener;ar.prependOnceListener;ar.removeAllListeners;ar.removeListener;ar.title;ar.umask;ar.version;ar.versions;var GX=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",h9=Object.prototype.toString,U2=function(a){return!(GX&&a&&typeof a=="object"&&Symbol.toStringTag in a)&&h9.call(a)==="[object Arguments]"},MD=function(a){return!!U2(a)||a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&h9.call(a)!=="[object Array]"&&h9.call(a.callee)==="[object Function]"},VX=function(){return U2(arguments)}();U2.isLegacyArguments=MD;var JX=VX?U2:MD,YX=Object.prototype.toString,XX=Function.prototype.toString,QX=/^\s*(?:function)?\*/,_D=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",xD=Object.getPrototypeOf,EA=function(){if(!_D)return!1;try{return Function("return function*() {}")()}catch{}}(),eQ=EA?xD(EA):{},tQ=function(a){return typeof a=="function"&&(!!QX.test(XX.call(a))||(_D?xD(a)===eQ:YX.call(a)==="[object GeneratorFunction]"))},vr=typeof Object.create=="function"?function(a,o){o&&(a.super_=o,a.prototype=Object.create(o.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:function(a,o){if(o){a.super_=o;var f=function(){};f.prototype=o.prototype,a.prototype=new f,a.prototype.constructor=a}},SD=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"},Tr={},rQ=SD,iQ=JX,nQ=tQ;function Au(a){return a.call.bind(a)}var ED=typeof BigInt<"u",K9=typeof Symbol<"u",Da=K9&&Symbol.toStringTag!==void 0,ya=typeof Uint8Array<"u",aQ=typeof ArrayBuffer<"u";if(ya&&Da)var oQ=Object.getPrototypeOf(Uint8Array.prototype),Mo=Au(Object.getOwnPropertyDescriptor(oQ,Symbol.toStringTag).get);var Ti=Au(Object.prototype.toString),sQ=Au(Number.prototype.valueOf),fQ=Au(String.prototype.valueOf),hQ=Au(Boolean.prototype.valueOf);if(ED)var uQ=Au(BigInt.prototype.valueOf);if(K9)var lQ=Au(Symbol.prototype.valueOf);function Qc(a,o){if(typeof a!="object")return!1;try{return o(a),!0}catch{return!1}}function AA(a){return ya&&Da?Mo(a)!==void 0:AD(a)||BD(a)||RD(a)||ID(a)||TD(a)||kD(a)||$D(a)||PD(a)||ND(a)||CD(a)||LD(a)}function AD(a){return ya&&Da?Mo(a)==="Uint8Array":Ti(a)==="[object Uint8Array]"||rQ(a)&&a.buffer!==void 0}function BD(a){return ya&&Da?Mo(a)==="Uint8ClampedArray":Ti(a)==="[object Uint8ClampedArray]"}function RD(a){return ya&&Da?Mo(a)==="Uint16Array":Ti(a)==="[object Uint16Array]"}function ID(a){return ya&&Da?Mo(a)==="Uint32Array":Ti(a)==="[object Uint32Array]"}function TD(a){return ya&&Da?Mo(a)==="Int8Array":Ti(a)==="[object Int8Array]"}function kD(a){return ya&&Da?Mo(a)==="Int16Array":Ti(a)==="[object Int16Array]"}function $D(a){return ya&&Da?Mo(a)==="Int32Array":Ti(a)==="[object Int32Array]"}function PD(a){return ya&&Da?Mo(a)==="Float32Array":Ti(a)==="[object Float32Array]"}function ND(a){return ya&&Da?Mo(a)==="Float64Array":Ti(a)==="[object Float64Array]"}function CD(a){return ya&&Da?Mo(a)==="BigInt64Array":Ti(a)==="[object BigInt64Array]"}function LD(a){return ya&&Da?Mo(a)==="BigUint64Array":Ti(a)==="[object BigUint64Array]"}function $p(a){return Ti(a)==="[object Map]"}function Pp(a){return Ti(a)==="[object Set]"}function Np(a){return Ti(a)==="[object WeakMap]"}function L3(a){return Ti(a)==="[object WeakSet]"}function M2(a){return Ti(a)==="[object ArrayBuffer]"}function BA(a){return typeof ArrayBuffer<"u"&&(M2.working?M2(a):a instanceof ArrayBuffer)}function _2(a){return Ti(a)==="[object DataView]"}function RA(a){return typeof DataView<"u"&&(_2.working?_2(a):a instanceof DataView)}function x2(a){return Ti(a)==="[object SharedArrayBuffer]"}function IA(a){return typeof SharedArrayBuffer<"u"&&(x2.working?x2(a):a instanceof SharedArrayBuffer)}function TA(a){return Qc(a,sQ)}function kA(a){return Qc(a,fQ)}function $A(a){return Qc(a,hQ)}function PA(a){return ED&&Qc(a,uQ)}function NA(a){return K9&&Qc(a,lQ)}Tr.isArgumentsObject=iQ,Tr.isGeneratorFunction=nQ,Tr.isPromise=function(a){return typeof Promise<"u"&&a instanceof Promise||a!==null&&typeof a=="object"&&typeof a.then=="function"&&typeof a.catch=="function"},Tr.isArrayBufferView=function(a){return aQ&&ArrayBuffer.isView?ArrayBuffer.isView(a):AA(a)||RA(a)},Tr.isTypedArray=AA,Tr.isUint8Array=AD,Tr.isUint8ClampedArray=BD,Tr.isUint16Array=RD,Tr.isUint32Array=ID,Tr.isInt8Array=TD,Tr.isInt16Array=kD,Tr.isInt32Array=$D,Tr.isFloat32Array=PD,Tr.isFloat64Array=ND,Tr.isBigInt64Array=CD,Tr.isBigUint64Array=LD,$p.working=typeof Map<"u"&&$p(new Map),Tr.isMap=function(a){return typeof Map<"u"&&($p.working?$p(a):a instanceof Map)},Pp.working=typeof Set<"u"&&Pp(new Set),Tr.isSet=function(a){return typeof Set<"u"&&(Pp.working?Pp(a):a instanceof Set)},Np.working=typeof WeakMap<"u"&&Np(new WeakMap),Tr.isWeakMap=function(a){return typeof WeakMap<"u"&&(Np.working?Np(a):a instanceof WeakMap)},L3.working=typeof WeakSet<"u"&&L3(new WeakSet),Tr.isWeakSet=function(a){return L3(a)},M2.working=typeof ArrayBuffer<"u"&&M2(new ArrayBuffer),Tr.isArrayBuffer=BA,_2.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&_2(new DataView(new ArrayBuffer(1),0,1)),Tr.isDataView=RA,x2.working=typeof SharedArrayBuffer<"u"&&x2(new SharedArrayBuffer),Tr.isSharedArrayBuffer=IA,Tr.isAsyncFunction=function(a){return Ti(a)==="[object AsyncFunction]"},Tr.isMapIterator=function(a){return Ti(a)==="[object Map Iterator]"},Tr.isSetIterator=function(a){return Ti(a)==="[object Set Iterator]"},Tr.isGeneratorObject=function(a){return Ti(a)==="[object Generator]"},Tr.isWebAssemblyCompiledModule=function(a){return Ti(a)==="[object WebAssembly.Module]"},Tr.isNumberObject=TA,Tr.isStringObject=kA,Tr.isBooleanObject=$A,Tr.isBigIntObject=PA,Tr.isSymbolObject=NA,Tr.isBoxedPrimitive=function(a){return TA(a)||kA(a)||$A(a)||PA(a)||NA(a)},Tr.isAnyArrayBuffer=function(a){return ya&&(BA(a)||IA(a))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(a){Object.defineProperty(Tr,a,{enumerable:!1,value:function(){throw new Error(a+" is not supported in userland")}})});var Lc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:globalThis,wt={},Gs=ar,CA=Object.getOwnPropertyDescriptors||function(a){for(var o=Object.keys(a),f={},d=0;d<o.length;d++)f[o[d]]=Object.getOwnPropertyDescriptor(a,o[d]);return f},dQ=/%[sdj%]/g;wt.format=function(a){if(!E2(a)){for(var o=[],f=0;f<arguments.length;f++)o.push(H0(arguments[f]));return o.join(" ")}f=1;for(var d=arguments,n=d.length,v=String(a).replace(dQ,function(y){if(y==="%%")return"%";if(f>=n)return y;switch(y){case"%s":return String(d[f++]);case"%d":return Number(d[f++]);case"%j":try{return JSON.stringify(d[f++])}catch{return"[Circular]"}default:return y}}),b=d[f];f<n;b=d[++f])F2(b)||!Wl(b)?v+=" "+b:v+=" "+H0(b);return v},wt.deprecate=function(a,o){if(Gs!==void 0&&Gs.noDeprecation===!0)return a;if(Gs===void 0)return function(){return wt.deprecate(a,o).apply(this||Lc,arguments)};var f=!1;return function(){if(!f){if(Gs.throwDeprecation)throw new Error(o);Gs.traceDeprecation?console.trace(o):console.error(o),f=!0}return a.apply(this||Lc,arguments)}};var Cp={},DD=/^$/;Gs.env.NODE_DEBUG&&(Lp=Gs.env.NODE_DEBUG,Lp=Lp.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),DD=new RegExp("^"+Lp+"$","i"));var Lp;function H0(a,o){var f={seen:[],stylize:pQ};return arguments.length>=3&&(f.depth=arguments[2]),arguments.length>=4&&(f.colors=arguments[3]),j9(o)?f.showHidden=o:o&&wt._extend(f,o),du(f.showHidden)&&(f.showHidden=!1),du(f.depth)&&(f.depth=2),du(f.colors)&&(f.colors=!1),du(f.customInspect)&&(f.customInspect=!0),f.colors&&(f.stylize=cQ),S2(f,a,f.depth)}function cQ(a,o){var f=H0.styles[o];return f?"\x1B["+H0.colors[f][0]+"m"+a+"\x1B["+H0.colors[f][1]+"m":a}function pQ(a,o){return a}function S2(a,o,f){if(a.customInspect&&o&&Yv(o.inspect)&&o.inspect!==wt.inspect&&(!o.constructor||o.constructor.prototype!==o)){var d=o.inspect(f,a);return E2(d)||(d=S2(a,d,f)),d}var n=function(x,E){if(du(E))return x.stylize("undefined","undefined");if(E2(E)){var R="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return x.stylize(R,"string")}if(qD(E))return x.stylize(""+E,"number");if(j9(E))return x.stylize(""+E,"boolean");if(F2(E))return x.stylize("null","null")}(a,o);if(n)return n;var v=Object.keys(o),b=function(x){var E={};return x.forEach(function(R,T){E[R]=!0}),E}(v);if(a.showHidden&&(v=Object.getOwnPropertyNames(o)),Oc(o)&&(v.indexOf("message")>=0||v.indexOf("description")>=0))return D3(o);if(v.length===0){if(Yv(o)){var y=o.name?": "+o.name:"";return a.stylize("[Function"+y+"]","special")}if(Dc(o))return a.stylize(RegExp.prototype.toString.call(o),"regexp");if(A2(o))return a.stylize(Date.prototype.toString.call(o),"date");if(Oc(o))return D3(o)}var M,w="",g=!1,_=["{","}"];return OD(o)&&(g=!0,_=["[","]"]),Yv(o)&&(w=" [Function"+(o.name?": "+o.name:"")+"]"),Dc(o)&&(w=" "+RegExp.prototype.toString.call(o)),A2(o)&&(w=" "+Date.prototype.toUTCString.call(o)),Oc(o)&&(w=" "+D3(o)),v.length!==0||g&&o.length!=0?f<0?Dc(o)?a.stylize(RegExp.prototype.toString.call(o),"regexp"):a.stylize("[Object]","special"):(a.seen.push(o),M=g?function(x,E,R,T,N){for(var P=[],L=0,D=E.length;L<D;++L)UD(E,String(L))?P.push(O3(x,E,R,T,String(L),!0)):P.push("");return N.forEach(function(Z){Z.match(/^\d+$/)||P.push(O3(x,E,R,T,Z,!0))}),P}(a,o,f,b,v):v.map(function(x){return O3(a,o,f,b,x,g)}),a.seen.pop(),function(x,E,R){var T=0;return x.reduce(function(N,P){return T++,P.indexOf(`
36
36
  `)>=0&&T++,N+P.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?R[0]+(E===""?"":E+`
37
37
  `)+" "+x.join(`,
38
38
  `)+" "+R[1]:R[0]+E+" "+x.join(", ")+" "+R[1]}(M,w,_)):_[0]+w+_[1]}function D3(a){return"["+Error.prototype.toString.call(a)+"]"}function O3(a,o,f,d,n,v){var b,y,M;if((M=Object.getOwnPropertyDescriptor(o,n)||{value:o[n]}).get?y=M.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):M.set&&(y=a.stylize("[Setter]","special")),UD(d,n)||(b="["+n+"]"),y||(a.seen.indexOf(M.value)<0?(y=F2(f)?S2(a,M.value,null):S2(a,M.value,f-1)).indexOf(`
@@ -122,4 +122,3 @@ safe-buffer/index.js:
122
122
  @noble/ed25519/lib/esm/index.js:
123
123
  (*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) *)
124
124
  */
125
- //# sourceMappingURL=index.esm.js.map