Hire the best car at the best price

“Unlock Your Journey, Wherever Life Takes You: Reliable Rides, 24/7 Support!”

Introducing

Best car rental deals

“Drive with Confidence, Anytime, Anywhere!”

Call Us For Your Next Ride

+355 68 320 0010

Embark on your next adventure with confidence, knowing that DokaRent is here to support you every step of the way. Our commitment to excellence extends beyond just offering competitive prices and a diverse fleet of vehicles. With us, you’ll also enjoy:

Competitive Prices

At DokaRent, we're proud to offer unbeatable prices on all our vehicles. Drive away with confidence knowing you've got the best deal in town. Start your journey today!

Breakdown Assistance

At DokaRent, your safety is our top priority. That's why every rental comes with complimentary breakdown assistance. No matter where your adventure takes you, we've got you covered. Drive with confidence knowing help is just a phone call away.

24/7 Customer Support

At DokaRent, we're here for you anytime, anywhere. Our dedicated customer support team is available 24/7 to assist you with any questions or concerns you may have. From booking inquiries to on-road assistance, we've got your back, day or night. Experience hassle-free travel with our unwavering commitment to your satisfaction.

4.8 (729 Reviews)
4.5/5

Car Rental Service With Smiling Prices

0 +
Cars On Sale
0 +
Brands of Car
0 %
Happy Customer
0 +
Years of Experience

Car List

We Offer Best Car

Welcome to a new way of exploring—welcome to DokaRent

Promo !

Mercedes-Benz CLS (2012)

“Driving Dreams, One Rental at a Time!”

Promo !

Merceds-Benz C-Class (2009)

“Driving Dreams, One Rental at a Time!”

Promo !

Opel Corsa (2011)

“Driving Dreams, One Rental at a Time!”

Promo !

Mercedes-Benz Viano (2012)

“Driving Dreams, One Rental at a Time!”

Promo !

Golf Plus (2007)

“Driving Dreams, One Rental at a Time!”

What Our Customer Say

“Empowering Your Journey, One Mile at a Time!”

Call Us Today For Booking Your Next Ride

(()=>{var Jat=Object.create;var OT=Object.defineProperty;var Xat=Object.getOwnPropertyDescriptor;var ect=Object.getOwnPropertyNames;var tct=Object.getPrototypeOf,rct=Object.prototype.hasOwnProperty;var l6=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var X=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Hr=(t,e)=>{for(var r in e)OT(t,r,{get:e[r],enumerable:!0})},PT=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ect(e))!rct.call(t,i)&&i!==r&&OT(t,i,{get:()=>e[i],enumerable:!(n=Xat(e,i))||n.enumerable});return t},hi=(t,e,r)=>(PT(t,e,"default"),r&&PT(r,e,"default")),Tt=(t,e,r)=>(r=t!=null?Jat(tct(t)):{},PT(e||!t||!t.__esModule?OT(r,"default",{value:t,enumerable:!0}):r,t)),Vn=t=>PT(OT({},"__esModule",{value:!0}),t);var Tz,hhe=F(()=>{Tz="2.19.9"});function dhe(t,e){return e?.(t)?t:t&&typeof t=="object"&&"cause"in t?dhe(t.cause,e):e?null:t}var kz,Pe,wn=F(()=>{hhe();kz={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:r})=>e?`${t??"https://viem.sh"}${e}${r?`#${r}`:""}`:void 0,version:Tz},Pe=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,o=kz.getDocsUrl?.({...r,docsPath:i}),s=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...kz.version?[`Version: ${kz.version}`]:[]].join(` `);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=e,this.version=Tz}walk(e){return dhe(this,e)}}});var BT,LT,FT,UT=F(()=>{wn();BT=class extends Pe{constructor({max:e,min:r,signed:n,size:i,value:o}){super(`Number "${o}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"})}},LT=class extends Pe{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}},FT=class extends Pe{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}});var sC,aC,cC,DT=F(()=>{wn();sC=class extends Pe{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}},aC=class extends Pe{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"})}},cC=class extends Pe{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${e} ${n} long.`,{name:"InvalidBytesLengthError"})}}});function Ch(t,{dir:e,size:r=32}={}){return typeof t=="string"?Zp(t,{dir:e,size:r}):nct(t,{dir:e,size:r})}function Zp(t,{dir:e,size:r=32}={}){if(r===null)return t;let n=t.replace("0x","");if(n.length>r*2)throw new aC({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function nct(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new aC({size:t.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let i=0;i{DT()});function ys(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}var Eh=F(()=>{});function di(t){return ys(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}var Ah=F(()=>{Eh()});function os(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let i=0;i{});function Hu(t,e={}){return typeof t=="number"||typeof t=="bigint"?sct(t,e):typeof t=="boolean"?oct(t,e):ys(t)?Go(t,e):a0(t,e)}function oct(t,e={}){let r=new Uint8Array(1);return r[0]=Number(t),typeof e.size=="number"?(tl(r,{size:e.size}),Ch(r,{size:e.size})):r}function phe(t){if(t>=Yp.zero&&t<=Yp.nine)return t-Yp.zero;if(t>=Yp.A&&t<=Yp.F)return t-(Yp.A-10);if(t>=Yp.a&&t<=Yp.f)return t-(Yp.a-10)}function Go(t,e={}){let r=t;e.size&&(tl(r,{size:e.size}),r=Ch(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,o=new Uint8Array(i);for(let s=0,c=0;s{wn();Eh();lC();Pa();Kr();ict=new TextEncoder;Yp={zero:48,nine:57,A:65,F:70,a:97,f:102}});function tl(t,{size:e}){if(di(t)>e)throw new FT({givenSize:di(t),maxSize:e})}function Kn(t,e={}){let{signed:r}=e;e.size&&tl(t,{size:e.size});let n=BigInt(t);if(!r)return n;let i=(t.length-2)/2,o=(1n<{UT();Ah();cg();aa()});function Bt(t,e={}){return typeof t=="number"||typeof t=="bigint"?rr(t,e):typeof t=="string"?c0(t,e):typeof t=="boolean"?jT(t,e):ii(t,e)}function jT(t,e={}){let r=`0x${Number(t)}`;return typeof e.size=="number"?(tl(r,{size:e.size}),Ch(r,{size:e.size})):r}function ii(t,e={}){let r="";for(let i=0;io||i{UT();lC();Pa();act=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));cct=new TextEncoder});async function fC(t,{chain:e}){let{id:r,name:n,nativeCurrency:i,rpcUrls:o,blockExplorers:s}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:rr(r),chainName:n,nativeCurrency:i,rpcUrls:o.default.http,blockExplorerUrls:s?Object.values(s).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}var Rz=F(()=>{Kr()});function Sh(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new qT(t.type);return`${t.name}(${$T(t.inputs,{includeName:e})})`}function $T(t,{includeName:e=!1}={}){return t?t.map(r=>lct(r,{includeName:e})).join(e?", ":","):""}function lct(t,{includeName:e}){return t.type.startsWith("tuple")?`(${$T(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}var hC=F(()=>{Wl()});var HT,dC,zT,_h,WT,VT,KT,u6,lg,GT,QT,ZT,YT,JT,XT,qT,Wl=F(()=>{hC();Ah();wn();HT=class extends Pe{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` `),{docsPath:e,name:"AbiConstructorNotFoundError"})}},dC=class extends Pe{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}},zT=class extends Pe{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` `),{metaMessages:[`Params: (${$T(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}},_h=class extends Pe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}},WT=class extends Pe{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` `),{name:"AbiEncodingArrayLengthMismatchError"})}},VT=class extends Pe{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${di(r)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}},KT=class extends Pe{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` `),{name:"AbiEncodingLengthMismatchError"})}},u6=class extends Pe{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` `),{docsPath:r,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}},lg=class extends Pe{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` `),{docsPath:r,name:"AbiFunctionNotFoundError"})}},GT=class extends Pe{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` `),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"})}},QT=class extends Pe{constructor(e,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${Sh(e.abiItem)}\`, and`,`\`${r.type}\` in \`${Sh(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}},ZT=class extends Pe{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`,{name:"BytesSizeMismatchError"})}},YT=class extends Pe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` `),{docsPath:r,name:"InvalidAbiEncodingType"})}},JT=class extends Pe{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` `),{docsPath:r,name:"InvalidAbiDecodingType"})}},XT=class extends Pe{constructor(e){super([`Value "${e}" is not a valid array.`].join(` `),{name:"InvalidArrayError"})}},qT=class extends Pe{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` `),{name:"InvalidDefinitionTypeError"})}}});function gc(t){return typeof t[0]=="string"?Ls(t):uct(t)}function uct(t){let e=0;for(let i of t)e+=i.length;let r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}function Ls(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}var Vl=F(()=>{});var oi,zu=F(()=>{wn();oi=class extends Pe{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}});var ug,ek=F(()=>{ug=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}set(e,r){return super.set(e,r),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}});function pC(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function fct(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function fg(t,...e){if(!fct(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function mhe(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");pC(t.outputLen),pC(t.blockLen)}function Jp(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function tk(t,e){fg(t);let r=e.outputLen;if(t.length{});function hct(t,e=!1){return e?{h:Number(t&rk),l:Number(t>>ghe&rk)}:{h:Number(t>>ghe&rk)|0,l:Number(t&rk)|0}}function whe(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i{rk=BigInt(4294967295),ghe=BigInt(32);vhe=(t,e,r)=>t<>>32-r,yhe=(t,e,r)=>e<>>32-r,bhe=(t,e,r)=>e<>>64-r,xhe=(t,e,r)=>t<>>64-r});var nk,Ehe=F(()=>{nk=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});function Nz(t){for(let e=0;et().update(dg(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function _he(t){let e=(n,i)=>t(i).update(dg(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function sk(t=32){if(nk&&typeof nk.getRandomValues=="function")return nk.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}var Ahe,ik,l0,Mz,dct,hg,zXt,m3=F(()=>{Ehe();mC();Ahe=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ik=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),l0=(t,e)=>t<<32-e|t>>>e,Mz=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,dct=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;hg=class{clone(){return this._cloneInto()}},zXt={}.toString});function Cct(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let s=0;s<10;s++)r[s]=t[s]^t[s+10]^t[s+20]^t[s+30]^t[s+40];for(let s=0;s<10;s+=2){let c=(s+8)%10,l=(s+2)%10,u=r[l],d=r[l+1],p=Ihe(u,d,1)^r[c],v=The(u,d,1)^r[c+1];for(let y=0;y<50;y+=10)t[s+y]^=p,t[s+y+1]^=v}let i=t[2],o=t[3];for(let s=0;s<24;s++){let c=Rhe[s],l=Ihe(i,o,c),u=The(i,o,c),d=khe[s];i=t[d],o=t[d+1],t[d]=l,t[d+1]=u}for(let s=0;s<50;s+=10){for(let c=0;c<10;c++)r[c]=t[s+c];for(let c=0;c<10;c++)t[s+c]^=~r[(c+2)%10]&r[(c+4)%10]}t[0]^=bct[n],t[1]^=xct[n]}r.fill(0)}var khe,Rhe,Mhe,mct,gC,gct,wct,vct,yct,bct,xct,Ihe,The,ak,pg,QXt,ZXt,YXt,JXt,XXt,Nhe,eer,ter,Phe,rer,ner,Ohe=F(()=>{mC();Che();m3();khe=[],Rhe=[],Mhe=[],mct=BigInt(0),gC=BigInt(1),gct=BigInt(2),wct=BigInt(7),vct=BigInt(256),yct=BigInt(113);for(let t=0,e=gC,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],khe.push(2*(5*n+r)),Rhe.push((t+1)*(t+2)/2%64);let i=mct;for(let o=0;o<7;o++)e=(e<>wct)*yct)%vct,e&gct&&(i^=gC<<(gC<r>32?bhe(t,e,r):vhe(t,e,r),The=(t,e,r)=>r>32?xhe(t,e,r):yhe(t,e,r);ak=class t extends hg{constructor(e,r,n,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,pC(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Ahe(this.state)}keccak(){Mz||Nz(this.state32),Cct(this.state32,this.rounds),Mz||Nz(this.state32),this.posOut=0,this.pos=0}update(e){Jp(this);let{blockLen:r,state:n}=this;e=dg(e);let i=e.length;for(let o=0;o=n&&this.keccak();let s=Math.min(n-this.posOut,o-i);e.set(r.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return pC(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(tk(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:r,suffix:n,outputLen:i,rounds:o,enableXOF:s}=this;return e||(e=new t(r,n,i,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=s,e.destroyed=this.destroyed,e}},pg=(t,e,r)=>ok(()=>new ak(e,t,r)),QXt=pg(6,144,224/8),ZXt=pg(6,136,256/8),YXt=pg(6,104,384/8),JXt=pg(6,72,512/8),XXt=pg(1,144,224/8),Nhe=pg(1,136,256/8),eer=pg(1,104,384/8),ter=pg(1,72,512/8),Phe=(t,e,r)=>_he((n={})=>new ak(e,t,n.dkLen===void 0?r:n.dkLen,!0)),rer=Phe(31,168,128/8),ner=Phe(31,136,256/8)});function qi(t,e){let r=e||"hex",n=Nhe(ys(t,{strict:!1})?Hu(t):t);return r==="bytes"?n:Bt(n)}var Ih=F(()=>{Ohe();Eh();aa();Kr()});function Th(t,e){if(Pz.has(`${t}.${e}`))return Pz.get(`${t}.${e}`);let r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=qi(a0(r),"bytes"),i=(e?r.substring(`${e}0x`.length):r).split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(n[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());let o=`0x${i.join("")}`;return Pz.set(`${t}.${e}`,o),o}function Xi(t,e){if(!Hn(t,{strict:!1}))throw new oi({address:t});return Th(t,e)}var Pz,mg=F(()=>{zu();aa();Ih();ek();Kl();Pz=new ug(8192)});function Hn(t,e){let{strict:r=!0}=e??{},n=`${t}.${r}`;if(Oz.has(n))return Oz.get(n);let i=Ect.test(t)?t.toLowerCase()===t?!0:r?Th(t)===t:!0:!1;return Oz.set(n,i),i}var Ect,Oz,Kl=F(()=>{ek();mg();Ect=/^0x[a-fA-F0-9]{40}$/,Oz=new ug(8192)});function Xp(t,e,r,{strict:n}={}){return ys(t,{strict:!1})?Act(t,e,r,{strict:n}):Bz(t,e,r,{strict:n})}function Bhe(t,e){if(typeof e=="number"&&e>0&&e>di(t)-1)throw new sC({offset:e,position:"start",size:di(t)})}function Lhe(t,e,r){if(typeof e=="number"&&typeof r=="number"&&di(t)!==r-e)throw new sC({offset:r,position:"end",size:di(t)})}function Bz(t,e,r,{strict:n}={}){Bhe(t,e);let i=t.slice(e,r);return n&&Lhe(i,e,r),i}function Act(t,e,r,{strict:n}={}){Bhe(t,e);let i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&Lhe(i,e,r),i}var f6=F(()=>{DT();Eh();Ah()});function e1(t,e){if(t.length!==e.length)throw new KT({expectedLength:t.length,givenLength:e.length});let r=Sct({params:t,values:e}),n=Fz(r);return n.length===0?"0x":n}function Sct({params:t,values:e}){let r=[];for(let n=0;n0?gc([c,s]):c}}if(i)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:gc(o.map(({encoded:s})=>s))}}function Tct(t,{param:e}){let[,r]=e.type.split("bytes"),n=di(t);if(!r){let i=t;return n%32!==0&&(i=Zp(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:gc([Zp(rr(n,{size:32})),i])}}if(n!==Number.parseInt(r))throw new VT({expectedSize:Number.parseInt(r),value:t});return{dynamic:!1,encoded:Zp(t,{dir:"right"})}}function kct(t){if(typeof t!="boolean")throw new Pe(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Zp(jT(t))}}function Rct(t,{signed:e}){return{dynamic:!1,encoded:rr(t,{size:32,signed:e})}}function Mct(t){let e=c0(t),r=Math.ceil(di(e)/32),n=[];for(let i=0;ii))}}function ck(t){let e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}var h6=F(()=>{Wl();zu();wn();Kl();Vl();lC();Ah();f6();Kr()});function wC(t){let{abi:e,args:r,bytecode:n}=t;if(!r||r.length===0)return n;let i=e.find(s=>"type"in s&&s.type==="constructor");if(!i)throw new HT({docsPath:Uz});if(!("inputs"in i))throw new dC({docsPath:Uz});if(!i.inputs||i.inputs.length===0)throw new dC({docsPath:Uz});let o=e1(i.inputs,r);return Ls([n,o])}var Uz,Dz=F(()=>{Wl();Vl();h6();Uz="/docs/contract/encodeDeployData"});function ki(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}var rl=F(()=>{});var Wu,d6,p6=F(()=>{wn();Wu=class extends Pe{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(` `),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}},d6=class extends Pe{constructor({docsPath:e,metaMessages:r,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:e,metaMessages:r,name:"AccountTypeNotSupportedError"})}}});function Fhe(t){let e=qi(`0x${t.substring(4)}`).substring(26);return Th(`0x${e}`)}var Uhe=F(()=>{mg();Ih()});function Pct(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);let i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),c=Number(r&o),l=n?4:0,u=n?0:4;t.setUint32(e+l,s,n),t.setUint32(e+u,c,n)}var Dhe,jhe,lk,$he=F(()=>{mC();m3();Dhe=(t,e,r)=>t&e^~t&r,jhe=(t,e,r)=>t&e^t&r^e&r,lk=class extends hg{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ik(this.buffer)}update(e){Jp(this);let{view:r,buffer:n,blockLen:i}=this;e=dg(e);let o=e.length;for(let s=0;si-s&&(this.process(n,0),s=0);for(let p=s;pd.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p{$he();m3();Oct=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),gg=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),wg=new Uint32Array(64),jz=class extends lk{constructor(){super(64,32,8,!1),this.A=gg[0]|0,this.B=gg[1]|0,this.C=gg[2]|0,this.D=gg[3]|0,this.E=gg[4]|0,this.F=gg[5]|0,this.G=gg[6]|0,this.H=gg[7]|0}get(){let{A:e,B:r,C:n,D:i,E:o,F:s,G:c,H:l}=this;return[e,r,n,i,o,s,c,l]}set(e,r,n,i,o,s,c,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=s|0,this.G=c|0,this.H=l|0}process(e,r){for(let p=0;p<16;p++,r+=4)wg[p]=e.getUint32(r,!1);for(let p=16;p<64;p++){let v=wg[p-15],y=wg[p-2],_=l0(v,7)^l0(v,18)^v>>>3,R=l0(y,17)^l0(y,19)^y>>>10;wg[p]=R+wg[p-7]+_+wg[p-16]|0}let{A:n,B:i,C:o,D:s,E:c,F:l,G:u,H:d}=this;for(let p=0;p<64;p++){let v=l0(c,6)^l0(c,11)^l0(c,25),y=d+v+Dhe(c,l,u)+Oct[p]+wg[p]|0,R=(l0(n,2)^l0(n,13)^l0(n,22))+jhe(n,i,o)|0;d=u,u=l,l=c,c=s+y|0,s=o,o=i,i=n,n=y+R|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,s=s+this.D|0,c=c+this.E|0,l=l+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(n,i,o,s,c,l,u,d)}roundClean(){wg.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},g3=ok(()=>new jz)});var Wz={};Hr(Wz,{abytes:()=>Vu,bitGet:()=>jct,bitLen:()=>Dct,bitMask:()=>yC,bitSet:()=>$ct,bytesToHex:()=>w3,bytesToNumberBE:()=>bs,bytesToNumberLE:()=>fk,concatBytes:()=>Oa,createHmacDrbg:()=>zz,ensureBytes:()=>xs,equalBytes:()=>Uct,hexToBytes:()=>v3,hexToNumber:()=>Hz,isBytes:()=>vg,numberToBytesBE:()=>u0,numberToBytesLE:()=>hk,numberToHexUnpadded:()=>Whe,numberToVarBytesBE:()=>Fct,utf8ToBytes:()=>vC,validateObject:()=>kh});function vg(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function Vu(t){if(!vg(t))throw new Error("Uint8Array expected")}function w3(t){Vu(t);let e="";for(let r=0;r=t1._0&&t<=t1._9)return t-t1._0;if(t>=t1._A&&t<=t1._F)return t-(t1._A-10);if(t>=t1._a&&t<=t1._f)return t-(t1._a-10)}function v3(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let i=0,o=0;izhe;t>>=uk,e+=1);return e}function jct(t,e){return t>>BigInt(e)&uk}function $ct(t,e,r){return t|(r?uk:zhe)<{n.fill(1),i.fill(0),o=0},c=(...p)=>r(i,n,...p),l=(p=qz())=>{i=c(Hhe([0]),p),n=c(),p.length!==0&&(i=c(Hhe([1]),p),n=c())},u=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let p=0,v=[];for(;p{s(),l(p);let y;for(;!(y=v(u()));)l();return s(),y}}function kh(t,e,r={}){let n=(i,o,s)=>{let c=qct[o];if(typeof c!="function")throw new Error(`Invalid validator "${o}", expected function`);let l=t[i];if(!(s&&l===void 0)&&!c(l,t))throw new Error(`Invalid param ${String(i)}=${l} (${typeof l}), expected ${o}`)};for(let[i,o]of Object.entries(e))n(i,o,!1);for(let[i,o]of Object.entries(r))n(i,o,!0);return t}var zhe,uk,Bct,Lct,t1,yC,qz,Hhe,qct,y3=F(()=>{zhe=BigInt(0),uk=BigInt(1),Bct=BigInt(2);Lct=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));t1={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};yC=t=>(Bct<new Uint8Array(t),Hhe=t=>Uint8Array.from(t);qct={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||vg(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)}});function Qo(t,e){let r=t%e;return r>=Cs?r:e+r}function Vct(t,e,r){if(r<=Cs||e 0");if(r===ko)return Cs;let n=ko;for(;e>Cs;)e&ko&&(n=n*t%r),t=t*t%r,e>>=ko;return n}function Gl(t,e,r){let n=t;for(;e-- >Cs;)n*=n,n%=r;return n}function dk(t,e){if(t===Cs||e<=Cs)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=Qo(t,e),n=e,i=Cs,o=ko,s=ko,c=Cs;for(;r!==Cs;){let u=n/r,d=n%r,p=i-s*u,v=o-c*u;n=r,r=d,i=s,o=c,s=p,c=v}if(n!==ko)throw new Error("invert: does not exist");return Qo(i,e)}function Kct(t){let e=(t-ko)/b3,r,n,i;for(r=t-ko,n=0;r%b3===Cs;r/=b3,n++);for(i=b3;i(n[i]="function",n),e);return kh(t,r)}function Zct(t,e,r){if(r 0");if(r===Cs)return t.ONE;if(r===ko)return e;let n=t.ONE,i=e;for(;r>Cs;)r&ko&&(n=t.mul(n,i)),i=t.sqr(i),r>>=ko;return n}function Yct(t,e){let r=new Array(e.length),n=e.reduce((o,s,c)=>t.is0(s)?o:(r[c]=o,t.mul(o,s)),t.ONE),i=t.inv(n);return e.reduceRight((o,s,c)=>t.is0(s)?o:(r[c]=t.mul(o,r[c]),t.mul(o,s)),i),r}function Kz(t,e){let r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Ghe(t,e,r=!1,n={}){if(t<=Cs)throw new Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:i,nByteLength:o}=Kz(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=Gct(t),c=Object.freeze({ORDER:t,BITS:i,BYTES:o,MASK:yC(i),ZERO:Cs,ONE:ko,create:l=>Qo(l,t),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return Cs<=l&&ll===Cs,isOdd:l=>(l&ko)===ko,neg:l=>Qo(-l,t),eql:(l,u)=>l===u,sqr:l=>Qo(l*l,t),add:(l,u)=>Qo(l+u,t),sub:(l,u)=>Qo(l-u,t),mul:(l,u)=>Qo(l*u,t),pow:(l,u)=>Zct(c,l,u),div:(l,u)=>Qo(l*dk(u,t),t),sqrN:l=>l*l,addN:(l,u)=>l+u,subN:(l,u)=>l-u,mulN:(l,u)=>l*u,inv:l=>dk(l,t),sqrt:n.sqrt||(l=>s(c,l)),invertBatch:l=>Yct(c,l),cmov:(l,u,d)=>d?u:l,toBytes:l=>r?hk(l,o):u0(l,o),fromBytes:l=>{if(l.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${l.length}`);return r?fk(l):bs(l)}});return Object.freeze(c)}function Qhe(t){if(typeof t!="bigint")throw new Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function Gz(t){let e=Qhe(t);return e+Math.ceil(e/2)}function Zhe(t,e,r=!1){let n=t.length,i=Qhe(e),o=Gz(e);if(n<16||n1024)throw new Error(`expected ${o}-1024 bytes of input, got ${n}`);let s=r?bs(t):fk(t),c=Qo(s,e-ko)+ko;return r?hk(c,i):u0(c,i)}var Cs,ko,b3,Hct,Vz,Vhe,Khe,zct,Wct,Qct,bC=F(()=>{y3();Cs=BigInt(0),ko=BigInt(1),b3=BigInt(2),Hct=BigInt(3),Vz=BigInt(4),Vhe=BigInt(5),Khe=BigInt(8),zct=BigInt(9),Wct=BigInt(16);Qct=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"]});function Yhe(t,e){let r=(i,o)=>{let s=o.negate();return i?s:o},n=i=>{let o=Math.ceil(e/i)+1,s=2**(i-1);return{windows:o,windowSize:s}};return{constTimeNegate:r,unsafeLadder(i,o){let s=t.ZERO,c=i;for(;o>Xct;)o&Qz&&(s=s.add(c)),c=c.double(),o>>=Qz;return s},precomputeWindow(i,o){let{windows:s,windowSize:c}=n(o),l=[],u=i,d=u;for(let p=0;p>=y,P>l&&(P-=v,s+=Qz);let k=R,M=R+Math.abs(P)-1,L=_%2!==0,D=P<0;P===0?d=d.add(r(L,o[k])):u=u.add(r(D,o[M]))}return{p:u,f:d}},wNAFCached(i,o,s,c){let l=i._WINDOW_SIZE||1,u=o.get(i);return u||(u=this.precomputeWindow(i,l),l!==1&&o.set(i,c(u))),this.wNAF(l,u,s)}}}function Zz(t){return pk(t.Fp),kh(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Kz(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}var Xct,Qz,Jhe=F(()=>{bC();y3();Xct=BigInt(0),Qz=BigInt(1)});function elt(t){let e=Zz(t);kh(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}function nlt(t){let e=elt(t),{Fp:r}=e,n=e.toBytes||((_,R,P)=>{let k=R.toAffine();return Oa(Uint8Array.from([4]),r.toBytes(k.x),r.toBytes(k.y))}),i=e.fromBytes||(_=>{let R=_.subarray(1),P=r.fromBytes(R.subarray(0,r.BYTES)),k=r.fromBytes(R.subarray(r.BYTES,2*r.BYTES));return{x:P,y:k}});function o(_){let{a:R,b:P}=e,k=r.sqr(_),M=r.mul(k,_);return r.add(r.add(M,r.mul(_,R)),P)}if(!r.eql(r.sqr(e.Gy),o(e.Gx)))throw new Error("bad generator point: equation left != right");function s(_){return typeof _=="bigint"&&f0<_&&_r.eql(L,r.ZERO);return M(P)&&M(k)?p.ZERO:new p(P,k,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(R){let P=r.invertBatch(R.map(k=>k.pz));return R.map((k,M)=>k.toAffine(P[M])).map(p.fromAffine)}static fromHex(R){let P=p.fromAffine(i(xs("pointHex",R)));return P.assertValidity(),P}static fromPrivateKey(R){return p.BASE.multiply(l(R))}_setWindowSize(R){this._WINDOW_SIZE=R,u.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:R,y:P}=this.toAffine();if(!r.isValid(R)||!r.isValid(P))throw new Error("bad point: x or y not FE");let k=r.sqr(P),M=o(R);if(!r.eql(k,M))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:R}=this.toAffine();if(r.isOdd)return!r.isOdd(R);throw new Error("Field doesn't support isOdd")}equals(R){d(R);let{px:P,py:k,pz:M}=this,{px:L,py:D,pz:j}=R,V=r.eql(r.mul(P,j),r.mul(L,M)),K=r.eql(r.mul(k,j),r.mul(D,M));return V&&K}negate(){return new p(this.px,r.neg(this.py),this.pz)}double(){let{a:R,b:P}=e,k=r.mul(P,mk),{px:M,py:L,pz:D}=this,j=r.ZERO,V=r.ZERO,K=r.ZERO,B=r.mul(M,M),W=r.mul(L,L),z=r.mul(D,D),q=r.mul(M,L);return q=r.add(q,q),K=r.mul(M,D),K=r.add(K,K),j=r.mul(R,K),V=r.mul(k,z),V=r.add(j,V),j=r.sub(W,V),V=r.add(W,V),V=r.mul(j,V),j=r.mul(q,j),K=r.mul(k,K),z=r.mul(R,z),q=r.sub(B,z),q=r.mul(R,q),q=r.add(q,K),K=r.add(B,B),B=r.add(K,B),B=r.add(B,z),B=r.mul(B,q),V=r.add(V,B),z=r.mul(L,D),z=r.add(z,z),B=r.mul(z,q),j=r.sub(j,B),K=r.mul(z,W),K=r.add(K,K),K=r.add(K,K),new p(j,V,K)}add(R){d(R);let{px:P,py:k,pz:M}=this,{px:L,py:D,pz:j}=R,V=r.ZERO,K=r.ZERO,B=r.ZERO,W=e.a,z=r.mul(e.b,mk),q=r.mul(P,L),Q=r.mul(k,D),f=r.mul(M,j),h=r.add(P,k),g=r.add(L,D);h=r.mul(h,g),g=r.add(q,Q),h=r.sub(h,g),g=r.add(P,M);let x=r.add(L,j);return g=r.mul(g,x),x=r.add(q,f),g=r.sub(g,x),x=r.add(k,M),V=r.add(D,j),x=r.mul(x,V),V=r.add(Q,f),x=r.sub(x,V),B=r.mul(W,g),V=r.mul(z,f),B=r.add(V,B),V=r.sub(Q,B),B=r.add(Q,B),K=r.mul(V,B),Q=r.add(q,q),Q=r.add(Q,q),f=r.mul(W,f),g=r.mul(z,g),Q=r.add(Q,f),f=r.sub(q,f),f=r.mul(W,f),g=r.add(g,f),q=r.mul(Q,g),K=r.add(K,q),q=r.mul(x,g),V=r.mul(h,V),V=r.sub(V,q),q=r.mul(h,Q),B=r.mul(x,B),B=r.add(B,q),new p(V,K,B)}subtract(R){return this.add(R.negate())}is0(){return this.equals(p.ZERO)}wNAF(R){return y.wNAFCached(this,u,R,P=>{let k=r.invertBatch(P.map(M=>M.pz));return P.map((M,L)=>M.toAffine(k[L])).map(p.fromAffine)})}multiplyUnsafe(R){let P=p.ZERO;if(R===f0)return P;if(c(R),R===Ro)return this;let{endo:k}=e;if(!k)return y.unsafeLadder(this,R);let{k1neg:M,k1:L,k2neg:D,k2:j}=k.splitScalar(R),V=P,K=P,B=this;for(;L>f0||j>f0;)L&Ro&&(V=V.add(B)),j&Ro&&(K=K.add(B)),B=B.double(),L>>=Ro,j>>=Ro;return M&&(V=V.negate()),D&&(K=K.negate()),K=new p(r.mul(K.px,k.beta),K.py,K.pz),V.add(K)}multiply(R){c(R);let P=R,k,M,{endo:L}=e;if(L){let{k1neg:D,k1:j,k2neg:V,k2:K}=L.splitScalar(P),{p:B,f:W}=this.wNAF(j),{p:z,f:q}=this.wNAF(K);B=y.constTimeNegate(D,B),z=y.constTimeNegate(V,z),z=new p(r.mul(z.px,L.beta),z.py,z.pz),k=B.add(z),M=W.add(q)}else{let{p:D,f:j}=this.wNAF(P);k=D,M=j}return p.normalizeZ([k,M])[0]}multiplyAndAddUnsafe(R,P,k){let M=p.BASE,L=(j,V)=>V===f0||V===Ro||!j.equals(M)?j.multiplyUnsafe(V):j.multiply(V),D=L(this,P).add(L(R,k));return D.is0()?void 0:D}toAffine(R){let{px:P,py:k,pz:M}=this,L=this.is0();R==null&&(R=L?r.ONE:r.inv(M));let D=r.mul(P,R),j=r.mul(k,R),V=r.mul(M,R);if(L)return{x:r.ZERO,y:r.ZERO};if(!r.eql(V,r.ONE))throw new Error("invZ was invalid");return{x:D,y:j}}isTorsionFree(){let{h:R,isTorsionFree:P}=e;if(R===Ro)return!0;if(P)return P(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:R,clearCofactor:P}=e;return R===Ro?this:P?P(p,this):this.multiplyUnsafe(e.h)}toRawBytes(R=!0){return this.assertValidity(),n(p,this,R)}toHex(R=!0){return w3(this.toRawBytes(R))}}p.BASE=new p(e.Gx,e.Gy,r.ONE),p.ZERO=new p(r.ZERO,r.ONE,r.ZERO);let v=e.nBitLength,y=Yhe(p,e.endo?Math.ceil(v/2):v);return{CURVE:e,ProjectivePoint:p,normPrivateKeyToScalar:l,weierstrassEquation:o,isWithinCurveOrder:s}}function ilt(t){let e=Zz(t);return kh(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function ede(t){let e=ilt(t),{Fp:r,n}=e,i=r.BYTES+1,o=2*r.BYTES+1;function s(g){return f0w3(u0(g,e.nByteLength));function _(g){let x=n>>Ro;return g>x}function R(g){return _(g)?c(-g):g}let P=(g,x,S)=>bs(g.slice(x,S));class k{constructor(x,S,T){this.r=x,this.s=S,this.recovery=T,this.assertValidity()}static fromCompact(x){let S=e.nByteLength;return x=xs("compactSignature",x,S*2),new k(P(x,0,S),P(x,S,2*S))}static fromDER(x){let{r:S,s:T}=x3.toSig(xs("DER",x));return new k(S,T)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(x){return new k(this.r,this.s,x)}recoverPublicKey(x){let{r:S,s:T,recovery:N}=this,I=K(xs("msgHash",x));if(N==null||![0,1,2,3].includes(N))throw new Error("recovery id invalid");let m=N===2||N===3?S+e.n:S;if(m>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let C=N&1?"03":"02",Y=u.fromHex(C+y(m)),ne=l(m),b=c(-I*ne),H=c(T*ne),G=u.BASE.multiplyAndAddUnsafe(Y,b,H);if(!G)throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new k(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return v3(this.toDERHex())}toDERHex(){return x3.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return v3(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}let M={isValidPrivateKey(g){try{return d(g),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let g=Gz(e.n);return Zhe(e.randomBytes(g),e.n)},precompute(g=8,x=u.BASE){return x._setWindowSize(g),x.multiply(BigInt(3)),x}};function L(g,x=!0){return u.fromPrivateKey(g).toRawBytes(x)}function D(g){let x=vg(g),S=typeof g=="string",T=(x||S)&&g.length;return x?T===i||T===o:S?T===2*i||T===2*o:g instanceof u}function j(g,x,S=!0){if(D(g))throw new Error("first arg must be private key");if(!D(x))throw new Error("second arg must be public key");return u.fromHex(x).multiply(d(g)).toRawBytes(S)}let V=e.bits2int||function(g){let x=bs(g),S=g.length*8-e.nBitLength;return S>0?x>>BigInt(S):x},K=e.bits2int_modN||function(g){return c(V(g))},B=yC(e.nBitLength);function W(g){if(typeof g!="bigint")throw new Error("bigint expected");if(!(f0<=g&&gse in S))throw new Error("sign() legacy options not supported");let{hash:T,randomBytes:N}=e,{lowS:I,prehash:m,extraEntropy:C}=S;I==null&&(I=!0),g=xs("msgHash",g),m&&(g=xs("prehashed msgHash",T(g)));let Y=K(g),ne=d(x),b=[W(ne),W(Y)];if(C!=null&&C!==!1){let se=C===!0?N(r.BYTES):C;b.push(xs("extraEntropy",se))}let H=Oa(...b),G=Y;function U(se){let te=V(se);if(!v(te))return;let le=l(te),me=u.BASE.multiply(te).toAffine(),Ee=c(me.x);if(Ee===f0)return;let fe=c(le*c(G+Ee*ne));if(fe===f0)return;let Se=(me.x===Ee?0:2)|Number(me.y&Ro),gt=fe;return I&&_(fe)&&(gt=R(fe),Se^=1),new k(Ee,gt,Se)}return{seed:H,k2sig:U}}let q={lowS:e.lowS,prehash:!1},Q={lowS:e.lowS,prehash:!1};function f(g,x,S=q){let{seed:T,k2sig:N}=z(g,x,S),I=e;return zz(I.hash.outputLen,I.nByteLength,I.hmac)(T,N)}u.BASE._setWindowSize(8);function h(g,x,S,T=Q){let N=g;if(x=xs("msgHash",x),S=xs("publicKey",S),"strict"in T)throw new Error("options.strict was renamed to lowS");let{lowS:I,prehash:m}=T,C,Y;try{if(typeof N=="string"||vg(N))try{C=k.fromDER(N)}catch(me){if(!(me instanceof x3.Err))throw me;C=k.fromCompact(N)}else if(typeof N=="object"&&typeof N.r=="bigint"&&typeof N.s=="bigint"){let{r:me,s:Ee}=N;C=new k(me,Ee)}else throw new Error("PARSE");Y=u.fromHex(S)}catch(me){if(me.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(I&&C.hasHighS())return!1;m&&(x=e.hash(x));let{r:ne,s:b}=C,H=K(x),G=l(b),U=c(H*G),se=c(ne*G),te=u.BASE.multiplyAndAddUnsafe(Y,U,se)?.toAffine();return te?c(te.x)===ne:!1}return{CURVE:e,getPublicKey:L,getSharedSecret:j,sign:f,verify:h,ProjectivePoint:u,Signature:k,utils:M}}function olt(t,e){let r=t.ORDER,n=f0;for(let _=r-Ro;_%yg===f0;_/=yg)n+=Ro;let i=n,o=yg<{let P=p,k=t.pow(R,u),M=t.sqr(k);M=t.mul(M,R);let L=t.mul(_,M);L=t.pow(L,l),L=t.mul(L,k),k=t.mul(L,R),M=t.mul(L,_);let D=t.mul(M,k);L=t.pow(D,d);let j=t.eql(L,t.ONE);k=t.mul(M,v),L=t.mul(D,P),M=t.cmov(k,M,j),D=t.cmov(L,D,j);for(let V=i;V>Ro;V--){let K=V-yg;K=yg<{let M=t.sqr(k),L=t.mul(P,k);M=t.mul(M,L);let D=t.pow(M,_);D=t.mul(D,L);let j=t.mul(D,R),V=t.mul(t.sqr(D),k),K=t.eql(V,P),B=t.cmov(j,D,K);return{isValid:K,value:B}}}return y}function tde(t,e){if(pk(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=olt(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,c,l,u,d,p;i=t.sqr(n),i=t.mul(i,e.Z),o=t.sqr(i),o=t.add(o,i),s=t.add(o,t.ONE),s=t.mul(s,e.B),c=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),c=t.mul(c,e.A),o=t.sqr(s),u=t.sqr(c),l=t.mul(u,e.A),o=t.add(o,l),o=t.mul(o,s),u=t.mul(u,c),l=t.mul(u,e.B),o=t.add(o,l),d=t.mul(i,s);let{isValid:v,value:y}=r(o,u);p=t.mul(i,n),p=t.mul(p,y),d=t.cmov(d,s,v),p=t.cmov(p,y,v);let _=t.isOdd(n)===t.isOdd(p);return p=t.cmov(t.neg(p),p,_),d=t.div(d,c),{x:d,y:p}}}var tlt,rlt,x3,f0,Ro,yg,mk,Xhe,Yz=F(()=>{bC();y3();y3();Jhe();({bytesToNumberBE:tlt,hexToBytes:rlt}=Wz),x3={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){let{Err:e}=x3;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");let r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:tlt(n),l:t.subarray(r+2)}},toSig(t){let{Err:e}=x3,r=typeof t=="string"?rlt(t):t;Vu(r);let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:i,l:o}=x3._parseInt(r.subarray(2)),{d:s,l:c}=x3._parseInt(o);if(c.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(t){let e=u=>Number.parseInt(u[0],16)&8?"00"+u:u,r=u=>{let d=u.toString(16);return d.length&1?`0${d}`:d},n=e(r(t.s)),i=e(r(t.r)),o=n.length/2,s=i.length/2,c=r(o),l=r(s);return`30${r(s+o+4)}02${l}${i}02${c}${n}`}},f0=BigInt(0),Ro=BigInt(1),yg=BigInt(2),mk=BigInt(3),Xhe=BigInt(4)});function bg(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);let r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function alt(t,e){let r=new Uint8Array(t.length);for(let n=0;n255&&(e=n(Oa(vC("H2C-OVERSIZE-DST-"),e)));let{outputLen:i,blockLen:o}=n,s=Math.ceil(r/i);if(s>255)throw new Error("Invalid xmd length");let c=Oa(e,bg(e.length,1)),l=bg(0,o),u=bg(r,2),d=new Array(s),p=n(Oa(l,t,u,bg(0,1),c));d[0]=n(Oa(p,bg(1,1),c));for(let y=1;y<=s;y++){let _=[alt(p,d[y-1]),bg(y+1,1),c];d[y]=n(Oa(..._))}return Oa(...d).slice(0,r)}function llt(t,e,r,n,i){if(Vu(t),Vu(e),Jz(r),e.length>255){let o=Math.ceil(2*n/8);e=i.create({dkLen:o}).update(vC("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(t).update(bg(r,2)).update(e).update(bg(e.length,1)).digest()}function rde(t,e,r){kh(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:n,k:i,m:o,hash:s,expand:c,DST:l}=r;Vu(t),Jz(e);let u=typeof l=="string"?vC(l):l,d=n.toString(2).length,p=Math.ceil((d+i)/8),v=e*o*p,y;if(c==="xmd")y=clt(t,u,v,s);else if(c==="xof")y=llt(t,u,v,i,s);else if(c==="_internal_pass")y=t;else throw new Error('expand must be "xmd" or "xof"');let _=new Array(e);for(let R=0;RArray.from(n).reverse());return(n,i)=>{let[o,s,c,l]=r.map(u=>u.reduce((d,p)=>t.add(t.mul(d,n),p)));return n=t.div(o,s),i=t.mul(i,t.div(c,l)),{x:n,y:i}}}function ide(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){let o=rde(n,2,{...r,DST:r.DST,...i}),s=t.fromAffine(e(o[0])),c=t.fromAffine(e(o[1])),l=s.add(c).clearCofactor();return l.assertValidity(),l},encodeToCurve(n,i){let o=rde(n,1,{...r,DST:r.encodeDST,...i}),s=t.fromAffine(e(o[0])).clearCofactor();return s.assertValidity(),s}}}var slt,ode=F(()=>{bC();y3();slt=bs});var gk,Xz,sde=F(()=>{mC();m3();gk=class extends hg{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,mhe(e);let n=dg(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let s=0;snew gk(t,e).update(r).digest();Xz.create=(t,e)=>new gk(t,e)});function ult(t){return{hash:t,hmac:(e,...r)=>Xz(t,e,She(...r)),randomBytes:sk}}function ade(t,e){let r=n=>ede({...t,...ult(n)});return Object.freeze({...r(e),create:r})}var cde=F(()=>{sde();m3();Yz();});var vde={};Hr(vde,{encodeToCurve:()=>ylt,hashToCurve:()=>vlt,schnorr:()=>mlt,secp256k1:()=>CC});function hde(t){let e=bk,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),c=BigInt(44),l=BigInt(88),u=t*t*t%e,d=u*u*t%e,p=Gl(d,r,e)*d%e,v=Gl(p,r,e)*d%e,y=Gl(v,vk,e)*u%e,_=Gl(y,i,e)*y%e,R=Gl(_,o,e)*_%e,P=Gl(R,c,e)*R%e,k=Gl(P,l,e)*P%e,M=Gl(k,c,e)*R%e,L=Gl(M,r,e)*d%e,D=Gl(L,s,e)*_%e,j=Gl(D,n,e)*u%e,V=Gl(j,vk,e);if(!xg.eql(xg.sqr(V),t))throw new Error("Cannot find square root");return V}function yk(t,...e){let r=ude[t];if(r===void 0){let n=g3(Uint8Array.from(t,i=>i.charCodeAt(0)));r=Oa(n,n),ude[t]=r}return g3(Oa(r,...e))}function rW(t){let e=CC.utils.normPrivateKeyToScalar(t),r=iW.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:xC(-e),bytes:nW(r)}}function pde(t){if(!dde(t))throw new Error("bad x: need 0 < x < p");let e=eW(t*t),r=eW(e*t+BigInt(7)),n=hde(r);n%vk!==xk&&(n=eW(-n));let i=new iW(t,n,fde);return i.assertValidity(),i}function mde(...t){return xC(bs(yk("BIP0340/challenge",...t)))}function dlt(t){return rW(t).bytes}function plt(t,e,r=sk(32)){let n=xs("message",t),{bytes:i,scalar:o}=rW(e),s=xs("auxRand",r,32),c=tW(o^bs(yk("BIP0340/aux",s))),l=yk("BIP0340/nonce",c,i,n),u=xC(bs(l));if(u===xk)throw new Error("sign failed: k is zero");let{bytes:d,scalar:p}=rW(u),v=mde(d,i,n),y=new Uint8Array(64);if(y.set(d,0),y.set(tW(xC(p+v*o)),32),!gde(y,n,i))throw new Error("sign: Invalid signature produced");return y}function gde(t,e,r){let n=xs("signature",t,64),i=xs("message",e),o=xs("publicKey",r,32);try{let s=pde(bs(o)),c=bs(n.subarray(0,32));if(!dde(c))return!1;let l=bs(n.subarray(32,64));if(!flt(l))return!1;let u=mde(tW(c),nW(s),i),d=hlt(s,l,xC(-u));return!(!d||!d.hasEvenY()||d.toAffine().x!==c)}catch{return!1}}var bk,wk,fde,vk,lde,xg,CC,xk,dde,flt,ude,nW,tW,eW,xC,iW,hlt,mlt,glt,wlt,wde,vlt,ylt,yde=F(()=>{$z();m3();bC();Yz();y3();ode();cde();bk=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),wk=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),fde=BigInt(1),vk=BigInt(2),lde=(t,e)=>(t+e/vk)/e;xg=Ghe(bk,void 0,void 0,{sqrt:hde}),CC=ade({a:BigInt(0),b:BigInt(7),Fp:xg,n:wk,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=wk,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-fde*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),c=lde(o*t,e),l=lde(-n*t,e),u=Qo(t-c*r-l*i,e),d=Qo(-c*n-l*o,e),p=u>s,v=d>s;if(p&&(u=e-u),v&&(d=e-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:p,k1:u,k2neg:v,k2:d}}}},g3),xk=BigInt(0),dde=t=>typeof t=="bigint"&&xktypeof t=="bigint"&&xkt.toRawBytes(!0).slice(1),tW=t=>u0(t,32),eW=t=>Qo(t,bk),xC=t=>Qo(t,wk),iW=CC.ProjectivePoint,hlt=(t,e,r)=>iW.BASE.multiplyAndAddUnsafe(t,e,r);mlt={getPublicKey:dlt,sign:plt,verify:gde,utils:{randomPrivateKey:CC.utils.randomPrivateKey,lift_x:pde,pointToBytes:nW,numberToBytesBE:u0,bytesToNumberBE:bs,taggedHash:yk,mod:Qo}},glt=nde(xg,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))),wlt=tde(xg,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:xg.create(BigInt("-11"))}),wde=ide(CC.ProjectivePoint,t=>{let{x:e,y:r}=wlt(xg.create(t[0]));return glt(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:xg.ORDER,m:1,k:128,expand:"xmd",hash:g3}),vlt=wde.hashToCurve,ylt=wde.encodeToCurve});async function xde({hash:t,signature:e}){let r=ys(t)?t:Bt(t),{secp256k1:n}=await Promise.resolve().then(()=>(yde(),vde));return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){let{r:u,s:d,v:p,yParity:v}=e,y=Number(v??p),_=bde(y);return new n.Signature(Kn(u),Kn(d)).addRecoveryBit(_)}let s=ys(e)?e:Bt(e),c=Bs(`0x${s.slice(130)}`),l=bde(c);return n.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(r.substring(2)).toHex(!1)}`}function bde(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}var Cde=F(()=>{Eh();Pa();Kr()});async function Ede({hash:t,signature:e}){return Fhe(await xde({hash:t,signature:e}))}var Ade=F(()=>{Uhe();Cde()});var EC,Ck,Ek,Sde=F(()=>{wn();EC=class extends Pe{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}},Ck=class extends Pe{constructor({length:e,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}},Ek=class extends Pe{constructor({count:e,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}});function m6(t,{recursiveReadLimit:e=8192}={}){let r=Object.create(blt);return r.bytes=t,r.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}var blt,Ak=F(()=>{Sde();blt={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Ek({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Ck({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new EC({offset:t});let e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new EC({offset:t});let e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){let r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){let e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){let e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){let e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){let e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();let r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();let t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();let t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();let t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();let t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){let e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}}});function wc(t,e="hex"){let r=_de(t),n=m6(new Uint8Array(r.length));return r.encode(n),e==="hex"?ii(n.bytes):n.bytes}function _de(t){return Array.isArray(t)?xlt(t.map(e=>_de(e))):Clt(t)}function xlt(t){let e=t.reduce((i,o)=>i+o.length,0),r=Ide(e);return{length:e<=55?1+e:1+r+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+r),r===1?i.pushUint8(e):r===2?i.pushUint16(e):r===3?i.pushUint24(e):i.pushUint32(e));for(let{encode:o}of t)o(i)}}}function Clt(t){let e=typeof t=="string"?Go(t):t,r=Ide(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+r+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+r),r===1?i.pushUint8(e.length):r===2?i.pushUint16(e.length):r===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function Ide(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new Pe("Length is too large.")}var g6=F(()=>{wn();Ak();aa();Kr()});function Tde(t){let{chainId:e,contractAddress:r,nonce:n,to:i}=t,o=qi(Ls(["0x05",wc([rr(e),r,rr(n)])]));return i==="bytes"?Go(o):o}var kde=F(()=>{Vl();aa();Kr();g6();Ih()});async function Sk(t){let{authorization:e,signature:r}=t;return Ede({hash:Tde(e),signature:r??e})}var oW=F(()=>{Ade();kde()});var C3,_k,Ik,AC,h0,E3=F(()=>{wn();C3=class extends Pe{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}},_k=class extends Pe{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} \u2013 ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} \u2013 ${e.name}`],name:"ChainMismatchError"})}},Ik=class extends Pe{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` `),{name:"ChainNotFoundError"})}},AC=class extends Pe{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}},h0=class extends Pe{constructor({chainId:e}){super(typeof e=="number"?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}});function Tk({chain:t,currentChainId:e}){if(!t)throw new Ik;if(e!==t.id)throw new _k({chain:t,currentChainId:e})}var sW=F(()=>{E3()});var aW,cW,lW,kk=F(()=>{aW={gwei:9,wei:18},cW={ether:-9,wei:9},lW={ether:-18,gwei:-9}});function Rh(t,e){let r=t.toString(),n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,o]=[r.slice(0,r.length-e),r.slice(r.length-e)];return o=o.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${o?`.${o}`:""}`}var Rk=F(()=>{});function Es(t,e="wei"){return Rh(t,cW[e])}var w6=F(()=>{kk();Rk()});var r1,nl,v6,y6,b6,x6,C6,E6,A6,S6,Ku,Mh,Cg=F(()=>{w6();wn();r1=class extends Pe{constructor({cause:e,message:r}={}){let n=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}};Object.defineProperty(r1,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(r1,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});nl=class extends Pe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Es(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}};Object.defineProperty(nl,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});v6=class extends Pe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${Es(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}};Object.defineProperty(v6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});y6=class extends Pe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}};Object.defineProperty(y6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});b6=class extends Pe{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` `),{cause:e,name:"NonceTooLowError"})}};Object.defineProperty(b6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});x6=class extends Pe{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}};Object.defineProperty(x6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});C6=class extends Pe{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` `),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}};Object.defineProperty(C6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});E6=class extends Pe{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}};Object.defineProperty(E6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});A6=class extends Pe{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}};Object.defineProperty(A6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});S6=class extends Pe{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}};Object.defineProperty(S6,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});Ku=class extends Pe{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${Es(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${Es(n)} gwei`:""}).`].join(` `),{cause:e,name:"TipAboveFeeCapError"})}};Object.defineProperty(Ku,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Mh=class extends Pe{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}});function _6(t,e="wei"){return Rh(t,aW[e])}var Mk=F(()=>{kk();Rk()});function A3(t){let e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(r+1)} ${i}`).join(` `)}var Nk,Pk,Ok,Bk,Lk,I6,T6,SC,d0=F(()=>{Mk();w6();wn();Nk=class extends Pe{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` `),{name:"FeeConflictError"})}},Pk=class extends Pe{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}},Ok=class extends Pe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",A3(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}},Bk=class extends Pe{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}},Lk=class extends Pe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:p,value:v}){let y=A3({chain:i&&`${i?.name} (id: ${i?.id})`,from:r?.address,to:p,value:typeof v<"u"&&`${_6(v)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:s,gasPrice:typeof c<"u"&&`${Es(c)} gwei`,maxFeePerGas:typeof l<"u"&&`${Es(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Es(u)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",y].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},I6=class extends Pe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:o}){let s="Transaction";n&&o!==void 0&&(s=`Transaction at block time "${n}" at index "${o}"`),e&&o!==void 0&&(s=`Transaction at block hash "${e}" at index "${o}"`),r&&o!==void 0&&(s=`Transaction at block number "${r}" at index "${o}"`),i&&(s=`Transaction with hash "${i}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}},T6=class extends Pe{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}},SC=class extends Pe{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}});var lo,Nh=F(()=>{lo=(t,e,r)=>JSON.stringify(t,(n,i)=>{let o=typeof i=="bigint"?i.toString():i;return typeof e=="function"?e(n,o):o},r)});var Rde,S3,Fk=F(()=>{Rde=t=>t,S3=t=>t});var Gu,k6,_C,R6=F(()=>{Nh();wn();Fk();Gu=class extends Pe{constructor({body:e,cause:r,details:n,headers:i,status:o,url:s}){super("HTTP request failed.",{cause:r,details:n,metaMessages:[o&&`Status: ${o}`,`URL: ${S3(s)}`,e&&`Request body: ${lo(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=o,this.url=s}},k6=class extends Pe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${S3(n)}`,`Request body: ${lo(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}},_C=class extends Pe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${S3(r)}`,`Request body: ${lo(e)}`],name:"TimeoutError"})}}});var Elt,ca,n1,_3,I3,T3,k3,Ph,R3,M3,p0,N3,P3,Eg,O3,bi,B3,L3,F3,U3,la,IC,Uk=F(()=>{wn();R6();Elt=-1,ca=class extends Pe{constructor(e,{code:r,docsPath:n,metaMessages:i,name:o,shortMessage:s}){super(s,{cause:e,docsPath:n,metaMessages:i||e?.metaMessages,name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||e.name,this.code=e instanceof k6?e.code:r??Elt}},n1=class extends ca{constructor(e,r){super(e,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}},_3=class t extends ca{constructor(e){super(e,{code:t.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}};Object.defineProperty(_3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});I3=class t extends ca{constructor(e){super(e,{code:t.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}};Object.defineProperty(I3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});T3=class t extends ca{constructor(e,{method:r}={}){super(e,{code:t.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}};Object.defineProperty(T3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});k3=class t extends ca{constructor(e){super(e,{code:t.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` `)})}};Object.defineProperty(k3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});Ph=class t extends ca{constructor(e){super(e,{code:t.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}};Object.defineProperty(Ph,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});R3=class t extends ca{constructor(e){super(e,{code:t.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` `)})}};Object.defineProperty(R3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});M3=class t extends ca{constructor(e){super(e,{code:t.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}};Object.defineProperty(M3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});p0=class t extends ca{constructor(e){super(e,{code:t.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}};Object.defineProperty(p0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});N3=class t extends ca{constructor(e){super(e,{code:t.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}};Object.defineProperty(N3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});P3=class t extends ca{constructor(e,{method:r}={}){super(e,{code:t.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not implemented.`})}};Object.defineProperty(P3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});Eg=class t extends ca{constructor(e){super(e,{code:t.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}};Object.defineProperty(Eg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});O3=class t extends ca{constructor(e){super(e,{code:t.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}};Object.defineProperty(O3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});bi=class t extends n1{constructor(e){super(e,{code:t.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}};Object.defineProperty(bi,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});B3=class t extends n1{constructor(e){super(e,{code:t.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}};Object.defineProperty(B3,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});L3=class t extends n1{constructor(e,{method:r}={}){super(e,{code:t.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}};Object.defineProperty(L3,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});F3=class t extends n1{constructor(e){super(e,{code:t.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}};Object.defineProperty(F3,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});U3=class t extends n1{constructor(e){super(e,{code:t.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}};Object.defineProperty(U3,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});la=class t extends n1{constructor(e){super(e,{code:t.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}};Object.defineProperty(la,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});IC=class extends ca{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}});function M6(t,e){let r=(t.details||"").toLowerCase(),n=t instanceof Pe?t.walk(i=>i.code===r1.code):t;return n instanceof Pe?new r1({cause:t,message:n.details}):r1.nodeMessage.test(r)?new r1({cause:t,message:t.details}):nl.nodeMessage.test(r)?new nl({cause:t,maxFeePerGas:e?.maxFeePerGas}):v6.nodeMessage.test(r)?new v6({cause:t,maxFeePerGas:e?.maxFeePerGas}):y6.nodeMessage.test(r)?new y6({cause:t,nonce:e?.nonce}):b6.nodeMessage.test(r)?new b6({cause:t,nonce:e?.nonce}):x6.nodeMessage.test(r)?new x6({cause:t,nonce:e?.nonce}):C6.nodeMessage.test(r)?new C6({cause:t}):E6.nodeMessage.test(r)?new E6({cause:t,gas:e?.gas}):A6.nodeMessage.test(r)?new A6({cause:t,gas:e?.gas}):S6.nodeMessage.test(r)?new S6({cause:t}):Ku.nodeMessage.test(r)?new Ku({cause:t,maxFeePerGas:e?.maxFeePerGas,maxPriorityFeePerGas:e?.maxPriorityFeePerGas}):new Mh({cause:t})}var Dk=F(()=>{wn();Cg()});function Mde(t,{docsPath:e,...r}){let n=(()=>{let i=M6(t,r);return i instanceof Mh?t:i})();return new Lk(n,{docsPath:e,...r})}var Nde=F(()=>{Cg();d0();Dk()});function N6(t,{format:e}){if(!e)return{};let r={};function n(o){let s=Object.keys(o);for(let c of s)c in t&&(r[c]=t[c]),o[c]&&typeof o[c]=="object"&&!Array.isArray(o[c])&&n(o[c])}let i=e(t||{});return n(i),r}var jk=F(()=>{});function Ag(t,e){return({exclude:r,format:n})=>({exclude:r,format:i=>{let o=e(i);if(r)for(let s of r)delete o[s];return{...o,...n(i)}},type:t})}var TC=F(()=>{});function i1(t){let e={};return typeof t.authorizationList<"u"&&(e.authorizationList=Slt(t.authorizationList)),typeof t.accessList<"u"&&(e.accessList=t.accessList),typeof t.blobVersionedHashes<"u"&&(e.blobVersionedHashes=t.blobVersionedHashes),typeof t.blobs<"u"&&(typeof t.blobs[0]!="string"?e.blobs=t.blobs.map(r=>ii(r)):e.blobs=t.blobs),typeof t.data<"u"&&(e.data=t.data),typeof t.from<"u"&&(e.from=t.from),typeof t.gas<"u"&&(e.gas=rr(t.gas)),typeof t.gasPrice<"u"&&(e.gasPrice=rr(t.gasPrice)),typeof t.maxFeePerBlobGas<"u"&&(e.maxFeePerBlobGas=rr(t.maxFeePerBlobGas)),typeof t.maxFeePerGas<"u"&&(e.maxFeePerGas=rr(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<"u"&&(e.maxPriorityFeePerGas=rr(t.maxPriorityFeePerGas)),typeof t.nonce<"u"&&(e.nonce=rr(t.nonce)),typeof t.to<"u"&&(e.to=t.to),typeof t.type<"u"&&(e.type=Alt[t.type]),typeof t.value<"u"&&(e.value=rr(t.value)),e}function Slt(t){return t.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:rr(e.chainId),nonce:rr(e.nonce),...typeof e.yParity<"u"?{yParity:rr(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:rr(e.v)}:{}}))}var Alt,$k,D3=F(()=>{Kr();TC();Alt={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};$k=Ag("transactionRequest",i1)});function tn(t,e,r){let n=t[e.name];if(typeof n=="function")return n;let i=t[r];return typeof i=="function"?i:o=>e(t,o)}var Ba=F(()=>{});function Oh(t){let{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:o}=t,s=e?ki(e):void 0;if(s&&!Hn(s.address))throw new oi({address:s.address});if(o&&!Hn(o))throw new oi({address:o});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new Nk;if(n&&n>2n**256n-1n)throw new nl({maxFeePerGas:n});if(i&&n&&i>n)throw new Ku({maxFeePerGas:n,maxPriorityFeePerGas:i})}var P6=F(()=>{rl();zu();Cg();d0();Kl()});async function Sg(t){let e=await t.request({method:"eth_chainId"},{dedupe:!0});return Bs(e)}var kC=F(()=>{Pa()});var qk,_g,Hk,zk=F(()=>{w6();wn();qk=class extends Pe{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}},_g=class extends Pe{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}},Hk=class extends Pe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Es(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}});var O6,uW=F(()=>{wn();O6=class extends Pe{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}});function o1(t){let e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?Bs(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?Bs(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?fW[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return t.authorizationList&&(e.authorizationList=_lt(t.authorizationList)),e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}function _lt(t){return t.map(e=>({contractAddress:e.address,r:e.r,s:e.s,chainId:Number(e.chainId),nonce:Number(e.nonce),...typeof e.yParity<"u"?{yParity:Number(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:Number(e.v)}:{}}))}var fW,B6,j3=F(()=>{Pa();TC();fW={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};B6=Ag("transaction",o1)});function hW(t){let e=t.transactions?.map(r=>typeof r=="string"?r:o1(r));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}var L6,RC=F(()=>{TC();j3();L6=Ag("block",hW)});async function s1(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:i}={}){let o=n??"latest",s=i??!1,c=r!==void 0?rr(r):void 0,l=null;if(e?l=await t.request({method:"eth_getBlockByHash",params:[e,s]},{dedupe:!0}):l=await t.request({method:"eth_getBlockByNumber",params:[c||o,s]},{dedupe:!!c}),!l)throw new O6({blockHash:e,blockNumber:r});return(t.chain?.formatters?.block?.format||hW)(l)}var MC=F(()=>{uW();Kr();RC()});async function Wk(t){let e=await t.request({method:"eth_gasPrice"});return BigInt(e)}var dW=F(()=>{});async function Pde(t,e){let{block:r,chain:n=t.chain,request:i}=e||{};if(typeof n?.fees?.defaultPriorityFee=="function"){let o=r||await tn(t,s1,"getBlock")({});return n.fees.defaultPriorityFee({block:o,client:t,request:i})}if(typeof n?.fees?.defaultPriorityFee<"u")return n?.fees?.defaultPriorityFee;try{let o=await t.request({method:"eth_maxPriorityFeePerGas"});return Kn(o)}catch{let[o,s]=await Promise.all([r?Promise.resolve(r):tn(t,s1,"getBlock")({}),tn(t,Wk,"getGasPrice")({})]);if(typeof o.baseFeePerGas!="bigint")throw new _g;let c=s-o.baseFeePerGas;return c<0n?0n:c}}var Ode=F(()=>{zk();Pa();Ba();MC();dW()});async function pW(t,e){let{block:r,chain:n=t.chain,request:i,type:o="eip1559"}=e||{},s=await(async()=>typeof n?.fees?.baseFeeMultiplier=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):n?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new qk;let l=10**(s.toString().split(".")[1]?.length??0),u=v=>v*BigInt(Math.ceil(s*l))/BigInt(l),d=r||await tn(t,s1,"getBlock")({});if(typeof n?.fees?.estimateFeesPerGas=="function"){let v=await n.fees.estimateFeesPerGas({block:r,client:t,multiply:u,request:i,type:o});if(v!==null)return v}if(o==="eip1559"){if(typeof d.baseFeePerGas!="bigint")throw new _g;let v=typeof i?.maxPriorityFeePerGas=="bigint"?i.maxPriorityFeePerGas:await Pde(t,{block:d,chain:n,request:i}),y=u(d.baseFeePerGas);return{maxFeePerGas:i?.maxFeePerGas??y+v,maxPriorityFeePerGas:v}}return{gasPrice:i?.gasPrice??u(await tn(t,Wk,"getGasPrice")({}))}}var Bde=F(()=>{zk();Ba();Ode();MC();dW()});var Vk,Lde=F(()=>{Mk();w6();wn();d0();Vk=class extends Pe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:p,value:v}){let y=A3({from:r?.address,to:p,value:typeof v<"u"&&`${_6(v)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:s,gasPrice:typeof c<"u"&&`${Es(c)} gwei`,maxFeePerGas:typeof l<"u"&&`${Es(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Es(u)} gwei`,nonce:d});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",y].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}});function Fde(t,{docsPath:e,...r}){let n=(()=>{let i=M6(t,r);return i instanceof Mh?t:i})();return new Vk(n,{docsPath:e,...r})}var Ude=F(()=>{Lde();Cg();Dk()});function Dde(t){return t.reduce((e,{slot:r,value:n})=>`${e} ${r}: ${n} `,"")}function jde(t){return t.reduce((e,{address:r,...n})=>{let i=`${e} ${r}: `;return n.nonce&&(i+=` nonce: ${n.nonce} `),n.balance&&(i+=` balance: ${n.balance} `),n.code&&(i+=` code: ${n.code} `),n.state&&(i+=` state: `,i+=Dde(n.state)),n.stateDiff&&(i+=` stateDiff: `,i+=Dde(n.stateDiff)),i},` State Override: `).slice(0,-1)}var Kk,Gk,mW=F(()=>{wn();Kk=class extends Pe{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}},Gk=class extends Pe{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}});function $de(t){if(!(!t||t.length===0))return t.reduce((e,{slot:r,value:n})=>{if(r.length!==66)throw new cC({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new cC({size:n.length,targetSize:66,type:"hex"});return e[r]=n,e},{})}function Ilt(t){let{balance:e,nonce:r,state:n,stateDiff:i,code:o}=t,s={};if(o!==void 0&&(s.code=o),e!==void 0&&(s.balance=rr(e)),r!==void 0&&(s.nonce=rr(r)),n!==void 0&&(s.state=$de(n)),i!==void 0){if(s.state)throw new Gk;s.stateDiff=$de(i)}return s}function Qk(t){if(!t)return;let e={};for(let{address:r,...n}of t){if(!Hn(r,{strict:!1}))throw new oi({address:r});if(e[r])throw new Kk({address:r});e[r]=Ilt(n)}return e}var gW=F(()=>{zu();DT();mW();Kl();Kr()});async function NC(t,{address:e,blockNumber:r,blockTag:n="latest"}){let i=r?rr(r):void 0,o=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(o)}var wW=F(()=>{Kr()});async function $3(t,e){let r=e.account??t.account,n=r?ki(r):void 0;try{let q=function(f){let{block:h,request:g,rpcStateOverride:x}=f;return t.request({method:"eth_estimateGas",params:x?[g,h??"latest",x]:h?[g,h]:[g]})},{accessList:i,authorizationList:o,blobs:s,blobVersionedHashes:c,blockNumber:l,blockTag:u,data:d,gas:p,gasPrice:v,maxFeePerBlobGas:y,maxFeePerGas:_,maxPriorityFeePerGas:R,nonce:P,value:k,stateOverride:M,...L}=await a1(t,{...e,parameters:n?.type==="local"?void 0:["blobVersionedHashes"]}),j=(l?rr(l):void 0)||u,V=Qk(M),K=await(async()=>{if(L.to)return L.to;if(o&&o.length>0)return await Sk({authorization:o[0]}).catch(()=>{throw new Pe("`to` is required. Could not infer from `authorizationList`")})})();Oh(e);let B=t.chain?.formatters?.transactionRequest?.format,z=(B||i1)({...N6(L,{format:B}),from:n?.address,accessList:i,authorizationList:o,blobs:s,blobVersionedHashes:c,data:d,gas:p,gasPrice:v,maxFeePerBlobGas:y,maxFeePerGas:_,maxPriorityFeePerGas:R,nonce:P,to:K,value:k}),Q=BigInt(await q({block:j,request:z,rpcStateOverride:V}));if(o){let f=await NC(t,{address:z.from}),h=await Promise.all(o.map(async g=>{let{contractAddress:x}=g,S=await q({block:j,request:{authorizationList:void 0,data:d,from:n?.address,to:x,value:rr(f)},rpcStateOverride:V}).catch(()=>100000n);return 2n*BigInt(S)}));Q+=h.reduce((g,x)=>g+x,0n)}return Q}catch(i){throw Fde(i,{...e,account:n,chain:t.chain})}}var vW=F(()=>{rl();wn();oW();Kr();Ude();jk();D3();gW();P6();PC();wW()});async function qde(t,{address:e,blockTag:r="latest",blockNumber:n}){let i=await t.request({method:"eth_getTransactionCount",params:[e,n?rr(n):r]},{dedupe:!!n});return Bs(i)}var Hde=F(()=>{Pa();Kr()});function F6(t){let{kzg:e}=t,r=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(o=>Go(o)):t.blobs,i=[];for(let o of n)i.push(Uint8Array.from(e.blobToKzgCommitment(o)));return r==="bytes"?i:i.map(o=>ii(o))}var Zk=F(()=>{aa();Kr()});function U6(t){let{kzg:e}=t,r=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),n=typeof t.blobs[0]=="string"?t.blobs.map(s=>Go(s)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(s=>Go(s)):t.commitments,o=[];for(let s=0;sii(s))}var Yk=F(()=>{aa();Kr()});function Jk(t,e){let r=e||"hex",n=g3(ys(t,{strict:!1})?Hu(t):t);return r==="bytes"?n:Bt(n)}var yW=F(()=>{$z();Eh();aa();Kr()});function zde(t){let{commitment:e,version:r=1}=t,n=t.to??(typeof e=="string"?"hex":"bytes"),i=Jk(e,"bytes");return i.set([r],0),n==="bytes"?i:ii(i)}var Wde=F(()=>{Kr();yW()});function Xk(t){let{commitments:e,version:r}=t,n=t.to??(typeof e[0]=="string"?"hex":"bytes"),i=[];for(let o of e)i.push(zde({commitment:o,to:n,version:r}));return i}var bW=F(()=>{Wde()});var eR,D6,tR,rR,xW=F(()=>{wn();eR=class extends Pe{constructor({maxSize:e,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"})}},D6=class extends Pe{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}},tR=class extends Pe{constructor({hash:e,size:r}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"})}},rR=class extends Pe{constructor({hash:e,version:r}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"})}}});function Vde(t){let e=t.to??(typeof t.data=="string"?"hex":"bytes"),r=typeof t.data=="string"?Go(t.data):t.data,n=di(r);if(!n)throw new D6;if(n>761855)throw new eR({maxSize:761855,size:n});let i=[],o=!0,s=0;for(;o;){let c=m6(new Uint8Array(131072)),l=0;for(;l<4096;){let u=r.slice(s,s+31);if(c.pushByte(0),c.pushBytes(u),u.length<31){c.pushByte(128),o=!1;break}l++,s+=31}i.push(c)}return e==="bytes"?i.map(c=>c.bytes):i.map(c=>ii(c.bytes))}var Kde=F(()=>{xW();Ak();Ah();aa();Kr()});function nR(t){let{data:e,kzg:r,to:n}=t,i=t.blobs??Vde({data:e,to:n}),o=t.commitments??F6({blobs:i,kzg:r,to:n}),s=t.proofs??U6({blobs:i,commitments:o,kzg:r,to:n}),c=[];for(let l=0;l{Zk();Yk();Kde()});function iR(t){if(t.type)return t.type;if(typeof t.authorizationList<"u")return"eip7702";if(typeof t.blobs<"u"||typeof t.blobVersionedHashes<"u"||typeof t.maxFeePerBlobGas<"u"||typeof t.sidecars<"u")return"eip4844";if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Ok({transaction:t})}var EW=F(()=>{d0()});async function a1(t,e){let{account:r=t.account,blobs:n,chain:i,gas:o,kzg:s,nonce:c,parameters:l=oR,type:u}=e,d=r?ki(r):void 0,p={...e,...d?{from:d?.address}:{}},v;async function y(){return v||(v=await tn(t,s1,"getBlock")({blockTag:"latest"}),v)}let _;async function R(){return _||(i?i.id:typeof e.chainId<"u"?e.chainId:(_=await tn(t,Sg,"getChainId")({}),_))}if((l.includes("blobVersionedHashes")||l.includes("sidecars"))&&n&&s){let P=F6({blobs:n,kzg:s});if(l.includes("blobVersionedHashes")){let k=Xk({commitments:P,to:"hex"});p.blobVersionedHashes=k}if(l.includes("sidecars")){let k=U6({blobs:n,commitments:P,kzg:s}),M=nR({blobs:n,commitments:P,proofs:k,to:"hex"});p.sidecars=M}}if(l.includes("chainId")&&(p.chainId=await R()),l.includes("nonce")&&typeof c>"u"&&d)if(d.nonceManager){let P=await R();p.nonce=await d.nonceManager.consume({address:d.address,chainId:P,client:t})}else p.nonce=await tn(t,qde,"getTransactionCount")({address:d.address,blockTag:"pending"});if((l.includes("fees")||l.includes("type"))&&typeof u>"u")try{p.type=iR(p)}catch{let P=await y();p.type=typeof P?.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(l.includes("fees"))if(p.type!=="legacy"&&p.type!=="eip2930"){if(typeof p.maxFeePerGas>"u"||typeof p.maxPriorityFeePerGas>"u"){let P=await y(),{maxFeePerGas:k,maxPriorityFeePerGas:M}=await pW(t,{block:P,chain:i,request:p});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(p.gas=await tn(t,$3,"estimateGas")({...p,account:d?{address:d.address,type:"json-rpc"}:void 0})),Oh(p),delete p.parameters,p}var oR,PC=F(()=>{rl();Bde();vW();MC();Hde();zk();Zk();Yk();bW();CW();Ba();P6();EW();kC();oR=["blobVersionedHashes","chainId","fees","gas","nonce","type"]});async function sR(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}var AW=F(()=>{});async function c1(t,e){let{account:r=t.account,chain:n=t.chain,accessList:i,authorizationList:o,blobs:s,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:v,nonce:y,value:_,...R}=e;if(!r)throw new Wu({docsPath:"/docs/actions/wallet/sendTransaction"});let P=ki(r);try{Oh(e);let k=await(async()=>{if(e.to)return e.to;if(o&&o.length>0)return await Sk({authorization:o[0]}).catch(()=>{throw new Pe("`to` is required. Could not infer from `authorizationList`.")})})();if(P.type==="json-rpc"){let M;n!==null&&(M=await tn(t,Sg,"getChainId")({}),Tk({currentChainId:M,chain:n}));let L=t.chain?.formatters?.transactionRequest?.format,j=(L||i1)({...N6(R,{format:L}),accessList:i,authorizationList:o,blobs:s,chainId:M,data:c,from:P.address,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:v,nonce:y,to:k,value:_});return await t.request({method:"eth_sendTransaction",params:[j]},{retryCount:0})}if(P.type==="local"){let M=await tn(t,a1,"prepareTransactionRequest")({account:P,accessList:i,authorizationList:o,blobs:s,chain:n,data:c,gas:l,gasPrice:u,maxFeePerBlobGas:d,maxFeePerGas:p,maxPriorityFeePerGas:v,nonce:y,parameters:[...oR,"sidecars"],value:_,...R,to:k}),L=n?.serializers?.transaction,D=await P.signTransaction(M,{serializer:L});return await tn(t,sR,"sendRawTransaction")({serializedTransaction:D})}throw P.type==="smart"?new d6({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new d6({docsPath:"/docs/actions/wallet/sendTransaction",type:P.type})}catch(k){throw k instanceof d6?k:Mde(k,{...e,account:P,chain:e.chain||void 0})}}var OC=F(()=>{rl();p6();wn();oW();sW();Nde();jk();D3();Ba();P6();kC();PC();AW()});function Gde(t,e){let{abi:r,args:n,bytecode:i,...o}=e,s=wC({abi:r,args:n,bytecode:i});return c1(t,{...o,data:s})}var Qde=F(()=>{Dz();OC()});var BC,Zde,aR,Yde,SW,_W,j6=F(()=>{BC=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Zde=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],aR=[...Zde,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Yde=[...Zde,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],SW=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],_W=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}]});function Jde(t,e={}){typeof e.size<"u"&&tl(t,{size:e.size});let r=ii(t,e);return Kn(r,e)}function Xde(t,e={}){let r=t;if(typeof e.size<"u"&&(tl(r,{size:e.size}),r=os(r)),r.length>1||r[0]>1)throw new LT(r);return!!r[0]}function Bh(t,e={}){typeof e.size<"u"&&tl(t,{size:e.size});let r=ii(t,e);return Bs(r,e)}function epe(t,e={}){let r=t;return typeof e.size<"u"&&(tl(r,{size:e.size}),r=os(r,{dir:"right"})),new TextDecoder().decode(r)}var tpe=F(()=>{UT();cg();Pa();Kr()});function cR(t,e){let r=typeof e=="string"?Go(e):e,n=m6(r);if(di(r)===0&&t.length>0)throw new _h;if(di(e)&&di(e)<32)throw new zT({data:typeof e=="string"?e:ii(e),params:t,size:di(e)});let i=0,o=[];for(let s=0;s48?Jde(i,{signed:r}):Bh(i,{signed:r}),32]}function Blt(t,e,{staticPosition:r}){let n=e.components.length===0||e.components.some(({name:s})=>!s),i=n?[]:{},o=0;if(LC(e)){let s=Bh(t.readBytes(IW)),c=r+s;for(let l=0;l{Wl();mg();Ak();Ah();f6();cg();tpe();aa();Kr();h6();rpe=32,IW=32});function npe(t){return Flt(t)}var Flt,ipe=F(()=>{aa();Ih();Flt=t=>qi(Hu(t))});var ope,spe=F(()=>{ope="1.0.5"});var As,q6=F(()=>{spe();As=class t extends Error{constructor(e,r={}){let n=r.cause instanceof t?r.cause.details:r.cause?.message?r.cause.message:r.details,i=r.cause instanceof t&&r.cause.docsPath||r.docsPath,o=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],`Version: abitype@${ope}`].join(` `);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}}});function Qu(t,e){return t.exec(e)?.groups}var kW,RW,lR,FC=F(()=>{kW=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,RW=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,lR=/^\(.+?\).*?$/});function uR(t){let e=t.type;if(ape.test(t.type)&&"components"in t){e="(";let r=t.components.length;for(let i=0;i{FC();ape=/^tuple(?(\[(\d*)\])*)$/});function H6(t){let e="",r=t.length;for(let n=0;n{cpe()});function MW(t){return t.type==="function"?`function ${t.name}(${H6(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${H6(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${H6(t.inputs)})`:t.type==="error"?`error ${t.name}(${H6(t.inputs)})`:t.type==="constructor"?`constructor(${H6(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?"fallback()":"receive() external payable"}var upe=F(()=>{lpe()});function hpe(t){return fpe.test(t)}function dpe(t){return Qu(fpe,t)}function mpe(t){return ppe.test(t)}function gpe(t){return Qu(ppe,t)}function vpe(t){return wpe.test(t)}function ype(t){return Qu(wpe,t)}function fR(t){return bpe.test(t)}function xpe(t){return Qu(bpe,t)}function Epe(t){return Cpe.test(t)}function Ape(t){return Qu(Cpe,t)}function Spe(t){return Ult.test(t)}function _pe(t){return Dlt.test(t)}var fpe,ppe,wpe,bpe,Cpe,Ult,Dlt,Ipe,hR,dR=F(()=>{FC();fpe=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;ppe=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;wpe=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;bpe=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;Cpe=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;Ult=/^fallback\(\) external(?:\s(?payable{1}))?$/;Dlt=/^receive\(\) external payable$/;Ipe=new Set(["indexed"]),hR=new Set(["calldata","memory","storage"])});var pR,mR,NW=F(()=>{q6();pR=class extends As{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},mR=class extends As{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}});var gR,wR,vR,yR,bR,PW=F(()=>{q6();gR=class extends As{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},wR=class extends As{constructor({param:e,name:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},vR=class extends As{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},yR=class extends As{constructor({param:e,type:r,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},bR=class extends As{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}});var l1,xR,CR,OW=F(()=>{q6();l1=class extends As{constructor({signature:e,type:r}){super(`Invalid ${r} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},xR=class extends As{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},CR=class extends As{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}});var ER,Tpe=F(()=>{q6();ER=class extends As{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}});var AR,kpe=F(()=>{q6();AR=class extends As{constructor({current:e,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}});function Rpe(t,e){return e?`${e}:${t}`:t}var SR,Mpe=F(()=>{SR=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])});function Npe(t,e={}){if(vpe(t)){let r=ype(t);if(!r)throw new l1({signature:t,type:"function"});let n=m0(r.parameters),i=[],o=n.length;for(let c=0;c{FC();NW();PW();OW();kpe();Mpe();dR();jlt=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,$lt=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,qlt=/^u?int$/;Hlt=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/});function Ppe(t){let e={},r=t.length;for(let s=0;s{FC();NW();PW();OW();Tpe();dR();LW();Vlt=/^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/});function _R(t){let e=Ppe(t),r=[],n=t.length;for(let i=0;i{dR();Bpe();LW()});var FW=F(()=>{upe();Lpe()});function Fpe(t){let e=!0,r="",n=0,i="",o=!1;for(let s=0;s{wn()});var Dpe,jpe=F(()=>{FW();Upe();Dpe=t=>{let e=typeof t=="string"?t:MW(t);return Fpe(e)}});function IR(t){return npe(Dpe(t))}var UW=F(()=>{ipe();jpe()});var $pe,qpe=F(()=>{UW();$pe=IR});var z6,TR=F(()=>{f6();UW();z6=t=>Xp(IR(t),0,4)});function W6(t){let{abi:e,args:r=[],name:n}=t,i=ys(n,{strict:!1}),o=e.filter(c=>i?c.type==="function"?z6(c)===n:c.type==="event"?$pe(c)===n:!1:"name"in c&&c.name===n);if(o.length===0)return;if(o.length===1)return o[0];let s;for(let c of o){if(!("inputs"in c))continue;if(!r||r.length===0){if(!c.inputs||c.inputs.length===0)return c;continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==r.length)continue;if(r.every((u,d)=>{let p="inputs"in c&&c.inputs[d];return p?DW(u,p):!1})){if(s&&"inputs"in s&&s.inputs){let u=Hpe(c.inputs,s.inputs,r);if(u)throw new QT({abiItem:c,type:u[0]},{abiItem:s,type:u[1]})}s=c}}return s||o[0]}function DW(t,e){let r=typeof t,n=e.type;switch(n){case"address":return Hn(t,{strict:!1});case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,o)=>DW(Object.values(t)[o],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>DW(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Hpe(t,e,r){for(let n in t){let i=t[n],o=e[n];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return Hpe(i.components,o.components,r[n]);let s=[i.type,o.type];if(s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")?Hn(r[n],{strict:!1}):s.includes("address")&&s.includes("bytes")?Hn(r[n],{strict:!1}):!1)return s}}var kR=F(()=>{Wl();Eh();Kl();qpe();TR()});function Zu(t){let{abi:e,args:r,functionName:n,data:i}=t,o=e[0];if(n){let c=W6({abi:e,args:r,name:n});if(!c)throw new lg(n,{docsPath:jW});o=c}if(o.type!=="function")throw new lg(void 0,{docsPath:jW});if(!o.outputs)throw new GT(o.name,{docsPath:jW});let s=cR(o.outputs,i);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var jW,q3=F(()=>{Wl();TW();kR();jW="/docs/contract/decodeFunctionResult"});function Wpe(t){let{abi:e,args:r,functionName:n}=t,i=e[0];if(n){let o=W6({abi:e,args:r,name:n});if(!o)throw new lg(n,{docsPath:zpe});i=o}if(i.type!=="function")throw new lg(void 0,{docsPath:zpe});return{abi:[i],functionName:z6(Sh(i))}}var zpe,Vpe=F(()=>{Wl();TR();hC();kR();zpe="/docs/contract/encodeFunctionData"});function Fs(t){let{args:e}=t,{abi:r,functionName:n}=t.abi.length===1&&t.functionName?.startsWith("0x")?t:Wpe(t),i=r[0],o=n,s="inputs"in i&&i.inputs?e1(i.inputs,e??[]):void 0;return Ls([o,s??"0x"])}var u1=F(()=>{Vl();h6();Vpe()});function Lh({blockNumber:t,chain:e,contract:r}){let n=e?.contracts?.[r];if(!n)throw new C3({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new C3({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}var V6=F(()=>{E3()});var RR,Kpe,Gpe,MR=F(()=>{RR={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Kpe={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Gpe={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}});function NR(t){let{abi:e,data:r}=t,n=Xp(r,0,4);if(n==="0x")throw new _h;let o=[...e||[],Kpe,Gpe].find(s=>s.type==="error"&&n===z6(Sh(s)));if(!o)throw new u6(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:o,args:"inputs"in o&&o.inputs&&o.inputs.length>0?cR(o.inputs,Xp(r,4)):void 0,errorName:o.name}}var $W=F(()=>{MR();Wl();f6();TR();TW();hC()});function qW({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,o)=>`${n&&i.name?`${i.name}: `:""}${typeof e[o]=="object"?lo(e[o]):e[o]}`).join(", ")})`}var Qpe=F(()=>{Nh()});var UC,f1,Tg,DC,jC,h1,H3=F(()=>{rl();MR();$W();hC();Qpe();kR();Mk();w6();Wl();wn();mW();d0();Fk();UC=class extends Pe{constructor(e,{account:r,docsPath:n,chain:i,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:p,value:v,stateOverride:y}){let _=r?ki(r):void 0,R=A3({from:_?.address,to:p,value:typeof v<"u"&&`${_6(v)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:s,gasPrice:typeof c<"u"&&`${Es(c)} gwei`,maxFeePerGas:typeof l<"u"&&`${Es(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Es(u)} gwei`,nonce:d});y&&(R+=` ${jde(y)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",R].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}},f1=class extends Pe{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:o,functionName:s,sender:c}){let l=W6({abi:r,args:n,name:s}),u=l?qW({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,d=l?Sh(l,{includeName:!0}):void 0,p=A3({address:i&&Rde(i),function:d,args:u&&u!=="()"&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:c});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=s,this.sender=c}},Tg=class extends Pe{constructor({abi:e,data:r,functionName:n,message:i}){let o,s,c,l;if(r&&r!=="0x")try{s=NR({abi:e,data:r});let{abiItem:d,errorName:p,args:v}=s;if(p==="Error")l=v[0];else if(p==="Panic"){let[y]=v;l=RR[y]}else{let y=d?Sh(d,{includeName:!0}):void 0,_=d&&v?qW({abiItem:d,args:v,includeFunctionName:!1,includeName:!1}):void 0;c=[y?`Error: ${y}`:"",_&&_!=="()"?` ${[...Array(p?.length??0).keys()].map(()=>" ").join("")}${_}`:""]}}catch(d){o=d}else i&&(l=i);let u;o instanceof u6&&(u=o.signature,c=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(l&&l!=="execution reverted"||u?[`The contract function "${n}" reverted with the following ${u?"signature":"reason"}:`,l||u].join(` `):`The contract function "${n}" reverted.`,{cause:o,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=s,this.reason=l,this.signature=u}},DC=class extends Pe{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}},jC=class extends Pe{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}},h1=class extends Pe{constructor({data:e,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}});function K6(t,e){if(!(t instanceof Pe))return!1;let r=t.walk(n=>n instanceof Tg);return r instanceof Tg?!!(r.data?.errorName==="ResolverNotFound"||r.data?.errorName==="ResolverWildcardNotSupported"||r.data?.errorName==="ResolverNotContract"||r.data?.errorName==="ResolverError"||r.data?.errorName==="HttpError"||r.reason?.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===RR[50]):!1}var PR=F(()=>{MR();wn();H3()});function OR(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;let e=`0x${t.slice(1,65)}`;return ys(e)?e:null}var HW=F(()=>{Eh()});function G6(t){let e=new Uint8Array(32).fill(0);if(!t)return ii(e);let r=t.split(".");for(let n=r.length-1;n>=0;n-=1){let i=OR(r[n]),o=i?Hu(i):qi(a0(r[n]),"bytes");e=qi(gc([e,o]),"bytes")}return ii(e)}var zW=F(()=>{Vl();aa();Kr();Ih();HW()});function Zpe(t){return`[${t.slice(2)}]`}var Ype=F(()=>{});function Jpe(t){let e=new Uint8Array(32).fill(0);return t?OR(t)||qi(a0(t)):ii(e)}var Xpe=F(()=>{aa();Kr();Ih();HW()});function Q6(t){let e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);let r=new Uint8Array(a0(e).byteLength+2),n=0,i=e.split(".");for(let o=0;o255&&(s=a0(Zpe(Jpe(i[o])))),r[n]=s.length,r.set(s,n+1),n+=s.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}var BR=F(()=>{aa();Ype();Xpe()});function d1(t,{abi:e,address:r,args:n,docsPath:i,functionName:o,sender:s}){let{code:c,data:l,message:u,shortMessage:d}=t instanceof h1?t:t instanceof Pe?t.walk(v=>"data"in v)||t.walk():{},p=t instanceof _h?new DC({functionName:o}):[Klt,Ph.code].includes(c)&&(l||u||d)?new Tg({abi:e,data:typeof l=="object"?l.data:l,functionName:o,message:d??u}):t;return new f1(p,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:o,sender:s})}var Klt,$C=F(()=>{Wl();wn();H3();Uk();Klt=3});var e1e,t1e=F(()=>{e1e="0x82ad56cb"});var r1e,n1e,i1e=F(()=>{r1e="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",n1e="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe"});function o1e(t,{docsPath:e,...r}){let n=(()=>{let i=M6(t,r);return i instanceof Mh?t:i})();return new UC(n,{docsPath:e,...r})}var s1e=F(()=>{H3();Cg();Dk()});function LR({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){let o=async()=>{let d=l();s();let p=d.map(({args:v})=>v);p.length!==0&&t(p).then(v=>{i&&Array.isArray(v)&&v.sort(i);for(let y=0;y{for(let y=0;yWW.delete(e),c=()=>l().map(({args:d})=>d),l=()=>WW.get(e)||[],u=d=>WW.set(e,[...l(),d]);return{flush:s,async schedule(d){let p={},v=new Promise((R,P)=>{p.resolve=R,p.reject=P});return r?.([...c(),d])&&o(),l().length>0?(u({args:d,pendingPromise:p}),v):(u({args:d,pendingPromise:p}),setTimeout(o,n),v)}}}var WW,VW=F(()=>{WW=new Map});var FR,UR,DR,a1e=F(()=>{Nh();wn();Fk();FR=class extends Pe{constructor({callbackSelector:e,cause:r,data:n,extraData:i,sender:o,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(c=>` ${S3(c)}`)],` Sender: ${o}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${i}`].flat(),name:"OffchainLookupError"})}},UR=class extends Pe{constructor({result:e,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${S3(r)}`,`Response: ${lo(e)}`],name:"OffchainLookupResponseMalformedError"})}},DR=class extends Pe{constructor({sender:e,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}});function c1e(t,e){if(!Hn(t,{strict:!1}))throw new oi({address:t});if(!Hn(e,{strict:!1}))throw new oi({address:e});return t.toLowerCase()===e.toLowerCase()}var l1e=F(()=>{zu();Kl()});var h1e={};Hr(h1e,{ccipRequest:()=>f1e,offchainLookup:()=>Qlt,offchainLookupAbiItem:()=>u1e,offchainLookupSignature:()=>Glt});async function Qlt(t,{blockNumber:e,blockTag:r,data:n,to:i}){let{args:o}=NR({data:n,abi:[u1e]}),[s,c,l,u,d]=o,{ccipRead:p}=t,v=p&&typeof p?.request=="function"?p.request:f1e;try{if(!c1e(i,s))throw new DR({sender:s,to:i});let y=await v({data:l,sender:s,urls:c}),{data:_}=await p1(t,{blockNumber:e,blockTag:r,data:gc([u,e1([{type:"bytes"},{type:"bytes"}],[y,d])]),to:i});return _}catch(y){throw new FR({callbackSelector:u,cause:y,data:n,extraData:d,sender:s,urls:c})}}async function f1e({data:t,sender:e,urls:r}){let n=new Error("An unknown error occurred.");for(let i=0;i{qC();a1e();R6();$W();h6();l1e();Vl();Eh();Nh();Glt="0x556f1830",u1e={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]}});async function p1(t,e){let{account:r=t.account,batch:n=!!t.batch?.multicall,blockNumber:i,blockTag:o="latest",accessList:s,blobs:c,code:l,data:u,factory:d,factoryData:p,gas:v,gasPrice:y,maxFeePerBlobGas:_,maxFeePerGas:R,maxPriorityFeePerGas:P,nonce:k,to:M,value:L,stateOverride:D,...j}=e,V=r?ki(r):void 0;if(l&&(d||p))throw new Pe("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(l&&M)throw new Pe("Cannot provide both `code` & `to` as parameters.");let K=l&&u,B=d&&p&&M&&u,W=K||B,z=K?Jlt({code:l,data:u}):B?Xlt({data:u,factory:d,factoryData:p,to:M}):u;try{Oh(e);let Q=(i?rr(i):void 0)||o,f=Qk(D),h=t.chain?.formatters?.transactionRequest?.format,x=(h||i1)({...N6(j,{format:h}),from:V?.address,accessList:s,blobs:c,data:z,gas:v,gasPrice:y,maxFeePerBlobGas:_,maxFeePerGas:R,maxPriorityFeePerGas:P,nonce:k,to:W?void 0:M,value:L});if(n&&Zlt({request:x})&&!f)try{return await Ylt(t,{...x,blockNumber:i,blockTag:o})}catch(T){if(!(T instanceof AC)&&!(T instanceof C3))throw T}let S=await t.request({method:"eth_call",params:f?[x,Q,f]:[x,Q]});return S==="0x"?{data:void 0}:{data:S}}catch(q){let Q=eut(q),{offchainLookup:f,offchainLookupSignature:h}=await Promise.resolve().then(()=>(d1e(),h1e));if(t.ccipRead!==!1&&Q?.slice(0,10)===h&&M)return{data:await f(t,{data:Q,to:M})};throw W&&Q?.slice(0,10)==="0x101bb98d"?new jC({factory:d}):o1e(q,{...e,account:V,chain:t.chain})}}function Zlt({request:t}){let{data:e,to:r,...n}=t;return!(!e||e.startsWith(e1e)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function Ylt(t,e){let{batchSize:r=1024,wait:n=0}=typeof t.batch?.multicall=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:o="latest",data:s,multicallAddress:c,to:l}=e,u=c;if(!u){if(!t.chain)throw new AC;u=Lh({blockNumber:i,chain:t.chain,contract:"multicall3"})}let p=(i?rr(i):void 0)||o,{schedule:v}=LR({id:`${t.uid}.${p}`,wait:n,shouldSplitBatch(R){return R.reduce((k,{data:M})=>k+(M.length-2),0)>r*2},fn:async R=>{let P=R.map(L=>({allowFailure:!0,callData:L.data,target:L.to})),k=Fs({abi:BC,args:[P],functionName:"aggregate3"}),M=await t.request({method:"eth_call",params:[{data:k,to:u},p]});return Zu({abi:BC,args:[P],functionName:"aggregate3",data:M||"0x"})}}),[{returnData:y,success:_}]=await v({data:s,to:l});if(!_)throw new h1({data:y});return y==="0x"?{data:void 0}:{data:y}}function Jlt(t){let{code:e,data:r}=t;return wC({abi:_R(["constructor(bytes, bytes)"]),bytecode:r1e,args:[e,r]})}function Xlt(t){let{data:e,factory:r,factoryData:n,to:i}=t;return wC({abi:_R(["constructor(address, bytes, address, bytes)"]),bytecode:n1e,args:[i,e,r,n]})}function eut(t){if(!(t instanceof Pe))return;let e=t.walk();return typeof e?.data=="object"?e.data?.data:e.data}var qC=F(()=>{FW();rl();j6();t1e();i1e();wn();E3();H3();q3();Dz();u1();V6();Kr();s1e();jk();D3();VW();gW();P6()});async function il(t,e){let{abi:r,address:n,args:i,functionName:o,...s}=e,c=Fs({abi:r,args:i,functionName:o});try{let{data:l}=await tn(t,p1,"call")({...s,data:c,to:n});return Zu({abi:r,args:i,functionName:o,data:l||"0x"})}catch(l){throw d1(l,{abi:r,address:n,args:i,docsPath:"/docs/contract/readContract",functionName:o})}}var z3=F(()=>{q3();u1();$C();Ba();qC()});async function KW(t,{blockNumber:e,blockTag:r,coinType:n,name:i,gatewayUrls:o,strict:s,universalResolverAddress:c}){let l=c;if(!l){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=Lh({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{let u=Fs({abi:_W,functionName:"addr",...n!=null?{args:[G6(i),BigInt(n)]}:{args:[G6(i)]}}),d={address:l,abi:aR,functionName:"resolve",args:[Bt(Q6(i)),u],blockNumber:e,blockTag:r},p=tn(t,il,"readContract"),v=o?await p({...d,args:[...d.args,o]}):await p(d);if(v[0]==="0x")return null;let y=Zu({abi:_W,args:n!=null?[G6(i),BigInt(n)]:void 0,functionName:"addr",data:v[0]});return y==="0x"||os(y)==="0x00"?null:y}catch(u){if(s)throw u;if(K6(u,"resolve"))return null;throw u}}var p1e=F(()=>{j6();q3();u1();V6();cg();Kr();PR();zW();BR();Ba();z3()});var jR,kg,Z6,$R,m1e=F(()=>{wn();jR=class extends Pe{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}},kg=class extends Pe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}},Z6=class extends Pe{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}},$R=class extends Pe{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}});async function out(t){try{let e=await fetch(t,{method:"HEAD"});return e.status===200?e.headers.get("content-type")?.startsWith("image/"):!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{let n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function g1e(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function GW({uri:t,gatewayUrls:e}){let r=nut.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};let n=g1e(e?.ipfs,"https://ipfs.io"),i=g1e(e?.arweave,"https://arweave.net"),o=t.match(tut),{protocol:s,subpath:c,target:l,subtarget:u=""}=o?.groups||{},d=s==="ipns:/"||c==="ipns/",p=s==="ipfs:/"||c==="ipfs/"||rut.test(t);if(t.startsWith("http")&&!d&&!p){let y=t;return e?.arweave&&(y=t.replace(/https:\/\/arweave.net/g,e?.arweave)),{uri:y,isOnChain:!1,isEncoded:!1}}if((d||p)&&l)return{uri:`${n}/${d?"ipns":"ipfs"}/${l}${u}`,isOnChain:!1,isEncoded:!1};if(s==="ar:/"&&l)return{uri:`${i}/${l}${u||""}`,isOnChain:!1,isEncoded:!1};let v=t.replace(iut,"");if(v.startsWith("i.json());return await qR({gatewayUrls:t,uri:QW(r)})}catch{throw new Z6({uri:e})}}async function qR({gatewayUrls:t,uri:e}){let{uri:r,isOnChain:n}=GW({uri:e,gatewayUrls:t});if(n||await out(r))return r;throw new Z6({uri:e})}function v1e(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=e.split("/"),[o,s]=r.split(":"),[c,l]=n.split(":");if(!o||o.toLowerCase()!=="eip155")throw new kg({reason:"Only EIP-155 supported"});if(!s)throw new kg({reason:"Chain ID not found"});if(!l)throw new kg({reason:"Contract address not found"});if(!i)throw new kg({reason:"Token ID not found"});if(!c)throw new kg({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s),namespace:c.toLowerCase(),contractAddress:l,tokenID:i}}async function y1e(t,{nft:e}){if(e.namespace==="erc721")return il(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return il(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new $R({namespace:e.namespace})}var tut,rut,nut,iut,b1e=F(()=>{z3();m1e();tut=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,rut=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,nut=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,iut=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/});async function x1e(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?sut(t,{gatewayUrls:e,record:r}):qR({uri:r,gatewayUrls:e})}async function sut(t,{gatewayUrls:e,record:r}){let n=v1e(r),i=await y1e(t,{nft:n}),{uri:o,isOnChain:s,isEncoded:c}=GW({uri:i,gatewayUrls:e});if(s&&(o.includes("data:application/json;base64,")||o.startsWith("{"))){let u=c?atob(o.replace("data:application/json;base64,","")):o,d=JSON.parse(u);return qR({uri:QW(d),gatewayUrls:e})}let l=n.tokenID;return n.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),w1e({gatewayUrls:e,uri:o.replace(/(?:0x)?{id}/,l)})}var C1e=F(()=>{b1e()});async function E1e(t,{blockNumber:e,blockTag:r,name:n,key:i,gatewayUrls:o,strict:s,universalResolverAddress:c}){let l=c;if(!l){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");l=Lh({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{let u={address:l,abi:aR,functionName:"resolve",args:[Bt(Q6(n)),Fs({abi:SW,functionName:"text",args:[G6(n),i]})],blockNumber:e,blockTag:r},d=tn(t,il,"readContract"),p=o?await d({...u,args:[...u.args,o]}):await d(u);if(p[0]==="0x")return null;let v=Zu({abi:SW,functionName:"text",data:p[0]});return v===""?null:v}catch(u){if(s)throw u;if(K6(u,"resolve"))return null;throw u}}var A1e=F(()=>{j6();q3();u1();V6();Kr();PR();zW();BR();Ba();z3()});async function ZW(t,{blockNumber:e,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:o,strict:s,universalResolverAddress:c}){let l=await tn(t,E1e,"getEnsText")({blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:c,gatewayUrls:o,strict:s});if(!l)return null;try{return await x1e(t,{record:l,gatewayUrls:n})}catch{return null}}var S1e=F(()=>{C1e();Ba();A1e()});async function YW(t,{address:e,blockNumber:r,blockTag:n,gatewayUrls:i,strict:o,universalResolverAddress:s}){let c=s;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=Lh({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}let l=`${e.toLowerCase().substring(2)}.addr.reverse`;try{let u={address:c,abi:Yde,functionName:"reverse",args:[Bt(Q6(l))],blockNumber:r,blockTag:n},d=tn(t,il,"readContract"),[p,v]=i?await d({...u,args:[...u.args,i]}):await d(u);return e.toLowerCase()!==v.toLowerCase()?null:p}catch(u){if(o)throw u;if(K6(u,"reverse"))return null;throw u}}var _1e=F(()=>{j6();V6();Kr();PR();BR();Ba();z3()});function I1e(t){let e=(i,o)=>({clear:()=>o.delete(i),get:()=>o.get(i),set:s=>o.set(i,s)}),r=e(t,aut),n=e(t,cut);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function T1e(t,{cacheKey:e,cacheTime:r=Number.POSITIVE_INFINITY}){let n=I1e(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime(){aut=new Map,cut=new Map});async function R1e(t,{cacheTime:e=t.cacheTime}={}){let r=await T1e(()=>t.request({method:"eth_blockNumber"}),{cacheKey:lut(t.uid),cacheTime:e});return BigInt(r)}var lut,M1e=F(()=>{k1e();lut=t=>`blockNumber.${t}`});function HR(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}var JW=F(()=>{});async function HC(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:o}){let s=n||"latest",c=r!==void 0?rr(r):void 0,l=null;if(i?l=await t.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):e?l=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,rr(o)]},{dedupe:!0}):(c||s)&&(l=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[c||s,rr(o)]},{dedupe:!!c})),!l)throw new I6({blockHash:e,blockNumber:r,blockTag:s,hash:i,index:o});return(t.chain?.formatters?.transaction?.format||o1)(l)}var XW=F(()=>{d0();Kr();j3()});function eV(t){let e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(r=>HR(r)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Bs(t.transactionIndex):null,status:t.status?uut[t.status]:null,type:t.type?fW[t.type]||t.type:null};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),e}var uut,zR,WR=F(()=>{Pa();TC();JW();j3();uut={"0x0":"reverted","0x1":"success"};zR=Ag("transactionReceipt",eV)});async function tV(t,{hash:e}){let r=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!r)throw new T6({hash:e});return(t.chain?.formatters?.transactionReceipt?.format||eV)(r)}var N1e=F(()=>{d0();WR()});async function rV(t,e){let{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:o,multicallAddress:s,stateOverride:c}=e,l=e.contracts,u=n??(typeof t.batch?.multicall=="object"&&t.batch.multicall.batchSize||1024),d=s;if(!d){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");d=Lh({blockNumber:i,chain:t.chain,contract:"multicall3"})}let p=[[]],v=0,y=0;for(let P=0;P0&&y>u&&p[v].length>0&&(v++,y=(j.length-2)/2,p[v]=[]),p[v]=[...p[v],{allowFailure:!0,callData:j,target:M}]}catch(j){let V=d1(j,{abi:k,address:M,args:L,docsPath:"/docs/contract/multicall",functionName:D});if(!r)throw V;p[v]=[...p[v],{allowFailure:!0,callData:"0x",target:M}]}}let _=await Promise.allSettled(p.map(P=>tn(t,il,"readContract")({abi:BC,address:d,args:[P],blockNumber:i,blockTag:o,functionName:"aggregate3",stateOverride:c}))),R=[];for(let P=0;P<_.length;P++){let k=_[P];if(k.status==="rejected"){if(!r)throw k.reason;for(let L=0;L{j6();Wl();wn();H3();q3();u1();V6();$C();Ba();z3()});function zC(t,e,r){let n=++fut,i=()=>nV.get(t)||[],o=()=>{let d=i();nV.set(t,d.filter(p=>p.id!==n))},s=()=>{let d=O1e.get(t);i().length===1&&d&&d(),o()},c=i();if(nV.set(t,[...c,{id:n,fns:e}]),c&&c.length>0)return s;let l={};for(let d in e)l[d]=(...p)=>{let v=i();if(v.length!==0)for(let y of v)y.fns[d]?.(...p)};let u=r(l);return typeof u=="function"&&O1e.set(t,u),s}var nV,O1e,fut,iV=F(()=>{nV=new Map,O1e=new Map,fut=0});async function WC(t){return new Promise(e=>setTimeout(e,t))}var oV=F(()=>{});function B1e(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0,o=()=>i=!1;return(async()=>{let c;e&&(c=await t({unpoll:o}));let l=await r?.(c)??n;await WC(l);let u=async()=>{i&&(await t({unpoll:o}),await WC(n),u())};u()})(),o}var L1e=F(()=>{oV()});function F1e(t,{emitOnBegin:e=!1,emitMissed:r=!1,onBlockNumber:n,onError:i,poll:o,pollingInterval:s=t.pollingInterval}){let c=typeof o<"u"?o:!(t.transport.type==="webSocket"||t.transport.type==="fallback"&&t.transport.transports[0].config.type==="webSocket"),l;return c?(()=>{let p=lo(["watchBlockNumber",t.uid,e,r,s]);return zC(p,{onBlockNumber:n,onError:i},v=>B1e(async()=>{try{let y=await tn(t,R1e,"getBlockNumber")({cacheTime:0});if(l){if(y===l)return;if(y-l>1&&r)for(let _=l+1n;_l)&&(v.onBlockNumber(y,l),l=y)}catch(y){v.onError?.(y)}},{emitOnBegin:e,interval:s}))})():(()=>{let p=lo(["watchBlockNumber",t.uid,e,r]);return zC(p,{onBlockNumber:n,onError:i},v=>{let y=!0,_=()=>y=!1;return(async()=>{try{let R=(()=>{if(t.transport.type==="fallback"){let k=t.transport.transports.find(M=>M.config.type==="webSocket");return k?k.value:t.transport}return t.transport})(),{unsubscribe:P}=await R.subscribe({params:["newHeads"],onData(k){if(!y)return;let M=Kn(k.result?.number);v.onBlockNumber(M,l),l=M},onError(k){v.onError?.(k)}});_=P,y||_()}catch(R){i?.(R)}})(),()=>_()})})()}var U1e=F(()=>{Pa();Ba();iV();L1e();Nh();M1e()});async function D1e(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(r=>Th(r))}var j1e=F(()=>{mg()});async function $1e(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}var q1e=F(()=>{});function H1e(t,{enabled:e=!0,id:r}){if(!e||!r)return t();if(VR.get(r))return VR.get(r);let n=t().finally(()=>VR.delete(r));return VR.set(r,n),n}var VR,z1e=F(()=>{ek();VR=new ug(8192)});function Rg(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,o)=>{let s=async({count:c=0}={})=>{let l=async({error:u})=>{let d=typeof e=="function"?e({count:c,error:u}):e;d&&await WC(d),s({count:c+1})};try{let u=await t();i(u)}catch(u){if(c{oV()});function W1e(t,e={}){return async(r,n={})=>{let{dedupe:i=!1,retryDelay:o=150,retryCount:s=3,uid:c}={...e,...n},l=i?qi(c0(`${c}.${lo(r)}`)):void 0;return H1e(()=>Rg(async()=>{try{return await t(r)}catch(u){let d=u;switch(d.code){case _3.code:throw new _3(d);case I3.code:throw new I3(d);case T3.code:throw new T3(d,{method:r.method});case k3.code:throw new k3(d);case Ph.code:throw new Ph(d);case R3.code:throw new R3(d);case M3.code:throw new M3(d);case p0.code:throw new p0(d);case N3.code:throw new N3(d);case P3.code:throw new P3(d,{method:r.method});case Eg.code:throw new Eg(d);case O3.code:throw new O3(d);case bi.code:throw new bi(d);case B3.code:throw new B3(d);case L3.code:throw new L3(d);case F3.code:throw new F3(d);case U3.code:throw new U3(d);case la.code:throw new la(d);case 5e3:throw new bi(d);default:throw u instanceof Pe?u:new IC(d)}}},{delay:({count:u,error:d})=>{if(d&&d instanceof Gu){let p=d?.headers?.get("Retry-After");if(p?.match(/\d/))return Number.parseInt(p)*1e3}return~~(1<hut(u)}),{enabled:i,id:l})}}function hut(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===Eg.code||t.code===Ph.code:t instanceof Gu&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}var V1e=F(()=>{wn();R6();Uk();Kr();Ih();z1e();KR();Nh()});function ar(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}var si=F(()=>{});var K1e,G1e,Q1e=F(()=>{K1e=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,G1e=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/});function W3(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((i,o)=>{(async()=>{let s;try{let c=new AbortController;r>0&&(s=setTimeout(()=>{n?c.abort():o(e)},r)),i(await t({signal:c?.signal||null}))}catch(c){c?.name==="AbortError"&&o(e),o(c)}finally{clearTimeout(s)}})()})}var sV=F(()=>{});function dut(){return{current:0,take(){return this.current++},reset(){this.current=0}}}var aV,Z1e=F(()=>{aV=dut()});function Y1e(t,e={}){return{async request(r){let{body:n,onRequest:i=e.onRequest,onResponse:o=e.onResponse,timeout:s=e.timeout??1e4}=r,c={...e.fetchOptions??{},...r.fetchOptions??{}},{headers:l,method:u,signal:d}=c;try{let p=await W3(async({signal:y})=>{let _={...c,body:Array.isArray(n)?lo(n.map(k=>({jsonrpc:"2.0",id:k.id??aV.take(),...k}))):lo({jsonrpc:"2.0",id:n.id??aV.take(),...n}),headers:{"Content-Type":"application/json",...l},method:u||"POST",signal:d||(s>0?y:null)},R=new Request(t,_);return i&&await i(R),await fetch(t,_)},{errorInstance:new _C({body:n,url:t}),timeout:s,signal:!0});o&&await o(p);let v;if(p.headers.get("Content-Type")?.startsWith("application/json")?v=await p.json():(v=await p.text(),v=JSON.parse(v||"{}")),!p.ok)throw new Gu({body:n,details:lo(v.error)||p.statusText,headers:p.headers,status:p.status,url:t});return v}catch(p){throw p instanceof Gu||p instanceof _C?p:new Gu({body:n,cause:p,url:t})}}}}var J1e=F(()=>{R6();sV();Nh();Z1e()});function cV(t){let{domain:e={},message:r,primaryType:n}=t,i={EIP712Domain:QR({domain:e}),...t.types};GR({domain:e,message:r,primaryType:n,types:i});let o=["0x1901"];return e&&o.push(X1e({domain:e,types:i})),n!=="EIP712Domain"&&o.push(eme({data:r,primaryType:n,types:i})),qi(gc(o))}function X1e({domain:t,types:e}){return eme({data:t,primaryType:"EIP712Domain",types:e})}function eme({data:t,primaryType:e,types:r}){let n=tme({data:t,primaryType:e,types:r});return qi(n)}function tme({data:t,primaryType:e,types:r}){let n=[{type:"bytes32"}],i=[put({primaryType:e,types:r})];for(let o of r[e]){let[s,c]=nme({types:r,name:o.name,type:o.type,value:t[o.name]});n.push(s),i.push(c)}return e1(n,i)}function put({primaryType:t,types:e}){let r=Bt(mut({primaryType:t,types:e}));return qi(r)}function mut({primaryType:t,types:e}){let r="",n=rme({primaryType:t,types:e});n.delete(t);let i=[t,...Array.from(n).sort()];for(let o of i)r+=`${o}(${e[o].map(({name:s,type:c})=>`${c} ${s}`).join(",")})`;return r}function rme({primaryType:t,types:e},r=new Set){let i=t.match(/^\w*/u)?.[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(let o of e[i])rme({primaryType:o.type,types:e},r);return r}function nme({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},qi(tme({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},qi(n)];if(r==="string")return[{type:"bytes32"},qi(Bt(n))];if(r.lastIndexOf("]")===r.length-1){let i=r.slice(0,r.lastIndexOf("[")),o=n.map(s=>nme({name:e,type:i,types:t,value:s}));return[{type:"bytes32"},qi(e1(o.map(([s])=>s),o.map(([,s])=>s)))]}return[{type:r},n]}var ime=F(()=>{h6();Vl();Kr();Ih();lV()});function ome(t){let{domain:e,message:r,primaryType:n,types:i}=t,o=(l,u)=>{let d={...u};for(let p of l){let{name:v,type:y}=p;y==="address"&&(d[v]=d[v].toLowerCase())}return d},s=i.EIP712Domain?e?o(i.EIP712Domain,e):{}:{},c=(()=>{if(n!=="EIP712Domain")return o(i[n],r)})();return lo({domain:s,message:c,primaryType:n,types:i})}function GR(t){let{domain:e,message:r,primaryType:n,types:i}=t,o=(s,c)=>{for(let l of s){let{name:u,type:d}=l,p=c[u],v=d.match(G1e);if(v&&(typeof p=="number"||typeof p=="bigint")){let[R,P,k]=v;rr(p,{signed:P==="int",size:Number.parseInt(k)/8})}if(d==="address"&&typeof p=="string"&&!Hn(p))throw new oi({address:p});let y=d.match(K1e);if(y){let[R,P]=y;if(P&&di(p)!==Number.parseInt(P))throw new ZT({expectedSize:Number.parseInt(P),givenSize:di(p)})}let _=i[d];_&&o(_,p)}};i.EIP712Domain&&e&&o(i.EIP712Domain,e),n!=="EIP712Domain"&&o(i[n],r)}function QR({domain:t}){return[typeof t?.name=="string"&&{name:"name",type:"string"},t?.version&&{name:"version",type:"string"},typeof t?.chainId=="number"&&{name:"chainId",type:"uint256"},t?.verifyingContract&&{name:"verifyingContract",type:"address"},t?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}var lV=F(()=>{Wl();zu();Kl();Ah();Kr();Q1e();Nh()});var sme,ame=F(()=>{sme=`Ethereum Signed Message: `});function cme(t){let e=typeof t=="string"?c0(t):typeof t.raw=="string"?t.raw:ii(t.raw),r=c0(`${sme}${di(e)}`);return gc([r,e])}var lme=F(()=>{ame();Vl();Ah();Kr()});function uV(t,e){return qi(cme(t),e)}var ume=F(()=>{Ih();lme()});function fme(t){let{authorizationList:e}=t;if(e)for(let r of e){let{contractAddress:n,chainId:i}=r;if(!Hn(n))throw new oi({address:n});if(i<=0)throw new h0({chainId:i})}ZR(t)}function hme(t){let{blobVersionedHashes:e}=t;if(e){if(e.length===0)throw new D6;for(let r of e){let n=di(r),i=Bs(Xp(r,0,1));if(n!==32)throw new tR({hash:r,size:n});if(i!==1)throw new rR({hash:r,version:i})}}ZR(t)}function ZR(t){let{chainId:e,maxPriorityFeePerGas:r,maxFeePerGas:n,to:i}=t;if(e<=0)throw new h0({chainId:e});if(i&&!Hn(i))throw new oi({address:i});if(n&&n>2n**256n-1n)throw new nl({maxFeePerGas:n});if(r&&n&&r>n)throw new Ku({maxFeePerGas:n,maxPriorityFeePerGas:r})}function dme(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=t;if(e<=0)throw new h0({chainId:e});if(o&&!Hn(o))throw new oi({address:o});if(r||i)throw new Pe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new nl({maxFeePerGas:n})}function pme(t){let{chainId:e,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:i,to:o}=t;if(o&&!Hn(o))throw new oi({address:o});if(typeof e<"u"&&e<=0)throw new h0({chainId:e});if(r||i)throw new Pe("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new nl({maxFeePerGas:n})}var mme=F(()=>{zu();wn();xW();E3();Cg();Kl();Ah();f6();Pa()});function gme(t){if(!t||t.length===0)return[];let e=[];for(let r of t){let{contractAddress:n,chainId:i,nonce:o,...s}=r;e.push([Bt(i),n,Bt(o),...Mg({},s)])}return e}var wme=F(()=>{Kr();VC()});function V3(t){if(!t||t.length===0)return[];let e=[];for(let r=0;r{zu();d0();Kl()});function YR(t,e){let r=iR(t);return r==="eip1559"?vut(t,e):r==="eip2930"?yut(t,e):r==="eip4844"?wut(t,e):r==="eip7702"?gut(t,e):but(t,e)}function gut(t,e){let{authorizationList:r,chainId:n,gas:i,nonce:o,to:s,value:c,maxFeePerGas:l,maxPriorityFeePerGas:u,accessList:d,data:p}=t;fme(t);let v=V3(d),y=gme(r);return Ls(["0x04",wc([Bt(n),o?Bt(o):"0x",u?Bt(u):"0x",l?Bt(l):"0x",i?Bt(i):"0x",s??"0x",c?Bt(c):"0x",p??"0x",v,y,...Mg(t,e)])])}function wut(t,e){let{chainId:r,gas:n,nonce:i,to:o,value:s,maxFeePerBlobGas:c,maxFeePerGas:l,maxPriorityFeePerGas:u,accessList:d,data:p}=t;hme(t);let v=t.blobVersionedHashes,y=t.sidecars;if(t.blobs&&(typeof v>"u"||typeof y>"u")){let L=typeof t.blobs[0]=="string"?t.blobs:t.blobs.map(V=>ii(V)),D=t.kzg,j=F6({blobs:L,kzg:D});if(typeof v>"u"&&(v=Xk({commitments:j})),typeof y>"u"){let V=U6({blobs:L,commitments:j,kzg:D});y=nR({blobs:L,commitments:j,proofs:V})}}let _=V3(d),R=[Bt(r),i?Bt(i):"0x",u?Bt(u):"0x",l?Bt(l):"0x",n?Bt(n):"0x",o??"0x",s?Bt(s):"0x",p??"0x",_,c?Bt(c):"0x",v??[],...Mg(t,e)],P=[],k=[],M=[];if(y)for(let L=0;L{if(e.v>=35n)return(e.v-35n)/2n>0?e.v:27n+(e.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+e.v-27n);let y=27n+(e.v===27n?0n:1n);if(e.v!==y)throw new Pk({v:e.v});return y})(),p=os(e.r),v=os(e.s);u=[...u,Bt(d),p==="0x00"?"0x":p,v==="0x00"?"0x":v]}else r>0&&(u=[...u,Bt(r),"0x","0x"]);return wc(u)}function Mg(t,e){let r=e??t,{v:n,yParity:i}=r;if(typeof r.r>"u")return[];if(typeof r.s>"u")return[];if(typeof n>"u"&&typeof i>"u")return[];let o=os(r.r),s=os(r.s);return[typeof i=="number"?i?Bt(1):"0x":n===0n?"0x":n===1n?Bt(1):n===27n?"0x":Bt(1),o==="0x00"?"0x":o,s==="0x00"?"0x":s]}var VC=F(()=>{d0();Zk();Yk();bW();CW();Vl();cg();Kr();g6();wme();mme();EW();fV()});function hV(t,e){let[r,n="0"]=t.split("."),i=r.startsWith("-");if(i&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(r=`${BigInt(r)+1n}`),n="";else if(n.length>e){let[o,s,c]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],l=Math.round(+`${s}.${c}`);l>9?n=`${BigInt(o)+BigInt(1)}0`.padStart(o.length+1,"0"):n=`${o}${l}`,n.length>e&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${i?"-":""}${r}${n}`)}var vme=F(()=>{});var yme=F(()=>{rl();mg()});async function dV(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:i=t.pollingInterval,retryCount:o=6,retryDelay:s=({count:l})=>~~(1<{c&&setTimeout(()=>R(new SC({hash:r})),c);let P=zC(l,{onReplaced:n,resolve:_,reject:R},k=>{let M=tn(t,F1e,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(L){let D=V=>{M(),V(),P()},j=L;if(!y){u>o&&D(()=>k.reject(new SC({hash:r})));try{if(v){if(e>1&&(!v.blockNumber||j-v.blockNumber+1nk.resolve(v));return}if(d||(y=!0,await Rg(async()=>{d=await tn(t,HC,"getTransaction")({hash:r}),d.blockNumber&&(j=d.blockNumber)},{delay:s,retryCount:o}),y=!1),v=await tn(t,tV,"getTransactionReceipt")({hash:r}),e>1&&(!v.blockNumber||j-v.blockNumber+1nk.resolve(v))}catch(V){if(V instanceof I6||V instanceof T6){if(!d){y=!1;return}try{p=d,y=!0;let K=await Rg(()=>tn(t,s1,"getBlock")({blockNumber:j,includeTransactions:!0}),{delay:s,retryCount:o,shouldRetry:({error:z})=>z instanceof O6});y=!1;let B=K.transactions.find(({from:z,nonce:q})=>z===p.from&&q===p.nonce);if(!B||(v=await tn(t,tV,"getTransactionReceipt")({hash:B.hash}),e>1&&(!v.blockNumber||j-v.blockNumber+1n{k.onReplaced?.({reason:W,replacedTransaction:p,transaction:B,transactionReceipt:v}),k.resolve(v)})}catch(K){D(()=>k.reject(K))}}else D(()=>k.reject(V))}finally{u++}}}})})})}var bme=F(()=>{uW();d0();Ba();iV();KR();Nh();MC();XW();N1e();U1e()});async function xme(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(r=>Xi(r))}var Cme=F(()=>{mg()});async function Eme(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}var Ame=F(()=>{});async function Sme(t,e){let{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new Wu({docsPath:"/docs/actions/wallet/signTransaction"});let o=ki(r);Oh({account:o,...e});let s=await tn(t,Sg,"getChainId")({});n!==null&&Tk({currentChainId:s,chain:n});let l=(n?.formatters||t.chain?.formatters)?.transactionRequest?.format||i1;return o.signTransaction?o.signTransaction({...i,chainId:s},{serializer:t.chain?.serializers?.transaction}):await t.request({method:"eth_signTransaction",params:[{...l(i),chainId:rr(s),from:o.address}]},{retryCount:0})}var _me=F(()=>{rl();p6();sW();Kr();D3();Ba();P6();kC()});async function KC(t,{account:e=t.account,message:r}){if(!e)throw new Wu({docsPath:"/docs/actions/wallet/signMessage"});let n=ki(e);if(n.signMessage)return n.signMessage({message:r});let i=typeof r=="string"?c0(r):r.raw instanceof Uint8Array?Bt(r.raw):r.raw;return t.request({method:"personal_sign",params:[i,n.address]},{retryCount:0})}var pV=F(()=>{rl();p6();Kr()});async function Ime(t,e){let{account:r=t.account,domain:n,message:i,primaryType:o}=e;if(!r)throw new Wu({docsPath:"/docs/actions/wallet/signTypedData"});let s=ki(r),c={EIP712Domain:QR({domain:n}),...e.types};if(GR({domain:n,message:i,primaryType:o,types:c}),s.signTypedData)return s.signTypedData({domain:n,message:i,primaryType:o,types:c});let l=ome({domain:n,message:i,primaryType:o,types:c});return t.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}var Tme=F(()=>{rl();p6();lV()});async function mV(t,e){let{abi:r,address:n,args:i,dataSuffix:o,functionName:s,...c}=e,l=c.account?ki(c.account):t.account,u=Fs({abi:r,args:i,functionName:s});try{let{data:d}=await tn(t,p1,"call")({batch:!1,data:`${u}${o?o.replace("0x",""):""}`,to:n,...c,account:l}),p=Zu({abi:r,args:i,functionName:s,data:d||"0x"}),v=r.filter(y=>"name"in y&&y.name===e.functionName);return{result:p,request:{abi:v,address:n,args:i,dataSuffix:o,functionName:s,...c,account:l}}}catch(d){throw d1(d,{abi:r,address:n,args:i,docsPath:"/docs/contract/simulateContract",functionName:s,sender:l?.address})}}var kme=F(()=>{rl();q3();u1();$C();Ba();qC()});async function Rme(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:rr(e)}]},{retryCount:0})}var Mme=F(()=>{Kr()});async function Nme(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}var Pme=F(()=>{});async function GC(t,e){let{abi:r,account:n=t.account,address:i,args:o,dataSuffix:s,functionName:c,...l}=e;if(!n)throw new Wu({docsPath:"/docs/contract/writeContract"});let u=ki(n),d=Fs({abi:r,args:o,functionName:c});try{return await tn(t,c1,"sendTransaction")({data:`${d}${s?s.replace("0x",""):""}`,to:i,account:u,...l})}catch(p){throw d1(p,{abi:r,address:i,args:o,docsPath:"/docs/contract/writeContract",functionName:c,sender:u.address})}}var gV=F(()=>{rl();p6();u1();$C();Ba();OC()});function rM(t=11){if(!tM||eM+t>256*2){tM="",eM=0;for(let e=0;e<256;e++)tM+=(256+Math.random()*256|0).toString(16).substring(1)}return tM.substring(eM,eM+++t)}var eM,tM,wV=F(()=>{eM=256});function e4(t){let{batch:e,cacheTime:r=t.pollingInterval??4e3,ccipRead:n,key:i="base",name:o="Base Client",pollingInterval:s=4e3,type:c="base"}=t,l=t.chain,u=t.account?ki(t.account):void 0,{config:d,request:p,value:v}=t.transport({chain:l,pollingInterval:s}),y={...d,...v},_={account:u,batch:e,cacheTime:r,ccipRead:n,chain:l,key:i,name:o,pollingInterval:s,request:p,transport:y,type:c,uid:rM()};function R(P){return k=>{let M=k(P);for(let D in _)delete M[D];let L={...P,...M};return Object.assign(L,{extend:R(L)})}}return Object.assign(_,{extend:R(_)})}var Fme=F(()=>{rl();wV()});function nM({key:t,name:e,request:r,retryCount:n=3,retryDelay:i=150,timeout:o,type:s},c){let l=rM();return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:i,timeout:o,type:s},request:W1e(r,{retryCount:n,retryDelay:i,uid:l}),value:c}}var vV=F(()=>{V1e();wV()});function t4(t,e={}){let{key:r="custom",name:n="Custom Provider",retryDelay:i}=e;return({retryCount:o})=>nM({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??o,retryDelay:i,type:"custom"})}var Ume=F(()=>{vV()});var iM,Dme=F(()=>{wn();iM=class extends Pe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}});function K3(t,e={}){let{batch:r,fetchOptions:n,key:i="http",name:o="HTTP JSON-RPC",onFetchRequest:s,onFetchResponse:c,retryDelay:l}=e;return({chain:u,retryCount:d,timeout:p})=>{let{batchSize:v=1e3,wait:y=0}=typeof r=="object"?r:{},_=e.retryCount??d,R=p??e.timeout??1e4,P=t||u?.rpcUrls.default.http[0];if(!P)throw new iM;let k=Y1e(P,{fetchOptions:n,onRequest:s,onResponse:c,timeout:R});return nM({key:i,name:o,async request({method:M,params:L}){let D={method:M,params:L},{schedule:j}=LR({id:P,wait:y,shouldSplitBatch(W){return W.length>v},fn:W=>k.request({body:W}),sort:(W,z)=>W.id-z.id}),V=async W=>r?j(W):[await k.request({body:W})],[{error:K,result:B}]=await V(D);if(K)throw new k6({body:D,error:K,url:P});return B},retryCount:_,retryDelay:l,timeout:R,type:"http"},{fetchOptions:n,url:P})}}var jme=F(()=>{R6();Dme();VW();J1e();vV()});function oM(t){return{addChain:e=>fC(t,e),deployContract:e=>Gde(t,e),getAddresses:()=>D1e(t),getChainId:()=>Sg(t),getPermissions:()=>$1e(t),prepareTransactionRequest:e=>a1(t,e),requestAddresses:()=>xme(t),requestPermissions:e=>Eme(t,e),sendRawTransaction:e=>sR(t,e),sendTransaction:e=>c1(t,e),signMessage:e=>KC(t,e),signTransaction:e=>Sme(t,e),signTypedData:e=>Ime(t,e),switchChain:e=>Rme(t,e),watchAsset:e=>Nme(t,e),writeContract:e=>GC(t,e)}}var $me=F(()=>{kC();Rz();Qde();j1e();q1e();PC();Cme();Ame();AW();OC();pV();_me();Tme();Mme();Pme();gV()});var Ghr,Qhr,Zhr,Yhr,Jhr,Xhr,edr,tdr,rdr,ndr,idr,odr,sdr,adr,cdr,ldr,udr,fdr,hdr,ddr,pdr,mdr,gdr,wdr,vdr,ydr,bdr,xdr,Cdr,Edr,Adr,Sdr,_dr,Idr,Tdr,kdr,Rdr,Mdr,Ndr,Pdr,Odr,Bdr,Ldr,Fdr,Udr,Ddr,jdr,$dr,qdr,Hdr,zdr,Wdr,Vdr,Kdr,Gdr,Qdr,Zdr,Ydr,Jdr,Xdr,epr,tpr,rpr,npr,ipr,qme,opr,spr,apr,cpr,lpr,upr,fpr,hpr,dpr,ppr,mpr,gpr,wpr,vpr,ypr,bpr,xpr,Cpr,Epr,Apr,Spr,_pr,Ipr,Tpr,kpr,Rpr,Mpr,Npr,Ppr,Opr,Hme=F(()=>{Ghr=2n**(8n-1n)-1n,Qhr=2n**(16n-1n)-1n,Zhr=2n**(24n-1n)-1n,Yhr=2n**(32n-1n)-1n,Jhr=2n**(40n-1n)-1n,Xhr=2n**(48n-1n)-1n,edr=2n**(56n-1n)-1n,tdr=2n**(64n-1n)-1n,rdr=2n**(72n-1n)-1n,ndr=2n**(80n-1n)-1n,idr=2n**(88n-1n)-1n,odr=2n**(96n-1n)-1n,sdr=2n**(104n-1n)-1n,adr=2n**(112n-1n)-1n,cdr=2n**(120n-1n)-1n,ldr=2n**(128n-1n)-1n,udr=2n**(136n-1n)-1n,fdr=2n**(144n-1n)-1n,hdr=2n**(152n-1n)-1n,ddr=2n**(160n-1n)-1n,pdr=2n**(168n-1n)-1n,mdr=2n**(176n-1n)-1n,gdr=2n**(184n-1n)-1n,wdr=2n**(192n-1n)-1n,vdr=2n**(200n-1n)-1n,ydr=2n**(208n-1n)-1n,bdr=2n**(216n-1n)-1n,xdr=2n**(224n-1n)-1n,Cdr=2n**(232n-1n)-1n,Edr=2n**(240n-1n)-1n,Adr=2n**(248n-1n)-1n,Sdr=2n**(256n-1n)-1n,_dr=-(2n**(8n-1n)),Idr=-(2n**(16n-1n)),Tdr=-(2n**(24n-1n)),kdr=-(2n**(32n-1n)),Rdr=-(2n**(40n-1n)),Mdr=-(2n**(48n-1n)),Ndr=-(2n**(56n-1n)),Pdr=-(2n**(64n-1n)),Odr=-(2n**(72n-1n)),Bdr=-(2n**(80n-1n)),Ldr=-(2n**(88n-1n)),Fdr=-(2n**(96n-1n)),Udr=-(2n**(104n-1n)),Ddr=-(2n**(112n-1n)),jdr=-(2n**(120n-1n)),$dr=-(2n**(128n-1n)),qdr=-(2n**(136n-1n)),Hdr=-(2n**(144n-1n)),zdr=-(2n**(152n-1n)),Wdr=-(2n**(160n-1n)),Vdr=-(2n**(168n-1n)),Kdr=-(2n**(176n-1n)),Gdr=-(2n**(184n-1n)),Qdr=-(2n**(192n-1n)),Zdr=-(2n**(200n-1n)),Ydr=-(2n**(208n-1n)),Jdr=-(2n**(216n-1n)),Xdr=-(2n**(224n-1n)),epr=-(2n**(232n-1n)),tpr=-(2n**(240n-1n)),rpr=-(2n**(248n-1n)),npr=-(2n**(256n-1n)),ipr=2n**8n-1n,qme=2n**16n-1n,opr=2n**24n-1n,spr=2n**32n-1n,apr=2n**40n-1n,cpr=2n**48n-1n,lpr=2n**56n-1n,upr=2n**64n-1n,fpr=2n**72n-1n,hpr=2n**80n-1n,dpr=2n**88n-1n,ppr=2n**96n-1n,mpr=2n**104n-1n,gpr=2n**112n-1n,wpr=2n**120n-1n,vpr=2n**128n-1n,ypr=2n**136n-1n,bpr=2n**144n-1n,xpr=2n**152n-1n,Cpr=2n**160n-1n,Epr=2n**168n-1n,Apr=2n**176n-1n,Spr=2n**184n-1n,_pr=2n**192n-1n,Ipr=2n**200n-1n,Tpr=2n**208n-1n,kpr=2n**216n-1n,Rpr=2n**224n-1n,Mpr=2n**232n-1n,Npr=2n**240n-1n,Ppr=2n**248n-1n,Opr=2n**256n-1n});var vc=F(()=>{Fme();Ume();jme();$me();kk();H3();Uk();u1();ime();Kr();KR();sV();Rk();Pa();mg();ume();vme();cg()});var hM=X(()=>{});var Nn=X((dM,Gme)=>{(function(t,e){typeof dM=="object"?Gme.exports=dM=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(dM,function(){var t=t||function(e,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof l6=="function")try{n=hM()}catch{}var i=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function k(){}return function(M){var L;return k.prototype=M,L=new k,k.prototype=null,L}}(),s={},c=s.lib={},l=c.Base=function(){return{extend:function(k){var M=o(this);return k&&M.mixIn(k),(!M.hasOwnProperty("init")||this.init===M.init)&&(M.init=function(){M.$super.init.apply(this,arguments)}),M.init.prototype=M,M.$super=this,M},create:function(){var k=this.extend();return k.init.apply(k,arguments),k},init:function(){},mixIn:function(k){for(var M in k)k.hasOwnProperty(M)&&(this[M]=k[M]);k.hasOwnProperty("toString")&&(this.toString=k.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=c.WordArray=l.extend({init:function(k,M){k=this.words=k||[],M!=r?this.sigBytes=M:this.sigBytes=k.length*4},toString:function(k){return(k||p).stringify(this)},concat:function(k){var M=this.words,L=k.words,D=this.sigBytes,j=k.sigBytes;if(this.clamp(),D%4)for(var V=0;V>>2]>>>24-V%4*8&255;M[D+V>>>2]|=K<<24-(D+V)%4*8}else for(var B=0;B>>2]=L[B>>>2];return this.sigBytes+=j,this},clamp:function(){var k=this.words,M=this.sigBytes;k[M>>>2]&=4294967295<<32-M%4*8,k.length=e.ceil(M/4)},clone:function(){var k=l.clone.call(this);return k.words=this.words.slice(0),k},random:function(k){for(var M=[],L=0;L>>2]>>>24-j%4*8&255;D.push((V>>>4).toString(16)),D.push((V&15).toString(16))}return D.join("")},parse:function(k){for(var M=k.length,L=[],D=0;D>>3]|=parseInt(k.substr(D,2),16)<<24-D%8*4;return new u.init(L,M/2)}},v=d.Latin1={stringify:function(k){for(var M=k.words,L=k.sigBytes,D=[],j=0;j>>2]>>>24-j%4*8&255;D.push(String.fromCharCode(V))}return D.join("")},parse:function(k){for(var M=k.length,L=[],D=0;D>>2]|=(k.charCodeAt(D)&255)<<24-D%4*8;return new u.init(L,M)}},y=d.Utf8={stringify:function(k){try{return decodeURIComponent(escape(v.stringify(k)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(k){return v.parse(unescape(encodeURIComponent(k)))}},_=c.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(k){typeof k=="string"&&(k=y.parse(k)),this._data.concat(k),this._nDataBytes+=k.sigBytes},_process:function(k){var M,L=this._data,D=L.words,j=L.sigBytes,V=this.blockSize,K=V*4,B=j/K;k?B=e.ceil(B):B=e.max((B|0)-this._minBufferSize,0);var W=B*V,z=e.min(W*4,j);if(W){for(var q=0;q{(function(t,e){typeof pM=="object"?Qme.exports=pM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(pM,function(t){return function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,s=r.x64={},c=s.Word=i.extend({init:function(u,d){this.high=u,this.low=d}}),l=s.WordArray=i.extend({init:function(u,d){u=this.words=u||[],d!=e?this.sigBytes=d:this.sigBytes=u.length*8},toX32:function(){for(var u=this.words,d=u.length,p=[],v=0;v{(function(t,e){typeof mM=="object"?Zme.exports=mM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(mM,function(t){return function(){if(typeof ArrayBuffer=="function"){var e=t,r=e.lib,n=r.WordArray,i=n.init,o=n.init=function(s){if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),(s instanceof Int8Array||typeof Uint8ClampedArray<"u"&&s instanceof Uint8ClampedArray||s instanceof Int16Array||s instanceof Uint16Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Float32Array||s instanceof Float64Array)&&(s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),s instanceof Uint8Array){for(var c=s.byteLength,l=[],u=0;u>>2]|=s[u]<<24-u%4*8;i.call(this,l,c)}else i.apply(this,arguments)};o.prototype=n}}(),t.lib.WordArray})});var Xme=X((gM,Jme)=>{(function(t,e){typeof gM=="object"?Jme.exports=gM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(gM,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Utf16=i.Utf16BE={stringify:function(c){for(var l=c.words,u=c.sigBytes,d=[],p=0;p>>2]>>>16-p%4*8&65535;d.push(String.fromCharCode(v))}return d.join("")},parse:function(c){for(var l=c.length,u=[],d=0;d>>1]|=c.charCodeAt(d)<<16-d%2*16;return n.create(u,l*2)}};i.Utf16LE={stringify:function(c){for(var l=c.words,u=c.sigBytes,d=[],p=0;p>>2]>>>16-p%4*8&65535);d.push(String.fromCharCode(v))}return d.join("")},parse:function(c){for(var l=c.length,u=[],d=0;d>>1]|=s(c.charCodeAt(d)<<16-d%2*16);return n.create(u,l*2)}};function s(c){return c<<8&4278255360|c>>>8&16711935}}(),t.enc.Utf16})});var Bg=X((wM,ege)=>{(function(t,e){typeof wM=="object"?ege.exports=wM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(wM,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Base64={stringify:function(c){var l=c.words,u=c.sigBytes,d=this._map;c.clamp();for(var p=[],v=0;v>>2]>>>24-v%4*8&255,_=l[v+1>>>2]>>>24-(v+1)%4*8&255,R=l[v+2>>>2]>>>24-(v+2)%4*8&255,P=y<<16|_<<8|R,k=0;k<4&&v+k*.75>>6*(3-k)&63));var M=d.charAt(64);if(M)for(;p.length%4;)p.push(M);return p.join("")},parse:function(c){var l=c.length,u=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var p=0;p>>6-v%4*2,R=y|_;d[p>>>2]|=R<<24-p%4*8,p++}return n.create(d,p)}}(),t.enc.Base64})});var rge=X((vM,tge)=>{(function(t,e){typeof vM=="object"?tge.exports=vM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(vM,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Base64url={stringify:function(c,l){l===void 0&&(l=!0);var u=c.words,d=c.sigBytes,p=l?this._safe_map:this._map;c.clamp();for(var v=[],y=0;y>>2]>>>24-y%4*8&255,R=u[y+1>>>2]>>>24-(y+1)%4*8&255,P=u[y+2>>>2]>>>24-(y+2)%4*8&255,k=_<<16|R<<8|P,M=0;M<4&&y+M*.75>>6*(3-M)&63));var L=p.charAt(64);if(L)for(;v.length%4;)v.push(L);return v.join("")},parse:function(c,l){l===void 0&&(l=!0);var u=c.length,d=l?this._safe_map:this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var v=0;v>>6-v%4*2,R=y|_;d[p>>>2]|=R<<24-p%4*8,p++}return n.create(d,p)}}(),t.enc.Base64url})});var Lg=X((yM,nge)=>{(function(t,e){typeof yM=="object"?nge.exports=yM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(yM,function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.algo,c=[];(function(){for(var y=0;y<64;y++)c[y]=e.abs(e.sin(y+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(y,_){for(var R=0;R<16;R++){var P=_+R,k=y[P];y[P]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var M=this._hash.words,L=y[_+0],D=y[_+1],j=y[_+2],V=y[_+3],K=y[_+4],B=y[_+5],W=y[_+6],z=y[_+7],q=y[_+8],Q=y[_+9],f=y[_+10],h=y[_+11],g=y[_+12],x=y[_+13],S=y[_+14],T=y[_+15],N=M[0],I=M[1],m=M[2],C=M[3];N=u(N,I,m,C,L,7,c[0]),C=u(C,N,I,m,D,12,c[1]),m=u(m,C,N,I,j,17,c[2]),I=u(I,m,C,N,V,22,c[3]),N=u(N,I,m,C,K,7,c[4]),C=u(C,N,I,m,B,12,c[5]),m=u(m,C,N,I,W,17,c[6]),I=u(I,m,C,N,z,22,c[7]),N=u(N,I,m,C,q,7,c[8]),C=u(C,N,I,m,Q,12,c[9]),m=u(m,C,N,I,f,17,c[10]),I=u(I,m,C,N,h,22,c[11]),N=u(N,I,m,C,g,7,c[12]),C=u(C,N,I,m,x,12,c[13]),m=u(m,C,N,I,S,17,c[14]),I=u(I,m,C,N,T,22,c[15]),N=d(N,I,m,C,D,5,c[16]),C=d(C,N,I,m,W,9,c[17]),m=d(m,C,N,I,h,14,c[18]),I=d(I,m,C,N,L,20,c[19]),N=d(N,I,m,C,B,5,c[20]),C=d(C,N,I,m,f,9,c[21]),m=d(m,C,N,I,T,14,c[22]),I=d(I,m,C,N,K,20,c[23]),N=d(N,I,m,C,Q,5,c[24]),C=d(C,N,I,m,S,9,c[25]),m=d(m,C,N,I,V,14,c[26]),I=d(I,m,C,N,q,20,c[27]),N=d(N,I,m,C,x,5,c[28]),C=d(C,N,I,m,j,9,c[29]),m=d(m,C,N,I,z,14,c[30]),I=d(I,m,C,N,g,20,c[31]),N=p(N,I,m,C,B,4,c[32]),C=p(C,N,I,m,q,11,c[33]),m=p(m,C,N,I,h,16,c[34]),I=p(I,m,C,N,S,23,c[35]),N=p(N,I,m,C,D,4,c[36]),C=p(C,N,I,m,K,11,c[37]),m=p(m,C,N,I,z,16,c[38]),I=p(I,m,C,N,f,23,c[39]),N=p(N,I,m,C,x,4,c[40]),C=p(C,N,I,m,L,11,c[41]),m=p(m,C,N,I,V,16,c[42]),I=p(I,m,C,N,W,23,c[43]),N=p(N,I,m,C,Q,4,c[44]),C=p(C,N,I,m,g,11,c[45]),m=p(m,C,N,I,T,16,c[46]),I=p(I,m,C,N,j,23,c[47]),N=v(N,I,m,C,L,6,c[48]),C=v(C,N,I,m,z,10,c[49]),m=v(m,C,N,I,S,15,c[50]),I=v(I,m,C,N,B,21,c[51]),N=v(N,I,m,C,g,6,c[52]),C=v(C,N,I,m,V,10,c[53]),m=v(m,C,N,I,f,15,c[54]),I=v(I,m,C,N,D,21,c[55]),N=v(N,I,m,C,q,6,c[56]),C=v(C,N,I,m,T,10,c[57]),m=v(m,C,N,I,W,15,c[58]),I=v(I,m,C,N,x,21,c[59]),N=v(N,I,m,C,K,6,c[60]),C=v(C,N,I,m,h,10,c[61]),m=v(m,C,N,I,j,15,c[62]),I=v(I,m,C,N,Q,21,c[63]),M[0]=M[0]+N|0,M[1]=M[1]+I|0,M[2]=M[2]+m|0,M[3]=M[3]+C|0},_doFinalize:function(){var y=this._data,_=y.words,R=this._nDataBytes*8,P=y.sigBytes*8;_[P>>>5]|=128<<24-P%32;var k=e.floor(R/4294967296),M=R;_[(P+64>>>9<<4)+15]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,_[(P+64>>>9<<4)+14]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,y.sigBytes=(_.length+1)*4,this._process();for(var L=this._hash,D=L.words,j=0;j<4;j++){var V=D[j];D[j]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}return L},clone:function(){var y=o.clone.call(this);return y._hash=this._hash.clone(),y}});function u(y,_,R,P,k,M,L){var D=y+(_&R|~_&P)+k+L;return(D<>>32-M)+_}function d(y,_,R,P,k,M,L){var D=y+(_&P|R&~P)+k+L;return(D<>>32-M)+_}function p(y,_,R,P,k,M,L){var D=y+(_^R^P)+k+L;return(D<>>32-M)+_}function v(y,_,R,P,k,M,L){var D=y+(R^(_|~P))+k+L;return(D<>>32-M)+_}r.MD5=o._createHelper(l),r.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5})});var BV=X((bM,ige)=>{(function(t,e){typeof bM=="object"?ige.exports=bM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(bM,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,s=[],c=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,u){for(var d=this._hash.words,p=d[0],v=d[1],y=d[2],_=d[3],R=d[4],P=0;P<80;P++){if(P<16)s[P]=l[u+P]|0;else{var k=s[P-3]^s[P-8]^s[P-14]^s[P-16];s[P]=k<<1|k>>>31}var M=(p<<5|p>>>27)+R+s[P];P<20?M+=(v&y|~v&_)+1518500249:P<40?M+=(v^y^_)+1859775393:P<60?M+=(v&y|v&_|y&_)-1894007588:M+=(v^y^_)-899497514,R=_,_=y,y=v<<30|v>>>2,v=p,p=M}d[0]=d[0]+p|0,d[1]=d[1]+v|0,d[2]=d[2]+y|0,d[3]=d[3]+_|0,d[4]=d[4]+R|0},_doFinalize:function(){var l=this._data,u=l.words,d=this._nDataBytes*8,p=l.sigBytes*8;return u[p>>>5]|=128<<24-p%32,u[(p+64>>>9<<4)+14]=Math.floor(d/4294967296),u[(p+64>>>9<<4)+15]=d,l.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var l=i.clone.call(this);return l._hash=this._hash.clone(),l}});e.SHA1=i._createHelper(c),e.HmacSHA1=i._createHmacHelper(c)}(),t.SHA1})});var CM=X((xM,oge)=>{(function(t,e){typeof xM=="object"?oge.exports=xM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(xM,function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.algo,c=[],l=[];(function(){function p(R){for(var P=e.sqrt(R),k=2;k<=P;k++)if(!(R%k))return!1;return!0}function v(R){return(R-(R|0))*4294967296|0}for(var y=2,_=0;_<64;)p(y)&&(_<8&&(c[_]=v(e.pow(y,1/2))),l[_]=v(e.pow(y,1/3)),_++),y++})();var u=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(c.slice(0))},_doProcessBlock:function(p,v){for(var y=this._hash.words,_=y[0],R=y[1],P=y[2],k=y[3],M=y[4],L=y[5],D=y[6],j=y[7],V=0;V<64;V++){if(V<16)u[V]=p[v+V]|0;else{var K=u[V-15],B=(K<<25|K>>>7)^(K<<14|K>>>18)^K>>>3,W=u[V-2],z=(W<<15|W>>>17)^(W<<13|W>>>19)^W>>>10;u[V]=B+u[V-7]+z+u[V-16]}var q=M&L^~M&D,Q=_&R^_&P^R&P,f=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),h=(M<<26|M>>>6)^(M<<21|M>>>11)^(M<<7|M>>>25),g=j+h+q+l[V]+u[V],x=f+Q;j=D,D=L,L=M,M=k+g|0,k=P,P=R,R=_,_=g+x|0}y[0]=y[0]+_|0,y[1]=y[1]+R|0,y[2]=y[2]+P|0,y[3]=y[3]+k|0,y[4]=y[4]+M|0,y[5]=y[5]+L|0,y[6]=y[6]+D|0,y[7]=y[7]+j|0},_doFinalize:function(){var p=this._data,v=p.words,y=this._nDataBytes*8,_=p.sigBytes*8;return v[_>>>5]|=128<<24-_%32,v[(_+64>>>9<<4)+14]=e.floor(y/4294967296),v[(_+64>>>9<<4)+15]=y,p.sigBytes=v.length*4,this._process(),this._hash},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});r.SHA256=o._createHelper(d),r.HmacSHA256=o._createHmacHelper(d)}(Math),t.SHA256})});var age=X((EM,sge)=>{(function(t,e,r){typeof EM=="object"?sge.exports=EM=e(Nn(),CM()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(t.CryptoJS)})(EM,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=e.algo,o=i.SHA256,s=i.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=o._doFinalize.call(this);return c.sigBytes-=4,c}});e.SHA224=o._createHelper(s),e.HmacSHA224=o._createHmacHelper(s)}(),t.SHA224})});var LV=X((AM,cge)=>{(function(t,e,r){typeof AM=="object"?cge.exports=AM=e(Nn(),eE()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(AM,function(t){return function(){var e=t,r=e.lib,n=r.Hasher,i=e.x64,o=i.Word,s=i.WordArray,c=e.algo;function l(){return o.create.apply(o,arguments)}var u=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],d=[];(function(){for(var v=0;v<80;v++)d[v]=l()})();var p=c.SHA512=n.extend({_doReset:function(){this._hash=new s.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(v,y){for(var _=this._hash.words,R=_[0],P=_[1],k=_[2],M=_[3],L=_[4],D=_[5],j=_[6],V=_[7],K=R.high,B=R.low,W=P.high,z=P.low,q=k.high,Q=k.low,f=M.high,h=M.low,g=L.high,x=L.low,S=D.high,T=D.low,N=j.high,I=j.low,m=V.high,C=V.low,Y=K,ne=B,b=W,H=z,G=q,U=Q,se=f,te=h,le=g,me=x,Ee=S,fe=T,Se=N,gt=I,Qe=m,hr=C,mt=0;mt<80;mt++){var qe,Vt,wt=d[mt];if(mt<16)Vt=wt.high=v[y+mt*2]|0,qe=wt.low=v[y+mt*2+1]|0;else{var nt=d[mt-15],tr=nt.high,de=nt.low,ge=(tr>>>1|de<<31)^(tr>>>8|de<<24)^tr>>>7,be=(de>>>1|tr<<31)^(de>>>8|tr<<24)^(de>>>7|tr<<25),ye=d[mt-2],_e=ye.high,ft=ye.low,Ve=(_e>>>19|ft<<13)^(_e<<3|ft>>>29)^_e>>>6,Fe=(ft>>>19|_e<<13)^(ft<<3|_e>>>29)^(ft>>>6|_e<<26),Dt=d[mt-7],Xe=Dt.high,ze=Dt.low,pr=d[mt-16],bt=pr.high,tt=pr.low;qe=be+ze,Vt=ge+Xe+(qe>>>0>>0?1:0),qe=qe+Fe,Vt=Vt+Ve+(qe>>>0>>0?1:0),qe=qe+tt,Vt=Vt+bt+(qe>>>0>>0?1:0),wt.high=Vt,wt.low=qe}var Ar=le&Ee^~le&Se,Et=me&fe^~me>,st=Y&b^Y&G^b&G,yr=ne&H^ne&U^H&U,_t=(Y>>>28|ne<<4)^(Y<<30|ne>>>2)^(Y<<25|ne>>>7),at=(ne>>>28|Y<<4)^(ne<<30|Y>>>2)^(ne<<25|Y>>>7),Sr=(le>>>14|me<<18)^(le>>>18|me<<14)^(le<<23|me>>>9),It=(me>>>14|le<<18)^(me>>>18|le<<14)^(me<<23|le>>>9),it=u[mt],_r=it.high,At=it.low,Ke=hr+It,lr=Qe+Sr+(Ke>>>0
>>0?1:0),Ke=Ke+Et,lr=lr+Ar+(Ke>>>0>>0?1:0),Ke=Ke+At,lr=lr+_r+(Ke>>>0>>0?1:0),Ke=Ke+qe,lr=lr+Vt+(Ke>>>0>>0?1:0),St=at+yr,ot=_t+st+(St>>>0>>0?1:0);Qe=Se,hr=gt,Se=Ee,gt=fe,Ee=le,fe=me,me=te+Ke|0,le=se+lr+(me>>>0>>0?1:0)|0,se=G,te=U,G=b,U=H,b=Y,H=ne,ne=Ke+St|0,Y=lr+ot+(ne>>>0>>0?1:0)|0}B=R.low=B+ne,R.high=K+Y+(B>>>0>>0?1:0),z=P.low=z+H,P.high=W+b+(z>>>0>>0?1:0),Q=k.low=Q+U,k.high=q+G+(Q>>>0>>0?1:0),h=M.low=h+te,M.high=f+se+(h>>>0>>0?1:0),x=L.low=x+me,L.high=g+le+(x>>>0>>0?1:0),T=D.low=T+fe,D.high=S+Ee+(T>>>0>>0?1:0),I=j.low=I+gt,j.high=N+Se+(I>>>0>>0?1:0),C=V.low=C+hr,V.high=m+Qe+(C>>>0
>>0?1:0)},_doFinalize:function(){var v=this._data,y=v.words,_=this._nDataBytes*8,R=v.sigBytes*8;y[R>>>5]|=128<<24-R%32,y[(R+128>>>10<<5)+30]=Math.floor(_/4294967296),y[(R+128>>>10<<5)+31]=_,v.sigBytes=y.length*4,this._process();var P=this._hash.toX32();return P},clone:function(){var v=n.clone.call(this);return v._hash=this._hash.clone(),v},blockSize:1024/32});e.SHA512=n._createHelper(p),e.HmacSHA512=n._createHmacHelper(p)}(),t.SHA512})});var uge=X((SM,lge)=>{(function(t,e,r){typeof SM=="object"?lge.exports=SM=e(Nn(),eE(),LV()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(t.CryptoJS)})(SM,function(t){return function(){var e=t,r=e.x64,n=r.Word,i=r.WordArray,o=e.algo,s=o.SHA512,c=o.SHA384=s.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var l=s._doFinalize.call(this);return l.sigBytes-=16,l}});e.SHA384=s._createHelper(c),e.HmacSHA384=s._createHmacHelper(c)}(),t.SHA384})});var hge=X((_M,fge)=>{(function(t,e,r){typeof _M=="object"?fge.exports=_M=e(Nn(),eE()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(_M,function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.x64,c=s.Word,l=r.algo,u=[],d=[],p=[];(function(){for(var _=1,R=0,P=0;P<24;P++){u[_+5*R]=(P+1)*(P+2)/2%64;var k=R%5,M=(2*_+3*R)%5;_=k,R=M}for(var _=0;_<5;_++)for(var R=0;R<5;R++)d[_+5*R]=R+(2*_+3*R)%5*5;for(var L=1,D=0;D<24;D++){for(var j=0,V=0,K=0;K<7;K++){if(L&1){var B=(1<>>24)&16711935|(L<<24|L>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360;var j=P[M];j.high^=D,j.low^=L}for(var V=0;V<24;V++){for(var K=0;K<5;K++){for(var B=0,W=0,z=0;z<5;z++){var j=P[K+5*z];B^=j.high,W^=j.low}var q=v[K];q.high=B,q.low=W}for(var K=0;K<5;K++)for(var Q=v[(K+4)%5],f=v[(K+1)%5],h=f.high,g=f.low,B=Q.high^(h<<1|g>>>31),W=Q.low^(g<<1|h>>>31),z=0;z<5;z++){var j=P[K+5*z];j.high^=B,j.low^=W}for(var x=1;x<25;x++){var B,W,j=P[x],S=j.high,T=j.low,N=u[x];N<32?(B=S<>>32-N,W=T<>>32-N):(B=T<>>64-N,W=S<>>64-N);var I=v[d[x]];I.high=B,I.low=W}var m=v[0],C=P[0];m.high=C.high,m.low=C.low;for(var K=0;K<5;K++)for(var z=0;z<5;z++){var x=K+5*z,j=P[x],Y=v[x],ne=v[(K+1)%5+5*z],b=v[(K+2)%5+5*z];j.high=Y.high^~ne.high&b.high,j.low=Y.low^~ne.low&b.low}var j=P[0],H=p[V];j.high^=H.high,j.low^=H.low}},_doFinalize:function(){var _=this._data,R=_.words,P=this._nDataBytes*8,k=_.sigBytes*8,M=this.blockSize*32;R[k>>>5]|=1<<24-k%32,R[(e.ceil((k+1)/M)*M>>>5)-1]|=128,_.sigBytes=R.length*4,this._process();for(var L=this._state,D=this.cfg.outputLength/8,j=D/8,V=[],K=0;K>>24)&16711935|(W<<24|W>>>8)&4278255360,z=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360,V.push(z),V.push(W)}return new i.init(V,D)},clone:function(){for(var _=o.clone.call(this),R=_._state=this._state.slice(0),P=0;P<25;P++)R[P]=R[P].clone();return _}});r.SHA3=o._createHelper(y),r.HmacSHA3=o._createHmacHelper(y)}(Math),t.SHA3})});var pge=X((IM,dge)=>{(function(t,e){typeof IM=="object"?dge.exports=IM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(IM,function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.algo,c=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),p=i.create([0,1518500249,1859775393,2400959708,2840853838]),v=i.create([1352829926,1548603684,1836072691,2053994217,0]),y=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(D,j){for(var V=0;V<16;V++){var K=j+V,B=D[K];D[K]=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360}var W=this._hash.words,z=p.words,q=v.words,Q=c.words,f=l.words,h=u.words,g=d.words,x,S,T,N,I,m,C,Y,ne,b;m=x=W[0],C=S=W[1],Y=T=W[2],ne=N=W[3],b=I=W[4];for(var H,V=0;V<80;V+=1)H=x+D[j+Q[V]]|0,V<16?H+=_(S,T,N)+z[0]:V<32?H+=R(S,T,N)+z[1]:V<48?H+=P(S,T,N)+z[2]:V<64?H+=k(S,T,N)+z[3]:H+=M(S,T,N)+z[4],H=H|0,H=L(H,h[V]),H=H+I|0,x=I,I=N,N=L(T,10),T=S,S=H,H=m+D[j+f[V]]|0,V<16?H+=M(C,Y,ne)+q[0]:V<32?H+=k(C,Y,ne)+q[1]:V<48?H+=P(C,Y,ne)+q[2]:V<64?H+=R(C,Y,ne)+q[3]:H+=_(C,Y,ne)+q[4],H=H|0,H=L(H,g[V]),H=H+b|0,m=b,b=ne,ne=L(Y,10),Y=C,C=H;H=W[1]+T+ne|0,W[1]=W[2]+N+b|0,W[2]=W[3]+I+m|0,W[3]=W[4]+x+C|0,W[4]=W[0]+S+Y|0,W[0]=H},_doFinalize:function(){var D=this._data,j=D.words,V=this._nDataBytes*8,K=D.sigBytes*8;j[K>>>5]|=128<<24-K%32,j[(K+64>>>9<<4)+14]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360,D.sigBytes=(j.length+1)*4,this._process();for(var B=this._hash,W=B.words,z=0;z<5;z++){var q=W[z];W[z]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}return B},clone:function(){var D=o.clone.call(this);return D._hash=this._hash.clone(),D}});function _(D,j,V){return D^j^V}function R(D,j,V){return D&j|~D&V}function P(D,j,V){return(D|~j)^V}function k(D,j,V){return D&V|j&~V}function M(D,j,V){return D^(j|~V)}function L(D,j){return D<>>32-j}r.RIPEMD160=o._createHelper(y),r.HmacRIPEMD160=o._createHmacHelper(y)}(Math),t.RIPEMD160})});var kM=X((TM,mge)=>{(function(t,e){typeof TM=="object"?mge.exports=TM=e(Nn()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(TM,function(t){(function(){var e=t,r=e.lib,n=r.Base,i=e.enc,o=i.Utf8,s=e.algo,c=s.HMAC=n.extend({init:function(l,u){l=this._hasher=new l.init,typeof u=="string"&&(u=o.parse(u));var d=l.blockSize,p=d*4;u.sigBytes>p&&(u=l.finalize(u)),u.clamp();for(var v=this._oKey=u.clone(),y=this._iKey=u.clone(),_=v.words,R=y.words,P=0;P{(function(t,e,r){typeof RM=="object"?gge.exports=RM=e(Nn(),CM(),kM()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(t.CryptoJS)})(RM,function(t){return function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,s=o.SHA256,c=o.HMAC,l=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:s,iterations:25e4}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,d){for(var p=this.cfg,v=c.create(p.hasher,u),y=i.create(),_=i.create([1]),R=y.words,P=_.words,k=p.keySize,M=p.iterations;R.length{(function(t,e,r){typeof MM=="object"?vge.exports=MM=e(Nn(),BV(),kM()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(t.CryptoJS)})(MM,function(t){return function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,s=o.MD5,c=o.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:s,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,u){for(var d,p=this.cfg,v=p.hasher.create(),y=i.create(),_=y.words,R=p.keySize,P=p.iterations;_.length{(function(t,e,r){typeof NM=="object"?yge.exports=NM=e(Nn(),m1()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(t.CryptoJS)})(NM,function(t){t.lib.Cipher||function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,c=r.enc,l=c.Utf8,u=c.Base64,d=r.algo,p=d.EvpKDF,v=n.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(q,Q){return this.create(this._ENC_XFORM_MODE,q,Q)},createDecryptor:function(q,Q){return this.create(this._DEC_XFORM_MODE,q,Q)},init:function(q,Q,f){this.cfg=this.cfg.extend(f),this._xformMode=q,this._key=Q,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(q){return this._append(q),this._process()},finalize:function(q){q&&this._append(q);var Q=this._doFinalize();return Q},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function q(Q){return typeof Q=="string"?z:K}return function(Q){return{encrypt:function(f,h,g){return q(h).encrypt(Q,f,h,g)},decrypt:function(f,h,g){return q(h).decrypt(Q,f,h,g)}}}}()}),y=n.StreamCipher=v.extend({_doFinalize:function(){var q=this._process(!0);return q},blockSize:1}),_=r.mode={},R=n.BlockCipherMode=i.extend({createEncryptor:function(q,Q){return this.Encryptor.create(q,Q)},createDecryptor:function(q,Q){return this.Decryptor.create(q,Q)},init:function(q,Q){this._cipher=q,this._iv=Q}}),P=_.CBC=function(){var q=R.extend();q.Encryptor=q.extend({processBlock:function(f,h){var g=this._cipher,x=g.blockSize;Q.call(this,f,h,x),g.encryptBlock(f,h),this._prevBlock=f.slice(h,h+x)}}),q.Decryptor=q.extend({processBlock:function(f,h){var g=this._cipher,x=g.blockSize,S=f.slice(h,h+x);g.decryptBlock(f,h),Q.call(this,f,h,x),this._prevBlock=S}});function Q(f,h,g){var x,S=this._iv;S?(x=S,this._iv=e):x=this._prevBlock;for(var T=0;T>>2]&255;q.sigBytes-=Q}},L=n.BlockCipher=v.extend({cfg:v.cfg.extend({mode:P,padding:M}),reset:function(){var q;v.reset.call(this);var Q=this.cfg,f=Q.iv,h=Q.mode;this._xformMode==this._ENC_XFORM_MODE?q=h.createEncryptor:(q=h.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==q?this._mode.init(this,f&&f.words):(this._mode=q.call(h,this,f&&f.words),this._mode.__creator=q)},_doProcessBlock:function(q,Q){this._mode.processBlock(q,Q)},_doFinalize:function(){var q,Q=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(Q.pad(this._data,this.blockSize),q=this._process(!0)):(q=this._process(!0),Q.unpad(q)),q},blockSize:128/32}),D=n.CipherParams=i.extend({init:function(q){this.mixIn(q)},toString:function(q){return(q||this.formatter).stringify(this)}}),j=r.format={},V=j.OpenSSL={stringify:function(q){var Q,f=q.ciphertext,h=q.salt;return h?Q=o.create([1398893684,1701076831]).concat(h).concat(f):Q=f,Q.toString(u)},parse:function(q){var Q,f=u.parse(q),h=f.words;return h[0]==1398893684&&h[1]==1701076831&&(Q=o.create(h.slice(2,4)),h.splice(0,4),f.sigBytes-=16),D.create({ciphertext:f,salt:Q})}},K=n.SerializableCipher=i.extend({cfg:i.extend({format:V}),encrypt:function(q,Q,f,h){h=this.cfg.extend(h);var g=q.createEncryptor(f,h),x=g.finalize(Q),S=g.cfg;return D.create({ciphertext:x,key:f,iv:S.iv,algorithm:q,mode:S.mode,padding:S.padding,blockSize:q.blockSize,formatter:h.format})},decrypt:function(q,Q,f,h){h=this.cfg.extend(h),Q=this._parse(Q,h.format);var g=q.createDecryptor(f,h).finalize(Q.ciphertext);return g},_parse:function(q,Q){return typeof q=="string"?Q.parse(q,this):q}}),B=r.kdf={},W=B.OpenSSL={execute:function(q,Q,f,h,g){if(h||(h=o.random(64/8)),g)var x=p.create({keySize:Q+f,hasher:g}).compute(q,h);else var x=p.create({keySize:Q+f}).compute(q,h);var S=o.create(x.words.slice(Q),f*4);return x.sigBytes=Q*4,D.create({key:x,iv:S,salt:h})}},z=n.PasswordBasedCipher=K.extend({cfg:K.cfg.extend({kdf:W}),encrypt:function(q,Q,f,h){h=this.cfg.extend(h);var g=h.kdf.execute(f,q.keySize,q.ivSize,h.salt,h.hasher);h.iv=g.iv;var x=K.encrypt.call(this,q,Q,g.key,h);return x.mixIn(g),x},decrypt:function(q,Q,f,h){h=this.cfg.extend(h),Q=this._parse(Q,h.format);var g=h.kdf.execute(f,q.keySize,q.ivSize,Q.salt,h.hasher);h.iv=g.iv;var x=K.decrypt.call(this,q,Q,g.key,h);return x}})}()})});var xge=X((PM,bge)=>{(function(t,e,r){typeof PM=="object"?bge.exports=PM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(PM,function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,s=o.blockSize;r.call(this,n,i,s,o),this._prevBlock=n.slice(i,i+s)}}),e.Decryptor=e.extend({processBlock:function(n,i){var o=this._cipher,s=o.blockSize,c=n.slice(i,i+s);r.call(this,n,i,s,o),this._prevBlock=c}});function r(n,i,o,s){var c,l=this._iv;l?(c=l.slice(0),this._iv=void 0):c=this._prevBlock,s.encryptBlock(c,0);for(var u=0;u{(function(t,e,r){typeof OM=="object"?Cge.exports=OM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(OM,function(t){return t.mode.CTR=function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,s=o.blockSize,c=this._iv,l=this._counter;c&&(l=this._counter=c.slice(0),this._iv=void 0);var u=l.slice(0);o.encryptBlock(u,0),l[s-1]=l[s-1]+1|0;for(var d=0;d{(function(t,e,r){typeof BM=="object"?Age.exports=BM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(BM,function(t){return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function r(o){if((o>>24&255)===255){var s=o>>16&255,c=o>>8&255,l=o&255;s===255?(s=0,c===255?(c=0,l===255?l=0:++l):++c):++s,o=0,o+=s<<16,o+=c<<8,o+=l}else o+=1<<24;return o}function n(o){return(o[0]=r(o[0]))===0&&(o[1]=r(o[1])),o}var i=e.Encryptor=e.extend({processBlock:function(o,s){var c=this._cipher,l=c.blockSize,u=this._iv,d=this._counter;u&&(d=this._counter=u.slice(0),this._iv=void 0),n(d);var p=d.slice(0);c.encryptBlock(p,0);for(var v=0;v{(function(t,e,r){typeof LM=="object"?_ge.exports=LM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(LM,function(t){return t.mode.OFB=function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,s=o.blockSize,c=this._iv,l=this._keystream;c&&(l=this._keystream=c.slice(0),this._iv=void 0),o.encryptBlock(l,0);for(var u=0;u{(function(t,e,r){typeof FM=="object"?Tge.exports=FM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(FM,function(t){return t.mode.ECB=function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),e.Decryptor=e.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),e}(),t.mode.ECB})});var Mge=X((UM,Rge)=>{(function(t,e,r){typeof UM=="object"?Rge.exports=UM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(UM,function(t){return t.pad.AnsiX923={pad:function(e,r){var n=e.sigBytes,i=r*4,o=i-n%i,s=n+o-1;e.clamp(),e.words[s>>>2]|=o<<24-s%4*8,e.sigBytes+=o},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},t.pad.Ansix923})});var Pge=X((DM,Nge)=>{(function(t,e,r){typeof DM=="object"?Nge.exports=DM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(DM,function(t){return t.pad.Iso10126={pad:function(e,r){var n=r*4,i=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(i-1)).concat(t.lib.WordArray.create([i<<24],1))},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},t.pad.Iso10126})});var Bge=X((jM,Oge)=>{(function(t,e,r){typeof jM=="object"?Oge.exports=jM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(jM,function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})});var Fge=X(($M,Lge)=>{(function(t,e,r){typeof $M=="object"?Lge.exports=$M=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})($M,function(t){return t.pad.ZeroPadding={pad:function(e,r){var n=r*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var r=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},t.pad.ZeroPadding})});var Dge=X((qM,Uge)=>{(function(t,e,r){typeof qM=="object"?Uge.exports=qM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(qM,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})});var $ge=X((HM,jge)=>{(function(t,e,r){typeof HM=="object"?jge.exports=HM=e(Nn(),_s()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(HM,function(t){return function(e){var r=t,n=r.lib,i=n.CipherParams,o=r.enc,s=o.Hex,c=r.format,l=c.Hex={stringify:function(u){return u.ciphertext.toString(s)},parse:function(u){var d=s.parse(u);return i.create({ciphertext:d})}}}(),t.format.Hex})});var Hge=X((zM,qge)=>{(function(t,e,r){typeof zM=="object"?qge.exports=zM=e(Nn(),Bg(),Lg(),m1(),_s()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(zM,function(t){return function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo,o=[],s=[],c=[],l=[],u=[],d=[],p=[],v=[],y=[],_=[];(function(){for(var k=[],M=0;M<256;M++)M<128?k[M]=M<<1:k[M]=M<<1^283;for(var L=0,D=0,M=0;M<256;M++){var j=D^D<<1^D<<2^D<<3^D<<4;j=j>>>8^j&255^99,o[L]=j,s[j]=L;var V=k[L],K=k[V],B=k[K],W=k[j]*257^j*16843008;c[L]=W<<24|W>>>8,l[L]=W<<16|W>>>16,u[L]=W<<8|W>>>24,d[L]=W;var W=B*16843009^K*65537^V*257^L*16843008;p[j]=W<<24|W>>>8,v[j]=W<<16|W>>>16,y[j]=W<<8|W>>>24,_[j]=W,L?(L=V^k[k[k[B^V]]],D^=k[k[D]]):L=D=1}})();var R=[0,1,2,4,8,16,32,64,128,27,54],P=i.AES=n.extend({_doReset:function(){var k;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var M=this._keyPriorReset=this._key,L=M.words,D=M.sigBytes/4,j=this._nRounds=D+6,V=(j+1)*4,K=this._keySchedule=[],B=0;B6&&B%D==4&&(k=o[k>>>24]<<24|o[k>>>16&255]<<16|o[k>>>8&255]<<8|o[k&255]):(k=k<<8|k>>>24,k=o[k>>>24]<<24|o[k>>>16&255]<<16|o[k>>>8&255]<<8|o[k&255],k^=R[B/D|0]<<24),K[B]=K[B-D]^k);for(var W=this._invKeySchedule=[],z=0;z>>24]]^v[o[k>>>16&255]]^y[o[k>>>8&255]]^_[o[k&255]]}}},encryptBlock:function(k,M){this._doCryptBlock(k,M,this._keySchedule,c,l,u,d,o)},decryptBlock:function(k,M){var L=k[M+1];k[M+1]=k[M+3],k[M+3]=L,this._doCryptBlock(k,M,this._invKeySchedule,p,v,y,_,s);var L=k[M+1];k[M+1]=k[M+3],k[M+3]=L},_doCryptBlock:function(k,M,L,D,j,V,K,B){for(var W=this._nRounds,z=k[M]^L[0],q=k[M+1]^L[1],Q=k[M+2]^L[2],f=k[M+3]^L[3],h=4,g=1;g>>24]^j[q>>>16&255]^V[Q>>>8&255]^K[f&255]^L[h++],S=D[q>>>24]^j[Q>>>16&255]^V[f>>>8&255]^K[z&255]^L[h++],T=D[Q>>>24]^j[f>>>16&255]^V[z>>>8&255]^K[q&255]^L[h++],N=D[f>>>24]^j[z>>>16&255]^V[q>>>8&255]^K[Q&255]^L[h++];z=x,q=S,Q=T,f=N}var x=(B[z>>>24]<<24|B[q>>>16&255]<<16|B[Q>>>8&255]<<8|B[f&255])^L[h++],S=(B[q>>>24]<<24|B[Q>>>16&255]<<16|B[f>>>8&255]<<8|B[z&255])^L[h++],T=(B[Q>>>24]<<24|B[f>>>16&255]<<16|B[z>>>8&255]<<8|B[q&255])^L[h++],N=(B[f>>>24]<<24|B[z>>>16&255]<<16|B[q>>>8&255]<<8|B[Q&255])^L[h++];k[M]=x,k[M+1]=S,k[M+2]=T,k[M+3]=N},keySize:256/32});e.AES=n._createHelper(P)}(),t.AES})});var Wge=X((WM,zge)=>{(function(t,e,r){typeof WM=="object"?zge.exports=WM=e(Nn(),Bg(),Lg(),m1(),_s()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(WM,function(t){return function(){var e=t,r=e.lib,n=r.WordArray,i=r.BlockCipher,o=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],p=o.DES=i.extend({_doReset:function(){for(var R=this._key,P=R.words,k=[],M=0;M<56;M++){var L=s[M]-1;k[M]=P[L>>>5]>>>31-L%32&1}for(var D=this._subKeys=[],j=0;j<16;j++){for(var V=D[j]=[],K=l[j],M=0;M<24;M++)V[M/6|0]|=k[(c[M]-1+K)%28]<<31-M%6,V[4+(M/6|0)]|=k[28+(c[M+24]-1+K)%28]<<31-M%6;V[0]=V[0]<<1|V[0]>>>31;for(var M=1;M<7;M++)V[M]=V[M]>>>(M-1)*4+3;V[7]=V[7]<<5|V[7]>>>27}for(var B=this._invSubKeys=[],M=0;M<16;M++)B[M]=D[15-M]},encryptBlock:function(R,P){this._doCryptBlock(R,P,this._subKeys)},decryptBlock:function(R,P){this._doCryptBlock(R,P,this._invSubKeys)},_doCryptBlock:function(R,P,k){this._lBlock=R[P],this._rBlock=R[P+1],v.call(this,4,252645135),v.call(this,16,65535),y.call(this,2,858993459),y.call(this,8,16711935),v.call(this,1,1431655765);for(var M=0;M<16;M++){for(var L=k[M],D=this._lBlock,j=this._rBlock,V=0,K=0;K<8;K++)V|=u[K][((j^L[K])&d[K])>>>0];this._lBlock=j,this._rBlock=D^V}var B=this._lBlock;this._lBlock=this._rBlock,this._rBlock=B,v.call(this,1,1431655765),y.call(this,8,16711935),y.call(this,2,858993459),v.call(this,16,65535),v.call(this,4,252645135),R[P]=this._lBlock,R[P+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function v(R,P){var k=(this._lBlock>>>R^this._rBlock)&P;this._rBlock^=k,this._lBlock^=k<>>R^this._lBlock)&P;this._lBlock^=k,this._rBlock^=k<192.");var k=P.slice(0,2),M=P.length<4?P.slice(0,2):P.slice(2,4),L=P.length<6?P.slice(0,2):P.slice(4,6);this._des1=p.createEncryptor(n.create(k)),this._des2=p.createEncryptor(n.create(M)),this._des3=p.createEncryptor(n.create(L))},encryptBlock:function(R,P){this._des1.encryptBlock(R,P),this._des2.decryptBlock(R,P),this._des3.encryptBlock(R,P)},decryptBlock:function(R,P){this._des3.decryptBlock(R,P),this._des2.encryptBlock(R,P),this._des1.decryptBlock(R,P)},keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=i._createHelper(_)}(),t.TripleDES})});var Kge=X((VM,Vge)=>{(function(t,e,r){typeof VM=="object"?Vge.exports=VM=e(Nn(),Bg(),Lg(),m1(),_s()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(VM,function(t){return function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=i.RC4=n.extend({_doReset:function(){for(var l=this._key,u=l.words,d=l.sigBytes,p=this._S=[],v=0;v<256;v++)p[v]=v;for(var v=0,y=0;v<256;v++){var _=v%d,R=u[_>>>2]>>>24-_%4*8&255;y=(y+p[v]+R)%256;var P=p[v];p[v]=p[y],p[y]=P}this._i=this._j=0},_doProcessBlock:function(l,u){l[u]^=s.call(this)},keySize:256/32,ivSize:0});function s(){for(var l=this._S,u=this._i,d=this._j,p=0,v=0;v<4;v++){u=(u+1)%256,d=(d+l[u])%256;var y=l[u];l[u]=l[d],l[d]=y,p|=l[(l[u]+l[d])%256]<<24-v*8}return this._i=u,this._j=d,p}e.RC4=n._createHelper(o);var c=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)s.call(this)}});e.RC4Drop=n._createHelper(c)}(),t.RC4})});var Qge=X((KM,Gge)=>{(function(t,e,r){typeof KM=="object"?Gge.exports=KM=e(Nn(),Bg(),Lg(),m1(),_s()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(KM,function(t){return function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=[],s=[],c=[],l=i.Rabbit=n.extend({_doReset:function(){for(var d=this._key.words,p=this.cfg.iv,v=0;v<4;v++)d[v]=(d[v]<<8|d[v]>>>24)&16711935|(d[v]<<24|d[v]>>>8)&4278255360;var y=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],_=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var v=0;v<4;v++)u.call(this);for(var v=0;v<8;v++)_[v]^=y[v+4&7];if(p){var R=p.words,P=R[0],k=R[1],M=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,L=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,D=M>>>16|L&4294901760,j=L<<16|M&65535;_[0]^=M,_[1]^=D,_[2]^=L,_[3]^=j,_[4]^=M,_[5]^=D,_[6]^=L,_[7]^=j;for(var v=0;v<4;v++)u.call(this)}},_doProcessBlock:function(d,p){var v=this._X;u.call(this),o[0]=v[0]^v[5]>>>16^v[3]<<16,o[1]=v[2]^v[7]>>>16^v[5]<<16,o[2]=v[4]^v[1]>>>16^v[7]<<16,o[3]=v[6]^v[3]>>>16^v[1]<<16;for(var y=0;y<4;y++)o[y]=(o[y]<<8|o[y]>>>24)&16711935|(o[y]<<24|o[y]>>>8)&4278255360,d[p+y]^=o[y]},blockSize:128/32,ivSize:64/32});function u(){for(var d=this._X,p=this._C,v=0;v<8;v++)s[v]=p[v];p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0>>0?1:0)|0,this._b=p[7]>>>0>>0?1:0;for(var v=0;v<8;v++){var y=d[v]+p[v],_=y&65535,R=y>>>16,P=((_*_>>>17)+_*R>>>15)+R*R,k=((y&4294901760)*y|0)+((y&65535)*y|0);c[v]=P^k}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.Rabbit=n._createHelper(l)}(),t.Rabbit})});var Yge=X((GM,Zge)=>{(function(t,e,r){typeof GM=="object"?Zge.exports=GM=e(Nn(),Bg(),Lg(),m1(),_s()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(GM,function(t){return function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=[],s=[],c=[],l=i.RabbitLegacy=n.extend({_doReset:function(){var d=this._key.words,p=this.cfg.iv,v=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],y=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var _=0;_<4;_++)u.call(this);for(var _=0;_<8;_++)y[_]^=v[_+4&7];if(p){var R=p.words,P=R[0],k=R[1],M=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,L=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,D=M>>>16|L&4294901760,j=L<<16|M&65535;y[0]^=M,y[1]^=D,y[2]^=L,y[3]^=j,y[4]^=M,y[5]^=D,y[6]^=L,y[7]^=j;for(var _=0;_<4;_++)u.call(this)}},_doProcessBlock:function(d,p){var v=this._X;u.call(this),o[0]=v[0]^v[5]>>>16^v[3]<<16,o[1]=v[2]^v[7]>>>16^v[5]<<16,o[2]=v[4]^v[1]>>>16^v[7]<<16,o[3]=v[6]^v[3]>>>16^v[1]<<16;for(var y=0;y<4;y++)o[y]=(o[y]<<8|o[y]>>>24)&16711935|(o[y]<<24|o[y]>>>8)&4278255360,d[p+y]^=o[y]},blockSize:128/32,ivSize:64/32});function u(){for(var d=this._X,p=this._C,v=0;v<8;v++)s[v]=p[v];p[0]=p[0]+1295307597+this._b|0,p[1]=p[1]+3545052371+(p[0]>>>0>>0?1:0)|0,p[2]=p[2]+886263092+(p[1]>>>0>>0?1:0)|0,p[3]=p[3]+1295307597+(p[2]>>>0>>0?1:0)|0,p[4]=p[4]+3545052371+(p[3]>>>0>>0?1:0)|0,p[5]=p[5]+886263092+(p[4]>>>0>>0?1:0)|0,p[6]=p[6]+1295307597+(p[5]>>>0>>0?1:0)|0,p[7]=p[7]+3545052371+(p[6]>>>0>>0?1:0)|0,this._b=p[7]>>>0>>0?1:0;for(var v=0;v<8;v++){var y=d[v]+p[v],_=y&65535,R=y>>>16,P=((_*_>>>17)+_*R>>>15)+R*R,k=((y&4294901760)*y|0)+((y&65535)*y|0);c[v]=P^k}d[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,d[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,d[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,d[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,d[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,d[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,d[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,d[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.RabbitLegacy=n._createHelper(l)}(),t.RabbitLegacy})});var Xge=X((QM,Jge)=>{(function(t,e,r){typeof QM=="object"?Jge.exports=QM=e(Nn(),Bg(),Lg(),m1(),_s()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(QM,function(t){return function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo;let o=16,s=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],c=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function u(_,R){let P=R>>24&255,k=R>>16&255,M=R>>8&255,L=R&255,D=_.sbox[0][P]+_.sbox[1][k];return D=D^_.sbox[2][M],D=D+_.sbox[3][L],D}function d(_,R,P){let k=R,M=P,L;for(let D=0;D1;--D)k=k^_.pbox[D],M=u(_,k)^M,L=k,k=M,M=L;return L=k,k=M,M=L,M=M^_.pbox[1],k=k^_.pbox[0],{left:k,right:M}}function v(_,R,P){for(let j=0;j<4;j++){_.sbox[j]=[];for(let V=0;V<256;V++)_.sbox[j][V]=c[j][V]}let k=0;for(let j=0;j=P&&(k=0);let M=0,L=0,D=0;for(let j=0;j{(function(t,e,r){typeof ZM=="object"?e2e.exports=ZM=e(Nn(),eE(),Yme(),Xme(),Bg(),rge(),Lg(),BV(),CM(),age(),LV(),uge(),hge(),pge(),kM(),wge(),m1(),_s(),xge(),Ege(),Sge(),Ige(),kge(),Mge(),Pge(),Bge(),Fge(),Dge(),$ge(),Hge(),Wge(),Kge(),Qge(),Yge(),Xge()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):t.CryptoJS=e(t.CryptoJS)})(ZM,function(t){return t})});var h2e=X(Sn=>{"use strict";var tE=Symbol.for("react.element"),xut=Symbol.for("react.portal"),Cut=Symbol.for("react.fragment"),Eut=Symbol.for("react.strict_mode"),Aut=Symbol.for("react.profiler"),Sut=Symbol.for("react.provider"),_ut=Symbol.for("react.context"),Iut=Symbol.for("react.forward_ref"),Tut=Symbol.for("react.suspense"),kut=Symbol.for("react.memo"),Rut=Symbol.for("react.lazy"),t2e=Symbol.iterator;function Mut(t){return t===null||typeof t!="object"?null:(t=t2e&&t[t2e]||t["@@iterator"],typeof t=="function"?t:null)}var i2e={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},o2e=Object.assign,s2e={};function n4(t,e,r){this.props=t,this.context=e,this.refs=s2e,this.updater=r||i2e}n4.prototype.isReactComponent={};n4.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};n4.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function a2e(){}a2e.prototype=n4.prototype;function DV(t,e,r){this.props=t,this.context=e,this.refs=s2e,this.updater=r||i2e}var jV=DV.prototype=new a2e;jV.constructor=DV;o2e(jV,n4.prototype);jV.isPureReactComponent=!0;var r2e=Array.isArray,c2e=Object.prototype.hasOwnProperty,$V={current:null},l2e={key:!0,ref:!0,__self:!0,__source:!0};function u2e(t,e,r){var n,i={},o=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)c2e.call(e,n)&&!l2e.hasOwnProperty(n)&&(i[n]=e[n]);var c=arguments.length-2;if(c===1)i.children=r;else if(1{"use strict";d2e.exports=h2e()});var nN=X((ugr,zV)=>{"use strict";var Hut=Object.prototype.hasOwnProperty,bc="~";function nE(){}Object.create&&(nE.prototype=Object.create(null),new nE().__proto__||(bc=!1));function zut(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function b2e(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new zut(r,n||t,i),s=bc?bc+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],o]:t._events[s].push(o):(t._events[s]=o,t._eventsCount++),t}function rN(t,e){--t._eventsCount===0?t._events=new nE:delete t._events[e]}function Da(){this._events=new nE,this._eventsCount=0}Da.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)Hut.call(r,n)&&e.push(bc?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};Da.prototype.listeners=function(e){var r=bc?bc+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i{"use strict";var s4=ua();function Gut(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qut=typeof Object.is=="function"?Object.is:Gut,Zut=s4.useState,Yut=s4.useEffect,Jut=s4.useLayoutEffect,Xut=s4.useDebugValue;function eft(t,e){var r=e(),n=Zut({inst:{value:r,getSnapshot:e}}),i=n[0].inst,o=n[1];return Jut(function(){i.value=r,i.getSnapshot=e,JV(i)&&o({inst:i})},[t,r,e]),Yut(function(){return JV(i)&&o({inst:i}),t(function(){JV(i)&&o({inst:i})})},[t]),Xut(r),r}function JV(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Qut(t,r)}catch{return!0}}function tft(t,e){return e()}var rft=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tft:eft;k2e.useSyncExternalStore=s4.useSyncExternalStore!==void 0?s4.useSyncExternalStore:rft});var XV=X((I2r,M2e)=>{"use strict";M2e.exports=R2e()});var P2e=X(N2e=>{"use strict";var fN=ua(),nft=XV();function ift(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var oft=typeof Object.is=="function"?Object.is:ift,sft=nft.useSyncExternalStore,aft=fN.useRef,cft=fN.useEffect,lft=fN.useMemo,uft=fN.useDebugValue;N2e.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var o=aft(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=lft(function(){function l(y){if(!u){if(u=!0,d=y,y=n(y),i!==void 0&&s.hasValue){var _=s.value;if(i(_,y))return p=_}return p=y}if(_=p,oft(d,y))return _;var R=n(y);return i!==void 0&&i(_,R)?_:(d=y,p=R)}var u=!1,d,p,v=r===void 0?null:r;return[function(){return l(e())},v===null?void 0:function(){return l(v())}]},[e,r,n,i]);var c=sft(t,o[0],o[1]);return cft(function(){s.hasValue=!0,s.value=c},[c]),uft(c),c}});var B2e=X((k2r,O2e)=>{"use strict";O2e.exports=P2e()});var owe=X(vN=>{"use strict";var vft=ua(),yft=Symbol.for("react.element"),bft=Symbol.for("react.fragment"),xft=Object.prototype.hasOwnProperty,Cft=vft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Eft={key:!0,ref:!0,__self:!0,__source:!0};function iwe(t,e,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)xft.call(e,n)&&!Eft.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:yft,type:t,key:o,ref:s,props:i,_owner:Cft.current}}vN.Fragment=bft;vN.jsx=iwe;vN.jsxs=iwe});var aE=X((Jwr,swe)=>{"use strict";swe.exports=owe()});var Swe=X(TN=>{"use strict";TN.byteLength=Dft;TN.toByteArray=$ft;TN.fromByteArray=zft;var Dh=[],Ju=[],Uft=typeof Uint8Array<"u"?Uint8Array:Array,YK="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(G3=0,Ewe=YK.length;G30)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Dft(t){var e=Awe(t),r=e[0],n=e[1];return(r+n)*3/4-n}function jft(t,e,r){return(e+r)*3/4-r}function $ft(t){var e,r=Awe(t),n=r[0],i=r[1],o=new Uft(jft(t,n,i)),s=0,c=i>0?n-4:n,l;for(l=0;l>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=Ju[t.charCodeAt(l)]<<2|Ju[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=Ju[t.charCodeAt(l)]<<10|Ju[t.charCodeAt(l+1)]<<4|Ju[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function qft(t){return Dh[t>>18&63]+Dh[t>>12&63]+Dh[t>>6&63]+Dh[t&63]}function Hft(t,e,r){for(var n,i=[],o=e;oc?c:s+o));return n===1?(e=t[r-1],i.push(Dh[e>>2]+Dh[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Dh[e>>10]+Dh[e>>4&63]+Dh[e<<2&63]+"=")),i.join("")}});var _we=X(JK=>{JK.read=function(t,e,r,n,i){var o,s,c=i*8-n-1,l=(1<>1,d=-7,p=r?i-1:0,v=r?-1:1,y=t[e+p];for(p+=v,o=y&(1<<-d)-1,y>>=-d,d+=c;d>0;o=o*256+t[e+p],p+=v,d-=8);for(s=o&(1<<-d)-1,o>>=-d,d+=n;d>0;s=s*256+t[e+p],p+=v,d-=8);if(o===0)o=1-u;else{if(o===l)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-u}return(y?-1:1)*s*Math.pow(2,o-n)};JK.write=function(t,e,r,n,i,o){var s,c,l,u=o*8-i-1,d=(1<>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:o-1,_=n?1:-1,R=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,s=d):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+p>=1?e+=v/l:e+=v*Math.pow(2,1-p),e*l>=2&&(s++,l/=2),s+p>=d?(c=0,s=d):s+p>=1?(c=(e*l-1)*Math.pow(2,i),s=s+p):(c=e*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;t[r+y]=c&255,y+=_,c/=256,i-=8);for(s=s<0;t[r+y]=s&255,y+=_,s/=256,u-=8);t[r+y-_]|=R*128}});var jg=X(g4=>{"use strict";var XK=Swe(),p4=_we(),Iwe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g4.Buffer=Ue;g4.SlowBuffer=Zft;g4.INSPECT_MAX_BYTES=50;var kN=2147483647;g4.kMaxLength=kN;Ue.TYPED_ARRAY_SUPPORT=Wft();!Ue.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 Wft(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(Ue.prototype,"parent",{enumerable:!0,get:function(){if(Ue.isBuffer(this))return this.buffer}});Object.defineProperty(Ue.prototype,"offset",{enumerable:!0,get:function(){if(Ue.isBuffer(this))return this.byteOffset}});function v1(t){if(t>kN)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,Ue.prototype),e}function Ue(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return nG(t)}return Mwe(t,e,r)}Ue.poolSize=8192;function Mwe(t,e,r){if(typeof t=="string")return Kft(t,e);if(ArrayBuffer.isView(t))return Gft(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(jh(t,ArrayBuffer)||t&&jh(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(jh(t,SharedArrayBuffer)||t&&jh(t.buffer,SharedArrayBuffer)))return tG(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(n!=null&&n!==t)return Ue.from(n,e,r);let i=Qft(t);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return Ue.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}Ue.from=function(t,e,r){return Mwe(t,e,r)};Object.setPrototypeOf(Ue.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ue,Uint8Array);function Nwe(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function Vft(t,e,r){return Nwe(t),t<=0?v1(t):e!==void 0?typeof r=="string"?v1(t).fill(e,r):v1(t).fill(e):v1(t)}Ue.alloc=function(t,e,r){return Vft(t,e,r)};function nG(t){return Nwe(t),v1(t<0?0:iG(t)|0)}Ue.allocUnsafe=function(t){return nG(t)};Ue.allocUnsafeSlow=function(t){return nG(t)};function Kft(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!Ue.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Pwe(t,e)|0,n=v1(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}function eG(t){let e=t.length<0?0:iG(t.length)|0,r=v1(e);for(let n=0;n=kN)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kN.toString(16)+" bytes");return t|0}function Zft(t){return+t!=t&&(t=0),Ue.alloc(+t)}Ue.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==Ue.prototype};Ue.compare=function(e,r){if(jh(e,Uint8Array)&&(e=Ue.from(e,e.offset,e.byteLength)),jh(r,Uint8Array)&&(r=Ue.from(r,r.offset,r.byteLength)),!Ue.isBuffer(e)||!Ue.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let n=e.length,i=r.length;for(let o=0,s=Math.min(n,i);oi.length?(Ue.isBuffer(s)||(s=Ue.from(s)),s.copy(i,o)):Uint8Array.prototype.set.call(i,s,o);else if(Ue.isBuffer(s))s.copy(i,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=s.length}return i};function Pwe(t,e){if(Ue.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||jh(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return rG(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return qwe(t).length;default:if(i)return n?-1:rG(t).length;e=(""+e).toLowerCase(),i=!0}}Ue.byteLength=Pwe;function Yft(t,e,r){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return a0t(this,e,r);case"utf8":case"utf-8":return Bwe(this,e,r);case"ascii":return o0t(this,e,r);case"latin1":case"binary":return s0t(this,e,r);case"base64":return n0t(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c0t(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}Ue.prototype._isBuffer=!0;function Q3(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}Ue.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(e+=" ... "),""};Iwe&&(Ue.prototype[Iwe]=Ue.prototype.inspect);Ue.prototype.compare=function(e,r,n,i,o){if(jh(e,Uint8Array)&&(e=Ue.from(e,e.offset,e.byteLength)),!Ue.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;let s=o-i,c=n-r,l=Math.min(s,c),u=this.slice(i,o),d=e.slice(r,n);for(let p=0;p2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,sG(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof e=="string"&&(e=Ue.from(e,n)),Ue.isBuffer(e))return e.length===0?-1:Twe(t,e,r,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Twe(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Twe(t,e,r,n,i){let o=1,s=t.length,c=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(t.length<2||e.length<2)return-1;o=2,s/=2,c/=2,r/=2}function l(d,p){return o===1?d[p]:d.readUInt16BE(p*o)}let u;if(i){let d=-1;for(u=r;us&&(r=s-c),u=r;u>=0;u--){let d=!0;for(let p=0;pi&&(n=i)):n=i;let o=e.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-r;if((n===void 0||n>o)&&(n=o),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return Jft(this,e,r,n);case"utf8":case"utf-8":return Xft(this,e,r,n);case"ascii":case"latin1":case"binary":return e0t(this,e,r,n);case"base64":return t0t(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r0t(this,e,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};Ue.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function n0t(t,e,r){return e===0&&r===t.length?XK.fromByteArray(t):XK.fromByteArray(t.slice(e,r))}function Bwe(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i239?4:o>223?3:o>191?2:1;if(i+c<=r){let l,u,d,p;switch(c){case 1:o<128&&(s=o);break;case 2:l=t[i+1],(l&192)===128&&(p=(o&31)<<6|l&63,p>127&&(s=p));break;case 3:l=t[i+1],u=t[i+2],(l&192)===128&&(u&192)===128&&(p=(o&15)<<12|(l&63)<<6|u&63,p>2047&&(p<55296||p>57343)&&(s=p));break;case 4:l=t[i+1],u=t[i+2],d=t[i+3],(l&192)===128&&(u&192)===128&&(d&192)===128&&(p=(o&15)<<18|(l&63)<<12|(u&63)<<6|d&63,p>65535&&p<1114112&&(s=p))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=c}return i0t(n)}var kwe=4096;function i0t(t){let e=t.length;if(e<=kwe)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=e;on&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Ue.prototype.readUintLE=Ue.prototype.readUIntLE=function(e,r,n){e=e>>>0,r=r>>>0,n||Us(e,r,this.length);let i=this[e],o=1,s=0;for(;++s>>0,r=r>>>0,n||Us(e,r,this.length);let i=this[e+--r],o=1;for(;r>0&&(o*=256);)i+=this[e+--r]*o;return i};Ue.prototype.readUint8=Ue.prototype.readUInt8=function(e,r){return e=e>>>0,r||Us(e,1,this.length),this[e]};Ue.prototype.readUint16LE=Ue.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||Us(e,2,this.length),this[e]|this[e+1]<<8};Ue.prototype.readUint16BE=Ue.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||Us(e,2,this.length),this[e]<<8|this[e+1]};Ue.prototype.readUint32LE=Ue.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||Us(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};Ue.prototype.readUint32BE=Ue.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||Us(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};Ue.prototype.readBigUInt64LE=Dg(function(e){e=e>>>0,m4(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lE(e,this.length-8);let i=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,o=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(o)<>>0,m4(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lE(e,this.length-8);let i=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],o=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||Us(e,r,this.length);let i=this[e],o=1,s=0;for(;++s=o&&(i-=Math.pow(2,8*r)),i};Ue.prototype.readIntBE=function(e,r,n){e=e>>>0,r=r>>>0,n||Us(e,r,this.length);let i=r,o=1,s=this[e+--i];for(;i>0&&(o*=256);)s+=this[e+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*r)),s};Ue.prototype.readInt8=function(e,r){return e=e>>>0,r||Us(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};Ue.prototype.readInt16LE=function(e,r){e=e>>>0,r||Us(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};Ue.prototype.readInt16BE=function(e,r){e=e>>>0,r||Us(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};Ue.prototype.readInt32LE=function(e,r){return e=e>>>0,r||Us(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};Ue.prototype.readInt32BE=function(e,r){return e=e>>>0,r||Us(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};Ue.prototype.readBigInt64LE=Dg(function(e){e=e>>>0,m4(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lE(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<>>0,m4(e,"offset");let r=this[e],n=this[e+7];(r===void 0||n===void 0)&&lE(e,this.length-8);let i=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<>>0,r||Us(e,4,this.length),p4.read(this,e,!0,23,4)};Ue.prototype.readFloatBE=function(e,r){return e=e>>>0,r||Us(e,4,this.length),p4.read(this,e,!1,23,4)};Ue.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||Us(e,8,this.length),p4.read(this,e,!0,52,8)};Ue.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||Us(e,8,this.length),p4.read(this,e,!1,52,8)};function al(t,e,r,n,i,o){if(!Ue.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}Ue.prototype.writeUintLE=Ue.prototype.writeUIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,n=n>>>0,!i){let c=Math.pow(2,8*n)-1;al(this,e,r,n,c,0)}let o=1,s=0;for(this[r]=e&255;++s>>0,n=n>>>0,!i){let c=Math.pow(2,8*n)-1;al(this,e,r,n,c,0)}let o=n-1,s=1;for(this[r+o]=e&255;--o>=0&&(s*=256);)this[r+o]=e/s&255;return r+n};Ue.prototype.writeUint8=Ue.prototype.writeUInt8=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,1,255,0),this[r]=e&255,r+1};Ue.prototype.writeUint16LE=Ue.prototype.writeUInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};Ue.prototype.writeUint16BE=Ue.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};Ue.prototype.writeUint32LE=Ue.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};Ue.prototype.writeUint32BE=Ue.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Lwe(t,e,r,n,i){$we(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o,o=o>>8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,s=s>>8,t[r++]=s,r}function Fwe(t,e,r,n,i){$we(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o=o>>8,t[r+6]=o,o=o>>8,t[r+5]=o,o=o>>8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s=s>>8,t[r+2]=s,s=s>>8,t[r+1]=s,s=s>>8,t[r]=s,r+8}Ue.prototype.writeBigUInt64LE=Dg(function(e,r=0){return Lwe(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ue.prototype.writeBigUInt64BE=Dg(function(e,r=0){return Fwe(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});Ue.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let l=Math.pow(2,8*n-1);al(this,e,r,n,l-1,-l)}let o=0,s=1,c=0;for(this[r]=e&255;++o>0)-c&255;return r+n};Ue.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r>>>0,!i){let l=Math.pow(2,8*n-1);al(this,e,r,n,l-1,-l)}let o=n-1,s=1,c=0;for(this[r+o]=e&255;--o>=0&&(s*=256);)e<0&&c===0&&this[r+o+1]!==0&&(c=1),this[r+o]=(e/s>>0)-c&255;return r+n};Ue.prototype.writeInt8=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};Ue.prototype.writeInt16LE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};Ue.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};Ue.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};Ue.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r>>>0,n||al(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};Ue.prototype.writeBigInt64LE=Dg(function(e,r=0){return Lwe(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Ue.prototype.writeBigInt64BE=Dg(function(e,r=0){return Fwe(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Uwe(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Dwe(t,e,r,n,i){return e=+e,r=r>>>0,i||Uwe(t,e,r,4,34028234663852886e22,-34028234663852886e22),p4.write(t,e,r,n,23,4),r+4}Ue.prototype.writeFloatLE=function(e,r,n){return Dwe(this,e,r,!0,n)};Ue.prototype.writeFloatBE=function(e,r,n){return Dwe(this,e,r,!1,n)};function jwe(t,e,r,n,i){return e=+e,r=r>>>0,i||Uwe(t,e,r,8,17976931348623157e292,-17976931348623157e292),p4.write(t,e,r,n,52,8),r+8}Ue.prototype.writeDoubleLE=function(e,r,n){return jwe(this,e,r,!0,n)};Ue.prototype.writeDoubleBE=function(e,r,n){return jwe(this,e,r,!1,n)};Ue.prototype.copy=function(e,r,n,i){if(!Ue.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let o;if(typeof e=="number")for(o=r;o2**32?i=Rwe(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Rwe(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function Rwe(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function l0t(t,e,r){m4(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&lE(e,t.length-(r+1))}function $we(t,e,r,n,i,o){if(t>r||t3?e===0||e===BigInt(0)?c=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:c=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:c=`>= ${e}${s} and <= ${r}${s}`,new d4.ERR_OUT_OF_RANGE("value",c,t)}l0t(n,i,o)}function m4(t,e){if(typeof t!="number")throw new d4.ERR_INVALID_ARG_TYPE(e,"number",t)}function lE(t,e,r){throw Math.floor(t)!==t?(m4(t,r),new d4.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new d4.ERR_BUFFER_OUT_OF_BOUNDS:new d4.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var u0t=/[^+/0-9A-Za-z-_]/g;function f0t(t){if(t=t.split("=")[0],t=t.trim().replace(u0t,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function rG(t,e){e=e||1/0;let r,n=t.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function h0t(t){let e=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function qwe(t){return XK.toByteArray(f0t(t))}function RN(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function jh(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function sG(t){return t!==t}var p0t=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Dg(t){return typeof BigInt>"u"?m0t:t}function m0t(){throw new Error("BigInt not supported")}});var Hwe=X(MN=>{"use strict";Object.defineProperty(MN,"__esModule",{value:!0});MN.walletLogo=void 0;var g0t=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};MN.walletLogo=g0t});var uE=X(w4=>{"use strict";Object.defineProperty(w4,"__esModule",{value:!0});w4.errorValues=w4.standardErrorCodes=void 0;w4.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};w4.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}});var cG=X(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.serialize=Ql.getErrorCode=Ql.isValidCode=Ql.getMessageFromCode=Ql.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var NN=uE(),Vwe="Unspecified error message.";Ql.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function Kwe(t,e=Vwe){if(t&&Number.isInteger(t)){let r=t.toString();if(aG(NN.errorValues,r))return NN.errorValues[r].message;if(Qwe(t))return Ql.JSON_RPC_SERVER_ERROR_MESSAGE}return e}Ql.getMessageFromCode=Kwe;function Gwe(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(NN.errorValues[e]||Qwe(t))}Ql.isValidCode=Gwe;function w0t(t){var e;if(typeof t=="number")return t;if(v0t(t))return(e=t.code)!==null&&e!==void 0?e:t.errorCode}Ql.getErrorCode=w0t;function v0t(t){return typeof t=="object"&&t!==null&&(typeof t.code=="number"||typeof t.errorCode=="number")}function y0t(t,{shouldIncludeStack:e=!1}={}){let r={};if(t&&typeof t=="object"&&!Array.isArray(t)&&aG(t,"code")&&Gwe(t.code)){let n=t;r.code=n.code,n.message&&typeof n.message=="string"?(r.message=n.message,aG(n,"data")&&(r.data=n.data)):(r.message=Kwe(r.code),r.data={originalError:zwe(t)})}else r.code=NN.standardErrorCodes.rpc.internal,r.message=Wwe(t,"message")?t.message:Vwe,r.data={originalError:zwe(t)};return e&&(r.stack=Wwe(t,"stack")?t.stack:void 0),r}Ql.serialize=y0t;function Qwe(t){return t>=-32099&&t<=-32e3}function zwe(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t}function aG(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Wwe(t,e){return typeof t=="object"&&t!==null&&e in t&&typeof t[e]=="string"}});var Jwe=X(BN=>{"use strict";Object.defineProperty(BN,"__esModule",{value:!0});BN.standardErrors=void 0;var fa=uE(),Zwe=cG();BN.standardErrors={rpc:{parse:t=>Xu(fa.standardErrorCodes.rpc.parse,t),invalidRequest:t=>Xu(fa.standardErrorCodes.rpc.invalidRequest,t),invalidParams:t=>Xu(fa.standardErrorCodes.rpc.invalidParams,t),methodNotFound:t=>Xu(fa.standardErrorCodes.rpc.methodNotFound,t),internal:t=>Xu(fa.standardErrorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Xu(e,t)},invalidInput:t=>Xu(fa.standardErrorCodes.rpc.invalidInput,t),resourceNotFound:t=>Xu(fa.standardErrorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>Xu(fa.standardErrorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>Xu(fa.standardErrorCodes.rpc.transactionRejected,t),methodNotSupported:t=>Xu(fa.standardErrorCodes.rpc.methodNotSupported,t),limitExceeded:t=>Xu(fa.standardErrorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>v4(fa.standardErrorCodes.provider.userRejectedRequest,t),unauthorized:t=>v4(fa.standardErrorCodes.provider.unauthorized,t),unsupportedMethod:t=>v4(fa.standardErrorCodes.provider.unsupportedMethod,t),disconnected:t=>v4(fa.standardErrorCodes.provider.disconnected,t),chainDisconnected:t=>v4(fa.standardErrorCodes.provider.chainDisconnected,t),unsupportedChain:t=>v4(fa.standardErrorCodes.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ON(e,r,n)}}};function Xu(t,e){let[r,n]=Ywe(e);return new PN(t,r||(0,Zwe.getMessageFromCode)(t),n)}function v4(t,e){let[r,n]=Ywe(e);return new ON(t,r||(0,Zwe.getMessageFromCode)(t),n)}function Ywe(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}var PN=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}},ON=class extends PN{constructor(e,r,n){if(!b0t(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};function b0t(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}});var $h=X(y4=>{"use strict";Object.defineProperty(y4,"__esModule",{value:!0});y4.standardErrors=y4.standardErrorCodes=void 0;var x0t=uE();Object.defineProperty(y4,"standardErrorCodes",{enumerable:!0,get:function(){return x0t.standardErrorCodes}});var C0t=Jwe();Object.defineProperty(y4,"standardErrors",{enumerable:!0,get:function(){return C0t.standardErrors}})});var FN=X(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});LN.isErrorResponse=void 0;function E0t(t){return t.errorMessage!==void 0}LN.isErrorResponse=E0t});var fE=X(UN=>{"use strict";Object.defineProperty(UN,"__esModule",{value:!0});UN.LIB_VERSION=void 0;UN.LIB_VERSION="4.0.4"});var Xwe=X(DN=>{"use strict";Object.defineProperty(DN,"__esModule",{value:!0});DN.serializeError=void 0;var A0t=FN(),S0t=fE(),_0t=uE(),I0t=cG();function T0t(t,e){let r=(0,I0t.serialize)(k0t(t),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",S0t.LIB_VERSION),n.searchParams.set("code",r.code.toString());let i=R0t(r.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}DN.serializeError=T0t;function k0t(t){return typeof t=="string"?{message:t,code:_0t.standardErrorCodes.rpc.internal}:(0,A0t.isErrorResponse)(t)?Object.assign(Object.assign({},t),{message:t.errorMessage,code:t.errorCode,data:{method:t.method}}):t}function R0t(t,e){let r=t?.method;if(r)return r;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}});var jN=X(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.RegExpString=cl.IntNumber=cl.BigIntString=cl.AddressString=cl.HexString=cl.OpaqueType=void 0;function hE(){return t=>t}cl.OpaqueType=hE;cl.HexString=hE();cl.AddressString=hE();cl.BigIntString=hE();function M0t(t){return Math.floor(t)}cl.IntNumber=M0t;cl.RegExpString=hE()});var qh=X(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.areAddressArraysEqual=Ur.getFavicon=Ur.range=Ur.isBigNumber=Ur.ensureParsedJSONObject=Ur.ensureBigInt=Ur.ensureRegExpString=Ur.ensureIntNumber=Ur.ensureBuffer=Ur.ensureAddressString=Ur.ensureEvenLengthHexString=Ur.ensureHexString=Ur.isHexString=Ur.prepend0x=Ur.strip0x=Ur.has0xPrefix=Ur.hexStringFromIntNumber=Ur.intNumberFromHexString=Ur.bigIntStringFromBigInt=Ur.hexStringFromBuffer=Ur.hexStringToUint8Array=Ur.uint8ArrayToHex=Ur.randomBytesHex=void 0;var Z3=$h(),ef=jN(),e3e=/^[0-9]*$/,t3e=/^[a-f0-9]*$/;function N0t(t){return r3e(crypto.getRandomValues(new Uint8Array(t)))}Ur.randomBytesHex=N0t;function r3e(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}Ur.uint8ArrayToHex=r3e;function P0t(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}Ur.hexStringToUint8Array=P0t;function O0t(t,e=!1){let r=t.toString("hex");return(0,ef.HexString)(e?`0x${r}`:r)}Ur.hexStringFromBuffer=O0t;function B0t(t){return(0,ef.BigIntString)(t.toString(10))}Ur.bigIntStringFromBigInt=B0t;function L0t(t){return(0,ef.IntNumber)(Number(BigInt(pE(t,!0))))}Ur.intNumberFromHexString=L0t;function F0t(t){return(0,ef.HexString)(`0x${BigInt(t).toString(16)}`)}Ur.hexStringFromIntNumber=F0t;function lG(t){return t.startsWith("0x")||t.startsWith("0X")}Ur.has0xPrefix=lG;function $N(t){return lG(t)?t.slice(2):t}Ur.strip0x=$N;function n3e(t){return lG(t)?`0x${t.slice(2)}`:`0x${t}`}Ur.prepend0x=n3e;function dE(t){if(typeof t!="string")return!1;let e=$N(t).toLowerCase();return t3e.test(e)}Ur.isHexString=dE;function i3e(t,e=!1){if(typeof t=="string"){let r=$N(t).toLowerCase();if(t3e.test(r))return(0,ef.HexString)(e?`0x${r}`:r)}throw Z3.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}Ur.ensureHexString=i3e;function pE(t,e=!1){let r=i3e(t,!1);return r.length%2===1&&(r=(0,ef.HexString)(`0${r}`)),e?(0,ef.HexString)(`0x${r}`):r}Ur.ensureEvenLengthHexString=pE;function U0t(t){if(typeof t=="string"){let e=$N(t).toLowerCase();if(dE(e)&&e.length===40)return(0,ef.AddressString)(n3e(e))}throw Z3.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}Ur.ensureAddressString=U0t;function D0t(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string"){if(dE(t)){let e=pE(t,!1);return Buffer.from(e,"hex")}return Buffer.from(t,"utf8")}throw Z3.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}Ur.ensureBuffer=D0t;function o3e(t){if(typeof t=="number"&&Number.isInteger(t))return(0,ef.IntNumber)(t);if(typeof t=="string"){if(e3e.test(t))return(0,ef.IntNumber)(Number(t));if(dE(t))return(0,ef.IntNumber)(Number(BigInt(pE(t,!0))))}throw Z3.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}Ur.ensureIntNumber=o3e;function j0t(t){if(t instanceof RegExp)return(0,ef.RegExpString)(t.toString());throw Z3.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}Ur.ensureRegExpString=j0t;function $0t(t){if(t!==null&&(typeof t=="bigint"||s3e(t)))return BigInt(t.toString(10));if(typeof t=="number")return BigInt(o3e(t));if(typeof t=="string"){if(e3e.test(t))return BigInt(t);if(dE(t))return BigInt(pE(t,!0))}throw Z3.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}Ur.ensureBigInt=$0t;function q0t(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw Z3.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}Ur.ensureParsedJSONObject=q0t;function s3e(t){if(t==null||typeof t.constructor!="function")return!1;let{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}Ur.isBigNumber=s3e;function H0t(t,e){return Array.from({length:e-t},(r,n)=>t+n)}Ur.range=H0t;function z0t(){let t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}Ur.getFavicon=z0t;function W0t(t,e){return t.length===e.length&&t.every((r,n)=>r===e[n])}Ur.areAddressArraysEqual=W0t});var uG=X(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.decryptContent=Ds.encryptContent=Ds.importKeyFromHexString=Ds.exportKeyToHexString=Ds.decrypt=Ds.encrypt=Ds.deriveSharedSecret=Ds.generateKeyPair=void 0;var a3e=qh();async function V0t(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}Ds.generateKeyPair=V0t;async function K0t(t,e){return crypto.subtle.deriveKey({name:"ECDH",public:e},t,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}Ds.deriveSharedSecret=K0t;async function c3e(t,e){let r=crypto.getRandomValues(new Uint8Array(12)),n=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,new TextEncoder().encode(e));return{iv:r,cipherText:n}}Ds.encrypt=c3e;async function l3e(t,{iv:e,cipherText:r}){let n=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,r);return new TextDecoder().decode(n)}Ds.decrypt=l3e;function u3e(t){switch(t){case"public":return"spki";case"private":return"pkcs8"}}async function G0t(t,e){let r=u3e(t),n=await crypto.subtle.exportKey(r,e);return(0,a3e.uint8ArrayToHex)(new Uint8Array(n))}Ds.exportKeyToHexString=G0t;async function Q0t(t,e){let r=u3e(t),n=(0,a3e.hexStringToUint8Array)(e).buffer;return await crypto.subtle.importKey(r,n,{name:"ECDH",namedCurve:"P-256"},!0,t==="private"?["deriveKey"]:[])}Ds.importKeyFromHexString=Q0t;async function Z0t(t,e){let r=JSON.stringify(t,(n,i)=>{if(!(i instanceof Error))return i;let o=i;return Object.assign(Object.assign({},o.code?{code:o.code}:{}),{message:o.message})});return c3e(e,r)}Ds.encryptContent=Z0t;async function Y0t(t,e){return JSON.parse(await l3e(e,t))}Ds.decryptContent=Y0t});var $g=X(qN=>{"use strict";Object.defineProperty(qN,"__esModule",{value:!0});qN.ScopedLocalStorage=void 0;var fG=class t{constructor(e,r){this.scope=e,this.module=r}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`-${this.scope}${this.module?`:${this.module}`:""}:${e}`}static clearAll(){new t("CBWSDK").clear(),new t("walletlink").clear()}};qN.ScopedLocalStorage=fG});var f3e=X(zN=>{"use strict";Object.defineProperty(zN,"__esModule",{value:!0});zN.SCWKeyManager=void 0;var HN=uG(),J0t=$g(),hG={storageKey:"ownPrivateKey",keyType:"private"},dG={storageKey:"ownPublicKey",keyType:"public"},pG={storageKey:"peerPublicKey",keyType:"public"},mG=class{constructor(){this.storage=new J0t.ScopedLocalStorage("CBWSDK","SCWKeyManager"),this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null}async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(pG,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,this.storage.removeItem(dG.storageKey),this.storage.removeItem(hG.storageKey),this.storage.removeItem(pG.storageKey)}async generateKeyPair(){let e=await(0,HN.generateKeyPair)();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(hG,e.privateKey),await this.storeKey(dG,e.publicKey)}async loadKeysIfNeeded(){if(this.ownPrivateKey===null&&(this.ownPrivateKey=await this.loadKey(hG)),this.ownPublicKey===null&&(this.ownPublicKey=await this.loadKey(dG)),(this.ownPrivateKey===null||this.ownPublicKey===null)&&await this.generateKeyPair(),this.peerPublicKey===null&&(this.peerPublicKey=await this.loadKey(pG)),this.sharedSecret===null){if(this.ownPrivateKey===null||this.peerPublicKey===null)return;this.sharedSecret=await(0,HN.deriveSharedSecret)(this.ownPrivateKey,this.peerPublicKey)}}async loadKey(e){let r=this.storage.getItem(e.storageKey);return r?(0,HN.importKeyFromHexString)(e.keyType,r):null}async storeKey(e,r){let n=await(0,HN.exportKeyToHexString)(e.keyType,r);this.storage.setItem(e.storageKey,n)}};zN.SCWKeyManager=mG});var g3e=X(WN=>{"use strict";Object.defineProperty(WN,"__esModule",{value:!0});WN.SCWStateManager=void 0;var X0t=$g(),h3e="accounts",d3e="activeChain",p3e="availableChains",m3e="walletCapabilities",gG=class{get accounts(){return this._accounts}get activeChain(){return this._activeChain}get walletCapabilities(){return this._walletCapabilities}constructor(e){var r,n;this.storage=new X0t.ScopedLocalStorage("CBWSDK","SCWStateManager"),this.updateListener=e.updateListener,this.availableChains=this.loadItemFromStorage(p3e),this._walletCapabilities=this.loadItemFromStorage(m3e);let i=this.loadItemFromStorage(h3e),o=this.loadItemFromStorage(d3e);i&&this.updateListener.onAccountsUpdate({accounts:i,source:"storage"}),o&&this.updateListener.onChainUpdate({chain:o,source:"storage"}),this._accounts=i||[],this._activeChain=o||{id:(n=(r=e.appChainIds)===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:1}}updateAccounts(e){this._accounts=e,this.storeItemToStorage(h3e,e),this.updateListener.onAccountsUpdate({accounts:e,source:"wallet"})}switchChain(e){var r;let n=(r=this.availableChains)===null||r===void 0?void 0:r.find(i=>i.id===e);return n?(n===this._activeChain||(this._activeChain=n,this.storeItemToStorage(d3e,n),this.updateListener.onChainUpdate({chain:n,source:"wallet"})),!0):!1}updateAvailableChains(e){if(!e||Object.keys(e).length===0)return;let r=Object.entries(e).map(([n,i])=>({id:Number(n),rpcUrl:i}));this.availableChains=r,this.storeItemToStorage(p3e,r),this.switchChain(this._activeChain.id)}updateWalletCapabilities(e){this._walletCapabilities=e,this.storeItemToStorage(m3e,e)}storeItemToStorage(e,r){this.storage.setItem(e,JSON.stringify(r))}loadItemFromStorage(e){let r=this.storage.getItem(e);return r?JSON.parse(r):void 0}clear(){this.storage.clear()}};WN.SCWStateManager=gG});var v3e=X(GN=>{"use strict";Object.defineProperty(GN,"__esModule",{value:!0});GN.SCWSigner=void 0;var eht=f3e(),tht=g3e(),VN=$h(),w3e=qh(),KN=uG(),wG=class{constructor(e){this.metadata=e.metadata,this.communicator=e.communicator,this.keyManager=new eht.SCWKeyManager,this.stateManager=new tht.SCWStateManager({appChainIds:this.metadata.appChainIds,updateListener:e.updateListener}),this.handshake=this.handshake.bind(this),this.request=this.request.bind(this),this.createRequestMessage=this.createRequestMessage.bind(this),this.decryptResponseMessage=this.decryptResponseMessage.bind(this)}async handshake(){let e=await this.createRequestMessage({handshake:{method:"eth_requestAccounts",params:this.metadata}}),r=await this.communicator.postRequestAndWaitForResponse(e);if("failure"in r.content)throw r.content.failure;let n=await(0,KN.importKeyFromHexString)("public",r.sender);await this.keyManager.setPeerPublicKey(n);let i=await this.decryptResponseMessage(r);this.updateInternalState({method:"eth_requestAccounts"},i);let o=i.result;if("error"in o)throw o.error;return this.stateManager.accounts}async request(e){let r=this.tryLocalHandling(e);if(r!==void 0){if(r instanceof Error)throw r;return r}await this.communicator.waitForPopupLoaded();let n=await this.sendEncryptedRequest(e),i=await this.decryptResponseMessage(n);this.updateInternalState(e,i);let o=i.result;if("error"in o)throw o.error;return o.value}async disconnect(){this.stateManager.clear(),await this.keyManager.clear()}tryLocalHandling(e){var r;switch(e.method){case"wallet_switchEthereumChain":{let n=e.params;if(!n||!(!((r=n[0])===null||r===void 0)&&r.chainId))throw VN.standardErrors.rpc.invalidParams();let i=(0,w3e.ensureIntNumber)(n[0].chainId);return this.stateManager.switchChain(i)?null:void 0}case"wallet_getCapabilities":{let n=this.stateManager.walletCapabilities;if(!n)throw VN.standardErrors.provider.unauthorized("No wallet capabilities found, please disconnect and reconnect");return n}default:return}}async sendEncryptedRequest(e){let r=await this.keyManager.getSharedSecret();if(!r)throw VN.standardErrors.provider.unauthorized("No valid session found, try requestAccounts before other methods");let n=await(0,KN.encryptContent)({action:e,chainId:this.stateManager.activeChain.id},r),i=await this.createRequestMessage({encrypted:n});return this.communicator.postRequestAndWaitForResponse(i)}async createRequestMessage(e){let r=await(0,KN.exportKeyToHexString)("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),sender:r,content:e,timestamp:new Date}}async decryptResponseMessage(e){let r=e.content;if("failure"in r)throw r.failure;let n=await this.keyManager.getSharedSecret();if(!n)throw VN.standardErrors.provider.unauthorized("Invalid session");return(0,KN.decryptContent)(r.encrypted,n)}updateInternalState(e,r){var n,i;let o=(n=r.data)===null||n===void 0?void 0:n.chains;o&&this.stateManager.updateAvailableChains(o);let s=(i=r.data)===null||i===void 0?void 0:i.capabilities;s&&this.stateManager.updateWalletCapabilities(s);let c=r.result;if(!("error"in c))switch(e.method){case"eth_requestAccounts":{let l=c.value;this.stateManager.updateAccounts(l);break}case"wallet_switchEthereumChain":{if(c.value!==null)return;let l=e.params,u=(0,w3e.ensureIntNumber)(l[0].chainId);this.stateManager.switchChain(u);break}default:break}}};GN.SCWSigner=wG});var Hh=X((b6r,vG)=>{"use strict";var b4=typeof Reflect=="object"?Reflect:null,y3e=b4&&typeof b4.apply=="function"?b4.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},QN;b4&&typeof b4.ownKeys=="function"?QN=b4.ownKeys:Object.getOwnPropertySymbols?QN=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:QN=function(e){return Object.getOwnPropertyNames(e)};function rht(t){console&&console.warn&&console.warn(t)}var x3e=Number.isNaN||function(e){return e!==e};function Ai(){Ai.init.call(this)}vG.exports=Ai;vG.exports.once=sht;Ai.EventEmitter=Ai;Ai.prototype._events=void 0;Ai.prototype._eventsCount=0;Ai.prototype._maxListeners=void 0;var b3e=10;function ZN(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Ai,"defaultMaxListeners",{enumerable:!0,get:function(){return b3e},set:function(t){if(typeof t!="number"||t<0||x3e(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");b3e=t}});Ai.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};Ai.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||x3e(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function C3e(t){return t._maxListeners===void 0?Ai.defaultMaxListeners:t._maxListeners}Ai.prototype.getMaxListeners=function(){return C3e(this)};Ai.prototype.emit=function(e){for(var r=[],n=1;n0&&(s=r[0]),s instanceof Error)throw s;var c=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw c.context=s,c}var l=o[e];if(l===void 0)return!1;if(typeof l=="function")y3e(l,this,r);else for(var u=l.length,d=I3e(l,u),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,rht(c)}return t}Ai.prototype.addListener=function(e,r){return E3e(this,e,r,!1)};Ai.prototype.on=Ai.prototype.addListener;Ai.prototype.prependListener=function(e,r){return E3e(this,e,r,!0)};function nht(){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 A3e(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=nht.bind(n);return i.listener=r,n.wrapFn=i,i}Ai.prototype.once=function(e,r){return ZN(r),this.on(e,A3e(this,e,r)),this};Ai.prototype.prependOnceListener=function(e,r){return ZN(r),this.prependListener(e,A3e(this,e,r)),this};Ai.prototype.removeListener=function(e,r){var n,i,o,s,c;if(ZN(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){c=n[s].listener,o=s;break}if(o<0)return this;o===0?n.shift():iht(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,c||r)}return this};Ai.prototype.off=Ai.prototype.removeListener;Ai.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),s;for(i=0;i=0;i--)this.removeListener(e,r[i]);return this};function S3e(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?oht(i):I3e(i,i.length)}Ai.prototype.listeners=function(e){return S3e(this,e,!0)};Ai.prototype.rawListeners=function(e){return S3e(this,e,!1)};Ai.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):_3e.call(t,e)};Ai.prototype.listenerCount=_3e;function _3e(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Ai.prototype.eventNames=function(){return this._eventsCount>0?QN(this._events):[]};function I3e(t,e){for(var r=new Array(e),n=0;n{k3e.exports=Hh().EventEmitter});var bG=X(()=>{});var B3e=X((A6r,O3e)=>{"use strict";function R3e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function M3e(t){for(var e=1;e0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return YN.alloc(0);for(var n=YN.allocUnsafe(r>>>0),i=this.head,o=0;i;)mht(i.data,n,o),o+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return rs.length?s.length:r;if(c===s.length?o+=s:o+=s.slice(0,r),r-=c,r===0){c===s.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(c));break}++i}return this.length-=i,o}},{key:"_getBuffer",value:function(r){var n=YN.allocUnsafe(r),i=this.head,o=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var s=i.data,c=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,c),r-=c,r===0){c===s.length?(++o,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=s.slice(c));break}++o}return this.length-=o,n}},{key:pht,value:function(r,n){return xG(this,M3e(M3e({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var EG=X((S6r,F3e)=>{"use strict";function ght(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(CG,this,t)):process.nextTick(CG,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(JN,r):(r._writableState.errorEmitted=!0,process.nextTick(L3e,r,o)):process.nextTick(L3e,r,o):e?(process.nextTick(JN,r),e(o)):process.nextTick(JN,r)}),this)}function L3e(t,e){CG(t,e),JN(t)}function JN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function wht(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function CG(t,e){t.emit("error",e)}function vht(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}F3e.exports={destroy:ght,undestroy:wht,errorOrDestroy:vht}});var Y3=X((_6r,j3e)=>{"use strict";function yht(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var D3e={};function tf(t,e,r){r||(r=Error);function n(o,s,c){return typeof e=="string"?e:e(o,s,c)}var i=function(o){yht(s,o);function s(c,l,u){return o.call(this,n(c,l,u))||this}return s}(r);i.prototype.name=r.name,i.prototype.code=t,D3e[t]=i}function U3e(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function bht(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function xht(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Cht(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}tf("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);tf("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&bht(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var i;if(xht(t," argument"))i="The ".concat(t," ").concat(n," ").concat(U3e(e,"type"));else{var o=Cht(t,".")?"property":"argument";i='The "'.concat(t,'" ').concat(o," ").concat(n," ").concat(U3e(e,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);tf("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");tf("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});tf("ERR_STREAM_PREMATURE_CLOSE","Premature close");tf("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});tf("ERR_MULTIPLE_CALLBACK","Callback called multiple times");tf("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");tf("ERR_STREAM_WRITE_AFTER_END","write after end");tf("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);tf("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);tf("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");j3e.exports.codes=D3e});var AG=X((I6r,$3e)=>{"use strict";var Eht=Y3().codes.ERR_INVALID_OPT_VALUE;function Aht(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Sht(t,e,r,n){var i=Aht(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new Eht(o,i)}return Math.floor(i)}return t.objectMode?16:16*1024}$3e.exports={getHighWaterMark:Sht}});var rf=X((T6r,SG)=>{typeof Object.create=="function"?SG.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:SG.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var H3e=X((k6r,q3e)=>{q3e.exports=_ht;function _ht(t,e){if(_G("noDeprecation"))return t;var r=!1;function n(){if(!r){if(_G("throwDeprecation"))throw new Error(e);_G("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function _G(t){try{if(!global.localStorage)return!1}catch{return!1}var e=global.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var kG=X((R6r,Q3e)=>{"use strict";Q3e.exports=Mo;function W3e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Xht(e,t)}}var x4;Mo.WritableState=gE;var Iht={deprecate:H3e()},V3e=yG(),eP=jg().Buffer,Tht=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function kht(t){return eP.from(t)}function Rht(t){return eP.isBuffer(t)||t instanceof Tht}var TG=EG(),Mht=AG(),Nht=Mht.getHighWaterMark,qg=Y3().codes,Pht=qg.ERR_INVALID_ARG_TYPE,Oht=qg.ERR_METHOD_NOT_IMPLEMENTED,Bht=qg.ERR_MULTIPLE_CALLBACK,Lht=qg.ERR_STREAM_CANNOT_PIPE,Fht=qg.ERR_STREAM_DESTROYED,Uht=qg.ERR_STREAM_NULL_VALUES,Dht=qg.ERR_STREAM_WRITE_AFTER_END,jht=qg.ERR_UNKNOWN_ENCODING,C4=TG.errorOrDestroy;rf()(Mo,V3e);function $ht(){}function gE(t,e,r){x4=x4||J3(),t=t||{},typeof r!="boolean"&&(r=e instanceof x4),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Nht(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){Ght(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new W3e(this)}gE.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(gE.prototype,"buffer",{get:Iht.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var XN;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(XN=Function.prototype[Symbol.hasInstance],Object.defineProperty(Mo,Symbol.hasInstance,{value:function(e){return XN.call(this,e)?!0:this!==Mo?!1:e&&e._writableState instanceof gE}})):XN=function(e){return e instanceof this};function Mo(t){x4=x4||J3();var e=this instanceof x4;if(!e&&!XN.call(Mo,this))return new Mo(t);this._writableState=new gE(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),V3e.call(this)}Mo.prototype.pipe=function(){C4(this,new Lht)};function qht(t,e){var r=new Dht;C4(t,r),process.nextTick(e,r)}function Hht(t,e,r,n){var i;return r===null?i=new Uht:typeof r!="string"&&!e.objectMode&&(i=new Pht("chunk",["string","Buffer"],r)),i?(C4(t,i),process.nextTick(n,i),!1):!0}Mo.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&Rht(t);return o&&!eP.isBuffer(t)&&(t=kht(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=$ht),n.ending?qht(this,r):(o||Hht(this,n,t,r))&&(n.pendingcb++,i=Wht(this,n,o,t,e,r)),i};Mo.prototype.cork=function(){this._writableState.corked++};Mo.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&K3e(this,t))};Mo.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new jht(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Mo.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function zht(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=eP.from(e,r)),e}Object.defineProperty(Mo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Wht(t,e,r,n,i,o){if(!r){var s=zht(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var c=e.objectMode?1:n.length;e.length+=c;var l=e.length{"use strict";var edt=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Y3e.exports=zh;var Z3e=NG(),MG=kG();rf()(zh,Z3e);for(RG=edt(MG.prototype),tP=0;tP{var nP=jg(),Wh=nP.Buffer;function J3e(t,e){for(var r in t)e[r]=t[r]}Wh.from&&Wh.alloc&&Wh.allocUnsafe&&Wh.allocUnsafeSlow?X3e.exports=nP:(J3e(nP,PG),PG.Buffer=X3);function X3(t,e,r){return Wh(t,e,r)}X3.prototype=Object.create(Wh.prototype);J3e(Wh,X3);X3.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Wh(t,e,r)};X3.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Wh(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};X3.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Wh(t)};X3.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return nP.SlowBuffer(t)}});var LG=X(tve=>{"use strict";var BG=y1().Buffer,eve=BG.isEncoding||function(t){switch(t=""+t,t&&t.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 ndt(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function idt(t){var e=ndt(t);if(typeof e!="string"&&(BG.isEncoding===eve||!eve(t)))throw new Error("Unknown encoding: "+t);return e||t}tve.StringDecoder=wE;function wE(t){this.encoding=idt(t);var e;switch(this.encoding){case"utf16le":this.text=udt,this.end=fdt,e=4;break;case"utf8":this.fillLast=adt,e=4;break;case"base64":this.text=hdt,this.end=ddt,e=3;break;default:this.write=pdt,this.end=mdt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=BG.allocUnsafe(e)}wE.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function odt(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function sdt(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function adt(t){var e=this.lastTotal-this.lastNeed,r=sdt(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function cdt(t,e){var r=odt(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function ldt(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function udt(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function fdt(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function hdt(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function ddt(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function pdt(t){return t.toString(this.encoding)}function mdt(t){return t&&t.length?this.write(t):""}});var iP=X((P6r,ive)=>{"use strict";var rve=Y3().codes.ERR_STREAM_PREMATURE_CLOSE;function gdt(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";var oP;function Hg(t,e,r){return e=ydt(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ydt(t){var e=bdt(t,"string");return typeof e=="symbol"?e:String(e)}function bdt(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xdt=iP(),zg=Symbol("lastResolve"),ev=Symbol("lastReject"),vE=Symbol("error"),sP=Symbol("ended"),tv=Symbol("lastPromise"),FG=Symbol("handlePromise"),rv=Symbol("stream");function Wg(t,e){return{value:t,done:e}}function Cdt(t){var e=t[zg];if(e!==null){var r=t[rv].read();r!==null&&(t[tv]=null,t[zg]=null,t[ev]=null,e(Wg(r,!1)))}}function Edt(t){process.nextTick(Cdt,t)}function Adt(t,e){return function(r,n){t.then(function(){if(e[sP]){r(Wg(void 0,!0));return}e[FG](r,n)},n)}}var Sdt=Object.getPrototypeOf(function(){}),_dt=Object.setPrototypeOf((oP={get stream(){return this[rv]},next:function(){var e=this,r=this[vE];if(r!==null)return Promise.reject(r);if(this[sP])return Promise.resolve(Wg(void 0,!0));if(this[rv].destroyed)return new Promise(function(s,c){process.nextTick(function(){e[vE]?c(e[vE]):s(Wg(void 0,!0))})});var n=this[tv],i;if(n)i=new Promise(Adt(n,this));else{var o=this[rv].read();if(o!==null)return Promise.resolve(Wg(o,!1));i=new Promise(this[FG])}return this[tv]=i,i}},Hg(oP,Symbol.asyncIterator,function(){return this}),Hg(oP,"return",function(){var e=this;return new Promise(function(r,n){e[rv].destroy(null,function(i){if(i){n(i);return}r(Wg(void 0,!0))})})}),oP),Sdt),Idt=function(e){var r,n=Object.create(_dt,(r={},Hg(r,rv,{value:e,writable:!0}),Hg(r,zg,{value:null,writable:!0}),Hg(r,ev,{value:null,writable:!0}),Hg(r,vE,{value:null,writable:!0}),Hg(r,sP,{value:e._readableState.endEmitted,writable:!0}),Hg(r,FG,{value:function(o,s){var c=n[rv].read();c?(n[tv]=null,n[zg]=null,n[ev]=null,o(Wg(c,!1))):(n[zg]=o,n[ev]=s)},writable:!0}),r));return n[tv]=null,xdt(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var o=n[ev];o!==null&&(n[tv]=null,n[zg]=null,n[ev]=null,o(i)),n[vE]=i;return}var s=n[zg];s!==null&&(n[tv]=null,n[zg]=null,n[ev]=null,s(Wg(void 0,!0))),n[sP]=!0}),e.on("readable",Edt.bind(null,n)),n};ove.exports=Idt});var cve=X((B6r,ave)=>{ave.exports=function(){throw new Error("Readable.from is not available in the browser")}});var NG=X((F6r,vve)=>{"use strict";vve.exports=Xn;var E4;Xn.ReadableState=hve;var L6r=Hh().EventEmitter,fve=function(e,r){return e.listeners(r).length},bE=yG(),aP=jg().Buffer,Tdt=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function kdt(t){return aP.from(t)}function Rdt(t){return aP.isBuffer(t)||t instanceof Tdt}var UG=bG(),vn;UG&&UG.debuglog?vn=UG.debuglog("stream"):vn=function(){};var Mdt=B3e(),WG=EG(),Ndt=AG(),Pdt=Ndt.getHighWaterMark,cP=Y3().codes,Odt=cP.ERR_INVALID_ARG_TYPE,Bdt=cP.ERR_STREAM_PUSH_AFTER_EOF,Ldt=cP.ERR_METHOD_NOT_IMPLEMENTED,Fdt=cP.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A4,DG,jG;rf()(Xn,bE);var yE=WG.errorOrDestroy,$G=["error","close","destroy","pause","resume"];function Udt(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function hve(t,e,r){E4=E4||J3(),t=t||{},typeof r!="boolean"&&(r=e instanceof E4),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Pdt(this,t,"readableHighWaterMark",r),this.buffer=new Mdt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(A4||(A4=LG().StringDecoder),this.decoder=new A4(t.encoding),this.encoding=t.encoding)}function Xn(t){if(E4=E4||J3(),!(this instanceof Xn))return new Xn(t);var e=this instanceof E4;this._readableState=new hve(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),bE.call(this)}Object.defineProperty(Xn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Xn.prototype.destroy=WG.destroy;Xn.prototype._undestroy=WG.undestroy;Xn.prototype._destroy=function(t,e){e(t)};Xn.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=aP.from(t,e),e=""),n=!0),dve(this,t,e,!1,n)};Xn.prototype.unshift=function(t){return dve(this,t,null,!0,!1)};function dve(t,e,r,n,i){vn("readableAddChunk",e);var o=t._readableState;if(e===null)o.reading=!1,$dt(t,o);else{var s;if(i||(s=Ddt(o,e)),s)yE(t,s);else if(o.objectMode||e&&e.length>0)if(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==aP.prototype&&(e=kdt(e)),n)o.endEmitted?yE(t,new Fdt):qG(t,o,e,!0);else if(o.ended)yE(t,new Bdt);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?qG(t,o,e,!1):zG(t,o)):qG(t,o,e,!1)}else n||(o.reading=!1,zG(t,o))}return!o.ended&&(o.length=lve?t=lve:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function uve(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=jdt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Xn.prototype.read=function(t){vn("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return vn("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?HG(this):lP(this),null;if(t=uve(t,e),t===0&&e.ended)return e.length===0&&HG(this),null;var n=e.needReadable;vn("need readable",n),(e.length===0||e.length-t0?i=gve(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&HG(this)),i!==null&&this.emit("data",i),i};function $dt(t,e){if(vn("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?lP(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,pve(t)))}}function lP(t){var e=t._readableState;vn("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(vn("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(pve,t))}function pve(t){var e=t._readableState;vn("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,VG(t)}function zG(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(qdt,t,e))}function qdt(t,e){for(;!e.reading&&!e.ended&&(e.length1&&wve(n.pipes,t)!==-1)&&!u&&(vn("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function v(P){vn("onerror",P),R(),t.removeListener("error",v),fve(t,"error")===0&&yE(t,P)}Udt(t,"error",v);function y(){t.removeListener("finish",_),R()}t.once("close",y);function _(){vn("onfinish"),t.removeListener("close",y),R()}t.once("finish",_);function R(){vn("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(vn("pipe resume"),r.resume()),t};function Hdt(t){return function(){var r=t._readableState;vn("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&fve(t,"data")&&(r.flowing=!0,VG(t))}}Xn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,vn("on readable",n.length,n.reading),n.length?lP(this):n.reading||process.nextTick(zdt,this)),r};Xn.prototype.addListener=Xn.prototype.on;Xn.prototype.removeListener=function(t,e){var r=bE.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(mve,this),r};Xn.prototype.removeAllListeners=function(t){var e=bE.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(mve,this),e};function mve(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function zdt(t){vn("readable nexttick read 0"),t.read(0)}Xn.prototype.resume=function(){var t=this._readableState;return t.flowing||(vn("resume"),t.flowing=!t.readableListening,Wdt(this,t)),t.paused=!1,this};function Wdt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Vdt,t,e))}function Vdt(t,e){vn("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),VG(t),e.flowing&&!e.reading&&t.read(0)}Xn.prototype.pause=function(){return vn("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(vn("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function VG(t){var e=t._readableState;for(vn("flow",e.flowing);e.flowing&&t.read()!==null;);}Xn.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(vn("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&e.push(s)}e.push(null)}),t.on("data",function(s){if(vn("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var c=e.push(s);c||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(c){return function(){return t[c].apply(t,arguments)}}(i));for(var o=0;o<$G.length;o++)t.on($G[o],this.emit.bind(this,$G[o]));return this._read=function(s){vn("wrapped _read",s),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(Xn.prototype[Symbol.asyncIterator]=function(){return DG===void 0&&(DG=sve()),DG(this)});Object.defineProperty(Xn.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Xn.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Xn.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Xn._fromList=gve;Object.defineProperty(Xn.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function gve(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function HG(t){var e=t._readableState;vn("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Kdt,e,t))}function Kdt(t,e){if(vn("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Xn.from=function(t,e){return jG===void 0&&(jG=cve()),jG(Xn,t,e)});function wve(t,e){for(var r=0,n=t.length;r{"use strict";bve.exports=b1;var uP=Y3().codes,Gdt=uP.ERR_METHOD_NOT_IMPLEMENTED,Qdt=uP.ERR_MULTIPLE_CALLBACK,Zdt=uP.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ydt=uP.ERR_TRANSFORM_WITH_LENGTH_0,fP=J3();rf()(b1,fP);function Jdt(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new Qdt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";Cve.exports=xE;var xve=KG();rf()(xE,xve);function xE(t){if(!(this instanceof xE))return new xE(t);xve.call(this,t)}xE.prototype._transform=function(t,e,r){r(null,t)}});var Tve=X((j6r,Ive)=>{"use strict";var GG;function ept(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var _ve=Y3().codes,tpt=_ve.ERR_MISSING_ARGS,rpt=_ve.ERR_STREAM_DESTROYED;function Ave(t){if(t)throw t}function npt(t){return t.setHeader&&typeof t.abort=="function"}function ipt(t,e,r,n){n=ept(n);var i=!1;t.on("close",function(){i=!0}),GG===void 0&&(GG=iP()),GG(t,{readable:e,writable:r},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,npt(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(s||new rpt("pipe"))}}}function Sve(t){t()}function opt(t,e){return t.pipe(e)}function spt(t){return!t.length||typeof t[t.length-1]!="function"?Ave:t.pop()}function apt(){for(var t=arguments.length,e=new Array(t),r=0;r0;return ipt(s,l,u,function(d){i||(i=d),d&&o.forEach(Sve),!l&&(o.forEach(Sve),n(i))})});return e.reduce(opt)}Ive.exports=apt});var QG=X((nf,kve)=>{nf=kve.exports=NG();nf.Stream=nf;nf.Readable=nf;nf.Writable=kG();nf.Duplex=J3();nf.Transform=KG();nf.PassThrough=Eve();nf.finished=iP();nf.pipeline=Tve()});var Nve=X(($6r,Mve)=>{var{Transform:cpt}=QG();Mve.exports=t=>class Rve extends cpt{constructor(r,n,i,o,s){super(s),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=o,this._options=s,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let o=null;try{this.update(r,n)}catch(s){o=s}i(o)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new Rve(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var Bve=X((q6r,Ove)=>{var{Transform:lpt}=QG();Ove.exports=t=>class Pve extends lpt{constructor(r,n,i,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=o,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let o=null;try{this.update(r,n)}catch(s){o=s}i(o)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new Pve(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var Fve=X((H6r,Lve)=>{var upt=Nve(),fpt=Bve();Lve.exports=function(t){let e=upt(t),r=fpt(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}}});var jve=X(Dve=>{var Uve=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];Dve.p1600=function(t){for(let e=0;e<24;++e){let r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],o=t[3]^t[13]^t[23]^t[33]^t[43],s=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],u=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],p=t[9]^t[19]^t[29]^t[39]^t[49],v=d^(i<<1|o>>>31),y=p^(o<<1|i>>>31),_=t[0]^v,R=t[1]^y,P=t[10]^v,k=t[11]^y,M=t[20]^v,L=t[21]^y,D=t[30]^v,j=t[31]^y,V=t[40]^v,K=t[41]^y;v=r^(s<<1|c>>>31),y=n^(c<<1|s>>>31);let B=t[2]^v,W=t[3]^y,z=t[12]^v,q=t[13]^y,Q=t[22]^v,f=t[23]^y,h=t[32]^v,g=t[33]^y,x=t[42]^v,S=t[43]^y;v=i^(l<<1|u>>>31),y=o^(u<<1|l>>>31);let T=t[4]^v,N=t[5]^y,I=t[14]^v,m=t[15]^y,C=t[24]^v,Y=t[25]^y,ne=t[34]^v,b=t[35]^y,H=t[44]^v,G=t[45]^y;v=s^(d<<1|p>>>31),y=c^(p<<1|d>>>31);let U=t[6]^v,se=t[7]^y,te=t[16]^v,le=t[17]^y,me=t[26]^v,Ee=t[27]^y,fe=t[36]^v,Se=t[37]^y,gt=t[46]^v,Qe=t[47]^y;v=l^(r<<1|n>>>31),y=u^(n<<1|r>>>31);let hr=t[8]^v,mt=t[9]^y,qe=t[18]^v,Vt=t[19]^y,wt=t[28]^v,nt=t[29]^y,tr=t[38]^v,de=t[39]^y,ge=t[48]^v,be=t[49]^y,ye=_,_e=R,ft=k<<4|P>>>28,Ve=P<<4|k>>>28,Fe=M<<3|L>>>29,Dt=L<<3|M>>>29,Xe=j<<9|D>>>23,ze=D<<9|j>>>23,pr=V<<18|K>>>14,bt=K<<18|V>>>14,tt=B<<1|W>>>31,Ar=W<<1|B>>>31,Et=q<<12|z>>>20,st=z<<12|q>>>20,yr=Q<<10|f>>>22,_t=f<<10|Q>>>22,at=g<<13|h>>>19,Sr=h<<13|g>>>19,It=x<<2|S>>>30,it=S<<2|x>>>30,_r=N<<30|T>>>2,At=T<<30|N>>>2,Ke=I<<6|m>>>26,lr=m<<6|I>>>26,St=Y<<11|C>>>21,ot=C<<11|Y>>>21,Mr=ne<<15|b>>>17,Rt=b<<15|ne>>>17,lt=G<<29|H>>>3,Nr=H<<29|G>>>3,Mt=U<<28|se>>>4,ut=se<<28|U>>>4,Pr=le<<23|te>>>9,Nt=te<<23|le>>>9,ct=me<<25|Ee>>>7,br=Ee<<25|me>>>7,_n=fe<<21|Se>>>11,In=Se<<21|fe>>>11,Tn=Qe<<24|gt>>>8,kn=gt<<24|Qe>>>8,Rn=hr<<27|mt>>>5,Zi=mt<<27|hr>>>5,qo=qe<<20|Vt>>>12,Yi=Vt<<20|qe>>>12,Ho=nt<<7|wt>>>25,zo=wt<<7|nt>>>25,Wo=tr<<8|de>>>24,So=de<<8|tr>>>24,_o=ge<<14|be>>>18,Io=be<<14|ge>>>18;t[0]=ye^~Et&St,t[1]=_e^~st&ot,t[10]=Mt^~qo&Fe,t[11]=ut^~Yi&Dt,t[20]=tt^~Ke&ct,t[21]=Ar^~lr&br,t[30]=Rn^~ft&yr,t[31]=Zi^~Ve&_t,t[40]=_r^~Pr&Ho,t[41]=At^~Nt&zo,t[2]=Et^~St&_n,t[3]=st^~ot&In,t[12]=qo^~Fe&at,t[13]=Yi^~Dt&Sr,t[22]=Ke^~ct&Wo,t[23]=lr^~br&So,t[32]=ft^~yr&Mr,t[33]=Ve^~_t&Rt,t[42]=Pr^~Ho&Xe,t[43]=Nt^~zo&ze,t[4]=St^~_n&_o,t[5]=ot^~In&Io,t[14]=Fe^~at<,t[15]=Dt^~Sr&Nr,t[24]=ct^~Wo&pr,t[25]=br^~So&bt,t[34]=yr^~Mr&Tn,t[35]=_t^~Rt&kn,t[44]=Ho^~Xe&It,t[45]=zo^~ze&it,t[6]=_n^~_o&ye,t[7]=In^~Io&_e,t[16]=at^~lt&Mt,t[17]=Sr^~Nr&ut,t[26]=Wo^~pr&tt,t[27]=So^~bt&Ar,t[36]=Mr^~Tn&Rn,t[37]=Rt^~kn&Zi,t[46]=Xe^~It&_r,t[47]=ze^~it&At,t[8]=_o^~ye&Et,t[9]=Io^~_e&st,t[18]=lt^~Mt&qo,t[19]=Nr^~ut&Yi,t[28]=pr^~tt&Ke,t[29]=bt^~Ar&lr,t[38]=Tn^~Rn&ft,t[39]=kn^~Zi&Ve,t[48]=It^~_r&Pr,t[49]=it^~At&Nt,t[0]^=Uve[e*2],t[1]^=Uve[e*2+1]}}});var qve=X((W6r,$ve)=>{var hP=jve();function S4(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}S4.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};S4.prototype.absorb=function(t){for(let e=0;e>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(hP.p1600(this.state),this.count=0);return e};S4.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};$ve.exports=S4});var ZG=X((V6r,Hve)=>{Hve.exports=Fve()(qve())});var YG=X((K6r,Qve)=>{var hpt=ZG();function zve(t){return Buffer.allocUnsafe(t).fill(0)}function dpt(t){return t.toString(2).length}function Wve(t,e){let r=t.toString(16);r.length%2!==0&&(r="0"+r);let n=r.match(/.{1,2}/g).map(i=>parseInt(i,16));for(;n.length{var xc=YG();function Yve(t){return t.startsWith("int[")?"int256"+t.slice(3):t==="int"?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):t==="uint"?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):t==="fixed"?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):t==="ufixed"?"ufixed128x128":t}function _4(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function Zve(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function Jve(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function nv(t){var e=typeof t;if(e==="string"||e==="number")return BigInt(t);if(e==="bigint")return t;throw new Error("Argument is not a number")}function Vh(t,e){var r,n,i,o;if(t==="address")return Vh("uint160",nv(e));if(t==="bool")return Vh("uint8",e?1:0);if(t==="string")return Vh("bytes",new Buffer(e,"utf8"));if(bpt(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=Jve(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(o in e)i.push(Vh(t,e[o]));if(r==="dynamic"){var s=Vh("uint256",e.length);i.unshift(s)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([Vh("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,xc.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=_4(t),r<1||r>32)throw new Error("Invalid bytes width: "+r);return xc.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=_4(t),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);n=nv(e);let c=xc.bitLengthFromBigInt(n);if(c>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+c);if(n<0)throw new Error("Supplied uint is negative");return xc.bufferBEFromBigInt(n,32)}else if(t.startsWith("int")){if(r=_4(t),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);n=nv(e);let c=xc.bitLengthFromBigInt(n);if(c>r)throw new Error("Supplied int exceeds width: "+r+" vs "+c);let l=xc.twosFromBigInt(n,256);return xc.bufferBEFromBigInt(l,32)}else if(t.startsWith("ufixed")){if(r=Zve(t),n=nv(e),n<0)throw new Error("Supplied ufixed is negative");return Vh("uint256",n*BigInt(2)**BigInt(r[1]))}else if(t.startsWith("fixed"))return r=Zve(t),Vh("int256",nv(e)*BigInt(2)**BigInt(r[1]))}throw new Error("Unsupported or invalid type: "+t)}function ypt(t){return t==="string"||t==="bytes"||Jve(t)==="dynamic"}function bpt(t){return t.lastIndexOf("]")===t.length-1}function xpt(t,e){var r=[],n=[],i=32*t.length;for(var o in t){var s=Yve(t[o]),c=e[o],l=Vh(s,c);ypt(s)?(r.push(Vh("uint256",i)),n.push(l),i+=l.length):r.push(l)}return Buffer.concat(r.concat(n))}function Xve(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],o=0;o32)throw new Error("Invalid bytes width: "+r);i.push(xc.setLengthRight(c,r))}else if(s.startsWith("uint")){if(r=_4(s),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);n=nv(c);let l=xc.bitLengthFromBigInt(n);if(l>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+l);i.push(xc.bufferBEFromBigInt(n,r/8))}else if(s.startsWith("int")){if(r=_4(s),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);n=nv(c);let l=xc.bitLengthFromBigInt(n);if(l>r)throw new Error("Supplied int exceeds width: "+r+" vs "+l);let u=xc.twosFromBigInt(n,r);i.push(xc.bufferBEFromBigInt(u,r/8))}else throw new Error("Unsupported or invalid type: "+s)}return Buffer.concat(i)}function Cpt(t,e){return xc.keccak(Xve(t,e))}eye.exports={rawEncode:xpt,solidityPack:Xve,soliditySHA3:Cpt}});var iye=X((Q6r,nye)=>{var g0=YG(),CE=tye(),rye={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},JG={encodeData(t,e,r,n=!0){let i=["bytes32"],o=[this.hashType(t,r)];if(n){let s=(c,l,u)=>{if(r[l]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":g0.keccak(this.encodeData(l,u,r,n))];if(u===void 0)throw new Error(`missing value for field ${c} of type ${l}`);if(l==="bytes")return["bytes32",g0.keccak(u)];if(l==="string")return typeof u=="string"&&(u=Buffer.from(u,"utf8")),["bytes32",g0.keccak(u)];if(l.lastIndexOf("]")===l.length-1){let d=l.slice(0,l.lastIndexOf("[")),p=u.map(v=>s(c,d,v));return["bytes32",g0.keccak(CE.rawEncode(p.map(([v])=>v),p.map(([,v])=>v)))]}return[l,u]};for(let c of r[t]){let[l,u]=s(c.name,c.type,e[c.name]);i.push(l),o.push(u)}}else for(let s of r[t]){let c=e[s.name];if(c!==void 0)if(s.type==="bytes")i.push("bytes32"),c=g0.keccak(c),o.push(c);else if(s.type==="string")i.push("bytes32"),typeof c=="string"&&(c=Buffer.from(c,"utf8")),c=g0.keccak(c),o.push(c);else if(r[s.type]!==void 0)i.push("bytes32"),c=g0.keccak(this.encodeData(s.type,c,r,n)),o.push(c);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(s.type),o.push(c)}}return CE.rawEncode(i,o)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(let i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:s,type:c})=>c+" "+s).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(let n of e[t])for(let i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return g0.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return g0.keccak(this.encodeType(t,e))},sanitizeData(t){let e={};for(let r in rye.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){let r=this.sanitizeData(t),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),g0.keccak(Buffer.concat(n))}};nye.exports={TYPED_MESSAGE_SCHEMA:rye,TypedDataUtils:JG,hashForSignTypedDataLegacy:function(t){return Ept(t.data)},hashForSignTypedData_v3:function(t){return JG.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return JG.hash(t.data)}};function Ept(t){let e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;let r=t.map(function(o){return o.type==="bytes"?g0.toBuffer(o.value):o.value}),n=t.map(function(o){return o.type}),i=t.map(function(o){if(!o.name)throw e;return o.type+" "+o.name});return CE.soliditySHA3(["bytes32","bytes32"],[CE.soliditySHA3(new Array(t.length).fill("string"),i),CE.soliditySHA3(n,r)])}});var pP=X(Vg=>{"use strict";Object.defineProperty(Vg,"__esModule",{value:!0});Vg.APP_VERSION_KEY=Vg.LOCAL_STORAGE_ADDRESSES_KEY=Vg.WALLET_USER_NAME_KEY=void 0;Vg.WALLET_USER_NAME_KEY="walletUsername";Vg.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Vg.APP_VERSION_KEY="AppVersion"});var eQ=X(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:!0});mP.RelayEventManager=void 0;var Apt=qh(),XG=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,r=(0,Apt.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}};mP.RelayEventManager=XG});var oye=X(wP=>{"use strict";Object.defineProperty(wP,"__esModule",{value:!0});wP.WalletLinkCipher=void 0;var gP=qh(),tQ=class{constructor(e){this.secret=e}async encrypt(e){let r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");let n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,gP.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,o.encode(e)),c=16,l=s.slice(s.byteLength-c),u=s.slice(0,s.byteLength-c),d=new Uint8Array(l),p=new Uint8Array(u),v=new Uint8Array([...n,...d,...p]);return(0,gP.uint8ArrayToHex)(v)}async decrypt(e){let r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){let o=await crypto.subtle.importKey("raw",(0,gP.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=(0,gP.hexStringToUint8Array)(e),c=s.slice(0,12),l=s.slice(12,28),u=s.slice(28),d=new Uint8Array([...u,...l]),p={name:"AES-GCM",iv:new Uint8Array(c)};try{let v=await window.crypto.subtle.decrypt(p,o,d),y=new TextDecoder;n(y.decode(v))}catch(v){i(v)}})()})}};wP.WalletLinkCipher=tQ});var sye=X(vP=>{"use strict";Object.defineProperty(vP,"__esModule",{value:!0});vP.WalletLinkHTTP=void 0;var rQ=class{constructor(e,r,n){this.linkAPIUrl=e,this.sessionId=r;let i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var e;let r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){let{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);let o=(e=n?.filter(s=>s.event==="Web3Response").map(s=>({type:"Event",sessionId:this.sessionId,eventId:s.id,event:s.event,data:s.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(o),o}throw new Error(`Check unseen events failed: ${r.status}`)}};vP.WalletLinkHTTP=rQ});var aye=X(T4=>{"use strict";Object.defineProperty(T4,"__esModule",{value:!0});T4.WalletLinkWebSocket=T4.ConnectionState=void 0;var I4;(function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"})(I4||(T4.ConnectionState=I4={}));var nQ=class{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(o){r(o);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,I4.CONNECTING),i.onclose=o=>{var s;this.clearWebSocket(),r(new Error(`websocket error ${o.code}: ${o.reason}`)),(s=this.connectionStateListener)===null||s===void 0||s.call(this,I4.DISCONNECTED)},i.onopen=o=>{var s;e(),(s=this.connectionStateListener)===null||s===void 0||s.call(this,I4.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},i.onmessage=o=>{var s,c;if(o.data==="h")(s=this.incomingDataListener)===null||s===void 0||s.call(this,{type:"Heartbeat"});else try{let l=JSON.parse(o.data);(c=this.incomingDataListener)===null||c===void 0||c.call(this,l)}catch{}}})}disconnect(){var e;let{webSocket:r}=this;if(r){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,I4.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){let{webSocket:r}=this;if(!r){this.pendingData.push(e),this.connect();return}r.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}};T4.WalletLinkWebSocket=nQ});var uye=X(bP=>{"use strict";Object.defineProperty(bP,"__esModule",{value:!0});bP.WalletLinkConnection=void 0;var cye=pP(),Spt=oye(),_pt=sye(),yP=aye(),k4=jN(),lye=1e4,Ipt=6e4,iQ=class{constructor({session:e,linkAPIUrl:r,listener:n,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,k4.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=s=>{if(!s)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",l=>s.JsonRpcUrl&&this.handleChainUpdated(l,s.JsonRpcUrl)]]).forEach((l,u)=>{let d=s[u];d!==void 0&&l(d)})},this.handleDestroyed=s=>{var c;s==="1"&&((c=this.listener)===null||c===void 0||c.resetAndReload())},this.handleAccountUpdated=async s=>{var c;{let l=await this.cipher.decrypt(s);(c=this.listener)===null||c===void 0||c.accountUpdated(l)}},this.handleMetadataUpdated=async(s,c)=>{var l;{let u=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.metadataUpdated(s,u)}},this.handleWalletUsernameUpdated=async s=>{this.handleMetadataUpdated(cye.WALLET_USER_NAME_KEY,s)},this.handleAppVersionUpdated=async s=>{this.handleMetadataUpdated(cye.APP_VERSION_KEY,s)},this.handleChainUpdated=async(s,c)=>{var l;{let u=await this.cipher.decrypt(s),d=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.chainUpdated(u,d)}},this.session=e,this.cipher=new Spt.WalletLinkCipher(e.secret),this.listener=n;let o=new yP.WalletLinkWebSocket(`${r}/rpc`,i);o.setConnectionStateListener(async s=>{let c=!1;switch(s){case yP.ConnectionState.DISCONNECTED:if(!this.destroyed){let l=async()=>{await new Promise(u=>setTimeout(u,5e3)),this.destroyed||o.connect().catch(()=>{l()})};l()}break;case yP.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),c=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},lye),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case yP.ConnectionState.CONNECTING:break}this.connected!==c&&(this.connected=c)}),o.setIncomingDataListener(s=>{var c;switch(s.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let l=s.type==="IsLinkedOK"?s.linked:void 0;this.linked=l||s.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{this.handleSessionMetadataUpdated(s.metadata);break}case"Event":{this.handleIncomingEvent(s);break}}s.id!==void 0&&((c=this.requestResolutions.get(s.id))===null||c===void 0||c(s))}),this.ws=o,this.http=new _pt.WalletLinkHTTP(r,e.id,e.key)}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.ws.connect()}destroy(){this.destroyed=!0,this.ws.disconnect(),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var r;this._connected=e,e&&((r=this.onceConnected)===null||r===void 0||r.call(this))}setOnceConnected(e){return new Promise(r=>{this.connected?e().then(r):this.onceConnected=()=>{e().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var r,n;this._linked=e,e&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(r=>{this.linked?e().then(r):this.onceLinked=()=>{e().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(e){var r;if(!(e.type!=="Event"||e.event!=="Web3Response")){let n=await this.cipher.decrypt(e.data),i=JSON.parse(n);if(i.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(i)}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(e,r){let n={type:"SetSessionConfig",id:(0,k4.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:r}};return this.setOnceConnected(async()=>{let i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,r,n=!1){let i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:"coinbaseWalletExtension"in window&&window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),o={type:"PublishEvent",id:(0,k4.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{let s=await this.makeRequest(o);if(s.type==="Fail")throw new Error(s.error||"failed to publish event");return s.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>lye*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,r=Ipt){let n=e.id;this.sendData(e);let i;return Promise.race([new Promise((o,s)=>{i=window.setTimeout(()=>{s(new Error(`request ${n} timed out`))},r)}),new Promise(o=>{this.requestResolutions.set(n,s=>{clearTimeout(i),o(s),this.requestResolutions.delete(n)})})])}async authenticate(){let e={type:"HostSession",id:(0,k4.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(e);if(r.type==="Fail")throw new Error(r.error||"failed to authenticate")}sendIsLinked(){let e={type:"IsLinked",id:(0,k4.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){let e={type:"GetSessionConfig",id:(0,k4.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}};bP.WalletLinkConnection=iQ});var iv=X((r4r,hye)=>{var fye=y1().Buffer;function xP(t,e){this._block=fye.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}xP.prototype.update=function(t,e){typeof t=="string"&&(e=e||"utf8",t=fye.from(t,e));for(var r=this._block,n=this._blockSize,i=t.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o};xP.prototype._update=function(){throw new Error("_update must be implemented by subclass")};hye.exports=xP});var mye=X((n4r,pye)=>{var Tpt=rf(),dye=iv(),kpt=y1().Buffer,Rpt=[1518500249,1859775393,-1894007588,-899497514],Mpt=new Array(80);function EE(){this.init(),this._w=Mpt,dye.call(this,64,56)}Tpt(EE,dye);EE.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Npt(t){return t<<5|t>>>27}function Ppt(t){return t<<30|t>>>2}function Opt(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}EE.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=0;c<16;++c)e[c]=t.readInt32BE(c*4);for(;c<80;++c)e[c]=e[c-3]^e[c-8]^e[c-14]^e[c-16];for(var l=0;l<80;++l){var u=~~(l/20),d=Npt(r)+Opt(u,n,i,o)+s+e[l]+Rpt[u]|0;s=o,o=i,i=Ppt(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0};EE.prototype._hash=function(){var t=kpt.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};pye.exports=EE});var vye=X((i4r,wye)=>{var Bpt=rf(),gye=iv(),Lpt=y1().Buffer,Fpt=[1518500249,1859775393,-1894007588,-899497514],Upt=new Array(80);function AE(){this.init(),this._w=Upt,gye.call(this,64,56)}Bpt(AE,gye);AE.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function Dpt(t){return t<<1|t>>>31}function jpt(t){return t<<5|t>>>27}function $pt(t){return t<<30|t>>>2}function qpt(t,e,r,n){return t===0?e&r|~e&n:t===2?e&r|e&n|r&n:e^r^n}AE.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=0;c<16;++c)e[c]=t.readInt32BE(c*4);for(;c<80;++c)e[c]=Dpt(e[c-3]^e[c-8]^e[c-14]^e[c-16]);for(var l=0;l<80;++l){var u=~~(l/20),d=jpt(r)+qpt(u,n,i,o)+s+e[l]+Fpt[u]|0;s=o,o=i,i=$pt(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0};AE.prototype._hash=function(){var t=Lpt.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};wye.exports=AE});var oQ=X((o4r,bye)=>{var Hpt=rf(),yye=iv(),zpt=y1().Buffer,Wpt=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Vpt=new Array(64);function SE(){this.init(),this._w=Vpt,yye.call(this,64,56)}Hpt(SE,yye);SE.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function Kpt(t,e,r){return r^t&(e^r)}function Gpt(t,e,r){return t&e|r&(t|e)}function Qpt(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Zpt(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Ypt(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function Jpt(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}SE.prototype._update=function(t){for(var e=this._w,r=this._a|0,n=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=this._f|0,l=this._g|0,u=this._h|0,d=0;d<16;++d)e[d]=t.readInt32BE(d*4);for(;d<64;++d)e[d]=Jpt(e[d-2])+e[d-7]+Ypt(e[d-15])+e[d-16]|0;for(var p=0;p<64;++p){var v=u+Zpt(s)+Kpt(s,c,l)+Wpt[p]+e[p]|0,y=Qpt(r)+Gpt(r,n,i)|0;u=l,l=c,c=s,s=o+v|0,o=i,i=n,n=r,r=v+y|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0,this._f=c+this._f|0,this._g=l+this._g|0,this._h=u+this._h|0};SE.prototype._hash=function(){var t=zpt.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};bye.exports=SE});var Cye=X((s4r,xye)=>{var Xpt=rf(),e1t=oQ(),t1t=iv(),r1t=y1().Buffer,n1t=new Array(64);function CP(){this.init(),this._w=n1t,t1t.call(this,64,56)}Xpt(CP,e1t);CP.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};CP.prototype._hash=function(){var t=r1t.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};xye.exports=CP});var sQ=X((a4r,kye)=>{var i1t=rf(),Tye=iv(),o1t=y1().Buffer,Eye=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s1t=new Array(160);function _E(){this.init(),this._w=s1t,Tye.call(this,128,112)}i1t(_E,Tye);_E.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Aye(t,e,r){return r^t&(e^r)}function Sye(t,e,r){return t&e|r&(t|e)}function _ye(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Iye(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function a1t(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function c1t(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function l1t(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function u1t(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function js(t,e){return t>>>0>>0?1:0}_E.prototype._update=function(t){for(var e=this._w,r=this._ah|0,n=this._bh|0,i=this._ch|0,o=this._dh|0,s=this._eh|0,c=this._fh|0,l=this._gh|0,u=this._hh|0,d=this._al|0,p=this._bl|0,v=this._cl|0,y=this._dl|0,_=this._el|0,R=this._fl|0,P=this._gl|0,k=this._hl|0,M=0;M<32;M+=2)e[M]=t.readInt32BE(M*4),e[M+1]=t.readInt32BE(M*4+4);for(;M<160;M+=2){var L=e[M-30],D=e[M-15*2+1],j=a1t(L,D),V=c1t(D,L);L=e[M-2*2],D=e[M-2*2+1];var K=l1t(L,D),B=u1t(D,L),W=e[M-7*2],z=e[M-7*2+1],q=e[M-16*2],Q=e[M-16*2+1],f=V+z|0,h=j+W+js(f,V)|0;f=f+B|0,h=h+K+js(f,B)|0,f=f+Q|0,h=h+q+js(f,Q)|0,e[M]=h,e[M+1]=f}for(var g=0;g<160;g+=2){h=e[g],f=e[g+1];var x=Sye(r,n,i),S=Sye(d,p,v),T=_ye(r,d),N=_ye(d,r),I=Iye(s,_),m=Iye(_,s),C=Eye[g],Y=Eye[g+1],ne=Aye(s,c,l),b=Aye(_,R,P),H=k+m|0,G=u+I+js(H,k)|0;H=H+b|0,G=G+ne+js(H,b)|0,H=H+Y|0,G=G+C+js(H,Y)|0,H=H+f|0,G=G+h+js(H,f)|0;var U=N+S|0,se=T+x+js(U,N)|0;u=l,k=P,l=c,P=R,c=s,R=_,_=y+H|0,s=o+G+js(_,y)|0,o=i,y=v,i=n,v=p,n=r,p=d,d=H+U|0,r=G+se+js(d,H)|0}this._al=this._al+d|0,this._bl=this._bl+p|0,this._cl=this._cl+v|0,this._dl=this._dl+y|0,this._el=this._el+_|0,this._fl=this._fl+R|0,this._gl=this._gl+P|0,this._hl=this._hl+k|0,this._ah=this._ah+r+js(this._al,d)|0,this._bh=this._bh+n+js(this._bl,p)|0,this._ch=this._ch+i+js(this._cl,v)|0,this._dh=this._dh+o+js(this._dl,y)|0,this._eh=this._eh+s+js(this._el,_)|0,this._fh=this._fh+c+js(this._fl,R)|0,this._gh=this._gh+l+js(this._gl,P)|0,this._hh=this._hh+u+js(this._hl,k)|0};_E.prototype._hash=function(){var t=o1t.allocUnsafe(64);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};kye.exports=_E});var Mye=X((c4r,Rye)=>{var f1t=rf(),h1t=sQ(),d1t=iv(),p1t=y1().Buffer,m1t=new Array(160);function EP(){this.init(),this._w=m1t,d1t.call(this,128,112)}f1t(EP,h1t);EP.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};EP.prototype._hash=function(){var t=p1t.allocUnsafe(48);function e(r,n,i){t.writeInt32BE(r,i),t.writeInt32BE(n,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};Rye.exports=EP});var aQ=X((x1,Nye)=>{var x1=Nye.exports=function(e){e=e.toLowerCase();var r=x1[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};x1.sha=mye();x1.sha1=vye();x1.sha224=Cye();x1.sha256=oQ();x1.sha384=Mye();x1.sha512=sQ()});var Fye=X(AP=>{"use strict";Object.defineProperty(AP,"__esModule",{value:!0});AP.WalletLinkSession=void 0;var g1t=aQ(),Pye=qh(),Oye="session:id",Bye="session:secret",Lye="session:linked",cQ=class t{constructor(e,r,n,i){this._storage=e,this._id=r||(0,Pye.randomBytesHex)(16),this._secret=n||(0,Pye.randomBytesHex)(32),this._key=new g1t.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){let r=e.getItem(Oye),n=e.getItem(Lye),i=e.getItem(Bye);return r&&i?new t(e,r,i,n==="1"):null}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(Oye,this._id),this._storage.setItem(Bye,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Lye,this._linked?"1":"0")}};AP.WalletLinkSession=cQ});var IE=X(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});Kh.isDarkMode=Kh.isMobileWeb=Kh.getLocation=Kh.createQrUrl=void 0;function w1t(t,e,r,n,i,o){let s=n?"parent-id":"id",c=new URLSearchParams({[s]:t,secret:e,server:r,v:i,chainId:o.toString()}).toString();return`${r}/#/link?${c}`}Kh.createQrUrl=w1t;function v1t(){try{return window.frameElement!==null}catch{return!1}}function y1t(){try{return v1t()&&window.top?window.top.location:window.location}catch{return window.location}}Kh.getLocation=y1t;function b1t(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window?.navigator)===null||t===void 0?void 0:t.userAgent)}Kh.isMobileWeb=b1t;function x1t(){var t,e;return(e=(t=window?.matchMedia)===null||t===void 0?void 0:t.call(window,"(prefers-color-scheme: dark)").matches)!==null&&e!==void 0?e:!1}Kh.isDarkMode=x1t});var Uye=X(lQ=>{"use strict";Object.defineProperty(lQ,"__esModule",{value:!0});lQ.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'});var uQ=X(R4=>{"use strict";var C1t=R4&&R4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R4,"__esModule",{value:!0});R4.injectCssReset=void 0;var E1t=C1t(Uye());function A1t(){let t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(E1t.default)),document.documentElement.appendChild(t)}R4.injectCssReset=A1t});var Kg=X((d4r,fQ)=>{function jye(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;ekE,Fragment:()=>NE,cloneElement:()=>M1t,createContext:()=>N1t,createElement:()=>Zye,createRef:()=>_1t,h:()=>Zye,hydrate:()=>nbe,isValidElement:()=>Wye,options:()=>zi,render:()=>rbe,toChildArray:()=>ebe});function C1(t,e){for(var r in e)t[r]=e[r];return t}function Qye(t){var e=t.parentNode;e&&e.removeChild(t)}function Zye(t,e,r){var n,i,o,s={};for(o in e)o=="key"?n=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?ME.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return TE(t,s,n,i,null)}function TE(t,e,r,n,i){var o={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++zye,__i:-1,__u:0};return i==null&&zi.vnode!=null&&zi.vnode(o),o}function _1t(){return{current:null}}function NE(t){return t.children}function kE(t,e){this.props=t,this.context=e}function sv(t,e){if(e==null)return t.__?sv(t.__,t.__i+1):null;for(var r;ee&&ov.sort(hQ));_P.__r=0}function Jye(t,e,r,n,i,o,s,c,l,u,d){var p,v,y,_,R,P=n&&n.__k||Gye,k=e.length;for(r.__d=l,I1t(r,e,P),l=r.__d,p=0;p0?TE(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=t,i.__b=t.__b+1,c=T1t(i,r,s,d),i.__i=c,o=null,c!==-1&&(d--,(o=r[c])&&(o.__u|=131072)),o==null||o.__v===null?(c==-1&&p--,typeof i.type!="function"&&(i.__u|=65536)):c!==s&&(c==s-1?p--:c==s+1?p++:c>s?d>l-s?p+=c-s:p--:c(l!=null&&!(131072&l.__u)?1:0))for(;s>=0||c=0){if((l=e[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(c2&&(c.children=arguments.length>3?ME.call(arguments,2):r),TE(t.type,c,n||t.key,i||t.ref,null)}function N1t(t,e){var r={__c:e="__cC"+Kye++,__:t,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(c){c.__e=!0,mQ(c)})},this.sub=function(s){i.push(s);var c=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.splice(i.indexOf(s),1),c&&c.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}var ME,zi,zye,Wye,ov,$ye,Vye,hQ,wQ,dQ,pQ,Kye,RE,Gye,S1t,IP,$s=F(()=>{RE={},Gye=[],S1t=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,IP=Array.isArray;ME=Gye.slice,zi={__e:function(t,e,r,n){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),s=i.__d),s)return i.__E=i}catch(c){t=c}throw t}},zye=0,Wye=function(t){return t!=null&&t.constructor==null},kE.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C1({},this.state),typeof t=="function"&&(t=t(C1({},r),this.props)),t&&C1(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),mQ(this))},kE.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mQ(this))},kE.prototype.render=NE,ov=[],Vye=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,hQ=function(t,e){return t.__v.__b-e.__v.__b},_P.__r=0,wQ=0,dQ=Hye(!1),pQ=Hye(!0),Kye=0});var N4={};Hr(N4,{useCallback:()=>L1t,useContext:()=>F1t,useDebugValue:()=>U1t,useEffect:()=>P1t,useErrorBoundary:()=>D1t,useId:()=>j1t,useImperativeHandle:()=>B1t,useLayoutEffect:()=>mbe,useMemo:()=>CQ,useReducer:()=>pbe,useRef:()=>O1t,useState:()=>dbe});function av(t,e){uo.__h&&uo.__h(Ri,t,M4||e),M4=0;var r=Ri.__H||(Ri.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function dbe(t){return M4=1,pbe(gbe,t)}function pbe(t,e,r){var n=av(E1++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):gbe(void 0,e),function(c){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,c);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=Ri,!Ri.u)){var i=function(c,l,u){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(v){return!!v.__c});if(d.every(function(v){return!v.__N}))return!o||o.call(this,c,l,u);var p=!1;return d.forEach(function(v){if(v.__N){var y=v.__[0];v.__=v.__N,v.__N=void 0,y!==v.__[0]&&(p=!0)}}),!(!p&&n.__c.props===c)&&(!o||o.call(this,c,l,u))};Ri.u=!0;var o=Ri.shouldComponentUpdate,s=Ri.componentWillUpdate;Ri.componentWillUpdate=function(c,l,u){if(this.__e){var d=o;o=void 0,i(c,l,u),o=d}s&&s.call(this,c,l,u)},Ri.shouldComponentUpdate=i}return n.__N||n.__}function P1t(t,e){var r=av(E1++,3);!uo.__s&&EQ(r.__H,e)&&(r.__=t,r.i=e,Ri.__H.__h.push(r))}function mbe(t,e){var r=av(E1++,4);!uo.__s&&EQ(r.__H,e)&&(r.__=t,r.i=e,Ri.__h.push(r))}function O1t(t){return M4=5,CQ(function(){return{current:t}},[])}function B1t(t,e,r){M4=6,mbe(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function CQ(t,e){var r=av(E1++,7);return EQ(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function L1t(t,e){return M4=8,CQ(function(){return t},e)}function F1t(t){var e=Ri.context[t.__c],r=av(E1++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(Ri)),e.props.value):t.__}function U1t(t,e){uo.useDebugValue&&uo.useDebugValue(e?e(t):t)}function D1t(t){var e=av(E1++,10),r=dbe();return e.__=t,Ri.componentDidCatch||(Ri.componentDidCatch=function(n,i){e.__&&e.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function j1t(){var t=av(E1++,11);if(!t.__){for(var e=Ri.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function $1t(){for(var t;t=hbe.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(TP),t.__H.__h.forEach(xQ),t.__H.__h=[]}catch(e){t.__H.__h=[],uo.__e(e,t.__v)}}function q1t(t){var e,r=function(){clearTimeout(n),fbe&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);fbe&&(e=requestAnimationFrame(r))}function TP(t){var e=Ri,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),Ri=e}function xQ(t){var e=Ri;t.__c=t.__(),Ri=e}function EQ(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function gbe(t,e){return typeof e=="function"?e(t):e}var E1,Ri,bQ,ibe,M4,hbe,uo,obe,sbe,abe,cbe,lbe,ube,fbe,P4=F(()=>{$s();M4=0,hbe=[],uo=zi,obe=uo.__b,sbe=uo.__r,abe=uo.diffed,cbe=uo.__c,lbe=uo.unmount,ube=uo.__;uo.__b=function(t){Ri=null,obe&&obe(t)},uo.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ube&&ube(t,e)},uo.__r=function(t){sbe&&sbe(t),E1=0;var e=(Ri=t.__c).__H;e&&(bQ===Ri?(e.__h=[],Ri.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(TP),e.__h.forEach(xQ),e.__h=[],E1=0)),bQ=Ri},uo.diffed=function(t){abe&&abe(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(hbe.push(e)!==1&&ibe===uo.requestAnimationFrame||((ibe=uo.requestAnimationFrame)||q1t)($1t)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),bQ=Ri=null},uo.__c=function(t,e){e.some(function(r){try{r.__h.forEach(TP),r.__h=r.__h.filter(function(n){return!n.__||xQ(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],uo.__e(n,r.__v)}}),cbe&&cbe(t,e)},uo.unmount=function(t){lbe&&lbe(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{TP(n)}catch(i){e=i}}),r.__H=void 0,e&&uo.__e(e,r.__v))};fbe=typeof requestAnimationFrame=="function"});var wbe=X(AQ=>{"use strict";Object.defineProperty(AQ,"__esModule",{value:!0});AQ.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"});var IQ=X(of=>{"use strict";var vbe=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});of.SnackbarInstance=of.SnackbarContainer=of.Snackbar=void 0;var kP=vbe(Kg()),ss=($s(),Vn(ha)),SQ=(P4(),Vn(N4)),H1t=IE(),z1t=vbe(wbe()),W1t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",V1t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",_Q=class{constructor(){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=(0,H1t.isDarkMode)()}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let r=this.nextItemKey++;return this.items.set(r,e),this.render(),()=>{this.items.delete(r),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,ss.render)((0,ss.h)("div",null,(0,ss.h)(of.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,r])=>(0,ss.h)(of.SnackbarInstance,Object.assign({},r,{key:e}))))),this.root)}};of.Snackbar=_Q;var K1t=t=>(0,ss.h)("div",{class:(0,kP.default)("-cbwsdk-snackbar-container")},(0,ss.h)("style",null,z1t.default),(0,ss.h)("div",{class:"-cbwsdk-snackbar"},t.children));of.SnackbarContainer=K1t;var G1t=({autoExpand:t,message:e,menuItems:r})=>{let[n,i]=(0,SQ.useState)(!0),[o,s]=(0,SQ.useState)(t??!1);(0,SQ.useEffect)(()=>{let l=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{s(!0)},1e4)];return()=>{l.forEach(window.clearTimeout)}});let c=()=>{s(!o)};return(0,ss.h)("div",{class:(0,kP.default)("-cbwsdk-snackbar-instance",n&&"-cbwsdk-snackbar-instance-hidden",o&&"-cbwsdk-snackbar-instance-expanded")},(0,ss.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:c},(0,ss.h)("img",{src:W1t,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,ss.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),(0,ss.h)("div",{class:"-gear-container"},!o&&(0,ss.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,ss.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,ss.h)("img",{src:V1t,class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,ss.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map((l,u)=>(0,ss.h)("div",{class:(0,kP.default)("-cbwsdk-snackbar-instance-menu-item",l.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:l.onClick,key:u},(0,ss.h)("svg",{width:l.svgWidth,height:l.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,ss.h)("path",{"fill-rule":l.defaultFillRule,"clip-rule":l.defaultClipRule,d:l.path,fill:"#AAAAAA"})),(0,ss.h)("span",{class:(0,kP.default)("-cbwsdk-snackbar-instance-menu-item-info",l.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},l.info)))))};of.SnackbarInstance=G1t});var ybe=X(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});RP.WalletLinkRelayUI=void 0;var Q1t=uQ(),Z1t=IQ(),TQ=class{constructor(){this.attached=!1,this.snackbar=new Z1t.Snackbar}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.snackbar.attach(r),this.attached=!0,(0,Q1t.injectCssReset)()}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:r={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}};RP.WalletLinkRelayUI=TQ});var bbe=X(kQ=>{"use strict";Object.defineProperty(kQ,"__esModule",{value:!0});kQ.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"});var Cbe=X(O4=>{"use strict";var xbe=O4&&O4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(O4,"__esModule",{value:!0});O4.RedirectDialog=void 0;var Y1t=xbe(Kg()),Gh=($s(),Vn(ha)),J1t=uQ(),X1t=IQ(),emt=IE(),tmt=xbe(bbe()),RQ=class{constructor(){this.root=null,this.darkMode=(0,emt.isDarkMode)()}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,J1t.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,Gh.render)(null,this.root),e&&(0,Gh.render)((0,Gh.h)(rmt,Object.assign({},e,{onDismiss:()=>{this.clear()},darkMode:this.darkMode})),this.root))}};O4.RedirectDialog=RQ;var rmt=({title:t,buttonText:e,darkMode:r,onButtonClick:n,onDismiss:i})=>{let o=r?"dark":"light";return(0,Gh.h)(X1t.SnackbarContainer,{darkMode:r},(0,Gh.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,Gh.h)("style",null,tmt.default),(0,Gh.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,Gh.h)("div",{class:(0,Y1t.default)("-cbwsdk-redirect-dialog-box",o)},(0,Gh.h)("p",null,t),(0,Gh.h)("button",{onClick:n},e))))}});var MP=X(Gg=>{"use strict";Object.defineProperty(Gg,"__esModule",{value:!0});Gg.CBW_MOBILE_DEEPLINK_URL=Gg.WALLETLINK_URL=Gg.CB_KEYS_URL=void 0;Gg.CB_KEYS_URL="https://keys.coinbase.com/connect";Gg.WALLETLINK_URL="https://www.walletlink.org";Gg.CBW_MOBILE_DEEPLINK_URL="https://go.cb-w.com/walletlink"});var Ebe=X(NP=>{"use strict";Object.defineProperty(NP,"__esModule",{value:!0});NP.WLMobileRelayUI=void 0;var nmt=Cbe(),imt=IE(),omt=MP(),MQ=class{constructor(){this.attached=!1,this.redirectDialog=new nmt.RedirectDialog}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}redirectToCoinbaseWallet(e){let r=new URL(omt.CBW_MOBILE_DEEPLINK_URL);r.searchParams.append("redirect_url",(0,imt.getLocation)().href),e&&r.searchParams.append("wl_url",e);let n=document.createElement("a");n.target="cbw-opener",n.href=r.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}};NP.WLMobileRelayUI=MQ});var Sbe=X(OP=>{"use strict";Object.defineProperty(OP,"__esModule",{value:!0});OP.WalletLinkRelay=void 0;var smt=uye(),amt=pP(),cmt=eQ(),NQ=Fye(),B4=FN(),lmt=IE(),umt=ybe(),Abe=Ebe(),fmt=$h(),Zo=qh(),hmt=$g(),PP=class t{constructor(e){this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.isMobileWeb=(0,lmt.isMobileWeb)(),this.appName="",this.appLogoUrl=null,this.linkedUpdated=o=>{this.isLinked=o;let s=this.storage.getItem(amt.LOCAL_STORAGE_ADDRESSES_KEY);if(o&&(this._session.linked=o),this.isUnlinkedErrorState=!1,s){let c=s.split(" "),l=this.storage.getItem("IsStandaloneSigning")==="true";c[0]!==""&&!o&&this._session.linked&&!l&&(this.isUnlinkedErrorState=!0)}},this.metadataUpdated=(o,s)=>{this.storage.setItem(o,s)},this.chainUpdated=(o,s)=>{this.chainCallbackParams.chainId===o&&this.chainCallbackParams.jsonRpcUrl===s||(this.chainCallbackParams={chainId:o,jsonRpcUrl:s},this.chainCallback&&this.chainCallback(o,s))},this.accountUpdated=o=>{this.accountsCallback&&this.accountsCallback([o]),t.accountRequestCallbackIds.size>0&&(Array.from(t.accountRequestCallbackIds.values()).forEach(s=>{let c={type:"WEB3_RESPONSE",id:s,response:{method:"requestEthereumAccounts",result:[o]}};this.invokeCallback(Object.assign(Object.assign({},c),{id:s}))}),t.accountRequestCallbackIds.clear())},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage;let{session:r,ui:n,connection:i}=this.subscribe();this._session=r,this.connection=i,this.relayEventManager=new cmt.RelayEventManager,this.ui=n}subscribe(){let e=NQ.WalletLinkSession.load(this.storage)||new NQ.WalletLinkSession(this.storage).save(),{linkAPIUrl:r}=this,n=new smt.WalletLinkConnection({session:e,linkAPIUrl:r,listener:this}),i=this.isMobileWeb?new Abe.WLMobileRelayUI:new umt.WalletLinkRelayUI;return n.connect(),{session:e,ui:i,connection:n}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{this.connection.destroy();let e=NQ.WalletLinkSession.load(this.storage);e?.id===this._session.id&&hmt.ScopedLocalStorage.clearAll(),document.location.reload()}).catch(e=>{})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,Zo.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,Zo.hexStringFromBuffer)(e,!0),signature:(0,Zo.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Zo.bigIntStringFromBigInt)(e.weiValue),data:(0,Zo.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Zo.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,Zo.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,Zo.bigIntStringFromBigInt)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,Zo.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,Zo.bigIntStringFromBigInt)(e.weiValue),data:(0,Zo.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,Zo.bigIntStringFromBigInt)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,Zo.bigIntStringFromBigInt)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,Zo.bigIntStringFromBigInt)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,Zo.bigIntStringFromBigInt)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,Zo.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getWalletLinkSession(){return this._session}genericRequest(e,r){return this.sendRequest({method:"generic",params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null,n=(0,Zo.randomBytesHex)(8),i=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,o),r?.()};return new Promise((o,s)=>{r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}),this.relayEventManager.callbacks.set(n,c=>{if(r?.(),(0,B4.isErrorResponse)(c))return s(new Error(c.errorMessage));o(c)}),this.publishWeb3RequestEvent(n,e)})}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e}publishWeb3RequestEvent(e,r){let n={type:"WEB3_REQUEST",id:e,request:r};this.publishEvent("Web3Request",n,!0).then(i=>{}).catch(i=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n.id,response:{method:r.method,errorMessage:i.message}})}),this.isMobileWeb&&this.openCoinbaseWalletDeeplink(r.method)}openCoinbaseWalletDeeplink(e){if(this.ui instanceof Abe.WLMobileRelayUI)switch(e){case"requestEthereumAccounts":case"switchEthereumChain":return;default:window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0}),this.ui.openCoinbaseWalletDeeplink();break}}publishWeb3RequestCanceledEvent(e){let r={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(e,r,n){return this.connection.publishEvent(e,r,n)}handleWeb3ResponseMessage(e){let{response:r}=e;if(r.method==="requestEthereumAccounts"){t.accountRequestCallbackIds.forEach(n=>this.invokeCallback(Object.assign(Object.assign({},e),{id:n}))),t.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n){var i;let o=(i=n?.message)!==null&&i!==void 0?i:"Unspecified error message.";this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:r,errorMessage:o}})}invokeCallback(e){let r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){let e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=null,n=(0,Zo.randomBytesHex)(8);return new Promise((i,o)=>{this.relayEventManager.callbacks.set(n,s=>{if(r?.(),(0,B4.isErrorResponse)(s))return o(new Error(s.errorMessage));i(s)}),t.accountRequestCallbackIds.add(n),this.publishWeb3RequestEvent(n,e)})}watchAsset(e,r,n,i,o,s){let c={method:"watchAsset",params:{type:e,options:{address:r,symbol:n,decimals:i,image:o},chainId:s}},l=null,u=(0,Zo.randomBytesHex)(8),d=p=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,c.method,p),l?.()};return l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}),new Promise((p,v)=>{this.relayEventManager.callbacks.set(u,y=>{if(l?.(),(0,B4.isErrorResponse)(y))return v(new Error(y.errorMessage));p(y)}),this.publishWeb3RequestEvent(u,c)})}addEthereumChain(e,r,n,i,o,s){let c={method:"addEthereumChain",params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:o,iconUrls:n,nativeCurrency:s}},l=null,u=(0,Zo.randomBytesHex)(8),d=p=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,c.method,p),l?.()};return l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}),new Promise((p,v)=>{this.relayEventManager.callbacks.set(u,y=>{if(l?.(),(0,B4.isErrorResponse)(y))return v(new Error(y.errorMessage));p(y)}),this.publishWeb3RequestEvent(u,c)})}switchEthereumChain(e,r){let n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:r})},i=(0,Zo.randomBytesHex)(8);return new Promise((o,s)=>{this.relayEventManager.callbacks.set(i,c=>{if((0,B4.isErrorResponse)(c)&&c.errorCode)return s(fmt.standardErrors.provider.custom({code:c.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,B4.isErrorResponse)(c))return s(new Error(c.errorMessage));o(c)}),this.publishWeb3RequestEvent(i,n)})}};OP.WalletLinkRelay=PP;PP.accountRequestCallbackIds=new Set});var kbe=X(L4=>{"use strict";var dmt=L4&&L4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(L4,"__esModule",{value:!0});L4.WalletLinkSigner=void 0;var PQ=dmt(iye()),_be=pP(),pmt=eQ(),A1=FN(),mmt=Sbe(),Ibe=MP(),qs=$h(),Gn=qh(),gmt=$g(),OQ="DefaultChainId",Tbe="DefaultJsonRpcUrl",BQ=class{constructor(e){var r,n;this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1;let{appName:i,appLogoUrl:o}=e.metadata;this._appName=i,this._appLogoUrl=o,this._storage=new gmt.ScopedLocalStorage("walletlink",Ibe.WALLETLINK_URL),this.updateListener=e.updateListener,this._relayEventManager=new pmt.RelayEventManager,this._jsonRpcUrlFromOpts="";let s=this._storage.getItem(_be.LOCAL_STORAGE_ADDRESSES_KEY);if(s){let l=s.split(" ");l[0]!==""&&(this._addresses=l.map(u=>(0,Gn.ensureAddressString)(u)),(r=this.updateListener)===null||r===void 0||r.onAccountsUpdate({accounts:this._addresses,source:"storage"}))}this._storage.getItem(OQ)&&((n=this.updateListener)===null||n===void 0||n.onChainUpdate({chain:{id:this.getChainId(),rpcUrl:this.jsonRpcUrl},source:"storage"}),this.hasMadeFirstChainChangedEmission=!0),this.initializeRelay()}getSession(){let e=this.initializeRelay(),{id:r,secret:n}=e.getWalletLinkSession();return{id:r,secret:n}}async handshake(){return await this.request({method:"eth_requestAccounts"})}get selectedAddress(){return this._addresses[0]||void 0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(Tbe))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(Tbe,e)}updateProviderInfo(e,r){var n;this.jsonRpcUrl=e;let i=this.getChainId();this._storage.setItem(OQ,r.toString(10)),((0,Gn.ensureIntNumber)(r)!==i||!this.hasMadeFirstChainChangedEmission)&&((n=this.updateListener)===null||n===void 0||n.onChainUpdate({chain:{id:r,rpcUrl:e},source:"wallet"}),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,r,n,i,o,s){let l=await this.initializeRelay().watchAsset(e,r,n,i,o,s?.toString());return(0,A1.isErrorResponse)(l)?!1:!!l.result}async addEthereumChain(e,r,n,i,o,s){var c,l;if((0,Gn.ensureIntNumber)(e)===this.getChainId())return!1;let u=this.initializeRelay();this._isAuthorized()||await u.requestEthereumAccounts();let d=await u.addEthereumChain(e.toString(),r,o,n,i,s);return(0,A1.isErrorResponse)(d)?!1:(((c=d.result)===null||c===void 0?void 0:c.isApproved)===!0&&this.updateProviderInfo(r[0],e),((l=d.result)===null||l===void 0?void 0:l.isApproved)===!0)}async switchEthereumChain(e){let n=await this.initializeRelay().switchEthereumChain(e.toString(10),this.selectedAddress||void 0);if((0,A1.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===qs.standardErrorCodes.provider.unsupportedChain?qs.standardErrors.provider.unsupportedChain():qs.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}let i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}async disconnect(){this._relay&&this._relay.resetAndReload(),this._storage.clear()}async request(e){try{return this._request(e).catch(r=>{throw r})}catch(r){return Promise.reject(r)}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw qs.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});let{method:r,params:n}=e;if(typeof r!="string"||r.length===0)throw qs.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw qs.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});let i=n===void 0?[]:n,o=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:o})).result}_setAddresses(e,r){var n;if(!Array.isArray(e))throw new Error("addresses is not an array");let i=e.map(o=>(0,Gn.ensureAddressString)(o));JSON.stringify(i)!==JSON.stringify(this._addresses)&&(this._addresses=i,(n=this.updateListener)===null||n===void 0||n.onAccountsUpdate({accounts:i,source:"wallet"}),this._storage.setItem(_be.LOCAL_STORAGE_ADDRESSES_KEY,i.join(" ")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{let i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:"2.0",id:e.id,result:i})}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&r(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_handleSynchronousMethods(e){let{method:r}=e;switch(r){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){let{method:r}=e,n=e.params||[];switch(r){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n);default:return this._throwUnsupportedMethodError()}}_isKnownAddress(e){try{let r=(0,Gn.ensureAddressString)(e);return this._addresses.map(i=>(0,Gn.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(e){if(!this._isKnownAddress(e))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(e){let r=e.from?(0,Gn.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);let n=e.to?(0,Gn.ensureAddressString)(e.to):null,i=e.value!=null?(0,Gn.ensureBigInt)(e.value):BigInt(0),o=e.data?(0,Gn.ensureBuffer)(e.data):Buffer.alloc(0),s=e.nonce!=null?(0,Gn.ensureIntNumber)(e.nonce):null,c=e.gasPrice!=null?(0,Gn.ensureBigInt)(e.gasPrice):null,l=e.maxFeePerGas!=null?(0,Gn.ensureBigInt)(e.maxFeePerGas):null,u=e.maxPriorityFeePerGas!=null?(0,Gn.ensureBigInt)(e.maxPriorityFeePerGas):null,d=e.gas!=null?(0,Gn.ensureBigInt)(e.gas):null,p=e.chainId?(0,Gn.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:o,nonce:s,gasPriceInWei:c,maxFeePerGas:l,maxPriorityFeePerGas:u,gasLimit:d,chainId:p}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw qs.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw qs.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,r,n,i){this._ensureKnownAddress(r);try{let s=await this.initializeRelay().signEthereumMessage(e,r,n,i);if((0,A1.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}catch(o){throw typeof o.message=="string"&&o.message.match(/(denied|rejected)/i)?qs.standardErrors.provider.userRejectedRequest("User denied message signature"):o}}async _ethereumAddressFromSignedMessage(e,r,n){let o=await this.initializeRelay().ethereumAddressFromSignedMessage(e,r,n);if((0,A1.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:"2.0",id:0,result:o.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,Gn.hexStringFromIntNumber)(this.getChainId())}getChainId(){let e=this._storage.getItem(OQ);if(!e)return(0,Gn.ensureIntNumber)(1);let r=parseInt(e,10);return(0,Gn.ensureIntNumber)(r)}async _eth_requestAccounts(){if(this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{if(e=await this.initializeRelay().requestEthereumAccounts(),(0,A1.isErrorResponse)(e))throw new Error(e.errorMessage)}catch(r){throw typeof r.message=="string"&&r.message.match(/(denied|rejected)/i)?qs.standardErrors.provider.userRejectedRequest("User denied account authorization"):r}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();let r=(0,Gn.ensureAddressString)(e[0]),n=(0,Gn.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){let r=(0,Gn.ensureBuffer)(e[0]),n=(0,Gn.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();let r=(0,Gn.ensureBuffer)(e[0]),n=(0,Gn.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){let r=(0,Gn.ensureBuffer)(e[0]),n=(0,Gn.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=await this.initializeRelay().signEthereumTransaction(r);if((0,A1.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?qs.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){let r=(0,Gn.ensureBuffer)(e[0]),i=await this.initializeRelay().submitEthereumTransaction(r,this.getChainId());if((0,A1.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=await this.initializeRelay().signAndSubmitEthereumTransaction(r);if((0,A1.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?qs.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();let r=(0,Gn.ensureParsedJSONObject)(e[0]),n=(0,Gn.ensureAddressString)(e[1]);this._ensureKnownAddress(n);let i=PQ.default.hashForSignTypedDataLegacy({data:r}),o=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,o)}async _eth_signTypedData_v3(e){this._requireAuthorization();let r=(0,Gn.ensureAddressString)(e[0]),n=(0,Gn.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=PQ.default.hashForSignTypedData_v3({data:n}),o=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,o)}async _eth_signTypedData_v4(e){this._requireAuthorization();let r=(0,Gn.ensureAddressString)(e[0]),n=(0,Gn.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=PQ.default.hashForSignTypedData_v4({data:n}),o=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,o)}async _wallet_addEthereumChain(e){var r,n,i,o;let s=e[0];if(((r=s.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!s.chainName||s.chainName.trim()==="")throw qs.standardErrors.rpc.invalidParams("chainName is a required field");if(!s.nativeCurrency)throw qs.standardErrors.rpc.invalidParams("nativeCurrency is a required field");let c=parseInt(s.chainId,16);return await this.addEthereumChain(c,(n=s.rpcUrls)!==null&&n!==void 0?n:[],(i=s.blockExplorerUrls)!==null&&i!==void 0?i:[],s.chainName,(o=s.iconUrls)!==null&&o!==void 0?o:[],s.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){let r=e[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){let r=Array.isArray(e)?e[0]:e;if(!r.type)throw qs.standardErrors.rpc.invalidParams("Type is required");if(r?.type!=="ERC20")throw qs.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!r?.options)throw qs.standardErrors.rpc.invalidParams("Options are required");if(!r?.options.address)throw qs.standardErrors.rpc.invalidParams("Address is required");let n=this.getChainId(),{address:i,symbol:o,image:s,decimals:c}=r.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(r.type,i,o,c,s,n)}}initializeRelay(){if(!this._relay){let e=new mmt.WalletLinkRelay({linkAPIUrl:Ibe.WALLETLINK_URL,storage:this._storage});e.setAppInfo(this._appName,this._appLogoUrl),e.attachUI(),e.setAccountsCallback((r,n)=>this._setAddresses(r,n)),e.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),this._relay=e}return this._relay}};L4.WalletLinkSigner=BQ});var LP=X(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.checkErrorForInvalidRequestArgs=Qh.getCoinbaseInjectedProvider=Qh.getCoinbaseInjectedSigner=Qh.fetchRPCRequest=void 0;var wmt=fE(),BP=$h();async function vmt(t,e){if(!e.rpcUrl)throw BP.standardErrors.rpc.internal("No RPC URL set for chain");let r=Object.assign(Object.assign({},t),{jsonrpc:"2.0",id:crypto.randomUUID()});return(await(await window.fetch(e.rpcUrl,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":wmt.LIB_VERSION}})).json()).result}Qh.fetchRPCRequest=vmt;function Rbe(){return globalThis.coinbaseWalletSigner}Qh.getCoinbaseInjectedSigner=Rbe;function ymt(){return globalThis.coinbaseWalletExtension}function bmt(){var t,e;try{let r=globalThis;return(t=r.ethereum)!==null&&t!==void 0?t:(e=r.top)===null||e===void 0?void 0:e.ethereum}catch{return}}function xmt({metadata:t,preference:e}){var r;if(e.options!=="smartWalletOnly"){if(Rbe())return;let o=ymt();if(o){let{appName:s,appLogoUrl:c,appChainIds:l}=t;return(r=o.setAppInfo)===null||r===void 0||r.call(o,s,c,l),o}}let n=bmt();if(n?.isCoinbaseBrowser)return n}Qh.getCoinbaseInjectedProvider=xmt;function Cmt(t){if(!t||typeof t!="object"||Array.isArray(t))return BP.standardErrors.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:t});let{method:e,params:r}=t;if(typeof e!="string"||e.length===0)return BP.standardErrors.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:t});if(r!==void 0&&!Array.isArray(r)&&(typeof r!="object"||r===null))return BP.standardErrors.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:t})}Qh.checkErrorForInvalidRequestArgs=Cmt});var Obe=X(Zh=>{"use strict";Object.defineProperty(Zh,"__esModule",{value:!0});Zh.createSigner=Zh.fetchSignerType=Zh.storeSignerType=Zh.loadSignerType=void 0;var Emt=v3e(),Mbe=kbe(),Amt=$h(),Smt=LP(),_mt=$g(),Nbe="SignerType",Pbe=new _mt.ScopedLocalStorage("CBWSDK","SignerConfigurator");function Imt(){return Pbe.getItem(Nbe)}Zh.loadSignerType=Imt;function Tmt(t){Pbe.setItem(Nbe,t)}Zh.storeSignerType=Tmt;async function kmt(t){let{communicator:e,metadata:r}=t;Mmt(e,r).catch(()=>{});let n={id:crypto.randomUUID(),event:"selectSignerType",data:t.preference},{data:i}=await e.postRequestAndWaitForResponse(n);return i}Zh.fetchSignerType=kmt;function Rmt(t){let{signerType:e,metadata:r,communicator:n,updateListener:i}=t;switch(e){case"scw":return new Emt.SCWSigner({metadata:r,updateListener:i,communicator:n});case"walletlink":return new Mbe.WalletLinkSigner({metadata:r,updateListener:i});case"extension":{let o=(0,Smt.getCoinbaseInjectedSigner)();if(!o)throw Amt.standardErrors.rpc.internal("injected signer not found");return o}}}Zh.createSigner=Rmt;async function Mmt(t,e){await t.onMessage(({event:n})=>n==="WalletLinkSessionRequest");let r=new Mbe.WalletLinkSigner({metadata:e});t.postMessage({event:"WalletLinkUpdate",data:{session:r.getSession()}}),await r.handshake(),t.postMessage({event:"WalletLinkUpdate",data:{connected:!0}})}});var Fbe=X(F4=>{"use strict";Object.defineProperty(F4,"__esModule",{value:!0});F4.closePopup=F4.openPopup=void 0;var Nmt=$h(),Bbe=420,Lbe=540;function Pmt(t){let e=(window.innerWidth-Bbe)/2+window.screenX,r=(window.innerHeight-Lbe)/2+window.screenY,n=window.open(t,"Smart Wallet",`width=${Bbe}, height=${Lbe}, left=${e}, top=${r}`);if(n?.focus(),!n)throw Nmt.standardErrors.rpc.internal("Pop up window failed to open");return n}F4.openPopup=Pmt;function Omt(t){t&&!t.closed&&t.close()}F4.closePopup=Omt});var jbe=X(FP=>{"use strict";Object.defineProperty(FP,"__esModule",{value:!0});FP.Communicator=void 0;var Bmt=fE(),Ube=Fbe(),Lmt=MP(),Dbe=$h(),LQ=class{constructor(e=Lmt.CB_KEYS_URL){this.popup=null,this.listeners=new Map,this.postMessage=async r=>{(await this.waitForPopupLoaded()).postMessage(r,this.url.origin)},this.postRequestAndWaitForResponse=async r=>{let n=this.onMessage(({requestId:i})=>i===r.id);return this.postMessage(r),await n},this.onMessage=async r=>new Promise((n,i)=>{let o=s=>{if(s.origin!==this.url.origin)return;let c=s.data;r(c)&&(n(c),window.removeEventListener("message",o),this.listeners.delete(o))};window.addEventListener("message",o),this.listeners.set(o,{reject:i})}),this.disconnect=()=>{(0,Ube.closePopup)(this.popup),this.popup=null,this.listeners.forEach(({reject:r},n)=>{r(Dbe.standardErrors.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",n)}),this.listeners.clear()},this.waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(this.popup=(0,Ube.openPopup)(this.url),this.onMessage(({event:r})=>r==="PopupUnload").then(this.disconnect).catch(()=>{}),this.onMessage(({event:r})=>r==="PopupLoaded").then(r=>{this.postMessage({requestId:r.id,data:{version:Bmt.LIB_VERSION}})}).then(()=>{if(!this.popup)throw Dbe.standardErrors.rpc.internal();return this.popup})),this.url=new URL(e)}};FP.Communicator=LQ});var qbe=X(UP=>{"use strict";Object.defineProperty(UP,"__esModule",{value:!0});UP.determineMethodCategory=void 0;var $be={handshake:["eth_requestAccounts"],sign:["eth_ecRecover","personal_sign","personal_ecRecover","eth_signTransaction","eth_sendTransaction","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_signTypedData","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_getCapabilities","wallet_sendCalls","wallet_showCallsStatus"],state:["eth_chainId","eth_accounts","eth_coinbase","net_version"],deprecated:["eth_sign","eth_signTypedData_v2"],unsupported:["eth_subscribe","eth_unsubscribe"],fetch:[]};function Fmt(t){for(let e in $be){let r=e;if($be[r].includes(t))return r}}UP.determineMethodCategory=Fmt});var zbe=X(Qg=>{"use strict";var Umt=Qg&&Qg.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i{try{if(this.connected)return this.emit("connect",{chainId:(0,PE.hexStringFromIntNumber)((0,DP.IntNumber)(this.chain.id))}),this.accounts;let d=await this.requestSignerSelection(),p=this.initSigner(d),v=await p.handshake();return this.signer=p,(0,jP.storeSignerType)(d),this.emit("connect",{chainId:(0,PE.hexStringFromIntNumber)((0,DP.IntNumber)(this.chain.id))}),v}catch(d){throw this.handleUnauthorizedError(d),d}},sign:async u=>{if(!this.connected||!this.signer)throw U4.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods");try{return await this.signer.request(u)}catch(d){throw this.handleUnauthorizedError(d),d}},fetch:u=>(0,Hbe.fetchRPCRequest)(u,this.chain),state:u=>{let d=()=>{if(this.connected)return this.accounts;throw U4.standardErrors.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")};switch(u.method){case"eth_chainId":return(0,PE.hexStringFromIntNumber)((0,DP.IntNumber)(this.chain.id));case"net_version":return this.chain.id;case"eth_accounts":return d();case"eth_coinbase":return d()[0];default:return this.handlers.unsupported(u)}},deprecated:({method:u})=>{throw U4.standardErrors.rpc.methodNotSupported(`Method ${u} is deprecated.`)},unsupported:({method:u})=>{throw U4.standardErrors.rpc.methodNotSupported(`Method ${u} is not supported.`)}},this.isCoinbaseWallet=!0,this.updateListener={onAccountsUpdate:({accounts:u,source:d})=>{(0,PE.areAddressArraysEqual)(this.accounts,u)||(this.accounts=u,d!=="storage"&&this.emit("accountsChanged",this.accounts))},onChainUpdate:({chain:u,source:d})=>{u.id===this.chain.id&&u.rpcUrl===this.chain.rpcUrl||(this.chain=u,d!=="storage"&&this.emit("chainChanged",(0,PE.hexStringFromIntNumber)((0,DP.IntNumber)(u.id))))}},this.metadata=i,this.preference=c,this.communicator=new qmt.Communicator(s),this.chain={id:(n=(r=i.appChainIds)===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:1};let l=(0,jP.loadSignerType)();this.signer=l?this.initSigner(l):null}get connected(){return this.accounts.length>0}async request(e){var r;try{let n=(0,Hbe.checkErrorForInvalidRequestArgs)(e);if(n)throw n;let i=(r=(0,Hmt.determineMethodCategory)(e.method))!==null&&r!==void 0?r:"fetch";return this.handlers[i](e)}catch(n){return Promise.reject((0,$mt.serializeError)(n,e.method))}}handleUnauthorizedError(e){e.code===U4.standardErrorCodes.provider.unauthorized&&this.disconnect()}async enable(){return console.warn('.enable() has been deprecated. Please use .request({ method: "eth_requestAccounts" }) instead.'),await this.request({method:"eth_requestAccounts"})}async disconnect(){this.accounts=[],this.chain={id:1},zmt.ScopedLocalStorage.clearAll(),this.emit("disconnect",U4.standardErrors.provider.disconnected("User initiated disconnection"))}requestSignerSelection(){return(0,jP.fetchSignerType)({communicator:this.communicator,preference:this.preference,metadata:this.metadata})}initSigner(e){return(0,jP.createSigner)({signerType:e,metadata:this.metadata,communicator:this.communicator,updateListener:this.updateListener})}};Qg.CoinbaseWalletProvider=FQ});var DQ=X($P=>{"use strict";Object.defineProperty($P,"__esModule",{value:!0});$P.CoinbaseWalletSDK=void 0;var Wmt=Hwe(),Vmt=zbe(),Kmt=$g(),Gmt=fE(),Qmt=qh(),Zmt=LP(),UQ=class{constructor(e){this.metadata={appName:e.appName||"Dapp",appLogoUrl:e.appLogoUrl||(0,Qmt.getFavicon)(),appChainIds:e.appChainIds||[]},this.storeLatestVersion()}makeWeb3Provider(e={options:"all"}){var r;let n={metadata:this.metadata,preference:e};return(r=(0,Zmt.getCoinbaseInjectedProvider)(n))!==null&&r!==void 0?r:new Vmt.CoinbaseWalletProvider(n)}getCoinbaseWalletLogo(e,r=240){return(0,Wmt.walletLogo)(e,r)}storeLatestVersion(){new Kmt.ScopedLocalStorage("CBWSDK").setItem("VERSION",Gmt.LIB_VERSION)}};$P.CoinbaseWalletSDK=UQ});var Wbe=X(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.CoinbaseWalletSDK=void 0;var Ymt=DQ();OE.default=Ymt.CoinbaseWalletSDK;var Jmt=DQ();Object.defineProperty(OE,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return Jmt.CoinbaseWalletSDK}})});var Vbe=X(qP=>{"use strict";Object.defineProperty(qP,"__esModule",{value:!0});qP.walletLogo=void 0;var Xmt=(t,e)=>{let r;switch(t){case"standard":return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=e,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*e).toFixed(2),`data:image/svg+xml,%3Csvg width='${e}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=e,`data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};qP.walletLogo=Xmt});var Kbe=X(HP=>{"use strict";Object.defineProperty(HP,"__esModule",{value:!0});HP.LINK_API_URL=void 0;HP.LINK_API_URL="https://www.walletlink.org"});var Gbe=X(()=>{});var BE=X((Qbe,jQ)=>{(function(t,e){"use strict";function r(f,h){if(!f)throw new Error(h||"Assertion failed")}function n(f,h){f.super_=h;var g=function(){};g.prototype=h.prototype,f.prototype=new g,f.prototype.constructor=f}function i(f,h,g){if(i.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((h==="le"||h==="be")&&(g=h,h=10),this._init(f||0,h||10,g||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Gbe().Buffer}catch{}i.isBN=function(h){return h instanceof i?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===i.wordSize&&Array.isArray(h.words)},i.max=function(h,g){return h.cmp(g)>0?h:g},i.min=function(h,g){return h.cmp(g)<0?h:g},i.prototype._init=function(h,g,x){if(typeof h=="number")return this._initNumber(h,g,x);if(typeof h=="object")return this._initArray(h,g,x);g==="hex"&&(g=16),r(g===(g|0)&&g>=2&&g<=36),h=h.toString().replace(/\s+/g,"");var S=0;h[0]==="-"&&(S++,this.negative=1),S=0;S-=3)N=h[S]|h[S-1]<<8|h[S-2]<<16,this.words[T]|=N<>>26-I&67108863,I+=24,I>=26&&(I-=26,T++);else if(x==="le")for(S=0,T=0;S>>26-I&67108863,I+=24,I>=26&&(I-=26,T++);return this._strip()};function s(f,h){var g=f.charCodeAt(h);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;r(!1,"Invalid character in "+f)}function c(f,h,g){var x=s(f,g);return g-1>=h&&(x|=s(f,g-1)<<4),x}i.prototype._parseHex=function(h,g,x){this.length=Math.ceil((h.length-g)/6),this.words=new Array(this.length);for(var S=0;S=g;S-=2)I=c(h,g,S)<=18?(T-=18,N+=1,this.words[N]|=I>>>26):T+=8;else{var m=h.length-g;for(S=m%2===0?g+1:g;S=18?(T-=18,N+=1,this.words[N]|=I>>>26):T+=8}this._strip()};function l(f,h,g,x){for(var S=0,T=0,N=Math.min(f.length,g),I=h;I=49?T=m-49+10:m>=17?T=m-17+10:T=m,r(m>=0&&T1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(h,g){h=h||10,g=g|0||1;var x;if(h===16||h==="hex"){x="";for(var S=0,T=0,N=0;N>>24-S&16777215,S+=2,S>=26&&(S-=26,N--),T!==0||N!==this.length-1?x=p[6-m.length]+m+x:x=m+x}for(T!==0&&(x=T.toString(16)+x);x.length%g!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(h===(h|0)&&h>=2&&h<=36){var C=v[h],Y=y[h];x="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var b=ne.modrn(Y).toString(h);ne=ne.idivn(Y),ne.isZero()?x=b+x:x=p[C-b.length]+b+x}for(this.isZero()&&(x="0"+x);x.length%g!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(h,g){return this.toArrayLike(o,h,g)}),i.prototype.toArray=function(h,g){return this.toArrayLike(Array,h,g)};var _=function(h,g){return h.allocUnsafe?h.allocUnsafe(g):new h(g)};i.prototype.toArrayLike=function(h,g,x){this._strip();var S=this.byteLength(),T=x||Math.max(1,S);r(S<=T,"byte array longer than desired length"),r(T>0,"Requested array length <= 0");var N=_(h,T),I=g==="le"?"LE":"BE";return this["_toArrayLike"+I](N,S),N},i.prototype._toArrayLikeLE=function(h,g){for(var x=0,S=0,T=0,N=0;T>8&255),x>16&255),N===6?(x>24&255),S=0,N=0):(S=I>>>24,N+=2)}if(x=0&&(h[x--]=I>>8&255),x>=0&&(h[x--]=I>>16&255),N===6?(x>=0&&(h[x--]=I>>24&255),S=0,N=0):(S=I>>>24,N+=2)}if(x>=0)for(h[x--]=S;x>=0;)h[x--]=0},Math.clz32?i.prototype._countBits=function(h){return 32-Math.clz32(h)}:i.prototype._countBits=function(h){var g=h,x=0;return g>=4096&&(x+=13,g>>>=13),g>=64&&(x+=7,g>>>=7),g>=8&&(x+=4,g>>>=4),g>=2&&(x+=2,g>>>=2),x+g},i.prototype._zeroBits=function(h){if(h===0)return 26;var g=h,x=0;return g&8191||(x+=13,g>>>=13),g&127||(x+=7,g>>>=7),g&15||(x+=4,g>>>=4),g&3||(x+=2,g>>>=2),g&1||x++,x},i.prototype.bitLength=function(){var h=this.words[this.length-1],g=this._countBits(h);return(this.length-1)*26+g};function R(f){for(var h=new Array(f.bitLength()),g=0;g>>S&1}return h}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,g=0;gh.length?this.clone().ior(h):h.clone().ior(this)},i.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},i.prototype.iuand=function(h){var g;this.length>h.length?g=h:g=this;for(var x=0;xh.length?this.clone().iand(h):h.clone().iand(this)},i.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},i.prototype.iuxor=function(h){var g,x;this.length>h.length?(g=this,x=h):(g=h,x=this);for(var S=0;Sh.length?this.clone().ixor(h):h.clone().ixor(this)},i.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},i.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var g=Math.ceil(h/26)|0,x=h%26;this._expand(g),x>0&&g--;for(var S=0;S0&&(this.words[S]=~this.words[S]&67108863>>26-x),this._strip()},i.prototype.notn=function(h){return this.clone().inotn(h)},i.prototype.setn=function(h,g){r(typeof h=="number"&&h>=0);var x=h/26|0,S=h%26;return this._expand(x+1),g?this.words[x]=this.words[x]|1<h.length?(x=this,S=h):(x=h,S=this);for(var T=0,N=0;N>>26;for(;T!==0&&N>>26;if(this.length=x.length,T!==0)this.words[this.length]=T,this.length++;else if(x!==this)for(;Nh.length?this.clone().iadd(h):h.clone().iadd(this)},i.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var g=this.iadd(h);return h.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var x=this.cmp(h);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var S,T;x>0?(S=this,T=h):(S=h,T=this);for(var N=0,I=0;I>26,this.words[I]=g&67108863;for(;N!==0&&I>26,this.words[I]=g&67108863;if(N===0&&I>>26,ne=m&67108863,b=Math.min(C,h.length-1),H=Math.max(0,C-f.length+1);H<=b;H++){var G=C-H|0;S=f.words[G]|0,T=h.words[H]|0,N=S*T+ne,Y+=N/67108864|0,ne=N&67108863}g.words[C]=ne|0,m=Y|0}return m!==0?g.words[C]=m|0:g.length--,g._strip()}var k=function(h,g,x){var S=h.words,T=g.words,N=x.words,I=0,m,C,Y,ne=S[0]|0,b=ne&8191,H=ne>>>13,G=S[1]|0,U=G&8191,se=G>>>13,te=S[2]|0,le=te&8191,me=te>>>13,Ee=S[3]|0,fe=Ee&8191,Se=Ee>>>13,gt=S[4]|0,Qe=gt&8191,hr=gt>>>13,mt=S[5]|0,qe=mt&8191,Vt=mt>>>13,wt=S[6]|0,nt=wt&8191,tr=wt>>>13,de=S[7]|0,ge=de&8191,be=de>>>13,ye=S[8]|0,_e=ye&8191,ft=ye>>>13,Ve=S[9]|0,Fe=Ve&8191,Dt=Ve>>>13,Xe=T[0]|0,ze=Xe&8191,pr=Xe>>>13,bt=T[1]|0,tt=bt&8191,Ar=bt>>>13,Et=T[2]|0,st=Et&8191,yr=Et>>>13,_t=T[3]|0,at=_t&8191,Sr=_t>>>13,It=T[4]|0,it=It&8191,_r=It>>>13,At=T[5]|0,Ke=At&8191,lr=At>>>13,St=T[6]|0,ot=St&8191,Mr=St>>>13,Rt=T[7]|0,lt=Rt&8191,Nr=Rt>>>13,Mt=T[8]|0,ut=Mt&8191,Pr=Mt>>>13,Nt=T[9]|0,ct=Nt&8191,br=Nt>>>13;x.negative=h.negative^g.negative,x.length=19,m=Math.imul(b,ze),C=Math.imul(b,pr),C=C+Math.imul(H,ze)|0,Y=Math.imul(H,pr);var _n=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(_n>>>26)|0,_n&=67108863,m=Math.imul(U,ze),C=Math.imul(U,pr),C=C+Math.imul(se,ze)|0,Y=Math.imul(se,pr),m=m+Math.imul(b,tt)|0,C=C+Math.imul(b,Ar)|0,C=C+Math.imul(H,tt)|0,Y=Y+Math.imul(H,Ar)|0;var In=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(In>>>26)|0,In&=67108863,m=Math.imul(le,ze),C=Math.imul(le,pr),C=C+Math.imul(me,ze)|0,Y=Math.imul(me,pr),m=m+Math.imul(U,tt)|0,C=C+Math.imul(U,Ar)|0,C=C+Math.imul(se,tt)|0,Y=Y+Math.imul(se,Ar)|0,m=m+Math.imul(b,st)|0,C=C+Math.imul(b,yr)|0,C=C+Math.imul(H,st)|0,Y=Y+Math.imul(H,yr)|0;var Tn=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,m=Math.imul(fe,ze),C=Math.imul(fe,pr),C=C+Math.imul(Se,ze)|0,Y=Math.imul(Se,pr),m=m+Math.imul(le,tt)|0,C=C+Math.imul(le,Ar)|0,C=C+Math.imul(me,tt)|0,Y=Y+Math.imul(me,Ar)|0,m=m+Math.imul(U,st)|0,C=C+Math.imul(U,yr)|0,C=C+Math.imul(se,st)|0,Y=Y+Math.imul(se,yr)|0,m=m+Math.imul(b,at)|0,C=C+Math.imul(b,Sr)|0,C=C+Math.imul(H,at)|0,Y=Y+Math.imul(H,Sr)|0;var kn=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(kn>>>26)|0,kn&=67108863,m=Math.imul(Qe,ze),C=Math.imul(Qe,pr),C=C+Math.imul(hr,ze)|0,Y=Math.imul(hr,pr),m=m+Math.imul(fe,tt)|0,C=C+Math.imul(fe,Ar)|0,C=C+Math.imul(Se,tt)|0,Y=Y+Math.imul(Se,Ar)|0,m=m+Math.imul(le,st)|0,C=C+Math.imul(le,yr)|0,C=C+Math.imul(me,st)|0,Y=Y+Math.imul(me,yr)|0,m=m+Math.imul(U,at)|0,C=C+Math.imul(U,Sr)|0,C=C+Math.imul(se,at)|0,Y=Y+Math.imul(se,Sr)|0,m=m+Math.imul(b,it)|0,C=C+Math.imul(b,_r)|0,C=C+Math.imul(H,it)|0,Y=Y+Math.imul(H,_r)|0;var Rn=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,m=Math.imul(qe,ze),C=Math.imul(qe,pr),C=C+Math.imul(Vt,ze)|0,Y=Math.imul(Vt,pr),m=m+Math.imul(Qe,tt)|0,C=C+Math.imul(Qe,Ar)|0,C=C+Math.imul(hr,tt)|0,Y=Y+Math.imul(hr,Ar)|0,m=m+Math.imul(fe,st)|0,C=C+Math.imul(fe,yr)|0,C=C+Math.imul(Se,st)|0,Y=Y+Math.imul(Se,yr)|0,m=m+Math.imul(le,at)|0,C=C+Math.imul(le,Sr)|0,C=C+Math.imul(me,at)|0,Y=Y+Math.imul(me,Sr)|0,m=m+Math.imul(U,it)|0,C=C+Math.imul(U,_r)|0,C=C+Math.imul(se,it)|0,Y=Y+Math.imul(se,_r)|0,m=m+Math.imul(b,Ke)|0,C=C+Math.imul(b,lr)|0,C=C+Math.imul(H,Ke)|0,Y=Y+Math.imul(H,lr)|0;var Zi=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,m=Math.imul(nt,ze),C=Math.imul(nt,pr),C=C+Math.imul(tr,ze)|0,Y=Math.imul(tr,pr),m=m+Math.imul(qe,tt)|0,C=C+Math.imul(qe,Ar)|0,C=C+Math.imul(Vt,tt)|0,Y=Y+Math.imul(Vt,Ar)|0,m=m+Math.imul(Qe,st)|0,C=C+Math.imul(Qe,yr)|0,C=C+Math.imul(hr,st)|0,Y=Y+Math.imul(hr,yr)|0,m=m+Math.imul(fe,at)|0,C=C+Math.imul(fe,Sr)|0,C=C+Math.imul(Se,at)|0,Y=Y+Math.imul(Se,Sr)|0,m=m+Math.imul(le,it)|0,C=C+Math.imul(le,_r)|0,C=C+Math.imul(me,it)|0,Y=Y+Math.imul(me,_r)|0,m=m+Math.imul(U,Ke)|0,C=C+Math.imul(U,lr)|0,C=C+Math.imul(se,Ke)|0,Y=Y+Math.imul(se,lr)|0,m=m+Math.imul(b,ot)|0,C=C+Math.imul(b,Mr)|0,C=C+Math.imul(H,ot)|0,Y=Y+Math.imul(H,Mr)|0;var qo=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(qo>>>26)|0,qo&=67108863,m=Math.imul(ge,ze),C=Math.imul(ge,pr),C=C+Math.imul(be,ze)|0,Y=Math.imul(be,pr),m=m+Math.imul(nt,tt)|0,C=C+Math.imul(nt,Ar)|0,C=C+Math.imul(tr,tt)|0,Y=Y+Math.imul(tr,Ar)|0,m=m+Math.imul(qe,st)|0,C=C+Math.imul(qe,yr)|0,C=C+Math.imul(Vt,st)|0,Y=Y+Math.imul(Vt,yr)|0,m=m+Math.imul(Qe,at)|0,C=C+Math.imul(Qe,Sr)|0,C=C+Math.imul(hr,at)|0,Y=Y+Math.imul(hr,Sr)|0,m=m+Math.imul(fe,it)|0,C=C+Math.imul(fe,_r)|0,C=C+Math.imul(Se,it)|0,Y=Y+Math.imul(Se,_r)|0,m=m+Math.imul(le,Ke)|0,C=C+Math.imul(le,lr)|0,C=C+Math.imul(me,Ke)|0,Y=Y+Math.imul(me,lr)|0,m=m+Math.imul(U,ot)|0,C=C+Math.imul(U,Mr)|0,C=C+Math.imul(se,ot)|0,Y=Y+Math.imul(se,Mr)|0,m=m+Math.imul(b,lt)|0,C=C+Math.imul(b,Nr)|0,C=C+Math.imul(H,lt)|0,Y=Y+Math.imul(H,Nr)|0;var Yi=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,m=Math.imul(_e,ze),C=Math.imul(_e,pr),C=C+Math.imul(ft,ze)|0,Y=Math.imul(ft,pr),m=m+Math.imul(ge,tt)|0,C=C+Math.imul(ge,Ar)|0,C=C+Math.imul(be,tt)|0,Y=Y+Math.imul(be,Ar)|0,m=m+Math.imul(nt,st)|0,C=C+Math.imul(nt,yr)|0,C=C+Math.imul(tr,st)|0,Y=Y+Math.imul(tr,yr)|0,m=m+Math.imul(qe,at)|0,C=C+Math.imul(qe,Sr)|0,C=C+Math.imul(Vt,at)|0,Y=Y+Math.imul(Vt,Sr)|0,m=m+Math.imul(Qe,it)|0,C=C+Math.imul(Qe,_r)|0,C=C+Math.imul(hr,it)|0,Y=Y+Math.imul(hr,_r)|0,m=m+Math.imul(fe,Ke)|0,C=C+Math.imul(fe,lr)|0,C=C+Math.imul(Se,Ke)|0,Y=Y+Math.imul(Se,lr)|0,m=m+Math.imul(le,ot)|0,C=C+Math.imul(le,Mr)|0,C=C+Math.imul(me,ot)|0,Y=Y+Math.imul(me,Mr)|0,m=m+Math.imul(U,lt)|0,C=C+Math.imul(U,Nr)|0,C=C+Math.imul(se,lt)|0,Y=Y+Math.imul(se,Nr)|0,m=m+Math.imul(b,ut)|0,C=C+Math.imul(b,Pr)|0,C=C+Math.imul(H,ut)|0,Y=Y+Math.imul(H,Pr)|0;var Ho=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Ho>>>26)|0,Ho&=67108863,m=Math.imul(Fe,ze),C=Math.imul(Fe,pr),C=C+Math.imul(Dt,ze)|0,Y=Math.imul(Dt,pr),m=m+Math.imul(_e,tt)|0,C=C+Math.imul(_e,Ar)|0,C=C+Math.imul(ft,tt)|0,Y=Y+Math.imul(ft,Ar)|0,m=m+Math.imul(ge,st)|0,C=C+Math.imul(ge,yr)|0,C=C+Math.imul(be,st)|0,Y=Y+Math.imul(be,yr)|0,m=m+Math.imul(nt,at)|0,C=C+Math.imul(nt,Sr)|0,C=C+Math.imul(tr,at)|0,Y=Y+Math.imul(tr,Sr)|0,m=m+Math.imul(qe,it)|0,C=C+Math.imul(qe,_r)|0,C=C+Math.imul(Vt,it)|0,Y=Y+Math.imul(Vt,_r)|0,m=m+Math.imul(Qe,Ke)|0,C=C+Math.imul(Qe,lr)|0,C=C+Math.imul(hr,Ke)|0,Y=Y+Math.imul(hr,lr)|0,m=m+Math.imul(fe,ot)|0,C=C+Math.imul(fe,Mr)|0,C=C+Math.imul(Se,ot)|0,Y=Y+Math.imul(Se,Mr)|0,m=m+Math.imul(le,lt)|0,C=C+Math.imul(le,Nr)|0,C=C+Math.imul(me,lt)|0,Y=Y+Math.imul(me,Nr)|0,m=m+Math.imul(U,ut)|0,C=C+Math.imul(U,Pr)|0,C=C+Math.imul(se,ut)|0,Y=Y+Math.imul(se,Pr)|0,m=m+Math.imul(b,ct)|0,C=C+Math.imul(b,br)|0,C=C+Math.imul(H,ct)|0,Y=Y+Math.imul(H,br)|0;var zo=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(zo>>>26)|0,zo&=67108863,m=Math.imul(Fe,tt),C=Math.imul(Fe,Ar),C=C+Math.imul(Dt,tt)|0,Y=Math.imul(Dt,Ar),m=m+Math.imul(_e,st)|0,C=C+Math.imul(_e,yr)|0,C=C+Math.imul(ft,st)|0,Y=Y+Math.imul(ft,yr)|0,m=m+Math.imul(ge,at)|0,C=C+Math.imul(ge,Sr)|0,C=C+Math.imul(be,at)|0,Y=Y+Math.imul(be,Sr)|0,m=m+Math.imul(nt,it)|0,C=C+Math.imul(nt,_r)|0,C=C+Math.imul(tr,it)|0,Y=Y+Math.imul(tr,_r)|0,m=m+Math.imul(qe,Ke)|0,C=C+Math.imul(qe,lr)|0,C=C+Math.imul(Vt,Ke)|0,Y=Y+Math.imul(Vt,lr)|0,m=m+Math.imul(Qe,ot)|0,C=C+Math.imul(Qe,Mr)|0,C=C+Math.imul(hr,ot)|0,Y=Y+Math.imul(hr,Mr)|0,m=m+Math.imul(fe,lt)|0,C=C+Math.imul(fe,Nr)|0,C=C+Math.imul(Se,lt)|0,Y=Y+Math.imul(Se,Nr)|0,m=m+Math.imul(le,ut)|0,C=C+Math.imul(le,Pr)|0,C=C+Math.imul(me,ut)|0,Y=Y+Math.imul(me,Pr)|0,m=m+Math.imul(U,ct)|0,C=C+Math.imul(U,br)|0,C=C+Math.imul(se,ct)|0,Y=Y+Math.imul(se,br)|0;var Wo=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Wo>>>26)|0,Wo&=67108863,m=Math.imul(Fe,st),C=Math.imul(Fe,yr),C=C+Math.imul(Dt,st)|0,Y=Math.imul(Dt,yr),m=m+Math.imul(_e,at)|0,C=C+Math.imul(_e,Sr)|0,C=C+Math.imul(ft,at)|0,Y=Y+Math.imul(ft,Sr)|0,m=m+Math.imul(ge,it)|0,C=C+Math.imul(ge,_r)|0,C=C+Math.imul(be,it)|0,Y=Y+Math.imul(be,_r)|0,m=m+Math.imul(nt,Ke)|0,C=C+Math.imul(nt,lr)|0,C=C+Math.imul(tr,Ke)|0,Y=Y+Math.imul(tr,lr)|0,m=m+Math.imul(qe,ot)|0,C=C+Math.imul(qe,Mr)|0,C=C+Math.imul(Vt,ot)|0,Y=Y+Math.imul(Vt,Mr)|0,m=m+Math.imul(Qe,lt)|0,C=C+Math.imul(Qe,Nr)|0,C=C+Math.imul(hr,lt)|0,Y=Y+Math.imul(hr,Nr)|0,m=m+Math.imul(fe,ut)|0,C=C+Math.imul(fe,Pr)|0,C=C+Math.imul(Se,ut)|0,Y=Y+Math.imul(Se,Pr)|0,m=m+Math.imul(le,ct)|0,C=C+Math.imul(le,br)|0,C=C+Math.imul(me,ct)|0,Y=Y+Math.imul(me,br)|0;var So=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(So>>>26)|0,So&=67108863,m=Math.imul(Fe,at),C=Math.imul(Fe,Sr),C=C+Math.imul(Dt,at)|0,Y=Math.imul(Dt,Sr),m=m+Math.imul(_e,it)|0,C=C+Math.imul(_e,_r)|0,C=C+Math.imul(ft,it)|0,Y=Y+Math.imul(ft,_r)|0,m=m+Math.imul(ge,Ke)|0,C=C+Math.imul(ge,lr)|0,C=C+Math.imul(be,Ke)|0,Y=Y+Math.imul(be,lr)|0,m=m+Math.imul(nt,ot)|0,C=C+Math.imul(nt,Mr)|0,C=C+Math.imul(tr,ot)|0,Y=Y+Math.imul(tr,Mr)|0,m=m+Math.imul(qe,lt)|0,C=C+Math.imul(qe,Nr)|0,C=C+Math.imul(Vt,lt)|0,Y=Y+Math.imul(Vt,Nr)|0,m=m+Math.imul(Qe,ut)|0,C=C+Math.imul(Qe,Pr)|0,C=C+Math.imul(hr,ut)|0,Y=Y+Math.imul(hr,Pr)|0,m=m+Math.imul(fe,ct)|0,C=C+Math.imul(fe,br)|0,C=C+Math.imul(Se,ct)|0,Y=Y+Math.imul(Se,br)|0;var _o=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(_o>>>26)|0,_o&=67108863,m=Math.imul(Fe,it),C=Math.imul(Fe,_r),C=C+Math.imul(Dt,it)|0,Y=Math.imul(Dt,_r),m=m+Math.imul(_e,Ke)|0,C=C+Math.imul(_e,lr)|0,C=C+Math.imul(ft,Ke)|0,Y=Y+Math.imul(ft,lr)|0,m=m+Math.imul(ge,ot)|0,C=C+Math.imul(ge,Mr)|0,C=C+Math.imul(be,ot)|0,Y=Y+Math.imul(be,Mr)|0,m=m+Math.imul(nt,lt)|0,C=C+Math.imul(nt,Nr)|0,C=C+Math.imul(tr,lt)|0,Y=Y+Math.imul(tr,Nr)|0,m=m+Math.imul(qe,ut)|0,C=C+Math.imul(qe,Pr)|0,C=C+Math.imul(Vt,ut)|0,Y=Y+Math.imul(Vt,Pr)|0,m=m+Math.imul(Qe,ct)|0,C=C+Math.imul(Qe,br)|0,C=C+Math.imul(hr,ct)|0,Y=Y+Math.imul(hr,br)|0;var Io=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(Io>>>26)|0,Io&=67108863,m=Math.imul(Fe,Ke),C=Math.imul(Fe,lr),C=C+Math.imul(Dt,Ke)|0,Y=Math.imul(Dt,lr),m=m+Math.imul(_e,ot)|0,C=C+Math.imul(_e,Mr)|0,C=C+Math.imul(ft,ot)|0,Y=Y+Math.imul(ft,Mr)|0,m=m+Math.imul(ge,lt)|0,C=C+Math.imul(ge,Nr)|0,C=C+Math.imul(be,lt)|0,Y=Y+Math.imul(be,Nr)|0,m=m+Math.imul(nt,ut)|0,C=C+Math.imul(nt,Pr)|0,C=C+Math.imul(tr,ut)|0,Y=Y+Math.imul(tr,Pr)|0,m=m+Math.imul(qe,ct)|0,C=C+Math.imul(qe,br)|0,C=C+Math.imul(Vt,ct)|0,Y=Y+Math.imul(Vt,br)|0;var ta=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(ta>>>26)|0,ta&=67108863,m=Math.imul(Fe,ot),C=Math.imul(Fe,Mr),C=C+Math.imul(Dt,ot)|0,Y=Math.imul(Dt,Mr),m=m+Math.imul(_e,lt)|0,C=C+Math.imul(_e,Nr)|0,C=C+Math.imul(ft,lt)|0,Y=Y+Math.imul(ft,Nr)|0,m=m+Math.imul(ge,ut)|0,C=C+Math.imul(ge,Pr)|0,C=C+Math.imul(be,ut)|0,Y=Y+Math.imul(be,Pr)|0,m=m+Math.imul(nt,ct)|0,C=C+Math.imul(nt,br)|0,C=C+Math.imul(tr,ct)|0,Y=Y+Math.imul(tr,br)|0;var ra=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(ra>>>26)|0,ra&=67108863,m=Math.imul(Fe,lt),C=Math.imul(Fe,Nr),C=C+Math.imul(Dt,lt)|0,Y=Math.imul(Dt,Nr),m=m+Math.imul(_e,ut)|0,C=C+Math.imul(_e,Pr)|0,C=C+Math.imul(ft,ut)|0,Y=Y+Math.imul(ft,Pr)|0,m=m+Math.imul(ge,ct)|0,C=C+Math.imul(ge,br)|0,C=C+Math.imul(be,ct)|0,Y=Y+Math.imul(be,br)|0;var na=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(na>>>26)|0,na&=67108863,m=Math.imul(Fe,ut),C=Math.imul(Fe,Pr),C=C+Math.imul(Dt,ut)|0,Y=Math.imul(Dt,Pr),m=m+Math.imul(_e,ct)|0,C=C+Math.imul(_e,br)|0,C=C+Math.imul(ft,ct)|0,Y=Y+Math.imul(ft,br)|0;var ia=(I+m|0)+((C&8191)<<13)|0;I=(Y+(C>>>13)|0)+(ia>>>26)|0,ia&=67108863,m=Math.imul(Fe,ct),C=Math.imul(Fe,br),C=C+Math.imul(Dt,ct)|0,Y=Math.imul(Dt,br);var Gb=(I+m|0)+((C&8191)<<13)|0;return I=(Y+(C>>>13)|0)+(Gb>>>26)|0,Gb&=67108863,N[0]=_n,N[1]=In,N[2]=Tn,N[3]=kn,N[4]=Rn,N[5]=Zi,N[6]=qo,N[7]=Yi,N[8]=Ho,N[9]=zo,N[10]=Wo,N[11]=So,N[12]=_o,N[13]=Io,N[14]=ta,N[15]=ra,N[16]=na,N[17]=ia,N[18]=Gb,I!==0&&(N[19]=I,x.length++),x};Math.imul||(k=P);function M(f,h,g){g.negative=h.negative^f.negative,g.length=f.length+h.length;for(var x=0,S=0,T=0;T>>26)|0,S+=N>>>26,N&=67108863}g.words[T]=I,x=N,N=S}return x!==0?g.words[T]=x:g.length--,g._strip()}function L(f,h,g){return M(f,h,g)}i.prototype.mulTo=function(h,g){var x,S=this.length+h.length;return this.length===10&&h.length===10?x=k(this,h,g):S<63?x=P(this,h,g):S<1024?x=M(this,h,g):x=L(this,h,g),x};function D(f,h){this.x=f,this.y=h}D.prototype.makeRBT=function(h){for(var g=new Array(h),x=i.prototype._countBits(h)-1,S=0;S>=1;return S},D.prototype.permute=function(h,g,x,S,T,N){for(var I=0;I>>1)T++;return 1<>>13,x[2*N+1]=T&8191,T=T>>>13;for(N=2*g;N>=26,x+=T/67108864|0,x+=N>>>26,this.words[S]=N&67108863}return x!==0&&(this.words[S]=x,this.length++),g?this.ineg():this},i.prototype.muln=function(h){return this.clone().imuln(h)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(h){var g=R(h);if(g.length===0)return new i(1);for(var x=this,S=0;S=0);var g=h%26,x=(h-g)/26,S=67108863>>>26-g<<26-g,T;if(g!==0){var N=0;for(T=0;T>>26-g}N&&(this.words[T]=N,this.length++)}if(x!==0){for(T=this.length-1;T>=0;T--)this.words[T+x]=this.words[T];for(T=0;T=0);var S;g?S=(g-g%26)/26:S=0;var T=h%26,N=Math.min((h-T)/26,this.length),I=67108863^67108863>>>T<N)for(this.length-=N,C=0;C=0&&(Y!==0||C>=S);C--){var ne=this.words[C]|0;this.words[C]=Y<<26-T|ne>>>T,Y=ne&I}return m&&Y!==0&&(m.words[m.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(h,g,x){return r(this.negative===0),this.iushrn(h,g,x)},i.prototype.shln=function(h){return this.clone().ishln(h)},i.prototype.ushln=function(h){return this.clone().iushln(h)},i.prototype.shrn=function(h){return this.clone().ishrn(h)},i.prototype.ushrn=function(h){return this.clone().iushrn(h)},i.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var g=h%26,x=(h-g)/26,S=1<=0);var g=h%26,x=(h-g)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(g!==0&&x++,this.length=Math.min(x,this.length),g!==0){var S=67108863^67108863>>>g<=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},i.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g>26)-(m/67108864|0),this.words[T+x]=N&67108863}for(;T>26,this.words[T+x]=N&67108863;if(I===0)return this._strip();for(r(I===-1),I=0,T=0;T>26,this.words[T]=N&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(h,g){var x=this.length-h.length,S=this.clone(),T=h,N=T.words[T.length-1]|0,I=this._countBits(N);x=26-I,x!==0&&(T=T.ushln(x),S.iushln(x),N=T.words[T.length-1]|0);var m=S.length-T.length,C;if(g!=="mod"){C=new i(null),C.length=m+1,C.words=new Array(C.length);for(var Y=0;Y=0;b--){var H=(S.words[T.length+b]|0)*67108864+(S.words[T.length+b-1]|0);for(H=Math.min(H/N|0,67108863),S._ishlnsubmul(T,H,b);S.negative!==0;)H--,S.negative=0,S._ishlnsubmul(T,1,b),S.isZero()||(S.negative^=1);C&&(C.words[b]=H)}return C&&C._strip(),S._strip(),g!=="div"&&x!==0&&S.iushrn(x),{div:C||null,mod:S}},i.prototype.divmod=function(h,g,x){if(r(!h.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var S,T,N;return this.negative!==0&&h.negative===0?(N=this.neg().divmod(h,g),g!=="mod"&&(S=N.div.neg()),g!=="div"&&(T=N.mod.neg(),x&&T.negative!==0&&T.iadd(h)),{div:S,mod:T}):this.negative===0&&h.negative!==0?(N=this.divmod(h.neg(),g),g!=="mod"&&(S=N.div.neg()),{div:S,mod:N.mod}):this.negative&h.negative?(N=this.neg().divmod(h.neg(),g),g!=="div"&&(T=N.mod.neg(),x&&T.negative!==0&&T.isub(h)),{div:N.div,mod:T}):h.length>this.length||this.cmp(h)<0?{div:new i(0),mod:this}:h.length===1?g==="div"?{div:this.divn(h.words[0]),mod:null}:g==="mod"?{div:null,mod:new i(this.modrn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new i(this.modrn(h.words[0]))}:this._wordDiv(h,g)},i.prototype.div=function(h){return this.divmod(h,"div",!1).div},i.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},i.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},i.prototype.divRound=function(h){var g=this.divmod(h);if(g.mod.isZero())return g.div;var x=g.div.negative!==0?g.mod.isub(h):g.mod,S=h.ushrn(1),T=h.andln(1),N=x.cmp(S);return N<0||T===1&&N===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},i.prototype.modrn=function(h){var g=h<0;g&&(h=-h),r(h<=67108863);for(var x=(1<<26)%h,S=0,T=this.length-1;T>=0;T--)S=(x*S+(this.words[T]|0))%h;return g?-S:S},i.prototype.modn=function(h){return this.modrn(h)},i.prototype.idivn=function(h){var g=h<0;g&&(h=-h),r(h<=67108863);for(var x=0,S=this.length-1;S>=0;S--){var T=(this.words[S]|0)+x*67108864;this.words[S]=T/h|0,x=T%h}return this._strip(),g?this.ineg():this},i.prototype.divn=function(h){return this.clone().idivn(h)},i.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var g=this,x=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var S=new i(1),T=new i(0),N=new i(0),I=new i(1),m=0;g.isEven()&&x.isEven();)g.iushrn(1),x.iushrn(1),++m;for(var C=x.clone(),Y=g.clone();!g.isZero();){for(var ne=0,b=1;!(g.words[0]&b)&&ne<26;++ne,b<<=1);if(ne>0)for(g.iushrn(ne);ne-- >0;)(S.isOdd()||T.isOdd())&&(S.iadd(C),T.isub(Y)),S.iushrn(1),T.iushrn(1);for(var H=0,G=1;!(x.words[0]&G)&&H<26;++H,G<<=1);if(H>0)for(x.iushrn(H);H-- >0;)(N.isOdd()||I.isOdd())&&(N.iadd(C),I.isub(Y)),N.iushrn(1),I.iushrn(1);g.cmp(x)>=0?(g.isub(x),S.isub(N),T.isub(I)):(x.isub(g),N.isub(S),I.isub(T))}return{a:N,b:I,gcd:x.iushln(m)}},i.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var g=this,x=h.clone();g.negative!==0?g=g.umod(h):g=g.clone();for(var S=new i(1),T=new i(0),N=x.clone();g.cmpn(1)>0&&x.cmpn(1)>0;){for(var I=0,m=1;!(g.words[0]&m)&&I<26;++I,m<<=1);if(I>0)for(g.iushrn(I);I-- >0;)S.isOdd()&&S.iadd(N),S.iushrn(1);for(var C=0,Y=1;!(x.words[0]&Y)&&C<26;++C,Y<<=1);if(C>0)for(x.iushrn(C);C-- >0;)T.isOdd()&&T.iadd(N),T.iushrn(1);g.cmp(x)>=0?(g.isub(x),S.isub(T)):(x.isub(g),T.isub(S))}var ne;return g.cmpn(1)===0?ne=S:ne=T,ne.cmpn(0)<0&&ne.iadd(h),ne},i.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var g=this.clone(),x=h.clone();g.negative=0,x.negative=0;for(var S=0;g.isEven()&&x.isEven();S++)g.iushrn(1),x.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;x.isEven();)x.iushrn(1);var T=g.cmp(x);if(T<0){var N=g;g=x,x=N}else if(T===0||x.cmpn(1)===0)break;g.isub(x)}while(!0);return x.iushln(S)},i.prototype.invm=function(h){return this.egcd(h).a.umod(h)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(h){return this.words[0]&h},i.prototype.bincn=function(h){r(typeof h=="number");var g=h%26,x=(h-g)/26,S=1<>>26,I&=67108863,this.words[N]=I}return T!==0&&(this.words[N]=T,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(h){var g=h<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var x;if(this.length>1)x=1;else{g&&(h=-h),r(h<=67108863,"Number is too big");var S=this.words[0]|0;x=S===h?0:Sh.length)return 1;if(this.length=0;x--){var S=this.words[x]|0,T=h.words[x]|0;if(S!==T){ST&&(g=1);break}}return g},i.prototype.gtn=function(h){return this.cmpn(h)===1},i.prototype.gt=function(h){return this.cmp(h)===1},i.prototype.gten=function(h){return this.cmpn(h)>=0},i.prototype.gte=function(h){return this.cmp(h)>=0},i.prototype.ltn=function(h){return this.cmpn(h)===-1},i.prototype.lt=function(h){return this.cmp(h)===-1},i.prototype.lten=function(h){return this.cmpn(h)<=0},i.prototype.lte=function(h){return this.cmp(h)<=0},i.prototype.eqn=function(h){return this.cmpn(h)===0},i.prototype.eq=function(h){return this.cmp(h)===0},i.red=function(h){return new q(h)},i.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(h){return this.red=h,this},i.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},i.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},i.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},i.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},i.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},i.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},i.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},i.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var j={k256:null,p224:null,p192:null,p25519:null};function V(f,h){this.name=f,this.p=new i(h,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}V.prototype._tmp=function(){var h=new i(null);return h.words=new Array(Math.ceil(this.n/13)),h},V.prototype.ireduce=function(h){var g=h,x;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),x=g.bitLength();while(x>this.n);var S=x0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},V.prototype.split=function(h,g){h.iushrn(this.n,0,g)},V.prototype.imulK=function(h){return h.imul(this.k)};function K(){V.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(K,V),K.prototype.split=function(h,g){for(var x=4194303,S=Math.min(h.length,9),T=0;T>>22,N=I}N>>>=22,h.words[T-10]=N,N===0&&h.length>10?h.length-=10:h.length-=9},K.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var g=0,x=0;x>>=26,h.words[x]=T,g=S}return g!==0&&(h.words[h.length++]=g),h},i._prime=function(h){if(j[h])return j[h];var g;if(h==="k256")g=new K;else if(h==="p224")g=new B;else if(h==="p192")g=new W;else if(h==="p25519")g=new z;else throw new Error("Unknown prime "+h);return j[h]=g,g};function q(f){if(typeof f=="string"){var h=i._prime(f);this.m=h.p,this.prime=h}else r(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}q.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},q.prototype._verify2=function(h,g){r((h.negative|g.negative)===0,"red works only with positives"),r(h.red&&h.red===g.red,"red works only with red numbers")},q.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):(u(h,h.umod(this.m)._forceRed(this)),h)},q.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},q.prototype.add=function(h,g){this._verify2(h,g);var x=h.add(g);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(h,g){this._verify2(h,g);var x=h.iadd(g);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(h,g){this._verify2(h,g);var x=h.sub(g);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(h,g){this._verify2(h,g);var x=h.isub(g);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(h,g){return this._verify1(h),this.imod(h.ushln(g))},q.prototype.imul=function(h,g){return this._verify2(h,g),this.imod(h.imul(g))},q.prototype.mul=function(h,g){return this._verify2(h,g),this.imod(h.mul(g))},q.prototype.isqr=function(h){return this.imul(h,h.clone())},q.prototype.sqr=function(h){return this.mul(h,h)},q.prototype.sqrt=function(h){if(h.isZero())return h.clone();var g=this.m.andln(3);if(r(g%2===1),g===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(h,x)}for(var S=this.m.subn(1),T=0;!S.isZero()&&S.andln(1)===0;)T++,S.iushrn(1);r(!S.isZero());var N=new i(1).toRed(this),I=N.redNeg(),m=this.m.subn(1).iushrn(1),C=this.m.bitLength();for(C=new i(2*C*C).toRed(this);this.pow(C,m).cmp(I)!==0;)C.redIAdd(I);for(var Y=this.pow(C,S),ne=this.pow(h,S.addn(1).iushrn(1)),b=this.pow(h,S),H=T;b.cmp(N)!==0;){for(var G=b,U=0;G.cmp(N)!==0;U++)G=G.redSqr();r(U=0;T--){for(var Y=g.words[T],ne=C-1;ne>=0;ne--){var b=Y>>ne&1;if(N!==S[0]&&(N=this.sqr(N)),b===0&&I===0){m=0;continue}I<<=1,I|=b,m++,!(m!==x&&(T!==0||ne!==0))&&(N=this.mul(N,S[I]),m=0,I=0)}C=26}return N},q.prototype.convertTo=function(h){var g=h.umod(this.m);return g===h?g.clone():g},q.prototype.convertFrom=function(h){var g=h.clone();return g.red=null,g},i.mont=function(h){return new Q(h)};function Q(f){q.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(Q,q),Q.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},Q.prototype.convertFrom=function(h){var g=this.imod(h.mul(this.rinv));return g.red=null,g},Q.prototype.imul=function(h,g){if(h.isZero()||g.isZero())return h.words[0]=0,h.length=1,h;var x=h.imul(g),S=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=x.isub(S).iushrn(this.shift),N=T;return T.cmp(this.m)>=0?N=T.isub(this.m):T.cmpn(0)<0&&(N=T.iadd(this.m)),N._forceRed(this)},Q.prototype.mul=function(h,g){if(h.isZero()||g.isZero())return new i(0)._forceRed(this);var x=h.mul(g),S=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),T=x.isub(S).iushrn(this.shift),N=T;return T.cmp(this.m)>=0?N=T.isub(this.m):T.cmpn(0)<0&&(N=T.iadd(this.m)),N._forceRed(this)},Q.prototype.invm=function(h){var g=this.imod(h._invmp(this.m).mul(this.r2));return g._forceRed(this)}})(typeof jQ>"u"||jQ,Qbe)});var LE=X(D4=>{"use strict";Object.defineProperty(D4,"__esModule",{value:!0});D4.errorValues=D4.standardErrorCodes=void 0;D4.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};D4.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}});var WP=X(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.serialize=Zl.getErrorCode=Zl.isValidCode=Zl.getMessageFromCode=Zl.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var zP=LE(),Jbe="Unspecified error message.";Zl.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function Xbe(t,e=Jbe){if(t&&Number.isInteger(t)){let r=t.toString();if($Q(zP.errorValues,r))return zP.errorValues[r].message;if(t6e(t))return Zl.JSON_RPC_SERVER_ERROR_MESSAGE}return e}Zl.getMessageFromCode=Xbe;function e6e(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(zP.errorValues[e]||t6e(t))}Zl.isValidCode=e6e;function egt(t){var e;if(typeof t=="number")return t;if(tgt(t))return(e=t.code)!==null&&e!==void 0?e:t.errorCode}Zl.getErrorCode=egt;function tgt(t){return typeof t=="object"&&t!==null&&(typeof t.code=="number"||typeof t.errorCode=="number")}function rgt(t,{shouldIncludeStack:e=!1}={}){let r={};if(t&&typeof t=="object"&&!Array.isArray(t)&&$Q(t,"code")&&e6e(t.code)){let n=t;r.code=n.code,n.message&&typeof n.message=="string"?(r.message=n.message,$Q(n,"data")&&(r.data=n.data)):(r.message=Xbe(r.code),r.data={originalError:Zbe(t)})}else r.code=zP.standardErrorCodes.rpc.internal,r.message=Ybe(t,"message")?t.message:Jbe,r.data={originalError:Zbe(t)};return e&&(r.stack=Ybe(t,"stack")?t.stack:void 0),r}Zl.serialize=rgt;function t6e(t){return t>=-32099&&t<=-32e3}function Zbe(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t}function $Q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ybe(t,e){return typeof t=="object"&&t!==null&&e in t&&typeof t[e]=="string"}});var i6e=X(GP=>{"use strict";Object.defineProperty(GP,"__esModule",{value:!0});GP.standardErrors=void 0;var da=LE(),r6e=WP();GP.standardErrors={rpc:{parse:t=>sf(da.standardErrorCodes.rpc.parse,t),invalidRequest:t=>sf(da.standardErrorCodes.rpc.invalidRequest,t),invalidParams:t=>sf(da.standardErrorCodes.rpc.invalidParams,t),methodNotFound:t=>sf(da.standardErrorCodes.rpc.methodNotFound,t),internal:t=>sf(da.standardErrorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return sf(e,t)},invalidInput:t=>sf(da.standardErrorCodes.rpc.invalidInput,t),resourceNotFound:t=>sf(da.standardErrorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>sf(da.standardErrorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>sf(da.standardErrorCodes.rpc.transactionRejected,t),methodNotSupported:t=>sf(da.standardErrorCodes.rpc.methodNotSupported,t),limitExceeded:t=>sf(da.standardErrorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>j4(da.standardErrorCodes.provider.userRejectedRequest,t),unauthorized:t=>j4(da.standardErrorCodes.provider.unauthorized,t),unsupportedMethod:t=>j4(da.standardErrorCodes.provider.unsupportedMethod,t),disconnected:t=>j4(da.standardErrorCodes.provider.disconnected,t),chainDisconnected:t=>j4(da.standardErrorCodes.provider.chainDisconnected,t),unsupportedChain:t=>j4(da.standardErrorCodes.provider.unsupportedChain,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new KP(e,r,n)}}};function sf(t,e){let[r,n]=n6e(e);return new VP(t,r||(0,r6e.getMessageFromCode)(t),n)}function j4(t,e){let[r,n]=n6e(e);return new KP(t,r||(0,r6e.getMessageFromCode)(t),n)}function n6e(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}var VP=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}},KP=class extends VP{constructor(e,r,n){if(!ngt(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};function ngt(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}});var ZP=X(QP=>{"use strict";Object.defineProperty(QP,"__esModule",{value:!0});QP.isErrorResponse=void 0;function igt(t){return t.errorMessage!==void 0}QP.isErrorResponse=igt});var JP=X(YP=>{"use strict";Object.defineProperty(YP,"__esModule",{value:!0});YP.LIB_VERSION=void 0;YP.LIB_VERSION="3.9.3"});var o6e=X(XP=>{"use strict";Object.defineProperty(XP,"__esModule",{value:!0});XP.serializeError=void 0;var ogt=ZP(),sgt=JP(),agt=LE(),cgt=WP();function lgt(t,e){let r=(0,cgt.serialize)(ugt(t),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",sgt.LIB_VERSION),n.searchParams.set("code",r.code.toString());let i=fgt(r.data,e);return i&&n.searchParams.set("method",i),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}XP.serializeError=lgt;function ugt(t){return typeof t=="string"?{message:t,code:agt.standardErrorCodes.rpc.internal}:(0,ogt.isErrorResponse)(t)?Object.assign(Object.assign({},t),{message:t.errorMessage,code:t.errorCode,data:{method:t.method}}):t}function fgt(t,e){let r=t?.method;if(r)return r;if(e!==void 0){if(typeof e=="string")return e;if(Array.isArray(e)){if(e.length>0)return e[0].method}else return e.method}}});var FE=X(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.standardErrors=af.standardErrorCodes=af.serializeError=af.getMessageFromCode=af.getErrorCode=void 0;var hgt=LE();Object.defineProperty(af,"standardErrorCodes",{enumerable:!0,get:function(){return hgt.standardErrorCodes}});var dgt=i6e();Object.defineProperty(af,"standardErrors",{enumerable:!0,get:function(){return dgt.standardErrors}});var pgt=o6e();Object.defineProperty(af,"serializeError",{enumerable:!0,get:function(){return pgt.serializeError}});var s6e=WP();Object.defineProperty(af,"getErrorCode",{enumerable:!0,get:function(){return s6e.getErrorCode}});Object.defineProperty(af,"getMessageFromCode",{enumerable:!0,get:function(){return s6e.getMessageFromCode}})});var DE=X(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.ProviderType=ja.RegExpString=ja.IntNumber=ja.BigIntString=ja.AddressString=ja.HexString=ja.OpaqueType=void 0;function UE(){return t=>t}ja.OpaqueType=UE;ja.HexString=UE();ja.AddressString=UE();ja.BigIntString=UE();function mgt(t){return Math.floor(t)}ja.IntNumber=mgt;ja.RegExpString=UE();var a6e;(function(t){t.CoinbaseWallet="CoinbaseWallet",t.MetaMask="MetaMask",t.Unselected=""})(a6e||(ja.ProviderType=a6e={}))});var Yh=X(gr=>{"use strict";var ggt=gr&&gr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gr,"__esModule",{value:!0});gr.isMobileWeb=gr.getLocation=gr.isInIFrame=gr.createQrUrl=gr.getFavicon=gr.range=gr.isBigNumber=gr.ensureParsedJSONObject=gr.ensureBN=gr.ensureRegExpString=gr.ensureIntNumber=gr.ensureBuffer=gr.ensureAddressString=gr.ensureEvenLengthHexString=gr.ensureHexString=gr.isHexString=gr.prepend0x=gr.strip0x=gr.has0xPrefix=gr.hexStringFromIntNumber=gr.intNumberFromHexString=gr.bigIntStringFromBN=gr.hexStringFromBuffer=gr.hexStringToUint8Array=gr.uint8ArrayToHex=gr.randomBytesHex=void 0;var Zg=ggt(BE()),cv=FE(),cf=DE(),c6e=/^[0-9]*$/,l6e=/^[a-f0-9]*$/;function wgt(t){return u6e(crypto.getRandomValues(new Uint8Array(t)))}gr.randomBytesHex=wgt;function u6e(t){return[...t].map(e=>e.toString(16).padStart(2,"0")).join("")}gr.uint8ArrayToHex=u6e;function vgt(t){return new Uint8Array(t.match(/.{1,2}/g).map(e=>parseInt(e,16)))}gr.hexStringToUint8Array=vgt;function ygt(t,e=!1){let r=t.toString("hex");return(0,cf.HexString)(e?`0x${r}`:r)}gr.hexStringFromBuffer=ygt;function bgt(t){return(0,cf.BigIntString)(t.toString(10))}gr.bigIntStringFromBN=bgt;function xgt(t){return(0,cf.IntNumber)(new Zg.default($E(t,!1),16).toNumber())}gr.intNumberFromHexString=xgt;function Cgt(t){return(0,cf.HexString)(`0x${new Zg.default(t).toString(16)}`)}gr.hexStringFromIntNumber=Cgt;function qQ(t){return t.startsWith("0x")||t.startsWith("0X")}gr.has0xPrefix=qQ;function eO(t){return qQ(t)?t.slice(2):t}gr.strip0x=eO;function f6e(t){return qQ(t)?`0x${t.slice(2)}`:`0x${t}`}gr.prepend0x=f6e;function jE(t){if(typeof t!="string")return!1;let e=eO(t).toLowerCase();return l6e.test(e)}gr.isHexString=jE;function h6e(t,e=!1){if(typeof t=="string"){let r=eO(t).toLowerCase();if(l6e.test(r))return(0,cf.HexString)(e?`0x${r}`:r)}throw cv.standardErrors.rpc.invalidParams(`"${String(t)}" is not a hexadecimal string`)}gr.ensureHexString=h6e;function $E(t,e=!1){let r=h6e(t,!1);return r.length%2===1&&(r=(0,cf.HexString)(`0${r}`)),e?(0,cf.HexString)(`0x${r}`):r}gr.ensureEvenLengthHexString=$E;function Egt(t){if(typeof t=="string"){let e=eO(t).toLowerCase();if(jE(e)&&e.length===40)return(0,cf.AddressString)(f6e(e))}throw cv.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(t)}`)}gr.ensureAddressString=Egt;function Agt(t){if(Buffer.isBuffer(t))return t;if(typeof t=="string"){if(jE(t)){let e=$E(t,!1);return Buffer.from(e,"hex")}return Buffer.from(t,"utf8")}throw cv.standardErrors.rpc.invalidParams(`Not binary data: ${String(t)}`)}gr.ensureBuffer=Agt;function d6e(t){if(typeof t=="number"&&Number.isInteger(t))return(0,cf.IntNumber)(t);if(typeof t=="string"){if(c6e.test(t))return(0,cf.IntNumber)(Number(t));if(jE(t))return(0,cf.IntNumber)(new Zg.default($E(t,!1),16).toNumber())}throw cv.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}gr.ensureIntNumber=d6e;function Sgt(t){if(t instanceof RegExp)return(0,cf.RegExpString)(t.toString());throw cv.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(t)}`)}gr.ensureRegExpString=Sgt;function _gt(t){if(t!==null&&(Zg.default.isBN(t)||p6e(t)))return new Zg.default(t.toString(10),10);if(typeof t=="number")return new Zg.default(d6e(t));if(typeof t=="string"){if(c6e.test(t))return new Zg.default(t,10);if(jE(t))return new Zg.default($E(t,!1),16)}throw cv.standardErrors.rpc.invalidParams(`Not an integer: ${String(t)}`)}gr.ensureBN=_gt;function Igt(t){if(typeof t=="string")return JSON.parse(t);if(typeof t=="object")return t;throw cv.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(t)}`)}gr.ensureParsedJSONObject=Igt;function p6e(t){if(t==null||typeof t.constructor!="function")return!1;let{constructor:e}=t;return typeof e.config=="function"&&typeof e.EUCLID=="number"}gr.isBigNumber=p6e;function Tgt(t,e){return Array.from({length:e-t},(r,n)=>t+n)}gr.range=Tgt;function kgt(){let t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:r}=document.location,n=t?t.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?e+n:`${e}//${r}${n}`}gr.getFavicon=kgt;function Rgt(t,e,r,n,i,o){let s=n?"parent-id":"id",c=new URLSearchParams({[s]:t,secret:e,server:r,v:i,chainId:o.toString()}).toString();return`${r}/#/link?${c}`}gr.createQrUrl=Rgt;function m6e(){try{return window.frameElement!==null}catch{return!1}}gr.isInIFrame=m6e;function Mgt(){try{return m6e()&&window.top?window.top.location:window.location}catch{return window.location}}gr.getLocation=Mgt;function Ngt(){var t;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((t=window?.navigator)===null||t===void 0?void 0:t.userAgent)}gr.isMobileWeb=Ngt});var g6e=X(tO=>{"use strict";Object.defineProperty(tO,"__esModule",{value:!0});tO.ScopedLocalStorage=void 0;var HQ=class{constructor(e){this.scope=e}setItem(e,r){localStorage.setItem(this.scopedKey(e),r)}getItem(e){return localStorage.getItem(this.scopedKey(e))}removeItem(e){localStorage.removeItem(this.scopedKey(e))}clear(){let e=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(e){return`${this.scope}:${e}`}};tO.ScopedLocalStorage=HQ});var nO=X(rO=>{"use strict";Object.defineProperty(rO,"__esModule",{value:!0});rO.EVENTS=void 0;rO.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}});var iO=X(Jh=>{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});Jh.RelayAbstract=Jh.APP_VERSION_KEY=Jh.LOCAL_STORAGE_ADDRESSES_KEY=Jh.WALLET_USER_NAME_KEY=void 0;var w6e=FE();Jh.WALLET_USER_NAME_KEY="walletUsername";Jh.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Jh.APP_VERSION_KEY="AppVersion";var zQ=class{async makeEthereumJSONRPCRequest(e,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(e),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw w6e.standardErrors.rpc.parse({});let i=n,{error:o}=i;if(o)throw(0,w6e.serializeError)(o,e.method);return i})}};Jh.RelayAbstract=zQ});var sO=X(oO=>{"use strict";Object.defineProperty(oO,"__esModule",{value:!0});oO.Session=void 0;var v6e=aQ(),y6e=Yh(),b6e="session:id",x6e="session:secret",C6e="session:linked",WQ=class t{constructor(e,r,n,i){this._storage=e,this._id=r||(0,y6e.randomBytesHex)(16),this._secret=n||(0,y6e.randomBytesHex)(32),this._key=new v6e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!i}static load(e){let r=e.getItem(b6e),n=e.getItem(C6e),i=e.getItem(x6e);return r&&i?new t(e,r,i,n==="1"):null}static hash(e){return new v6e.sha256().update(e).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(e){this._linked=e,this.persistLinked()}save(){return this._storage.setItem(b6e,this._id),this._storage.setItem(x6e,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(C6e,this._linked?"1":"0")}};oO.Session=WQ});var E6e=X(cO=>{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});cO.Cipher=void 0;var aO=Yh(),VQ=class{constructor(e){this.secret=e}async encrypt(e){let r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");let n=crypto.getRandomValues(new Uint8Array(12)),i=await crypto.subtle.importKey("raw",(0,aO.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},i,o.encode(e)),c=16,l=s.slice(s.byteLength-c),u=s.slice(0,s.byteLength-c),d=new Uint8Array(l),p=new Uint8Array(u),v=new Uint8Array([...n,...d,...p]);return(0,aO.uint8ArrayToHex)(v)}async decrypt(e){let r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,i)=>{(async function(){let o=await crypto.subtle.importKey("raw",(0,aO.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),s=(0,aO.hexStringToUint8Array)(e),c=s.slice(0,12),l=s.slice(12,28),u=s.slice(28),d=new Uint8Array([...u,...l]),p={name:"AES-GCM",iv:new Uint8Array(c)};try{let v=await window.crypto.subtle.decrypt(p,o,d),y=new TextDecoder;n(y.decode(v))}catch(v){i(v)}})()})}};cO.Cipher=VQ});var A6e=X(lO=>{"use strict";Object.defineProperty(lO,"__esModule",{value:!0});lO.WalletLinkHTTP=void 0;var KQ=class{constructor(e,r,n){this.linkAPIUrl=e,this.sessionId=r;let i=`${r}:${n}`;this.auth=`Basic ${btoa(i)}`}async markUnseenEventsAsSeen(e){return Promise.all(e.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var e;let r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){let{events:n,error:i}=await r.json();if(i)throw new Error(`Check unseen events failed: ${i}`);let o=(e=n?.filter(s=>s.event==="Web3Response").map(s=>({type:"Event",sessionId:this.sessionId,eventId:s.id,event:s.event,data:s.data})))!==null&&e!==void 0?e:[];return this.markUnseenEventsAsSeen(o),o}throw new Error(`Check unseen events failed: ${r.status}`)}};lO.WalletLinkHTTP=KQ});var S6e=X(q4=>{"use strict";Object.defineProperty(q4,"__esModule",{value:!0});q4.WalletLinkWebSocket=q4.ConnectionState=void 0;var $4;(function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"})($4||(q4.ConnectionState=$4={}));var GQ=class{setConnectionStateListener(e){this.connectionStateListener=e}setIncomingDataListener(e){this.incomingDataListener=e}constructor(e,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=e.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((e,r)=>{var n;let i;try{this.webSocket=i=new this.WebSocketClass(this.url)}catch(o){r(o);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,$4.CONNECTING),i.onclose=o=>{var s;this.clearWebSocket(),r(new Error(`websocket error ${o.code}: ${o.reason}`)),(s=this.connectionStateListener)===null||s===void 0||s.call(this,$4.DISCONNECTED)},i.onopen=o=>{var s;e(),(s=this.connectionStateListener)===null||s===void 0||s.call(this,$4.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},i.onmessage=o=>{var s,c;if(o.data==="h")(s=this.incomingDataListener)===null||s===void 0||s.call(this,{type:"Heartbeat"});else try{let l=JSON.parse(o.data);(c=this.incomingDataListener)===null||c===void 0||c.call(this,l)}catch{}}})}disconnect(){var e;let{webSocket:r}=this;if(r){this.clearWebSocket(),(e=this.connectionStateListener)===null||e===void 0||e.call(this,$4.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(e){let{webSocket:r}=this;if(!r){this.pendingData.push(e),this.connect();return}r.send(e)}clearWebSocket(){let{webSocket:e}=this;e&&(this.webSocket=null,e.onclose=null,e.onerror=null,e.onmessage=null,e.onopen=null)}};q4.WalletLinkWebSocket=GQ});var T6e=X(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});fO.WalletLinkConnection=void 0;var H4=DE(),Pgt=E6e(),Xh=nO(),_6e=iO(),z4=sO(),Ogt=A6e(),uO=S6e(),I6e=1e4,Bgt=6e4,QQ=class{constructor({session:e,linkAPIUrl:r,listener:n,diagnostic:i,WebSocketClass:o=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,H4.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=c=>{if(!c)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",u=>c.JsonRpcUrl&&this.handleChainUpdated(u,c.JsonRpcUrl)]]).forEach((u,d)=>{let p=c[d];p!==void 0&&u(p)})},this.handleDestroyed=c=>{var l,u;c==="1"&&((l=this.listener)===null||l===void 0||l.resetAndReload(),(u=this.diagnostic)===null||u===void 0||u.log(Xh.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:z4.Session.hash(this.session.id)}))},this.handleAccountUpdated=async c=>{var l,u;try{let d=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.accountUpdated(d)}catch{(u=this.diagnostic)===null||u===void 0||u.log(Xh.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(c,l)=>{var u,d;try{let p=await this.cipher.decrypt(l);(u=this.listener)===null||u===void 0||u.metadataUpdated(c,p)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Xh.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:c})}},this.handleWalletUsernameUpdated=async c=>{this.handleMetadataUpdated(_6e.WALLET_USER_NAME_KEY,c)},this.handleAppVersionUpdated=async c=>{this.handleMetadataUpdated(_6e.APP_VERSION_KEY,c)},this.handleChainUpdated=async(c,l)=>{var u,d;try{let p=await this.cipher.decrypt(c),v=await this.cipher.decrypt(l);(u=this.listener)===null||u===void 0||u.chainUpdated(p,v)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Xh.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=e,this.cipher=new Pgt.Cipher(e.secret),this.diagnostic=i,this.listener=n;let s=new uO.WalletLinkWebSocket(`${r}/rpc`,o);s.setConnectionStateListener(async c=>{var l;(l=this.diagnostic)===null||l===void 0||l.log(Xh.EVENTS.CONNECTED_STATE_CHANGE,{state:c,sessionIdHash:z4.Session.hash(e.id)});let u=!1;switch(c){case uO.ConnectionState.DISCONNECTED:if(!this.destroyed){let d=async()=>{await new Promise(p=>setTimeout(p,5e3)),this.destroyed||s.connect().catch(()=>{d()})};d()}break;case uO.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),u=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},I6e),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case uO.ConnectionState.CONNECTING:break}this.connected!==u&&(this.connected=u)}),s.setIncomingDataListener(c=>{var l,u,d;switch(c.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{let p=c.type==="IsLinkedOK"?c.linked:void 0;(l=this.diagnostic)===null||l===void 0||l.log(Xh.EVENTS.LINKED,{sessionIdHash:z4.Session.hash(e.id),linked:p,type:c.type,onlineGuests:c.onlineGuests}),this.linked=p||c.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(u=this.diagnostic)===null||u===void 0||u.log(Xh.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:z4.Session.hash(e.id),metadata_keys:c&&c.metadata?Object.keys(c.metadata):void 0}),this.handleSessionMetadataUpdated(c.metadata);break}case"Event":{this.handleIncomingEvent(c);break}}c.id!==void 0&&((d=this.requestResolutions.get(c.id))===null||d===void 0||d(c))}),this.ws=s,this.http=new Ogt.WalletLinkHTTP(r,e.id,e.key)}connect(){var e;if(this.destroyed)throw new Error("instance is destroyed");(e=this.diagnostic)===null||e===void 0||e.log(Xh.EVENTS.STARTED_CONNECTING,{sessionIdHash:z4.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var e;this.destroyed=!0,this.ws.disconnect(),(e=this.diagnostic)===null||e===void 0||e.log(Xh.EVENTS.DISCONNECTED,{sessionIdHash:z4.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(e){var r,n;this._connected=e,e&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(e)}setOnceConnected(e){return new Promise(r=>{this.connected?e().then(r):this.onceConnected=()=>{e().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(e){var r,n;this._linked=e,e&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(e)}setOnceLinked(e){return new Promise(r=>{this.linked?e().then(r):this.onceLinked=()=>{e().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(e){var r,n;if(!(e.type!=="Event"||e.event!=="Web3Response"))try{let i=await this.cipher.decrypt(e.data),o=JSON.parse(i);if(o.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(o)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Xh.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(e=>setTimeout(e,250));try{await this.fetchUnseenEventsAPI()}catch(e){console.error("Unable to check for unseen events",e)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(e,r){let n={type:"SetSessionConfig",id:(0,H4.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[e]:r}};return this.setOnceConnected(async()=>{let i=await this.makeRequest(n);if(i.type==="Fail")throw new Error(i.error||"failed to set session metadata")})}async publishEvent(e,r,n=!1){let i=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),o={type:"PublishEvent",id:(0,H4.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:e,data:i,callWebhook:n};return this.setOnceLinked(async()=>{let s=await this.makeRequest(o);if(s.type==="Fail")throw new Error(s.error||"failed to publish event");return s.eventId})}sendData(e){this.ws.sendData(JSON.stringify(e))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>I6e*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(e,r=Bgt){let n=e.id;this.sendData(e);let i;return Promise.race([new Promise((o,s)=>{i=window.setTimeout(()=>{s(new Error(`request ${n} timed out`))},r)}),new Promise(o=>{this.requestResolutions.set(n,s=>{clearTimeout(i),o(s),this.requestResolutions.delete(n)})})])}async authenticate(){let e={type:"HostSession",id:(0,H4.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(e);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){let e={type:"IsLinked",id:(0,H4.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}sendGetSessionConfig(){let e={type:"GetSessionConfig",id:(0,H4.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(e)}};fO.WalletLinkConnection=QQ});var k6e=X(ZQ=>{"use strict";Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'});var YQ=X(W4=>{"use strict";var Lgt=W4&&W4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(W4,"__esModule",{value:!0});W4.injectCssReset=void 0;var Fgt=Lgt(k6e());function Ugt(){let t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(Fgt.default)),document.documentElement.appendChild(t)}W4.injectCssReset=Ugt});var M6e=X(hO=>{"use strict";Object.defineProperty(hO,"__esModule",{value:!0});hO.CloseIcon=void 0;var R6e=($s(),Vn(ha));function Dgt(t){return(0,R6e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,R6e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}hO.CloseIcon=Dgt});var N6e=X(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});pO.CoinbaseWalletRound=void 0;var dO=($s(),Vn(ha));function jgt(t){return(0,dO.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,dO.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,dO.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,dO.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}pO.CoinbaseWalletRound=jgt});var P6e=X(mO=>{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});mO.QRCodeIcon=void 0;var qE=($s(),Vn(ha));function $gt(t){return(0,qE.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),(0,qE.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,qE.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,qE.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,qE.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}mO.QRCodeIcon=$gt});var U6e=X((i5r,F6e)=>{function O6e(t){this.mode=Yl.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,r=this.data.length;e65536?(n[0]=240|(i&1835008)>>>18,n[1]=128|(i&258048)>>>12,n[2]=128|(i&4032)>>>6,n[3]=128|i&63):i>2048?(n[0]=224|(i&61440)>>>12,n[1]=128|(i&4032)>>>6,n[2]=128|i&63):i>128?(n[0]=192|(i&1984)>>>6,n[1]=128|i&63):n[0]=i,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}O6e.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,r=this.parsedData.length;e=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=td.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[t+r][e+n]=!0:this.modules[t+r][e+n]=!1)},getBestMaskPattern:function(){for(var t=0,e=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=fo.getLostPoint(this);(r==0||t>n)&&(t=n,e=r)}return e},createMovieClip:function(t,e,r){var n=t.createEmptyMovieClip(e,r),i=1;this.make();for(var o=0;o>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(t,e){for(var r=this.errorCorrectLevel<<3|e,n=fo.getBCHTypeInfo(r),i=0;i<15;i++){var o=!t&&(n>>i&1)==1;i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(var i=0;i<15;i++){var o=!t&&(n>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var r=-1,n=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(s==6&&s--;;){for(var c=0;c<2;c++)if(this.modules[n][s-c]==null){var l=!1;o>>i&1)==1);var u=fo.getMask(e,n,s-c);u&&(l=!l),this.modules[n][s-c]=l,i--,i==-1&&(o++,i=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};td.PAD0=236;td.PAD1=17;td.createData=function(t,e,r){for(var n=ed.getRSBlocks(t,e),i=new B6e,o=0;oc*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+c*8+")");for(i.getLengthInBits()+4<=c*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=c*8||(i.put(td.PAD0,8),i.getLengthInBits()>=c*8));)i.put(td.PAD1,8);return td.createBytes(i,n)};td.createBytes=function(t,e){for(var r=0,n=0,i=0,o=new Array(e.length),s=new Array(e.length),c=0;c=0?y.get(_):0}}for(var R=0,d=0;d=0;)e^=fo.G15<=0;)e^=fo.G18<>>=1;return e},getPatternPosition:function(t){return fo.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,r){switch(t){case Yg.PATTERN000:return(e+r)%2==0;case Yg.PATTERN001:return e%2==0;case Yg.PATTERN010:return r%3==0;case Yg.PATTERN011:return(e+r)%3==0;case Yg.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case Yg.PATTERN101:return e*r%2+e*r%3==0;case Yg.PATTERN110:return(e*r%2+e*r%3)%2==0;case Yg.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new V4([1],0),r=0;r5&&(r+=3+o-5)}for(var n=0;n=256;)t-=255;return Hs.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(as=0;as<8;as++)Hs.EXP_TABLE[as]=1<>>7-t%8&1)==1},put:function(t,e){for(var r=0;r>>e-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var JQ=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function L6e(t){var e=this;if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof t=="string"&&(t={content:t}),t)for(var r in t)this.options[r]=t[r];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function n(u){switch(u){case"L":return Jg.L;case"M":return Jg.M;case"Q":return Jg.Q;case"H":return Jg.H;default:throw new Error("Unknwon error correction level: "+u)}}function i(u,d){for(var p=o(u),v=1,y=0,_=0,R=JQ.length;_<=R;_++){var P=JQ[_];if(!P)throw new Error("Content too long: expected "+y+" but got "+p);switch(d){case"L":y=P[0];break;case"M":y=P[1];break;case"Q":y=P[2];break;case"H":y=P[3];break;default:throw new Error("Unknwon error correction level: "+d)}if(p<=y)break;v++}if(v>JQ.length)throw new Error("Content too long");return v}function o(u){var d=encodeURI(u).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return d.length+(d.length!=u?3:0)}var s=this.options.content,c=i(s,this.options.ecl),l=n(this.options.ecl);this.qrcode=new td(c,l),this.qrcode.addData(s),this.qrcode.make()}L6e.prototype.svg=function(t){var e=this.options||{},r=this.qrcode.modules;typeof t>"u"&&(t={container:e.container||"svg"});for(var n=typeof e.pretty<"u"?!!e.pretty:!0,i=n?" ":"",o=n?`\r `:"",s=e.width,c=e.height,l=r.length,u=s/(l+2*e.padding),d=c/(l+2*e.padding),p=typeof e.join<"u"?!!e.join:!1,v=typeof e.swap<"u"?!!e.swap:!1,y=typeof e.xmlDeclaration<"u"?!!e.xmlDeclaration:!0,_=typeof e.predefined<"u"?!!e.predefined:!1,R=_?i+''+o:"",P=i+''+o,k="",M="",L=0;L'+o:k+=i+''+o}}p&&(k=i+'');let q="";if(this.options.image!==void 0&&this.options.image.svg){let f=s*this.options.image.width/100,h=c*this.options.image.height/100,g=s/2-f/2,x=c/2-h/2;q+=``,q+=this.options.image.svg+o,q+=""}var Q="";switch(t.container){case"svg":y&&(Q+=''+o),Q+=''+o,Q+=R+P+k,Q+=q,Q+="";break;case"svg-viewbox":y&&(Q+=''+o),Q+=''+o,Q+=R+P+k,Q+=q,Q+="";break;case"g":Q+=''+o,Q+=R+P+k,Q+=q,Q+="";break;default:Q+=(R+P+k+q).replace(/^\s+/,"");break}return Q};F6e.exports=L6e});var j6e=X(K4=>{"use strict";var qgt=K4&&K4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K4,"__esModule",{value:!0});K4.QRCode=void 0;var Hgt=($s(),Vn(ha)),D6e=(P4(),Vn(N4)),zgt=qgt(U6e()),Wgt=t=>{let[e,r]=(0,D6e.useState)("");return(0,D6e.useEffect)(()=>{var n,i;let o=new zgt.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:(n=t.width)!==null&&n!==void 0?n:256,height:(i=t.height)!==null&&i!==void 0?i:256,padding:0,image:t.image}),s=Buffer.from(o.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${s}`)},[t.bgColor,t.content,t.fgColor,t.height,t.image,t.width]),e?(0,Hgt.h)("img",{src:e,alt:"QR Code"}):null};K4.QRCode=Wgt});var $6e=X(XQ=>{"use strict";Object.defineProperty(XQ,"__esModule",{value:!0});XQ.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"});var q6e=X(G4=>{"use strict";var Vgt=G4&&G4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(G4,"__esModule",{value:!0});G4.Spinner=void 0;var gO=($s(),Vn(ha)),Kgt=Vgt($6e()),Ggt=t=>{var e;let r=(e=t.size)!==null&&e!==void 0?e:64,n=t.color||"#000";return(0,gO.h)("div",{class:"-cbwsdk-spinner"},(0,gO.h)("style",null,Kgt.default),(0,gO.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,gO.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};G4.Spinner=Ggt});var H6e=X(eZ=>{"use strict";Object.defineProperty(eZ,"__esModule",{value:!0});eZ.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"});var V6e=X(Xg=>{"use strict";var z6e=Xg&&Xg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xg,"__esModule",{value:!0});Xg.CoinbaseWalletSteps=Xg.ConnectContent=void 0;var lv=z6e(Kg()),ei=($s(),Vn(ha)),Qgt=Yh(),Zgt=JP(),Ygt=M6e(),Jgt=N6e(),Xgt=P6e(),e2t=j6e(),t2t=q6e(),r2t=z6e(H6e()),tZ={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:W6e},n2t=t=>t==="light"?"#FFFFFF":"#0A0B0D";function i2t(t){let{theme:e}=t,r=(0,Qgt.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection,t.version,t.chainId),n=tZ.steps;return(0,ei.h)("div",{"data-testid":"connect-content",className:(0,lv.default)("-cbwsdk-connect-content",e)},(0,ei.h)("style",null,r2t.default),(0,ei.h)("div",{className:"-cbwsdk-connect-content-header"},(0,ei.h)("h2",{className:(0,lv.default)("-cbwsdk-connect-content-heading",e)},"Scan to connect with our mobile app"),t.onCancel&&(0,ei.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:t.onCancel},(0,ei.h)(Ygt.CloseIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ei.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,ei.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,ei.h)(o2t,{title:tZ.title,description:tZ.description,theme:e})),(0,ei.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,ei.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,ei.h)(e2t.QRCode,{content:r,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,ei.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:Zgt.LIB_VERSION}),(0,ei.h)("input",{type:"hidden",value:r})),(0,ei.h)(n,{theme:e}),!t.isConnected&&(0,ei.h)("div",{"data-testid":"connecting-spinner",className:(0,lv.default)("-cbwsdk-connect-content-qr-connecting",e)},(0,ei.h)(t2t.Spinner,{size:36,color:e==="dark"?"#FFF":"#000"}),(0,ei.h)("p",null,"Connecting...")))))}Xg.ConnectContent=i2t;function o2t({title:t,description:e,theme:r}){return(0,ei.h)("div",{className:(0,lv.default)("-cbwsdk-connect-item",r)},(0,ei.h)("div",null,(0,ei.h)(Jgt.CoinbaseWalletRound,null)),(0,ei.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,ei.h)("h3",{className:"-cbwsdk-connect-item-title"},t),(0,ei.h)("p",{className:"-cbwsdk-connect-item-description"},e)))}function W6e({theme:t}){return(0,ei.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,ei.h)("li",{className:(0,lv.default)("-cbwsdk-wallet-steps-item",t)},(0,ei.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,ei.h)("li",{className:(0,lv.default)("-cbwsdk-wallet-steps-item",t)},(0,ei.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,ei.h)("span",null,"Tap ",(0,ei.h)("strong",null,"Scan")," "),(0,ei.h)("span",{className:(0,lv.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",t)},(0,ei.h)(Xgt.QRCodeIcon,{fill:n2t(t)})))))}Xg.CoinbaseWalletSteps=W6e});var G6e=X(wO=>{"use strict";Object.defineProperty(wO,"__esModule",{value:!0});wO.ArrowLeftIcon=void 0;var K6e=($s(),Vn(ha));function s2t(t){return(0,K6e.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(0,K6e.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}wO.ArrowLeftIcon=s2t});var Q6e=X(vO=>{"use strict";Object.defineProperty(vO,"__esModule",{value:!0});vO.LaptopIcon=void 0;var rZ=($s(),Vn(ha));function a2t(t){return(0,rZ.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,rZ.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,rZ.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}vO.LaptopIcon=a2t});var Y6e=X(yO=>{"use strict";Object.defineProperty(yO,"__esModule",{value:!0});yO.SafeIcon=void 0;var Z6e=($s(),Vn(ha));function c2t(t){return(0,Z6e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,Z6e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}yO.SafeIcon=c2t});var J6e=X(nZ=>{"use strict";Object.defineProperty(nZ,"__esModule",{value:!0});nZ.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"});var e4e=X(Q4=>{"use strict";var X6e=Q4&&Q4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Q4,"__esModule",{value:!0});Q4.TryExtensionContent=void 0;var uv=X6e(Kg()),cs=($s(),Vn(ha)),iZ=(P4(),Vn(N4)),l2t=G6e(),u2t=Q6e(),f2t=Y6e(),h2t=X6e(J6e());function d2t({theme:t}){let[e,r]=(0,iZ.useState)(!1),n=(0,iZ.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),i=(0,iZ.useCallback)(()=>{e?window.location.reload():(n(),r(!0))},[n,e]);return(0,cs.h)("div",{class:(0,uv.default)("-cbwsdk-try-extension",t)},(0,cs.h)("style",null,h2t.default),(0,cs.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,cs.h)("h3",{class:(0,uv.default)("-cbwsdk-try-extension-heading",t)},"Or try the Coinbase Wallet browser extension"),(0,cs.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,cs.h)("button",{class:(0,uv.default)("-cbwsdk-try-extension-cta",t),onClick:i},e?"Refresh":"Install"),(0,cs.h)("div",null,!e&&(0,cs.h)(l2t.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:t==="light"?"#0052FF":"#588AF5"})))),(0,cs.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,cs.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,cs.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,cs.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,cs.h)("span",{class:(0,uv.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,cs.h)(u2t.LaptopIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,cs.h)("div",{class:(0,uv.default)("-cbwsdk-try-extension-list-item-copy",t)},"Connect with dapps with just one click on your desktop browser")),(0,cs.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,cs.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,cs.h)("span",{class:(0,uv.default)("-cbwsdk-try-extension-list-item-icon",t)},(0,cs.h)(f2t.SafeIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,cs.h)("div",{class:(0,uv.default)("-cbwsdk-try-extension-list-item-copy",t)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}Q4.TryExtensionContent=d2t});var t4e=X(oZ=>{"use strict";Object.defineProperty(oZ,"__esModule",{value:!0});oZ.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"});var n4e=X(Z4=>{"use strict";var r4e=Z4&&Z4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Z4,"__esModule",{value:!0});Z4.ConnectDialog=void 0;var sZ=r4e(Kg()),fv=($s(),Vn(ha)),aZ=(P4(),Vn(N4)),p2t=V6e(),m2t=e4e(),g2t=r4e(t4e()),w2t=t=>{let{isOpen:e,darkMode:r}=t,[n,i]=(0,aZ.useState)(!e),[o,s]=(0,aZ.useState)(!e);(0,aZ.useEffect)(()=>{let l=[window.setTimeout(()=>{s(!e)},10)];return e?i(!1):l.push(window.setTimeout(()=>{i(!0)},360)),()=>{l.forEach(window.clearTimeout)}},[e]);let c=r?"dark":"light";return(0,fv.h)("div",{class:(0,sZ.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,fv.h)("style",null,g2t.default),(0,fv.h)("div",{class:(0,sZ.default)("-cbwsdk-connect-dialog-backdrop",c,o&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,fv.h)("div",{class:"-cbwsdk-connect-dialog"},(0,fv.h)("div",{class:(0,sZ.default)("-cbwsdk-connect-dialog-box",o&&"-cbwsdk-connect-dialog-box-hidden")},t.connectDisabled?null:(0,fv.h)(p2t.ConnectContent,{theme:c,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection,chainId:t.chainId,onCancel:t.onCancel}),(0,fv.h)(m2t.TryExtensionContent,{theme:c}))))};Z4.ConnectDialog=w2t});var i4e=X(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});bO.LinkFlow=void 0;var cZ=($s(),Vn(ha)),v2t=n4e(),lZ=class{constructor(e){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=e.darkMode,this.version=e.version,this.sessionId=e.sessionId,this.sessionSecret=e.sessionSecret,this.linkAPIUrl=e.linkAPIUrl,this.isParentConnection=e.isParentConnection}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",e.appendChild(this.root),this.render()}setConnected(e){this.connected!==e&&(this.connected=e,this.render())}setChainId(e){this.chainId!==e&&(this.chainId=e,this.render())}detach(){var e;this.root&&((0,cZ.render)(null,this.root),(e=this.root.parentElement)===null||e===void 0||e.removeChild(this.root))}setConnectDisabled(e){this.connectDisabled=e}open(e){this.isOpen=!0,this.onCancel=e.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,cZ.render)((0,cZ.h)(v2t.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};bO.LinkFlow=lZ});var o4e=X(uZ=>{"use strict";Object.defineProperty(uZ,"__esModule",{value:!0});uZ.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"});var dZ=X(lf=>{"use strict";var s4e=lf&&lf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lf,"__esModule",{value:!0});lf.SnackbarInstance=lf.SnackbarContainer=lf.Snackbar=void 0;var xO=s4e(Kg()),ls=($s(),Vn(ha)),fZ=(P4(),Vn(N4)),y2t=s4e(o4e()),b2t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",x2t="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",hZ=class{constructor(e){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=e.darkMode}attach(e){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",e.appendChild(this.root),this.render()}presentItem(e){let r=this.nextItemKey++;return this.items.set(r,e),this.render(),()=>{this.items.delete(r),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,ls.render)((0,ls.h)("div",null,(0,ls.h)(lf.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([e,r])=>(0,ls.h)(lf.SnackbarInstance,Object.assign({},r,{key:e}))))),this.root)}};lf.Snackbar=hZ;var C2t=t=>(0,ls.h)("div",{class:(0,xO.default)("-cbwsdk-snackbar-container")},(0,ls.h)("style",null,y2t.default),(0,ls.h)("div",{class:"-cbwsdk-snackbar"},t.children));lf.SnackbarContainer=C2t;var E2t=({autoExpand:t,message:e,menuItems:r})=>{let[n,i]=(0,fZ.useState)(!0),[o,s]=(0,fZ.useState)(t??!1);(0,fZ.useEffect)(()=>{let l=[window.setTimeout(()=>{i(!1)},1),window.setTimeout(()=>{s(!0)},1e4)];return()=>{l.forEach(window.clearTimeout)}});let c=()=>{s(!o)};return(0,ls.h)("div",{class:(0,xO.default)("-cbwsdk-snackbar-instance",n&&"-cbwsdk-snackbar-instance-hidden",o&&"-cbwsdk-snackbar-instance-expanded")},(0,ls.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:c},(0,ls.h)("img",{src:b2t,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,ls.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},e),(0,ls.h)("div",{class:"-gear-container"},!o&&(0,ls.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,ls.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,ls.h)("img",{src:x2t,class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,ls.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map((l,u)=>(0,ls.h)("div",{class:(0,xO.default)("-cbwsdk-snackbar-instance-menu-item",l.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:l.onClick,key:u},(0,ls.h)("svg",{width:l.svgWidth,height:l.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,ls.h)("path",{"fill-rule":l.defaultFillRule,"clip-rule":l.defaultClipRule,d:l.path,fill:"#AAAAAA"})),(0,ls.h)("span",{class:(0,xO.default)("-cbwsdk-snackbar-instance-menu-item-info",l.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},l.info)))))};lf.SnackbarInstance=E2t});var mZ=X(CO=>{"use strict";Object.defineProperty(CO,"__esModule",{value:!0});CO.WalletLinkRelayUI=void 0;var A2t=YQ(),S2t=i4e(),_2t=dZ(),pZ=class{constructor(e){this.standalone=null,this.attached=!1,this.snackbar=new _2t.Snackbar({darkMode:e.darkMode}),this.linkFlow=new S2t.LinkFlow({darkMode:e.darkMode,version:e.version,sessionId:e.session.id,sessionSecret:e.session.secret,linkAPIUrl:e.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");let e=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",e.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,A2t.injectCssReset)()}setConnected(e){this.linkFlow.setConnected(e)}setChainId(e){this.linkFlow.setChainId(e)}setConnectDisabled(e){this.linkFlow.setConnectDisabled(e)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(e){this.linkFlow.open({onCancel:e.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(e){let r;return e.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]}:r={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:e.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:e.onResetConnection}]},this.snackbar.presentItem(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(e){this.standalone=e}isStandalone(){var e;return(e=this.standalone)!==null&&e!==void 0?e:!1}};CO.WalletLinkRelayUI=pZ});var gZ=X(AO=>{"use strict";Object.defineProperty(AO,"__esModule",{value:!0});AO.WalletLinkRelay=void 0;var Y4=FE(),I2t=DE(),ho=Yh(),hv=nO(),a4e=iO(),e2=sO(),T2t=T6e(),dv=ZP(),k2t=mZ(),EO=class t extends a4e.RelayAbstract{constructor(e){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=s=>{var c;this.isLinked=s;let l=this.storage.getItem(a4e.LOCAL_STORAGE_ADDRESSES_KEY);if(s&&(this.session.linked=s),this.isUnlinkedErrorState=!1,l){let u=l.split(" "),d=this.storage.getItem("IsStandaloneSigning")==="true";if(u[0]!==""&&!s&&this.session.linked&&!d){this.isUnlinkedErrorState=!0;let p=this.getSessionIdHash();(c=this.diagnostic)===null||c===void 0||c.log(hv.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:p})}}},this.metadataUpdated=(s,c)=>{this.storage.setItem(s,c)},this.chainUpdated=(s,c)=>{this.chainCallbackParams.chainId===s&&this.chainCallbackParams.jsonRpcUrl===c||(this.chainCallbackParams={chainId:s,jsonRpcUrl:c},this.chainCallback&&this.chainCallback(s,c))},this.accountUpdated=s=>{this.accountsCallback&&this.accountsCallback([s]),t.accountRequestCallbackIds.size>0&&(Array.from(t.accountRequestCallbackIds.values()).forEach(c=>{let l={type:"WEB3_RESPONSE",id:c,response:{method:"requestEthereumAccounts",result:[s]}};this.invokeCallback(Object.assign(Object.assign({},l),{id:c}))}),t.accountRequestCallbackIds.clear())},this.connectedUpdated=s=>{this.ui.setConnected(s)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=e.linkAPIUrl,this.storage=e.storage,this.options=e;let{session:n,ui:i,connection:o}=this.subscribe();this._session=n,this.connection=o,this.relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this._reloadOnDisconnect=(r=e.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=i}subscribe(){let e=e2.Session.load(this.storage)||new e2.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,i=new T2t.WalletLinkConnection({session:e,linkAPIUrl:r,diagnostic:n,listener:this}),{version:o,darkMode:s}=this.options,c=this.options.uiConstructor({linkAPIUrl:r,version:o,darkMode:s,session:e});return i.connect(),{session:e,ui:c,connection:i}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(e=>setTimeout(()=>e(null),1e3))]).then(()=>{var e,r;let n=this.ui.isStandalone();(e=this.diagnostic)===null||e===void 0||e.log(hv.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();let i=e2.Session.load(this.storage);if(i?.id===this._session.id?this.storage.clear():i&&((r=this.diagnostic)===null||r===void 0||r.log(hv.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:e2.Session.hash(i.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);let{session:o,ui:s,connection:c}=this.subscribe();this._session=o,this.connection=c,this.ui=s,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(e=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(hv.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${e}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(e,r){this.appName=e,this.appLogoUrl=r}getStorageItem(e){return this.storage.getItem(e)}get session(){return this._session}setStorageItem(e,r){this.storage.setItem(e,r)}signEthereumMessage(e,r,n,i){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,ho.hexStringFromBuffer)(e,!0),address:r,addPrefix:n,typedDataJson:i||null}})}ethereumAddressFromSignedMessage(e,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,ho.hexStringFromBuffer)(e,!0),signature:(0,ho.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,ho.bigIntStringFromBN)(e.weiValue),data:(0,ho.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,ho.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.gasPriceInWei?(0,ho.bigIntStringFromBN)(e.gasPriceInWei):null,maxPriorityFeePerGas:e.gasPriceInWei?(0,ho.bigIntStringFromBN)(e.gasPriceInWei):null,gasLimit:e.gasLimit?(0,ho.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(e){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:e.fromAddress,toAddress:e.toAddress,weiValue:(0,ho.bigIntStringFromBN)(e.weiValue),data:(0,ho.hexStringFromBuffer)(e.data,!0),nonce:e.nonce,gasPriceInWei:e.gasPriceInWei?(0,ho.bigIntStringFromBN)(e.gasPriceInWei):null,maxFeePerGas:e.maxFeePerGas?(0,ho.bigIntStringFromBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:e.maxPriorityFeePerGas?(0,ho.bigIntStringFromBN)(e.maxPriorityFeePerGas):null,gasLimit:e.gasLimit?(0,ho.bigIntStringFromBN)(e.gasLimit):null,chainId:e.chainId,shouldSubmit:!0}})}submitEthereumTransaction(e,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,ho.hexStringFromBuffer)(e,!0),chainId:r}})}scanQRCode(e){return this.sendRequest({method:"scanQRCode",params:{regExp:e}})}getQRCodeUrl(){return(0,ho.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(e,r){return this.sendRequest({method:"generic",params:{action:r,data:e}})}sendGenericMessage(e){return this.sendRequest(e)}sendRequest(e){let r=null,n=(0,ho.randomBytesHex)(8),i=s=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,s),r?.()};return{promise:new Promise((s,c)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,l=>{if(r?.(),(0,dv.isErrorResponse)(l))return c(new Error(l.errorMessage));s(l)}),this.ui.isStandalone()?this.sendRequestStandalone(n,e):this.publishWeb3RequestEvent(n,e)}),cancel:i}}setConnectDisabled(e){this.ui.setConnectDisabled(e)}setAccountsCallback(e){this.accountsCallback=e}setChainCallback(e){this.chainCallback=e}setDappDefaultChainCallback(e){this.dappDefaultChain=e,this.ui instanceof k2t.WalletLinkRelayUI&&this.ui.setChainId(e)}publishWeb3RequestEvent(e,r){var n;let i={type:"WEB3_REQUEST",id:e,request:r},o=e2.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(hv.EVENTS.WEB3_REQUEST,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:o?e2.Session.hash(o.id):"",isSessionMismatched:(o?.id!==this._session.id).toString()}),this.publishEvent("Web3Request",i,!0).then(s=>{var c;(c=this.diagnostic)===null||c===void 0||c.log(hv.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:i.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:o?e2.Session.hash(o.id):"",isSessionMismatched:(o?.id!==this._session.id).toString()})}).catch(s=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i.id,response:{method:r.method,errorMessage:s.message}})})}publishWeb3RequestCanceledEvent(e){let r={type:"WEB3_REQUEST_CANCELED",id:e};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(e,r,n){return this.connection.publishEvent(e,r,n)}handleWeb3ResponseMessage(e){var r;let{response:n}=e;if((r=this.diagnostic)===null||r===void 0||r.log(hv.EVENTS.WEB3_RESPONSE,{eventId:e.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){t.accountRequestCallbackIds.forEach(i=>this.invokeCallback(Object.assign(Object.assign({},e),{id:i}))),t.accountRequestCallbackIds.clear();return}this.invokeCallback(e)}handleErrorResponse(e,r,n,i){var o;let s=(o=n?.message)!==null&&o!==void 0?o:(0,Y4.getMessageFromCode)(i);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:{method:r,errorMessage:s,errorCode:i}})}invokeCallback(e){let r=this.relayEventManager.callbacks.get(e.id);r&&(r(e.response),this.relayEventManager.callbacks.delete(e.id))}requestEthereumAccounts(){let e={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=null,n=(0,ho.randomBytesHex)(8),i=s=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,e.method,s),r?.()};return{promise:new Promise((s,c)=>{if(this.relayEventManager.callbacks.set(n,l=>{if(this.ui.hideRequestEthereumAccounts(),r?.(),(0,dv.isErrorResponse)(l))return c(new Error(l.errorMessage));s(l)}),this.ui.inlineAccountsResponse()){let l=u=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"requestEthereumAccounts",result:u}})};this.ui.requestEthereumAccounts({onCancel:i,onAccounts:l})}else{let l=Y4.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>i(l)})}t.accountRequestCallbackIds.add(n),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(n,e)}),cancel:i}}selectProvider(e){let r={method:"selectProvider",params:{providerOptions:e}},n=(0,ho.randomBytesHex)(8),i=s=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,s)},o=new Promise((s,c)=>{this.relayEventManager.callbacks.set(n,d=>{if((0,dv.isErrorResponse)(d))return c(new Error(d.errorMessage));s(d)});let l=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:I2t.ProviderType.Unselected}})},u=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:d}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:u,onCancel:l,providerOptions:e})});return{cancel:i,promise:o}}watchAsset(e,r,n,i,o,s){let c={method:"watchAsset",params:{type:e,options:{address:r,symbol:n,decimals:i,image:o},chainId:s}},l=null,u=(0,ho.randomBytesHex)(8),d=v=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,c.method,v),l?.()};this.ui.inlineWatchAsset()||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));let p=new Promise((v,y)=>{this.relayEventManager.callbacks.set(u,P=>{if(l?.(),(0,dv.isErrorResponse)(P))return y(new Error(P.errorMessage));v(P)});let _=P=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!1}})},R=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:R,onCancel:_,type:e,address:r,symbol:n,decimals:i,image:o,chainId:s}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,c)});return{cancel:d,promise:p}}addEthereumChain(e,r,n,i,o,s){let c={method:"addEthereumChain",params:{chainId:e,rpcUrls:r,blockExplorerUrls:i,chainName:o,iconUrls:n,nativeCurrency:s}},l=null,u=(0,ho.randomBytesHex)(8),d=v=>{this.publishWeb3RequestCanceledEvent(u),this.handleErrorResponse(u,c.method,v),l?.()};return this.ui.inlineAddEthereumChain(e)||(l=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((v,y)=>{this.relayEventManager.callbacks.set(u,P=>{if(l?.(),(0,dv.isErrorResponse)(P))return y(new Error(P.errorMessage));v(P)});let _=P=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},R=P=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:u,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:P}}})};this.ui.inlineAddEthereumChain(e)&&this.ui.addEthereumChain({onCancel:_,onApprove:R,chainId:c.params.chainId,rpcUrls:c.params.rpcUrls,blockExplorerUrls:c.params.blockExplorerUrls,chainName:c.params.chainName,iconUrls:c.params.iconUrls,nativeCurrency:c.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(e)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(u,c)}),cancel:d}}switchEthereumChain(e,r){let n={method:"switchEthereumChain",params:Object.assign({chainId:e},{address:r})},i=(0,ho.randomBytesHex)(8),o=c=>{this.publishWeb3RequestCanceledEvent(i),this.handleErrorResponse(i,n.method,c)};return{promise:new Promise((c,l)=>{this.relayEventManager.callbacks.set(i,p=>{if((0,dv.isErrorResponse)(p)&&p.errorCode)return l(Y4.standardErrors.provider.custom({code:p.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,dv.isErrorResponse)(p))return l(new Error(p.errorMessage));c(p)});let u=p=>{var v;if(p){let y=(v=(0,Y4.getErrorCode)(p))!==null&&v!==void 0?v:Y4.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(i,"switchEthereumChain",p instanceof Error?p:Y4.standardErrors.provider.unsupportedChain(e),y)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},d=p=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:i,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:p}}})};this.ui.switchEthereumChain({onCancel:u,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(i,n)}),cancel:o}}inlineAddEthereumChain(e){return this.ui.inlineAddEthereumChain(e)}getSessionIdHash(){return e2.Session.hash(this._session.id)}sendRequestStandalone(e,r){let n=o=>{this.handleErrorResponse(e,r.method,o)},i=o=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:e,response:o})};switch(r.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:r,onSuccess:i,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:r,onSuccess:i,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:i});break;default:n();break}}};AO.WalletLinkRelay=EO;EO.accountRequestCallbackIds=new Set});var c4e=X(pv=>{"use strict";var R2t=pv&&pv.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),M2t=pv&&pv.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&R2t(e,t,r)};Object.defineProperty(pv,"__esModule",{value:!0});M2t(dZ(),pv)});var l4e=X(wZ=>{"use strict";Object.defineProperty(wZ,"__esModule",{value:!0});wZ.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"});var f4e=X(J4=>{"use strict";var u4e=J4&&J4.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(J4,"__esModule",{value:!0});J4.RedirectDialog=void 0;var N2t=u4e(Kg()),rd=($s(),Vn(ha)),P2t=YQ(),O2t=c4e(),B2t=u4e(l4e()),vZ=class{constructor(){this.root=null}attach(){let e=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",e.appendChild(this.root),(0,P2t.injectCssReset)()}present(e){this.render(e)}clear(){this.render(null)}render(e){this.root&&((0,rd.render)(null,this.root),e&&(0,rd.render)((0,rd.h)(L2t,Object.assign({},e,{onDismiss:()=>{this.clear()}})),this.root))}};J4.RedirectDialog=vZ;var L2t=({title:t,buttonText:e,darkMode:r,onButtonClick:n,onDismiss:i})=>{let o=r?"dark":"light";return(0,rd.h)(O2t.SnackbarContainer,{darkMode:r},(0,rd.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,rd.h)("style",null,B2t.default),(0,rd.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:i}),(0,rd.h)("div",{class:(0,N2t.default)("-cbwsdk-redirect-dialog-box",o)},(0,rd.h)("p",null,t),(0,rd.h)("button",{onClick:n},e))))}});var bZ=X(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});SO.MobileRelayUI=void 0;var F2t=f4e(),yZ=class{constructor(e){this.attached=!1,this.darkMode=!1,this.redirectDialog=new F2t.RedirectDialog,this.darkMode=e.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(e){}redirectToCoinbaseWallet(e){let r=new URL("https://go.cb-w.com/walletlink");r.searchParams.append("redirect_url",window.location.href),e&&r.searchParams.append("wl_url",e);let n=document.createElement("a");n.target="cbw-opener",n.href=r.href,n.rel="noreferrer noopener",n.click()}openCoinbaseWalletDeeplink(e){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(e)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(e)},99)}showConnecting(e){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};SO.MobileRelayUI=yZ});var CZ=X(_O=>{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});_O.MobileRelay=void 0;var U2t=Yh(),D2t=gZ(),j2t=bZ(),xZ=class extends D2t.WalletLinkRelay{constructor(e){var r;super(e),this._enableMobileWalletLink=(r=e.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{let e=(0,U2t.getLocation)();e.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(e.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(e,r){if(super.publishWeb3RequestEvent(e,r),!(this._enableMobileWalletLink&&this.ui instanceof j2t.MobileRelayUI))return;let n=!1;switch(r.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(e){super.handleWeb3ResponseMessage(e)}connectAndSignIn(e){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:e.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:e.statement,resources:e.resources}})}};_O.MobileRelay=xZ});var EZ=X((I5r,g4e)=>{var $2t=ZG(),q2t=BE();function h4e(t){return Buffer.allocUnsafe(t).fill(0)}function d4e(t,e,r){let n=h4e(e);return t=IO(t),r?t.length{var wv=EZ(),gv=BE();function v4e(t){return t.startsWith("int[")?"int256"+t.slice(3):t==="int"?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):t==="uint"?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):t==="fixed"?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):t==="ufixed"?"ufixed128x128":t}function X4(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function w4e(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function y4e(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?e[2]===""?"dynamic":parseInt(e[2],10):null}function mv(t){var e=typeof t;if(e==="string")return wv.isHexString(t)?new gv(wv.stripHexPrefix(t),16):new gv(t,10);if(e==="number")return new gv(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function nd(t,e){var r,n,i,o;if(t==="address")return nd("uint160",mv(e));if(t==="bool")return nd("uint8",e?1:0);if(t==="string")return nd("bytes",new Buffer(e,"utf8"));if(G2t(t)){if(typeof e.length>"u")throw new Error("Not an array?");if(r=y4e(t),r!=="dynamic"&&r!==0&&e.length>r)throw new Error("Elements exceed array size: "+r);i=[],t=t.slice(0,t.lastIndexOf("[")),typeof e=="string"&&(e=JSON.parse(e));for(o in e)i.push(nd(t,e[o]));if(r==="dynamic"){var s=nd("uint256",e.length);i.unshift(s)}return Buffer.concat(i)}else{if(t==="bytes")return e=new Buffer(e),i=Buffer.concat([nd("uint256",e.length),e]),e.length%32!==0&&(i=Buffer.concat([i,wv.zeros(32-e.length%32)])),i;if(t.startsWith("bytes")){if(r=X4(t),r<1||r>32)throw new Error("Invalid bytes width: "+r);return wv.setLengthRight(e,32)}else if(t.startsWith("uint")){if(r=X4(t),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=mv(e),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(Buffer,"be",32)}else if(t.startsWith("int")){if(r=X4(t),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=mv(e),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(Buffer,"be",32)}else if(t.startsWith("ufixed")){if(r=w4e(t),n=mv(e),n<0)throw new Error("Supplied ufixed is negative");return nd("uint256",n.mul(new gv(2).pow(new gv(r[1]))))}else if(t.startsWith("fixed"))return r=w4e(t),nd("int256",mv(e).mul(new gv(2).pow(new gv(r[1]))))}throw new Error("Unsupported or invalid type: "+t)}function K2t(t){return t==="string"||t==="bytes"||y4e(t)==="dynamic"}function G2t(t){return t.lastIndexOf("]")===t.length-1}function Q2t(t,e){var r=[],n=[],i=32*t.length;for(var o in t){var s=v4e(t[o]),c=e[o],l=nd(s,c);K2t(s)?(r.push(nd("uint256",i)),n.push(l),i+=l.length):r.push(l)}return Buffer.concat(r.concat(n))}function b4e(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var r,n,i=[],o=0;o32)throw new Error("Invalid bytes width: "+r);i.push(wv.setLengthRight(c,r))}else if(s.startsWith("uint")){if(r=X4(s),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=mv(c),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());i.push(n.toArrayLike(Buffer,"be",r/8))}else if(s.startsWith("int")){if(r=X4(s),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=mv(c),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());i.push(n.toTwos(r).toArrayLike(Buffer,"be",r/8))}else throw new Error("Unsupported or invalid type: "+s)}return Buffer.concat(i)}function Z2t(t,e){return wv.keccak(b4e(t,e))}x4e.exports={rawEncode:Q2t,solidityPack:b4e,soliditySHA3:Z2t}});var S4e=X((k5r,A4e)=>{var w0=EZ(),HE=C4e(),E4e={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},AZ={encodeData(t,e,r,n=!0){let i=["bytes32"],o=[this.hashType(t,r)];if(n){let s=(c,l,u)=>{if(r[l]!==void 0)return["bytes32",u==null?"0x0000000000000000000000000000000000000000000000000000000000000000":w0.keccak(this.encodeData(l,u,r,n))];if(u===void 0)throw new Error(`missing value for field ${c} of type ${l}`);if(l==="bytes")return["bytes32",w0.keccak(u)];if(l==="string")return typeof u=="string"&&(u=Buffer.from(u,"utf8")),["bytes32",w0.keccak(u)];if(l.lastIndexOf("]")===l.length-1){let d=l.slice(0,l.lastIndexOf("[")),p=u.map(v=>s(c,d,v));return["bytes32",w0.keccak(HE.rawEncode(p.map(([v])=>v),p.map(([,v])=>v)))]}return[l,u]};for(let c of r[t]){let[l,u]=s(c.name,c.type,e[c.name]);i.push(l),o.push(u)}}else for(let s of r[t]){let c=e[s.name];if(c!==void 0)if(s.type==="bytes")i.push("bytes32"),c=w0.keccak(c),o.push(c);else if(s.type==="string")i.push("bytes32"),typeof c=="string"&&(c=Buffer.from(c,"utf8")),c=w0.keccak(c),o.push(c);else if(r[s.type]!==void 0)i.push("bytes32"),c=w0.keccak(this.encodeData(s.type,c,r,n)),o.push(c);else{if(s.type.lastIndexOf("]")===s.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(s.type),o.push(c)}}return HE.rawEncode(i,o)},encodeType(t,e){let r="",n=this.findTypeDependencies(t,e).filter(i=>i!==t);n=[t].concat(n.sort());for(let i of n){if(!e[i])throw new Error("No type definition specified: "+i);r+=i+"("+e[i].map(({name:s,type:c})=>c+" "+s).join(",")+")"}return r},findTypeDependencies(t,e,r=[]){if(t=t.match(/^\w*/)[0],r.includes(t)||e[t]===void 0)return r;r.push(t);for(let n of e[t])for(let i of this.findTypeDependencies(n.type,e,r))!r.includes(i)&&r.push(i);return r},hashStruct(t,e,r,n=!0){return w0.keccak(this.encodeData(t,e,r,n))},hashType(t,e){return w0.keccak(this.encodeType(t,e))},sanitizeData(t){let e={};for(let r in E4e.properties)t[r]&&(e[r]=t[r]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){let r=this.sanitizeData(t),n=[Buffer.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,e)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,e)),w0.keccak(Buffer.concat(n))}};A4e.exports={TYPED_MESSAGE_SCHEMA:E4e,TypedDataUtils:AZ,hashForSignTypedDataLegacy:function(t){return Y2t(t.data)},hashForSignTypedData_v3:function(t){return AZ.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return AZ.hash(t.data)}};function Y2t(t){let e=new Error("Expect argument to be non-empty array");if(typeof t!="object"||!t.length)throw e;let r=t.map(function(o){return o.type==="bytes"?w0.toBuffer(o.value):o.value}),n=t.map(function(o){return o.type}),i=t.map(function(o){if(!o.name)throw e;return o.type+" "+o.name});return HE.soliditySHA3(["bytes32","bytes32"],[HE.soliditySHA3(new Array(t.length).fill("string"),i),HE.soliditySHA3(n,r)])}});var R4e=X(t5=>{"use strict";Object.defineProperty(t5,"__esModule",{value:!0});t5.filterFromParam=t5.FilterPolyfill=void 0;var e5=DE(),Cc=Yh(),J2t=5*60*1e3,vv={jsonrpc:"2.0",id:0},SZ=class{constructor(e){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,e5.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=e}async newFilter(e){let r=k4e(e),n=this.makeFilterId(),i=await this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,"initial cursor position:",i),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,Cc.hexStringFromIntNumber)(n)}async newBlockFilter(){let e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.blockFilters.add(e),this.setFilterTimeout(e),(0,Cc.hexStringFromIntNumber)(e)}async newPendingTransactionFilter(){let e=this.makeFilterId(),r=await this.setInitialCursorPosition(e,"latest");return console.info(`Installing new block filter (${e}) with initial cursor position:`,r),this.pendingTransactionFilters.add(e),this.setFilterTimeout(e),(0,Cc.hexStringFromIntNumber)(e)}uninstallFilter(e){let r=(0,Cc.intNumberFromHexString)(e);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(e){let r=(0,Cc.intNumberFromHexString)(e);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(TO())}async getFilterLogs(e){let r=(0,Cc.intNumberFromHexString)(e),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},vv),{method:"eth_getLogs",params:[_4e(n)]})):TO()}makeFilterId(){return(0,e5.IntNumber)(++this.nextFilterId)}sendAsyncPromise(e){return new Promise((r,n)=>{this.provider.sendAsync(e,(i,o)=>{if(i)return n(i);if(Array.isArray(o)||o==null)return n(new Error(`unexpected response received: ${JSON.stringify(o)}`));r(o)})})}deleteFilter(e){console.info(`Deleting filter (${e})`),this.logFilters.delete(e),this.blockFilters.delete(e),this.pendingTransactionFilters.delete(e),this.cursors.delete(e),this.timeouts.delete(e)}async getLogFilterChanges(e){let r=this.logFilters.get(e),n=this.cursors.get(e);if(!n||!r)return TO();let i=await this.getCurrentBlockHeight(),o=r.toBlock==="latest"?i:r.toBlock;if(n>i||n>Number(r.toBlock))return kO();console.info(`Fetching logs from ${n} to ${o} for filter ${e}`);let s=await this.sendAsyncPromise(Object.assign(Object.assign({},vv),{method:"eth_getLogs",params:[_4e(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:o}))]}));if(Array.isArray(s.result)){let c=s.result.map(u=>(0,Cc.intNumberFromHexString)(u.blockNumber||"0x0")),l=Math.max(...c);if(l&&l>n){let u=(0,e5.IntNumber)(l+1);console.info(`Moving cursor position for filter (${e}) from ${n} to ${u}`),this.cursors.set(e,u)}}return s}async getBlockFilterChanges(e){let r=this.cursors.get(e);if(!r)return TO();let n=await this.getCurrentBlockHeight();if(r>n)return kO();console.info(`Fetching blocks from ${r} to ${n} for filter (${e})`);let i=(await Promise.all((0,Cc.range)(r,n+1).map(s=>this.getBlockHashByNumber((0,e5.IntNumber)(s))))).filter(s=>!!s),o=(0,e5.IntNumber)(r+i.length);return console.info(`Moving cursor position for filter (${e}) from ${r} to ${o}`),this.cursors.set(e,o),Object.assign(Object.assign({},vv),{result:i})}async getPendingTransactionFilterChanges(e){return Promise.resolve(kO())}async setInitialCursorPosition(e,r){let n=await this.getCurrentBlockHeight(),i=typeof r=="number"&&r>n?r:n;return this.cursors.set(e,i),i}setFilterTimeout(e){let r=this.timeouts.get(e);r&&window.clearTimeout(r);let n=window.setTimeout(()=>{console.info(`Filter (${e}) timed out`),this.deleteFilter(e)},J2t);this.timeouts.set(e,n)}async getCurrentBlockHeight(){let e=new Date;if(e.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=e;let r=await this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))}async _getCurrentBlockHeight(){let{result:e}=await this.sendAsyncPromise(Object.assign(Object.assign({},vv),{method:"eth_blockNumber",params:[]}));return(0,Cc.intNumberFromHexString)((0,Cc.ensureHexString)(e))}async getBlockHashByNumber(e){let r=await this.sendAsyncPromise(Object.assign(Object.assign({},vv),{method:"eth_getBlockByNumber",params:[(0,Cc.hexStringFromIntNumber)(e),!1]}));return r.result&&typeof r.result.hash=="string"?(0,Cc.ensureHexString)(r.result.hash):null}};t5.FilterPolyfill=SZ;function k4e(t){return{fromBlock:I4e(t.fromBlock),toBlock:I4e(t.toBlock),addresses:t.address===void 0?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}t5.filterFromParam=k4e;function _4e(t){let e={fromBlock:T4e(t.fromBlock),toBlock:T4e(t.toBlock),topics:t.topics};return t.addresses!==null&&(e.address=t.addresses),e}function I4e(t){if(t===void 0||t==="latest"||t==="pending")return"latest";if(t==="earliest")return(0,e5.IntNumber)(0);if((0,Cc.isHexString)(t))return(0,Cc.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function T4e(t){return t==="latest"?t:(0,Cc.hexStringFromIntNumber)(t)}function TO(){return Object.assign(Object.assign({},vv),{error:{code:-32e3,message:"filter not found"}})}function kO(){return Object.assign(Object.assign({},vv),{result:[]})}});var RO=X((M5r,M4e)=>{M4e.exports=X2t;function X2t(t){t=t||{};var e=t.max||Number.MAX_SAFE_INTEGER,r=typeof t.start<"u"?t.start:Math.floor(Math.random()*e);return function(){return r=r%e,r++}}});var O4e=X((N5r,P4e)=>{"use strict";var N4e=(t,e)=>function(){let r=e.promiseModule,n=new Array(arguments.length);for(let i=0;i{e.errorFirst?n.push(function(s,c){if(e.multiArgs){let l=new Array(arguments.length-1);for(let u=1;u{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);let r=i=>{let o=s=>typeof s=="string"?i===s:s.test(i);return e.include?e.include.some(o):!e.exclude.some(o)},n;typeof t=="function"?n=function(){return e.excludeMain?t.apply(this,arguments):N4e(t,e).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(t));for(let i in t){let o=t[i];n[i]=typeof o=="function"&&r(i)?N4e(o,e):o}return n}});var MO=X(IZ=>{"use strict";Object.defineProperty(IZ,"__esModule",{value:!0});var ewt=Hh();function B4e(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function twt(t){let e=t.length,r=new Array(e);for(let n=0;n0&&([s]=r),s instanceof Error)throw s;let c=new Error(`Unhandled error.${s?` (${s.message})`:""}`);throw c.context=s,c}let o=i[e];if(o===void 0)return!1;if(typeof o=="function")B4e(o,this,r);else{let s=o.length,c=twt(o);for(let l=0;l{"use strict";var rwt=r5&&r5.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r5,"__esModule",{value:!0});r5.BaseBlockTracker=void 0;var nwt=rwt(MO()),iwt=1e3,owt=(t,e)=>t+e,L4e=["sync","latest"],TZ=class extends nwt.default{constructor(e){super(),this._blockResetDuration=e.blockResetDuration||20*iwt,this._usePastBlocks=e.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(e){return e?super.removeAllListeners(e):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(e){L4e.includes(e)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return L4e.map(e=>this.listenerCount(e)).reduce(owt)}_shouldUseNewBlock(e){let r=this._currentBlock;if(!r)return!0;let n=F4e(e),i=F4e(r);return this._usePastBlocks&&ni}_newPotentialLatest(e){this._shouldUseNewBlock(e)&&this._setCurrentBlock(e)}_setCurrentBlock(e){let r=this._currentBlock;this._currentBlock=e,this.emit("latest",e),this.emit("sync",{oldBlock:r,newBlock:e})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};r5.BaseBlockTracker=TZ;function F4e(t){return Number.parseInt(t,16)}});var t2=X((NO,U4e)=>{(function(t,e){typeof NO=="object"&&typeof U4e<"u"?e(NO):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(NO,function(t){"use strict";class e extends TypeError{constructor(ge,be){let ye,{message:_e,explanation:ft,...Ve}=ge,{path:Fe}=ge,Dt=Fe.length===0?_e:`At path: ${Fe.join(".")} -- ${_e}`;super(ft??Dt),ft!=null&&(this.cause=Dt),Object.assign(this,Ve),this.name=this.constructor.name,this.failures=()=>ye??(ye=[ge,...be()])}}function r(de){return n(de)&&typeof de[Symbol.iterator]=="function"}function n(de){return typeof de=="object"&&de!=null}function i(de){if(Object.prototype.toString.call(de)!=="[object Object]")return!1;let ge=Object.getPrototypeOf(de);return ge===null||ge===Object.prototype}function o(de){return typeof de=="symbol"?de.toString():typeof de=="string"?JSON.stringify(de):`${de}`}function s(de){let{done:ge,value:be}=de.next();return ge?void 0:be}function c(de,ge,be,ye){if(de===!0)return;de===!1?de={}:typeof de=="string"&&(de={message:de});let{path:_e,branch:ft}=ge,{type:Ve}=be,{refinement:Fe,message:Dt=`Expected a value of type \`${Ve}\`${Fe?` with refinement \`${Fe}\``:""}, but received: \`${o(ye)}\``}=de;return{value:ye,type:Ve,refinement:Fe,key:_e[_e.length-1],path:_e,branch:ft,...de,message:Dt}}function*l(de,ge,be,ye){r(de)||(de=[de]);for(let _e of de){let ft=c(_e,ge,be,ye);ft&&(yield ft)}}function*u(de,ge,be={}){let{path:ye=[],branch:_e=[de],coerce:ft=!1,mask:Ve=!1}=be,Fe={path:ye,branch:_e};if(ft&&(de=ge.coercer(de,Fe),Ve&&ge.type!=="type"&&n(ge.schema)&&n(de)&&!Array.isArray(de)))for(let Xe in de)ge.schema[Xe]===void 0&&delete de[Xe];let Dt="valid";for(let Xe of ge.validator(de,Fe))Xe.explanation=be.message,Dt="not_valid",yield[Xe,void 0];for(let[Xe,ze,pr]of ge.entries(de,Fe)){let bt=u(ze,pr,{path:Xe===void 0?ye:[...ye,Xe],branch:Xe===void 0?_e:[..._e,ze],coerce:ft,mask:Ve,message:be.message});for(let tt of bt)tt[0]?(Dt=tt[0].refinement!=null?"not_refined":"not_valid",yield[tt[0],void 0]):ft&&(ze=tt[1],Xe===void 0?de=ze:de instanceof Map?de.set(Xe,ze):de instanceof Set?de.add(ze):n(de)&&(ze!==void 0||Xe in de)&&(de[Xe]=ze))}if(Dt!=="not_valid")for(let Xe of ge.refiner(de,Fe))Xe.explanation=be.message,Dt="not_refined",yield[Xe,void 0];Dt==="valid"&&(yield[void 0,de])}class d{constructor(ge){let{type:be,schema:ye,validator:_e,refiner:ft,coercer:Ve=Dt=>Dt,entries:Fe=function*(){}}=ge;this.type=be,this.schema=ye,this.entries=Fe,this.coercer=Ve,_e?this.validator=(Dt,Xe)=>{let ze=_e(Dt,Xe);return l(ze,Xe,this,Dt)}:this.validator=()=>[],ft?this.refiner=(Dt,Xe)=>{let ze=ft(Dt,Xe);return l(ze,Xe,this,Dt)}:this.refiner=()=>[]}assert(ge,be){return p(ge,this,be)}create(ge,be){return v(ge,this,be)}is(ge){return _(ge,this)}mask(ge,be){return y(ge,this,be)}validate(ge,be={}){return R(ge,this,be)}}function p(de,ge,be){let ye=R(de,ge,{message:be});if(ye[0])throw ye[0]}function v(de,ge,be){let ye=R(de,ge,{coerce:!0,message:be});if(ye[0])throw ye[0];return ye[1]}function y(de,ge,be){let ye=R(de,ge,{coerce:!0,mask:!0,message:be});if(ye[0])throw ye[0];return ye[1]}function _(de,ge){return!R(de,ge)[0]}function R(de,ge,be={}){let ye=u(de,ge,be),_e=s(ye);return _e[0]?[new e(_e[0],function*(){for(let Ve of ye)Ve[0]&&(yield Ve[0])}),void 0]:[void 0,_e[1]]}function P(...de){let ge=de[0].type==="type",be=de.map(_e=>_e.schema),ye=Object.assign({},...be);return ge?le(ye):ne(ye)}function k(de,ge){return new d({type:de,schema:null,validator:ge})}function M(de,ge){return new d({...de,refiner:(be,ye)=>be===void 0||de.refiner(be,ye),validator(be,ye){return be===void 0?!0:(ge(be,ye),de.validator(be,ye))}})}function L(de){return new d({type:"dynamic",schema:null,*entries(ge,be){yield*de(ge,be).entries(ge,be)},validator(ge,be){return de(ge,be).validator(ge,be)},coercer(ge,be){return de(ge,be).coercer(ge,be)},refiner(ge,be){return de(ge,be).refiner(ge,be)}})}function D(de){let ge;return new d({type:"lazy",schema:null,*entries(be,ye){ge??(ge=de()),yield*ge.entries(be,ye)},validator(be,ye){return ge??(ge=de()),ge.validator(be,ye)},coercer(be,ye){return ge??(ge=de()),ge.coercer(be,ye)},refiner(be,ye){return ge??(ge=de()),ge.refiner(be,ye)}})}function j(de,ge){let{schema:be}=de,ye={...be};for(let _e of ge)delete ye[_e];switch(de.type){case"type":return le(ye);default:return ne(ye)}}function V(de){let ge=de instanceof d,be=ge?{...de.schema}:{...de};for(let ye in be)be[ye]=b(be[ye]);return ge&&de.type==="type"?le(be):ne(be)}function K(de,ge){let{schema:be}=de,ye={};for(let _e of ge)ye[_e]=be[_e];switch(de.type){case"type":return le(ye);default:return ne(ye)}}function B(de,ge){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),k(de,ge)}function W(){return k("any",()=>!0)}function z(de){return new d({type:"array",schema:de,*entries(ge){if(de&&Array.isArray(ge))for(let[be,ye]of ge.entries())yield[be,ye,de]},coercer(ge){return Array.isArray(ge)?ge.slice():ge},validator(ge){return Array.isArray(ge)||`Expected an array value, but received: ${o(ge)}`}})}function q(){return k("bigint",de=>typeof de=="bigint")}function Q(){return k("boolean",de=>typeof de=="boolean")}function f(){return k("date",de=>de instanceof Date&&!isNaN(de.getTime())||`Expected a valid \`Date\` object, but received: ${o(de)}`)}function h(de){let ge={},be=de.map(ye=>o(ye)).join();for(let ye of de)ge[ye]=ye;return new d({type:"enums",schema:ge,validator(ye){return de.includes(ye)||`Expected one of \`${be}\`, but received: ${o(ye)}`}})}function g(){return k("func",de=>typeof de=="function"||`Expected a function, but received: ${o(de)}`)}function x(de){return k("instance",ge=>ge instanceof de||`Expected a \`${de.name}\` instance, but received: ${o(ge)}`)}function S(){return k("integer",de=>typeof de=="number"&&!isNaN(de)&&Number.isInteger(de)||`Expected an integer, but received: ${o(de)}`)}function T(de){return new d({type:"intersection",schema:null,*entries(ge,be){for(let ye of de)yield*ye.entries(ge,be)},*validator(ge,be){for(let ye of de)yield*ye.validator(ge,be)},*refiner(ge,be){for(let ye of de)yield*ye.refiner(ge,be)}})}function N(de){let ge=o(de),be=typeof de;return new d({type:"literal",schema:be==="string"||be==="number"||be==="boolean"?de:null,validator(ye){return ye===de||`Expected the literal \`${ge}\`, but received: ${o(ye)}`}})}function I(de,ge){return new d({type:"map",schema:null,*entries(be){if(de&&ge&&be instanceof Map)for(let[ye,_e]of be.entries())yield[ye,ye,de],yield[ye,_e,ge]},coercer(be){return be instanceof Map?new Map(be):be},validator(be){return be instanceof Map||`Expected a \`Map\` object, but received: ${o(be)}`}})}function m(){return k("never",()=>!1)}function C(de){return new d({...de,validator:(ge,be)=>ge===null||de.validator(ge,be),refiner:(ge,be)=>ge===null||de.refiner(ge,be)})}function Y(){return k("number",de=>typeof de=="number"&&!isNaN(de)||`Expected a number, but received: ${o(de)}`)}function ne(de){let ge=de?Object.keys(de):[],be=m();return new d({type:"object",schema:de||null,*entries(ye){if(de&&n(ye)){let _e=new Set(Object.keys(ye));for(let ft of ge)_e.delete(ft),yield[ft,ye[ft],de[ft]];for(let ft of _e)yield[ft,ye[ft],be]}},validator(ye){return n(ye)||`Expected an object, but received: ${o(ye)}`},coercer(ye){return n(ye)?{...ye}:ye}})}function b(de){return new d({...de,validator:(ge,be)=>ge===void 0||de.validator(ge,be),refiner:(ge,be)=>ge===void 0||de.refiner(ge,be)})}function H(de,ge){return new d({type:"record",schema:null,*entries(be){if(n(be))for(let ye in be){let _e=be[ye];yield[ye,ye,de],yield[ye,_e,ge]}},validator(be){return n(be)||`Expected an object, but received: ${o(be)}`}})}function G(){return k("regexp",de=>de instanceof RegExp)}function U(de){return new d({type:"set",schema:null,*entries(ge){if(de&&ge instanceof Set)for(let be of ge)yield[be,be,de]},coercer(ge){return ge instanceof Set?new Set(ge):ge},validator(ge){return ge instanceof Set||`Expected a \`Set\` object, but received: ${o(ge)}`}})}function se(){return k("string",de=>typeof de=="string"||`Expected a string, but received: ${o(de)}`)}function te(de){let ge=m();return new d({type:"tuple",schema:null,*entries(be){if(Array.isArray(be)){let ye=Math.max(de.length,be.length);for(let _e=0;_ebe.type).join(" | ");return new d({type:"union",schema:null,coercer(be){for(let ye of de){let[_e,ft]=ye.validate(be,{coerce:!0});if(!_e)return ft}return be},validator(be,ye){let _e=[];for(let ft of de){let[...Ve]=u(be,ft,ye),[Fe]=Ve;if(Fe[0])for(let[Dt]of Ve)Dt&&_e.push(Dt);else return[]}return[`Expected the value to satisfy a union of \`${ge}\`, but received: ${o(be)}`,..._e]}})}function Ee(){return k("unknown",()=>!0)}function fe(de,ge,be){return new d({...de,coercer:(ye,_e)=>_(ye,ge)?de.coercer(be(ye,_e),_e):de.coercer(ye,_e)})}function Se(de,ge,be={}){return fe(de,Ee(),ye=>{let _e=typeof ge=="function"?ge():ge;if(ye===void 0)return _e;if(!be.strict&&i(ye)&&i(_e)){let ft={...ye},Ve=!1;for(let Fe in _e)ft[Fe]===void 0&&(ft[Fe]=_e[Fe],Ve=!0);if(Ve)return ft}return ye})}function gt(de){return fe(de,se(),ge=>ge.trim())}function Qe(de){return tr(de,"empty",ge=>{let be=hr(ge);return be===0||`Expected an empty ${de.type} but received one with a size of \`${be}\``})}function hr(de){return de instanceof Map||de instanceof Set?de.size:de.length}function mt(de,ge,be={}){let{exclusive:ye}=be;return tr(de,"max",_e=>ye?_eye?_e>ge:_e>=ge||`Expected a ${de.type} greater than ${ye?"":"or equal to "}${ge} but received \`${_e}\``)}function Vt(de){return tr(de,"nonempty",ge=>hr(ge)>0||`Expected a nonempty ${de.type} but received an empty one`)}function wt(de,ge){return tr(de,"pattern",be=>ge.test(be)||`Expected a ${de.type} matching \`/${ge.source}/\` but received "${be}"`)}function nt(de,ge,be=ge){let ye=`Expected a ${de.type}`,_e=ge===be?`of \`${ge}\``:`between \`${ge}\` and \`${be}\``;return tr(de,"size",ft=>{if(typeof ft=="number"||ft instanceof Date)return ge<=ft&&ft<=be||`${ye} ${_e} but received \`${ft}\``;if(ft instanceof Map||ft instanceof Set){let{size:Ve}=ft;return ge<=Ve&&Ve<=be||`${ye} with a size ${_e} but received one with a size of \`${Ve}\``}else{let{length:Ve}=ft;return ge<=Ve&&Ve<=be||`${ye} with a length ${_e} but received one with a length of \`${Ve}\``}})}function tr(de,ge,be){return new d({...de,*refiner(ye,_e){yield*de.refiner(ye,_e);let ft=be(ye,_e),Ve=l(ft,_e,de,ye);for(let Fe of Ve)yield{...Fe,refinement:ge}}})}t.Struct=d,t.StructError=e,t.any=W,t.array=z,t.assert=p,t.assign=P,t.bigint=q,t.boolean=Q,t.coerce=fe,t.create=v,t.date=f,t.defaulted=Se,t.define=k,t.deprecated=M,t.dynamic=L,t.empty=Qe,t.enums=h,t.func=g,t.instance=x,t.integer=S,t.intersection=T,t.is=_,t.lazy=D,t.literal=N,t.map=I,t.mask=y,t.max=mt,t.min=qe,t.never=m,t.nonempty=Vt,t.nullable=C,t.number=Y,t.object=ne,t.omit=j,t.optional=b,t.partial=V,t.pattern=wt,t.pick=K,t.record=H,t.refine=tr,t.regexp=G,t.set=U,t.size=nt,t.string=se,t.struct=B,t.trimmed=gt,t.tuple=te,t.type=le,t.union=me,t.unknown=Ee,t.validate=R})});var S1=X(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.assertExhaustive=id.assertStruct=id.assert=id.AssertionError=void 0;var swt=t2();function awt(t){return typeof t=="object"&&t!==null&&"message"in t}function cwt(t){var e,r;return typeof((r=(e=t?.prototype)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.name)=="string"}function lwt(t){let e=awt(t)?t.message:String(t);return e.endsWith(".")?e.slice(0,-1):e}function D4e(t,e){return cwt(t)?new t({message:e}):t({message:e})}var zE=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};id.AssertionError=zE;function uwt(t,e="Assertion failed.",r=zE){if(!t)throw e instanceof Error?e:D4e(r,e)}id.assert=uwt;function fwt(t,e,r="Assertion failed",n=zE){try{(0,swt.assert)(t,e)}catch(i){throw D4e(n,`${r}: ${lwt(i)}.`)}}id.assertStruct=fwt;function hwt(t){throw new Error("Invalid branch reached. Should be detected during compilation.")}id.assertExhaustive=hwt});var RZ=X(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});PO.base64=void 0;var dwt=t2(),pwt=S1(),mwt=(t,e={})=>{var r,n;let i=(r=e.paddingRequired)!==null&&r!==void 0?r:!1,o=(n=e.characterSet)!==null&&n!==void 0?n:"base64",s;o==="base64"?s=String.raw`[A-Za-z0-9+\/]`:((0,pwt.assert)(o==="base64url"),s=String.raw`[-_A-Za-z0-9]`);let c;return i?c=new RegExp(`^(?:${s}{4})*(?:${s}{3}=|${s}{2}==)?$`,"u"):c=new RegExp(`^(?:${s}{4})*(?:${s}{2,3}|${s}{3}=|${s}{2}==)?$`,"u"),(0,dwt.pattern)(t,c)};PO.base64=mwt});var WE=X(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});us.remove0x=us.add0x=us.assertIsStrictHexString=us.assertIsHexString=us.isStrictHexString=us.isHexString=us.StrictHexStruct=us.HexStruct=void 0;var n5=t2(),j4e=S1();us.HexStruct=(0,n5.pattern)((0,n5.string)(),/^(?:0x)?[0-9a-f]+$/iu);us.StrictHexStruct=(0,n5.pattern)((0,n5.string)(),/^0x[0-9a-f]+$/iu);function $4e(t){return(0,n5.is)(t,us.HexStruct)}us.isHexString=$4e;function q4e(t){return(0,n5.is)(t,us.StrictHexStruct)}us.isStrictHexString=q4e;function gwt(t){(0,j4e.assert)($4e(t),"Value must be a hexadecimal string.")}us.assertIsHexString=gwt;function wwt(t){(0,j4e.assert)(q4e(t),'Value must be a hexadecimal string, starting with "0x".')}us.assertIsStrictHexString=wwt;function vwt(t){return t.startsWith("0x")?t:t.startsWith("0X")?`0x${t.substring(2)}`:`0x${t}`}us.add0x=vwt;function ywt(t){return t.startsWith("0x")||t.startsWith("0X")?t.substring(2):t}us.remove0x=ywt});var PZ=X(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.createDataView=ai.concatBytes=ai.valueToBytes=ai.stringToBytes=ai.numberToBytes=ai.signedBigIntToBytes=ai.bigIntToBytes=ai.hexToBytes=ai.bytesToString=ai.bytesToNumber=ai.bytesToSignedBigInt=ai.bytesToBigInt=ai.bytesToHex=ai.assertIsBytes=ai.isBytes=void 0;var Jl=S1(),MZ=WE(),H4e=48,z4e=58,W4e=87;function bwt(){let t=[];return()=>{if(t.length===0)for(let e=0;e<256;e++)t.push(e.toString(16).padStart(2,"0"));return t}}var xwt=bwt();function NZ(t){return t instanceof Uint8Array}ai.isBytes=NZ;function i5(t){(0,Jl.assert)(NZ(t),"Value must be a Uint8Array.")}ai.assertIsBytes=i5;function V4e(t){if(i5(t),t.length===0)return"0x";let e=xwt(),r=new Array(t.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");let e=t.toString(16);return OO(e)}ai.bigIntToBytes=G4e;function Swt(t,e){(0,Jl.assert)(e>0);let r=t>>BigInt(31);return!((~t&r)+(t&~r)>>BigInt(e*8+-1))}function _wt(t,e){(0,Jl.assert)(typeof t=="bigint","Value must be a bigint."),(0,Jl.assert)(typeof e=="number","Byte length must be a number."),(0,Jl.assert)(e>0,"Byte length must be greater than 0."),(0,Jl.assert)(Swt(t,e),"Byte length is too small to represent the given value.");let r=t,n=new Uint8Array(e);for(let i=0;i>=BigInt(8);return n.reverse()}ai.signedBigIntToBytes=_wt;function Q4e(t){(0,Jl.assert)(typeof t=="number","Value must be a number."),(0,Jl.assert)(t>=0,"Value must be a non-negative number."),(0,Jl.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");let e=t.toString(16);return OO(e)}ai.numberToBytes=Q4e;function Z4e(t){return(0,Jl.assert)(typeof t=="string","Value must be a string."),new TextEncoder().encode(t)}ai.stringToBytes=Z4e;function Y4e(t){if(typeof t=="bigint")return G4e(t);if(typeof t=="number")return Q4e(t);if(typeof t=="string")return t.startsWith("0x")?OO(t):Z4e(t);if(NZ(t))return t;throw new TypeError(`Unsupported value type: "${typeof t}".`)}ai.valueToBytes=Y4e;function Iwt(t){let e=new Array(t.length),r=0;for(let i=0;i{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});BO.ChecksumStruct=void 0;var J4e=t2(),kwt=RZ();BO.ChecksumStruct=(0,J4e.size)((0,kwt.base64)((0,J4e.string)(),{paddingRequired:!0}),44,44)});var r5e=X(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.createHex=od.createBytes=od.createBigInt=od.createNumber=void 0;var po=t2(),Rwt=S1(),e5e=PZ(),LO=WE(),t5e=(0,po.union)([(0,po.number)(),(0,po.bigint)(),(0,po.string)(),LO.StrictHexStruct]),Mwt=(0,po.coerce)((0,po.number)(),t5e,Number),Nwt=(0,po.coerce)((0,po.bigint)(),t5e,BigInt),j5r=(0,po.union)([LO.StrictHexStruct,(0,po.instance)(Uint8Array)]),Pwt=(0,po.coerce)((0,po.instance)(Uint8Array),(0,po.union)([LO.StrictHexStruct]),e5e.hexToBytes),Owt=(0,po.coerce)(LO.StrictHexStruct,(0,po.instance)(Uint8Array),e5e.bytesToHex);function Bwt(t){try{let e=(0,po.create)(t,Mwt);return(0,Rwt.assert)(Number.isFinite(e),`Expected a number-like value, got "${t}".`),e}catch(e){throw e instanceof po.StructError?new Error(`Expected a number-like value, got "${t}".`):e}}od.createNumber=Bwt;function Lwt(t){try{return(0,po.create)(t,Nwt)}catch(e){throw e instanceof po.StructError?new Error(`Expected a number-like value, got "${String(e.value)}".`):e}}od.createBigInt=Lwt;function Fwt(t){if(typeof t=="string"&&t.toLowerCase()==="0x")return new Uint8Array;try{return(0,po.create)(t,Pwt)}catch(e){throw e instanceof po.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}od.createBytes=Fwt;function Uwt(t){if(t instanceof Uint8Array&&t.length===0||typeof t=="string"&&t.toLowerCase()==="0x")return"0x";try{return(0,po.create)(t,Owt)}catch(e){throw e instanceof po.StructError?new Error(`Expected a bytes-like value, got "${String(e.value)}".`):e}}od.createHex=Uwt});var i5e=X(ad=>{"use strict";var n5e=ad&&ad.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ec=ad&&ad.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},v0,sd;Object.defineProperty(ad,"__esModule",{value:!0});ad.FrozenSet=ad.FrozenMap=void 0;var VE=class{constructor(e){v0.set(this,void 0),n5e(this,v0,new Map(e),"f"),Object.freeze(this)}get size(){return Ec(this,v0,"f").size}[(v0=new WeakMap,Symbol.iterator)](){return Ec(this,v0,"f")[Symbol.iterator]()}entries(){return Ec(this,v0,"f").entries()}forEach(e,r){return Ec(this,v0,"f").forEach((n,i,o)=>e.call(r,n,i,this))}get(e){return Ec(this,v0,"f").get(e)}has(e){return Ec(this,v0,"f").has(e)}keys(){return Ec(this,v0,"f").keys()}values(){return Ec(this,v0,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,r])=>`${String(e)} => ${String(r)}`).join(", ")} `:""}}`}};ad.FrozenMap=VE;var KE=class{constructor(e){sd.set(this,void 0),n5e(this,sd,new Set(e),"f"),Object.freeze(this)}get size(){return Ec(this,sd,"f").size}[(sd=new WeakMap,Symbol.iterator)](){return Ec(this,sd,"f")[Symbol.iterator]()}entries(){return Ec(this,sd,"f").entries()}forEach(e,r){return Ec(this,sd,"f").forEach((n,i,o)=>e.call(r,n,i,this))}has(e){return Ec(this,sd,"f").has(e)}keys(){return Ec(this,sd,"f").keys()}values(){return Ec(this,sd,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}};ad.FrozenSet=KE;Object.freeze(VE);Object.freeze(VE.prototype);Object.freeze(KE);Object.freeze(KE.prototype)});var s5e=X(o5e=>{"use strict";Object.defineProperty(o5e,"__esModule",{value:!0})});var a5e=X(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.getJsonRpcIdValidator=dt.assertIsJsonRpcError=dt.isJsonRpcError=dt.assertIsJsonRpcFailure=dt.isJsonRpcFailure=dt.assertIsJsonRpcSuccess=dt.isJsonRpcSuccess=dt.assertIsJsonRpcResponse=dt.isJsonRpcResponse=dt.assertIsPendingJsonRpcResponse=dt.isPendingJsonRpcResponse=dt.JsonRpcResponseStruct=dt.JsonRpcFailureStruct=dt.JsonRpcSuccessStruct=dt.PendingJsonRpcResponseStruct=dt.assertIsJsonRpcRequest=dt.isJsonRpcRequest=dt.assertIsJsonRpcNotification=dt.isJsonRpcNotification=dt.JsonRpcNotificationStruct=dt.JsonRpcRequestStruct=dt.JsonRpcParamsStruct=dt.JsonRpcErrorStruct=dt.JsonRpcIdStruct=dt.JsonRpcVersionStruct=dt.jsonrpc2=dt.getJsonSize=dt.isValidJson=dt.JsonStruct=dt.UnsafeJsonStruct=void 0;var Dr=t2(),r2=S1(),Dwt=()=>(0,Dr.define)("finite number",t=>(0,Dr.is)(t,(0,Dr.number)())&&Number.isFinite(t));dt.UnsafeJsonStruct=(0,Dr.union)([(0,Dr.literal)(null),(0,Dr.boolean)(),Dwt(),(0,Dr.string)(),(0,Dr.array)((0,Dr.lazy)(()=>dt.UnsafeJsonStruct)),(0,Dr.record)((0,Dr.string)(),(0,Dr.lazy)(()=>dt.UnsafeJsonStruct))]);dt.JsonStruct=(0,Dr.define)("Json",(t,e)=>{function r(n,i){let s=[...i.validator(n,e)];return s.length>0?s:!0}try{let n=r(t,dt.UnsafeJsonStruct);return n!==!0?n:r(JSON.parse(JSON.stringify(t)),dt.UnsafeJsonStruct)}catch(n){return n instanceof RangeError?"Circular reference detected":!1}});function jwt(t){return(0,Dr.is)(t,dt.JsonStruct)}dt.isValidJson=jwt;function $wt(t){(0,r2.assertStruct)(t,dt.JsonStruct,"Invalid JSON value");let e=JSON.stringify(t);return new TextEncoder().encode(e).byteLength}dt.getJsonSize=$wt;dt.jsonrpc2="2.0";dt.JsonRpcVersionStruct=(0,Dr.literal)(dt.jsonrpc2);dt.JsonRpcIdStruct=(0,Dr.nullable)((0,Dr.union)([(0,Dr.number)(),(0,Dr.string)()]));dt.JsonRpcErrorStruct=(0,Dr.object)({code:(0,Dr.integer)(),message:(0,Dr.string)(),data:(0,Dr.optional)(dt.JsonStruct),stack:(0,Dr.optional)((0,Dr.string)())});dt.JsonRpcParamsStruct=(0,Dr.optional)((0,Dr.union)([(0,Dr.record)((0,Dr.string)(),dt.JsonStruct),(0,Dr.array)(dt.JsonStruct)]));dt.JsonRpcRequestStruct=(0,Dr.object)({id:dt.JsonRpcIdStruct,jsonrpc:dt.JsonRpcVersionStruct,method:(0,Dr.string)(),params:dt.JsonRpcParamsStruct});dt.JsonRpcNotificationStruct=(0,Dr.omit)(dt.JsonRpcRequestStruct,["id"]);function qwt(t){return(0,Dr.is)(t,dt.JsonRpcNotificationStruct)}dt.isJsonRpcNotification=qwt;function Hwt(t,e){(0,r2.assertStruct)(t,dt.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",e)}dt.assertIsJsonRpcNotification=Hwt;function zwt(t){return(0,Dr.is)(t,dt.JsonRpcRequestStruct)}dt.isJsonRpcRequest=zwt;function Wwt(t,e){(0,r2.assertStruct)(t,dt.JsonRpcRequestStruct,"Invalid JSON-RPC request",e)}dt.assertIsJsonRpcRequest=Wwt;dt.PendingJsonRpcResponseStruct=(0,Dr.object)({id:dt.JsonRpcIdStruct,jsonrpc:dt.JsonRpcVersionStruct,result:(0,Dr.optional)((0,Dr.unknown)()),error:(0,Dr.optional)(dt.JsonRpcErrorStruct)});dt.JsonRpcSuccessStruct=(0,Dr.object)({id:dt.JsonRpcIdStruct,jsonrpc:dt.JsonRpcVersionStruct,result:dt.JsonStruct});dt.JsonRpcFailureStruct=(0,Dr.object)({id:dt.JsonRpcIdStruct,jsonrpc:dt.JsonRpcVersionStruct,error:dt.JsonRpcErrorStruct});dt.JsonRpcResponseStruct=(0,Dr.union)([dt.JsonRpcSuccessStruct,dt.JsonRpcFailureStruct]);function Vwt(t){return(0,Dr.is)(t,dt.PendingJsonRpcResponseStruct)}dt.isPendingJsonRpcResponse=Vwt;function Kwt(t,e){(0,r2.assertStruct)(t,dt.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",e)}dt.assertIsPendingJsonRpcResponse=Kwt;function Gwt(t){return(0,Dr.is)(t,dt.JsonRpcResponseStruct)}dt.isJsonRpcResponse=Gwt;function Qwt(t,e){(0,r2.assertStruct)(t,dt.JsonRpcResponseStruct,"Invalid JSON-RPC response",e)}dt.assertIsJsonRpcResponse=Qwt;function Zwt(t){return(0,Dr.is)(t,dt.JsonRpcSuccessStruct)}dt.isJsonRpcSuccess=Zwt;function Ywt(t,e){(0,r2.assertStruct)(t,dt.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",e)}dt.assertIsJsonRpcSuccess=Ywt;function Jwt(t){return(0,Dr.is)(t,dt.JsonRpcFailureStruct)}dt.isJsonRpcFailure=Jwt;function Xwt(t,e){(0,r2.assertStruct)(t,dt.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",e)}dt.assertIsJsonRpcFailure=Xwt;function e3t(t){return(0,Dr.is)(t,dt.JsonRpcErrorStruct)}dt.isJsonRpcError=e3t;function t3t(t,e){(0,r2.assertStruct)(t,dt.JsonRpcErrorStruct,"Invalid JSON-RPC error",e)}dt.assertIsJsonRpcError=t3t;function r3t(t){let{permitEmptyString:e,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},t);return o=>!!(typeof o=="number"&&(r||Number.isInteger(o))||typeof o=="string"&&(e||o.length>0)||n&&o===null)}dt.getJsonRpcIdValidator=r3t});var l5e=X(c5e=>{"use strict";Object.defineProperty(c5e,"__esModule",{value:!0})});var f5e=X((V5r,u5e)=>{var o5=1e3,s5=o5*60,a5=s5*60,yv=a5*24,n3t=yv*7,i3t=yv*365.25;u5e.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return o3t(t);if(r==="number"&&isFinite(t))return e.long?a3t(t):s3t(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function o3t(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*i3t;case"weeks":case"week":case"w":return r*n3t;case"days":case"day":case"d":return r*yv;case"hours":case"hour":case"hrs":case"hr":case"h":return r*a5;case"minutes":case"minute":case"mins":case"min":case"m":return r*s5;case"seconds":case"second":case"secs":case"sec":case"s":return r*o5;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function s3t(t){var e=Math.abs(t);return e>=yv?Math.round(t/yv)+"d":e>=a5?Math.round(t/a5)+"h":e>=s5?Math.round(t/s5)+"m":e>=o5?Math.round(t/o5)+"s":t+"ms"}function a3t(t){var e=Math.abs(t);return e>=yv?FO(t,e,yv,"day"):e>=a5?FO(t,e,a5,"hour"):e>=s5?FO(t,e,s5,"minute"):e>=o5?FO(t,e,o5,"second"):t+" ms"}function FO(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var d5e=X((K5r,h5e)=>{function c3t(t){r.debug=r,r.default=r,r.coerce=l,r.disable=o,r.enable=i,r.enabled=s,r.humanize=f5e(),r.destroy=u,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function e(d){let p=0;for(let v=0;v{if(V==="%%")return"%";D++;let B=r.formatters[K];if(typeof B=="function"){let W=P[D];V=B.call(k,W),P.splice(D,1),D--}return V}),r.formatArgs.call(k,P),(k.log||r.log).apply(k,P)}return R.namespace=d,R.useColors=r.useColors(),R.color=r.selectColor(d),R.extend=n,R.destroy=r.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>v!==null?v:(y!==r.namespaces&&(y=r.namespaces,_=r.enabled(d)),_),set:P=>{v=P}}),typeof r.init=="function"&&r.init(R),R}function n(d,p){let v=r(this.namespace+(typeof p>"u"?":":p)+d);return v.log=this.log,v}function i(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let p,v=(typeof d=="string"?d:"").split(/[\s,]+/),y=v.length;for(p=0;p"-"+p)].join(",");return r.enable(""),d}function s(d){if(d[d.length-1]==="*")return!0;let p,v;for(p=0,v=r.skips.length;p{Xl.formatArgs=u3t;Xl.save=f3t;Xl.load=h3t;Xl.useColors=l3t;Xl.storage=d3t();Xl.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Xl.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function l3t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function u3t(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+UO.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}Xl.log=console.debug||console.log||(()=>{});function f3t(t){try{t?Xl.storage.setItem("debug",t):Xl.storage.removeItem("debug")}catch{}}function h3t(){let t;try{t=Xl.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function d3t(){try{return localStorage}catch{}}UO.exports=d5e()(Xl);var{formatters:p3t}=UO.exports;p3t.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var m5e=X(n2=>{"use strict";var m3t=n2&&n2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n2,"__esModule",{value:!0});n2.createModuleLogger=n2.createProjectLogger=void 0;var g3t=m3t(p5e()),w3t=(0,g3t.default)("metamask");function v3t(t){return w3t.extend(t)}n2.createProjectLogger=v3t;function y3t(t,e){return t.extend(e)}n2.createModuleLogger=y3t});var w5e=X(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.calculateNumberSize=eo.calculateStringSize=eo.isASCII=eo.isPlainObject=eo.ESCAPE_CHARACTERS_REGEXP=eo.JsonSize=eo.hasProperty=eo.isObject=eo.isNullOrUndefined=eo.isNonEmptyArray=void 0;function b3t(t){return Array.isArray(t)&&t.length>0}eo.isNonEmptyArray=b3t;function x3t(t){return t==null}eo.isNullOrUndefined=x3t;function C3t(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}eo.isObject=C3t;var E3t=(t,e)=>Object.hasOwnProperty.call(t,e);eo.hasProperty=E3t;var A3t;(function(t){t[t.Null=4]="Null",t[t.Comma=1]="Comma",t[t.Wrapper=1]="Wrapper",t[t.True=4]="True",t[t.False=5]="False",t[t.Quote=1]="Quote",t[t.Colon=1]="Colon",t[t.Date=24]="Date"})(A3t=eo.JsonSize||(eo.JsonSize={}));eo.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function S3t(t){if(typeof t!="object"||t===null)return!1;try{let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}catch{return!1}}eo.isPlainObject=S3t;function g5e(t){return t.charCodeAt(0)<=127}eo.isASCII=g5e;function _3t(t){var e;return t.split("").reduce((n,i)=>g5e(i)?n+1:n+2,0)+((e=t.match(eo.ESCAPE_CHARACTERS_REGEXP))!==null&&e!==void 0?e:[]).length}eo.calculateStringSize=_3t;function I3t(t){return t.toString().length}eo.calculateNumberSize=I3t});var v5e=X(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.hexToBigInt=cd.hexToNumber=cd.bigIntToHex=cd.numberToHex=void 0;var c5=S1(),GE=WE(),T3t=t=>((0,c5.assert)(typeof t=="number","Value must be a number."),(0,c5.assert)(t>=0,"Value must be a non-negative number."),(0,c5.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,GE.add0x)(t.toString(16)));cd.numberToHex=T3t;var k3t=t=>((0,c5.assert)(typeof t=="bigint","Value must be a bigint."),(0,c5.assert)(t>=0,"Value must be a non-negative bigint."),(0,GE.add0x)(t.toString(16)));cd.bigIntToHex=k3t;var R3t=t=>{(0,GE.assertIsHexString)(t);let e=parseInt(t,16);return(0,c5.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `hexToBigInt` instead."),e};cd.hexToNumber=R3t;var M3t=t=>((0,GE.assertIsHexString)(t),BigInt((0,GE.add0x)(t)));cd.hexToBigInt=M3t});var b5e=X(y5e=>{"use strict";Object.defineProperty(y5e,"__esModule",{value:!0})});var C5e=X(_1=>{"use strict";Object.defineProperty(_1,"__esModule",{value:!0});_1.timeSince=_1.inMilliseconds=_1.Duration=void 0;var N3t;(function(t){t[t.Millisecond=1]="Millisecond",t[t.Second=1e3]="Second",t[t.Minute=6e4]="Minute",t[t.Hour=36e5]="Hour",t[t.Day=864e5]="Day",t[t.Week=6048e5]="Week",t[t.Year=31536e6]="Year"})(N3t=_1.Duration||(_1.Duration={}));var P3t=t=>Number.isInteger(t)&&t>=0,x5e=(t,e)=>{if(!P3t(t))throw new Error(`"${e}" must be a non-negative integer. Received: "${t}".`)};function O3t(t,e){return x5e(t,"count"),t*e}_1.inMilliseconds=O3t;function B3t(t){return x5e(t,"timestamp"),Date.now()-t}_1.timeSince=B3t});var A5e=X(E5e=>{"use strict";Object.defineProperty(E5e,"__esModule",{value:!0})});var QE=X((exr,S5e)=>{var L3t="2.0.0",F3t=Number.MAX_SAFE_INTEGER||9007199254740991,U3t=16,D3t=250,j3t=["major","premajor","minor","preminor","patch","prepatch","prerelease"];S5e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:U3t,MAX_SAFE_BUILD_LENGTH:D3t,MAX_SAFE_INTEGER:F3t,RELEASE_TYPES:j3t,SEMVER_SPEC_VERSION:L3t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var ZE=X((txr,_5e)=>{var $3t=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};_5e.exports=$3t});var l5=X((I1,I5e)=>{var{MAX_SAFE_COMPONENT_LENGTH:OZ,MAX_SAFE_BUILD_LENGTH:q3t,MAX_LENGTH:H3t}=QE(),z3t=ZE();I1=I5e.exports={};var W3t=I1.re=[],V3t=I1.safeRe=[],Qt=I1.src=[],Zt=I1.t={},K3t=0,BZ="[a-zA-Z0-9-]",G3t=[["\\s",1],["\\d",H3t],[BZ,q3t]],Q3t=t=>{for(let[e,r]of G3t)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Gr=(t,e,r)=>{let n=Q3t(e),i=K3t++;z3t(t,i,e),Zt[t]=i,Qt[i]=e,W3t[i]=new RegExp(e,r?"g":void 0),V3t[i]=new RegExp(n,r?"g":void 0)};Gr("NUMERICIDENTIFIER","0|[1-9]\\d*");Gr("NUMERICIDENTIFIERLOOSE","\\d+");Gr("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${BZ}*`);Gr("MAINVERSION",`(${Qt[Zt.NUMERICIDENTIFIER]})\\.(${Qt[Zt.NUMERICIDENTIFIER]})\\.(${Qt[Zt.NUMERICIDENTIFIER]})`);Gr("MAINVERSIONLOOSE",`(${Qt[Zt.NUMERICIDENTIFIERLOOSE]})\\.(${Qt[Zt.NUMERICIDENTIFIERLOOSE]})\\.(${Qt[Zt.NUMERICIDENTIFIERLOOSE]})`);Gr("PRERELEASEIDENTIFIER",`(?:${Qt[Zt.NUMERICIDENTIFIER]}|${Qt[Zt.NONNUMERICIDENTIFIER]})`);Gr("PRERELEASEIDENTIFIERLOOSE",`(?:${Qt[Zt.NUMERICIDENTIFIERLOOSE]}|${Qt[Zt.NONNUMERICIDENTIFIER]})`);Gr("PRERELEASE",`(?:-(${Qt[Zt.PRERELEASEIDENTIFIER]}(?:\\.${Qt[Zt.PRERELEASEIDENTIFIER]})*))`);Gr("PRERELEASELOOSE",`(?:-?(${Qt[Zt.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Qt[Zt.PRERELEASEIDENTIFIERLOOSE]})*))`);Gr("BUILDIDENTIFIER",`${BZ}+`);Gr("BUILD",`(?:\\+(${Qt[Zt.BUILDIDENTIFIER]}(?:\\.${Qt[Zt.BUILDIDENTIFIER]})*))`);Gr("FULLPLAIN",`v?${Qt[Zt.MAINVERSION]}${Qt[Zt.PRERELEASE]}?${Qt[Zt.BUILD]}?`);Gr("FULL",`^${Qt[Zt.FULLPLAIN]}$`);Gr("LOOSEPLAIN",`[v=\\s]*${Qt[Zt.MAINVERSIONLOOSE]}${Qt[Zt.PRERELEASELOOSE]}?${Qt[Zt.BUILD]}?`);Gr("LOOSE",`^${Qt[Zt.LOOSEPLAIN]}$`);Gr("GTLT","((?:<|>)?=?)");Gr("XRANGEIDENTIFIERLOOSE",`${Qt[Zt.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Gr("XRANGEIDENTIFIER",`${Qt[Zt.NUMERICIDENTIFIER]}|x|X|\\*`);Gr("XRANGEPLAIN",`[v=\\s]*(${Qt[Zt.XRANGEIDENTIFIER]})(?:\\.(${Qt[Zt.XRANGEIDENTIFIER]})(?:\\.(${Qt[Zt.XRANGEIDENTIFIER]})(?:${Qt[Zt.PRERELEASE]})?${Qt[Zt.BUILD]}?)?)?`);Gr("XRANGEPLAINLOOSE",`[v=\\s]*(${Qt[Zt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Qt[Zt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Qt[Zt.XRANGEIDENTIFIERLOOSE]})(?:${Qt[Zt.PRERELEASELOOSE]})?${Qt[Zt.BUILD]}?)?)?`);Gr("XRANGE",`^${Qt[Zt.GTLT]}\\s*${Qt[Zt.XRANGEPLAIN]}$`);Gr("XRANGELOOSE",`^${Qt[Zt.GTLT]}\\s*${Qt[Zt.XRANGEPLAINLOOSE]}$`);Gr("COERCEPLAIN",`(^|[^\\d])(\\d{1,${OZ}})(?:\\.(\\d{1,${OZ}}))?(?:\\.(\\d{1,${OZ}}))?`);Gr("COERCE",`${Qt[Zt.COERCEPLAIN]}(?:$|[^\\d])`);Gr("COERCEFULL",Qt[Zt.COERCEPLAIN]+`(?:${Qt[Zt.PRERELEASE]})?(?:${Qt[Zt.BUILD]})?(?:$|[^\\d])`);Gr("COERCERTL",Qt[Zt.COERCE],!0);Gr("COERCERTLFULL",Qt[Zt.COERCEFULL],!0);Gr("LONETILDE","(?:~>?)");Gr("TILDETRIM",`(\\s*)${Qt[Zt.LONETILDE]}\\s+`,!0);I1.tildeTrimReplace="$1~";Gr("TILDE",`^${Qt[Zt.LONETILDE]}${Qt[Zt.XRANGEPLAIN]}$`);Gr("TILDELOOSE",`^${Qt[Zt.LONETILDE]}${Qt[Zt.XRANGEPLAINLOOSE]}$`);Gr("LONECARET","(?:\\^)");Gr("CARETTRIM",`(\\s*)${Qt[Zt.LONECARET]}\\s+`,!0);I1.caretTrimReplace="$1^";Gr("CARET",`^${Qt[Zt.LONECARET]}${Qt[Zt.XRANGEPLAIN]}$`);Gr("CARETLOOSE",`^${Qt[Zt.LONECARET]}${Qt[Zt.XRANGEPLAINLOOSE]}$`);Gr("COMPARATORLOOSE",`^${Qt[Zt.GTLT]}\\s*(${Qt[Zt.LOOSEPLAIN]})$|^$`);Gr("COMPARATOR",`^${Qt[Zt.GTLT]}\\s*(${Qt[Zt.FULLPLAIN]})$|^$`);Gr("COMPARATORTRIM",`(\\s*)${Qt[Zt.GTLT]}\\s*(${Qt[Zt.LOOSEPLAIN]}|${Qt[Zt.XRANGEPLAIN]})`,!0);I1.comparatorTrimReplace="$1$2$3";Gr("HYPHENRANGE",`^\\s*(${Qt[Zt.XRANGEPLAIN]})\\s+-\\s+(${Qt[Zt.XRANGEPLAIN]})\\s*$`);Gr("HYPHENRANGELOOSE",`^\\s*(${Qt[Zt.XRANGEPLAINLOOSE]})\\s+-\\s+(${Qt[Zt.XRANGEPLAINLOOSE]})\\s*$`);Gr("STAR","(<|>)?=?\\s*\\*");Gr("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Gr("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var DO=X((rxr,T5e)=>{var Z3t=Object.freeze({loose:!0}),Y3t=Object.freeze({}),J3t=t=>t?typeof t!="object"?Z3t:t:Y3t;T5e.exports=J3t});var LZ=X((nxr,M5e)=>{var k5e=/^[0-9]+$/,R5e=(t,e)=>{let r=k5e.test(t),n=k5e.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:tR5e(e,t);M5e.exports={compareIdentifiers:R5e,rcompareIdentifiers:X3t}});var $a=X((ixr,B5e)=>{var jO=ZE(),{MAX_LENGTH:N5e,MAX_SAFE_INTEGER:$O}=QE(),{safeRe:P5e,t:O5e}=l5(),evt=DO(),{compareIdentifiers:u5}=LZ(),FZ=class t{constructor(e,r){if(r=evt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>N5e)throw new TypeError(`version is longer than ${N5e} characters`);jO("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?P5e[O5e.LOOSE]:P5e[O5e.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>$O||this.major<0)throw new TypeError("Invalid major version");if(this.minor>$O||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>$O||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let o=+i;if(o>=0&&o<$O)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(jO("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),u5(this.major,e.major)||u5(this.minor,e.minor)||u5(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(jO("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return u5(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(jO("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return u5(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),u5(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};B5e.exports=FZ});var bv=X((oxr,F5e)=>{var L5e=$a(),tvt=(t,e,r=!1)=>{if(t instanceof L5e)return t;try{return new L5e(t,e)}catch(n){if(!r)return null;throw n}};F5e.exports=tvt});var D5e=X((sxr,U5e)=>{var rvt=bv(),nvt=(t,e)=>{let r=rvt(t,e);return r?r.version:null};U5e.exports=nvt});var $5e=X((axr,j5e)=>{var ivt=bv(),ovt=(t,e)=>{let r=ivt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};j5e.exports=ovt});var z5e=X((cxr,H5e)=>{var q5e=$a(),svt=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new q5e(t instanceof q5e?t.version:t,r).inc(e,n,i).version}catch{return null}};H5e.exports=svt});var K5e=X((lxr,V5e)=>{var W5e=bv(),avt=(t,e)=>{let r=W5e(t,null,!0),n=W5e(e,null,!0),i=r.compare(n);if(i===0)return null;let o=i>0,s=o?r:n,c=o?n:r,l=!!s.prerelease.length;if(!!c.prerelease.length&&!l)return!c.patch&&!c.minor?"major":s.patch?"patch":s.minor?"minor":"major";let d=l?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};V5e.exports=avt});var Q5e=X((uxr,G5e)=>{var cvt=$a(),lvt=(t,e)=>new cvt(t,e).major;G5e.exports=lvt});var Y5e=X((fxr,Z5e)=>{var uvt=$a(),fvt=(t,e)=>new uvt(t,e).minor;Z5e.exports=fvt});var X5e=X((hxr,J5e)=>{var hvt=$a(),dvt=(t,e)=>new hvt(t,e).patch;J5e.exports=dvt});var txe=X((dxr,exe)=>{var pvt=bv(),mvt=(t,e)=>{let r=pvt(t,e);return r&&r.prerelease.length?r.prerelease:null};exe.exports=mvt});var uf=X((pxr,nxe)=>{var rxe=$a(),gvt=(t,e,r)=>new rxe(t,r).compare(new rxe(e,r));nxe.exports=gvt});var oxe=X((mxr,ixe)=>{var wvt=uf(),vvt=(t,e,r)=>wvt(e,t,r);ixe.exports=vvt});var axe=X((gxr,sxe)=>{var yvt=uf(),bvt=(t,e)=>yvt(t,e,!0);sxe.exports=bvt});var qO=X((wxr,lxe)=>{var cxe=$a(),xvt=(t,e,r)=>{let n=new cxe(t,r),i=new cxe(e,r);return n.compare(i)||n.compareBuild(i)};lxe.exports=xvt});var fxe=X((vxr,uxe)=>{var Cvt=qO(),Evt=(t,e)=>t.sort((r,n)=>Cvt(r,n,e));uxe.exports=Evt});var dxe=X((yxr,hxe)=>{var Avt=qO(),Svt=(t,e)=>t.sort((r,n)=>Avt(n,r,e));hxe.exports=Svt});var YE=X((bxr,pxe)=>{var _vt=uf(),Ivt=(t,e,r)=>_vt(t,e,r)>0;pxe.exports=Ivt});var HO=X((xxr,mxe)=>{var Tvt=uf(),kvt=(t,e,r)=>Tvt(t,e,r)<0;mxe.exports=kvt});var UZ=X((Cxr,gxe)=>{var Rvt=uf(),Mvt=(t,e,r)=>Rvt(t,e,r)===0;gxe.exports=Mvt});var DZ=X((Exr,wxe)=>{var Nvt=uf(),Pvt=(t,e,r)=>Nvt(t,e,r)!==0;wxe.exports=Pvt});var zO=X((Axr,vxe)=>{var Ovt=uf(),Bvt=(t,e,r)=>Ovt(t,e,r)>=0;vxe.exports=Bvt});var WO=X((Sxr,yxe)=>{var Lvt=uf(),Fvt=(t,e,r)=>Lvt(t,e,r)<=0;yxe.exports=Fvt});var jZ=X((_xr,bxe)=>{var Uvt=UZ(),Dvt=DZ(),jvt=YE(),$vt=zO(),qvt=HO(),Hvt=WO(),zvt=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Uvt(t,r,n);case"!=":return Dvt(t,r,n);case">":return jvt(t,r,n);case">=":return $vt(t,r,n);case"<":return qvt(t,r,n);case"<=":return Hvt(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};bxe.exports=zvt});var Cxe=X((Ixr,xxe)=>{var Wvt=$a(),Vvt=bv(),{safeRe:VO,t:KO}=l5(),Kvt=(t,e)=>{if(t instanceof Wvt)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?VO[KO.COERCEFULL]:VO[KO.COERCE]);else{let l=e.includePrerelease?VO[KO.COERCERTLFULL]:VO[KO.COERCERTL],u;for(;(u=l.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",o=r[4]||"0",s=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Vvt(`${n}.${i}.${o}${s}${c}`,e)};xxe.exports=Kvt});var Axe=X((Txr,Exe)=>{var $Z=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Exe.exports=$Z});var ff=X((kxr,Txe)=>{var Gvt=/\s+/g,qZ=class t{constructor(e,r){if(r=Zvt(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof HZ)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Gvt," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!_xe(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&nyt(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&tyt)|(this.options.loose&&ryt))+":"+e,i=Sxe.get(n);if(i)return i;let o=this.options.loose,s=o?ll[Ac.HYPHENRANGELOOSE]:ll[Ac.HYPHENRANGE];e=e.replace(s,dyt(this.options.includePrerelease)),Wi("hyphen replace",e),e=e.replace(ll[Ac.COMPARATORTRIM],Jvt),Wi("comparator trim",e),e=e.replace(ll[Ac.TILDETRIM],Xvt),Wi("tilde trim",e),e=e.replace(ll[Ac.CARETTRIM],eyt),Wi("caret trim",e);let c=e.split(" ").map(p=>iyt(p,this.options)).join(" ").split(/\s+/).map(p=>hyt(p,this.options));o&&(c=c.filter(p=>(Wi("loose invalid filter",p,this.options),!!p.match(ll[Ac.COMPARATORLOOSE])))),Wi("range list",c);let l=new Map,u=c.map(p=>new HZ(p,this.options));for(let p of u){if(_xe(p))return[p];l.set(p.value,p)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return Sxe.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Ixe(n,r)&&e.set.some(i=>Ixe(i,r)&&n.every(o=>i.every(s=>o.intersects(s,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Yvt(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0",nyt=t=>t.value==="",Ixe=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(o=>i.intersects(o,e)),i=n.pop();return r},iyt=(t,e)=>(Wi("comp",t,e),t=ayt(t,e),Wi("caret",t),t=oyt(t,e),Wi("tildes",t),t=lyt(t,e),Wi("xrange",t),t=fyt(t,e),Wi("stars",t),t),Sc=t=>!t||t.toLowerCase()==="x"||t==="*",oyt=(t,e)=>t.trim().split(/\s+/).map(r=>syt(r,e)).join(" "),syt=(t,e)=>{let r=e.loose?ll[Ac.TILDELOOSE]:ll[Ac.TILDE];return t.replace(r,(n,i,o,s,c)=>{Wi("tilde",t,n,i,o,s,c);let l;return Sc(i)?l="":Sc(o)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:Sc(s)?l=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`:c?(Wi("replaceTilde pr",c),l=`>=${i}.${o}.${s}-${c} <${i}.${+o+1}.0-0`):l=`>=${i}.${o}.${s} <${i}.${+o+1}.0-0`,Wi("tilde return",l),l})},ayt=(t,e)=>t.trim().split(/\s+/).map(r=>cyt(r,e)).join(" "),cyt=(t,e)=>{Wi("caret",t,e);let r=e.loose?ll[Ac.CARETLOOSE]:ll[Ac.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,o,s,c,l)=>{Wi("caret",t,i,o,s,c,l);let u;return Sc(o)?u="":Sc(s)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:Sc(c)?o==="0"?u=`>=${o}.${s}.0${n} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.0${n} <${+o+1}.0.0-0`:l?(Wi("replaceCaret pr",l),o==="0"?s==="0"?u=`>=${o}.${s}.${c}-${l} <${o}.${s}.${+c+1}-0`:u=`>=${o}.${s}.${c}-${l} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${c}-${l} <${+o+1}.0.0-0`):(Wi("no pr"),o==="0"?s==="0"?u=`>=${o}.${s}.${c}${n} <${o}.${s}.${+c+1}-0`:u=`>=${o}.${s}.${c}${n} <${o}.${+s+1}.0-0`:u=`>=${o}.${s}.${c} <${+o+1}.0.0-0`),Wi("caret return",u),u})},lyt=(t,e)=>(Wi("replaceXRanges",t,e),t.split(/\s+/).map(r=>uyt(r,e)).join(" ")),uyt=(t,e)=>{t=t.trim();let r=e.loose?ll[Ac.XRANGELOOSE]:ll[Ac.XRANGE];return t.replace(r,(n,i,o,s,c,l)=>{Wi("xRange",t,n,i,o,s,c,l);let u=Sc(o),d=u||Sc(s),p=d||Sc(c),v=p;return i==="="&&v&&(i=""),l=e.includePrerelease?"-0":"",u?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&v?(d&&(s=0),c=0,i===">"?(i=">=",d?(o=+o+1,s=0,c=0):(s=+s+1,c=0)):i==="<="&&(i="<",d?o=+o+1:s=+s+1),i==="<"&&(l="-0"),n=`${i+o}.${s}.${c}${l}`):d?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:p&&(n=`>=${o}.${s}.0${l} <${o}.${+s+1}.0-0`),Wi("xRange return",n),n})},fyt=(t,e)=>(Wi("replaceStars",t,e),t.trim().replace(ll[Ac.STAR],"")),hyt=(t,e)=>(Wi("replaceGTE0",t,e),t.trim().replace(ll[e.includePrerelease?Ac.GTE0PRE:Ac.GTE0],"")),dyt=t=>(e,r,n,i,o,s,c,l,u,d,p,v)=>(Sc(n)?r="":Sc(i)?r=`>=${n}.0.0${t?"-0":""}`:Sc(o)?r=`>=${n}.${i}.0${t?"-0":""}`:s?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Sc(u)?l="":Sc(d)?l=`<${+u+1}.0.0-0`:Sc(p)?l=`<${u}.${+d+1}.0-0`:v?l=`<=${u}.${d}.${p}-${v}`:t?l=`<${u}.${d}.${+p+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),pyt=(t,e,r)=>{for(let n=0;n0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var JE=X((Rxr,Oxe)=>{var XE=Symbol("SemVer ANY"),VZ=class t{static get ANY(){return XE}constructor(e,r){if(r=kxe(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),WZ("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===XE?this.value="":this.value=this.operator+this.semver.version,WZ("comp",this)}parse(e){let r=this.options.loose?Rxe[Mxe.COMPARATORLOOSE]:Rxe[Mxe.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Nxe(n[2],this.options.loose):this.semver=XE}toString(){return this.value}test(e){if(WZ("Comparator.test",e,this.options.loose),this.semver===XE||e===XE)return!0;if(typeof e=="string")try{e=new Nxe(e,this.options)}catch{return!1}return zZ(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Pxe(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Pxe(this.value,r).test(e.semver):(r=kxe(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||zZ(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||zZ(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Oxe.exports=VZ;var kxe=DO(),{safeRe:Rxe,t:Mxe}=l5(),zZ=jZ(),WZ=ZE(),Nxe=$a(),Pxe=ff()});var e9=X((Mxr,Bxe)=>{var myt=ff(),gyt=(t,e,r)=>{try{e=new myt(e,r)}catch{return!1}return e.test(t)};Bxe.exports=gyt});var Fxe=X((Nxr,Lxe)=>{var wyt=ff(),vyt=(t,e)=>new wyt(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Lxe.exports=vyt});var Dxe=X((Pxr,Uxe)=>{var yyt=$a(),byt=ff(),xyt=(t,e,r)=>{let n=null,i=null,o=null;try{o=new byt(e,r)}catch{return null}return t.forEach(s=>{o.test(s)&&(!n||i.compare(s)===-1)&&(n=s,i=new yyt(n,r))}),n};Uxe.exports=xyt});var $xe=X((Oxr,jxe)=>{var Cyt=$a(),Eyt=ff(),Ayt=(t,e,r)=>{let n=null,i=null,o=null;try{o=new Eyt(e,r)}catch{return null}return t.forEach(s=>{o.test(s)&&(!n||i.compare(s)===1)&&(n=s,i=new Cyt(n,r))}),n};jxe.exports=Ayt});var zxe=X((Bxr,Hxe)=>{var KZ=$a(),Syt=ff(),qxe=YE(),_yt=(t,e)=>{t=new Syt(t,e);let r=new KZ("0.0.0");if(t.test(r)||(r=new KZ("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n{let c=new KZ(s.semver.version);switch(s.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!o||qxe(c,o))&&(o=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||qxe(r,o))&&(r=o)}return r&&t.test(r)?r:null};Hxe.exports=_yt});var Vxe=X((Lxr,Wxe)=>{var Iyt=ff(),Tyt=(t,e)=>{try{return new Iyt(t,e).range||"*"}catch{return null}};Wxe.exports=Tyt});var GO=X((Fxr,Zxe)=>{var kyt=$a(),Qxe=JE(),{ANY:Ryt}=Qxe,Myt=ff(),Nyt=e9(),Kxe=YE(),Gxe=HO(),Pyt=WO(),Oyt=zO(),Byt=(t,e,r,n)=>{t=new kyt(t,n),e=new Myt(e,n);let i,o,s,c,l;switch(r){case">":i=Kxe,o=Pyt,s=Gxe,c=">",l=">=";break;case"<":i=Gxe,o=Oyt,s=Kxe,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Nyt(t,e,n))return!1;for(let u=0;u{y.semver===Ryt&&(y=new Qxe(">=0.0.0")),p=p||y,v=v||y,i(y.semver,p.semver,n)?p=y:s(y.semver,v.semver,n)&&(v=y)}),p.operator===c||p.operator===l||(!v.operator||v.operator===c)&&o(t,v.semver))return!1;if(v.operator===l&&s(t,v.semver))return!1}return!0};Zxe.exports=Byt});var Jxe=X((Uxr,Yxe)=>{var Lyt=GO(),Fyt=(t,e,r)=>Lyt(t,e,">",r);Yxe.exports=Fyt});var e7e=X((Dxr,Xxe)=>{var Uyt=GO(),Dyt=(t,e,r)=>Uyt(t,e,"<",r);Xxe.exports=Dyt});var n7e=X((jxr,r7e)=>{var t7e=ff(),jyt=(t,e,r)=>(t=new t7e(t,r),e=new t7e(e,r),t.intersects(e,r));r7e.exports=jyt});var o7e=X(($xr,i7e)=>{var $yt=e9(),qyt=uf();i7e.exports=(t,e,r)=>{let n=[],i=null,o=null,s=t.sort((d,p)=>qyt(d,p,r));for(let d of s)$yt(d,e,r)?(o=d,i||(i=d)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);let c=[];for(let[d,p]of n)d===p?c.push(d):!p&&d===s[0]?c.push("*"):p?d===s[0]?c.push(`<=${p}`):c.push(`${d} - ${p}`):c.push(`>=${d}`);let l=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return l.length{var s7e=ff(),QZ=JE(),{ANY:GZ}=QZ,t9=e9(),ZZ=uf(),Hyt=(t,e,r={})=>{if(t===e)return!0;t=new s7e(t,r),e=new s7e(e,r);let n=!1;e:for(let i of t.set){for(let o of e.set){let s=Wyt(i,o,r);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},zyt=[new QZ(">=0.0.0-0")],a7e=[new QZ(">=0.0.0")],Wyt=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===GZ){if(e.length===1&&e[0].semver===GZ)return!0;r.includePrerelease?t=zyt:t=a7e}if(e.length===1&&e[0].semver===GZ){if(r.includePrerelease)return!0;e=a7e}let n=new Set,i,o;for(let y of t)y.operator===">"||y.operator===">="?i=c7e(i,y,r):y.operator==="<"||y.operator==="<="?o=l7e(o,y,r):n.add(y.semver);if(n.size>1)return null;let s;if(i&&o){if(s=ZZ(i.semver,o.semver,r),s>0)return null;if(s===0&&(i.operator!==">="||o.operator!=="<="))return null}for(let y of n){if(i&&!t9(y,String(i),r)||o&&!t9(y,String(o),r))return null;for(let _ of e)if(!t9(y,String(_),r))return!1;return!0}let c,l,u,d,p=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,v=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;p&&p.prerelease.length===1&&o.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let y of e){if(d=d||y.operator===">"||y.operator===">=",u=u||y.operator==="<"||y.operator==="<=",i){if(v&&y.semver.prerelease&&y.semver.prerelease.length&&y.semver.major===v.major&&y.semver.minor===v.minor&&y.semver.patch===v.patch&&(v=!1),y.operator===">"||y.operator===">="){if(c=c7e(i,y,r),c===y&&c!==i)return!1}else if(i.operator===">="&&!t9(i.semver,String(y),r))return!1}if(o){if(p&&y.semver.prerelease&&y.semver.prerelease.length&&y.semver.major===p.major&&y.semver.minor===p.minor&&y.semver.patch===p.patch&&(p=!1),y.operator==="<"||y.operator==="<="){if(l=l7e(o,y,r),l===y&&l!==o)return!1}else if(o.operator==="<="&&!t9(o.semver,String(y),r))return!1}if(!y.operator&&(o||i)&&s!==0)return!1}return!(i&&u&&!o&&s!==0||o&&d&&!i&&s!==0||v||p)},c7e=(t,e,r)=>{if(!t)return e;let n=ZZ(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},l7e=(t,e,r)=>{if(!t)return e;let n=ZZ(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};u7e.exports=Hyt});var m7e=X((Hxr,p7e)=>{var YZ=l5(),h7e=QE(),Vyt=$a(),d7e=LZ(),Kyt=bv(),Gyt=D5e(),Qyt=$5e(),Zyt=z5e(),Yyt=K5e(),Jyt=Q5e(),Xyt=Y5e(),ebt=X5e(),tbt=txe(),rbt=uf(),nbt=oxe(),ibt=axe(),obt=qO(),sbt=fxe(),abt=dxe(),cbt=YE(),lbt=HO(),ubt=UZ(),fbt=DZ(),hbt=zO(),dbt=WO(),pbt=jZ(),mbt=Cxe(),gbt=JE(),wbt=ff(),vbt=e9(),ybt=Fxe(),bbt=Dxe(),xbt=$xe(),Cbt=zxe(),Ebt=Vxe(),Abt=GO(),Sbt=Jxe(),_bt=e7e(),Ibt=n7e(),Tbt=o7e(),kbt=f7e();p7e.exports={parse:Kyt,valid:Gyt,clean:Qyt,inc:Zyt,diff:Yyt,major:Jyt,minor:Xyt,patch:ebt,prerelease:tbt,compare:rbt,rcompare:nbt,compareLoose:ibt,compareBuild:obt,sort:sbt,rsort:abt,gt:cbt,lt:lbt,eq:ubt,neq:fbt,gte:hbt,lte:dbt,cmp:pbt,coerce:mbt,Comparator:gbt,Range:wbt,satisfies:vbt,toComparators:ybt,maxSatisfying:bbt,minSatisfying:xbt,minVersion:Cbt,validRange:Ebt,outside:Abt,gtr:Sbt,ltr:_bt,intersects:Ibt,simplifyRange:Tbt,subset:kbt,SemVer:Vyt,re:YZ.re,src:YZ.src,tokens:YZ.t,SEMVER_SPEC_VERSION:h7e.SEMVER_SPEC_VERSION,RELEASE_TYPES:h7e.RELEASE_TYPES,compareIdentifiers:d7e.compareIdentifiers,rcompareIdentifiers:d7e.rcompareIdentifiers}});var w7e=X(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.satisfiesVersionRange=to.gtRange=to.gtVersion=to.assertIsSemVerRange=to.assertIsSemVerVersion=to.isValidSemVerRange=to.isValidSemVerVersion=to.VersionRangeStruct=to.VersionStruct=void 0;var r9=m7e(),f5=t2(),g7e=S1();to.VersionStruct=(0,f5.refine)((0,f5.string)(),"Version",t=>(0,r9.valid)(t)===null?`Expected SemVer version, got "${t}"`:!0);to.VersionRangeStruct=(0,f5.refine)((0,f5.string)(),"Version range",t=>(0,r9.validRange)(t)===null?`Expected SemVer range, got "${t}"`:!0);function Rbt(t){return(0,f5.is)(t,to.VersionStruct)}to.isValidSemVerVersion=Rbt;function Mbt(t){return(0,f5.is)(t,to.VersionRangeStruct)}to.isValidSemVerRange=Mbt;function Nbt(t){(0,g7e.assertStruct)(t,to.VersionStruct)}to.assertIsSemVerVersion=Nbt;function Pbt(t){(0,g7e.assertStruct)(t,to.VersionRangeStruct)}to.assertIsSemVerRange=Pbt;function Obt(t,e){return(0,r9.gt)(t,e)}to.gtVersion=Obt;function Bbt(t,e){return(0,r9.gtr)(t,e)}to.gtRange=Bbt;function Lbt(t,e){return(0,r9.satisfies)(t,e,{includePrerelease:!0})}to.satisfiesVersionRange=Lbt});var v7e=X(mo=>{"use strict";var Fbt=mo&&mo.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),pa=mo&&mo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Fbt(e,t,r)};Object.defineProperty(mo,"__esModule",{value:!0});pa(S1(),mo);pa(RZ(),mo);pa(PZ(),mo);pa(X4e(),mo);pa(r5e(),mo);pa(i5e(),mo);pa(s5e(),mo);pa(WE(),mo);pa(a5e(),mo);pa(l5e(),mo);pa(m5e(),mo);pa(w5e(),mo);pa(v5e(),mo);pa(b5e(),mo);pa(C5e(),mo);pa(A5e(),mo);pa(w7e(),mo)});var b7e=X(h5=>{"use strict";Object.defineProperty(h5,"__esModule",{value:!0});h5.createModuleLogger=h5.projectLogger=void 0;var y7e=v7e();Object.defineProperty(h5,"createModuleLogger",{enumerable:!0,get:function(){return y7e.createModuleLogger}});h5.projectLogger=(0,y7e.createProjectLogger)("eth-block-tracker")});var S7e=X(d5=>{"use strict";var A7e=d5&&d5.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(d5,"__esModule",{value:!0});d5.PollingBlockTracker=void 0;var Ubt=A7e(RO()),Dbt=A7e(O4e()),jbt=kZ(),x7e=b7e(),C7e=(0,x7e.createModuleLogger)(x7e.projectLogger,"polling-block-tracker"),$bt=(0,Ubt.default)(),qbt=1e3,JZ=class extends jbt.BaseBlockTracker{constructor(e={}){var r;if(!e.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},e),{blockResetDuration:(r=e.blockResetDuration)!==null&&r!==void 0?r:e.pollingInterval})),this._provider=e.provider,this._pollingInterval=e.pollingInterval||20*qbt,this._retryTimeout=e.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=e.keepEventLoopActive===void 0?!0:e.keepEventLoopActive,this._setSkipCacheFlag=e.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var e;this._isRunning;)try{await this._updateLatestBlock();let r=E7e(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){let n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: ${(e=r.stack)!==null&&e!==void 0?e:r}`);try{this.emit("error",n)}catch{console.error(n)}let i=E7e(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await i}}async _updateLatestBlock(){let e=await this._fetchLatestBlock();this._newPotentialLatest(e)}async _fetchLatestBlock(){let e={jsonrpc:"2.0",id:$bt(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(e.skipCache=!0),C7e("Making request",e);let r=await(0,Dbt.default)(n=>this._provider.sendAsync(e,n))();if(C7e("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block: ${r.error.message}`);return r.result}};d5.PollingBlockTracker=JZ;function E7e(t,e){return new Promise(r=>{let n=setTimeout(r,t);n.unref&&e&&n.unref()})}});var _7e=X(p5=>{"use strict";var Hbt=p5&&p5.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(p5,"__esModule",{value:!0});p5.SubscribeBlockTracker=void 0;var zbt=Hbt(RO()),Wbt=kZ(),Vbt=(0,zbt.default)(),XZ=class extends Wbt.BaseBlockTracker{constructor(e={}){if(!e.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(e),this._provider=e.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{let e=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(e)}catch(e){this.emit("error",e)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(e){this.emit("error",e)}}_call(e,...r){return new Promise((n,i)=>{this._provider.sendAsync({id:Vbt(),method:e,params:r,jsonrpc:"2.0"},(o,s)=>{o?i(o):n(s.result)})})}_handleSubData(e,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}};p5.SubscribeBlockTracker=XZ});var T7e=X(i2=>{"use strict";var Kbt=i2&&i2.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),I7e=i2&&i2.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Kbt(e,t,r)};Object.defineProperty(i2,"__esModule",{value:!0});I7e(S7e(),i2);I7e(_7e(),i2)});var tY=X(QO=>{"use strict";Object.defineProperty(QO,"__esModule",{value:!0});QO.getUniqueId=void 0;var k7e=4294967295,eY=Math.floor(Math.random()*k7e);function Gbt(){return eY=(eY+1)%k7e,eY}QO.getUniqueId=Gbt});var R7e=X(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:!0});ZO.createIdRemapMiddleware=void 0;var Qbt=tY();function Zbt(){return(t,e,r,n)=>{let i=t.id,o=Qbt.getUniqueId();t.id=o,e.id=o,r(s=>{t.id=i,e.id=i,s()})}}ZO.createIdRemapMiddleware=Zbt});var M7e=X(YO=>{"use strict";Object.defineProperty(YO,"__esModule",{value:!0});YO.createAsyncMiddleware=void 0;function Ybt(t){return async(e,r,n,i)=>{let o,s=new Promise(d=>{o=d}),c=null,l=!1,u=async()=>{l=!0,n(d=>{c=d,o()}),await s};try{await t(e,r,u),l?(await s,c(null)):i(null)}catch(d){c?c(d):i(d)}}}YO.createAsyncMiddleware=Ybt});var N7e=X(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:!0});JO.createScaffoldMiddleware=void 0;function Jbt(t){return(e,r,n,i)=>{let o=t[e.method];return o===void 0?n():typeof o=="function"?o(e,r,n,i):(r.result=o,i())}}JO.createScaffoldMiddleware=Jbt});var O7e=X(nY=>{"use strict";Object.defineProperty(nY,"__esModule",{value:!0});var Xbt=Hh();function P7e(t,e,r){try{Reflect.apply(t,e,r)}catch(n){setTimeout(()=>{throw n})}}function e6t(t){let e=t.length,r=new Array(e);for(let n=0;n0&&([s]=r),s instanceof Error)throw s;let c=new Error(`Unhandled error.${s?` (${s.message})`:""}`);throw c.context=s,c}let o=i[e];if(o===void 0)return!1;if(typeof o=="function")P7e(o,this,r);else{let s=o.length,c=e6t(o);for(let l=0;l{D7e.exports=n9;n9.default=n9;n9.stable=F7e;n9.stableStringify=F7e;var XO="[...]",B7e="[Circular]",Cv=[],xv=[];function L7e(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function n9(t,e,r,n){typeof n>"u"&&(n=L7e()),iY(t,"",0,[],void 0,0,n);var i;try{xv.length===0?i=JSON.stringify(t,e,r):i=JSON.stringify(t,U7e(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Cv.length!==0;){var o=Cv.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function m5(t,e,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:t}),Cv.push([n,r,e,i])):xv.push([e,r,t]):(n[r]=t,Cv.push([n,r,e]))}function iY(t,e,r,n,i,o,s){o+=1;var c;if(typeof t=="object"&&t!==null){for(c=0;cs.depthLimit){m5(XO,t,e,i);return}if(typeof s.edgesLimit<"u"&&r+1>s.edgesLimit){m5(XO,t,e,i);return}if(n.push(t),Array.isArray(t))for(c=0;ce?1:0}function F7e(t,e,r,n){typeof n>"u"&&(n=L7e());var i=oY(t,"",0,[],void 0,0,n)||t,o;try{xv.length===0?o=JSON.stringify(i,e,r):o=JSON.stringify(i,U7e(e),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Cv.length!==0;){var s=Cv.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function oY(t,e,r,n,i,o,s){o+=1;var c;if(typeof t=="object"&&t!==null){for(c=0;cs.depthLimit){m5(XO,t,e,i);return}if(typeof s.edgesLimit<"u"&&r+1>s.edgesLimit){m5(XO,t,e,i);return}if(n.push(t),Array.isArray(t))for(c=0;c0)for(var n=0;n{"use strict";Object.defineProperty(g5,"__esModule",{value:!0});g5.EthereumProviderError=g5.EthereumRpcError=void 0;var r6t=j7e(),eB=class extends Error{constructor(e,r,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=e,n!==void 0&&(this.data=n)}serialize(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return r6t.default(this.serialize(),i6t,2)}};g5.EthereumRpcError=eB;var sY=class extends eB{constructor(e,r,n){if(!n6t(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,r,n)}};g5.EthereumProviderError=sY;function n6t(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function i6t(t,e){if(e!=="[Circular]")return e}});var rB=X(w5=>{"use strict";Object.defineProperty(w5,"__esModule",{value:!0});w5.errorValues=w5.errorCodes=void 0;w5.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};w5.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}});var lY=X(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.serializeError=y0.isValidCode=y0.getMessageFromCode=y0.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var nB=rB(),o6t=tB(),$7e=nB.errorCodes.rpc.internal,s6t="Unspecified error message. This is a bug, please report it.",a6t={code:$7e,message:cY($7e)};y0.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function cY(t,e=s6t){if(Number.isInteger(t)){let r=t.toString();if(aY(nB.errorValues,r))return nB.errorValues[r].message;if(z7e(t))return y0.JSON_RPC_SERVER_ERROR_MESSAGE}return e}y0.getMessageFromCode=cY;function H7e(t){if(!Number.isInteger(t))return!1;let e=t.toString();return!!(nB.errorValues[e]||z7e(t))}y0.isValidCode=H7e;function c6t(t,{fallbackError:e=a6t,shouldIncludeStack:r=!1}={}){var n,i;if(!e||!Number.isInteger(e.code)||typeof e.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof o6t.EthereumRpcError)return t.serialize();let o={};if(t&&typeof t=="object"&&!Array.isArray(t)&&aY(t,"code")&&H7e(t.code)){let c=t;o.code=c.code,c.message&&typeof c.message=="string"?(o.message=c.message,aY(c,"data")&&(o.data=c.data)):(o.message=cY(o.code),o.data={originalError:q7e(t)})}else{o.code=e.code;let c=(n=t)===null||n===void 0?void 0:n.message;o.message=c&&typeof c=="string"?c:e.message,o.data={originalError:q7e(t)}}let s=(i=t)===null||i===void 0?void 0:i.stack;return r&&t&&s&&typeof s=="string"&&(o.stack=s),o}y0.serializeError=c6t;function z7e(t){return t>=-32099&&t<=-32e3}function q7e(t){return t&&typeof t=="object"&&!Array.isArray(t)?Object.assign({},t):t}function aY(t,e){return Object.prototype.hasOwnProperty.call(t,e)}});var K7e=X(iB=>{"use strict";Object.defineProperty(iB,"__esModule",{value:!0});iB.ethErrors=void 0;var uY=tB(),W7e=lY(),qa=rB();iB.ethErrors={rpc:{parse:t=>hf(qa.errorCodes.rpc.parse,t),invalidRequest:t=>hf(qa.errorCodes.rpc.invalidRequest,t),invalidParams:t=>hf(qa.errorCodes.rpc.invalidParams,t),methodNotFound:t=>hf(qa.errorCodes.rpc.methodNotFound,t),internal:t=>hf(qa.errorCodes.rpc.internal,t),server:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");let{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return hf(e,t)},invalidInput:t=>hf(qa.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>hf(qa.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>hf(qa.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>hf(qa.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>hf(qa.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>hf(qa.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>i9(qa.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>i9(qa.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>i9(qa.errorCodes.provider.unsupportedMethod,t),disconnected:t=>i9(qa.errorCodes.provider.disconnected,t),chainDisconnected:t=>i9(qa.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");let{code:e,message:r,data:n}=t;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new uY.EthereumProviderError(e,r,n)}}};function hf(t,e){let[r,n]=V7e(e);return new uY.EthereumRpcError(t,r||W7e.getMessageFromCode(t),n)}function i9(t,e){let[r,n]=V7e(e);return new uY.EthereumProviderError(t,r||W7e.getMessageFromCode(t),n)}function V7e(t){if(t){if(typeof t=="string")return[t];if(typeof t=="object"&&!Array.isArray(t)){let{message:e,data:r}=t;if(e&&typeof e!="string")throw new Error("Must specify string message.");return[e||void 0,r]}}return[]}});var Z7e=X(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.getMessageFromCode=ul.serializeError=ul.EthereumProviderError=ul.EthereumRpcError=ul.ethErrors=ul.errorCodes=void 0;var G7e=tB();Object.defineProperty(ul,"EthereumRpcError",{enumerable:!0,get:function(){return G7e.EthereumRpcError}});Object.defineProperty(ul,"EthereumProviderError",{enumerable:!0,get:function(){return G7e.EthereumProviderError}});var Q7e=lY();Object.defineProperty(ul,"serializeError",{enumerable:!0,get:function(){return Q7e.serializeError}});Object.defineProperty(ul,"getMessageFromCode",{enumerable:!0,get:function(){return Q7e.getMessageFromCode}});var l6t=K7e();Object.defineProperty(ul,"ethErrors",{enumerable:!0,get:function(){return l6t.ethErrors}});var u6t=rB();Object.defineProperty(ul,"errorCodes",{enumerable:!0,get:function(){return u6t.errorCodes}})});var dY=X(v5=>{"use strict";var f6t=v5&&v5.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(v5,"__esModule",{value:!0});v5.JsonRpcEngine=void 0;var h6t=f6t(O7e()),df=Z7e(),hY=class t extends h6t.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?r?this._handleBatch(e,r):this._handleBatch(e):r?this._handle(e,r):this._promiseHandle(e)}asMiddleware(){return async(e,r,n,i)=>{try{let[o,s,c]=await t._runAllMiddleware(e,r,this._middleware);return s?(await t._runReturnHandlers(c),i(o)):n(async l=>{try{await t._runReturnHandlers(c)}catch(u){return l(u)}return l()})}catch(o){return i(o)}}}async _handleBatch(e,r){try{let n=await Promise.all(e.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(e){return new Promise(r=>{this._handle(e,(n,i)=>{r(i)})})}async _handle(e,r){if(!e||Array.isArray(e)||typeof e!="object"){let s=new df.EthereumRpcError(df.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof e}`,{request:e});return r(s,{id:void 0,jsonrpc:"2.0",error:s})}if(typeof e.method!="string"){let s=new df.EthereumRpcError(df.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof e.method}`,{request:e});return r(s,{id:e.id,jsonrpc:"2.0",error:s})}let n=Object.assign({},e),i={id:n.id,jsonrpc:n.jsonrpc},o=null;try{await this._processRequest(n,i)}catch(s){o=s}return o&&(delete i.result,i.error||(i.error=df.serializeError(o))),r(o,i)}async _processRequest(e,r){let[n,i,o]=await t._runAllMiddleware(e,r,this._middleware);if(t._checkForCompletion(e,r,i),await t._runReturnHandlers(o),n)throw n}static async _runAllMiddleware(e,r,n){let i=[],o=null,s=!1;for(let c of n)if([o,s]=await t._runMiddleware(e,r,c,i),s)break;return[o,s,i.reverse()]}static _runMiddleware(e,r,n,i){return new Promise(o=>{let s=l=>{let u=l||r.error;u&&(r.error=df.serializeError(u)),o([u,!0])},c=l=>{r.error?s(r.error):(l&&(typeof l!="function"&&s(new df.EthereumRpcError(df.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof l}" for request: ${fY(e)}`,{request:e})),i.push(l)),o([null,!1]))};try{n(e,r,c,s)}catch(l){s(l)}})}static async _runReturnHandlers(e){for(let r of e)await new Promise((n,i)=>{r(o=>o?i(o):n())})}static _checkForCompletion(e,r,n){if(!("result"in r)&&!("error"in r))throw new df.EthereumRpcError(df.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request: ${fY(e)}`,{request:e});if(!n)throw new df.EthereumRpcError(df.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request: ${fY(e)}`,{request:e})}};v5.JsonRpcEngine=hY;function fY(t){return JSON.stringify(t,null,2)}});var Y7e=X(oB=>{"use strict";Object.defineProperty(oB,"__esModule",{value:!0});oB.mergeMiddleware=void 0;var d6t=dY();function p6t(t){let e=new d6t.JsonRpcEngine;return t.forEach(r=>e.push(r)),e.asMiddleware()}oB.mergeMiddleware=p6t});var pY=X(pf=>{"use strict";var m6t=pf&&pf.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),y5=pf&&pf.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&m6t(e,t,r)};Object.defineProperty(pf,"__esModule",{value:!0});y5(R7e(),pf);y5(M7e(),pf);y5(N7e(),pf);y5(tY(),pf);y5(dY(),pf);y5(Y7e(),pf)});var lB={};Hr(lB,{__addDisposableResource:()=>v8e,__assign:()=>sB,__asyncDelegator:()=>u8e,__asyncGenerator:()=>l8e,__asyncValues:()=>f8e,__await:()=>b5,__awaiter:()=>n8e,__classPrivateFieldGet:()=>m8e,__classPrivateFieldIn:()=>w8e,__classPrivateFieldSet:()=>g8e,__createBinding:()=>cB,__decorate:()=>e8e,__disposeResources:()=>y8e,__esDecorate:()=>g6t,__exportStar:()=>o8e,__extends:()=>J7e,__generator:()=>i8e,__importDefault:()=>p8e,__importStar:()=>d8e,__makeTemplateObject:()=>h8e,__metadata:()=>r8e,__param:()=>t8e,__propKey:()=>v6t,__read:()=>gY,__rest:()=>X7e,__runInitializers:()=>w6t,__setFunctionName:()=>y6t,__spread:()=>s8e,__spreadArray:()=>c8e,__spreadArrays:()=>a8e,__values:()=>aB,default:()=>C6t});function J7e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");mY(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function X7e(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i=0;c--)(s=t[c])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function t8e(t,e){return function(r,n){e(r,n,t)}}function g6t(t,e,r,n,i,o){function s(k){if(k!==void 0&&typeof k!="function")throw new TypeError("Function expected");return k}for(var c=n.kind,l=c==="getter"?"get":c==="setter"?"set":"value",u=!e&&t?n.static?t:t.prototype:null,d=e||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p,v=!1,y=r.length-1;y>=0;y--){var _={};for(var R in n)_[R]=R==="access"?{}:n[R];for(var R in n.access)_.access[R]=n.access[R];_.addInitializer=function(k){if(v)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(k||null))};var P=(0,r[y])(c==="accessor"?{get:d.get,set:d.set}:d[l],_);if(c==="accessor"){if(P===void 0)continue;if(P===null||typeof P!="object")throw new TypeError("Object expected");(p=s(P.get))&&(d.get=p),(p=s(P.set))&&(d.set=p),(p=s(P.init))&&i.unshift(p)}else(p=s(P))&&(c==="field"?i.unshift(p):d[l]=p)}u&&Object.defineProperty(u,n.name,d),v=!0}function w6t(t,e,r){for(var n=arguments.length>2,i=0;i0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gY(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function s8e(){for(var t=[],e=0;e1||l(y,R)})},_&&(i[y]=_(i[y])))}function l(y,_){try{u(n[y](_))}catch(R){v(o[0][3],R)}}function u(y){y.value instanceof b5?Promise.resolve(y.value.v).then(d,p):v(o[0][2],y)}function d(y){l("next",y)}function p(y){l("throw",y)}function v(y,_){y(_),o.shift(),o.length&&l(o[0][0],o[0][1])}}function u8e(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(s){return(r=!r)?{value:b5(t[i](s)),done:!1}:o?o(s):s}:o}}function f8e(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof aB=="function"?aB(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(s){return new Promise(function(c,l){s=t[o](s),i(c,l,s.done,s.value)})}}function i(o,s,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},s)}}function h8e(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function d8e(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cB(e,t,r);return b6t(e,t),e}function p8e(t){return t&&t.__esModule?t:{default:t}}function m8e(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function g8e(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function w8e(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function v8e(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}function y8e(t){function e(o){t.error=t.hasError?new x6t(o,t.error,"An error was suppressed during disposal."):o,t.hasError=!0}var r,n=0;function i(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,function(s){return e(s),i()})}else n|=1}catch(s){e(s)}if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return i()}var mY,sB,cB,b6t,x6t,C6t,uB=F(()=>{mY=function(t,e){return mY=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},mY(t,e)};sB=function(){return sB=Object.assign||function(e){for(var r,n=1,i=arguments.length;n{"use strict";Object.defineProperty(wY,"__esModule",{value:!0});var b8e=(uB(),Vn(lB)),E6t=function(){function t(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return t.prototype.acquire=function(){var e=this,r=this.isLocked(),n=new Promise(function(i){return e._queue.push(i)});return r||this._dispatch(),n},t.prototype.runExclusive=function(e){return b8e.__awaiter(this,void 0,void 0,function(){var r,n,i;return b8e.__generator(this,function(o){switch(o.label){case 0:return[4,this.acquire()];case 1:r=o.sent(),n=r[0],i=r[1],o.label=2;case 2:return o.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,o.sent()];case 4:return i(),[7];case 5:return[2]}})})},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var e=this._currentReleaser;this._currentReleaser=void 0,e()}},t.prototype._dispatch=function(){var e=this,r=this._queue.shift();if(r){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},r([this._value--,this._currentReleaser])}},t}();wY.default=E6t});var C8e=X(yY=>{"use strict";Object.defineProperty(yY,"__esModule",{value:!0});var x8e=(uB(),Vn(lB)),A6t=vY(),S6t=function(){function t(){this._semaphore=new A6t.default(1)}return t.prototype.acquire=function(){return x8e.__awaiter(this,void 0,void 0,function(){var e,r;return x8e.__generator(this,function(n){switch(n.label){case 0:return[4,this._semaphore.acquire()];case 1:return e=n.sent(),r=e[1],[2,r]}})})},t.prototype.runExclusive=function(e){return this._semaphore.runExclusive(function(){return e()})},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();yY.default=S6t});var E8e=X(hB=>{"use strict";Object.defineProperty(hB,"__esModule",{value:!0});hB.withTimeout=void 0;var fB=(uB(),Vn(lB));function _6t(t,e,r){var n=this;return r===void 0&&(r=new Error("timeout")),{acquire:function(){return new Promise(function(i,o){return fB.__awaiter(n,void 0,void 0,function(){var s,c,l;return fB.__generator(this,function(u){switch(u.label){case 0:return s=!1,setTimeout(function(){s=!0,o(r)},e),[4,t.acquire()];case 1:return c=u.sent(),s?(l=Array.isArray(c)?c[1]:c,l()):i(c),[2]}})})})},runExclusive:function(i){return fB.__awaiter(this,void 0,void 0,function(){var o,s;return fB.__generator(this,function(c){switch(c.label){case 0:o=function(){},c.label=1;case 1:return c.trys.push([1,,7,8]),[4,this.acquire()];case 2:return s=c.sent(),Array.isArray(s)?(o=s[1],[4,i(s[0])]):[3,4];case 3:return[2,c.sent()];case 4:return o=s,[4,i()];case 5:return[2,c.sent()];case 6:return[3,8];case 7:return o(),[7];case 8:return[2]}})})},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}hB.withTimeout=_6t});var A8e=X(o2=>{"use strict";Object.defineProperty(o2,"__esModule",{value:!0});o2.withTimeout=o2.Semaphore=o2.Mutex=void 0;var I6t=C8e();Object.defineProperty(o2,"Mutex",{enumerable:!0,get:function(){return I6t.default}});var T6t=vY();Object.defineProperty(o2,"Semaphore",{enumerable:!0,get:function(){return T6t.default}});var k6t=E8e();Object.defineProperty(o2,"withTimeout",{enumerable:!0,get:function(){return k6t.withTimeout}})});var _8e=X((p7r,S8e)=>{S8e.exports=M6t;var R6t=Object.prototype.hasOwnProperty;function M6t(){for(var t={},e=0;e{var N6t=_8e(),P6t=RO()();I8e.exports=$r;function $r(t){let e=this;e.currentProvider=t}$r.prototype.getBalance=o9(2,"eth_getBalance");$r.prototype.getCode=o9(2,"eth_getCode");$r.prototype.getTransactionCount=o9(2,"eth_getTransactionCount");$r.prototype.getStorageAt=o9(3,"eth_getStorageAt");$r.prototype.call=o9(2,"eth_call");$r.prototype.protocolVersion=yn("eth_protocolVersion");$r.prototype.syncing=yn("eth_syncing");$r.prototype.coinbase=yn("eth_coinbase");$r.prototype.mining=yn("eth_mining");$r.prototype.hashrate=yn("eth_hashrate");$r.prototype.gasPrice=yn("eth_gasPrice");$r.prototype.accounts=yn("eth_accounts");$r.prototype.blockNumber=yn("eth_blockNumber");$r.prototype.getBlockTransactionCountByHash=yn("eth_getBlockTransactionCountByHash");$r.prototype.getBlockTransactionCountByNumber=yn("eth_getBlockTransactionCountByNumber");$r.prototype.getUncleCountByBlockHash=yn("eth_getUncleCountByBlockHash");$r.prototype.getUncleCountByBlockNumber=yn("eth_getUncleCountByBlockNumber");$r.prototype.sign=yn("eth_sign");$r.prototype.sendTransaction=yn("eth_sendTransaction");$r.prototype.sendRawTransaction=yn("eth_sendRawTransaction");$r.prototype.estimateGas=yn("eth_estimateGas");$r.prototype.getBlockByHash=yn("eth_getBlockByHash");$r.prototype.getBlockByNumber=yn("eth_getBlockByNumber");$r.prototype.getTransactionByHash=yn("eth_getTransactionByHash");$r.prototype.getTransactionByBlockHashAndIndex=yn("eth_getTransactionByBlockHashAndIndex");$r.prototype.getTransactionByBlockNumberAndIndex=yn("eth_getTransactionByBlockNumberAndIndex");$r.prototype.getTransactionReceipt=yn("eth_getTransactionReceipt");$r.prototype.getUncleByBlockHashAndIndex=yn("eth_getUncleByBlockHashAndIndex");$r.prototype.getUncleByBlockNumberAndIndex=yn("eth_getUncleByBlockNumberAndIndex");$r.prototype.getCompilers=yn("eth_getCompilers");$r.prototype.compileLLL=yn("eth_compileLLL");$r.prototype.compileSolidity=yn("eth_compileSolidity");$r.prototype.compileSerpent=yn("eth_compileSerpent");$r.prototype.newFilter=yn("eth_newFilter");$r.prototype.newBlockFilter=yn("eth_newBlockFilter");$r.prototype.newPendingTransactionFilter=yn("eth_newPendingTransactionFilter");$r.prototype.uninstallFilter=yn("eth_uninstallFilter");$r.prototype.getFilterChanges=yn("eth_getFilterChanges");$r.prototype.getFilterLogs=yn("eth_getFilterLogs");$r.prototype.getLogs=yn("eth_getLogs");$r.prototype.getWork=yn("eth_getWork");$r.prototype.submitWork=yn("eth_submitWork");$r.prototype.submitHashrate=yn("eth_submitHashrate");$r.prototype.sendAsync=function(t,e){this.currentProvider.sendAsync(O6t(t),function(n,i){if(!n&&i.error&&(n=new Error("EthQuery - RPC Error - "+i.error.message)),n)return e(n);e(null,i.result)})};function yn(t){return function(){let e=this;var r=[].slice.call(arguments),n=r.pop();e.sendAsync({method:t,params:r},n)}}function o9(t,e){return function(){let r=this;var n=[].slice.call(arguments),i=n.pop();n.length{"use strict";var k8e=(t,e,r,n)=>function(...i){let o=e.promiseModule;return new o((s,c)=>{e.multiArgs?i.push((...u)=>{e.errorFirst?u[0]?c(u):(u.shift(),s(u)):s(u)}):e.errorFirst?i.push((u,d)=>{u?c(u):s(d)}):i.push(s),Reflect.apply(t,this===r?n:this,i)})},R8e=new WeakMap;M8e.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};let r=typeof t;if(!(t!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${t===null?"null":r}\``);let n=(s,c)=>{let l=R8e.get(s);if(l||(l={},R8e.set(s,l)),c in l)return l[c];let u=_=>typeof _=="string"||typeof c=="symbol"?c===_:_.test(c),d=Reflect.getOwnPropertyDescriptor(s,c),p=d===void 0||d.writable||d.configurable,y=(e.include?e.include.some(u):!e.exclude.some(u))&&p;return l[c]=y,y},i=new WeakMap,o=new Proxy(t,{apply(s,c,l){let u=i.get(s);if(u)return Reflect.apply(u,c,l);let d=e.excludeMain?s:k8e(s,e,o,s);return i.set(s,d),Reflect.apply(d,c,l)},get(s,c){let l=s[c];if(!n(s,c)||l===Function.prototype[c])return l;let u=i.get(l);if(u)return u;if(typeof l=="function"){let d=k8e(l,e,o,s);return i.set(l,d),d}return l}});return o}});var dB=X((w7r,P8e)=>{var B6t=MO().default,bY=class extends B6t{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(e){this.updates=this.updates.concat(e),e.forEach(r=>this.emit("update",r))}addInitialResults(e){}getChangesAndClear(){let e=this.updates;return this.updates=[],e}};P8e.exports=bY});var B8e=X((v7r,O8e)=>{var L6t=dB(),xY=class extends L6t{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(e){this.allResults=this.allResults.concat(e),super.addResults(e)}addInitialResults(e){this.allResults=this.allResults.concat(e),super.addInitialResults(e)}getAllResults(){return this.allResults}};O8e.exports=xY});var x5=X((y7r,U8e)=>{U8e.exports={minBlockRef:F6t,maxBlockRef:U6t,sortBlockRefs:CY,bnToHex:D6t,blockRefIsNumber:j6t,hexToInt:pB,incrementHexInt:$6t,intToHex:F8e,unsafeRandomBytes:q6t};function F6t(...t){return CY(t)[0]}function U6t(...t){let e=CY(t);return e[e.length-1]}function CY(t){return t.sort((e,r)=>e==="latest"||r==="earliest"?1:r==="latest"||e==="earliest"?-1:pB(e)-pB(r))}function D6t(t){return"0x"+t.toString(16)}function j6t(t){return t&&!["earliest","latest","pending"].includes(t)}function pB(t){return t==null?t:Number.parseInt(t,16)}function $6t(t){if(t==null)return t;let e=pB(t);return F8e(e+1)}function F8e(t){if(t==null)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function q6t(t){let e="0x";for(let r=0;r{var H6t=T8e(),z6t=N8e(),W6t=B8e(),{bnToHex:b7r,hexToInt:mB,incrementHexInt:V6t,minBlockRef:K6t,blockRefIsNumber:G6t}=x5(),EY=class extends W6t{constructor({provider:e,params:r}){super(),this.type="log",this.ethQuery=new H6t(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},r),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(n=>n.toLowerCase()))}async initialize({currentBlock:e}){let r=this.params.fromBlock;["latest","pending"].includes(r)&&(r=e),r==="earliest"&&(r="0x0"),this.params.fromBlock=r;let n=K6t(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:n}),o=await this._fetchLogs(i);this.addInitialResults(o)}async update({oldBlock:e,newBlock:r}){let n=r,i;e?i=V6t(e):i=r;let o=Object.assign({},this.params,{fromBlock:i,toBlock:n}),c=(await this._fetchLogs(o)).filter(l=>this.matchLog(l));this.addResults(c)}async _fetchLogs(e){return await z6t(n=>this.ethQuery.getLogs(e,n))()}matchLog(e){if(mB(this.params.fromBlock)>=mB(e.blockNumber)||G6t(this.params.toBlock)&&mB(this.params.toBlock)<=mB(e.blockNumber))return!1;let r=e.address&&e.address.toLowerCase();return this.params.address&&r&&!this.params.address.includes(r)?!1:this.params.topics.every((i,o)=>{let s=e.topics[o];if(!s)return!1;s=s.toLowerCase();let c=Array.isArray(i)?i:[i];return c.includes(null)?!0:(c=c.map(d=>d.toLowerCase()),c.includes(s))})}};D8e.exports=EY});var gB=X((C7r,q8e)=>{q8e.exports=Q6t;async function Q6t({provider:t,fromBlock:e,toBlock:r}){e||(e=r);let n=$8e(e),o=$8e(r)-n+1,s=Array(o).fill().map((l,u)=>n+u).map(Z6t),c=await Promise.all(s.map(l=>J6t(t,"eth_getBlockByNumber",[l,!1])));return c=c.filter(l=>l!==null),c}function $8e(t){return t==null?t:Number.parseInt(t,16)}function Z6t(t){return t==null?t:"0x"+t.toString(16)}function Y6t(t,e){return new Promise((r,n)=>{t.sendAsync(e,(i,o)=>{i?n(i):o.error?n(o.error):o.result?r(o.result):n(new Error("Result was empty"))})})}async function J6t(t,e,r){for(let n=0;n<3;n++)try{return await Y6t(t,{id:1,jsonrpc:"2.0",method:e,params:r})}catch(i){console.error(`provider.sendAsync failed: ${i.stack||i.message||i}`)}return null}});var z8e=X((E7r,H8e)=>{var X6t=dB(),e4t=gB(),{incrementHexInt:t4t}=x5(),AY=class extends X6t{constructor({provider:e,params:r}){super(),this.type="block",this.provider=e}async update({oldBlock:e,newBlock:r}){let n=r,i=t4t(e),s=(await e4t({provider:this.provider,fromBlock:i,toBlock:n})).map(c=>c.hash);this.addResults(s)}};H8e.exports=AY});var V8e=X((A7r,W8e)=>{var r4t=dB(),n4t=gB(),{incrementHexInt:i4t}=x5(),SY=class extends r4t{constructor({provider:e}){super(),this.type="tx",this.provider=e}async update({oldBlock:e}){let r=e,n=i4t(e),i=await n4t({provider:this.provider,fromBlock:n,toBlock:r}),o=[];for(let s of i)o.push(...s.transactions);this.addResults(o)}};W8e.exports=SY});var Q8e=X((S7r,G8e)=>{var o4t=A8e().Mutex,{createAsyncMiddleware:s4t,createScaffoldMiddleware:a4t}=pY(),c4t=j8e(),l4t=z8e(),u4t=V8e(),{intToHex:K8e,hexToInt:_Y}=x5();G8e.exports=f4t;function f4t({blockTracker:t,provider:e}){let r=0,n={},i=new o4t,o=h4t({mutex:i}),s=a4t({eth_newFilter:o(IY(l)),eth_newBlockFilter:o(IY(u)),eth_newPendingTransactionFilter:o(IY(d)),eth_uninstallFilter:o(wB(y)),eth_getFilterChanges:o(wB(p)),eth_getFilterLogs:o(wB(v))}),c=async({oldBlock:M,newBlock:L})=>{if(n.length===0)return;let D=await i.acquire();try{await Promise.all(C5(n).map(async j=>{try{await j.update({oldBlock:M,newBlock:L})}catch(V){console.error(V)}}))}catch(j){console.error(j)}D()};return s.newLogFilter=l,s.newBlockFilter=u,s.newPendingTransactionFilter=d,s.uninstallFilter=y,s.getFilterChanges=p,s.getFilterLogs=v,s.destroy=()=>{P()},s;async function l(M){let L=new c4t({provider:e,params:M}),D=await _(L);return L}async function u(){let M=new l4t({provider:e}),L=await _(M);return M}async function d(){let M=new u4t({provider:e}),L=await _(M);return M}async function p(M){let L=_Y(M),D=n[L];if(!D)throw new Error(`No filter for index "${L}"`);return D.getChangesAndClear()}async function v(M){let L=_Y(M),D=n[L];if(!D)throw new Error(`No filter for index "${L}"`);let j=[];return D.type==="log"&&(j=D.getAllResults()),j}async function y(M){let L=_Y(M),j=!!n[L];return j&&await R(L),j}async function _(M){let L=C5(n).length,D=await t.getLatestBlock();await M.initialize({currentBlock:D}),r++,n[r]=M,M.id=r,M.idHex=K8e(r);let j=C5(n).length;return k({prevFilterCount:L,newFilterCount:j}),r}async function R(M){let L=C5(n).length;delete n[M];let D=C5(n).length;k({prevFilterCount:L,newFilterCount:D})}async function P(){let M=C5(n).length;n={},k({prevFilterCount:M,newFilterCount:0})}function k({prevFilterCount:M,newFilterCount:L}){if(M===0&&L>0){t.on("sync",c);return}if(M>0&&L===0){t.removeListener("sync",c);return}}}function IY(t){return wB(async(...e)=>{let r=await t(...e);return K8e(r.id)})}function wB(t){return s4t(async(e,r)=>{let n=await t.apply(null,e.params);r.result=n})}function h4t({mutex:t}){return e=>async(r,n,i,o)=>{(await t.acquire())(),e(r,n,i,o)}}function C5(t,e){let r=[];for(let n in t)r.push(t[n]);return r}});var J8e=X((_7r,Y8e)=>{var d4t=MO().default,{createAsyncMiddleware:Z8e,createScaffoldMiddleware:p4t}=pY(),m4t=Q8e(),{unsafeRandomBytes:g4t,incrementHexInt:w4t}=x5(),v4t=gB();Y8e.exports=y4t;function y4t({blockTracker:t,provider:e}){let r={},n=m4t({blockTracker:t,provider:e}),i=!1,o=new d4t,s=p4t({eth_subscribe:Z8e(c),eth_unsubscribe:Z8e(l)});return s.destroy=d,{events:o,middleware:s};async function c(p,v){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");let y=p.params[0],_=g4t(16),R;switch(y){case"newHeads":R=P({subId:_});break;case"logs":let M=p.params[1],L=await n.newLogFilter(M);R=k({subId:_,filter:L});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${y}"`)}r[_]=R,v.result=_;return;function P({subId:M}){let L={type:y,destroy:async()=>{t.removeListener("sync",L.update)},update:async({oldBlock:D,newBlock:j})=>{let V=j,K=w4t(D);(await v4t({provider:e,fromBlock:K,toBlock:V})).map(b4t).filter(z=>z!==null).forEach(z=>{u(M,z)})}};return t.on("sync",L.update),L}function k({subId:M,filter:L}){return L.on("update",j=>u(M,j)),{type:y,destroy:async()=>await n.uninstallFilter(L.idHex)}}}async function l(p,v){if(i)throw new Error("SubscriptionManager - attempting to use after destroying");let y=p.params[0],_=r[y];if(!_){v.result=!1;return}delete r[y],await _.destroy(),v.result=!0}function u(p,v){o.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:p,result:v}})}function d(){o.removeAllListeners();for(let p in r)r[p].destroy(),delete r[p];i=!0}}function b4t(t){return t==null?null:{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}});var eCe=X(vB=>{"use strict";Object.defineProperty(vB,"__esModule",{value:!0});vB.SubscriptionManager=void 0;var x4t=T7e(),C4t=J8e(),X8e=()=>{},TY=class{constructor(e){let r=new x4t.PollingBlockTracker({provider:e,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:i}=C4t({blockTracker:r,provider:e});this.events=n,this.subscriptionMiddleware=i}async handleRequest(e){let r={};return await this.subscriptionMiddleware(e,r,X8e,X8e),r}destroy(){this.subscriptionMiddleware.destroy()}};vB.SubscriptionManager=TY});var bB=X(E5=>{"use strict";var iCe=E5&&E5.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(E5,"__esModule",{value:!0});E5.CoinbaseWalletProvider=void 0;var E4t=iCe(BE()),A4t=nN(),ti=FE(),fn=Yh(),S4t=CZ(),tCe=iO(),yB=sO(),eu=ZP(),kY=iCe(S4e()),s9=nO(),_4t=R4e(),I4t=eCe(),rCe="DefaultChainId",nCe="DefaultJsonRpcUrl",RY=class extends A4t.EventEmitter{constructor(e){var r,n;super(),this._filterPolyfill=new _4t.FilterPolyfill(this),this._subscriptionManager=new I4t.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=e.chainId,this._jsonRpcUrlFromOpts=e.jsonRpcUrl,this._overrideIsMetaMask=e.overrideIsMetaMask,this._relayProvider=e.relayProvider,this._storage=e.storage,this._relayEventManager=e.relayEventManager,this.diagnostic=e.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this.isCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this.qrUrl=e.qrUrl;let i=this.getChainId(),o=(0,fn.prepend0x)(i.toString(16));this.emit("connect",{chainIdStr:o});let s=this._storage.getItem(tCe.LOCAL_STORAGE_ADDRESSES_KEY);if(s){let c=s.split(" ");c[0]!==""&&(this._addresses=c.map(l=>(0,fn.ensureAddressString)(l)),this.emit("accountsChanged",c))}this._subscriptionManager.events.on("notification",c=>{this.emit("message",{type:c.method,data:c.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",c=>{var l;if(!(c.origin!==location.origin||c.source!==window)&&c.data.type==="walletLinkMessage"&&c.data.data.action==="dappChainSwitched"){let u=c.data.data.chainId,d=(l=c.data.data.jsonRpcUrl)!==null&&l!==void 0?l:this.jsonRpcUrl;this.updateProviderInfo(d,Number(u))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,fn.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var e;return(e=this._storage.getItem(nCe))!==null&&e!==void 0?e:this._jsonRpcUrlFromOpts}set jsonRpcUrl(e){this._storage.setItem(nCe,e)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(e,r){this.isCoinbaseBrowser||(this._chainIdFromOpts=r,this._jsonRpcUrlFromOpts=e),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(e,r){this.jsonRpcUrl=e;let n=this.getChainId();this._storage.setItem(rCe,r.toString(10)),((0,fn.ensureIntNumber)(r)!==n||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(e,r,n,i,o,s){let l=await(await this.initializeRelay()).watchAsset(e,r,n,i,o,s?.toString()).promise;return(0,eu.isErrorResponse)(l)?!1:!!l.result}async addEthereumChain(e,r,n,i,o,s){var c,l;if((0,fn.ensureIntNumber)(e)===this.getChainId())return!1;let u=await this.initializeRelay(),d=u.inlineAddEthereumChain(e.toString());!this._isAuthorized()&&!d&&await u.requestEthereumAccounts().promise;let p=await u.addEthereumChain(e.toString(),r,o,n,i,s).promise;return(0,eu.isErrorResponse)(p)?!1:(((c=p.result)===null||c===void 0?void 0:c.isApproved)===!0&&this.updateProviderInfo(r[0],e),((l=p.result)===null||l===void 0?void 0:l.isApproved)===!0)}async switchEthereumChain(e){let n=await(await this.initializeRelay()).switchEthereumChain(e.toString(10),this.selectedAddress||void 0).promise;if((0,eu.isErrorResponse)(n)){if(!n.errorCode)return;throw n.errorCode===ti.standardErrorCodes.provider.unsupportedChain?ti.standardErrors.provider.unsupportedChain():ti.standardErrors.provider.custom({message:n.errorMessage,code:n.errorCode})}let i=n.result;i.isApproved&&i.rpcUrl.length>0&&this.updateProviderInfo(i.rpcUrl,e)}setAppInfo(e,r){this.initializeRelay().then(n=>n.setAppInfo(e,r))}async enable(){var e;return(e=this.diagnostic)===null||e===void 0||e.log(s9.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?yB.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(e,r){try{let n=this._send(e,r);if(n instanceof Promise)return n.catch(i=>{throw(0,ti.serializeError)(i,e)})}catch(n){throw(0,ti.serializeError)(n,e)}}_send(e,r){if(typeof e=="string"){let i=e,o=Array.isArray(r)?r:r!==void 0?[r]:[],s={jsonrpc:"2.0",id:0,method:i,params:o};return this._sendRequestAsync(s).then(c=>c.result)}if(typeof r=="function"){let i=e,o=r;return this._sendAsync(i,o)}if(Array.isArray(e))return e.map(o=>this._sendRequest(o));let n=e;return this._sendRequest(n)}async sendAsync(e,r){try{return this._sendAsync(e,r).catch(n=>{throw(0,ti.serializeError)(n,e)})}catch(n){return Promise.reject((0,ti.serializeError)(n,e))}}async _sendAsync(e,r){if(typeof r!="function")throw new Error("callback is required");if(Array.isArray(e)){let i=r;this._sendMultipleRequestsAsync(e).then(o=>i(null,o)).catch(o=>i(o,null));return}let n=r;return this._sendRequestAsync(e).then(i=>n(null,i)).catch(i=>n(i,null))}async request(e){try{return this._request(e).catch(r=>{throw(0,ti.serializeError)(r,e.method)})}catch(r){return Promise.reject((0,ti.serializeError)(r,e.method))}}async _request(e){if(!e||typeof e!="object"||Array.isArray(e))throw ti.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:e});let{method:r,params:n}=e;if(typeof r!="string"||r.length===0)throw ti.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:e});if(n!==void 0&&!Array.isArray(n)&&(typeof n!="object"||n===null))throw ti.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:e});let i=n===void 0?[]:n,o=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:r,params:i,jsonrpc:"2.0",id:o})).result}async scanQRCode(e){let n=await(await this.initializeRelay()).scanQRCode((0,fn.ensureRegExpString)(e)).promise;if((0,eu.isErrorResponse)(n))throw(0,ti.serializeError)(n.errorMessage,"scanQRCode");if(typeof n.result!="string")throw(0,ti.serializeError)("result was not a string","scanQRCode");return n.result}async genericRequest(e,r){let i=await(await this.initializeRelay()).genericRequest(e,r).promise;if((0,eu.isErrorResponse)(i))throw(0,ti.serializeError)(i.errorMessage,"generic");if(typeof i.result!="string")throw(0,ti.serializeError)("result was not a string","generic");return i.result}async connectAndSignIn(e){var r;(r=this.diagnostic)===null||r===void 0||r.log(s9.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?yB.Session.hash(this._relay.session.id):void 0});let n;try{let o=await this.initializeRelay();if(!(o instanceof S4t.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(n=await o.connectAndSignIn(e).promise,(0,eu.isErrorResponse)(n))throw new Error(n.errorMessage)}catch(o){throw typeof o.message=="string"&&o.message.match(/(denied|rejected)/i)?ti.standardErrors.provider.userRejectedRequest("User denied account authorization"):o}if(!n.result)throw new Error("accounts received is empty");let{accounts:i}=n.result;return this._setAddresses(i),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),n.result}async selectProvider(e){let n=await(await this.initializeRelay()).selectProvider(e).promise;if((0,eu.isErrorResponse)(n))throw(0,ti.serializeError)(n.errorMessage,"selectProvider");if(typeof n.result!="string")throw(0,ti.serializeError)("result was not a string","selectProvider");return n.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(e){let r={jsonrpc:"2.0",id:e.id},{method:n}=e;if(r.result=this._handleSynchronousMethods(e),r.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return r}_setAddresses(e,r){if(!Array.isArray(e))throw new Error("addresses is not an array");let n=e.map(i=>(0,fn.ensureAddressString)(i));JSON.stringify(n)!==JSON.stringify(this._addresses)&&(this._addresses=n,this.emit("accountsChanged",this._addresses),this._storage.setItem(tCe.LOCAL_STORAGE_ADDRESSES_KEY,n.join(" ")))}_sendRequestAsync(e){return new Promise((r,n)=>{try{let i=this._handleSynchronousMethods(e);if(i!==void 0)return r({jsonrpc:"2.0",id:e.id,result:i});let o=this._handleAsynchronousFilterMethods(e);if(o!==void 0){o.then(c=>r(Object.assign(Object.assign({},c),{id:e.id}))).catch(c=>n(c));return}let s=this._handleSubscriptionMethods(e);if(s!==void 0){s.then(c=>r({jsonrpc:"2.0",id:e.id,result:c.result})).catch(c=>n(c));return}}catch(i){return n(i)}this._handleAsynchronousMethods(e).then(i=>i&&r(Object.assign(Object.assign({},i),{id:e.id}))).catch(i=>n(i))})}_sendMultipleRequestsAsync(e){return Promise.all(e.map(r=>this._sendRequestAsync(r)))}_handleSynchronousMethods(e){let{method:r}=e,n=e.params||[];switch(r){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(n);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(e){let{method:r}=e,n=e.params||[];switch(r){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(n);case"eth_ecRecover":return this._eth_ecRecover(n);case"personal_sign":return this._personal_sign(n);case"personal_ecRecover":return this._personal_ecRecover(n);case"eth_signTransaction":return this._eth_signTransaction(n);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(n);case"eth_sendTransaction":return this._eth_sendTransaction(n);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(n);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(n);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(n);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(n);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(n);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(n);case"wallet_watchAsset":return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(e,this.jsonRpcUrl).catch(o=>{var s;throw(o.code===ti.standardErrorCodes.rpc.methodNotFound||o.code===ti.standardErrorCodes.rpc.methodNotSupported)&&((s=this.diagnostic)===null||s===void 0||s.log(s9.EVENTS.METHOD_NOT_IMPLEMENTED,{method:e.method,sessionIdHash:this._relay?yB.Session.hash(this._relay.session.id):void 0})),o})}_handleAsynchronousFilterMethods(e){let{method:r}=e,n=e.params||[];switch(r){case"eth_newFilter":return this._eth_newFilter(n);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(n);case"eth_getFilterLogs":return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(e){switch(e.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(e)}}_isKnownAddress(e){try{let r=(0,fn.ensureAddressString)(e);return this._addresses.map(i=>(0,fn.ensureAddressString)(i)).includes(r)}catch{}return!1}_ensureKnownAddress(e){var r;if(!this._isKnownAddress(e))throw(r=this.diagnostic)===null||r===void 0||r.log(s9.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){let r=e.from?(0,fn.ensureAddressString)(e.from):this.selectedAddress;if(!r)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(r);let n=e.to?(0,fn.ensureAddressString)(e.to):null,i=e.value!=null?(0,fn.ensureBN)(e.value):new E4t.default(0),o=e.data?(0,fn.ensureBuffer)(e.data):Buffer.alloc(0),s=e.nonce!=null?(0,fn.ensureIntNumber)(e.nonce):null,c=e.gasPrice!=null?(0,fn.ensureBN)(e.gasPrice):null,l=e.maxFeePerGas!=null?(0,fn.ensureBN)(e.maxFeePerGas):null,u=e.maxPriorityFeePerGas!=null?(0,fn.ensureBN)(e.maxPriorityFeePerGas):null,d=e.gas!=null?(0,fn.ensureBN)(e.gas):null,p=e.chainId?(0,fn.ensureIntNumber)(e.chainId):this.getChainId();return{fromAddress:r,toAddress:n,weiValue:i,data:o,nonce:s,gasPriceInWei:c,maxFeePerGas:l,maxPriorityFeePerGas:u,gasLimit:d,chainId:p}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw ti.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw ti.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(e,r,n,i){this._ensureKnownAddress(r);try{let s=await(await this.initializeRelay()).signEthereumMessage(e,r,n,i).promise;if((0,eu.isErrorResponse)(s))throw new Error(s.errorMessage);return{jsonrpc:"2.0",id:0,result:s.result}}catch(o){throw typeof o.message=="string"&&o.message.match(/(denied|rejected)/i)?ti.standardErrors.provider.userRejectedRequest("User denied message signature"):o}}async _ethereumAddressFromSignedMessage(e,r,n){let o=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(e,r,n).promise;if((0,eu.isErrorResponse)(o))throw new Error(o.errorMessage);return{jsonrpc:"2.0",id:0,result:o.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,fn.hexStringFromIntNumber)(this.getChainId())}getChainId(){let e=this._storage.getItem(rCe);if(!e)return(0,fn.ensureIntNumber)(this._chainIdFromOpts);let r=parseInt(e,10);return(0,fn.ensureIntNumber)(r)}async _eth_requestAccounts(){var e;if((e=this.diagnostic)===null||e===void 0||e.log(s9.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?yB.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let r;try{if(r=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,eu.isErrorResponse)(r))throw new Error(r.errorMessage)}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?ti.standardErrors.provider.userRejectedRequest("User denied account authorization"):n}if(!r.result)throw new Error("accounts received is empty");return this._setAddresses(r.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(e){this._requireAuthorization();let r=(0,fn.ensureAddressString)(e[0]),n=(0,fn.ensureBuffer)(e[1]);return this._signEthereumMessage(n,r,!1)}_eth_ecRecover(e){let r=(0,fn.ensureBuffer)(e[0]),n=(0,fn.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!1)}_personal_sign(e){this._requireAuthorization();let r=(0,fn.ensureBuffer)(e[0]),n=(0,fn.ensureAddressString)(e[1]);return this._signEthereumMessage(r,n,!0)}_personal_ecRecover(e){let r=(0,fn.ensureBuffer)(e[0]),n=(0,fn.ensureBuffer)(e[1]);return this._ethereumAddressFromSignedMessage(r,n,!0)}async _eth_signTransaction(e){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=await(await this.initializeRelay()).signEthereumTransaction(r).promise;if((0,eu.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?ti.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_sendRawTransaction(e){let r=(0,fn.ensureBuffer)(e[0]),i=await(await this.initializeRelay()).submitEthereumTransaction(r,this.getChainId()).promise;if((0,eu.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}async _eth_sendTransaction(e){this._requireAuthorization();let r=this._prepareTransactionParams(e[0]||{});try{let i=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(r).promise;if((0,eu.isErrorResponse)(i))throw new Error(i.errorMessage);return{jsonrpc:"2.0",id:0,result:i.result}}catch(n){throw typeof n.message=="string"&&n.message.match(/(denied|rejected)/i)?ti.standardErrors.provider.userRejectedRequest("User denied transaction signature"):n}}async _eth_signTypedData_v1(e){this._requireAuthorization();let r=(0,fn.ensureParsedJSONObject)(e[0]),n=(0,fn.ensureAddressString)(e[1]);this._ensureKnownAddress(n);let i=kY.default.hashForSignTypedDataLegacy({data:r}),o=JSON.stringify(r,null,2);return this._signEthereumMessage(i,n,!1,o)}async _eth_signTypedData_v3(e){this._requireAuthorization();let r=(0,fn.ensureAddressString)(e[0]),n=(0,fn.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=kY.default.hashForSignTypedData_v3({data:n}),o=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,o)}async _eth_signTypedData_v4(e){this._requireAuthorization();let r=(0,fn.ensureAddressString)(e[0]),n=(0,fn.ensureParsedJSONObject)(e[1]);this._ensureKnownAddress(r);let i=kY.default.hashForSignTypedData_v4({data:n}),o=JSON.stringify(n,null,2);return this._signEthereumMessage(i,r,!1,o)}async _cbwallet_arbitrary(e){let r=e[0],n=e[1];if(typeof n!="string")throw new Error("parameter must be a string");if(typeof r!="object"||r===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(r,n)}}async _wallet_addEthereumChain(e){var r,n,i,o;let s=e[0];if(((r=s.rpcUrls)===null||r===void 0?void 0:r.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!s.chainName||s.chainName.trim()==="")throw ti.standardErrors.rpc.invalidParams("chainName is a required field");if(!s.nativeCurrency)throw ti.standardErrors.rpc.invalidParams("nativeCurrency is a required field");let c=parseInt(s.chainId,16);return await this.addEthereumChain(c,(n=s.rpcUrls)!==null&&n!==void 0?n:[],(i=s.blockExplorerUrls)!==null&&i!==void 0?i:[],s.chainName,(o=s.iconUrls)!==null&&o!==void 0?o:[],s.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(e){let r=e[0];return await this.switchEthereumChain(parseInt(r.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(e){let r=Array.isArray(e)?e[0]:e;if(!r.type)throw ti.standardErrors.rpc.invalidParams("Type is required");if(r?.type!=="ERC20")throw ti.standardErrors.rpc.invalidParams(`Asset of type '${r.type}' is not supported`);if(!r?.options)throw ti.standardErrors.rpc.invalidParams("Options are required");if(!r?.options.address)throw ti.standardErrors.rpc.invalidParams("Address is required");let n=this.getChainId(),{address:i,symbol:o,image:s,decimals:c}=r.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(r.type,i,o,c,s,n)}}_eth_uninstallFilter(e){let r=(0,fn.ensureHexString)(e[0]);return this._filterPolyfill.uninstallFilter(r)}async _eth_newFilter(e){let r=e[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(r)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(e){let r=(0,fn.ensureHexString)(e[0]);return this._filterPolyfill.getFilterChanges(r)}_eth_getFilterLogs(e){let r=(0,fn.ensureHexString)(e[0]);return this._filterPolyfill.getFilterLogs(r)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(e=>(e.setAccountsCallback((r,n)=>this._setAddresses(r,n)),e.setChainCallback((r,n)=>{this.updateProviderInfo(n,parseInt(r,10))}),e.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=e,e))}};E5.CoinbaseWalletProvider=RY});var oCe=X(xB=>{"use strict";Object.defineProperty(xB,"__esModule",{value:!0});xB.RelayEventManager=void 0;var T4t=Yh(),MY=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;let e=this._nextRequestId,r=(0,T4t.prepend0x)(e.toString(16));return this.callbacks.get(r)&&this.callbacks.delete(r),e}};xB.RelayEventManager=MY});var NY=X(EB=>{"use strict";Object.defineProperty(EB,"__esModule",{value:!0});EB.CoinbaseWalletSDK=void 0;var k4t=Vbe(),R4t=Kbe(),sCe=Yh(),M4t=g6e(),N4t=bB(),P4t=CZ(),O4t=bZ(),B4t=oCe(),L4t=mZ(),F4t=gZ(),aCe=JP(),CB=class t{constructor(e){var r,n,i;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;let o=e.linkAPIUrl||R4t.LINK_API_URL;typeof e.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=e.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(r=e.overrideIsCoinbaseWallet)!==null&&r!==void 0?r:!0,this._overrideIsCoinbaseBrowser=(n=e.overrideIsCoinbaseBrowser)!==null&&n!==void 0?n:!1,this._diagnosticLogger=e.diagnosticLogger,this._reloadOnDisconnect=(i=e.reloadOnDisconnect)!==null&&i!==void 0?i:!0;let s=new URL(o),c=`${s.protocol}//${s.host}`;if(this._storage=new M4t.ScopedLocalStorage(`-walletlink:${c}`),this._storage.setItem("version",t.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new B4t.RelayEventManager;let l=(0,sCe.isMobileWeb)(),u=e.uiConstructor||(p=>l?new O4t.MobileRelayUI(p):new L4t.WalletLinkRelayUI(p)),d={linkAPIUrl:o,version:aCe.LIB_VERSION,darkMode:!!e.darkMode,headlessMode:!!e.headlessMode,uiConstructor:u,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:e.enableMobileWalletLink};this._relay=l?new P4t.MobileRelay(d):new F4t.WalletLinkRelay(d),this.setAppInfo(e.appName,e.appLogoUrl),!e.headlessMode&&this._relay.attachUI()}makeWeb3Provider(e="",r=1){let n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(e,r),this._reloadOnDisconnect===!1&&typeof n.disableReloadOnDisconnect=="function"&&n.disableReloadOnDisconnect(),n;let i=this.coinbaseBrowser;if(i)return i;let o=this._relay;if(!o||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return e||o.setConnectDisabled(!0),new N4t.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(o),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:e,chainId:r,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(e,r){var n;this._appName=e||"DApp",this._appLogoUrl=r||(0,sCe.getFavicon)();let i=this.walletExtension;i?this.isCipherProvider(i)||i.setAppInfo(this._appName,this._appLogoUrl):(n=this._relay)===null||n===void 0||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var e;let r=this===null||this===void 0?void 0:this.walletExtension;r?r.close():(e=this._relay)===null||e===void 0||e.resetAndReload()}getQrUrl(){var e,r;return(r=(e=this._relay)===null||e===void 0?void 0:e.getQRCodeUrl())!==null&&r!==void 0?r:null}getCoinbaseWalletLogo(e,r=240){return(0,k4t.walletLogo)(e,r)}get walletExtension(){var e;return(e=window.coinbaseWalletExtension)!==null&&e!==void 0?e:window.walletLinkExtension}get coinbaseBrowser(){var e,r;try{let n=(e=window.ethereum)!==null&&e!==void 0?e:(r=window.top)===null||r===void 0?void 0:r.ethereum;return n&&"isCoinbaseBrowser"in n&&n.isCoinbaseBrowser?n:void 0}catch{return}}isCipherProvider(e){return typeof e.isCipher=="boolean"&&e.isCipher}};EB.CoinbaseWalletSDK=CB;CB.VERSION=aCe.LIB_VERSION});var lCe=X(Ev=>{"use strict";Object.defineProperty(Ev,"__esModule",{value:!0});Ev.CoinbaseWalletProvider=Ev.CoinbaseWalletSDK=void 0;var PY=NY(),cCe=bB(),U4t=NY();Object.defineProperty(Ev,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return U4t.CoinbaseWalletSDK}});var D4t=bB();Object.defineProperty(Ev,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return D4t.CoinbaseWalletProvider}});Ev.default=PY.CoinbaseWalletSDK;typeof window<"u"&&(window.CoinbaseWalletSDK=PY.CoinbaseWalletSDK,window.CoinbaseWalletProvider=cCe.CoinbaseWalletProvider,window.WalletLink=PY.CoinbaseWalletSDK,window.WalletLinkProvider=cCe.CoinbaseWalletProvider)});var AB,OY=F(()=>{AB=()=>"9.1.0"});var q4t,H4t,uCe,fCe=F(()=>{q4t=t=>t.toString(16).padStart(2,"0"),H4t=t=>{let e=new Uint8Array((t||40)/2);return window.crypto.getRandomValues(e),Array.from(e,q4t).join("")},uCe=()=>typeof window<"u"?H4t(10):new Date().getTime().toString(36)});var s2,BY=F(()=>{OY();fCe();s2=class{};s2.makeRequest=(t,e)=>({id:uCe(),method:t,params:e,env:{sdkVersion:AB()}});s2.makeResponse=(t,e,r)=>({id:t,success:!0,version:r,data:e});s2.makeErrorResponse=(t,e,r)=>({id:t,success:!1,error:e,version:r})});var No,a9,a2=F(()=>{(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(No||(No={}));(function(t){t.requestAddressBook="requestAddressBook"})(a9||(a9={}))});var LY,hCe,dCe=F(()=>{BY();a2();LY=class{constructor(e=null,r=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:n,data:i,source:o})=>{let s=!i,c=!this.isServer&&o===window.parent,l=typeof i.version<"u"&&parseInt(i.version.split(".")[0]),u=typeof l=="number"&&l>=1,d=!0;return Array.isArray(this.allowedOrigins)&&(d=this.allowedOrigins.find(p=>p.test(n))!==void 0),!s&&c&&u&&d},this.logIncomingMessage=n=>{console.info(`Safe Apps SDK v1: A message was received from origin ${n.origin}. `,n.data)},this.onParentMessage=n=>{this.isValidMessage(n)&&(this.debugMode&&this.logIncomingMessage(n),this.handleIncomingMessage(n.data))},this.handleIncomingMessage=n=>{let{id:i}=n,o=this.callbacks.get(i);o&&(o(n),this.callbacks.delete(i))},this.send=(n,i)=>{let o=s2.makeRequest(n,i);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(o,"*"),new Promise((s,c)=>{this.callbacks.set(o.id,l=>{if(!l.success){c(new Error(l.error));return}s(l)})})},this.allowedOrigins=e,this.debugMode=r,this.isServer||window.addEventListener("message",this.onParentMessage)}},hCe=LY});var c9,pCe=F(()=>{c9=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t});var mCe=F(()=>{});var wCe=X(mf=>{"use strict";var FY=mf&&mf.__awaiter||function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(d){try{u(n.next(d))}catch(p){s(p)}}function l(d){try{u(n.throw(d))}catch(p){s(p)}}function u(d){d.done?o(d.value):i(d.value).then(c,l)}u((n=n.apply(t,e||[])).next())})};Object.defineProperty(mf,"__esModule",{value:!0});mf.getData=mf.fetchData=mf.stringifyQuery=mf.insertParams=void 0;var z4t=t=>typeof t=="object"&&t!==null&&"code"in t&&"message"in t;function W4t(t,e,r){return t.replace(new RegExp(`\\{${e}\\}`,"g"),r)}function V4t(t,e){return e?Object.keys(e).reduce((r,n)=>W4t(r,n,String(e[n])),t):t}mf.insertParams=V4t;function K4t(t){if(!t)return"";let e=new URLSearchParams;Object.keys(t).forEach(n=>{t[n]!=null&&e.append(n,String(t[n]))});let r=e.toString();return r?`?${r}`:""}mf.stringifyQuery=K4t;function gCe(t){return FY(this,void 0,void 0,function*(){let e;try{e=yield t.json()}catch{e={}}if(!t.ok){let r=z4t(e)?`CGW error - ${e.code}: ${e.message}`:`CGW error - status ${t.statusText}`;throw new Error(r)}return e})}function G4t(t,e,r,n,i){return FY(this,void 0,void 0,function*(){let o=Object.assign({"Content-Type":"application/json"},n),s={method:e??"POST",headers:o};i&&(s.credentials=i),r!=null&&(s.body=typeof r=="string"?r:JSON.stringify(r));let c=yield fetch(t,s);return gCe(c)})}mf.fetchData=G4t;function Q4t(t,e,r){return FY(this,void 0,void 0,function*(){let n={method:"GET"};e&&(n.headers=Object.assign(Object.assign({},e),{"Content-Type":"application/json"})),r&&(n.credentials=r);let i=yield fetch(t,n);return gCe(i)})}mf.getData=Q4t});var vCe=X(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});ld.getEndpoint=ld.deleteEndpoint=ld.putEndpoint=ld.postEndpoint=void 0;var Av=wCe();function SB(t,e,r,n){let i=(0,Av.insertParams)(e,r),o=(0,Av.stringifyQuery)(n);return`${t}${i}${o}`}function Z4t(t,e,r){let n=SB(t,e,r?.path,r?.query);return(0,Av.fetchData)(n,"POST",r?.body,r?.headers,r?.credentials)}ld.postEndpoint=Z4t;function Y4t(t,e,r){let n=SB(t,e,r?.path,r?.query);return(0,Av.fetchData)(n,"PUT",r?.body,r?.headers,r?.credentials)}ld.putEndpoint=Y4t;function J4t(t,e,r){let n=SB(t,e,r?.path,r?.query);return(0,Av.fetchData)(n,"DELETE",r?.body,r?.headers,r?.credentials)}ld.deleteEndpoint=J4t;function X4t(t,e,r,n){if(n)return(0,Av.getData)(n,void 0,r?.credentials);let i=SB(t,e,r?.path,r?.query);return(0,Av.getData)(i,r?.headers,r?.credentials)}ld.getEndpoint=X4t});var yCe=X(_B=>{"use strict";Object.defineProperty(_B,"__esModule",{value:!0});_B.DEFAULT_BASE_URL=void 0;_B.DEFAULT_BASE_URL="https://safe-client.safe.global"});var bCe=X(l9=>{"use strict";Object.defineProperty(l9,"__esModule",{value:!0});l9.ImplementationVersionState=void 0;var e5t;(function(t){t.UP_TO_DATE="UP_TO_DATE",t.OUTDATED="OUTDATED",t.UNKNOWN="UNKNOWN"})(e5t=l9.ImplementationVersionState||(l9.ImplementationVersionState={}))});var xCe=X(b0=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});b0.SafeAppSocialPlatforms=b0.SafeAppFeatures=b0.SafeAppAccessPolicyTypes=void 0;var t5t;(function(t){t.NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST"})(t5t=b0.SafeAppAccessPolicyTypes||(b0.SafeAppAccessPolicyTypes={}));var r5t;(function(t){t.BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS"})(r5t=b0.SafeAppFeatures||(b0.SafeAppFeatures={}));var n5t;(function(t){t.TWITTER="TWITTER",t.GITHUB="GITHUB",t.DISCORD="DISCORD"})(n5t=b0.SafeAppSocialPlatforms||(b0.SafeAppSocialPlatforms={}))});var CCe=X(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.LabelValue=bn.StartTimeValue=bn.DurationType=bn.DetailedExecutionInfoType=bn.TransactionListItemType=bn.ConflictType=bn.TransactionInfoType=bn.SettingsInfoType=bn.TransactionTokenType=bn.TransferDirection=bn.TransactionStatus=bn.Operation=void 0;var i5t;(function(t){t[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE"})(i5t=bn.Operation||(bn.Operation={}));var o5t;(function(t){t.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",t.AWAITING_EXECUTION="AWAITING_EXECUTION",t.CANCELLED="CANCELLED",t.FAILED="FAILED",t.SUCCESS="SUCCESS"})(o5t=bn.TransactionStatus||(bn.TransactionStatus={}));var s5t;(function(t){t.INCOMING="INCOMING",t.OUTGOING="OUTGOING",t.UNKNOWN="UNKNOWN"})(s5t=bn.TransferDirection||(bn.TransferDirection={}));var a5t;(function(t){t.ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_COIN="NATIVE_COIN"})(a5t=bn.TransactionTokenType||(bn.TransactionTokenType={}));var c5t;(function(t){t.SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",t.ADD_OWNER="ADD_OWNER",t.REMOVE_OWNER="REMOVE_OWNER",t.SWAP_OWNER="SWAP_OWNER",t.CHANGE_THRESHOLD="CHANGE_THRESHOLD",t.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",t.ENABLE_MODULE="ENABLE_MODULE",t.DISABLE_MODULE="DISABLE_MODULE",t.SET_GUARD="SET_GUARD",t.DELETE_GUARD="DELETE_GUARD"})(c5t=bn.SettingsInfoType||(bn.SettingsInfoType={}));var l5t;(function(t){t.TRANSFER="Transfer",t.SETTINGS_CHANGE="SettingsChange",t.CUSTOM="Custom",t.CREATION="Creation",t.SWAP_ORDER="SwapOrder",t.TWAP_ORDER="TwapOrder",t.SWAP_TRANSFER="SwapTransfer"})(l5t=bn.TransactionInfoType||(bn.TransactionInfoType={}));var u5t;(function(t){t.NONE="None",t.HAS_NEXT="HasNext",t.END="End"})(u5t=bn.ConflictType||(bn.ConflictType={}));var f5t;(function(t){t.TRANSACTION="TRANSACTION",t.LABEL="LABEL",t.CONFLICT_HEADER="CONFLICT_HEADER",t.DATE_LABEL="DATE_LABEL"})(f5t=bn.TransactionListItemType||(bn.TransactionListItemType={}));var h5t;(function(t){t.MULTISIG="MULTISIG",t.MODULE="MODULE"})(h5t=bn.DetailedExecutionInfoType||(bn.DetailedExecutionInfoType={}));var d5t;(function(t){t.AUTO="AUTO",t.LIMIT_DURATION="LIMIT_DURATION"})(d5t=bn.DurationType||(bn.DurationType={}));var p5t;(function(t){t.AT_MINING_TIME="AT_MINING_TIME",t.AT_EPOCH="AT_EPOCH"})(p5t=bn.StartTimeValue||(bn.StartTimeValue={}));var m5t;(function(t){t.Queued="Queued",t.Next="Next"})(m5t=bn.LabelValue||(bn.LabelValue={}))});var ECe=X(x0=>{"use strict";Object.defineProperty(x0,"__esModule",{value:!0});x0.FEATURES=x0.GAS_PRICE_TYPE=x0.RPC_AUTHENTICATION=void 0;var g5t;(function(t){t.API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN"})(g5t=x0.RPC_AUTHENTICATION||(x0.RPC_AUTHENTICATION={}));var w5t;(function(t){t.ORACLE="ORACLE",t.FIXED="FIXED",t.FIXED_1559="FIXED1559",t.UNKNOWN="UNKNOWN"})(w5t=x0.GAS_PRICE_TYPE||(x0.GAS_PRICE_TYPE={}));var v5t;(function(t){t.ERC721="ERC721",t.SAFE_APPS="SAFE_APPS",t.CONTRACT_INTERACTION="CONTRACT_INTERACTION",t.DOMAIN_LOOKUP="DOMAIN_LOOKUP",t.SPENDING_LIMIT="SPENDING_LIMIT",t.EIP1559="EIP1559",t.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",t.TX_SIMULATION="TX_SIMULATION",t.EIP1271="EIP1271"})(v5t=x0.FEATURES||(x0.FEATURES={}))});var ACe=X(u9=>{"use strict";Object.defineProperty(u9,"__esModule",{value:!0});u9.TokenType=void 0;var y5t;(function(t){t.ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"})(y5t=u9.TokenType||(u9.TokenType={}))});var _Ce=X(SCe=>{"use strict";Object.defineProperty(SCe,"__esModule",{value:!0})});var ICe=X(f9=>{"use strict";Object.defineProperty(f9,"__esModule",{value:!0});f9.ConfirmationViewTypes=void 0;var b5t;(function(t){t.COW_SWAP_ORDER="COW_SWAP_ORDER",t.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER"})(b5t=f9.ConfirmationViewTypes||(f9.ConfirmationViewTypes={}))});var TCe=X(c2=>{"use strict";Object.defineProperty(c2,"__esModule",{value:!0});c2.SafeMessageStatus=c2.SafeMessageListItemType=void 0;var x5t;(function(t){t.DATE_LABEL="DATE_LABEL",t.MESSAGE="MESSAGE"})(x5t=c2.SafeMessageListItemType||(c2.SafeMessageListItemType={}));var C5t;(function(t){t.NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",t.CONFIRMED="CONFIRMED"})(C5t=c2.SafeMessageStatus||(c2.SafeMessageStatus={}))});var kCe=X(h9=>{"use strict";Object.defineProperty(h9,"__esModule",{value:!0});h9.DeviceType=void 0;var E5t;(function(t){t.ANDROID="ANDROID",t.IOS="IOS",t.WEB="WEB"})(E5t=h9.DeviceType||(h9.DeviceType={}))});var MCe=X(RCe=>{"use strict";Object.defineProperty(RCe,"__esModule",{value:!0})});var NCe=X(He=>{"use strict";var A5t=He&&He.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),ud=He&&He.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&A5t(e,t,r)};Object.defineProperty(He,"__esModule",{value:!0});He.deleteAccount=He.getAccount=He.createAccount=He.verifyAuth=He.getAuthNonce=He.getContract=He.getSafeOverviews=He.unsubscribeAll=He.unsubscribeSingle=He.registerRecoveryModule=He.deleteRegisteredEmail=He.getRegisteredEmail=He.verifyEmail=He.resendEmailVerificationCode=He.changeEmail=He.registerEmail=He.unregisterDevice=He.unregisterSafe=He.registerDevice=He.getDelegates=He.confirmSafeMessage=He.proposeSafeMessage=He.getSafeMessage=He.getSafeMessages=He.getDecodedData=He.getMasterCopies=He.getSafeApps=He.getChainConfig=He.getChainsConfig=He.getConfirmationView=He.proposeTransaction=He.getNonces=He.postSafeGasEstimation=He.deleteTransaction=He.getTransactionDetails=He.getTransactionQueue=He.getTransactionHistory=He.getCollectiblesPage=He.getCollectibles=He.getAllOwnedSafes=He.getOwnedSafes=He.getFiatCurrencies=He.getBalances=He.getMultisigTransactions=He.getModuleTransactions=He.getIncomingTransfers=He.getSafeInfo=He.getRelayCount=He.relayTransaction=He.setBaseUrl=void 0;He.putAccountDataSettings=He.getAccountDataSettings=He.getAccountDataTypes=void 0;var Ir=vCe(),S5t=yCe();ud(bCe(),He);ud(xCe(),He);ud(CCe(),He);ud(ECe(),He);ud(ACe(),He);ud(_Ce(),He);ud(ICe(),He);ud(TCe(),He);ud(kCe(),He);ud(MCe(),He);var xr=S5t.DEFAULT_BASE_URL,_5t=t=>{xr=t};He.setBaseUrl=_5t;function I5t(t,e){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/relay",{path:{chainId:t},body:e})}He.relayTransaction=I5t;function T5t(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/relay/{address}",{path:{chainId:t,address:e}})}He.getRelayCount=T5t;function k5t(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:t,address:e}})}He.getSafeInfo=k5t;function R5t(t,e,r,n){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:t,address:e},query:r},n)}He.getIncomingTransfers=R5t;function M5t(t,e,r,n){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:t,address:e},query:r},n)}He.getModuleTransactions=M5t;function N5t(t,e,r,n){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:t,address:e},query:r},n)}He.getMultisigTransactions=N5t;function P5t(t,e,r="usd",n={}){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:t,address:e,currency:r},query:n})}He.getBalances=P5t;function O5t(){return(0,Ir.getEndpoint)(xr,"/v1/balances/supported-fiat-codes")}He.getFiatCurrencies=O5t;function B5t(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:t,address:e}})}He.getOwnedSafes=B5t;function L5t(t){return(0,Ir.getEndpoint)(xr,"/v1/owners/{address}/safes",{path:{address:t}})}He.getAllOwnedSafes=L5t;function F5t(t,e,r={}){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:e},query:r})}He.getCollectibles=F5t;function U5t(t,e,r={},n){return(0,Ir.getEndpoint)(xr,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:e},query:r},n)}He.getCollectiblesPage=U5t;function D5t(t,e,r={},n){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:t,safe_address:e},query:r},n)}He.getTransactionHistory=D5t;function j5t(t,e,r={},n){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:t,safe_address:e},query:r},n)}He.getTransactionQueue=j5t;function $5t(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:t,transactionId:e}})}He.getTransactionDetails=$5t;function q5t(t,e,r){return(0,Ir.deleteEndpoint)(xr,"/v1/chains/{chainId}/transactions/{safeTxHash}",{path:{chainId:t,safeTxHash:e},body:{signature:r}})}He.deleteTransaction=q5t;function H5t(t,e,r){return(0,Ir.postEndpoint)(xr,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:t,safe_address:e},body:r})}He.postSafeGasEstimation=H5t;function z5t(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/nonces",{path:{chainId:t,safe_address:e}})}He.getNonces=z5t;function W5t(t,e,r){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:t,safe_address:e},body:r})}He.proposeTransaction=W5t;function V5t(t,e,r,n){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/views/transaction-confirmation",{path:{chainId:t,safe_address:e},body:{data:r,to:n}})}He.getConfirmationView=V5t;function K5t(t){return(0,Ir.getEndpoint)(xr,"/v1/chains",{query:t})}He.getChainsConfig=K5t;function G5t(t){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}",{path:{chainId:t}})}He.getChainConfig=G5t;function Q5t(t,e={}){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safe-apps",{path:{chainId:t},query:e})}He.getSafeApps=Q5t;function Z5t(t){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:t}})}He.getMasterCopies=Z5t;function Y5t(t,e,r){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/data-decoder",{path:{chainId:t},body:{data:e,to:r}})}He.getDecodedData=Y5t;function J5t(t,e,r){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:t,safe_address:e},query:{}},r)}He.getSafeMessages=J5t;function X5t(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:t,message_hash:e}})}He.getSafeMessage=X5t;function ext(t,e,r){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:t,safe_address:e},body:r})}He.proposeSafeMessage=ext;function txt(t,e,r){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:t,message_hash:e},body:r})}He.confirmSafeMessage=txt;function rxt(t,e={}){return(0,Ir.getEndpoint)(xr,"/v2/chains/{chainId}/delegates",{path:{chainId:t},query:e})}He.getDelegates=rxt;function nxt(t){return(0,Ir.postEndpoint)(xr,"/v1/register/notifications",{body:t})}He.registerDevice=nxt;function ixt(t,e,r){return(0,Ir.deleteEndpoint)(xr,"/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safe_address}",{path:{chainId:t,safe_address:e,uuid:r}})}He.unregisterSafe=ixt;function oxt(t,e){return(0,Ir.deleteEndpoint)(xr,"/v1/chains/{chainId}/notifications/devices/{uuid}",{path:{chainId:t,uuid:e}})}He.unregisterDevice=oxt;function sxt(t,e,r,n){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/emails",{path:{chainId:t,safe_address:e},body:r,headers:n})}He.registerEmail=sxt;function axt(t,e,r,n,i){return(0,Ir.putEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:t,safe_address:e,signer:r},body:n,headers:i})}He.changeEmail=axt;function cxt(t,e,r){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify-resend",{path:{chainId:t,safe_address:e,signer:r},body:""})}He.resendEmailVerificationCode=cxt;function lxt(t,e,r,n){return(0,Ir.putEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}/verify",{path:{chainId:t,safe_address:e,signer:r},body:n})}He.verifyEmail=lxt;function uxt(t,e,r,n){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:t,safe_address:e,signer:r},headers:n})}He.getRegisteredEmail=uxt;function fxt(t,e,r,n){return(0,Ir.deleteEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/emails/{signer}",{path:{chainId:t,safe_address:e,signer:r},headers:n})}He.deleteRegisteredEmail=fxt;function hxt(t,e,r){return(0,Ir.postEndpoint)(xr,"/v1/chains/{chainId}/safes/{safe_address}/recovery",{path:{chainId:t,safe_address:e},body:r})}He.registerRecoveryModule=hxt;function dxt(t){return(0,Ir.deleteEndpoint)(xr,"/v1/subscriptions",{query:t})}He.unsubscribeSingle=dxt;function pxt(t){return(0,Ir.deleteEndpoint)(xr,"/v1/subscriptions/all",{query:t})}He.unsubscribeAll=pxt;function mxt(t,e){return(0,Ir.getEndpoint)(xr,"/v1/safes",{query:Object.assign(Object.assign({},e),{safes:t.join(",")})})}He.getSafeOverviews=mxt;function gxt(t,e){return(0,Ir.getEndpoint)(xr,"/v1/chains/{chainId}/contracts/{contractAddress}",{path:{chainId:t,contractAddress:e}})}He.getContract=gxt;function wxt(){return(0,Ir.getEndpoint)(xr,"/v1/auth/nonce",{credentials:"include"})}He.getAuthNonce=wxt;function vxt(t){return(0,Ir.postEndpoint)(xr,"/v1/auth/verify",{body:t,credentials:"include"})}He.verifyAuth=vxt;function yxt(t){return(0,Ir.postEndpoint)(xr,"/v1/accounts",{body:t,credentials:"include"})}He.createAccount=yxt;function bxt(t){return(0,Ir.getEndpoint)(xr,"/v1/accounts/{address}",{path:{address:t},credentials:"include"})}He.getAccount=bxt;function xxt(t){return(0,Ir.deleteEndpoint)(xr,"/v1/accounts/{address}",{path:{address:t},credentials:"include"})}He.deleteAccount=xxt;function Cxt(){return(0,Ir.getEndpoint)(xr,"/v1/accounts/data-types")}He.getAccountDataTypes=Cxt;function Ext(t){return(0,Ir.getEndpoint)(xr,"/v1/accounts/{address}/data-settings",{path:{address:t},credentials:"include"})}He.getAccountDataSettings=Ext;function Axt(t,e){return(0,Ir.putEndpoint)(xr,"/v1/accounts/{address}/data-settings",{path:{address:t},body:e,credentials:"include"})}He.putAccountDataSettings=Axt});var l2,PCe=F(()=>{l2=Tt(NCe(),1)});var OCe=F(()=>{a2()});var IB=F(()=>{pCe();mCe();PCe();OCe()});var TB,BCe=F(()=>{a2();IB();TB=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(No.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){let r={message:e};return(await this.communicator.send(No.signMessage,r)).data}async signTypedMessage(e){if(!c9(e))throw new Error("Invalid typed data");return(await this.communicator.send(No.signTypedMessage,{typedData:e})).data}async send({txs:e,params:r}){if(!e||!e.length)throw new Error("No transactions were passed");let n={txs:e,params:r};return(await this.communicator.send(No.sendTransactions,n)).data}}});var zs,kB=F(()=>{zs={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}});var T1,RB,LCe=F(()=>{kB();a2();T1={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t},RB=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:zs.eth_call,formatters:[null,T1.defaultBlockParam]}),this.getBalance=this.buildRequest({call:zs.eth_getBalance,formatters:[null,T1.defaultBlockParam]}),this.getCode=this.buildRequest({call:zs.eth_getCode,formatters:[null,T1.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:zs.eth_getStorageAt,formatters:[null,T1.blockNumberToHex,T1.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:zs.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:zs.eth_getBlockByHash,formatters:[null,T1.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:zs.eth_getBlockByNumber,formatters:[T1.blockNumberToHex,T1.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:zs.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:zs.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:zs.eth_getTransactionCount,formatters:[null,T1.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:zs.eth_gasPrice}),this.getEstimateGas=r=>this.buildRequest({call:zs.eth_estimateGas})([r]),this.setSafeSettings=this.buildRequest({call:zs.safe_setSettings})}buildRequest(e){let{call:r,formatters:n}=e;return async i=>{n&&Array.isArray(i)&&n.forEach((c,l)=>{c&&(i[l]=c(i[l]))});let o={call:r,params:i||[]};return(await this.communicator.send(No.rpcCall,o)).data}}}});var FCe,UCe,DCe=F(()=>{FCe="0x1626ba7e",UCe="0x20c13b0b"});var Sv,UY=F(()=>{Sv=class t extends Error{constructor(e,r,n){super(e),this.code=r,this.data=n,Object.setPrototypeOf(this,t.prototype)}}});var S5,DY=F(()=>{a2();UY();S5=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(No.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new Sv("Permissions request is invalid",4001);try{return(await this.communicator.send(No.wallet_requestPermissions,e)).data}catch{throw new Sv("Permissions rejected",4001)}}isPermissionRequestValid(e){return e.every(r=>typeof r=="object"?Object.keys(r).every(n=>!!Object.values(a9).includes(n)):!1)}}});var jCe,Sxt,$Ce,qCe=F(()=>{DY();UY();jCe=(t,e)=>e.some(r=>r.parentCapability===t),Sxt=()=>(t,e,r)=>{let n=r.value;return r.value=async function(){let i=new S5(this.communicator),o=await i.getPermissions();if(jCe(e,o)||(o=await i.requestPermissions([{[e]:{}}])),!jCe(e,o))throw new Sv("Permissions rejected",4001);return n.apply(this)},r},$Ce=Sxt});var _xt,d9,HCe=F(()=>{vc();DCe();a2();kB();IB();qCe();_xt=function(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o},d9=class{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(No.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(No.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(No.getSafeBalances,{currency:e})).data}async check1271Signature(e,r="0x"){let n=await this.getInfo(),i=Fs({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,r]}),o={call:zs.eth_call,params:[{to:n.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(No.rpcCall,o)).data.slice(0,10).toLowerCase()===FCe}catch{return!1}}async check1271SignatureBytes(e,r="0x"){let n=await this.getInfo(),i=Fs({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,r]}),o={call:zs.eth_call,params:[{to:n.safeAddress,data:i},"latest"]};try{return(await this.communicator.send(No.rpcCall,o)).data.slice(0,10).toLowerCase()===UCe}catch{return!1}}calculateMessageHash(e){return uV(e)}calculateTypedMessageHash(e){let r=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId),n=e.primaryType;if(!n){let i=Object.values(e.types),o=Object.keys(e.types).filter(s=>i.every(c=>c.every(({type:l})=>l.replace("[","").replace("]","")!==s)));if(o.length===0||o.length>1)throw new Error("Please specify primaryType");n=o[0]}return cV({message:e.message,domain:{...e.domain,chainId:r,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:n})}async getOffChainSignature(e){return(await this.communicator.send(No.getOffChainSignature,e)).data}async isMessageSigned(e,r="0x"){let n;if(typeof e=="string"&&(n=async()=>{let i=this.calculateMessageHash(e);return await this.isMessageHashSigned(i,r)}),c9(e)&&(n=async()=>{let i=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(i,r)}),n)return await n();throw new Error("Invalid message type")}async isMessageHashSigned(e,r="0x"){let n=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(let i of n)if(await i(e,r))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(No.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(No.requestAddressBook,void 0)).data}};_xt([$Ce()],d9.prototype,"requestAddressBook",null)});var jY,zCe,$Y=F(()=>{dCe();BCe();LCe();HCe();DY();jY=class{constructor(e={}){let{allowedDomains:r=null,debug:n=!1}=e;this.communicator=new hCe(r,n),this.eth=new RB(this.communicator),this.txs=new TB(this.communicator),this.safe=new d9(this.communicator),this.wallet=new S5(this.communicator)}},zCe=jY});var WCe={};Hr(WCe,{MessageFormatter:()=>s2,Methods:()=>No,Operation:()=>l2.Operation,RPC_CALLS:()=>zs,RestrictedMethods:()=>a9,TokenType:()=>l2.TokenType,TransactionStatus:()=>l2.TransactionStatus,TransferDirection:()=>l2.TransferDirection,default:()=>Ixt,getSDKVersion:()=>AB,isObjectEIP712TypedData:()=>c9});var Ixt,VCe=F(()=>{$Y();$Y();IB();a2();BY();OY();kB();Ixt=zCe});var KCe=X(NB=>{"use strict";Object.defineProperty(NB,"__esModule",{value:!0});NB.getLowerCase=void 0;function Txt(t){return t&&t.toLowerCase()}NB.getLowerCase=Txt});var GCe=X(OB=>{"use strict";Object.defineProperty(OB,"__esModule",{value:!0});OB.SafeAppProvider=void 0;var kxt=Hh(),PB=KCe(),qY=class extends kxt.EventEmitter{constructor(e,r){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=r}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){let{method:r,params:n=[]}=e;switch(r){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{let[l,u]=n;if(this.safe.safeAddress.toLowerCase()!==u.toLowerCase())throw new Error("The address or message hash is invalid");let d=await this.sdk.txs.signMessage(l);return("signature"in d?d.signature:void 0)||"0x"}case"eth_sign":{let[l,u]=n;if(this.safe.safeAddress.toLowerCase()!==l.toLowerCase()||!u.startsWith("0x"))throw new Error("The address or message hash is invalid");let d=await this.sdk.txs.signMessage(u);return("signature"in d?d.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{let[l,u]=n,d=typeof u=="string"?JSON.parse(u):u;if(this.safe.safeAddress.toLowerCase()!==l.toLowerCase())throw new Error("The address is invalid");let p=await this.sdk.txs.signTypedMessage(d);return("signature"in p?p.signature:void 0)||"0x"}case"eth_sendTransaction":let i={...n[0],value:n[0].value||"0",data:n[0].data||"0x"};typeof i.gas=="string"&&i.gas.startsWith("0x")&&(i.gas=parseInt(i.gas,16));let o=await this.sdk.txs.send({txs:[i],params:{safeTxGas:i.gas}});return this.submittedTxs.set(o.safeTxHash,{from:this.safe.safeAddress,hash:o.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:i.data,value:i.value,to:i.to,blockHash:null,blockNumber:null,transactionIndex:null}),o.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,PB.getLowerCase)(n[0]),n[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,PB.getLowerCase)(n[0]),n[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,PB.getLowerCase)(n[0]),n[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,PB.getLowerCase)(n[0]),n[1],n[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([n[0],n[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([n[0],n[1]]);case"eth_getTransactionByHash":let c=n[0];try{c=(await this.sdk.txs.getBySafeTxHash(c)).txHash||c}catch{}return this.submittedTxs.has(c)?this.submittedTxs.get(c):this.sdk.eth.getTransactionByHash([c]).then(l=>(l&&(l.hash=n[0]),l));case"eth_getTransactionReceipt":{let l=n[0];try{l=(await this.sdk.txs.getBySafeTxHash(l)).txHash||l}catch{}return this.sdk.eth.getTransactionReceipt([l]).then(u=>(u&&(u.transactionHash=n[0]),u))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(n[0]);case"eth_call":return this.sdk.eth.call([n[0],n[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([n[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(n[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([n[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,r){e||r("Undefined request"),this.request(e).then(n=>r(null,{jsonrpc:"2.0",id:e.id,result:n})).catch(n=>r(n,null))}};OB.SafeAppProvider=qY});var QCe=X(BB=>{"use strict";Object.defineProperty(BB,"__esModule",{value:!0});BB.SafeAppProvider=void 0;var Rxt=GCe();Object.defineProperty(BB,"SafeAppProvider",{enumerable:!0,get:function(){return Rxt.SafeAppProvider}})});var _5={};Hr(_5,{__assign:()=>zY,__asyncDelegator:()=>Hxt,__asyncGenerator:()=>qxt,__asyncValues:()=>zxt,__await:()=>m9,__awaiter:()=>Lxt,__classPrivateFieldGet:()=>Gxt,__classPrivateFieldSet:()=>Qxt,__createBinding:()=>Uxt,__decorate:()=>Pxt,__exportStar:()=>Dxt,__extends:()=>Mxt,__generator:()=>Fxt,__importDefault:()=>Kxt,__importStar:()=>Vxt,__makeTemplateObject:()=>Wxt,__metadata:()=>Bxt,__param:()=>Oxt,__read:()=>ZCe,__rest:()=>Nxt,__spread:()=>jxt,__spreadArrays:()=>$xt,__values:()=>WY});function Mxt(t,e){HY(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function Nxt(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i=0;c--)(s=t[c])&&(o=(i<3?s(o):i>3?s(e,r,o):s(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function Oxt(t,e){return function(r,n){e(r,n,t)}}function Bxt(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Lxt(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(d){try{u(n.next(d))}catch(p){s(p)}}function l(d){try{u(n.throw(d))}catch(p){s(p)}}function u(d){d.done?o(d.value):i(d.value).then(c,l)}u((n=n.apply(t,e||[])).next())})}function Fxt(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(d){return l([u,d])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ZCe(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function jxt(){for(var t=[],e=0;e1||c(v,y)})})}function c(v,y){try{l(n[v](y))}catch(_){p(o[0][3],_)}}function l(v){v.value instanceof m9?Promise.resolve(v.value.v).then(u,d):p(o[0][2],v)}function u(v){c("next",v)}function d(v){c("throw",v)}function p(v,y){v(y),o.shift(),o.length&&c(o[0][0],o[0][1])}}function Hxt(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(s){return(r=!r)?{value:m9(t[i](s)),done:i==="return"}:o?o(s):s}:o}}function zxt(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof WY=="function"?WY(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(s){return new Promise(function(c,l){s=t[o](s),i(c,l,s.done,s.value)})}}function i(o,s,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},s)}}function Wxt(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Vxt(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Kxt(t){return t&&t.__esModule?t:{default:t}}function Gxt(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Qxt(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}var HY,zY,I5=F(()=>{HY=function(t,e){return HY=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},HY(t,e)};zY=function(){return zY=Object.assign||function(e){for(var r,n=1,i=arguments.length;n{"use strict";Object.defineProperty(LB,"__esModule",{value:!0});LB.delay=void 0;function Zxt(t){return new Promise(e=>{setTimeout(()=>{e(!0)},t)})}LB.delay=Zxt});var JCe=X(T5=>{"use strict";Object.defineProperty(T5,"__esModule",{value:!0});T5.ONE_THOUSAND=T5.ONE_HUNDRED=void 0;T5.ONE_HUNDRED=100;T5.ONE_THOUSAND=1e3});var XCe=X(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.ONE_YEAR=zt.FOUR_WEEKS=zt.THREE_WEEKS=zt.TWO_WEEKS=zt.ONE_WEEK=zt.THIRTY_DAYS=zt.SEVEN_DAYS=zt.FIVE_DAYS=zt.THREE_DAYS=zt.ONE_DAY=zt.TWENTY_FOUR_HOURS=zt.TWELVE_HOURS=zt.SIX_HOURS=zt.THREE_HOURS=zt.ONE_HOUR=zt.SIXTY_MINUTES=zt.THIRTY_MINUTES=zt.TEN_MINUTES=zt.FIVE_MINUTES=zt.ONE_MINUTE=zt.SIXTY_SECONDS=zt.THIRTY_SECONDS=zt.TEN_SECONDS=zt.FIVE_SECONDS=zt.ONE_SECOND=void 0;zt.ONE_SECOND=1;zt.FIVE_SECONDS=5;zt.TEN_SECONDS=10;zt.THIRTY_SECONDS=30;zt.SIXTY_SECONDS=60;zt.ONE_MINUTE=zt.SIXTY_SECONDS;zt.FIVE_MINUTES=zt.ONE_MINUTE*5;zt.TEN_MINUTES=zt.ONE_MINUTE*10;zt.THIRTY_MINUTES=zt.ONE_MINUTE*30;zt.SIXTY_MINUTES=zt.ONE_MINUTE*60;zt.ONE_HOUR=zt.SIXTY_MINUTES;zt.THREE_HOURS=zt.ONE_HOUR*3;zt.SIX_HOURS=zt.ONE_HOUR*6;zt.TWELVE_HOURS=zt.ONE_HOUR*12;zt.TWENTY_FOUR_HOURS=zt.ONE_HOUR*24;zt.ONE_DAY=zt.TWENTY_FOUR_HOURS;zt.THREE_DAYS=zt.ONE_DAY*3;zt.FIVE_DAYS=zt.ONE_DAY*5;zt.SEVEN_DAYS=zt.ONE_DAY*7;zt.THIRTY_DAYS=zt.ONE_DAY*30;zt.ONE_WEEK=zt.SEVEN_DAYS;zt.TWO_WEEKS=zt.ONE_WEEK*2;zt.THREE_WEEKS=zt.ONE_WEEK*3;zt.FOUR_WEEKS=zt.ONE_WEEK*4;zt.ONE_YEAR=zt.ONE_DAY*365});var VY=X(FB=>{"use strict";Object.defineProperty(FB,"__esModule",{value:!0});var eEe=(I5(),Vn(_5));eEe.__exportStar(JCe(),FB);eEe.__exportStar(XCe(),FB)});var rEe=X(k5=>{"use strict";Object.defineProperty(k5,"__esModule",{value:!0});k5.fromMiliseconds=k5.toMiliseconds=void 0;var tEe=VY();function Yxt(t){return t*tEe.ONE_THOUSAND}k5.toMiliseconds=Yxt;function Jxt(t){return Math.floor(t/tEe.ONE_THOUSAND)}k5.fromMiliseconds=Jxt});var iEe=X(UB=>{"use strict";Object.defineProperty(UB,"__esModule",{value:!0});var nEe=(I5(),Vn(_5));nEe.__exportStar(YCe(),UB);nEe.__exportStar(rEe(),UB)});var oEe=X(g9=>{"use strict";Object.defineProperty(g9,"__esModule",{value:!0});g9.Watch=void 0;var DB=class{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw new Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let r=this.get(e);if(typeof r.elapsed<"u")throw new Error(`Watch already stopped for label: ${e}`);let n=Date.now()-r.started;this.timestamps.set(e,{started:r.started,elapsed:n})}get(e){let r=this.timestamps.get(e);if(typeof r>"u")throw new Error(`No timestamp found for label: ${e}`);return r}elapsed(e){let r=this.get(e);return r.elapsed||Date.now()-r.started}};g9.Watch=DB;g9.default=DB});var sEe=X(jB=>{"use strict";Object.defineProperty(jB,"__esModule",{value:!0});jB.IWatch=void 0;var KY=class{};jB.IWatch=KY});var aEe=X(GY=>{"use strict";Object.defineProperty(GY,"__esModule",{value:!0});var Xxt=(I5(),Vn(_5));Xxt.__exportStar(sEe(),GY)});var QY=X(R5=>{"use strict";Object.defineProperty(R5,"__esModule",{value:!0});var $B=(I5(),Vn(_5));$B.__exportStar(iEe(),R5);$B.__exportStar(oEe(),R5);$B.__exportStar(aEe(),R5);$B.__exportStar(VY(),R5)});var qB=X(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.getLocalStorage=Pi.getLocalStorageOrThrow=Pi.getCrypto=Pi.getCryptoOrThrow=Pi.getLocation=Pi.getLocationOrThrow=Pi.getNavigator=Pi.getNavigatorOrThrow=Pi.getDocument=Pi.getDocumentOrThrow=Pi.getFromWindowOrThrow=Pi.getFromWindow=void 0;function _v(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}Pi.getFromWindow=_v;function M5(t){let e=_v(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Pi.getFromWindowOrThrow=M5;function e7t(){return M5("document")}Pi.getDocumentOrThrow=e7t;function t7t(){return _v("document")}Pi.getDocument=t7t;function r7t(){return M5("navigator")}Pi.getNavigatorOrThrow=r7t;function n7t(){return _v("navigator")}Pi.getNavigator=n7t;function i7t(){return M5("location")}Pi.getLocationOrThrow=i7t;function o7t(){return _v("location")}Pi.getLocation=o7t;function s7t(){return M5("crypto")}Pi.getCryptoOrThrow=s7t;function a7t(){return _v("crypto")}Pi.getCrypto=a7t;function c7t(){return M5("localStorage")}Pi.getLocalStorageOrThrow=c7t;function l7t(){return _v("localStorage")}Pi.getLocalStorage=l7t});var ZY=X(HB=>{"use strict";Object.defineProperty(HB,"__esModule",{value:!0});HB.getWindowMetadata=void 0;var cEe=qB();function u7t(){let t,e;try{t=cEe.getDocumentOrThrow(),e=cEe.getLocationOrThrow()}catch{return null}function r(){let p=t.getElementsByTagName("link"),v=[];for(let y=0;y-1){let P=_.getAttribute("href");if(P)if(P.toLowerCase().indexOf("https:")===-1&&P.toLowerCase().indexOf("http:")===-1&&P.indexOf("//")!==0){let k=e.protocol+"//"+e.host;if(P.indexOf("/")===0)k+=P;else{let M=e.pathname.split("/");M.pop();let L=M.join("/");k+=L+"/"+P}v.push(k)}else if(P.indexOf("//")===0){let k=e.protocol+P;v.push(k)}else v.push(P)}}return v}function n(...p){let v=t.getElementsByTagName("meta");for(let y=0;y_.getAttribute(P)).filter(P=>P?p.includes(P):!1);if(R.length&&R){let P=_.getAttribute("content");if(P)return P}}return""}function i(){let p=n("name","og:site_name","og:title","twitter:title");return p||(p=t.title),p}function o(){return n("description","og:description","twitter:description","keywords")}let s=i(),c=o(),l=e.origin,u=r();return{description:c,url:l,icons:u,name:s}}HB.getWindowMetadata=u7t});var uEe=X((hCr,lEe)=>{"use strict";lEe.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)});var mEe=X((dCr,pEe)=>{"use strict";var dEe="%[a-f0-9]{2}",fEe=new RegExp("("+dEe+")|([^%]+?)","gi"),hEe=new RegExp("("+dEe+")+","gi");function YY(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],YY(r),YY(n))}function f7t(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(fEe)||[],r=1;r{"use strict";gEe.exports=(t,e)=>{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];let r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]}});var yEe=X((mCr,vEe)=>{"use strict";vEe.exports=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),o=0;o{"use strict";var d7t=uEe(),p7t=mEe(),xEe=wEe(),m7t=yEe(),g7t=t=>t==null,JY=Symbol("encodeFragmentIdentifier");function w7t(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{let i=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Yo(e,t),"[",i,"]"].join("")]:[...r,[Yo(e,t),"[",Yo(i,t),"]=",Yo(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Yo(e,t),"[]"].join("")]:[...r,[Yo(e,t),"[]=",Yo(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Yo(e,t),":list="].join("")]:[...r,[Yo(e,t),":list=",Yo(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{let e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||t.skipNull&&i===null||t.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Yo(r,t),e,Yo(i,t)].join("")]:[[n,Yo(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Yo(e,t)]:[...r,[Yo(e,t),"=",Yo(n,t)].join("")]}}function v7t(t){let e;switch(t.arrayFormat){case"index":return(r,n,i)=>{if(e=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!e){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][e[1]]=n};case"bracket":return(r,n,i)=>{if(e=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"colon-list-separator":return(r,n,i)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"comma":case"separator":return(r,n,i)=>{let o=typeof n=="string"&&n.includes(t.arrayFormatSeparator),s=typeof n=="string"&&!o&&k1(n,t).includes(t.arrayFormatSeparator);n=s?k1(n,t):n;let c=o||s?n.split(t.arrayFormatSeparator).map(l=>k1(l,t)):n===null?n:k1(n,t);i[r]=c};case"bracket-separator":return(r,n,i)=>{let o=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!o){i[r]=n&&k1(n,t);return}let s=n===null?[]:n.split(t.arrayFormatSeparator).map(c=>k1(c,t));if(i[r]===void 0){i[r]=s;return}i[r]=[].concat(i[r],s)};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[].concat(i[r],n)}}}function CEe(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Yo(t,e){return e.encode?e.strict?d7t(t):encodeURIComponent(t):t}function k1(t,e){return e.decode?p7t(t):t}function EEe(t){return Array.isArray(t)?t.sort():typeof t=="object"?EEe(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function AEe(t){let e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function y7t(t){let e="",r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function SEe(t){t=AEe(t);let e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function bEe(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function _Ee(t,e){e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e),CEe(e.arrayFormatSeparator);let r=v7t(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(let i of t.split("&")){if(i==="")continue;let[o,s]=xEe(e.decode?i.replace(/\+/g," "):i,"=");s=s===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?s:k1(s,e),r(k1(o,e),s,n)}for(let i of Object.keys(n)){let o=n[i];if(typeof o=="object"&&o!==null)for(let s of Object.keys(o))o[s]=bEe(o[s],e);else n[i]=bEe(o,e)}return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,o)=>{let s=n[o];return s&&typeof s=="object"&&!Array.isArray(s)?i[o]=EEe(s):i[o]=s,i},Object.create(null))}fl.extract=SEe;fl.parse=_Ee;fl.stringify=(t,e)=>{if(!t)return"";e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e),CEe(e.arrayFormatSeparator);let r=s=>e.skipNull&&g7t(t[s])||e.skipEmptyString&&t[s]==="",n=w7t(e),i={};for(let s of Object.keys(t))r(s)||(i[s]=t[s]);let o=Object.keys(i);return e.sort!==!1&&o.sort(e.sort),o.map(s=>{let c=t[s];return c===void 0?"":c===null?Yo(s,e):Array.isArray(c)?c.length===0&&e.arrayFormat==="bracket-separator"?Yo(s,e)+"[]":c.reduce(n(s),[]).join("&"):Yo(s,e)+"="+Yo(c,e)}).filter(s=>s.length>0).join("&")};fl.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);let[r,n]=xEe(t,"#");return Object.assign({url:r.split("?")[0]||"",query:_Ee(SEe(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:k1(n,e)}:{})};fl.stringifyUrl=(t,e)=>{e=Object.assign({encode:!0,strict:!0,[JY]:!0},e);let r=AEe(t.url).split("?")[0]||"",n=fl.extract(t.url),i=fl.parse(n,{sort:!1}),o=Object.assign(i,t.query),s=fl.stringify(o,e);s&&(s=`?${s}`);let c=y7t(t.url);return t.fragmentIdentifier&&(c=`#${e[JY]?Yo(t.fragmentIdentifier,e):t.fragmentIdentifier}`),`${r}${s}${c}`};fl.pick=(t,e,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[JY]:!1},r);let{url:n,query:i,fragmentIdentifier:o}=fl.parseUrl(t,r);return fl.stringifyUrl({url:n,query:m7t(i,e),fragmentIdentifier:o},r)};fl.exclude=(t,e,r)=>{let n=Array.isArray(e)?i=>!e.includes(i):(i,o)=>!e(i,o);return fl.pick(t,n,r)}});var IEe=X(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});function b7t(t,e){var r=t>>>16&65535,n=t&65535,i=e>>>16&65535,o=e&65535;return n*o+(r*o+n*i<<16>>>0)|0}tu.mul=Math.imul||b7t;function x7t(t,e){return t+e|0}tu.add=x7t;function C7t(t,e){return t-e|0}tu.sub=C7t;function E7t(t,e){return t<>>32-e}tu.rotl=E7t;function A7t(t,e){return t<<32-e|t>>>e}tu.rotr=A7t;function S7t(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}tu.isInteger=Number.isInteger||S7t;tu.MAX_SAFE_INTEGER=9007199254740991;tu.isSafeInteger=function(t){return tu.isInteger(t)&&t>=-tu.MAX_SAFE_INTEGER&&t<=tu.MAX_SAFE_INTEGER}});var w9=X(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});var TEe=IEe();function _7t(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}xn.readInt16BE=_7t;function I7t(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}xn.readUint16BE=I7t;function T7t(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}xn.readInt16LE=T7t;function k7t(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}xn.readUint16LE=k7t;function kEe(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}xn.writeUint16BE=kEe;xn.writeInt16BE=kEe;function REe(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}xn.writeUint16LE=REe;xn.writeInt16LE=REe;function eJ(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}xn.readInt32BE=eJ;function tJ(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}xn.readUint32BE=tJ;function rJ(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}xn.readInt32LE=rJ;function nJ(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}xn.readUint32LE=nJ;function zB(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}xn.writeUint32BE=zB;xn.writeInt32BE=zB;function WB(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}xn.writeUint32LE=WB;xn.writeInt32LE=WB;function R7t(t,e){e===void 0&&(e=0);var r=eJ(t,e),n=eJ(t,e+4);return r*4294967296+n-(n>>31)*4294967296}xn.readInt64BE=R7t;function M7t(t,e){e===void 0&&(e=0);var r=tJ(t,e),n=tJ(t,e+4);return r*4294967296+n}xn.readUint64BE=M7t;function N7t(t,e){e===void 0&&(e=0);var r=rJ(t,e),n=rJ(t,e+4);return n*4294967296+r-(r>>31)*4294967296}xn.readInt64LE=N7t;function P7t(t,e){e===void 0&&(e=0);var r=nJ(t,e),n=nJ(t,e+4);return n*4294967296+r}xn.readUint64LE=P7t;function MEe(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),zB(t/4294967296>>>0,e,r),zB(t>>>0,e,r+4),e}xn.writeUint64BE=MEe;xn.writeInt64BE=MEe;function NEe(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),WB(t>>>0,e,r),WB(t/4294967296>>>0,e,r+4),e}xn.writeUint64LE=NEe;xn.writeInt64LE=NEe;function O7t(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,o=t/8+r-1;o>=r;o--)n+=e[o]*i,i*=256;return n}xn.readUintBE=O7t;function B7t(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,o=r;o=n;o--)r[o]=e/i&255,i*=256;return r}xn.writeUintBE=L7t;function F7t(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!TEe.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,o=n;o{"use strict";Object.defineProperty(iJ,"__esModule",{value:!0});function V7t(t){for(var e=0;e{"use strict";Object.defineProperty(VB,"__esModule",{value:!0});var Ha=w9(),oJ=fd(),K7t=20;function G7t(t,e,r){for(var n=1634760805,i=857760878,o=2036477234,s=1797285236,c=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],u=r[11]<<24|r[10]<<16|r[9]<<8|r[8],d=r[15]<<24|r[14]<<16|r[13]<<8|r[12],p=r[19]<<24|r[18]<<16|r[17]<<8|r[16],v=r[23]<<24|r[22]<<16|r[21]<<8|r[20],y=r[27]<<24|r[26]<<16|r[25]<<8|r[24],_=r[31]<<24|r[30]<<16|r[29]<<8|r[28],R=e[3]<<24|e[2]<<16|e[1]<<8|e[0],P=e[7]<<24|e[6]<<16|e[5]<<8|e[4],k=e[11]<<24|e[10]<<16|e[9]<<8|e[8],M=e[15]<<24|e[14]<<16|e[13]<<8|e[12],L=n,D=i,j=o,V=s,K=c,B=l,W=u,z=d,q=p,Q=v,f=y,h=_,g=R,x=P,S=k,T=M,N=0;N>>16|g<<16,q=q+g|0,K^=q,K=K>>>20|K<<12,D=D+B|0,x^=D,x=x>>>16|x<<16,Q=Q+x|0,B^=Q,B=B>>>20|B<<12,j=j+W|0,S^=j,S=S>>>16|S<<16,f=f+S|0,W^=f,W=W>>>20|W<<12,V=V+z|0,T^=V,T=T>>>16|T<<16,h=h+T|0,z^=h,z=z>>>20|z<<12,j=j+W|0,S^=j,S=S>>>24|S<<8,f=f+S|0,W^=f,W=W>>>25|W<<7,V=V+z|0,T^=V,T=T>>>24|T<<8,h=h+T|0,z^=h,z=z>>>25|z<<7,D=D+B|0,x^=D,x=x>>>24|x<<8,Q=Q+x|0,B^=Q,B=B>>>25|B<<7,L=L+K|0,g^=L,g=g>>>24|g<<8,q=q+g|0,K^=q,K=K>>>25|K<<7,L=L+B|0,T^=L,T=T>>>16|T<<16,f=f+T|0,B^=f,B=B>>>20|B<<12,D=D+W|0,g^=D,g=g>>>16|g<<16,h=h+g|0,W^=h,W=W>>>20|W<<12,j=j+z|0,x^=j,x=x>>>16|x<<16,q=q+x|0,z^=q,z=z>>>20|z<<12,V=V+K|0,S^=V,S=S>>>16|S<<16,Q=Q+S|0,K^=Q,K=K>>>20|K<<12,j=j+z|0,x^=j,x=x>>>24|x<<8,q=q+x|0,z^=q,z=z>>>25|z<<7,V=V+K|0,S^=V,S=S>>>24|S<<8,Q=Q+S|0,K^=Q,K=K>>>25|K<<7,D=D+W|0,g^=D,g=g>>>24|g<<8,h=h+g|0,W^=h,W=W>>>25|W<<7,L=L+B|0,T^=L,T=T>>>24|T<<8,f=f+T|0,B^=f,B=B>>>25|B<<7;Ha.writeUint32LE(L+n|0,t,0),Ha.writeUint32LE(D+i|0,t,4),Ha.writeUint32LE(j+o|0,t,8),Ha.writeUint32LE(V+s|0,t,12),Ha.writeUint32LE(K+c|0,t,16),Ha.writeUint32LE(B+l|0,t,20),Ha.writeUint32LE(W+u|0,t,24),Ha.writeUint32LE(z+d|0,t,28),Ha.writeUint32LE(q+p|0,t,32),Ha.writeUint32LE(Q+v|0,t,36),Ha.writeUint32LE(f+y|0,t,40),Ha.writeUint32LE(h+_|0,t,44),Ha.writeUint32LE(g+R|0,t,48),Ha.writeUint32LE(x+P|0,t,52),Ha.writeUint32LE(S+k|0,t,56),Ha.writeUint32LE(T+M|0,t,60)}function PEe(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}});var KB=X(N5=>{"use strict";Object.defineProperty(N5,"__esModule",{value:!0});function Y7t(t,e,r){return~(t-1)&e|t-1&r}N5.select=Y7t;function J7t(t,e){return(t|0)-(e|0)-1>>>31&1}N5.lessOrEqual=J7t;function BEe(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}N5.compare=BEe;function X7t(t,e){return t.length===0||e.length===0?!1:BEe(t,e)!==0}N5.equal=X7t});var FEe=X(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});var e8t=KB(),GB=fd();R1.DIGEST_LENGTH=16;var LEe=function(){function t(e){this.digestLength=R1.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var r=e[0]|e[1]<<8;this._r[0]=r&8191;var n=e[2]|e[3]<<8;this._r[1]=(r>>>13|n<<3)&8191;var i=e[4]|e[5]<<8;this._r[2]=(n>>>10|i<<6)&7939;var o=e[6]|e[7]<<8;this._r[3]=(i>>>7|o<<9)&8191;var s=e[8]|e[9]<<8;this._r[4]=(o>>>4|s<<12)&255,this._r[5]=s>>>1&8190;var c=e[10]|e[11]<<8;this._r[6]=(s>>>14|c<<2)&8191;var l=e[12]|e[13]<<8;this._r[7]=(c>>>11|l<<5)&8065;var u=e[14]|e[15]<<8;this._r[8]=(l>>>8|u<<8)&8191,this._r[9]=u>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return t.prototype._blocks=function(e,r,n){for(var i=this._fin?0:2048,o=this._h[0],s=this._h[1],c=this._h[2],l=this._h[3],u=this._h[4],d=this._h[5],p=this._h[6],v=this._h[7],y=this._h[8],_=this._h[9],R=this._r[0],P=this._r[1],k=this._r[2],M=this._r[3],L=this._r[4],D=this._r[5],j=this._r[6],V=this._r[7],K=this._r[8],B=this._r[9];n>=16;){var W=e[r+0]|e[r+1]<<8;o+=W&8191;var z=e[r+2]|e[r+3]<<8;s+=(W>>>13|z<<3)&8191;var q=e[r+4]|e[r+5]<<8;c+=(z>>>10|q<<6)&8191;var Q=e[r+6]|e[r+7]<<8;l+=(q>>>7|Q<<9)&8191;var f=e[r+8]|e[r+9]<<8;u+=(Q>>>4|f<<12)&8191,d+=f>>>1&8191;var h=e[r+10]|e[r+11]<<8;p+=(f>>>14|h<<2)&8191;var g=e[r+12]|e[r+13]<<8;v+=(h>>>11|g<<5)&8191;var x=e[r+14]|e[r+15]<<8;y+=(g>>>8|x<<8)&8191,_+=x>>>5|i;var S=0,T=S;T+=o*R,T+=s*(5*B),T+=c*(5*K),T+=l*(5*V),T+=u*(5*j),S=T>>>13,T&=8191,T+=d*(5*D),T+=p*(5*L),T+=v*(5*M),T+=y*(5*k),T+=_*(5*P),S+=T>>>13,T&=8191;var N=S;N+=o*P,N+=s*R,N+=c*(5*B),N+=l*(5*K),N+=u*(5*V),S=N>>>13,N&=8191,N+=d*(5*j),N+=p*(5*D),N+=v*(5*L),N+=y*(5*M),N+=_*(5*k),S+=N>>>13,N&=8191;var I=S;I+=o*k,I+=s*P,I+=c*R,I+=l*(5*B),I+=u*(5*K),S=I>>>13,I&=8191,I+=d*(5*V),I+=p*(5*j),I+=v*(5*D),I+=y*(5*L),I+=_*(5*M),S+=I>>>13,I&=8191;var m=S;m+=o*M,m+=s*k,m+=c*P,m+=l*R,m+=u*(5*B),S=m>>>13,m&=8191,m+=d*(5*K),m+=p*(5*V),m+=v*(5*j),m+=y*(5*D),m+=_*(5*L),S+=m>>>13,m&=8191;var C=S;C+=o*L,C+=s*M,C+=c*k,C+=l*P,C+=u*R,S=C>>>13,C&=8191,C+=d*(5*B),C+=p*(5*K),C+=v*(5*V),C+=y*(5*j),C+=_*(5*D),S+=C>>>13,C&=8191;var Y=S;Y+=o*D,Y+=s*L,Y+=c*M,Y+=l*k,Y+=u*P,S=Y>>>13,Y&=8191,Y+=d*R,Y+=p*(5*B),Y+=v*(5*K),Y+=y*(5*V),Y+=_*(5*j),S+=Y>>>13,Y&=8191;var ne=S;ne+=o*j,ne+=s*D,ne+=c*L,ne+=l*M,ne+=u*k,S=ne>>>13,ne&=8191,ne+=d*P,ne+=p*R,ne+=v*(5*B),ne+=y*(5*K),ne+=_*(5*V),S+=ne>>>13,ne&=8191;var b=S;b+=o*V,b+=s*j,b+=c*D,b+=l*L,b+=u*M,S=b>>>13,b&=8191,b+=d*k,b+=p*P,b+=v*R,b+=y*(5*B),b+=_*(5*K),S+=b>>>13,b&=8191;var H=S;H+=o*K,H+=s*V,H+=c*j,H+=l*D,H+=u*L,S=H>>>13,H&=8191,H+=d*M,H+=p*k,H+=v*P,H+=y*R,H+=_*(5*B),S+=H>>>13,H&=8191;var G=S;G+=o*B,G+=s*K,G+=c*V,G+=l*j,G+=u*D,S=G>>>13,G&=8191,G+=d*L,G+=p*M,G+=v*k,G+=y*P,G+=_*R,S+=G>>>13,G&=8191,S=(S<<2)+S|0,S=S+T|0,T=S&8191,S=S>>>13,N+=S,o=T,s=N,c=I,l=m,u=C,d=Y,p=ne,v=b,y=H,_=G,r+=16,n-=16}this._h[0]=o,this._h[1]=s,this._h[2]=c,this._h[3]=l,this._h[4]=u,this._h[5]=d,this._h[6]=p,this._h[7]=v,this._h[8]=y,this._h[9]=_},t.prototype.finish=function(e,r){r===void 0&&(r=0);var n=new Uint16Array(10),i,o,s,c;if(this._leftover){for(c=this._leftover,this._buffer[c++]=1;c<16;c++)this._buffer[c]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(i=this._h[1]>>>13,this._h[1]&=8191,c=2;c<10;c++)this._h[c]+=i,i=this._h[c]>>>13,this._h[c]&=8191;for(this._h[0]+=i*5,i=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=i,i=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=i,n[0]=this._h[0]+5,i=n[0]>>>13,n[0]&=8191,c=1;c<10;c++)n[c]=this._h[c]+i,i=n[c]>>>13,n[c]&=8191;for(n[9]-=8192,o=(i^1)-1,c=0;c<10;c++)n[c]&=o;for(o=~o,c=0;c<10;c++)this._h[c]=this._h[c]&o|n[c];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,s=this._h[0]+this._pad[0],this._h[0]=s&65535,c=1;c<8;c++)s=(this._h[c]+this._pad[c]|0)+(s>>>16)|0,this._h[c]=s&65535;return e[r+0]=this._h[0]>>>0,e[r+1]=this._h[0]>>>8,e[r+2]=this._h[1]>>>0,e[r+3]=this._h[1]>>>8,e[r+4]=this._h[2]>>>0,e[r+5]=this._h[2]>>>8,e[r+6]=this._h[3]>>>0,e[r+7]=this._h[3]>>>8,e[r+8]=this._h[4]>>>0,e[r+9]=this._h[4]>>>8,e[r+10]=this._h[5]>>>0,e[r+11]=this._h[5]>>>8,e[r+12]=this._h[6]>>>0,e[r+13]=this._h[6]>>>8,e[r+14]=this._h[7]>>>0,e[r+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var r=0,n=e.length,i;if(this._leftover){i=16-this._leftover,i>n&&(i=n);for(var o=0;o=16&&(i=n-n%16,this._blocks(e,r,i),r+=i,n-=i),n){for(var o=0;o{"use strict";Object.defineProperty(M1,"__esModule",{value:!0});var QB=OEe(),n8t=FEe(),v9=fd(),UEe=w9(),i8t=KB();M1.KEY_LENGTH=32;M1.NONCE_LENGTH=12;M1.TAG_LENGTH=16;var DEe=new Uint8Array(16),o8t=function(){function t(e){if(this.nonceLength=M1.NONCE_LENGTH,this.tagLength=M1.TAG_LENGTH,e.length!==M1.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return t.prototype.seal=function(e,r,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(e,o.length-e.length);var s=new Uint8Array(32);QB.stream(this._key,o,s,4);var c=r.length+this.tagLength,l;if(i){if(i.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");l=i}else l=new Uint8Array(c);return QB.streamXOR(this._key,o,r,l,4),this._authenticate(l.subarray(l.length-this.tagLength,l.length),s,l.subarray(0,l.length-this.tagLength),n),v9.wipe(o),l},t.prototype.open=function(e,r,n,i){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(r.length0&&o.update(DEe.subarray(i.length%16))),o.update(n),n.length%16>0&&o.update(DEe.subarray(n.length%16));var s=new Uint8Array(8);i&&UEe.writeUint64LE(i.length,s),o.update(s),UEe.writeUint64LE(n.length,s),o.update(s);for(var c=o.digest(),l=0;l{"use strict";Object.defineProperty(aJ,"__esModule",{value:!0});function s8t(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}aJ.isSerializableHash=s8t});var qEe=X(y9=>{"use strict";Object.defineProperty(y9,"__esModule",{value:!0});var hd=jEe(),a8t=KB(),c8t=fd(),$Ee=function(){function t(e,r){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i{"use strict";Object.defineProperty(cJ,"__esModule",{value:!0});var HEe=qEe(),zEe=fd(),u8t=function(){function t(e,r,n,i){n===void 0&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var o=HEe.hmac(this._hash,n,r);this._hmac=new HEe.HMAC(e,o),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(e===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n{"use strict";Object.defineProperty(ZB,"__esModule",{value:!0});ZB.BrowserRandomSource=void 0;var WEe=65536,uJ=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let e=typeof self<"u"?self.crypto||self.msCrypto:null;e&&e.getRandomValues!==void 0&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let r=new Uint8Array(e);for(let n=0;n{"use strict";Object.defineProperty(YB,"__esModule",{value:!0});YB.NodeRandomSource=void 0;var f8t=fd(),fJ=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof l6<"u"){let e=hM();e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(e);if(r.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");let n=new Uint8Array(e);for(let i=0;i{"use strict";Object.defineProperty(JB,"__esModule",{value:!0});JB.SystemRandomSource=void 0;var h8t=VEe(),d8t=KEe(),hJ=class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new h8t.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new d8t.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}};JB.SystemRandomSource=hJ});var XB=X(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.randomStringForEntropy=za.randomString=za.randomUint32=za.randomBytes=za.defaultRandomSource=void 0;var p8t=GEe(),m8t=w9(),QEe=fd();za.defaultRandomSource=new p8t.SystemRandomSource;function dJ(t,e=za.defaultRandomSource){return e.randomBytes(t)}za.randomBytes=dJ;function g8t(t=za.defaultRandomSource){let e=dJ(4,t),r=(0,m8t.readUint32LE)(e);return(0,QEe.wipe)(e),r}za.randomUint32=g8t;var ZEe="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function YEe(t,e=ZEe,r=za.defaultRandomSource){if(e.length<2)throw new Error("randomString charset is too short");if(e.length>256)throw new Error("randomString charset is too long");let n="",i=e.length,o=256-256%i;for(;t>0;){let s=dJ(Math.ceil(t*256/o),r);for(let c=0;c0;c++){let l=s[c];l{"use strict";Object.defineProperty(u2,"__esModule",{value:!0});var tL=w9(),eL=fd();u2.DIGEST_LENGTH=32;u2.BLOCK_SIZE=64;var JEe=function(){function t(){this.digestLength=u2.DIGEST_LENGTH,this.blockSize=u2.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return t.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){eL.wipe(this._buffer),eL.wipe(this._temp),this.reset()},t.prototype.update=function(e,r){if(r===void 0&&(r=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[n++],r--;this._bufferLength===this.blockSize&&(pJ(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=pJ(this._temp,this._state,e,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=e[n++],r--;return this},t.prototype.finish=function(e){if(!this._finished){var r=this._bytesHashed,n=this._bufferLength,i=r/536870912|0,o=r<<3,s=r%64<56?64:128;this._buffer[n]=128;for(var c=n+1;c0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},t.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(e){eL.wipe(e.state),e.buffer&&eL.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},t}();u2.SHA256=JEe;var v8t=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function pJ(t,e,r,n,i){for(;i>=64;){for(var o=e[0],s=e[1],c=e[2],l=e[3],u=e[4],d=e[5],p=e[6],v=e[7],y=0;y<16;y++){var _=n+y*4;t[y]=tL.readUint32BE(r,_)}for(var y=16;y<64;y++){var R=t[y-2],P=(R>>>17|R<<15)^(R>>>19|R<<13)^R>>>10;R=t[y-15];var k=(R>>>7|R<<25)^(R>>>18|R<<14)^R>>>3;t[y]=(P+t[y-7]|0)+(k+t[y-16]|0)}for(var y=0;y<64;y++){var P=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&d^~u&p)|0)+(v+(v8t[y]+t[y]|0)|0)|0,k=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&s^o&c^s&c)|0;v=p,p=d,d=u,u=l+P|0,l=c,c=s,s=o,o=P+k|0}e[0]+=o,e[1]+=s,e[2]+=c,e[3]+=l,e[4]+=u,e[5]+=d,e[6]+=p,e[7]+=v,n+=64,i-=64}return n}function y8t(t){var e=new JEe;e.update(t);var r=e.digest();return e.clean(),r}u2.hash=y8t});var vJ=X(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.sharedKey=Po.generateKeyPair=Po.generateKeyPairFromSeed=Po.scalarMultBase=Po.scalarMult=Po.SHARED_KEY_LENGTH=Po.SECRET_KEY_LENGTH=Po.PUBLIC_KEY_LENGTH=void 0;var b8t=XB(),x8t=fd();Po.PUBLIC_KEY_LENGTH=32;Po.SECRET_KEY_LENGTH=32;Po.SHARED_KEY_LENGTH=32;function dd(t){let e=new Float64Array(16);if(t)for(let r=0;r>16&1),r[s-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);let o=r[15]>>16&1;r[14]&=65535,b9(n,r,1-o)}for(let i=0;i<16;i++)t[2*i]=n[i]&255,t[2*i+1]=n[i]>>8}function A8t(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function rL(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}function nL(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}function N1(t,e,r){let n,i,o=0,s=0,c=0,l=0,u=0,d=0,p=0,v=0,y=0,_=0,R=0,P=0,k=0,M=0,L=0,D=0,j=0,V=0,K=0,B=0,W=0,z=0,q=0,Q=0,f=0,h=0,g=0,x=0,S=0,T=0,N=0,I=r[0],m=r[1],C=r[2],Y=r[3],ne=r[4],b=r[5],H=r[6],G=r[7],U=r[8],se=r[9],te=r[10],le=r[11],me=r[12],Ee=r[13],fe=r[14],Se=r[15];n=e[0],o+=n*I,s+=n*m,c+=n*C,l+=n*Y,u+=n*ne,d+=n*b,p+=n*H,v+=n*G,y+=n*U,_+=n*se,R+=n*te,P+=n*le,k+=n*me,M+=n*Ee,L+=n*fe,D+=n*Se,n=e[1],s+=n*I,c+=n*m,l+=n*C,u+=n*Y,d+=n*ne,p+=n*b,v+=n*H,y+=n*G,_+=n*U,R+=n*se,P+=n*te,k+=n*le,M+=n*me,L+=n*Ee,D+=n*fe,j+=n*Se,n=e[2],c+=n*I,l+=n*m,u+=n*C,d+=n*Y,p+=n*ne,v+=n*b,y+=n*H,_+=n*G,R+=n*U,P+=n*se,k+=n*te,M+=n*le,L+=n*me,D+=n*Ee,j+=n*fe,V+=n*Se,n=e[3],l+=n*I,u+=n*m,d+=n*C,p+=n*Y,v+=n*ne,y+=n*b,_+=n*H,R+=n*G,P+=n*U,k+=n*se,M+=n*te,L+=n*le,D+=n*me,j+=n*Ee,V+=n*fe,K+=n*Se,n=e[4],u+=n*I,d+=n*m,p+=n*C,v+=n*Y,y+=n*ne,_+=n*b,R+=n*H,P+=n*G,k+=n*U,M+=n*se,L+=n*te,D+=n*le,j+=n*me,V+=n*Ee,K+=n*fe,B+=n*Se,n=e[5],d+=n*I,p+=n*m,v+=n*C,y+=n*Y,_+=n*ne,R+=n*b,P+=n*H,k+=n*G,M+=n*U,L+=n*se,D+=n*te,j+=n*le,V+=n*me,K+=n*Ee,B+=n*fe,W+=n*Se,n=e[6],p+=n*I,v+=n*m,y+=n*C,_+=n*Y,R+=n*ne,P+=n*b,k+=n*H,M+=n*G,L+=n*U,D+=n*se,j+=n*te,V+=n*le,K+=n*me,B+=n*Ee,W+=n*fe,z+=n*Se,n=e[7],v+=n*I,y+=n*m,_+=n*C,R+=n*Y,P+=n*ne,k+=n*b,M+=n*H,L+=n*G,D+=n*U,j+=n*se,V+=n*te,K+=n*le,B+=n*me,W+=n*Ee,z+=n*fe,q+=n*Se,n=e[8],y+=n*I,_+=n*m,R+=n*C,P+=n*Y,k+=n*ne,M+=n*b,L+=n*H,D+=n*G,j+=n*U,V+=n*se,K+=n*te,B+=n*le,W+=n*me,z+=n*Ee,q+=n*fe,Q+=n*Se,n=e[9],_+=n*I,R+=n*m,P+=n*C,k+=n*Y,M+=n*ne,L+=n*b,D+=n*H,j+=n*G,V+=n*U,K+=n*se,B+=n*te,W+=n*le,z+=n*me,q+=n*Ee,Q+=n*fe,f+=n*Se,n=e[10],R+=n*I,P+=n*m,k+=n*C,M+=n*Y,L+=n*ne,D+=n*b,j+=n*H,V+=n*G,K+=n*U,B+=n*se,W+=n*te,z+=n*le,q+=n*me,Q+=n*Ee,f+=n*fe,h+=n*Se,n=e[11],P+=n*I,k+=n*m,M+=n*C,L+=n*Y,D+=n*ne,j+=n*b,V+=n*H,K+=n*G,B+=n*U,W+=n*se,z+=n*te,q+=n*le,Q+=n*me,f+=n*Ee,h+=n*fe,g+=n*Se,n=e[12],k+=n*I,M+=n*m,L+=n*C,D+=n*Y,j+=n*ne,V+=n*b,K+=n*H,B+=n*G,W+=n*U,z+=n*se,q+=n*te,Q+=n*le,f+=n*me,h+=n*Ee,g+=n*fe,x+=n*Se,n=e[13],M+=n*I,L+=n*m,D+=n*C,j+=n*Y,V+=n*ne,K+=n*b,B+=n*H,W+=n*G,z+=n*U,q+=n*se,Q+=n*te,f+=n*le,h+=n*me,g+=n*Ee,x+=n*fe,S+=n*Se,n=e[14],L+=n*I,D+=n*m,j+=n*C,V+=n*Y,K+=n*ne,B+=n*b,W+=n*H,z+=n*G,q+=n*U,Q+=n*se,f+=n*te,h+=n*le,g+=n*me,x+=n*Ee,S+=n*fe,T+=n*Se,n=e[15],D+=n*I,j+=n*m,V+=n*C,K+=n*Y,B+=n*ne,W+=n*b,z+=n*H,q+=n*G,Q+=n*U,f+=n*se,h+=n*te,g+=n*le,x+=n*me,S+=n*Ee,T+=n*fe,N+=n*Se,o+=38*j,s+=38*V,c+=38*K,l+=38*B,u+=38*W,d+=38*z,p+=38*q,v+=38*Q,y+=38*f,_+=38*h,R+=38*g,P+=38*x,k+=38*S,M+=38*T,L+=38*N,i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=l+i+65535,i=Math.floor(n/65536),l=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=v+i+65535,i=Math.floor(n/65536),v=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=P+i+65535,i=Math.floor(n/65536),P=n-i*65536,n=k+i+65535,i=Math.floor(n/65536),k=n-i*65536,n=M+i+65535,i=Math.floor(n/65536),M=n-i*65536,n=L+i+65535,i=Math.floor(n/65536),L=n-i*65536,n=D+i+65535,i=Math.floor(n/65536),D=n-i*65536,o+=i-1+37*(i-1),i=1,n=o+i+65535,i=Math.floor(n/65536),o=n-i*65536,n=s+i+65535,i=Math.floor(n/65536),s=n-i*65536,n=c+i+65535,i=Math.floor(n/65536),c=n-i*65536,n=l+i+65535,i=Math.floor(n/65536),l=n-i*65536,n=u+i+65535,i=Math.floor(n/65536),u=n-i*65536,n=d+i+65535,i=Math.floor(n/65536),d=n-i*65536,n=p+i+65535,i=Math.floor(n/65536),p=n-i*65536,n=v+i+65535,i=Math.floor(n/65536),v=n-i*65536,n=y+i+65535,i=Math.floor(n/65536),y=n-i*65536,n=_+i+65535,i=Math.floor(n/65536),_=n-i*65536,n=R+i+65535,i=Math.floor(n/65536),R=n-i*65536,n=P+i+65535,i=Math.floor(n/65536),P=n-i*65536,n=k+i+65535,i=Math.floor(n/65536),k=n-i*65536,n=M+i+65535,i=Math.floor(n/65536),M=n-i*65536,n=L+i+65535,i=Math.floor(n/65536),L=n-i*65536,n=D+i+65535,i=Math.floor(n/65536),D=n-i*65536,o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=d,t[6]=p,t[7]=v,t[8]=y,t[9]=_,t[10]=R,t[11]=P,t[12]=k,t[13]=M,t[14]=L,t[15]=D}function x9(t,e){N1(t,e,e)}function S8t(t,e){let r=dd();for(let n=0;n<16;n++)r[n]=e[n];for(let n=253;n>=0;n--)x9(r,r),n!==2&&n!==4&&N1(r,r,e);for(let n=0;n<16;n++)t[n]=r[n]}function wJ(t,e){let r=new Uint8Array(32),n=new Float64Array(80),i=dd(),o=dd(),s=dd(),c=dd(),l=dd(),u=dd();for(let y=0;y<31;y++)r[y]=t[y];r[31]=t[31]&127|64,r[0]&=248,A8t(n,e);for(let y=0;y<16;y++)o[y]=n[y];i[0]=c[0]=1;for(let y=254;y>=0;--y){let _=r[y>>>3]>>>(y&7)&1;b9(i,o,_),b9(s,c,_),rL(l,i,s),nL(i,i,s),rL(s,o,c),nL(o,o,c),x9(c,l),x9(u,i),N1(i,s,i),N1(s,o,l),rL(l,i,s),nL(i,i,s),x9(o,i),nL(s,c,u),N1(i,s,C8t),rL(i,i,c),N1(s,s,i),N1(i,c,u),N1(c,o,n),x9(o,l),b9(i,o,_),b9(s,c,_)}for(let y=0;y<16;y++)n[y+16]=i[y],n[y+32]=s[y],n[y+48]=o[y],n[y+64]=c[y];let d=n.subarray(32),p=n.subarray(16);S8t(d,d),N1(p,p,d);let v=new Uint8Array(32);return E8t(v,p),v}Po.scalarMult=wJ;function e9e(t){return wJ(t,XEe)}Po.scalarMultBase=e9e;function t9e(t){if(t.length!==Po.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${Po.SECRET_KEY_LENGTH} bytes`);let e=new Uint8Array(t);return{publicKey:e9e(e),secretKey:e}}Po.generateKeyPairFromSeed=t9e;function _8t(t){let e=(0,b8t.randomBytes)(32,t),r=t9e(e);return(0,x8t.wipe)(e),r}Po.generateKeyPair=_8t;function I8t(t,e,r=!1){if(t.length!==Po.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(e.length!==Po.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let n=wJ(t,e);if(r){let i=0;for(let o=0;o{});function iL(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}var oL=F(()=>{});var n9e=F(()=>{oL()});var i9e=F(()=>{});function T8t(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,D=new Uint8Array(L);k!==M;){for(var j=_[k],V=0,K=L-1;(j!==0||V>>0,D[K]=j%c>>>0,j=j/c>>>0;if(j!==0)throw new Error("Non-zero carry");P=V,k++}for(var B=L-P;B!==L&&D[B]===0;)B++;for(var W=l.repeat(R);B>>0,L=new Uint8Array(M);_[R];){var D=r[_.charCodeAt(R)];if(D===255)return;for(var j=0,V=M-1;(D!==0||j>>0,L[V]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");k=j,R++}if(_[R]!==" "){for(var K=M-k;K!==M&&L[K]===0;)K++;for(var B=new Uint8Array(P+(M-K)),W=P;K!==M;)B[W++]=L[K++];return B}}}function y(_){var R=v(_);if(R)return R;throw new Error(`Non-${e} character`)}return{encode:p,decodeUnsafe:v,decode:y}}var k8t,R8t,o9e,s9e=F(()=>{k8t=T8t,R8t=k8t,o9e=R8t});var jCr,a9e,P1,c9e,l9e,f2=F(()=>{jCr=new Uint8Array(0),a9e=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},c9e=t=>new TextEncoder().encode(t),l9e=t=>new TextDecoder().decode(t)});var yJ,bJ,xJ,f9e,CJ,P5,h2,M8t,N8t,Oo,C0=F(()=>{s9e();f2();yJ=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},bJ=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return f9e(this,e)}},xJ=class{constructor(e){this.decoders=e}or(e){return f9e(this,e)}decode(e){let r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},f9e=(t,e)=>new xJ({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}}),CJ=class{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new yJ(e,r,n),this.decoder=new bJ(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}},P5=({name:t,prefix:e,encode:r,decode:n})=>new CJ(t,e,r,n),h2=({prefix:t,name:e,alphabet:r})=>{let{encode:n,decode:i}=o9e(r,e);return P5({prefix:t,name:e,encode:n,decode:o=>P1(i(o))})},M8t=(t,e,r,n)=>{let i={};for(let d=0;d=8&&(c-=8,s[u++]=255&l>>c)}if(c>=r||255&l<<8-c)throw new SyntaxError("Unexpected end of data");return s},N8t=(t,e,r)=>{let n=e[e.length-1]==="=",i=(1<r;)s-=r,o+=e[i&c>>s];if(s&&(o+=e[i&c<P5({prefix:e,name:t,encode(i){return N8t(i,n,r)},decode(i){return M8t(i,n,r,t)}})});var EJ={};Hr(EJ,{identity:()=>P8t});var P8t,h9e=F(()=>{C0();f2();P8t=P5({prefix:"\0",name:"identity",encode:t=>l9e(t),decode:t=>c9e(t)})});var AJ={};Hr(AJ,{base2:()=>O8t});var O8t,d9e=F(()=>{C0();O8t=Oo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})});var SJ={};Hr(SJ,{base8:()=>B8t});var B8t,p9e=F(()=>{C0();B8t=Oo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})});var _J={};Hr(_J,{base10:()=>L8t});var L8t,m9e=F(()=>{C0();L8t=h2({prefix:"9",name:"base10",alphabet:"0123456789"})});var IJ={};Hr(IJ,{base16:()=>F8t,base16upper:()=>U8t});var F8t,U8t,g9e=F(()=>{C0();F8t=Oo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),U8t=Oo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});var TJ={};Hr(TJ,{base32:()=>O5,base32hex:()=>q8t,base32hexpad:()=>z8t,base32hexpadupper:()=>W8t,base32hexupper:()=>H8t,base32pad:()=>j8t,base32padupper:()=>$8t,base32upper:()=>D8t,base32z:()=>V8t});var O5,D8t,j8t,$8t,q8t,H8t,z8t,W8t,V8t,kJ=F(()=>{C0();O5=Oo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),D8t=Oo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),j8t=Oo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),$8t=Oo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),q8t=Oo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),H8t=Oo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),z8t=Oo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),W8t=Oo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),V8t=Oo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})});var RJ={};Hr(RJ,{base36:()=>K8t,base36upper:()=>G8t});var K8t,G8t,w9e=F(()=>{C0();K8t=h2({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),G8t=h2({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})});var MJ={};Hr(MJ,{base58btc:()=>pd,base58flickr:()=>Q8t});var pd,Q8t,NJ=F(()=>{C0();pd=h2({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Q8t=h2({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});var PJ={};Hr(PJ,{base64:()=>Z8t,base64pad:()=>Y8t,base64url:()=>J8t,base64urlpad:()=>X8t});var Z8t,Y8t,J8t,X8t,v9e=F(()=>{C0();Z8t=Oo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Y8t=Oo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),J8t=Oo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),X8t=Oo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});var OJ={};Hr(OJ,{base256emoji:()=>iCt});function rCt(t){return t.reduce((e,r)=>(e+=eCt[r],e),"")}function nCt(t){let e=[];for(let r of t){let n=tCt[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}var y9e,eCt,tCt,iCt,b9e=F(()=>{C0();y9e=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),eCt=y9e.reduce((t,e,r)=>(t[r]=e,t),[]),tCt=y9e.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);iCt=P5({prefix:"\u{1F680}",name:"base256emoji",encode:rCt,decode:nCt})});function E9e(t,e,r){e=e||[],r=r||0;for(var n=r;t>=cCt;)e[r++]=t&255|x9e,t/=128;for(;t&aCt;)e[r++]=t&255|x9e,t>>>=7;return e[r]=t|0,E9e.bytes=r-n+1,e}function BJ(t,n){var r=0,n=n||0,i=0,o=n,s,c=t.length;do{if(o>=c)throw BJ.bytes=0,new RangeError("Could not decode varint");s=t[o++],r+=i<28?(s&C9e)<=uCt);return BJ.bytes=o-n,r}var oCt,x9e,sCt,aCt,cCt,lCt,uCt,C9e,fCt,hCt,dCt,pCt,mCt,gCt,wCt,vCt,yCt,bCt,xCt,CCt,C9,A9e=F(()=>{oCt=E9e,x9e=128,sCt=127,aCt=~sCt,cCt=Math.pow(2,31);lCt=BJ,uCt=128,C9e=127;fCt=Math.pow(2,7),hCt=Math.pow(2,14),dCt=Math.pow(2,21),pCt=Math.pow(2,28),mCt=Math.pow(2,35),gCt=Math.pow(2,42),wCt=Math.pow(2,49),vCt=Math.pow(2,56),yCt=Math.pow(2,63),bCt=function(t){return t{A9e();E9=(t,e=0)=>[C9.decode(t,e),C9.decode.bytes],B5=(t,e,r=0)=>(C9.encode(t,e,r),e),L5=t=>C9.encodingLength(t)});var Iv,S9e,_9e,F5,S9=F(()=>{f2();aL();Iv=(t,e)=>{let r=e.byteLength,n=L5(t),i=n+L5(r),o=new Uint8Array(i+r);return B5(t,o,0),B5(r,o,n),o.set(e,i),new F5(t,r,e,o)},S9e=t=>{let e=P1(t),[r,n]=E9(e),[i,o]=E9(e.subarray(n)),s=e.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new F5(r,i,s,e)},_9e=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&a9e(t.bytes,e.bytes),F5=class{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}});var FJ,LJ,UJ=F(()=>{S9();FJ=({name:t,code:e,encode:r})=>new LJ(t,e,r),LJ=class{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){let r=this.encode(e);return r instanceof Uint8Array?Iv(this.code,r):r.then(n=>Iv(this.code,n))}else throw Error("Unknown type, must be binary type")}}});var DJ={};Hr(DJ,{sha256:()=>ECt,sha512:()=>ACt});var T9e,ECt,ACt,k9e=F(()=>{UJ();T9e=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),ECt=FJ({name:"sha2-256",code:18,encode:T9e("SHA-256")}),ACt=FJ({name:"sha2-512",code:19,encode:T9e("SHA-512")})});var jJ={};Hr(jJ,{identity:()=>ICt});var R9e,SCt,M9e,_Ct,ICt,N9e=F(()=>{f2();S9();R9e=0,SCt="identity",M9e=P1,_Ct=t=>Iv(R9e,M9e(t)),ICt={code:R9e,name:SCt,encode:M9e,digest:_Ct}});var P9e=F(()=>{f2()});var aEr,cEr,O9e=F(()=>{aEr=new TextEncoder,cEr=new TextDecoder});var uL,RCt,MCt,NCt,_9,PCt,B9e,L9e,cL,lL,OCt,BCt,LCt,F9e=F(()=>{aL();S9();NJ();kJ();f2();uL=class t{constructor(e,r,n,i){this.code=r,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:lL,byteLength:lL,code:cL,version:cL,multihash:cL,bytes:cL,_baseCache:lL,asCID:lL})}toV0(){switch(this.version){case 0:return this;default:{let{code:e,multihash:r}=this;if(e!==_9)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==PCt)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return t.createV0(r)}}}toV1(){switch(this.version){case 0:{let{code:e,digest:r}=this.multihash,n=Iv(e,r);return t.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&_9e(this.multihash,e.multihash)}toString(e){let{bytes:r,version:n,_baseCache:i}=this;switch(n){case 0:return MCt(r,i,e||pd.encoder);default:return NCt(r,i,e||O5.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return BCt(/^0\.0/,LCt),!!(e&&(e[L9e]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof t)return e;if(e!=null&&e.asCID===e){let{version:r,code:n,multihash:i,bytes:o}=e;return new t(r,n,i,o||B9e(r,n,i.bytes))}else if(e!=null&&e[L9e]===!0){let{version:r,multihash:n,code:i}=e,o=S9e(n);return t.create(r,i,o)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==_9)throw new Error(`Version 0 CID must use dag-pb (code: ${_9}) block encoding`);return new t(e,r,n,n.bytes)}case 1:{let i=B9e(e,r,n.bytes);return new t(e,r,n,i)}default:throw new Error("Invalid version")}}static createV0(e){return t.create(0,_9,e)}static createV1(e,r){return t.create(1,e,r)}static decode(e){let[r,n]=t.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){let r=t.inspectBytes(e),n=r.size-r.multihashSize,i=P1(e.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");let o=i.subarray(r.multihashSize-r.digestSize),s=new F5(r.multihashCode,r.digestSize,o,i);return[r.version===0?t.createV0(s):t.createV1(r.codec,s),e.subarray(r.size)]}static inspectBytes(e){let r=0,n=()=>{let[p,v]=E9(e.subarray(r));return r+=v,p},i=n(),o=_9;if(i===18?(i=0,r=0):i===1&&(o=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let s=r,c=n(),l=n(),u=r+l,d=u-s;return{version:i,codec:o,multihashCode:c,digestSize:l,multihashSize:d,size:u}}static parse(e,r){let[n,i]=RCt(e,r),o=t.decode(i);return o._baseCache.set(n,e),o}},RCt=(t,e)=>{switch(t[0]){case"Q":{let r=e||pd;return[pd.prefix,r.decode(`${pd.prefix}${t}`)]}case pd.prefix:{let r=e||pd;return[pd.prefix,r.decode(t)]}case O5.prefix:{let r=e||O5;return[O5.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},MCt=(t,e,r)=>{let{prefix:n}=r;if(n!==pd.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=e.get(n);if(i==null){let o=r.encode(t).slice(1);return e.set(n,o),o}else return i},NCt=(t,e,r)=>{let{prefix:n}=r,i=e.get(n);if(i==null){let o=r.encode(t);return e.set(n,o),o}else return i},_9=112,PCt=18,B9e=(t,e,r)=>{let n=L5(t),i=n+L5(e),o=new Uint8Array(i+r.byteLength);return B5(t,o,0),B5(e,o,n),o.set(r,i),o},L9e=Symbol.for("@ipld/js-cid/CID"),cL={writable:!1,configurable:!1,enumerable:!0},lL={writable:!1,enumerable:!1,configurable:!1},OCt="0.0.0-dev",BCt=(t,e)=>{if(t.test(OCt))console.warn(e);else throw new Error(e)},LCt=`CID.isCID(v) is deprecated and will be removed in the next major release. Following code pattern: if (CID.isCID(value)) { doSomethingWithCID(value) } Is replaced with: const cid = CID.asCID(value) if (cid) { // Make sure to use cid instead of value doSomethingWithCID(cid) } `});var U9e=F(()=>{F9e();aL();f2();UJ();S9()});var $J,gEr,D9e=F(()=>{h9e();d9e();p9e();m9e();g9e();kJ();w9e();NJ();v9e();b9e();k9e();N9e();P9e();O9e();U9e();$J={...EJ,...AJ,...SJ,..._J,...IJ,...TJ,...RJ,...MJ,...PJ,...OJ},gEr={...DJ,...jJ}});function $9e(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}var j9e,qJ,bEr,HJ=F(()=>{D9e();oL();j9e=$9e("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),qJ=$9e("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);let e=iL(t.length);for(let r=0;r{HJ()});var H9e=F(()=>{HJ()});var z9e=F(()=>{oL()});var zJ=F(()=>{r9e();n9e();i9e();q9e();H9e();z9e()});var G9e=F(()=>{});function dX(t){let[e,r]=t.split(qCt);return{namespace:e,reference:r}}function pX(t,e=[]){let r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;let i=t[n];r.push(...i.accounts)}),r}function AL(t=[],e=[]){return[...new Set([...t,...e])]}function HCt(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}function VCt(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken implementation")}catch(t){return t.message}return null}function xAe(t){return!!t.toHexString}function D5(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return D5(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function GCt(t){return ru(t)&&!(t.length%2)||z5(t)}function eAe(t){return typeof t=="number"&&t==t&&t%1===0}function z5(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!eAe(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Bo(t,e){if(e||(e={}),typeof t=="number"){Jo.checkSafeUint53(t,"invalid arrayify value");let r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),D5(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),xAe(t)&&(t=t.toHexString()),ru(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Jo.throwArgumentError("hex data is odd-length","value",t));let n=[];for(let i=0;iBo(i)),r=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(r);return e.reduce((i,o)=>(n.set(o,i),i+o.length),0),D5(n)}function ZCt(t,e){t=Bo(t),t.length>e&&Jo.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(e);return r.set(t,e-t.length),D5(r)}function ru(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function _c(t,e){if(e||(e={}),typeof t=="number"){Jo.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=VJ[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),xAe(t))return t.toHexString();if(ru(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Jo.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(z5(t)){let r="0x";for(let n=0;n>4]+VJ[i&15]}return r}return Jo.throwArgumentError("invalid hexlify value","value",t)}function YCt(t){if(typeof t!="string")t=_c(t);else if(!ru(t)||t.length%2)return null;return(t.length-2)/2}function tAe(t,e,r){return typeof t!="string"?t=_c(t):(!ru(t)||t.length%2)&&Jo.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function bd(t,e){for(typeof t!="string"?t=_c(t):ru(t)||Jo.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&Jo.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function CAe(t){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(GCt(t)){let r=Bo(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=_c(r.slice(0,32)),e.s=_c(r.slice(32,64))):r.length===65?(e.r=_c(r.slice(0,32)),e.s=_c(r.slice(32,64)),e.v=r[64]):Jo.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Jo.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=_c(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){let i=ZCt(Bo(e._vs),32);e._vs=_c(i);let o=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=o:e.recoveryParam!==o&&Jo.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;let s=_c(i);e.s==null?e.s=s:e.s!==s&&Jo.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Jo.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{let i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Jo.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!ru(e.r)?Jo.throwArgumentError("signature missing or invalid r","signature",t):e.r=bd(e.r,32),e.s==null||!ru(e.s)?Jo.throwArgumentError("signature missing or invalid s","signature",t):e.s=bd(e.s,32);let r=Bo(e.s);r[0]>=128&&Jo.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);let n=_c(r);e._vs&&(ru(e._vs)||Jo.throwArgumentError("signature invalid _vs","signature",t),e._vs=bd(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Jo.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function mX(t){return"0x"+zCt.keccak_256(Bo(t))}function tEt(t){return t!=null&&(ga.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ru(t)||typeof t=="bigint"||z5(t))}function O9(t){if(typeof t!="string")return O9(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&B1.throwArgumentError("invalid hex","value",t),t=O9(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function hl(t){return ga.from(O9(t))}function Pn(t){let e=ga.from(t).toHexString();return e[0]==="-"?new yL("-"+e.substring(3),16):new yL(e.substring(2),16)}function gf(t,e,r){let n={fault:t,operation:e};return r!=null&&(n.value=r),B1.throwError(t,ro.errors.NUMERIC_FAULT,n)}function rEt(t){return new yL(t,36).toString(16)}function IAe(t,e,r,n){let i={fault:e,operation:r};return n!==void 0&&(i.value=n),Ic.throwError(t,ro.errors.NUMERIC_FAULT,i)}function gX(t){if(typeof t!="number")try{t=ga.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+N9.substring(0,t):Ic.throwArgumentError("invalid decimal size","decimals",t)}function GJ(t,e){e==null&&(e=0);let r=gX(e);t=ga.from(t);let n=t.lt(SAe);n&&(t=t.mul(_Ae));let i=t.mod(r).toString();for(;i.length2&&Ic.throwArgumentError("too many decimal points","value",t);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");s[s.length-1]==="0";)s=s.substring(0,s.length-1);for(s.length>r.length-1&&IAe("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.length>6===2;s++)o++;return o}return t===j5.OVERRUN?r.length-e-1:0}function sEt(t,e,r,n,i){return t===j5.OVERLONG?(n.push(i),0):(n.push(65533),kAe(t,e,r))}function QJ(t,e=xL.current){e!=xL.current&&(TAe.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;let o=t.charCodeAt(n);if(n>=t.length||(o&64512)!==56320)throw new Error("invalid utf-8 string");let s=65536+((i&1023)<<10)+(o&1023);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(s&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return Bo(r)}function aEt(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let o=i.split(":");r+=parseInt(o[0],16),n[r]=e(o[1])}),n}function oAe(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function cEt(t){t=atob(t);let e=[];for(let r=0;r0&&Array.isArray(c)?i(c,s-1):r.push(c)})};return i(t,e),r}function lEt(t){let e={};for(let r=0;r>--l&1}let p=31,v=Math.pow(2,p),y=v>>>1,_=y>>1,R=v-1,P=0;for(let j=0;j1;){let z=V+K>>>1;j>>1|d(),B=B<<1^y,W=(W^y)<<1|y|1;M=B,L=1+W-B}let D=n-4;return k.map(j=>{switch(j-D){case 3:return D+65792+(t[c++]<<16|t[c++]<<8|t[c++]);case 2:return D+256+(t[c++]<<8|t[c++]);case 1:return D+t[c++];default:return j-1}})}function fEt(t){let e=0;return()=>t[e++]}function hEt(t){return fEt(uEt(t))}function dEt(t){return t&1?~t>>1:t>>1}function pEt(t,e){let r=Array(t);for(let n=0;ne[s]):r}function gEt(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(vEt(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(yEt(r,t))}return lEt(MAe(e))}function wEt(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function NAe(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[s].push(o));return n}function vEt(t,e){let r=1+e(),n=e(),i=wEt(e),o=NAe(i.length,1+t,e);return MAe(o.map((s,c)=>{let l=s[0],u=s.slice(1);return Array(i[c]).fill(void 0).map((d,p)=>{let v=p*n;return[l+p*r,u.map(y=>y+v)]})}))}function yEt(t,e){let r=1+e();return NAe(r,1+t,e).map(n=>[n[0],n.slice(1)])}function bEt(t){let e=CL(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let u=CL(t,e);if(u.length==0)break;n.push({set:new Set(u),node:r()})}n.sort((u,d)=>d.set.size-u.set.size);let i=t(),o=i%3;i=i/3|0;let s=!!(i&1);i>>=1;let c=i==1,l=i==2;return{branches:n,valid:o,fe0f:s,save:c,check:l}}}function xEt(){return hEt(cEt("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}function PAe(t){return typeof t=="string"&&(t=QJ(t)),mX(QCt([QJ(EEt),QJ(String(t.length)),t]))}function aAe(t){ru(t,20)||R9.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);let n=Bo(mX(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}function IEt(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}function TEt(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>wX[n]).join("");for(;e.length>=cAe;){let n=e.substring(0,cAe);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function kEt(t){let e=null;if(typeof t!="string"&&R9.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=aAe(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&R9.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==TEt(t)&&R9.throwArgumentError("bad icap checksum","address",t),e=rEt(t.substring(4));e.length<40;)e="0"+e;e=aAe("0x"+e)}else R9.throwArgumentError("invalid address","address",t);return e}function I9(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function OAe(t,e){if(!t)throw new Error(e||"Assertion failed")}function LEt(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function FEt(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=o&63|128):LEt(t,i)?(o=65536+((o&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=o&63|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=o&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}function DEt(t,e){for(var r="",n=0;n>>0}return o}function $Et(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=o&255):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=o&255)}return r}function qEt(t,e){return t>>>e|t<<32-e}function HEt(t,e){return t<>>32-e}function zEt(t,e){return t+e>>>0}function WEt(t,e,r){return t+e+r>>>0}function VEt(t,e,r,n){return t+e+r+n>>>0}function KEt(t,e,r,n,i){return t+e+r+n+i>>>0}function GEt(t,e,r,n){var i=t[e],o=t[e+1],s=n+o>>>0,c=(s>>0,t[e+1]=s}function QEt(t,e,r,n){var i=e+n>>>0,o=(i>>0}function ZEt(t,e,r,n){var i=e+n;return i>>>0}function YEt(t,e,r,n,i,o,s,c){var l=0,u=e;u=u+n>>>0,l+=u>>0,l+=u>>0,l+=u>>0}function JEt(t,e,r,n,i,o,s,c){var l=e+n+o+c;return l>>>0}function XEt(t,e,r,n,i,o,s,c,l,u){var d=0,p=e;p=p+n>>>0,d+=p>>0,d+=p>>0,d+=p>>0,d+=p>>0}function e9t(t,e,r,n,i,o,s,c,l,u){var d=e+n+o+c+u;return d>>>0}function t9t(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}function r9t(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}function n9t(t,e,r){return t>>>r}function i9t(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}function hL(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}function a9t(t,e,r,n){if(t===0)return UAe(e,r,n);if(t===1||t===3)return jAe(e,r,n);if(t===2)return DAe(e,r,n)}function UAe(t,e,r){return t&e^~t&r}function DAe(t,e,r){return t&e^t&r^e&r}function jAe(t,e,r){return t^e^r}function c9t(t){return xd(t,2)^xd(t,13)^xd(t,22)}function l9t(t){return xd(t,6)^xd(t,11)^xd(t,25)}function u9t(t){return xd(t,7)^xd(t,18)^t>>>3}function f9t(t){return xd(t,17)^xd(t,19)^t>>>10}function wd(){if(!(this instanceof wd))return new wd;$Ae.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}function vd(){if(!(this instanceof vd))return new vd;qAe.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=T9t,this.W=new Array(64)}function L1(){if(!(this instanceof L1))return new L1;zAe.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}function S0(){if(!(this instanceof S0))return new S0;KAe.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=L9t,this.W=new Array(160)}function F9t(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function U9t(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function D9t(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function j9t(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function $9t(t,e){var r=Cd(t,e,28),n=Cd(e,t,2),i=Cd(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function q9t(t,e){var r=Ed(t,e,28),n=Ed(e,t,2),i=Ed(e,t,7),o=r^n^i;return o<0&&(o+=4294967296),o}function H9t(t,e){var r=Cd(t,e,14),n=Cd(t,e,18),i=Cd(e,t,9),o=r^n^i;return o<0&&(o+=4294967296),o}function z9t(t,e){var r=Ed(t,e,14),n=Ed(t,e,18),i=Ed(e,t,9),o=r^n^i;return o<0&&(o+=4294967296),o}function W9t(t,e){var r=Cd(t,e,1),n=Cd(t,e,8),i=WAe(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function V9t(t,e){var r=Ed(t,e,1),n=Ed(t,e,8),i=VAe(t,e,7),o=r^n^i;return o<0&&(o+=4294967296),o}function K9t(t,e){var r=Cd(t,e,19),n=Cd(e,t,29),i=WAe(t,e,6),o=r^n^i;return o<0&&(o+=4294967296),o}function G9t(t,e){var r=Ed(t,e,19),n=Ed(e,t,29),i=VAe(t,e,6),o=r^n^i;return o<0&&(o+=4294967296),o}function F1(){if(!(this instanceof F1))return new F1;QAe.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}function gd(){if(!(this instanceof gd))return new gd;YAe.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function hAe(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function Y9t(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function J9t(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}function $5(t,e,r){if(!(this instanceof $5))return new $5(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(nAt.toArray(e,r))}function K5(t,e,r){return r={path:e,exports:{},require:function(n,i){return sAt(n,i??r.path)}},t(r,r.exports),r.exports}function sAt(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}function JAe(t,e){if(!t)throw new Error(e||"Assertion failed")}function p2(t,e){this.type=t,this.p=new Qr(e.p,16),this.red=e.prime?Qr.red(e.prime):Qr.mont(this.p),this.zero=new Qr(0).toRed(this.red),this.one=new Qr(1).toRed(this.red),this.two=new Qr(2).toRed(this.red),this.n=e.n&&new Qr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function wf(t,e){this.curve=t,this.type=e,this.precomputed=null}function yf(t){kv.call(this,"short",t),this.a=new Qr(t.a,16).toRed(this.red),this.b=new Qr(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function Ws(t,e,r,n){kv.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new Qr(e,16),this.y=new Qr(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function ma(t,e,r,n){kv.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Qr(0)):(this.x=new Qr(e,16),this.y=new Qr(r,16),this.z=new Qr(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}function m2(t){if(!(this instanceof m2))return new m2(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=_0.toArray(t.entropy,t.entropyEnc||"hex"),r=_0.toArray(t.nonce,t.nonceEnc||"hex"),n=_0.toArray(t.pers,t.persEnc||"hex");vX(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}function Wa(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}function SL(t,e){if(t instanceof SL)return t;this._importDER(t,e)||(uAt(t.r&&t.s,"Signature without r or s"),this.r=new Qr(t.r,16),this.s=new Qr(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function fAt(){this.place=0}function rX(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,o=0,s=e.place;o>>=0;return i<=127?!1:(e.place=s,i)}function pAe(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}function vf(t){if(!(this instanceof vf))return new vf(t);typeof t=="string"&&(XAe(Object.prototype.hasOwnProperty.call(vL,t),"Unknown curve "+t),t=vL[t]),t instanceof vL.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}function yd(){return iX||(iX=new mAt("secp256k1")),iX}function wAt(t,e){let r=CAe(e),n={r:Bo(r.r),s:Bo(r.s)};return"0x"+yd().recoverPubKey(Bo(t),n,r.recoveryParam).encode("hex",!1)}function eSe(t,e){let r=Bo(t);if(r.length===32){let n=new uX(r);return e?"0x"+yd().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?_c(r):"0x"+yd().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+yd().keyFromPublic(r).getPublic(!0,"hex"):_c(r)}return lX.throwArgumentError("invalid public or private key","key","[REDACTED]")}function yAt(t){let e=eSe(t);return kEt(tAe(mX(tAe(e,1)),12))}function bAt(t,e){return yAt(wAt(Bo(t),e))}function tSe(t,e,r){return bAt(PAe(e),r).toLowerCase()===t.toLowerCase()}async function rSe(t,e,r,n,i,o){try{let s="0x1626ba7e",c="0000000000000000000000000000000000000000000000000000000000000040",l="0000000000000000000000000000000000000000000000000000000000000041",u=r.substring(2),d=PAe(e).substring(2),p=s+d+c+l+u,v=await fetch(`${o||xAt}/?chainId=${n}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:CAt(),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:p},"latest"]})}),{result:y}=await v.json();return y?y.slice(0,s.length).toLowerCase()===s.toLowerCase():!1}catch(s){return console.error("isValidEip1271Signature: ",s),!1}}function CAt(){return Date.now()+Math.floor(Math.random()*1e3)}function AAt(t){return JSON.parse(Buffer.from(t,"base64").toString("utf-8"))}function oSe(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");let e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(r=>{let n=t.att[r];if(Array.isArray(n))throw new Error(`Resource must be an object: ${r}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(n).forEach(i=>{let o=n[i];if(!Array.isArray(o))throw new Error(`Ability limits ${i} must be an array of objects, found: ${o}`);if(!o.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);o.forEach(s=>{if(typeof s!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${s}`)})})})}function SAt(t){let e=AAt(t.replace("urn:recap:",""));return oSe(e),e}function _At(t){return t&&t.includes("urn:recap:")}function IAt(t="",e){oSe(e);let r="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(r))return t;let n=[],i=0;Object.keys(e.att).forEach(c=>{let l=Object.keys(e.att[c]).map(p=>({ability:p.split("/")[0],action:p.split("/")[1]}));l.sort((p,v)=>p.action.localeCompare(v.action));let u={};l.forEach(p=>{u[p.ability]||(u[p.ability]=[]),u[p.ability].push(p.action)});let d=Object.keys(u).map(p=>(i++,`(${i}) '${p}': '${u[p].join("', '")}' for '${c}'.`));n.push(d.join(", ").replace(".,","."))});let o=n.join(" "),s=`${r}${o}`;return`${t?t+" ":""}${s}`}function TAt(t){if(!t)return;let e=t?.[t.length-1];return _At(e)?e:void 0}function _L(t){return t.includes(":")}function G5(t){return _L(t)?t.split(":")[0]:t}function L9(t,e){let{message:r,code:n}=kAt[t];return{message:e?`${r} ${e}`:r,code:n}}function Rv(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function sSe(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}var fX,hX,UCt,gAe,DCt,jCt,$Ct,wAe,vAe,qCt,yAe,bAe,zCt,WCt,Q9e,Z9e,gL,Y9e,WJ,J9e,oX,A0,X9e,ro,KCt,Jo,VJ,EAe,JCt,XCt,eEt,Qr,AAe,yL,B1,KJ,rAe,nAe,ga,Ic,M9,SAe,_Ae,N9,P9,bL,iAe,nEt,iEt,TAe,xL,j5,RAe,fL,CEt,EEt,AEt,SEt,R9,_Et,wX,cAe,REt,MEt,NEt,PEt,md,On,B9,sX,OEt,BEt,W5,lAe,o9t,U5,Ad,s9t,xd,q5,h9t,d9t,YJ,T9,p9t,m9t,$Ae,g9t,w9t,H5,v9t,V5,y9t,E0,b9t,x9t,C9t,E9t,A9t,S9t,_9t,I9t,qAe,T9t,HAe,aX,zAe,k9t,dl,R9t,M9t,Cd,Ed,WAe,VAe,d2,JJ,XJ,N9t,P9t,O9t,B9t,KAe,L9t,GAe,cX,QAe,Q9t,ZAe,Tv,Z9t,dL,uAe,k9,fAe,YAe,X9t,eAt,tAt,rAt,nAt,iAt,oAt,vX,_0,nu,pL,aAt,EL,kv,yX,cAt,lAt,wL,vL,dAe,eX,tX,uAt,mL,hAt,XAe,dAt,pAt,mAt,gAt,lX,iX,uX,vAt,mAe,xAt,EAt,nSe,bX,xX,iSe,kAt,F9=F(()=>{fX=Tt(QY()),hX=Tt(qB()),UCt=Tt(ZY()),gAe=Tt(XY()),DCt=Tt(sJ()),jCt=Tt(lJ()),$Ct=Tt(XB()),wAe=Tt(mJ()),vAe=Tt(vJ());zJ();G9e();qCt=":";yAe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};bAe={exports:{}};(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",s=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?i=yAe:o&&(i=self);var c=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),d=[31,7936,2031616,520093696],p=[4,1024,262144,67108864],v=[1,256,65536,16777216],y=[6,1536,393216,100663296],_=[0,8,16,24],R=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],P=[224,256,384,512],k=[128,256],M=["hex","buffer","arrayBuffer","array","digest"],L={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});for(var D=function(b,H,G){return function(U){return new C(b,H,b).update(U)[G]()}},j=function(b,H,G){return function(U,se){return new C(b,H,se).update(U)[G]()}},V=function(b,H,G){return function(U,se,te,le){return h["cshake"+b].update(U,se,te,le)[G]()}},K=function(b,H,G){return function(U,se,te,le){return h["kmac"+b].update(U,se,te,le)[G]()}},B=function(b,H,G,U){for(var se=0;se>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}C.prototype.update=function(b){if(this.finalized)throw new Error(r);var H,G=typeof b;if(G!=="string"){if(G==="object"){if(b===null)throw new Error(e);if(l&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!l||!ArrayBuffer.isView(b)))throw new Error(e)}else throw new Error(e);H=!0}for(var U=this.blocks,se=this.byteCount,te=b.length,le=this.blockCount,me=0,Ee=this.s,fe,Se;me>2]|=b[me]<<_[fe++&3];else for(fe=this.start;me>2]|=Se<<_[fe++&3]:Se<2048?(U[fe>>2]|=(192|Se>>6)<<_[fe++&3],U[fe>>2]|=(128|Se&63)<<_[fe++&3]):Se<55296||Se>=57344?(U[fe>>2]|=(224|Se>>12)<<_[fe++&3],U[fe>>2]|=(128|Se>>6&63)<<_[fe++&3],U[fe>>2]|=(128|Se&63)<<_[fe++&3]):(Se=65536+((Se&1023)<<10|b.charCodeAt(++me)&1023),U[fe>>2]|=(240|Se>>18)<<_[fe++&3],U[fe>>2]|=(128|Se>>12&63)<<_[fe++&3],U[fe>>2]|=(128|Se>>6&63)<<_[fe++&3],U[fe>>2]|=(128|Se&63)<<_[fe++&3]);if(this.lastByteIndex=fe,fe>=se){for(this.start=fe-se,this.block=U[le],fe=0;fe>8,G=b&255;G>0;)se.unshift(G),b=b>>8,G=b&255,++U;return H?se.push(U):se.unshift(U),this.update(se),se.length},C.prototype.encodeString=function(b){var H,G=typeof b;if(G!=="string"){if(G==="object"){if(b===null)throw new Error(e);if(l&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!l||!ArrayBuffer.isView(b)))throw new Error(e)}else throw new Error(e);H=!0}var U=0,se=b.length;if(H)U=se;else for(var te=0;te=57344?U+=3:(le=65536+((le&1023)<<10|b.charCodeAt(++te)&1023),U+=4)}return U+=this.encode(U*8),this.update(b),U},C.prototype.bytepad=function(b,H){for(var G=this.encode(H),U=0;U>2]|=this.padding[H&3],this.lastByteIndex===this.byteCount)for(b[0]=b[G],H=1;H>4&15]+u[me&15]+u[me>>12&15]+u[me>>8&15]+u[me>>20&15]+u[me>>16&15]+u[me>>28&15]+u[me>>24&15];te%b===0&&(ne(H),se=0)}return U&&(me=H[se],le+=u[me>>4&15]+u[me&15],U>1&&(le+=u[me>>12&15]+u[me>>8&15]),U>2&&(le+=u[me>>20&15]+u[me>>16&15])),le},C.prototype.arrayBuffer=function(){this.finalize();var b=this.blockCount,H=this.s,G=this.outputBlocks,U=this.extraBytes,se=0,te=0,le=this.outputBits>>3,me;U?me=new ArrayBuffer(G+1<<2):me=new ArrayBuffer(le);for(var Ee=new Uint32Array(me);te>8&255,le[me+2]=Ee>>16&255,le[me+3]=Ee>>24&255;te%b===0&&ne(H)}return U&&(me=te<<2,Ee=H[se],le[me]=Ee&255,U>1&&(le[me+1]=Ee>>8&255),U>2&&(le[me+2]=Ee>>16&255)),le};function Y(b,H,G){C.call(this,b,H,G)}Y.prototype=new C,Y.prototype.finalize=function(){return this.encode(this.outputBits,!0),C.prototype.finalize.call(this)};va