1import{r as Y_}from"./index-H-Ckw-g_.js";import{r as Op,a as xr,b as J_}from"./sha3-ChG6mytw.js";import{bU as X_,bV as Q_}from"./index-DpxatNio.js";function ev(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const tv=ev(),rv=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:tv},Symbol.toStringTag,{value:"Module"}));var ld={},Tn={},It={},Dr={},pr={},In={},Sn={},Qf;function Cp(){if(Qf)return Sn;Qf=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.getSDKVersion=void 0;const e=()=>"9.1.0";return Sn.getSDKVersion=e,Sn}var Rn={},e0;function nv(){if(e0)return Rn;e0=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.generateRequestId=void 0;const e=t=>t.toString(16).padStart(2,"0"),r=t=>{const a=new Uint8Array(t/2);return window.crypto.getRandomValues(a),Array.from(a,e).join("")},n=()=>typeof window<"u"?r(10):new Date().getTime().toString(36);return Rn.generateRequestId=n,Rn}var t0;function xp(){if(t0)return In;t0=1,Object.defineProperty(In,"__esModule",{value:!0}),In.MessageFormatter=void 0;const e=Cp(),r=nv();class n{}return In.MessageFormatter=n,n.makeRequest=(t,a)=>({id:(0,r.generateRequestId)(),method:t,params:a,env:{sdkVersion:(0,e.getSDKVersion)()}}),n.makeResponse=(t,a,s)=>({id:t,success:!0,version:s,data:a}),n.makeErrorResponse=(t,a,s)=>({id:t,success:!1,error:a,version:s}),In}var gr={},r0;function qr(){if(r0)return gr;r0=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.RestrictedMethods=gr.Methods=void 0;var e;(function(n){n.sendTransactions="sendTransactions",n.rpcCall="rpcCall",n.getChainInfo="getChainInfo",n.getSafeInfo="getSafeInfo",n.getTxBySafeTxHash="getTxBySafeTxHash",n.getSafeBalances="getSafeBalances",n.signMessage="signMessage",n.signTypedMessage="signTypedMessage",n.getEnvironmentInfo="getEnvironmentInfo",n.getOffChainSignature="getOffChainSignature",n.requestAddressBook="requestAddressBook",n.wallet_getPermissions="wallet_getPermissions",n.wallet_requestPermissions="wallet_requestPermissions"})(e||(gr.Methods=e={}));var r;return(function(n){n.requestAddressBook="requestAddressBook"})(r||(gr.RestrictedMethods=r={})),gr}var n0;function ov(){return n0||(n0=1,(function(e){var r=pr&&pr.__createBinding||(Object.create?(function(s,o,i,c){c===void 0&&(c=i);var u=Object.getOwnPropertyDescriptor(o,i);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(s,c,u)}):(function(s,o,i,c){c===void 0&&(c=i),s[c]=o[i]})),n=pr&&pr.__exportStar||function(s,o){for(var i in s)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&r(o,s,i)};Object.defineProperty(e,"__esModule",{value:!0});const t=xp();class a{constructor(o=null,i=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:c,data:u,source:d})=>{const f=!u,b=!this.isServer&&d===window.parent,y=typeof u.version<"u"&&parseInt(u.version.split(".")[0]),h=typeof y=="number"&&y>=1;let m=!0;return Array.isArray(this.allowedOrigins)&&(m=this.allowedOrigins.find(g=>g.test(c))!==void 0),!f&&b&&h&&m},this.logIncomingMessage=c=>{console.info(`Safe Apps SDK v1: A message was received from origin ${c.origin}. `,c.data)},this.onParentMessage=c=>{this.isValidMessage(c)&&(this.debugMode&&this.logIncomingMessage(c),this.handleIncomingMessage(c.data))},this.handleIncomingMessage=c=>{const{id:u}=c,d=this.callbacks.get(u);d&&(d(c),this.callbacks.delete(u))},this.send=(c,u)=>{const d=t.MessageFormatter.makeRequest(c,u);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(d,"*"),new Promise((f,b)=>{this.callbacks.set(d.id,y=>{if(!y.success){b(new Error(y.error));return}f(y)})})},this.allowedOrigins=o,this.debugMode=i,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=a,n(qr(),e)})(pr)),pr}var Bn={},_r={},On={},o0;function av(){if(o0)return On;o0=1,Object.defineProperty(On,"__esModule",{value:!0}),On.isObjectEIP712TypedData=void 0;const e=r=>typeof r=="object"&&r!=null&&"domain"in r&&"types"in r&&"message"in r;return On.isObjectEIP712TypedData=e,On}var bd={},a0;function iv(){return a0||(a0=1,Object.defineProperty(bd,"__esModule",{value:!0})),bd}var md={},i0;function sv(){return i0||(i0=1,(function(e){Object.defineProperty(e,"__esMo
1dule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var r=Y_();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return r.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return r.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return r.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return r.TransferDirection}})})(md)),md}var hd={},s0;function cv(){return s0||(s0=1,Object.defineProperty(hd,"__esModule",{value:!0}),qr()),hd}var c0;function Ud(){return c0||(c0=1,(function(e){var r=_r&&_r.__createBinding||(Object.create?(function(t,a,s,o){o===void 0&&(o=s);var i=Object.getOwnPropertyDescriptor(a,s);(!i||("get"in i?!a.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(t,o,i)}):(function(t,a,s,o){o===void 0&&(o=s),t[o]=a[s]})),n=_r&&_r.__exportStar||function(t,a){for(var s in t)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&r(a,t,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(av(),e),n(iv(),e),n(sv(),e),n(cv(),e)})(_r)),_r}var u0;function uv(){if(u0)return Bn;u0=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.TXs=void 0;const e=qr(),r=Ud();class n{constructor(a){this.communicator=a}async getBySafeTxHash(a){if(!a)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:a})).data}async signMessage(a){const s={message:a};return(await this.communicator.send(e.Methods.signMessage,s)).data}async signTypedMessage(a){if(!(0,r.isObjectEIP712TypedData)(a))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:a})).data}async send({txs:a,params:s}){if(!a||!a.length)throw new Error("No transactions were passed");const o={txs:a,params:s};return(await this.communicator.send(e.Methods.sendTransactions,o)).data}}return Bn.TXs=n,Bn}var Cn={},xn={},d0;function Ld(){return d0||(d0=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.RPC_CALLS=void 0,xn.RPC_CALLS={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"}),xn}var f0;function dv(){if(f0)return Cn;f0=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.Eth=void 0;const e=Ld(),r=qr(),n={defaultBlockParam:(a="latest")=>a,returnFullTxObjectParam:(a=!1)=>a,blockNumberToHex:a=>Number.isInteger(a)?`0x${a.toString(16)}`:a};class t{constructor(s){this.communicator=s,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,n.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,n.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,n.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,n.blockNumberToHex,n.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,n.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[n.blockNumberToHex,n.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,n.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=o=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([o]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(s){const{call:o,formatters:i}=s;return async c=>
1{i&&Array.isArray(c)&&i.forEach((f,b)=>{f&&(c[b]=f(c[b]))});const u={call:o,params:c||[]};return(await this.communicator.send(r.Methods.rpcCall,u)).data}}}return Cn.Eth=t,Cn}var St={},yd={},pd={},qn={},Mn={},l0;function fv(){return l0||(l0=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.version=void 0,Mn.version="1.1.0"),Mn}var b0;function ln(){if(b0)return qn;b0=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.BaseError=void 0;const e=fv();class r extends Error{constructor(t,a={}){const s=a.cause instanceof r?a.cause.details:a.cause?.message?a.cause.message:a.details,o=a.cause instanceof r&&a.cause.docsPath||a.docsPath,i=[t||"An error occurred.","",...a.metaMessages?[...a.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(` 2`);super(i),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"}),a.cause&&(this.cause=a.cause),this.details=s,this.docsPath=o,this.metaMessages=a.metaMessages,this.shortMessage=t}}return qn.BaseError=r,qn}var ra={},m0;function lv(){if(m0)return ra;m0=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.narrow=e;function e(r){return r}return ra}var na={},oa={},aa={},ia={},Et={},h0;function yu(){if(h0)return Et;h0=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.isTupleRegex=Et.integerRegex=Et.bytesRegex=void 0,Et.execTyped=e;function e(r,n){return r.exec(n)?.groups}return Et.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Et.integerRegex=/^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)?$/,Et.isTupleRegex=/^\(.+?\).*?$/,Et}var y0;function qp(){if(y0)return ia;y0=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.formatAbiParameter=n;const e=yu(),r=/^tuple(?<array>(\[(\d*)\])*)$/;function n(t){let a=t.type;if(r.test(t.type)&&"components"in t){a="(";const s=t.components.length;for(let i=0;i<s;i++){const c=t.components[i];a+=n(c),i<s-1&&(a+=", ")}const o=(0,e.execTyped)(r,t.type);return a+=`)${o?.array??""}`,n({...t,type:a})}return"indexed"in t&&t.indexed&&(a=`${a}
2 indexed`),t.name?`${a} ${t.name}`:a}return ia}var p0;function Mp(){if(p0)return aa;p0=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.formatAbiParameters=r;const e=qp();function r(n){let t="";const a=n.length;for(let s=0;s<a;s++){const o=n[s];t+=(0,e.formatAbiParameter)(o),s!==a-1&&(t+=", ")}return t}return aa}var g0;function Hp(){if(g0)return oa;g0=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.formatAbiItem=r;const e=Mp();function r(n){return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${n.outputs?.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return oa}var _0;function bv(){if(_0)return na;_0=1,Object.defineProperty(na,"__esModule",{value:!0}),na.formatAbi=r;const e=Hp();function r(n){const t=[],a=n.length;for(let s=0;s<a;s++){const o=n[s],i=(0,e.formatAbiItem)(o);t.push(i)}return t}return na}var sa={},Pe={},v0;function bn(){if(v0)return Pe;v0=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.functionModifiers=Pe.eventModifiers=Pe.modifiers=void 0,Pe.isErrorSignature=n,Pe.execErrorSignature=t,Pe.isEventSignature=s,Pe.execEventSignature=o,Pe.isFunctionSignature=c,Pe.execFunctionSignature=u,Pe.isStructSignature=f,Pe.execStructSignature=b,Pe.isConstructorSignature=h,Pe.execConstructorSignature=m,Pe.isFallbackSignature=p,Pe.execFallbackSignature=v,Pe.isReceiveSignature=l;const e=yu(),r=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(w){return r.test(w)}function t(w){return(0,e.execTyped)(r,w)}const a=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(w){return a.test(w)}function o(w){return(0,e.execTyped)(a,w)}const i=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(w){return i.test(w)}function u(w){return(0,e.execTyped)(i,w)}const d=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(w){return d.test(w)}function b(w){return(0,e.execTyped)(d,w)}const y=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function h(w){return y.test(w)}function m(w){return(0,e.execTyped)(y,w)}const g=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function p(w){return g.test(w)}function v(w){return(0,e.execTyped)(g,w)}const j=/^receive\(\) external payable$/;function l(w){return j.test(w)}return Pe.modifiers=new Set(["memory","indexed","storage","calldata"]),Pe.eventModifiers=new Set(["indexed"]),Pe.functionModifiers=new Set(["calldata","memory","storage"]),Pe}var ca={},Rt={},E0;function pu(){if(E0)return Rt;
2E0=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.UnknownSolidityTypeError=Rt.UnknownTypeError=Rt.InvalidAbiItemError=void 0;const e=ln();class r extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}Rt.InvalidAbiItemError=r;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" 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"})}}Rt.UnknownTypeError=n;class t extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return Rt.UnknownSolidityTypeError=t,Rt}var xe={},j0;function To(){if(j0)return xe;j0=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.InvalidAbiTypeParameterError=xe.InvalidFunctionModifierError=xe.InvalidModifierError=xe.SolidityProtectedKeywordError=xe.InvalidParameterError=xe.InvalidAbiParametersError=xe.InvalidAbiParameterError=void 0;const e=ln();class r extends e.BaseError{constructor({param:u}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(u,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}xe.InvalidAbiParameterError=r;class n extends e.BaseError{constructor({params:u}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(u,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}xe.InvalidAbiParametersError=n;class t extends e.BaseError{constructor({param:u}){super("Invalid ABI parameter.",{details:u}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}xe.InvalidParameterError=t;class a extends e.BaseError{constructor({param:u,name:d}){super("Invalid ABI parameter.",{details:u,metaMessages:[`"${d}" 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"})}}xe.SolidityProtectedKeywordError=a;class s extends e.BaseError{constructor({param:u,type:d,modifier:f}){super("Invalid ABI parameter.",{details:u,metaMessages:[`Modifier "${f}" not allowed${d?` in "${d}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}xe.InvalidModifierError=s;class o extends e.BaseError{constructor({param:u,type:d,modifier:f}){super("Invalid ABI parameter.",{details:u,metaMessages:[`Modifier "${f}" not allowed${d?` in "${d}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}xe.InvalidFunctionModifierError=o;class i extends e.BaseError{constructor({abiParameter:u}){super("Invalid ABI parameter.",{details:JSON.stringify(u,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return xe.InvalidAbiTypeParameterError=i,xe}var Bt={},w0;function Dd(){if(w0)return Bt;w0=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.InvalidStructSignatureError=Bt.UnknownSignatureError=Bt.InvalidSignatureError=void 0;const e=ln();class r extends e.BaseError{constructor({signature:s,type:o}){super(`Invalid ${o} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}Bt.InvalidSignatureError=r;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}Bt.UnknownSignatureError=n;class t extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return Bt.InvalidStructSignatureError=t,Bt}var Hn={},P0;function kp(){if(P0)return Hn;P0=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.CircularReferenceError=void 0;const e=ln();class r extends e.BaseError{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return Hn.CircularReferenceError=r,Hn}var De={},kn={},A0;function Fp(){if(A0)return kn;A0=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.InvalidParenthesisError=void 0;const e=ln();class r extends e.BaseError{constructor({current:t,depth:a}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${a>0?"opening":"closing"} parentheses.`],details:`Depth "${a}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return kn.InvalidParenthesisError=r,kn}var Gr={},T0;function mv(){if(T0)return Gr;
2T0=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.parameterCache=void 0,Gr.getParameterCacheKey=e;function e(r,n,t){let a="";if(t)for(const s of Object.entries(t)){if(!s)continue;let o="";for(const i of s[1])o+=`[${i.type}${i.name?`:${i.name}`:""}]`;a+=`(${s[0]}{${o}})`}return n?`${n}:${r}${a}`:r}return Gr.parameterCache=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}]]),Gr}var I0;function fn(){if(I0)return De;I0=1,Object.defineProperty(De,"__esModule",{value:!0}),De.parseSignature=i,De.parseFunctionSignature=c,De.parseEventSignature=u,De.parseErrorSignature=d,De.parseConstructorSignature=f,De.parseFallbackSignature=b,De.parseAbiParameter=g,De.splitParameters=p,De.isSolidityType=v,De.isSolidityKeyword=l,De.isValidDataLocation=w;const e=yu(),r=pu(),n=To(),t=Dd(),a=Fp(),s=mv(),o=bn();function i(E,_={}){if((0,o.isFunctionSignature)(E))return c(E,_);if((0,o.isEventSignature)(E))return u(E,_);if((0,o.isErrorSignature)(E))return d(E,_);if((0,o.isConstructorSignature)(E))return f(E,_);if((0,o.isFallbackSignature)(E))return b(E);if((0,o.isReceiveSignature)(E))return{type:"receive",stateMutability:"payable"};throw new t.UnknownSignatureError({signature:E})}function c(E,_={}){const I=(0,o.execFunctionSignature)(E);if(!I)throw new t.InvalidSignatureError({signature:E,type:"function"});const S=p(I.parameters),R=[],x=S.length;for(let A=0;A<x;A++)R.push(g(S[A],{modifiers:o.functionModifiers,structs:_,type:"function"}));const T=[];if(I.returns){const A=p(I.returns),C=A.length;for(let k=0;k<C;k++)T.push(g(A[k],{modifiers:o.functionModifiers,structs:_,type:"function"}))}return{name:I.name,type:"function",stateMutability:I.stateMutability??"nonpayable",inputs:R,outputs:T}}function u(E,_={}){const I=(0,o.execEventSignature)(E);if(!I)throw new t.InvalidSignatureError({signature:E,type:"event"});const S=p(I.parameters),R=[],x=S.length;for(let T=0;T<x;T++)R.push(g(S[T],{modifiers:o.eventModifiers,structs:_,type:"event"}));return{name:I.name,type:"event",inputs:R}}function d(E,_={}){const I=(0,o.execErrorSignature)(E);if(!I)throw new t.InvalidSignatureError({signature:E,type:"error"});const S=p(I.parameters),R=[],x=S.length;for(let T=0;T<x;T++)R.push(g(S[T],{structs:_,type:"error"}));return{name:I.name,type:"error",inputs:R}}function f(E,_={}){const I=(0,o.execConstructorSignature)(E);if(!I)throw new t.InvalidSignatureError({signature:E,type:"constructor"});const S=p(I.parameters),R=[],x=S.length;for(let T=0;T<x;T++)R.push(g(S[T],{structs:_,type:"constructor"}));return{type:"constructor",stateMutability:I.stateMutability??"nonpayable",inputs:R}}function b(E){const _=(0,o.execFallbackSignature)(E);if(!_)throw new t.InvalidSignatureError({signature:E,type:"fallback"});return{type:"fallback",stateMutability:_.stateMutability??"nonpayable"}}const y=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,m=/^u?int$/;function g(E,_){const I=(0,s.getParameterCacheKey)(E,_?.type,_?.structs);if(s.parameterCache.has(I))return s.parameterCache.get(I);const S=e.isTupleRegex.test(E),R=(0,e.execTyped)(S?h:y,E);if(!R)throw new n.InvalidParameterError({param:E});if(R.name&&l(R.name))throw new n.SolidityProtectedKeywordError({param:E,name:R.name});const x=R.name?{name:R.name}:{},T=R.modifier==="indexed"?{indexed:!0}:{},A=_?.structs??{};let C,k={};if(S){C="tuple";const P=p(R.type),q=[],F=P.length;for(let M=0;M<F;M++)q.push(g(P[M],{structs:A}));k={components:q}}else if(R.type in A)C="tuple",k={components:A[R.type]};else if(m.test(R.type))C=`${R.type}256`;else if(R.type==="address payable")C="address";else if(C=R.type,_?.type!=="struct"&&!v(C))throw new r.UnknownSolidityTypeError({type:C});if(R.modifier){if(!_?.modifiers?.has?.(R.modifier))throw new n.InvalidModifierError({param:E,type:_?.type,modifier:R.modifier});if(o.functionModifiers.has(R.modifier)&&!w(C,!!R.array))throw new n.InvalidFunctionModifierError({param:E,type:_?.type,modifier:R.modifier})}const B={type:`${C}${R.array??""}`,...x,...T,...k};return s.parameterCache.set(I,B),B}function p(E,_=[],I="",S=0){const R=E.trim().length;for(let x=0;x<R;x++){const T=E[x],A=E.slice(x+1);switch(T){case",":return S===0?p(A,[..._,I.trim()]):p(A,_,`${I}${T}`,S);case"(":return p(A,_,`${I}${T}`,S+1);case")":return p(A,_,`${I}${T}`,S-1);default:return p(A,_,`${I}${T}`,S)}}if(I==="")return _;if(S!==0)throw new a.InvalidParenthesisError({current:I,depth:S});return _.push(I.trim()),_}function v(E){return E==="address"||E==="bool"||E==="function"||E==="str
2ing"||e.bytesRegex.test(E)||e.integerRegex.test(E)}const j=/^(?: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 l(E){return E==="address"||E==="bool"||E==="function"||E==="string"||E==="tuple"||e.bytesRegex.test(E)||e.integerRegex.test(E)||j.test(E)}function w(E,_){return _||E==="bytes"||E==="string"||E==="tuple"}return De}var S0;function gu(){if(S0)return ca;S0=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.parseStructs=i;const e=yu(),r=pu(),n=To(),t=Dd(),a=kp(),s=bn(),o=fn();function i(d){const f={},b=d.length;for(let g=0;g<b;g++){const p=d[g];if(!(0,s.isStructSignature)(p))continue;const v=(0,s.execStructSignature)(p);if(!v)throw new t.InvalidSignatureError({signature:p,type:"struct"});const j=v.properties.split(";"),l=[],w=j.length;for(let E=0;E<w;E++){const I=j[E].trim();if(!I)continue;const S=(0,o.parseAbiParameter)(I,{type:"struct"});l.push(S)}if(!l.length)throw new t.InvalidStructSignatureError({signature:p});f[v.name]=l}const y={},h=Object.entries(f),m=h.length;for(let g=0;g<m;g++){const[p,v]=h[g];y[p]=u(v,f)}return y}const c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function u(d,f,b=new Set){const y=[],h=d.length;for(let m=0;m<h;m++){const g=d[m];if(e.isTupleRegex.test(g.type))y.push(g);else{const v=(0,e.execTyped)(c,g.type);if(!v?.type)throw new n.InvalidAbiTypeParameterError({abiParameter:g});const{array:j,type:l}=v;if(l in f){if(b.has(l))throw new a.CircularReferenceError({type:l});y.push({...g,type:`tuple${j??""}`,components:u(f[l]??[],f,new Set([...b,l]))})}else if((0,o.isSolidityType)(l))y.push(g);else throw new r.UnknownTypeError({type:l})}}return y}return ca}var R0;function hv(){if(R0)return sa;R0=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.parseAbi=t;const e=bn(),r=gu(),n=fn();function t(a){const s=(0,r.parseStructs)(a),o=[],i=a.length;for(let c=0;c<i;c++){const u=a[c];(0,e.isStructSignature)(u)||o.push((0,n.parseSignature)(u,s))}return o}return sa}var ua={},B0;function yv(){if(B0)return ua;B0=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.parseAbiItem=a;const e=pu(),r=bn(),n=gu(),t=fn();function a(s){let o;if(typeof s=="string")o=(0,t.parseSignature)(s);else{const i=(0,n.parseStructs)(s),c=s.length;for(let u=0;u<c;u++){const d=s[u];if(!(0,r.isStructSignature)(d)){o=(0,t.parseSignature)(d,i);break}}}if(!o)throw new e.InvalidAbiItemError({signature:s});return o}return ua}var da={},O0;function pv(){if(O0)return da;O0=1,Object.defineProperty(da,"__esModule",{value:!0}),da.parseAbiParameter=a;const e=To(),r=bn(),n=gu(),t=fn();function a(s){let o;if(typeof s=="string")o=(0,t.parseAbiParameter)(s,{modifiers:r.modifiers});else{const i=(0,n.parseStructs)(s),c=s.length;for(let u=0;u<c;u++){const d=s[u];if(!(0,r.isStructSignature)(d)){o=(0,t.parseAbiParameter)(d,{modifiers:r.modifiers,structs:i});break}}}if(!o)throw new e.InvalidAbiParameterError({param:s});return o}return da}var fa={},C0;function gv(){if(C0)return fa;C0=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.parseAbiParameters=s;const e=To(),r=bn(),n=gu(),t=fn(),a=fn();function s(o){const i=[];if(typeof o=="string"){const c=(0,t.splitParameters)(o),u=c.length;for(let d=0;d<u;d++)i.push((0,a.parseAbiParameter)(c[d],{modifiers:r.modifiers}))}else{const c=(0,n.parseStructs)(o),u=o.length;for(let d=0;d<u;d++){const f=o[d];if((0,r.isStructSignature)(f))continue;const b=(0,t.splitParameters)(f),y=b.length;for(let h=0;h<y;h++)i.push((0,a.parseAbiParameter)(b[h],{modifiers:r.modifiers,structs:c}))}}if(i.length===0)throw new e.InvalidAbiParametersError({params:o});return i}return fa}var x0;function tr(){return x0||(x0=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var r=ln();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return r.BaseError}});var n=lv();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var t=bv();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return t.formatAbi}});var a=Hp();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return a.formatAbiItem}});var s=qp();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var o=Mp();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return o.formatAbiParameters}});var i=hv();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return i.parseAbi}});var c=yv();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var u=pv();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return u.parseAbiParameter}});var d=gv();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return d.parseAbiParameters}});var f=pu();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var b=To();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return b.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return b.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return b.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return b.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return b.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return b.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return b.InvalidAbiParameterError}});var y=Dd();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return y.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return y.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return y.UnknownSignatureError}});var h=Fp();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var m=kp();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return m.CircularReferenceError}})})(pd)),pd}var Vr={},la={},q0;function be(){if(q0)return la;q0=1,Object.defineProperty(la,"__esModule",{value:!0}),la.getAction=e;function e(r,n,t){const a=r[n.name];if(typeof a=="function")return a;const s=r[t];return typeof s=="function"?s:o=>n(r,o)}return la}var ba={},ma={},ne={},Fn={},M0;function zt(){if(M0)return Fn;M0=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.formatAbiItem=r,Fn.formatAbiParams=n;const e=Ee();function r(a,{includeName:s=!1}={}){if(a.type!=="function"&&a.type!=="event"&&a.type!=="error")throw new e.InvalidDefinitionTypeError(a.type);return`${a.name}(${n(a.inputs,{includeName:s})})`}function n(a,{includeName:s=!1}={}){return a?a.map(o=>t(o,{includeName:s})).join(s?", ":","):""}function t(a,{includeName:s}){return a.type.startsWith("tuple")?`(${n(a.components,{includeName:s})})${a.type.slice(5)}`:a.type+(s&&a.name?` ${a.name}`:"")}return Fn}var ha={},ya={},H0;function ze(){if(H0)return ya;H0=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.isHex=e;
2function e(r,{strict:n=!0}={}){return!r||typeof r!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}return ya}var k0;function Ve(){if(k0)return ha;k0=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.size=r;const e=ze();function r(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return ha}var Wr={},Nn={},F0;function _v(){return F0||(F0=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.version=void 0,Nn.version="2.38.3"),Nn}var N0;function ce(){if(N0)return Wr;N0=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.BaseError=void 0,Wr.setErrorConfig=n;const e=_v();let r={getDocsUrl:({docsBaseUrl:s,docsPath:o="",docsSlug:i})=>o?`${s??"https://viem.sh"}${o}${i?`#${i}`:""}`:void 0,version:`viem@${e.version}`};function n(s){r=s}class t extends Error{constructor(o,i={}){const c=i.cause instanceof t?i.cause.details:i.cause?.message?i.cause.message:i.details,u=i.cause instanceof t&&i.cause.docsPath||i.docsPath,d=r.getDocsUrl?.({...i,docsPath:u}),f=[o||"An error occurred.","",...i.metaMessages?[...i.metaMessages,""]:[],...d?[`Docs: ${d}`]:[],...c?[`Details: ${c}`]:[],...r.version?[`Version: ${r.version}`]:[]].join(` 3`);super(f,i.cause?{cause:i.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=c,this.docsPath=u,this.metaMessages=i.metaMessages,this.name=i.name??this.name,this.shortMessage=o,this.version=e.version}walk(o){return a(this,o)}}Wr.BaseError=t;function a(s,o){return o?.(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?a(s.cause,o):o?null:s}return Wr}var $0;function Ee(){if($0)return ne;$0=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.UnsupportedPackedAbiType=ne.InvalidDefinitionTypeError=ne.InvalidArrayError=ne.InvalidAbiDecodingTypeError=ne.InvalidAbiEncodingTypeError=ne.DecodeLogTopicsMismatch=ne.DecodeLogDataMismatch=ne.BytesSizeMismatchError=ne.AbiItemAmbiguityError=ne.AbiFunctionSignatureNotFoundError=ne.AbiFunctionOutputsNotFoundError=ne.AbiFunctionNotFoundError=ne.AbiEventNotFoundError=ne.AbiEventSignatureNotFoundError=ne.AbiEventSignatureEmptyTopicsError=ne.AbiErrorSignatureNotFoundError=ne.AbiErrorNotFoundError=ne.AbiErrorInputsNotFoundError=ne.AbiEncodingLengthMismatchError=ne.AbiEncodingBytesSizeMismatchError=ne.AbiEncodingArrayLengthMismatchError=ne.AbiDecodingZeroDataError=ne.AbiDecodingDataSizeTooSmallError=ne.AbiDecodingDataSizeInvalidError=ne.AbiConstructorParamsNotFoundError=ne.AbiConstructorNotFoundError=void 0;const e=zt(),r=Ve(),n=ce();class t extends n.BaseError{constructor({docsPath:C}){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(` 4`),{docsPath:C,name:"AbiConstructorNotFoundError"})}}ne.AbiConstructorNotFoundError=t;class a extends n.BaseError{constructor({docsPath:C}){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(` 5`),{docsPath:C,name:"AbiConstructorParamsNotFoundError"})}}ne.AbiConstructorParamsNotFoundError=a;class s extends n.BaseError{constructor({data:C,size:k}){super([`Data size of ${k}
5 bytes is invalid.`,"Size must be in increments of 32 bytes (size % 32 === 0)."].join(` 6`),{metaMessages:[`Data: ${C} (${k} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}ne.AbiDecodingDataSizeInvalidError=s;class o extends n.BaseError{constructor({data:C,params:k,size:B}){super([`Data size of ${B} bytes is too small for given parameters.`].join(` 7`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(k,{includeName:!0})})`,`Data: ${C} (${B} 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=C,this.params=k,this.size=B}}ne.AbiDecodingDataSizeTooSmallError=o;class i extends n.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}ne.AbiDecodingZeroDataError=i;class c extends n.BaseError{constructor({expectedLength:C,givenLength:k,type:B}){super([`ABI encoding array length mismatch for type ${B}.`,`Expected length: ${C}`,`Given length: ${k}`].join(` 8`),{name:"AbiEncodingArrayLengthMismatchError"})}}ne.AbiEncodingArrayLengthMismatchError=c;class u extends n.BaseError{constructor({expectedSize:C,value:k}){super(`Size of bytes "${k}" (bytes${(0,r.size)(k)}) does not match expected size (bytes${C}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}ne.AbiEncodingBytesSizeMismatchError=u;class d extends n.BaseError{constructor({expectedLength:C,givenLength:k}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${C}`,`Given length (values): ${k}`].join(` 9`),{name:"AbiEncodingLengthMismatchError"})}}ne.AbiEncodingLengthMismatchError=d;class f extends n.BaseError{constructor(C,{docsPath:k}){super([`Arguments (\`args\`) were provided to "${C}", but "${C}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(` 10`),{docsPath:k,name:"AbiErrorInputsNotFoundError"})}}ne.AbiErrorInputsNotFoundError=f;class b extends n.BaseError{constructor(C,{docsPath:k}={}){super([`Error ${C?`"${C}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(` 11`),{docsPath:k,name:"AbiErrorNotFoundError"})}}ne.AbiErrorNotFoundError=b;class y extends n.BaseError{constructor(C,{docsPath:k}){super([`Encoded error signature "${C}" 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=${C}.`].join(` 12`),{docsPath:k,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=C}}ne.AbiErrorSignatureNotFoundError=y;class h extends n.BaseError{constructor({docsPath:C}){super("Cannot extract event signature from empty topics.",{docsPath:C,name:"AbiEventSignatureEmptyTopicsError"})}}ne.AbiEventSignatureEmptyTopicsError=h;class m extends n.BaseError{constructor(C,{docsPath:k}){super([`Encoded event signature "${C}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${C}.`].join(` 13`),{docsPath:k,name:"AbiEventSignatureNotFoundError"})}}ne.AbiEventSignatureNotFoundError=m;class g extends n.BaseError{constructor(C,{docsPath:k}={}){super([`Event ${C?`"${C}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` 14`),{docsPath:k,name:"AbiEventNotFoundError"})}}ne.AbiEventNotFoundError=g;class p extends n.BaseError{constructor(C,{docsPath:k}={}){super([`Function ${C?`"${C}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` 15`),{docsPath:k,name:"AbiFunctionNotFoundError"})}}ne.AbiFunctionNotFoundError=p;class v extends n.BaseError{constructor(C,{docsPath:k}){super([`Function "${C}" 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(` 16`),{docsPath:k,name:"AbiFunctionOutputsNotFoundError"})}}ne.AbiFunctionOutputsNotFoundError=v;class j extends n.BaseError{constructor(C,{docsPath:k}){super([`Encoded function signature "${C}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${C}.`].join(` 17`),{docsPath:k,name:"AbiFunctionSignatureNotFoundError"})}}ne.AbiFunctionSignatureNotFoundError=j;class l extends n.BaseError{constructor(C,k){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${C.type}\` in \`${(0,e.formatAbiItem)(C.abiItem)}\`, and`,`\`${k.type}\` in \`${(0,e.formatAbiItem)(k.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}ne.AbiItemAmbiguityError=l;class w extends n.BaseError{constructor({expectedSize:C,givenSize:k}){super(`Expected bytes${C}, got bytes${k}.`,{name:"BytesSizeMismatchError"})}}ne.BytesSizeMismatchError=w;class E extends n.BaseError{constructor({abiItem:C,data:k,params:B,size:P}){super([`Data size of ${P} bytes is too small for non-indexed event parameters.`].join(` 18`),{metaMessages:[`Params: (${(0,e.formatAbiParams)(B,{includeName:!0})})`,`Data: ${k} (${P} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),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.abiItem=C,this.data=k,this.params=B,this.size=P}}ne.DecodeLogDataMismatch=E;class _ extends n.BaseError{constructor({abiItem:C,param:k}){super([`Expected a topic for indexed event parameter${k.name?` "${k.name}"`:""} on event "${(0,e.formatAbiItem)(C,{includeName:!0})}".`].join(` 19`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=C}}ne.DecodeLogTopicsMismatch=_;class I extends n.BaseError{constructor(C,{docsPath:k}){super([`Type "${C}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` 20`),{docsPath:k,name:"InvalidAbiEncodingType"})}}ne.InvalidAbiEncodingTypeError=I;class S extends n.BaseError{constructor(C,{docsPath:k}){super([`Type "${C}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` 21`),{docsPath:k,name:"InvalidAbiDecodingType"})}}ne.InvalidAbiDecodingTypeError=S;class R extends n.BaseError{constructor(C){super([`Value "${C}" is not a valid array.`].join(` 22`),{name:"InvalidArrayError"})}}ne.InvalidArrayError=R;class x extends n.BaseError{constructor(C){super([`"${C}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` 23`),{name:"InvalidDefinitionTypeError"})}}ne.InvalidDefinitionTypeError=x;class T extends n.BaseError{constructor(C){super(`Type "${C}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}return ne.UnsupportedPackedAbiType=T,ne}var $n={},z0;function Np(){if(z0)return $n;z0=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.FilterTypeNotSupportedError=void 0;const e=ce();class r extends e.BaseError{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}return $n.FilterTypeNotSupportedError=r,$n}var Kt={},Kr={},Ot={},U0;function _u(){if(U0)return Ot;
23U0=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.InvalidBytesLengthError=Ot.SizeExceedsPaddingSizeError=Ot.SliceOffsetOutOfBoundsError=void 0;const e=ce();class r extends e.BaseError{constructor({offset:s,position:o,size:i}){super(`Slice ${o==="start"?"starting":"ending"} at offset "${s}" is out-of-bounds (size: ${i}).`,{name:"SliceOffsetOutOfBoundsError"})}}Ot.SliceOffsetOutOfBoundsError=r;class n extends e.BaseError{constructor({size:s,targetSize:o,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} size (${s}) exceeds padding size (${o}).`,{name:"SizeExceedsPaddingSizeError"})}}Ot.SizeExceedsPaddingSizeError=n;class t extends e.BaseError{constructor({size:s,targetSize:o,type:i}){super(`${i.charAt(0).toUpperCase()}${i.slice(1).toLowerCase()} is expected to be ${o} ${i} long, but is ${s} ${i} long.`,{name:"InvalidBytesLengthError"})}}return Ot.InvalidBytesLengthError=t,Ot}var L0;function rr(){if(L0)return Kr;L0=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.pad=r,Kr.padHex=n,Kr.padBytes=t;const e=_u();function r(a,{dir:s,size:o=32}={}){return typeof a=="string"?n(a,{dir:s,size:o}):t(a,{dir:s,size:o})}function n(a,{dir:s,size:o=32}={}){if(o===null)return a;const i=a.replace("0x","");if(i.length>o*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(i.length/2),targetSize:o,type:"hex"});return`0x${i[s==="right"?"padEnd":"padStart"](o*2,"0")}`}function t(a,{dir:s,size:o=32}={}){if(o===null)return a;
23if(a.length>o)throw new e.SizeExceedsPaddingSizeError({size:a.length,targetSize:o,type:"bytes"});const i=new Uint8Array(o);for(let c=0;c<o;c++){const u=s==="right";i[u?c:o-c-1]=a[u?c:a.length-c-1]}return i}return Kr}var Ct={},Ye={},D0;function mn(){if(D0)return Ye;D0=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.SizeOverflowError=Ye.InvalidHexValueError=Ye.InvalidHexBooleanError=Ye.InvalidBytesBooleanError=Ye.IntegerOutOfRangeError=void 0;const e=ce();class r extends e.BaseError{constructor({max:i,min:c,signed:u,size:d,value:f}){super(`Number "${f}" is not in safe ${d?`${d*8}-bit ${u?"signed":"unsigned"} `:""}integer range ${i?`(${c} to ${i})`:`(above ${c})`}`,{name:"IntegerOutOfRangeError"})}}Ye.IntegerOutOfRangeError=r;class n extends e.BaseError{constructor(i){super(`Bytes value "${i}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}Ye.InvalidBytesBooleanError=n;class t extends e.BaseError{constructor(i){super(`Hex value "${i}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}Ye.InvalidHexBooleanError=t;class a extends e.BaseError{constructor(i){super(`Hex value "${i}" is an odd length (${i.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}Ye.InvalidHexValueError=a;class s extends e.BaseError{constructor({givenSize:i,maxSize:c}){super(`Size cannot exceed ${c} bytes. Given size: ${i} bytes.`,{name:"SizeOverflowError"})}}return Ye.SizeOverflowError=s,Ye}var pa={},G0;function Ut(){if(G0)return pa;G0=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.trim=e;function e(r,{dir:n="left"}={}){let t=typeof r=="string"?r.replace("0x",""):r,a=0;for(let s=0;s<t.length-1&&t[n==="left"?s:t.length-s-1].toString()==="0";s++)a++;return t=n==="left"?t.slice(a):t.slice(0,t.length-a),typeof r=="string"?(t.length===1&&n==="right"&&(t=`${t}0`),`0x${t.length%2===1?`0${t}`:t}`):t}return pa}var V0;function Ae(){if(V0)return Ct;V0=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.assertSize=a,Ct.fromHex=s,Ct.hexToBigInt=o,Ct.hexToBool=i,Ct.hexToNumber=c,Ct.hexToString=u;const e=mn(),r=Ve(),n=Ut(),t=pe();function a(d,{size:f}){if((0,r.size)(d)>f)throw new e.SizeOverflowError({givenSize:(0,r.size)(d),maxSize:f})}function s(d,f){const b=typeof f=="string"?{to:f}:f,y=b.to;return y==="number"?c(d,b):y==="bigint"?o(d,b):y==="string"?u(d,b):y==="boolean"?i(d,b):(0,t.hexToBytes)(d,b)}function o(d,f={}){const{signed:b}=f;f.size&&a(d,{size:f.size});const y=BigInt(d);if(!b)return y;const h=(d.length-2)/2,m=(1n<<BigInt(h)*8n-1n)-1n;return y<=m?y:y-BigInt(`0x${"f".padStart(h*2,"f")}`)-1n}function i(d,f={}){let b=d;if(f.size&&(a(b,{size:f.size}),b=(0,n.trim)(b)),(0,n.trim)(b)==="0x00")return!1;if((0,n.trim)(b)==="0x01")return!0;throw new e.InvalidHexBooleanError(b)}function c(d,f={}){return Number(o(d,f))}function u(d,f={}){let b=(0,t.hexToBytes)(d);return f.size&&(a(b,{size:f.size}),b=(0,n.trim)(b,{dir:"right"})),new TextDecoder().decode(b)}return Ct}var Zt={},W0;function te(){if(W0)return Zt;W0=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.toHex=a,Zt.boolToHex=s,Zt.bytesToHex=o,Zt.numberToHex=i,Zt.stringToHex=u;const e=mn(),r=rr(),n=Ae(),t=Array.from({length:256},(d,f)=>f.toString(16).padStart(2,"0"));function a(d,f={}){return typeof d=="number"||typeof d=="bigint"?i(d,f):typeof d=="string"?u(d,f):typeof d=="boolean"?s(d,f):o(d,f)}function s(d,f={}){const b=`0x${Number(d)}`;return typeof f.size=="number"?((0,n.assertSize)(b,{size:f.size}),(0,r.pad)(b,{size:f.size})):b}function o(d,f={}){let b="";for(let h=0;h<d.length;h++)b+=t[d[h]];const y=`0x${b}`;return typeof f.size=="number"?((0,n.assertSize)(y,{size:f.size}),(0,r.pad)(y,{dir:"right",size:f.size})):y}function i(d,f={}){const{signed:b,size:y}=f,h=BigInt(d);let m;y?b?m=(1n<<BigInt(y)*8n-1n)-1n:m=2n**(BigInt(y)*8n)-1n:typeof d=="number"&&(m=BigInt(Number.MAX_SAFE_INTEGER));const g=typeof m=="bigint"&&b?-m-1n:0;if(m&&h>m||h<g){const v=typeof d=="bigint"?"n":"";throw new e.IntegerOutOfRangeError({max:m?`${m}${v}`:void 0,min:`${g}${v}`,signed:b,size:y,value:`${d}${v}`})}const p=`0x${(b&&h<0?(1n<<BigInt(y*8))+BigInt(h):h).toString(16)}`;return y?(0,r.pad)(p,{size:y}):p}const c=new TextEncoder;function u(d,f={}){const b=c.encode(d);return o(b,f)}return Zt}var K0;function pe(){if(K0)return Kt;
23K0=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.toBytes=o,Kt.boolToBytes=i,Kt.hexToBytes=d,Kt.numberToBytes=f,Kt.stringToBytes=b;const e=ce(),r=ze(),n=rr(),t=Ae(),a=te(),s=new TextEncoder;function o(y,h={}){return typeof y=="number"||typeof y=="bigint"?f(y,h):typeof y=="boolean"?i(y,h):(0,r.isHex)(y)?d(y,h):b(y,h)}function i(y,h={}){const m=new Uint8Array(1);return m[0]=Number(y),typeof h.size=="number"?((0,t.assertSize)(m,{size:h.size}),(0,n.pad)(m,{size:h.size})):m}const c={zero:48,nine:57,A:65,F:70,a:97,f:102};function u(y){if(y>=c.zero&&y<=c.nine)return y-c.zero;if(y>=c.A&&y<=c.F)return y-(c.A-10);if(y>=c.a&&y<=c.f)return y-(c.a-10)}function d(y,h={}){let m=y;h.size&&((0,t.assertSize)(m,{size:h.size}),m=(0,n.pad)(m,{dir:"right",size:h.size}));let g=m.slice(2);g.length%2&&(g=`0${g}`);const p=g.length/2,v=new Uint8Array(p);for(let j=0,l=0;j<p;j++){const w=u(g.charCodeAt(l++)),E=u(g.charCodeAt(l++));if(w===void 0||E===void 0)throw new e.BaseError(`Invalid byte sequence ("${g[l-2]}${g[l-1]}" in "${g}").`);v[j]=w*16+E}return v}function f(y,h){const m=(0,a.numberToHex)(y,h);return d(m)}function b(y,h={}){const m=s.encode(y);return typeof h.size=="number"?((0,t.assertSize)(m,{size:h.size}),(0,n.pad)(m,{dir:"right",size:h.size})):m}return Kt}var ga={},Z0;function We(){if(Z0)return ga;Z0=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.keccak256=a;const e=Op(),r=ze(),n=pe(),t=te();function a(s,o){const i=o||"hex",c=(0,e.keccak_256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return i==="bytes"?c:(0,t.toHex)(c)}return ga}var zn={},_a={},va={},Y0;function vv(){if(Y0)return va;Y0=1,Object.defineProperty(va,"__esModule",{value:!0}),va.hashSignature=t;const e=pe(),r=We(),n=a=>(0,r.keccak256)((0,e.toBytes)(a));function t(a){return n(a)}return va}var Un={},Ea={},J0;function Ev(){if(J0)return Ea;J0=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.normalizeSignature=r;const e=ce();function r(n){let t=!0,a="",s=0,o="",i=!1;for(let c=0;c<n.length;c++){const u=n[c];if(["(",")",","].includes(u)&&(t=!0),u==="("&&s++,u===")"&&s--,!!t){if(s===0){if(u===" "&&["event","function",""].includes(o))o="";else if(o+=u,u===")"){i=!0;break}continue}if(u===" "){n[c-1]!==","&&a!==","&&a!==",("&&(a="",t=!1);continue}o+=u,a+=u}}if(!i)throw new e.BaseError("Unable to normalize signature.");return o}return Ea}var X0;function Gd(){if(X0)return Un;X0=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.toSignature=void 0;const e=tr(),r=Ev(),n=t=>{const a=typeof t=="string"?t:(0,e.formatAbiItem)(t);return(0,r.normalizeSignature)(a)};return Un.toSignature=n,Un}var Q0;function vu(){if(Q0)return _a;Q0=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.toSignatureHash=n;const e=vv(),r=Gd();function n(t){return(0,e.hashSignature)((0,r.toSignature)(t))}return _a}var el;function hn(){if(el)return zn;el=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.toEventSelector=void 0;const e=vu();return zn.toEventSelector=e.toSignatureHash,zn}var Ln={},Dn={},tl;function ht(){if(tl)return Dn;tl=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.InvalidAddressError=void 0;const e=ce();class r extends e.BaseError{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}return Dn.InvalidAddressError=r,Dn}var gd={},Gn={},rl;function yn(){if(rl)return Gn;rl=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const a=this.keys().next().value;a&&this.delete(a)}return this}}return Gn.LruMap=e,Gn}var Vn={},nl;function rt(){if(nl)return Vn;nl=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.checksumAddress=o,Vn.getAddress=i;const e=ht(),r=pe(),n=We(),t=yn(),a=Ke(),s=new t.LruMap(8192);function o(c,u){if(s.has(`${c}.${u}`))return s.get(`${c}.${u}`);const d=u?`${u}${c.toLowerCase()}`:c.substring(2).toLowerCase(),f=(0,n.keccak256)((0,r.stringToBytes)(d),"bytes"),b=(u?d.substring(`${u}0x`.length):d).split("");for(let h=0;h<40;h+=2)f[h>>1]>>4>=8&&b[h]&&(b[h]=b[h].toUpperCase()),(f[h>>1]&15)>=8&&b[h+1]&&(b[h+1]=b[h+1].toUpperCase());const y=`0x${b.join("")}`;return s.set(`${c}.${u}`,y),y}function i(c,u){if(!(0,a.isAddress)(c,{strict:!1}))throw new e.InvalidAddressError({address:c});return o(c,u)}return Vn}var ol;function Ke(){return ol||(ol=1,(function(e){Object.defineProperty(e,"__esMo
23dule",{value:!0}),e.isAddressCache=void 0,e.isAddress=a;const r=yn(),n=rt(),t=/^0x[a-fA-F0-9]{40}$/;e.isAddressCache=new r.LruMap(8192);function a(s,o){const{strict:i=!0}=o??{},c=`${s}.${i}`;if(e.isAddressCache.has(c))return e.isAddressCache.get(c);const u=t.test(s)?s.toLowerCase()===s?!0:i?(0,n.checksumAddress)(s)===s:!0:!1;return e.isAddressCache.set(c,u),u}})(gd)),gd}var Zr={},al;function Oe(){if(al)return Zr;al=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.concat=e,Zr.concatBytes=r,Zr.concatHex=n;function e(t){return typeof t[0]=="string"?n(t):r(t)}function r(t){let a=0;for(const i of t)a+=i.length;const s=new Uint8Array(a);let o=0;for(const i of t)s.set(i,o),o+=i.length;return s}function n(t){return`0x${t.reduce((a,s)=>a+s.replace("0x",""),"")}`}return Zr}var Yr={},il;function at(){if(il)return Yr;il=1,Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.slice=t,Yr.sliceBytes=o,Yr.sliceHex=i;const e=_u(),r=ze(),n=Ve();function t(c,u,d,{strict:f}={}){return(0,r.isHex)(c,{strict:!1})?i(c,u,d,{strict:f}):o(c,u,d,{strict:f})}function a(c,u){if(typeof u=="number"&&u>0&&u>(0,n.size)(c)-1)throw new e.SliceOffsetOutOfBoundsError({offset:u,position:"start",size:(0,n.size)(c)})}function s(c,u,d){if(typeof u=="number"&&typeof d=="number"&&(0,n.size)(c)!==d-u)throw new e.SliceOffsetOutOfBoundsError({offset:d,position:"end",size:(0,n.size)(c)})}function o(c,u,d,{strict:f}={}){a(c,u);const b=c.slice(u,d);return f&&s(b,u,d),b}function i(c,u,d,{strict:f}={}){a(c,u);const b=`0x${c.replace("0x","").slice((u??0)*2,(d??c.length)*2)}`;return f&&s(b,u,d),b}return Yr}var xt={},sl;function Eu(){return sl||(sl=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.integerRegex=xt.bytesRegex=xt.arrayRegex=void 0,xt.arrayRegex=/^(.*)\[([0-9]*)\]$/,xt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,xt.integerRegex=/^(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)?$/),xt}var cl;function yt(){if(cl)return Ln;cl=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.encodeAbiParameters=f,Ln.getArrayComponents=E;const e=Ee(),r=ht(),n=ce(),t=mn(),a=Ke(),s=Oe(),o=rr(),i=Ve(),c=at(),u=te(),d=Eu();function f(_,I){if(_.length!==I.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:_.length,givenLength:I.length});const S=b({params:_,values:I}),R=h(S);return R.length===0?"0x":R}function b({params:_,values:I}){const S=[];for(let R=0;R<_.length;R++)S.push(y({param:_[R],value:I[R]}));return S}function y({param:_,value:I}){const S=E(_.type);if(S){const[R,x]=S;return g(I,{length:R,param:{..._,type:x}})}if(_.type==="tuple")return w(I,{param:_});if(_.type==="address")return m(I);if(_.type==="bool")return v(I);if(_.type.startsWith("uint")||_.type.startsWith("int")){const R=_.type.startsWith("int"),[,,x="256"]=d.integerRegex.exec(_.type)??[];return j(I,{signed:R,size:Number(x)})}if(_.type.startsWith("bytes"))return p(I,{param:_});if(_.type==="string")return l(I);throw new e.InvalidAbiEncodingTypeError(_.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function h(_){let I=0;for(let T=0;T<_.length;T++){const{dynamic:A,encoded:C}=_[T];A?I+=32:I+=(0,i.size)(C)}const S=[],R=[];let x=0;for(let T=0;T<_.length;T++){const{dynamic:A,encoded:C}=_[T];A?(S.push((0,u.numberToHex)(I+x,{size:32})),R.push(C),x+=(0,i.size)(C)):S.push(C)}return(0,s.concat)([...S,...R])}function m(_){if(!(0,a.isAddress)(_))throw new r.InvalidAddressError({address:_});return{dynamic:!1,encoded:(0,o.padHex)(_.toLowerCase())}}function g(_,{length:I,param:S}){const R=I===null;if(!Array.isArray(_))throw new e.InvalidArrayError(_);if(!R&&_.length!==I)throw new e.AbiEncodingArrayLengthMismatchError({expectedLength:I,givenLength:_.length,type:`${S.type}[${I}]`});let x=!1;const T=[];for(let A=0;A<_.length;A++){const C=y({param:S,value:_[A]});C.dynamic&&(x=!0),T.push(C)}if(R||x){const A=h(T);if(R){const C=(0,u.numberToHex)(T.length,{size:32});return{dynamic:!0,encoded:T.length>0?(0,s.concat)([C,A]):C}}if(x)return{dynamic:!0,encoded:A}}return{dynamic:!1,encoded:(0,s.concat)(T.map(({encoded:A})=>A))}}function p(_,{param:I}){const[,S]=I.type.split("bytes"),R=(0,i.size)(_);if(!S){let x=_;return R%32!==0&&(x=(0,o.padHex)(x,{dir:"right",size:Math.ceil((_.length-2)/2/32)*32})),{dynamic:!0,encoded:(0,s.concat)([(0,o.padHex)((0,u.numberToHex)(R,{size:32})),x])}}if(R!==Number.parseInt(S,10))throw new e.AbiEncodingBytesSizeMismatchError({expectedSize:Number.parseInt(S,10),value:_});return{dynamic:!1,encoded:(0,o.padHex)(_,{dir:"right"})}}function v(_){if(typeof _!="boolean")throw new n.BaseError(`Invalid boolean value: "${_}" (type: ${typeof _}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,o.padHex)((0,u.boolToHex)(_))}}function j(_,{signed:I,size:S=256}){if(typeof S=="number"){const R=2n**(BigInt(S)-(I?1n:0n))-1n,x=I?-R-1n:0n;if(_>R||_<x)throw new t.IntegerOutOfRangeError({max:R.toString(),min:x.toString(),signed:I,size:S/8,value:_.toString()})}return{dynamic:!1,encoded:(0,u.numberToHex)(_,{size:32,signed:I})}}function l(_){const I=(0,u.stringToHex)(_),S=Math.ceil((0,i.size)(I)/32),R=[];for(let x=0;x<S;x++)R.push((0,o.padHex)((0,c.slice)(I,x*32,(x+1)*32),{dir:"right"}));return{dynamic:!0,encoded:(0,s.concat)([(0,o.padHex)((0,u.numberToHex)((0,i.size)(I),{size:32})),...R])}}function w(_,{param:I}){let S=!1;const R=[];for(let x=0;x<I.components.length;x++){const T=I.components[x],A=Array.isArray(_)?x:T.name,C=y({param:T,value:_[A]});R.push(C),C.dynamic&&(S=!0)}return{dynamic:S,encoded:S?h(R):(0,s.concat)(R.map(({encoded:x})=>x))}}function E(_){const I=_.match(/^(.*)\[(\d+)?\]$/);return I?[I[2]?Number(I[2]):null,I[1]]:void 0}return Ln}var Jr={},Wn={},ul;function Mr(){if(ul)return Wn;ul=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.toFunctionSelector=void 0;const e=at(),r=vu(),n=t=>(0,e.slice)((0,r.toSignatureHash)(t),0,4);return Wn.toFunctionSelector=n,Wn}var dl;function Lt(){if(dl)return Jr;
23dl=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.getAbiItem=s,Jr.isArgOfType=o,Jr.getAmbiguousTypes=i;const e=Ee(),r=ze(),n=Ke(),t=hn(),a=Mr();function s(c){const{abi:u,args:d=[],name:f}=c,b=(0,r.isHex)(f,{strict:!1}),y=u.filter(m=>b?m.type==="function"?(0,a.toFunctionSelector)(m)===f:m.type==="event"?(0,t.toEventSelector)(m)===f:!1:"name"in m&&m.name===f);if(y.length===0)return;if(y.length===1)return y[0];let h;for(const m of y){if(!("inputs"in m))continue;if(!d||d.length===0){if(!m.inputs||m.inputs.length===0)return m;continue}if(!m.inputs||m.inputs.length===0||m.inputs.length!==d.length)continue;if(d.every((p,v)=>{const j="inputs"in m&&m.inputs[v];return j?o(p,j):!1})){if(h&&"inputs"in h&&h.inputs){const p=i(m.inputs,h.inputs,d);if(p)throw new e.AbiItemAmbiguityError({abiItem:m,type:p[0]},{abiItem:h,type:p[1]})}h=m}}return h||y[0]}function o(c,u){const d=typeof c,f=u.type;switch(f){case"address":return(0,n.isAddress)(c,{strict:!1});case"bool":return d==="boolean";case"function":return d==="string";case"string":return d==="string";default:return f==="tuple"&&"components"in u?Object.values(u.components).every((b,y)=>o(Object.values(c)[y],b)):/^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(f)?d==="number"||d==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(f)?d==="string"||c instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(f)?Array.isArray(c)&&c.every(b=>o(b,{...u,type:f.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function i(c,u,d){for(const f in c){const b=c[f],y=u[f];if(b.type==="tuple"&&y.type==="tuple"&&"components"in b&&"components"in y)return i(b.components,y.components,d[f]);const h=[b.type,y.type];if(h.includes("address")&&h.includes("bytes20")?!0:h.includes("address")&&h.includes("string")?(0,n.isAddress)(d[f],{strict:!1}):h.includes("address")&&h.includes("bytes")?(0,n.isAddress)(d[f],{strict:!1}):!1)return h}}return Jr}var fl;function Hr(){if(fl)return ma;fl=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.encodeEventTopics=u;const e=Ee(),r=Np(),n=pe(),t=We(),a=hn(),s=yt(),o=zt(),i=Lt(),c="/docs/contract/encodeEventTopics";function u(f){const{abi:b,eventName:y,args:h}=f;let m=b[0];if(y){const j=(0,i.getAbiItem)({abi:b,name:y});if(!j)throw new e.AbiEventNotFoundError(y,{docsPath:c});m=j}if(m.type!=="event")throw new e.AbiEventNotFoundError(void 0,{docsPath:c});const g=(0,o.formatAbiItem)(m),p=(0,a.toEventSelector)(g);let v=[];if(h&&"inputs"in m){const j=m.inputs?.filter(w=>"indexed"in w&&w.indexed),l=Array.isArray(h)?h:Object.values(h).length>0?j?.map(w=>h[w.name])??[]:[];l.length>0&&(v=j?.map((w,E)=>Array.isArray(l[E])?l[E].map((_,I)=>d({param:w,value:l[E][I]})):typeof l[E]<"u"&&l[E]!==null?d({param:w,value:l[E]}):null)??[])}return[p,...v]}function d({param:f,value:b}){if(f.type==="string"||f.type==="bytes")return(0,t.keccak256)((0,n.toBytes)(b));if(f.type==="tuple"||f.type.match(/^(.*)\[(\d+)?\]$/))throw new r.FilterTypeNotSupportedError(f.type);return(0,s.encodeAbiParameters)([f],[b])}return ma}var ja={},ll;function ju(){if(ll)return ja;ll=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.createFilterRequestScope=e;function e(r,{method:n}){const t={};return r.transport.type==="fallback"&&r.transport.onResponse?.(({method:a,response:s,status:o,transport:i})=>{o==="success"&&n===a&&(t[s]=i.request)}),(a=>t[a]||r.request)}return ja}var bl;function Vd(){if(bl)return ba;bl=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.createContractEventFilter=t;const e=Hr(),r=te(),n=ju();async function t(a,s){const{address:o,abi:i,args:c,eventName:u,fromBlock:d,strict:f,toBlock:b}=s,y=(0,n.createFilterRequestScope)(a,{method:"eth_newFilter"}),h=u?(0,e.encodeEventTopics)({abi:i,args:c,eventName:u}):void 0,m=await a.request({method:"eth_newFilter",params:[{address:o,fromBlock:typeof d=="bigint"?(0,r.numberToHex)(d):d,toBlock:typeof b=="bigint"?(0,r.numberToHex)(b):b,topics:h}]});return{abi:i,args:c,eventName:u,id:m,request:y(m),strict:!!f,type:"event"}}return ba}var wa={},Pa={},ml;function Te(){if(ml)return Pa;ml=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.parseAccount=e;function e(r){return typeof r=="string"?{address:r,type:"json-rpc"}:r}return Pa}var Aa={},Ta={},hl;function $p(){if(hl)return Ta;hl=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.prepareEncodeFunctionData=s;const e=Ee(),r=Mr(),n=zt(),t=Lt(),a="/docs/contract/encodeFunctionData";function s(o){const{abi:i,args:c,functionName:u}=o;let d=i[0];if(u){const f=(0,t.getAbiItem)({abi:i,args:c,name:u});if(!f)throw new e.AbiFunctionNotFoundError(u,{docsPath:a});d=f}if(d.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:a});return{abi:[d],functionName:(0,r.toFunctionSelector)((0,n.formatAbiItem)(d))}}return Ta}var yl;function Ze(){if(yl)return Aa;yl=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.encodeFunctionData=t;const e=Oe(),r=yt(),n=$p();function t(a){const{args:s}=a,{abi:o,functionName:i}=a.abi.length===1&&a.functionName?.startsWith("0x")?a:(0,n.prepareEncodeFunctionData)(a),c=o[0],u=i,d="inputs"in c&&c.inputs?(0,r.encodeAbiParameters)(c.inputs,s??[]):void 0;return(0,e.concatHex)([u,d??"0x"])}return Aa}var Ia={},ke={},qt={},pl;
23function Wd(){return pl||(pl=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.solidityPanic=qt.solidityError=qt.panicReasons=void 0,qt.panicReasons={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."},qt.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},qt.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}),qt}var Sa={},Ra={},Ba={},Mt={},gl;function zp(){if(gl)return Mt;gl=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.RecursiveReadLimitExceededError=Mt.PositionOutOfBoundsError=Mt.NegativeOffsetError=void 0;const e=ce();class r extends e.BaseError{constructor({offset:s}){super(`Offset \`${s}\` cannot be negative.`,{name:"NegativeOffsetError"})}}Mt.NegativeOffsetError=r;class n extends e.BaseError{constructor({length:s,position:o}){super(`Position \`${o}\` is out of bounds (\`0 < position < ${s}\`).`,{name:"PositionOutOfBoundsError"})}}Mt.PositionOutOfBoundsError=n;class t extends e.BaseError{constructor({count:s,limit:o}){super(`Recursive read limit of \`${o}\` exceeded (recursive read count: \`${s}\`).`,{name:"RecursiveReadLimitExceededError"})}}return Mt.RecursiveReadLimitExceededError=t,Mt}var _l;function Io(){if(_l)return Ba;_l=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.createCursor=n;const e=zp(),r={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 e.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new e.PositionOutOfBoundsError({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const a=this.position-t;this.assertPosition(a),this.position=a},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new e.NegativeOffsetError({offset:t});const a=this.position+t;this.assertPosition(a),this.position=a},inspectByte(t){const a=t??this.position;return this.assertPosition(a),this.bytes[a]},inspectBytes(t,a){const s=a??this.position;return this.assertPosition(s+t-1),this.bytes.subarray(s,s+t)},inspectUint8(t){const a=t??this.position;return this.assertPosition(a),this.bytes[a]},inspectUint16(t){const a=t??this.position;return this.assertPosition(a+1),this.dataView.getUint16(a)},inspectUint24(t){const a=t??this.position;return this.assertPosition(a+2),(this.dataView.getUint16(a)<<8)+this.dataView.getUint8(a+2)},inspectUint32(t){const a=t??this.position;return this.assertPosition(a+3),this.dataView.getUint32(a)},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();const t=this.inspectByte();return this.position++,t},readBytes(t,a){this.assertReadLimit(),this._touch();const s=this.inspectBytes(t);return this.position+=a??t,s},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const a=this.position;return this.assertPosition(t),this.position=t,()=>this.position=a},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function n(t,{recursiveReadLimit:a=8192}={}){const s=Object.create(r);return s.bytes=t,s.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),s.positionReadCount=new Map,s.recursiveReadLimit=a,s}return Ba}var Yt={},vl;function Kd(){if(vl)return Yt;
23vl=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.fromBytes=a,Yt.bytesToBigInt=s,Yt.bytesToBool=o,Yt.bytesToNumber=i,Yt.bytesToString=c;const e=mn(),r=Ut(),n=Ae(),t=te();function a(u,d){const f=typeof d=="string"?{to:d}:d,b=f.to;return b==="number"?i(u,f):b==="bigint"?s(u,f):b==="boolean"?o(u,f):b==="string"?c(u,f):(0,t.bytesToHex)(u,f)}function s(u,d={}){typeof d.size<"u"&&(0,n.assertSize)(u,{size:d.size});const f=(0,t.bytesToHex)(u,d);return(0,n.hexToBigInt)(f,d)}function o(u,d={}){let f=u;if(typeof d.size<"u"&&((0,n.assertSize)(f,{size:d.size}),f=(0,r.trim)(f)),f.length>1||f[0]>1)throw new e.InvalidBytesBooleanError(f);return!!f[0]}function i(u,d={}){typeof d.size<"u"&&(0,n.assertSize)(u,{size:d.size});const f=(0,t.bytesToHex)(u,d);return(0,n.hexToNumber)(f,d)}function c(u,d={}){let f=u;return typeof d.size<"u"&&((0,n.assertSize)(f,{size:d.size}),f=(0,r.trim)(f,{dir:"right"})),new TextDecoder().decode(f)}return Yt}var El;function nr(){if(El)return Ra;El=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.decodeAbiParameters=d;const e=Ee(),r=rt(),n=Io(),t=Ve(),a=at(),s=Ut(),o=Kd(),i=pe(),c=te(),u=yt();function d(E,_){const I=typeof _=="string"?(0,i.hexToBytes)(_):_,S=(0,n.createCursor)(I);if((0,t.size)(I)===0&&E.length>0)throw new e.AbiDecodingZeroDataError;if((0,t.size)(_)&&(0,t.size)(_)<32)throw new e.AbiDecodingDataSizeTooSmallError({data:typeof _=="string"?_:(0,c.bytesToHex)(_),params:E,size:(0,t.size)(_)});let R=0;const x=[];for(let T=0;T<E.length;++T){const A=E[T];S.setPosition(R);const[C,k]=f(S,A,{staticPosition:0});R+=k,x.push(C)}return x}function f(E,_,{staticPosition:I}){const S=(0,u.getArrayComponents)(_.type);if(S){const[R,x]=S;return m(E,{..._,type:x},{length:R,staticPosition:I})}if(_.type==="tuple")return j(E,_,{staticPosition:I});if(_.type==="address")return h(E);if(_.type==="bool")return g(E);if(_.type.startsWith("bytes"))return p(E,_,{staticPosition:I});if(_.type.startsWith("uint")||_.type.startsWith("int"))return v(E,_);if(_.type==="string")return l(E,{staticPosition:I});throw new e.InvalidAbiDecodingTypeError(_.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const b=32,y=32;function h(E){const _=E.readBytes(32);return[(0,r.checksumAddress)((0,c.bytesToHex)((0,a.sliceBytes)(_,-20))),32]}function m(E,_,{length:I,staticPosition:S}){if(!I){const T=(0,o.bytesToNumber)(E.readBytes(y)),A=S+T,C=A+b;E.setPosition(A);const k=(0,o.bytesToNumber)(E.readBytes(b)),B=w(_);let P=0;const q=[];for(let F=0;F<k;++F){E.setPosition(C+(B?F*32:P));const[M,O]=f(E,_,{staticPosition:C});P+=O,q.push(M)}return E.setPosition(S+32),[q,32]}if(w(_)){const T=(0,o.bytesToNumber)(E.readBytes(y)),A=S+T,C=[];for(let k=0;k<I;++k){E.setPosition(A+k*32);const[B]=f(E,_,{staticPosition:A});C.push(B)}return E.setPosition(S+32),[C,32]}let R=0;const x=[];for(let T=0;T<I;++T){const[A,C]=f(E,_,{staticPosition:S+R});R+=C,x.push(A)}return[x,R]}function g(E){return[(0,o.bytesToBool)(E.readBytes(32),{size:32}),32]}function p(E,_,{staticPosition:I}){const[S,R]=_.type.split("bytes");if(!R){const T=(0,o.bytesToNumber)(E.readBytes(32));E.setPosition(I+T);const A=(0,o.bytesToNumber)(E.readBytes(32));if(A===0)return E.setPosition(I+32),["0x",32];const C=E.readBytes(A);return E.setPosition(I+32),[(0,c.bytesToHex)(C),32]}return[(0,c.bytesToHex)(E.readBytes(Number.parseInt(R,10),32)),32]}function v(E,_){const I=_.type.startsWith("int"),S=Number.parseInt(_.type.split("int")[1]||"256",10),R=E.readBytes(32);return[S>48?(0,o.bytesToBigInt)(R,{signed:I}):(0,o.bytesToNumber)(R,{signed:I}),32]}function j(E,_,{staticPosition:I}){const S=_.components.length===0||_.components.some(({name:T})=>!T),R=S?[]:{};let x=0;if(w(_)){const T=(0,o.bytesToNumber)(E.readBytes(y)),A=I+T;for(let C=0;C<_.components.length;++C){const k=_.components[C];E.setPosition(A+x);const[B,P]=f(E,k,{staticPosition:A});x+=P,R[S?C:k?.name]=B}return E.setPosition(I+32),[R,32]}for(let T=0;T<_.components.length;++T){const A=_.components[T],[C,k]=f(E,A,{staticPosition:I});R[S?T:A?.name]=C,x+=k}return[R,x]}function l(E,{staticPosition:_}){const I=(0,o.bytesToNumber)(E.readBytes(32)),S=_+I;E.setPosition(S);const R=(0,o.bytesToNumber)(E.readBytes(32));if(R===0)return E.setPosition(_+32),["",32];const x=E.readBytes(R,32),T=(0,o.bytesToString)((0,s.trim)(x));return E.setPosition(_+32),[T,32]}function w(E){const{type:_}=E;if(_==="string"||_==="bytes"||_.endsWith("[]"))return!0;
23if(_==="tuple")return E.components?.some(w);const I=(0,u.getArrayComponents)(E.type);return!!(I&&w({...E,type:I[1]}))}return Ra}var jl;function wu(){if(jl)return Sa;jl=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.decodeErrorResult=o;const e=Wd(),r=Ee(),n=at(),t=Mr(),a=nr(),s=zt();function o(i){const{abi:c,data:u}=i,d=(0,n.slice)(u,0,4);if(d==="0x")throw new r.AbiDecodingZeroDataError;const b=[...c||[],e.solidityError,e.solidityPanic].find(y=>y.type==="error"&&d===(0,t.toFunctionSelector)((0,s.formatAbiItem)(y)));if(!b)throw new r.AbiErrorSignatureNotFoundError(d,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:b,args:"inputs"in b&&b.inputs&&b.inputs.length>0?(0,a.decodeAbiParameters)(b.inputs,(0,n.slice)(u,4)):void 0,errorName:b.name}}return Sa}var Oa={},Kn={},wl;function qe(){if(wl)return Kn;wl=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.stringify=void 0;const e=(r,n,t)=>JSON.stringify(r,(a,s)=>{const o=typeof s=="bigint"?s.toString():s;return typeof n=="function"?n(a,o):o},t);return Kn.stringify=e,Kn}var Pl;function Up(){if(Pl)return Oa;Pl=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.formatAbiItemWithArgs=r;const e=qe();function r({abiItem:n,args:t,includeFunctionName:a=!0,includeName:s=!1}){if("name"in n&&"inputs"in n&&n.inputs)return`${a?n.name:""}(${n.inputs.map((o,i)=>`${s&&o.name?`${o.name}: `:""}${typeof t[i]=="object"?(0,e.stringify)(t[i]):t[i]}`).join(", ")})`}return Oa}var Ca={},Ht={},Al;function So(){return Al||(Al=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.weiUnits=Ht.gweiUnits=Ht.etherUnits=void 0,Ht.etherUnits={gwei:9,wei:18},Ht.gweiUnits={ether:-9,wei:9},Ht.weiUnits={ether:-18,gwei:-9}),Ht}var xa={},Tl;function Pu(){if(Tl)return xa;Tl=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.formatUnits=e;function e(r,n){let t=r.toString();const a=t.startsWith("-");a&&(t=t.slice(1)),t=t.padStart(n,"0");let[s,o]=[t.slice(0,t.length-n),t.slice(t.length-n)];return o=o.replace(/(0+)$/,""),`${a?"-":""}${s||"0"}${o?`.${o}`:""}`}return xa}var Il;function Ro(){if(Il)return Ca;Il=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.formatEther=n;const e=So(),r=Pu();function n(t,a="wei"){return(0,r.formatUnits)(t,e.etherUnits[a])}return Ca}var qa={},Sl;function kr(){if(Sl)return qa;Sl=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.formatGwei=n;const e=So(),r=Pu();function n(t,a="wei"){return(0,r.formatUnits)(t,e.gweiUnits[a])}return qa}var kt={},Rl;function Zd(){if(Rl)return kt;Rl=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.StateAssignmentConflictError=kt.AccountStateConflictError=void 0,kt.prettyStateMapping=t,kt.prettyStateOverride=a;const e=ce();class r extends e.BaseError{constructor({address:o}){super(`State for account "${o}" is set multiple times.`,{name:"AccountStateConflictError"})}}kt.AccountStateConflictError=r;class n extends e.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}kt.StateAssignmentConflictError=n;function t(s){return s.reduce((o,{slot:i,value:c})=>`${o} ${i}: ${c} 24`,"")}function a(s){return s.reduce((o,{address:i,...c})=>{let u=`${o} ${i}: 25`;return c.nonce&&(u+=` nonce: ${c.nonce} 26`),c.balance&&(u+=` balance: ${c.balance} 27`),c.code&&(u+=` code: ${c.code} 28`),c.state&&(u+=` state: 29`,u+=t(c.state)),c.stateDiff&&(u+=` stateDiff: 30`,u+=t(c.stateDiff)),u},` State Override: 31`).slice(0,-1)}return kt}var ge={},Bl;function Ue(){if(Bl)return ge;Bl=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.WaitForTransactionReceiptTimeoutError=ge.TransactionReceiptRevertedError=ge.TransactionReceiptNotFoundError=ge.TransactionNotFoundError=ge.TransactionExecutionError=ge.InvalidStorageKeySizeError=ge.InvalidSerializedTransactionError=ge.InvalidSerializedTransactionTypeError=ge.InvalidSerializableTransactionError=ge.InvalidLegacyVError=ge.FeeConflictError=void 0,ge.prettyPrint=t;const e=Ro(),r=kr(),n=ce();function t(m){const g=Object.entries(m).map(([v,j])=>j===void 0||j===!1?null:[v,j]).filter(Boolean),p=g.reduce((v,[j])=>Math.max(v,j.length),0);return g.map(([v,j])=>` ${`${v}:`.padEnd(p+1)} ${j}`).join(` 32`)}class a extends n.BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` 33`),{name:"FeeConflictError"})}}
33ge.FeeConflictError=a;class s extends n.BaseError{constructor({v:g}){super(`Invalid \`v\` value "${g}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}ge.InvalidLegacyVError=s;class o extends n.BaseError{constructor({transaction:g}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",t(g),"}","","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"})}}ge.InvalidSerializableTransactionError=o;class i extends n.BaseError{constructor({serializedType:g}){super(`Serialized transaction type "${g}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=g}}ge.InvalidSerializedTransactionTypeError=i;class c extends n.BaseError{constructor({attributes:g,serializedTransaction:p,type:v}){const j=Object.entries(g).map(([l,w])=>typeof w>"u"?l:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${v}" was provided.`,{metaMessages:[`Serialized Transaction: "${p}"`,j.length>0?`Missing Attributes: ${j.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=p,this.type=v}}ge.InvalidSerializedTransactionError=c;class u extends n.BaseError{constructor({storageKey:g}){super(`Size for storage key "${g}" is invalid. Expected 32 bytes. Got ${Math.floor((g.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}ge.InvalidStorageKeySizeError=u;class d extends n.BaseError{constructor(g,{account:p,docsPath:v,chain:j,data:l,gas:w,gasPrice:E,maxFeePerGas:_,maxPriorityFeePerGas:I,nonce:S,to:R,value:x}){const T=t({chain:j&&`${j?.name} (id: ${j?.id})`,from:p?.address,to:R,value:typeof x<"u"&&`${(0,e.formatEther)(x)} ${j?.nativeCurrency?.symbol||"ETH"}`,data:l,gas:w,gasPrice:typeof E<"u"&&`${(0,r.formatGwei)(E)} gwei`,maxFeePerGas:typeof _<"u"&&`${(0,r.formatGwei)(_)} gwei`,maxPriorityFeePerGas:typeof I<"u"&&`${(0,r.formatGwei)(I)} gwei`,nonce:S});super(g.shortMessage,{cause:g,docsPath:v,metaMessages:[...g.metaMessages?[...g.metaMessages," "]:[],"Request Arguments:",T].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=g}}ge.TransactionExecutionError=d;class f extends n.BaseError{constructor({blockHash:g,blockNumber:p,blockTag:v,hash:j,index:l}){let w="Transaction";v&&l!==void 0&&(w=`Transaction at block time "${v}" at index "${l}"`),g&&l!==void 0&&(w=`Transaction at block hash "${g}" at index "${l}"`),p&&l!==void 0&&(w=`Transaction at block number "${p}" at index "${l}"`),j&&(w=`Transaction with hash "${j}"`),super(`${w} could not be found.`,{name:"TransactionNotFoundError"})}}ge.TransactionNotFoundError=f;class b extends n.BaseError{constructor({hash:g}){super(`Transaction receipt with hash "${g}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}ge.TransactionReceiptNotFoundError=b;class y extends n.BaseError{constructor({receipt:g}){super(`Transaction with hash "${g.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=g}}ge.TransactionReceiptRevertedError=y;class h extends n.BaseError{constructor({hash:g}){super(`Timed out while waiting for transaction with hash "${g}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}return ge.WaitForTransactionReceiptTimeoutError=h,ge}var vr={},Ol;function Yd(){if(Ol)return vr;
33Ol=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.getUrl=vr.getContractAddress=void 0;const e=n=>n;vr.getContractAddress=e;const r=n=>n;return vr.getUrl=r,vr}var Cl;function or(){if(Cl)return ke;Cl=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.RawContractError=ke.CounterfactualDeploymentFailedError=ke.ContractFunctionZeroDataError=ke.ContractFunctionRevertedError=ke.ContractFunctionExecutionError=ke.CallExecutionError=void 0;const e=Te(),r=Wd(),n=wu(),t=zt(),a=Up(),s=Lt(),o=Ro(),i=kr(),c=Ee(),u=ce(),d=Zd(),f=Ue(),b=Yd();class y extends u.BaseError{constructor(l,{account:w,docsPath:E,chain:_,data:I,gas:S,gasPrice:R,maxFeePerGas:x,maxPriorityFeePerGas:T,nonce:A,to:C,value:k,stateOverride:B}){const P=w?(0,e.parseAccount)(w):void 0;let q=(0,f.prettyPrint)({from:P?.address,to:C,value:typeof k<"u"&&`${(0,o.formatEther)(k)} ${_?.nativeCurrency?.symbol||"ETH"}`,data:I,gas:S,gasPrice:typeof R<"u"&&`${(0,i.formatGwei)(R)} gwei`,maxFeePerGas:typeof x<"u"&&`${(0,i.formatGwei)(x)} gwei`,maxPriorityFeePerGas:typeof T<"u"&&`${(0,i.formatGwei)(T)} gwei`,nonce:A});B&&(q+=` 34${(0,d.prettyStateOverride)(B)}`),super(l.shortMessage,{cause:l,docsPath:E,metaMessages:[...l.metaMessages?[...l.metaMessages," "]:[],"Raw Call Arguments:",q].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=l}}ke.CallExecutionError=y;class h extends u.BaseError{constructor(l,{abi:w,args:E,contractAddress:_,docsPath:I,functionName:S,sender:R}){const x=(0,s.getAbiItem)({abi:w,args:E,name:S}),T=x?(0,a.formatAbiItemWithArgs)({abiItem:x,args:E,includeFunctionName:!1,includeName:!1}):void 0,A=x?(0,t.formatAbiItem)(x,{includeName:!0}):void 0,C=(0,f.prettyPrint)({address:_&&(0,b.getContractAddress)(_),function:A,args:T&&T!=="()"&&`${[...Array(S?.length??0).keys()].map(()=>" ").join("")}${T}`,sender:R});super(l.shortMessage||`An unknown error occurred while executing the contract function "${S}".`,{cause:l,docsPath:I,metaMessages:[...l.metaMessages?[...l.metaMessages," "]:[],C&&"Contract Call:",C].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=w,this.args=E,this.cause=l,this.contractAddress=_,this.functionName=S,this.sender=R}}ke.ContractFunctionExecutionError=h;class m extends u.BaseError{constructor({abi:l,data:w,functionName:E,message:_}){let I,S,R,x;if(w&&w!=="0x")try{S=(0,n.decodeErrorResult)({abi:l,data:w});const{abiItem:A,errorName:C,args:k}=S;if(C==="Error")x=k[0];else if(C==="Panic"){const[B]=k;x=r.panicReasons[B]}else{const B=A?(0,t.formatAbiItem)(A,{includeName:!0}):void 0,P=A&&k?(0,a.formatAbiItemWithArgs)({abiItem:A,args:k,includeFunctionName:!1,includeName:!1}):void 0;R=[B?`Error: ${B}`:"",P&&P!=="()"?` ${[...Array(C?.length??0).keys()].map(()=>" ").join("")}${P}`:""]}}catch(A){I=A}else _&&(x=_);let T;I instanceof c.AbiErrorSignatureNotFoundError&&(T=I.signature,R=[`Unable to decode signature "${T}" 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=${T}.`]),super(x&&x!=="execution reverted"||T?[`The contract function "${E}" reverted with the following ${T?"signature":"reason"}:`,x||T].join(` 35`):`The contract function "${E}" reverted.`,{cause:I,metaMessages:R,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=S,this.raw=w,this.reason=x,this.signature=T}}ke.ContractFunctionRevertedError=m;class g extends u.BaseError{constructor({functionName:l}){super(`The contract function "${l}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${l}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}ke.ContractFunctionZeroDataError=g;class p extends u.BaseError{constructor({factory:l}){super(`Deployment for counterfactual contract call failed${l?` for factory "${l}".`:""}`,{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"})}}ke.CounterfactualDeploymentFailedError=p;class v extends u.BaseError{constructor({data:l,message:w}
35){super(w||"",{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=l}}return ke.RawContractError=v,ke}var Je={},xl;function pt(){if(xl)return Je;xl=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.TimeoutError=Je.SocketClosedError=Je.RpcRequestError=Je.WebSocketRequestError=Je.HttpRequestError=void 0;const e=qe(),r=ce(),n=Yd();class t extends r.BaseError{constructor({body:u,cause:d,details:f,headers:b,status:y,url:h}){super("HTTP request failed.",{cause:d,details:f,metaMessages:[y&&`Status: ${y}`,`URL: ${(0,n.getUrl)(h)}`,u&&`Request body: ${(0,e.stringify)(u)}`].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=u,this.headers=b,this.status=y,this.url=h}}Je.HttpRequestError=t;class a extends r.BaseError{constructor({body:u,cause:d,details:f,url:b}){super("WebSocket request failed.",{cause:d,details:f,metaMessages:[`URL: ${(0,n.getUrl)(b)}`,u&&`Request body: ${(0,e.stringify)(u)}`].filter(Boolean),name:"WebSocketRequestError"})}}Je.WebSocketRequestError=a;class s extends r.BaseError{constructor({body:u,error:d,url:f}){super("RPC Request failed.",{cause:d,details:d.message,metaMessages:[`URL: ${(0,n.getUrl)(f)}`,`Request body: ${(0,e.stringify)(u)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=d.code,this.data=d.data}}Je.RpcRequestError=s;class o extends r.BaseError{constructor({url:u}={}){super("The socket has been closed.",{metaMessages:[u&&`URL: ${(0,n.getUrl)(u)}`].filter(Boolean),name:"SocketClosedError"})}}Je.SocketClosedError=o;class i extends r.BaseError{constructor({body:u,url:d}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,n.getUrl)(d)}`,`Request body: ${(0,e.stringify)(u)}`],name:"TimeoutError"})}}return Je.TimeoutError=i,Je}var re={},ql;function ar(){if(ql)return re;ql=1,Object.defineProperty(re,"__esModule",{value:!0}),re.UnknownRpcError=re.AtomicityNotSupportedError=re.AtomicReadyWalletRejectedUpgradeError=re.BundleTooLargeError=re.UnknownBundleIdError=re.DuplicateIdError=re.UnsupportedChainIdError=re.UnsupportedNonOptionalCapabilityError=re.SwitchChainError=re.ChainDisconnectedError=re.ProviderDisconnectedError=re.UnsupportedProviderMethodError=re.UnauthorizedProviderError=re.UserRejectedRequestError=re.JsonRpcVersionUnsupportedError=re.LimitExceededRpcError=re.MethodNotSupportedRpcError=re.TransactionRejectedRpcError=re.ResourceUnavailableRpcError=re.ResourceNotFoundRpcError=re.InvalidInputRpcError=re.InternalRpcError=re.InvalidParamsRpcError=re.MethodNotFoundRpcError=re.InvalidRequestRpcError=re.ParseRpcError=re.ProviderRpcError=re.RpcError=void 0;const e=ce(),r=pt(),n=-1;class t extends e.BaseError{constructor(B,{code:P,docsPath:q,metaMessages:F,name:M,shortMessage:O}){super(O,{cause:B,docsPath:q,metaMessages:F||B?.metaMessages,name:M||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=M||B.name,this.code=B instanceof r.RpcRequestError?B.code:P??n}}re.RpcError=t;class a extends t{constructor(B,P){super(B,P),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=P.data}}re.ProviderRpcError=a;class s extends t{constructor(B){super(B,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}re.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class o extends t{constructor(B){super(B,{code:o.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}re.InvalidRequestRpcError=o,Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class i extends t{constructor(B,{method:P}={}){super(B,{code:i.code,name:"MethodNotFoundRpcError",shortMessage:`The method${P?` "${P}"`:""} does not exist / is not available.`})}}re.MethodNotFoundRpcError=i,Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class c extends t{constructor(B){super(B,{code:c.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` 36`)})}}re.InvalidParamsRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class u extends t{constructor(B){super(B,{code:u.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}re.InternalRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends t{constructor(B){super(B,{code:d.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` 37`)})}}re.InvalidInputRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class f extends t{constructor(B){super(B,{code:f.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}re.ResourceNotFoundRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class b extends t{constructor(B){super(B,{code:b.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}re.ResourceUnavailableRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class y extends t{constructor(B){super(B,{code:y.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}re.TransactionRejectedRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class h extends t{constructor(B,{method:P}={}
37){super(B,{code:h.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${P?` "${P}"`:""} is not supported.`})}}re.MethodNotSupportedRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class m extends t{constructor(B){super(B,{code:m.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}re.LimitExceededRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class g extends t{constructor(B){super(B,{code:g.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}re.JsonRpcVersionUnsupportedError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class p extends a{constructor(B){super(B,{code:p.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}re.UserRejectedRequestError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class v extends a{constructor(B){super(B,{code:v.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}re.UnauthorizedProviderError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class j extends a{constructor(B,{method:P}={}){super(B,{code:j.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${P?` " ${P}"`:""}.`})}}re.UnsupportedProviderMethodError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class l extends a{constructor(B){super(B,{code:l.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}re.ProviderDisconnectedError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class w extends a{constructor(B){super(B,{code:w.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}re.ChainDisconnectedError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class E extends a{constructor(B){super(B,{code:E.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}re.SwitchChainError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class _ extends a{constructor(B){super(B,{code:_.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}re.UnsupportedNonOptionalCapabilityError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class I extends a{constructor(B){super(B,{code:I.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}re.UnsupportedChainIdError=I,Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class S extends a{constructor(B){super(B,{code:S.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}re.DuplicateIdError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class R extends a{constructor(B){super(B,{code:R.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}re.UnknownBundleIdError=R,Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class x extends a{constructor(B){super(B,{code:x.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}re.BundleTooLargeError=x,Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class T extends a{constructor(B){super(B,{code:T.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}re.AtomicReadyWalletRejectedUpgradeError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750}
37);class A extends a{constructor(B){super(B,{code:A.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}re.AtomicityNotSupportedError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class C extends t{constructor(B){super(B,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}return re.UnknownRpcError=C,re}var Ml;function ir(){if(Ml)return Ia;Ml=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.getContractError=o;const e=Ee(),r=ce(),n=or(),t=pt(),a=ar(),s=3;function o(i,{abi:c,address:u,args:d,docsPath:f,functionName:b,sender:y}){const h=i instanceof n.RawContractError?i:i instanceof r.BaseError?i.walk(w=>"data"in w)||i.walk():{},{code:m,data:g,details:p,message:v,shortMessage:j}=h,l=i instanceof e.AbiDecodingZeroDataError?new n.ContractFunctionZeroDataError({functionName:b}):[s,a.InternalRpcError.code].includes(m)&&(g||p||v||j)?new n.ContractFunctionRevertedError({abi:c,data:typeof g=="object"?g.data:g,functionName:b,message:h instanceof t.RpcRequestError?p:j??v}):i;return new n.ContractFunctionExecutionError(l,{abi:c,args:d,contractAddress:u,docsPath:f,functionName:b,sender:y})}return Ia}var Ma={},Ha={},ka={},Fa={},Hl;function Lp(){if(Hl)return Fa;Hl=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.publicKeyToAddress=n;const e=rt(),r=We();function n(t){const a=(0,r.keccak256)(`0x${t.substring(4)}`).substring(26);return(0,e.checksumAddress)(`0x${a}`)}return Fa}var Na={},_d={},he={},He={},kl;function Dp(){if(kl)return He;kl=1,Object.defineProperty(He,"__esModule",{value:!0}),He.SHA512_IV=He.SHA384_IV=He.SHA224_IV=He.SHA256_IV=He.HashMD=void 0,He.setBigUint64=r,He.Chi=n,He.Maj=t;const e=xr();function r(s,o,i,c){if(typeof s.setBigUint64=="function")return s.setBigUint64(o,i,c);const u=BigInt(32),d=BigInt(4294967295),f=Number(i>>u&d),b=Number(i&d),y=c?4:0,h=c?0:4;s.setUint32(o+y,f,c),s.setUint32(o+h,b,c)}function n(s,o,i){return s&o^~s&i}function t(s,o,i){return s&o^s&i^o&i}class a extends e.Hash{constructor(o,i,c,u){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=o,this.outputLen=i,this.padOffset=c,this.isLE=u,this.buffer=new Uint8Array(o),this.view=(0,e.createView)(this.buffer)}update(o){(0,e.aexists)(this),o=(0,e.toBytes)(o),(0,e.abytes)(o);const{view:i,buffer:c,blockLen:u}=this,d=o.length;for(let f=0;f<d;){const b=Math.min(u-this.pos,d-f);if(b===u){const y=(0,e.createView)(o);for(;u<=d-f;f+=u)this.process(y,f);continue}c.set(o.subarray(f,f+b),this.pos),this.pos+=b,f+=b,this.pos===u&&(this.process(i,0),this.pos=0)}return this.length+=o.length,this.roundClean(),this}digestInto(o){(0,e.aexists)(this),(0,e.aoutput)(o,this),this.finished=!0;const{buffer:i,view:c,blockLen:u,isLE:d}=this;let{pos:f}=this;i[f++]=128,(0,e.clean)(this.buffer.subarray(f)),this.padOffset>u-f&&(this.process(c,0),f=0);for(let g=f;g<u;g++)i[g]=0;r(c,u-8,BigInt(this.length*8),d),this.process(c,0);const b=(0,e.createView)(o),y=this.outputLen;if(y%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=y/4,m=this.get();if(h>m.length)throw new Error("_sha2: outputLen bigger than state");for(let g=0;g<h;g++)b.setUint32(4*g,m[g],d)}digest(){const{buffer:o,outputLen:i}=this;this.digestInto(o);const c=o.slice(0,i);return this.destroy(),c}_cloneInto(o){o||(o=new this.constructor),o.set(...this.get());const{blockLen:i,buffer:c,length:u,finished:d,destroyed:f,pos:b}=this;return o.destroyed=f,o.finished=d,o.length=u,o.pos=b,u%i&&o.buffer.set(c),o}clone(){return this._cloneInto()}}return He.HashMD=a,He.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),He.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),He.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),He.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),He}var Fl;function Gp(){if(Fl)return he;
37Fl=1,Object.defineProperty(he,"__esModule",{value:!0}),he.sha512_224=he.sha512_256=he.sha384=he.sha512=he.sha224=he.sha256=he.SHA512_256=he.SHA512_224=he.SHA384=he.SHA512=he.SHA224=he.SHA256=void 0;const e=Dp(),r=J_(),n=xr(),t=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array(64);class s extends e.HashMD{constructor(j=32){super(64,j,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:j,B:l,C:w,D:E,E:_,F:I,G:S,H:R}=this;return[j,l,w,E,_,I,S,R]}set(j,l,w,E,_,I,S,R){this.A=j|0,this.B=l|0,this.C=w|0,this.D=E|0,this.E=_|0,this.F=I|0,this.G=S|0,this.H=R|0}process(j,l){for(let A=0;A<16;A++,l+=4)a[A]=j.getUint32(l,!1);for(let A=16;A<64;A++){const C=a[A-15],k=a[A-2],B=(0,n.rotr)(C,7)^(0,n.rotr)(C,18)^C>>>3,P=(0,n.rotr)(k,17)^(0,n.rotr)(k,19)^k>>>10;a[A]=P+a[A-7]+B+a[A-16]|0}let{A:w,B:E,C:_,D:I,E:S,F:R,G:x,H:T}=this;for(let A=0;A<64;A++){const C=(0,n.rotr)(S,6)^(0,n.rotr)(S,11)^(0,n.rotr)(S,25),k=T+C+(0,e.Chi)(S,R,x)+t[A]+a[A]|0,P=((0,n.rotr)(w,2)^(0,n.rotr)(w,13)^(0,n.rotr)(w,22))+(0,e.Maj)(w,E,_)|0;T=x,x=R,R=S,S=I+k|0,I=_,_=E,E=w,w=k+P|0}w=w+this.A|0,E=E+this.B|0,_=_+this.C|0,I=I+this.D|0,S=S+this.E|0,R=R+this.F|0,x=x+this.G|0,T=T+this.H|0,this.set(w,E,_,I,S,R,x,T)}roundClean(){(0,n.clean)(a)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,n.clean)(this.buffer)}}he.SHA256=s;class o extends s{constructor(){super(28),this.A=e.SHA224_IV[0]|0,this.B=e.SHA224_IV[1]|0,this.C=e.SHA224_IV[2]|0,this.D=e.SHA224_IV[3]|0,this.E=e.SHA224_IV[4]|0,this.F=e.SHA224_IV[5]|0,this.G=e.SHA224_IV[6]|0,this.H=e.SHA224_IV[7]|0}}he.SHA224=o;const i=r.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
375771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(v=>BigInt(v))),c=i[0],u=i[1],d=new Uint32Array(80),f=new Uint32Array(80);class b extends e.HashMD{constructor(j=64){super(128,j,16,!1),this.Ah=e.SHA512_IV[0]|0,this.Al=e.SHA512_IV[1]|0,this.Bh=e.SHA512_IV[2]|0,this.Bl=e.SHA512_IV[3]|0,this.Ch=e.SHA512_IV[4]|0,this.Cl=e.SHA512_IV[5]|0,this.Dh=e.SHA512_IV[6]|0,this.Dl=e.SHA512_IV[7]|0,this.Eh=e.SHA512_IV[8]|0,this.El=e.SHA512_IV[9]|0,this.Fh=e.SHA512_IV[10]|0,this.Fl=e.SHA512_IV[11]|0,this.Gh=e.SHA512_IV[12]|0,this.Gl=e.SHA512_IV[13]|0,this.Hh=e.SHA512_IV[14]|0,this.Hl=e.SHA512_IV[15]|0}get(){const{Ah:j,Al:l,Bh:w,Bl:E,Ch:_,Cl:I,Dh:S,Dl:R,Eh:x,El:T,Fh:A,Fl:C,Gh:k,Gl:B,Hh:P,Hl:q}=this;return[j,l,w,E,_,I,S,R,x,T,A,C,k,B,P,q]}set(j,l,w,E,_,I,S,R,x,T,A,C,k,B,P,q){this.Ah=j|0,this.Al=l|0,this.Bh=w|0,this.Bl=E|0,this.Ch=_|0,this.Cl=I|0,this.Dh=S|0,this.Dl=R|0,this.Eh=x|0,this.El=T|0,this.Fh=A|0,this.Fl=C|0,this.Gh=k|0,this.Gl=B|0,this.Hh=P|0,this.Hl=q|0}process(j,l){for(let O=0;O<16;O++,l+=4)d[O]=j.getUint32(l),f[O]=j.getUint32(l+=4);for(let O=16;O<80;O++){const H=d[O-15]|0,N=f[O-15]|0,z=r.rotrSH(H,N,1)^r.rotrSH(H,N,8)^r.shrSH(H,N,7),$=r.rotrSL(H,N,1)^r.rotrSL(H,N,8)^r.shrSL(H,N,7),D=d[O-2]|0,G=f[O-2]|0,Y=r.rotrSH(D,G,19)^r.rotrBH(D,G,61)^r.shrSH(D,G,6),Z=r.rotrSL(D,G,19)^r.rotrBL(D,G,61)^r.shrSL(D,G,6),W=r.add4L($,Z,f[O-7],f[O-16]),X=r.add4H(W,z,Y,d[O-7],d[O-16]);d[O]=X|0,f[O]=W|0}let{Ah:w,Al:E,Bh:_,Bl:I,Ch:S,Cl:R,Dh:x,Dl:T,Eh:A,El:C,Fh:k,Fl:B,Gh:P,Gl:q,Hh:F,Hl:M}=this;for(let O=0;O<80;O++){const H=r.rotrSH(A,C,14)^r.rotrSH(A,C,18)^r.rotrBH(A,C,41),N=r.rotrSL(A,C,14)^r.rotrSL(A,C,18)^r.rotrBL(A,C,41),z=A&k^~A&P,$=C&B^~C&q,D=r.add5L(M,N,$,u[O],f[O]),G=r.add5H(D,F,H,z,c[O],d[O]),Y=D|0,Z=r.rotrSH(w,E,28)^r.rotrBH(w,E,34)^r.rotrBH(w,E,39),W=r.rotrSL(w,E,28)^r.rotrBL(w,E,34)^r.rotrBL(w,E,39),X=w&_^w&S^_&S,ie=E&I^E&R^I&R;F=P|0,M=q|0,P=k|0,q=B|0,k=A|0,B=C|0,{h:A,l:C}=r.add(x|0,T|0,G|0,Y|0),x=S|0,T=R|0,S=_|0,R=I|0,_=w|0,I=E|0;const K=r.add3L(Y,W,ie);w=r.add3H(K,G,Z,X),E=K|0}({h:w,l:E}=r.add(this.Ah|0,this.Al|0,w|0,E|0)),{h:_,l:I}=r.add(this.Bh|0,this.Bl|0,_|0,I|0),{h:S,l:R}=r.add(this.Ch|0,this.Cl|0,S|0,R|0),{h:x,l:T}=r.add(this.Dh|0,this.Dl|0,x|0,T|0),{h:A,l:C}=r.add(this.Eh|0,this.El|0,A|0,C|0),{h:k,l:B}=r.add(this.Fh|0,this.Fl|0,k|0,B|0),{h:P,l:q}=r.add(this.Gh|0,this.Gl|0,P|0,q|0),{h:F,l:M}=r.add(this.Hh|0,this.Hl|0,F|0,M|0),this.set(w,E,_,I,S,R,x,T,A,C,k,B,P,q,F,M)}roundClean(){(0,n.clean)(d,f)}destroy(){(0,n.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}he.SHA512=b;class y extends b{constructor(){super(48),this.Ah=e.SHA384_IV[0]|0,this.Al=e.SHA384_IV[1]|0,this.Bh=e.SHA384_IV[2]|0,this.Bl=e.SHA384_IV[3]|0,this.Ch=e.SHA384_IV[4]|0,this.Cl=e.SHA384_IV[5]|0,this.Dh=e.SHA384_IV[6]|0,this.Dl=e.SHA384_IV[7]|0,this.Eh=e.SHA384_IV[8]|0,this.El=e.SHA384_IV[9]|0,this.Fh=e.SHA384_IV[10]|0,this.Fl=e.SHA384_IV[11]|0,this.Gh=e.SHA384_IV[12]|0,this.Gl=e.SHA384_IV[13]|0,this.Hh=e.SHA384_IV[14]|0,this.Hl=e.SHA384_IV[15]|0}}he.SHA384=y;const h=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),m=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class g extends b{constructor(){super(28),this.Ah=h[0]|0,this.Al=h[1]|0,this.Bh=h[2]|0,this.Bl=h[3]|0,this.Ch=h[4]|0,this.Cl=h[5]|0,this.Dh=h[6]|0,this.Dl=h[7]|0,this.Eh=h[8]|0,this.El=h[9]|0,this.Fh=h[10]|0,this.Fl=h[11]|0,this.Gh=h[12]|0,this.Gl=h[13]|0,this.Hh=h[14]|0,this.Hl=h[15]|0}}he.SHA512_224=g;class p extends b{constructor(){super(32),this.Ah=m[0]|0,this.Al=m[1]|0,this.Bh=m[2]|0,this.Bl=m[3]|0,this.Ch=m[4]|0,this.Cl=m[5]|0,this.Dh=m[6]|0,this.Dl=m[7]|0,this.Eh=m[8]|0,this.El=m[9]|0,this.Fh=m[10]|0,this.Fl=m[11]|0,this.Gh=m[12]|0,this.Gl=m[13]|0,this.Hh=m[14]|0,this.Hl=m[15]|0}}return he.SHA512_256=p,he.sha256=(0,n.createHasher)(()=>new s),he.sha224=(0,n.createHasher)(()=>new o),he.sha512=(0,n.createHasher)(()=>new b),he.sha384=(0,n.createHasher)(()=>new y),he.sha512_256=(0,n.createHasher)(()=>new p),he.sha512_224=(0,n.createHasher)(()=>new g),he}var Zn={},vd={},Nl;function jv(){return Nl||(Nl=1,(function(e){Object.defineProperty(e,"__esMo
37dule",{value:!0}),e.hmac=e.HMAC=void 0;const r=xr();class n extends r.Hash{constructor(s,o){super(),this.finished=!1,this.destroyed=!1,(0,r.ahash)(s);const i=(0,r.toBytes)(o);if(this.iHash=s.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const c=this.blockLen,u=new Uint8Array(c);u.set(i.length>c?s.create().update(i).digest():i);for(let d=0;d<u.length;d++)u[d]^=54;this.iHash.update(u),this.oHash=s.create();for(let d=0;d<u.length;d++)u[d]^=106;this.oHash.update(u),(0,r.clean)(u)}update(s){return(0,r.aexists)(this),this.iHash.update(s),this}digestInto(s){(0,r.aexists)(this),(0,r.abytes)(s,this.outputLen),this.finished=!0,this.iHash.digestInto(s),this.oHash.update(s),this.oHash.digestInto(s),this.destroy()}digest(){const s=new Uint8Array(this.oHash.outputLen);return this.digestInto(s),s}_cloneInto(s){s||(s=Object.create(Object.getPrototypeOf(this),{}));const{oHash:o,iHash:i,finished:c,destroyed:u,blockLen:d,outputLen:f}=this;return s=s,s.finished=c,s.destroyed=u,s.blockLen=d,s.outputLen=f,s.oHash=o._cloneInto(s.oHash),s.iHash=i._cloneInto(s.iHash),s}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const t=(a,s,o)=>new n(a,s).update(o).digest();e.hmac=t,e.hmac.create=(a,s)=>new n(a,s)})(vd)),vd}var Ed={},Er={},_e={},le={},$l;function Fr(){if($l)return le;$l=1;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(le,"__esMo
37dule",{value:!0}),le.notImplemented=le.bitMask=void 0,le.isBytes=n,le.abytes=t,le.abool=a,le.numberToHexUnpadded=s,le.hexToNumber=o,le.bytesToHex=u,le.hexToBytes=b,le.bytesToNumberBE=y,le.bytesToNumberLE=h,le.numberToBytesBE=m,le.numberToBytesLE=g,le.numberToVarBytesBE=p,le.ensureBytes=v,le.concatBytes=j,le.equalBytes=l,le.utf8ToBytes=w,le.inRange=_,le.aInRange=I,le.bitLen=S,le.bitGet=R,le.bitSet=x,le.createHmacDrbg=k,le.validateObject=P,le.memoized=F;const e=BigInt(0),r=BigInt(1);function n(M){return M instanceof Uint8Array||ArrayBuffer.isView(M)&&M.constructor.name==="Uint8Array"}function t(M){if(!n(M))throw new Error("Uint8Array expected")}function a(M,O){if(typeof O!="boolean")throw new Error(M+" boolean expected, got "+O)}function s(M){const O=M.toString(16);return O.length&1?"0"+O:O}function o(M){if(typeof M!="string")throw new Error("hex string expected, got "+typeof M);return M===""?e:BigInt("0x"+M)}const i=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",c=Array.from({length:256},(M,O)=>O.toString(16).padStart(2,"0"));function u(M){if(t(M),i)return M.toHex();let O="";for(let H=0;H<M.length;H++)O+=c[M[H]];return O}const d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(M){if(M>=d._0&&M<=d._9)return M-d._0;if(M>=d.A&&M<=d.F)return M-(d.A-10);if(M>=d.a&&M<=d.f)return M-(d.a-10)}function b(M){if(typeof M!="string")throw new Error("hex string expected, got "+typeof M);if(i)return Uint8Array.fromHex(M);const O=M.length,H=O/2;if(O%2)throw new Error("hex string expected, got unpadded hex of length "+O);const N=new Uint8Array(H);for(let z=0,$=0;z<H;z++,$+=2){const D=f(M.charCodeAt($)),G=f(M.charCodeAt($+1));if(D===void 0||G===void 0){const Y=M[$]+M[$+1];throw new Error('hex string expected, got non-hex character "'+Y+'" at index '+$)}N[z]=D*16+G}return N}function y(M){return o(u(M))}function h(M){return t(M),o(u(Uint8Array.from(M).reverse()))}function m(M,O){return b(M.toString(16).padStart(O*2,"0"))}function g(M,O){return m(M,O).reverse()}function p(M){return b(s(M))}function v(M,O,H){let N;if(typeof O=="string")try{N=b(O)}catch($){throw new Error(M+" must be hex string or Uint8Array, cause: "+$)}else if(n(O))N=Uint8Array.from(O);else throw new Error(M+" must be hex string or Uint8Array");const z=N.length;if(typeof H=="number"&&z!==H)throw new Error(M+" of length "+H+" expected, got "+z);return N}function j(...M){let O=0;for(let N=0;N<M.length;N++){const z=M[N];t(z),O+=z.length}const H=new Uint8Array(O);for(let N=0,z=0;N<M.length;N++){const $=M[N];H.set($,z),z+=$.length}return H}function l(M,O){if(M.length!==O.length)return!1;let H=0;for(let N=0;N<M.length;N++)H|=M[N]^O[N];return H===0}function w(M){if(typeof M!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(M))}const E=M=>typeof M=="bigint"&&e<=M;function _(M,O,H){return E(M)&&E(O)&&E(H)&&O<=M&&M<H}function I(M,O,H,N){if(!_(O,H,N))throw new Error("expected valid "+M+": "+H+" <= n < "+N+", got "+O)}function S(M){let O;for(O=0;M>e;M>>=r,O+=1);return O}function R(M,O){return M>>BigInt(O)&r}function x(M,O,H){return M|(H?r:e)<<BigInt(O)}const T=M=>(r<<BigInt(M))-r;le.bitMask=T;const A=M=>new Uint8Array(M),C=M=>Uint8Array.from(M);function k(M,O,H){if(typeof M!="number"||M<2)throw new Error("hashLen must be a number");if(typeof O!="number"||O<2)throw new Error("qByteLen must be a number");if(typeof H!="function")throw new Error("hmacFn must be a function");let N=A(M),z=A(M),$=0;const D=()=>{N.fill(1),z.fill(0),$=0},G=(...X)=>H(z,N,...X),Y=(X=A(0))=>{z=G(C([0]),X),N=G(),X.length!==0&&(z=G(C([1]),X),N=G())},Z=()=>{if($++>=1e3)throw new Error("drbg: tried 1000 values");let X=0;const ie=[];for(;X<O;){N=G();const K=N.slice();ie.push(K),X+=N.length}return j(...ie)};return(X,ie)=>{D(),Y(X);let K;for(;!(K=ie(Z()));)Y();return D(),K}}const B={bigint:M=>typeof M=="bigint",function:M=>typeof M=="function",boolean:M=>typeof M=="boolean",string:M=>typeof M=="string",stringOrUint8Array:M=>typeof M=="string"||n(M),isSafeInteger:M=>Number.isSafeInteger(M),array:M=>Array.isArray(M),field:(M,O)=>O.Fp.isValid(M),hash:M=>typeof M=="function"&&Number.isSafeInteger(M.outputLen)};function P(M,O,H={}){const N=(z,$,D)=>{const G=B[$];if(typeof G!="function")throw new Error("invalid validator function");const Y=M[z];if(!(D&&Y===void 0)&&!G(Y,M))throw new Error("param "+String(z)+" is invali
37d. Expected "+$+", got "+Y)};for(const[z,$]of Object.entries(O))N(z,$,!1);for(const[z,$]of Object.entries(H))N(z,$,!0);return M}const q=()=>{throw new Error("not implemented")};le.notImplemented=q;function F(M){const O=new WeakMap;return(H,...N)=>{const z=O.get(H);if(z!==void 0)return z;const $=M(H,...N);return O.set(H,$),$}}return le}var zl;function Au(){if(zl)return _e;zl=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.isNegativeLE=void 0,_e.mod=u,_e.pow=d,_e.pow2=f,_e.invert=b,_e.tonelliShanks=m,_e.FpSqrt=g,_e.validateField=j,_e.FpPow=l,_e.FpInvertBatch=w,_e.FpDiv=E,_e.FpLegendre=_,_e.FpIsSquare=I,_e.nLength=S,_e.Field=R,_e.FpSqrtOdd=x,_e.FpSqrtEven=T,_e.hashToPrivateScalar=A,_e.getFieldBytesLength=C,_e.getMinHashLength=k,_e.mapHashToField=B;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=xr(),r=Fr(),n=BigInt(0),t=BigInt(1),a=BigInt(2),s=BigInt(3),o=BigInt(4),i=BigInt(5),c=BigInt(8);function u(P,q){const F=P%q;return F>=n?F:q+F}function d(P,q,F){return l(R(F),P,q)}function f(P,q,F){let M=P;for(;q-- >n;)M*=M,M%=F;return M}function b(P,q){if(P===n)throw new Error("invert: expected non-zero number");if(q<=n)throw new Error("invert: expected positive modulus, got "+q);let F=u(P,q),M=q,O=n,H=t;for(;F!==n;){const z=M/F,$=M%F,D=O-H*z;M=F,F=$,O=H,H=D}if(M!==t)throw new Error("invert: does not exist");return u(O,q)}function y(P,q){const F=(P.ORDER+t)/o,M=P.pow(q,F);if(!P.eql(P.sqr(M),q))throw new Error("Cannot find square root");return M}function h(P,q){const F=(P.ORDER-i)/c,M=P.mul(q,a),O=P.pow(M,F),H=P.mul(q,O),N=P.mul(P.mul(H,a),O),z=P.mul(H,P.sub(N,P.ONE));if(!P.eql(P.sqr(z),q))throw new Error("Cannot find square root");return z}function m(P){if(P<BigInt(3))throw new Error("sqrt is not defined for small field");let q=P-t,F=0;for(;q%a===n;)q/=a,F++;let M=a;const O=R(P);for(;_(O,M)===1;)if(M++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(F===1)return y;let H=O.pow(M,q);const N=(q+t)/a;return function($,D){if($.is0(D))return D;if(_($,D)!==1)throw new Error("Cannot find square root");let G=F,Y=$.mul($.ONE,H),Z=$.pow(D,q),W=$.pow(D,N);for(;!$.eql(Z,$.ONE);){if($.is0(Z))return $.ZERO;let X=1,ie=$.sqr(Z);for(;!$.eql(ie,$.ONE);)if(X++,ie=$.sqr(ie),X===G)throw new Error("Cannot find square root");const K=t<<BigInt(G-X-1),J=$.pow(Y,K);G=X,Y=$.sqr(J),Z=$.mul(Z,Y),W=$.mul(W,J)}return W}}function g(P){return P%o===s?y:P%c===i?h:m(P)}const p=(P,q)=>(u(P,q)&t)===t;_e.isNegativeLE=p;const v=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function j(P){const q={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},F=v.reduce((M,O)=>(M[O]="function",M),q);return(0,r.validateObject)(P,F)}function l(P,q,F){if(F<n)throw new Error("invalid exponent, negatives unsupported");if(F===n)return P.ONE;if(F===t)return q;let M=P.ONE,O=q;for(;F>n;)F&t&&(M=P.mul(M,O)),O=P.sqr(O),F>>=t;return M}function w(P,q,F=!1){const M=new Array(q.length).fill(F?P.ZERO:void 0),O=q.reduce((N,z,$)=>P.is0(z)?N:(M[$]=N,P.mul(N,z)),P.ONE),H=P.inv(O);return q.reduceRight((N,z,$)=>P.is0(z)?N:(M[$]=P.mul(N,M[$]),P.mul(N,z)),H),M}function E(P,q,F){return P.mul(q,typeof F=="bigint"?b(F,P.ORDER):P.inv(F))}function _(P,q){const F=(P.ORDER-t)/a,M=P.pow(q,F),O=P.eql(M,P.ONE),H=P.eql(M,P.ZERO),N=P.eql(M,P.neg(P.ONE));if(!O&&!H&&!N)throw new Error("invalid Legendre symbol result");return O?1:H?0:-1}function I(P,q){return _(P,q)===1}function S(P,q){q!==void 0&&(0,e.anumber)(q);const F=q!==void 0?q:P.toString(2).length,M=Math.ceil(F/8);return{nBitLength:F,nByteLength:M}}function R(P,q,F=!1,M={}){if(P<=n)throw new Error("invalid field: expected ORDER > 0, got "+P);const{nBitLength:O,nByteLength:H}=S(P,q);if(H>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let N;const z=Object.freeze({ORDER:P,isLE:F,BITS:O,BYTES:H,MASK:(0,r.bitMask)(O),ZERO:n,ONE:t,create:$=>u($,P),isValid:$=>{if(typeof $!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof $);return n<=$&&$<P},is0:$=>$===n,isOdd:$=>($&t)===t,neg:$=>u(-$,P),eql:($,D)=>$===D,sqr:$=>u($*$,P),add:($,D)=>u($+D,P),sub:($,D)=>u($-D,P),mul:($,D)=>u($*D,P),pow:($,D)=>l(z,$,D),div:($,D)=>u($*b(D,P),P),sqrN:$=>$*$,addN:($,D)=>$+D,subN:($,D)=>$-D,mulN:($,D)=>$*D,inv:$=>b($,P),sqrt:M.sqrt||($=>(N||(N=g(P)),N(z,$))),toBytes:$=>F?(0,r.numberToBytesLE)($,H):(0,r.numberToBytesBE)($,H),fromBytes:$=>{if($.length!==H)throw new Error("Field.fromBytes: expected "+H+" bytes, got "+$.length);return F?(0,r.bytesToNumberLE)($):(0,r.bytesToNumberBE)($)},invertBatch:$=>w(z,$),cmov:($,D,G)=>G?D:$});return Object.freeze(z)}function x(P,q){if(!P.isOdd)throw new Error("Field doesn't have isOdd");const F=P.sqrt(q);return P.isOdd(F)?F:P.neg(F)}function T(P,q){if(!P.isOdd)throw new Error("Field doesn't have isOdd");const F=P.sqrt(q);return P.isOdd(F)?P.neg(F):F}function A(P,q,F=!1){P=(0,r.ensureBytes)("privateHash",P);const M=P.length,O=S(q).nByteLength+8;if(O<24||M<O||M>1024)throw new Error("hashToPrivateScalar: expected "+O+"-1024 bytes of input, got "+M);const H=F?(0,r.bytesToNumberLE)(P):(0,r.bytesToNumberBE)(P);return u(H,q-t)+t}function C(P){if(typeof P!="bigint")throw new Error("field order must be bigint");const q=P.toString(2).length;return Math.ceil(q/8)}function k(P){const q=C(P);return q+Math.ceil(q/2)}function B(P,q,F=!1){const M=P.length,O=C(q),H=k(q);
37if(M<16||M<H||M>1024)throw new Error("expected "+H+"-1024 bytes of input, got "+M);const N=F?(0,r.bytesToNumberLE)(P):(0,r.bytesToNumberBE)(P),z=u(N,q-t)+t;return F?(0,r.numberToBytesLE)(z,O):(0,r.numberToBytesBE)(z,O)}return _e}var Ul;function wv(){if(Ul)return Er;Ul=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.wNAF=y,Er.pippenger=h,Er.precomputeMSMUnsafe=m,Er.validateBasic=g;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Au(),r=Fr(),n=BigInt(0),t=BigInt(1);function a(p,v){const j=v.negate();return p?j:v}function s(p,v){if(!Number.isSafeInteger(p)||p<=0||p>v)throw new Error("invalid window size, expected [1.."+v+"], got W="+p)}function o(p,v){s(p,v);const j=Math.ceil(v/p)+1,l=2**(p-1),w=2**p,E=(0,r.bitMask)(p),_=BigInt(p);return{windows:j,windowSize:l,mask:E,maxNumber:w,shiftBy:_}}function i(p,v,j){const{windowSize:l,mask:w,maxNumber:E,shiftBy:_}=j;let I=Number(p&w),S=p>>_;I>l&&(I-=E,S+=t);const R=v*l,x=R+Math.abs(I)-1,T=I===0,A=I<0,C=v%2!==0;return{nextN:S,offset:x,isZero:T,isNeg:A,isNegF:C,offsetF:R}}function c(p,v){if(!Array.isArray(p))throw new Error("array expected");p.forEach((j,l)=>{if(!(j instanceof v))throw new Error("invalid point at index "+l)})}function u(p,v){if(!Array.isArray(p))throw new Error("array of scalars expected");p.forEach((j,l)=>{if(!v.isValid(j))throw new Error("invalid scalar at index "+l)})}const d=new WeakMap,f=new WeakMap;function b(p){return f.get(p)||1}function y(p,v){return{constTimeNegate:a,hasPrecomputes(j){return b(j)!==1},unsafeLadder(j,l,w=p.ZERO){let E=j;for(;l>n;)l&t&&(w=w.add(E)),E=E.double(),l>>=t;return w},precomputeWindow(j,l){const{windows:w,windowSize:E}=o(l,v),_=[];let I=j,S=I;for(let R=0;R<w;R++){S=I,_.push(S);for(let x=1;x<E;x++)S=S.add(I),_.push(S);I=S.double()}return _},wNAF(j,l,w){let E=p.ZERO,_=p.BASE;const I=o(j,v);for(let S=0;S<I.windows;S++){const{nextN:R,offset:x,isZero:T,isNeg:A,isNegF:C,offsetF:k}=i(w,S,I);w=R,T?_=_.add(a(C,l[k])):E=E.add(a(A,l[x]))}return{p:E,f:_}},wNAFUnsafe(j,l,w,E=p.ZERO){const _=o(j,v);for(let I=0;I<_.windows&&w!==n;I++){const{nextN:S,offset:R,isZero:x,isNeg:T}=i(w,I,_);if(w=S,!x){const A=l[R];E=E.add(T?A.negate():A)}}return E},getPrecomputes(j,l,w){let E=d.get(l);return E||(E=this.precomputeWindow(l,j),j!==1&&d.set(l,w(E))),E},wNAFCached(j,l,w){const E=b(j);return this.wNAF(E,this.getPrecomputes(E,j,w),l)},wNAFCachedUnsafe(j,l,w,E){const _=b(j);return _===1?this.unsafeLadder(j,l,E):this.wNAFUnsafe(_,this.getPre
37computes(_,j,w),l,E)},setWindowSize(j,l){s(l,v),f.set(j,l),d.delete(j)}}}function h(p,v,j,l){c(j,p),u(l,v);const w=j.length,E=l.length;if(w!==E)throw new Error("arrays of points and scalars must have equal length");const _=p.ZERO,I=(0,r.bitLen)(BigInt(w));let S=1;I>12?S=I-3:I>4?S=I-2:I>0&&(S=2);const R=(0,r.bitMask)(S),x=new Array(Number(R)+1).fill(_),T=Math.floor((v.BITS-1)/S)*S;let A=_;for(let C=T;C>=0;C-=S){x.fill(_);for(let B=0;B<E;B++){const P=l[B],q=Number(P>>BigInt(C)&R);x[q]=x[q].add(j[B])}let k=_;for(let B=x.length-1,P=_;B>0;B--)P=P.add(x[B]),k=k.add(P);if(A=A.add(k),C!==0)for(let B=0;B<S;B++)A=A.double()}return A}function m(p,v,j,l){s(l,v.BITS),c(j,p);const w=p.ZERO,E=2**l-1,_=Math.ceil(v.BITS/l),I=(0,r.bitMask)(l),S=j.map(R=>{const x=[];for(let T=0,A=R;T<E;T++)x.push(A),A=A.add(R);return x});return R=>{if(u(R,v),R.length>j.length)throw new Error("array of scalars must be smaller than array of points");let x=w;for(let T=0;T<_;T++){if(x!==w)for(let C=0;C<l;C++)x=x.double();const A=BigInt(_*l-(T+1)*l);for(let C=0;C<R.length;C++){const k=R[C],B=Number(k>>A&I);B&&(x=x.add(S[C][B-1]))}}return x}}function g(p){return(0,e.validateField)(p.Fp),(0,r.validateObject)(p,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(p.n,p.nBitLength),...p,p:p.Fp.ORDER})}return Er}var Ll;function Vp(){return Ll||(Ll=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=e.DERErr=void 0,e.weierstrassPoints=y,e.weierstrass=m,e.SWUFpSqrtRatio=g,e.mapToCurveSimpleSWU=p;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=wv(),n=Au(),t=Fr();function a(v){v.lowS!==void 0&&(0,t.abool)("lowS",v.lowS),v.prehash!==void 0&&(0,t.abool)("prehash",v.prehash)}function s(v){const j=(0,r.validateBasic)(v);(0,t.validateObject)(j,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:l,Fp:w,a:E}=j;if(l){if(!w.eql(E,w.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof l!="object"||typeof l.beta!="bigint"||typeof l.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...j})}class o extends Error{constructor(j=""){super(j)}}e.DERErr=o,e.DER={Err:o,_tlv:{encode:(v,j)=>{const{Err:l}=e.DER;if(v<0||v>256)throw new l("tlv.encode: wrong tag");if(j.length&1)throw new l("tlv.encode: unpadded data");const w=j.length/2,E=(0,t.numberToHexUnpadded)(w);if(E.length/2&128)throw new l("tlv.encode: long form length too big");const _=w>127?(0,t.numberToHexUnpadded)(E.length/2|128):"";return(0,t.numberToHexUnpadded)(v)+_+E+j},decode(v,j){const{Err:l}=e.DER;let w=0;if(v<0||v>256)throw new l("tlv.encode: wrong tag");if(j.length<2||j[w++]!==v)throw new l("tlv.decode: wrong tlv");const E=j[w++],_=!!(E&128);let I=0;if(!_)I=E;else{const R=E&127;if(!R)throw new l("tlv.decode(long): indefinite length not supported");if(R>4)throw new l("tlv.decode(long): byte length is too big");const x=j.subarray(w,w+R);if(x.length!==R)throw new l("tlv.decode: length bytes not complete");if(x[0]===0)throw new l("tlv.decode(long): zero leftmost byte");for(const T of x)I=I<<8|T;if(w+=R,I<128)throw new l("tlv.decode(long): not minimal encoding")}const S=j.subarray(w,w+I);if(S.length!==I)throw new l("tlv.decode: wrong value length");return{v:S,l:j.subarray(w+I)}}},_int:{encode(v){const{Err:j}=e.DER;if(v<c)throw new j("integer: negative integers are not allowed");let l=(0,t.numberToHexUnpadded)(v);if(Number.parseInt(l[0],16)&8&&(l="00"+l),l.length&1)throw new j("unexpected DER parsing assertion: unpadded hex");return l},decode(v){const{Err:j}=e.DER;if(v[0]&128)throw new j("invalid signature integer: negative");if(v[0]===0&&!(v[1]&128))throw new j("invalid signature integer: unnecessary leading zero");return(0,t.bytesToNumberBE)(v)}},toSig(v){const{Err:j,_int:l,_tlv:w}=e.DER,E=(0,t.ensureBytes)("signature",v),{v:_,l:I}=w.decode(48,E);if(I.length)throw new j("invalid signature: left bytes after parsing");const{v:S,l:R}=w.decode(2,_),{v:x,l:T}=w.decode(2,R);if(T.length)throw new j("invalid signature: left bytes after parsing");return{r:l.decode(S),s:l.decode(x)}},hexFromSig(v){const{_tlv:j,_int:l}=e.DER,w=j.encode(2,l.encode(v.r)),E=j.encode(2,l.encode(v.s)),_=w+E;return j.encode(48,_)}};function i(v,j){return(0,t.bytesToHex)((0,t.numberToBytesBE)(v,j))}const c=BigInt(0),u=BigInt(1),d=BigInt(2),f=BigInt(3),b=BigInt(4);function y(v){const j=s(v),{Fp:l}=j,w=(0,n.Field)(j.n,j.nBitLength),E=j.toBytes||((O,H,N)=>{const z=H.toAffine();return(0,t.concatBytes)(Uint8Array.from([4]),l.toBytes(z.x),l.toBytes(z.y))}),_=j.fromBytes||(O=>{const H=O.subarray(1),N=l.fromBytes(H.subarray(0,l.BYTES)),z=l.fromBytes(H.subarray(l.BYTES,2*l.BYTES));return{x:N,y:z}});function I(O){const{a:H,b:N}=j,z=l.sqr(O),$=l.mul(z,O);return l.add(l.add($,l.mul(O,H)),N)}function S(O,H){const N=l.sqr(H),z=I(O);return l.eql(N,z)}if(!S(j.Gx,j.Gy))throw new Error("bad curve params: generator point");const R=l.mul(l.pow(j.a,f),b),x=l.mul(l.sqr(j.b),BigInt(27));if(l.is0(l.add(R,x)))throw new Error("bad curve params: a or b");function T(O){return(0,t.inRange)(O,u,j.n)}function A(O){const{allowedPrivateKeyLengths:H,nByteLength:N,wrapPrivateKey:z,n:$}=j;if(H&&typeof O!="bigint"){if((0,t.isBytes)(O)&&(O=(0,t.bytesToHex)(O)),typeof O!="string"||!H.includes(O.length))throw new Error("invalid private key");O=O.padStart(N*2,"0")}let D;try{D=typeof O=="bigint"?O:(0,t.bytesToNumberBE)((0,t.ensureBytes)("private key",O,N))}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof O)}return z&&(D=(0,n.mod)(D,$)),(0,t.aInRange)("private key",D,u,$),D}function C(O){if(!(O instanceof P))throw new Error("ProjectivePoint expected")}const k=(0,t.memoized)((O,H)=>{const{px:N,py:z,pz:$}=O;if(l.eql($,l.ONE))return{x:N,y:z};const D=O.is0();H==null&&(H=D?l.ONE:l.inv($));const G=l.mul(N,H),Y=l.mul(z,H),Z=l.mul($,H);if(D)return{x:l.ZERO,y:l.ZERO};
vendor: 4,130 bytes, line 37
37if(!l.eql(Z,l.ONE))throw new Error("invZ was invalid");return{x:G,y:Y}}),B=(0,t.memoized)(O=>{if(O.is0()){if(j.allowInfinityPoint&&!l.is0(O.py))return;throw new Error("bad point: ZERO")}const{x:H,y:N}=O.toAffine();if(!l.isValid(H)||!l.isValid(N))throw new Error("bad point: x or y not FE");if(!S(H,N))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class P{constructor(H,N,z){if(H==null||!l.isValid(H))throw new Error("x required");if(N==null||!l.isValid(N)||l.is0(N))throw new Error("y required");if(z==null||!l.isValid(z))throw new Error("z required");this.px=H,this.py=N,this.pz=z,Object.freeze(this)}static fromAffine(H){const{x:N,y:z}=H||{};if(!H||!l.isValid(N)||!l.isValid(z))throw new Error("invalid affine point");if(H instanceof P)throw new Error("projective point not allowed");const $=D=>l.eql(D,l.ZERO);return $(N)&&$(z)?P.ZERO:new P(N,z,l.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(H){const N=(0,n.FpInvertBatch)(l,H.map(z=>z.pz));return H.map((z,$)=>z.toAffine(N[$])).map(P.fromAffine)}static fromHex(H){const N=P.fromAffine(_((0,t.ensureBytes)("pointHex",H)));return N.assertValidity(),N}static fromPrivateKey(H){return P.BASE.multiply(A(H))}static msm(H,N){return(0,r.pippenger)(P,w,H,N)}_setWindowSize(H){M.setWindowSize(this,H)}assertValidity(){B(this)}hasEvenY(){const{y:H}=this.toAffine();if(l.isOdd)return!l.isOdd(H);throw new Error("Field doesn't support isOdd")}equals(H){C(H);const{px:N,py:z,pz:$}=this,{px:D,py:G,pz:Y}=H,Z=l.eql(l.mul(N,Y),l.mul(D,$)),W=l.eql(l.mul(z,Y),l.mul(G,$));return Z&&W}negate(){return new P(this.px,l.neg(this.py),this.pz)}double(){const{a:H,b:N}=j,z=l.mul(N,f),{px:$,py:D,pz:G}=this;let Y=l.ZERO,Z=l.ZERO,W=l.ZERO,X=l.mul($,$),ie=l.mul(D,D),K=l.mul(G,G),J=l.mul($,D);return J=l.add(J,J),W=l.mul($,G),W=l.add(W,W),Y=l.mul(H,W),Z=l.mul(z,K),Z=l.add(Y,Z),Y=l.sub(ie,Z),Z=l.add(ie,Z),Z=l.mul(Y,Z),Y=l.mul(J,Y),W=l.mul(z,W),K=l.mul(H,K),J=l.sub(X,K),J=l.mul(H,J),J=l.add(J,W),W=l.add(X,X),X=l.add(W,X),X=l.add(X,K),X=l.mul(X,J),Z=l.add(Z,X),K=l.mul(D,G),K=l.add(K,K),X=l.mul(K,J),Y=l.sub(Y,X),W=l.mul(K,ie),W=l.add(W,W),W=l.add(W,W),new P(Y,Z,W)}add(H){C(H);const{px:N,py:z,pz:$}=this,{px:D,py:G,pz:Y}=H;let Z=l.ZERO,W=l.ZERO,X=l.ZERO;const ie=j.a,K=l.mul(j.b,f);let J=l.mul(N,D),ee=l.mul(z,G),ae=l.mul($,Y),oe=l.add(N,z),se=l.add(D,G);oe=l.mul(oe,se),se=l.add(J,ee),oe=l.sub(oe,se),se=l.add(N,$);let Q=l.add(D,Y);return se=l.mul(se,Q),Q=l.add(J,ae),se=l.sub(se,Q),Q=l.add(z,$),Z=l.add(G,Y),Q=l.mul(Q,Z),Z=l.add(ee,ae),Q=l.sub(Q,Z),X=l.mul(ie,se),Z=l.mul(K,ae),X=l.add(Z,X),Z=l.sub(ee,X),X=l.add(ee,X),W=l.mul(Z,X),ee=l.add(J,J),ee=l.add(ee,J),ae=l.mul(ie,ae),se=l.mul(K,se),ee=l.add(ee,ae),ae=l.sub(J,ae),ae=l.mul(ie,ae),se=l.add(se,ae),J=l.mul(ee,se),W=l.add(W,J),J=l.mul(Q,se),Z=l.mul(oe,Z),Z=l.sub(Z,J),J=l.mul(oe,ee),X=l.mul(Q,X),X=l.add(X,J),new P(Z,W,X)}subtract(H){return this.add(H.negate())}is0(){return this.equals(P.ZERO)}wNAF(H){return M.wNAFCached(this,H,P.normalizeZ)}multiplyUnsafe(H){const{endo:N,n:z}=j;(0,t.aInRange)("scalar",H,c,z);const $=P.ZERO;if(H===c)return $;if(this.is0()||H===u)return this;if(!N||M.hasPrecomputes(this))return M.wNAFCachedUnsafe(this,H,P.normalizeZ);let{k1neg:D,k1:G,k2neg:Y,k2:Z}=N.splitScalar(H),W=$,X=$,ie=this;for(;G>c||Z>c;)G&u&&(W=W.add(ie)),Z&u&&(X=X.add(ie)),ie=ie.double(),G>>=u,Z>>=u;return D&&(W=W.negate()),Y&&(X=X.negate()),X=new P(l.mul(X.px,N.beta),X.py,X.pz),W.add(X)}multiply(H){const{endo:N,n:z}=j;(0,t.aInRange)("scalar",H,u,z);let $,D;if(N){const{k1neg:G,k1:Y,k2neg:Z,k2:W}=N.splitScalar(H);let{p:X,f:ie}=this.wNAF(Y),{p:K,f:J}=this.wNAF(W);X=M.constTimeNegate(G,X),K=M.constTimeNegate(Z,K),K=new P(l.mul(K.px,N.beta),K.py,K.pz),$=X.add(K),D=ie.add(J)}else{const{p:G,f:Y}=this.wNAF(H);$=G,D=Y}return P.normalizeZ([$,D])[0]}multiplyAndAddUnsafe(H,N,z){const $=P.BASE,D=(Y,Z)=>Z===c||Z===u||!Y.equals($)?Y.multiplyUnsafe(Z):Y.multiply(Z),G=D(this,N).add(D(H,z));return G.is0()?void 0:G}toAffine(H){return k(this,H)}isTorsionFree(){const{h:H,isTorsionFree:N}=j;if(H===u)return!0;
37if(N)return N(P,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:H,clearCofactor:N}=j;return H===u?this:N?N(P,this):this.multiplyUnsafe(j.h)}toRawBytes(H=!0){return(0,t.abool)("isCompressed",H),this.assertValidity(),E(P,this,H)}toHex(H=!0){return(0,t.abool)("isCompressed",H),(0,t.bytesToHex)(this.toRawBytes(H))}}P.BASE=new P(j.Gx,j.Gy,l.ONE),P.ZERO=new P(l.ZERO,l.ONE,l.ZERO);const{endo:q,nBitLength:F}=j,M=(0,r.wNAF)(P,q?Math.ceil(F/2):F);return{CURVE:j,ProjectivePoint:P,normPrivateKeyToScalar:A,weierstrassEquation:I,isWithinCurveOrder:T}}function h(v){const j=(0,r.validateBasic)(v);return(0,t.validateObject)(j,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...j})}function m(v){const j=h(v),{Fp:l,n:w,nByteLength:E,nBitLength:_}=j,I=l.BYTES+1,S=2*l.BYTES+1;function R(K){return(0,n.mod)(K,w)}function x(K){return(0,n.invert)(K,w)}const{ProjectivePoint:T,normPrivateKeyToScalar:A,weierstrassEquation:C,isWithinCurveOrder:k}=y({...j,toBytes(K,J,ee){const ae=J.toAffine(),oe=l.toBytes(ae.x),se=t.concatBytes;return(0,t.abool)("isCompressed",ee),ee?se(Uint8Array.from([J.hasEvenY()?2:3]),oe):se(Uint8Array.from([4]),oe,l.toBytes(ae.y))},fromBytes(K){const J=K.length,ee=K[0],ae=K.subarray(1);if(J===I&&(ee===2||ee===3)){const oe=(0,t.bytesToNumberBE)(ae);if(!(0,t.inRange)(oe,u,l.ORDER))throw new Error("Point is not on curve");const se=C(oe);let Q;try{Q=l.sqrt(se)}catch(ve){const Se=ve instanceof Error?": "+ve.message:"";throw new Error("Point is not on curve"+Se)}const V=(Q&u)===u;return(ee&1)===1!==V&&(Q=l.neg(Q)),{x:oe,y:Q}}else if(J===S&&ee===4){const oe=l.fromBytes(ae.subarray(0,l.BYTES)),se=l.fromBytes(ae.subarray(l.BYTES,2*l.BYTES));return{x:oe,y:se}}else{const oe=I,se=S;throw new Error("invalid Point, expected length of "+oe+", or uncompressed "+se+", got "+J)}}});function B(K){const J=w>>u;return K>J}function P(K){return B(K)?R(-K):K}const q=(K,J,ee)=>(0,t.bytesToNumberBE)(K.slice(J,ee));class F{constructor(J,ee,ae){(0,t.aInRange)("r",J,u,w),(0,t.aInRange)("s",ee,u,w),this.r=J,this.s=ee,ae!=null&&(this.recovery=ae),Object.freeze(this)}static fromCompact(J){const ee=E;return J=(0,t.ensureBytes)("compactSignature",J,ee*2),new F(q(J,0,ee),q(J,ee,2*ee))}static fromDER(J){const{r:ee,s:ae}=e.DER.toSig((0,t.ensureBytes)("DER",J));return new F(ee,ae)}assertValidity(){}addRecoveryBit(J){return new F(this.r,this.s,J)}recoverPublicKey(J){const{r:ee,s:ae,recovery:oe}=this,se=$((0,t.ensureBytes)("msgHash",J));if(oe==null||![0,1,2,3].includes(oe))throw new Error("recovery id invalid");const Q=oe===2||oe===3?ee+j.n:ee;if(Q>=l.ORDER)throw new Error("recovery id 2 or 3 invalid");const V=(oe&1)===0?"02":"03",Ie=T.fromHex(V+i(Q,l.BYTES)),ve=x(Q),Se=R(-se*ve),it=R(ae*ve),Ce=T.BASE.multiplyAndAddUnsafe(Ie,Se,it);if(!Ce)throw new Error("point at infinify");return Ce.assertValidity(),Ce}hasHighS(){return B(this.s)}normalizeS(){return this.hasHighS()?new F(this.r,R(-this.s),this.recovery):this}toDERRawBytes(){return(0,t.hexToBytes)(this.toDERHex())}toDERHex(){return e.DER.hexFromSig(this)}toCompactRawBytes(){return(0,t.hexToBytes)(this.toCompactHex())}toCompactHex(){const J=E;return i(this.r,J)+i(this.s,J)}}const M={isValidPrivateKey(K){try{return A(K),!0}catch{return!1}},normPrivateKeyToScalar:A,randomPrivateKey:()=>{const K=(0,n.getMinHashLength)(j.n);return(0,n.mapHashToField)(j.randomBytes(K),j.n)},precompute(K=8,J=T.BASE){return J._setWindowSize(K),J.multiply(BigInt(3)),J}};function O(K,J=!0){return T.fromPrivateKey(K).toRawBytes(J)}function H(K){if(typeof K=="bigint")return!1;if(K instanceof T)return!0;const ee=(0,t.ensureBytes)("key",K).length,ae=l.BYTES,oe=ae+1,se=2*ae+1;if(!(j.allowedPrivateKeyLengths||E===oe))return ee===oe||ee===se}function N(K,J,ee=!0){if(H(K)===!0)throw new Error("first arg must be private key");if(H(J)===!1)throw new Error("second arg must be public key");return T.fromHex(J).multiply(A(K)).toRawBytes(ee)}const z=j.bits2int||function(K){if(K.length>8192)throw new Error("input is too large");
37const J=(0,t.bytesToNumberBE)(K),ee=K.length*8-_;return ee>0?J>>BigInt(ee):J},$=j.bits2int_modN||function(K){return R(z(K))},D=(0,t.bitMask)(_);function G(K){return(0,t.aInRange)("num < 2^"+_,K,c,D),(0,t.numberToBytesBE)(K,E)}function Y(K,J,ee=Z){if(["recovered","canonical"].some(Le=>Le in ee))throw new Error("sign() legacy options not supported");const{hash:ae,randomBytes:oe}=j;let{lowS:se,prehash:Q,extraEntropy:V}=ee;se==null&&(se=!0),K=(0,t.ensureBytes)("msgHash",K),a(ee),Q&&(K=(0,t.ensureBytes)("prehashed msgHash",ae(K)));const Ie=$(K),ve=A(J),Se=[G(ve),G(Ie)];if(V!=null&&V!==!1){const Le=V===!0?oe(l.BYTES):V;Se.push((0,t.ensureBytes)("extraEntropy",Le))}const it=(0,t.concatBytes)(...Se),Ce=Ie;function st(Le){const Be=z(Le);if(!k(Be))return;const Wt=x(Be),_t=T.BASE.multiply(Be).toAffine(),ct=R(_t.x);if(ct===c)return;const vt=R(Wt*R(Ce+ct*ve));if(vt===c)return;let ut=(_t.x===ct?0:2)|Number(_t.y&u),fr=vt;return se&&B(vt)&&(fr=P(vt),ut^=1),new F(ct,fr,ut)}return{seed:it,k2sig:st}}const Z={lowS:j.lowS,prehash:!1},W={lowS:j.lowS,prehash:!1};function X(K,J,ee=Z){const{seed:ae,k2sig:oe}=Y(K,J,ee),se=j;return(0,t.createHmacDrbg)(se.hash.outputLen,se.nByteLength,se.hmac)(ae,oe)}T.BASE._setWindowSize(8);function ie(K,J,ee,ae=W){const oe=K;J=(0,t.ensureBytes)("msgHash",J),ee=(0,t.ensureBytes)("publicKey",ee);const{lowS:se,prehash:Q,format:V}=ae;if(a(ae),"strict"in ae)throw new Error("options.strict was renamed to lowS");if(V!==void 0&&V!=="compact"&&V!=="der")throw new Error("format must be compact or der");const Ie=typeof oe=="string"||(0,t.isBytes)(oe),ve=!Ie&&!V&&typeof oe=="object"&&oe!==null&&typeof oe.r=="bigint"&&typeof oe.s=="bigint";if(!Ie&&!ve)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let Se,it;try{if(ve&&(Se=new F(oe.r,oe.s)),Ie){try{V!=="compact"&&(Se=F.fromDER(oe))}catch(ut){if(!(ut instanceof e.DER.Err))throw ut}!Se&&V!=="der"&&(Se=F.fromCompact(oe))}it=T.fromHex(ee)}catch{return!1}if(!Se||se&&Se.hasHighS())return!1;Q&&(J=j.hash(J));const{r:Ce,s:st}=Se,Le=$(J),Be=x(st),Wt=R(Le*Be),_t=R(Ce*Be),ct=T.BASE.multiplyAndAddUnsafe(it,Wt,_t)?.toAffine();return ct?R(ct.x)===Ce:!1}return{CURVE:j,getPublicKey:O,getSharedSecret:N,sign:X,verify:ie,ProjectivePoint:T,Signature:F,utils:M}}function g(v,j){const l=v.ORDER;let w=c;for(let B=l-u;B%d===c;B/=d)w+=u;const E=w,_=d<<E-u-u,I=_*d,S=(l-u)/I,R=(S-u)/d,x=I-u,T=_,A=v.pow(j,S),C=v.pow(j,(S+u)/d);let k=(B,P)=>{let q=A,F=v.pow(P,x),M=v.sqr(F);M=v.mul(M,P);let O=v.mul(B,M);O=v.pow(O,R),O=v.mul(O,F),F=v.mul(O,P),M=v.mul(O,B);let H=v.mul(M,F);O=v.pow(H,T);let N=v.eql(O,v.ONE);F=v.mul(M,C),O=v.mul(H,q),M=v.cmov(F,M,N),H=v.cmov(O,H,N);for(let z=E;z>u;z--){let $=z-d;$=d<<$-u;let D=v.pow(H,$);const G=v.eql(D,v.ONE);F=v.mul(M,q),q=v.mul(q,q),D=v.mul(H,q),M=v.cmov(F,M,G),H=v.cmov(D,H,G)}return{isValid:N,value:M}};if(v.ORDER%b===f){const B=(v.ORDER-f)/b,P=v.sqrt(v.neg(j));k=(q,F)=>{let M=v.sqr(F);const O=v.mul(q,F);M=v.mul(M,O);let H=v.pow(M,B);H=v.mul(H,O);const N=v.mul(H,P),z=v.mul(v.sqr(H),F),$=v.eql(z,q);let D=v.cmov(N,H,$);return{isValid:$,value:D}}}return k}function p(v,j){if((0,n.validateField)(v),!v.isValid(j.A)||!v.isValid(j.B)||!v.isValid(j.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const l=g(v,j.Z);if(!v.isOdd)throw new Error("Fp.isOdd is not implemented!");return w=>{let E,_,I,S,R,x,T,A;E=v.sqr(w),E=v.mul(E,j.Z),_=v.sqr(E),_=v.add(_,E),I=v.add(_,v.ONE),I=v.mul(I,j.B),S=v.cmov(j.Z,v.neg(_),!v.eql(_,v.ZERO)),S=v.mul(S,j.A),_=v.sqr(I),x=v.sqr(S),R=v.mul(x,j.A),_=v.add(_,R),_=v.mul(_,I),x=v.mul(x,S),R=v.mul(x,j.B),_=v.add(_,R),T=v.mul(E,I);const{isValid:C,value:k}=l(_,x);A=v.mul(E,w),A=v.mul(A,k),T=v.cmov(T,I,C),A=v.cmov(A,k,C);const B=v.isOdd(w)===v.isOdd(A);A=v.cmov(v.neg(A),A,B);const P=(0,n.FpInvertBatch)(v,[S],!0)[0];return T=v.mul(T,P),{x:T,y:A}}}})(Ed)),Ed}var Dl;function Pv(){if(Dl)return Zn;Dl=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.getHash=t,Zn.createCurve=a;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=jv(),r=xr(),n=Vp();function t(s){return{hash:s,hmac:(o,...i)=>(0,e.hmac)(s,o,(0,r.concatBytes)(...i)),randomBytes:r.randomBytes}}function a(s,o){const i=c=>(0,n.weierstrass)({...s,...t(c)});return{...i(o),create:i}}return Zn}var Jt={},Gl;function Av(){if(Gl)return Jt;
37Gl=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.expand_message_xmd=o,Jt.expand_message_xof=i,Jt.hash_to_field=c,Jt.isogenyMap=u,Jt.createHasher=d;const e=Au(),r=Fr(),n=r.bytesToNumberBE;function t(f,b){if(s(f),s(b),f<0||f>=1<<8*b)throw new Error("invalid I2OSP input: "+f);const y=Array.from({length:b}).fill(0);for(let h=b-1;h>=0;h--)y[h]=f&255,f>>>=8;return new Uint8Array(y)}function a(f,b){const y=new Uint8Array(f.length);for(let h=0;h<f.length;h++)y[h]=f[h]^b[h];return y}function s(f){if(!Number.isSafeInteger(f))throw new Error("number expected")}function o(f,b,y,h){(0,r.abytes)(f),(0,r.abytes)(b),s(y),b.length>255&&(b=h((0,r.concatBytes)((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-"),b)));const{outputLen:m,blockLen:g}=h,p=Math.ceil(y/m);if(y>65535||p>255)throw new Error("expand_message_xmd: invalid lenInBytes");const v=(0,r.concatBytes)(b,t(b.length,1)),j=t(0,g),l=t(y,2),w=new Array(p),E=h((0,r.concatBytes)(j,f,l,t(0,1),v));w[0]=h((0,r.concatBytes)(E,t(1,1),v));for(let I=1;I<=p;I++){const S=[a(E,w[I-1]),t(I+1,1),v];w[I]=h((0,r.concatBytes)(...S))}return(0,r.concatBytes)(...w).slice(0,y)}function i(f,b,y,h,m){if((0,r.abytes)(f),(0,r.abytes)(b),s(y),b.length>255){const g=Math.ceil(2*h/8);b=m.create({dkLen:g}).update((0,r.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(b).digest()}if(y>65535||b.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return m.create({dkLen:y}).update(f).update(t(y,2)).update(b).update(t(b.length,1)).digest()}function c(f,b,y){(0,r.validateObject)(y,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:h,k:m,m:g,hash:p,expand:v,DST:j}=y;(0,r.abytes)(f),s(b);const l=typeof j=="string"?(0,r.utf8ToBytes)(j):j,w=h.toString(2).length,E=Math.ceil((w+m)/8),_=b*g*E;let I;if(v==="xmd")I=o(f,l,_,p);else if(v==="xof")I=i(f,l,_,m,p);else if(v==="_internal_pass")I=f;else throw new Error('expand must be "xmd" or "xof"');const S=new Array(b);for(let R=0;R<b;R++){const x=new Array(g);for(let T=0;T<g;T++){const A=E*(T+R*g),C=I.subarray(A,A+E);x[T]=(0,e.mod)(n(C),h)}S[R]=x}return S}function u(f,b){const y=b.map(h=>Array.from(h).reverse());return(h,m)=>{const[g,p,v,j]=y.map(E=>E.reduce((_,I)=>f.add(f.mul(_,h),I))),[l,w]=(0,e.FpInvertBatch)(f,[p,j],!0);return h=f.mul(g,l),m=f.mul(m,f.mul(v,w)),{x:h,y:m}}}function d(f,b,y){if(typeof b!="function")throw new Error("mapToCurve() must be defined");function h(g){return f.fromAffine(b(g))}function m(g){const p=g.clearCofactor();return p.equals(f.ZERO)?f.ZERO:(p.assertValidity(),p)}return{defaults:y,hashToCurve(g,p){const v=c(g,2,{...y,DST:y.DST,...p}),j=h(v[0]),l=h(v[1]);return m(j.add(l))},encodeToCurve(g,p){const v=c(g,1,{...y,DST:y.encodeDST,...p});return m(h(v[0]))},mapToCurve(g){if(!Array.isArray(g))throw new Error("expected array of bigints");for(const p of g)if(typeof p!="bigint")throw new Error("expected array of bigints");return m(h(g))}}}return Jt}var Vl;function Nr(){return Vl||(Vl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.secp256k1_hasher=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r=Gp(),n=xr(),t=Pv(),a=Av(),s=Au(),o=Fr(),i=Vp(),c=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),u=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(0),f=BigInt(1),b=BigInt(2),y=(P,q)=>(P+q/b)/q;function h(P){const q=c,F=BigInt(3),M=BigInt(6),O=BigInt(11),H=BigInt(22),N=BigInt(23),z=BigInt(44),$=BigInt(88),D=P*P*P%q,G=D*D*P%q,Y=(0,s.pow2)(G,F,q)*G%q,Z=(0,s.pow2)(Y,F,q)*G%q,W=(0,s.pow2)(Z,b,q)*D%q,X=(0,s.pow2)(W,O,q)*W%q,ie=(0,s.pow2)(X,H,q)*X%q,K=(0,s.pow2)(ie,z,q)*ie%q,J=(0,s.pow2)(K,$,q)*K%q,ee=(0,s.pow2)(J,z,q)*ie%q,ae=(0,s.pow2)(ee,F,q)*G%q,oe=(0,s.pow2)(ae,N,q)*X%q,se=(0,s.pow2)(oe,M,q)*D%q,Q=(0,s.pow2)(se,b,q);if(!m.eql(m.sqr(Q),P))throw new Error("Cannot find square root");return Q}const m=(0,s.Field)(c,void 0,void 0,{sqrt:h});e.secp256k1=(0,t.createCurve)({a:d,b:BigInt(7),Fp:m,n:u,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:P=>{const q=u,F=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),M=-f*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),O=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),H=F,N=BigInt("0x100000000000000000000000000000000"),z=y(H*P,q),$=y(-M*P,q);let D=(0,s.mod)(P-z*F-$*O,q),G=(0,s.mod)(-z*M-$*H,q);const Y=D>N,Z=G>N;
37if(Y&&(D=q-D),Z&&(G=q-G),D>N||G>N)throw new Error("splitScalar: Endomorphism failed, k="+P);return{k1neg:Y,k1:D,k2neg:Z,k2:G}}}},r.sha256);const g={};function p(P,...q){let F=g[P];if(F===void 0){const M=(0,r.sha256)(Uint8Array.from(P,O=>O.charCodeAt(0)));F=(0,o.concatBytes)(M,M),g[P]=F}return(0,r.sha256)((0,o.concatBytes)(F,...q))}const v=P=>P.toRawBytes(!0).slice(1),j=P=>(0,o.numberToBytesBE)(P,32),l=P=>(0,s.mod)(P,c),w=P=>(0,s.mod)(P,u),E=e.secp256k1.ProjectivePoint,_=(P,q,F)=>E.BASE.multiplyAndAddUnsafe(P,q,F);function I(P){let q=e.secp256k1.utils.normPrivateKeyToScalar(P),F=E.fromPrivateKey(q);return{scalar:F.hasEvenY()?q:w(-q),bytes:v(F)}}function S(P){(0,o.aInRange)("x",P,f,c);const q=l(P*P),F=l(q*P+BigInt(7));let M=h(F);M%b!==d&&(M=l(-M));const O=new E(P,M,f);return O.assertValidity(),O}const R=o.bytesToNumberBE;function x(...P){return w(R(p("BIP0340/challenge",...P)))}function T(P){return I(P).bytes}function A(P,q,F=(0,n.randomBytes)(32)){const M=(0,o.ensureBytes)("message",P),{bytes:O,scalar:H}=I(q),N=(0,o.ensureBytes)("auxRand",F,32),z=j(H^R(p("BIP0340/aux",N))),$=p("BIP0340/nonce",z,O,M),D=w(R($));if(D===d)throw new Error("sign failed: k is zero");const{bytes:G,scalar:Y}=I(D),Z=x(G,O,M),W=new Uint8Array(64);if(W.set(G,0),W.set(j(w(Y+Z*H)),32),!C(W,M,O))throw new Error("sign: Invalid signature produced");return W}function C(P,q,F){const M=(0,o.ensureBytes)("signature",P,64),O=(0,o.ensureBytes)("message",q),H=(0,o.ensureBytes)("publicKey",F,32);try{const N=S(R(H)),z=R(M.subarray(0,32));if(!(0,o.inRange)(z,f,c))return!1;const $=R(M.subarray(32,64));if(!(0,o.inRange)($,f,u))return!1;const D=x(j(z),v(N),O),G=_(N,$,w(-D));return!(!G||!G.hasEvenY()||G.toAffine().x!==z)}catch{return!1}}e.schnorr={getPublicKey:T,sign:A,verify:C,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:S,pointToBytes:v,numberToBytesBE:o.numberToBytesBE,bytesToNumberBE:o.bytesToNumberBE,taggedHash:p,mod:s.mod}};const k=(0,a.isogenyMap)(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(P=>P.map(q=>BigInt(q)))),B=(0,i.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))});e.secp256k1_hasher=(0,a.createHasher)(e.secp256k1.ProjectivePoint,P=>{const{x:q,y:F}=B(m.create(P[0]));return k(q,F)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:r.sha256}),e.hashToCurve=e.secp256k1_hasher.hashToCurve,e.encodeToCurve=e.secp256k1_hasher.encodeToCurve})(_d)),_d}var Wl;function Jd(){if(Wl)return Na;Wl=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.recoverPublicKey=a;const e=ze(),r=Ve(),n=Ae(),t=te();async function a({hash:o,signature:i}){const c=(0,e.isHex)(o)?o:(0,t.toHex)(o),{secp256k1:u}=await Promise.resolve().then(()=>Nr());return`0x${(()=>{if(typeof i=="object"&&"r"in i&&"s"in i){const{r:m,s:g,v:p,yParity:v}=i,j=Number(v??p),l=s(j);return new u.Signature((0,n.hexToBigInt)(m),(0,n.hexToBigInt)(g)).addRecoveryBit(l)}const b=(0,e.isHex)(i)?i:(0,t.toHex)(i);if((0,r.size)(b)!==65)throw new Error("invalid signature length");const y=(0,n.hexToNumber)(`0x${b.slice(130)}`),h=s(y);return u.Signature.fromCompact(b.substring(2,130)).addRecoveryBit(h)})().recoverPublicKey(c.substring(2)).toHex(!1)}`}function s(o){if(o===0||o===1)return o;if(o===27)return 0;if(o===28)return 1;throw new Error("Invalid yParityOrV value")}return Na}var Kl;function sr(){if(Kl)return ka;Kl=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.recoverAddress=n;const e=Lp(),r=Jd();async function n({hash:t,signature:a}){return(0,e.publicKeyToAddress)(await(0,r.recoverPublicKey)({hash:t,signature:a}))}return ka}var $a={},Xr={},Zl;function Bo(){if(Zl)return Xr;
37Zl=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.toRlp=a,Xr.bytesToRlp=s,Xr.hexToRlp=o;const e=ce(),r=Io(),n=pe(),t=te();function a(f,b="hex"){const y=i(f),h=(0,r.createCursor)(new Uint8Array(y.length));return y.encode(h),b==="hex"?(0,t.bytesToHex)(h.bytes):h.bytes}function s(f,b="bytes"){return a(f,b)}function o(f,b="hex"){return a(f,b)}function i(f){return Array.isArray(f)?c(f.map(b=>i(b))):u(f)}function c(f){const b=f.reduce((m,g)=>m+g.length,0),y=d(b);return{length:b<=55?1+b:1+y+b,encode(m){b<=55?m.pushByte(192+b):(m.pushByte(247+y),y===1?m.pushUint8(b):y===2?m.pushUint16(b):y===3?m.pushUint24(b):m.pushUint32(b));for(const{encode:g}of f)g(m)}}}function u(f){const b=typeof f=="string"?(0,n.hexToBytes)(f):f,y=d(b.length);return{length:b.length===1&&b[0]<128?1:b.length<=55?1+b.length:1+y+b.length,encode(m){b.length===1&&b[0]<128?m.pushBytes(b):b.length<=55?(m.pushByte(128+b.length),m.pushBytes(b)):(m.pushByte(183+y),y===1?m.pushUint8(b.length):y===2?m.pushUint16(b.length):y===3?m.pushUint24(b.length):m.pushUint32(b.length),m.pushBytes(b))}}}function d(f){if(f<2**8)return 1;if(f<2**16)return 2;if(f<2**24)return 3;if(f<2**32)return 4;throw new e.BaseError("Length is too large.")}return Xr}var Yl;function Wp(){if(Yl)return $a;Yl=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.hashAuthorization=s;const e=Oe(),r=pe(),n=te(),t=Bo(),a=We();function s(o){const{chainId:i,nonce:c,to:u}=o,d=o.contractAddress??o.address,f=(0,a.keccak256)((0,e.concatHex)(["0x05",(0,t.toRlp)([i?(0,n.numberToHex)(i):"0x",d,c?(0,n.numberToHex)(c):"0x"])]));return u==="bytes"?(0,r.hexToBytes)(f):f}return $a}var Jl;function Oo(){if(Jl)return Ha;Jl=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.recoverAuthorizationAddress=n;const e=sr(),r=Wp();async function n(t){const{authorization:a,signature:s}=t;return(0,e.recoverAddress)({hash:(0,r.hashAuthorization)(a),signature:s??a})}return Ha}var za={},Yn={},Xl;function Kp(){if(Xl)return Yn;Xl=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.EstimateGasExecutionError=void 0;const e=Ro(),r=kr(),n=ce(),t=Ue();class a extends n.BaseError{constructor(o,{account:i,docsPath:c,chain:u,data:d,gas:f,gasPrice:b,maxFeePerGas:y,maxPriorityFeePerGas:h,nonce:m,to:g,value:p}){const v=(0,t.prettyPrint)({from:i?.address,to:g,value:typeof p<"u"&&`${(0,e.formatEther)(p)} ${u?.nativeCurrency?.symbol||"ETH"}`,data:d,gas:f,gasPrice:typeof b<"u"&&`${(0,r.formatGwei)(b)} gwei`,maxFeePerGas:typeof y<"u"&&`${(0,r.formatGwei)(y)} gwei`,maxPriorityFeePerGas:typeof h<"u"&&`${(0,r.formatGwei)(h)} gwei`,nonce:m});super(o.shortMessage,{cause:o,docsPath:c,metaMessages:[...o.metaMessages?[...o.metaMessages," "]:[],"Estimate Gas Arguments:",v].filter(
37Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=o}}return Yn.EstimateGasExecutionError=a,Yn}var ye={},Ql;function Dt(){if(Ql)return ye;Ql=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.UnknownNodeError=ye.TipAboveFeeCapError=ye.TransactionTypeNotSupportedError=ye.IntrinsicGasTooLowError=ye.IntrinsicGasTooHighError=ye.InsufficientFundsError=ye.NonceMaxValueError=ye.NonceTooLowError=ye.NonceTooHighError=ye.FeeCapTooLowError=ye.FeeCapTooHighError=ye.ExecutionRevertedError=void 0;const e=kr(),r=ce();class n extends r.BaseError{constructor({cause:m,message:g}={}){const p=g?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${p?`with reason: ${p}`:"for an unknown reason"}.`,{cause:m,name:"ExecutionRevertedError"})}}ye.ExecutionRevertedError=n,Object.defineProperty(n,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(n,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class t extends r.BaseError{constructor({cause:m,maxFeePerGas:g}={}){super(`The fee cap (\`maxFeePerGas\`${g?` = ${(0,e.formatGwei)(g)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:m,name:"FeeCapTooHighError"})}}ye.FeeCapTooHighError=t,Object.defineProperty(t,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends r.BaseError{constructor({cause:m,maxFeePerGas:g}={}){super(`The fee cap (\`maxFeePerGas\`${g?` = ${(0,e.formatGwei)(g)}`:""} gwei) cannot be lower than the block base fee.`,{cause:m,name:"FeeCapTooLowError"})}}ye.FeeCapTooLowError=a,Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class s extends r.BaseError{constructor({cause:m,nonce:g}={}){super(`Nonce provided for the transaction ${g?`(${g}) `:""}is higher than the next one expected.`,{cause:m,name:"NonceTooHighError"})}}ye.NonceTooHighError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class o extends r.BaseError{constructor({cause:m,nonce:g}={}){super([`Nonce provided for the transaction ${g?`(${g}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` 38`),{cause:m,name:"NonceTooLowError"})}}ye.NonceTooLowError=o,Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class i extends r.BaseError{constructor({cause:m,nonce:g}={}){super(`Nonce provided for the transaction ${g?`(${g}) `:""}exceeds the maximum allowed nonce.`,{cause:m,name:"NonceMaxValueError"})}}ye.NonceMaxValueError=i,Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class c extends r.BaseError{constructor({cause:m}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` 39`),{cause:m,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"})}}ye.InsufficientFundsError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class u extends r.BaseError{constructor({cause:m,gas:g}={}){super(`The amount of gas ${g?`(${g}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:m,name:"IntrinsicGasTooHighError"})}}ye.IntrinsicGasTooHighError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class d extends r.BaseError{constructor({cause:m,gas:g}={}){super(`The amount of gas ${g?`(${g}) `:""}provided for the transaction is too low.`,{cause:m,name:"IntrinsicGasTooLowError"})}}ye.IntrinsicGasTooLowError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class f extends r.BaseError{constructor({cause:m}){super("The transaction type is not supported for this chain.",{cause:m,name:"TransactionTypeNotSupportedError"})}}
39ye.TransactionTypeNotSupportedError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class b extends r.BaseError{constructor({cause:m,maxPriorityFeePerGas:g,maxFeePerGas:p}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${g?` = ${(0,e.formatGwei)(g)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${p?` = ${(0,e.formatGwei)(p)} gwei`:""}).`].join(` 40`),{cause:m,name:"TipAboveFeeCapError"})}}ye.TipAboveFeeCapError=b,Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class y extends r.BaseError{constructor({cause:m}){super(`An error occurred while executing: ${m?.shortMessage}`,{cause:m,name:"UnknownNodeError"})}}return ye.UnknownNodeError=y,ye}var Jn={},e1;function Co(){if(e1)return Jn;e1=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.containsNodeError=a,Jn.getNodeError=s;const e=ce(),r=Dt(),n=pt(),t=ar();function a(o){return o instanceof t.TransactionRejectedRpcError||o instanceof t.InvalidInputRpcError||o instanceof n.RpcRequestError&&o.code===r.ExecutionRevertedError.code}function s(o,i){const c=(o.details||"").toLowerCase(),u=o instanceof e.BaseError?o.walk(d=>d?.code===r.ExecutionRevertedError.code):o;return u instanceof e.BaseError?new r.ExecutionRevertedError({cause:o,message:u.details}):r.ExecutionRevertedError.nodeMessage.test(c)?new r.ExecutionRevertedError({cause:o,message:o.details}):r.FeeCapTooHighError.nodeMessage.test(c)?new r.FeeCapTooHighError({cause:o,maxFeePerGas:i?.maxFeePerGas}):r.FeeCapTooLowError.nodeMessage.test(c)?new r.FeeCapTooLowError({cause:o,maxFeePerGas:i?.maxFeePerGas}):r.NonceTooHighError.nodeMessage.test(c)?new r.NonceTooHighError({cause:o,nonce:i?.nonce}):r.NonceTooLowError.nodeMessage.test(c)?new r.NonceTooLowError({cause:o,nonce:i?.nonce}):r.NonceMaxValueError.nodeMessage.test(c)?new r.NonceMaxValueError({cause:o,nonce:i?.nonce}):r.InsufficientFundsError.nodeMessage.test(c)?new r.InsufficientFundsError({cause:o}):r.IntrinsicGasTooHighError.nodeMessage.test(c)?new r.IntrinsicGasTooHighError({cause:o,gas:i?.gas}):r.IntrinsicGasTooLowError.nodeMessage.test(c)?new r.IntrinsicGasTooLowError({cause:o,gas:i?.gas}):r.TransactionTypeNotSupportedError.nodeMessage.test(c)?new r.TransactionTypeNotSupportedError({cause:o}):r.TipAboveFeeCapError.nodeMessage.test(c)?new r.TipAboveFeeCapError({cause:o,maxFeePerGas:i?.maxFeePerGas,maxPriorityFeePerGas:i?.maxPriorityFeePerGas}):new r.UnknownNodeError({cause:o})}return Jn}var t1;function Zp(){if(t1)return za;t1=1,Object.defineProperty(za,"__esModule",{value:!0}),za.getEstimateGasError=t;const e=Kp(),r=Dt(),n=Co();function t(a,{docsPath:s,...o}){const i=(()=>{const c=(0,n.getNodeError)(a,o);return c instanceof r.UnknownNodeError?a:c})();return new e.EstimateGasExecutionError(i,{docsPath:s,...o})}return za}var Ua={},r1;function $r(){if(r1)return Ua;r1=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.extract=e;function e(r,{format:n}){if(!n)return{};const t={};function a(o){const i=Object.keys(o);for(const c of i)c in r&&(t[c]=r[c]),o[c]&&typeof o[c]=="object"&&!Array.isArray(o[c])&&a(o[c])}const s=n(r||{});return a(s),t}return Ua}var jd={},La={},n1;function xo(){if(n1)return La;n1=1,Object.defineProperty(La,"__esModule",{value:!0}),La.defineFormatter=e;function e(r,n){return({exclude:t,format:a})=>({exclude:t,format:(s,o)=>{const i=n(s,o);if(t)for(const c of t)delete i[c];return{...i,...a(s,o)}},type:r})}return La}var o1;function wt(){return o1||(o1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionRequest=e.rpcTransactionType=void 0,e.formatTransactionRequest=t;const r=te(),n=xo();e.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function t(s,o){const i={};return typeof s.authorizationList<"u"&&(i.authorizationList=a(s.authorizationList)),typeof s.accessList<"u"&&(i.accessList=s.accessList),typeof s.blobVersionedHashes<"u"&&(i.blobVersionedHashes=s.blobVersionedHashes),typeof s.blobs<"u"&&(typeof s.blobs[0]!="str
40ing"?i.blobs=s.blobs.map(c=>(0,r.bytesToHex)(c)):i.blobs=s.blobs),typeof s.data<"u"&&(i.data=s.data),typeof s.from<"u"&&(i.from=s.from),typeof s.gas<"u"&&(i.gas=(0,r.numberToHex)(s.gas)),typeof s.gasPrice<"u"&&(i.gasPrice=(0,r.numberToHex)(s.gasPrice)),typeof s.maxFeePerBlobGas<"u"&&(i.maxFeePerBlobGas=(0,r.numberToHex)(s.maxFeePerBlobGas)),typeof s.maxFeePerGas<"u"&&(i.maxFeePerGas=(0,r.numberToHex)(s.maxFeePerGas)),typeof s.maxPriorityFeePerGas<"u"&&(i.maxPriorityFeePerGas=(0,r.numberToHex)(s.maxPriorityFeePerGas)),typeof s.nonce<"u"&&(i.nonce=(0,r.numberToHex)(s.nonce)),typeof s.to<"u"&&(i.to=s.to),typeof s.type<"u"&&(i.type=e.rpcTransactionType[s.type]),typeof s.value<"u"&&(i.value=(0,r.numberToHex)(s.value)),i}e.defineTransactionRequest=(0,n.defineFormatter)("transactionRequest",t);function a(s){return s.map(o=>({address:o.address,r:o.r?(0,r.numberToHex)(BigInt(o.r)):o.r,s:o.s?(0,r.numberToHex)(BigInt(o.s)):o.s,chainId:(0,r.numberToHex)(o.chainId),nonce:(0,r.numberToHex)(o.nonce),...typeof o.yParity<"u"?{yParity:(0,r.numberToHex)(o.yParity)}:{},...typeof o.v<"u"&&typeof o.yParity>"u"?{v:(0,r.numberToHex)(o.v)}:{}}))}})(jd)),jd}var Qr={},a1;function Xd(){if(a1)return Qr;a1=1,Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.serializeStateMapping=s,Qr.serializeAccountStateOverride=o,Qr.serializeStateOverride=i;const e=ht(),r=_u(),n=Zd(),t=Ke(),a=te();function s(c){if(!(!c||c.length===0))return c.reduce((u,{slot:d,value:f})=>{if(d.length!==66)throw new r.InvalidBytesLengthError({size:d.length,targetSize:66,type:"hex"});if(f.length!==66)throw new r.InvalidBytesLengthError({size:f.length,targetSize:66,type:"hex"});return u[d]=f,u},{})}function o(c){const{balance:u,nonce:d,state:f,stateDiff:b,code:y}=c,h={};if(y!==void 0&&(h.code=y),u!==void 0&&(h.balance=(0,a.numberToHex)(u)),d!==void 0&&(h.nonce=(0,a.numberToHex)(d)),f!==void 0&&(h.state=s(f)),b!==void 0){if(h.state)throw new n.StateAssignmentConflictError;h.stateDiff=s(b)}return h}function i(c){if(!c)return;const u={};for(const{address:d,...f}of c){if(!(0,t.isAddress)(d,{strict:!1}))throw new e.InvalidAddressError({address:d});if(u[d])throw new n.AccountStateConflictError({address:d});u[d]=o(f)}return u}return Qr}var Da={},L={},i1;function Qd(){return i1||(i1=1,Object.defineProperty(L,"__esModule",{value:!0}),L.minInt144=L.minInt136=L.minInt128=L.minInt120=L.minInt112=L.minInt104=L.minInt96=L.minInt88=L.minInt80=L.minInt72=L.minInt64=L.minInt56=L.minInt48=L.minInt40=L.minInt32=L.minInt24=L.minInt16=L.minInt8=L.maxInt256=L.maxInt248=L.maxInt240=L.maxInt232=L.maxInt224=L.maxInt216=L.maxInt208=L.maxInt200=L.maxInt192=L.maxInt184=L.maxInt176=L.maxInt168=L.maxInt160=L.maxInt152=L.maxInt144=L.maxInt136=L.maxInt128=L.maxInt120=L.maxInt112=L.maxInt104=L.maxInt96=L.maxInt88=L.maxInt80=L.maxInt72=L.maxInt64=L.maxInt56=L.maxInt48=L.maxInt40=L.maxInt32=L.maxInt24=L.maxInt16=L.maxInt8=void 0,L.maxUint256=L.maxUint248=L.maxUint240=L.maxUint232=L.maxUint224=L.maxUint216=L.maxUint208=L.maxUint200=L.maxUint192=L.maxUint184=L.maxUint176=L.maxUint168=L.maxUint160=L.maxUint152=L.maxUint144=L.maxUint136=L.maxUint128=L.maxUint120=L.maxUint112=L.maxUint104=L.maxUint96=L.maxUint88=L.maxUint80=L.maxUint72=L.maxUint64=L.maxUint56=L.maxUint48=L.maxUint40=L.maxUint32=L.maxUint24=L.maxUint16=L.maxUint8=L.minInt256=L.minInt248=L.minInt240=L.minInt232=L.minInt224=L.minInt216=L.minInt208=L.minInt200=L.minInt192=L.minInt184=L.minInt176=L.minInt168=L.minInt160=L.minInt152=void 0,L.maxInt8=2n**(8n-1n)-1n,L.maxInt16=2n**(16n-1n)-1n,L.maxInt24=2n**(24n-1n)-1n,L.maxInt32=2n**(32n-1n)-1n,L.maxInt40=2n**(40n-1n)-1n,L.maxInt48=2n**(48n-1n)-1n,L.maxInt56=2n**(56n-1n)-1n,L.maxInt64=2n**(64n-1n)-1n,L.maxInt72=2n**(72n-1n)-1n,L.maxInt80=2n**(80n-1n)-1n,L.maxInt88=2n**(88n-1n)-1n,L.maxInt96=2n**(96n-1n)-1n,L.maxInt104=2n**(104n-1n)-1n,L.maxInt112=2n**(112n-1n)-1n,L.maxInt120=2n**(120n-1n)-1n,L.maxInt128=2n**(128n-1n)-1n,L.maxInt136=2n**(136n-1n)-1n,L.maxInt144=2n**(144n-1n)-1n,L.maxInt152=2n**(152n-1n)-1n,L.maxInt160=2n**(160n-1n)-1n,L.maxInt168=2n**(168n-1n)-1n,L.maxInt176=2n**(176n-1n)-1n,L.maxInt184=2n**(184n-1n)-1n,L.maxInt192=2n**(192n-1n)-1n,L.maxInt200=2n**(200n-1n)-1n,L.maxInt208=2n**(208n-1n)-1n,L.maxInt216=2n**(216n-1n)-1n,L.maxInt224=2n**(224n-1n)-1n,L.maxInt232=2n**(232n-1n)-1n,L.maxInt240=2n**(240n-1n)-1n,L.maxInt248=2n**(248n-1n)-1n,L.maxInt256=2n**(256n-1n)-1n,L.minInt8=-(2n**(8n-1n)),L.minInt16=-(2n**(16n-1n)),L.minInt24=-(2n**(24n-1n)),L.minInt32=-(2n**(32n-1n)),L.minInt40=-(2n**(40n-1n)),L.minInt48=-(2n**(48n-1n)),L.minInt56=-(2n**(56n-1n)),L.minInt64=-(2n**(64n-1n)),L.minInt72=-(2n**(72n-1n)),L.minInt80=-(2n**(80n-1n)),L.minInt88=-(2n**(88n-1n)),L.minInt96=-(2n**(96n-1n)),L.minInt104=-(2n**(104n-1n)),L.minInt112=-(2n**(112n-1n)),L.minInt120=-(2n**(120n-1n)),L.minInt128=-(2n**(128n-1n)),L.minInt136=-(2n**(136n-1n)),L.minInt144=-(2n**(144n-1n)),L.minInt152=-(2n**(152n-1n)),L.minInt160=-(2n**(160n-1n)),L.minInt168=-(2n**(168
40n-1n)),L.minInt176=-(2n**(176n-1n)),L.minInt184=-(2n**(184n-1n)),L.minInt192=-(2n**(192n-1n)),L.minInt200=-(2n**(200n-1n)),L.minInt208=-(2n**(208n-1n)),L.minInt216=-(2n**(216n-1n)),L.minInt224=-(2n**(224n-1n)),L.minInt232=-(2n**(232n-1n)),L.minInt240=-(2n**(240n-1n)),L.minInt248=-(2n**(248n-1n)),L.minInt256=-(2n**(256n-1n)),L.maxUint8=2n**8n-1n,L.maxUint16=2n**16n-1n,L.maxUint24=2n**24n-1n,L.maxUint32=2n**32n-1n,L.maxUint40=2n**40n-1n,L.maxUint48=2n**48n-1n,L.maxUint56=2n**56n-1n,L.maxUint64=2n**64n-1n,L.maxUint72=2n**72n-1n,L.maxUint80=2n**80n-1n,L.maxUint88=2n**88n-1n,L.maxUint96=2n**96n-1n,L.maxUint104=2n**104n-1n,L.maxUint112=2n**112n-1n,L.maxUint120=2n**120n-1n,L.maxUint128=2n**128n-1n,L.maxUint136=2n**136n-1n,L.maxUint144=2n**144n-1n,L.maxUint152=2n**152n-1n,L.maxUint160=2n**160n-1n,L.maxUint168=2n**168n-1n,L.maxUint176=2n**176n-1n,L.maxUint184=2n**184n-1n,L.maxUint192=2n**192n-1n,L.maxUint200=2n**200n-1n,L.maxUint208=2n**208n-1n,L.maxUint216=2n**216n-1n,L.maxUint224=2n**224n-1n,L.maxUint232=2n**232n-1n,L.maxUint240=2n**240n-1n,L.maxUint248=2n**248n-1n,L.maxUint256=2n**256n-1n),L}var s1;function Pt(){if(s1)return Da;s1=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.assertRequest=o;const e=Te(),r=Qd(),n=ht(),t=Dt(),a=Ue(),s=Ke();function o(i){const{account:c,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:f,to:b}=i,y=c?(0,e.parseAccount)(c):void 0;if(y&&!(0,s.isAddress)(y.address))throw new n.InvalidAddressError({address:y.address});if(b&&!(0,s.isAddress)(b))throw new n.InvalidAddressError({address:b});if(typeof u<"u"&&(typeof d<"u"||typeof f<"u"))throw new a.FeeConflictError;if(d&&d>r.maxUint256)throw new t.FeeCapTooHighError({maxFeePerGas:d});if(f&&d&&f>d)throw new t.TipAboveFeeCapError({maxFeePerGas:d,maxPriorityFeePerGas:f})}return Da}var wd={},Xn={},Ft={},c1;function Tu(){if(c1)return Ft;c1=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.MaxFeePerGasTooLowError=Ft.Eip1559FeesNotSupportedError=Ft.BaseFeeScalarError=void 0;const e=kr(),r=ce();
40class n extends r.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}Ft.BaseFeeScalarError=n;class t extends r.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}Ft.Eip1559FeesNotSupportedError=t;class a extends r.BaseError{constructor({maxPriorityFeePerGas:o}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,e.formatGwei)(o)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}return Ft.MaxFeePerGasTooLowError=a,Ft}var Qn={},Ga={},eo={},u1;function ef(){if(u1)return eo;u1=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.BlockNotFoundError=void 0;const e=ce();class r extends e.BaseError{constructor({blockHash:t,blockNumber:a}){let s="Block";t&&(s=`Block at hash "${t}"`),a&&(s=`Block at number "${a}"`),super(`${s} could not be found.`,{name:"BlockNotFoundError"})}}return eo.BlockNotFoundError=r,eo}var en={},Pd={},d1;function qo(){return d1||(d1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransaction=e.transactionType=void 0,e.formatTransaction=t;const r=Ae(),n=xo();e.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function t(s,o){const i={...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,chainId:s.chainId?(0,r.hexToNumber)(s.chainId):void 0,gas:s.gas?BigInt(s.gas):void 0,gasPrice:s.gasPrice?BigInt(s.gasPrice):void 0,maxFeePerBlobGas:s.maxFeePerBlobGas?BigInt(s.maxFeePerBlobGas):void 0,maxFeePerGas:s.maxFeePerGas?BigInt(s.maxFeePerGas):void 0,maxPriorityFeePerGas:s.maxPriorityFeePerGas?BigInt(s.maxPriorityFeePerGas):void 0,nonce:s.nonce?(0,r.hexToNumber)(s.nonce):void 0,to:s.to?s.to:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,type:s.type?e.transactionType[s.type]:void 0,typeHex:s.type?s.type:void 0,value:s.value?BigInt(s.value):void 0,v:s.v?BigInt(s.v):void 0};return s.authorizationList&&(i.authorizationList=a(s.authorizationList)),i.yParity=(()=>{if(s.yParity)return Number(s.yParity);if(typeof i.v=="bigint"){if(i.v===0n||i.v===27n)return 0;if(i.v===1n||i.v===28n)return 1;if(i.v>=35n)return i.v%2n===0n?1:0}})(),i.type==="legacy"&&(delete i.accessList,delete i.maxFeePerBlobGas,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas,delete i.yParity),i.type==="eip2930"&&(delete i.maxFeePerBlobGas,delete i.maxFeePerGas,delete i.maxPriorityFeePerGas),i.type==="eip1559"&&delete i.maxFeePerBlobGas,i}e.defineTransaction=(0,n.defineFormatter)("transaction",t);function a(s){return s.map(o=>({address:o.address,chainId:Number(o.chainId),nonce:Number(o.nonce),r:o.r,s:o.s,yParity:Number(o.yParity)}))}})(Pd)),Pd}var f1;function Iu(){if(f1)return en;f1=1,Object.defineProperty(en,"__esModule",{value:!0}),en.defineBlock=void 0,en.formatBlock=n;const e=xo(),r=qo();function n(t,a){const s=(t.transactions??[]).map(o=>typeof o=="string"?o:(0,r.formatTransaction)(o));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:s,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}return en.defineBlock=(0,e.defineFormatter)("block",n),en}var l1;function pn(){if(l1)return Ga;l1=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.getBlock=t;const e=ef(),r=te(),n=Iu();async function t(a,{blockHash:s,blockNumber:o,blockTag:i=a.experimental_blockTag??"latest",includeTransactions:c}={}){const u=c??!1,d=o!==void 0?(0,r.numberToHex)(o):void 0;let f=null;if(s?f=await a.request({method:"eth_getBlockByHash",params:[s,u]},{dedupe:!0}):f=await a.request({method:"eth_getBlockByNumber",params:[d||i,u]},{dedupe:!!d}),!f)throw new e.BlockNotFoundError({blockHash:s,blockNumber:o});return(a.chain?.formatters?.block?.format||n.formatBlock)(f,"getBlock")}return Ga}var Va={},b1;function tf(){if(b1)return Va;b1=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.getGasPrice=e;async function e(r){const n=await r.request({method:"eth_gasPrice"});return BigInt(n)}return Va}var m1;function Yp(){if(m1)return Qn;m1=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.estimateMaxPriorityFeePerGas=s,Qn.internal_estimateMaxPriorityFeePerGas=o;const e=Tu(),r=Ae(),n=be(),t=pn(),a=tf();async function s(i,c){return o(i,c)}async function o(i,c){const{block:u,chain:d=i.chain,request:f}=c||{};try{const b=d?.fees?.maxPriorityFeePerGas??d?.fees?.defaultPriorityFee;if(typeof b=="function"){const h=u||await(0,n.getAction)(i,t.getBlock,"getBlock")({}),m=await b({block:h,client:i,request:f});if(m===null)throw new Error;return m}if(typeof b<"u")return b;const y=await i.request({method:"eth_maxPriorityFeePerGas"});return(0,r.hexToBigInt)(y)}catch{const[b,y]=await Promise.all([u?Promise.resolve(u):(0,n.getAction)(i,t.getBlock,"getBlock")({}),(0,n.getAction)(i,a.getGasPrice,"getGasPrice")({})]);if(typeof b.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const h=y-b.baseFeePerGas;return h<0n?0n:h}}return Qn}var h1;function Jp(){if(h1)return Xn;h1=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.estimateFeesPerGas=s,Xn.internal_estimateFeesPerGas=o;const e=Tu(),r=be(),n=Yp(),t=pn(),a=tf();async function s(i,c){return o(i,c)}async function o(i,c){const{block:u,chain:d=i.chain,request:f,type:b="eip1559"}=c||{},y=await(async()=>typeof d?.fees?.baseFeeMultiplier=="function"?d.fees.baseFeeMultiplier({block:u,client:i,request:f}):d?.fees?.baseFeeMultiplier??1.2)();if(y<1)throw new e.BaseFeeScalarError;
40const m=10**(y.toString().split(".")[1]?.length??0),g=j=>j*BigInt(Math.ceil(y*m))/BigInt(m),p=u||await(0,r.getAction)(i,t.getBlock,"getBlock")({});if(typeof d?.fees?.estimateFeesPerGas=="function"){const j=await d.fees.estimateFeesPerGas({block:u,client:i,multiply:g,request:f,type:b});if(j!==null)return j}if(b==="eip1559"){if(typeof p.baseFeePerGas!="bigint")throw new e.Eip1559FeesNotSupportedError;const j=typeof f?.maxPriorityFeePerGas=="bigint"?f.maxPriorityFeePerGas:await(0,n.internal_estimateMaxPriorityFeePerGas)(i,{block:p,chain:d,request:f}),l=g(p.baseFeePerGas);return{maxFeePerGas:f?.maxFeePerGas??l+j,maxPriorityFeePerGas:j}}return{gasPrice:f?.gasPrice??g(await(0,r.getAction)(i,a.getGasPrice,"getGasPrice")({}))}}return Xn}var Wa={},y1;function Su(){if(y1)return Wa;y1=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.getTransactionCount=n;const e=Ae(),r=te();async function n(t,{address:a,blockTag:s="latest",blockNumber:o}){const i=await t.request({method:"eth_getTransactionCount",params:[a,typeof o=="bigint"?(0,r.numberToHex)(o):s]},{dedupe:!!o});return(0,e.hexToNumber)(i)}return Wa}var Ka={},p1;function Ru(){if(p1)return Ka;p1=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.blobsToCommitments=n;const e=pe(),r=te();function n(t){const{kzg:a}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),o=typeof t.blobs[0]=="string"?t.blobs.map(c=>(0,e.hexToBytes)(c)):t.blobs,i=[];for(const c of o)i.push(Uint8Array.from(a.blobToKzgCommitment(c)));return s==="bytes"?i:i.map(c=>(0,r.bytesToHex)(c))}return Ka}var Za={},g1;function Bu(){if(g1)return Za;g1=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.blobsToProofs=n;const e=pe(),r=te();function n(t){const{kzg:a}=t,s=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),o=typeof t.blobs[0]=="string"?t.blobs.map(u=>(0,e.hexToBytes)(u)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(u=>(0,e.hexToBytes)(u)):t.commitments,c=[];for(let u=0;u<o.length;u++){const d=o[u],f=i[u];c.push(Uint8Array.from(a.computeBlobKzgProof(d,f)))}return s==="bytes"?c:c.map(u=>(0,r.bytesToHex)(u))}return Za}var Ya={},Ja={},Xa={},dt={},_1;function Xp(){if(_1)return dt;
40_1=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.sha224=dt.SHA224=dt.sha256=dt.SHA256=void 0;const e=Gp();return dt.SHA256=e.SHA256,dt.sha256=e.sha256,dt.SHA224=e.SHA224,dt.sha224=e.sha224,dt}var v1;function rf(){if(v1)return Xa;v1=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.sha256=a;const e=Xp(),r=ze(),n=pe(),t=te();function a(s,o){const i=o||"hex",c=(0,e.sha256)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return i==="bytes"?c:(0,t.toHex)(c)}return Xa}var E1;function nf(){if(E1)return Ja;E1=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.commitmentToVersionedHash=n;const e=te(),r=rf();function n(t){const{commitment:a,version:s=1}=t,o=t.to??(typeof a=="string"?"hex":"bytes"),i=(0,r.sha256)(a,"bytes");return i.set([s],0),o==="bytes"?i:(0,e.bytesToHex)(i)}return Ja}var j1;function of(){if(j1)return Ya;j1=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.commitmentsToVersionedHashes=r;const e=nf();function r(n){const{commitments:t,version:a}=n,s=n.to??(typeof t[0]=="string"?"hex":"bytes"),o=[];for(const i of t)o.push((0,e.commitmentToVersionedHash)({commitment:i,to:s,version:a}));return o}return Ya}var Qa={},ei={},Ad={},w1;function Tv(){return w1||(w1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxBytesPerTransaction=e.bytesPerBlob=e.fieldElementsPerBlob=e.bytesPerFieldElement=void 0;const r=6;e.bytesPerFieldElement=32,e.fieldElementsPerBlob=4096,e.bytesPerBlob=e.bytesPerFieldElement*e.fieldElementsPerBlob,e.maxBytesPerTransaction=e.bytesPerBlob*r-1-1*e.fieldElementsPerBlob*r})(Ad)),Ad}var ft={},to={},P1;function Qp(){return P1||(P1=1,Object.defineProperty(to,"__esModule",{value:!0}),to.versionedHashVersionKzg=void 0,to.versionedHashVersionKzg=1),to}var A1;function eg(){if(A1)return ft;A1=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.InvalidVersionedHashVersionError=ft.InvalidVersionedHashSizeError=ft.EmptyBlobError=ft.BlobSizeTooLargeError=void 0;const e=Qp(),r=ce();
40class n extends r.BaseError{constructor({maxSize:i,size:c}){super("Blob size is too large.",{metaMessages:[`Max: ${i} bytes`,`Given: ${c} bytes`],name:"BlobSizeTooLargeError"})}}ft.BlobSizeTooLargeError=n;class t extends r.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}ft.EmptyBlobError=t;class a extends r.BaseError{constructor({hash:i,size:c}){super(`Versioned hash "${i}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${c}`],name:"InvalidVersionedHashSizeError"})}}ft.InvalidVersionedHashSizeError=a;class s extends r.BaseError{constructor({hash:i,version:c}){super(`Versioned hash "${i}" version is invalid.`,{metaMessages:[`Expected: ${e.versionedHashVersionKzg}`,`Received: ${c}`],name:"InvalidVersionedHashVersionError"})}}return ft.InvalidVersionedHashVersionError=s,ft}var T1;function tg(){if(T1)return ei;T1=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.toBlobs=o;const e=Tv(),r=eg(),n=Io(),t=Ve(),a=pe(),s=te();function o(i){const c=i.to??(typeof i.data=="string"?"hex":"bytes"),u=typeof i.data=="str
40ing"?(0,a.hexToBytes)(i.data):i.data,d=(0,t.size)(u);if(!d)throw new r.EmptyBlobError;if(d>e.maxBytesPerTransaction)throw new r.BlobSizeTooLargeError({maxSize:e.maxBytesPerTransaction,size:d});const f=[];let b=!0,y=0;for(;b;){const h=(0,n.createCursor)(new Uint8Array(e.bytesPerBlob));let m=0;for(;m<e.fieldElementsPerBlob;){const g=u.slice(y,y+(e.bytesPerFieldElement-1));if(h.pushByte(0),h.pushBytes(g),g.length<31){h.pushByte(128),b=!1;break}m++,y+=31}f.push(h)}return c==="bytes"?f.map(h=>h.bytes):f.map(h=>(0,s.bytesToHex)(h.bytes))}return ei}var I1;function Ou(){if(I1)return Qa;I1=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.toBlobSidecars=t;const e=Ru(),r=Bu(),n=tg();function t(a){const{data:s,kzg:o,to:i}=a,c=a.blobs??(0,n.toBlobs)({data:s,to:i}),u=a.commitments??(0,e.blobsToCommitments)({blobs:c,kzg:o,to:i}),d=a.proofs??(0,r.blobsToProofs)({blobs:c,commitments:u,kzg:o,to:i}),f=[];for(let b=0;b<c.length;b++)f.push({blob:c[b],commitment:u[b],proof:d[b]});return f}return Qa}var ti={},S1;function Cu(){if(S1)return ti;S1=1,Object.defineProperty(ti,"__esModule",{value:!0}),ti.getTransactionType=r;const e=Ue();function r(n){if(n.type)return n.type;if(typeof n.authorizationList<"u")return"eip7702";if(typeof n.blobs<"u"||typeof n.blobVersionedHashes<"u"||typeof n.maxFeePerBlobGas<"u"||typeof n.sidecars<"u")return"eip4844";if(typeof n.maxFeePerGas<"u"||typeof n.maxPriorityFeePerGas<"u")return"eip1559";if(typeof n.gasPrice<"u")return typeof n.accessList<"u"?"eip2930":"legacy";throw new e.InvalidSerializableTransactionError({transaction:n})}return ti}var ri={},R1;function zr(){if(R1)return ri;R1=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.getChainId=r;const e=Ae();async function r(n){const t=await n.request({method:"eth_chainId"},{dedupe:!0});return(0,e.hexToNumber)(t)}return ri}var B1;function Mo(){return B1||(B1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.eip1559NetworkCache=e.defaultParameters=void 0,e.prepareTransactionRequest=m;const r=Te(),n=Jp(),t=af(),a=pn(),s=Su(),o=Tu(),i=Ru(),c=Bu(),u=of(),d=Ou(),f=be(),b=Pt(),y=Cu(),h=zr();e.defaultParameters=["blobVersionedHashes","chainId","fees","gas","nonce","type"],e.eip1559NetworkCache=new Map;async function m(g,p){const{account:v=g.account,blobs:j,chain:l,gas:w,kzg:E,nonce:_,nonceManager:I,parameters:S=e.defaultParameters,type:R}=p,x=v&&(0,r.parseAccount)(v),T={...p,...x?{from:x?.address}:{}};let A;async function C(){return A||(A=await(0,f.getAction)(g,a.getBlock,"getBlock")({blockTag:"latest"}),A)}let k;async function B(){return k||(l?l.id:typeof p.chainId<"u"?p.chainId:(k=await(0,f.getAction)(g,h.getChainId,"getChainId")({}),k))}if(S.includes("nonce")&&typeof _>"u"&&x)if(I){const P=await B();T.nonce=await I.consume({address:x.address,chainId:P,client:g})}else T.nonce=await(0,f.getAction)(g,s.getTransactionCount,"getTransactionCount")({address:x.address,blockTag:"pending"});if((S.includes("blobVersionedHashes")||S.includes("sidecars"))&&j&&E){const P=(0,i.blobsToCommitments)({blobs:j,kzg:E});if(S.includes("blobVersionedHashes")){const q=(0,u.commitmentsToVersionedHashes)({commitments:P,to:"hex"});T.blobVersionedHashes=q}if(S.includes("sidecars")){const q=(0,c.blobsToProofs)({blobs:j,commitments:P,kzg:E}),F=(0,d.toBlobSidecars)({blobs:j,commitments:P,proofs:q,to:"hex"});T.sidecars=F}}if(S.includes("chainId")&&(T.chainId=await B()),(S.includes("fees")||S.includes("type"))&&typeof R>"u")try{T.type=(0,y.getTransactionType)(T)}catch{let P=e.eip1559NetworkCache.get(g.uid);typeof P>"u"&&(P=typeof(await C())?.baseFeePerGas=="bigint",e.eip1559NetworkCache.set(g.uid,P)),T.type=P?"eip1559":"legacy"}if(S.includes("fees"))if(T.type!=="legacy"&&T.type!=="eip2930"){if(typeof T.maxFeePerGas>"u"||typeof T.maxPriorityFeePerGas>"u"){const P=await C(),{maxFeePerGas:q,maxPriorityFeePerGas:F}=await(0,n.internal_estimateFeesPerGas)(g,{block:P,chain:l,request:T});if(typeof p.maxPriorityFeePerGas>"u"&&p.maxFeePerGas&&p.maxFeePerGas<F)throw new o.MaxFeePerGasTooLowError({maxPriorityFeePerGas:F});T.maxPriorityFeePerGas=F,T.maxFeePerGas=q}}else{if(typeof p.maxFeePerGas<"u"||typeof p.maxPriorityFeePerGas<"u")throw new o.Eip1559FeesNotSupportedError;if(typeof p.gasPrice>"u"){const P=await C(),{gasPrice:q}=await(0,n.internal_estimateFeesPerGas)(g,{block:P,chain:l,request:T,type:"legacy"});T.gasPrice=q}}return S.includes("gas")&&typeof w>"u"&&(T.gas=await(0,f.getAction)(g,t.estimateGas,"estimateGas")({...T,account:x&&{address:x.address,type:"json-rpc"}})),(0,b.assertRequest)(T),delete T.parameters,T}})(wd)),wd}var O1;function af(){if(O1)return Ma;O1=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.estimateGas=d;
40const e=Te(),r=ce(),n=Oo(),t=te(),a=Zp(),s=$r(),o=wt(),i=Xd(),c=Pt(),u=Mo();async function d(f,b){const{account:y=f.account}=b,h=y?(0,e.parseAccount)(y):void 0;try{const{accessList:m,authorizationList:g,blobs:p,blobVersionedHashes:v,blockNumber:j,blockTag:l,data:w,gas:E,gasPrice:_,maxFeePerBlobGas:I,maxFeePerGas:S,maxPriorityFeePerGas:R,nonce:x,value:T,stateOverride:A,...C}=await(0,u.prepareTransactionRequest)(f,{...b,parameters:h?.type==="local"?void 0:["blobVersionedHashes"]}),B=(typeof j=="bigint"?(0,t.numberToHex)(j):void 0)||l,P=(0,i.serializeStateOverride)(A),q=await(async()=>{if(C.to)return C.to;if(g&&g.length>0)return await(0,n.recoverAuthorizationAddress)({authorization:g[0]}).catch(()=>{throw new r.BaseError("`to` is required. Could not infer from `authorizationList`")})})();(0,c.assertRequest)(b);const F=f.chain?.formatters?.transactionRequest?.format,O=(F||o.formatTransactionRequest)({...(0,s.extract)(C,{format:F}),from:h?.address,accessList:m,authorizationList:g,blobs:p,blobVersionedHashes:v,data:w,gas:E,gasPrice:_,maxFeePerBlobGas:I,maxFeePerGas:S,maxPriorityFeePerGas:R,nonce:x,to:q,value:T},"estimateGas");return BigInt(await f.request({method:"eth_estimateGas",params:P?[O,B??f.experimental_blockTag??"latest",P]:B?[O,B]:[O]}))}catch(m){throw(0,a.getEstimateGasError)(m,{...b,account:h,chain:f.chain})}}return Ma}var C1;function rg(){if(C1)return wa;C1=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.estimateContractGas=s;const e=Te(),r=Ze(),n=ir(),t=be(),a=af();async function s(o,i){const{abi:c,address:u,args:d,functionName:f,dataSuffix:b,...y}=i,h=(0,r.encodeFunctionData)({abi:c,args:d,functionName:f});try{return await(0,t.getAction)(o,a.estimateGas,"estimateGas")({data:`${h}${b?b.replace("0x",""):""}`,to:u,...y})}catch(m){const g=y.account?(0,e.parseAccount)(y.account):void 0;throw(0,n.getContractError)(m,{abi:c,address:u,args:d,docsPath:"/docs/contract/estimateContractGas",functionName:f,sender:g?.address})}}return wa}var ni={},oi={},ai={},ii={},x1;function gt(){if(x1)return ii;x1=1,Object.defineProperty(ii,"__esModule",{value:!0}),ii.isAddressEqual=n;const e=ht(),r=Ke();function n(t,a){if(!(0,r.isAddress)(t,{strict:!1}))throw new e.InvalidAddressError({address:t});if(!(0,r.isAddress)(a,{strict:!1}))throw new e.InvalidAddressError({address:a});return t.toLowerCase()===a.toLowerCase()}return ii}var si={},q1;function Ho(){if(q1)return si;q1=1,Object.defineProperty(si,"__esModule",{value:!0}),si.decodeEventLog=i;const e=Ee(),r=zp(),n=Ve(),t=hn(),a=nr(),s=zt(),o="/docs/contract/decodeEventLog";function i(u){const{abi:d,data:f,strict:b,topics:y}=u,h=b??!0,[m,...g]=y;if(!m)throw new e.AbiEventSignatureEmptyTopicsError({docsPath:o});const p=d.find(I=>I.type==="event"&&m===(0,t.toEventSelector)((0,s.formatAbiItem)(I)));if(!(p&&"name"in p)||p.type!=="event")throw new e.AbiEventSignatureNotFoundError(m,{docsPath:o});const{name:v,inputs:j}=p,l=j?.some(I=>!("name"in I&&I.name)),w=l?[]:{},E=j.map((I,S)=>[I,S]).filter(([I])=>"indexed"in I&&I.indexed);for(let I=0;I<E.length;I++){const[S,R]=E[I],x=g[I];if(!x)throw new e.DecodeLogTopicsMismatch({abiItem:p,param:S});w[l?R:S.name||R]=c({param:S,value:x})}const _=j.filter(I=>!("indexed"in I&&I.indexed));if(_.length>0){if(f&&f!=="0x")try{const I=(0,a.decodeAbiParameters)(_,f);if(I)if(l)for(let S=0;S<j.length;S++)w[S]=w[S]??I.shift();else for(let S=0;S<_.length;S++)w[_[S].name]=I[S]}catch(I){if(h)throw I instanceof e.AbiDecodingDataSizeTooSmallError||I instanceof r.PositionOutOfBoundsError?new e.DecodeLogDataMismatch({abiItem:p,data:f,params:_,size:(0,n.size)(f)}):I}else if(h)throw new e.DecodeLogDataMismatch({abiItem:p,data:"0x",params:_,size:0})}return{eventName:v,args:Object.values(w).length>0?w:void 0}}function c({param:u,value:d}){return u.type==="string"||u.type==="bytes"||u.type==="tuple"||u.type.match(/^(.*)\[(\d+)?\]$/)?d:((0,a.decodeAbiParameters)([u],d)||[])[0]}return si}var M1;function ko(){if(M1)return ai;M1=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.parseEventLogs=o;const e=Ee(),r=gt(),n=pe(),t=We(),a=hn(),s=Ho();function o(c){const{abi:u,args:d,logs:f,strict:b=!0}=c,y=(()=>
40{if(c.eventName)return Array.isArray(c.eventName)?c.eventName:[c.eventName]})();return f.map(h=>{try{const m=u.find(p=>p.type==="event"&&h.topics[0]===(0,a.toEventSelector)(p));if(!m)return null;const g=(0,s.decodeEventLog)({...h,abi:[m],strict:b});return y&&!y.includes(g.eventName)||!i({args:g.args,inputs:m.inputs,matchArgs:d})?null:{...g,...h}}catch(m){let g,p;if(m instanceof e.AbiEventSignatureNotFoundError)return null;if(m instanceof e.DecodeLogDataMismatch||m instanceof e.DecodeLogTopicsMismatch){if(b)return null;g=m.abiItem.name,p=m.abiItem.inputs?.some(v=>!("name"in v&&v.name))}return{...h,args:p?[]:{},eventName:g}}}).filter(Boolean)}function i(c){const{args:u,inputs:d,matchArgs:f}=c;if(!f)return!0;if(!u)return!1;function b(y,h,m){try{return y.type==="address"?(0,r.isAddressEqual)(h,m):y.type==="string"||y.type==="bytes"?(0,t.keccak256)((0,n.toBytes)(h))===m:h===m}catch{return!1}}return Array.isArray(u)&&Array.isArray(f)?f.every((y,h)=>{if(y==null)return!0;const m=d[h];return m?(Array.isArray(y)?y:[y]).some(p=>b(m,p,u[h])):!1}):typeof u=="object"&&!Array.isArray(u)&&typeof f=="object"&&!Array.isArray(f)?Object.entries(f).every(([y,h])=>{if(h==null)return!0;const m=d.find(p=>p.name===y);return m?(Array.isArray(h)?h:[h]).some(p=>b(m,p,u[y])):!1}):!1}return ai}var ci={},H1;function Gt(){if(H1)return ci;H1=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.formatLog=e;function e(r,{args:n,eventName:t}={}){return{...r,blockHash:r.blockHash?r.blockHash:null,blockNumber:r.blockNumber?BigInt(r.blockNumber):null,logIndex:r.logIndex?Number(r.logIndex):null,transactionHash:r.transactionHash?r.transactionHash:null,transactionIndex:r.transactionIndex?Number(r.transactionIndex):null,...t?{args:n,eventName:t}:{}}}return ci}var k1;function sf(){if(k1)return oi;k1=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.getLogs=a;const e=Hr(),r=ko(),n=te(),t=Gt();async function a(s,{address:o,blockHash:i,fromBlock:c,toBlock:u,event:d,events:f,args:b,strict:y}={}){const h=y??!1,m=f??(d?[d]:void 0);let g=[];m&&(g=[m.flatMap(l=>(0,e.encodeEventTopics)({abi:[l],eventName:l.name,args:f?void 0:b}))],d&&(g=g[0]));let p;i?p=await s.request({method:"eth_getLogs",params:[{address:o,topics:g,blockHash:i}]}):p=await s.request({method:"eth_getLogs",params:[{address:o,topics:g,fromBlock:typeof c=="bigint"?(0,n.numberToHex)(c):c,toBlock:typeof u=="bigint"?(0,n.numberToHex)(u):u}]});const v=p.map(j=>(0,t.formatLog)(j));return m?(0,r.parseEventLogs)({abi:m,args:b,logs:v,strict:h}):v}return oi}var F1;function cf(){if(F1)return ni;F1=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.getContractEvents=t;const e=Lt(),r=be(),n=sf();async function t(a,s){const{abi:o,address:i,args:c,blockHash:u,eventName:d,fromBlock:f,toBlock:b,strict:y}=s,h=d?(0,e.getAbiItem)({abi:o,name:d}):void 0,m=h?void 0:o.filter(g=>g.type==="event");return(0,r.getAction)(a,n.getLogs,"getLogs")({address:i,args:c,blockHash:u,event:h,events:m,fromBlock:f,toBlock:b,strict:y})}return ni}var ui={},di={},N1;function Vt(){if(N1)return di;N1=1,Object.defineProperty(di,"__esModule",{value:!0}),di.decodeFunctionResult=a;const e=Ee(),r=nr(),n=Lt(),t="/docs/contract/decodeFunctionResult";function a(s){const{abi:o,args:i,functionName:c,data:u}=s;let d=o[0];if(c){const b=(0,n.getAbiItem)({abi:o,args:i,name:c});if(!b)throw new e.AbiFunctionNotFoundError(c,{docsPath:t});d=b}if(d.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!d.outputs)throw new e.AbiFunctionOutputsNotFoundError(d.name,{docsPath:t});const f=(0,r.decodeAbiParameters)(d.outputs,u);if(f&&f.length>1)return f;if(f&&f.length===1)return f[0]}return di}var ro={},no={},ue={},de={},oo={},tn={},ao={},$1;function Iv(){return $1||($1=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.version=void 0,ao.version="0.1.1"),ao}var z1;function Sv(){if(z1)return tn;z1=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.getUrl=r,tn.getVersion=n,tn.prettyPrint=t;const e=Iv();function r(a){return a}function n(){return e.version}function t(a){if(!a)return"";const s=Object.entries(a).map(([i,c])=>
40c===void 0||c===!1?null:[i,c]).filter(Boolean),o=s.reduce((i,[c])=>Math.max(i,c.length),0);return s.map(([i,c])=>` ${`${i}:`.padEnd(o+1)} ${c}`).join(` 41`)}return tn}var U1;function nt(){if(U1)return oo;U1=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.BaseError=void 0;const e=Sv();class r extends Error{constructor(a,s={}){const o=(()=>{if(s.cause instanceof r){if(s.cause.details)return s.cause.details;if(s.cause.shortMessage)return s.cause.shortMessage}return s.cause&&"details"in s.cause&&typeof s.cause.details=="string"?s.cause.details:s.cause?.message?s.cause.message:s.details})(),i=s.cause instanceof r&&s.cause.docsPath||s.docsPath,u=`https://oxlib.sh${i??""}`,d=[a||"An error occurred.",...s.metaMessages?["",...s.metaMessages]:[],...o||i?["",o?`Details: ${o}`:void 0,i?`See: ${u}`:void 0]:[]].filter(f=>typeof f=="string").join(` 42`);super(d,s.cause?{cause:s.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{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,"shortMessage",{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,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${(0,e.getVersion)()}`}),this.cause=s.cause,this.details=o,this.docs=u,this.docsPath=i,this.shortMessage=a}walk(a){return n(this,a)}}oo.BaseError=r;function n(t,a){return a?.(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?n(t.cause,a):a?null:t}return oo}var Td={},L1;function ng(){return L1||(L1=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeMap=void 0,e.assertSize=n,e.assertStartOffset=t,e.assertEndOffset=a,e.charCodeToBase16=s,e.pad=o,e.trim=i;const r=At();function n(c,u){if(r.size(c)>u)throw new r.SizeOverflowError({givenSize:r.size(c),maxSize:u})}function t(c,u){if(typeof u=="number"&&u>0&&u>r.size(c)-1)throw new r.SliceOffsetOutOfBoundsError({offset:u,position:"start",size:r.size(c)})}function a(c,u,d){if(typeof u=="number"&&typeof d=="number"&&r.size(c)!==d-u)throw new r.SliceOffsetOutOfBoundsError({offset:d,position:"end",size:r.size(c)})}e.charCodeMap={zero:48,nine:57,A:65,F:70,a:97,f:102};function s(c){if(c>=e.charCodeMap.zero&&c<=e.charCodeMap.nine)return c-e.charCodeMap.zero;if(c>=e.charCodeMap.A&&c<=e.charCodeMap.F)return c-(e.charCodeMap.A-10);if(c>=e.charCodeMap.a&&c<=e.charCodeMap.f)return c-(e.charCodeMap.a-10)}function o(c,u={}){const{dir:d,size:f=32}=u;if(f===0)return c;if(c.length>f)throw new r.SizeExceedsPaddingSizeError({size:c.length,targetSize:f,type:"Bytes"});const b=new Uint8Array(f);for(let y=0;y<f;y++){const h=d==="right";b[h?y:f-y-1]=c[h?y:c.length-y-1]}return b}function i(c,u={}){const{dir:d="left"}=u;let f=c,b=0;for(let y=0;y<f.length-1&&f[d==="left"?y:f.length-y-1].toString()==="0";y++)b++;return f=d==="left"?f.slice(b):f.slice(0,f.length-b),f}})(Td)),Td}var Xt={},D1;function og(){if(D1)return Xt;D1=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.assertSize=r,Xt.assertStartOffset=n,Xt.assertEndOffset=t,Xt.pad=a,Xt.trim=s;const e=Me();function r(o,i){if(e.size(o)>i)throw new e.SizeOverflowError({givenSize:e.size(o),maxSize:i})}function n(o,i){if(typeof i=="number"&&i>0&&i>e.size(o)-1)throw new e.SliceOffsetOutOfBoundsError({offset:i,position:"start",size:e.size(o)})}function t(o,i,c){if(typeof i=="number"&&typeof c=="number"&&e.size(o)!==c-i)throw new e.SliceOffsetOutOfBoundsError({offset:c,position:"end",size:e.size(o)})}function a(o,i={}){const{dir:c,size:u=32}=i;if(u===0)return o;const d=o.replace("0x","");if(d.length>u*2)throw new e.SizeExceedsPaddingSizeError({size:Math.ceil(d.length/2),targetSize:u,type:"Hex"});return`0x${d[c==="right"?"padEnd":"padStart"](u*2,"0")}`}function s(o,i={}){const{dir:c="left"}=i;let u=o.replace("0x",""),d=0;for(let f=0;f<u.length-1&&u[c==="left"?f:u.length-f-1].toString()==="0";f++)d++;return u=c==="left"?u.slice(d):u.slice(0,u.length-d),u==="0"?"0x":c==="right"&&u.length%2===1?`0x${u}0`:`0x${u}`}return Xt}var io={},G1;function xu(){if(G1)return io;G1=1,Object.defineProperty(io,"__esModule",{value:!0}),io.parse=r,io.stringify=n;const e="#__bigint";function r(t,a){return JSON.parse(t,(s,o)=>{const i=o;return typeof i=="string"&&i.endsWith(e)?BigInt(i.slice(0,-e.length)):typeof a=="function"?a(s,i):i})}function n(t,a,s){return JSON.stringify(t,(o,i)=>typeof a=="function"?a(o,i):typeof i=="bigint"?i.toString()+e:i,s)}return io}var V1;
42function At(){if(V1)return de;V1=1,Object.defineProperty(de,"__esModule",{value:!0}),de.SizeExceedsPaddingSizeError=de.SliceOffsetOutOfBoundsError=de.SizeOverflowError=de.InvalidBytesTypeError=de.InvalidBytesBooleanError=void 0,de.assert=c,de.concat=u,de.from=d,de.fromArray=f,de.fromBoolean=b,de.fromHex=y,de.fromNumber=h,de.fromString=m,de.isEqual=g,de.padLeft=p,de.padRight=v,de.random=j,de.size=l,de.slice=w,de.toBigInt=E,de.toBoolean=_,de.toHex=I,de.toNumber=S,de.toString=R,de.trimLeft=x,de.trimRight=T,de.validate=A;const e=Fr(),r=nt(),n=Me(),t=ng(),a=og(),s=xu(),o=new TextDecoder,i=new TextEncoder;function c(F){if(!(F instanceof Uint8Array)){if(!F)throw new k(F);if(typeof F!="object")throw new k(F);if(!("BYTES_PER_ELEMENT"in F))throw new k(F);if(F.BYTES_PER_ELEMENT!==1||F.constructor.name!=="Uint8Array")throw new k(F)}}function u(...F){let M=0;for(const H of F)M+=H.length;const O=new Uint8Array(M);for(let H=0,N=0;H<F.length;H++){const z=F[H];O.set(z,N),N+=z.length}return O}function d(F){return F instanceof Uint8Array?F:typeof F=="string"?y(F):f(F)}function f(F){return F instanceof Uint8Array?F:new Uint8Array(F)}function b(F,M={}){const{size:O}=M,H=new Uint8Array(1);return H[0]=Number(F),typeof O=="number"?(t.assertSize(H,O),p(H,O)):H}function y(F,M={}){const{size:O}=M;let H=F;O&&(a.assertSize(F,O),H=n.padRight(F,O));let N=H.slice(2);N.length%2&&(N=`0${N}`);const z=N.length/2,$=new Uint8Array(z);for(let D=0,G=0;D<z;D++){const Y=t.charCodeToBase16(N.charCodeAt(G++)),Z=t.charCodeToBase16(N.charCodeAt(G++));if(Y===void 0||Z===void 0)throw new r.BaseError(`Invalid byte sequence ("${N[G-2]}${N[G-1]}" in "${N}").`);$[D]=Y*16+Z}return $}function h(F,M){const O=n.fromNumber(F,M);return y(O)}function m(F,M={}){const{size:O}=M,H=i.encode(F);return typeof O=="number"?(t.assertSize(H,O),v(H,O)):H}function g(F,M){return(0,e.equalBytes)(F,M)}function p(F,M){return t.pad(F,{dir:"left",size:M})}function v(F,M){return t.pad(F,{dir:"right",size:M})}function j(F){return crypto.getRandomValues(new Uint8Array(F))}function l(F){return F.length}function w(F,M,O,H={}){const{strict:N}=H;t.assertStartOffset(F,M);const z=F.slice(M,O);return N&&t.assertEndOffset(z,M,O),z}function E(F,M={}){const{size:O}=M;typeof O<"u"&&t.assertSize(F,O);const H=n.fromBytes(F,M);return n.toBigInt(H,M)}function _(F,M={}){const{size:O}=M;let H=F;if(typeof O<"u"&&(t.assertSize(H,O),H=x(H)),H.length>1||H[0]>1)throw new C(H);return!!H[0]}function I(F,M={}){return n.fromBytes(F,M)}function S(F,M={}){const{size:O}=M;typeof O<"u"&&t.assertSize(F,O);const H=n.fromBytes(F,M);return n.toNumber(H,M)}function R(F,M={}){const{size:O}=M;let H=F;return typeof O<"u"&&(t.assertSize(H,O),H=T(H)),o.decode(H)}function x(F){return t.trim(F,{dir:"left"})}function T(F){return t.trim(F,{dir:"right"})}function A(F){try{return c(F),!0}catch{return!1}}class C extends r.BaseError{constructor(M){super(`Bytes value \`${M}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}}de.InvalidBytesBooleanError=C;class k extends r.BaseError{constructor(M){super(`Value \`${typeof M=="object"?s.stringify(M):M}\` of type \`${typeof M}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}de.InvalidBytesTypeError=k;class B extends r.BaseError{constructor({givenSize:M,maxSize:O}){super(`Size cannot exceed \`${O}\` bytes. Given size: \`${M}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}de.SizeOverflowError=B;class P extends r.BaseError{constructor({offset:M,position:O,size:H}){super(`Slice ${O==="start"?"starting":"ending"} at offset \`${M}\` is out-of-bounds (size: \`${H}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}de.SliceOffsetOutOfBoundsError=P;class q extends r.BaseError{constructor({size:M,targetSize:O,type:H}){super(`${H.charAt(0).toUpperCase()}${H.slice(1).toLowerCase()} size (\`${M}\`) exceeds padding size (\`${O}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}return de.SizeExceedsPaddingSizeError=q,de}var W1;function Me(){if(W1)return ue;
42W1=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.SizeExceedsPaddingSizeError=ue.SliceOffsetOutOfBoundsError=ue.SizeOverflowError=ue.InvalidLengthError=ue.InvalidHexValueError=ue.InvalidHexTypeError=ue.InvalidHexBooleanError=ue.IntegerOutOfRangeError=void 0,ue.assert=c,ue.concat=u,ue.from=d,ue.fromBoolean=f,ue.fromBytes=b,ue.fromNumber=y,ue.fromString=h,ue.isEqual=m,ue.padLeft=g,ue.padRight=p,ue.random=v,ue.slice=j,ue.size=l,ue.trimLeft=w,ue.trimRight=E,ue.toBigInt=_,ue.toBoolean=I,ue.toBytes=S,ue.toNumber=R,ue.toString=x,ue.validate=T;const e=Fr(),r=At(),n=nt(),t=ng(),a=og(),s=xu(),o=new TextEncoder,i=Array.from({length:256},(O,H)=>H.toString(16).padStart(2,"0"));function c(O,H={}){const{strict:N=!1}=H;if(!O)throw new k(O);if(typeof O!="string")throw new k(O);if(N&&!/^0x[0-9a-fA-F]*$/.test(O))throw new B(O);if(!O.startsWith("0x"))throw new B(O)}function u(...O){return`0x${O.reduce((H,N)=>H+N.replace("0x",""),"")}`}function d(O){return O instanceof Uint8Array?b(O):Array.isArray(O)?b(new Uint8Array(O)):O}function f(O,H={}){const N=`0x${Number(O)}`;return typeof H.size=="number"?(a.assertSize(N,H.size),g(N,H.size)):N}function b(O,H={}){let N="";for(let $=0;$<O.length;$++)N+=i[O[$]];const z=`0x${N}`;return typeof H.size=="number"?(a.assertSize(z,H.size),p(z,H.size)):z}function y(O,H={}){const{signed:N,size:z}=H,$=BigInt(O);let D;z?N?D=(1n<<BigInt(z)*8n-1n)-1n:D=2n**(BigInt(z)*8n)-1n:typeof O=="number"&&(D=BigInt(Number.MAX_SAFE_INTEGER));const G=typeof D=="bigint"&&N?-D-1n:0;if(D&&$>D||$<G){const W=typeof O=="bigint"?"n":"";throw new A({max:D?`${D}${W}`:void 0,min:`${G}${W}`,signed:N,size:z,value:`${O}${W}`})}const Z=`0x${(N&&$<0?(1n<<BigInt(z*8))+BigInt($):$).toString(16)}`;return z?g(Z,z):Z}function h(O,H={}){return b(o.encode(O),H)}function m(O,H){return(0,e.equalBytes)(r.fromHex(O),r.fromHex(H))}function g(O,H){return a.pad(O,{dir:"left",size:H})}function p(O,H){return a.pad(O,{dir:"right",size:H})}function v(O){return b(r.random(O))}function j(O,H,N,z={}){const{strict:$}=z;a.assertStartOffset(O,H);const D=`0x${O.replace("0x","").slice((H??0)*2,(N??O.length)*2)}`;return $&&a.assertEndOffset(D,H,N),D}function l(O){return Math.ceil((O.length-2)/2)}function w(O){return a.trim(O,{dir:"left"})}function E(O){return a.trim(O,{dir:"right"})}function _(O,H={}){const{signed:N}=H;H.size&&a.assertSize(O,H.size);const z=BigInt(O);if(!N)return z;const $=(O.length-2)/2,D=(1n<<BigInt($)*8n)-1n,G=D>>1n;return z<=G?z:z-D-1n}function I(O,H={}){H.size&&a.assertSize(O,H.size);const N=w(O);if(N==="0x")return!1;if(N==="0x1")return!0;throw new C(O)}function S(O,H={}){return r.fromHex(O,H)}function R(O,H={}){const{signed:N,size:z}=H;return Number(!N&&!z?O:_(O,H))}function x(O,H={}){const{size:N}=H;let z=r.fromHex(O);return N&&(t.assertSize(z,N),z=r.trimRight(z)),new TextDecoder().decode(z)}function T(O,H={}){const{strict:N=!1}=H;try{return c(O,{strict:N}),!0}catch{return!1}}class A extends n.BaseError{constructor({max:H,min:N,signed:z,size:$,value:D}){super(`Number \`${D}\` is not in safe${$?` ${$*8}-bit`:""}${z?" signed":" unsigned"} integer range ${H?`(\`${N}\` to \`${H}\`)`:`(above \`${N}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}ue.IntegerOutOfRangeError=A;class C extends n.BaseError{constructor(H){super(`Hex value \`"${H}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}ue.InvalidHexBooleanError=C;class k extends n.BaseError{constructor(H){super(`Value \`${typeof H=="object"?s.stringify(H):H}\` of type \`${typeof H}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}ue.InvalidHexTypeError=k;class B extends n.BaseError{constructor(H){super(`Value \`${H}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}ue.InvalidHexValueError=B;class P extends n.BaseError{constructor(H){super(`Hex value \`"${H}"\` is an odd length (${H.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}ue.InvalidLengthError=P;class q extends n.BaseError{constructor({givenSize:H,maxSize:N}
42){super(`Size cannot exceed \`${N}\` bytes. Given size: \`${H}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}ue.SizeOverflowError=q;class F extends n.BaseError{constructor({offset:H,position:N,size:z}){super(`Slice ${N==="start"?"starting":"ending"} at offset \`${H}\` is out-of-bounds (size: \`${z}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}ue.SliceOffsetOutOfBoundsError=F;class M extends n.BaseError{constructor({size:H,targetSize:N,type:z}){super(`${z.charAt(0).toUpperCase()}${z.slice(1).toLowerCase()} size (\`${H}\`) exceeds padding size (\`${N}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}return ue.SizeExceedsPaddingSizeError=M,ue}var so={},K1;function Rv(){if(K1)return so;K1=1,Object.defineProperty(so,"__esModule",{value:!0}),so.fromRpc=r,so.toRpc=n;const e=Me();function r(t){return{...t,amount:BigInt(t.amount),index:Number(t.index),validatorIndex:Number(t.validatorIndex)}}function n(t){return{address:t.address,amount:e.fromNumber(t.amount),index:e.fromNumber(t.index),validatorIndex:e.fromNumber(t.validatorIndex)}}return so}var Z1;function ag(){if(Z1)return no;Z1=1,Object.defineProperty(no,"__esModule",{value:!0}),no.fromRpc=n,no.toRpc=t;const e=Me(),r=Rv();function n(a){return{...a.baseFeePerGas&&{baseFeePerGas:BigInt(a.baseFeePerGas)},...a.blobBaseFee&&{blobBaseFee:BigInt(a.blobBaseFee)},...a.feeRecipient&&{feeRecipient:a.feeRecipient},...a.gasLimit&&{gasLimit:BigInt(a.gasLimit)},...a.number&&{number:BigInt(a.number)},...a.prevRandao&&{prevRandao:BigInt(a.prevRandao)},...a.time&&{time:BigInt(a.time)},...a.withdrawals&&{withdrawals:a.withdrawals.map(r.fromRpc)}}}function t(a){return{...typeof a.baseFeePerGas=="bigint"&&{baseFeePerGas:e.fromNumber(a.baseFeePerGas)},...typeof a.blobBaseFee=="bigint"&&{blobBaseFee:e.fromNumber(a.blobBaseFee)},...typeof a.feeRecipient=="string"&&{feeRecipient:a.feeRecipient},...typeof a.gasLimit=="bigint"&&{gasLimit:e.fromNumber(a.gasLimit)},...typeof a.number=="bigint"&&{number:e.fromNumber(a.number)},...typeof a.prevRandao=="bigint"&&{prevRandao:e.fromNumber(a.prevRandao)},...typeof a.time=="bigint"&&{time:e.fromNumber(a.time)},...a.withdrawals&&{withdrawals:a.withdrawals.map(r.toRpc)}}}return no}var me={},Y1;function cr(){if(Y1)return me;Y1=1,Object.defineProperty(me,"__esModule",{value:!0}),me.erc4626Abi=me.erc721Abi=me.erc1155Abi=me.erc20Abi_bytes32=me.erc20Abi=me.erc6492SignatureValidatorAbi=me.erc1271Abi=me.addressResolverAbi=me.textResolverAbi=me.universalResolverReverseAbi=me.universalResolverResolveAbi=me.batchGatewayAbi=me.multicall3Abi=void 0,me.multicall3Abi=[{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"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],me.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];const e=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];return me.universalResolverResolveAbi=[...e,{name:"resolveWithGateways",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"}]}],me.universalResolverReverseAbi=[...e,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],me.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],me.addressResolverAbi=[{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"}]}],me.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],me.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}
42],me.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],me.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],me.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}
42],me.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],me.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}],me}
42var co={},J1;function Bv(){return J1||(J1=1,Object.defineProperty(co,"__esModule",{value:!0}),co.aggregate3Signature=void 0,co.aggregate3Signature="0x82ad56cb"),co}var lt={},X1;function Fo(){return X1||(X1=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.multicall3Bytecode=lt.erc6492SignatureValidatorByteCode=lt.deploylessCallViaFactoryBytecode=lt.deploylessCallViaBytecodeBytecode=void 0,lt.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",lt.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",lt.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b8152
4260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848
42603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",lt.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
42150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"),lt}var Xe={},Q1;function No(){if(Q1)return Xe;Q1=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.InvalidChainIdError=Xe.ClientChainNotConfiguredError=Xe.ChainNotFoundError=Xe.ChainMismatchError=Xe.ChainDoesNotSupportContract=void 0;const e=ce();class r extends e.BaseError{constructor({blockNumber:i,chain:c,contract:u}){super(`Chain "${c.name}" does not support contract "${u.name}".`,{metaMessages:["This could be due to any of the following:",...i&&u.blockCreated&&u.blockCreated>i?[`- The contract "${u.name}" was not deployed until block ${u.blockCreated} (current block ${i}).`]:[`- The chain does not have the contract "${u.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}Xe.ChainDoesNotSupportContract=r;class n extends e.BaseError{constructor({chain:i,currentChainId:c}){super(`The current chain of the wallet (id: ${c}) does not match the target chain for the transaction (id: ${i.id} – ${i.name}).`,{metaMessages:[`Current Chain ID: ${c}`,`Expected Chain ID: ${i.id} – ${i.name}`],name:"ChainMismatchError"})}}Xe.ChainMismatchError=n;class t extends e.BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` 43`),{name:"ChainNotFoundError"})}}Xe.ChainNotFoundError=t;class a extends e.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}Xe.ClientChainNotConfiguredError=a;class s extends e.BaseError{constructor({chainId:i}){super(typeof i=="number"?`Chain ID "${i}
43" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}return Xe.InvalidChainIdError=s,Xe}var fi={},eb;function $o(){if(eb)return fi;eb=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.encodeDeployData=a;const e=Ee(),r=Oe(),n=yt(),t="/docs/contract/encodeDeployData";function a(s){const{abi:o,args:i,bytecode:c}=s;if(!i||i.length===0)return c;const u=o.find(f=>"type"in f&&f.type==="constructor");if(!u)throw new e.AbiConstructorNotFoundError({docsPath:t});if(!("inputs"in u))throw new e.AbiConstructorParamsNotFoundError({docsPath:t});if(!u.inputs||u.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:t});const d=(0,n.encodeAbiParameters)(u.inputs,i);return(0,r.concatHex)([c,d])}return fi}var li={},tb;function ur(){if(tb)return li;tb=1,Object.defineProperty(li,"__esModule",{value:!0}),li.getChainContractAddress=r;const e=No();function r({blockNumber:n,chain:t,contract:a}){const s=t?.contracts?.[a];if(!s)throw new e.ChainDoesNotSupportContract({chain:t,contract:{name:a}});if(n&&s.blockCreated&&s.blockCreated>n)throw new e.ChainDoesNotSupportContract({blockNumber:n,chain:t,contract:{name:a,blockCreated:s.blockCreated}});return s.address}return li}var bi={},rb;function uf(){if(rb)return bi;rb=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.getCallError=t;const e=or(),r=Dt(),n=Co();function t(a,{docsPath:s,...o}){const i=(()=>{const c=(0,n.getNodeError)(a,o);return c instanceof r.UnknownNodeError?a:c})();return new e.CallExecutionError(i,{docsPath:s,...o})}return bi}var mi={},hi={},nb;function df(){if(nb)return hi;nb=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.withResolvers=e;function e(){let r=()=>{},n=()=>{};return{promise:new Promise((a,s)=>
43{r=a,n=s}),resolve:r,reject:n}}return hi}var ob;function ff(){if(ob)return mi;ob=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.createBatchScheduler=n;const e=df(),r=new Map;function n({fn:t,id:a,shouldSplitBatch:s,wait:o=0,sort:i}){const c=async()=>{const y=f();u();const h=y.map(({args:m})=>m);h.length!==0&&t(h).then(m=>{i&&Array.isArray(m)&&m.sort(i);for(let g=0;g<y.length;g++){const{resolve:p}=y[g];p?.([m[g],m])}}).catch(m=>{for(let g=0;g<y.length;g++){const{reject:p}=y[g];p?.(m)}})},u=()=>r.delete(a),d=()=>f().map(({args:y})=>y),f=()=>r.get(a)||[],b=y=>r.set(a,[...f(),y]);return{flush:u,async schedule(y){const{promise:h,resolve:m,reject:g}=(0,e.withResolvers)();return s?.([...d(),y])&&c(),f().length>0?(b({args:y,resolve:m,reject:g}),h):(b({args:y,resolve:m,reject:g}),setTimeout(c,o),h)}}}return mi}var Id={},Nt={},ab;function Ov(){if(ab)return Nt;ab=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.OffchainLookupSenderMismatchError=Nt.OffchainLookupResponseMalformedError=Nt.OffchainLookupError=void 0;const e=qe(),r=ce(),n=Yd();class t extends r.BaseError{constructor({callbackSelector:i,cause:c,data:u,extraData:d,sender:f,urls:b}){super(c.shortMessage||"An error occurred while fetching for an offchain result.",{cause:c,metaMessages:[...c.metaMessages||[],c.metaMessages?.length?"":[],"Offchain Gateway Call:",b&&[" Gateway URL(s):",...b.map(y=>` ${(0,n.getUrl)(y)}`)],` Sender: ${f}`,` Data: ${u}`,` Callback selector: ${i}`,` Extra data: ${d}`].flat(),name:"OffchainLookupError"})}}Nt.OffchainLookupError=t;class a extends r.BaseError{constructor({result:i,url:c}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,n.getUrl)(c)}`,`Response: ${(0,e.stringify)(i)}`],name:"OffchainLookupResponseMalformedError"})}}Nt.OffchainLookupResponseMalformedError=a;class s extends r.BaseError{constructor({sender:i,to:c}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${c}`,`OffchainLookup sender address: ${i}`],name:"OffchainLookupSenderMismatchError"})}}return Nt.OffchainLookupSenderMismatchError=s,Nt}var Sd={},yi={},ib;function lf(){if(ib)return yi;ib=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.decodeFunctionData=s;const e=Ee(),r=at(),n=Mr(),t=nr(),a=zt();function s(o){const{abi:i,data:c}=o,u=(0,r.slice)(c,0,4),d=i.find(f=>f.type==="function"&&u===(0,n.toFunctionSelector)((0,a.formatAbiItem)(f)));if(!d)throw new e.AbiFunctionSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:d.name,args:"inputs"in d&&d.inputs&&d.inputs.length>0?(0,t.decodeAbiParameters)(d.inputs,(0,r.slice)(c,4)):void 0}}return yi}var pi={},sb;function bf(){if(sb)return pi;sb=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.encodeErrorResult=i;const e=Ee(),r=Oe(),n=Mr(),t=yt(),a=zt(),s=Lt(),o="/docs/contract/encodeErrorResult";function i(c){const{abi:u,errorName:d,args:f}=c;let b=u[0];if(d){const g=(0,s.getAbiItem)({abi:u,args:f,name:d});if(!g)throw new e.AbiErrorNotFoundError(d,{docsPath:o});b=g}if(b.type!=="error")throw new e.AbiErrorNotFoundError(void 0,{docsPath:o});const y=(0,a.formatAbiItem)(b),h=(0,n.toFunctionSelector)(y);let m="0x";if(f&&f.length>0){if(!b.inputs)throw new e.AbiErrorInputsNotFoundError(b.name,{docsPath:o});m=(0,t.encodeAbiParameters)(b.inputs,f)}return(0,r.concatHex)([h,m])}return pi}var gi={},cb;function mf(){if(cb)return gi;cb=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.encodeFunctionResult=a;const e=Ee(),r=yt(),n=Lt(),t="/docs/contract/encodeFunctionResult";function a(s){const{abi:o,functionName:i,result:c}=s;let u=o[0];if(i){const f=(0,n.getAbiItem)({abi:o,name:i});if(!f)throw new e.AbiFunctionNotFoundError(i,{docsPath:t});u=f}if(u.type!=="function")throw new e.AbiFunctionNotFoundError(void 0,{docsPath:t});if(!u.outputs)throw new e.AbiFunctionOutputsNotFoundError(u.name,{docsPath:t});const d=(()=>{if(u.outputs.length===0)return[];if(u.outputs.length===1)return[c];if(Array.isArray(c))return c;throw new e.InvalidArrayError(c)})();return(0,r.encodeAbiParameters)(u.outputs,d)}return gi}var ub;function qu(){return ub||(ub=1,(function(e){Object.defineProperty(e,"__esMo
43dule",{value:!0}),e.localBatchGatewayUrl=void 0,e.localBatchGatewayRequest=o;const r=cr(),n=Wd(),t=lf(),a=bf(),s=mf();e.localBatchGatewayUrl="x-batch-gateway:true";async function o(c){const{data:u,ccipRequest:d}=c,{args:[f]}=(0,t.decodeFunctionData)({abi:r.batchGatewayAbi,data:u}),b=[],y=[];return await Promise.all(f.map(async(h,m)=>{try{y[m]=h.urls.includes(e.localBatchGatewayUrl)?await o({data:h.data,ccipRequest:d}):await d(h),b[m]=!1}catch(g){b[m]=!0,y[m]=i(g)}})),(0,s.encodeFunctionResult)({abi:r.batchGatewayAbi,functionName:"query",result:[b,y]})}function i(c){return c.name==="HttpRequestError"&&c.status?(0,a.encodeErrorResult)({abi:r.batchGatewayAbi,errorName:"HttpError",args:[c.status,c.shortMessage]}):(0,a.encodeErrorResult)({abi:[n.solidityError],errorName:"Error",args:["shortMessage"in c?c.shortMessage:c.message]})}})(Sd)),Sd}var db;function hf(){return db||(db=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.offchainLookupAbiItem=e.offchainLookupSignature=void 0,e.offchainLookup=f,e.ccipRequest=b;const r=zo(),n=Ov(),t=pt(),a=wu(),s=yt(),o=gt(),i=Oe(),c=ze(),u=qu(),d=qe();e.offchainLookupSignature="0x556f1830",e.offchainLookupAbiItem={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 f(y,{blockNumber:h,blockTag:m,data:g,to:p}){const{args:v}=(0,a.decodeErrorResult)({data:g,abi:[e.offchainLookupAbiItem]}),[j,l,w,E,_]=v,{ccipRead:I}=y,S=I&&typeof I?.request=="function"?I.request:b;try{if(!(0,o.isAddressEqual)(p,j))throw new n.OffchainLookupSenderMismatchError({sender:j,to:p});const R=l.includes(u.localBatchGatewayUrl)?await(0,u.localBatchGatewayRequest)({data:w,ccipRequest:S}):await S({data:w,sender:j,urls:l}),{data:x}=await(0,r.call)(y,{blockNumber:h,blockTag:m,data:(0,i.concat)([E,(0,s.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[R,_])]),to:p});return x}catch(R){throw new n.OffchainLookupError({callbackSelector:E,cause:R,data:g,extraData:_,sender:j,urls:l})}}async function b({data:y,sender:h,urls:m}){let g=new Error("An unknown error occurred.");for(let p=0;p<m.length;p++){const v=m[p],j=v.includes("{data}")?"GET":"POST",l=j==="POST"?{data:y,sender:h}:void 0,w=j==="POST"?{"Content-Type":"application/json"}:{};try{const E=await fetch(v.replace("{sender}",h.toLowerCase()).replace("{data}",y),{body:JSON.stringify(l),headers:w,method:j});let _;if(E.headers.get("Content-Type")?.startsWith("application/json")?_=(await E.json()).data:_=await E.text(),!E.ok){g=new t.HttpRequestError({body:l,details:_?.error?(0,d.stringify)(_.error):E.statusText,headers:E.headers,status:E.status,url:v});continue}if(!(0,c.isHex)(_)){g=new n.OffchainLookupResponseMalformedError({result:_,url:v});continue}return _}catch(E){g=new t.HttpRequestError({body:l,details:E.message,url:v})}}throw g}})(Id)),Id}var fb;function zo(){if(fb)return ro;fb=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.call=l,ro.getRevertErrorData=S;const e=tr(),r=ag(),n=Te(),t=cr(),a=Bv(),s=Fo(),o=ce(),i=No(),c=or(),u=Vt(),d=$o(),f=Ze(),b=ur(),y=te(),h=uf(),m=$r(),g=wt(),p=ff(),v=Xd(),j=Pt();async function l(R,x){const{account:T=R.account,authorizationList:A,batch:C=!!R.batch?.multicall,blockNumber:k,blockTag:B=R.experimental_blockTag??"latest",accessList:P,blobs:q,blockOverrides:F,code:M,data:O,factory:H,factoryData:N,gas:z,gasPrice:$,maxFeePerBlobGas:D,maxFeePerGas:G,maxPriorityFeePerGas:Y,nonce:Z,to:W,value:X,stateOverride:ie,...K}=x,J=T?(0,n.parseAccount)(T):void 0;if(M&&(H||N))throw new o.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(M&&W)throw new o.BaseError("Cannot provide both `code` & `to` as parameters.");const ee=M&&O,ae=H&&N&&W&&O,oe=ee||ae,se=ee?_({code:M,data:O}):ae?I({data:O,factory:H,factoryData:N,to:W}):O;try{(0,j.assertRequest)(x);const V=(typeof k=="bigint"?(0,y.numberToHex)(k):void 0)||B,Ie=F?r.toRpc(F):void 0,ve=(0,v.serializeStateOverride)(ie),Se=R.chain?.formatters?.transactionRequest?.format,Ce=(Se||g.formatTransactionRequest)({...(0,m.extract)(K,{format:Se}),from:J?.address,accessList:P,authorizationList:A,blobs:q,data:se,gas:z,gasPrice:$,maxFeePerBlobGas:D,maxFeePerGas:G,maxPriorityFeePerGas:Y,nonce:Z,to:oe?void 0:W,value:X},"call");if(C&&w({request:Ce})&&!ve&&!Ie)try{return await E(R,{...Ce,blockNumber:k,blockTag:B})}catch(Be){if(!(Be instanceof i.ClientChainNotConfiguredError)&&!(Be instanceof i.ChainDoesNotSupportContract))throw Be}const st=(()=>{const Be=[Ce,V];return ve&&Ie?[...Be,ve,Ie]:ve?[...Be,ve]:Ie?[...Be,{},Ie]:Be})(),Le=await R.request({method:"eth_call",params:st});return Le==="0x"?{data:void 0}:{data:Le}}catch(Q){const V=S(Q),{offchainLookup:Ie,offchainLookupSignature:ve}=await Promise.resolve().then(()=>hf());if(R.ccipRead!==!1&&V?.slice(0,10)===ve&&W)return{data:await Ie(R,{data:V,to:W})};throw oe&&V?.slice(0,10)==="0x101bb98d"?new c.CounterfactualDeploymentFailedError({factory:H}):(0,h.getCallError)(Q,{...x,account:J,chain:R.chain})}}function w({request:R}){const{data:x,to:T,...A}=R;return!(!x||x.startsWith(a.aggregate3Signature)||!T||Object.values(A).filter(C=>typeof C<"u").length>0)}async function E(R,x){const{batchSize:T=1024,deployless:A=!1,wait:C=0}=typeof R.batch?.multicall=="object"?R.batch.multicall:{},{blockNumber:k,blockTag:B=R.experimental_blockTag??"latest",data:P,to:q}=x,F=(()=>
43{if(A)return null;if(x.multicallAddress)return x.multicallAddress;if(R.chain)return(0,b.getChainContractAddress)({blockNumber:k,chain:R.chain,contract:"multicall3"});throw new i.ClientChainNotConfiguredError})(),O=(typeof k=="bigint"?(0,y.numberToHex)(k):void 0)||B,{schedule:H}=(0,p.createBatchScheduler)({id:`${R.uid}.${O}`,wait:C,shouldSplitBatch($){return $.reduce((G,{data:Y})=>G+(Y.length-2),0)>T*2},fn:async $=>{const D=$.map(Z=>({allowFailure:!0,callData:Z.data,target:Z.to})),G=(0,f.encodeFunctionData)({abi:t.multicall3Abi,args:[D],functionName:"aggregate3"}),Y=await R.request({method:"eth_call",params:[{...F===null?{data:_({code:s.multicall3Bytecode,data:G})}:{to:F,data:G}},O]});return(0,u.decodeFunctionResult)({abi:t.multicall3Abi,args:[D],functionName:"aggregate3",data:Y||"0x"})}}),[{returnData:N,success:z}]=await H({data:P,to:q});if(!z)throw new c.RawContractError({data:N});return N==="0x"?{data:void 0}:{data:N}}function _(R){const{code:x,data:T}=R;return(0,d.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(bytes, bytes)"]),bytecode:s.deploylessCallViaBytecodeBytecode,args:[x,T]})}function I(R){const{data:x,factory:T,factoryData:A,to:C}=R;return(0,d.encodeDeployData)({abi:(0,e.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:s.deploylessCallViaFactoryBytecode,args:[C,x,T,A]})}function S(R){if(!(R instanceof o.BaseError))return;const x=R.walk();return typeof x?.data=="object"?x.data?.data:x.data}return ro}var lb;function Tt(){if(lb)return ui;lb=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.readContract=s;const e=Vt(),r=Ze(),n=ir(),t=be(),a=zo();async function s(o,i){const{abi:c,address:u,args:d,functionName:f,...b}=i,y=(0,r.encodeFunctionData)({abi:c,args:d,functionName:f});try{const{data:h}=await(0,t.getAction)(o,a.call,"call")({...b,data:y,to:u});return(0,e.decodeFunctionResult)({abi:c,args:d,functionName:f,data:h||"0x"})}catch(h){throw(0,n.getContractError)(h,{abi:c,address:u,args:d,docsPath:"/docs/contract/readContract",functionName:f})}}return ui}var _i={},bb;function ig(){if(bb)return _i;bb=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.simulateContract=o;const e=Te(),r=Vt(),n=Ze(),t=ir(),a=be(),s=zo();async function o(i,c){const{abi:u,address:d,args:f,dataSuffix:b,functionName:y,...h}=c,m=h.account?(0,e.parseAccount)(h.account):i.account,g=(0,n.encodeFunctionData)({abi:u,args:f,functionName:y});try{const{data:p}=await(0,a.getAction)(i,s.call,"call")({batch:!1,data:`${g}${b?b.replace("0x",""):""}`,to:d,...h,account:m}),v=(0,r.decodeFunctionResult)({abi:u,args:f,functionName:y,data:p||"0x"}),j=u.filter(l=>"name"in l&&l.name===c.functionName);return{result:v,request:{abi:j,address:d,args:f,dataSuffix:b,functionName:y,...h,account:m}}}catch(p){throw(0,t.getContractError)(p,{abi:u,address:d,args:f,docsPath:"/docs/contract/simulateContract",functionName:y,sender:m?.address})}}return _i}var vi={},Rd={},mb;function Ur(){return mb||(mb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cleanupCache=e.listenersCache=void 0,e.observe=n,e.listenersCache=new Map,e.cleanupCache=new Map;let r=0;function n(t,a,s){const o=++r,i=()=>e.listenersCache.get(t)||[],c=()=>{const y=i();e.listenersCache.set(t,y.filter(h=>h.id!==o))},u=()=>{const y=i();if(!y.some(m=>m.id===o))return;const h=e.cleanupCache.get(t);if(y.length===1&&h){const m=h();m instanceof Promise&&m.catch(()=>{})}c()},d=i();if(e.listenersCache.set(t,[...d,{id:o,fns:a}]),d&&d.length>0)return u;const f={};for(const y in a)f[y]=((...h)=>{const m=i();if(m.length!==0)for(const g of m)g.fns[y]?.(...h)});const b=s(f);return typeof b=="function"&&e.cleanupCache.set(t,b),u}})(Rd)),Rd}var Ei={},ji={},hb;function yf(){if(hb)return ji;hb=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.wait=e;async function e(r){return new Promise(n=>setTimeout(n,r))}return ji}var yb;function gn(){if(yb)return Ei;yb=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.poll=r;const e=yf();function r(n,{emitOnBegin:t,initialWaitTime:a,interval:s}){let o=!0;const i=()=>o=!1;return(async()=>{let u;t&&(u=await n({unpoll:i}));const d=await a?.(u)??s;await(0,e.wait)(d);const f=async()=>{o&&(await n({unpoll:i}),await(0,e.wait)(s),f())};f()})(),i}return Ei}var uo={},Bd={},pb;function sg(){return pb||(pb=1,(function(e){Object.defineProperty(e,"__esMo
43dule",{value:!0}),e.responseCache=e.promiseCache=void 0,e.getCache=r,e.withCache=n,e.promiseCache=new Map,e.responseCache=new Map;function r(t){const a=(i,c)=>({clear:()=>c.delete(i),get:()=>c.get(i),set:u=>c.set(i,u)}),s=a(t,e.promiseCache),o=a(t,e.responseCache);return{clear:()=>{s.clear(),o.clear()},promise:s,response:o}}async function n(t,{cacheKey:a,cacheTime:s=Number.POSITIVE_INFINITY}){const o=r(a),i=o.response.get();if(i&&s>0&&Date.now()-i.created.getTime()<s)return i.data;let c=o.promise.get();c||(c=t(),o.promise.set(c));try{const u=await c;return o.response.set({created:new Date,data:u}),u}finally{o.promise.clear()}}})(Bd)),Bd}var gb;function Uo(){if(gb)return uo;gb=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.getBlockNumberCache=n,uo.getBlockNumber=t;const e=sg(),r=a=>`blockNumber.${a}`;function n(a){return(0,e.getCache)(r(a))}async function t(a,{cacheTime:s=a.cacheTime}={}){const o=await(0,e.withCache)(()=>a.request({method:"eth_blockNumber"}),{cacheKey:r(a.uid),cacheTime:s});return BigInt(o)}return uo}var wi={},_b;function Mu(){if(_b)return wi;_b=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.getFilterChanges=n;const e=ko(),r=Gt();async function n(t,{filter:a}){const s="strict"in a&&a.strict,o=await a.request({method:"eth_getFilterChanges",params:[a.id]});if(typeof o[0]=="string")return o;const i=o.map(c=>(0,r.formatLog)(c));return!("abi"in a)||!a.abi?i:(0,e.parseEventLogs)({abi:a.abi,logs:i,strict:s})}return wi}var Pi={},vb;function Hu(){if(vb)return Pi;vb=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.uninstallFilter=e;async function e(r,{filter:n}){return n.request({method:"eth_uninstallFilter",params:[n.id]})}return Pi}var Eb;function cg(){if(Eb)return vi;Eb=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.watchContractEvent=h;const e=Ee(),r=ar(),n=Ho(),t=Hr(),a=Gt(),s=be(),o=Ur(),i=gn(),c=qe(),u=Vd(),d=Uo(),f=cf(),b=Mu(),y=Hu();function h(m,g){const{abi:p,address:v,args:j,batch:l=!0,eventName:w,fromBlock:E,onError:_,onLogs:I,poll:S,pollingInterval:R=m.pollingInterval,strict:x}=g;return(typeof S<"u"?S:typeof E=="bigint"?!0:!(m.transport.type==="webSocket"||m.transport.type==="ipc"||m.transport.type==="fallback"&&(m.transport.transports[0].c
43onfig.type==="webSocket"||m.transport.transports[0].config.type==="ipc")))?(()=>{const k=x??!1,B=(0,c.stringify)(["watchContractEvent",v,j,l,m.uid,w,R,k,E]);return(0,o.observe)(B,{onLogs:I,onError:_},P=>{let q;E!==void 0&&(q=E-1n);let F,M=!1;const O=(0,i.poll)(async()=>{if(!M){try{F=await(0,s.getAction)(m,u.createContractEventFilter,"createContractEventFilter")({abi:p,address:v,args:j,eventName:w,strict:k,fromBlock:E})}catch{}M=!0;return}try{let H;if(F)H=await(0,s.getAction)(m,b.getFilterChanges,"getFilterChanges")({filter:F});else{const N=await(0,s.getAction)(m,d.getBlockNumber,"getBlockNumber")({});q&&q<N?H=await(0,s.getAction)(m,f.getContractEvents,"getContractEvents")({abi:p,address:v,args:j,eventName:w,fromBlock:q+1n,toBlock:N,strict:k}):H=[],q=N}if(H.length===0)return;if(l)P.onLogs(H);else for(const N of H)P.onLogs([N])}catch(H){F&&H instanceof r.InvalidInputRpcError&&(M=!1),P.onError?.(H)}},{emitOnBegin:!0,interval:R});return async()=>{F&&await(0,s.getAction)(m,y.uninstallFilter,"uninstallFilter")({filter:F}),O()}})})():(()=>{const k=x??!1,B=(0,c.stringify)(["watchContractEvent",v,j,l,m.uid,w,R,k]);let P=!0,q=()=>P=!1;return(0,o.observe)(B,{onLogs:I,onError:_},F=>((async()=>{try{const M=(()=>{if(m.transport.type==="fallback"){const N=m.transport.transports.find(z=>z.config.type==="webSocket"||z.config.type==="ipc");return N?N.value:m.transport}return m.transport})(),O=w?(0,t.encodeEventTopics)({abi:p,eventName:w,args:j}):[],{unsubscribe:H}=await M.subscribe({params:["logs",{address:v,topics:O}],onData(N){if(!P)return;const z=N.result;try{const{eventName:$,args:D}=(0,n.decodeEventLog)({abi:p,data:z.data,topics:z.topics,strict:x}),G=(0,a.formatLog)(z,{args:D,eventName:$});F.onLogs([G])}catch($){let D,G;if($ instanceof e.DecodeLogDataMismatch||$ instanceof e.DecodeLogTopicsMismatch){if(x)return;D=$.abiItem.name,G=$.abiItem.inputs?.some(Z=>!("name"in Z&&Z.name))}const Y=(0,a.formatLog)(z,{args:G?[]:{},eventName:D});F.onLogs([Y])}},onError(N){F.onError?.(N)}});q=H,P||q()}catch(M){_?.(M)}})(),()=>q()))})()}return vi}var fo={},jr={},jb;function dr(){if(jb)return jr;jb=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.AccountTypeNotSupportedError=jr.AccountNotFoundError=void 0;const e=ce();class r extends e.BaseError{constructor({docsPath:a}={}){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(` 44`),{docsPath:a,docsSlug:"account",name:"AccountNotFoundError"})}}jr.AccountNotFoundError=r;class n extends e.BaseError{constructor({docsPath:a,metaMessages:s,type:o}){super(`Account type "${o}" is not supported.`,{docsPath:a,metaMessages:s,name:"AccountTypeNotSupportedError"})}}return jr.AccountTypeNotSupportedError=n,jr}var Ai={},Ti={},wb;function Lo(){if(wb)return Ti;wb=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.assertCurrentChain=r;const e=No();function r({chain:n,currentChainId:t}){if(!n)throw new e.ChainNotFoundError;if(t!==n.id)throw new e.ChainMismatchError({chain:n,currentChainId:t})}return Ti}var Ii={},Pb;function ku(){if(Pb)return Ii;Pb=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.getTransactionError=t;const e=Dt(),r=Ue(),n=Co();function t(a,{docsPath:s,...o}){const i=(()=>{const c=(0,n.getNodeError)(a,o);return c instanceof e.UnknownNodeError?a:c})();return new r.TransactionExecutionError(i,{docsPath:s,...o})}return Ii}var Si={},Ab;function pf(){if(Ab)return Si;Ab=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.sendRawTransaction=e;async function e(r,{serializedTransaction:n}){return r.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}return Si}var Tb;function Fu(){if(Tb)return Ai;Tb=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.sendTransaction=m;const e=Te(),r=dr(),n=ce(),t=Oo(),a=Lo(),s=ku(),o=$r(),i=wt(),c=be(),u=yn(),d=Pt(),f=zr(),b=Mo(),y=pf(),h=new u.LruMap(128);async function m(g,p){const{account:v=g.account,chain:j=g.chain,accessList:l,authorizationList:w,blobs:E,data:_,gas:I,gasPrice:S,maxFeePerBlobGas:R,maxFeePerGas:x,maxPriorityFeePerGas:T,nonce:A,type:C,value:k,...B}=p;if(typeof v>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const P=v?(0,e.parseAccount)(v):null;try{(0,d.assertRequest)(p);const q=await(async()=>
44{if(p.to)return p.to;if(p.to!==null&&w&&w.length>0)return await(0,t.recoverAuthorizationAddress)({authorization:w[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if(P?.type==="json-rpc"||P===null){let F;j!==null&&(F=await(0,c.getAction)(g,f.getChainId,"getChainId")({}),(0,a.assertCurrentChain)({currentChainId:F,chain:j}));const M=g.chain?.formatters?.transactionRequest?.format,H=(M||i.formatTransactionRequest)({...(0,o.extract)(B,{format:M}),accessList:l,authorizationList:w,blobs:E,chainId:F,data:_,from:P?.address,gas:I,gasPrice:S,maxFeePerBlobGas:R,maxFeePerGas:x,maxPriorityFeePerGas:T,nonce:A,to:q,type:C,value:k},"sendTransaction"),N=h.get(g.uid),z=N?"wallet_sendTransaction":"eth_sendTransaction";try{return await g.request({method:z,params:[H]},{retryCount:0})}catch($){if(N===!1)throw $;const D=$;if(D.name==="InvalidInputRpcError"||D.name==="InvalidParamsRpcError"||D.name==="MethodNotFoundRpcError"||D.name==="MethodNotSupportedRpcError")return await g.request({method:"wallet_sendTransaction",params:[H]},{retryCount:0}).then(G=>(h.set(g.uid,!0),G)).catch(G=>{const Y=G;throw Y.name==="MethodNotFoundRpcError"||Y.name==="MethodNotSupportedRpcError"?(h.set(g.uid,!1),D):Y});throw D}}if(P?.type==="local"){const F=await(0,c.getAction)(g,b.prepareTransactionRequest,"prepareTransactionRequest")({account:P,accessList:l,authorizationList:w,blobs:E,chain:j,data:_,gas:I,gasPrice:S,maxFeePerBlobGas:R,maxFeePerGas:x,maxPriorityFeePerGas:T,nonce:A,nonceManager:P.nonceManager,parameters:[...b.defaultParameters,"sidecars"],type:C,value:k,...B,to:q}),M=j?.serializers?.transaction,O=await P.signTransaction(F,{serializer:M});return await(0,c.getAction)(g,y.sendRawTransaction,"sendRawTransaction")({serializedTransaction:O})}throw P?.type==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:P?.type})}catch(q){throw q instanceof r.AccountTypeNotSupportedError?q:(0,s.getTransactionError)(q,{...p,account:P,chain:p.chain||void 0})}}return Ai}var Ib;function gf(){if(Ib)return fo;Ib=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.writeContract=o;const e=Te(),r=dr(),n=Ze(),t=ir(),a=be(),s=Fu();async function o(i,c){return o.internal(i,s.sendTransaction,"sendTransaction",c)}return(function(i){async function c(u,d,f,b){const{abi:y,account:h=u.account,address:m,args:g,dataSuffix:p,functionName:v,...j}=b;if(typeof h>"u")throw new r.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});const l=h?(0,e.parseAccount)(h):null,w=(0,n.encodeFunctionData)({abi:y,args:g,functionName:v});try{return await(0,a.getAction)(u,d,f)({data:`${w}${p?p.replace("0x",""):""}`,to:m,account:l,...j})}catch(E){throw(0,t.getContractError)(E,{abi:y,address:m,args:g,docsPath:"/docs/contract/writeContract",functionName:v,sender:l?.address})}}i.internal=c})(o||(fo.writeContract=o={})),fo}var Sb;function Cv(){if(Sb)return Vr;Sb=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.getContract=c,Vr.getFunctionParameters=u,Vr.getEventParameters=d;const e=be(),r=Vd(),n=rg(),t=cf(),a=Tt(),s=ig(),o=cg(),i=gf();function c({abi:f,address:b,client:y}){const h=y,[m,g]=h?"public"in h&&"wallet"in h?[h.public,h.wallet]:"public"in h?[h.public,void 0]:"wallet"in h?[void 0,h.wallet]:[h,h]:[void 0,void 0],p=m!=null,v=g!=null,j={};let l=!1,w=!1,E=!1;for(const _ of f)if(_.type==="function"?_.stateMutability==="view"||_.stateMutability==="pure"?l=!0:w=!0:_.type==="event"&&(E=!0),l&&w&&E)break;return p&&(l&&(j.read=new Proxy({},{get(_,I){return(...S)=>{const{args:R,options:x}=u(S);return(0,e.getAction)(m,a.readContract,"readContract")({abi:f,address:b,functionName:I,args:R,...x})}}})),w&&(j.simulate=new Proxy({},{get(_,I){return(...S)=>{const{args:R,options:x}=u(S);return(0,e.getAction)(m,s.simulateContract,"simulateContract")({abi:f,address:b,functionName:I,args:R,...x})}}})),E&&(j.createEventFilter=new Proxy({},{get(_,I){return(...S)=>{const R=f.find(A=>A.type==="event"&&A.name===I),{args:x,options:T}=d(S,R);return(0,e.getAction)(m,r.createContractEventFilter,"createContractEventFilter")({abi:f,address:b,eventName:I,args:x,...T})}}}),j.getEvents=new Proxy({},{get(_,I){return(...S)=>{const R=f.find(A=>A.type==="event"&&A.name===I),{args:x,options:T}=d(S,R);return(0,e.getAction)(m,t.getContractEvents,"getContractEvents")({abi:f,address:b,eventName:I,args:x,...T})}}}),j.watchEvent=new Proxy({},{get(_,I){return(...S)=>{const R=f.find(A=>A.type==="event"&&A.name===I),{args:x,options:T}=d(S,R);return(0,e.getAction)(m,o.watchContractEvent,"watchContractEvent")({abi:f,address:b,eventName:I,args:x,...T})}}}))),v&&w&&(j.write=new Proxy({},{get(_,I){return(...S)=>{const{args:R,options:x}=u(S);return(0,e.getAction)(g,i.writeContract,"writeContract")({abi:f,address:b,functionName:I,args:R,...x})}}})),(p||v)&&w&&(j.estimateGas=new Proxy({},{get(_,I){return(...S)=>{const{args:R,options:x}=u(S),T=m??g;return(0,e.getAction)(T,n.estimateContractGas,"estimateContractGas")({abi:f,address:b,functionName:I,args:R,...x,account:x.account??g.account})}}})),j.address=b,j.abi=f,j}function u(f){const b=f.length&&Array.isArray(f[0]),y=b?f[0]:[],h=(b?f[1]:f[0])??{};return{args:y,options:h}}function d(f,b){let y=!1;Array.isArray(f[0])?y=!0:f.length===1?y=b.inputs.some(g=>g.indexed):f.length===2&&(y=!0);const h=y?f[0]:void 0,m=(y?f[1]:f[0])??{};return{args:h,options:m}}return Vr}var rn={},lo={},Rb;function ug(){if(Rb)return lo;Rb=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.BundleFailedError=void 0;const e=ce();class r extends e.BaseError{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}return lo.BundleFailedError=r,lo}var Ri={},Bb;
44function Nu(){if(Bb)return Ri;Bb=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.withRetry=r;const e=yf();function r(n,{delay:t=100,retryCount:a=2,shouldRetry:s=()=>!0}={}){return new Promise((o,i)=>{const c=async({count:u=0}={})=>{const d=async({error:f})=>{const b=typeof t=="function"?t({count:u,error:f}):t;b&&await(0,e.wait)(b),c({count:u+1})};try{const f=await n();o(f)}catch(f){if(u<a&&await s({count:u,error:f}))return d({error:f});i(f)}};c()})}return Ri}var Bi={},Od={},Ob;function Do(){return Ob||(Ob=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defineTransactionReceipt=e.receiptStatuses=void 0,e.formatTransactionReceipt=s;const r=Ae(),n=xo(),t=Gt(),a=qo();e.receiptStatuses={"0x0":"reverted","0x1":"success"};function s(o,i){const c={...o,blockNumber:o.blockNumber?BigInt(o.blockNumber):null,contractAddress:o.contractAddress?o.contractAddress:null,cumulativeGasUsed:o.cumulativeGasUsed?BigInt(o.cumulativeGasUsed):null,effectiveGasPrice:o.effectiveGasPrice?BigInt(o.effectiveGasPrice):null,gasUsed:o.gasUsed?BigInt(o.gasUsed):null,logs:o.logs?o.logs.map(u=>(0,t.formatLog)(u)):null,to:o.to?o.to:null,transactionIndex:o.transactionIndex?(0,r.hexToNumber)(o.transactionIndex):null,status:o.status?e.receiptStatuses[o.status]:null,type:o.type?a.transactionType[o.type]||o.type:null};return o.blobGasPrice&&(c.blobGasPrice=BigInt(o.blobGasPrice)),o.blobGasUsed&&(c.blobGasUsed=BigInt(o.blobGasUsed)),c}e.defineTransactionReceipt=(0,n.defineFormatter)("transactionReceipt",s)})(Od)),Od}var Cd={},Cb;function _f(){return Cb||(Cb=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fallbackTransactionErrorMagicIdentifier=e.fallbackMagicIdentifier=void 0,e.sendCalls=d;const r=Te(),n=ce(),t=ar(),a=Ze(),s=Oe(),o=Ae(),i=te(),c=ku(),u=Fu();e.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",e.fallbackTransactionErrorMagicIdentifier=(0,i.numberToHex)(0,{size:32});async function d(f,b){const{account:y=f.account,capabilities:h,chain:m=f.chain,experimental_fallback:g,experimental_fallbackDelay:p=32,forceAtomic:v=!1,id:j,version:l="2.0.0"}=b,w=y?(0,r.parseAccount)(y):null,E=b.calls.map(_=>{const I=_,S=I.abi?(0,a.encodeFunctionData)({abi:I.abi,functionName:I.functionName,args:I.args}):I.data;return{data:I.dataSuffix&&S?(0,s.concat)([S,I.dataSuffix]):S,to:I.to,value:I.value?(0,i.numberToHex)(I.value):void 0}});try{const _=await f.request({method:"wallet_sendCalls",params:[{atomicRequired:v,calls:E,capabilities:h,chainId:(0,i.numberToHex)(m.id),from:w?.address,id:j,version:l}]},{retryCount:0});return typeof _=="string"?{id:_}:_}catch(_){const I=_;if(g&&(I.name==="MethodNotFoundRpcError"||I.name==="MethodNotSupportedRpcError"||I.name==="UnknownRpcError"||I.details.toLowerCase().includes("does not exist / is not available")||I.details.toLowerCase().includes("missing or invalid. request()")||I.details.toLowerCase().includes("did not match any variant of untagged enum")||I.details.toLowerCase().includes("account upgraded to unsupported contract")||I.details.toLowerCase().includes("eip-7702 not supported")||I.details.toLowerCase().includes("unsupported wc_ method")||I.details.toLowerCase().includes("feature toggled misconfigured")||I.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(h&&Object.values(h).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new t.UnsupportedNonOptionalCapabilityError(new n.BaseError(A,{details:A}))}if(v&&E.length>1){const T="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new t.AtomicityNotSupportedError(new n.BaseError(T,{details:T}))}const S=[];for(const T of E){const A=(0,u.sendTransaction)(f,{account:w,chain:m,data:T.data,to:T.to,value:T.value?(0,o.hexToBigInt)(T.value):void 0});S.push(A),p>0&&await new Promise(C=>setTimeout(C,p))}const R=await Promise.allSettled(S);if(R.every(T=>T.status==="rejected"))throw R[0].reason;const x=R.map(T=>T.status==="fulfilled"?T.value:e.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...x,(0,i.numberToHex)(m.id,{size:32}),e.fallbackMagicIdentifier])}}throw(0,c.getTransactionError)(_,{...b,account:w,chain:b.chain})}}})(Cd)),Cd}var xb;function dg(){if(xb)return Bi;xb=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.getCallsStatus=s;const e=at(),r=Ut(),n=Ae(),t=Do(),a=_f();async function s(o,i){async function c(g){if(g.endsWith(a.fallbackMagicIdentifier.slice(2))){const v=(0,r.trim)((0,e.sliceHex)(g,-64,-32)),j=(0,e.sliceHex)(g,0,-64).slice(2).match(/.{1,64}/g),l=await Promise.all(j.map(E=>a.fallbackTransactionErrorMagicIdentifier.slice(2)!==E?o.request({method:"eth_getTransactionReceipt",params:[`0x${E}`]},{dedupe:!0}):void 0)),w=l.some(E=>E===null)?100:l.every(E=>
44E?.status==="0x1")?200:l.every(E=>E?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,n.hexToNumber)(v),receipts:l.filter(Boolean),status:w,version:"2.0.0"}}return o.request({method:"wallet_getCallsStatus",params:[g]})}const{atomic:u=!1,chainId:d,receipts:f,version:b="2.0.0",...y}=await c(i.id),[h,m]=(()=>{const g=y.status;return g>=100&&g<200?["pending",g]:g>=200&&g<300?["success",g]:g>=300&&g<700?["failure",g]:g==="CONFIRMED"?["success",200]:g==="PENDING"?["pending",100]:[void 0,g]})();return{...y,atomic:u,chainId:d?(0,n.hexToNumber)(d):void 0,receipts:f?.map(g=>({...g,blockNumber:(0,n.hexToBigInt)(g.blockNumber),gasUsed:(0,n.hexToBigInt)(g.gasUsed),status:t.receiptStatuses[g.status]}))??[],statusCode:m,status:h,version:b}}return Bi}var qb;function vf(){if(qb)return rn;qb=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.WaitForCallsStatusTimeoutError=void 0,rn.waitForCallsStatus=u;const e=ce(),r=ug(),n=be(),t=Ur(),a=gn(),s=df(),o=Nu(),i=qe(),c=dg();async function u(f,b){const{id:y,pollingInterval:h=f.pollingInterval,status:m=({statusCode:R})=>R===200||R>=300,retryCount:g=4,retryDelay:p=({count:R})=>~~(1<<R)*200,timeout:v=6e4,throwOnFailure:j=!1}=b,l=(0,i.stringify)(["waitForCallsStatus",f.uid,y]),{promise:w,resolve:E,reject:_}=(0,s.withResolvers)();let I;const S=(0,t.observe)(l,{resolve:E,reject:_},R=>{const x=(0,a.poll)(async()=>{const T=A=>{clearTimeout(I),x(),A(),S()};try{const A=await(0,o.withRetry)(async()=>{const C=await(0,n.getAction)(f,c.getCallsStatus,"getCallsStatus")({id:y});if(j&&C.status==="failure")throw new r.BundleFailedError(C);return C},{retryCount:g,delay:p});if(!m(A))return;T(()=>R.resolve(A))}catch(A){T(()=>R.reject(A))}},{interval:h,emitOnBegin:!0});return x});return I=v?setTimeout(()=>{S(),clearTimeout(I),_(new d({id:y}))},v):void 0,await w}class d extends e.BaseError{constructor({id:b}){super(`Timed out while waiting for call bundle with id "${b}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}return rn.WaitForCallsStatusTimeoutError=d,rn}var bo={},Oi={},Mb;function fg(){if(Mb)return Oi;Mb=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.uid=t;const e=256;let r=e,n;function t(a=11){if(!n||r+a>e*2){n="",r=0;for(let s=0;s<e;s++)n+=(256+Math.random()*256|0).toString(16).substring(1)}return n.substring(r,r+++a)}return Oi}var Hb;function $u(){if(Hb)return bo;Hb=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.createClient=n,bo.rpcSchema=t;const e=Te(),r=fg();function n(a){const{batch:s,chain:o,ccipRead:i,key:c="base",name:u="Base Client",type:d="base"}=a,f=a.experimental_blockTag??(typeof o?.experimental_preconfirmationTime=="number"?"pending":void 0),b=o?.blockTime??12e3,y=Math.min(Math.max(Math.floor(b/2),500),4e3),h=a.pollingInterval??y,m=a.cacheTime??h,g=a.account?(0,e.parseAccount)(a.account):void 0,{config:p,request:v,value:j}=a.transport({chain:o,pollingInterval:h}),l={...p,...j},w={account:g,batch:s,cacheTime:m,ccipRead:i,chain:o,key:c,name:u,pollingInterval:h,request:v,transport:l,type:d,uid:(0,r.uid)(),...f?{experimental_blockTag:f}:{}};function E(_){return I=>{const S=I(_);for(const x in w)delete S[x];const R={..._,...S};return Object.assign(R,{extend:E(R)})}}return Object.assign(w,{extend:E(w)})}function t(){return null}return bo}var Ci={},xi={},qi={},Mi={},kb;function Ef(){if(kb)return Mi;kb=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.isNullUniversalResolverError=n;const e=ce(),r=or();function n(t){if(!(t instanceof e.BaseError))return!1;const a=t.walk(s=>s instanceof r.ContractFunctionRevertedError);return a instanceof r.ContractFunctionRevertedError?a.data?.errorName==="HttpError"||a.data?.errorName==="ResolverError"||a.data?.errorName==="ResolverNotContract"||a.data?.errorName==="ResolverNotFound"||a.data?.errorName==="ReverseAddressMismatch"||a.data?.errorName==="UnsupportedResolverProfile":!1}return Mi}var Hi={},ki={},Fb;function lg(){if(Fb)return ki;Fb=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.encodedLabelToLabelhash=r;const e=ze();function r(n){if(n.length!==66||n.indexOf("[")!==0||n.indexOf("]")!==65)return null;const t=`0x${n.slice(1,65)}`;return(0,e.isHex)(t)?t:null}return ki}var Nb;function jf(){if(Nb)return Hi;Nb=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.namehash=s;const e=Oe(),r=pe(),n=te(),t=We(),a=lg();function s(o){let i=new Uint8Array(32).fill(0);if(!o)return(0,n.bytesToHex)(i);const c=o.split(".");for(let u=c.length-1;u>=0;u-=1){const d=(0,a.encodedLabelToLabelhash)(c[u]),f=d?(0,r.toBytes)(d):(0,t.keccak256)((0,r.stringToBytes)(c[u]),"bytes");i=(0,t.keccak256)((0,e.concat)([i,f]),"bytes")}return(0,n.bytesToHex)(i)}return Hi}var Fi={},Ni={},$b;function xv(){if($b)return Ni;$b=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.encodeLabelhash=e;function e(r){return`[${r.slice(2)}]`}return Ni}var $i={},zb;function bg(){if(zb)return $i;zb=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.labelhash=a;const e=pe(),r=te(),n=We(),t=lg();function a(s){const o=new Uint8Array(32).fill(0);return s?(0,t.encodedLabelToLabelhash)(s)||(0,n.keccak256)((0,e.stringToBytes)(s)):(0,r.bytesToHex)(o)}return $i}var Ub;function wf(){if(Ub)return Fi;Ub=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.packetToBytes=t;const e=pe(),r=xv(),n=bg();function t(a){const s=a.replace(/^\.|\.$/gm,"");if(s.length===0)return new Uint8Array(1);const o=new Uint8Array((0,e.stringToBytes)(s).byteLength+2);let i=0;const c=s.split(".");for(let u=0;u<c.length;u++){let d=(0,e.stringToBytes)(c[u]);d.byteLength>255&&(d=(0,e.stringToBytes)((0,r.encodeLabelhash)((0,n.labelhash)(c[u])))),o[i]=d.length,o.set(d,i+1),i+=d.length+1}return o.byteLength!==i+1?o.slice(0,i+1):o}return Fi}var Lb;function qv(){if(Lb)return qi;Lb=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.getEnsAddress=b;const e=cr(),r=Vt(),n=Ze(),t=ur(),a=Ut(),s=te(),o=Ef(),i=qu(),c=jf(),u=wf(
44),d=be(),f=Tt();async function b(y,h){const{blockNumber:m,blockTag:g,coinType:p,name:v,gatewayUrls:j,strict:l}=h,{chain:w}=y,E=(()=>{if(h.universalResolverAddress)return h.universalResolverAddress;if(!w)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:m,chain:w,contract:"ensUniversalResolver"})})(),_=w?.ensTlds;if(_&&!_.some(S=>v.endsWith(S)))return null;const I=p!=null?[(0,c.namehash)(v),BigInt(p)]:[(0,c.namehash)(v)];try{const S=(0,n.encodeFunctionData)({abi:e.addressResolverAbi,functionName:"addr",args:I}),R={address:E,abi:e.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,s.toHex)((0,u.packetToBytes)(v)),S,j??[i.localBatchGatewayUrl]],blockNumber:m,blockTag:g},T=await(0,d.getAction)(y,f.readContract,"readContract")(R);if(T[0]==="0x")return null;const A=(0,r.decodeFunctionResult)({abi:e.addressResolverAbi,args:I,functionName:"addr",data:T[0]});return A==="0x"||(0,a.trim)(A)==="0x00"?null:A}catch(S){if(l)throw S;if((0,o.isNullUniversalResolverError)(S))return null;throw S}}return qi}var zi={},Ui={},bt={},Qe={},Db;function Pf(){if(Db)return Qe;Db=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.EnsInvalidChainIdError=Qe.EnsAvatarUnsupportedNamespaceError=Qe.EnsAvatarUriResolutionError=Qe.EnsAvatarInvalidNftUriError=Qe.EnsAvatarInvalidMetadataError=void 0;const e=ce();class r extends e.BaseError{constructor({data:i}){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(i)}`],name:"EnsAvatarInvalidMetadataError"})}}Qe.EnsAvatarInvalidMetadataError=r;class n extends e.BaseError{constructor({reason:i}){super(`ENS NFT avatar URI is invalid. ${i}`,{name:"EnsAvatarInvalidNftUriError"})}}Qe.EnsAvatarInvalidNftUriError=n;class t extends e.BaseError{constructor({uri:i}){super(`Unable to resolve ENS avatar URI "${i}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}Qe.EnsAvatarUriResolutionError=t;class a extends e.BaseError{constructor({namespace:i}){super(`ENS NFT avatar namespace "${i}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}Qe.EnsAvatarUnsupportedNamespaceError=a;class s extends e.BaseError{constructor({chainId:i}){super(`Invalid ENSIP-11 chainId: ${i}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}return Qe.EnsInvalidChainIdError=s,Qe}var Gb;function Mv(){if(Gb)return bt;Gb=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.isImageUri=o,bt.getGateway=i,bt.resolveAvatarUri=c,bt.getJsonImage=u,bt.getMetadataAvatarUri=d,bt.parseAvatarUri=f,bt.parseNftUri=b,bt.getNftTokenUri=y;const e=Tt(),r=Pf(),n=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,t=/^(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,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,a=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,s=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function o(h){try{const m=await fetch(h,{method:"HEAD"});return m.status===200?m.headers.get("content-type")?.startsWith("image/"):!1}catch(m){return typeof m=="object"&&typeof m.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(g=>{const p=new Image;p.onload=()=>{g(!0)},p.onerror=()=>{g(!1)},p.src=h})}}function i(h,m){return h?h.endsWith("/")?h.slice(0,-1):h:m}function c({uri:h,gatewayUrls:m}){const g=a.test(h);if(g)return{uri:h,isOnChain:!0,isEncoded:g};const p=i(m?.ipfs,"https://ipfs.io"),v=i(m?.arweave,"https://arweave.net"),j=h.match(n),{protocol:l,subpath:w,target:E,subtarget:_=""}=j?.groups||{},I=l==="ipns:/"||w==="ipns/",S=l==="ipfs:/"||w==="ipfs/"||t.test(h);if(h.startsWith("http")&&!I&&!S){let x=h;return m?.arweave&&(x=h.replace(/https:\/\/arweave.net/g,m?.arweave)),{uri:x,isOnChain:!1,isEncoded:!1}}if((I||S)&&E)return{uri:`${p}/${I?"ipns":"ipfs"}/${E}${_}`,isOnChain:!1,isEncoded:!1};if(l==="ar:/"&&E)return{uri:`${v}/${E}${_||""}`,isOnChain:!1,isEncoded:!1};let R=h.replace(s,"");if(R.startsWith("<svg")&&(R=`data:image/svg+xml;base64,${btoa(R)}`),R.startsWith("data:")||R.startsWith("{"))return{uri:R,isOnChain:!0,isEncoded:!1};throw new r.EnsAvatarUriResolutionError({uri:h})}function u(h){if(typeof h!="object"||!("image"in h)&&!("image_url"in h)&&!("image_data"in h))throw new r.EnsAvatarInvalidMetadataError({data:h});return h.image||h.image_url||h.image_data}async function d({gatewayUrls:h,uri:m}){try{const g=await fetch(m).then(v=>v.json());return await f({gatewayUrls:h,uri:u(g)})}catch{throw new r.EnsAvatarUriResolutionError({uri:m})}}async function f({gatewayUrls:h,uri:m}){const{uri:g,isOnChain:p}=c({uri:m,gatewayUrls:h});if(p||await o(g))return g;throw new r.EnsAvatarUriResolutionError({uri:m})}function b(h){let m=h;m.startsWith("did:nft:")&&(m=m.replace("did:nft:","").replace(/_/g,"/"));const[g,p,v]=m.split("/"),[j,l]=g.split(":"),[w,E]=p.split(":");if(!j||j.toLowerCase()!=="eip155")throw new r.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!l)throw new r.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!E)throw new r.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!v)throw new r.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!w)throw new r.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(l,10),namespace:w.toLowerCase(),contractAddress:E,tokenID:v}}async function y(h,{nft:m}){if(m.namespace==="erc721")return(0,e.readContract)(h,{address:m.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}
44],functionName:"tokenURI",args:[BigInt(m.tokenID)]});if(m.namespace==="erc1155")return(0,e.readContract)(h,{address:m.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(m.tokenID)]});throw new r.EnsAvatarUnsupportedNamespaceError({namespace:m.namespace})}return bt}var Vb;function Hv(){if(Vb)return Ui;Vb=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.parseAvatarRecord=r;const e=Mv();async function r(t,{gatewayUrls:a,record:s}){return/eip155:/i.test(s)?n(t,{gatewayUrls:a,record:s}):(0,e.parseAvatarUri)({uri:s,gatewayUrls:a})}async function n(t,{gatewayUrls:a,record:s}){const o=(0,e.parseNftUri)(s),i=await(0,e.getNftTokenUri)(t,{nft:o}),{uri:c,isOnChain:u,isEncoded:d}=(0,e.resolveAvatarUri)({uri:i,gatewayUrls:a});if(u&&(c.includes("data:application/json;base64,")||c.startsWith("{"))){const b=d?atob(c.replace("data:application/json;base64,","")):c,y=JSON.parse(b);return(0,e.parseAvatarUri)({uri:(0,e.getJsonImage)(y),gatewayUrls:a})}let f=o.tokenID;return o.namespace==="erc1155"&&(f=f.replace("0x","").padStart(64,"0")),(0,e.getMetadataAvatarUri)({gatewayUrls:a,uri:c.replace(/(?:0x)?{id}/,f)})}return Ui}var Li={},Wb;function mg(){if(Wb)return Li;Wb=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.getEnsText=f;const e=cr(),r=Vt(),n=Ze(),t=ur(),a=te(),s=Ef(),o=qu(),i=jf(),c=wf(),u=be(),d=Tt();async function f(b,y){const{blockNumber:h,blockTag:m,key:g,name:p,gatewayUrls:v,strict:j}=y,{chain:l}=b,w=(()=>{if(y.universalResolverAddress)return y.universalResolverAddress;if(!l)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,t.getChainContractAddress)({blockNumber:h,chain:l,contract:"ensUniversalResolver"})})(),E=l?.ensTlds;if(E&&!E.some(_=>p.endsWith(_)))return null;try{const _={address:w,abi:e.universalResolverResolveAbi,args:[(0,a.toHex)((0,c.packetToBytes)(p)),(0,n.encodeFunctionData)({abi:e.textResolverAbi,functionName:"text",args:[(0,i.namehash)(p),g]}),v??[o.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:h,blockTag:m},S=await(0,u.getAction)(b,d.readContract,"readContract")(_);if(S[0]==="0x")return null;const R=(0,r.decodeFunctionResult)({abi:e.textResolverAbi,functionName:"text",data:S[0]});return R===""?null:R}catch(_){if(j)throw _;if((0,s.isNullUniversalResolverError)(_))return null;throw _}}return Li}var Kb;function kv(){if(Kb)return zi;Kb=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.getEnsAvatar=t;const e=Hv(),r=be(),n=mg();async function t(a,{blockNumber:s,blockTag:o,assetGatewayUrls:i,name:c,gatewayUrls:u,strict:d,universalResolverAddress:f}){const b=await(0,r.getAction)(a,n.getEnsText,"getEnsText")({blockNumber:s,blockTag:o,key:"avatar",name:c,universalResolverAddress:f,gatewayUrls:u,strict:d});if(!b)return null;try{return await(0,e.parseAvatarRecord)(a,{record:b,gatewayUrls:i})}catch{return null}}return zi}var Di={},Zb;function Fv(){if(Zb)return Di;Zb=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.getEnsName=o;const e=cr(),r=ur(),n=Ef(),t=qu(),a=be(),s=Tt();async function o(i,c){const{address:u,blockNumber:d,blockTag:f,coinType:b=60n,gatewayUrls:y,strict:h}=c,{chain:m}=i,g=(()=>{if(c.universalResolverAddress)return c.universalResolverAddress;if(!m)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,r.getChainContractAddress)({blockNumber:d,chain:m,contract:"ensUniversalResolver"})})();try{const p={address:g,abi:e.universalResolverReverseAbi,args:[u,b,y??[t.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:d,blockTag:f},v=(0,a.getAction)(i,s.readContract,"readContract"),[j]=await v(p);return j||null}catch(p){if(h)throw p;if((0,n.isNullUniversalResolverError)(p))return null;throw p}}return Di}var Gi={},Yb;function Nv(){if(Yb)return Gi;Yb=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.getEnsResolver=s;const e=ur(),r=te(),n=wf(),t=be(),a=Tt();async function s(o,i){const{blockNumber:c,blockTag:u,name:d}=i,{chain:f}=o,b=(()=>{if(i.universalResolverAddress)return i.universalResolverAddress;if(!f)throw new Error("client chain not configured. universalResolverAddress is required.");return(0,e.getChainContractAddress)({blockNumber:c,chain:f,contract:"ensUniversalResolver"})})(),y=f?.ensTlds;if(y&&!y.some(m=>d.endsWith(m)))throw new Error(`${d}
44 is not a valid ENS TLD (${y?.join(", ")}) for chain "${f.name}" (id: ${f.id}).`);const[h]=await(0,t.getAction)(o,a.readContract,"readContract")({address:b,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,r.toHex)((0,n.packetToBytes)(d))],blockNumber:c,blockTag:u});return h}return Gi}var Vi={},Jb;function hg(){if(Jb)return Vi;Jb=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.createAccessList=o;const e=Te(),r=te(),n=uf(),t=$r(),a=wt(),s=Pt();async function o(i,c){const{account:u=i.account,blockNumber:d,blockTag:f="latest",blobs:b,data:y,gas:h,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:p,maxPriorityFeePerGas:v,to:j,value:l,...w}=c,E=u?(0,e.parseAccount)(u):void 0;try{(0,s.assertRequest)(c);const I=(typeof d=="bigint"?(0,r.numberToHex)(d):void 0)||f,S=i.chain?.formatters?.transactionRequest?.format,x=(S||a.formatTransactionRequest)({...(0,t.extract)(w,{format:S}),from:E?.address,blobs:b,data:y,gas:h,gasPrice:m,maxFeePerBlobGas:g,maxFeePerGas:p,maxPriorityFeePerGas:v,to:j,value:l},"createAccessList"),T=await i.request({method:"eth_createAccessList",params:[x,I]});return{accessList:T.accessList,gasUsed:BigInt(T.gasUsed)}}catch(_){throw(0,n.getCallError)(_,{...c,account:E,chain:i.chain})}}return Vi}var Wi={},Xb;function $v(){if(Xb)return Wi;Xb=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.createBlockFilter=r;const e=ju();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newBlockFilter"}),a=await n.request({method:"eth_newBlockFilter"});return{id:a,request:t(a),type:"block"}}return Wi}var Ki={},Qb;function yg(){if(Qb)return Ki;Qb=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.createEventFilter=t;const e=Hr(),r=te(),n=ju();async function t(a,{address:s,args:o,event:i,events:c,fromBlock:u,strict:d,toBlock:f}={}){const b=c??(i?[i]:void 0),y=(0,n.createFilterRequestScope)(a,{method:"eth_newFilter"});let h=[];b&&(h=[b.flatMap(p=>(0,e.encodeEventTopics)({abi:[p],eventName:p.name,args:o}))],i&&(h=h[0]));const m=await a.request({method:"eth_newFilter",params:[{address:s,fromBlock:typeof u=="bigint"?(0,r.numberToHex)(u):u,toBlock:typeof f=="bigint"?(0,r.numberToHex)(f):f,...h.length?{topics:h}:{}}]});return{abi:b,args:o,eventName:i?i.name:void 0,fromBlock:u,id:m,request:y(m),strict:!!d,toBlock:f,type:"event"}}return Ki}var Zi={},em;function pg(){if(em)return Zi;em=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.createPendingTransactionFilter=r;const e=ju();async function r(n){const t=(0,e.createFilterRequestScope)(n,{method:"eth_newPendingTransactionFilter"}),a=await n.request({method:"eth_newPendingTransactionFilter"});return{id:a,request:t(a),type:"transaction"}}return Zi}var Yi={},tm;function zv(){if(tm)return Yi;tm=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.getBalance=r;const e=te();async function r(n,{address:t,blockNumber:a,blockTag:s=n.experimental_blockTag??"latest"}){const o=typeof a=="bigint"?(0,e.numberToHex)(a):void 0,i=await n.request({method:"eth_getBalance",params:[t,o||s]});return BigInt(i)}return Yi}var Ji={},rm;function Uv(){if(rm)return Ji;rm=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.getBlobBaseFee=e;async function e(r){const n=await r.request({method:"eth_blobBaseFee"});return BigInt(n)}return Ji}var Xi={},nm;function Lv(){if(nm)return Xi;nm=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.getBlockTransactionCount=n;const e=Ae(),r=te();async function n(t,{blockHash:a,blockNumber:s,blockTag:o="latest"}={}){const i=s!==void 0?(0,r.numberToHex)(s):void 0;let c;return a?c=await t.request({method:"eth_getBlockTransactionCountByHash",params:[a]},{dedupe:!0}):c=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||o]},{dedupe:!!i}),(0,e.hexToNumber)(c)}return Xi}var Qi={},om;function gg(){if(om)return Qi;om=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.getCode=r;const e=te();async function r(n,{address:t,blockNumber:a,blockTag:s="latest"}){const o=a!==void 0?(0,e.numberToHex)(a):void 0,i=await n.request({method:"eth_getCode",params:[t,o||s]},{dedupe:!!o});if(i!=="0x")return i}return Qi}var es={},mo={},am;function Dv(){if(am)return mo;am=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.Eip712DomainNotFoundError=void 0;const e=ce();class r extends e.BaseError{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}return mo.Eip712DomainNotFoundError=r,mo}var im;function Gv(){if(im)return es;im=1,Object.defineProperty(es,"__esModule",{value:!0}),es.getEip712Domain=t;const e=Dv(),r=be(),n=Tt();async function t(s,o){const{address:i,factory:c,factoryData:u}=o;try{const[d,f,b,y,h,m,g]=await(0,r.getAction)(s,n.readContract,"readContract")({abi:a,address:i,functionName:"eip712Domain",factory:c,factoryData:u});return{domain:{name:f,version:b,chainId:Number(y),verifyingContract:h,salt:m},extensions:g,fields:d}}catch(d){const f=d;throw f.name==="ContractFunctionExecutionError"&&f.cause.name==="ContractFunctionZeroDataError"?new e.Eip712DomainNotFoundError({address:i}):f}}const a=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];return es}var ts={},rs={},sm;
44function Vv(){if(sm)return rs;sm=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.formatFeeHistory=e;function e(r){return{baseFeePerGas:r.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:r.gasUsedRatio,oldestBlock:BigInt(r.oldestBlock),reward:r.reward?.map(n=>n.map(t=>BigInt(t)))}}return rs}var cm;function Wv(){if(cm)return ts;cm=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.getFeeHistory=n;const e=te(),r=Vv();async function n(t,{blockCount:a,blockNumber:s,blockTag:o="latest",rewardPercentiles:i}){const c=typeof s=="bigint"?(0,e.numberToHex)(s):void 0,u=await t.request({method:"eth_feeHistory",params:[(0,e.numberToHex)(a),c||o,i]},{dedupe:!!c});return(0,r.formatFeeHistory)(u)}return ts}var ns={},um;function Kv(){if(um)return ns;um=1,Object.defineProperty(ns,"__esModule",{value:!0}),ns.getFilterLogs=n;const e=ko(),r=Gt();async function n(t,{filter:a}){const s=a.strict??!1,i=(await a.request({method:"eth_getFilterLogs",params:[a.id]})).map(c=>(0,r.formatLog)(c));return a.abi?(0,e.parseEventLogs)({abi:a.abi,logs:i,strict:s}):i}return ns}var os={},as={},xd={},is={},dm;function _g(){if(dm)return is;dm=1,Object.defineProperty(is,"__esModule",{value:!0}),is.encodePacked=i;const e=Ee(),r=ht(),n=Ke(),t=Oe(),a=rr(),s=te(),o=Eu();function i(u,d){if(u.length!==d.length)throw new e.AbiEncodingLengthMismatchError({expectedLength:u.length,givenLength:d.length});const f=[];for(let b=0;b<u.length;b++){const y=u[b],h=d[b];f.push(c(y,h))}return(0,t.concatHex)(f)}function c(u,d,f=!1){if(u==="address"){const m=d;if(!(0,n.isAddress)(m))throw new r.InvalidAddressError({address:m});return(0,a.pad)(m.toLowerCase(),{size:f?32:null})}if(u==="string")return(0,s.stringToHex)(d);if(u==="bytes")return d;if(u==="bool")return(0,a.pad)((0,s.boolToHex)(d),{size:f?32:1});const b=u.match(o.integerRegex);if(b){const[m,g,p="256"]=b,v=Number.parseInt(p,10)/8;return(0,s.numberToHex)(d,{size:f?32:v,signed:g==="int"})}const y=u.match(o.bytesRegex);if(y){const[m,g]=y;if(Number.parseInt(g,10)!==(d.length-2)/2)throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(g,10),givenSize:(d.length-2)/2});return(0,a.pad)(d,{dir:"right",size:f?32:null})}const h=u.match(o.arrayRegex);if(h&&Array.isArray(d)){const[m,g]=h,p=[];for(let v=0;v<d.length;v++)p.push(c(g,d[v],!0));return p.length===0?"0x":(0,t.concatHex)(p)}throw new e.UnsupportedPackedAbiType(u)}return is}var nn={},ss={},fm;function Af(){if(fm)return ss;fm=1,Object.defineProperty(ss,"__esModule",{value:!0}),ss.isBytes=e;function e(r){return!r||typeof r!="object"||!("BYTES_PER_ELEMENT"in r)?!1:r.BYTES_PER_ELEMENT===1&&r.constructor.name==="Uint8Array"}return ss}var lm;function vg(){if(lm)return nn;lm=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.getContractAddress=c,nn.getCreateAddress=u,nn.getCreate2Address=d;const e=Oe(),r=Af(),n=rr(),t=at(),a=pe(),s=Bo(),o=We(),i=rt();function c(f){return f.opcode==="CREATE2"?d(f):u(f)}function u(f){const b=(0,a.toBytes)((0,i.getAddress)(f.from));let y=(0,a.toBytes)(f.nonce);return y[0]===0&&(y=new Uint8Array([])),(0,i.getAddress)(`0x${(0,o.keccak256)((0,s.toRlp)([b,y],"bytes")).slice(26)}`)}function d(f){const b=(0,a.toBytes)((0,i.getAddress)(f.from)),y=(0,n.pad)((0,r.isBytes)(f.salt)?f.salt:(0,a.toBytes)(f.salt),{size:32}),h="bytecodeHash"in f?(0,r.isBytes)(f.bytecodeHash)?f.bytecodeHash:(0,a.toBytes)(f.bytecodeHash):(0,o.keccak256)(f.bytecode,"bytes");return(0,i.getAddress)((0,t.slice)((0,o.keccak256)((0,e.concat)([(0,a.toBytes)("0xff"),b,y,h])),12))}return nn}var cs={},ho={},Qt={},bm;function zu(){if(bm)return Qt;bm=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.assertTransactionEIP7702=f,Qt.assertTransactionEIP4844=b,Qt.assertTransactionEIP1559=y,Qt.assertTransactionEIP2930=h,Qt.assertTransactionLegacy=m;const e=Qp(),r=Qd(),n=ht(),t=ce(),a=eg(),s=No(),o=Dt(),i=Ke(),c=Ve(),u=at(),d=Ae();function f(g){const{authorizationList:p}=g;if(p)for(const v of p){const{chainId:j}=v,l=v.address;if(!(0,i.isAddress)(l))throw new n.InvalidAddressError({address:l});if(j<0)throw new s.InvalidChainIdError({chainId:j})}y(g)}function b(g){const{blobVersionedHashes:p}=g;if(p){if(p.length===0)throw new a.EmptyBlobError;for(const v of p){const j=(0,c.size)(v),l=(0,d.hexToNumber)((0,u.slice)(v,0,1));if(j!==32)throw new a.InvalidVersionedHashSizeError({hash:v,size:j});if(l!==e.versionedHashVersionKzg)throw new a.InvalidVersionedHashVersionError({hash:v,version:l})}}y(g)}function y(g){const{chainId:p,maxPriorityFeePerGas:v,maxFeePerGas:j,to:l}=g;if(p<=0)throw new s.InvalidChainIdError({chainId:p});if(l&&!(0,i.isAddress)(l))throw new n.InvalidAddressError({address:l});if(j&&j>r.maxUint256)throw new o.FeeCapTooHighError({maxFeePerGas:j});if(v&&j&&v>j)throw new o.TipAboveFeeCapError({maxFeePerGas:j,maxPriorityFeePerGas:v})}function h(g){const{chainId:p,maxPriorityFeePerGas:v,gasPrice:j,maxFeePerGas:l,to:w}=g;if(p<=0)throw new s.InvalidChainIdError({chainId:p});if(w&&!(0,i.isAddress)(w))throw new n.InvalidAddressError({address:w});if(v||l)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(j&&j>r.maxUint256)throw new o.FeeCapTooHighError({maxFeePerGas:j})}function m(g){const{chainId:p,maxPriorityFeePerGas:v,gasPrice:j,maxFeePerGas:l,to:w}=g;if(w&&!(0,i.isAddress)(w))throw new n.InvalidAddressError({address:w});if(typeof p<"u"&&p<=0)throw new s.InvalidChainIdError({chainId:p});if(v||l)throw new t.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(j&&j>r.maxUint256)throw new o.FeeCapTooHighError({maxFeePerGas:j})}return Qt}var us={},mm;function Tf(){if(mm)return us;mm=1,Object.defineProperty(us,"__esModule",{value:!0}),us.serializeAccessList=t;const e=ht(),r=Ue(),n=Ke();function t(a){if(!a||a.length===0)return[];const s=[];for(let o=0;o<a.length;o++){const{address:i,storageKeys:c}=a[o];for(let u=0;u<c.length;u++)if(c[u].length-2!==64)throw new r.InvalidStorageKeySizeError({storageKey:c[u]});if(!(0,n.isAddress)(i,{strict:!1}))throw new e.InvalidAddressError({address:i});s.push([i,c])}return s}return us}var hm;
44function Uu(){if(hm)return ho;hm=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.serializeTransaction=y,ho.toYParitySignatureArray=j;const e=Ue(),r=Eg(),n=Ru(),t=Bu(),a=of(),s=Ou(),o=Oe(),i=Ut(),c=te(),u=Bo(),d=zu(),f=Cu(),b=Tf();function y(l,w){const E=(0,f.getTransactionType)(l);return E==="eip1559"?g(l,w):E==="eip2930"?p(l,w):E==="eip4844"?m(l,w):E==="eip7702"?h(l,w):v(l,w)}function h(l,w){const{authorizationList:E,chainId:_,gas:I,nonce:S,to:R,value:x,maxFeePerGas:T,maxPriorityFeePerGas:A,accessList:C,data:k}=l;(0,d.assertTransactionEIP7702)(l);const B=(0,b.serializeAccessList)(C),P=(0,r.serializeAuthorizationList)(E);return(0,o.concatHex)(["0x04",(0,u.toRlp)([(0,c.numberToHex)(_),S?(0,c.numberToHex)(S):"0x",A?(0,c.numberToHex)(A):"0x",T?(0,c.numberToHex)(T):"0x",I?(0,c.numberToHex)(I):"0x",R??"0x",x?(0,c.numberToHex)(x):"0x",k??"0x",B,P,...j(l,w)])])}function m(l,w){const{chainId:E,gas:_,nonce:I,to:S,value:R,maxFeePerBlobGas:x,maxFeePerGas:T,maxPriorityFeePerGas:A,accessList:C,data:k}=l;(0,d.assertTransactionEIP4844)(l);let B=l.blobVersionedHashes,P=l.sidecars;if(l.blobs&&(typeof B>"u"||typeof P>"u")){const N=typeof l.blobs[0]=="string"?l.blobs:l.blobs.map(D=>(0,c.bytesToHex)(D)),z=l.kzg,$=(0,n.blobsToCommitments)({blobs:N,kzg:z});if(typeof B>"u"&&(B=(0,a.commitmentsToVersionedHashes)({commitments:$})),typeof P>"u"){const D=(0,t.blobsToProofs)({blobs:N,commitments:$,kzg:z});P=(0,s.toBlobSidecars)({blobs:N,commitments:$,proofs:D})}}const q=(0,b.serializeAccessList)(C),F=[(0,c.numberToHex)(E),I?(0,c.numberToHex)(I):"0x",A?(0,c.numberToHex)(A):"0x",T?(0,c.numberToHex)(T):"0x",_?(0,c.numberToHex)(_):"0x",S??"0x",R?(0,c.numberToHex)(R):"0x",k??"0x",q,x?(0,c.numberToHex)(x):"0x",B??[],...j(l,w)],M=[],O=[],H=[];if(P)for(let N=0;N<P.length;N++){const{blob:z,commitment:$,proof:D}=P[N];M.push(z),O.push($),H.push(D)}return(0,o.concatHex)(["0x03",P?(0,u.toRlp)([F,M,O,H]):(0,u.toRlp)(F)])}function g(l,w){const{chainId:E,gas:_,nonce:I,to:S,value:R,maxFeePerGas:x,maxPriorityFeePerGas:T,accessList:A,data:C}=l;(0,d.assertTransactionEIP1559)(l);const k=(0,b.serializeAccessList)(A),B=[(0,c.numberToHex)(E),I?(0,c.numberToHex)(I):"0x",T?(0,c.numberToHex)(T):"0x",x?(0,c.numberToHex)(x):"0x",_?(0,c.numberToHex)(_):"0x",S??"0x",R?(0,c.numberToHex)(R):"0x",C??"0x",k,...j(l,w)];return(0,o.concatHex)(["0x02",(0,u.toRlp)(B)])}function p(l,w){const{chainId:E,gas:_,data:I,nonce:S,to:R,value:x,accessList:T,gasPrice:A}=l;(0,d.assertTransactionEIP2930)(l);const C=(0,b.serializeAccessList)(T),k=[(0,c.numberToHex)(E),S?(0,c.numberToHex)(S):"0x",A?(0,c.numberToHex)(A):"0x",_?(0,c.numberToHex)(_):"0x",R??"0x",x?(0,c.numberToHex)(x):"0x",I??"0x",C,...j(l,w)];return(0,o.concatHex)(["0x01",(0,u.toRlp)(k)])}function v(l,w){const{chainId:E=0,gas:_,data:I,nonce:S,to:R,value:x,gasPrice:T}=l;(0,d.assertTransactionLegacy)(l);let A=[S?(0,c.numberToHex)(S):"0x",T?(0,c.numberToHex)(T):"0x",_?(0,c.numberToHex)(_):"0x",R??"0x",x?(0,c.numberToHex)(x):"0x",I??"0x"];if(w){const C=(()=>{if(w.v>=35n)return(w.v-35n)/2n>0?w.v:27n+(w.v===35n?0n:1n);if(E>0)return BigInt(E*2)+BigInt(35n+w.v-27n);const P=27n+(w.v===27n?0n:1n);if(w.v!==P)throw new e.InvalidLegacyVError({v:w.v});return P})(),k=(0,i.trim)(w.r),B=(0,i.trim)(w.s);A=[...A,(0,c.numberToHex)(C),k==="0x00"?"0x":k,B==="0x00"?"0x":B]}else E>0&&(A=[...A,(0,c.numberToHex)(E),"0x","0x"]);return(0,u.toRlp)(A)}function j(l,w){const E=w??l,{v:_,yParity:I}=E;if(typeof E.r>"u")return[];if(typeof E.s>"u")return[];if(typeof _>"u"&&typeof I>"u")return[];const S=(0,i.trim)(E.r),R=(0,i.trim)(E.s);return[typeof I=="number"?I?(0,c.numberToHex)(1):"0x":_===0n?"0x":_===1n?(0,c.numberToHex)(1):_===27n?"0x":(0,c.numberToHex)(1),S==="0x00"?"0x":S,R==="0x00"?"0x":R]}return ho}var ym;function Eg(){if(ym)return cs;ym=1,Object.defineProperty(cs,"__esModule",{value:!0}),cs.serializeAuthorizationList=n;const e=te(),r=Uu();function n(t){if(!t||t.length===0)return[];const a=[];for(const s of t){const{chainId:o,nonce:i,...c}=s,u=s.address;a.push([o?(0,e.toHex)(o):"0x",u,i?(0,e.toHex)(i):"0x",...(0,r.toYParitySignatureArray)({},c)])}return a}return cs}var ds={},pm;function jg(){if(pm)return ds;pm=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.verifyAuthorization=t;const e=rt(),r=gt(),n=Oo();async function t({address:a,authorization:s,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(a),await(0,n.recoverAuthorizationAddress)({authorization:s,signature:o}))}return ds}var yo={},qd={},gm;
44function Zv(){return gm||(gm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.promiseCache=void 0,e.withDedupe=n;const r=yn();e.promiseCache=new r.LruMap(8192);function n(t,{enabled:a=!0,id:s}){if(!a||!s)return t();if(e.promiseCache.get(s))return e.promiseCache.get(s);const o=t().finally(()=>e.promiseCache.delete(s));return e.promiseCache.set(s,o),o}})(qd)),qd}var _m;function wg(){if(_m)return yo;_m=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.buildRequest=i,yo.shouldRetry=c;const e=ce(),r=pt(),n=ar(),t=te(),a=Zv(),s=Nu(),o=qe();function i(u,d={}){return async(f,b={})=>{const{dedupe:y=!1,methods:h,retryDelay:m=150,retryCount:g=3,uid:p}={...d,...b},{method:v}=f;if(h?.exclude?.includes(v))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:v});if(h?.include&&!h.include.includes(v))throw new n.MethodNotSupportedRpcError(new Error("method not supported"),{method:v});const j=y?(0,t.stringToHex)(`${p}.${(0,o.stringify)(f)}`):void 0;return(0,a.withDedupe)(()=>(0,s.withRetry)(async()=>{try{return await u(f)}catch(l){const w=l;switch(w.code){case n.ParseRpcError.code:throw new n.ParseRpcError(w);case n.InvalidRequestRpcError.code:throw new n.InvalidRequestRpcError(w);case n.MethodNotFoundRpcError.code:throw new n.MethodNotFoundRpcError(w,{method:f.method});case n.InvalidParamsRpcError.code:throw new n.InvalidParamsRpcError(w);case n.InternalRpcError.code:throw new n.InternalRpcError(w);case n.InvalidInputRpcError.code:throw new n.InvalidInputRpcError(w);case n.ResourceNotFoundRpcError.code:throw new n.ResourceNotFoundRpcError(w);case n.ResourceUnavailableRpcError.code:throw new n.ResourceUnavailableRpcError(w);case n.TransactionRejectedRpcError.code:throw new n.TransactionRejectedRpcError(w);case n.MethodNotSupportedRpcError.code:throw new n.MethodNotSupportedRpcError(w,{method:f.method});case n.LimitExceededRpcError.code:throw new n.LimitExceededRpcError(w);case n.JsonRpcVersionUnsupportedError.code:throw new n.JsonRpcVersionUnsupportedError(w);case n.UserRejectedRequestError.code:throw new n.UserRejectedRequestError(w);case n.UnauthorizedProviderError.code:throw new n.UnauthorizedProviderError(w);case n.UnsupportedProviderMethodError.code:throw new n.UnsupportedProviderMethodError(w);case n.ProviderDisconnectedError.code:throw new n.ProviderDisconnectedError(w);case n.ChainDisconnectedError.code:throw new n.ChainDisconnectedError(w);case n.SwitchChainError.code:throw new n.SwitchChainError(w);case n.UnsupportedNonOptionalCapabilityError.code:throw new n.UnsupportedNonOptionalCapabilityError(w);case n.UnsupportedChainIdError.code:throw new n.UnsupportedChainIdError(w);case n.DuplicateIdError.code:throw new n.DuplicateIdError(w);case n.UnknownBundleIdError.code:throw new n.UnknownBundleIdError(w);case n.BundleTooLargeError.code:throw new n.BundleTooLargeError(w);case n.AtomicReadyWalletRejectedUpgradeError.code:throw new n.AtomicReadyWalletRejectedUpgradeError(w);case n.AtomicityNotSupportedError.code:throw new n.AtomicityNotSupportedError(w);case 5e3:throw new n.UserRejectedRequestError(w);default:throw l instanceof e.BaseError?l:new n.UnknownRpcError(w)}}},{delay:({count:l,error:w})=>{if(w&&w instanceof r.HttpRequestError){const E=w?.headers?.get("Retry-After");if(E?.match(/\d/))return Number.parseInt(E,10)*1e3}return~~(1<<l)*m},retryCount:g,shouldRetry:({error:l})=>c(l)}),{enabled:y,id:j})}}function c(u){return"code"in u&&typeof u.code=="number"?u.code===-1||u.code===n.LimitExceededRpcError.code||u.code===n.InternalRpcError.code:u instanceof r.HttpRequestError&&u.status?u.status===403||u.status===408||u.status===4
4413||u.status===429||u.status===500||u.status===502||u.status===503||u.status===504:!0}return yo}var fs={},vm;function Pg(){if(vm)return fs;vm=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.defineChain=e;function e(r){return{formatters:void 0,fees:void 0,serializers:void 0,...r}}return fs}var ls={},Em;function Ag(){if(Em)return ls;Em=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.extractChain=e;function e({chains:r,id:n}){return r.find(t=>t.id===n)}return ls}var bs={},jm;function If(){if(jm)return bs;jm=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.fromRlp=s;const e=ce(),r=mn(),n=Io(),t=pe(),a=te();function s(u,d="hex"){const f=(()=>{if(typeof u=="string"){if(u.length>3&&u.length%2!==0)throw new r.InvalidHexValueError(u);return(0,t.hexToBytes)(u)}return u})(),b=(0,n.createCursor)(f,{recursiveReadLimit:Number.POSITIVE_INFINITY});return o(b,d)}function o(u,d="hex"){if(u.bytes.length===0)return d==="hex"?(0,a.bytesToHex)(u.bytes):u.bytes;const f=u.readByte();if(f<128&&u.decrementPosition(1),f<192){const y=i(u,f,128),h=u.readBytes(y);return d==="hex"?(0,a.bytesToHex)(h):h}const b=i(u,f,192);return c(u,b,d)}function i(u,d,f){if(f===128&&d<128)return 1;if(d<=f+55)return d-f;if(d===f+55+1)return u.readUint8();if(d===f+55+2)return u.readUint16();if(d===f+55+3)return u.readUint24();if(d===f+55+4)return u.readUint32();throw new e.BaseError("Invalid RLP prefix")}function c(u,d,f){const b=u.position,y=[];for(;u.position-b<d;)y.push(o(u,f));return y}return bs}var ms={},wm;function Sf(){if(wm)return ms;wm=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.isHash=n;const e=ze(),r=Ve();function n(t){return(0,e.isHex)(t)&&(0,r.size)(t)===32}return ms}var hs={},wr={},Fe={},Pm;function Yv(){if(Pm)return Fe;Pm=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.ripemd160=Fe.RIPEMD160=Fe.md5=Fe.MD5=Fe.sha1=Fe.SHA1=void 0;const e=Dp(),r=xr(),n=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),t=new Uint32Array(80);class a extends e.HashMD{constructor(){super(64,20,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0}get(){const{A:S,B:R,C:x,D:T,E:A}=this;return[S,R,x,T,A]}set(S,R,x,T,A){this.A=S|0,this.B=R|0,this.C=x|0,this.D=T|0,this.E=A|0}process(S,R){for(let B=0;B<16;B++,R+=4)t[B]=S.getUint32(R,!1);for(let B=16;B<80;B++)t[B]=(0,r.rotl)(t[B-3]^t[B-8]^t[B-14]^t[B-16],1);let{A:x,B:T,C:A,D:C,E:k}=this;for(let B=0;B<80;B++){let P,q;B<20?(P=(0,e.Chi)(T,A,C),q=1518500249):B<40?(P=T^A^C,q=1859775393):B<60?(P=(0,e.Maj)(T,A,C),q=2400959708):(P=T^A^C,q=3395469782);const F=(0,r.rotl)(x,5)+P+k+q+t[B]|0;k=C,C=A,A=(0,r.rotl)(T,30),T=x,x=F}x=x+this.A|0,T=T+this.B|0,A=A+this.C|0,C=C+this.D|0,k=k+this.E|0,this.set(x,T,A,C,k)}roundClean(){(0,r.clean)(t)}destroy(){this.set(0,0,0,0,0),(0,r.clean)(this.buffer)}}Fe.SHA1=a,Fe.sha1=(0,r.createHasher)(()=>new a);const s=Math.pow(2,32),o=Array.from({length:64},(I,S)=>Math.floor(s*Math.abs(Math.sin(S+1)))),i=n.slice(0,4),c=new Uint32Array(16);class u extends e.HashMD{constructor(){super(64,16,8,!0),this.A=i[0]|0,this.B=i[1]|0,this.C=i[2]|0,this.D=i[3]|0}get(){const{A:S,B:R,C:x,D:T}=this;return[S,R,x,T]}set(S,R,x,T){this.A=S|0,this.B=R|0,this.C=x|0,this.D=T|0}process(S,R){for(let k=0;k<16;k++,R+=4)c[k]=S.getUint32(R,!0);let{A:x,B:T,C:A,D:C}=this;for(let k=0;k<64;k++){let B,P,q;k<16?(B=(0,e.Chi)(T,A,C),P=k,q=[7,12,17,22]):k<32?(B=(0,e.Chi)(C,T,A),P=(5*k+1)%16,q=[5,9,14,20]):k<48?(B=T^A^C,P=(3*k+5)%16,q=[4,11,16,23]):(B=A^(T|~C),P=7*k%16,q=[6,10,15,21]),B=B+x+o[k]+c[P],x=C,C=A,A=T,T=T+(0,r.rotl)(B,q[k%4])}x=x+this.A|0,T=T+this.B|0,A=A+this.C|0,C=C+this.D|0,this.set(x,T,A,C)}roundClean(){(0,r.clean)(c)}destroy(){this.set(0,0,0,0),(0,r.clean)(this.buffer)}}Fe.MD5=u,Fe.md5=(0,r.createHasher)(()=>new u);const d=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),f=Uint8Array.from(new Array(16).fill(0).map((I,S)=>S)),b=f.map(I=>(9*I+5)%16),y=(()=>{const R=[[f],[b]];for(let x=0;x<4;x++)for(let T of R)T.push(T[x].map(A=>d[A]));return R})(),h=y[0],m=y[1],g=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(I=>Uint8Array.from(I)),p=h.map((I,S)=>I.map(R=>g[S][R])),v=m.map((I,S)=>I.map(R=>g[S][R])),j=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),l=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function w(I,S,R,x){return I===0?S^R^x:I===1?S&R|~S&x:I===2?(S|~R)^x:I===3?S&x|R&~x:S^(R|~x)}const E=new Uint32Array(16);class _ extends e.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:S,h1:R,h2:x,h3:T,h4:A}=this;return[S,R,x,T,A]}set(S,R,x,T,A){this.h0=S|0,this.h1=R|0,this.h2=x|0,this.h3=T|0,this.h4=A|0}process(S,R){for(let O=0;O<16;O++,R+=4)E[O]=S.getUint32(R,!0);let x=this.h0|0,T=x,A=this.h1|0,C=A,k=this.h2|0,B=k,P=this.h3|0,q=P,F=this.h4|0,M=F;for(let O=0;O<5;O++){const H=4-O,N=j[O],z=l[O],$=h[O],D=m[O],G=p[O],Y=v[O];for(let Z=0;Z<16;Z++){const W=(0,r.rotl)(x+w(O,A,k,P)+E[$[Z]]+N,G[Z])+F|0;x=F,F=P,P=(0,r.rotl)(k,10)|0,k=A,A=W}for(let Z=0;Z<16;Z++){const W=(0,r.rotl)(T+w(H,C,B,q)+E[D[Z]]+z,Y[Z])+M|0;T=M,M=q,q=(0,r.rotl)(B,10)|0,B=C,C=W}}
44this.set(this.h1+k+q|0,this.h2+P+M|0,this.h3+F+T|0,this.h4+x+C|0,this.h0+A+B|0)}roundClean(){(0,r.clean)(E)}destroy(){this.destroyed=!0,(0,r.clean)(this.buffer),this.set(0,0,0,0,0)}}return Fe.RIPEMD160=_,Fe.ripemd160=(0,r.createHasher)(()=>new _),Fe}var Am;function Tg(){if(Am)return wr;Am=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.ripemd160=wr.RIPEMD160=void 0;const e=Yv();return wr.RIPEMD160=e.RIPEMD160,wr.ripemd160=e.ripemd160,wr}var Tm;function Ig(){if(Tm)return hs;Tm=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.ripemd160=a;const e=Tg(),r=ze(),n=pe(),t=te();function a(s,o){const i=o||"hex",c=(0,e.ripemd160)((0,r.isHex)(s,{strict:!1})?(0,n.toBytes)(s):s);return i==="bytes"?c:(0,t.toHex)(c)}return hs}var Md={},Im;function Sg(){return Im||(Im=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventHash=void 0;var r=vu();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(Md)),Md}var Hd={},Sm;function Rg(){return Sm||(Sm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toEventSignature=void 0;var r=Gd();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return r.toSignature}})})(Hd)),Hd}var kd={},Rm;function Bg(){return Rm||(Rm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionHash=void 0;var r=vu();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return r.toSignatureHash}})})(kd)),kd}var Fd={},Bm;function Og(){return Bm||(Bm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toFunctionSignature=void 0;var r=Gd();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return r.toSignature}})})(Fd)),Fd}var Pr={},Om;function Cg(){if(Om)return Pr;Om=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.nonceManager=void 0,Pr.createNonceManager=n,Pr.jsonRpc=t;const e=Su(),r=yn();function n(a){const{source:s}=a,o=new Map,i=new r.LruMap(8192),c=new Map,u=({address:d,chainId:f})=>`${d}.${f}`;return{async consume({address:d,chainId:f,client:b}){const y=u({address:d,chainId:f}),h=this.get({address:d,chainId:f,client:b});this.increment({address:d,chainId:f});const m=await h;return await s.set({address:d,chainId:f},m),i.set(y,m),m},async increment({address:d,chainId:f}){const b=u({address:d,chainId:f}),y=o.get(b)??0;o.set(b,y+1)},async get({address:d,chainId:f,client:b}){const y=u({address:d,chainId:f});let h=c.get(y);return h||(h=(async()=>{try{const g=await s.get({address:d,chainId:f,client:b}),p=i.get(y)??0;return p>0&&g<=p?p+1:(i.delete(y),g)}finally{this.reset({address:d,chainId:f})}})(),c.set(y,h)),(o.get(y)??0)+await h},reset({address:d,chainId:f}){const b=u({address:d,chainId:f});o.delete(b),c.delete(b)}}}function t(){return{async get(a){const{address:s,client:o}=a;return(0,e.getTransactionCount)(o,{address:s,blockTag:"pending"})},set(){}}}return Pr.nonceManager=n({source:t()}),Pr}var on={},ys={},ps={},Cm;function Rf(){if(Cm)return ps;Cm=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.withTimeout=e;function e(r,{errorInstance:n=new Error("timed out"),timeout:t,signal:a}){return new Promise((s,o)=>{(async()=>{let i;try{const c=new AbortController;t>0&&(i=setTimeout(()=>{a?c.abort():o(n)},t)),s(await r({signal:c?.signal||null}))}catch(c){c?.name==="AbortError"&&o(n),o(c)}finally{clearTimeout(i)}})()})}return ps}var po={},xm;function xg(){if(xm)return po;xm=1,Object.defineProperty(po,"__esModule",{value:!0}),po.idCache=void 0;function e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}return po.idCache=e(),po}var qm;function Bf(){if(qm)return ys;qm=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.getHttpRpcClient=a;const e=pt(),r=Rf(),n=qe(),t=xg();function a(s,o={}){return{async request(i){const{body:c,fetchFn:u=o.fetchFn??fetch,onRequest:d=o.onRequest,onResponse:f=o.onResponse,timeout:b=o.timeout??1e4}=i,y={...o.fetchOptions??{},...i.fetchOptions??{}},{headers:h,method:m,signal:g}=y;try{const p=await(0,r.withTimeout)(async({signal:j})=>{const l={...y,body:Array.isArray(c)?(0,n.stringify)(c.map(I=>({jsonrpc:"2.0",id:I.id??t.idCache.take(),...I}))):(0,n.stringify)({jsonrpc:"2.0",id:c.id??t.idCache.take(),...c}),headers:{"Content-Type":"application/json",...h},method:m||"POST",signal:g||(b>0?j:null)}
44,w=new Request(s,l),E=await d?.(w,l)??{...l,url:s};return await u(E.url??s,E)},{errorInstance:new e.TimeoutError({body:c,url:s}),timeout:b,signal:!0});f&&await f(p);let v;if(p.headers.get("Content-Type")?.startsWith("application/json"))v=await p.json();else{v=await p.text();try{v=JSON.parse(v||"{}")}catch(j){if(p.ok)throw j;v={error:v}}}if(!p.ok)throw new e.HttpRequestError({body:c,details:(0,n.stringify)(v.error)||p.statusText,headers:p.headers,status:p.status,url:s});return v}catch(p){throw p instanceof e.HttpRequestError||p instanceof e.TimeoutError?p:new e.HttpRequestError({body:c,cause:p,url:s})}}}}return ys}var gs={},Nd={},Mm;function qg(){return Mm||(Mm=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.socketClientCache=void 0,e.getSocketRpcClient=s;const r=pt(),n=ff(),t=Rf(),a=xg();e.socketClientCache=new Map;async function s(o){const{getSocket:i,keepAlive:c=!0,key:u="socket",reconnect:d=!0,url:f}=o,{interval:b=3e4}=typeof c=="object"?c:{},{attempts:y=5,delay:h=2e3}=typeof d=="object"?d:{},m=JSON.stringify({keepAlive:c,key:u,url:f,reconnect:d});let g=e.socketClientCache.get(m);
44if(g)return g;let p=0;const{schedule:v}=(0,n.createBatchScheduler)({id:m,fn:async()=>{const w=new Map,E=new Map;let _,I,S,R=!1;function x(){if(d&&p<y){if(R)return;R=!0,p++,I?.close(),setTimeout(async()=>{await T().catch(console.error),R=!1},h)}else w.clear(),E.clear()}async function T(){const A=await i({onClose(){for(const C of w.values())C.onError?.(new r.SocketClosedError({url:f}));for(const C of E.values())C.onError?.(new r.SocketClosedError({url:f}));x()},onError(C){_=C;for(const k of w.values())k.onError?.(_);for(const k of E.values())k.onError?.(_);x()},onOpen(){_=void 0,p=0},onResponse(C){const k=C.method==="eth_subscription",B=k?C.params.subscription:C.id,P=k?E:w,q=P.get(B);q&&q.onResponse(C),k||P.delete(B)}});if(I=A,c&&(S&&clearInterval(S),S=setInterval(()=>I.ping?.(),b)),d&&E.size>0){const C=E.entries();for(const[k,{onResponse:B,body:P,onError:q}]of C)P&&(E.delete(k),g?.request({body:P,onResponse:B,onError:q}))}return A}return await T(),_=void 0,g={close(){S&&clearInterval(S),I.close(),e.socketClientCache.delete(m)},get socket(){return I},request({body:A,onError:C,onResponse:k}){_&&C&&C(_);const B=A.id??a.idCache.take(),P=q=>{typeof q.id=="number"&&B!==q.id||(A.method==="eth_subscribe"&&typeof q.result=="string"&&E.set(q.result,{onResponse:P,onError:C,body:A}),A.method==="eth_unsubscribe"&&E.delete(A.params?.[0]),k(q))};w.set(B,{onResponse:P,onError:C});try{I.request({body:{jsonrpc:"2.0",id:B,...A}})}catch(q){C?.(q)}},requestAsync({body:A,timeout:C=1e4}){return(0,t.withTimeout)(()=>new Promise((k,B)=>this.request({body:A,onError:B,onResponse:k})),{errorInstance:new r.TimeoutError({body:A,url:f}),timeout:C})},requests:w,subscriptions:E,url:f},e.socketClientCache.set(m,g),[g]}}),[j,[l]]=await v();return l}})(Nd)),Nd}const Jv=X_(rv);var Hm;function Of(){if(Hm)return gs;Hm=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.getWebSocketRpcClient=n;const e=pt(),r=qg();async function n(t,a={}){const{keepAlive:s,reconnect:o}=a;return(0,r.getSocketRpcClient)({async getSocket({onClose:i,onError:c,onOpen:u,onResponse:d}){const f=await Promise.resolve().then(()=>Jv).then(g=>g.WebSocket),b=new f(t);function y(){b.removeEventListener("close",y),b.removeEventListener("message",h),b.removeEventListener("error",c),b.removeEventListener("open",u),i()}function h({data:g}){if(!(typeof g=="string"&&g.trim().length===0))try{const p=JSON.parse(g);d(p)}catch(p){c(p)}}b.addEventListener("close",y),b.addEventListener("message",h),b.addEventListener("error",c),b.addEventListener("open",u),b.readyState===f.CONNECTING&&await new Promise((g,p)=>{b&&(b.onopen=g,b.onerror=p)});const{close:m}=b;return Object.assign(b,{close(){m.bind(b)(),y()},ping(){try{if(b.readyState===b.CLOSED||b.readyState===b.CLOSING)throw new e.WebSocketRequestError({url:b.url,cause:new e.SocketClosedError({url:b.url})});const g={jsonrpc:"2.0",id:null,method:"net_version",params:[]};b.send(JSON.stringify(g))}catch(g){c(g)}},request({body:g}){if(b.readyState===b.CLOSED||b.readyState===b.CLOSING)throw new e.WebSocketRequestError({body:g,url:b.url,cause:new e.SocketClosedError({url:b.url})});return b.send(JSON.stringify(g))}})},keepAlive:s,reconnect:o,url:t})}return gs}var km;function Mg(){if(km)return on;km=1,Object.defineProperty(on,"__esModule",{value:!0}),on.rpc=void 0,on.getSocket=a;const e=Bf(),r=Of();function n(s,{body:o,onError:i,onResponse:c}){return s.request({body:o,onError:i,onResponse:c}),s}async function t(s,{body:o,timeout:i=1e4}){return s.requestAsync({body:o,timeout:i})}async function a(s){const o=await(0,r.getWebSocketRpcClient)(s);return Object.assign(o.socket,{requests:o.requests,subscriptions:o.subscriptions})}return on.rpc={http(s,o){return(0,e.getHttpRpcClient)(s).request(o)},webSocket:n,webSocketAsync:t},on}var _s={},vs={},go={},Fm;function Hg(){return Fm||(Fm=1,Object.defineProperty(go,"__esModule",{value:!0}),go.presignMessagePrefix=void 0,go.presignMessagePrefix=`�Ethereum Signed Message: 45`),go}var Nm;function kg(){if(Nm)return vs;Nm=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.toPrefixedMessage=a;const e=Hg(),r=Oe(),n=Ve(),t=te();function a(s){const o=typeof s=="string"?(0,t.stringToHex)(s):typeof s.raw=="string"?s.raw:(0,t.bytesToHex)(s.raw),i=(0,t.stringToHex)(`${e.presignMessagePrefix}${(0,n.size)(o)}`);
45return(0,r.concat)([i,o])}return vs}var $m;function Go(){if($m)return _s;$m=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.hashMessage=n;const e=We(),r=kg();function n(t,a){return(0,e.keccak256)((0,r.toPrefixedMessage)(t),a)}return _s}var Ar={},Tr={},$t={},zm;function Fg(){if(zm)return $t;zm=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.InvalidStructTypeError=$t.InvalidPrimaryTypeError=$t.InvalidDomainError=void 0;const e=qe(),r=ce();class n extends r.BaseError{constructor({domain:o}){super(`Invalid domain "${(0,e.stringify)(o)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}$t.InvalidDomainError=n;class t extends r.BaseError{constructor({primaryType:o,types:i}){super(`Invalid primary type \`${o}\` must be one of \`${JSON.stringify(Object.keys(i))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}$t.InvalidPrimaryTypeError=t;class a extends r.BaseError{constructor({type:o}){super(`Struct type "${o}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}return $t.InvalidStructTypeError=a,$t}var Um;function Lu(){if(Um)return Tr;Um=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.serializeTypedData=u,Tr.validateTypedData=d,Tr.getTypesForEIP712Domain=f,Tr.domainSeparator=b;const e=Ee(),r=ht(),n=Fg(),t=Ke(),a=Ve(),s=te(),o=Eu(),i=Vo(),c=qe();function u(h){const{domain:m,message:g,primaryType:p,types:v}=h,j=(E,_)=>{const I={..._};for(const S of E){const{name:R,type:x}=S;x==="address"&&(I[R]=I[R].toLowerCase())}return I},l=v.EIP712Domain?m?j(v.EIP712Domain,m):{}:{},w=(()=>{if(p!=="EIP712Domain")return j(v[p],g)})();return(0,c.stringify)({domain:l,message:w,primaryType:p,types:v})}function d(h){const{domain:m,message:g,primaryType:p,types:v}=h,j=(l,w)=>{for(const E of l){const{name:_,type:I}=E,S=w[_],R=I.match(o.integerRegex);if(R&&(typeof S=="number"||typeof S=="bigint")){const[A,C,k]=R;(0,s.numberToHex)(S,{signed:C==="int",size:Number.parseInt(k,10)/8})}if(I==="address"&&typeof S=="string"&&!(0,t.isAddress)(S))throw new r.InvalidAddressError({address:S});const x=I.match(o.bytesRegex);if(x){const[A,C]=x;if(C&&(0,a.size)(S)!==Number.parseInt(C,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(C,10),givenSize:(0,a.size)(S)})}const T=v[I];T&&(y(I),j(T,S))}};if(v.EIP712Domain&&m){if(typeof m!="object")throw new n.InvalidDomainError({domain:m});j(v.EIP712Domain,m)}if(p!=="EIP712Domain")if(v[p])j(v[p],g);else throw new n.InvalidPrimaryTypeError({primaryType:p,types:v})}function f({domain:h}){return[typeof h?.name=="string"&&{name:"name",type:"string"},h?.version&&{name:"version",type:"string"},(typeof h?.chainId=="number"||typeof h?.chainId=="bigint")&&{name:"chainId",type:"uint256"},h?.verifyingContract&&{name:"verifyingContract",type:"address"},h?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function b({domain:h}){return(0,i.hashDomain)({domain:h,types:{EIP712Domain:f({domain:h})}})}function y(h){if(h==="address"||h==="bool"||h==="string"||h.startsWith("bytes")||h.startsWith("uint")||h.startsWith("int"))throw new n.InvalidStructTypeError({type:h})}return Tr}var Lm;function Vo(){if(Lm)return Ar;Lm=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.hashTypedData=s,Ar.hashDomain=o,Ar.hashStruct=i,Ar.encodeType=d;const e=yt(),r=Oe(),n=te(),t=We(),a=Lu();function s(y){const{domain:h={},message:m,primaryType:g}=y,p={EIP712Domain:(0,a.getTypesForEIP712Domain)({domain:h}),...y.types};(0,a.validateTypedData)({domain:h,message:m,primaryType:g,types:p});const v=["0x1901"];return h&&v.push(o({domain:h,types:p})),g!=="EIP712Domain"&&v.push(i({data:m,primaryType:g,types:p})),(0,t.keccak256)((0,r.concat)(v))}function o({domain:y,types:h}){return i({data:y,primaryType:"EIP712Domain",types:h})}function i({data:y,primaryType:h,types:m}){const g=c({data:y,primaryType:h,types:m});return(0,t.keccak256)(g)}function c({data:y,primaryType:h,types:m}){const g=[{type:"bytes32"}],p=[u({primaryType:h,types:m})];for(const v of m[h]){const[j,l]=b({types:m,name:v.name,type:v.type,value:y[v.name]});g.push(j),p.push(l)}return(0,e.encodeAbiParameters)(g,p)}function u({primaryType:y,types:h}){const m=(0,n.toHex)(d({primaryType:y,types:h}));return(0,t.keccak256)(m)}function d({primaryType:y,types:h}){let m="";const g=f({primaryType:y,types:h});g.delete(y);const p=[y,...Array.from(g).sort()];for(const v of p)m+=`${v}(${h[v].map(({name:j,type:l})=>`${l} ${j}`).join(",")})`;return m}function f({primaryType:y,types:h},m=new Set){const p=y.match(/^\w*/u)?.[0];if(m.has(p)||h[p]===void 0)return m;m.add(p);for(const v of h[p])f({primaryType:v.type,types:h},m);return m}function b({types:y,name:h,type:m,value:g}){if(y[m]!==void 0)return[{type:"bytes32"},(0,t.keccak256)(c({data:g,primaryType:m,types:y}))];if(m==="bytes")return g=`0x${(g.length%2?"0":"")+g.slice(2)}`,[{type:"bytes32"},(0,t.keccak256)(g)];if(m==="string")return[{type:"bytes32"},(0,t.keccak256)((0,n.toHex)(g))];if(m.lastIndexOf("]")===m.length-1){const p=m.slice(0,m.lastIndexOf("[")),v=g.map(j=>
45b({name:h,type:p,types:y,value:j}));return[{type:"bytes32"},(0,t.keccak256)((0,e.encodeAbiParameters)(v.map(([j])=>j),v.map(([,j])=>j)))]}return[{type:m},g]}return Ar}var Es={},Ir={},Dm;function Cf(){return Dm||(Dm=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.zeroHash=Ir.erc6492MagicBytes=void 0,Ir.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",Ir.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"),Ir}var Gm;function xf(){if(Gm)return Es;Gm=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.isErc6492Signature=n;const e=Cf(),r=at();function n(t){return(0,r.sliceHex)(t,-32)===e.erc6492MagicBytes}return Es}var js={},_o={},$d={},je={},Ne={},an={},vo={},Vm;function Xv(){if(Vm)return vo;Vm=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.LruMap=void 0;class e extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const a=this.keys().next().value;a&&this.delete(a)}return this}}return vo.LruMap=e,vo}var Wm;function Qv(){if(Wm)return an;Wm=1,Object.defineProperty(an,"__esModule",{value:!0}),an.checksum=void 0,an.clear=n;const e=Xv(),r={checksum:new e.LruMap(8192)};an.checksum=r.checksum;function n(){for(const t of Object.values(r))t.clear()}return an}var Sr={},Km;function qf(){if(Km)return Sr;
45Km=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.keccak256=s,Sr.ripemd160=o,Sr.sha256=i,Sr.validate=c;const e=Tg(),r=Op(),n=Xp(),t=At(),a=Me();function s(u,d={}){const{as:f=typeof u=="string"?"Hex":"Bytes"}=d,b=(0,r.keccak_256)(t.from(u));return f==="Bytes"?b:a.fromBytes(b)}function o(u,d={}){const{as:f=typeof u=="string"?"Hex":"Bytes"}=d,b=(0,e.ripemd160)(t.from(u));return f==="Bytes"?b:a.fromBytes(b)}function i(u,d={}){const{as:f=typeof u=="string"?"Hex":"Bytes"}=d,b=(0,n.sha256)(t.from(u));return f==="Bytes"?b:a.fromBytes(b)}function c(u){return a.validate(u)&&a.size(u)===32}return Sr}var Re={},Zm;function Ng(){if(Zm)return Re;Zm=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.InvalidSerializedSizeError=Re.InvalidUncompressedPrefixError=Re.InvalidCompressedPrefixError=Re.InvalidPrefixError=Re.InvalidError=void 0,Re.assert=a,Re.compress=s,Re.from=o,Re.fromBytes=i,Re.fromHex=c,Re.toBytes=u,Re.toHex=d,Re.validate=f;const e=At(),r=nt(),n=Me(),t=xu();function a(p,v={}){const{compressed:j}=v,{prefix:l,x:w,y:E}=p;if(j===!1||typeof w=="bigint"&&typeof E=="bigint"){if(l!==4)throw new y({prefix:l,cause:new m});return}if(j===!0||typeof w=="bigint"&&typeof E>"u"){if(l!==3&&l!==2)throw new y({prefix:l,cause:new h});return}throw new b({publicKey:p})}function s(p){const{x:v,y:j}=p;return{prefix:j%2n===0n?2:3,x:v}}function o(p){const v=(()=>{if(n.validate(p))return c(p);if(e.validate(p))return i(p);const{prefix:j,x:l,y:w}=p;return typeof l=="bigint"&&typeof w=="bigint"?{prefix:j??4,x:l,y:w}:{prefix:j,x:l}})();return a(v),v}function i(p){return c(n.fromBytes(p))}function c(p){if(p.length!==132&&p.length!==130&&p.length!==68)throw new g({publicKey:p});if(p.length===130){const l=BigInt(n.slice(p,0,32)),w=BigInt(n.slice(p,32,64));return{prefix:4,x:l,y:w}}if(p.length===132){const l=Number(n.slice(p,0,1)),w=BigInt(n.slice(p,1,33)),E=BigInt(n.slice(p,33,65));return{prefix:l,x:w,y:E}}const v=Number(n.slice(p,0,1)),j=BigInt(n.slice(p,1,33));return{prefix:v,x:j}}function u(p,v={}){return e.fromHex(d(p,v))}function d(p,v={}){a(p);const{prefix:j,x:l,y:w}=p,{includePrefix:E=!0}=v;return n.concat(E?n.fromNumber(j,{size:1}):"0x",n.fromNumber(l,{size:32}),typeof w=="bigint"?n.fromNumber(w,{size:32}):"0x")}function f(p,v={}){try{return a(p,v),!0}catch{return!1}}class b extends r.BaseError{constructor({publicKey:v}){super(`Value \`${t.stringify(v)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}Re.InvalidError=b;class y extends r.BaseError{constructor({prefix:v,cause:j}){super(`Prefix "${v}" is invalid.`,{cause:j}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}Re.InvalidPrefixError=y;class h extends r.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}Re.InvalidCompressedPrefixError=h;class m extends r.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}Re.InvalidUncompressedPrefixError=m;class g extends r.BaseError{constructor({publicKey:v}){super(`Value \`${v}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${n.size(n.from(v))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}return Re.InvalidSerializedSizeError=g,Re}var Ym;function Du(){if(Ym)return Ne;Ym=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.InvalidChecksumError=Ne.InvalidInputError=Ne.InvalidAddressError=void 0,Ne.assert=o,Ne.checksum=i,Ne.from=c,Ne.fromPublicKey=u,Ne.isEqual=d,Ne.validate=f;const e=At(),r=Qv(),n=nt(),t=qf(),a=Ng(),s=/^0x[a-fA-F0-9]{40}$/;function o(m,g={}){const{strict:p=!0}=g;if(!s.test(m))throw new b({address:m,cause:new y});if(p){if(m.toLowerCase()===m)return;if(i(m)!==m)throw new b({address:m,cause:new h})}}function i(m){if(r.checksum.has(m))return r.checksum.get(m);o(m,{strict:!1});const g=m.substring(2).toLowerCase(),p=t.keccak256(e.fromString(g),{as:"Bytes"}),v=g.split("");for(let l=0;l<40;l+=2)p[l>>1]>>4>=8&&v[l]&&(v[l]=v[l].toUpperCase()),(p[l>>1]&15)>=8&&v[l+1]&&(v[l+1]=v[l+1].toUpperCase());const j=`0x${v.join("")}`;return r.checksum.set(m,j),j}function c(m,g={}){const{checksum:p=!1}=g;return o(m),p?i(m):m}function u(m,g={}
45){const p=t.keccak256(`0x${a.toHex(m).slice(4)}`).substring(26);return c(`0x${p}`,g)}function d(m,g){return o(m,{strict:!1}),o(g,{strict:!1}),m.toLowerCase()===g.toLowerCase()}function f(m,g={}){const{strict:p=!0}=g??{};try{return o(m,{strict:p}),!0}catch{return!1}}class b extends n.BaseError{constructor({address:g,cause:p}){super(`Address "${g}" is invalid.`,{cause:p}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}Ne.InvalidAddressError=b;class y extends n.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}Ne.InvalidInputError=y;class h extends n.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}return Ne.InvalidChecksumError=h,Ne}var we={},U={},Jm;function Mf(){return Jm||(Jm=1,Object.defineProperty(U,"__esModule",{value:!0}),U.minInt120=U.minInt112=U.minInt104=U.minInt96=U.minInt88=U.minInt80=U.minInt72=U.minInt64=U.minInt56=U.minInt48=U.minInt40=U.minInt32=U.minInt24=U.minInt16=U.minInt8=U.maxInt256=U.maxInt248=U.maxInt240=U.maxInt232=U.maxInt224=U.maxInt216=U.maxInt208=U.maxInt200=U.maxInt192=U.maxInt184=U.maxInt176=U.maxInt168=U.maxInt160=U.maxInt152=U.maxInt144=U.maxInt136=U.maxInt128=U.maxInt120=U.maxInt112=U.maxInt104=U.maxInt96=U.maxInt88=U.maxInt80=U.maxInt72=U.maxInt64=U.maxInt56=U.maxInt48=U.maxInt40=U.maxInt32=U.maxInt24=U.maxInt16=U.maxInt8=U.integerRegex=U.bytesRegex=U.arrayRegex=void 0,U.maxUint256=U.maxUint248=U.maxUint240=U.maxUint232=U.maxUint224=U.maxUint216=U.maxUint208=U.maxUint200=U.maxUint192=U.maxUint184=U.maxUint176=U.maxUint168=U.maxUint160=U.maxUint152=U.maxUint144=U.maxUint136=U.maxUint128=U.maxUint120=U.maxUint112=U.maxUint104=U.maxUint96=U.maxUint88=U.maxUint80=U.maxUint72=U.maxUint64=U.maxUint56=U.maxUint48=U.maxUint40=U.maxUint32=U.maxUint24=U.maxUint16=U.maxUint8=U.minInt256=U.minInt248=U.minInt240=U.minInt232=U.minInt224=U.minInt216=U.minInt208=U.minInt200=U.minInt192=U.minInt184=U.minInt176=U.minInt168=U.minInt160=U.minInt152=U.minInt144=U.minInt136=U.minInt128=void 0,U.arrayRegex=/^(.*)\[([0-9]*)\]$/,U.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,U.integerRegex=/^(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)?$/,U.maxInt8=2n**(8n-1n)-1n,U.maxInt16=2n**(16n-1n)-1n,U.maxInt24=2n**(24n-1n)-1n,U.maxInt32=2n**(32n-1n)-1n,U.maxInt40=2n**(40n-1n)-1n,U.maxInt48=2n**(48n-1n)-1n,U.maxInt56=2n**(56n-1n)-1n,U.maxInt64=2n**(64n-1n)-1n,U.maxInt72=2n**(72n-1n)-1n,U.maxInt80=2n**(80n-1n)-1n,U.maxInt88=2n**(88n-1n)-1n,U.maxInt96=2n**(96n-1n)-1n,U.maxInt104=2n**(104n-1n)-1n,U.maxInt112=2n**(112n-1n)-1n,U.maxInt120=2n**(120n-1n)-1n,U.maxInt128=2n**(128n-1n)-1n,U.maxInt136=2n**(136n-1n)-1n,U.maxInt144=2n**(144n-1n)-1n,U.maxInt152=2n**(152n-1n)-1n,U.maxInt160=2n**(160n-1n)-1n,U.maxInt168=2n**(168n-1n)-1n,U.maxInt176=2n**(176n-1n)-1n,U.maxInt184=2n**(184n-1n)-1n,U.maxInt192=2n**(192n-1n)-1n,U.maxInt200=2n**(200n-1n)-1n,U.maxInt208=2n**(208n-1n)-1n,U.maxInt216=2n**(216n-1n)-1n,U.maxInt224=2n**(224n-1n)-1n,U.maxInt232=2n**(232n-1n)-1n,U.maxInt240=2n**(240n-1n)-1n,U.maxInt248=2n**(248n-1n)-1n,U.maxInt256=2n**(256n-1n)-1n,U.minInt8=-(2n**(8n-1n)),U.minInt16=-(2n**(16n-1n)),U.minInt24=-(2n**(24n-1n)),U.minInt32=-(2n**(32n-1n)),U.minInt40=-(2n**(40n-1n)),U.minInt48=-(2n**(48n-1n)),U.minInt56=-(2n**(56n-1n)),U.minInt64=-(2n**(64n-1n)),U.minInt72=-(2n**(72n-1n)),U.minInt80=-(2n**(80n-1n)),U.minInt88=-(2n**(88n-1n)),U.minInt96=-(2n**(96n-1n)),U.minInt104=-(2n**(104n-1n)),U.minInt112=-(2n**(112n-1n)),U.minInt120=-(2n**(120n-1n)),U.minInt128=-(2n**(128n-1n)),U.minInt136=-(2n**(136n-1n)),U.minInt144=-(2n**(144n-1n)),U.minInt152=-(2n**(152n-1n)),U.minInt160=-(2n**(160n-1n)),U.minInt168=-(2n**(168n-1n)),U.minInt176=-(2n**(176n-1n)),U.minInt184=-(2n**(184n-1n)),U.minInt192=-(2n**(192n-1n)),U.minInt200=-(2n**(200n-1n)),U.minInt208=-(2n**(208n-1n)),U.minInt216=-(2n**(216n-1n)),U.minInt224=-(2n**(224n-1n)),U.minInt232=-(2n**(232n-1n)),U.minInt240=-(2n**(240n-1n)),U.minInt248=-(2n**(248n-1n)),U.minInt256=-(2n**(256n-1n)),U.maxUint8=2n**8n-1n,U.maxUint16=2n**16n-1n,U.maxUint24=2n**24n-1n,U.maxUint32=2n**32n-1n,U.maxUint40=2n**40n-1n,U.maxUint48=2n**48n-1n,U.maxUint56=2n**56n-1n,U.maxUint64=2n**64n-1n,U.maxUint72=2n**72n-1n,U.maxUint80=2n**80n-1n,U.maxUint88=2n**88n-1n,U.maxUint96=2n**96n-1n,U.maxUint104=2n**104n-1n,U.maxUint112=2n**112n-1n,U.maxUint120=2n**120n-1n,U.maxUint128=2n**128n-1n,U.maxUint136=2n**136n-1n,U.maxUint144=2n**144n-1n,U.maxUint152=2n**152n-1n,U.maxUint160=2n**160n-1n,U.maxUint168=2n**168n-1n,U.maxUint176=2n**176n-1n,U.maxUint184=2n**184n-1n,U.maxUint192=2n**192n-1n,U.maxUint200=2n**200n-1n,U.maxUint208=2n**208n-1n,U.maxUint216=2n**216n-1n,U.maxUint224=2n**224n-1n,U.maxUint232=2n**232n-1n,U.maxUint240=2n**240n-1n,U.maxUint248=2n**248n-1n,U.maxUint256=2n**256n-1n),U}var Xm;
45function e6(){if(Xm)return we;Xm=1,Object.defineProperty(we,"__esModule",{value:!0}),we.decodeParameter=o,we.decodeAddress=u,we.decodeArray=d,we.decodeBool=f,we.decodeBytes=b,we.decodeNumber=y,we.decodeTuple=h,we.decodeString=m,we.prepareParameters=g,we.prepareParameter=p,we.encode=v,we.encodeAddress=j,we.encodeArray=l,we.encodeBytes=w,we.encodeBoolean=E,we.encodeNumber=_,we.encodeString=I,we.encodeTuple=S,we.getArrayComponents=R,we.hasDynamicChild=x;const e=Wo(),r=Du(),n=At(),t=nt(),a=Me(),s=Mf();function o(T,A,C){const{checksumAddress:k,staticPosition:B}=C,P=R(A.type);if(P){const[q,F]=P;return d(T,{...A,type:F},{checksumAddress:k,length:q,staticPosition:B})}if(A.type==="tuple")return h(T,A,{checksumAddress:k,staticPosition:B});if(A.type==="address")return u(T,{checksum:k});if(A.type==="bool")return f(T);if(A.type.startsWith("bytes"))return b(T,A,{staticPosition:B});if(A.type.startsWith("uint")||A.type.startsWith("int"))return y(T,A);if(A.type==="string")return m(T,{staticPosition:B});throw new e.InvalidTypeError(A.type)}const i=32,c=32;function u(T,A={}){const{checksum:C=!1}=A,k=T.readBytes(32);return[(P=>C?r.checksum(P):P)(a.fromBytes(n.slice(k,-20))),32]}function d(T,A,C){const{checksumAddress:k,length:B,staticPosition:P}=C;if(!B){const M=n.toNumber(T.readBytes(c)),O=P+M,H=O+i;T.setPosition(O);const N=n.toNumber(T.readBytes(i)),z=x(A);let $=0;const D=[];for(let G=0;G<N;++G){T.setPosition(H+(z?G*32:$));const[Y,Z]=o(T,A,{checksumAddress:k,staticPosition:H});$+=Z,D.push(Y)}return T.setPosition(P+32),[D,32]}if(x(A)){const M=n.toNumber(T.readBytes(c)),O=P+M,H=[];for(let N=0;N<B;++N){T.setPosition(O+N*32);const[z]=o(T,A,{checksumAddress:k,staticPosition:O});H.push(z)}return T.setPosition(P+32),[H,32]}let q=0;const F=[];for(let M=0;M<B;++M){const[O,H]=o(T,A,{checksumAddress:k,staticPosition:P+q});q+=H,F.push(O)}return[F,q]}function f(T){return[n.toBoolean(T.readBytes(32),{size:32}),32]}function b(T,A,{staticPosition:C}){const[k,B]=A.type.split("bytes");if(!B){const q=n.toNumber(T.readBytes(32));T.setPosition(C+q);const F=n.toNumber(T.readBytes(32));if(F===0)return T.setPosition(C+32),["0x",32];const M=T.readBytes(F);return T.setPosition(C+32),[a.fromBytes(M),32]}return[a.fromBytes(T.readBytes(Number.parseInt(B,10),32)),32]}function y(T,A){const C=A.type.startsWith("int"),k=Number.parseInt(A.type.split("int")[1]||"256",10),B=T.readBytes(32);return[k>48?n.toBigInt(B,{signed:C}):n.toNumber(B,{signed:C}),32]}function h(T,A,C){const{checksumAddress:k,staticPosition:B}=C,P=A.components.length===0||A.components.some(({name:M})=>!M),q=P?[]:{};let F=0;if(x(A)){const M=n.toNumber(T.readBytes(c)),O=B+M;for(let H=0;H<A.components.length;++H){const N=A.components[H];T.setPosition(O+F);const[z,$]=o(T,N,{checksumAddress:k,staticPosition:O});F+=$,q[P?H:N?.name]=z}return T.setPosition(B+32),[q,32]}for(let M=0;M<A.components.length;++M){const O=A.components[M],[H,N]=o(T,O,{checksumAddress:k,staticPosition:B});q[P?M:O?.name]=H,F+=N}return[q,F]}function m(T,{staticPosition:A}){const C=n.toNumber(T.readBytes(32)),k=A+C;T.setPosition(k);const B=n.toNumber(T.readBytes(32));if(B===0)return T.setPosition(A+32),["",32];const P=T.readBytes(B,32),q=n.toString(n.trimLeft(P));return T.setPosition(A+32),[q,32]}function g({checksumAddress:T,parameters:A,values:C}){const k=[];for(let B=0;B<A.length;B++)k.push(p({checksumAddress:T,parameter:A[B],value:C[B]}));return k}function p({checksumAddress:T=!1,parameter:A,value:C}){const k=A,B=R(k.type);if(B){const[P,q]=B;return l(C,{checksumAddress:T,length:P,parameter:{...k,type:q}})}if(k.type==="tuple")return S(C,{checksumAddress:T,parameter:k});if(k.type==="address")return j(C,{checksum:T});if(k.type==="bool")return E(C);if(k.type.startsWith("uint")||k.type.startsWith("int")){const P=k.type.startsWith("int"),[,,q="256"]=s.integerRegex.exec(k.type)??[];return _(C,{signed:P,size:Number(q)})}if(k.type.startsWith("bytes"))return w(C,{type:k.type});if(k.type==="string")return I(C);throw new e.InvalidTypeError(k.type)}function v(T){let A=0;for(let P=0;P<T.length;P++){const{dynamic:q,encoded:F}=T[P];q?A+=32:A+=a.size(F)}const C=[],k=[];let B=0;for(let P=0;P<T.length;P++){const{dynamic:q,encoded:F}=T[P];q?(C.push(a.fromNumber(A+B,{size:32})),k.push(F),B+=a.size(F)):C.push(F)}return a.concat(...C,...k)}function j(T,A){const{checksum:C=!1}=A;return r.assert(T,{strict:C}),{dynamic:!1,encoded:a.padLeft(T.toLowerCase())}}function l(T,A){const{checksumAddress:C,length:k,parameter:B}=A,P=k===null;if(!Array.isArray(T))throw new e.InvalidArrayError(T);if(!P&&T.length!==k)throw new e.ArrayLengthMismatchError({expectedLength:k,givenLength:T.length,type:`${B.type}[${k}]`});let q=!1;const F=[];for(let M=0;M<T.length;M++){const O=p({checksumAddress:C,parameter:B,value:T[M]});O.dynamic&&(q=!0),F.push(O)}if(P||q){const M=v(F);if(P){const O=a.fromNumber(F.length,{size:32});return{dynamic:!0,encoded:F.length>0?a.concat(O,M):O}}if(q)return{dynamic:!0,encoded:M}}return{dynamic:!1,encoded:a.concat(...F.map(({encoded:M})=>M))}}function w(T,{type:A}){const[,C]=A.split("bytes"),k=a.size(T);if(!C){let B=T;return k%32!==0&&(B=a.padRight(B,Math.ceil((T.length-2)/2/32)*32)),{dynamic:!0,encoded:a.concat(a.padLeft(a.fromNumber(k,{size:32})),B)}}if(k!==Number.parseInt(C,10))throw new e.BytesSizeMismatchError({expectedSize:Number.parseInt(C,10),value:T});return{dynamic:!1,encoded:a.padRight(T)}}function E(T){if(typeof T!="boolean")throw new t.BaseError(`Invalid boolean value: "${T}" (type: ${typeof T}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:a.padLeft(a.fromBoolean(T))}}function _(T,{signed:A,size:C}){if(typeof C=="number"){const k=2n**(BigInt(C)-(A?1n:0n))-1n,B=A?-k-1n:0n;if(T>k||T<B)throw new a.IntegerOutOfRangeError({max:k.toString(),min:B.toString(),signed:A,size:C/8,value:T.toString()})}return{dynamic:!1,encoded:a.fromNumber(T,{size:32,signed:A})}}function I(T){const A=a.fromString(T),C=Math.ceil(a.size(A)/32),k=[];for(let B=0;B<C;B++)k.push(a.padRight(a.slice(A,B*32,(B+1)*32)));return{dynamic:!0,encoded:a.concat(a.padRight(a.fromNumber(a.size(A),{size:32})),...k)}}function S(T,A){const{checksumAddress:C,parameter:k}=A;let B=!1;const P=[];for(let q=0;q<k.components.length;q++){const F=k.components[q],M=Array.isArray(T)?q:F.name,O=p({checksumAddress:C,parameter:F,value:T[M]});P.push(O),O.dynamic&&(B=!0)}return{dynamic:B,encoded:B?v(P):a.concat(...P.map(({encoded:q})=>q))}}function R(T){const A=T.match(/^(.*)\[(\d+)?\]$/);return A?[A[2]?Number(A[2]):null,A[1]]:void 0}function x(T){const{type:A}=T;if(A==="string"||A==="bytes"||A.endsWith("[]"))return!0;
45if(A==="tuple")return T.components?.some(x);const C=R(T.type);return!!(C&&x({...T,type:C[1]}))}return we}var jt={},Qm;function $g(){if(Qm)return jt;Qm=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.RecursiveReadLimitExceededError=jt.PositionOutOfBoundsError=jt.NegativeOffsetError=void 0,jt.create=n;const e=nt(),r={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 s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(o){if(o<0||o>this.bytes.length-1)throw new a({length:this.bytes.length,position:o})},decrementPosition(o){if(o<0)throw new t({offset:o});const i=this.position-o;this.assertPosition(i),this.position=i},getReadCount(o){return this.positionReadCount.get(o||this.position)||0},incrementPosition(o){if(o<0)throw new t({offset:o});const i=this.position+o;this.assertPosition(i),this.position=i},inspectByte(o){const i=o??this.position;return this.assertPosition(i),this.bytes[i]},inspectBytes(o,i){const c=i??this.position;return this.assertPosition(c+o-1),this.bytes.subarray(c,c+o)},inspectUint8(o){const i=o??this.position;return this.assertPosition(i),this.bytes[i]},inspectUint16(o){const i=o??this.position;return this.assertPosition(i+1),this.dataView.getUint16(i)},inspectUint24(o){const i=o??this.position;return this.assertPosition(i+2),(this.dataView.getUint16(i)<<8)+this.dataView.getUint8(i+2)},inspectUint32(o){const i=o??this.position;return this.assertPosition(i+3),this.dataView.getUint32(i)},pushByte(o){this.assertPosition(this.position),this.bytes[this.position]=o,this.position++},pushBytes(o){this.assertPosition(this.position+o.length-1),this.bytes.set(o,this.position),this.position+=o.length},pushUint8(o){this.assertPosition(this.position),this.bytes[this.position]=o,this.position++},pushUint16(o){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,o),this.position+=2},pushUint24(o){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,o>>8),this.dataView.setUint8(this.position+2,o&255),this.position+=3},pushUint32(o){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,o),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const o=this.inspectByte();return this.position++,o},readBytes(o,i){this.assertReadLimit(),this._touch();const c=this.inspectBytes(o);return this.position+=i??o,c},readUint8(){this.assertReadLimit(),this._touch();const o=this.inspectUint8();return this.position+=1,o},readUint16(){this.assertReadLimit(),this._touch();const o=this.inspectUint16();return this.position+=2,o},readUint24(){this.assertReadLimit(),this._touch();const o=this.inspectUint24();return this.position+=3,o},readUint32(){this.assertReadLimit(),this._touch();const o=this.inspectUint32();return this.position+=4,o},get remaining(){return this.bytes.length-this.position},setPosition(o){const i=this.position;return this.assertPosition(o),this.position=o,()=>this.position=i},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const o=this.getReadCount();this.positionReadCount.set(this.position,o+1),o>0&&this.recursiveReadCount++}};function n(o,{recursiveReadLimit:i=8192}={}){const c=Object.create(r);return c.bytes=o,c.dataView=new DataView(o.buffer,o.byteOffset,o.byteLength),c.positionReadCount=new Map,c.recursiveReadLimit=i,c}class t extends e.BaseError{constructor({offset:i}){super(`Offset \`${i}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}jt.NegativeOffsetError=t;class a extends e.BaseError{constructor({length:i,position:c}){super(`Position \`${c}\` is out of bounds (\`0 < position < ${i}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}jt.PositionOutOfBoundsError=a;class s extends e.BaseError{constructor({count:i,limit:c}
45){super(`Recursive read limit of \`${c}\` exceeded (recursive read count: \`${i}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}return jt.RecursiveReadLimitExceededError=s,jt}var eh;function Wo(){if(eh)return je;eh=1,Object.defineProperty(je,"__esModule",{value:!0}),je.InvalidTypeError=je.InvalidArrayError=je.LengthMismatchError=je.BytesSizeMismatchError=je.ArrayLengthMismatchError=je.ZeroDataError=je.DataSizeTooSmallError=void 0,je.decode=c,je.encode=u,je.encodePacked=d,je.format=f,je.from=b;const e=tr(),r=Du(),n=At(),t=nt(),a=Me(),s=e6(),o=$g(),i=Mf();function c(l,w,E={}){const{as:_="Array",checksumAddress:I=!1}=E,S=typeof w=="string"?n.fromHex(w):w,R=o.create(S);if(n.size(S)===0&&l.length>0)throw new h;if(n.size(S)&&n.size(S)<32)throw new y({data:typeof w=="string"?w:a.fromBytes(w),parameters:l,size:n.size(S)});let x=0;const T=_==="Array"?[]:{};for(let A=0;A<l.length;++A){const C=l[A];R.setPosition(x);const[k,B]=s.decodeParameter(R,C,{checksumAddress:I,staticPosition:0});x+=B,_==="Array"?T.push(k):T[C.name??A]=k}return T}function u(l,w,E){const{checksumAddress:_=!1}=E??{};if(l.length!==w.length)throw new p({expectedLength:l.length,givenLength:w.length});const I=s.prepareParameters({checksumAddress:_,parameters:l,values:w}),S=s.encode(I);return S.length===0?"0x":S}function d(l,w){if(l.length!==w.length)throw new p({expectedLength:l.length,givenLength:w.length});const E=[];for(let _=0;_<l.length;_++){const I=l[_],S=w[_];E.push(d.encode(I,S))}return a.concat(...E)}(function(l){function w(E,_,I=!1){if(E==="address"){const T=_;return r.assert(T),a.padLeft(T.toLowerCase(),I?32:0)}if(E==="string")return a.fromString(_);if(E==="bytes")return _;if(E==="bool")return a.padLeft(a.fromBoolean(_),I?32:1);const S=E.match(i.integerRegex);if(S){const[T,A,C="256"]=S,k=Number.parseInt(C,10)/8;return a.fromNumber(_,{size:I?32:k,signed:A==="int"})}const R=E.match(i.bytesRegex);if(R){const[T,A]=R;if(Number.parseInt(A,10)!==(_.length-2)/2)throw new g({expectedSize:Number.parseInt(A,10),value:_});return a.padRight(_,I?32:0)}const x=E.match(i.arrayRegex);if(x&&Array.isArray(_)){const[T,A]=x,C=[];for(let k=0;k<_.length;k++)C.push(w(A,_[k],!0));return C.length===0?"0x":a.concat(...C)}throw new j(E)}l.encode=w})(d||(je.encodePacked=d={}));function f(l){return e.formatAbiParameters(l)}function b(l){return Array.isArray(l)&&typeof l[0]=="string"||typeof l=="string"?e.parseAbiParameters(l):l}class y extends t.BaseError{constructor({data:w,parameters:E,size:_}){super(`Data size of ${_} bytes is too small for given parameters.`,{metaMessages:[`Params: (${e.formatAbiParameters(E)})`,`Data: ${w} (${_} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}je.DataSizeTooSmallError=y;class h extends t.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}je.ZeroDataError=h;class m extends t.BaseError{constructor({expectedLength:w,givenLength:E,type:_}){super(`Array length mismatch for type \`${_}\`. Expected: \`${w}\`. Given: \`${E}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}je.ArrayLengthMismatchError=m;class g extends t.BaseError{constructor({expectedSize:w,value:E}){super(`Size of bytes "${E}" (bytes${a.size(E)}) does not match expected size (bytes${w}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}je.BytesSizeMismatchError=g;class p extends t.BaseError{constructor({expectedLength:w,givenLength:E}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${w}`,`Given length (values): ${E}`].join(` 46`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}je.LengthMismatchError=p;class v extends t.BaseError{constructor(w){super(`Value \`${w}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}je.InvalidArrayError=v;class j extends t.BaseError{constructor(w){super(`Type \`${w}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}return je.InvalidTypeError=j,je}var Ge={},ot={},th;function t6(){if(th)return ot;
46th=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.toBytes=a,ot.toHex=s,ot.to=o,ot.decodeRlpCursor=i,ot.readLength=c,ot.readList=u,ot.from=d,ot.fromBytes=f,ot.fromHex=b;const e=At(),r=nt(),n=Me(),t=$g();function a(p){return o(p,"Bytes")}function s(p){return o(p,"Hex")}function o(p,v){const j=v??(typeof p=="string"?"Hex":"Bytes"),l=(()=>{if(typeof p=="string"){if(p.length>3&&p.length%2!==0)throw new n.InvalidLengthError(p);return e.fromHex(p)}return p})(),w=t.create(l,{recursiveReadLimit:Number.POSITIVE_INFINITY});return i(w,j)}function i(p,v="Hex"){if(p.bytes.length===0)return v==="Hex"?n.fromBytes(p.bytes):p.bytes;const j=p.readByte();if(j<128&&p.decrementPosition(1),j<192){const w=c(p,j,128),E=p.readBytes(w);return v==="Hex"?n.fromBytes(E):E}const l=c(p,j,192);return u(p,l,v)}function c(p,v,j){if(j===128&&v<128)return 1;if(v<=j+55)return v-j;if(v===j+55+1)return p.readUint8();if(v===j+55+2)return p.readUint16();if(v===j+55+3)return p.readUint24();if(v===j+55+4)return p.readUint32();throw new r.BaseError("Invalid RLP prefix")}function u(p,v,j){const l=p.position,w=[];for(;p.position-l<v;)w.push(i(p,j));return w}function d(p,v){const{as:j}=v,l=y(p),w=t.create(new Uint8Array(l.length));return l.encode(w),j==="Hex"?n.fromBytes(w.bytes):w.bytes}function f(p,v={}){const{as:j="Bytes"}=v;return d(p,{as:j})}function b(p,v={}){const{as:j="Hex"}=v;return d(p,{as:j})}function y(p){return Array.isArray(p)?h(p.map(v=>y(v))):m(p)}function h(p){const v=p.reduce((w,E)=>w+E.length,0),j=g(v);return{length:v<=55?1+v:1+j+v,encode(w){v<=55?w.pushByte(192+v):(w.pushByte(247+j),j===1?w.pushUint8(v):j===2?w.pushUint16(v):j===3?w.pushUint24(v):w.pushUint32(v));for(const{encode:E}of p)E(w)}}}function m(p){const v=typeof p=="string"?e.fromHex(p):p,j=g(v.length);return{length:v.length===1&&v[0]<128?1:v.length<=55?1+v.length:1+j+v.length,encode(w){v.length===1&&v[0]<128?w.pushBytes(v):v.length<=55?(w.pushByte(128+v.length),w.pushBytes(v)):(w.pushByte(183+j),j===1?w.pushUint8(v.length):j===2?w.pushUint16(v.length):j===3?w.pushUint24(v.length):w.pushUint32(v.length),w.pushBytes(v))}}}function g(p){if(p<2**8)return 1;if(p<2**16)return 2;if(p<2**24)return 3;if(p<2**32)return 4;throw new r.BaseError("Length is too large.")}return ot}var fe={},rh;function zg(){if(rh)return fe;rh=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.InvalidVError=fe.InvalidYParityError=fe.InvalidSError=fe.InvalidRError=fe.MissingPropertiesError=fe.InvalidSerializedSizeError=void 0,fe.assert=o,fe.fromBytes=i,fe.fromHex=c,fe.extract=u,fe.from=d,fe.fromDerBytes=f,fe.fromDerHex=b,fe.fromLegacy=y,fe.fromRpc=h,fe.fromTuple=m,fe.toBytes=g,fe.toHex=p,fe.toDerBytes=v,fe.toDerHex=j,fe.toLegacy=l,fe.toRpc=w,fe.toTuple=E,fe.validate=_,fe.vToYParity=I,fe.yParityToV=S;const e=Nr(),r=At(),n=nt(),t=Me(),a=xu(),s=Mf();function o(B,P={}){const{recovered:q}=P;if(typeof B.r>"u")throw new x({signature:B});if(typeof B.s>"u")throw new x({signature:B});if(q&&typeof B.yParity>"u")throw new x({signature:B});if(B.r<0n||B.r>s.maxUint256)throw new T({value:B.r});if(B.s<0n||B.s>s.maxUint256)throw new A({value:B.s});if(typeof B.yParity=="number"&&B.yParity!==0&&B.yParity!==1)throw new C({value:B.yParity})}function i(B){return c(t.fromBytes(B))}function c(B){if(B.length!==130&&B.length!==132)throw new R({signature:B});const P=BigInt(t.slice(B,0,32)),q=BigInt(t.slice(B,32,64)),F=(()=>{const M=+`0x${B.slice(130)}`;if(!Number.isNaN(M))try{return I(M)}catch{throw new C({value:M})}})();return typeof F>"u"?{r:P,s:q}:{r:P,s:q,yParity:F}}function u(B){if(!(typeof B.r>"u")&&!(typeof B.s>"u"))return d(B)}function d(B){const P=typeof B=="string"?c(B):B instanceof Uint8Array?i(B):typeof B.r=="string"?h(B):B.v?y(B):{r:B.r,s:B.s,...typeof B.yParity<"u"?{yParity:B.yParity}:{}};return o(P),P}function f(B){return b(t.fromBytes(B))}function b(B){const{r:P,s:q}=e.secp256k1.Signature.fromDER(t.from(B).slice(2));return{r:P,s:q}}function y(B){return{r:B.r,s:B.s,yParity:I(B.v)}}function h(B){const P=(()=>{const q=B.v?Number(B.v):void 0;let F=B.yParity?Number(B.yParity):void 0;if(typeof q=="number"&&typeof F!="number"&&(F=I(q)),typeof F!="number")throw new C({value:B.yParity});return F})();return{r:BigInt(B.r),s:BigInt(B.s),yParity:P}}function m(B){const[P,q,F]=B;return d({r:q==="0x"?0n:BigInt(q),s:F==="0x"?0n:BigInt(F),yParity:P==="0x"?0:Number(P)})}function g(B){return r.fromHex(p(B))}function p(B){o(B);const P=B.r,q=B.s;return t.concat(t.fromNumber(P,{size:32}),t.fromNumber(q,{size:32}),typeof B.yParity=="number"?t.fromNumber(S(B.yParity),{size:1}):"0x")}function v(B){return new e.secp256k1.Signature(B.r,B.s).toDERRawBytes()}function j(B){return`0x${new e.secp256k1.Signature(B.r,B.s).toDERHex()}`}function l(B){return{r:B.r,s:B.s,v:S(B.yParity)}}function w(B){const{r:P,s:q,yParity:F}=B;return{r:t.fromNumber(P,{size:32}),s:t.fromNumber(q,{size:32}),yParity:F===0?"0x0":"0x1"}}function E(B){const{r:P,s:q,yParity:F}=B;return[F?"0x01":"0x",P===0n?"0x":t.trimLeft(t.fromNumber(P)),q===0n?"0x":t.trimLeft(t.fromNumber(q))]}function _(B,P={}){try{return o(B,P),!0}catch{return!1}}function I(B){if(B===0||B===27)return 0;if(B===1||B===28)return 1;if(B>=35)return B%2===0?1:0;throw new k({value:B})}function S(B){if(B===0)return 27;if(B===1)return 28;throw new C({value:B})}class R extends n.BaseError{constructor({signature:P}){super(`Value \`${P}
46\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${t.size(t.from(P))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}fe.InvalidSerializedSizeError=R;class x extends n.BaseError{constructor({signature:P}){super(`Signature \`${a.stringify(P)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}fe.MissingPropertiesError=x;class T extends n.BaseError{constructor({value:P}){super(`Value \`${P}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}fe.InvalidRError=T;class A extends n.BaseError{constructor({value:P}){super(`Value \`${P}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}fe.InvalidSError=A;class C extends n.BaseError{constructor({value:P}){super(`Value \`${P}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}fe.InvalidYParityError=C;class k extends n.BaseError{constructor({value:P}){super(`Value \`${P}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}return fe.InvalidVError=k,fe}var nh;function r6(){if(nh)return Ge;nh=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.from=a,Ge.fromRpc=s,Ge.fromRpcList=o,Ge.fromTuple=i,Ge.fromTupleList=c,Ge.getSignPayload=u,Ge.hash=d,Ge.toRpc=f,Ge.toRpcList=b,Ge.toTuple=y,Ge.toTupleList=h;const e=qf(),r=Me(),n=t6(),t=zg();function a(m,g={}){return typeof m.chainId=="string"?s(m):{...m,...g.signature}}function s(m){const{address:g,chainId:p,nonce:v}=m,j=t.extract(m);return{address:g,chainId:Number(p),nonce:BigInt(v),...j}}function o(m){return m.map(s)}function i(m){const[g,p,v,j,l,w]=m;let E={address:p,chainId:g==="0x"?0:Number(g),nonce:v==="0x"?0n:BigInt(v)};return j&&l&&w&&(E={...E,...t.fromTuple([j,l,w])}),a(E)}function c(m){const g=[];for(const p of m)g.push(i(p));return g}function u(m){return d(m,{presign:!0})}function d(m,g={}){const{presign:p}=g;return e.keccak256(r.concat("0x05",n.fromHex(y(p?{address:m.address,chainId:m.chainId,nonce:m.nonce}:m))))}function f(m){const{address:g,chainId:p,nonce:v,...j}=m;return{address:g,chainId:r.fromNumber(p),nonce:r.fromNumber(v),...t.toRpc(j)}}function b(m){return m.map(f)}function y(m){const{address:g,chainId:p,nonce:v}=m,j=t.extract(m);return[p?r.fromNumber(p):"0x",g,v?r.fromNumber(v):"0x",...j?t.toTuple(j):[]]}function h(m){if(!m||m.length===0)return[];const g=[];for(const p of m)g.push(y(p));return g}return Ge}var et={},Rr={},oh;function n6(){if(oh)return Rr;oh=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.extraEntropy=void 0,Rr.setExtraEntropy=e,Rr.extraEntropy=!1;function e(r){Rr.extraEntropy=r}return Rr}var ah;function o6(){if(ah)return et;ah=1,Object.defineProperty(et,"__esModule",{value:!0}),et.noble=void 0,et.createKeyPair=o,et.getPublicKey=i,et.getSharedSecret=c,et.randomPrivateKey=u,et.recoverAddress=d,et.recoverPublicKey=f,et.sign=b,et.verify=y;const e=Nr(),r=Du(),n=At(),t=Me(),a=n6(),s=Ng();et.noble=e.secp256k1;function o(h={}){const{as:m="Hex"}=h,g=u({as:m}),p=i({privateKey:g});return{privateKey:g,publicKey:p}}function i(h){const{privateKey:m}=h,g=e.secp256k1.ProjectivePoint.fromPrivateKey(t.from(m).slice(2));return s.from(g)}function c(h){const{as:m="Hex",privateKey:g,publicKey:p}=h,l=e.secp256k1.ProjectivePoint.fromHex(s.toHex(p).slice(2)).multiply(e.secp256k1.utils.normPrivateKeyToScalar(t.from(g).slice(2))).toRawBytes(!0);return m==="Hex"?t.fromBytes(l):l}function u(h={}){const{as:m="Hex"}=h,g=e.secp256k1.utils.randomPrivateKey();return m==="Hex"?t.fromBytes(g):g}function d(h){return r.fromPublicKey(f(h))}function f(h){const{payload:m,signature:g}=h,{r:p,s:v,yParity:j}=g,w=new e.secp256k1.Signature(BigInt(p),BigInt(v)).addRecoveryBit(j).recoverPublicKey(t.from(m).substring(2));return s.from(w)}function b(h){const{extraEntropy:m=a.extraEntropy,hash:g,payload:p,privateKey:v}=h,{r:j,s:l,recovery:w}=e.secp256k1.sign(n.from(p),n.from(v),{extraEntropy:typeof m=="boolean"?m:t.from(m).slice(2),lowS:!0,...g?{prehash:!0}:{}});return{r:j,s:l,yParity:w}}function y(h){const{address:m,hash:g,payload:p,publicKey:v,signature:j}=h;return m?r.isEqual(m,d({payload:p,signature:j})):e.secp256k1.verify(j,n.from(p),s.toBytes(v),...g?[{prehash:!0,lowS:!0}]:[])}return et}var ih;function a6(){return ih||(ih=1,(function(e){Object.defineProperty(e,"__esMo
46dule",{value:!0}),e.InvalidWrappedSignatureError=e.suffixParameters=e.magicBytes=void 0,e.assert=i,e.from=c,e.unwrap=u,e.wrap=d,e.validate=f;const r=Wo(),n=r6(),t=nt(),a=Me(),s=o6(),o=zg();e.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",e.suffixParameters=r.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function i(y){if(typeof y=="string"){if(a.slice(y,-32)!==e.magicBytes)throw new b(y)}else o.assert(y.authorization)}function c(y){return typeof y=="string"?u(y):y}function u(y){i(y);const h=a.toNumber(a.slice(y,-64,-32)),m=a.slice(y,-h-64,-64),g=a.slice(y,0,-h-64),[p,v,j]=r.decode(e.suffixParameters,m);return{authorization:n.from({address:p.delegation,chainId:Number(p.chainId),nonce:p.nonce,yParity:p.yParity,r:p.r,s:p.s}),signature:g,...j&&j!=="0x"?{data:j,to:v}:{}}}function d(y){const{data:h,signature:m}=y;i(y);const g=s.recoverAddress({payload:n.getSignPayload(y.authorization),signature:o.from(y.authorization)}),p=r.encode(e.suffixParameters,[{...y.authorization,delegation:y.authorization.address,chainId:BigInt(y.authorization.chainId)},y.to??g,h??"0x"]),v=a.fromNumber(a.size(p),{size:32});return a.concat(m,p,v,e.magicBytes)}function f(y){try{return i(y),!0}catch{return!1}}class b extends t.BaseError{constructor(h){super(`Value \`${h}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=b})($d)),$d}var sh;function Gu(){return sh||(sh=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.SignatureErc8010=void 0,_o.SignatureErc8010=a6()),_o}var ch;function Hf(){if(ch)return js;ch=1,Object.defineProperty(js,"__esModule",{value:!0}),js.isErc8010Signature=r;const e=Gu();function r(n){return e.SignatureErc8010.validate(n)}return js}var ws={},uh;function Ug(){if(uh)return ws;uh=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.parseErc6492Signature=n;const e=nr(),r=xf();function n(t){if(!(0,r.isErc6492Signature)(t))return{signature:t};const[a,s,o]=(0,e.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:a,data:s,signature:o}}return ws}var Ps={},dh;function Lg(){if(dh)return Ps;dh=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.parseErc8010Signature=t;const e=Gu(),r=te(),n=Hf();function t(a){if(!(0,n.isErc8010Signature)(a))return{signature:a};const{authorization:s,to:o,...i}=e.SignatureErc8010.unwrap(a);return{authorization:{address:s.address,chainId:s.chainId,nonce:Number(s.nonce),r:(0,r.numberToHex)(s.r,{size:32}),s:(0,r.numberToHex)(s.s,{size:32}),yParity:s.yParity},...o?{address:o}:{},...i}}return Ps}var As={},fh;function kf(){if(fh)return As;fh=1,Object.defineProperty(As,"__esModule",{value:!0}),As.recoverMessageAddress=n;const e=Go(),r=sr();async function n({message:t,signature:a}){return(0,r.recoverAddress)({hash:(0,e.hashMessage)(t),signature:a})}return As}var Ts={},lh;function Ff(){if(lh)return Ts;lh=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.recoverTypedDataAddress=n;const e=Vo(),r=sr();async function n(t){const{domain:a,message:s,primaryType:o,signature:i,types:c}=t;return(0,r.recoverAddress)({hash:(0,e.hashTypedData)({domain:a,message:s,primaryType:o,types:c}),signature:i})}return Ts}var Is={},bh;function Dg(){if(bh)return Is;bh=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.serializeErc6492Signature=a;const e=Cf(),r=yt(),n=Oe(),t=pe();function a(s){const{address:o,data:i,signature:c,to:u="hex"}=s,d=(0,n.concatHex)([(0,r.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[o,i,c]),e.erc6492MagicBytes]);return u==="hex"?d:(0,t.hexToBytes)(d)}return Is}var Ss={},mh;function Gg(){if(mh)return Ss;mh=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.serializeErc8010Signature=n;const e=Gu(),r=pe();function n(t){const{address:a,data:s,signature:o,to:i="hex"}=t,c=e.SignatureErc8010.wrap({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:s,signature:o,to:a});return i==="hex"?c:(0,r.hexToBytes)(c)}return Ss}
46var Rs={},hh;function Vg(){if(hh)return Rs;hh=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.verifyHash=t;const e=rt(),r=gt(),n=sr();async function t({address:a,hash:s,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(a),await(0,n.recoverAddress)({hash:s,signature:o}))}return Rs}var Bs={},yh;function Wg(){if(yh)return Bs;yh=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.verifyMessage=t;const e=rt(),r=gt(),n=kf();async function t({address:a,message:s,signature:o}){return(0,r.isAddressEqual)((0,e.getAddress)(a),await(0,n.recoverMessageAddress)({message:s,signature:o}))}return Bs}var Os={},ph;function Kg(){if(ph)return Os;ph=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.verifyTypedData=t;const e=rt(),r=gt(),n=Ff();async function t(a){const{address:s,domain:o,message:i,primaryType:c,signature:u,types:d}=a;return(0,r.isAddressEqual)((0,e.getAddress)(s),await(0,n.recoverTypedDataAddress)({domain:o,message:i,primaryType:c,signature:u,types:d}))}return Os}var Cs={},gh;function Nf(){if(gh)return Cs;gh=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.getSerializedTransactionType=t;const e=Ue(),r=at(),n=Ae();function t(a){const s=(0,r.sliceHex)(a,0,1);if(s==="0x04")return"eip7702";if(s==="0x03")return"eip4844";if(s==="0x02")return"eip1559";if(s==="0x01")return"eip2930";if(s!=="0x"&&(0,n.hexToNumber)(s)>=192)return"legacy";throw new e.InvalidSerializedTransactionTypeError({serializedType:s})}return Cs}var sn={},_h;function $f(){if(_h)return sn;_h=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.parseTransaction=b,sn.toTransactionArray=v,sn.parseAccessList=j;const e=ht(),r=Ue(),n=Ke(),t=Ou(),a=ze(),s=rr(),o=Ut(),i=Ae(),c=If(),u=Sf(),d=zu(),f=Nf();function b(E){const _=(0,f.getSerializedTransactionType)(E);return _==="eip1559"?m(E):_==="eip2930"?g(E):_==="eip4844"?h(E):_==="eip7702"?y(E):p(E)}function y(E){const _=v(E),[I,S,R,x,T,A,C,k,B,P,q,F,M]=_;if(_.length!==10&&_.length!==13)throw new r.InvalidSerializedTransactionError({attributes:{chainId:I,nonce:S,maxPriorityFeePerGas:R,maxFeePerGas:x,gas:T,to:A,value:C,data:k,accessList:B,authorizationList:P,..._.length>9?{v:q,r:F,s:M}:{}},serializedTransaction:E,type:"eip7702"});const O={chainId:(0,i.hexToNumber)(I),type:"eip7702"};return(0,a.isHex)(A)&&A!=="0x"&&(O.to=A),(0,a.isHex)(T)&&T!=="0x"&&(O.gas=(0,i.hexToBigInt)(T)),(0,a.isHex)(k)&&k!=="0x"&&(O.data=k),(0,a.isHex)(S)&&(O.nonce=S==="0x"?0:(0,i.hexToNumber)(S)),(0,a.isHex)(C)&&C!=="0x"&&(O.value=(0,i.hexToBigInt)(C)),(0,a.isHex)(x)&&x!=="0x"&&(O.maxFeePerGas=(0,i.hexToBigInt)(x)),(0,a.isHex)(R)&&R!=="0x"&&(O.maxPriorityFeePerGas=(0,i.hexToBigInt)(R)),B.length!==0&&B!=="0x"&&(O.accessList=j(B)),P.length!==0&&P!=="0x"&&(O.authorizationList=l(P)),(0,d.assertTransactionEIP7702)(O),{..._.length===13?w(_):void 0,...O}}function h(E){const _=v(E),I=_.length===4,S=I?_[0]:_,R=I?_.slice(1):[],[x,T,A,C,k,B,P,q,F,M,O,H,N,z]=S,[$,D,G]=R;if(!(S.length===11||S.length===14))throw new r.InvalidSerializedTransactionError({attributes:{chainId:x,nonce:T,maxPriorityFeePerGas:A,maxFeePerGas:C,gas:k,to:B,value:P,data:q,accessList:F,...S.length>9?{v:H,r:N,s:z}:{}},serializedTransaction:E,type:"eip4844"});const Y={blobVersionedHashes:O,chainId:(0,i.hexToNumber)(x),to:B,type:"eip4844"};return(0,a.isHex)(k)&&k!=="0x"&&(Y.gas=(0,i.hexToBigInt)(k)),(0,a.isHex)(q)&&q!=="0x"&&(Y.data=q),(0,a.isHex)(T)&&(Y.nonce=T==="0x"?0:(0,i.hexToNumber)(T)),(0,a.isHex)(P)&&P!=="0x"&&(Y.value=(0,i.hexToBigInt)(P)),(0,a.isHex)(M)&&M!=="0x"&&(Y.maxFeePerBlobGas=(0,i.hexToBigInt)(M)),(0,a.isHex)(C)&&C!=="0x"&&(Y.maxFeePerGas=(0,i.hexToBigInt)(C)),(0,a.isHex)(A)&&A!=="0x"&&(Y.maxPriorityFeePerGas=(0,i.hexToBigInt)(A)),F.length!==0&&F!=="0x"&&(Y.accessList=j(F)),$&&D&&G&&(Y.sidecars=(0,t.toBlobSidecars)({blobs:$,commitments:D,proofs:G})),(0,d.assertTransactionEIP4844)(Y),{...S.length===14?w(S):void 0,...Y}}function m(E){const _=v(E),[I,S,R,x,T,A,C,k,B,P,q,F]=_;if(!(_.length===9||_.length===12))throw new r.InvalidSerializedTransactionError({attributes:{chainId:I,nonce:S,maxPriorityFeePerGas:R,maxFeePerGas:x,gas:T,to:A,value:C,data:k,accessList:B,..._.length>9?{v:P,r:q,s:F}:{}},serializedTransaction:E,type:"eip1559"});const M={chainId:(0,i.hexToNumber)(I),type:"eip1559"};return(0,a.isHex)(A)&&A!=="0x"&&(M.to=A),(0,a.isHex)(T)&&T!=="0x"&&(M.gas=(0,i.hexToBigInt)(T)),(0,a.isHex)(k)&&k!=="0x"&&(M.data=k),(0,a.isHex)(S)&&(M.nonce=S==="0x"?0:(0,i.hexToNumber)(S)),(0,a.isHex)(C)&&C!=="0x"&&(M.value=(0,i.hexToBigInt)(C)),(0,a.isHex)(x)&&x!=="0x"&&(M.maxFeePerGas=(0,i.hexToBigInt)(x)),(0,a.isHex)(R)&&R!=="0x"&&(M.maxPriorityFeePerGas=(0,i.hexToBigInt)(R)),B.length!==0&&B!=="0x"&&(M.accessList=j(B)),(0,d.assertTransactionEIP1559)(M),{..._.length===12?w(_):void 0,...M}}function g(E){const _=v(E),[I,S,R,x,T,A,C,k,B,P,q]=_;if(!(_.length===8||_.length===11))throw new r.InvalidSerializedTransactionError({attributes:{chainId:I,nonce:S,gasPrice:R,gas:x,to:T,value:A,data:C,accessList:k,..._.length>8?{v:B,r:P,s:q}:{}},serializedTransaction:E,type:"eip2930"});const F={chainId:(0,i.hexToNumber)(I),type:"eip2930"};return(0,a.isHex)(T)&&T!=="0x"&&(F.to=T),(0,a.isHex)(x)&&x!=="0x"&&(F.gas=(0,i.hexToBigInt)(x)),(0,a.isHex)(C)&&C!=="0x"&&(F.data=C),(0,a.isHex)(S)&&(F.nonce=S==="0x"?0:(0,i.hexToNumber)(S)),(0,a.isHex)(A)&&A!=="0x"&&(F.value=(0,i.hexToBigInt)(A)),(0,a.isHex)(R)&&R!=="0x"&&(F.gasPrice=(0,i.hexToBigInt)(R)),k.length!==0&&k!=="0x"&&(F.accessList=j(k)),(0,d.assertTransactionEIP2930)(F),{..._.length===11?w(_):void 0,...F}}function p(E){const _=(0,c.fromRlp)(E,"hex"),[I,S,R,x,T,A,C,k,B]=_;if(!(_.length===6||_.length===9))throw new r.InvalidSerializedTransactionError({attributes:{nonce:I,gasPrice:S,gas:R,to:x,value:T,data:A,..._.length>6?{v:C,r:k,s:B}:{}},serializedTransaction:E,type:"legacy"});const P={type:"legacy"};
46if((0,a.isHex)(x)&&x!=="0x"&&(P.to=x),(0,a.isHex)(R)&&R!=="0x"&&(P.gas=(0,i.hexToBigInt)(R)),(0,a.isHex)(A)&&A!=="0x"&&(P.data=A),(0,a.isHex)(I)&&(P.nonce=I==="0x"?0:(0,i.hexToNumber)(I)),(0,a.isHex)(T)&&T!=="0x"&&(P.value=(0,i.hexToBigInt)(T)),(0,a.isHex)(S)&&S!=="0x"&&(P.gasPrice=(0,i.hexToBigInt)(S)),(0,d.assertTransactionLegacy)(P),_.length===6)return P;const q=(0,a.isHex)(C)&&C!=="0x"?(0,i.hexToBigInt)(C):0n;if(B==="0x"&&k==="0x")return q>0&&(P.chainId=Number(q)),P;const F=q,M=Number((F-35n)/2n);if(M>0)P.chainId=M;else if(F!==27n&&F!==28n)throw new r.InvalidLegacyVError({v:F});return P.v=F,P.s=B,P.r=k,P.yParity=F%2n===0n?1:0,P}function v(E){return(0,c.fromRlp)(`0x${E.slice(4)}`,"hex")}function j(E){const _=[];for(let I=0;I<E.length;I++){const[S,R]=E[I];if(!(0,n.isAddress)(S,{strict:!1}))throw new e.InvalidAddressError({address:S});_.push({address:S,storageKeys:R.map(x=>(0,u.isHash)(x)?x:(0,o.trim)(x))})}return _}function l(E){const _=[];for(let I=0;I<E.length;I++){const[S,R,x,T,A,C]=E[I];_.push({address:R,chainId:S==="0x"?0:(0,i.hexToNumber)(S),nonce:x==="0x"?0:(0,i.hexToNumber)(x),...w([T,A,C])})}return _}function w(E){const _=E.slice(-3),I=_[0]==="0x"||(0,i.hexToBigInt)(_[0])===0n?27n:28n;return{r:(0,s.padHex)(_[1],{size:32}),s:(0,s.padHex)(_[2],{size:32}),v:I,yParity:I===27n?0:1}}return sn}var xs={},qs={},Eo={},vh;function Zg(){if(vh)return Eo;vh=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.InvalidDecimalNumberError=void 0;const e=ce();class r extends e.BaseError{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}return Eo.InvalidDecimalNumberError=r,Eo}var Eh;function Vu(){if(Eh)return qs;Eh=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.parseUnits=r;const e=Zg();function r(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new e.InvalidDecimalNumberError({value:n});let[a,s="0"]=n.split(".");const o=a.startsWith("-");if(o&&(a=a.slice(1)),s=s.replace(/(0+)$/,""),t===0)Math.round(+`.${s}`)===1&&(a=`${BigInt(a)+1n}`),s="";else if(s.length>t){const[i,c,u]=[s.slice(0,t-1),s.slice(t-1,t),s.slice(t)],d=Math.round(+`${c}.${u}`);d>9?s=`${BigInt(i)+BigInt(1)}0`.padStart(i.length+1,"0"):s=`${i}${d}`,s.length>t&&(s=s.slice(1),a=`${BigInt(a)+1n}`),s=s.slice(0,t)}else s=s.padEnd(t,"0");return BigInt(`${o?"-":""}${a}${s}`)}return qs}var jh;function Yg(){if(jh)return xs;jh=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.parseEther=n;const e=So(),r=Vu();function n(t,a="wei"){return(0,r.parseUnits)(t,e.etherUnits[a])}return xs}var Ms={},wh;function Jg(){if(wh)return Ms;wh=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.parseGwei=n;const e=So(),r=Vu();function n(t,a="wei"){return(0,r.parseUnits)(t,e.gweiUnits[a])}return Ms}var Ph;function zf(){return Ph||(Ph=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=e.buildRequest=e.verifyAuthorization=e.serializeAuthorizationList=e.recoverAuthorizationAddress=e.hashAuthorization=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.parseEventLogs=e.getAbiItem=e.formatAbiItemWithArgs=e.formatAbiParams=e.formatAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeAbiParameters=e.publicKeyToAddress=e.parseAccount=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=void 0,e.ripemd160=e.keccak256=e.isHash=e.getAction=e.formatTransactionRequest=e.defineTransactionRequest=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.defineFormatter=e.extract=e.formatBlock=e.defineBlock=e.getTransactionError=e.getNodeError=e.containsNodeError=e.getEstimateGasError=e.getContractError=e.getCallError=e.toRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigint=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=void 0,e.validateTypedData=e.serializeTypedData=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.serializeErc8010Signature=e.serializeErc6492Signature=e.recoverTypedDataAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseErc8010Signature=e.parseErc6492Signature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashMessage=e.getWebSocketRpcClient=e.socketClientCache=e.getSocketRpcClient=e.getHttpRpcClient=e.rpc=e.getSocket=e.integerRegex=e.bytesRegex=e.arrayRegex=e.nonceManager=e.createNonceManager=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=void 0;var r=tr();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}});var n=Te();Object.defineProperty(e,"parseAccount",{enumerable:!0,get:function(){return n.parseAccount}});var t=Lp();Object.defineProperty(e,"publicKeyToAddress",{enumerable:!0,get:function(){return t.publicKeyToAddress}});var a=nr();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return a.decodeAbiParameters}});var s=wu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var o=Ho();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return o.decodeEventLog}});var i=lf();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return i.decodeFunctionData}});var c=Vt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return c.decodeFunctionResult}});var u=yt();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return u.encodeAbiParameters}});var d=$o();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return d.encodeDeployData}});var f=bf();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return f.encodeErrorResult}});var b=Hr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return b.encodeEventTopics}});var y=Ze();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return y.encodeFunctionData}});var h=mf();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return h.encodeFunctionResult}});var m=_g();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return m.encodePacked}});var g=zt();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return g.formatAbiItem}}),Object.defineProperty(e,"formatAbiParams",{enumerable:!0,get:function(){return g.formatAbiParams}});var p=Up();Object.defineProperty(e,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return p.formatAbiItemWithArgs}});var v=Lt();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return v.getAbiItem}});var j=ko();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return j.parseEventLogs}});var l=rt();Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return l.getAddress}});var w=vg();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return w.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return w.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return w.getCreateAddress}});var E=Ke();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return E.isAddress}});var _=gt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return _.isAddressEqual}});var I=Wp();Object.defineProperty(e,"hashAuthorization",{enumerable:!0,get:function(){return I.hashAuthorization}});var S=Oo();Object.defineProperty(e,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return S.recoverAuthorizationAddress}});var R=Eg();Object.defineProperty(e,"serializeAuthorizationList",{enumerable:!0,get:function(){return R.serializeAuthorizationList}});var x=jg();Object.defineProperty(e,"verifyAuthorization",{enumerable:!0,get:function(){return x.verifyAuthorization}});var T=wg();Object.defineProperty(e,"buildRequest",{enumerable:!0,get:function(){return T.buildRequest}});var A=hf();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return A.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return A.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return A.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return A.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return A.offchainLookupSignature}});var C=Lo();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return C.assertCurrentChain}});var k=Pg();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return k.defineChain}});var B=Ag();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return B.extractChain}});var P=ur();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return P.getChainContractAddress}});var q=Oe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return q.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return q.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return q.concatHex}});var F=Af();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return F.isBytes}});var M=ze();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return M.isHex}});var O=rr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return O.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return O.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return O.padHex}});var H=Ve();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return H.size}});var N=at();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return N.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return N.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return N.sliceHex}});var z=Ut();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return z.trim}});var $=Kd();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return $.bytesToBigInt}}),Object.defineProperty(e,"bytesToBigint",{enumerable:!0,get:function(){return $.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return $.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return $.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return $.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return $.fromBytes}});var D=Ae();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return D.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return D.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return D.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return D.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return D.hexToString}});var G=If();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return G.fromRlp}});var Y=pe();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return Y.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return Y.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return Y.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return Y.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return Y.toBytes}});var Z=te();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return Z.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return Z.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return Z.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return Z.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return Z.toHex}});var W=Bo();Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return W.toRlp}});var X=uf();Object.defineProperty(e,"getCallError",{enumerable:!0,get:function(){return X.getCallError}});var ie=ir();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return ie.getContractError}});var K=Zp();Object.defineProperty(e,"getEstimateGasError",{enumerable:!0,get:function(){return K.getEstimateGasError}});var J=Co();Object.defineProperty(e,"containsNodeError",{enumerable:!0,get:function(){return J.containsNodeError}}),Object.defineProperty(e,"getNodeError",{enumerable:!0,get:function(){return J.getNodeError}});var ee=ku();Object.defineProperty(e,"getTransactionError",{enumerable:!0,get:function(){return ee.getTransactionError}});var ae=Iu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return ae.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return ae.formatBlock}});var oe=$r();Object.defineProperty(e,"extract",{enumerable:!0,get:function(){return oe.extract}});var se=xo();Object.defineProperty(e,"defineFormatter",{enumerable:!0,get:function(){return se.defineFormatter}});var Q=Gt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return Q.formatLog}});var V=qo();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return V.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return V.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return V.transactionType}});var Ie=Do();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return Ie.defineTransactionReceipt}});var ve=wt();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return ve.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return ve.formatTransactionRequest}});var Se=be();Object.defineProperty(e,"getAction",{enumerable:!0,get:function(){return Se.getAction}});var it=Sf();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return it.isHash}});var Ce=We();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return Ce.keccak256}});var st=Ig();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return st.ripemd160}});var Le=rf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return Le.sha256}});var Be=Sg();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return Be.toEventHash}});var Wt=hn();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return Wt.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return Wt.toEventSelector}});var _t=Rg();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){ret
46urn _t.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return _t.toEventSignature}});var ct=Bg();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return ct.toFunctionHash}});var vt=Mr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return vt.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return vt.toFunctionSelector}});var ut=Og();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return ut.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return ut.toFunctionSignature}});var fr=Cg();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return fr.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return fr.nonceManager}});var _n=Eu();Object.defineProperty(e,"arrayRegex",{enumerable:!0,get:function(){return _n.arrayRegex}}),Object.defineProperty(e,"bytesRegex",{enumerable:!0,get:function(){return _n.bytesRegex}}),Object.defineProperty(e,"integerRegex",{enumerable:!0,get:function(){return _n.integerRegex}});var Zo=Mg();Object.defineProperty(e,"getSocket",{enumerable:!0,get:function(){return Zo.getSocket}}),Object.defineProperty(e,"rpc",{enumerable:!0,get:function(){return Zo.rpc}});var lr=Bf();Object.defineProperty(e,"getHttpRpcClient",{enumerable:!0,get:function(){return lr.getHttpRpcClient}});var Yo=qg();Object.defineProperty(e,"getSocketRpcClient",{enumerable:!0,get:function(){return Yo.getSocketRpcClient}}),Object.defineProperty(e,"socketClientCache",{enumerable:!0,get:function(){return Yo.socketClientCache}});var Ku=Of();Object.defineProperty(e,"getWebSocketRpcClient",{enumerable:!0,get:function(){return Ku.getWebSocketRpcClient}});var Zu=Go();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return Zu.hashMessage}});var Jo=Vo();Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return Jo.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return Jo.hashTypedData}});var vn=xf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return vn.isErc6492Signature}});var Yu=Hf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return Yu.isErc8010Signature}});var Ju=Ug();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return Ju.parseErc6492Signature}});var En=Lg();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return En.parseErc8010Signature}});var Xu=sr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return Xu.recoverAddress}});var jn=kf();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return jn.recoverMessageAddress}});var Qu=Jd();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return Qu.recoverPublicKey}});var br=Ff();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return br.recoverTypedDataAddress}});var mr=Dg();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return mr.serializeErc6492Signature}});var ed=Gg();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return ed.serializeErc8010Signature}});var hr=Vg();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return hr.verifyHash}});var yr=Wg();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return yr.verifyMessage}});var wn=Kg();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return wn.verifyTypedData}});var td=qe();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return td.stringify}});var rd=Pt();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return rd.assertRequest}});var Pn=zu();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return Pn.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return Pn.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return Pn.assertTransactionLegacy}});var nd=Nf();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return nd.getSerializedTransactionType}});var Xo=Cu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return Xo.getTransactionType}});var od=$f();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return od.parseTransaction}});var An=Tf();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return An.serializeAccessList}});var Qo=Uu();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return Qo.serializeTransaction}});var Lr=Lu();Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return Lr.serializeTypedData}
46}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return Lr.validateTypedData}});var ad=Ro();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return ad.formatEther}});var id=kr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return id.formatGwei}});var sd=Pu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return sd.formatUnits}});var cd=Yg();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return cd.parseEther}});var ud=Jg();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return ud.parseGwei}});var ea=Vu();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return ea.parseUnits}})})(xd)),xd}var Ah;function i6(){if(Ah)return as;Ah=1,Object.defineProperty(as,"__esModule",{value:!0}),as.formatProof=n;const e=zf();function r(t){return t.map(a=>({...a,value:BigInt(a.value)}))}function n(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?(0,e.hexToNumber)(t.nonce):void 0,storageProof:t.storageProof?r(t.storageProof):void 0}}return as}var Th;function s6(){if(Th)return os;Th=1,Object.defineProperty(os,"__esModule",{value:!0}),os.getProof=n;const e=te(),r=i6();async function n(t,{address:a,blockNumber:s,blockTag:o,storageKeys:i}){const c=o??"latest",u=s!==void 0?(0,e.numberToHex)(s):void 0,d=await t.request({method:"eth_getProof",params:[a,i,u||c]});return(0,r.formatProof)(d)}return os}var Hs={},Ih;function c6(){if(Ih)return Hs;Ih=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.getStorageAt=r;const e=te();async function r(n,{address:t,blockNumber:a,blockTag:s="latest",slot:o}){const i=a!==void 0?(0,e.numberToHex)(a):void 0;return await n.request({method:"eth_getStorageAt",params:[t,o,i||s]})}return Hs}var ks={},Sh;function Uf(){if(Sh)return ks;Sh=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.getTransaction=t;const e=Ue(),r=te(),n=qo();async function t(a,{blockHash:s,blockNumber:o,blockTag:i,hash:c,index:u}){const d=i||"latest",f=o!==void 0?(0,r.numberToHex)(o):void 0;let b=null;if(c?b=await a.request({method:"eth_getTransactionByHash",params:[c]},{dedupe:!0}):s?b=await a.request({method:"eth_getTransactionByBlockHashAndIndex",params:[s,(0,r.numberToHex)(u)]},{dedupe:!0}):b=await a.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||d,(0,r.numberToHex)(u)]},{dedupe:!!f}),!b)throw new e.TransactionNotFoundError({blockHash:s,blockNumber:o,blockTag:d,hash:c,index:u});return(a.chain?.formatters?.transaction?.format||n.formatTransaction)(b,"getTransaction")}return ks}var Fs={},Rh;function u6(){if(Rh)return Fs;Rh=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.getTransactionConfirmations=t;const e=be(),r=Uo(),n=Uf();async function t(a,{hash:s,transactionReceipt:o}){const[i,c]=await Promise.all([(0,e.getAction)(a,r.getBlockNumber,"getBlockNumber")({}),s?(0,e.getAction)(a,n.getTransaction,"getTransaction")({hash:s}):void 0]),u=o?.blockNumber||c?.blockNumber;return u?i-u+1n:0n}return Fs}var Ns={},Bh;function Xg(){if(Bh)return Ns;Bh=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.getTransactionReceipt=n;const e=Ue(),r=Do();async function n(t,{hash:a}){const s=await t.request({method:"eth_getTransactionReceipt",params:[a]},{dedupe:!0});if(!s)throw new e.TransactionReceiptNotFoundError({hash:a});return(t.chain?.formatters?.transactionReceipt?.format||r.formatTransactionReceipt)(s,"getTransactionReceipt")}return Ns}var $s={},Oh;function d6(){if(Oh)return $s;Oh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.multicall=f;const e=cr(),r=Fo(),n=Ee(),t=ce(),a=or(),s=Vt(),o=Ze(),i=ur(),c=ir(),u=be(),d=Tt();async function f(b,y){const{account:h,authorizationList:m,allowFailure:g=!0,blockNumber:p,blockOverrides:v,blockTag:j,stateOverride:l}=y,w=y.contracts,{batchSize:E=y.batchSize??1024,deployless:_=y.deployless??!1}=typeof b.batch?.multicall=="object"?b.batch.multicall:{},I=(()=>{if(y.multicallAddress)return y.multicallAddress;if(_)return null;if(b.chain)return(0,i.getChainContractAddress)({blockNumber:p,chain:b.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),S=[[]];let R=0,x=0;for(let C=0;C<w.length;C++){const{abi:k,address:B,args:P,functionName:q}=w[C];try{const F=(0,o.encodeFunctionData)({abi:k,args:P,functionName:q});x+=(F.length-2)/2,E>0&&x>E&&S[R].length>
460&&(R++,x=(F.length-2)/2,S[R]=[]),S[R]=[...S[R],{allowFailure:!0,callData:F,target:B}]}catch(F){const M=(0,c.getContractError)(F,{abi:k,address:B,args:P,docsPath:"/docs/contract/multicall",functionName:q,sender:h});if(!g)throw M;S[R]=[...S[R],{allowFailure:!0,callData:"0x",target:B}]}}const T=await Promise.allSettled(S.map(C=>(0,u.getAction)(b,d.readContract,"readContract")({...I===null?{code:r.multicall3Bytecode}:{address:I},abi:e.multicall3Abi,account:h,args:[C],authorizationList:m,blockNumber:p,blockOverrides:v,blockTag:j,functionName:"aggregate3",stateOverride:l}))),A=[];for(let C=0;C<T.length;C++){const k=T[C];if(k.status==="rejected"){if(!g)throw k.reason;for(let P=0;P<S[C].length;P++)A.push({status:"failure",error:k.reason,result:void 0});continue}const B=k.value;for(let P=0;P<B.length;P++){const{returnData:q,success:F}=B[P],{callData:M}=S[C][P],{abi:O,address:H,functionName:N,args:z}=w[A.length];try{if(M==="0x")throw new n.AbiDecodingZeroDataError;if(!F)throw new a.RawContractError({data:q});const $=(0,s.decodeFunctionResult)({abi:O,args:z,data:q,functionName:N});A.push(g?{result:$,status:"success"}:$)}catch($){const D=(0,c.getContractError)($,{abi:O,address:H,args:z,docsPath:"/docs/contract/multicall",functionName:N});if(!g)throw D;A.push({error:D,result:void 0,status:"failure"})}}}if(A.length!==w.length)throw new t.BaseError("multicall results mismatch");return A}return $s}var zs={},Ch;function Qg(){if(Ch)return zs;Ch=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.simulateBlocks=g;const e=ag(),r=Te(),n=Ee(),t=or(),a=Dt(),s=Vt(),o=Ze(),i=Oe(),c=te(),u=ir(),d=Co(),f=Iu(),b=Gt(),y=wt(),h=Xd(),m=Pt();async function g(p,v){const{blockNumber:j,blockTag:l=p.experimental_blockTag??"latest",blocks:w,returnFullTransactions:E,traceTransfers:_,validation:I}=v;try{const S=[];for(const A of w){const C=A.blockOverrides?e.toRpc(A.blockOverrides):void 0,k=A.calls.map(P=>{const q=P,F=q.account?(0,r.parseAccount)(q.account):void 0,M=q.abi?(0,o.encodeFunctionData)(q):q.data,O={...q,data:q.dataSuffix?(0,i.concat)([M||"0x",q.dataSuffix]):M,from:q.from??F?.address};return(0,m.assertRequest)(O),(0,y.formatTransactionRequest)(O)}),B=A.stateOverrides?(0,h.serializeStateOverride)(A.stateOverrides):void 0;S.push({blockOverrides:C,calls:k,stateOverrides:B})}const x=(typeof j=="bigint"?(0,c.numberToHex)(j):void 0)||l;return(await p.request({method:"eth_simulateV1",params:[{blockStateCalls:S,returnFullTransactions:E,traceTransfers:_,validation:I},x]})).map((A,C)=>({...(0,f.formatBlock)(A),calls:A.calls.map((k,B)=>{const{abi:P,args:q,functionName:F,to:M}=w[C].calls[B],O=k.error?.data??k.returnData,H=BigInt(k.gasUsed),N=k.logs?.map(G=>(0,b.formatLog)(G)),z=k.status==="0x1"?"success":"failure",$=P&&z==="success"&&O!=="0x"?(0,s.decodeFunctionResult)({abi:P,data:O,functionName:F}):null,D=(()=>{if(z==="success")return;let G;if(k.error?.data==="0x"?G=new n.AbiDecodingZeroDataError:k.error&&(G=new t.RawContractError(k.error)),!!G)return(0,u.getContractError)(G,{abi:P??[],address:M??"0x",args:q,functionName:F??"<unknown>"})})();return{data:O,gasUsed:H,logs:N,status:z,...z==="success"?{result:$}:{error:D}}})}))}catch(S){const R=S,x=(0,d.getNodeError)(R,{});throw x instanceof a.UnknownNodeError?R:x}}return zs}var Us={},er={},$e={},cn={},xh;function f6(){if(xh)return cn;xh=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.normalizeSignature=n,cn.isArgOfType=t,cn.getAmbiguousTypes=a;const e=Du(),r=nt();function n(s){let o=!0,i="",c=0,u="",d=!1;for(let f=0;f<s.length;f++){const b=s[f];if(["(",")",","].includes(b)&&(o=!0),b==="("&&c++,b===")"&&c--,!!o){if(c===0){if(b===" "&&["event","function","error",""].includes(u))u="";else if(u+=b,b===")"){d=!0;break}continue}if(b===" "){s[f-1]!==","&&i!==","&&i!==",("&&(i="",o=!1);continue}u+=b,i+=b}}if(!d)throw new r.BaseError("Unable to normalize signature.");return u}function t(s,o){const i=typeof s,c=o.type;switch(c){case"address":return e.validate(s,{strict:!1});case"bool":return i==="boolean";case"function":return i==="string";case"string":return i==="string";default:return c==="tuple"&&"components"in o?Object.values(o.components).every((u,d)=>t(Object.values(s)[d],u)):/^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(c)?i==="number"||i==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(c)?i==="str
46ing"||s instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(c)?Array.isArray(s)&&s.every(u=>t(u,{...o,type:c.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function a(s,o,i){for(const c in s){const u=s[c],d=o[c];if(u.type==="tuple"&&d.type==="tuple"&&"components"in u&&"components"in d)return a(u.components,d.components,i[c]);const f=[u.type,d.type];if(f.includes("address")&&f.includes("bytes20")?!0:f.includes("address")&&f.includes("string")?e.validate(i[c],{strict:!1}):f.includes("address")&&f.includes("bytes")?e.validate(i[c],{strict:!1}):!1)return f}}return cn}var qh;function e_(){if(qh)return $e;qh=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.InvalidSelectorSizeError=$e.NotFoundError=$e.AmbiguityError=void 0,$e.format=s,$e.from=o,$e.fromAbi=i,$e.getSelector=c,$e.getSignature=u,$e.getSignatureHash=d;const e=tr(),r=nt(),n=qf(),t=Me(),a=f6();function s(h){return e.formatAbiItem(h)}function o(h,m={}){const{prepare:g=!0}=m,p=Array.isArray(h)||typeof h=="string"?e.parseAbiItem(h):h;return{...p,...g?{hash:d(p)}:{}}}function i(h,m,g){const{args:p=[],prepare:v=!0}=g??{},j=t.validate(m,{strict:!1}),l=h.filter(_=>j?_.type==="function"||_.type==="error"?c(_)===t.slice(m,0,4):_.type==="event"?d(_)===m:!1:"name"in _&&_.name===m);if(l.length===0)throw new b({name:m});if(l.length===1)return{...l[0],...v?{hash:d(l[0])}:{}};let w;for(const _ of l){if(!("inputs"in _))continue;if(!p||p.length===0){if(!_.inputs||_.inputs.length===0)return{..._,...v?{hash:d(_)}:{}};continue}if(!_.inputs||_.inputs.length===0||_.inputs.length!==p.length)continue;if(p.every((S,R)=>{const x="inputs"in _&&_.inputs[R];return x?a.isArgOfType(S,x):!1})){if(w&&"inputs"in w&&w.inputs){const S=a.getAmbiguousTypes(_.inputs,w.inputs,p);if(S)throw new f({abiItem:_,type:S[0]},{abiItem:w,type:S[1]})}w=_}}const E=(()=>{if(w)return w;const[_,...I]=l;return{..._,overloads:I}})();if(!E)throw new b({name:m});return{...E,...v?{hash:d(E)}:{}}}function c(...h){const m=(()=>{if(Array.isArray(h[0])){const[g,p]=h;return i(g,p)}return h[0]})();return t.slice(d(m),0,4)}function u(...h){const m=(()=>{if(Array.isArray(h[0])){const[p,v]=h;return i(p,v)}return h[0]})(),g=typeof m=="string"?m:e.formatAbiItem(m);return a.normalizeSignature(g)}function d(...h){const m=(()=>{if(Array.isArray(h[0])){const[g,p]=h;return i(g,p)}return h[0]})();return typeof m!="string"&&"hash"in m&&m.hash?m.hash:n.keccak256(t.fromString(u(m)))}class f extends r.BaseError{constructor(m,g){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${m.type}\` in \`${a.normalizeSignature(e.formatAbiItem(m.abiItem))}\`, and`,`\`${g.type}\` in \`${a.normalizeSignature(e.formatAbiItem(g.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}$e.AmbiguityError=f;class b extends r.BaseError{constructor({name:m,data:g,type:p="item"}){const v=m?` with name "${m}"`:g?` with data "${g}"`:"";super(`ABI ${p}${v} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}$e.NotFoundError=b;class y extends r.BaseError{constructor({data:m}){super(`Selector size is invalid. Expected 4 bytes. Received ${t.size(m)} bytes ("${m}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}return $e.InvalidSelectorSizeError=y,$e}var Mh;function l6(){if(Mh)return er;Mh=1,Object.defineProperty(er,"__esModule",{value:!0}),er.decode=a,er.encode=s,er.format=o,er.from=i,er.fromAbi=c;const e=tr(),r=e_(),n=Wo(),t=Me();function a(...u){const[d,f]=(()=>{if(Array.isArray(u[0])){const[h,m]=u;return[c(h),m]}return u})(),{bytecode:b}=f;if(d.inputs.length===0)return;const y=f.data.replace(b,"0x");return n.decode(d.inputs,y)}function s(...u){const[d,f]=(()=>{if(Array.isArray(u[0])){const[h,m]=u;return[c(h),m]}return u})(),{bytecode:b,args:y}=f;return t.concat(b,d.inputs?.length&&y?.length?n.encode(d.inputs,y):"0x")}function o(u){return e.formatAbiItem(u)}function i(u){return r.from(u)}function c(u){const d=u.find(f=>f.type==="constructor");if(!d)throw new r.NotFoundError({name:"constructor"});return d}return er}var mt={},Hh;function b6(){if(Hh)return mt;
46Hh=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.decodeData=a,mt.decodeResult=s,mt.encodeData=o,mt.encodeResult=i,mt.format=c,mt.from=u,mt.fromAbi=d,mt.getSelector=f;const e=tr(),r=e_(),n=Wo(),t=Me();function a(...b){const[y,h]=(()=>{if(Array.isArray(b[0])){const[p,v,j]=b;return[d(p,v),j]}return b})(),{overloads:m}=y;if(t.size(h)<4)throw new r.InvalidSelectorSizeError({data:h});if(y.inputs.length===0)return;const g=m?d([y,...m],h):y;if(!(t.size(h)<=4))return n.decode(g.inputs,t.slice(h,4))}function s(...b){const[y,h,m={}]=(()=>{if(Array.isArray(b[0])){const[p,v,j,l]=b;return[d(p,v),j,l]}return b})(),g=n.decode(y.outputs,h,m);if(!(g&&Object.keys(g).length===0))return g&&Object.keys(g).length===1?Array.isArray(g)?g[0]:Object.values(g)[0]:g}function o(...b){const[y,h=[]]=(()=>{if(Array.isArray(b[0])){const[w,E,_]=b;return[d(w,E,{args:_}),_]}const[j,l]=b;return[j,l]})(),{overloads:m}=y,g=m?d([y,...m],y.name,{args:h}):y,p=f(g),v=h.length>0?n.encode(g.inputs,h):void 0;return v?t.concat(p,v):p}function i(...b){const[y,h,m={}]=(()=>{if(Array.isArray(b[0])){const[v,j,l,w]=b;return[d(v,j),l,w]}return b})(),{as:g="Array"}=m,p=y.outputs.length===1?[h]:Array.isArray(h)?h:g==="Object"?Object.values(h):[h];return n.encode(y.outputs,p)}function c(b){return e.formatAbiItem(b)}function u(b,y={}){return r.from(b,y)}function d(b,y,h){const m=r.fromAbi(b,y,h);if(m.type!=="function")throw new r.NotFoundError({name:y,type:"function"});return m}function f(b){return r.getSelector(b)}return mt}var tt={},kh;function t_(){return kh||(kh=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.zeroAddress=tt.ethAddress=tt.entryPoint08Address=tt.entryPoint07Address=tt.entryPoint06Address=void 0,tt.entryPoint06Address="0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",tt.entryPoint07Address="0x0000000071727De22E5E9d8BAf0edAc6f37da032",tt.entryPoint08Address="0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108",tt.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",tt.zeroAddress="0x0000000000000000000000000000000000000000"),tt}var Fh;function m6(){if(Fh)return Us;Fh=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.simulateCalls=f;const e=l6(),r=b6(),n=Te(),t=t_(),a=Fo(),s=ce(),o=Ze(),i=zf(),c=hg(),u=Qg(),d="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function f(b,y){const{blockNumber:h,blockTag:m,calls:g,stateOverrides:p,traceAssetChanges:v,traceTransfers:j,validation:l}=y,w=y.account?(0,n.parseAccount)(y.account):void 0;if(v&&!w)throw new s.BaseError("`account` is required when `traceAssetChanges` is true");const E=w?e.encode(e.from("constructor(bytes, bytes)"),{bytecode:a.deploylessCallViaBytecodeBytecode,args:[d,r.encodeData(r.from("function getBalance(address)"),[w.address])]}):void 0,_=v?await Promise.all(y.calls.map(async W=>{if(!W.data&&!W.abi)return;const{accessList:X}=await(0,c.createAccessList)(b,{account:w.address,...W,data:W.abi?(0,o.encodeFunctionData)(W):W.data});return X.map(({address:ie,storageKeys:K})=>K.length>0?ie:null)})).then(W=>W.flat().filter(Boolean)):[],I=await(0,u.simulateBlocks)(b,{blockNumber:h,blockTag:m,blocks:[...v?[{calls:[{data:E}],stateOverrides:p},{calls:_.map((W,X)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:W,from:t.zeroAddress,nonce:X})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[],{calls:[...g,{}].map(W=>({...W,from:w?.address})),stateOverrides:p},...v?[{calls:[{data:E}]},{calls:_.map((W,X)=>({abi:[r.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[w.address],to:W,from:t.zeroAddress,nonce:X})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:_.map((W,X)=>({to:W,abi:[r.from("function decimals() returns (uint256)")],functionName:"decimals",from:t.zeroAddress,nonce:X})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:_.map((W,X)=>({to:W,abi:[r.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:t.zeroAddress,nonce:X})),stateOverrides:[{address:t.zeroAddress,nonce:0}]},{calls:_.map((W,X)=>({to:W,abi:[r.from("function symbol() returns (string)")],functionName:"symbol",from:t.zeroAddress,nonce:X})),stateOverrides:[{address:t.zeroAddress,nonce:0}]}]:[]],traceTransfers:j,validation:l}),S=v?I[2]:I[0],[R,x,,T,A,C,k,B]=v?I:[],{calls:P,...q}=S,F=P.slice(0,-1)??[],M=R?.calls??[],O=x?.calls??[],H=[...M,...O].map(W=>W.status==="success"?(0,i.hexToBigInt)(W.data):null),N=T?.calls??[],z=A?.calls??[],$=[...N,...z].map(W=>W.status==="success"?(0,i.hexToBigInt)(W.data):null),D=(C?.calls??[]).map(W=>W.status==="success"?W.result:null),G=(B?.calls??[]).map(W=>W.status==="success"?W.result:null),Y=(k?.calls??[]).map(W=>W.status==="success"?W.result:null),Z=[];for(const[W,X]of $.entries()){const ie=H[W];if(typeof X!="bigint"||typeof ie!="bigint")continue;const K=D[W-1],J=G[W-1],ee=Y[W-1],ae=W===0?{address:t.ethAddress,decimals:18,symbol
46:"ETH"}:{address:_[W-1],decimals:ee||K?Number(K??1):void 0,symbol:J??void 0};Z.some(oe=>oe.token.address===ae.address)||Z.push({token:ae,value:{pre:ie,post:X,diff:X-ie}})}return{assetChanges:Z,block:q,results:F}}return Us}var un={},jo={},zd={},Nh;function h6(){return Nh||(Nh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidWrappedSignatureError=e.universalSignatureValidatorAbi=e.universalSignatureValidatorBytecode=e.magicBytes=void 0,e.assert=a,e.from=s,e.unwrap=o,e.wrap=i,e.validate=c;const r=Wo(),n=nt(),t=Me();e.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",e.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848
46603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",e.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function a(d){if(t.slice(d,-32)!==e.magicBytes)throw new u(d)}function s(d){return typeof d=="string"?o(d):d}function o(d){a(d);const[f,b,y]=r.decode(r.from("address, bytes, bytes"),d);return{data:b,signature:y,to:f}}function i(d){const{data:f,signature:b,to:y}=d;return t.concat(r.encode(r.from("address, bytes, bytes"),[y,f,b]),e.magicBytes)}function c(d){try{return a(d),!0}catch{return!1}}class u extends n.BaseError{constructor(f){super(`Value \`${f}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}e.InvalidWrappedSignatureError=u})(zd)),zd}var $h;function y6(){return $h||($h=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.SignatureErc6492=void 0,jo.SignatureErc6492=h6()),jo}var Ls={},zh;function r_(){if(zh)return Ls;zh=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.serializeSignature=t;const e=Nr(),r=Ae(),n=pe();function t({r:a,s,to:o="hex",v:i,yParity:c}){const u=(()=>{if(c===0||c===1)return c;if(i&&(i===27n||i===28n||i>=35n))return i%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),d=`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(a),(0,r.hexToBigInt)(s)).toCompactHex()}${u===0?"1b":"1c"}`;return o==="hex"?d:(0,n.hexToBytes)(d)}return Ls}var Uh;function Wu(){if(Uh)return un;Uh=1,Object.defineProperty(un,"__esModule",{value:!0}),un.verifyHash=l,un.verifyErc8010=w,un.verifyErc1271=_;const e=y6(),r=Gu(),n=cr(),t=Fo(),a=or(),s=$o(),o=Ze(),i=rt(),c=gt(),u=jg(),d=Oe(),f=ze(),b=Ae(),y=te(),h=be(),m=sr(),g=r_(),p=zo(),v=gg(),j=Tt();async function l(S,R){const{address:x,hash:T,erc6492VerifierAddress:A=R.universalSignatureVerifierAddress??S.chain?.contracts?.erc6492Verifier?.address,multicallAddress:C=R.multicallAddress??S.chain?.contracts?.multicall3?.address}=R,k=(()=>{const B=R.signature;return(0,f.isHex)(B)?B:typeof B=="object"&&"r"in B&&"s"in B?(0,g.serializeSignature)(B):(0,y.bytesToHex)(B)})();try{return r.SignatureErc8010.validate(k)?await w(S,{...R,multicallAddress:C,signature:k}):await E(S,{...R,verifierAddress:A,signature:k})}catch(B){try{if((0,c.isAddressEqual)((0,i.getAddress)(x),await(0,m.recoverAddress)({hash:T,signature:k})))return!0}catch{}if(B instanceof I)return!1;throw B}}async function w(S,R){const{address:x,blockNumber:T,blockTag:A,hash:C,multicallAddress:k}=R,{authorization:B,data:P,signature:q,to:F}=r.SignatureErc8010.unwrap(R.signature);if(await(0,v.getCode)(S,{address:x,blockNumber:T,blockTag:A})===(0,d.concatHex)(["0xef0100",B.address]))return await _(S,{address:x,blockNumber:T,blockTag:A,hash:C,signature:q});const O={address:B.address,chainId:Number(B.chainId),nonce:Number(B.nonce),r:(0,y.numberToHex)(B.r,{size:32}),s:(0,y.numberToHex)(B.s,{size:32}),yParity:B.yParity};if(!await(0,u.verifyAuthorization)({address:x,authorization:O}))throw new I;const N=await(0,h.getAction)(S,j.readContract,"readContract")({...k?{address:k}:{code:t.multicall3Bytecode},authorizationList:[O],abi:n.multicall3Abi,blockNumber:T,blockTag:"pending",functionName:"aggregate3",args:[[...P?[{allowFailure:!0,target:F??x,callData:P}
46]:[],{allowFailure:!0,target:x,callData:(0,o.encodeFunctionData)({abi:n.erc1271Abi,functionName:"isValidSignature",args:[C,q]})}]]});if(N[N.length-1]?.returnData?.startsWith("0x1626ba7e"))return!0;throw new I}async function E(S,R){const{address:x,factory:T,factoryData:A,hash:C,signature:k,verifierAddress:B,...P}=R,q=await(async()=>!T&&!A||e.SignatureErc6492.validate(k)?k:e.SignatureErc6492.wrap({data:A,signature:k,to:T}))(),F=B?{to:B,data:(0,o.encodeFunctionData)({abi:n.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[x,C,q]}),...P}:{data:(0,s.encodeDeployData)({abi:n.erc6492SignatureValidatorAbi,args:[x,C,q],bytecode:t.erc6492SignatureValidatorByteCode}),...P},{data:M}=await(0,h.getAction)(S,p.call,"call")(F).catch(O=>{throw O instanceof a.CallExecutionError?new I:O});if((0,b.hexToBool)(M??"0x0"))return!0;throw new I}async function _(S,R){const{address:x,blockNumber:T,blockTag:A,hash:C,signature:k}=R;if((await(0,h.getAction)(S,j.readContract,"readContract")({address:x,abi:n.erc1271Abi,args:[C,k],blockNumber:T,blockTag:A,functionName:"isValidSignature"}).catch(P=>{throw P instanceof a.ContractFunctionExecutionError?new I:P})).startsWith("0x1626ba7e"))return!0;throw new I}class I extends Error{}return un}var Ds={},Lh;function p6(){if(Lh)return Ds;Lh=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.verifyMessage=n;const e=Go(),r=Wu();async function n(t,{address:a,message:s,factory:o,factoryData:i,signature:c,...u}){const d=(0,e.hashMessage)(s);return(0,r.verifyHash)(t,{address:a,factory:o,factoryData:i,hash:d,signature:c,...u})}return Ds}var Gs={},Dh;function g6(){if(Dh)return Gs;Dh=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.verifyTypedData=n;const e=Vo(),r=Wu();async function n(t,a){const{address:s,factory:o,factoryData:i,signature:c,message:u,primaryType:d,types:f,domain:b,...y}=a,h=(0,e.hashTypedData)({message:u,primaryType:d,types:f,domain:b});return(0,r.verifyHash)(t,{address:s,factory:o,factoryData:i,hash:h,signature:c,...y})}return Gs}var Vs={},Ws={},Gh;function n_(){if(Gh)return Ws;Gh=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.watchBlockNumber=o;const e=Ae(),r=be(),n=Ur(),t=gn(),a=qe(),s=Uo();function o(i,{emitOnBegin:c=!1,emitMissed:u=!1,onBlockNumber:d,onError:f,poll:b,pollingInterval:y=i.pollingInterval}){const h=typeof b<"u"?b:!(i.transport.type==="webSocket"||i.transport.type==="ipc"||i.transport.type==="fallback"&&(i.transport.transports[0].c
46onfig.type==="webSocket"||i.transport.transports[0].config.type==="ipc"));let m;return h?(()=>{const v=(0,a.stringify)(["watchBlockNumber",i.uid,c,u,y]);return(0,n.observe)(v,{onBlockNumber:d,onError:f},j=>(0,t.poll)(async()=>{try{const l=await(0,r.getAction)(i,s.getBlockNumber,"getBlockNumber")({cacheTime:0});if(m!==void 0){if(l===m)return;if(l-m>1&&u)for(let w=m+1n;w<l;w++)j.onBlockNumber(w,m),m=w}(m===void 0||l>m)&&(j.onBlockNumber(l,m),m=l)}catch(l){j.onError?.(l)}},{emitOnBegin:c,interval:y}))})():(()=>{const v=(0,a.stringify)(["watchBlockNumber",i.uid,c,u]);return(0,n.observe)(v,{onBlockNumber:d,onError:f},j=>{let l=!0,w=()=>l=!1;return(async()=>{try{const E=(()=>{if(i.transport.type==="fallback"){const I=i.transport.transports.find(S=>S.config.type==="webSocket"||S.config.type==="ipc");return I?I.value:i.transport}return i.transport})(),{unsubscribe:_}=await E.subscribe({params:["newHeads"],onData(I){if(!l)return;const S=(0,e.hexToBigInt)(I.result?.number);j.onBlockNumber(S,m),m=S},onError(I){j.onError?.(I)}});w=_,l||w()}catch(E){f?.(E)}})(),()=>w()})})()}return Ws}var Vh;function o_(){if(Vh)return Vs;Vh=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.waitForTransactionReceipt=f;const e=ef(),r=Ue(),n=be(),t=Ur(),a=df(),s=Nu(),o=qe(),i=pn(),c=Uf(),u=Xg(),d=n_();async function f(b,y){const{checkReplacement:h=!0,confirmations:m=1,hash:g,onReplaced:p,retryCount:v=6,retryDelay:j=({count:P})=>~~(1<<P)*200,timeout:l=18e4}=y,w=(0,o.stringify)(["waitForTransactionReceipt",b.uid,g]),E=y.pollingInterval?y.pollingInterval:b.chain?.experimental_preconfirmationTime?b.chain.experimental_preconfirmationTime:b.pollingInterval;let _,I,S,R=!1,x,T;const{promise:A,resolve:C,reject:k}=(0,a.withResolvers)(),B=l?setTimeout(()=>{T?.(),x?.(),k(new r.WaitForTransactionReceiptTimeoutError({hash:g}))},l):void 0;return x=(0,t.observe)(w,{onReplaced:p,resolve:C,reject:k},async P=>{if(S=await(0,n.getAction)(b,u.getTransactionReceipt,"getTransactionReceipt")({hash:g}).catch(()=>{}),S&&m<=1){clearTimeout(B),P.resolve(S),x?.();return}T=(0,n.getAction)(b,d.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:E,async onBlockNumber(q){const F=O=>{clearTimeout(B),T?.(),O(),x?.()};let M=q;if(!R)try{if(S){if(m>1&&(!S.blockNumber||M-S.blockNumber+1n<m))return;F(()=>P.resolve(S));return}if(h&&!_&&(R=!0,await(0,s.withRetry)(async()=>{_=await(0,n.getAction)(b,c.getTransaction,"getTransaction")({hash:g}),_.blockNumber&&(M=_.blockNumber)},{delay:j,retryCount:v}),R=!1),S=await(0,n.getAction)(b,u.getTransactionReceipt,"getTransactionReceipt")({hash:g}),m>1&&(!S.blockNumber||M-S.blockNumber+1n<m))return;F(()=>P.resolve(S))}catch(O){if(O instanceof r.TransactionNotFoundError||O instanceof r.TransactionReceiptNotFoundError){if(!_){R=!1;return}try{I=_,R=!0;const H=await(0,s.withRetry)(()=>(0,n.getAction)(b,i.getBlock,"getBlock")({blockNumber:M,includeTransactions:!0}),{delay:j,retryCount:v,shouldRetry:({error:$})=>$ instanceof e.BlockNotFoundError});R=!1;const N=H.transactions.find(({from:$,nonce:D})=>$===I.from&&D===I.nonce);if(!N||(S=await(0,n.getAction)(b,u.getTransactionReceipt,"getTransactionReceipt")({hash:N.hash}),m>1&&(!S.blockNumber||M-S.blockNumber+1n<m)))return;let z="replaced";N.to===I.to&&N.value===I.value&&N.input===I.input?z="repriced":N.from===N.to&&N.value===0n&&(z="cancelled"),F(()=>{P.onReplaced?.({reason:z,replacedTransaction:I,transaction:N,transactionReceipt:S}),P.resolve(S)})}catch(H){F(()=>P.reject(H))}}else F(()=>P.reject(O))}}})}),A}return Vs}var Ks={},Wh;function _6(){if(Wh)return Ks;Wh=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.watchBlocks=s;const e=be(),r=Ur(),n=gn(),t=qe(),a=pn();function s(o,{blockTag:i=o.experimental_blockTag??"latest",emitMissed:c=!1,emitOnBegin:u=!1,onBlock:d,onError:f,includeTransactions:b,poll:y,pollingInterval:h=o.pollingInterval}){const m=typeof y<"u"?y:!(o.transport.type==="webSocket"||o.transport.type==="ipc"||o.transport.type==="fallback"&&(o.transport.transports[0].c
46onfig.type==="webSocket"||o.transport.transports[0].config.type==="ipc")),g=b??!1;let p;return m?(()=>{const l=(0,t.stringify)(["watchBlocks",o.uid,i,c,u,g,h]);return(0,r.observe)(l,{onBlock:d,onError:f},w=>(0,n.poll)(async()=>{try{const E=await(0,e.getAction)(o,a.getBlock,"getBlock")({blockTag:i,includeTransactions:g});if(E.number!==null&&p?.number!=null){if(E.number===p.number)return;if(E.number-p.number>1&&c)for(let _=p?.number+1n;_<E.number;_++){const I=await(0,e.getAction)(o,a.getBlock,"getBlock")({blockNumber:_,includeTransactions:g});w.onBlock(I,p),p=I}}(p?.number==null||i==="pending"&&E?.number==null||E.number!==null&&E.number>p.number)&&(w.onBlock(E,p),p=E)}catch(E){w.onError?.(E)}},{emitOnBegin:u,interval:h}))})():(()=>{let l=!0,w=!0,E=()=>l=!1;return(async()=>{try{u&&(0,e.getAction)(o,a.getBlock,"getBlock")({blockTag:i,includeTransactions:g}).then(S=>{l&&w&&(d(S,void 0),w=!1)}).catch(f);const _=(()=>{if(o.transport.type==="fallback"){const S=o.transport.transports.find(R=>R.config.type==="webSocket"||R.config.type==="ipc");return S?S.value:o.transport}return o.transport})(),{unsubscribe:I}=await _.subscribe({params:["newHeads"],async onData(S){if(!l)return;const R=await(0,e.getAction)(o,a.getBlock,"getBlock")({blockNumber:S.result?.number,includeTransactions:g}).catch(()=>{});l&&(d(R,p),w=!1,p=R)},onError(S){f?.(S)}});E=I,l||E()}catch(_){f?.(_)}})(),()=>E()})()}return Ks}var Zs={},Kh;function v6(){if(Kh)return Zs;Kh=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.watchEvent=h;const e=Ee(),r=ar(),n=Ho(),t=Hr(),a=Gt(),s=be(),o=Ur(),i=gn(),c=qe(),u=yg(),d=Uo(),f=Mu(),b=sf(),y=Hu();function h(m,{address:g,args:p,batch:v=!0,event:j,events:l,fromBlock:w,onError:E,onLogs:_,poll:I,pollingInterval:S=m.pollingInterval,strict:R}){const x=typeof I<"u"?I:typeof w=="bigint"?!0:!(m.transport.type==="webSocket"||m.transport.type==="ipc"||m.transport.type==="fallback"&&(m.transport.transports[0].c
46onfig.type==="webSocket"||m.transport.transports[0].config.type==="ipc")),T=R??!1;return x?(()=>{const k=(0,c.stringify)(["watchEvent",g,p,v,m.uid,j,S,w]);return(0,o.observe)(k,{onLogs:_,onError:E},B=>{let P;w!==void 0&&(P=w-1n);let q,F=!1;const M=(0,i.poll)(async()=>{if(!F){try{q=await(0,s.getAction)(m,u.createEventFilter,"createEventFilter")({address:g,args:p,event:j,events:l,strict:T,fromBlock:w})}catch{}F=!0;return}try{let O;if(q)O=await(0,s.getAction)(m,f.getFilterChanges,"getFilterChanges")({filter:q});else{const H=await(0,s.getAction)(m,d.getBlockNumber,"getBlockNumber")({});P&&P!==H?O=await(0,s.getAction)(m,b.getLogs,"getLogs")({address:g,args:p,event:j,events:l,fromBlock:P+1n,toBlock:H}):O=[],P=H}if(O.length===0)return;if(v)B.onLogs(O);else for(const H of O)B.onLogs([H])}catch(O){q&&O instanceof r.InvalidInputRpcError&&(F=!1),B.onError?.(O)}},{emitOnBegin:!0,interval:S});return async()=>{q&&await(0,s.getAction)(m,y.uninstallFilter,"uninstallFilter")({filter:q}),M()}})})():(()=>{let k=!0,B=()=>k=!1;return(async()=>{try{const P=(()=>{if(m.transport.type==="fallback"){const O=m.transport.transports.find(H=>H.config.type==="webSocket"||H.config.type==="ipc");return O?O.value:m.transport}return m.transport})(),q=l??(j?[j]:void 0);let F=[];q&&(F=[q.flatMap(H=>(0,t.encodeEventTopics)({abi:[H],eventName:H.name,args:p}))],j&&(F=F[0]));const{unsubscribe:M}=await P.subscribe({params:["logs",{address:g,topics:F}],onData(O){if(!k)return;const H=O.result;try{const{eventName:N,args:z}=(0,n.decodeEventLog)({abi:q??[],data:H.data,topics:H.topics,strict:T}),$=(0,a.formatLog)(H,{args:z,eventName:N});_([$])}catch(N){let z,$;if(N instanceof e.DecodeLogDataMismatch||N instanceof e.DecodeLogTopicsMismatch){if(R)return;z=N.abiItem.name,$=N.abiItem.inputs?.some(G=>!("name"in G&&G.name))}const D=(0,a.formatLog)(H,{args:$?[]:{},eventName:z});_([D])}},onError(O){E?.(O)}});B=M,k||B()}catch(P){E?.(P)}})(),()=>B()})()}return Zs}var Ys={},Zh;function E6(){if(Zh)return Ys;Zh=1,Object.defineProperty(Ys,"__esModule",{value:!0}),Ys.watchPendingTransactions=i;const e=be(),r=Ur(),n=gn(),t=qe(),a=pg(),s=Mu(),o=Hu();function i(c,{batch:u=!0,onError:d,onTransactions:f,poll:b,pollingInterval:y=c.pollingInterval}){return(typeof b<"u"?b:c.transport.type!=="webSocket"&&c.transport.type!=="ipc")?(()=>{const p=(0,t.stringify)(["watchPendingTransactions",c.uid,u,y]);return(0,r.observe)(p,{onTransactions:f,onError:d},v=>{let j;const l=(0,n.poll)(async()=>{try{if(!j)try{j=await(0,e.getAction)(c,a.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(E){throw l(),E}const w=await(0,e.getAction)(c,s.getFilterChanges,"getFilterChanges")({filter:j});if(w.length===0)return;if(u)v.onTransactions(w);else for(const E of w)v.onTransactions([E])}catch(w){v.onError?.(w)}},{emitOnBegin:!0,interval:y});return async()=>{j&&await(0,e.getAction)(c,o.uninstallFilter,"uninstallFilter")({filter:j}),l()}})})():(()=>{let p=!0,v=()=>p=!1;return(async()=>{try{const{unsubscribe:j}=await c.transport.subscribe({params:["newPendingTransactions"],onData(l){if(!p)return;const w=l.result;f([w])},onError(l){d?.(l)}});v=j,p||v()}catch(j){d?.(j)}})(),()=>v()})()}return Ys}var Js={},Xs={},Yh;function j6(){if(Yh)return Xs;Yh=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.parseSiweMessage=e;function e(t){const{scheme:a,statement:s,...o}=t.match(r)?.groups??{},{chainId:i,expirationTime:c,issuedAt:u,notBefore:d,requestId:f,...b}=t.match(n)?.groups??{},y=t.split("Resources:")[1]?.split(` 47- `).slice(1);return{...o,...b,...i?{chainId:Number(i)}:{},...c?{expirationTime:new Date(c)}:{},...u?{issuedAt:new Date(u)}:{},...d?{notBefore:new Date(d)}:{},...f?{requestId:f}:{},...y?{resources:y}:{},...a?{scheme:a}:{},...s?{statement:s}:{}}}const r=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,n=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;return Xs}var Qs={},Jh;function w6(){if(Jh)return Qs;Jh=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.validateSiweMessage=n;const e=Ke(),r=gt();function n(t){const{address:a,domain:s,message:o,nonce:i,scheme:c,time:u=new Date}=t;if(s&&o.domain!==s||i&&o.nonce!==i||c&&o.scheme!==c||o.expirationTime&&u>=o.expirationTime||o.notBefore&&u<o.notBefore)return!1;try{if(!o.address||!(0,e.isAddress)(o.address,{strict:!1})||a&&!(0,r.isAddressEqual)(o.address,a))return!1}catch{return!1}return!0}return Qs}var Xh;function P6(){if(Xh)return Js;Xh=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.verifySiweMessage=a;const e=Go(),r=j6(),n=w6(),t=Wu();
47async function a(s,o){const{address:i,domain:c,message:u,nonce:d,scheme:f,signature:b,time:y=new Date,...h}=o,m=(0,r.parseSiweMessage)(u);if(!m.address||!(0,n.validateSiweMessage)({address:i,domain:c,message:m,nonce:d,scheme:f,time:y}))return!1;const p=(0,e.hashMessage)(u);return(0,t.verifyHash)(s,{address:m.address,hash:p,signature:b,...h})}return Js}var ec={},Qh;function Lf(){if(Qh)return ec;Qh=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.sendRawTransactionSync=t;const e=Ue(),r=Do(),n=zf();async function t(a,{serializedTransaction:s,throwOnReceiptRevert:o,timeout:i}){const c=await a.request({method:"eth_sendRawTransactionSync",params:i?[s,(0,n.numberToHex)(i)]:[s]},{retryCount:0}),d=(a.chain?.formatters?.transactionReceipt?.format||r.formatTransactionReceipt)(c);if(d.status==="reverted"&&o)throw new e.TransactionReceiptRevertedError({receipt:d});return d}return ec}var ey;function a_(){if(ey)return xi;ey=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.publicActions=se;const e=qv(),r=kv(),n=Fv(),t=Nv(),a=mg(),s=zo(),o=hg(),i=$v(),c=Vd(),u=yg(),d=pg(),f=rg(),b=Jp(),y=af(),h=Yp(),m=zv(),g=Uv(),p=pn(),v=Uo(),j=Lv(),l=zr(),w=gg(),E=cf(),_=Gv(),I=Wv(),S=Mu(),R=Kv(),x=tf(),T=sf(),A=s6(),C=c6(),k=Uf(),B=u6(),P=Su(),q=Xg(),F=d6(),M=Tt(),O=Qg(),H=m6(),N=ig(),z=Hu(),$=Wu(),D=p6(),G=g6(),Y=o_(),Z=n_(),W=_6(),X=cg(),ie=v6(),K=E6(),J=P6(),ee=Mo(),ae=pf(),oe=Lf();function se(Q){return{call:V=>(0,s.call)(Q,V),createAccessList:V=>(0,o.createAccessList)(Q,V),createBlockFilter:()=>(0,i.createBlockFilter)(Q),createContractEventFilter:V=>(0,c.createContractEventFilter)(Q,V),createEventFilter:V=>(0,u.createEventFilter)(Q,V),createPendingTransactionFilter:()=>(0,d.createPendingTransactionFilter)(Q),estimateContractGas:V=>(0,f.estimateContractGas)(Q,V),estimateGas:V=>(0,y.estimateGas)(Q,V),getBalance:V=>(0,m.getBalance)(Q,V),getBlobBaseFee:()=>(0,g.getBlobBaseFee)(Q),getBlock:V=>(0,p.getBlock)(Q,V),getBlockNumber:V=>(0,v.getBlockNumber)(Q,V),getBlockTransactionCount:V=>(0,j.getBlockTransactionCount)(Q,V),getBytecode:V=>(0,w.getCode)(Q,V),getChainId:()=>(0,l.getChainId)(Q),getCode:V=>(0,w.getCode)(Q,V),getContractEvents:V=>(0,E.getContractEvents)(Q,V),getEip712Domain:V=>(0,_.getEip712Domain)(Q,V),getEnsAddress:V=>(0,e.getEnsAddress)(Q,V),getEnsAvatar:V=>(0,r.getEnsAvatar)(Q,V),getEnsName:V=>(0,n.getEnsName)(Q,V),getEnsResolver:V=>
47(0,t.getEnsResolver)(Q,V),getEnsText:V=>(0,a.getEnsText)(Q,V),getFeeHistory:V=>(0,I.getFeeHistory)(Q,V),estimateFeesPerGas:V=>(0,b.estimateFeesPerGas)(Q,V),getFilterChanges:V=>(0,S.getFilterChanges)(Q,V),getFilterLogs:V=>(0,R.getFilterLogs)(Q,V),getGasPrice:()=>(0,x.getGasPrice)(Q),getLogs:V=>(0,T.getLogs)(Q,V),getProof:V=>(0,A.getProof)(Q,V),estimateMaxPriorityFeePerGas:V=>(0,h.estimateMaxPriorityFeePerGas)(Q,V),getStorageAt:V=>(0,C.getStorageAt)(Q,V),getTransaction:V=>(0,k.getTransaction)(Q,V),getTransactionConfirmations:V=>(0,B.getTransactionConfirmations)(Q,V),getTransactionCount:V=>(0,P.getTransactionCount)(Q,V),getTransactionReceipt:V=>(0,q.getTransactionReceipt)(Q,V),multicall:V=>(0,F.multicall)(Q,V),prepareTransactionRequest:V=>(0,ee.prepareTransactionRequest)(Q,V),readContract:V=>(0,M.readContract)(Q,V),sendRawTransaction:V=>(0,ae.sendRawTransaction)(Q,V),sendRawTransactionSync:V=>(0,oe.sendRawTransactionSync)(Q,V),simulate:V=>(0,O.simulateBlocks)(Q,V),simulateBlocks:V=>(0,O.simulateBlocks)(Q,V),simulateCalls:V=>(0,H.simulateCalls)(Q,V),simulateContract:V=>(0,N.simulateContract)(Q,V),verifyHash:V=>(0,$.verifyHash)(Q,V),verifyMessage:V=>(0,D.verifyMessage)(Q,V),verifySiweMessage:V=>(0,J.verifySiweMessage)(Q,V),verifyTypedData:V=>(0,G.verifyTypedData)(Q,V),uninstallFilter:V=>(0,z.uninstallFilter)(Q,V),waitForTransactionReceipt:V=>(0,Y.waitForTransactionReceipt)(Q,V),watchBlocks:V=>(0,W.watchBlocks)(Q,V),watchBlockNumber:V=>(0,Z.watchBlockNumber)(Q,V),watchContractEvent:V=>(0,X.watchContractEvent)(Q,V),watchEvent:V=>(0,ie.watchEvent)(Q,V),watchPendingTransactions:V=>(0,K.watchPendingTransactions)(Q,V)}}return xi}var ty;function A6(){if(ty)return Ci;ty=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.createPublicClient=n;const e=$u(),r=a_();function n(t){const{key:a="public",name:s="Public Client"}=t;return(0,e.createClient)({...t,key:a,name:s,type:"publicClient"}).extend(r.publicActions)}return Ci}var tc={},rc={},nc={},ry;function T6(){if(ry)return nc;ry=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.dropTransaction=e;async function e(r,{hash:n}){await r.request({method:`${r.mode}_dropTransaction`,params:[n]})}return nc}var oc={},ny;function I6(){if(ny)return oc;ny=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.dumpState=e;async function e(r){return r.request({method:`${r.mode}_dumpState`})}return oc}var ac={},oy;function S6(){if(oy)return ac;oy=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.getAutomine=e;async function e(r){return r.mode==="ganache"?await r.request({method:"eth_mining"}):await r.request({method:`${r.mode}_getAutomine`})}return ac}var ic={},ay;function R6(){if(ay)return ic;ay=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.getTxpoolContent=e;async function e(r){return await r.request({method:"txpool_content"})}return ic}var sc={},iy;function B6(){if(iy)return sc;iy=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.getTxpoolStatus=r;const e=Ae();async function r(n){const{pending:t,queued:a}=await n.request({method:"txpool_status"});return{pending:(0,e.hexToNumber)(t),queued:(0,e.hexToNumber)(a)}}return sc}var cc={},sy;function O6(){if(sy)return cc;sy=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.impersonateAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_impersonateAccount`,params:[n]})}return cc}var uc={},cy;function C6(){if(cy)return uc;cy=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.increaseTime=r;const e=te();async function r(n,{seconds:t}){return await n.request({method:"evm_increaseTime",params:[(0,e.numberToHex)(t)]})}return uc}var dc={},uy;function x6(){if(uy)return dc;uy=1,Object.defineProperty(dc,"__esModule",{value:!0}),dc.inspectTxpool=e;async function e(r){return await r.request({method:"txpool_inspect"})}return dc}var fc={},dy;function q6(){if(dy)return fc;dy=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.loadState=e;async function e(r,{state:n}){await r.request({method:`${r.mode}_loadState`,params:[n]})}return fc}var lc={},fy;function M6(){if(fy)return lc;fy=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.mine=r;const e=te();async function r(n,{blocks:t,interval:a}){n.mode==="ganache"?await n.request({method:"evm_mine",params:[{blocks:(0,e.numberToHex)(t)}]}):await n.request({method:`${n.mode}_mine`,params:[(0,e.numberToHex)(t),(0,e.numberToHex)(a||0)]})}return lc}var bc={},ly;function H6(){if(ly)return bc;ly=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.removeBlockTimestampInterval=e;async function e(r){await r.request({method:`${r.mode}_removeBlockTimestampInterval`})}return bc}var mc={},by;function k6(){if(by)return mc;by=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.reset=e;async function e(r,{blockNumber:n,jsonRpcUrl:t}={}){await r.request({method:`${r.mode}_reset`,params:[{forking:{blockNumber:Number(n),jsonRpcUrl:t}}]})}return mc}var hc={},my;function F6(){if(my)return hc;my=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.revert=e;async function e(r,{id:n}){await r.request({method:"evm_revert",params:[n]})}return hc}var yc={},hy;function N6(){if(hy)return yc;hy=1,Object.defineProperty(yc,"__esModule",{value:!0}),yc.sendUnsignedTransaction=n;const e=$r(),r=wt();async function n(t,a){const{accessList:s,data:o,from:i,gas:c,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:b,to:y,value:h,...m}=a,g=t.chain?.formatters?.transactionRequest?.format,v=(g||r.formatTransactionRequest)({...(0,e.extract)(m,{format:g}),accessList:s,data:o,from:i,gas:c,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:b,to:y,value:h},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[v]})}return yc}var pc={},yy;function $6(){if(yy)return pc;yy=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.setAutomine=e;async function e(r,n){r.mode==="ganache"?n?await r.request({method:"miner_start"}):await r.request({method:"miner_stop"}):await r.request({method:"evm_setAutomine",params:[n]})}return pc}var gc={},py;function z6(){if(py)return gc;py=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.setBalance=r;const e=te();async function r(n,{address:t,value:a}){n.mode==="ganache"?await n.request({method:"evm_setAccountBalance",params:[t,(0,e.numberToHex)(a)]}):await n.request({method:`${n.mode}_setBalance`,params:[t,(0,e.numberToHex)(a)]})}return gc}var _c={},gy;function U6(){if(gy)return _c;gy=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.setBlockGasLimit=r;const e=te();async function r(n,{gasLimit:t}){await n.request({method:"evm_setBlockGasLimit",params:[(0,e.numberToHex)(t)]})}return _c}var vc={},_y;function L6(){if(_y)return vc;_y=1,Object.defineProperty(vc,"__esModule",{value:!0}),vc.setBlockTimestampInterval=e;async function e(r,{interval:n}){const t=r.mode==="hardhat"?n*1e3:n;await r.request({method:`${r.mode}_setBlockTimestampInterval`,params:[t]})}return vc}var Ec={},vy;function D6(){if(vy)return Ec;vy=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.setCode=e;async function e(r,{address:n,bytecode:t}){r.mode==="ganache"?await r.request({method:"evm_setAccountCode",params:[n,t]}):await r.request({method:`${r.mode}_setCode`,params:[n,t]})}return Ec}var jc={},Ey;function G6(){if(Ey)return jc;Ey=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.setCoinbase=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_setCoinbase`,params:[n]})}return jc}var wc={},jy;function V6(){if(jy)return wc;
47jy=1,Object.defineProperty(wc,"__esModule",{value:!0}),wc.setIntervalMining=e;async function e(r,{interval:n}){const t=r.mode==="hardhat"?n*1e3:n;await r.request({method:"evm_setIntervalMining",params:[t]})}return wc}var Pc={},wy;function W6(){if(wy)return Pc;wy=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.setLoggingEnabled=e;async function e(r,n){await r.request({method:`${r.mode}_setLoggingEnabled`,params:[n]})}return Pc}var Ac={},Py;function K6(){if(Py)return Ac;Py=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.setMinGasPrice=r;const e=te();async function r(n,{gasPrice:t}){await n.request({method:`${n.mode}_setMinGasPrice`,params:[(0,e.numberToHex)(t)]})}return Ac}var Tc={},Ay;function Z6(){if(Ay)return Tc;Ay=1,Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.setNextBlockBaseFeePerGas=r;const e=te();async function r(n,{baseFeePerGas:t}){await n.request({method:`${n.mode}_setNextBlockBaseFeePerGas`,params:[(0,e.numberToHex)(t)]})}return Tc}var Ic={},Ty;function Y6(){if(Ty)return Ic;Ty=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.setNextBlockTimestamp=r;const e=te();async function r(n,{timestamp:t}){await n.request({method:"evm_setNextBlockTimestamp",params:[(0,e.numberToHex)(t)]})}return Ic}var Sc={},Iy;function J6(){if(Iy)return Sc;Iy=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.setNonce=r;const e=te();async function r(n,{address:t,nonce:a}){await n.request({method:`${n.mode}_setNonce`,params:[t,(0,e.numberToHex)(a)]})}return Sc}var Rc={},Sy;function X6(){if(Sy)return Rc;Sy=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.setRpcUrl=e;async function e(r,n){await r.request({method:`${r.mode}_setRpcUrl`,params:[n]})}return Rc}var Bc={},Ry;function Q6(){if(Ry)return Bc;Ry=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.setStorageAt=r;const e=te();async function r(n,{address:t,index:a,value:s}){await n.request({method:`${n.mode}_setStorageAt`,params:[t,typeof a=="number"?(0,e.numberToHex)(a):a,s]})}return Bc}var Oc={},By;function e5(){if(By)return Oc;By=1,Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.snapshot=e;async function e(r){return await r.request({method:"evm_snapshot"})}return Oc}var Cc={},Oy;function t5(){if(Oy)return Cc;Oy=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.stopImpersonatingAccount=e;async function e(r,{address:n}){await r.request({method:`${r.mode}_stopImpersonatingAccount`,params:[n]})}return Cc}var Cy;function i_(){if(Cy)return rc;Cy=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.testActions=C;const e=T6(),r=I6(),n=S6(),t=R6(),a=B6(),s=O6(),o=C6(),i=x6(),c=q6(),u=M6(),d=H6(),f=k6(),b=F6(),y=N6(),h=$6(),m=z6(),g=U6(),p=L6(),v=D6(),j=G6(),l=V6(),w=W6(),E=K6(),_=Z6(),I=Y6(),S=J6(),R=X6(),x=Q6(),T=e5(),A=t5();function C({mode:k}){return B=>{const P=B.extend(()=>({mode:k}));return{dropTransaction:q=>(0,e.dropTransaction)(P,q),dumpState:()=>(0,r.dumpState)(P),getAutomine:()=>(0,n.getAutomine)(P),getTxpoolContent:()=>(0,t.getTxpoolContent)(P),getTxpoolStatus:()=>(0,a.getTxpoolStatus)(P),impersonateAccount:q=>(0,s.impersonateAccount)(P,q),increaseTime:q=>(0,o.increaseTime)(P,q),inspectTxpool:()=>(0,i.inspectTxpool)(P),loadState:q=>(0,c.loadState)(P,q),mine:q=>(0,u.mine)(P,q),removeBlockTimestampInterval:()=>(0,d.removeBlockTimestampInterval)(P),reset:q=>(0,f.reset)(P,q),revert:q=>(0,b.revert)(P,q),sendUnsignedTransaction:q=>(0,y.sendUnsignedTransaction)(P,q),setAutomine:q=>(0,h.setAutomine)(P,q),setBalance:q=>(0,m.setBalance)(P,q),setBlockGasLimit:q=>(0,g.setBlockGasLimit)(P,q),setBlockTimestampInterval:q=>(0,p.setBlockTimestampInterval)(P,q),setCode:q=>(0,v.setCode)(P,q),setCoinbase:q=>(0,j.setCoinbase)(P,q),setIntervalMining:q=>(0,l.setIntervalMining)(P,q),setLoggingEnabled:q=>(0,w.setLoggingEnabled)(P,q),setMinGasPrice:q=>(0,E.setMinGasPrice)(P,q),setNextBlockBaseFeePerGas:q=>(0,_.setNextBlockBaseFeePerGas)(P,q),setNextBlockTimestamp:q=>(0,I.setNextBlockTimestamp)(P,q),setNonce:q=>(0,S.setNonce)(P,q),setRpcUrl:q=>(0,R.setRpcUrl)(P,q),setStorageAt:q=>(0,x.setStorageAt)(P,q),snapshot:()=>(0,T.snapshot)(P),stopImpersonatingAccount:q=>(0,A.stopImpersonatingAccount)(P,q)}}}return rc}var xy;function r5(){if(xy)return tc;xy=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.createTestClient=n;const e=$u(),r=i_();function n(t){const{key:a="test",name:s="Test Client",mode:o}=t;return(0,e.createClient)({...t,key:a,name:s,type:"testClient"}).extend(c=>({mode:o,...(0,r.testActions)({mode:o})(c)}))}return tc}var xc={},qc={},Mc={},qy;function n5(){if(qy)return Mc;qy=1,Object.defineProperty(Mc,"__esModule",{value:!0}),Mc.addChain=r;const e=te();async function r(n,{chain:t}){const{id:a,name:s,nativeCurrency:o,rpcUrls:i,blockExplorers:c}=t;await n.request({method:"wallet_addEthereumChain",params:[{chainId:(0,e.numberToHex)(a),chainName:s,nativeCurrency:o,rpcUrls:i.default.http,blockExplorerUrls:c?Object.values(c).map(({url:u})=>u):void 0}]},{dedupe:!0,retryCount:0})}return Mc}var Hc={},My;function o5(){if(My)return Hc;My=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.deployContract=n;const e=$o(),r=Fu();function n(t,a){const{abi:s,args:o,bytecode:i,...c}=a,u=(0,e.encodeDeployData)({abi:s,args:o,bytecode:i}
47);return(0,r.sendTransaction)(t,{...c,...c.authorizationList?{to:null}:{},data:u})}return Hc}var kc={},Hy;function a5(){if(Hy)return kc;Hy=1,Object.defineProperty(kc,"__esModule",{value:!0}),kc.getAddresses=r;const e=rt();async function r(n){return n.account?.type==="local"?[n.account.address]:(await n.request({method:"eth_accounts"},{dedupe:!0})).map(a=>(0,e.checksumAddress)(a))}return kc}var Fc={},ky;function i5(){if(ky)return Fc;ky=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.getCapabilities=n;const e=Te(),r=te();async function n(t,a={}){const{account:s=t.account,chainId:o}=a,i=s?(0,e.parseAccount)(s):void 0,c=o?[i?.address,[(0,r.numberToHex)(o)]]:[i?.address],u=await t.request({method:"wallet_getCapabilities",params:c}),d={};for(const[f,b]of Object.entries(u)){d[Number(f)]={};for(let[y,h]of Object.entries(b))y==="addSubAccount"&&(y="unstable_addSubAccount"),d[Number(f)][y]=h}return typeof o=="number"?d[o]:d}return Fc}var Nc={},Fy;function s5(){if(Fy)return Nc;Fy=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.getPermissions=e;async function e(r){return await r.request({method:"wallet_getPermissions"},{dedupe:!0})}return Nc}var $c={},Ny;function s_(){if(Ny)return $c;Ny=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.prepareAuthorization=o;const e=Te(),r=dr(),n=gt(),t=be(),a=zr(),s=Su();async function o(i,c){const{account:u=i.account,chainId:d,nonce:f}=c;if(!u)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});const b=(0,e.parseAccount)(u),y=(()=>{if(c.executor)return c.executor==="self"?c.executor:(0,e.parseAccount)(c.executor)})(),h={address:c.contractAddress??c.address,chainId:d,nonce:f};return typeof h.chainId>"u"&&(h.chainId=i.chain?.id??await(0,t.getAction)(i,a.getChainId,"getChainId")({})),typeof h.nonce>"u"&&(h.nonce=await(0,t.getAction)(i,s.getTransactionCount,"getTransactionCount")({address:b.address,blockTag:"pending"}),(y==="self"||y?.address&&(0,n.isAddressEqual)(y.address,b.address))&&(h.nonce+=1)),h}return $c}var zc={},$y;function c5(){if($y)return zc;$y=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.requestAddresses=r;const e=rt();async function r(n){return(await n.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>(0,e.getAddress)(a))}return zc}var Uc={},zy;function u5(){if(zy)return Uc;zy=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.requestPermissions=e;async function e(r,n){return r.request({method:"wallet_requestPermissions",params:[n]},{retryCount:0})}return Uc}var Lc={},Uy;function d5(){if(Uy)return Lc;Uy=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.sendCallsSync=n;const e=_f(),r=vf();async function n(t,a){const{chain:s=t.chain}=a,o=a.timeout??Math.max((s?.blockTime??0)*3,5e3),i=await(0,e.sendCalls)(t,a);return await(0,r.waitForCallsStatus)(t,{...a,id:i.id,timeout:o})}return Lc}var Dc={},Ly;function c_(){if(Ly)return Dc;Ly=1,Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.sendTransactionSync=p;const e=Te(),r=dr(),n=ce(),t=Ue(),a=Oo(),s=Lo(),o=ku(),i=$r(),c=wt(),u=be(),d=yn(),f=Pt(),b=zr(),y=o_(),h=Mo(),m=Lf(),g=new d.LruMap(128);async function p(v,j){const{account:l=v.account,chain:w=v.chain,accessList:E,authorizationList:_,blobs:I,data:S,gas:R,gasPrice:x,maxFeePerBlobGas:T,maxFeePerGas:A,maxPriorityFeePerGas:C,nonce:k,pollingInterval:B,throwOnReceiptRevert:P,type:q,value:F,...M}=j,O=j.timeout??Math.max((w?.blockTime??0)*3,5e3);if(typeof l>"u")throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});const H=l?(0,e.parseAccount)(l):null;try{(0,f.assertRequest)(j);const N=await(async()=>{if(j.to)return j.to;if(j.to!==null&&_&&_.length>0)return await(0,a.recoverAuthorizationAddress)({authorization:_[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")})})();if(H?.type==="json-rpc"||H===null){let z;w!==null&&(z=await(0,u.getAction)(v,b.getChainId,"getChainId")({}),(0,s.assertCurrentChain)({currentChainId:z,chain:w}));const $=v.chain?.formatters?.transactionRequest?.format,G=($||c.formatTransactionRequest)({...(0,i.extract)(M,{format:$}),accessList:E,authorizationList:_,blobs:I,chainId:z,data:S,from:H?.address,gas:R,gasPrice:x,maxFeePerBlobGas:T,maxFeePerGas:A,maxPriorityFeePerGas:C,nonce:k,to:N,type:q,value:F},"sendTransaction"),Y=g.get(v.uid),Z=Y?"wallet_sendTransaction":"eth_sendTransaction",W=await(async()=>{try{return await v.request({method:Z,params:[G]},{retryCount:0})}catch(ie){if(Y===!1)throw ie;const K=ie;if(K.name==="InvalidInputRpcError"||K.name==="InvalidParamsRpcError"||K.name==="MethodNotFoundRpcError"||K.name==="MethodNotSupportedRpcError")return await v.request({method:"wallet_sendTransaction",params:[G]},{retryCount:0}).then(J=>(g.set(v.uid,!0),J)).catch(J=>{const ee=J;throw ee.name==="MethodNotFoundRpcError"||ee.name==="MethodNotSupportedRpcError"?(g.set(v.uid,!1),K):ee});throw K}})(),X=await(0,u.getAction)(v,y.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:W,pollingInterval:B,timeout:O});if(P&&X.status==="reverted")throw new t.TransactionReceiptRevertedError({receipt:X}
47);return X}if(H?.type==="local"){const z=await(0,u.getAction)(v,h.prepareTransactionRequest,"prepareTransactionRequest")({account:H,accessList:E,authorizationList:_,blobs:I,chain:w,data:S,gas:R,gasPrice:x,maxFeePerBlobGas:T,maxFeePerGas:A,maxPriorityFeePerGas:C,nonce:k,nonceManager:H.nonceManager,parameters:[...h.defaultParameters,"sidecars"],type:q,value:F,...M,to:N}),$=w?.serializers?.transaction,D=await H.signTransaction(z,{serializer:$});return await(0,u.getAction)(v,m.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:D,throwOnReceiptRevert:P})}throw H?.type==="smart"?new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:H?.type})}catch(N){throw N instanceof r.AccountTypeNotSupportedError?N:(0,o.getTransactionError)(N,{...j,account:H,chain:j.chain||void 0})}}return Dc}var Gc={},Dy;function f5(){if(Dy)return Gc;Dy=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.showCallsStatus=e;async function e(r,n){const{id:t}=n;await r.request({method:"wallet_showCallsStatus",params:[t]})}return Gc}var Vc={},Gy;function l5(){if(Gy)return Vc;Gy=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.signAuthorization=t;const e=Te(),r=dr(),n=s_();async function t(a,s){const{account:o=a.account}=s;if(!o)throw new r.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});const i=(0,e.parseAccount)(o);if(!i.signAuthorization)throw new r.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:i.type});const c=await(0,n.prepareAuthorization)(a,s);return i.signAuthorization(c)}return Vc}var Wc={},Vy;function b5(){if(Vy)return Wc;Vy=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.signMessage=t;const e=Te(),r=dr(),n=te();async function t(a,{account:s=a.account,message:o}){if(!s)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const i=(0,e.parseAccount)(s);if(i.signMessage)return i.signMessage({message:o});const c=typeof o=="string"?(0,n.stringToHex)(o):o.raw instanceof Uint8Array?(0,n.toHex)(o.raw):o.raw;return a.request({method:"personal_sign",params:[c,i.address]},{retryCount:0})}return Wc}var Kc={},Wy;function m5(){if(Wy)return Kc;Wy=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.signTransaction=c;const e=Te(),r=dr(),n=Lo(),t=te(),a=wt(),s=be(),o=Pt(),i=zr();async function c(u,d){const{account:f=u.account,chain:b=u.chain,...y}=d;if(!f)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});const h=(0,e.parseAccount)(f);(0,o.assertRequest)({account:h,...d});const m=await(0,s.getAction)(u,i.getChainId,"getChainId")({});b!==null&&(0,n.assertCurrentChain)({currentChainId:m,chain:b});const p=(b?.formatters||u.chain?.formatters)?.transactionRequest?.format||a.formatTransactionRequest;return h.signTransaction?h.signTransaction({...y,chainId:m},{serializer:u.chain?.serializers?.transaction}):await u.request({method:"eth_signTransaction",params:[{...p(y,"signTransaction"),chainId:(0,t.numberToHex)(m),from:h.address}]},{retryCount:0})}return Kc}var Zc={},Ky;function h5(){if(Ky)return Zc;Ky=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.signTypedData=t;const e=Te(),r=dr(),n=Lu();async function t(a,s){const{account:o=a.account,domain:i,message:c,primaryType:u}=s;if(!o)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const d=(0,e.parseAccount)(o),f={EIP712Domain:(0,n.getTypesForEIP712Domain)({domain:i}),...s.types};if((0,n.validateTypedData)({domain:i,message:c,primaryType:u,types:f}),d.signTypedData)return d.signTypedData({domain:i,message:c,primaryType:u,types:f});const b=(0,n.serializeTypedData)({domain:i,message:c,primaryType:u,types:f});return a.request({method:"eth_signTypedData_v4",params:[d.address,b]},{retryCount:0})}return Zc}var Yc={},Zy;function y5(){if(Zy)return Yc;Zy=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.switchChain=r;const e=te();async function r(n,{id:t}){await n.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,e.numberToHex)(t)}]},{retryCount:0})}return Yc}var Jc={},Yy;function p5(){if(Yy)return Jc;Yy=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.watchAsset=e;async function e(r,n){return await r.request({method:"wallet_watchAsset",params:n},{retryCount:0})}return Jc}var Xc={},Jy;function g5(){if(Jy)return Xc;Jy=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.writeContractSync=n;const e=c_(),r=gf();async function n(t,a){return r.writeContract.internal(t,e.sendTransactionSync,"sendTransactionSync",a)}return Xc}var Xy;
47function u_(){if(Xy)return qc;Xy=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.walletActions=x;const e=zr(),r=n5(),n=o5(),t=a5(),a=dg(),s=i5(),o=s5(),i=s_(),c=Mo(),u=c5(),d=u5(),f=_f(),b=d5(),y=pf(),h=Lf(),m=Fu(),g=c_(),p=f5(),v=l5(),j=b5(),l=m5(),w=h5(),E=y5(),_=vf(),I=p5(),S=gf(),R=g5();function x(T){return{addChain:A=>(0,r.addChain)(T,A),deployContract:A=>(0,n.deployContract)(T,A),getAddresses:()=>(0,t.getAddresses)(T),getCallsStatus:A=>(0,a.getCallsStatus)(T,A),getCapabilities:A=>(0,s.getCapabilities)(T,A),getChainId:()=>(0,e.getChainId)(T),getPermissions:()=>(0,o.getPermissions)(T),prepareAuthorization:A=>(0,i.prepareAuthorization)(T,A),prepareTransactionRequest:A=>(0,c.prepareTransactionRequest)(T,A),requestAddresses:()=>(0,u.requestAddresses)(T),requestPermissions:A=>(0,d.requestPermissions)(T,A),sendCalls:A=>(0,f.sendCalls)(T,A),sendCallsSync:A=>(0,b.sendCallsSync)(T,A),sendRawTransaction:A=>(0,y.sendRawTransaction)(T,A),sendRawTransactionSync:A=>(0,h.sendRawTransactionSync)(T,A),sendTransaction:A=>(0,m.sendTransaction)(T,A),sendTransactionSync:A=>(0,g.sendTransactionSync)(T,A),showCallsStatus:A=>(0,p.showCallsStatus)(T,A),signAuthorization:A=>(0,v.signAuthorization)(T,A),signMessage:A=>(0,j.signMessage)(T,A),signTransaction:A=>(0,l.signTransaction)(T,A),signTypedData:A=>(0,w.signTypedData)(T,A),switchChain:A=>(0,E.switchChain)(T,A),waitForCallsStatus:A=>(0,_.waitForCallsStatus)(T,A),watchAsset:A=>(0,I.watchAsset)(T,A),writeContract:A=>(0,S.writeContract)(T,A),writeContractSync:A=>(0,R.writeContractSync)(T,A)}}return qc}var Qy;function _5(){if(Qy)return xc;Qy=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.createWalletClient=n;const e=$u(),r=u_();function n(t){const{key:a="wallet",name:s="Wallet Client",transport:o}=t;return(0,e.createClient)({...t,key:a,name:s,transport:o,type:"walletClient"}).extend(r.walletActions)}return xc}var Qc={},ep;function Ko(){if(ep)return Qc;ep=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.createTransport=n;const e=wg(),r=fg();function n({key:t,methods:a,name:s,request:o,retryCount:i=3,retryDelay:c=150,timeout:u,type:d},f){const b=(0,r.uid)();return{config:{key:t,methods:a,name:s,request:o,retryCount:i,retryDelay:c,timeout:u,type:d},request:(0,e.buildRequest)(o,{methods:a,retryCount:i,retryDelay:c,uid:b}),value:f}}return Qc}var eu={},tp;function v5(){if(tp)return eu;tp=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.custom=r;const e=Ko();function r(n,t={}){const{key:a="custom",methods:s,name:o="Custom Provider",retryDelay:i}=t;return({retryCount:c})=>(0,e.createTransport)({key:a,methods:s,name:o,request:n.request.bind(n),retryCount:t.retryCount??c,retryDelay:i,type:"custom"})}return eu}var dn={},rp;function E5(){if(rp)return dn;rp=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.fallback=a,dn.shouldThrow=s,dn.rankTransports=o;const e=Dt(),r=ar(),n=yf(),t=Ko();function a(i,c={}){const{key:u="fallback",name:d="Fallback",rank:f=!1,shouldThrow:b=s,retryCount:y,retryDelay:h}=c;return(({chain:m,pollingInterval:g=4e3,timeout:p,...v})=>{let j=i,l=()=>{};const w=(0,t.createTransport)({key:u,name:d,async request({method:E,params:_}){let I;const S=async(R=0)=>{const x=j[R]({...v,chain:m,retryCount:0,timeout:p});try{const T=await x.request({method:E,params:_});return l({method:E,params:_,response:T,transport:x,status:"success"}),T}catch(T){if(l({error:T,method:E,params:_,transport:x,status:"error"}),b(T)||R===j.length-1||(I??=j.slice(R+1).some(A=>{const{include:C,exclude:k}=A({chain:m}).config.methods||{};return C?C.includes(E):k?!k.includes(E):!0}),!I))throw T;return S(R+1)}};return S()},retryCount:y,retryDelay:h,type:"fallback"},{onResponse:E=>l=E,transports:j.map(E=>E({chain:m,retryCount:0}))});if(f){const E=typeof f=="object"?f:{};o({chain:m,interval:E.interval??g,onTransports:_=>j=_,ping:E.ping,sampleCount:E.sampleCount,timeout:E.timeout,transports:j,weights:E.weights})}return w})}function s(i){return!!("code"in i&&typeof i.code=="number"&&(i.code===r.TransactionRejectedRpcError.code||i.code===r.UserRejectedRequestError.code||e.ExecutionRevertedError.nodeMessage.test(i.message)||i.code===5e3))}function o({chain:i,interval:c=4e3,onTransports:u,ping:d,sampleCount:f=10,timeout:b=1e3,transports:y,weights:h={}}){const{stability:m=.7,latency:g=.3}=h,p=[],v=async()=>{const j=await Promise.all(y.map(async E=>{const _=E({chain:i,retryCount:0,timeout:b}),I=Date.now();let S,R;try{await(d?d({transport:_}):_.request({method:"net_listening"})),R=1}catch{R=0}finally{S=Date.now()}return{latency:S-I,success:R}}));p.push(j),p.length>f&&p.shift();const l=Math.max(...p.map(E=>Math.max(...E.map(({latency:_})=>_)))),w=y.map((E,_)=>{const I=p.map(A=>A[_].latency),R=1-I.reduce((A,C)=>A+C,0)/I.length/l,x=p.map(A=>A[_].success),T=x.reduce((A,C)=>A+C,0)/x.length;return T===0?[0,_]:[g*R+m*T,_]}).sort((E,_)=>_[0]-E[0]);u(w.map(([,E])=>y[E])),await(0,n.wait)(c),v()};v()}return dn}var tu={},wo={},np;function Df(){if(np)return wo;np=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.UrlRequiredError=void 0;const e=ce();class r extends e.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}return wo.UrlRequiredError=r,wo}var op;function j5(){if(op)return tu;
47op=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.http=s;const e=pt(),r=Df(),n=ff(),t=Bf(),a=Ko();function s(o,i={}){const{batch:c,fetchFn:u,fetchOptions:d,key:f="http",methods:b,name:y="HTTP JSON-RPC",onFetchRequest:h,onFetchResponse:m,retryDelay:g,raw:p}=i;return({chain:v,retryCount:j,timeout:l})=>{const{batchSize:w=1e3,wait:E=0}=typeof c=="object"?c:{},_=i.retryCount??j,I=l??i.timeout??1e4,S=o||v?.rpcUrls.default.http[0];if(!S)throw new r.UrlRequiredError;const R=(0,t.getHttpRpcClient)(S,{fetchFn:u,fetchOptions:d,onRequest:h,onResponse:m,timeout:I});return(0,a.createTransport)({key:f,methods:b,name:y,async request({method:x,params:T}){const A={method:x,params:T},{schedule:C}=(0,n.createBatchScheduler)({id:S,wait:E,shouldSplitBatch(q){return q.length>w},fn:q=>R.request({body:q}),sort:(q,F)=>q.id-F.id}),k=async q=>c?C(q):[await R.request({body:q})],[{error:B,result:P}]=await k(A);if(p)return{error:B,result:P};if(B)throw new e.RpcRequestError({body:A,error:B,url:S});return P},retryCount:_,retryDelay:g,timeout:I,type:"http"},{fetchOptions:d,url:S})}}return tu}var ru={},ap;function w5(){if(ap)return ru;ap=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.webSocket=s;const e=pt(),r=Df(),n=Mg(),t=Of(),a=Ko();function s(o,i={}){const{keepAlive:c,key:u="webSocket",methods:d,name:f="WebSocket JSON-RPC",reconnect:b,retryDelay:y}=i;return({chain:h,retryCount:m,timeout:g})=>{const p=i.retryCount??m,v=g??i.timeout??1e4,j=o||h?.rpcUrls.default.webSocket?.[0],l={keepAlive:c,reconnect:b};if(!j)throw new r.UrlRequiredError;return(0,a.createTransport)({key:u,methods:d,name:f,async request({method:w,params:E}){const _={method:w,params:E},I=await(0,t.getWebSocketRpcClient)(j,l),{error:S,result:R}=await I.requestAsync({body:_,timeout:v});if(S)throw new e.RpcRequestError({body:_,error:S,url:j});return R},retryCount:p,retryDelay:y,timeout:v,type:"webSocket"},{getSocket(){return(0,n.getSocket)(j)},getRpcClient(){return(0,t.getWebSocketRpcClient)(j,l)},async subscribe({params:w,onData:E,onError:_}){const I=await(0,t.getWebSocketRpcClient)(j,l),{result:S}=await new Promise((R,x)=>I.request({body:{method:"eth_subscribe",params:w},onError(T){x(T),_?.(T)},onResponse(T){if(T.error){x(T.error),_?.(T.error);return}if(typeof T.id=="number"){R(T);return}T.method==="eth_subscription"&&E(T.params)}}));return{subscriptionId:S,async unsubscribe(){return new Promise(R=>I.request({body:{method:"eth_unsubscribe",params:[S]},onResponse:R}))}}}})}}return ru}var Po={},ip;function P5(){if(ip)return Po;ip=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.ProviderRpcError=void 0;class e extends Error{constructor(n,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n,this.details=t}}return Po.ProviderRpcError=e,Po}var nu={},sp;function A5(){if(sp)return nu;sp=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.decodeDeployData=t;const e=Ee(),r=nr(),n="/docs/contract/decodeDeployData";function t(a){const{abi:s,bytecode:o,data:i}=a;if(i===o)return{bytecode:o};const c=s.find(d=>"type"in d&&d.type==="constructor");if(!c)throw new e.AbiConstructorNotFoundError({docsPath:n});if(!("inputs"in c))throw new e.AbiConstructorParamsNotFoundError({docsPath:n});if(!c.inputs||c.inputs.length===0)throw new e.AbiConstructorParamsNotFoundError({docsPath:n});return{args:(0,r.decodeAbiParameters)(c.inputs,`0x${i.replace(o,"")}`),bytecode:o}}return nu}var ou={},cp;function T5(){if(cp)return ou;cp=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.fromBlobs=t;const e=Io(),r=pe(),n=te();function t(a){const s=a.to??(typeof a.blobs[0]=="string"?"hex":"bytes"),o=typeof a.blobs[0]=="string"?a.blobs.map(f=>(0,r.hexToBytes)(f)):a.blobs,i=o.reduce((f,b)=>f+b.length,0),c=(0,e.createCursor)(new Uint8Array(i));let u=!0;for(const f of o){const b=(0,e.createCursor)(f);for(;u&&b.position<f.length;){b.incrementPosition(1);let y=31;f.length-b.position<31&&(y=f.length-b.position);for(const h in Array.from({length:y})){const m=b.readByte();if(m===128&&!b.inspectBytes(b.remaining).includes(128)){u=!1;break}c.pushByte(m)}}}const d=c.bytes.slice(0,c.position);return s==="hex"?(0,n.bytesToHex)(d):d}return ou}var au={},up;function I5(){if(up)return au;
47up=1,Object.defineProperty(au,"__esModule",{value:!0}),au.sidecarsToVersionedHashes=r;const e=nf();function r(n){const{sidecars:t,version:a}=n,s=n.to??(typeof t[0].blob=="string"?"hex":"bytes"),o=[];for(const{commitment:i}of t)o.push((0,e.commitmentToVersionedHash)({commitment:i,to:s,version:a}));return o}return au}var iu={},dp;function S5(){if(dp)return iu;dp=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.toCoinType=n;const e=Pf(),r=2147483648;function n(t){if(t===1)return 60n;if(t>=r||t<0)throw new e.EnsInvalidChainIdError({chainId:t});return BigInt((2147483648|t)>>>0)}return iu}var su={},fp;function d_(){if(fp)return su;fp=1,Object.defineProperty(su,"__esModule",{value:!0}),su.defineKzg=e;function e({blobToKzgCommitment:r,computeBlobKzgProof:n}){return{blobToKzgCommitment:r,computeBlobKzgProof:n}}return su}var cu={},lp;function R5(){if(lp)return cu;lp=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.setupKzg=r;const e=d_();function r(n,t){try{n.loadTrustedSetup(t)}catch(a){const s=a;if(!s.message.includes("trusted setup is already loaded"))throw s}return(0,e.defineKzg)(n)}return cu}var uu={},bp;function B5(){if(bp)return uu;bp=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.compactSignatureToSignature=n;const e=pe(),r=te();function n({r:t,yParityAndS:a}){const s=(0,e.hexToBytes)(a),o=s[0]&128?1:0,i=s;return o===1&&(i[0]&=127),{r:t,s:(0,r.bytesToHex)(i),yParity:o}}return uu}var du={},mp;function O5(){if(mp)return du;mp=1,Object.defineProperty(du,"__esModule",{value:!0}),du.parseCompactSignature=n;const e=Nr(),r=te();function n(t){const{r:a,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130));return{r:(0,r.numberToHex)(a,{size:32}),yParityAndS:(0,r.numberToHex)(s,{size:32})}}return du}var fu={},hp;function C5(){if(hp)return fu;hp=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.parseSignature=n;const e=Nr(),r=te();function n(t){const{r:a,s}=e.secp256k1.Signature.fromCompact(t.slice(2,130)),o=+`0x${t.slice(130)}`,[i,c]=(()=>{if(o===0||o===1)return[void 0,o];if(o===27)return[BigInt(o),0];if(o===28)return[BigInt(o),1];throw new Error("Invalid yParityOrV value")})();return typeof i<"u"?{r:(0,r.numberToHex)(a,{size:32}),s:(0,r.numberToHex)(s,{size:32}),v:i,yParity:c}:{r:(0,r.numberToHex)(a,{size:32}),s:(0,r.numberToHex)(s,{size:32}),yParity:c}}return fu}var lu={},yp;function x5(){if(yp)return lu;yp=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.recoverTransactionAddress=a;const e=We(),r=$f(),n=Uu(),t=sr();async function a(s){const{serializedTransaction:o,signature:i}=s,c=(0,r.parseTransaction)(o),u=i??{r:c.r,s:c.s,v:c.v,yParity:c.yParity},d=(0,n.serializeTransaction)({...c,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await(0,t.recoverAddress)({hash:(0,e.keccak256)(d),signature:u})}return lu}var bu={},pp;function q5(){if(pp)return bu;pp=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.serializeCompactSignature=n;const e=Nr(),r=Ae();function n({r:t,yParityAndS:a}){return`0x${new e.secp256k1.Signature((0,r.hexToBigInt)(t),(0,r.hexToBigInt)(a)).toCompactHex()}`}return bu}var mu={},gp;function M5(){if(gp)return mu;gp=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.signatureToCompactSignature=n;const e=pe(),r=te();function n(t){const{r:a,s,v:o,yParity:i}=t,c=Number(i??o-27n);let u=s;if(c===1){const d=(0,e.hexToBytes)(s);d[0]|=128,u=(0,r.bytesToHex)(d)}return{r:a,yParityAndS:u}}return mu}var _p;function H5(){return _p||(_p=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.maxInt8=e.universalSignatureValidatorByteCode=e.erc6492SignatureValidatorByteCode=e.deploylessCallViaFactoryBytecode=e.deploylessCallViaBytecodeBytecode=e.zeroHash=e.zeroAddress=e.ethAddress=e.multicall3Abi=e.universalSignatureValidatorAbi=e.erc6492SignatureValidatorAbi=e.erc4626Abi=e.erc1155Abi=e.erc721Abi=e.erc20Abi_bytes32=e.erc20Abi=e.webSocket=e.http=e.shouldThrow=e.fallback=e.custom=e.createTransport=e.walletActions=e.testActions=e.publicActions=e.createWalletClient=e.createTestClient=e.createPublicClient=e.rpcSchema=e.createClient=e.WaitForCallsStatusTimeoutError=e.getContract=e.UnknownTypeError=e.UnknownSignatureError=e.SolidityProtectedKeywordError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.InvalidStructSignatureError=e.InvalidSignatureError=e.InvalidParenthesisError=e.InvalidParameterError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.InvalidAbiParametersError=e.InvalidAbiParameterError=e.InvalidAbiItemError=e.CircularReferenceError=void 0,e.maxUint152=e.maxUint144=e.maxUint136=e.maxUint128=e.maxUint120=e.maxUint112=e.maxUint104=e.maxUint96=e.maxUint88=e.maxUint80=e.maxUint72=e.maxUint64=e.maxUint56=e.maxUint48=e.maxUint40=e.maxUint32=e.maxUint24=e.maxUint16=e.maxUint8=e.maxInt256=e.maxInt248=e.maxInt240=e.maxInt232=e.max
47Int224=e.maxInt216=e.maxInt208=e.maxInt200=e.maxInt192=e.maxInt184=e.maxInt176=e.maxInt168=e.maxInt160=e.maxInt152=e.maxInt144=e.maxInt136=e.maxInt128=e.maxInt120=e.maxInt112=e.maxInt104=e.maxInt96=e.maxInt88=e.maxInt80=e.maxInt72=e.maxInt64=e.maxInt56=e.maxInt48=e.maxInt40=e.maxInt32=e.maxInt24=e.maxInt16=void 0,e.AbiConstructorNotFoundError=e.weiUnits=e.gweiUnits=e.etherUnits=e.presignMessagePrefix=e.minInt256=e.minInt248=e.minInt240=e.minInt232=e.minInt224=e.minInt216=e.minInt208=e.minInt200=e.minInt192=e.minInt184=e.minInt176=e.minInt168=e.minInt160=e.minInt152=e.minInt144=e.minInt136=e.minInt128=e.minInt120=e.minInt112=e.minInt104=e.minInt96=e.minInt88=e.minInt80=e.minInt72=e.minInt64=e.minInt56=e.minInt48=e.minInt40=e.minInt32=e.minInt24=e.minInt16=e.minInt8=e.maxUint256=e.maxUint248=e.maxUint240=e.maxUint232=e.maxUint224=e.maxUint216=e.maxUint208=e.maxUint200=e.maxUint192=e.maxUint184=e.maxUint176=e.maxUint168=e.maxUint160=void 0,e.EnsAvatarUriResolutionError=e.EnsAvatarUnsupportedNamespaceError=e.EnsAvatarInvalidNftUriError=e.SizeOverflowError=e.InvalidHexValueError=e.InvalidHexBooleanError=e.InvalidBytesBooleanError=e.IntegerOutOfRangeError=e.SliceOffsetOutOfBoundsError=e.SizeExceedsPaddingSizeError=e.RawContractError=e.CounterfactualDeploymentFailedError=e.ContractFunctionZeroDataError=e.ContractFunctionRevertedError=e.ContractFunctionExecutionError=e.CallExecutionError=e.InvalidChainIdError=e.ClientChainNotConfiguredError=e.ChainNotFoundError=e.ChainMismatchError=e.ChainDoesNotSupportContract=e.BundleFailedError=e.BlockNotFoundError=e.setErrorConfig=e.BaseError=e.InvalidAddressError=e.UnsupportedPackedAbiType=e.InvalidDefinitionTypeError=e.InvalidArrayError=e.InvalidAbiEncodingTypeError=e.InvalidAbiDecodingTypeError=e.DecodeLogTopicsMismatch=e.DecodeLogDataMismatch=e.BytesSizeMismatchError=e.AbiFunctionSignatureNotFoundError=e.AbiFunctionOutputsNotFoundError=e.AbiFunctionNotFoundError=e.AbiEventSignatureNotFoundError=e.AbiEventSignatureEmptyTopicsError=e.AbiEventNotFoundError=e.AbiErrorSignatureNotFoundError=e.AbiErrorNotFoundError=e.AbiErrorInputsNotFoundError=e.AbiEncodingLengthMismatchError=e.AbiEncodingBytesSizeMismatchError=e.AbiEncodingArrayLengthMismatchError=e.AbiDecodingZeroDataError=e.AbiDecodingDataSizeTooSmallError=e.AbiDecodingDataSizeInvalidError=e.AbiConstructorParamsNotFoundError=void 0,e.UnsupportedProviderMethodError=e.UnsupportedNonOptionalCapabilityError=e.UnsupportedChainIdError=e.UnknownRpcError=e.UnknownBundleIdError=e.UnauthorizedProviderError=e.TransactionRejectedRpcError=e.SwitchChainError=e.RpcError=e.ResourceUnavailableRpcError=e.ResourceNotFoundRpcError=e.ProviderRpcError=e.ProviderDisconnectedError=e.ParseRpcError=e.MethodNotSupportedRpcError=e.MethodNotFoundRpcError=e.LimitExceededRpcError=e.JsonRpcVersionUnsupportedError=e.InvalidRequestRpcError=e.InvalidParamsRpcError=e.InvalidInputRpcError=e.InternalRpcError=e.DuplicateIdError=e.ChainDisconnectedError=e.BundleTooLargeError=e.AtomicReadyWalletRejectedUpgradeError=e.AtomicityNotSupportedError=e.WebSocketRequestError=e.TimeoutError=e.SocketClosedError=e.RpcRequestError=e.HttpRequestError=e.UnknownNodeError=e.TransactionTypeNotSupportedError=e.TipAboveFeeCapError=e.NonceTooLowError=e.NonceTooHighError=e.NonceMaxValueError=e.IntrinsicGasTooLowError=e.IntrinsicGasTooHighError=e.InsufficientFundsError=e.FeeCapTooLowError=e.FeeCapTooHighError=e.ExecutionRevertedError=e.FilterTypeNotSupportedError=e.MaxFeePerGasTooLowError=e.Eip1559FeesNotSupportedError=e.BaseFeeScalarError=e.EstimateGasExecutionError=e.EnsInvalidChainIdError=void 0,e.toBlobs=e.toBlobSidecars=e.sidecarsToVersionedHashes=e.fromBlobs=e.commitmentToVersionedHash=e.commitmentsToVersionedHashes=e.blobsToProofs=e.blobsToCommitments=e.isAddressEqual=e.isAddress=e.getCreateAddress=e.getCreate2Address=e.getContractAddress=e.getAddress=e.checksumAddress=e.prepareEncodeFunctionData=e.parseEventLogs=e.getAbiItem=e.encodePacked=e.encodeFunctionResult=e.encodeFunctionData=e.encodeEventTopics=e.encodeErrorResult=e.encodeDeployData=e.encodeAbiParameters=e.decodeFunctionResult=e.decodeFunctionData=e.decodeEventLog=e.decodeErrorResult=e.decodeDeployData=e.decodeAbiParameters=e.EIP
471193ProviderRpcError=e.InvalidDecimalNumberError=e.InvalidStructTypeError=e.InvalidPrimaryTypeError=e.InvalidDomainError=e.UrlRequiredError=e.WaitForTransactionReceiptTimeoutError=e.TransactionReceiptNotFoundError=e.TransactionNotFoundError=e.TransactionExecutionError=e.InvalidStorageKeySizeError=e.InvalidSerializedTransactionTypeError=e.InvalidSerializedTransactionError=e.InvalidSerializableTransactionError=e.InvalidLegacyVError=e.FeeConflictError=e.StateAssignmentConflictError=e.AccountStateConflictError=e.UserRejectedRequestError=void 0,e.getContractError=e.toCoinType=e.namehash=e.labelhash=e.toRlp=e.hexToRlp=e.bytesToRlp=e.toHex=e.stringToHex=e.numberToHex=e.bytesToHex=e.boolToHex=e.toBytes=e.stringToBytes=e.numberToBytes=e.hexToBytes=e.boolToBytes=e.fromRlp=e.hexToString=e.hexToNumber=e.hexToBool=e.hexToBigInt=e.fromHex=e.fromBytes=e.bytesToString=e.bytesToNumber=e.bytesToBool=e.bytesToBigInt=e.trim=e.sliceHex=e.sliceBytes=e.slice=e.size=e.padHex=e.padBytes=e.pad=e.isHex=e.isBytes=e.concatHex=e.concatBytes=e.concat=e.getChainContractAddress=e.extractChain=e.defineChain=e.assertCurrentChain=e.offchainLookupSignature=e.offchainLookupAbiItem=e.offchainLookup=e.ccipFetch=e.ccipRequest=void 0,e.recoverTypedDataAddress=e.recoverTransactionAddress=e.recoverPublicKey=e.recoverMessageAddress=e.recoverAddress=e.parseSignature=e.hexToSignature=e.parseErc8010Signature=e.parseErc6492Signature=e.parseCompactSignature=e.hexToCompactSignature=e.isErc8010Signature=e.isErc6492Signature=e.hashTypedData=e.hashStruct=e.hashDomain=e.hashMessage=e.compactSignatureToSignature=e.withTimeout=e.withRetry=e.withCache=e.nonceManager=e.createNonceManager=e.setupKzg=e.defineKzg=e.getFunctionSignature=e.toFunctionSignature=e.getFunctionSelector=e.toFunctionSelector=e.toFunctionHash=e.getEventSignature=e.toEventSignature=e.getEventSelector=e.toEventSelector=e.toEventHash=e.sha256=e.ripemd160=e.keccak256=e.isHash=e.rpcTransactionType=e.formatTransactionRequest=e.defineTransactionRequest=e.formatTransactionReceipt=e.defineTransactionReceipt=e.transactionType=e.formatTransaction=e.defineTransaction=e.formatLog=e.formatBlock=e.defineBlock=void 0,e.parseUnits=e.parseGwei=e.parseEther=e.formatUnits=e.formatGwei=e.formatEther=e.validateTypedData=e.serializeTypedData=e.getTypesForEIP712Domain=e.domainSeparator=e.serializeTransaction=e.serializeAccessList=e.parseTransaction=e.getTransactionType=e.getSerializedTransactionType=e.assertTransactionLegacy=e.assertTransactionEIP2930=e.assertTransactionEIP1559=e.assertRequest=e.stringify=e.verifyTypedData=e.verifyMessage=e.verifyHash=e.toPrefixedMessage=e.signatureToCompactSignature=e.serializeSignature=e.signatureToHex=e.serializeErc8010Signature=e.serializeErc6492Signature=e.serializeCompactSignature=e.compactSignatureToHex=void 0;var r=tr();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return r.CircularReferenceError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return r.InvalidAbiItemError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return r.InvalidAbiParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return r.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return r.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return r.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return r.InvalidModifierError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return r.InvalidParameterError}}),Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return r.InvalidParenthesisError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return r.InvalidSignatureError}}),Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return r.InvalidStructSignatureError}}),Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return r.parseAbi}}),Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return r.parseAbiItem}}),Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return r.parseAbiParameter}}),Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return r.parseAbiParameters}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return r.SolidityProtectedKeywordError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return r.UnknownSignatureError}}),Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return r.UnknownTypeError}});var n=Cv();Object.defineProperty(e,"getContract",{enumerable:!0,get:function(){return n.getContract}});var t=vf();Object.defineProperty(e,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return t.WaitForCallsStatusTimeoutError}});var a=$u();Object.defineProperty(e,"createClient",{enumerable:!0,get:function(){return a.createClient}}),Object.defineProperty(e,"rpcSchema",{enumerable:!0,get:function(){return a.rpcSchema}});var s=A6();Object.defineProperty(e,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var o=r5();Object.defineProperty(e,"createTestClient",{enumerable:!0,get:function(){return o.createTestClient}});var i=_5();Object.defineProperty(e,"createWalletClient",{enumerable:!0,get:function(){return i.createWalletClient}});var c=a_();Object.defineProperty(e,"publicActions",{enumerable:!0,get:function(){return c.publicActions}});var u=i_();Object.defineProperty(e,"testActions",{enumerable:!0,get:function(){return u.testActions}});var d=u_();Object.defineProperty(e,"walletActions",{enumerable:!0,get:function(){return d.walletActions}});var f=Ko();Object.defineProperty(e,"createTransport",{enumerable:!0,get:function(){return f.createTransport}});var b=v5();Object.defineProperty(e,"custom",{enumerable:!0,get:function(){return b.custom}});var y=E5();Object.defineProperty(e,"fallback",{enumerable:!0,get:function(){return y.fallback}}),Object.defineProperty(e,"shouldThrow",{enumerable:!0,get:function(){return y.shouldThrow}});var h=j5();Object.defineProperty(e,"http",{enumerable:!0,get:function(){return h.http}});var m=w5();Object.defineProperty(e,"webSocket",{enumerable:!0,get:function(){return m.webSocket}});var g=cr();Object.defineProperty(e,"erc20Abi",{enumerable:!0,get:function(){return g.erc20Abi}}),Object.defineProperty(e,"erc20Abi_bytes32",{enumerable:!0,get:function(){return g.erc20Abi_bytes32}}
47),Object.defineProperty(e,"erc721Abi",{enumerable:!0,get:function(){return g.erc721Abi}}),Object.defineProperty(e,"erc1155Abi",{enumerable:!0,get:function(){return g.erc1155Abi}}),Object.defineProperty(e,"erc4626Abi",{enumerable:!0,get:function(){return g.erc4626Abi}}),Object.defineProperty(e,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return g.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return g.erc6492SignatureValidatorAbi}}),Object.defineProperty(e,"multicall3Abi",{enumerable:!0,get:function(){return g.multicall3Abi}});var p=t_();Object.defineProperty(e,"ethAddress",{enumerable:!0,get:function(){return p.ethAddress}}),Object.defineProperty(e,"zeroAddress",{enumerable:!0,get:function(){return p.zeroAddress}});var v=Cf();Object.defineProperty(e,"zeroHash",{enumerable:!0,get:function(){return v.zeroHash}});var j=Fo();Object.defineProperty(e,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return j.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(e,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return j.deploylessCallViaFactoryBytecode}}),Object.defineProperty(e,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return j.erc6492SignatureValidatorByteCode}}),Object.defineProperty(e,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return j.erc6492SignatureValidatorByteCode}});var l=Qd();Object.defineProperty(e,"maxInt8",{enumerable:!0,get:function(){return l.maxInt8}}),Object.defineProperty(e,"maxInt16",{enumerable:!0,get:function(){return l.maxInt16}}),Object.defineProperty(e,"maxInt24",{enumerable:!0,get:function(){return l.maxInt24}}),Object.defineProperty(e,"maxInt32",{enumerable:!0,get:function(){return l.maxInt32}}),Object.defineProperty(e,"maxInt40",{enumerable:!0,get:function(){return l.maxInt40}}),Object.defineProperty(e,"maxInt48",{enumerable:!0,get:function(){return l.maxInt48}}),Object.defineProperty(e,"maxInt56",{enumerable:!0,get:function(){return l.maxInt56}}),Object.defineProperty(e,"maxInt64",{enumerable:!0,get:function(){return l.maxInt64}}),Object.defineProperty(e,"maxInt72",{enumerable:!0,get:function(){return l.maxInt72}}),Object.defineProperty(e,"maxInt80",{enumerable:!0,get:function(){return l.maxInt80}}),Object.defineProperty(e,"maxInt88",{enumerable:!0,get:function(){return l.maxInt88}}),Object.defineProperty(e,"maxInt96",{enumerable:!0,get:function(){return l.maxInt96}}),Object.defineProperty(e,"maxInt104",{enumerable:!0,get:function(){return l.maxInt104}}),Object.defineProperty(e,"maxInt112",{enumerable:!0,get:function(){return l.maxInt112}}),Object.defineProperty(e,"maxInt120",{enumerable:!0,get:function(){return l.maxInt120}}),Object.defineProperty(e,"maxInt128",{enumerable:!0,get:function(){return l.maxInt128}}),Object.defineProperty(e,"maxInt136",{enumerable:!0,get:function(){return l.maxInt136}}),Object.defineProperty(e,"maxInt144",{enumerable:!0,get:function(){return l.maxInt144}}),Object.defineProperty(e,"maxInt152",{enumerable:!0,get:function(){return l.maxInt152}}),Object.defineProperty(e,"maxInt160",{enumerable:!0,get:function(){return l.maxInt160}}),Object.defineProperty(e,"maxInt168",{enumerable:!0,get:function(){return l.maxInt168}}),Object.defineProperty(e,"maxInt176",{enumerable:!0,get:function(){return l.maxInt176}}),Object.defineProperty(e,"maxInt184",{enumerable:!0,get:function(){return l.maxInt184}}),Object.defineProperty(e,"maxInt192",{enumerable:!0,get:function(){return l.maxInt192}}),Object.defineProperty(e,"maxInt200",{enumerable:!0,get:function(){return l.maxInt200}}),Object.defineProperty(e,"maxInt208",{enumerable:!0,get:function(){return l.maxInt208}}),Object.defineProperty(e,"maxInt216",{enumerable:!0,get:function(){return l.maxInt216}}),Object.defineProperty(e,"maxInt224",{enumerable:!0,get:function(){return l.maxInt224}}),Object.defineProperty(e,"maxInt232",{enumerable:!0,get:function(){return l.maxInt232}}),Object.defineProperty(e,"maxInt240",{enumerable:!0,get:function(){return l.maxInt240}}),Object.defineProperty(e,"maxInt248",{enumerable:!0,get:function(){return l.maxInt248}}),Object.defineProperty(e,"maxInt256",{enumerable:!0,get:function(){return l.maxInt256}}),Object.defineProperty(e,"maxUint8",{enumerable:!0,get:function(){return l.maxUint8}}),Object.defineProperty(e,"maxUint16",{enumerable:!0,get:function(){return l.maxUint16}}),Object.defineProperty(e,"maxUint24",{enumerable:!0,get:function(){return l.maxUint24}}
47),Object.defineProperty(e,"maxUint32",{enumerable:!0,get:function(){return l.maxUint32}}),Object.defineProperty(e,"maxUint40",{enumerable:!0,get:function(){return l.maxUint40}}),Object.defineProperty(e,"maxUint48",{enumerable:!0,get:function(){return l.maxUint48}}),Object.defineProperty(e,"maxUint56",{enumerable:!0,get:function(){return l.maxUint56}}),Object.defineProperty(e,"maxUint64",{enumerable:!0,get:function(){return l.maxUint64}}),Object.defineProperty(e,"maxUint72",{enumerable:!0,get:function(){return l.maxUint72}}),Object.defineProperty(e,"maxUint80",{enumerable:!0,get:function(){return l.maxUint80}}),Object.defineProperty(e,"maxUint88",{enumerable:!0,get:function(){return l.maxUint88}}),Object.defineProperty(e,"maxUint96",{enumerable:!0,get:function(){return l.maxUint96}}),Object.defineProperty(e,"maxUint104",{enumerable:!0,get:function(){return l.maxUint104}}),Object.defineProperty(e,"maxUint112",{enumerable:!0,get:function(){return l.maxUint112}}),Object.defineProperty(e,"maxUint120",{enumerable:!0,get:function(){return l.maxUint120}}),Object.defineProperty(e,"maxUint128",{enumerable:!0,get:function(){return l.maxUint128}}),Object.defineProperty(e,"maxUint136",{enumerable:!0,get:function(){return l.maxUint136}}),Object.defineProperty(e,"maxUint144",{enumerable:!0,get:function(){return l.maxUint144}}),Object.defineProperty(e,"maxUint152",{enumerable:!0,get:function(){return l.maxUint152}}),Object.defineProperty(e,"maxUint160",{enumerable:!0,get:function(){return l.maxUint160}}),Object.defineProperty(e,"maxUint168",{enumerable:!0,get:function(){return l.maxUint168}}),Object.defineProperty(e,"maxUint176",{enumerable:!0,get:function(){return l.maxUint176}}),Object.defineProperty(e,"maxUint184",{enumerable:!0,get:function(){return l.maxUint184}}),Object.defineProperty(e,"maxUint192",{enumerable:!0,get:function(){return l.maxUint192}}),Object.defineProperty(e,"maxUint200",{enumerable:!0,get:function(){return l.maxUint200}}),Object.defineProperty(e,"maxUint208",{enumerable:!0,get:function(){return l.maxUint208}}),Object.defineProperty(e,"maxUint216",{enumerable:!0,get:function(){return l.maxUint216}}),Object.defineProperty(e,"maxUint224",{enumerable:!0,get:function(){return l.maxUint224}}),Object.defineProperty(e,"maxUint232",{enumerable:!0,get:function(){return l.maxUint232}}),Object.defineProperty(e,"maxUint240",{enumerable:!0,get:function(){return l.maxUint240}}),Object.defineProperty(e,"maxUint248",{enumerable:!0,get:function(){return l.maxUint248}}),Object.defineProperty(e,"maxUint256",{enumerable:!0,get:function(){return l.maxUint256}}),Object.defineProperty(e,"minInt8",{enumerable:!0,get:function(){return l.minInt8}}),Object.defineProperty(e,"minInt16",{enumerable:!0,get:function(){return l.minInt16}}),Object.defineProperty(e,"minInt24",{enumerable:!0,get:function(){return l.minInt24}}),Object.defineProperty(e,"minInt32",{enumerable:!0,get:function(){return l.minInt32}}),Object.defineProperty(e,"minInt40",{enumerable:!0,get:function(){return l.minInt40}}),Object.defineProperty(e,"minInt48",{enumerable:!0,get:function(){return l.minInt48}}),Object.defineProperty(e,"minInt56",{enumerable:!0,get:function(){return l.minInt56}}),Object.defineProperty(e,"minInt64",{enumerable:!0,get:function(){return l.minInt64}}),Object.defineProperty(e,"minInt72",{enumerable:!0,get:function(){return l.minInt72}}),Object.defineProperty(e,"minInt80",{enumerable:!0,get:function(){return l.minInt80}}),Object.defineProperty(e,"minInt88",{enumerable:!0,get:function(){return l.minInt88}}),Object.defineProperty(e,"minInt96",{enumerable:!0,get:function(){return l.minInt96}}),Object.defineProperty(e,"minInt104",{enumerable:!0,get:function(){return l.minInt104}}),Object.defineProperty(e,"minInt112",{enumerable:!0,get:function(){return l.minInt112}}),Object.defineProperty(e,"minInt120",{enumerable:!0,get:function(){return l.minInt120}}),Object.defineProperty(e,"minInt128",{enumerable:!0,get:function(){return l.minInt128}}),Object.defineProperty(e,"minInt136",{enumerable:!0,get:function(){return l.minInt136}}),Object.defineProperty(e,"minInt144",{enumerable:!0,get:function(){return l.minInt144}}),Object.defineProperty(e,"minInt152",{enumerable:!0,get:function(){return l.minInt152}}),Object.defineProperty(e,"minInt160",{enumerable:!0,get:function(){return l.minInt160}}),Object.defineProperty(e,"minInt168",{enumerable:!0,get:function(){return l.minInt168}}),Object.defineProperty(e,"minInt176",{enumerable:!0,get:function(){return l.minInt176}}),Object.defineProperty(e,"minInt184",{enumerable:!0,get:function(){return l.minInt184}}),Object.defineProperty(e,"minInt192",{enumerable:!0,get:function(){return l.minInt192}}),Object.defineProperty(e,"minInt200",{enumerable:!0,get:function(){return l.minInt200}}),Object.defineProperty(e,"minInt208",{enumerable:!0,get:function(){return l.minInt208}}),Object.defineProperty(e,"minInt216",{enumerable:!0,get:function(){return l.minInt216}}),Object.defineProperty(e,"minInt224",{enumerable:!0,get:function(){return l.minInt224}}),Object.defineProperty(e,"minInt232",{enumerable:!0,get:function(){return l.minInt232}}),Object.defineProperty(e,"minInt240",{enumerable:!0,get:function(){return l.minInt240}}),Object.defineProperty(e,"minInt248",{enumerable:!0,get:function(){return l.minInt248}}),Object.defineProperty(e,"minInt256",{enumerable:!0,get:function(){return l.minInt256}});var w=Hg();Object.defineProperty(e,"presignMessagePrefix",{enumerable:!0,get:function(){return w.presignMessagePrefix}});var E=So();Object.defineProperty(e,"etherUnits",{enumerable:!0,get:function(){return E.etherUnits}}),Object.defineProperty(e,"gweiUnits",{enumerable:!0,get:function(){return E.gweiUnits}}),Object.defineProperty(e,"weiUnits",{enumerable:!0,get:function(){return E.weiUnits}});var _=Ee();Object.defineProperty(e,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorNotFoundError}}),Object.defineProperty(e,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return _.AbiConstructorParamsNotFoundError}}),Object.defineProperty(e,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(e,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return _.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(e,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return _.AbiDecodingZeroDataError}}
47),Object.defineProperty(e,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(e,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(e,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return _.AbiEncodingLengthMismatchError}}),Object.defineProperty(e,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorInputsNotFoundError}}),Object.defineProperty(e,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorNotFoundError}}),Object.defineProperty(e,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiErrorSignatureNotFoundError}}),Object.defineProperty(e,"AbiEventNotFoundError",{enumerable:!0,get:function(){return _.AbiEventNotFoundError}}),Object.defineProperty(e,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return _.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(e,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiEventSignatureNotFoundError}}),Object.defineProperty(e,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionNotFoundError}}),Object.defineProperty(e,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(e,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return _.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(e,"BytesSizeMismatchError",{enumerable:!0,get:function(){return _.BytesSizeMismatchError}}),Object.defineProperty(e,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return _.DecodeLogDataMismatch}}),Object.defineProperty(e,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return _.DecodeLogTopicsMismatch}}),Object.defineProperty(e,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiDecodingTypeError}}),Object.defineProperty(e,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return _.InvalidAbiEncodingTypeError}}),Object.defineProperty(e,"InvalidArrayError",{enumerable:!0,get:function(){return _.InvalidArrayError}}),Object.defineProperty(e,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return _.InvalidDefinitionTypeError}}),Object.defineProperty(e,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return _.UnsupportedPackedAbiType}});var I=ht();Object.defineProperty(e,"InvalidAddressError",{enumerable:!0,get:function(){return I.InvalidAddressError}});var S=ce();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return S.BaseError}}),Object.defineProperty(e,"setErrorConfig",{enumerable:!0,get:function(){return S.setErrorConfig}});var R=ef();Object.defineProperty(e,"BlockNotFoundError",{enumerable:!0,get:function(){return R.BlockNotFoundError}});var x=ug();Object.defineProperty(e,"BundleFailedError",{enumerable:!0,get:function(){return x.BundleFailedError}});var T=No();Object.defineProperty(e,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return T.ChainDoesNotSupportContract}}),Object.defineProperty(e,"ChainMismatchError",{enumerable:!0,get:function(){return T.ChainMismatchError}}),Object.defineProperty(e,"ChainNotFoundError",{enumerable:!0,get:function(){return T.ChainNotFoundError}}),Object.defineProperty(e,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return T.ClientChainNotConfiguredError}}),Object.defineProperty(e,"InvalidChainIdError",{enumerable:!0,get:function(){return T.InvalidChainIdError}});var A=or();Object.defineProperty(e,"CallExecutionError",{enumerable:!0,get:function(){return A.CallExecutionError}}),Object.defineProperty(e,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return A.ContractFunctionExecutionError}}),Object.defineProperty(e,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return A.ContractFunctionRevertedError}}),Object.defineProperty(e,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return A.ContractFunctionZeroDataError}}),Object.defineProperty(e,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return A.CounterfactualDeploymentFailedError}}),Object.defineProperty(e,"RawContractError",{enumerable:!0,get:function(){return A.RawContractError}});var C=_u();Object.defineProperty(e,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return C.SizeExceedsPaddingSizeError}}),Object.defineProperty(e,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return C.SliceOffsetOutOfBoundsError}});
47var k=mn();Object.defineProperty(e,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return k.IntegerOutOfRangeError}}),Object.defineProperty(e,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return k.InvalidBytesBooleanError}}),Object.defineProperty(e,"InvalidHexBooleanError",{enumerable:!0,get:function(){return k.InvalidHexBooleanError}}),Object.defineProperty(e,"InvalidHexValueError",{enumerable:!0,get:function(){return k.InvalidHexValueError}}),Object.defineProperty(e,"SizeOverflowError",{enumerable:!0,get:function(){return k.SizeOverflowError}});var B=Pf();Object.defineProperty(e,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return B.EnsAvatarInvalidNftUriError}}),Object.defineProperty(e,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return B.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(e,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return B.EnsAvatarUriResolutionError}}),Object.defineProperty(e,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return B.EnsInvalidChainIdError}});var P=Kp();Object.defineProperty(e,"EstimateGasExecutionError",{enumerable:!0,get:function(){return P.EstimateGasExecutionError}});var q=Tu();Object.defineProperty(e,"BaseFeeScalarError",{enumerable:!0,get:function(){return q.BaseFeeScalarError}}),Object.defineProperty(e,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return q.Eip1559FeesNotSupportedError}}),Object.defineProperty(e,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return q.MaxFeePerGasTooLowError}});var F=Np();Object.defineProperty(e,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return F.FilterTypeNotSupportedError}});var M=Dt();Object.defineProperty(e,"ExecutionRevertedError",{enumerable:!0,get:function(){return M.ExecutionRevertedError}}),Object.defineProperty(e,"FeeCapTooHighError",{enumerable:!0,get:function(){return M.FeeCapTooHighError}}),Object.defineProperty(e,"FeeCapTooLowError",{enumerable:!0,get:function(){return M.FeeCapTooLowError}}),Object.defineProperty(e,"InsufficientFundsError",{enumerable:!0,get:function(){return M.InsufficientFundsError}}),Object.defineProperty(e,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return M.IntrinsicGasTooHighError}}),Object.defineProperty(e,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return M.IntrinsicGasTooLowError}}),Object.defineProperty(e,"NonceMaxValueError",{enumerable:!0,get:function(){return M.NonceMaxValueError}}),Object.defineProperty(e,"NonceTooHighError",{enumerable:!0,get:function(){return M.NonceTooHighError}}),Object.defineProperty(e,"NonceTooLowError",{enumerable:!0,get:function(){return M.NonceTooLowError}}),Object.defineProperty(e,"TipAboveFeeCapError",{enumerable:!0,get:function(){return M.TipAboveFeeCapError}}),Object.defineProperty(e,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return M.TransactionTypeNotSupportedError}}),Object.defineProperty(e,"UnknownNodeError",{enumerable:!0,get:function(){return M.UnknownNodeError}});var O=pt();Object.defineProperty(e,"HttpRequestError",{enumerable:!0,get:function(){return O.HttpRequestError}}),Object.defineProperty(e,"RpcRequestError",{enumerable:!0,get:function(){return O.RpcRequestError}}),Object.defineProperty(e,"SocketClosedError",{enumerable:!0,get:function(){return O.SocketClosedError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return O.TimeoutError}}),Object.defineProperty(e,"WebSocketRequestError",{enumerable:!0,get:function(){return O.WebSocketRequestError}});var H=ar();Object.defineProperty(e,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return H.AtomicityNotSupportedError}}),Object.defineProperty(e,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return H.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(e,"BundleTooLargeError",{enumerable:!0,get:function(){return H.BundleTooLargeError}}),Object.defineProperty(e,"ChainDisconnectedError",{enumerable:!0,get:function(){return H.ChainDisconnectedError}}),Object.defineProperty(e,"DuplicateIdError",{enumerable:!0,get:function(){return H.DuplicateIdError}}),Object.defineProperty(e,"InternalRpcError",{enumerable:!0,get:function(){return H.InternalRpcError}}),Object.defineProperty(e,"InvalidInputRpcError",{enumerable:!0,get:function(){return H.InvalidInputRpcError}}),Object.defineProperty(e,"InvalidParamsRpcError",{enumerable:!0,get:function(){return H.InvalidParamsRpcError}}),Object.defineProperty(e,"InvalidRequestRpcError",{enumerable:!0,get:function(){return H.InvalidRequestRpcError}}),Object.defineProperty(e,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return H.JsonRpcVersionUnsupportedError}}),Object.defineProperty(e,"LimitExceededRpcError",{enumerable:!0,get:function(){return H.LimitExceededRpcError}}),Object.defineProperty(e,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return H.MethodNotFoundRpcError}}),Object.defineProperty(e,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return H.MethodNotSupportedRpcError}}),Object.defineProperty(e,"ParseRpcError",{enumerable:!0,get:function(){return H.ParseRpcError}}),Object.defineProperty(e,"ProviderDisconnectedError",{enumerable:!0,get:function(){return H.ProviderDisconnectedError}}),Object.defineProperty(e,"ProviderRpcError",{enumerable:!0,get:function(){return H.ProviderRpcError}}),Object.defineProperty(e,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return H.ResourceNotFoundRpcError}}),Object.defineProperty(e,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return H.ResourceUnavailableRpcError}}),Object.defineProperty(e,"RpcError",{enumerable:!0,get:function(){return H.RpcError}}),Object.defineProperty(e,"SwitchChainError",{enumerable:!0,get:function(){return H.SwitchChainError}}),Object.defineProperty(e,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return H.TransactionRejectedRpcError}}),Object.defineProperty(e,"UnauthorizedProviderError",{enumerable:!0,get:function(){return H.UnauthorizedProviderError}}),Object.defineProperty(e,"UnknownBundleIdError",{enumerable:!0,get:function(){return H.UnknownBundleIdError}}),Object.defineProperty(e,"UnknownRpcError",{enumerable:!0,get:function(){return H.UnknownRpcError}}),Object.defineProperty(e,"UnsupportedChainIdError",{enumerable:!0,get:function(){return H.UnsupportedChainIdError}}),Object.defineProperty(e,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return H.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(e,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return H.UnsupportedProviderMethodError}}),Object.defineProperty(e,"UserRejectedRequestError",{enumerable:!0,get:function(){return H.UserRejectedRequestError}});var N=Zd();Object.defineProperty(e,"AccountStateConflictError",{enumerable:!0,get:function(){return N.AccountStateConflictError}}
47),Object.defineProperty(e,"StateAssignmentConflictError",{enumerable:!0,get:function(){return N.StateAssignmentConflictError}});var z=Ue();Object.defineProperty(e,"FeeConflictError",{enumerable:!0,get:function(){return z.FeeConflictError}}),Object.defineProperty(e,"InvalidLegacyVError",{enumerable:!0,get:function(){return z.InvalidLegacyVError}}),Object.defineProperty(e,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializableTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionError}}),Object.defineProperty(e,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return z.InvalidSerializedTransactionTypeError}}),Object.defineProperty(e,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return z.InvalidStorageKeySizeError}}),Object.defineProperty(e,"TransactionExecutionError",{enumerable:!0,get:function(){return z.TransactionExecutionError}}),Object.defineProperty(e,"TransactionNotFoundError",{enumerable:!0,get:function(){return z.TransactionNotFoundError}}),Object.defineProperty(e,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return z.TransactionReceiptNotFoundError}}),Object.defineProperty(e,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return z.WaitForTransactionReceiptTimeoutError}});var $=Df();Object.defineProperty(e,"UrlRequiredError",{enumerable:!0,get:function(){return $.UrlRequiredError}});var D=Fg();Object.defineProperty(e,"InvalidDomainError",{enumerable:!0,get:function(){return D.InvalidDomainError}}),Object.defineProperty(e,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return D.InvalidPrimaryTypeError}}),Object.defineProperty(e,"InvalidStructTypeError",{enumerable:!0,get:function(){return D.InvalidStructTypeError}});var G=Zg();Object.defineProperty(e,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return G.InvalidDecimalNumberError}});var Y=P5();Object.defineProperty(e,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return Y.ProviderRpcError}});var Z=nr();Object.defineProperty(e,"decodeAbiParameters",{enumerable:!0,get:function(){return Z.decodeAbiParameters}});var W=A5();Object.defineProperty(e,"decodeDeployData",{enumerable:!0,get:function(){return W.decodeDeployData}});var X=wu();Object.defineProperty(e,"decodeErrorResult",{enumerable:!0,get:function(){return X.decodeErrorResult}});var ie=Ho();Object.defineProperty(e,"decodeEventLog",{enumerable:!0,get:function(){return ie.decodeEventLog}});var K=lf();Object.defineProperty(e,"decodeFunctionData",{enumerable:!0,get:function(){return K.decodeFunctionData}});var J=Vt();Object.defineProperty(e,"decodeFunctionResult",{enumerable:!0,get:function(){return J.decodeFunctionResult}});var ee=yt();Object.defineProperty(e,"encodeAbiParameters",{enumerable:!0,get:function(){return ee.encodeAbiParameters}});var ae=$o();Object.defineProperty(e,"encodeDeployData",{enumerable:!0,get:function(){return ae.encodeDeployData}});var oe=bf();Object.defineProperty(e,"encodeErrorResult",{enumerable:!0,get:function(){return oe.encodeErrorResult}});var se=Hr();Object.defineProperty(e,"encodeEventTopics",{enumerable:!0,get:function(){return se.encodeEventTopics}});var Q=Ze();Object.defineProperty(e,"encodeFunctionData",{enumerable:!0,get:function(){return Q.encodeFunctionData}});var V=mf();Object.defineProperty(e,"encodeFunctionResult",{enumerable:!0,get:function(){return V.encodeFunctionResult}});var Ie=_g();Object.defineProperty(e,"encodePacked",{enumerable:!0,get:function(){return Ie.encodePacked}});var ve=Lt();Object.defineProperty(e,"getAbiItem",{enumerable:!0,get:function(){return ve.getAbiItem}});var Se=ko();Object.defineProperty(e,"parseEventLogs",{enumerable:!0,get:function(){return Se.parseEventLogs}});var it=$p();Object.defineProperty(e,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return it.prepareEncodeFunctionData}});var Ce=rt();Object.defineProperty(e,"checksumAddress",{enumerable:!0,get:function(){return Ce.checksumAddress}}),Object.defineProperty(e,"getAddress",{enumerable:!0,get:function(){return Ce.getAddress}});var st=vg();Object.defineProperty(e,"getContractAddress",{enumerable:!0,get:function(){return st.getContractAddress}}),Object.defineProperty(e,"getCreate2Address",{enumerable:!0,get:function(){return st.getCreate2Address}}),Object.defineProperty(e,"getCreateAddress",{enumerable:!0,get:function(){return st.getCreateAddress}});var Le=Ke();Object.defineProperty(e,"isAddress",{enumerable:!0,get:function(){return Le.isAddress}});var Be=gt();Object.defineProperty(e,"isAddressEqual",{enumerable:!0,get:function(){return Be.isAddressEqual}});var Wt=Ru();Object.defineProperty(e,"blobsToCommitments",{enumerable:!0,get:function(){return Wt.blobsToCommitments}});var _t=Bu();Object.defineProperty(e,"blobsToProofs",{enumerable:!0,get:function(){return _t.blobsToProofs}});var ct=of();Object.defineProperty(e,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return ct.commitmentsToVersionedHashes}});var vt=nf();Object.defineProperty(e,"commitmentToVersionedHash",{enumerable:!0,get:function(){return vt.commitmentToVersionedHash}});var ut=T5();Object.defineProperty(e,"fromBlobs",{enumerable:!0,get:function(){return ut.fromBlobs}});var fr=I5();Object.defineProperty(e,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return fr.sidecarsToVersionedHashes}});var _n=Ou();Object.defineProperty(e,"toBlobSidecars",{enumerable:!0,get:function(){return _n.toBlobSidecars}});var Zo=tg();Object.defineProperty(e,"toBlobs",{enumerable:!0,get:function(){return Zo.toBlobs}});var lr=hf();Object.defineProperty(e,"ccipRequest",{enumerable:!0,get:function(){return lr.ccipRequest}}),Object.defineProperty(e,"ccipFetch",{enumerable:!0,get:function(){return lr.ccipRequest}}),Object.defineProperty(e,"offchainLookup",{enumerable:!0,get:function(){return lr.offchainLookup}}),Object.defineProperty(e,"offchainLookupAbiItem",{enumerable:!0,get:function(){return lr.offchainLookupAbiItem}}),Object.defineProperty(e,"offchainLookupSignature",{enumerable:!0,get:function(){return lr.offchainLookupSignature}});var Yo=Lo();Object.defineProperty(e,"assertCurrentChain",{enumerable:!0,get:function(){return Yo.assertCurrentChain}});var Ku=Pg();Object.defineProperty(e,"defineChain",{enumerable:!0,get:function(){return Ku.defineChain}});var Zu=Ag();Object.defineProperty(e,"extractChain",{enumerable:!0,get:function(){return Zu.extractChain}});var Jo=ur();Object.defineProperty(e,"getChainContractAddress",{enumerable:!0,get:function(){return Jo.getChainContractAddress}});var vn=Oe();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return vn.concat}}),Object.defineProperty(e,"concatBytes",{enumerable:!0,get:function(){return vn.concatBytes}}),Object.defineProperty(e,"concatHex",{enumerable:!0,get:function(){return vn.concatHex}});var Yu=Af();Object.defineProperty(e,"isBytes",{enumerable:!0,get:function(){return Yu.isBytes}});var Ju=ze();Object.defineProperty(e,"isHex",{enumerable:!0,get:function(){return Ju.isHex}});var En=rr();Object.defineProperty(e,"pad",{enumerable:!0,get:function(){return En.pad}}),Object.defineProperty(e,"padBytes",{enumerable:!0,get:function(){return En.padBytes}}),Object.defineProperty(e,"padHex",{enumerable:!0,get:function(){return En.padHex}});var Xu=Ve();Object.defineProperty(e,"size",{enumerable:!0,get:function(){return Xu.size}});var jn=at();Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return jn.slice}}),Object.defineProperty(e,"sliceBytes",{enumerable:!0,get:function(){return jn.sliceBytes}}),Object.defineProperty(e,"sliceHex",{enumerable:!0,get:function(){return jn.sliceHex}});var Qu=Ut();Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return Qu.trim}});var br=Kd();Object.defineProperty(e,"bytesToBigInt",{enumerable:!0,get:function(){return br.bytesToBigInt}}),Object.defineProperty(e,"bytesToBool",{enumerable:!0,get:function(){return br.bytesToBool}}),Object.defineProperty(e,"bytesToNumber",{enumerable:!0,get:function(){return br.bytesToNumber}}),Object.defineProperty(e,"bytesToString",{enumerable:!0,get:function(){return br.bytesToString}}),Object.defineProperty(e,"fromBytes",{enumerable:!0,get:function(){return br.fromBytes}});var mr=Ae();Object.defineProperty(e,"fromHex",{enumerable:!0,get:function(){return mr.fromHex}}),Object.defineProperty(e,"hexToBigInt",{enumerable:!0,get:function(){return mr.hexToBigInt}}),Object.defineProperty(e,"hexToBool",{enumerable:!0,get:function(){return mr.hexToBool}}),Object.defineProperty(e,"hexToNumber",{enumerable:!0,get:function(){return mr.hexToNumber}}),Object.defineProperty(e,"hexToString",{enumerable:!0,get:function(){return mr.hexToString}});var ed=If();Object.defineProperty(e,"fromRlp",{enumerable:!0,get:function(){return ed.fromRlp}});var hr=pe();Object.defineProperty(e,"boolToBytes",{enumerable:!0,get:function(){return hr.boolToBytes}}),Object.defineProperty(e,"hexToBytes",{enumerable:!0,get:function(){return hr.hexToBytes}}),Object.defineProperty(e,"numberToBytes",{enumerable:!0,get:function(){return hr.numberToBytes}}),Object.defineProperty(e,"stringToBytes",{enumerable:!0,get:function(){return hr.stringToBytes}}),Object.defineProperty(e,"toBytes",{enumerable:!0,get:function(){return hr.toBytes}});var yr=te();Object.defineProperty(e,"boolToHex",{enumerable:!0,get:function(){return yr.boolToHex}}),Object.defineProperty(e,"bytesToHex",{enumerable:!0,get:function(){return yr.bytesToHex}}),Object.defineProperty(e,"numberToHex",{enumerable:!0,get:function(){return yr.numberToHex}}),Object.defineProperty(e,"stringToHex",{enumerable:!0,get:function(){return yr.stringToHex}}),Object.defineProperty(e,"toHex",{enumerable:!0,get:function(){return yr.toHex}});var wn=Bo();Object.defineProperty(e,"bytesToRlp",{enumerable:!0,get:function(){return wn.bytesToRlp}}),Object.defineProperty(e,"hexToRlp",{enumerable:!0,get:function(){return wn.hexToRlp}}),Object.defineProperty(e,"toRlp",{enumerable:!0,get:function(){return wn.toRlp}});var td=bg();Object.defineProperty(e,"labelhash",{enumerable:!0,get:function(){return td.labelhash}});var rd=jf();Object.defineProperty(e,"namehash",{enumerable:!0,get:function(){return rd.namehash}});var Pn=S5();Object.defineProperty(e,"toCoinType",{enumerable:!0,get:function(){return Pn.toCoinType}});var nd=ir();Object.defineProperty(e,"getContractError",{enumerable:!0,get:function(){return nd.getContractError}});var Xo=Iu();Object.defineProperty(e,"defineBlock",{enumerable:!0,get:function(){return Xo.defineBlock}}),Object.defineProperty(e,"formatBlock",{enumerable:!0,get:function(){return Xo.formatBlock}});var od=Gt();Object.defineProperty(e,"formatLog",{enumerable:!0,get:function(){return od.formatLog}});var An=qo();Object.defineProperty(e,"defineTransaction",{enumerable:!0,get:function(){return An.defineTransaction}}),Object.defineProperty(e,"formatTransaction",{enumerable:!0,get:function(){return An.formatTransaction}}),Object.defineProperty(e,"transactionType",{enumerable:!0,get:function(){return An.transactionType}});var Qo=Do();Object.defineProperty(e,"defineTransactionReceipt",{enumerable:!0,get:function(){return Qo.defineTransactionReceipt}}),Object.defineProperty(e,"formatTransactionReceipt",{enumerable:!0,get:function(){return Qo.formatTransactionReceipt}});var Lr=wt();Object.defineProperty(e,"defineTransactionRequest",{enumerable:!0,get:function(){return Lr.defineTransactionRequest}}),Object.defineProperty(e,"formatTransactionRequest",{enumerable:!0,get:function(){return Lr.formatTransactionRequest}}),Object.defineProperty(e,"rpcTransactionType",{enumerable:!0,get:function(){return Lr.rpcTransactionType}});var ad=Sf();Object.defineProperty(e,"isHash",{enumerable:!0,get:function(){return ad.isHash}});var id=We();Object.defineProperty(e,"keccak256",{enumerable:!0,get:function(){return id.keccak256}});var sd=Ig();Object.defineProperty(e,"ripemd160",{enumerable:!0,get:function(){return sd.ripemd160}});var cd=rf();Object.defineProperty(e,"sha256",{enumerable:!0,get:function(){return cd.sha256}});var ud=Sg();Object.defineProperty(e,"toEventHash",{enumerable:!0,get:function(){return ud.toEventHash}});var ea=hn();Object.defineProperty(e,"toEventSelector",{enumerable:!0,get:function(){return ea.toEventSelector}}),Object.defineProperty(e,"getEventSelector",{enumerable:!0,get:function(){return ea.toEventSelector}});var Gf=Rg();Object.defineProperty(e,"toEventSignature",{enumerable:!0,get:function(){return Gf.toEventSignature}}),Object.defineProperty(e,"getEventSignature",{enumerable:!0,get:function(){return Gf.toEventSignature}});var b_=Bg();Object.defineProperty(e,"toFunctionHash",{enumerable:!0,get:function(){return b_.toFunctionHash}});var Vf=Mr();Object.defineProperty(e,"toFunctionSelector",{enumerable:!0,get:function(){return Vf.toFunctionSelector}}),Object.defineProperty(e,"getFunctionSelector",{enumerable:!0,get:function(){return Vf.toFunctionSelector}});var Wf=Og();Object.defineProperty(e,"toFunctionSignature",{enumerable:!0,get:function(){return Wf.toFunctionSignature}}),Object.defineProperty(e,"getFunctionSignature",{enumerable:!0,get:function(){return Wf.toFunctionSignature}});var m_=d_();Object.defineProperty(e,"defineKzg",{enumerable:!0,get:function(){return m_.defineKzg}});var h_=R5();Object.defineProperty(e,"setupKzg",{enumerable:!0,get:function(){return h_.setupKzg}});var Kf=Cg();Object.defineProperty(e,"createNonceManager",{enumerable:!0,get:function(){return Kf.createNonceManager}}),Object.defineProperty(e,"nonceManager",{enumerable:!0,get:function(){return Kf.
47nonceManager}});var y_=sg();Object.defineProperty(e,"withCache",{enumerable:!0,get:function(){return y_.withCache}});var p_=Nu();Object.defineProperty(e,"withRetry",{enumerable:!0,get:function(){return p_.withRetry}});var g_=Rf();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return g_.withTimeout}});var __=B5();Object.defineProperty(e,"compactSignatureToSignature",{enumerable:!0,get:function(){return __.compactSignatureToSignature}});var v_=Go();Object.defineProperty(e,"hashMessage",{enumerable:!0,get:function(){return v_.hashMessage}});var dd=Vo();Object.defineProperty(e,"hashDomain",{enumerable:!0,get:function(){return dd.hashDomain}}),Object.defineProperty(e,"hashStruct",{enumerable:!0,get:function(){return dd.hashStruct}}),Object.defineProperty(e,"hashTypedData",{enumerable:!0,get:function(){return dd.hashTypedData}});var E_=xf();Object.defineProperty(e,"isErc6492Signature",{enumerable:!0,get:function(){return E_.isErc6492Signature}});var j_=Hf();Object.defineProperty(e,"isErc8010Signature",{enumerable:!0,get:function(){return j_.isErc8010Signature}});var Zf=O5();Object.defineProperty(e,"hexToCompactSignature",{enumerable:!0,get:function(){return Zf.parseCompactSignature}}),Object.defineProperty(e,"parseCompactSignature",{enumerable:!0,get:function(){return Zf.parseCompactSignature}});var w_=Ug();Object.defineProperty(e,"parseErc6492Signature",{enumerable:!0,get:function(){return w_.parseErc6492Signature}});var P_=Lg();Object.defineProperty(e,"parseErc8010Signature",{enumerable:!0,get:function(){return P_.parseErc8010Signature}});var Yf=C5();Object.defineProperty(e,"hexToSignature",{enumerable:!0,get:function(){return Yf.parseSignature}}),Object.defineProperty(e,"parseSignature",{enumerable:!0,get:function(){return Yf.parseSignature}});var A_=sr();Object.defineProperty(e,"recoverAddress",{enumerable:!0,get:function(){return A_.recoverAddress}});var T_=kf();Object.defineProperty(e,"recoverMessageAddress",{enumerable:!0,get:function(){return T_.recoverMessageAddress}});var I_=Jd();Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return I_.recoverPublicKey}});var S_=x5();Object.defineProperty(e,"recoverTransactionAddress",{enumerable:!0,get:function(){return S_.recoverTransactionAddress}});var R_=Ff();Object.defineProperty(e,"recoverTypedDataAddress",{enumerable:!0,get:function(){return R_.recoverTypedDataAddress}});var Jf=q5();Object.defineProperty(e,"compactSignatureToHex",{enumerable:!0,get:function(){return Jf.serializeCompactSignature}}),Object.defineProperty(e,"serializeCompactSignature",{enumerable:!0,get:function(){return Jf.serializeCompactSignature}});var B_=Dg();Object.defineProperty(e,"serializeErc6492Signature",{enumerable:!0,get:function(){return B_.serializeErc6492Signature}});var O_=Gg();Object.defineProperty(e,"serializeErc8010Signature",{enumerable:!0,get:function(){return O_.serializeErc8010Signature}});var Xf=r_();Object.defineProperty(e,"signatureToHex",{enumerable:!0,get:function(){return Xf.serializeSignature}}),Object.defineProperty(e,"serializeSignature",{enumerable:!0,get:function(){return Xf.serializeSignature}});var C_=M5();Object.defineProperty(e,"signatureToCompactSignature",{enumerable:!0,get:function(){return C_.signatureToCompactSignature}});var x_=kg();Object.defineProperty(e,"toPrefixedMessage",{enumerable:!0,get:function(){return x_.toPrefixedMessage}});var q_=Vg();Object.defineProperty(e,"verifyHash",{enumerable:!0,get:function(){return q_.verifyHash}});var M_=Wg();Object.defineProperty(e,"verifyMessage",{enumerable:!0,get:function(){return M_.verifyMessage}});var H_=Kg();Object.defineProperty(e,"verifyTypedData",{enumerable:!0,get:function(){return H_.verifyTypedData}});var k_=qe();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return k_.stringify}});var F_=Pt();Object.defineProperty(e,"assertRequest",{enumerable:!0,get:function(){return F_.assertRequest}});var fd=zu();Object.defineProperty(e,"assertTransactionEIP1559",{enumerable:!0,get:function(){return fd.assertTransactionEIP1559}}),Object.defineProperty(e,"assertTransactionEIP2930",{enumerable:!0,get:function(){return fd.assertTransactionEIP2930}}),Object.defineProperty(e,"assertTransactionLegacy",{enumerable:!0,get:function(){return fd.assertTransactionLegacy}});var N_=Nf();Object.defineProperty(e,"getSerializedTransactionType",{enumerable:!0,get:function(){return N_.getSerializedTransactionType}});var $_=Cu();Object.defineProperty(e,"getTransactionType",{enumerable:!0,get:function(){return $_.getTransactionType}});var z_=$f();Object.defineProperty(e,"parseTransaction",{enumerable:!0,get:function(){return z_.parseTransaction}});var U_=Tf();Object.defineProperty(e,"serializeAccessList",{enumerable:!0,get:function(){return U_.serializeAccessList}});var L_=Uu();Object.defineProperty(e,"serializeTransaction",{enumerable:!0,get:function(){return L_.serializeTransaction}});var ta=Lu();Object.defineProperty(e,"domainSeparator",{enumerable:!0,get:function(){return ta.domainSeparator}}),Object.defineProperty(e,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return ta.getTypesForEIP712Domain}}),Object.defineProperty(e,"serializeTypedData",{enumerable:!0,get:function(){return ta.serializeTypedData}
47}),Object.defineProperty(e,"validateTypedData",{enumerable:!0,get:function(){return ta.validateTypedData}});var D_=Ro();Object.defineProperty(e,"formatEther",{enumerable:!0,get:function(){return D_.formatEther}});var G_=kr();Object.defineProperty(e,"formatGwei",{enumerable:!0,get:function(){return G_.formatGwei}});var V_=Pu();Object.defineProperty(e,"formatUnits",{enumerable:!0,get:function(){return V_.formatUnits}});var W_=Yg();Object.defineProperty(e,"parseEther",{enumerable:!0,get:function(){return W_.parseEther}});var K_=Jg();Object.defineProperty(e,"parseGwei",{enumerable:!0,get:function(){return K_.parseGwei}});var Z_=Vu();Object.defineProperty(e,"parseUnits",{enumerable:!0,get:function(){return Z_.parseUnits}})})(yd)),yd}var Br={},vp;function k5(){if(vp)return Br;vp=1,Object.defineProperty(Br,"__esModule",{value:!0}),Br.MAGIC_VALUE_BYTES=Br.MAGIC_VALUE=void 0;const e="0x1626ba7e";Br.MAGIC_VALUE=e;const r="0x20c13b0b";return Br.MAGIC_VALUE_BYTES=r,Br}var hu={},Ao={},Or={},Ep;function f_(){if(Ep)return Or;Ep=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.PermissionsError=Or.PERMISSIONS_REQUEST_REJECTED=void 0,Or.PERMISSIONS_REQUEST_REJECTED=4001;class e extends Error{constructor(n,t,a){super(n),this.code=t,this.data=a,Object.setPrototypeOf(this,e.prototype)}}return Or.PermissionsError=e,Or}var jp;function l_(){if(jp)return Ao;jp=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.Wallet=void 0;const e=qr(),r=f_();class n{constructor(a){this.communicator=a}async getPermissions(){return(await this.communicator.send(e.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(a){if(!this.isPermissionRequestValid(a))throw new r.PermissionsError("Permissions request is invalid",r.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(e.Methods.wallet_requestPermissions,a)).data}catch{throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(a){return a.every(s=>typeof s=="object"?Object.keys(s).every(o=>!!Object.values(e.RestrictedMethods).includes(o)):!1)}}return Ao.Wallet=n,Ao}var wp;function F5(){if(wp)return hu;wp=1,Object.defineProperty(hu,"__esModule",{value:!0});const e=l_(),r=f_(),n=(a,s)=>s.some(o=>o.parentCapability===a),t=()=>(a,s,o)=>{const i=o.value;return o.value=async function(){const c=new e.Wallet(this.communicator);let u=await c.getPermissions();if(n(s,u)||(u=await c.requestPermissions([{[s]:{}}])),!n(s,u))throw new r.PermissionsError("Permissions rejected",r.PERMISSIONS_REQUEST_REJECTED);return i.apply(this)},o};return hu.default=t,hu}var Pp;function N5(){if(Pp)return St;Pp=1;var e=St&&St.__decorate||function(u,d,f,b){var y=arguments.length,h=y<3?d:b===null?b=Object.getOwnPropertyDescriptor(d,f):b,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(u,d,f,b);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(h=(y<3?m(h):y>3?m(d,f,h):m(d,f))||h);return y>3&&h&&Object.defineProperty(d,f,h),h},r=St&&St.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(St,"__esModule",{value:!0}),St.Safe=void 0;const n=H5(),t=k5(),a=qr(),s=Ld(),o=Ud(),i=r(F5());class c{constructor(d){this.communicator=d}async getChainInfo(){return(await this.communicator.send(a.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(a.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:d="usd"}={}){return(await this.communicator.send(a.Methods.getSafeBalances,{currency:d})).data}async check1271Signature(d,f="0x"){const b=await this.getInfo(),y=(0,n.encodeFunctionData)({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:[d,f]}),h={call:s.RPC_CALLS.eth_call,params:[{to:b.safeAddress,data:y},"latest"]};try{return(await this.communicator.send(a.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===t.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(d,f="0x"){const b=await this.getInfo(),y=(0,n.encodeFunctionData)({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:[d,f]}),h={call:s.RPC_CALLS.eth_call,params:[{to:b.safeAddress,data:y},"latest"]};try{return(await this.communicator.send(a.Methods.rpcCall,h)).data.slice(0,10).toLowerCase()===t.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(d){return(0,n.hashMessage)(d)}calculateTypedMessageHash(d){const f=typeof d.domain.chainId=="object"?d.domain.chainId.toNumber():Number(d.domain.chainId);let b=d.primaryType;if(!b){const y=Object.values(d.types),h=Object.keys(d.types).filter(m=>y.every(g=>g.every(({type:p})=>p.replace("[","").replace("]","")!==m)));if(h.length===0||h.length>1)throw new Error("Please specify primaryType");b=h[0]}return(0,n.hashTypedData)({message:d.message,domain:{...d.domain,chainId:f,verifyingContract:d.domain.verifyingContract,salt:d.domain.salt},types:d.types,primaryType:b})}async getOffChainSignature(d){return(await this.communicator.send(a.Methods.getOffChainSignature,d)).data}async isMessageSigned(d,f="0x"){let b;
47if(typeof d=="string"&&(b=async()=>{const y=this.calculateMessageHash(d);return await this.isMessageHashSigned(y,f)}),(0,o.isObjectEIP712TypedData)(d)&&(b=async()=>{const y=this.calculateTypedMessageHash(d);return await this.isMessageHashSigned(y,f)}),b)return await b();throw new Error("Invalid message type")}async isMessageHashSigned(d,f="0x"){const b=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const y of b)if(await y(d,f))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(a.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(a.Methods.requestAddressBook,void 0)).data}}return St.Safe=c,e([(0,i.default)()],c.prototype,"requestAddressBook",null),St}var Ap;function Tp(){if(Ap)return Dr;Ap=1;var e=Dr&&Dr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Dr,"__esModule",{value:!0});const r=e(ov()),n=uv(),t=dv(),a=N5(),s=l_();class o{constructor(c={}){const{allowedDomains:u=null,debug:d=!1}=c;this.communicator=new r.default(u,d),this.eth=new t.Eth(this.communicator),this.txs=new n.TXs(this.communicator),this.safe=new a.Safe(this.communicator),this.wallet=new s.Wallet(this.communicator)}}return Dr.default=o,Dr}var Ip;function $5(){return Ip||(Ip=1,(function(e){var r=It&&It.__createBinding||(Object.create?(function(o,i,c,u){u===void 0&&(u=c);var d=Object.getOwnPropertyDescriptor(i,c);(!d||("get"in d?!i.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(o,u,d)}):(function(o,i,c,u){u===void 0&&(u=c),o[u]=i[c]})),n=It&&It.__exportStar||function(o,i){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(i,c)&&r(i,o,c)},t=It&&It.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const a=t(Tp());e.default=a.default,n(Tp(),e),n(Ud(),e),n(qr(),e),n(xp(),e);var s=Cp();Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}}),n(Ld(),e)})(It)),It}var Cr={},Sp;function z5(){if(Sp)return Cr;Sp=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.numberToHex=Cr.getLowerCase=void 0;function e(n){return n&&n.toLowerCase()}Cr.getLowerCase=e;function r(n){return`0x${n.toString(16)}`}return Cr.numberToHex=r,Cr}var Rp;function U5(){if(Rp)return Tn;Rp=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.SafeAppProvider=void 0;const e=$5(),r=Q_(),n=z5();class t extends r.EventEmitter{constructor(s,o){super(),this.submittedTxs=new Map,this.safe=s,this.sdk=o}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(s){const{method:o,params:i=[]}=s;switch(o){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,n.numberToHex)(this.chainId);case"personal_sign":{const[b,y]=i;if(this.safe.safeAddress.toLowerCase()!==y.toLowerCase())throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(b);return("signature"in h?h.signature:void 0)||"0x"}case"eth_sign":{const[b,y]=i;if(this.safe.safeAddress.toLowerCase()!==b.toLowerCase()||!y.startsWith("0x"))throw new Error("The address or message hash is invalid");const h=await this.sdk.txs.signMessage(y);return("signature"in h?h.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[b,y]=i,h=typeof y=="string"?JSON.parse(y):y;if(this.safe.safeAddress.toLowerCase()!==b.toLowerCase())throw new Error("The address is invalid");const m=await this.sdk.txs.signTypedMessage(h);return("signature"in m?m.signature:void 0)||"0x"}case"eth_sendTransaction":const c={...i[0],value:i[0].value||"0",data:i[0].data||"0x"};typeof c.gas=="string"&&c.gas.startsWith("0x")&&(c.gas=parseInt(c.gas,16));const u=await this.sdk.txs.send({txs:[c],params:{safeTxGas:c.gas}});return this.submittedTxs.set(u.safeTxHash,{from:this.safe.safeAddress,hash:u.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:c.data,value:c.value,to:c.to,blockHash:null,blockNumber:null,transactionIndex:null}),u.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,n.getLowerCase)(i[0]),i[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,n.getLowerCase)(i[0]),i[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,n.getLowerCase)(i[0]),i[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,n.getLowerCase)(i[0]),i[1],i[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([i[0],i[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([i[0],i[1]]);case"eth_getTransactionByHash":let f=i[0];try{f=(await this.sdk.txs.getBySafeTxHash(f)).txHash||f}catch{}return this.submittedTxs.has(f)?this.submittedTxs.get(f):this.sdk.eth.getTransactionByHash([f]).then(b=>(b&&(b.hash=i[0]),b));case"eth_getTransactionReceipt":{let b=i[0];try{b=(await this.sdk.txs.getBySafeTxHash(b)).txHash||b}catch{}return this.sdk.eth.getTransactionReceipt([b]).then(y=>(y&&(y.transactionHash=i[0]),y))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(i[0]);case"eth_call":return this.sdk.eth.call([i[0],i[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([i[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(i[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([i[0]]);case"wallet_sendCalls":{const{from:b,calls:y,chainId:h}=i[0];if(h!==(0,n.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${h}`);
47if(b!==this.safe.safeAddress)throw Error("Invalid from address");const m=y.map((v,j)=>{if(!v.to)throw new Error(`Invalid call #${j}: missing "to" field`);return{to:v.to,data:v.data??"0x",value:v.value??(0,n.numberToHex)(0)}}),{safeTxHash:g}=await this.sdk.txs.send({txs:m});return{id:g}}case"wallet_getCallsStatus":{const b=i[0],y={[e.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[e.TransactionStatus.AWAITING_EXECUTION]:100,[e.TransactionStatus.SUCCESS]:200,[e.TransactionStatus.CANCELLED]:400,[e.TransactionStatus.FAILED]:500},h=await this.sdk.txs.getBySafeTxHash(b),m={version:"1.0",id:b,chainId:(0,n.numberToHex)(this.chainId),status:y[h.txStatus]};if(!h.txHash)return m;const g=await this.sdk.eth.getTransactionReceipt([h.txHash]);if(!g)return m;const p=h.txData?.dataDecoded?.method!=="multiSend"?1:h.txData.dataDecoded.parameters?.[0].valueDecoded?.length??1,v=Number(g.blockNumber),j=Number(g.gasUsed);return m.receipts=Array(p).fill({logs:g.logs,status:(0,n.numberToHex)(h.txStatus===e.TransactionStatus.SUCCESS?1:0),blockHash:g.blockHash,blockNumber:(0,n.numberToHex)(v),gasUsed:(0,n.numberToHex)(j),transactionHash:h.txHash}),m}case"wallet_showCallsStatus":throw new Error(`"${s.method}" not supported`);case"wallet_getCapabilities":return{[(0,n.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}}};default:throw Error(`"${s.method}" not implemented`)}}send(s,o){s||o("Undefined request"),this.request(s).then(i=>o(null,{jsonrpc:"2.0",id:s.id,result:i})).catch(i=>o(i,null))}}return Tn.SafeAppProvider=t,Tn}var Bp;function L5(){return Bp||(Bp=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var r=U5();Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return r.SafeAppProvider}})})(ld)),ld}var D5=L5();class K5 extends D5.SafeAppProvider{request(r){return r.method==="eth_requestAccounts"?this.request({method:"eth_accounts",params:[]}):super.request(r)}}export{K5 as SafeProvider};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.