PageSourceSearch

https://www.bitlayer.org/assets/header-BlQkPMGA.js

js bitlayer.org collected 2026-10-02 04:51:20 UTC 537,261 bytes, 51 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-DLZ_JHpP.js","assets/jsx-runtime-c7lzrv_k.js","assets/button-C_hcPULz.js","assets/index-BYxIuc-u.js","assets/createLucideIcon-Bk7FLhyD.js","assets/text-DqhCCMR4.js","assets/link-CbofcMuR.js","assets/useTranslation-BinARL31.js","assets/context-0EDSoFJC.js","assets/components-CHEsHwug.js","assets/index-dY_uJ9BA.js","assets/accordion-JfA7Bss7.js","assets/index-BV3nyi7z.js","assets/index-DMy9pGrk.js","assets/account-CJ53WquZ.js","assets/vanilla-BGYVcbF6.js","assets/index-BAMY2Nnw.js","assets/index-DCgXooVm.js","assets/BTCIcon-Bmsgg2qQ.js","assets/chains-Dl5QfsMH.js","assets/useMutation-Dy1y7ePd.js","assets/dayjs.min-BvSK85Au.js","assets/dialog-DMhjJt8O.js","assets/index-RMi8f9TK.js","assets/index--xHzQ5zP.js","assets/tslib.es6-BC8AoZNY.js","assets/index-CwIjoAR8.js","assets/motion-UTEJwi9W.js","assets/resolve-element-CzeF6rwO.js","assets/index-DIL21M5w.js","assets/BRCIcon-QoxjgQ8w.js","assets/index-BeGwhidB.js","assets/section-badge-C8iQBAYF.js","assets/index-BbP3371Q.js","assets/index-6Bhtr-W_.js","assets/corner-mark-ChcJmR73.js","assets/toast-DfsHD7aC.js","assets/isAddressEqual-C3j17YXJ.js","assets/secp256k1-e_kOsDZ-.js","assets/index-BQLHQ-SW.js","assets/chevron-down-DMJedRjj.js","assets/page-DaqIi0KW.js","assets/title-TRNwf4D2.js","assets/page-loader-B1Dpri3x.js","assets/wrap.es-CoT40OZP.js","assets/client-only-CWL9m5Hg.js","assets/styles-DWh34C88.js","assets/XIcon-C340P6t4.js","assets/MediumIcon-DQdK2gMw.js","assets/runtime-BHqz6Jl1.js","assets/index-Cq0D60Y6.js","assets/Trans-CJRvJU9w.js"])))=>i.map(i=>d[i]);
2var np=Object.defineProperty;var rp=(e,t,n)=>t in e?np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var zt=(e,t,n)=>rp(e,typeof t!="symbol"?t+"":t,n);import{r as T,W as L,j as p,g as ap,c as sp}from"./jsx-runtime-c7lzrv_k.js";import{$ as Qn,_ as ve,c as ip,B as ae,L as Mr,b as op}from"./button-C_hcPULz.js";import{T as Te}from"./text-DqhCCMR4.js";import{L as bs}from"./link-CbofcMuR.js";import{A as lp,a as cp,b as up,c as dp}from"./accordion-JfA7Bss7.js";import{N as ze,c as X,A as ft,B as xi,r as ta,f as pp,a as fp,p as yp,y as mp,z as bp}from"./index-BYxIuc-u.js";import{p as Pe,J as ht,bl as Go,bm as hp,bn as gp,b7 as wp,b8 as vp,bo as Ho,d as Ap,$ as hs,u as cn,bp as xp,bq as Tp,e as _o,br as Cp,N as Ep,bs as Ip,bt as Rp,bu as qo,l as Zo,bv as Mp,ai as Bp,U as Yo,R as Br,bw as Pp,Z as na,V as gs,X as kp,j as Np,bx as Sp,g as ws,by as yt,bz as $p,bA as Op,bB as jp,bC as Fp,am as Lp,bD as Dp,ak as zp}from"./account-CJ53WquZ.js";import{g as tn,a4 as Qp,a5 as gt,P as Vp,U as Up,j as Wp,a6 as Gp,a7 as Ti,a2 as Hp,a8 as Xo,c as Ko,S as _p,h as qp,p as Zp,I as Yp,b as Xp}from"./chains-Dl5QfsMH.js";import{A as Vn,d as pr,s as Kp,u as Un,a as Jp}from"./useMutation-Dy1y7ePd.js";import{M as Ci,N as ef,O as nn,P as K,Q as wt,R as Jo,S as tf,T as Pr,B as ue,U as Ei,V as el,W as G,X as we,Y as vs,Z as Ii,_ as nf,$ as kr,a0 as Nr,a1 as tl,a2 as rf,l as nl,a3 as Ri,j as rl,a4 as As,e as Xe,K as Rt,a5 as al,a6 as af,a7 as sl,a8 as Sr,k as il,a9 as sf,aa as Bn,ab as ol,ac as of,ad as lf,ae as cf,af as Bt,ag as un,ah as $e,ai as Pn,aj as ll,ak as uf,al as xs,am as Qe,an as df,ao as pf,ap as $r,aq as cl,ar as ff,as as yf,at as mf,au as bf,av as hf,aw as gf,ax as wf,ay as vf,az as Af,aA as xf,aB as ul,aC as Mi,aD as dl,aE as Tf,c as pl,aF as Cf,C as Ef,aG as rn,aH as Wn,aI as Rn,L as Ts,aJ as fl,aK as Gn,aL as yl,aM as ml,aN as Or,aO as Cs,aP as If,aQ as jr,aR as Rf,aS as Mf,aT as bl,m as Bf,aU as Pf,aV as kf,aW as Nf,aX as kn,g as Sf,F as $f,H as Of,J as jf,aY as Ff,y as dn,z as pn,D as Hn,G as Lf,E as hl,x as Tt,u as Df,i as gn}from"./dayjs.min-BvSK85Au.js";import{j as zf,k as Qf,i as Vf,l as Uf,m as Wf,n as Gf,$ as Hf,o as _f,D as Es,b as gl,a as Is,c as wl,e as vl,f as Al,g as Bi,S as qf}from"./dialog-DMhjJt8O.js";import{b as Zf}from"./index-CwIjoAR8.js";import{b as Yf,a as Xf,S as Pi}from"./BRCIcon-QoxjgQ8w.js";import{B as pe,a as xl,j as Pt,v as Rs,F as Be,J as Xt,c as _n,t as Tl,w as te,b as hr,e as gr,g as Ms,s as ki,i as fe,I as Kf,K as Jf,x as kt,k as ey,M as ty,E as ny,L as ry,S as Ni}from"./BTCIcon-Bmsgg2qQ.js";import{s as ra,u as Cl}from"./index-BeGwhidB.js";import{b as ay}from"./section-badge-C8iQBAYF.js";import{g as ar}from"./index-BbP3371Q.js";import{$ as sy,I as El}from"./index-6Bhtr-W_.js";import{a as Il,C as Et}from"./corner-mark-ChcJmR73.js";import{u as Rl}from"./toast-DfsHD7aC.js";import{a as iy}from"./vanilla-BGYVcbF6.js";import{_ as Ml}from"./index-DCgXooVm.js";import{l as Bs,i as Ot}from"./isAddressEqual-C3j17YXJ.js";import{secp256k1 as oy}from"./secp256k1-e_kOsDZ-.js";import{$ as ly}from"./components-CHEsHwug.js";import{g as cy,$ as Ve,a as uy,c as ge,b as Fr,d as Ct,f as Bl,e as Ba,h as Si}
2from"./index-BV3nyi7z.js";import{$ as dy,a as Pl}from"./index-DMy9pGrk.js";import{a as py}from"./index-RMi8f9TK.js";import{$ as fy}from"./index-BQLHQ-SW.js";import{C as kl}from"./chevron-down-DMJedRjj.js";import{u as vt}from"./useTranslation-BinARL31.js";import{A as yy}from"./page-DaqIi0KW.js";import{T as my}from"./title-TRNwf4D2.js";import{L as by,M as hy,A as gy}from"./page-loader-B1Dpri3x.js";import{S as wy,a as vy}from"./XIcon-C340P6t4.js";import{S as Ay}from"./MediumIcon-DQdK2gMw.js";import{i as xy}from"./runtime-BHqz6Jl1.js";import{d as Ty}from"./tslib.es6-BC8AoZNY.js";import{i as Cy,u as Ey}from"./index-Cq0D60Y6.js";import{d as Iy}from"./index-dY_uJ9BA.js";import{m as Wt}from"./motion-UTEJwi9W.js";import{T as mt}from"./Trans-CJRvJU9w.js";import{c as Ry}from"./createLucideIcon-Bk7FLhyD.js";function Ps(e){var n,r,a,s,i,o;if(!(e instanceof pe))return!1;const t=e.walk(l=>l instanceof Ci);return t instanceof Ci?((n=t.data)==null?void 0:n.errorName)==="HttpError"||((r=t.data)==null?void 0:r.errorName)==="ResolverError"||((a=t.data)==null?void 0:a.errorName)==="ResolverNotContract"||((s=t.data)==null?void 0:s.errorName)==="ResolverNotFound"||((i=t.data)==null?void 0:i.errorName)==="ReverseAddressMismatch"||((o=t.data)==null?void 0:o.errorName)==="UnsupportedResolverProfile":!1}function Nl(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;const t=`0x${e.slice(1,65)}`;return xl(t)?t:null}function Pa(e){let t=new Uint8Array(32).fill(0);if(!e)return Pt(t);const n=e.split(".");for(let r=n.length-1;r>=0;r-=1){const a=Nl(n[r]),s=a?Rs(a):Be(Xt(n[r]),"bytes");t=Be(tn([t,s]),"bytes")}return Pt(t)}function My(e){return`[${e.slice(2)}]`}function By(e){const t=new Uint8Array(32).fill(0);return e?Nl(e)||Be(Xt(e)):Pt(t)}function ks(e){const t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);const n=new Uint8Array(Xt(t).byteLength+2);let r=0;const a=t.split(".");for(let s=0;s<a.length;s++){let i=Xt(a[s]);i.byteLength>255&&(i=Xt(My(By(a[s])))),n[r]=i.length,n.set(i,r+1),r+=i.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}function qn(e,t){if(_t(e)>t)throw new Uy({givenSize:_t(e),maxSize:t})}const _e={zero:48,nine:57,A:65,F:70,a:97,f:102};function $i(e){if(e>=_e.zero&&e<=_e.nine)return e-_e.zero;if(e>=_e.A&&e<=_e.F)return e-(_e.A-10);if(e>=_e.a&&e<=_e.f)return e-(_e.a-10)}function Py(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new Wy({size:e.length,targetSize:r,type:"Bytes"});const a=new Uint8Array(r);for(let s=0;s<r;s++){const i=n==="right";a[i?s:r-s-1]=e[i?s:e.length-s-1]}return a}function Sl(e,t={}){const{dir:n="left"}=t;let r=e,a=0;for(let s=0;s<r.length-1&&r[n==="left"?s:r.length-s-1].toString()==="0";s++)a++;return r=n==="left"?r.slice(a):r.slice(0,r.length-a),r}const ky=new TextDecoder,Ny=new TextEncoder;function Sy(e){return e instanceof Uint8Array?e:typeof e=="string"?$l(e):$y(e)}function $y(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function $l(e,t={}){const{size:n}=t;let r=e;n&&(ef(e,n),r=nn(e,n));let a=r.slice(2);a.length%2&&(a=`0${a}`);const s=a.length/2,i=new Uint8Array(s);for(let o=0,l=0;o<s;o++){const u=$i(a.charCodeAt(l++)),c=$i(a.charCodeAt(l++));if(u===void 0||c===void 0)throw new K(`Invalid byte sequence ("${a[l-2]}${a[l-1]}" in "${a}").`);i[o]=u*16+c}return i}function Oy(e,t={}){const{size:n}=t,r=Ny.encode(e);return typeof n=="number"?(qn(r,n),jy(r,n)):r}function jy(e,t){return Py(e,{dir:"right",size:t})}function _t(e){return e.length}function Fy(e,t,n,r={}){const{strict:a}=r;return e.slice(t,n)}function Ly(e,t={}){const{size:n}=t;typeof n<"u"&&qn(e,n);const r=wt(e,t);return tf(r,t)}function Dy(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(qn(r,n),r=Ol(r)),r.length>1||r[0]>1)throw new Vy(r);return!!r[0]}function Ke(e,t={}){const{size:n}=t;typeof n<"u"&&qn(e,n);const r=wt(e,t);return Jo(r,t)}function zy(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(qn(r,n),r=Qy(r)),ky.decode(r)}function Ol(e){return Sl(e,{dir:"left"})}function Qy(e){return Sl(e,{dir:"right"})}let Vy=class extends K{constructor(t){super(`Bytes value \`${t}\` 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"})}},Uy=class extends K{constructor({givenSize:t,maxSize:n}
2){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},Wy=class extends K{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};async function Gy(e,t){const{blockNumber:n,blockTag:r,coinType:a,name:s,gatewayUrls:i,strict:o}=t,{chain:l}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw new Error("client chain not configured. universalResolverAddress is required.");return Pr({blockNumber:n,chain:l,contract:"ensUniversalResolver"})})(),c=l==null?void 0:l.ensTlds;if(c&&!c.some(f=>s.endsWith(f)))return null;const d=a!=null?[Pa(s),BigInt(a)]:[Pa(s)];try{const f=ue({abi:Ei,functionName:"addr",args:d}),m={address:u,abi:el,functionName:"resolveWithGateways",args:[_n(ks(s)),f,i??[Bs]],blockNumber:n,blockTag:r},h=await G(e,we,"readContract")(m);if(h[0]==="0x")return null;const w=vs({abi:Ei,args:d,functionName:"addr",data:h[0]});return w==="0x"||Tl(w)==="0x00"?null:w}catch(f){if(o)throw f;if(Ps(f))return null;throw f}}class Hy extends pe{constructor({data:t}){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(t)}`],name:"EnsAvatarInvalidMetadataError"})}}class wn extends pe{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"})}}class Ns extends pe{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class _y extends pe{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const qy=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,Zy=/^(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>\/.*)?$/,Yy=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Xy=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Ky(e){try{const t=await fetch(e,{method:"HEAD"});if(t.status===200){const n=t.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=e})}}function Oi(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function jl({uri:e,gatewayUrls:t}){const n=Yy.test(e);if(n)return{uri:e,isOnChain:!0,isEncoded:n};const r=Oi(t==null?void 0:t.ipfs,"https://ipfs.io"),a=Oi(t==null?void 0:t.arweave,"https://arweave.net"),s=e.match(qy),{protocol:i,subpath:o,target:l,subtarget:u=""}=(s==null?void 0:s.groups)||{},c=i==="ipns:/"||o==="ipns/",d=i==="ipfs:/"||o==="ipfs/"||Zy.test(e);if(e.startsWith("http")&&!c&&!d){let m=e;return t!=null&&t.arweave&&(m=e.replace(/https:\/\/arweave.net/g,t==null?void 0:t.arweave)),{uri:m,isOnChain:!1,isEncoded:!1}}if((c||d)&&l)return{uri:`${r}/${c?"ipns":"ipfs"}/${l}${u}`,isOnChain:!1,isEncoded:!1};if(i==="ar:/"&&l)return{uri:`${a}/${l}${u||""}`,isOnChain:!1,isEncoded:!1};let f=e.replace(Xy,"");if(f.startsWith("<svg")&&(f=`data:image/svg+xml;base64,${btoa(f)}`),f.startsWith("data:")||f.startsWith("{"))return{uri:f,isOnChain:!0,isEncoded:!1};throw new Ns({uri:e})}function Fl(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new Hy({data:e});return e.image||e.image_url||e.image_data}async function Jy({gatewayUrls:e,uri:t}){try{const n=await fetch(t).then(a=>a.json());return await Ss({gatewayUrls:e,uri:Fl(n)})}catch{throw new Ns({uri:t})}}async function Ss({gatewayUrls:e,uri:t}){const{uri:n,isOnChain:r}=jl({uri:t,gatewayUrls:e});if(r||await Ky(n))return n;throw new Ns({uri:t})}function e0(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));const[n,r,a]=t.split("/"),[s,i]=n.split(":"),[o,l]=r.split(":");if(!s||s.toLowerCase()!=="eip155")throw new wn({reason:"Only EIP-155 supported"});if(!i)throw new wn({reason:"Chain ID not found"});if(!l)throw new wn({reason:"Contract address not found"});if(!a)throw new wn({reason:"Token ID not found"});if(!o)throw new wn({reason:"ERC namespace not found"});return{chainID:Number.parseInt(i,10),namespace:o.toLowerCase(),contractAddress:l,tokenID:a}}async function t0(e,{nft:t}){if(t.namespace==="erc721")return we(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}
2],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return we(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new _y({namespace:t.namespace})}async function n0(e,{gatewayUrls:t,record:n}){return/eip155:/i.test(n)?r0(e,{gatewayUrls:t,record:n}):Ss({uri:n,gatewayUrls:t})}async function r0(e,{gatewayUrls:t,record:n}){const r=e0(n),a=await t0(e,{nft:r}),{uri:s,isOnChain:i,isEncoded:o}=jl({uri:a,gatewayUrls:t});if(i&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const u=o?atob(s.replace("data:application/json;base64,","")):s,c=JSON.parse(u);return Ss({uri:Fl(c),gatewayUrls:t})}let l=r.tokenID;return r.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),Jy({gatewayUrls:t,uri:s.replace(/(?:0x)?{id}/,l)})}async function Ll(e,t){const{blockNumber:n,blockTag:r,key:a,name:s,gatewayUrls:i,strict:o}=t,{chain:l}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw new Error("client chain not configured. universalResolverAddress is required.");return Pr({blockNumber:n,chain:l,contract:"ensUniversalResolver"})})(),c=l==null?void 0:l.ensTlds;if(c&&!c.some(d=>s.endsWith(d)))return null;try{const d={address:u,abi:el,args:[_n(ks(s)),ue({abi:Ii,functionName:"text",args:[Pa(s),a]}),i??[Bs]],functionName:"resolveWithGateways",blockNumber:n,blockTag:r},m=await G(e,we,"readContract")(d);if(m[0]==="0x")return null;const b=vs({abi:Ii,functionName:"text",data:m[0]});return b===""?null:b}catch(d){if(o)throw d;if(Ps(d))return null;throw d}}async function a0(e,{blockNumber:t,blockTag:n,assetGatewayUrls:r,name:a,gatewayUrls:s,strict:i,universalResolverAddress:o}){const l=await G(e,Ll,"getEnsText")({blockNumber:t,blockTag:n,key:"avatar",name:a,universalResolverAddress:o,gatewayUrls:s,strict:i});if(!l)return null;try{return await n0(e,{record:l,gatewayUrls:r})}catch{return null}}async function s0(e,t){const{address:n,blockNumber:r,blockTag:a,coinType:s=60n,gatewayUrls:i,strict:o}=t,{chain:l}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw new Error("client chain not configured. universalResolverAddress is required.");return Pr({blockNumber:r,chain:l,contract:"ensUniversalResolver"})})();try{const c={address:u,abi:nf,args:[n,s,i??[Bs]],functionName:"reverseWithGateways",blockNumber:r,blockTag:a},d=G(e,we,"readContract"),[f]=await d(c);return f||null}catch(c){if(o)throw c;if(Ps(c))return null;throw c}}async function i0(e,t){const{blockNumber:n,blockTag:r,name:a}=t,{chain:s}=e,i=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!s)throw new Error("client chain not configured. universalResolverAddress is required.");return Pr({blockNumber:n,chain:s,contract:"ensUniversalResolver"})})(),o=s==null?void 0:s.ensTlds;if(o&&!o.some(u=>a.endsWith(u)))throw new Error(`${a} is not a valid ENS TLD (${o==null?void 0:o.join(", ")}) for chain "${s.name}" (id: ${s.id}).`);const[l]=await G(e,we,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[_n(ks(a))],blockNumber:n,blockTag:r});return l}async function Dl(e,t){var w,y,A;const{account:n=e.account,blockNumber:r,blockTag:a="latest",blobs:s,data:i,gas:o,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:c,maxPriorityFeePerGas:d,to:f,value:m,...b}=t,h=n?Pe(n):void 0;try{kr(t);const g=(typeof r=="bigint"?te(r):void 0)||a,x=(A=(y=(w=e.chain)==null?void 0:w.formatters)==null?void 0:y.transactionRequest)==null?void 0:A.format,I=(x||Nr)({...tl(b,{format:x}),account:h,blobs:s,data:i,gas:o,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:c,maxPriorityFeePerGas:d,to:f,value:m},"createAccessList"),M=await e.request({method:"eth_createAccessList",params:[I,g]});return{accessList:M.accessList,gasUsed:BigInt(M.gasUsed)}}catch(v){throw rf(v,{...t,account:h,chain:e.chain})}}function Lr(e,{method:t}){var r,a;const n={};return e.transport.type==="fallback"&&((a=(r=e.transport).onResponse)==null||a.call(r,({method:s,response:i,status:o,transport:l})=>{o==="success"&&t===s&&(n[i]=l.request)})),s=>n[s]||e.request}async function o0(e){const t=Lr(e,{method:"eth_newBlockFilter"}),n=await e.request({method:"eth_newBlockFilter"});return{id:n,request:t(n),type:"block"}}let l0=class extends pe{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}};const ji="/docs/contract/encodeEventTopics";function Zn(e){var l;const{abi:t,eventName:n,args:r}=e;let a=t[0];if(n){const u=nl({abi:t,name:n});if(!u)throw new Ri(n,{docsPath:ji});a=u}if(a.type!=="event")throw new Ri(void 0,{docsPath:ji});const s=rl(a),i=As(s);let o=[];if(r&&"inputs"in a){const u=(l=a.inputs)==null?void 0:l.filter(d=>"indexed"in d&&d.indexed),c=Array.isArray(r)?r:Object.values(r).length>0?(u==null?void 0:u.map(d=>r[d.name]))??[]:[];c.length>0&&(o=(u==null?void 0:u.map((d,f)=>Array.isArray(c[f])?c[f].map((m,b)=>Fi({param:d,value:c[f][b]})):typeof c[f]<"u"&&c[f]!==null?Fi({param:d,value:c[f]}):null))??[])}return[i,...o]}function Fi({param:e,value:t}
2){if(e.type==="string"||e.type==="bytes")return Be(Rs(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new l0(e.type);return Xe([e],[t])}async function zl(e,t){const{address:n,abi:r,args:a,eventName:s,fromBlock:i,strict:o,toBlock:l}=t,u=Lr(e,{method:"eth_newFilter"}),c=s?Zn({abi:r,args:a,eventName:s}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof i=="bigint"?te(i):i,toBlock:typeof l=="bigint"?te(l):l,topics:c}]});return{abi:r,args:a,eventName:s,id:d,request:u(d),strict:!!o,type:"event"}}async function Ql(e,{address:t,args:n,event:r,events:a,fromBlock:s,strict:i,toBlock:o}={}){const l=a??(r?[r]:void 0),u=Lr(e,{method:"eth_newFilter"});let c=[];l&&(c=[l.flatMap(m=>Zn({abi:[m],eventName:m.name,args:n}))],r&&(c=c[0]));const d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof s=="bigint"?te(s):s,toBlock:typeof o=="bigint"?te(o):o,...c.length?{topics:c}:{}}]});return{abi:l,args:n,eventName:r?r.name:void 0,fromBlock:s,id:d,request:u(d),strict:!!i,toBlock:o,type:"event"}}async function Vl(e){const t=Lr(e,{method:"eth_newPendingTransactionFilter"}),n=await e.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:t(n),type:"transaction"}}async function c0(e,t){const{abi:n,address:r,args:a,functionName:s,dataSuffix:i,...o}=t,l=ue({abi:n,args:a,functionName:s});try{return await G(e,Rt,"estimateGas")({data:`${l}${i?i.replace("0x",""):""}`,to:r,...o})}catch(u){const c=o.account?Pe(o.account):void 0;throw al(u,{abi:n,address:r,args:a,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:c==null?void 0:c.address})}}async function u0(e){const t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}async function d0(e,{blockHash:t,blockNumber:n,blockTag:r="latest"}={}){const a=n!==void 0?te(n):void 0;let s;return t?s=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):s=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[a||r]},{dedupe:!!a}),hr(s)}async function ka(e,{address:t,blockNumber:n,blockTag:r="latest"}){const a=n!==void 0?te(n):void 0,s=await e.request({method:"eth_getCode",params:[t,a||r]},{dedupe:!!a});if(s!=="0x")return s}const Li="/docs/contract/decodeEventLog";function $s(e){const{abi:t,data:n,strict:r,topics:a}=e,s=r??!0,[i,...o]=a;if(!i)throw new af({docsPath:Li});const l=t.find(h=>h.type==="event"&&i===As(rl(h)));if(!(l&&"name"in l)||l.type!=="event")throw new sl(i,{docsPath:Li});const{name:u,inputs:c}=l,d=c==null?void 0:c.some(h=>!("name"in h&&h.name)),f=d?[]:{},m=c.map((h,w)=>[h,w]).filter(([h])=>"indexed"in h&&h.indexed);for(let h=0;h<m.length;h++){const[w,y]=m[h],A=o[h];if(!A)throw new Sr({abiItem:l,param:w});f[d?y:w.name||y]=p0({param:w,value:A})}const b=c.filter(h=>!("indexed"in h&&h.indexed));if(b.length>0){if(n&&n!=="0x")try{const h=il(b,n);if(h)if(d)for(let w=0;w<c.length;w++)f[w]=f[w]??h.shift();else for(let w=0;w<b.length;w++)f[b[w].name]=h[w]}catch(h){if(s)throw h instanceof sf||h instanceof Qp?new Bn({abiItem:l,data:n,params:b,size:gr(n)}):h}else if(s)throw new Bn({abiItem:l,data:"0x",params:b,size:0})}return{eventName:u,args:Object.values(f).length>0?f:void 0}}function p0({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(il([e],t)||[])[0]}function Yn(e){const{abi:t,args:n,logs:r,strict:a=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(i=>{var o;try{const l=t.find(c=>c.type==="event"&&i.topics[0]===As(c));if(!l)return null;const u=$s({...i,abi:[l],strict:a});return s&&!s.includes(u.eventName)||!f0({args:u.args,inputs:l.inputs,matchArgs:n})?null:{...u,...i}}catch(l){let u,c;if(l instanceof sl)return null;if(l instanceof Bn||l instanceof Sr){if(a)return null;u=l.abiItem.name,c=(o=l.abiItem.inputs)==null?void 0:o.some(d=>!("name"in d&&d.name))}return{...i,args:c?[]:{},eventName:u}}}).filter(Boolean)}function f0(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function a(s,i,o){try{return s.type==="address"?Ot(i,o):s.type==="string"||s.type==="bytes"?Be(Rs(i))===o:i===o}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((s,i)=>{if(s==null)return!0;const o=n[i];return o?(Array.isArray(s)?s:[s]).some(u=>a(o,u,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,i])=>{if(i==null)return!0;const o=n.find(u=>u.name===s);return o?(Array.isArray(i)?i:[i]).some(u=>a(o,u,t[s])):!1}):!1}async function Os(e,{address:t,blockHash:n,fromBlock:r,toBlock:a,event:s,events:i,args:o,str
2ict:l}={}){const u=l??!1,c=i??(s?[s]:void 0);let d=[];c&&(d=[c.flatMap(h=>Zn({abi:[h],eventName:h.name,args:i?void 0:o}))],s&&(d=d[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof r=="bigint"?te(r):r,toBlock:typeof a=="bigint"?te(a):a}]});const m=f.map(b=>gt(b));return c?Yn({abi:c,args:o,logs:m,strict:u}):m}async function Ul(e,t){const{abi:n,address:r,args:a,blockHash:s,eventName:i,fromBlock:o,toBlock:l,strict:u}=t,c=i?nl({abi:n,name:i}):void 0,d=c?void 0:n.filter(f=>f.type==="event");return G(e,Os,"getLogs")({address:r,args:a,blockHash:s,event:c,events:d,fromBlock:o,toBlock:l,strict:u})}class y0 extends pe{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"})}}async function m0(e,t){const{address:n,factory:r,factoryData:a}=t;try{const[s,i,o,l,u,c,d]=await G(e,we,"readContract")({abi:b0,address:n,functionName:"eip712Domain",factory:r,factoryData:a});return{domain:{name:i,version:o,chainId:Number(l),verifyingContract:u,salt:c},extensions:d,fields:s}}catch(s){const i=s;throw i.name==="ContractFunctionExecutionError"&&i.cause.name==="ContractFunctionZeroDataError"?new y0({address:n}):i}}const b0=[{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"}];function h0(e){var t;return{baseFeePerGas:e.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:(t=e.reward)==null?void 0:t.map(n=>n.map(r=>BigInt(r)))}}async function g0(e,{blockCount:t,blockNumber:n,blockTag:r="latest",rewardPercentiles:a}){const s=typeof n=="bigint"?te(n):void 0,i=await e.request({method:"eth_feeHistory",params:[te(t),s||r,a]},{dedupe:!!s});return h0(i)}async function Dr(e,{filter:t}){const n="strict"in t&&t.strict,r=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof r[0]=="string")return r;const a=r.map(s=>gt(s));return!("abi"in t)||!t.abi?a:Yn({abi:t.abi,logs:a,strict:n})}async function w0(e,{filter:t}){const n=t.strict??!1,a=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(s=>gt(s));return t.abi?Yn({abi:t.abi,logs:a,strict:n}):a}async function v0({address:e,authorization:t,signature:n}){return Ot(Ms(e),await ol({authorization:t,signature:n}))}const A0=`�Ethereum Signed Message:
3`;function x0(e){const t=typeof e=="string"?ki(e):typeof e.raw=="string"?e.raw:Pt(e.raw),n=ki(`${A0}${gr(t)}`);return tn([n,t])}function Wl(e,t){return Be(x0(e),t)}class T0 extends pe{constructor({domain:t}){super(`Invalid domain "${ht(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class C0 extends pe{constructor({primaryType:t,types:n}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(n))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class E0 extends pe{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function I0(e){const{domain:t,message:n,primaryType:r,types:a}=e,s=(l,u)=>{const c={...u};for(const d of l){const{name:f,type:m}=d;m==="address"&&(c[f]=c[f].toLowerCase())}return c},i=a.EIP712Domain?t?s(a.EIP712Domain,t):{}:{},o=(()=>{if(r!=="EIP712Domain")return s(a[r],n)})();return ht({domain:i,message:o,primaryType:r,types:a})}function Gl(e){const{domain:t,message:n,primaryType:r,types:a}=e,s=(i,o)=>{for(const l of i){const{name:u,type:c}=l,d=o[u],f=c.match(of);if(f&&(typeof d=="number"||typeof d=="bigint")){const[h,w,y]=f;te(d,{signed:w==="int",size:Number.parseInt(y,10)/8})}
3if(c==="address"&&typeof d=="string"&&!fe(d))throw new Kf({address:d});const m=c.match(lf);if(m){const[h,w]=m;if(w&&gr(d)!==Number.parseInt(w,10))throw new cf({expectedSize:Number.parseInt(w,10),givenSize:gr(d)})}const b=a[c];b&&(R0(c),s(b,d))}};if(a.EIP712Domain&&t){if(typeof t!="object")throw new T0({domain:t});s(a.EIP712Domain,t)}if(r!=="EIP712Domain")if(a[r])s(a[r],n);else throw new C0({primaryType:r,types:a})}function Hl({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function R0(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new E0({type:e})}function M0(e){const{domain:t={},message:n,primaryType:r}=e,a={EIP712Domain:Hl({domain:t}),...e.types};Gl({domain:t,message:n,primaryType:r,types:a});const s=["0x1901"];return t&&s.push(B0({domain:t,types:a})),r!=="EIP712Domain"&&s.push(_l({data:n,primaryType:r,types:a})),Be(tn(s))}function B0({domain:e,types:t}){return _l({data:e,primaryType:"EIP712Domain",types:t})}function _l({data:e,primaryType:t,types:n}){const r=ql({data:e,primaryType:t,types:n});return Be(r)}function ql({data:e,primaryType:t,types:n}){const r=[{type:"bytes32"}],a=[P0({primaryType:t,types:n})];for(const s of n[t]){const[i,o]=Yl({types:n,name:s.name,type:s.type,value:e[s.name]});r.push(i),a.push(o)}return Xe(r,a)}function P0({primaryType:e,types:t}){const n=_n(k0({primaryType:e,types:t}));return Be(n)}function k0({primaryType:e,types:t}){let n="";const r=Zl({primaryType:e,types:t});r.delete(e);const a=[e,...Array.from(r).sort()];for(const s of a)n+=`${s}(${t[s].map(({name:i,type:o})=>`${o} ${i}`).join(",")})`;return n}function Zl({primaryType:e,types:t},n=new Set){const r=e.match(/^\w*/u),a=r==null?void 0:r[0];if(n.has(a)||t[a]===void 0)return n;n.add(a);for(const s of t[a])Zl({primaryType:s.type,types:t},n);return n}function Yl({types:e,name:t,type:n,value:r}){if(e[n]!==void 0)return[{type:"bytes32"},Be(ql({data:r,primaryType:n,types:e}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},Be(r)];if(n==="string")return[{type:"bytes32"},Be(_n(r))];if(n.lastIndexOf("]")===n.length-1){const a=n.slice(0,n.lastIndexOf("[")),s=r.map(i=>Yl({name:t,type:a,types:e,value:i}));return[{type:"bytes32"},Be(Xe(s.map(([i])=>i),s.map(([,i])=>i)))]}return[{type:n},r]}const js="0x0000000000000000000000000000000000000000000000000000000000000000",N0="1.1.1";let Ie=class Na extends Error{constructor(t,n={}){var i;const r=n.cause instanceof Na?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,a=n.cause instanceof Na&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${N0}`].join(`
4`);super(s),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"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=a,this.metaMessages=n.metaMessages,this.shortMessage=t}};function at(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const Xl=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Kl=/^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)?$/,Jl=/^\(.+?\).*?$/,Di=/^tuple(?<array>(\[(\d*)\])*)$/;function Sa(e){let t=e.type;if(Di.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let a=0;a<n;a++){const s=e.components[a];t+=Sa(s),a<n-1&&(t+=", ")}const r=at(Di,e.type);return t+=`)${(r==null?void 0:r.array)??""}`,Sa({...e,type:t})}
4return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Gt(e){let t="";const n=e.length;for(let r=0;r<n;r++){const a=e[r];t+=Sa(a),r!==n-1&&(t+=", ")}return t}function $a(e){var t;return e.type==="function"?`function ${e.name}(${Gt(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Gt(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Gt(e.inputs)})`:e.type==="error"?`error ${e.name}(${Gt(e.inputs)})`:e.type==="constructor"?`constructor(${Gt(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const ec=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function S0(e){return ec.test(e)}function $0(e){return at(ec,e)}const tc=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function O0(e){return tc.test(e)}function j0(e){return at(tc,e)}const nc=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function F0(e){return nc.test(e)}function L0(e){return at(nc,e)}const rc=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function Fs(e){return rc.test(e)}function D0(e){return at(rc,e)}const ac=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function z0(e){return ac.test(e)}function Q0(e){return at(ac,e)}const sc=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function V0(e){return sc.test(e)}function U0(e){return at(sc,e)}const W0=/^receive\(\) external payable$/;function G0(e){return W0.test(e)}const zi=new Set(["memory","indexed","storage","calldata"]),H0=new Set(["indexed"]),Oa=new Set(["calldata","memory","storage"]);class _0 extends Ie{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}let q0=class extends Ie{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" 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"})}},Z0=class extends Ie{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}};class Y0 extends Ie{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}let X0=class extends Ie{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},K0=class extends Ie{constructor({param:t,name:n}
4){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" 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"})}},J0=class extends Ie{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},em=class extends Ie{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},tm=class extends Ie{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}},fn=class extends Ie{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},nm=class extends Ie{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},rm=class extends Ie{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}},am=class extends Ie{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"})}},sm=class extends Ie{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}};function im(e,t,n){let r="";if(n)for(const a of Object.entries(n)){if(!a)continue;let s="";for(const i of a[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${a[0]}{${s}})`}return t?`${t}:${e}${r}`:e}const aa=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Qi(e,t={}){if(F0(e))return om(e,t);if(O0(e))return lm(e,t);if(S0(e))return cm(e,t);if(z0(e))return um(e,t);if(V0(e))return dm(e);if(G0(e))return{type:"receive",stateMutability:"payable"};throw new nm({signature:e})}function om(e,t={}){const n=L0(e);if(!n)throw new fn({signature:e,type:"function"});const r=Me(n.parameters),a=[],s=r.length;for(let o=0;o<s;o++)a.push(et(r[o],{modifiers:Oa,structs:t,type:"function"}));const i=[];if(n.returns){const o=Me(n.returns),l=o.length;for(let u=0;u<l;u++)i.push(et(o[u],{modifiers:Oa,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:a,outputs:i}}function lm(e,t={}){const n=j0(e);if(!n)throw new fn({signature:e,type:"event"});const r=Me(n.parameters),a=[],s=r.length;for(let i=0;i<s;i++)a.push(et(r[i],{modifiers:H0,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:a}}function cm(e,t={}){const n=$0(e);if(!n)throw new fn({signature:e,type:"error"});const r=Me(n.parameters),a=[],s=r.length;for(let i=0;i<s;i++)a.push(et(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:a}}function um(e,t={}){const n=Q0(e);if(!n)throw new fn({signature:e,type:"constructor"});const r=Me(n.parameters),a=[],s=r.length;for(let i=0;i<s;i++)a.push(et(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:a}}function dm(e){const t=U0(e);if(!t)throw new fn({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const pm=/^(?<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$_]*))?$/,fm=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,ym=/^u?int$/;function et(e,t){var d,f;const n=im(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(aa.has(n))return aa.get(n);const r=Jl.test(e),a=at(r?fm:pm,e);if(!a)throw new X0({param:e});if(a.name&&bm(a.name))throw new K0({param:e,name:a.name});const s=a.name?{name:a.name}:{},i=a.modifier==="indexed"?{indexed:!0}:{},o=(t==null?void 0:t.structs)??{};let l,u={};
4if(r){l="tuple";const m=Me(a.type),b=[],h=m.length;for(let w=0;w<h;w++)b.push(et(m[w],{structs:o}));u={components:b}}else if(a.type in o)l="tuple",u={components:o[a.type]};else if(ym.test(a.type))l=`${a.type}256`;else if(a.type==="address payable")l="address";else if(l=a.type,(t==null?void 0:t.type)!=="struct"&&!ic(l))throw new Z0({type:l});if(a.modifier){if(!((f=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&f.call(d,a.modifier)))throw new J0({param:e,type:t==null?void 0:t.type,modifier:a.modifier});if(Oa.has(a.modifier)&&!hm(l,!!a.array))throw new em({param:e,type:t==null?void 0:t.type,modifier:a.modifier})}const c={type:`${l}${a.array??""}`,...s,...i,...u};return aa.set(n,c),c}function Me(e,t=[],n="",r=0){const a=e.trim().length;for(let s=0;s<a;s++){const i=e[s],o=e.slice(s+1);switch(i){case",":return r===0?Me(o,[...t,n.trim()]):Me(o,t,`${n}${i}`,r);case"(":return Me(o,t,`${n}${i}`,r+1);case")":return Me(o,t,`${n}${i}`,r-1);default:return Me(o,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new sm({current:n,depth:r});return t.push(n.trim()),t}function ic(e){return e==="address"||e==="bool"||e==="function"||e==="string"||Xl.test(e)||Kl.test(e)}const mm=/^(?: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 bm(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||Xl.test(e)||Kl.test(e)||mm.test(e)}function hm(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function oc(e){const t={},n=e.length;for(let i=0;i<n;i++){const o=e[i];if(!Fs(o))continue;const l=D0(o);if(!l)throw new fn({signature:o,type:"struct"});const u=l.properties.split(";"),c=[],d=u.length;for(let f=0;f<d;f++){const b=u[f].trim();if(!b)continue;const h=et(b,{type:"struct"});c.push(h)}if(!c.length)throw new rm({signature:o});t[l.name]=c}const r={},a=Object.entries(t),s=a.length;for(let i=0;i<s;i++){const[o,l]=a[i];r[o]=lc(l,t)}return r}const gm=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function lc(e,t,n=new Set){const r=[],a=e.length;for(let s=0;s<a;s++){const i=e[s];if(Jl.test(i.type))r.push(i);else{const l=at(gm,i.type);if(!(l!=null&&l.type))throw new tm({abiParameter:i});const{array:u,type:c}=l;if(c in t){if(n.has(c))throw new am({type:c});r.push({...i,type:`tuple${u??""}`,components:lc(t[c]??[],t,new Set([...n,c]))})}else if(ic(c))r.push(i);else throw new q0({type:c})}}return r}function Vi(e){let t;if(typeof e=="string")t=Qi(e);else{const n=oc(e),r=e.length;for(let a=0;a<r;a++){const s=e[a];if(!Fs(s)){t=Qi(s,n);break}}}if(!t)throw new _0({signature:e});return t}function Ui(e){const t=[];if(typeof e=="string"){const n=Me(e),r=n.length;for(let a=0;a<r;a++)t.push(et(n[a],{modifiers:zi}))}else{const n=oc(e),r=e.length;for(let a=0;a<r;a++){const s=e[a];if(Fs(s))continue;const i=Me(s),o=i.length;for(let l=0;l<o;l++)t.push(et(i[l],{modifiers:zi,structs:n}
4))}}if(t.length===0)throw new Y0({params:e});return t}let wm=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}};const vm={checksum:new wm(8192)},sa=vm.checksum;function cc(e,t={}){const{as:n=typeof e=="string"?"Hex":"Bytes"}=t,r=Jf(Sy(e));return n==="Bytes"?r:wt(r)}const Am=/^0x[a-fA-F0-9]{40}$/;function zr(e,t={}){const{strict:n=!0}=t;if(!Am.test(e))throw new Wi({address:e,cause:new xm});if(n){if(e.toLowerCase()===e)return;if(uc(e)!==e)throw new Wi({address:e,cause:new Tm})}}function uc(e){if(sa.has(e))return sa.get(e);zr(e,{strict:!1});const t=e.substring(2).toLowerCase(),n=cc(Oy(t),{as:"Bytes"}),r=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&r[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&r[s+1]&&(r[s+1]=r[s+1].toUpperCase());const a=`0x${r.join("")}`;return sa.set(e,a),a}function ja(e,t={}){const{strict:n=!0}=t??{};try{return zr(e,{strict:n}),!0}catch{return!1}}let Wi=class extends K{constructor({address:t,cause:n}){super(`Address "${t}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}};class xm extends K{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"})}}class Tm extends K{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Cm=/^(.*)\[([0-9]*)\]$/,Em=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,dc=/^(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)?$/,Gi=2n**256n-1n;function Kt(e,t,n){const{checksumAddress:r,staticPosition:a}=n,s=zs(t.type);if(s){const[i,o]=s;return Rm(e,{...t,type:o},{checksumAddress:r,length:i,staticPosition:a})}if(t.type==="tuple")return km(e,t,{checksumAddress:r,staticPosition:a});if(t.type==="address")return Im(e,{checksum:r});if(t.type==="bool")return Mm(e);if(t.type.startsWith("bytes"))return Bm(e,t,{staticPosition:a});if(t.type.startsWith("uint")||t.type.startsWith("int"))return Pm(e,t);if(t.type==="string")return Nm(e,{staticPosition:a});throw new Vs(t.type)}const Hi=32,Fa=32;function Im(e,t={}){const{checksum:n=!1}=t,r=e.readBytes(32);return[(s=>n?uc(s):s)(wt(Fy(r,-20))),32]}function Rm(e,t,n){const{checksumAddress:r,length:a,staticPosition:s}=n;if(!a){const l=Ke(e.readBytes(Fa)),u=s+l,c=u+Hi;e.setPosition(u);const d=Ke(e.readBytes(Hi)),f=Nn(t);let m=0;const b=[];for(let h=0;h<d;++h){e.setPosition(c+(f?h*32:m));const[w,y]=Kt(e,t,{checksumAddress:r,staticPosition:c});m+=y,b.push(w)}return e.setPosition(s+32),[b,32]}if(Nn(t)){const l=Ke(e.readBytes(Fa)),u=s+l,c=[];for(let d=0;d<a;++d){e.setPosition(u+d*32);const[f]=Kt(e,t,{checksumAddress:r,staticPosition:u});c.push(f)}return e.setPosition(s+32),[c,32]}let i=0;const o=[];for(let l=0;l<a;++l){const[u,c]=Kt(e,t,{checksumAddress:r,staticPosition:s+i});i+=c,o.push(u)}return[o,i]}function Mm(e){return[Dy(e.readBytes(32),{size:32}),32]}function Bm(e,t,{staticPosition:n}){const[r,a]=t.type.split("bytes");if(!a){const i=Ke(e.readBytes(32));e.setPosition(n+i);const o=Ke(e.readBytes(32));if(o===0)return e.setPosition(n+32),["0x",32];const l=e.readBytes(o);return e.setPosition(n+32),[wt(l),32]}return[wt(e.readBytes(Number.parseInt(a,10),32)),32]}function Pm(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),a=e.readBytes(32);return[r>48?Ly(a,{signed:n}):Ke(a,{signed:n}),32]}function km(e,t,n){const{checksumAddress:r,staticPosition:a}=n,s=t.components.length===0||t.components.some(({name:l})=>!l),i=s?[]:{};let o=0;if(Nn(t)){const l=Ke(e.readBytes(Fa)),u=a+l;for(let c=0;c<t.components.length;++c){const d=t.components[c];e.setPosition(u+o);const[f,m]=Kt(e,d,{checksumAddress:r,staticPosition:u});o+=m,i[s?c:d==null?void 0:d.name]=f}return e.setPosition(a+32),[i,32]}for(let l=0;l<t.components.length;++l){const u=t.components[l],[c,d]=Kt(e,u,{checksumAddress:r,staticPosition:a});i[s?l:u==null?void 0:u.name]=c,o+=d}return[i,o]}function Nm(e,{staticPosition:t}){const n=Ke(e.readBytes(32)),r=t+n;e.setPosition(r);const a=Ke(e.readBytes(32));if(a===0)return e.setPosition(t+32),["",32];const s=e.readBytes(a,32),i=zy(Ol(s));return e.setPosition(t+32),[i,32]}function Sm({checksumAddress:e,parameters:t,values:n}){const r=[];for(let a=0;a<t.length;a++)r.push(Ls({checksumAddress:e,parameter:t[a],value:n[a]}));return r}function Ls({checksumAddress:e=!1,parameter:t,value:n}){const r=t,a=zs(r.type);if(a){const[s,i]=a;return Om(n,{checksumAddress:e,length:s,parameter:{...r,type:i}})}if(r.type==="tuple")return zm(n,{checksumAddress:e,parameter:r});if(r.type==="address")return $m(n,{checksum:e});if(r.type==="bool")return Fm(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const s=r.type.startsWith("int"),[,,i="256"]=dc.exec(r.type)??[];return Lm(n,{signed:s,size:Number(i)})}if(r.type.startsWith("bytes"))return jm(n,{type:r.type});if(r.type==="string")return Dm(n);throw new Vs(r.type)}function Ds(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:o}=e[s];i?t+=32:t+=Bt(o)}const n=[],r=[];let a=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:o}=e[s];i?(n.push(un(t+a,{size:32})),r.push(o),a+=Bt(o)):n.push(o)}return $e(...n,...r)}function $m(e,t){const{checksum:n=!1}=t;return zr(e,{strict:n}),{dynamic:!1,encoded:Pn(e.toLowerCase())}}
4function Om(e,t){const{checksumAddress:n,length:r,parameter:a}=t,s=r===null;if(!Array.isArray(e))throw new Zm(e);if(!s&&e.length!==r)throw new qm({expectedLength:r,givenLength:e.length,type:`${a.type}[${r}]`});let i=!1;const o=[];for(let l=0;l<e.length;l++){const u=Ls({checksumAddress:n,parameter:a,value:e[l]});u.dynamic&&(i=!0),o.push(u)}if(s||i){const l=Ds(o);if(s){const u=un(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?$e(u,l):u}}if(i)return{dynamic:!0,encoded:l}}return{dynamic:!1,encoded:$e(...o.map(({encoded:l})=>l))}}function jm(e,{type:t}){const[,n]=t.split("bytes"),r=Bt(e);if(!n){let a=e;return r%32!==0&&(a=nn(a,Math.ceil((e.length-2)/2/32)*32)),{dynamic:!0,encoded:$e(Pn(un(r,{size:32})),a)}}if(r!==Number.parseInt(n,10))throw new fc({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:nn(e)}}function Fm(e){if(typeof e!="boolean")throw new K(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:Pn(ll(e))}}function Lm(e,{signed:t,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,a=t?-r-1n:0n;if(e>r||e<a)throw new uf({max:r.toString(),min:a.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:un(e,{size:32,signed:t})}}function Dm(e){const t=xs(e),n=Math.ceil(Bt(t)/32),r=[];for(let a=0;a<n;a++)r.push(nn(Qe(t,a*32,(a+1)*32)));return{dynamic:!0,encoded:$e(nn(un(Bt(t),{size:32})),...r)}}function zm(e,t){const{checksumAddress:n,parameter:r}=t;let a=!1;const s=[];for(let i=0;i<r.components.length;i++){const o=r.components[i],l=Array.isArray(e)?i:o.name,u=Ls({checksumAddress:n,parameter:o,value:e[l]});s.push(u),u.dynamic&&(a=!0)}return{dynamic:a,encoded:a?Ds(s):$e(...s.map(({encoded:i})=>i))}}function zs(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function Nn(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Nn);const n=zs(e.type);return!!(n&&Nn({...e,type:n[1]}))}const Qm={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 Wm({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Um({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new _i({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new _i({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function Vm(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Qm);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}let _i=class extends K{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}},Um=class extends K{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}},Wm=class extends K{constructor({count:t,limit:n}
4){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}};function Gm(e,t,n={}){const{as:r="Array",checksumAddress:a=!1}=n,s=typeof t=="string"?$l(t):t,i=Vm(s);if(_t(s)===0&&e.length>0)throw new _m;if(_t(s)&&_t(s)<32)throw new Hm({data:typeof t=="string"?t:wt(t),parameters:e,size:_t(s)});let o=0;const l=r==="Array"?[]:{};for(let u=0;u<e.length;++u){const c=e[u];i.setPosition(o);const[d,f]=Kt(i,c,{checksumAddress:a,staticPosition:0});o+=f,r==="Array"?l.push(d):l[c.name??u]=d}return l}function Qs(e,t,n){const{checksumAddress:r=!1}={};if(e.length!==t.length)throw new yc({expectedLength:e.length,givenLength:t.length});const a=Sm({checksumAddress:r,parameters:e,values:t}),s=Ds(a);return s.length===0?"0x":s}function La(e,t){if(e.length!==t.length)throw new yc({expectedLength:e.length,givenLength:t.length});const n=[];for(let r=0;r<e.length;r++){const a=e[r],s=t[r];n.push(La.encode(a,s))}return $e(...n)}(function(e){function t(n,r,a=!1){if(n==="address"){const l=r;return zr(l),Pn(l.toLowerCase(),a?32:0)}if(n==="string")return xs(r);if(n==="bytes")return r;if(n==="bool")return Pn(ll(r),a?32:1);const s=n.match(dc);if(s){const[l,u,c="256"]=s,d=Number.parseInt(c,10)/8;return un(r,{size:a?32:d,signed:u==="int"})}const i=n.match(Em);if(i){const[l,u]=i;if(Number.parseInt(u,10)!==(r.length-2)/2)throw new fc({expectedSize:Number.parseInt(u,10),value:r});return nn(r,a?32:0)}const o=n.match(Cm);if(o&&Array.isArray(r)){const[l,u]=o,c=[];for(let d=0;d<r.length;d++)c.push(t(u,r[d],!0));return c.length===0?"0x":$e(...c)}throw new Vs(n)}e.encode=t})(La||(La={}));function pc(e){return Array.isArray(e)&&typeof e[0]=="string"||typeof e=="string"?Ui(e):e}class Hm extends K{constructor({data:t,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${Gt(n)})`,`Data:   ${t} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class _m extends K{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class qm extends K{constructor({expectedLength:t,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${t}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class fc extends K{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${Bt(n)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class yc extends K{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${n}`].join(`
5`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}let Zm=class extends K{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}};class Vs extends K{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function mc(e,t={}){const{recovered:n}=t;if(typeof e.r>"u")throw new ia({signature:e});if(typeof e.s>"u")throw new ia({signature:e});if(n&&typeof e.yParity>"u")throw new ia({signature:e});if(e.r<0n||e.r>Gi)throw new n1({value:e.r});if(e.s<0n||e.s>Gi)throw new r1({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ws({value:e.yParity})}function Ym(e){return bc(wt(e))}function bc(e){if(e.length!==130&&e.length!==132)throw new t1({signature:e});const t=BigInt(Qe(e,0,32)),n=BigInt(Qe(e,32,64)),r=(()=>{const a=+`0x${e.slice(130)}`;if(!Number.isNaN(a))try{return Us(a)}catch{throw new Ws({value:a})}})();return typeof r>"u"?{r:t,s:n}:{r:t,s:n,yParity:r}}function Xm(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return Km(e)}function Km(e){const t=typeof e=="string"?bc(e):e instanceof Uint8Array?Ym(e):typeof e.r=="string"?e1(e):e.v?Jm(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return mc(t),t}function Jm(e){return{r:e.r,s:e.s,yParity:Us(e.v)}}function e1(e){const t=(()=>{const n=e.v?Number(e.v):void 0;let r=e.yParity?Number(e.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=Us(n)),typeof r!="number")throw new Ws({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function Us(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new a1({value:e})}class t1 extends K{constructor({signature:t}){super(`Value \`${t}
5\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Bt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class ia extends K{constructor({signature:t}){super(`Signature \`${df(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class n1 extends K{constructor({value:t}){super(`Value \`${t}\` 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"})}}class r1 extends K{constructor({value:t}){super(`Value \`${t}\` 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"})}}class Ws extends K{constructor({value:t}){super(`Value \`${t}\` 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"})}}class a1 extends K{constructor({value:t}){super(`Value \`${t}\` 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"})}}function s1(e,t={}){return typeof e.chainId=="string"?i1(e):{...e,...t.signature}}function i1(e){const{address:t,chainId:n,nonce:r}=e,a=Xm(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...a}}const o1="0x8010801080108010801080108010801080108010801080108010801080108010",l1=pc("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function hc(e){if(typeof e=="string"){if(Qe(e,-32)!==o1)throw new d1(e)}else mc(e.authorization)}function c1(e){hc(e);const t=Jo(Qe(e,-64,-32)),n=Qe(e,-t-64,-64),r=Qe(e,0,-t-64),[a,s,i]=Gm(l1,n);return{authorization:s1({address:a.delegation,chainId:Number(a.chainId),nonce:a.nonce,yParity:a.yParity,r:a.r,s:a.s}),signature:r,...i&&i!=="0x"?{data:i,to:s}:{}}}function u1(e){try{return hc(e),!0}catch{return!1}}let d1=class extends K{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}};function p1(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function f1(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?hr(e.nonce):void 0,storageProof:e.storageProof?p1(e.storageProof):void 0}}async function y1(e,{address:t,blockNumber:n,blockTag:r,storageKeys:a}){const s=r??"latest",i=n!==void 0?te(n):void 0,o=await e.request({method:"eth_getProof",params:[t,a,i||s]});return f1(o)}async function m1(e,{address:t,blockNumber:n,blockTag:r="latest",slot:a}){const s=n!==void 0?te(n):void 0;return await e.request({method:"eth_getStorageAt",params:[t,a,s||r]})}async function b1(e,{hash:t,transactionReceipt:n}){const[r,a]=await Promise.all([G(e,$r,"getBlockNumber")({}),t?G(e,cl,"getTransaction")({hash:t}):void 0]),s=(n==null?void 0:n.blockNumber)||(a==null?void 0:a.blockNumber);return s?r-s+1n:0n}async function Da(e,t){const{blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",blocks:a,returnFullTransactions:s,traceTransfers:i,validation:o}=t;try{const l=[];for(const f of a){const m=f.blockOverrides?ff(f.blockOverrides):void 0,b=f.calls.map(w=>{const y=w,A=y.account?Pe(y.account):void 0,v=y.abi?ue(y):y.data,g={...y,account:A,data:y.dataSuffix?tn([v||"0x",y.dataSuffix]):v,from:y.from??(A==null?void 0:A.address)};return kr(g),Nr(g)}),h=f.stateOverrides?yf(f.stateOverrides):void 0;l.push({blockOverrides:m,calls:b,stateOverrides:h})}const c=(typeof n=="bigint"?te(n):void 0)||r;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:l,returnFullTransactions:s,traceTransfers:i,validation:o},c]})).map((f,m)=>({...Vp(f),calls:f.calls.map((b,h)=>{var O,N;const{abi:w,args:y,functionName:A,to:v}=a[m].calls[h],g=((O=b.error)==null?void 0:O.data)??b.returnData,x=BigInt(b.gasUsed),C=(N=b.logs)==null?void 0:N.map(Q=>gt(Q)),I=b.status==="0x1"?"success":"failure",M=w&&I==="success"&&g!=="0x"?vs({abi:w,data:g,functionName:A}):null,R=(()=>{var D;if(I==="success")return;let Q;if(((D=b.error)==null?void 0:D.data)==="0x"?Q=new mf:b.error&&(Q=new bf(b.error)),!!Q)return al(Q,{abi:w??[],address:v??"0x",args:y,functionName:A??"<unknown>"})})();return{data:g,gasUsed:x,logs:C,status:I,...I==="success"?{result:M}:{error:R}}})}))}catch(l){const u=l,c=hf(u,{});throw c instanceof Up?u:c}}function za(e){let t=!0,n="",r=0,a="",s=!1;for(let i=0;i<e.length;i++){const o=e[i];if(["(",")",","].includes(o)&&(t=!0),o==="("&&r++,o===")"&&r--,!!t){if(r===0){if(o===" "&&["event","function","error",""].includes(a))a="";else if(a+=o,o===")"){s=!0;break}continue}if(o===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}a+=o,n+=o}}if(!s)throw new K("Unable to normalize signature.");return a}function Qa(e,t){const n=typeof e,r=t.type;switch(r){case"address":return ja(e,{strict:!1});case"bool":return n==="boolean";
5case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((a,s)=>Qa(Object.values(e)[s],a)):/^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(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(a=>Qa(a,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function gc(e,t,n){for(const r in e){const a=e[r],s=t[r];if(a.type==="tuple"&&s.type==="tuple"&&"components"in a&&"components"in s)return gc(a.components,s.components,n[r]);const i=[a.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?ja(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?ja(n[r],{strict:!1}):!1)return i}}function wc(e,t={}){const{prepare:n=!0}=t,r=Array.isArray(e)||typeof e=="string"?Vi(e):e;return{...r,...n?{hash:qt(r)}:{}}}function Qr(e,t,n){const{args:r=[],prepare:a=!0}=n??{},s=gf(t,{strict:!1}),i=e.filter(u=>s?u.type==="function"||u.type==="error"?vc(u)===Qe(t,0,4):u.type==="event"?qt(u)===t:!1:"name"in u&&u.name===t);if(i.length===0)throw new wr({name:t});if(i.length===1)return{...i[0],...a?{hash:qt(i[0])}:{}};let o;for(const u of i){if(!("inputs"in u))continue;if(!r||r.length===0){if(!u.inputs||u.inputs.length===0)return{...u,...a?{hash:qt(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==r.length)continue;if(r.every((d,f)=>{const m="inputs"in u&&u.inputs[f];return m?Qa(d,m):!1})){if(o&&"inputs"in o&&o.inputs){const d=gc(u.inputs,o.inputs,r);if(d)throw new g1({abiItem:u,type:d[0]},{abiItem:o,type:d[1]})}o=u}}const l=(()=>{if(o)return o;const[u,...c]=i;return{...u,overloads:c}})();if(!l)throw new wr({name:t});return{...l,...a?{hash:qt(l)}:{}}}function vc(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Qr(n,r)}return e[0]})();return Qe(qt(t),0,4)}function h1(...e){const t=(()=>{if(Array.isArray(e[0])){const[r,a]=e;return Qr(r,a)}return e[0]})(),n=typeof t=="string"?t:$a(t);return za(n)}function qt(...e){const t=(()=>{if(Array.isArray(e[0])){const[n,r]=e;return Qr(n,r)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:cc(xs(h1(t)))}class g1 extends K{constructor(t,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${za($a(t.abiItem))}\`, and`,`\`${n.type}\` in \`${za($a(n.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"})}}class wr extends K{constructor({name:t,data:n,type:r="item"}){const a=t?` with name "${t}"`:n?` with data "${n}"`:"";super(`ABI ${r}${a} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function w1(...e){var s;const[t,n]=(()=>{if(Array.isArray(e[0])){const[i,o]=e;return[A1(i),o]}return e})(),{bytecode:r,args:a}=n;return $e(r,(s=t.inputs)!=null&&s.length&&(a!=null&&a.length)?Qs(t.inputs,a):"0x")}function v1(e){return wc(e)}function A1(e){const t=e.find(n=>n.type==="constructor");if(!t)throw new wr({name:"constructor"});return t}function x1(...e){const[t,n=[]]=(()=>{if(Array.isArray(e[0])){const[u,c,d]=e;return[qi(u,c,{args:d}),d]}const[o,l]=e;return[o,l]})(),{overloads:r}=t,a=r?qi([t,...r],t.name,{args:n}):t,s=T1(a),i=n.length>0?Qs(a.inputs,n):void 0;return i?$e(s,i):s}function Qt(e,t={}){return wc(e,t)}function qi(e,t,n){const r=Qr(e,t,n);if(r.type!=="function")throw new wr({name:t,type:"function"});return r}function T1(e){return vc(e)}const C1="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",he="0x0000000000000000000000000000000000000000",E1="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function I1(e,t){const{blockNumber:n,blockTag:r,calls:a,stateOverrides:s,traceAssetChanges:i,traceTransfers:o,validation:l}=t,u=t.account?Pe(t.account):void 0;if(i&&!u)throw new pe("`account` is required when `traceAssetChanges` is true");const c=u?w1(v1("constructor(bytes, bytes)"),{bytecode:wf,args:[E1,x1(Qt("function getBalance(address)"),[u.address])]}):void 0,d=i?await Promise.all(t.calls.map(async E=>{if(!E.data&&!E.abi)return;const{accessList:j}=await Dl(e,{account:u.address,...E,data:E.abi?ue(E):E.data});return j.map(({address:F,storageKeys:V})=>V.length>0?F:null)})).then(E=>
5E.flat().filter(Boolean)):[],f=await Da(e,{blockNumber:n,blockTag:r,blocks:[...i?[{calls:[{data:c}],stateOverrides:s},{calls:d.map((E,j)=>({abi:[Qt("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:E,from:he,nonce:j})),stateOverrides:[{address:he,nonce:0}]}]:[],{calls:[...a,{}].map(E=>({...E,from:u==null?void 0:u.address})),stateOverrides:s},...i?[{calls:[{data:c}]},{calls:d.map((E,j)=>({abi:[Qt("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:E,from:he,nonce:j})),stateOverrides:[{address:he,nonce:0}]},{calls:d.map((E,j)=>({to:E,abi:[Qt("function decimals() returns (uint256)")],functionName:"decimals",from:he,nonce:j})),stateOverrides:[{address:he,nonce:0}]},{calls:d.map((E,j)=>({to:E,abi:[Qt("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:he,nonce:j})),stateOverrides:[{address:he,nonce:0}]},{calls:d.map((E,j)=>({to:E,abi:[Qt("function symbol() returns (string)")],functionName:"symbol",from:he,nonce:j})),stateOverrides:[{address:he,nonce:0}]}]:[]],traceTransfers:o,validation:l}),m=i?f[2]:f[0],[b,h,,w,y,A,v,g]=i?f:[],{calls:x,...C}=m,I=x.slice(0,-1)??[],M=(b==null?void 0:b.calls)??[],R=(h==null?void 0:h.calls)??[],O=[...M,...R].map(E=>E.status==="success"?kt(E.data):null),N=(w==null?void 0:w.calls)??[],Q=(y==null?void 0:y.calls)??[],D=[...N,...Q].map(E=>E.status==="success"?kt(E.data):null),S=((A==null?void 0:A.calls)??[]).map(E=>E.status==="success"?E.result:null),P=((g==null?void 0:g.calls)??[]).map(E=>E.status==="success"?E.result:null),B=((v==null?void 0:v.calls)??[]).map(E=>E.status==="success"?E.result:null),$=[];for(const[E,j]of D.entries()){const F=O[E];if(typeof j!="bigint"||typeof F!="bigint")continue;const V=S[E-1],W=P[E-1],_=B[E-1],Y=E===0?{address:C1,decimals:18,symbol:"ETH"}:{address:d[E-1],decimals:_||V?Number(V??1):void 0,symbol:W??void 0};$.some(ie=>ie.token.address===Y.address)||$.push({token:Y,value:{pre:F,post:j,diff:j-F}})}return{assetChanges:$,block:C,results:I}}async function Vr(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}const Ac="0x6492649264926492649264926492649264926492649264926492649264926492";function R1(e){if(Qe(e,-32)!==Ac)throw new P1(e)}function M1(e){const{data:t,signature:n,to:r}=e;return $e(Qs(pc("address, bytes, bytes"),[r,t,n]),Ac)}function B1(e){try{return R1(e),!0}catch{return!1}}class P1 extends K{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function k1({r:e,s:t,to:n="hex",v:r,yParity:a}){const s=(()=>{if(a===0||a===1)return a;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),i=`0x${new oy.Signature(kt(e),kt(t)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?i:ey(i)}async function Ur(e,t){var o,l,u,c,d,f;const{address:n,hash:r,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??((u=(l=(o=e.chain)==null?void 0:o.contracts)==null?void 0:l.erc6492Verifier)==null?void 0:u.address),multicallAddress:s=t.multicallAddress??((f=(d=(c=e.chain)==null?void 0:c.contracts)==null?void 0:d.multicall3)==null?void 0:f.address)}=t,i=(()=>{const m=t.signature;return xl(m)?m:typeof m=="object"&&"r"in m&&"s"in m?k1(m):Pt(m)})();try{return u1(i)?await N1(e,{...t,multicallAddress:s,signature:i}):await S1(e,{...t,verifierAddress:a,signature:i})}catch(m){try{if(Ot(Ms(n),await vf({hash:r,signature:i})))return!0}catch{}if(m instanceof Nt)return!1;throw m}}async function N1(e,t){var w;const{address:n,blockNumber:r,blockTag:a,hash:s,multicallAddress:i}=t,{authorization:o,data:l,signature:u,to:c}=c1(t.signature);if(await ka(e,{address:n,blockNumber:r,blockTag:a})===Wp(["0xef0100",o.address]))return await $1(e,{address:n,blockNumber:r,blockTag:a,hash:s,signature:u});const f={address:o.address,chainId:Number(o.chainId),nonce:Number(o.nonce),r:te(o.r,{size:32}),s:te(o.s,{size:32}),yParity:o.yParity};if(!await v0({address:n,authorization:f}))throw new Nt;const b=await G(e,we,"readContract")({...i?{address:i}:{code:xf},authorizationList:[f],abi:Af,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...l?[{allowFailure:!0,target:c??n,callData:l}
5]:[],{allowFailure:!0,target:n,callData:ue({abi:ul,functionName:"isValidSignature",args:[s,u]})}]]}),h=(w=b[b.length-1])==null?void 0:w.returnData;if(h!=null&&h.startsWith("0x1626ba7e"))return!0;throw new Nt}async function S1(e,t){const{address:n,factory:r,factoryData:a,hash:s,signature:i,verifierAddress:o,...l}=t,u=await(async()=>!r&&!a||B1(i)?i:M1({data:a,signature:i,to:r}))(),c=o?{to:o,data:ue({abi:Mi,functionName:"isValidSig",args:[n,s,u]}),...l}:{data:dl({abi:Mi,args:[n,s,u],bytecode:Tf}),...l},{data:d}=await G(e,pl,"call")(c).catch(f=>{throw f instanceof Cf?new Nt:f});if(ty(d??"0x0"))return!0;throw new Nt}async function $1(e,t){const{address:n,blockNumber:r,blockTag:a,hash:s,signature:i}=t;if((await G(e,we,"readContract")({address:n,abi:ul,args:[s,i],blockNumber:r,blockTag:a,functionName:"isValidSignature"}).catch(l=>{throw l instanceof Ef?new Nt:l})).startsWith("0x1626ba7e"))return!0;throw new Nt}class Nt extends Error{}async function O1(e,{address:t,message:n,factory:r,factoryData:a,signature:s,...i}){const o=Wl(n);return Ur(e,{address:t,factory:r,factoryData:a,hash:o,signature:s,...i})}async function j1(e,t){const{address:n,factory:r,factoryData:a,signature:s,message:i,primaryType:o,types:l,domain:u,...c}=t,d=M0({message:i,primaryType:o,types:l,domain:u});return Ur(e,{address:n,factory:r,factoryData:a,hash:d,signature:s,...c})}function F1(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:a,onError:s,includeTransactions:i,poll:o,pollingInterval:l=e.pollingInterval}){const u=typeof o<"u"?o:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].c
5onfig.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c=i??!1;let d;return u?(()=>{const b=ht(["watchBlocks",e.uid,t,n,r,c,l]);return rn(b,{onBlock:a,onError:s},h=>Wn(async()=>{var w;try{const y=await G(e,Rn,"getBlock")({blockTag:t,includeTransactions:c});if(y.number!==null&&(d==null?void 0:d.number)!=null){if(y.number===d.number)return;if(y.number-d.number>1&&n)for(let A=(d==null?void 0:d.number)+1n;A<y.number;A++){const v=await G(e,Rn,"getBlock")({blockNumber:A,includeTransactions:c});h.onBlock(v,d),d=v}}((d==null?void 0:d.number)==null||t==="pending"&&(y==null?void 0:y.number)==null||y.number!==null&&y.number>d.number)&&(h.onBlock(y,d),d=y)}catch(y){(w=h.onError)==null||w.call(h,y)}},{emitOnBegin:r,interval:l}))})():(()=>{let b=!0,h=!0,w=()=>b=!1;return(async()=>{try{r&&G(e,Rn,"getBlock")({blockTag:t,includeTransactions:c}).then(v=>{b&&h&&(a(v,void 0),h=!1)}).catch(s);const y=(()=>{if(e.transport.type==="fallback"){const v=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return v?v.value:e.transport}return e.transport})(),{unsubscribe:A}=await y.subscribe({params:["newHeads"],async onData(v){var x;if(!b)return;const g=await G(e,Rn,"getBlock")({blockNumber:(x=v.result)==null?void 0:x.number,includeTransactions:c}).catch(()=>{});b&&(a(g,d),h=!1,d=g)},onError(v){s==null||s(v)}});w=A,b||w()}catch(y){s==null||s(y)}})(),()=>w()})()}function L1(e,t){const{abi:n,address:r,args:a,batch:s=!0,eventName:i,fromBlock:o,onError:l,onLogs:u,poll:c,pollingInterval:d=e.pollingInterval,strict:f}=t;return(typeof c<"u"?c:typeof o=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].c
5onfig.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{const w=f??!1,y=ht(["watchContractEvent",r,a,s,e.uid,i,d,w,o]);return rn(y,{onLogs:u,onError:l},A=>{let v;o!==void 0&&(v=o-1n);let g,x=!1;const C=Wn(async()=>{var I;if(!x){try{g=await G(e,zl,"createContractEventFilter")({abi:n,address:r,args:a,eventName:i,strict:w,fromBlock:o})}catch{}x=!0;return}try{let M;if(g)M=await G(e,Dr,"getFilterChanges")({filter:g});else{const R=await G(e,$r,"getBlockNumber")({});v&&v<R?M=await G(e,Ul,"getContractEvents")({abi:n,address:r,args:a,eventName:i,fromBlock:v+1n,toBlock:R,strict:w}):M=[],v=R}if(M.length===0)return;if(s)A.onLogs(M);else for(const R of M)A.onLogs([R])}catch(M){g&&M instanceof Go&&(x=!1),(I=A.onError)==null||I.call(A,M)}},{emitOnBegin:!0,interval:d});return async()=>{g&&await G(e,Vr,"uninstallFilter")({filter:g}),C()}})})():(()=>{const w=f??!1,y=ht(["watchContractEvent",r,a,s,e.uid,i,d,w]);let A=!0,v=()=>A=!1;return rn(y,{onLogs:u,onError:l},g=>((async()=>{try{const x=(()=>{if(e.transport.type==="fallback"){const M=e.transport.transports.find(R=>R.config.type==="webSocket"||R.config.type==="ipc");return M?M.value:e.transport}return e.transport})(),C=i?Zn({abi:n,eventName:i,args:a}):[],{unsubscribe:I}=await x.subscribe({params:["logs",{address:r,topics:C}],onData(M){var O;if(!A)return;const R=M.result;try{const{eventName:N,args:Q}=$s({abi:n,data:R.data,topics:R.topics,strict:f}),D=gt(R,{args:Q,eventName:N});g.onLogs([D])}catch(N){let Q,D;if(N instanceof Bn||N instanceof Sr){if(f)return;Q=N.abiItem.name,D=(O=N.abiItem.inputs)==null?void 0:O.some(P=>!("name"in P&&P.name))}const S=gt(R,{args:D?[]:{},eventName:Q});g.onLogs([S])}},onError(M){var R;(R=g.onError)==null||R.call(g,M)}});v=I,A||v()}catch(x){l==null||l(x)}})(),()=>v()))})()}function D1(e,{address:t,args:n,batch:r=!0,event:a,events:s,fromBlock:i,onError:o,onLogs:l,poll:u,pollingInterval:c=e.pollingInterval,strict:d}){const f=typeof u<"u"?u:typeof i=="bigint"?!0:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].c
5onfig.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),m=d??!1;return f?(()=>{const w=ht(["watchEvent",t,n,r,e.uid,a,c,i]);return rn(w,{onLogs:l,onError:o},y=>{let A;i!==void 0&&(A=i-1n);let v,g=!1;const x=Wn(async()=>{var C;if(!g){try{v=await G(e,Ql,"createEventFilter")({address:t,args:n,event:a,events:s,strict:m,fromBlock:i})}catch{}g=!0;return}try{let I;if(v)I=await G(e,Dr,"getFilterChanges")({filter:v});else{const M=await G(e,$r,"getBlockNumber")({});A&&A!==M?I=await G(e,Os,"getLogs")({address:t,args:n,event:a,events:s,fromBlock:A+1n,toBlock:M}):I=[],A=M}if(I.length===0)return;if(r)y.onLogs(I);else for(const M of I)y.onLogs([M])}catch(I){v&&I instanceof Go&&(g=!1),(C=y.onError)==null||C.call(y,I)}},{emitOnBegin:!0,interval:c});return async()=>{v&&await G(e,Vr,"uninstallFilter")({filter:v}),x()}})})():(()=>{let w=!0,y=()=>w=!1;return(async()=>{try{const A=(()=>{if(e.transport.type==="fallback"){const C=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return C?C.value:e.transport}return e.transport})(),v=s??(a?[a]:void 0);let g=[];v&&(g=[v.flatMap(I=>Zn({abi:[I],eventName:I.name,args:n}))],a&&(g=g[0]));const{unsubscribe:x}=await A.subscribe({params:["logs",{address:t,topics:g}],onData(C){var M;if(!w)return;const I=C.result;try{const{eventName:R,args:O}=$s({abi:v??[],data:I.data,topics:I.topics,strict:m}),N=gt(I,{args:O,eventName:R});l([N])}catch(R){let O,N;if(R instanceof Bn||R instanceof Sr){if(d)return;O=R.abiItem.name,N=(M=R.abiItem.inputs)==null?void 0:M.some(D=>!("name"in D&&D.name))}const Q=gt(I,{args:N?[]:{},eventName:O});l([Q])}},onError(C){o==null||o(C)}});y=x,w||y()}catch(A){o==null||o(A)}})(),()=>y()})()}function z1(e,{batch:t=!0,onError:n,onTransactions:r,poll:a,pollingInterval:s=e.pollingInterval}){return(typeof a<"u"?a:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{const u=ht(["watchPendingTransactions",e.uid,t,s]);return rn(u,{onTransactions:r,onError:n},c=>{let d;const f=Wn(async()=>{var m;try{if(!d)try{d=await G(e,Vl,"createPendingTransactionFilter")({});return}catch(h){throw f(),h}const b=await G(e,Dr,"getFilterChanges")({filter:d});if(b.length===0)return;if(t)c.onTransactions(b);else for(const h of b)c.onTransactions([h])}catch(b){(m=c.onError)==null||m.call(c,b)}},{emitOnBegin:!0,interval:s});return async()=>{d&&await G(e,Vr,"uninstallFilter")({filter:d}),f()}})})():(()=>{let u=!0,c=()=>u=!1;return(async()=>{try{const{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(f){if(!u)return;const m=f.result;r([m])},onError(f){n==null||n(f)}});c=d,u||c()}catch(d){n==null||n(d)}})(),()=>c()})()}async function Q1(e,{chain:t}){const{id:n,name:r,nativeCurrency:a,rpcUrls:s,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:te(n),chainName:r,nativeCurrency:a,rpcUrls:s.default.http,blockExplorerUrls:i?Object.values(i).map(({url:o})=>o):void 0}]},{dedupe:!0,retryCount:0})}function V1(e,t){const{abi:n,args:r,bytecode:a,...s}=t,i=dl({abi:n,args:r,bytecode:a});return Ts(e,{...s,...s.authorizationList?{to:null}:{},data:i})}async function U1(e){var n;return((n=e.account)==null?void 0:n.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(r=>ny(r))}const xc="0x5792579257925792579257925792579257925792579257925792579257925792",Tc=te(0,{size:32});async function Cc(e,t){const{account:n=e.account,capabilities:r,chain:a=e.chain,experimental_fallback:s,experimental_fallbackDelay:i=32,forceAtomic:o=!1,id:l,version:u="2.0.0"}=t,c=n?Pe(n):null,d=t.calls.map(f=>{const m=f,b=m.abi?ue({abi:m.abi,functionName:m.functionName,args:m.args}):m.data;return{data:m.dataSuffix&&b?tn([b,m.dataSuffix]):b,to:m.to,value:m.value?te(m.value):void 0}});try{const f=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:o,calls:d,capabilities:r,chainId:te(a.id),from:c==null?void 0:c.address,id:l,version:u}]},{retryCount:0});return typeof f=="string"?{id:f}:f}catch(f){const m=f;if(s&&(m.name==="MethodNotFoundRpcError"||m.name==="MethodNotSupportedRpcError"||m.name==="UnknownRpcError"||m.details.toLowerCase().includes("does not exist / is not available")||m.details.toLowerCase().includes("missing or invalid. request()")||m.details.toLowerCase().includes("did n
5ot match any variant of untagged enum")||m.details.toLowerCase().includes("account upgraded to unsupported contract")||m.details.toLowerCase().includes("eip-7702 not supported")||m.details.toLowerCase().includes("unsupported wc_ method")||m.details.toLowerCase().includes("feature toggled misconfigured")||m.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(r&&Object.values(r).some(A=>!A.optional)){const A="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new hp(new pe(A,{details:A}))}if(o&&d.length>1){const y="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new gp(new pe(y,{details:y}))}const b=[];for(const y of d){const A=Ts(e,{account:c,chain:a,data:y.data,to:y.to,value:y.value?kt(y.value):void 0});b.push(A),i>0&&await new Promise(v=>setTimeout(v,i))}const h=await Promise.allSettled(b);if(h.every(y=>y.status==="rejected"))throw h[0].reason;const w=h.map(y=>y.status==="fulfilled"?y.value:Tc);return{id:tn([...w,te(a.id,{size:32}),xc])}}throw fl(f,{...t,account:c,chain:t.chain})}}async function Ec(e,t){async function n(c){if(c.endsWith(xc.slice(2))){const f=Tl(Ti(c,-64,-32)),m=Ti(c,0,-64).slice(2).match(/.{1,64}/g),b=await Promise.all(m.map(w=>Tc.slice(2)!==w?e.request({method:"eth_getTransactionReceipt",params:[`0x${w}`]},{dedupe:!0}):void 0)),h=b.some(w=>w===null)?100:b.every(w=>(w==null?void 0:w.status)==="0x1")?200:b.every(w=>(w==null?void 0:w.status)==="0x0")?500:600;return{atomic:!1,chainId:hr(f),receipts:b.filter(Boolean),status:h,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[c]})}const{atomic:r=!1,chainId:a,receipts:s,version:i="2.0.0",...o}=await n(t.id),[l,u]=(()=>{const c=o.status;return c>=100&&c<200?["pending",c]:c>=200&&c<300?["success",c]:c>=300&&c<700?["failure",c]:c==="CONFIRMED"?["success",200]:c==="PENDING"?["pending",100]:[void 0,c]})();return{...o,atomic:r,chainId:a?hr(a):void 0,receipts:(s==null?void 0:s.map(c=>({...c,blockNumber:kt(c.blockNumber),gasUsed:kt(c.gasUsed),status:Gp[c.status]})))??[],statusCode:u,status:l,version:i}}async function W1(e,t={}){const{account:n=e.account,chainId:r}=t,a=n?Pe(n):void 0,s=r?[a==null?void 0:a.address,[te(r)]]:[a==null?void 0:a.address],i=await e.request({method:"wallet_getCapabilities",params:s}),o={};for(const[l,u]of Object.entries(i)){o[Number(l)]={};for(let[c,d]of Object.entries(u))c==="addSubAccount"&&(c="unstable_addSubAccount"),o[Number(l)][c]=d}return typeof r=="number"?o[r]:o}async function G1(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Ic(e,t){var l;const{account:n=e.account,chainId:r,nonce:a}=t;if(!n)throw new Vn({docsPath:"/docs/eip7702/prepareAuthorization"});const s=Pe(n),i=(()=>{if(t.executor)return t.executor==="self"?t.executor:Pe(t.executor)})(),o={address:t.contractAddress??t.address,chainId:r,nonce:a};return typeof o.chainId>"u"&&(o.chainId=((l=e.chain)==null?void 0:l.id)??await G(e,Gn,"getChainId")({})),typeof o.nonce>"u"&&(o.nonce=await G(e,yl,"getTransactionCount")({address:s.address,blockTag:"pending"}),(i==="self"||i!=null&&i.address&&Ot(i.address,s.address))&&(o.nonce+=1)),o}async function H1(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>Ms(n))}async function _1(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}class q1 extends pe{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}}async function Rc(e,t){const{id:n,pollingInterval:r=e.pollingInterval,status:a=({statusCode:h})=>h===200||h>=300,retryCount:s=4,retryDelay:i=({count:h})=>~~(1<<h)*200,timeout:o=6e4,throwOnFailure:l=!1}=t,u=ht(["waitForCallsStatus",e.uid,n]),{promise:c,resolve:d,reject:f}=wp();let m;const b=rn(u,{resolve:d,reject:f},h=>{const w=Wn(async()=>{const y=A=>{clearTimeout(m),w(),A(),b()};try{const A=await vp(async()=>{const v=await G(e,Ec,"getCallsStatus")({id:n});if(l&&v.status==="failure")throw new q1(v);return v},{retryCount:s,delay:i});if(!a(A))return;y(()=>h.resolve(A))}catch(A){y(()=>h.reject(A))}},{interval:r,emitOnBegin:!0});return w});return m=o?setTimeout(()=>{b(),clearTimeout(m),f(new Z1({id:n}))},o):void 0,await c}class Z1 extends pe{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}async function Y1(e,t){const{chain:n=e.chain}=t,r=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3),a=await Cc(e,t);return await Rc(e,{...t,id:a.id,timeout:r})}async function Gs(e,{serializedTransaction:t,throwOnReceiptRevert:n,timeout:r}){var o,l,u;const a=await e.request({method:"eth_sendRawTransactionSync",params:r?[t,te(r)]:[t]},{retryCount:0}),i=(((u=(l=(o=e.chain)==null?void 0:o.formatters)==null?void 0:l.transactionReceipt)==null?void 0:u.format)||Hp)(a);if(i.status==="reverted"&&n)throw new Xo({receipt:i});return i}const oa=new ry(128);async function Mc(e,t){var x,C,I,M;const{account:n=e.account,chain:r=e.chain,accessList:a,authorizationList:s,blobs:i,data:o,gas:l,gasPrice:u,maxFeePerBlobGas:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,pollingInterval:b,throwOnReceiptRevert:h,type:w,value:y,...A}=t,v=t.timeout??Math.max(((r==null?void 0:r.blockTime)??0)*3,5e3);if(typeof n>"u")throw new Vn({docsPath:"/docs/actions/wallet/sendTransactionSync"});const g=n?Pe(n):null;try{kr(t);const R=await(async()=>
5{if(t.to)return t.to;if(t.to!==null&&s&&s.length>0)return await ol({authorization:s[0]}).catch(()=>{throw new pe("`to` is required. Could not infer from `authorizationList`.")})})();if((g==null?void 0:g.type)==="json-rpc"||g===null){let O;r!==null&&(O=await G(e,Gn,"getChainId")({}),ml({currentChainId:O,chain:r}));const N=(I=(C=(x=e.chain)==null?void 0:x.formatters)==null?void 0:C.transactionRequest)==null?void 0:I.format,D=(N||Nr)({...tl(A,{format:N}),accessList:a,account:g,authorizationList:s,blobs:i,chainId:O,data:o,gas:l,gasPrice:u,maxFeePerBlobGas:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:R,type:w,value:y},"sendTransaction"),S=oa.get(e.uid),P=S?"wallet_sendTransaction":"eth_sendTransaction",B=await(async()=>{try{return await e.request({method:P,params:[D]},{retryCount:0})}catch(E){if(S===!1)throw E;const j=E;if(j.name==="InvalidInputRpcError"||j.name==="InvalidParamsRpcError"||j.name==="MethodNotFoundRpcError"||j.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[D]},{retryCount:0}).then(F=>(oa.set(e.uid,!0),F)).catch(F=>{const V=F;throw V.name==="MethodNotFoundRpcError"||V.name==="MethodNotSupportedRpcError"?(oa.set(e.uid,!1),j):V});throw j}})(),$=await G(e,Or,"waitForTransactionReceipt")({checkReplacement:!1,hash:B,pollingInterval:b,timeout:v});if(h&&$.status==="reverted")throw new Xo({receipt:$});return $}if((g==null?void 0:g.type)==="local"){const O=await G(e,Cs,"prepareTransactionRequest")({account:g,accessList:a,authorizationList:s,blobs:i,chain:r,data:o,gas:l,gasPrice:u,maxFeePerBlobGas:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:g.nonceManager,parameters:[...If,"sidecars"],type:w,value:y,...A,to:R}),N=(M=r==null?void 0:r.serializers)==null?void 0:M.transaction,Q=await g.signTransaction(O,{serializer:N});return await G(e,Gs,"sendRawTransactionSync")({serializedTransaction:Q,throwOnReceiptRevert:h})}throw(g==null?void 0:g.type)==="smart"?new pr({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new pr({docsPath:"/docs/actions/wallet/sendTransactionSync",type:g==null?void 0:g.type})}catch(R){throw R instanceof pr?R:fl(R,{...t,account:g,chain:t.chain||void 0})}}async function X1(e,t){const{id:n}=t;await e.request({method:"wallet_showCallsStatus",params:[n]})}async function K1(e,t){const{account:n=e.account}=t;if(!n)throw new Vn({docsPath:"/docs/eip7702/signAuthorization"});const r=Pe(n);if(!r.signAuthorization)throw new pr({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});const a=await Ic(e,t);return r.signAuthorization(a)}async function J1(e,t){var u,c,d,f;const{account:n=e.account,chain:r=e.chain,...a}=t;if(!n)throw new Vn({docsPath:"/docs/actions/wallet/signTransaction"});const s=Pe(n);kr({account:s,...t});const i=await G(e,Gn,"getChainId")({});r!==null&&ml({currentChainId:i,chain:r});const o=(r==null?void 0:r.formatters)||((u=e.chain)==null?void 0:u.formatters),l=((c=o==null?void 0:o.transactionRequest)==null?void 0:c.format)||Nr;return s.signTransaction?s.signTransaction({...a,chainId:i},{serializer:(f=(d=e.chain)==null?void 0:d.serializers)==null?void 0:f.transaction}):await e.request({method:"eth_signTransaction",params:[{...l({...a,account:s},"signTransaction"),chainId:te(i),from:s.address}]},{retryCount:0})}async function eb(e,t){const{account:n=e.account,domain:r,message:a,primaryType:s}=t;if(!n)throw new Vn({docsPath:"/docs/actions/wallet/signTypedData"});const i=Pe(n),o={EIP712Domain:Hl({domain:r}),...t.types};if(Gl({domain:r,message:a,primaryType:s,types:o}),i.signTypedData)return i.signTypedData({domain:r,message:a,primaryType:s,types:o});const l=I0({domain:r,message:a,primaryType:s,types:o});return e.request({method:"eth_signTypedData_v4",params:[i.address,l]},{retryCount:0})}async function tb(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:te(t)}]},{retryCount:0})}async function nb(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function rb(e,t){return jr.internal(e,Mc,"sendTransactionSync",t)}async function ab(e,t){var r;let n;if(typeof t.connector=="function"?n=e._internal.connectors.setup(t.connector):n=t.connector,n.uid===e.state.current)throw new Ho;try{e.setState(i=>({...i,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const a=await n.connect({chainId:t.chainId}),s=a.accounts;return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await((r=e.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),e.setState(i=>({...i,connections:new Map(i.connections).set(n.uid,{accounts:s,chainId:a.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:s,chainId:a.chainId}}catch(a){throw e.setState(s=>({...s,status:s.current?"connected":"disconnected"})),a}}
5function sb(e){var d,f,m;const{scheme:t,statement:n,...r}=((d=e.match(ib))==null?void 0:d.groups)??{},{chainId:a,expirationTime:s,issuedAt:i,notBefore:o,requestId:l,...u}=((f=e.match(ob))==null?void 0:f.groups)??{},c=(m=e.split("Resources:")[1])==null?void 0:m.split(`
6- `).slice(1);return{...r,...u,...a?{chainId:Number(a)}:{},...s?{expirationTime:new Date(s)}:{},...i?{issuedAt:new Date(i)}:{},...o?{notBefore:new Date(o)}:{},...l?{requestId:l}:{},...c?{resources:c}:{},...t?{scheme:t}:{},...n?{statement:n}:{}}}const ib=/^(?:(?<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)?/,ob=/(?: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>.+))?/;function lb(e){const{address:t,domain:n,message:r,nonce:a,scheme:s,time:i=new Date}=e;if(n&&r.domain!==n||a&&r.nonce!==a||s&&r.scheme!==s||r.expirationTime&&i>=r.expirationTime||r.notBefore&&i<r.notBefore)return!1;try{if(!r.address||!fe(r.address,{strict:!1})||t&&!Ot(r.address,t))return!1}catch{return!1}return!0}async function cb(e,t){const{address:n,domain:r,message:a,nonce:s,scheme:i,signature:o,time:l=new Date,...u}=t,c=sb(a);if(!c.address||!lb({address:n,domain:r,message:c,nonce:s,scheme:i,time:l}))return!1;const f=Wl(a);return Ur(e,{address:c.address,hash:f,signature:o,...u})}function ub(e){return{call:t=>pl(e,t),createAccessList:t=>Dl(e,t),createBlockFilter:()=>o0(e),createContractEventFilter:t=>zl(e,t),createEventFilter:t=>Ql(e,t),createPendingTransactionFilter:()=>Vl(e),estimateContractGas:t=>c0(e,t),estimateGas:t=>Rt(e,t),getBalance:t=>Sf(e,t),getBlobBaseFee:()=>u0(e),getBlock:t=>Rn(e,t),getBlockNumber:t=>$r(e,t),getBlockTransactionCount:t=>d0(e,t),getBytecode:t=>ka(e,t),getChainId:()=>Gn(e),getCode:t=>ka(e,t),getContractEvents:t=>Ul(e,t),getEip712Domain:t=>m0(e,t),getEnsAddress:t=>Gy(e,t),getEnsAvatar:t=>a0(e,t),getEnsName:t=>s0(e,t),getEnsResolver:t=>i0(e,t),getEnsText:t=>Ll(e,t),getFeeHistory:t=>g0(e,t),estimateFeesPerGas:t=>kn(e,t),getFilterChanges:t=>Dr(e,t),getFilterLogs:t=>w0(e,t),getGasPrice:()=>Nf(e),getLogs:t=>Os(e,t),getProof:t=>y1(e,t),estimateMaxPriorityFeePerGas:t=>kf(e,t),getStorageAt:t=>m1(e,t),getTransaction:t=>cl(e,t),getTransactionConfirmations:t=>b1(e,t),getTransactionCount:t=>yl(e,t),getTransactionReceipt:t=>Pf(e,t),multicall:t=>Bf(e,t),prepareTransactionRequest:t=>Cs(e,t),readContract:t=>we(e,t),sendRawTransaction:t=>bl(e,t),sendRawTransactionSync:t=>Gs(e,t),simulate:t=>Da(e,t),simulateBlocks:t=>Da(e,t),simulateCalls:t=>I1(e,t),simulateContract:t=>Mf(e,t),verifyHash:t=>Ur(e,t),verifyMessage:t=>O1(e,t),verifySiweMessage:t=>cb(e,t),verifyTypedData:t=>j1(e,t),uninstallFilter:t=>Vr(e,t),waitForTransactionReceipt:t=>Or(e,t),watchBlocks:t=>F1(e,t),watchBlockNumber:t=>Rf(e,t),watchContractEvent:t=>L1(e,t),watchEvent:t=>D1(e,t),watchPendingTransactions:t=>z1(e,t)}}function db(e){const{key:t="public",name:n="Public Client"}=e;return Ap({...e,key:t,name:n,type:"publicClient"}).extend(ub)}function Zi(e){return{addChain:t=>Q1(e,t),deployContract:t=>V1(e,t),getAddresses:()=>U1(e),getCallsStatus:t=>Ec(e,t),getCapabilities:t=>W1(e,t),getChainId:()=>Gn(e),getPermissions:()=>G1(e),prepareAuthorization:t=>Ic(e,t),prepareTransactionRequest:t=>Cs(e,t),requestAddresses:()=>H1(e),requestPermissions:t=>_1(e,t),sendCalls:t=>Cc(e,t),sendCallsSync:t=>Y1(e,t),sendRawTransaction:t=>bl(e,t),sendRawTransactionSync:t=>Gs(e,t),sendTransaction:t=>Ts(e,t),sendTransactionSync:t=>Mc(e,t),showCallsStatus:t=>X1(e,t),signAuthorization:t=>K1(e,t),signMessage:t=>Kp(e,t),signTransaction:t=>J1(e,t),signTypedData:t=>eb(e,t),switchChain:t=>tb(e,t),waitForCallsStatus:t=>Rc(e,t),watchAsset:t=>nb(e,t),writeContract:t=>jr(e,t),writeContractSync:t=>rb(e,t)}}async function pb(e,t={}){var a,s;let n;if(t.connector)n=t.connector;else{const{connections:i,current:o}=e.state,l=i.get(o);n=l==null?void 0:l.connector}const r=e.state.connections;n&&(await n.disconnect(),n.emitter.off("change",e._internal.events.change),n.emitter.off("disconnect",e._internal.events.disconnect),n.emitter.on("connect",e._internal.events.connect),r.delete(n.uid)),e.setState(i=>{if(r.size===0)return{...i,connections:new Map,current:null,status:"disconnected"};const o=r.values().next().value;return{...i,connections:new Map(r),current:o.connector.uid}});{const i=e.state.current;if(!i)return;const o=(a=e.state.connections.get(i))==null?void 0:a.connector;if(!o)return;await((s=e.storage)==null?void 0:s.setItem("recentConnectorId",o.id))}}let sr=[];function Va(e){const t=[...e.state.connections.values()];return e.state.status==="reconnecting"||hs(sr,t)?sr:(sr=t,t)}let la=[];function Yi(e){const t=e.connectors;return hs(la,t)?la:(la=t,t)}function fb(e,t){const{onChange:n}=t;return e.subscribe(()=>Va(e),n,{equalityFn:hs})}function yb(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((r,a)=>{n(Object.values(r),a)})}function mb(e){return{mutationFn(t){return ab(e,t)},mutationKey:["connect"]}}function bb(e){return{mutationFn(t){return pb(e,t)},mutationKey:["disconnect"]}}function Bc(e={}){const t=cn(e);return T.useSyncExternalStore(n=>yb(t,{onChange:n}),()=>Yi(t),()=>Yi(t))}function hb(e={}){const{mutation:t}=e,n=cn(e),r=mb(n),{mutate:a,mutateAsync:s,...i}=Un({...t,...r});return T.useEffect(()=>n.subscribe(({status:o})=>o,(o,l)=>{l==="connected"&&o==="disconnected"&&i.reset()}),[n,i.reset]),{...i,connect:a,connectAsync:s,connectors:Bc({config:n})}}function gb(e={}){const t=cn(e);return T.useSyncExternalStore(n=>fb(t,{onChange:n}),()=>Va(t),()=>Va(t))}function wb(e={}){const{mutation:t}=e,n=cn(e),r=bb(n),{mutate:a,mutateAsync:s,...i}=Un({...t,...r});return{...i,connectors:gb({config:n}).map(o=>o.connector),disconnect:a,disconnectAsync:s}}function Pc(e,t){const{chainId:n,...r}=t,a=e.getClient({chainId:n});return $f(a,we,"readContract")(r)}async function Wr(e,t={}){const n=await Of(e,t);return n.extend(Zi),n.extend(Zi)}async function vb(e,t){var i;const{addEthereumChainParameter:n,chainId:r}=t,a=e.state.connections.get(((i=t.connector)==null?void 0:i.uid)??e.state.current);if(a){const o=a.connector;if(!o.switchChain)throw new xp({connector:o});return await o.switchChain({addEthereumChainParameter:n,chainId:r})}const s=e.chains.find(o=>o.id===r);if(!s)throw new Tp;return e.setState(o=>({...o,chainId:r})),s}function Ab(){const{wallets:e,select:t}=_o(),[n,r]=T.useMemo(()=>{const a=[],s=[];for(const i of e)i.readyState===Cp.Installed?a.push(i):s.push(i);return[a,s]},[e]);return{connect:t,wallets:{installed:n,notInstalled:r}}}function ca(){const{disconnect:e}=_o();return{disconnect:e}}/**
7 * @license lucide-react v0.523.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const xb=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Tb=Ry("power",xb),Cb=T.createContext({}),Xn=()=>{const{open:e,close:t}=T.useContext(Cb);return{open:e,close:t}},Eb=async e=>{const{connector:t}=Ep();await(t==null?void 0:t.switchNetwork(e))},j8=({network:e,testnet:t})=>T.useMemo(()=>Object.values(Ko).filter(r=>t?r.networkType===e&&r.testnet:r.networkType===e&&!r.testnet),[e,t]),Gr=()=>{const{network:e}=Ip(),t=cn(),{mutateAsync:n,...r}=Un({mutationKey:["ensureOnChain"],mutationFn:async({chain:a})=>{if(a){if(a.networkType===ze.btc){const s=a.testnet?"testnet":"livenet";e!==s&&await Eb(s)}else if(a.networkType===ze.evm){const{address:s,chainId:i}=jf(t);if(!s)return;i!==a.chain.id&&await vb(t,{chainId:a.chain.id})}return a}}});return{ensure:n,...r}};var kc=L.createContext({drawerRef:{current:null},overlayRef:{current:null}
11,scaleBackground:()=>{},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},visible:!1,closeDrawer:()=>{},setVisible:()=>{},direction:"bottom"}),Nc=()=>L.useContext(kc);function Ib(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Ib(`[vaul-drawer]{touch-action:none;transition:transform .5s cubic-bezier(.32,.72,0,1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top],.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left],.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height, 0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left],[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height, 0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32,.72,0,1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]:after{content:"";position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]:after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]:after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]:after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]:after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay="true"]):not([data-state="closed"]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible="false"]){opacity:1}@keyframes fake-animation{}@media (hover: hover) and (pointer: fine){[vaul-drawer]{user-select:none}}
12`);var Rb=typeof window<"u"?T.useLayoutEffect:T.useEffect;function Ua(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function Mb(){return Hs(/^Mac/)}function Bb(){return Hs(/^iPhone/)}function Pb(){return Hs(/^iPad/)||Mb()&&navigator.maxTouchPoints>1}function Sc(){return Bb()||Pb()}function Hs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}var ua=typeof document<"u"&&window.visualViewport;function Xi(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function $c(e){for(Xi(e)&&(e=e.parentElement);e&&!Xi(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var kb=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),ir=0,da;function Nb(e={}){let{isDisabled:t}=e;Rb(()=>{if(!t)return ir++,ir===1&&(Sc()?da=$b():da=Sb()),()=>{ir--,ir===0&&da()}},[t])}function Sb(){return Ua(Oc(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`))}function $b(){let e,t=0,n=d=>{e=$c(d.target),!(e===document.documentElement&&e===document.body)&&(t=d.changedTouches[0].pageY)},r=d=>{if(!e||e===document.documentElement||e===document.body){d.preventDefault();return}let f=d.changedTouches[0].pageY,m=e.scrollTop,b=e.scrollHeight-e.clientHeight;b!==0&&((m<=0&&f>t||m>=b&&f<t)&&d.preventDefault(),t=f)},a=d=>{let f=d.target;Wa(f)&&f!==document.activeElement&&(d.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},s=d=>{let f=d.target;Wa(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",ua&&(ua.height<window.innerHeight?requestAnimationFrame(()=>{Ki(f)}):ua.addEventListener("resize",()=>Ki(f),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},o=window.pageXOffset,l=window.pageYOffset,u=Ua(Oc(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let c=Ua(vn(document,"touchstart",n,{passive:!1,capture:!0}),vn(document,"touchmove",r,{passive:!1,capture:!0}),vn(document,"touchend",a,{passive:!1,capture:!0}),vn(document,"focus",s,!0),vn(window,"scroll",i));return()=>{u(),c(),window.scrollTo(o,l)}}
12function Oc(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function vn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ki(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=$c(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,s=e.getBoundingClientRect().bottom,i=n.getBoundingClientRect().bottom;s>i&&(n.scrollTop+=a-r)}e=n.parentElement}}function Wa(e){return e instanceof HTMLInputElement&&!kb.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Ob(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function jb(...e){return t=>e.forEach(n=>Ob(n,t))}function jc(...e){return T.useCallback(jb(...e),e)}var ot=null;function Fb({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a}){let[s,i]=L.useState(typeof window<"u"?window.location.href:""),o=L.useRef(0),l=L.useCallback(()=>{if(ot===null&&e){ot={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height};let{scrollX:c,innerHeight:d}=window;document.body.style.setProperty("position","fixed","important"),document.body.style.top=`${-o.current}px`,document.body.style.left=`${-c}px`,document.body.style.right="0px",document.body.style.height="auto",setTimeout(()=>requestAnimationFrame(()=>{let f=d-window.innerHeight;f&&o.current>=d&&(document.body.style.top=`${-(o.current+f)}px`)}),300)}},[e]),u=L.useCallback(()=>{if(ot!==null){let c=-parseInt(document.body.style.top,10),d=-parseInt(document.body.style.left,10);document.body.style.position=ot.position,document.body.style.top=ot.top,document.body.style.left=ot.left,document.body.style.height=ot.height,document.body.style.right="unset",requestAnimationFrame(()=>{if(a&&s!==window.location.href){i(window.location.href);return}window.scrollTo(d,c)}),ot=null}},[s]);return L.useEffect(()=>{function c(){o.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),L.useEffect(()=>{n||!r||(e?(l(),t||setTimeout(()=>{u()},500)):u())},[e,r,s,t,n,l,u]),{restorePositionSetting:u}}var Fc=new WeakMap;function ne(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;let r={};Object.entries(t).forEach(([a,s])=>{if(a.startsWith("--")){e.style.setProperty(a,s);return}r[a]=e.style[a],e.style[a]=s}),!n&&Fc.set(e,r)}function or(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Fc.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([r,a])=>{e.style[r]=a}))}var le=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function lr(e,t){let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[le(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[le(t)?5:4]):null)}function Lb(e){return 8*(Math.log(e+1)-2)}var ee={DURATION:.5,EASE:[.32,.72,0,1]},Lc=.4;function Dc(e){let t=L.useRef(e);return L.useEffect(()=>{t.current=e}),L.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Db({defaultProp:e,onChange:t}){let n=L.useState(e),[r]=n,a=L.useRef(r),s=Dc(t);return L.useEffect(()=>{a.current!==r&&(s(r),a.current=r)},[r,a,s]),n}function zb({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,a]=Db({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,o=Dc(n),l=L.useCallback(u=>{if(s){let c=typeof u=="function"?u(e):u;c!==e&&o(c)}else a(u)},[s,e,a,o]);return[i,l]}function Qb({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:s,onSnapPointChange:i,direction:o="bottom"}){let[l,u]=zb({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),c=L.useMemo(()=>l===(n==null?void 0:n[n.length-1])||null,[n,l]),d=n&&n.length>0&&(s||s===0)&&!Number.isNaN(s)&&n[s]===l||!n,f=L.useMemo(()=>n==null?void 0:n.findIndex(v=>v===l),[n,l]),m=L.useMemo(()=>{var v;return(v=n==null?void 0:n.map(g=>{let x=typeof window<"u",C=typeof g=="string",I=0;if(C&&(I=parseInt(g,10)),le(o)){let R=C?I:x?g*window.innerHeight:0;return x?o==="bottom"?window.innerHeight-R:-window.innerHeight+R:R}let M=C?I:x?g*window.innerWidth:0;return x?o==="right"?window.innerWidth-M:-window.innerWidth+M:M}))!=null?v:[]},[n]),b=L.useMemo(()=>f!==null?m==null?void 0:m[f]:null,[m,f]),h=L.useCallback(v=>{var g;let x=(g=m==null?void 0:m.findIndex(C=>C===v))!=null?g:null;i(x),ne(r.current,{transition:`transform ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`,transform:le(o)?`translate3d(0, ${v}px, 0)`:`translate3d(${v}px, 0, 0)`}),m&&x!==m.length-1&&x!==s?ne(a.current,{transition:`opacity ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`,opacity:"0"}):ne(a.current,{transition:`opacity ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`,opacity:"1"}),u(x!==null?n==null?void 0:n[x]:null)}
12,[r.current,n,m,s,a,u]);L.useEffect(()=>{var v;if(e){let g=(v=n==null?void 0:n.findIndex(x=>x===e))!=null?v:-1;m&&g!==-1&&typeof m[g]=="number"&&h(m[g])}},[e,n,m,h]);function w({draggedDistance:v,closeDrawer:g,velocity:x,dismissible:C}){if(s===void 0)return;let I=o==="bottom"||o==="right"?(b??0)-v:(b??0)+v,M=f===s-1,R=f===0,O=v>0;if(M&&ne(a.current,{transition:`opacity ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`}),x>2&&!O){C?g():h(m[0]);return}if(x>2&&O&&m&&n){h(m[n.length-1]);return}let N=m==null?void 0:m.reduce((D,S)=>typeof D!="number"||typeof S!="number"?D:Math.abs(S-I)<Math.abs(D-I)?S:D),Q=le(o)?window.innerHeight:window.innerWidth;if(x>Lc&&Math.abs(v)<Q*.4){let D=O?1:-1;if(D>0&&c){h(m[n.length-1]);return}if(R&&D<0&&C&&g(),f===null)return;h(m[f+D]);return}h(N)}function y({draggedDistance:v}){if(b===null)return;let g=o==="bottom"||o==="right"?b-v:b+v;(o==="bottom"||o==="right")&&g<m[m.length-1]||(o==="top"||o==="left")&&g>m[m.length-1]||ne(r.current,{transform:le(o)?`translate3d(0, ${g}px, 0)`:`translate3d(${g}px, 0, 0)`})}function A(v,g){if(!n||typeof f!="number"||!m||s===void 0)return null;let x=f===s-1;if(f>=s&&g)return 0;if(x&&!g)return 1;if(!d&&!x)return null;let C=x?f+1:f-1,I=x?m[C]-m[C-1]:m[C+1]-m[C],M=v/Math.abs(I);return x?1-M:M}return{isLastSnapPoint:c,activeSnapPoint:l,shouldFade:d,getPercentageDragged:A,setActiveSnapPoint:u,activeSnapPointIndex:f,onRelease:w,onDrag:y,snapPointsOffset:m}}var Vb=.25,Ub=100,Ji=8,xt=16,eo=26,to="vaul-dragging";function Wb({open:e,onOpenChange:t,children:n,shouldScaleBackground:r,onDrag:a,onRelease:s,snapPoints:i,nested:o=!1,closeThreshold:l=Vb,scrollLockTimeout:u=Ub,dismissible:c=!0,fadeFromIndex:d=i&&i.length-1,activeSnapPoint:f,setActiveSnapPoint:m,fixed:b,modal:h=!0,onClose:w,direction:y="bottom",preventScrollRestoration:A=!0}){var v;let[g=!1,x]=L.useState(!1),[C,I]=L.useState(!1),[M,R]=L.useState(!1),[O,N]=L.useState(!1),[Q,D]=L.useState(!1),[S,P]=L.useState(!1),B=L.useRef(null),$=L.useRef(null),E=L.useRef(null),j=L.useRef(null),F=L.useRef(null),V=L.useRef(!1),W=L.useRef(null),_=L.useRef(0),Y=L.useRef(!1),ie=L.useRef(0),z=L.useRef(null),Fe=L.useRef(((v=z.current)==null?void 0:v.getBoundingClientRect().height)||0),Ge=L.useRef(0),He=L.useCallback(U=>{i&&U===hn.length-1&&($.current=new Date)},[]),{activeSnapPoint:ye,activeSnapPointIndex:Ae,setActiveSnapPoint:it,onRelease:Ft,snapPointsOffset:hn,onDrag:_d,shouldFade:gi,getPercentageDragged:qd}=Qb({snapPoints:i,activeSnapPointProp:f,setActiveSnapPointProp:m,drawerRef:z,fadeFromIndex:d,overlayRef:B,onSnapPointChange:He,direction:y});Nb({isDisabled:!g||Q||!h||S||!C});let{restorePositionSetting:Zd}=Fb({isOpen:g,modal:h,nested:o,hasBeenOpened:C,preventScrollRestoration:A});function Lt(){return(window.innerWidth-eo)/window.innerWidth}function Yd(U){var H;!c&&!i||z.current&&!z.current.contains(U.target)||(Fe.current=((H=z.current)==null?void 0:H.getBoundingClientRect().height)||0,D(!0),E.current=new Date,Sc()&&window.addEventListener("touchend",()=>V.current=!1,{once:!0}),U.target.setPointerCapture(U.pointerId),_.current=le(y)?U.screenY:U.screenX)}function wi(U,H){var J;let Z=U,re=(J=window.getSelection())==null?void 0:J.toString(),oe=z.current?lr(z.current,y):null,me=new Date;if(Z.hasAttribute("data-vaul-no-drag"))return!1;if(y==="right"||y==="left")return!0;if($.current&&me.getTime()-$.current.getTime()<500)return!1;if(oe!==null&&(y==="bottom"?oe>0:oe<0))return!0;if(re&&re.length>0)return!1;if(F.current&&me.getTime()-F.current.getTime()<u&&oe===0||H)return F.current=me,!1;for(;Z;){if(Z.scrollHeight>Z.clientHeight){if(Z.scrollTop!==0)return F.current=new Date,!1;if(Z.getAttribute("role")==="dialog")return!0}Z=Z.parentNode}return!0}function Xd(U){if(z.current&&Q){let H=y==="bottom"||y==="right"?1:-1,J=(_.current-(le(y)?U.screenY:U.screenX))*H,Z=J>0;if(i&&Ae===0&&!c||!V.current&&!wi(U.target,Z))return;if(z.current.classList.add(to),V.current=!0,ne(z.current,{transition:"none"}),ne(B.current,{transition:"none"}),i&&_d({draggedDistance:J}),Z&&!i){let Le=Lb(J),rr=Math.min(Le*-1,0)*H;ne(z.current,{transform:le(y)?`translate3d(0, ${rr}px, 0)`:`translate3d(${rr}px, 0, 0)`});return}let re=Math.abs(J),oe=document.querySelector("[vaul-drawer-wrapper]"),me=re/Fe.current,nr=qd(re,Z);nr!==null&&(me=nr);let At=1-me;if((gi||d&&Ae===d-1)&&(a==null||a(U,me),ne(B.current,{opacity:`${At}`,transition:"none"},!0)),oe&&B.current&&r){let Le=Math.min(Lt()+me*(1-Lt()),1),rr=8-me*8,Ai=Math.max(0,14-me*14);ne(oe,{borderRadius:`${rr}px`,transform:le(y)?`scale(${Le}) translate3d(0, ${Ai}px, 0)`:`scale(${Le}) translate3d(${Ai}px, 0, 0)`,transition:"none"},!0)}if(!i){let Le=re*H;ne(z.current,{transform:le(y)?`translate3d(0, ${Le}px, 0)`:`translate3d(${Le}px, 0, 0)`})}}}L.useEffect(()=>()=>{tr(!1),Zd()},[]),L.useEffect(()=>{var U;function H(){var J;if(!z.current)return;let Z=document.activeElement;
12if(Wa(Z)||Y.current){let re=((J=window.visualViewport)==null?void 0:J.height)||0,oe=window.innerHeight-re,me=z.current.getBoundingClientRect().height||0;Ge.current||(Ge.current=me);let nr=z.current.getBoundingClientRect().top;if(Math.abs(ie.current-oe)>60&&(Y.current=!Y.current),i&&i.length>0&&hn&&Ae){let At=hn[Ae]||0;oe+=At}if(ie.current=oe,me>re||Y.current){let At=z.current.getBoundingClientRect().height,Le=At;At>re&&(Le=re-eo),b?z.current.style.height=`${At-Math.max(oe,0)}px`:z.current.style.height=`${Math.max(Le,re-nr)}px`}else z.current.style.height=`${Ge.current}px`;i&&i.length>0&&!Y.current?z.current.style.bottom="0px":z.current.style.bottom=`${Math.max(oe,0)}px`}}return(U=window.visualViewport)==null||U.addEventListener("resize",H),()=>{var J;return(J=window.visualViewport)==null?void 0:J.removeEventListener("resize",H)}},[Ae,i,hn]);function Dt(){z.current&&(w==null||w(),ne(z.current,{transform:le(y)?`translate3d(0, ${y==="bottom"?"100%":"-100%"}, 0)`:`translate3d(${y==="right"?"100%":"-100%"}, 0, 0)`,transition:`transform ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`}),ne(B.current,{opacity:"0",transition:`opacity ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`}),tr(!1),setTimeout(()=>{R(!1),x(!1)},300),setTimeout(()=>{i&&it(i[0])},ee.DURATION*1e3))}L.useEffect(()=>{if(!g&&r){let U=setTimeout(()=>{or(document.body)},200);return()=>clearTimeout(U)}},[g,r]),L.useEffect(()=>{e?(x(!0),I(!0)):Dt()},[e]),L.useEffect(()=>{O&&(t==null||t(g))},[g]),L.useEffect(()=>{N(!0)},[]);function vi(){if(!z.current)return;let U=document.querySelector("[vaul-drawer-wrapper]"),H=lr(z.current,y);ne(z.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`}),ne(B.current,{transition:`opacity ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`,opacity:"1"}),r&&H&&H>0&&g&&ne(U,{borderRadius:`${Ji}px`,overflow:"hidden",...le(y)?{transform:`scale(${Lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ee.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ee.EASE.join(",")})`},!0)}function Kd(U){var H;if(!Q||!z.current)return;z.current.classList.remove(to),V.current=!1,D(!1),j.current=new Date;let J=lr(z.current,y);
12if(!wi(U.target,!1)||!J||Number.isNaN(J)||E.current===null)return;let Z=j.current.getTime()-E.current.getTime(),re=_.current-(le(y)?U.screenY:U.screenX),oe=Math.abs(re)/Z;if(oe>.05&&(P(!0),setTimeout(()=>{P(!1)},200)),i){Ft({draggedDistance:re*(y==="bottom"||y==="right"?1:-1),closeDrawer:Dt,velocity:oe,dismissible:c}),s==null||s(U,!0);return}if(y==="bottom"||y==="right"?re>0:re<0){vi(),s==null||s(U,!0);return}if(oe>Lc){Dt(),s==null||s(U,!1);return}let me=Math.min((H=z.current.getBoundingClientRect().height)!=null?H:0,window.innerHeight);if(J>=me*l){Dt(),s==null||s(U,!1);return}s==null||s(U,!0),vi()}L.useEffect(()=>{g&&(ne(document.documentElement,{scrollBehavior:"auto"}),$.current=new Date,tr(!0))},[g]),L.useEffect(()=>{var U;if(z.current&&M){let H=(U=z==null?void 0:z.current)==null?void 0:U.querySelectorAll("*");H==null||H.forEach(J=>{let Z=J;(Z.scrollHeight>Z.clientHeight||Z.scrollWidth>Z.clientWidth)&&Z.classList.add("vaul-scrollable")})}},[M]);function tr(U){let H=document.querySelector("[vaul-drawer-wrapper]");!H||!r||(U?(ne(document.body,{background:document.body.style.backgroundColor||document.body.style.background}),ne(document.body,{background:"black"},!0),ne(H,{borderRadius:`${Ji}px`,overflow:"hidden",...le(y)?{transform:`scale(${Lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ee.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ee.EASE.join(",")})`})):(or(H,"overflow"),or(H,"transform"),or(H,"borderRadius"),ne(H,{transitionProperty:"transform, border-radius",transitionDuration:`${ee.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ee.EASE.join(",")})`})))}function Jd(U){let H=U?(window.innerWidth-xt)/window.innerWidth:1,J=U?-xt:0;W.current&&window.clearTimeout(W.current),ne(z.current,{transition:`transform ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`,transform:`scale(${H}) translate3d(0, ${J}px, 0)`}),!U&&z.current&&(W.current=setTimeout(()=>{let Z=lr(z.current,y);ne(z.current,{transition:"none",transform:le(y)?`translate3d(0, ${Z}px, 0)`:`translate3d(${Z}px, 0, 0)`})},500))}function ep(U,H){if(H<0)return;let J=le(y)?window.innerHeight:window.innerWidth,Z=(J-xt)/J,re=Z+H*(1-Z),oe=-xt+H*xt;ne(z.current,{transform:le(y)?`scale(${re}) translate3d(0, ${oe}px, 0)`:`scale(${re}) translate3d(${oe}px, 0, 0)`,transition:"none"})}function tp(U,H){let J=le(y)?window.innerHeight:window.innerWidth,Z=H?(J-xt)/J:1,re=H?-xt:0;H&&ne(z.current,{transition:`transform ${ee.DURATION}s cubic-bezier(${ee.EASE.join(",")})`,transform:le(y)?`scale(${Z}) translate3d(0, ${re}px, 0)`:`scale(${Z}) translate3d(${re}px, 0, 0)`})}return L.createElement(Hf,{modal:h,onOpenChange:U=>{if(e!==void 0){t==null||t(U);return}U?(I(!0),x(U)):Dt()},open:g},L.createElement(kc.Provider,{value:{visible:M,activeSnapPoint:ye,snapPoints:i,setActiveSnapPoint:it,drawerRef:z,overlayRef:B,scaleBackground:tr,onOpenChange:t,onPress:Yd,setVisible:R,onRelease:Kd,onDrag:Xd,dismissible:c,isOpen:g,shouldFade:gi,closeDrawer:Dt,onNestedDrag:ep,onNestedOpenChange:Jd,onNestedRelease:tp,keyboardIsOpen:Y,openProp:e,modal:h,snapPointsOffset:hn,direction:y}},n))}var zc=L.forwardRef(function({children:e,...t},n){let{overlayRef:r,snapPoints:a,onRelease:s,shouldFade:i,isOpen:o,visible:l}=Nc(),u=jc(n,r),c=a&&a.length>0;return L.createElement(zf,{onMouseUp:s,ref:u,"vaul-drawer-visible":l?"true":"false","vaul-overlay":"","vaul-snap-points":o&&c?"true":"false","vaul-snap-points-overlay":o&&i?"true":"false",...t})});zc.displayName="Drawer.Overlay";var Qc=L.forwardRef(function({onOpenAutoFocus:e,onPointerDownOutside:t,onAnimationEnd:n,style:r,...a},s){let{drawerRef:i,onPress:o,onRelease:l,onDrag:u,dismissible:c,keyboardIsOpen:d,snapPointsOffset:f,visible:m,closeDrawer:b,modal:h,openProp:w,onOpenChange:y,setVisible:A,direction:v}=Nc(),g=jc(s,i);return L.useEffect(()=>{A(!0)},[]),L.createElement(Qf,{onOpenAutoFocus:x=>{var C;e?e(x):(x.preventDefault(),(C=i.current)==null||C.focus())},onPointerDown:o,onPointerDownOutside:x=>{if(t==null||t(x),!h||x.defaultPrevented){x.preventDefault();return}d.current&&(d.current=!1),x.preventDefault(),y==null||y(!1),!(!c||w!==void 0)&&b()},onPointerMove:u,onPointerUp:l,ref:g,style:f&&f.length>0?{"--snap-point-height":`${f[0]}px`,...r}:r,...a,"vaul-drawer":"","vaul-drawer-direction":v,"vaul-drawer-visible":m?"true":"false"})});Qc.displayName="Drawer.Content";var Oe={Root:Wb,Content:Qc,Overlay:zc,Trigger:Gf,Portal:Vf,Close:_f,Title:Uf,Description:Wf};
12const Vc=({dismissible:e=!0,shouldScaleBackground:t=!0,...n})=>p.jsx(Oe.Root,{dismissible:e,shouldScaleBackground:t,...n});Vc.displayName="Drawer";const Gb=Oe.Trigger,Uc=Oe.Portal,_s=Oe.Close,Wc=T.forwardRef(({className:e,...t},n)=>p.jsx(Oe.Overlay,{ref:n,className:X("bl-fixed bl-inset-0 bl-z-50 bl-bg-black/80",e),...t}));Wc.displayName=Oe.Overlay.displayName;const Gc=T.forwardRef(({className:e,children:t,overlay:n=!0,...r},a)=>p.jsxs(Uc,{children:[n&&p.jsx(Wc,{}),p.jsx(Oe.Content,{ref:a,className:X("bl-fixed bl-bottom-0 bl-z-50 bl-flex bl-h-auto bl-flex-col bl-bg-background focus-visible:bl-outline-none",e),...r,children:t})]}));Gc.displayName="DrawerContent";const Hb=T.forwardRef(({className:e,...t},n)=>p.jsx(Oe.Title,{ref:n,className:X("bl-text-2xl/normal bl-text-black bl-tracking-tight",e),...t}));Hb.displayName=Oe.Title.displayName;const _b=T.forwardRef(({className:e,...t},n)=>p.jsx(Oe.Description,{ref:n,className:X("bl-text-sm bl-text-muted-foreground",e),...t}));_b.displayName=Oe.Description.displayName;function qb(){const{disconnect:e}=wb(),{disconnect:t}=Rp(),{disconnect:n}=qo(),{disconnect:r}=ca==null?void 0:ca();return{disconnect:T.useCallback(s=>{s===ze.btc?t():s===ze.evm?e():s===ze.sui?n():s===ze.solana&&r()},[e,t,n,r])}}const Zb=e=>p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",...e,children:[p.jsxs("g",{clipPath:"url(#clip0_13153_4297)",children:[p.jsx("path",{d:"M13 26C20.1797 26 26 20.1797 26 13C26 5.8203 20.1797 0 13 0C5.8203 0 0 5.8203 0 13C0 20.1797 5.8203 26 13 26Z",fill:"#E36E1B"}),p.jsx("path",{d:"M18.5404 9.20801L10.9206 16.7913L7.45703 13.3444",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_13153_4297",children:p.jsx("rect",{width:"26",height:"26",fill:"white"})})})]}),Yb=e=>p.jsx("svg",{width:10,height:15,viewBox:"0 0 10 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.737 6.25 6.763.876c.278-.216.623-.358.993-.409.37-.05.75-.008 1.093.122.343.13.634.343.838.613.205.27.313.584.313.906v11.139c0 .321-.108.636-.313.905-.204.27-.495.483-.838.613-.343.13-.722.173-1.093.122a2.085 2.085 0 0 1-.993-.409L.737 9.107a1.972 1.972 0 0 1-.544-.648A1.7 1.7 0 0 1 0 7.68a1.7 1.7 0 0 1 .193-.782c.127-.246.312-.467.544-.648Z",fill:"currentColor"})});function Xb(e){return e}function Kb(e){const[t,n]=T.useState(!1),r=T.useRef(()=>n(!1));T.useEffect(()=>r.current,[e]);function a(){return n(!0)}function s(){return n(Xb)}return{copied:t,copy:T.useCallback(()=>Jb(e).then(a).catch(s),[e]),reset:r.current}}function Jb(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);const t=document.createElement("span");t.textContent=e,t.style.whiteSpace="pre",document.body.appendChild(t);const n=window.getSelection();if(!n)return Promise.reject();const r=window.document.createRange();n.removeAllRanges(),r.selectNode(t),n.addRange(r);try{window.document.execCommand("copy")}catch{return Promise.reject()}return n.removeAllRanges(),window.document.body.removeChild(t),Promise.resolve()}function eh({className:e}){const[t,n]=Zf();return T.useEffect(()=>{n([[".check-circle",{pathLength:[0,1]}],[".check-mark",{opacity:[0,1],pathLength:[0,1]}]])},[t,n]),p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,ref:t,children:[p.jsx("path",{className:"check-circle",d:"M22 11.0799V11.9999C21.9988 14.1563 21.3005 16.2545 20.0093 17.9817C18.7182 19.7088 16.9033 20.9723 14.8354 21.5838C12.7674 22.1952 10.5573 22.1218 8.53447 21.3744C6.51168 20.6271 4.78465 19.246 3.61096 17.4369C2.43727 15.6279 1.87979 13.4879 2.02168 11.3362C2.16356 9.18443 2.99721 7.13619 4.39828 5.49694C5.79935 3.85768 7.69279 2.71525 9.79619 2.24001C11.8996 1.76477 14.1003 1.9822 16.07 2.85986",stroke:"#E36E1B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsx("path",{className:"check-mark",d:"M9 11L12 14L22 4",stroke:"#E36E1B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}const th=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:17,height:17,viewBox:"0 0 17 17",fill:"none",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.281 11.688v-7.97H5.312V2.126h9.563v9.563h-1.594ZM2.125 5.311h9.563v9.563H2.124V5.312Zm1.594 1.594v6.375h6.375V6.906H3.719Z",fill:"currentColor"})}),Hc=e=>p.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("rect",{width:"24",height:"24",rx:"12",fill:"#F6931A"}),p.jsx("path",{d:"M4 5.33743V8.2C4.65907 7.85754 5.3131 7.89917 5.9621 7.82934V5C5.24998 5 4.65907 5.00604 4 5.33743Z",fill:"white"}),p.jsx("path",{d:"M9.75173 5.65404C9.13228 5.4348 8.50779 5.24275 7.8786 5.11987V7.9163C8.50779 8.0287
127 9.13194 8.21008 9.75173 8.41858V5.65404Z",fill:"white"}),p.jsx("path",{d:"M7.87894 10.7127V7.91629C7.24505 7.80314 6.60612 7.75983 5.96216 7.82933V10.6587C6.60612 10.5781 7.24505 10.6107 7.87894 10.7131V10.7127Z",fill:"white"}),p.jsx("path",{d:"M4 11.0626V13.9251C4.65907 13.5602 5.3131 13.5797 5.9621 13.4877V10.6583C5.28994 10.7127 4.65907 10.7087 4 11.0626Z",fill:"white"}),p.jsx("path",{d:"M7.87891 10.7127V13.5092C8.5081 13.6002 9.13225 13.7603 9.75204 13.9476V11.1831C9.13258 10.985 8.5081 10.8141 7.87891 10.7127Z",fill:"white"}),p.jsx("path",{d:"M5.96216 13.4877V16.317C6.60612 16.2146 7.24505 16.2254 7.87894 16.3059V13.5095C7.24505 13.4178 6.60612 13.3964 5.96216 13.4877Z",fill:"white"}),p.jsx("path",{d:"M18.4516 12.2716C19.1812 11.673 19.5918 10.711 19.5918 9.72127C19.5918 8.18758 18.6332 7.55973 16.6386 7.365V6.02873C16.2142 6.00724 15.7878 5.96091 15.3587 5.89577V7.23036C14.9582 7.17295 14.5559 7.09875 14.1514 7.01246V5.66746C13.7132 5.5701 13.273 5.45829 12.8299 5.33743C12.8299 5.78934 12.8299 6.24159 12.8299 6.69351C12.4162 6.58405 12.0009 6.46688 11.5829 6.34634V9.07966C10.9772 8.85941 10.3672 8.62539 9.75208 8.41857V11.1831C10.3668 11.3799 10.9772 11.6035 11.5829 11.8133V14.5466C10.9772 14.3472 10.3672 14.134 9.75208 13.9476V16.7122C10.3668 16.8878 10.9772 17.0906 11.5829 17.2799C12.0006 17.3719 12.4162 17.4609 12.8299 17.5421C12.8299 17.9941 12.8299 18.4463 12.8299 18.8982C13.2727 18.9815 13.7132 19.0557 14.1514 19.1158V17.7708C14.5559 17.8295 14.9585 17.8762 15.3587 17.9064V19.241C15.7878 19.2696 16.2142 19.2793 16.6386 19.2649V17.939C18.8505 17.8198 20.0001 16.1011 20.0001 14.3871C20.0001 13.122 19.4108 12.5086 18.4516 12.2713V12.2716ZM14.1551 9.21093C14.5583 9.29151 14.9595 9.35967 15.3584 9.41137C15.5367 9.43454 15.7146 9.45435 15.8919 9.47046C15.9258 9.47349 15.959 9.47718 15.9916 9.48121C15.9996 9.48222 16.0077 9.48322 16.0158 9.48423C16.046 9.48792 16.0759 9.49195 16.1047 9.49665C16.1067 9.49665 16.1088 9.49732 16.1108 9.49766C16.1427 9.5027 16.1736 9.5084 16.2038 9.51411C16.2092 9.51512 16.2145 9.51613 16.2196 9.51747C16.2484 9.52318 16.2766 9.52922 16.3042 9.53594C16.3052 9.53594 16.3062 9.53627 16.3072 9.53661C16.3374 9.54399 16.3666 9.55172 16.3948 9.56011C16.3965 9.56078 16.3985 9.56112 16.4005 9.56179C16.4871 9.58764 16.5664 9.61786 16.6379 9.65378C16.9736 9.82065 17.1445 10.1067 17.1445 10.5287C17.1445 10.9588 16.9736 11.2647 16.6379 11.4198C16.5664 11.4527 16.4868 11.4786 16.4002 11.497C16.3985 11.4974 16.3965 11.4977 16.3948 11.4984C16.3663 11.5044 16.3371 11.5095 16.3069 11.5138C16.3058 11.5138 16.3048 11.5138 16.3038 11.5142C16.2763 11.5182 16.2481 11.5212 16.2192 11.5236C16.2139 11.5239 16.2088 11.5246 16.2034 11.5249C16.1732 11.5272 16.1423 11.5289 16.1104 11.5296C16.1084 11.5296 16.1064 11.5296 16.1044 11.5296C16.0755 11.5303 16.0456 11.5299 16.0154 11.5296C16.0074 11.5296 15.9993 11.5293 15.9909 11.5289C15.9583 11.5279 15.9254 11.5262 15.8912 11.5236C15.7136 11.5098 15.536 11.4923 15.3577 11.4715C14.9585 11.4252 14.5576 11.3621 14.1544 11.2869V9.21194L14.1551 9.21093ZM16.6382 15.753C16.6124 15.757 16.5859 15.7607 16.559 15.7637C16.5513 15.7647 16.5432 15.7654 16.5355 15.766C16.5157 15.7681 16.4959 
1215.7697 16.4757 15.7714C16.4663 15.7721 16.4569 15.7728 16.4475 15.7731C16.4274 15.7744 16.4069 15.7751 16.3861 15.7758C16.3774 15.7758 16.3686 15.7765 16.3596 15.7765C16.33 15.7771 16.3005 15.7771 16.2699 15.7765C15.9671 15.7704 15.6632 15.7526 15.3584 15.7254C14.9592 15.6898 14.5583 15.6378 14.1551 15.5737V13.3913C14.5583 13.4611 14.9595 13.5186 15.3584 13.5599C15.6636 13.5914 15.9674 13.6132 16.2699 13.6233C16.3005 13.6243 16.3304 13.6257 16.3596 13.6273C16.3686 13.628 16.3774 13.6284 16.3861 13.629C16.4066 13.6304 16.4274 13.6317 16.4472 13.6334C16.4566 13.6341 16.466 13.6351 16.4754 13.6357C16.4955 13.6374 16.5154 13.6398 16.5352 13.6418C16.5429 13.6428 16.5509 13.6435 16.5587 13.6445C16.5855 13.6478 16.612 13.6512 16.6379 13.6552C17.248 13.7459 17.5662 14.046 17.5662 14.6581C17.5662 15.2651 17.248 15.6516 16.6379 15.7526L16.6382 15.753Z",fill:"white"})]}),nh=e=>p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsxs("g",{clipPath:"url(#clip0_696_1363)",children:[p.jsx("path",{d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23Z",fill:"#00D395"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.89187 15.8411C6.72099 15.74 6.57922 15.5964 6.48041 15.4242C6.38161 15.252 6.32914 15.0571 6.32812 14.8586V12.6222C6.32812 12.3561 6.5495 12.1409 6.82037 12.1423C6.907 12.1423 6.99225 12.165 7.06788 12.2076L12.2262 15.1508C12.528 15.3227 12.7143 15.6389 12.7143 15.9806V18.2975C12.7139 18.3741 12.6983 18.4498 12.6685 18.5204C12.6386 18.5909 12.5951 18.6548 12.5405 18.7085C12.4859 18.7622 12.4212 18.8045 12.3501 18.8331C12.2791 18.8617 12.2031 18.8759 12.1265 18.875C12.0177 18.8751 11.9108 18.8459 11.8171 18.7904L6.89187 15.8411ZM14.5809 11.5951C14.8834 11.7669 15.0676 12.0839 15.069 12.4249V17.1274C15.069 17.2663 14.9934 17.3948 14.8689 17.4622L13.7401 18.0837C13.7255 18.0918 13.7101 18.098 13.694 18.1023V15.4911C13.694 15.1529 13.5132 14.8394 13.2155 14.6661L8.68625 12.0138V9.06644C8.68625 8.80038 8.90763 8.58519 9.17919 8.58656C9.26571 8.58669 9.35073 8.60919 9.426 8.65188L14.5823 11.5951H14.5809ZM16.8393 8.12181C17.1418 8.29369 17.3281 8.60994 17.3281 8.953V15.8211C17.3273 15.8909 17.3076 15.9592 17.2712 16.0187C17.2347 16.0782 17.1829 16.1268 17.1212 16.1594L16.0507 16.7252V11.9429C16.0507 11.6054 15.8692 11.2926 15.5743 11.1186L10.9433 8.40094V5.60625C10.9433 5.521 10.9674 5.43781 11.0093 5.36425C11.0767 5.25368 11.1845 5.17369 11.3099 5.14122C11.4353 5.10876 11.5684 5.12636 11.681 5.19031L16.8393 8.12181Z",fill:"white"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_696_1363",children:p.jsx("rect",{width:"22",height:"22",fill:"white",transform:"translate(1 1)"})})})]}),rh=e=>p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsxs("g",{clipPath:"url(#clip0_696_1340)",children:[p.jsx("mask",{id:"mask0_696_1340",style:"mask-type:luminance",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:p.jsx("path",{d:"M24 0H0V24H24V0Z",fill:"white"})}),p.jsxs("g",{mask:"url(#mask0_696_1340)",children:[p.jsx("path",{d:"M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",fill:"#7543E3"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.05698 9.49768C9.03047 9.72034 9.00396 9.95361 8.98806 10.1869C8.58514 10.4679 8.20873 10.7541 7.85883 11.0404C7.67858 11.1889 7.50363 11.3373 7.33928 11.4911C6.04571 10.171 5.49435 8.98343 5.84955 8.37376C6.16234 7.833 7.21205 7.67926 8.68587 7.97084C8.74419 7.71637 8.8025 7.4725 8.87142 7.23923C7.08481 6.87873 5.72232 7.1173 5.20807 8.00265C5.07023 8.23592 5.00131 8.50099 5.00131 8.78197V8.80848C5.01191 10.0649 6.24717 11.7455 8.30946 13.3307C8.52152 13.495 8.74949 13.6594 8.98276 13.8237C9.02517 14.338 9.08879 14.831 9.16831 15.2922C9.20542 15.499 9.24253 15.7005 9.28494 15.8966C7.49833 16.3579 6.19946 16.2412 5.84425 15.6315C5.53146 15.0908 5.92378 14.0994 6.90986 12.9702L6.39561 12.4294C5.17626 13.8078 4.68852 15.1173 5.20277 16.008C5.56327 16.6335 6.3426 16.9304 7.3923 16.9304C8.4473 16.9304 9.77268 16.6282 11.2253 16.0398
12C11.2624 16.0239 11.2995 16.008 11.3419 15.992C11.5964 15.886 11.8509 15.7747 12.1107 15.6528C12.1213 15.6474 12.1319 15.6421 12.1425 15.6368C12.6037 15.8489 13.0596 16.0398 13.5103 16.2041C13.7064 16.2783 13.9026 16.3419 14.0934 16.4056C13.6004 18.1869 12.8476 19.2578 12.1425 19.2578C11.5169 19.2578 10.8542 18.4201 10.3718 16.9887C10.1279 17.0736 9.88932 17.1478 9.65075 17.2114C10.2339 18.9397 11.1193 20 12.1425 20C13.6322 20 14.8197 17.7628 15.228 14.5023C15.2545 14.2797 15.2757 14.0464 15.2969 13.8184C15.7157 13.5268 16.108 13.2247 16.4738 12.9172C16.495 12.9013 16.5162 12.8854 16.5374 12.8641C16.6753 12.7475 16.8078 12.6309 16.9403 12.5089C18.2392 13.8237 18.7906 15.0166 18.4354 15.6262C18.1438 16.1299 17.1842 16.2995 15.8694 16.0822C15.7793 16.0663 15.6945 16.0504 15.6044 16.0345C15.546 16.2836 15.4877 16.5222 15.4188 16.7555C15.5301 16.7767 15.6415 16.7979 15.7475 16.8138C16.1663 16.8827 16.5533 16.9198 16.9085 16.9198C17.9741 16.9198 18.7323 16.607 19.0822 16.0027C19.5487 15.1968 19.2094 14.0252 18.1226 12.7104C17.5606 12.0265 16.829 11.3373 15.9808 10.6799C15.7634 10.5103 15.5354 10.3459 15.3075 10.1816C15.2651 9.66733 15.2014 9.17429 15.1166 8.70775C15.0795 8.50099 15.0424 8.29954 15 8.10338C15.3022 8.02386 15.5938 7.96024 15.8747 7.91253C17.1895 7.69516 18.1491 7.86481 18.4407 8.36846C18.7482 8.89861 18.3718 9.86879 17.4175 10.9768C17.603 11.1571 17.7727 11.3373 17.9317 11.5123C18.0006 11.438 18.0643 11.3585 18.1226 11.2843C19.2041 9.96952 19.5487 8.79788 19.0822 7.99205C18.6156 7.18622 17.4334 6.89463 15.7528 7.17561C14.9735 7.30285 14.1199 7.55202 13.2346 7.89132C13.1975 7.90722 13.1657 7.91783 13.1285 7.93373C12.8317 8.05036 12.5348 8.1776 12.2379 8.31544C12.2114 8.32604 12.1849 8.34195 12.1584 8.35255C11.6918 8.13519 11.2306 7.93903 10.7853 7.77469C10.5891 7.70046 10.393 7.63685 10.2021 7.57323C10.6951 5.79722 11.448 4.72631 12.1531 4.72631C12.7786 4.72631 13.4466 5.56925 13.9291 7.00066C14.1729 6.92114 14.4115 6.84692 14.6501 6.778C14.051 5.06561 13.1657 4 12.1372 4C10.6527 4 9.45989 6.23724 9.05698 9.49768ZM13.7965 9.2273C13.7859 9.2167 13.77 9.2114 13.7594 9.2061C13.5103 9.06296 13.2558 8.92512 13.0119 8.79258C13.0331 8.78197 13.0543 8.77137 13.0755 8.76607C13.3777 8.63883 13.6799 8.5222 13.9715 8.42147C14.0722 8.38436 14.1729 8.35255 14.2684 8.32074C14.3108 8.5169 14.3479 8.71306 14.385 8.91982C14.4274 9.15838 14.4592 9.40225 14.491 9.65142C14.2631 9.50828 14.0298 9.36514 13.7965 9.2273ZM9.88932 8.94632C9.92643 8.72896 9.96354 8.5222 10.0113 8.32074C10.2074 8.38436 10.4036 8.44798 10.605 8.5275C10.8224 8.60702 11.045 8.69715 11.273 8.79258C11.0238 8.92512 10.7694 9.06296 10.5202 9.2061C10.5096 9.2114 10.499 9.2167 10.4884 9.2273C10.2498 9.36514 10.0166 9.50828 9.78859 9.65142C9.8204 9.40755 9.85221 9.17429 9.88932 8.94632ZM10.8913 14.163C10.7111 14.0623 10.5361 13.9563 10.3665 13.8502C10.1332 13.7071 9.91052 13.564 9.69316 13.4155C9.66135 12.9649 9.64545 12.493 9.64545 12.0053C9.64545 11.7508 9.65075 11.5017 9.66135 11.2578C9.67195 11.0298 9.68256 10.8125 9.69846 10.5951C10.0749 10.3406 10.4725 10.0915 10.8913 9.84758C11.0504 9.75215 11.2147 9.66203 11.3737 9.5772C11.6282 9.43936 11.8827 9.31213 12.1372 9.18489C12.5454 9.38105 12.9589 9.60371 13.383 9.84758C13.5633 9.95361 13.7382 10.0543 13.9079 10.1604C14.1411 10.3035 14.3638 10.4467 14.5812 10.5951C14.613 11.0457 14.6289 11.5176 14.6289 12.0053C14.6289 12.2598 14.6236 12.5089 14.613 12.7528C14.6024 12.9755 14.5918 13.1981 14.5759 13.4155C14.1995 13.67 13.8018 13.9192 13.383 14.163C13.2717 14.2266 13.1657 14.2903 13.0543 14.3486C12.7733 14.5076 12.4924 14.6508 12.2167 14.7886C12.1902 14.7992 12.1637 14.8151 12.1372 14.8257C11.7236 14.6243 11.3048 14.4016 10.8913 14.163ZM8.27235 12.3446C8.13451 12.2333 8.00728 12.1166 7.88004 12.0053C8.05499 11.8516 8.23524 11.6925 8.4261 11.5388C8.58514 11.4115 8.74949 11.279 8.92444 11.1518C8.91384 11.3638 8.90853 11.5812 8.90853 11.7985C8.90853 11.8675 8.90853 11.9364 8.90853 12.0053C8.90853 12.2969 8.91384 12.5779 8.92444 12.8588C8.69647 12.6892 8.47381 12.5195 8.27235 12.3446ZM15.3711 12.2174C15.3711 12.1484 15.3711 12.0795 15.3711 12.0053C15.3711 11.7137 15.3658 11.4327 15.3552 11.1518C15.5832 11.3214 15.8005 11.4964 16.0073 11.666C16.1398 11.7773 16.2724 11.894 16.3943 12.0053C16.2564 12.1272 16.1133 12.2545 15.9649 12.3764C15.9437 12.3923 15.9225 12.4135 15.9012 12.4294C15.7263 12.5726 15.54
1207 12.721 15.3499 12.8641C15.3605 12.6521 15.3711 12.4347 15.3711 12.2174ZM9.89462 15.0908C9.85221 14.8522 9.8204 14.6084 9.78859 14.3592C10.0166 14.5023 10.2445 14.6402 10.4831 14.778C10.4937 14.7886 10.5096 14.7939 10.5202 14.7992C10.7694 14.9423 11.0185 15.0802 11.273 15.2127C11.273 15.2127 11.2677 15.2127 11.2677 15.218C11.0026 15.3294 10.7429 15.4301 10.4884 15.5255C10.4513 15.5414 10.4142 15.552 10.3771 15.5679C10.2551 15.6103 10.1332 15.6528 10.0113 15.6899C9.96884 15.499 9.93173 15.2975 9.89462 15.0908ZM13.6746 15.4831C13.4519 15.3983 13.2293 15.3135 13.0013 15.218C13.0331 15.2021 13.0649 15.1862 13.0967 15.1703C13.3141 15.0537 13.5315 14.9317 13.7541 14.8098C13.8177 14.7727 13.8814 14.7356 13.9397 14.6985C14.1252 14.5871 14.3055 14.4758 14.4857 14.3645C14.4539 14.603 14.4221 14.8416 14.385 15.0643C14.3479 15.2816 14.3055 15.4884 14.2631 15.6952C14.0722 15.6262 13.8761 15.5573 13.6746 15.4831ZM11.1829 12.0053C11.1829 11.4805 11.6123 11.051 12.1372 11.051C12.662 11.051 13.0914 11.4805 13.0914 12.0053C13.0914 12.5302 12.662 12.9596 12.1372 12.9596C11.6123 12.9596 11.1829 12.5302 11.1829 12.0053Z",fill:"white"})]})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_696_1340",children:p.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),ah=e=>p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsxs("g",{clipPath:"url(#clip0_696_1335)",children:[p.jsx("path",{d:"M12 0C18.628 0 24 5.37305 24 12C24 18.628 18.628 24 12 24C5.37305 24 0 18.6275 0 12C0 5.37305 5.37305 0 12 0Z",fill:"#F5AC37"}),p.jsx("path",{d:"M12.4423 12.8473H17.0021C17.0993 12.8473 17.1452 12.8473 17.1522 12.7198C17.1894 12.256 17.1894 11.7894 17.1522 11.325C17.1522 11.2348 17.1074 11.1976 17.0096 11.1976H7.93483C7.82251 11.1976 7.79227 11.2348 7.79227 11.3401V12.675C7.79227 12.8473 7.79227 12.8473 7.97209 12.8473H12.4423ZM16.643 9.63748C16.6559 9.60346 16.6559 9.5662 16.643 9.53272C16.5668 9.36693 16.4766 9.20871 16.3719 9.06021C16.2142 8.80641 16.0284 8.57259 15.8168 8.36252C15.7169 8.23562 15.6013 8.12168 15.4717 8.02502C14.8226 7.47259 14.0509 7.08163 13.2215 6.88507C12.803 6.79111 12.3753 6.74629 11.9465 6.75007H7.91917C7.80685 6.75007 7.79173 6.79489 7.79173 6.89263V9.55486C7.79173 9.66718 7.79173 9.69742 7.93429 9.69742H16.589C16.589 9.69742 16.664 9.6823 16.6791 9.63748H16.6424H16.643ZM16.643 14.4073C16.5155 14.3933 16.387 14.3933 16.2596 14.4073H7.94239C7.83007 14.4073 7.79227 14.4073 7.79227 14.5575V17.1603C7.79227 17.2802 7.79227 17.3104 7.94239 17.3104H11.7824C11.966 17.3245 12.1496 17.3115 12.3294 17.2732C12.8867 17.2332 13.4348 17.1122 13.9575 16.913C14.1476 16.8471 14.3312 16.7612 14.5045 16.6581H14.5569C15.4571 16.1899 16.1883 15.4544 16.6494 14.5515C16.6494 14.5515 16.7018 14.4381 16.643 14.4084V14.4073ZM6.28512 18.6599V18.6151V16.8676V16.2752V14.5126C6.28512 14.4149 6.28512 14.4003 6.16523 14.4003H4.53766C4.44748 14.4003 4.41022 14.4003 4.41022 14.2804V12.8554H6.15011C6.24732 12.8554 6.28512 12.8554 6.28512 12.7279V11.318C6.28512 11.2278 6.28512 11.2057 6.16523 11.2057H4.53766C4.44748 11.2057 4.41022 11.2057 4.41022 11.0858V9.766C4.41022 9.68338 4.41022 9.66124 4.5301 9.66124H6.14255C6.25488 9.66124 6.28512 9.66124 6.28512 9.51868V5.47619C6.28512 5.35631 6.28512 5.32607 6.43524 5.32607H12.0599C12.4682 5.34227 12.8737 5.38709 13.2749 5.46107C14.1017 5.6139 14.896 5.90928 15.6223 6.33102C16.104 6.61453 16.5474 6.95689 16.9421 7.35109C17.2391 7.65944 17.507 7.99316 17.7446 8.34848C17.9806 8.70867 18.1766 9.09369 18.3305 9.496C18.3494 9.60076 18.4498 9.6715 18.5546 9.65368H19.897C20.0693 9.65368 20.0693 9.65368 20.0769 9.81892V11.0491C20.0769 11.1689 20.032 11.1992 19.9116 11.1992H18.8764C18.7717 11.1992 18.7414 11.1992 18.749 11.3342C18.79 11.791 18.79 12.2495 18.749 12.7063C18.749 12.8338 18.749 12.8489 18.8921 12.8489H20.0763C20.1287 12.9164 20.0763 12.9839 20.0763 13.0519C20.0839 13.1389 20.0839 13.2269 20.0763 13.3138V14.2216C20.0763 14.349 20.0391 14.3868 19.9262 14.3868H18.5087C18.4099 14.3679 18.3137 14.4311 18.2911 14.5294C17.9536 15.4069 17.4135 16.1937 16.7159 16.8244C16.461 17.0539 16.1931 17.2699 15.9134 17.4692C15.6132 17.642 15.321 17.8218 15.0132 17.9644C14.4468 18.2192 13.8528 18.4072 13.2431 18.5265C12.6642 18.6302 12.0772 18.6772 11.4881 18.6691H6.28296V18.6615L6.28512 18.6599Z",fill:"#FEFEFD"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_696_1335",children:p.jsx("rect",{width:"24",height:"24",fill:"white"})})})]}),sh=e=>p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("rect",{width:"24",height:"24",rx:"12",fill:"#F0B90B"}),p.jsxs("g",{clipPath:"url(#clip0_696_1377)",children:[p.jsx("path",{d:"M11.9664 3.99999L13.9402 6.01528L8.97006 10.9705L6.99628 9.00266L11.9664 3.99999Z",fill:"white"}),p.jsx("path",{d:"M14.9627 6.98737L16.9365 9.00266L8.97006 16.9453L6.99628 14.9774L14.9627 6.98737Z",fill:"white"}),p.jsx("path",{d:"M5.97372 9.97474L7.9475 11.99L5.97372 13.9579L3.99994 11.99L5.97372 9.97474Z",fill:"white"}),p.jsx("path",{d:"M17.9591 9.97474L19.9329 11.99L11.9664 19.9327L9.99261 17.9648L17.9591 9.97474Z",fill:"white"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_696_1377",children:p.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(4 4)"})})})]}),ih={BITLAYER:Hc,BNB:Zp,COMP:nh,ETH:qp,USDC:Pi,"USDC.E":Pi,USDT:Xf,XRP:rh,DAI:ah,BUSD:sh,BTC:Ni,WBTC:Ni,BRC:Yf,ORDI:"/images/tokens/brc20-ordi.png",SATS:"/images/tokens/brc20-sats.png",RATS:"/images/tokens/brc20-rats.png","840106:129":"/images/tokens/rune-titan.png","840000:22":"/images/tokens/rune-840000-22.png","840000:28":"/images/tokens/rune-840000-28.png","840000:3":"/images/tokens/rune-840000-3.png",PIZZA:ra("/images/tokens/brc20-pizza.a70f682024.png"),CORE:ra("/images/tokens/brc20-core.5962f5c5f5.png"),"𝛑":ra("/images/tokens/brc20-pi.a87db1600d.png"),"BTR-BTR":_p},oh={0:"native",1:"brc20",2:"rune",3:"erc20",4:"erc721",5:"erc1155"},lh=new Zo("https://dev-asset-api.bitlayerapps.org"),ch=new Zo("https://asset-
12api.bitlayer.org");class _c{constructor(t){zt(this,"client");zt(this,"getBTCAssets",async t=>this.client.request("post","/asset/api/btc",{btc_address:t}));zt(this,"getERC20Assets",async(t,n)=>this.client.request("post","/asset/api/erc20",{btr_address:t,chain_id:n}));zt(this,"getERC721Assets",async(t,n)=>this.client.request("post","/asset/api/erc721",{btr_address:t,chain_id:n}));zt(this,"getERC1155Assets",async(t,n)=>this.client.request("post","/asset/api/erc1155",{btr_address:t,chain_id:n}));t.setMode("cors"),this.client=t}}const uh=new _c(ch),dh=new _c(lh),ph=({testnet:e=!1})=>e?dh:uh,fh={"DOG-GO-TO-THE-MOON":"840000:3"},yh=e=>{const[t,n]=e.split("_"),r=(n||t).toUpperCase();return fh[r]||r},mh={"840000:3":"DOG•GO•TO•THE•MOON","USDC.E":"USDC.e"};function bh(e){return mh[e]||e}const hh=({type:e,address:t,chain:n})=>{const r=n;return Jp({queryKey:["walletAssets",e,t,r],queryFn:async a=>{var l,u;if(!r)return{total:0,list:[]};const s=r.chain.id,i=r.chain.nativeCurrency.symbol;if(!a.queryKey[2])throw new Error("Invalid address");const o=ph({testnet:r.testnet});if(e===ft.ERC721||e===ft.ERC1155){const c=await o[`get${e}Assets`](t,s);return c.data?{total:c.data.length,list:c.data}:{total:0,list:[]}}else if(e===ft.NFT){const c=await o.getERC721Assets(t,s).catch(()=>({data:[]})),d=await o.getERC1155Assets(t,s).catch(()=>({data:[]})),f=((c==null?void 0:c.data)||[]).concat((d==null?void 0:d.data)||[]);return{total:f.length,list:f}}else{const c=await o[`get${e}Assets`](t,s),d=((l=c.data)==null?void 0:l.total_value)||0,f=(((u=c.data)==null?void 0:u.asset_list)||[]).map(h=>{const w=yh(h.asset_id),y=new xi(h.balance).times(h.price||1).toString(),A={id:w,icon:ih[w],symbol:w,name:bh(w),type:oh[h.asset_type]},v={decimals:h.decimal,value:h.balance,formatted:h.balance};return{...h,...A,balance:v,usdBalance:y}}).sort((h,w)=>{const y=new xi(h.balance.formatted).minus(w.balance.formatted);return y.eq(0)?(w.rank||0)-(h.rank||0):y.gt(0)?-1:1}),b=f.filter(h=>h.symbol===i).concat(f.filter(h=>h.symbol!==i));return{total:d,list:b}}}})},gh=({token:e,className:t})=>!e||!e.icon?null:e.icon instanceof Function?p.jsx(e.icon,{className:t}):p.jsx("img",{src:e.icon,alt:e.name,className:X("bl-rounded-full",t)});var wh=typeof ar=="object"&&ar&&ar.Object===Object&&ar,vh=typeof self=="object"&&self&&self.Object===Object&&self,qc=wh||vh||Function("return this")(),vr=qc.Symbol,Zc=Object.prototype,Ah=Zc.hasOwnProperty,xh=Zc.toString,An=vr?vr.toStringTag:void 0;function Th(e){var t=Ah.call(e,An),n=e[An];try{e[An]=void 0;var r=!0}catch{}var a=xh.call(e);return r&&(t?e[An]=n:delete e[An]),a}var Ch=Object.prototype,Eh=Ch.toString;function Ih(e){return Eh.call(e)}var Rh="[object Null]",Mh="[object Undefined]",no=vr?vr.toStringTag:void 0;function Bh(e){return e==null?e===void 0?Mh:Rh:no&&no in Object(e)?Th(e):Ih(e)}function Ph(e){return e!=null&&typeof e=="object"}var kh="[object Symbol]";function Nh(e){return typeof e=="symbol"||Ph(e)&&Bh(e)==kh}var Sh=/\s/;function $h(e){for(var t=e.length;t--&&Sh.test(e.charAt(t)););return t}var Oh=/^\s+/;function jh(e){return e&&e.slice(0,$h(e)+1).replace(Oh,"")}function Ar(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ro=NaN,Fh=/^[-+]0x[0-9a-f]+$/i,Lh=/^0b[01]+$/i,Dh=/^0o[0-7]+$/i,zh=parseInt;function ao(e){if(typeof e=="number")return e;if(Nh(e))return ro;if(Ar(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ar(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jh(e);var n=Lh.test(e);return n||Dh.test(e)?zh(e.slice(2),n?2:8):Fh.test(e)?ro:+e}var pa=function(){return qc.Date.now()},Qh="Expected a function",Vh=Math.max,Uh=Math.min;function fr(e,t,n){var r,a,s,i,o,l,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(Qh);t=ao(t)||0,Ar(n)&&(c=!!n.leading,d="maxWait"in n,s=d?Vh(ao(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function m(C){var I=r,M=a;return r=a=void 0,u=C,i=e.apply(M,I),i}function b(C){return u=C,o=setTimeout(y,t),c?m(C):i}function h(C){var I=C-l,M=C-u,R=t-I;return d?Uh(R,s-M):R}function w(C){var I=C-l,M=C-u;return l===void 0||I>=t||I<0||d&&M>=s}function y(){var C=pa();if(w(C))return A(C);o=setTimeout(y,h(C))}function A(C){return o=void 0,f&&r?m(C):(r=a=void 0,i)}function v(){o!==void 0&&clearTimeout(o),u=0,r=l=a=o=void 0}function g(){return o===void 0?i:A(pa())}function x(){var C=pa(),I=w(C);if(r=arguments,a=this,l=C,I){if(o===void 0)return b(l);if(d)return clearTimeout(o),o=setTimeout(y,t),m(l)}return o===void 0&&(o=setTimeout(y,t)),i}return x.cancel=v,x.flush=g,x}var Wh="Expected a function";function Gh(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(Wh);return Ar(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),fr(e,t,{leading:r,maxWait:t,trailing:a})}var Zt=function(){return Zt=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Zt.apply(this,arguments)};function Yc(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Xc(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Kc=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,a){var s=a.name.match(/data-simplebar-(.+)/);if(s){var i=s[1].replace(/\W+(.)/g,function(o,l){return l.toUpperCase()});switch(a.value){case"true":r[i]=!0;break;case"false":r[i]=!1;break;case void 0:r[i]=!0;break;default:r[i]=a.value}}return r},t);return n};
12function Jc(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function eu(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function tu(e){return".".concat(e.split(" ").join("."))}var qs=!!(typeof window<"u"&&window.document&&window.document.createElement),Hh=Object.freeze({__proto__:null,addClasses:Jc,canUseDOM:qs,classNamesToQuery:tu,getElementDocument:Xc,getElementWindow:Yc,getOptions:Kc,removeClasses:eu}),Ht=null,so=null;qs&&window.addEventListener("resize",function(){so!==window.devicePixelRatio&&(so=window.devicePixelRatio,Ht=null)});function io(){if(Ht===null){if(typeof document>"u")return Ht=0,Ht;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Ht=n}return Ht}var lt=Yc,fa=Xc,_h=Kc,ct=Jc,ut=eu,xe=tu,xn=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var a=lt(r.el);r.scrollXTicking||(a.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(a.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,ct(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){ut(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(ct(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){ut(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(a){r.mouseX=a.clientX,r.mouseY=a.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(a){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var s,i;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(s=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(i=r.isWithinBounds(r.axis.y.track.rect)),(s||i)&&(a.stopPropagation(),a.type==="pointerdown"&&a.pointerType!=="touch"&&(s&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(a,"x"):r.onTrackClick(a,"x")),i&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(a,"y"):r.onTrackClick(a,"y"))))}},this.drag=function(a){var s,i,o,l,u,c,d,f,m,b,h;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,y=r.axis[r.draggedAxis].track,A=(i=(s=y.rect)===null||s===void 0?void 0:s[r.axis[r.draggedAxis].sizeAttr])!==null&&i!==void 0?i:0,v=r.axis[r.draggedAxis].scrollbar,g=(l=(o=r.contentWrapperEl)===null||o===void 0?void 0:o[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&l!==void 0?l:0,x=parseInt((c=(u=r.elStyles)===null||u===void 0?void 0:u[r.axis[r.draggedAxis].sizeAttr])!==null&&c!==void 0?c:"0px",10);a.preventDefault(),a.stopPropagation(),r.draggedAxis==="y"?w=a.pageY:w=a.pageX;var C=w-((f=(d=y.rect)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].offsetAttr])!==null&&f!==void 0?f:0)-r.axis[r.draggedAxis].dragOffset;C=r.draggedAxis==="x"&&r.isRtl?((b=(m=y.rect)===null||m===void 0?void 0:m[r.axis[r.draggedAxis].sizeAttr])!==null&&b!==void 0?b:0)-v.size-C:C;var I=C/(A-v.size),M=I*(g-x);r.draggedAxis==="x"&&r.isRtl&&(M=!((h=e.getRtlHelpers())===null||h===void 0)&&h.isScrollingToNegative?-M:M),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=M}},this.onEndDrag=function(a){r.isDragging=!1;var s=fa(r.el),i=lt(r.el);a.preventDefault(),a.stopPropagation(),ut(r.el,r.classNames.dragging),r.onStopScrolling(),s.removeEventListener("mousemove",r.drag,!0),s.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=i.setTimeout(function(){s.removeEventListener("click",r.preventClick,!0),s.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(a){a.preventDefault(),a.stopPropagation()},this.el=t,this.options=Zt(Zt({},e.defaultOptions),n),this.classNames=Zt(Zt({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=Gh(this._onMouseMove,64),this.onWindowResize=fr(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fr(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fr(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var a=e.getOffset(n),s=e.getOffset(r);n.scrollLeft=-999;var i=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:a.left!==s.left,isScrollingToNegative:s.left!==i.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:io()}catch{return io()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=fa(t),a=lt(t);return{top:n.top+(a.pageYOffset||r.documentElement.scrollTop),left
12:n.left+(a.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){qs&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(xe(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(xe(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(xe(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(xe(this.classNames.offset)),this.maskEl=this.el.querySelector(xe(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,xe(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(xe(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(xe(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(xe(this.classNames.track)).concat(xe(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(xe(this.classNames.track)).concat(xe(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(xe(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(xe(this.classNames.scrollbar)))||null,this.options.autoHide||(ct(this.axis.x.scrollbar.el,this.classNames.visible),ct(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=lt(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var a=!1,s=r.ResizeObserver||ResizeObserver;this.resizeObserver=new s(function(){a&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){a=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=lt(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,a=this.heightAutoObserverEl.offsetWidth<=1||n>0,s=this.contentWrapperEl.offsetWidth,i=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var l=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=a?"".concat(n||u,"px"):"auto",this.placeholderEl.style.height="".concat(l,"px");var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&u>n,this.axis.y.isOverflowing=l>c,this.axis.x.isOverflowing=i==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=o==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var d=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>s-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>c-d,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var a=this.contentEl[this.axis[t].scrollSizeAttr],s=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,i=s/a,o;return o=Math.max(~~(i*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(o=Math.min(o,this.options.scrollbarMaxSize)),o},e.prototype.positionScrollbar=function(t){var n,r,a;t===void 0&&(t="y");var s=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!s.el||!this.elStyles)){var i=this.contentWrapperEl[this.axis[t].scrollSizeAttr],o=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[t].sizeAttr],10),u=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];u=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-u:u,t==="x"&&this.isRtl&&(u=!((a=e.getRtlHelpers())===null||a===void 0)&&a.isScrollingToNegative?u:-u);var c=u/(i-l),d=~~((o-s.size)*c);d=t==="x"&&this.isRtl?-d+(o-s.size):d,s.el.style.transform=t==="x"?"translate3d(".concat(d,"px, 0, 0)"):"translate3d(0, ".concat(d,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(ct(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(ut(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),ct(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?ct(n.scrollbar.el,this.classNames.hover):ut(n.scrollbar.el,this.classNames.hover)):(ut(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),ut(this.axis[t].track.el,this.classNames.hover),ut(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var a=fa(this.el),s=lt(this.el),i=this.axis[n].scrollbar,o=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=o-(((r=i.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,ct(this.el,this.classNames.dragging),a.addEventListener("mousemove",this.drag,!0),a.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(a.addEventListener("click",this.preventClick,!0),a.addEventListener("dblclick",this.preventClick,!0)):(s.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,a,s,i,o;n===void 0&&(n="y");var l=this.axis[n];if(!(!this.options.clickOnTrack||!l.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var u=lt(this.el);this.axis[n].scrollbar.rect=l.scrollbar.el.getBoundingClientRect();var c=this.axis[n].scrollbar,d=(s=(a=c.rect)===null||a===void 0?void 0:a[this.axis[n].offsetAttr])!==null&&s!==void 0?s:0,f=parseInt((o=(i=this.elStyles)===null||i===void 0?void 0:i[this.axis[n].sizeAttr])!==null&&o!==void 0?o:"0px",10),m=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],b=n==="y"?this.mouseY-d:this.mouseX-d,h=b<0?-1:1,w=h===-1?m-f:m+f,y=40,A=function(){r.contentWrapperEl&&(h===-1?m>w&&(m-=y,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,u.requestAnimationFrame(A)):m<w&&(m+=y,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,u.requestAnimationFrame(A)))};A()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=lt(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(a){return r.call(a,n)})[0]}
12,e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=_h,e.helpers=Hh,e}(),Re=function(){return Re=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Re.apply(this,arguments)};function qh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}var nu=T.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,a=r===void 0?{}:r,s=qh(e,["children","scrollableNodeProps"]),i=T.useRef(),o=T.useRef(),l=T.useRef(),u={},c={};Object.keys(s).forEach(function(m){Object.prototype.hasOwnProperty.call(xn.defaultOptions,m)?u[m]=s[m]:c[m]=s[m]});var d=Re(Re({},xn.defaultOptions.classNames),u.classNames),f=Re(Re({},a),{className:"".concat(d.contentWrapper).concat(a.className?" ".concat(a.className):""),tabIndex:u.tabIndex||xn.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||xn.defaultOptions.ariaLabel});return T.useEffect(function(){var m;return o.current=f.ref?f.ref.current:o.current,i.current&&(m=new xn(i.current,Re(Re(Re({},u),o.current&&{scrollableNode:o.current}),l.current&&{contentNode:l.current})),typeof t=="function"?t(m):t&&(t.current=m)),function(){m==null||m.unMount(),m=null,typeof t=="function"&&t(null)}},[]),T.createElement("div",Re({"data-simplebar":"init",ref:i},c),T.createElement("div",{className:d.wrapper},T.createElement("div",{className:d.heightAutoObserverWrapperEl},T.createElement("div",{className:d.heightAutoObserverEl})),T.createElement("div",{className:d.mask},T.createElement("div",{className:d.offset},typeof n=="function"?n({scrollableNodeRef:o,scrollableNodeProps:Re(Re({},f),{ref:o}),contentNodeRef:l,contentNodeProps:{className:d.contentEl,ref:l}}):T.createElement("div",Re({},f),T.createElement("div",{className:d.contentEl},n)))),T.createElement("div",{className:d.placeholder})),T.createElement("div",{className:"".concat(d.track," simplebar-horizontal")},T.createElement("div",{className:d.scrollbar})),T.createElement("div",{className:"".concat(d.track," simplebar-vertical")},T.createElement("div",{className:d.scrollbar})))});nu.displayName="SimpleBar";const Zh=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e,children:p.jsx("path",{d:"M18.3643 15.5353L16.9501 14.1211L18.3643 12.7069C20.3169 10.7543 20.3169 7.58848 18.3643 5.63586C16.4117 3.68323 13.2458 3.68323 11.2932 5.63586L9.87898 7.05007L8.46477 5.63586L9.87898 4.22164C12.6127 1.48797 17.0448 1.48797 19.7785 4.22164C22.5122 6.95531 22.5122 11.3874 19.7785 14.1211L18.3643 15.5353ZM15.5358 18.3638L14.1216 19.778C11.388 22.5116 6.9558 22.5116 4.22213 19.778C1.48846 17.0443 1.48846 12.6121 4.22213 9.8785L5.63634 8.46428L7.05056 9.8785L5.63634 11.2927C3.68372 13.2453 3.68372 16.4111 5.63634 18.3638C7.58896 20.3164 10.7548 20.3164 12.7074 18.3638L14.1216 16.9495L15.5358 18.3638ZM14.8287 7.75718L16.243 9.17139L9.17188 16.2424L7.75766 14.8282L14.8287 7.75718Z",fill:"currentColor"})}
vendor: 22,082 bytes, line 12
12),ya=iy(void 0),Sn=[{inputs:[],name:"AccessControlBadConfirmation",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"bytes32",name:"neededRole",type:"bytes32"}],name:"AccessControlUnauthorizedAccount",type:"error"},{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"AddressInsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"EnforcedPause",type:"error"},{inputs:[],name:"ExpectedPause",type:"error"},{inputs:[],name:"FailedInnerCall",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"SafeERC20FailedOperation",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"string",name:"btcReceiver",type:"string"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"CrossoutBurned",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"CrossoutFeeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"btcTxHash",type:"string"},{indexed:!0,internalType:"bytes32",name:"blExecHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"DirectMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldFeeAddress",type:"address"},{indexed:!1,internalType:"address",name:"newFeeAddress",type:"address"}],name:"FeeAddressSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"LiquidityAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"LiquidityRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"prevFee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newFee",type:"uint256"}],name:"LockFeeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldMax",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newMax",type:"uint256"}],name:"MaxLockAmountSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldMin",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newMin",type:"uint256"}],name:"MinLockAmountSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"btcTxHash",type:"string"},{indexed:!0,internalType:"bytes32",name:"blExecHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"MintExecuted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"btcTxHash",type:"string"},{indexed:!0,internalType:"bytes32",name:"blExecHash",type:"bytes32"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"MintProposed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"limit",type:"uint256"}],name:"MintSplitLineSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"from",type:"address"},{indexed:!1,internalType:"string",name:"btcReceiver",type:"string"},{indexed:!1,internalType:"uint256",name:"lockedAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"NativeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"txHash",type:"string"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"NativeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"blocknumber",type:"uint256"}],name:"NewPeriodStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"periodInterval",type:"uint256"}],name:"PeriodIntervalSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"limit",type:"uint256"}],name:"PeriodMintLimitSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"periodLimit",type:"uint256"},{indexed:!1,internalType:"uint256",name:"periodInterval",type:"uint256"},{indexed:!1,internalType:"uint256",name:"mintSplitLine",type:"uint256"},{indexed:!1,internalType:"uint256",name:"crossoutFee",type:"uint256"}],name:"TokenInited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"AdminRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ExecutorRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"LiquidityRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"MinterRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PauseRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"ProposerRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"UnlockRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"string",name:"btcReceiver",type:"string"}],name:"crossoutBurn",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"string",name:"btcTxHash",type:"string"},{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct BitlayerBridgeV2.MintInfo",name:"mInfo",type:"tuple"}],name:"directMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"blExecHash",type:"bytes32"}],name:"executeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"executedBtcHash",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeAddress",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getPeriodInfo",outputs:[{internalType:"uint256",name:"periodLimit",type:"uint256"},{internalType:"uint256",name:"leftQuota",type:"uint256"},{internalType:"uint256",name:"leftBlocksToNextPeriod",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"periodLimit",type:"uint256"},{internalType:"uint256",name:"periodInterval",type:"uint256"},{internalType:"uint256",name:"mintSplitLine",type:"uint256"},{internalType:"uint256",name:"crossoutFee",type:"uint256"}],name:"initToken",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"admin",type:"address"},{internalType:"address[]",name:"pausers",type:"address[]"},{internalType:"address[]",name:"unlockers",type:"address[]"},{internalType:"address[]",name:"liquiditiers",type:"address[]"},{internalType:"address payable",name:"_feeAddress",type:"address"},{internalType:"uint256",name:"_lockFeeAmount",type:"uint256"},{internalType:"uint256",name:"_minLockAmount",type:"uint256"},{internalType:"uint256",name:"_maxLockAmount",type:"uint256"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"holder",type:"address"}],name:"liquidityOf",outputs:[{internalType:"uint256",name:"amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"to",type:"string"}],name:"lock",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"lockFeeAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLockAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"minLockAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"string",name:"btcTxHash",type:"string"},{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct BitlayerBridgeV2.MintInfo",name:"mInfo",type:"tuple"}],name:"proposeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"proposedMint",outputs:[{internalType:"string",name:"btcTxHash",type:"string"},{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"removeLiquidity",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"removeLiquidityTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"callerConfirmation",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"setCrossoutFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address payable",name:"newFeeAddress",type:"address"}],name:"setFeeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newFee",type:"uint256"}],name:"setLockFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"max",type:"uint256"}],name:"setMaxLockAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"min",type:"uint256"}],name:"setMinLockAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"limit",type:"uint256"}],name:"setMintSplitLine",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"periodInterval",type:"uint256"}],name:"setPeriodInterval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"limit",type:"uint256"}],name:"setPeriodMintLimit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"minters",type:"address[]"},{internalType:"address[]",name:"proposers",type:"address[]"},{internalType:"address[]",name:"executros",type:"address[]"}],name:"setRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"startNewPeriod",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:"address",name:"",type:"address"}],name:"tokenConfigs",outputs:[{internalType:"uint256",name:"periodLimit",type:"uint256"},{internalType:"uint256",name:"mintSplitLine",type:"uint256"},{internalType:"uint256",name:"crossoutFee",type:"uint256"},{internalType:"uint256",name:"periodInterval",type:"uint256"},{internalType:"uint256",name:"lastBlockNumber",type:"uint256"},{internalType:"uint256",name:"periodMinted",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalLocked",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalUnlocked",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"txHash",type:"bytes32"}],name:"txUnlocked",outputs:[{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"_txHash",type:"string"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"unlock",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{stateMutability:"payable",type:"receive"}],Yh=[{inputs:[{internalType:"uint64",name:"remoteChainSelector",type:"uint64"}],name:"getCurrentInboundRateLimiterState",outputs:[{components:[{internalType:"uint128",name:"tokens",type:"uint128"},{internalType:"uint32",name:"lastUpdated",type:"uint32"},{internalType:"bool",name:"isEnabled",type:"bool"},{internalType:"uint128",name:"capacity",type:"uint128"},{internalType:"uint128",name:"rate",type:"uint128"}],internalType:"struct RateLimiter.TokenBucket",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"remoteChainSelector",type:"uint64"}],name:"getCurrentOutboundRateLimiterState",outputs:[{components:[{internalType:"uint128",name:"tokens",type:"uint128"},{internalType:"uint32",name:"lastUpdated",type:"uint32"},{internalType:"bool",name:"isEnabled",type:"bool"},{internalType:"uint128",name:"capacity",type:"uint128"},{internalType:"uint128",name:"rate",type:"uint128"}],internalType:"struct RateLimiter.TokenBucket",name:"",type:"tuple"}],stateMutability:"view",type:"function"}],oo=[{inputs:[{internalType:"address",name:"target",type:"address"}],name:"AddressEmptyCode",type:"error"},{inputs:[{internalType:"address",name:"implementation",type:"address"}],name:"ERC1967InvalidImplementation",type:"error"},{inputs:[],name:"ERC1967NonPayable",type:"error"},{inputs:[],name:"EnforcedPause",type:"error"},{inputs:[],name:"ExpectedPause",type:"error"},{inputs:[],name:"FailedCall",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[],name:"ReentrancyGuardReentrantCall",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"SafeERC20FailedOperation",type:"error"},{inputs:[],name:"UUPSUnauthorizedCallContext",type:"error"},{inputs:[{internalType:"bytes32",name:"slot",type:"bytes32"}],name:"UUPSUnsupportedProxiableUUID",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint8",name:"chainID",type:"uint8"},{indexed:!0,internalType:"uint8",name:"tokenID",type:"uint8"},{indexed:!1,internalType:"uint256",name:"bridgeAmount",type:"uint256"},{indexed:!1,internalType:"bool",name:"state",type:"bool"}],name:"TokenChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint8",name:"sourceChainID",type:"uint8"},{indexed:!0,internalType:"uint64",name:"nonce",type:"uint64"},{indexed:!0,internalType:"uint8",name:"destinationChainID",type:"uint8"},{indexed:!1,internalType:"uint8",name:"tokenID",type:"uint8"},{indexed:!1,internalType:"uint256",name:"erc20AdjustedAmount",type:"uint256"},{indexed:!1,internalType:"bytes",name:"senderAddress",type:"bytes"},{indexed:!1,internalType:"address",name:"recipientAddress",type:"address"}],name:"TokensClaimed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint8",name:"sourceChainID",type:"uint8"},{indexed:!0,internalType:"uint64",name:"nonce",type:"uint64"},{indexed:!0,internalType:"uint8",name:"destinationChainID",type:"uint8"},{indexed:!1,internalType:"uint8",name:"tokenID",type:"uint8"},{indexed:!1,internalType:"uint64",name:"dstAdjustedAmount",type:"uint64"},{indexed:!1,internalType:"uint64",name:"originAmount",type:"uint64"},{indexed:!1,internalType:"address",name:"senderAddress",type:"address"},{indexed:!1,internalType:"bytes",name:"recipientAddress",type:"bytes"}],name:"TokensDeposited",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{inputs:[],name:"UPGRADE_INTERFACE_VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"tokenID",type:"uint8"}],name:"accumulatedFees",outputs:[{internalType:"uint256",name:"accumulatedFee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"_chainID",type:"uint8"},{internalType:"uint8",name:"_tokenID",type:"uint8"},{internalType:"uint256",name:"bridgeAmount",type:"uint256"},{internalType:"bool",name:"state",type:"bool"}],name:"addToken",outputs:[],stateMutability:"nonpayable",type:"function"}
12,{inputs:[{internalType:"uint8[]",name:"_chainIDs",type:"uint8[]"},{internalType:"uint8[]",name:"_tokenIDs",type:"uint8[]"},{internalType:"uint256[]",name:"bridgeAmounts",type:"uint256[]"},{internalType:"bool[]",name:"states",type:"bool[]"}],name:"addTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"tokenID",type:"uint8"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"recipientAddress",type:"bytes"},{internalType:"uint8",name:"destinationChainID",type:"uint8"}],name:"bridgeERC20",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"tokenID",type:"uint8"},{internalType:"bytes",name:"recipientAddress",type:"bytes"},{internalType:"uint8",name:"destinationChainID",type:"uint8"}],name:"bridgeNativeToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint64",name:"chainID",type:"uint64"},{internalType:"uint64",name:"nonce",type:"uint64"}],name:"chainsIsTransferProcessed",outputs:[{internalType:"bool",name:"isProcessed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"committee",outputs:[{internalType:"contract IBridgeCommittee",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint8",name:"messageType",type:"uint8"},{internalType:"uint8",name:"version",type:"uint8"},{internalType:"uint64",name:"nonce",type:"uint64"},{internalType:"uint8",name:"chainID",type:"uint8"},{internalType:"bytes",name:"payload",type:"bytes"}],internalType:"struct BridgeUtils.Message",name:"message",type:"tuple"}],name:"executeEmergencyOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"_chainID",type:"uint8"},{internalType:"uint8",name:"_tokenID",type:"uint8"}],name:"getTokenInfo",outputs:[{components:[{internalType:"uint256",name:"bridgeAmount",type:"uint256"},{internalType:"bool",name:"state",type:"bool"}],internalType:"struct Bridge.TokenInfo",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_committee",type:"address"},{internalType:"address",name:"_vault",type:"address"},{internalType:"address",name:"_limiter",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"nonce",type:"uint64"}],name:"isTransferProcessed",outputs:[{internalType:"bool",name:"isProcessed",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"limiter",outputs:[{internalType:"contract IBridgeLimiter",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"messageType",type:"uint8"}],name:"nonces",outputs:[{internalType:"uint64",name:"nonce",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_wbtc9",type:"address"}],name:"setWBTC9",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes[]",name:"signatures",type:"bytes[]"},{components:[{internalType:"uint8",name:"messageType",type:"uint8"},{internalType:"uint8",name:"version",type:"uint8"},{internalType:"uint64",name:"nonce",type:"uint64"},{internalType:"uint8",name:"chainID",type:"uint8"},{internalType:"bytes",name:"payload",type:"bytes"}],internalType:"struct BridgeUtils.Message",name:"message",type:"tuple"}],name:"transferBridgedTokensWithSignatures",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"_chainID",type:"uint8"},{internalType:"uint8",name:"_tokenID",type:"uint8"},{internalType:"bool",name:"newState",type:"bool"}],name:"updateTokenState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint8",name:"messageType",type:"uint8"},{internalType:"uint8",name:"version",type:"uint8"},{internalType:"uint64",name:"nonce",type:"uint64"},{internalType:"uint8",name:"chainID",type:"uint8"},{internalType:"bytes",name:"payload",type:"bytes"}],internalType:"struct BridgeUtils.Message",name:"message",type:"tuple"}],name:"upgrade",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IBridgeVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"wbtc9",outputs:[{internalType:"contract IWBTC9",name:"",type:"address"}],stateMutability:"view",type:"function"},{stateMutability:"payable",type:"receive"}],Xh="1.1.0";
12let ke=class Ga extends Error{constructor(t,n={}){var i;const r=n.cause instanceof Ga?n.cause.details:(i=n.cause)!=null&&i.message?n.cause.message:n.details,a=n.cause instanceof Ga&&n.cause.docsPath||n.docsPath,s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...a?[`Docs: https://abitype.dev${a}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${Xh}`].join(`
13`);super(s),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"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=a,this.metaMessages=n.metaMessages,this.shortMessage=t}};function st(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const ru=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,au=/^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)?$/,su=/^\(.+?\).*?$/,lo=/^tuple(?<array>(\[(\d*)\])*)$/;function Ha(e){let t=e.type;if(lo.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let a=0;a<n;a++){const s=e.components[a];t+=Ha(s),a<n-1&&(t+=", ")}const r=st(lo,e.type);return t+=`)${(r==null?void 0:r.array)??""}`,Ha({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function Tn(e){let t="";const n=e.length;for(let r=0;r<n;r++){const a=e[r];t+=Ha(a),r!==n-1&&(t+=", ")}return t}function Kh(e){var t;return e.type==="function"?`function ${e.name}(${Tn(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${Tn(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${Tn(e.inputs)})`:e.type==="error"?`error ${e.name}(${Tn(e.inputs)})`:e.type==="constructor"?`constructor(${Tn(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const iu=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Jh(e){return iu.test(e)}function e6(e){return st(iu,e)}const ou=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function t6(e){return ou.test(e)}function n6(e){return st(ou,e)}const lu=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function r6(e){return lu.test(e)}function a6(e){return st(lu,e)}const cu=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function uu(e){return cu.test(e)}function s6(e){return st(cu,e)}const du=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function i6(e){return du.test(e)}function o6(e){return st(du,e)}const pu=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function l6(e){return pu.test(e)}function c6(e){return st(pu,e)}const u6=/^receive\(\) external payable$/;function d6(e){return u6.test(e)}const p6=new Set(["indexed"]),_a=new Set(["calldata","memory","storage"]);class f6 extends ke{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" 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"})}}class y6 extends ke{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class m6 extends ke{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class b6 extends ke{constructor({param:t,name:n}
13){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" 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"})}}class h6 extends ke{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class g6 extends ke{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class w6 extends ke{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class yn extends ke{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class v6 extends ke{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class A6 extends ke{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class x6 extends ke{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"})}}class T6 extends ke{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function C6(e,t,n){let r="";if(n)for(const a of Object.entries(n)){if(!a)continue;let s="";for(const i of a[1])s+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${a[0]}{${s}})`}return t?`${t}:${e}${r}`:e}const ma=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function E6(e,t={}){if(r6(e))return I6(e,t);if(t6(e))return R6(e,t);if(Jh(e))return M6(e,t);if(i6(e))return B6(e,t);if(l6(e))return P6(e);if(d6(e))return{type:"receive",stateMutability:"payable"};throw new v6({signature:e})}function I6(e,t={}){const n=a6(e);if(!n)throw new yn({signature:e,type:"function"});const r=Se(n.parameters),a=[],s=r.length;for(let o=0;o<s;o++)a.push(St(r[o],{modifiers:_a,structs:t,type:"function"}));const i=[];if(n.returns){const o=Se(n.returns),l=o.length;for(let u=0;u<l;u++)i.push(St(o[u],{modifiers:_a,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:a,outputs:i}}function R6(e,t={}){const n=n6(e);if(!n)throw new yn({signature:e,type:"event"});const r=Se(n.parameters),a=[],s=r.length;for(let i=0;i<s;i++)a.push(St(r[i],{modifiers:p6,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:a}}function M6(e,t={}){const n=e6(e);if(!n)throw new yn({signature:e,type:"error"});const r=Se(n.parameters),a=[],s=r.length;for(let i=0;i<s;i++)a.push(St(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:a}}function B6(e,t={}){const n=o6(e);if(!n)throw new yn({signature:e,type:"constructor"});const r=Se(n.parameters),a=[],s=r.length;for(let i=0;i<s;i++)a.push(St(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:a}}function P6(e){const t=c6(e);if(!t)throw new yn({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const k6=/^(?<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$_]*))?$/,N6=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,S6=/^u?int$/;function St(e,t){var d,f;const n=C6(e,t==null?void 0:t.type,t==null?void 0:t.structs);if(ma.has(n))return ma.get(n);const r=su.test(e),a=st(r?N6:k6,e);if(!a)throw new m6({param:e});if(a.name&&O6(a.name))throw new b6({param:e,name:a.name});const s=a.name?{name:a.name}:{},i=a.modifier==="indexed"?{indexed:!0}:{},o=(t==null?void 0:t.structs)??{};let l,u={};
13if(r){l="tuple";const m=Se(a.type),b=[],h=m.length;for(let w=0;w<h;w++)b.push(St(m[w],{structs:o}));u={components:b}}else if(a.type in o)l="tuple",u={components:o[a.type]};else if(S6.test(a.type))l=`${a.type}256`;else if(a.type==="address payable")l="address";else if(l=a.type,(t==null?void 0:t.type)!=="struct"&&!fu(l))throw new y6({type:l});if(a.modifier){if(!((f=(d=t==null?void 0:t.modifiers)==null?void 0:d.has)!=null&&f.call(d,a.modifier)))throw new h6({param:e,type:t==null?void 0:t.type,modifier:a.modifier});if(_a.has(a.modifier)&&!j6(l,!!a.array))throw new g6({param:e,type:t==null?void 0:t.type,modifier:a.modifier})}const c={type:`${l}${a.array??""}`,...s,...i,...u};return ma.set(n,c),c}function Se(e,t=[],n="",r=0){const a=e.trim().length;for(let s=0;s<a;s++){const i=e[s],o=e.slice(s+1);switch(i){case",":return r===0?Se(o,[...t,n.trim()]):Se(o,t,`${n}${i}`,r);case"(":return Se(o,t,`${n}${i}`,r+1);case")":return Se(o,t,`${n}${i}`,r-1);default:return Se(o,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new T6({current:n,depth:r});return t.push(n.trim()),t}function fu(e){return e==="address"||e==="bool"||e==="function"||e==="string"||ru.test(e)||au.test(e)}const $6=/^(?: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 O6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||ru.test(e)||au.test(e)||$6.test(e)}function j6(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function F6(e){const t={},n=e.length;for(let i=0;i<n;i++){const o=e[i];if(!uu(o))continue;const l=s6(o);if(!l)throw new yn({signature:o,type:"struct"});const u=l.properties.split(";"),c=[],d=u.length;for(let f=0;f<d;f++){const b=u[f].trim();if(!b)continue;const h=St(b,{type:"struct"});c.push(h)}if(!c.length)throw new A6({signature:o});t[l.name]=c}const r={},a=Object.entries(t),s=a.length;for(let i=0;i<s;i++){const[o,l]=a[i];r[o]=yu(l,t)}return r}const L6=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function yu(e,t,n=new Set){const r=[],a=e.length;for(let s=0;s<a;s++){const i=e[s];if(su.test(i.type))r.push(i);else{const l=st(L6,i.type);if(!(l!=null&&l.type))throw new w6({abiParameter:i});const{array:u,type:c}=l;if(c in t){if(n.has(c))throw new x6({type:c});r.push({...i,type:`tuple${u??""}`,components:yu(t[c]??[],t,new Set([...n,c]))})}else if(fu(c))r.push(i);else throw new f6({type:c})}}return r}function Mn(e){const t=F6(e),n=[],r=e.length;for(let a=0;a<r;a++){const s=e[a];uu(s)||n.push(E6(s,t))}return n}function se(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const a=e[n];return typeof a=="function"?a:s=>t(e,s)}function tt(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Y6(e.type);return`${e.name}(${Hr(e.inputs,{includeName:t})})`}function Hr(e,{includeName:t=!1}={}){return e?e.map(n=>D6(n,{includeName:t})).join(t?", ":","):""}function D6(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Hr(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function nt(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function ce(e){return nt(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const mu="2.38.6";let Cn={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${mu}`},k=class qa extends Error{constructor(t,n={}){var o;const r=(()=>{var l;return n.cause instanceof qa?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),a=n.cause instanceof qa&&n.cause.docsPath||n.docsPath,s=(o=Cn.getDocsUrl)==null?void 0:o.call(Cn,{...n,docsPath:a}),i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...Cn.version?[`Version: ${Cn.version}`]:[]].join(`
14`);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=a,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=mu}walk(t){return bu(this,t)}};function bu(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?bu(e.cause,t):t?null:e}class z6 extends k{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
15`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class co extends k{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
16`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class hu extends k{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
17`),{metaMessages:[`Params: (${Hr(n,{includeName:!0})})`,`Data:   ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}}class Zs extends k{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class Q6 extends k{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
18`),{name:"AbiEncodingArrayLengthMismatchError"})}}class V6 extends k{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${ce(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class U6 extends k{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
19`),{name:"AbiEncodingLengthMismatchError"})}}class F8 extends k{constructor(t,{docsPath:n}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" 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(`
20`),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class L8 extends k{constructor(t,{docsPath:n}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
21`),{docsPath:n,name:"AbiErrorNotFoundError"})}}class gu extends k{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
22`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}}class W6 extends k{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"})}}class wu extends k{constructor(t,{docsPath:n}){super([`Encoded event signature "${t}" 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=${t}.`].join(`
23`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class uo extends k{constructor(t,{docsPath:n}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
24`),{docsPath:n,name:"AbiEventNotFoundError"})}}class xr extends k{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
25`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class G6 extends k{constructor(t,{docsPath:n}){super([`Function "${t}" 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(`
26`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class D8 extends k{constructor(t,{docsPath:n}){super([`Encoded function signature "${t}" 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=${t}.`].join(`
27`),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class H6 extends k{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${tt(t.abiItem)}\`, and`,`\`${n.type}\` in \`${tt(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class Za extends k{constructor({abiItem:t,data:n,params:r,size:a}){super([`Data size of ${a} bytes is too small for non-indexed event parameters.`].join(`
28`),{metaMessages:[`Params: (${Hr(r,{includeName:!0})})`,`Data:   ${n} (${a} 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=t,this.data=n,this.params=r,this.size=a}}class vu extends k{constructor({abiItem:t,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${tt(t,{includeName:!0})}".`].join(`
29`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=t}}class _6 extends k{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
30`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class q6 extends k{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
31`),{docsPath:n,name:"InvalidAbiDecodingType"})}}class Z6 extends k{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
32`),{name:"InvalidArrayError"})}}class Y6 extends k{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
33`),{name:"InvalidDefinitionTypeError"})}}class X6 extends k{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}class Au extends k{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}let xu=class extends k{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}};class po extends k{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}}function mn(e,{dir:t,size:n=32}={}){return typeof e=="string"?bt(e,{dir:t,size:n}):K6(e,{dir:t,size:n})}function bt(e,{dir:t,size:n=32}={}){if(n===null)return e;const r=e.replace("0x","");if(r.length>n*2)throw new xu({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function K6(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new xu({size:e.length,targetSize:n,type:"bytes"});
33const r=new Uint8Array(n);for(let a=0;a<n;a++){const s=t==="right";r[s?a:n-a-1]=e[s?a:e.length-a-1]}return r}let Tu=class extends k{constructor({max:t,min:n,signed:r,size:a,value:s}){super(`Number "${s}" is not in safe ${a?`${a*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}};class J6 extends k{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class eg extends k{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Ys(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let a=0;a<n.length-1&&n[t==="left"?a:n.length-a-1].toString()==="0";a++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function Ue(e,{size:t}){if(ce(e)>t)throw new eg({givenSize:ce(e),maxSize:t})}function an(e,t={}){const{signed:n}=t;t.size&&Ue(e,{size:t.size});const r=BigInt(e);if(!n)return r;const a=(e.length-2)/2,s=(1n<<BigInt(a)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(a*2,"f")}`)-1n}function $t(e,t={}){return Number(an(e,t))}const tg=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ya(e,t={}){return typeof e=="number"||typeof e=="bigint"?q(e,t):typeof e=="string"?Eu(e,t):typeof e=="boolean"?Cu(e,t):Ee(e,t)}function Cu(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(Ue(n,{size:t.size}),mn(n,{size:t.size})):n}function Ee(e,t={}){let n="";for(let a=0;a<e.length;a++)n+=tg[e[a]];const r=`0x${n}`;return typeof t.size=="number"?(Ue(r,{size:t.size}),mn(r,{dir:"right",size:t.size})):r}function q(e,t={}){const{signed:n,size:r}=t,a=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&a>s||a<i){const l=typeof e=="bigint"?"n":"";throw new Tu({max:s?`${s}${l}`:void 0,min:`${i}${l}`,signed:n,size:r,value:`${e}${l}`})}const o=`0x${(n&&a<0?(1n<<BigInt(r*8))+BigInt(a):a).toString(16)}`;return r?mn(o,{size:r}):o}const ng=new TextEncoder;function Eu(e,t={}){const n=ng.encode(e);return Ee(n,t)}const rg=new TextEncoder;function Kn(e,t={}){return typeof e=="number"||typeof e=="bigint"?sg(e,t):typeof e=="boolean"?ag(e,t):nt(e)?rt(e,t):Iu(e,t)}function ag(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(Ue(n,{size:t.size}),mn(n,{size:t.size})):n}const qe={zero:48,nine:57,A:65,F:70,a:97,f:102};function fo(e){if(e>=qe.zero&&e<=qe.nine)return e-qe.zero;if(e>=qe.A&&e<=qe.F)return e-(qe.A-10);if(e>=qe.a&&e<=qe.f)return e-(qe.a-10)}function rt(e,t={}){let n=e;t.size&&(Ue(n,{size:t.size}),n=mn(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const a=r.length/2,s=new Uint8Array(a);for(let i=0,o=0;i<a;i++){const l=fo(r.charCodeAt(o++)),u=fo(r.charCodeAt(o++));if(l===void 0||u===void 0)throw new k(`Invalid byte sequence ("${r[o-2]}${r[o-1]}" in "${r}").`);s[i]=l*16+u}return s}function sg(e,t){const n=q(e,t);return rt(n)}function Iu(e,t={}){const n=rg.encode(e);return typeof t.size=="number"?(Ue(n,{size:t.size}),mn(n,{dir:"right",size:t.size})):n}const cr=BigInt(2**32-1),yo=BigInt(32);function ig(e,t=!1){return t?{h:Number(e&cr),l:Number(e>>yo&cr)}:{h:Number(e>>yo&cr)|0,l:Number(e&cr)|0}}function og(e,t=!1){const n=e.length;let r=new Uint32Array(n),a=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:o}=ig(e[s],t);[r[s],a[s]]=[i,o]}return[r,a]}const lg=(e,t,n)=>e<<n|t>>>32-n,cg=(e,t,n)=>t<<n|e>>>32-n,ug=(e,t,n)=>t<<n-32|e>>>64-n,dg=(e,t,n)=>e<<n-32|t>>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pg(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function mo(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $n(e,...t){if(!pg(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Tr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ru(e,t){$n(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function fg(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function On(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ba(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function De(e,t){return e<<32-t|e>>>t}const yg=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function mg(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function bg(e){for(let t=0;t<e.length;t++)e[t]=mg(e[t]);return e}const bo=yg?e=>e:bg;function hg(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Xs(e){return typeof e=="string"&&(e=hg(e)),$n(e),e}class Mu{}function Bu(e){const t=r=>e().update(Xs(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const gg=BigInt(0),En=BigInt(1),wg=BigInt(2),vg=BigInt(7),Ag=BigInt(256),xg=BigInt(113),Pu=[],ku=[],Nu=[];for(let e=0,t=En,n=1,r=0;e<24;
33e++){[n,r]=[r,(2*n+3*r)%5],Pu.push(2*(5*r+n)),ku.push((e+1)*(e+2)/2%64);let a=gg;for(let s=0;s<7;s++)t=(t<<En^(t>>vg)*xg)%Ag,t&wg&&(a^=En<<(En<<BigInt(s))-En);Nu.push(a)}const Su=og(Nu,!0),Tg=Su[0],Cg=Su[1],ho=(e,t,n)=>n>32?ug(e,t,n):lg(e,t,n),go=(e,t,n)=>n>32?dg(e,t,n):cg(e,t,n);function Eg(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const o=(i+8)%10,l=(i+2)%10,u=n[l],c=n[l+1],d=ho(u,c,1)^n[o],f=go(u,c,1)^n[o+1];for(let m=0;m<50;m+=10)e[i+m]^=d,e[i+m+1]^=f}let a=e[2],s=e[3];for(let i=0;i<24;i++){const o=ku[i],l=ho(a,s,o),u=go(a,s,o),c=Pu[i];a=e[c],s=e[c+1],e[c]=l,e[c+1]=u}for(let i=0;i<50;i+=10){for(let o=0;o<10;o++)n[o]=e[i+o];for(let o=0;o<10;o++)e[i+o]^=~n[(o+2)%10]&n[(o+4)%10]}e[0]^=Tg[r],e[1]^=Cg[r]}On(n)}class Ks extends Mu{constructor(t,n,r,a=!1,s=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=a,this.rounds=s,mo(r),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=fg(this.state)}clone(){return this._cloneInto()}keccak(){bo(this.state32),Eg(this.state32,this.rounds),bo(this.state32),this.posOut=0,this.pos=0}update(t){Tr(this),t=Xs(t),$n(t);const{blockLen:n,state:r}=this,a=t.length;for(let s=0;s<a;){const i=Math.min(n-this.pos,a-s);for(let o=0;o<i;o++)r[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:a}=this;t[r]^=n,n&128&&r===a-1&&this.keccak(),t[a-1]^=128,this.keccak()}writeInto(t){Tr(this,!1),$n(t),this.finish();const n=this.state,{blockLen:r}=this;for(let a=0,s=t.length;a<s;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,s-a);t.set(n.subarray(this.posOut,this.posOut+i),a),this.posOut+=i,a+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return mo(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Ru(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,On(this.state)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:a,rounds:s,enableXOF:i}=this;return t||(t=new Ks(n,r,a,i,s)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=s,t.suffix=r,t.outputLen=a,t.enableXOF=i,t.destroyed=this.destroyed,t}}const Ig=(e,t,n)=>Bu(()=>new Ks(t,e,n)),Rg=Ig(1,136,256/8);function bn(e,t){const n=t||"hex",r=Rg(nt(e,{strict:!1})?Kn(e):e);return n==="bytes"?r:Ya(r)}const Mg=e=>bn(Kn(e));function Bg(e){return Mg(e)}function Pg(e){let t=!0,n="",r=0,a="",s=!1;for(let i=0;i<e.length;i++){const o=e[i];if(["(",")",","].includes(o)&&(t=!0),o==="("&&r++,o===")"&&r--,!!t){if(r===0){if(o===" "&&["event","function",""].includes(a))a="";else if(a+=o,o===")"){s=!0;break}continue}if(o===" "){e[i-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}a+=o,n+=o}}if(!s)throw new k("Unable to normalize signature.");return a}const kg=e=>{const t=typeof e=="string"?e:Kh(e);return Pg(t)};function $u(e){return Bg(kg(e))}const _r=$u;class sn extends k{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"})}}class Js extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const ha=new Js(8192);function ei(e,t){if(ha.has(`${e}.${t}`))return ha.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),r=bn(Iu(n),"bytes"),a=n.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&a[i]&&(a[i]=a[i].toUpperCase()),(r[i>>1]&15)>=8&&a[i+1]&&(a[i+1]=a[i+1].toUpperCase());const s=`0x${a.join("")}`;return ha.set(`${e}.${t}`,s),s}const Ng=/^0x[a-fA-F0-9]{40}$/,ga=new Js(8192);function de(e,t){const{strict:n=!0}=t??{},r=`${e}.${n}`;if(ga.has(r))return ga.get(r);const a=Ng.test(e)?e.toLowerCase()===e?!0:n?ei(e)===e:!0:!1;return ga.set(r,a),a}function on(e){return typeof e[0]=="string"?qr(e):Sg(e)}function Sg(e){let t=0;for(const a of e)t+=a.length;const n=new Uint8Array(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n}function qr(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Cr(e,t,n,{strict:r}={}){return nt(e,{strict:!1})?$g(e,t,n,{strict:r}):Fu(e,t,n,{strict:r})}function Ou(e,t){if(typeof t=="number"&&t>0&&t>ce(e)-1)throw new Au({offset:t,position:"start",size:ce(e)})}function ju(e,t,n){if(typeof t=="number"&&typeof n=="number"&&ce(e)!==n-t)throw new Au({offset:n,position:"end",size:ce(e)})}function Fu(e,t,n,{strict:r}={}){Ou(e,t);const a=e.slice(t,n);return r&&ju(a,t,n),a}function $g(e,t,n,{strict:r}={}){Ou(e,t);const a=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&ju(a,t,n),a}
33const Og=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function jn(e,t){if(e.length!==t.length)throw new U6({expectedLength:e.length,givenLength:t.length});const n=jg({params:e,values:t}),r=ni(n);return r.length===0?"0x":r}function jg({params:e,values:t}){const n=[];for(let r=0;r<e.length;r++)n.push(ti({param:e[r],value:t[r]}));return n}function ti({param:e,value:t}){const n=ri(e.type);if(n){const[r,a]=n;return Lg(t,{length:r,param:{...e,type:a}})}if(e.type==="tuple")return Ug(t,{param:e});if(e.type==="address")return Fg(t);if(e.type==="bool")return zg(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){const r=e.type.startsWith("int"),[,,a="256"]=Og.exec(e.type)??[];return Qg(t,{signed:r,size:Number(a)})}if(e.type.startsWith("bytes"))return Dg(t,{param:e});if(e.type==="string")return Vg(t);throw new _6(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function ni(e){let t=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:o}=e[s];i?t+=32:t+=ce(o)}const n=[],r=[];let a=0;for(let s=0;s<e.length;s++){const{dynamic:i,encoded:o}=e[s];i?(n.push(q(t+a,{size:32})),r.push(o),a+=ce(o)):n.push(o)}return on([...n,...r])}function Fg(e){if(!de(e))throw new sn({address:e});return{dynamic:!1,encoded:bt(e.toLowerCase())}}function Lg(e,{length:t,param:n}){const r=t===null;if(!Array.isArray(e))throw new Z6(e);if(!r&&e.length!==t)throw new Q6({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let a=!1;const s=[];for(let i=0;i<e.length;i++){const o=ti({param:n,value:e[i]});o.dynamic&&(a=!0),s.push(o)}if(r||a){const i=ni(s);if(r){const o=q(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?on([o,i]):o}}if(a)return{dynamic:!0,encoded:i}}return{dynamic:!1,encoded:on(s.map(({encoded:i})=>i))}}function Dg(e,{param:t}){const[,n]=t.type.split("bytes"),r=ce(e);if(!n){let a=e;return r%32!==0&&(a=bt(a,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:on([bt(q(r,{size:32})),a])}}if(r!==Number.parseInt(n,10))throw new V6({expectedSize:Number.parseInt(n,10),value:e});return{dynamic:!1,encoded:bt(e,{dir:"right"})}}function zg(e){if(typeof e!="boolean")throw new k(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:bt(Cu(e))}}function Qg(e,{signed:t,size:n=256}){if(typeof n=="number"){const r=2n**(BigInt(n)-(t?1n:0n))-1n,a=t?-r-1n:0n;if(e>r||e<a)throw new Tu({max:r.toString(),min:a.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:q(e,{size:32,signed:t})}}function Vg(e){const t=Eu(e),n=Math.ceil(ce(t)/32),r=[];for(let a=0;a<n;a++)r.push(bt(Cr(t,a*32,(a+1)*32),{dir:"right"}));return{dynamic:!0,encoded:on([bt(q(ce(t),{size:32})),...r])}}function Ug(e,{param:t}){let n=!1;const r=[];for(let a=0;a<t.components.length;a++){const s=t.components[a],i=Array.isArray(e)?a:s.name,o=ti({param:s,value:e[i]});r.push(o),o.dynamic&&(n=!0)}return{dynamic:n,encoded:n?ni(r):on(r.map(({encoded:a})=>a))}}function ri(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}const ai=e=>Cr($u(e),0,4);function Zr(e){const{abi:t,args:n=[],name:r}=e,a=nt(r,{strict:!1}),s=t.filter(o=>a?o.type==="function"?ai(o)===r:o.type==="event"?_r(o)===r:!1:"name"in o&&o.name===r);if(s.length===0)return;if(s.length===1)return s[0];let i;for(const o of s){if(!("inputs"in o))continue;if(!n||n.length===0){if(!o.inputs||o.inputs.length===0)return o;continue}if(!o.inputs||o.inputs.length===0||o.inputs.length!==n.length)continue;if(n.every((u,c)=>{const d="inputs"in o&&o.inputs[c];return d?Xa(u,d):!1})){if(i&&"inputs"in i&&i.inputs){const u=Lu(o.inputs,i.inputs,n);if(u)throw new H6({abiItem:o,type:u[0]},{abiItem:i,type:u[1]})}i=o}}return i||s[0]}function Xa(e,t){const n=typeof e,r=t.type;switch(r){case"address":return de(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((a,s)=>Xa(Object.values(e)[s],a)):/^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(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="str
33ing"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(a=>Xa(a,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Lu(e,t,n){for(const r in e){const a=e[r],s=t[r];if(a.type==="tuple"&&s.type==="tuple"&&"components"in a&&"components"in s)return Lu(a.components,s.components,n[r]);const i=[a.type,s.type];if(i.includes("address")&&i.includes("bytes20")?!0:i.includes("address")&&i.includes("string")?de(n[r],{strict:!1}):i.includes("address")&&i.includes("bytes")?de(n[r],{strict:!1}):!1)return i}}const wo="/docs/contract/encodeEventTopics";function Wg(e){var l;const{abi:t,eventName:n,args:r}=e;let a=t[0];if(n){const u=Zr({abi:t,name:n});if(!u)throw new uo(n,{docsPath:wo});a=u}if(a.type!=="event")throw new uo(void 0,{docsPath:wo});const s=tt(a),i=_r(s);let o=[];if(r&&"inputs"in a){const u=(l=a.inputs)==null?void 0:l.filter(d=>"indexed"in d&&d.indexed),c=Array.isArray(r)?r:Object.values(r).length>0?(u==null?void 0:u.map(d=>r[d.name]))??[]:[];c.length>0&&(o=(u==null?void 0:u.map((d,f)=>Array.isArray(c[f])?c[f].map((m,b)=>vo({param:d,value:c[f][b]})):typeof c[f]<"u"&&c[f]!==null?vo({param:d,value:c[f]}):null))??[])}return[i,...o]}function vo({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return bn(Kn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new X6(e.type);return jn([e],[t])}function jt(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}const Ao="/docs/contract/encodeFunctionData";function Gg(e){const{abi:t,args:n,functionName:r}=e;let a=t[0];if(r){const s=Zr({abi:t,args:n,name:r});if(!s)throw new xr(r,{docsPath:Ao});a=s}if(a.type!=="function")throw new xr(void 0,{docsPath:Ao});return{abi:[a],functionName:ai(tt(a))}}function Yr(e){const{args:t}=e,{abi:n,functionName:r}=(()=>{var o;return e.abi.length===1&&((o=e.functionName)!=null&&o.startsWith("0x"))?e:Gg(e)})(),a=n[0],s=r,i="inputs"in a&&a.inputs?jn(a.inputs,t??[]):void 0;return qr([s,i??"0x"])}const Hg={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."},_g={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},qg={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};class xo extends k{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class Du extends k{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}}class Zg extends k{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}}const Yg={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 Zg({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Du({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new xo({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new xo({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function si(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Yg);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Xg(e,t={}){typeof t.size<"u"&&Ue(e,{size:t.size});const n=Ee(e,t);return an(n,t)}function Kg(e,t={}){let n=e;if(typeof t.size<"u"&&(Ue(n,{size:t.size}),n=Ys(n)),n.length>1||n[0]>1)throw new J6(n);return!!n[0]}function Je(e,t={}){typeof t.size<"u"&&Ue(e,{size:t.size});const n=Ee(e,t);return $t(n,t)}function Jg(e,t={}){let n=e;return typeof t.size<"u"&&(Ue(n,{size:t.size}),n=Ys(n,{dir:"right"})),new TextDecoder().decode(n)}function Xr(e,t){const n=typeof t=="string"?rt(t):t,r=si(n);if(ce(n)===0&&e.length>0)throw new Zs;if(ce(t)&&ce(t)<32)throw new hu({data:typeof t=="string"?t:Ee(t),params:e,size:ce(t)});let a=0;const s=[];for(let i=0;i<e.length;++i){const o=e[i];r.setPosition(a);const[l,u]=Jt(r,o,{staticPosition:0});a+=u,s.push(l)}return s}function Jt(e,t,{staticPosition:n}){const r=ri(t.type);if(r){const[a,s]=r;return t2(e,{...t,type:s},{length:a,staticPosition:n})}if(t.type==="tuple")return s2(e,t,{staticPosition:n});if(t.type==="address")return e2(e);if(t.type==="bool")return n2(e);
33if(t.type.startsWith("bytes"))return r2(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return a2(e,t);if(t.type==="string")return i2(e,{staticPosition:n});throw new q6(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const To=32,Ka=32;function e2(e){const t=e.readBytes(32);return[ei(Ee(Fu(t,-20))),32]}function t2(e,t,{length:n,staticPosition:r}){if(!n){const i=Je(e.readBytes(Ka)),o=r+i,l=o+To;e.setPosition(o);const u=Je(e.readBytes(To)),c=Fn(t);let d=0;const f=[];for(let m=0;m<u;++m){e.setPosition(l+(c?m*32:d));const[b,h]=Jt(e,t,{staticPosition:l});d+=h,f.push(b)}return e.setPosition(r+32),[f,32]}if(Fn(t)){const i=Je(e.readBytes(Ka)),o=r+i,l=[];for(let u=0;u<n;++u){e.setPosition(o+u*32);const[c]=Jt(e,t,{staticPosition:o});l.push(c)}return e.setPosition(r+32),[l,32]}let a=0;const s=[];for(let i=0;i<n;++i){const[o,l]=Jt(e,t,{staticPosition:r+a});a+=l,s.push(o)}return[s,a]}function n2(e){return[Kg(e.readBytes(32),{size:32}),32]}function r2(e,t,{staticPosition:n}){const[r,a]=t.type.split("bytes");if(!a){const i=Je(e.readBytes(32));e.setPosition(n+i);const o=Je(e.readBytes(32));if(o===0)return e.setPosition(n+32),["0x",32];const l=e.readBytes(o);return e.setPosition(n+32),[Ee(l),32]}return[Ee(e.readBytes(Number.parseInt(a,10),32)),32]}function a2(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),a=e.readBytes(32);return[r>48?Xg(a,{signed:n}):Je(a,{signed:n}),32]}function s2(e,t,{staticPosition:n}){const r=t.components.length===0||t.components.some(({name:i})=>!i),a=r?[]:{};let s=0;if(Fn(t)){const i=Je(e.readBytes(Ka)),o=n+i;for(let l=0;l<t.components.length;++l){const u=t.components[l];e.setPosition(o+s);const[c,d]=Jt(e,u,{staticPosition:o});s+=d,a[r?l:u==null?void 0:u.name]=c}return e.setPosition(n+32),[a,32]}for(let i=0;i<t.components.length;++i){const o=t.components[i],[l,u]=Jt(e,o,{staticPosition:n});a[r?i:o==null?void 0:o.name]=l,s+=u}return[a,s]}function i2(e,{staticPosition:t}){const n=Je(e.readBytes(32)),r=t+n;e.setPosition(r);const a=Je(e.readBytes(32));if(a===0)return e.setPosition(t+32),["",32];const s=e.readBytes(a,32),i=Jg(Ys(s));return e.setPosition(t+32),[i,32]}function Fn(e){var r;const{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return(r=e.components)==null?void 0:r.some(Fn);const n=ri(e.type);return!!(n&&Fn({...e,type:n[1]}))}function o2(e){const{abi:t,data:n}=e,r=Cr(n,0,4);if(r==="0x")throw new Zs;const s=[...t||[],_g,qg].find(i=>i.type==="error"&&r===ai(tt(i)));if(!s)throw new gu(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Xr(s.inputs,Cr(n,4)):void 0,errorName:s.name}}const ln=(e,t,n)=>JSON.stringify(e,(r,a)=>typeof a=="bigint"?a.toString():a,n);function zu({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((a,s)=>`${r&&a.name?`${a.name}: `:""}${typeof t[s]=="object"?ln(t[s]):t[s]}`).join(", ")})`}const l2={gwei:9,wei:18},c2={ether:-9,wei:9};function Qu(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[a,s]=[n.slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${a||"0"}${s?`.${s}`:""}`}function ii(e,t="wei"){return Qu(e,l2[t])}function Ce(e,t="wei"){return Qu(e,c2[t])}class u2 extends k{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}}class d2 extends k{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function Co(e){return e.reduce((t,{slot:n,value:r})=>`${t}        ${n}: ${r}
34`,"")}function p2(e){return e.reduce((t,{address:n,...r})=>{let a=`${t}    ${n}:
35`;return r.nonce&&(a+=`      nonce: ${r.nonce}
36`),r.balance&&(a+=`      balance: ${r.balance}
37`),r.code&&(a+=`      code: ${r.code}
38`),r.state&&(a+=`      state:
39`,a+=Co(r.state)),r.stateDiff&&(a+=`      stateDiff:
40`,a+=Co(r.stateDiff)),a},`  State Override:
41`).slice(0,-1)}function Jn(e){const t=Object.entries(e).map(([r,a])=>
41a===void 0||a===!1?null:[r,a]).filter(Boolean),n=t.reduce((r,[a])=>Math.max(r,a.length),0);return t.map(([r,a])=>`  ${`${r}:`.padEnd(n+1)}  ${a}`).join(`
42`)}class f2 extends k{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
43`),{name:"FeeConflictError"})}}class y2 extends k{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Jn(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class m2 extends k{constructor(t,{account:n,docsPath:r,chain:a,data:s,gas:i,gasPrice:o,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:c,to:d,value:f}){var b;const m=Jn({chain:a&&`${a==null?void 0:a.name} (id: ${a==null?void 0:a.id})`,from:n==null?void 0:n.address,to:d,value:typeof f<"u"&&`${ii(f)} ${((b=a==null?void 0:a.nativeCurrency)==null?void 0:b.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof o<"u"&&`${Ce(o)} gwei`,maxFeePerGas:typeof l<"u"&&`${Ce(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Ce(u)} gwei`,nonce:c});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",m].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Vu extends k{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:a,index:s}){let i="Transaction";r&&s!==void 0&&(i=`Transaction at block time "${r}" at index "${s}"`),t&&s!==void 0&&(i=`Transaction at block hash "${t}" at index "${s}"`),n&&s!==void 0&&(i=`Transaction at block number "${n}" at index "${s}"`),a&&(i=`Transaction with hash "${a}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}class Uu extends k{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class b2 extends k{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const h2=e=>e,Wu=e=>e;class g2 extends k{constructor(t,{account:n,docsPath:r,chain:a,data:s,gas:i,gasPrice:o,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:c,to:d,value:f,stateOverride:m}){var w;const b=n?jt(n):void 0;let h=Jn({from:b==null?void 0:b.address,to:d,value:typeof f<"u"&&`${ii(f)} ${((w=a==null?void 0:a.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof o<"u"&&`${Ce(o)} gwei`,maxFeePerGas:typeof l<"u"&&`${Ce(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Ce(u)} gwei`,nonce:c});m&&(h+=`
44${p2(m)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",h].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class w2 extends k{constructor(t,{abi:n,args:r,contractAddress:a,docsPath:s,functionName:i,sender:o}){const l=Zr({abi:n,args:r,name:i}),u=l?zu({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,c=l?tt(l,{includeName:!0}):void 0,d=Jn({address:a&&h2(a),function:c,args:u&&u!=="()"&&`${[...Array((i==null?void 0:i.length)??0).keys()].map(()=>" ").join("")}${u}`,sender:o});super(t.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:t,docsPath:s,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=t,this.contractAddress=a,this.functionName=i,this.sender=o}}class v2 extends k{constructor({abi:t,data:n,functionName:r,message:a}){let s,i,o,l;if(n&&n!=="0x")try{i=o2({abi:t,data:n});const{abiItem:c,errorName:d,args:f}=i;if(d==="Error")l=f[0];else if(d==="Panic"){const[m]=f;l=Hg[m]}else{const m=c?tt(c,{includeName:!0}):void 0,b=c&&f?zu({abiItem:c,args:f,includeFunctionName:!1,includeName:!1}):void 0;o=[m?`Error: ${m}`:"",b&&b!=="()"?`       ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${b}`:""]}}catch(c){s=c}else a&&(l=a);let u;s instanceof gu&&(u=s.signature,o=[`Unable to decode signature "${u}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${u}.`]),super(l&&l!=="execution reverted"||u?[`The contract function "${r}" reverted with the following ${u?"signature":"reason"}:`,l||u].join(`
45`):`The contract function "${r}" reverted.`,{cause:s,metaMessages:o,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=i,this.raw=n,this.reason=l,this.signature=u}}class A2 extends k{constructor({functionName:t}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${t}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class x2 extends k{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{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"})}}class Gu extends k{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}class V8 extends k{constructor({body:t,cause:n,details:r,headers:a,status:s,url:i}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${Wu(i)}`,t&&`Request body: ${ln(t)}
45`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=a,this.status=s,this.url=i}}class Hu extends k{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${Wu(r)}`,`Request body: ${ln(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data}}const T2=-1;class C2 extends k{constructor(t,{code:n,docsPath:r,metaMessages:a,name:s,shortMessage:i}){super(i,{cause:t,docsPath:r,metaMessages:a||(t==null?void 0:t.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||t.name,this.code=t instanceof Hu?t.code:n??T2}}class Kr extends C2{constructor(t){super(t,{code:Kr.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Kr,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});const E2=3;function _u(e,{abi:t,address:n,args:r,docsPath:a,functionName:s,sender:i}){const o=e instanceof Gu?e:e instanceof k?e.walk(b=>"data"in b)||e.walk():{},{code:l,data:u,details:c,message:d,shortMessage:f}=o,m=e instanceof Zs?new A2({functionName:s}):[E2,Kr.code].includes(l)&&(u||c||d||f)?new v2({abi:t,data:typeof u=="object"?u.data:u,functionName:s,message:o instanceof Hu?c:f??d}):e;return new w2(m,{abi:t,args:r,contractAddress:n,docsPath:a,functionName:s,sender:i})}function I2(e){const t=bn(`0x${e.substring(4)}`).substring(26);return ei(`0x${t}`)}async function R2({hash:e,signature:t}){const n=nt(e)?e:Ya(e),{secp256k1:r}=await Ml(async()=>{const{secp256k1:i}=await import("./secp256k1-e_kOsDZ-.js");return{secp256k1:i}},[]);return`0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){const{r:u,s:c,v:d,yParity:f}=t,m=Number(f??d),b=Eo(m);return new r.Signature(an(u),an(c)).addRecoveryBit(b)}const i=nt(t)?t:Ya(t);if(ce(i)!==65)throw new Error("invalid signature length");const o=$t(`0x${i.slice(130)}`),l=Eo(o);return r.Signature.fromCompact(i.substring(2,130)).addRecoveryBit(l)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function Eo(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function M2({hash:e,signature:t}){return I2(await R2({hash:e,signature:t}))}function B2(e,t="hex"){const n=qu(e),r=si(new Uint8Array(n.length));return n.encode(r),t==="hex"?Ee(r.bytes):r.bytes}function qu(e){return Array.isArray(e)?P2(e.map(t=>qu(t))):k2(e)}function P2(e){const t=e.reduce((a,s)=>a+s.length,0),n=Zu(t);return{length:t<=55?1+t:1+n+t,encode(a){t<=55?a.pushByte(192+t):(a.pushByte(247+n),n===1?a.pushUint8(t):n===2?a.pushUint16(t):n===3?a.pushUint24(t):a.pushUint32(t));for(const{encode:s}of e)s(a)}}}function k2(e){const t=typeof e=="string"?rt(e):e,n=Zu(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(a){t.length===1&&t[0]<128?a.pushBytes(t):t.length<=55?(a.pushByte(128+t.length),a.pushBytes(t)):(a.pushByte(183+n),n===1?a.pushUint8(t.length):n===2?a.pushUint16(t.length):n===3?a.pushUint24(t.length):a.pushUint32(t.length),a.pushBytes(t))}}}function Zu(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new k("Length is too large.")}function N2(e){const{chainId:t,nonce:n,to:r}=e,a=e.contractAddress??e.address,s=bn(qr(["0x05",B2([t?q(t):"0x",a,n?q(n):"0x"])]));return r==="bytes"?rt(s):s}async function Yu(e){const{authorization:t,signature:n}=e;return M2({hash:N2(t),signature:n??t})}class S2 extends k{constructor(t,{account:n,docsPath:r,chain:a,data:s,gas:i,gasPrice:o,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:c,to:d,value:f}){var b;const m=Jn({from:n==null?void 0:n.address,to:d,value:typeof f<"u"&&`${ii(f)} ${((b=a==null?void 0:a.nativeCurrency)==null?void 0:b.symbol)||"ETH"}`,data:s,gas:i,gasPrice:typeof o<"u"&&`${Ce(o)} gwei`,maxFeePerGas:typeof l<"u"&&`${Ce(l)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${Ce(u)} gwei`,nonce:c});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",m].filter(
45Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Yt extends k{constructor({cause:t,message:n}={}){var a;const r=(a=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:a.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(Yt,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Yt,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Er extends k{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ce(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(Er,"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 Ja extends k{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ce(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(Ja,"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 es extends k{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}}Object.defineProperty(es,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class ts extends k{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
46`),{cause:t,name:"NonceTooLowError"})}}Object.defineProperty(ts,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class ns extends k{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}}Object.defineProperty(ns,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class rs extends k{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
47`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}
47Object.defineProperty(rs,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class as extends k{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(as,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class ss extends k{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(ss,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class is extends k{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(is,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Ir extends k{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Ce(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Ce(r)} gwei`:""}).`].join(`
48`),{cause:t,name:"TipAboveFeeCapError"})}}Object.defineProperty(Ir,"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 Jr extends k{constructor({cause:t}){super(`An error occurred while executing: ${t==null?void 0:t.shortMessage}`,{cause:t,name:"UnknownNodeError"})}}function oi(e,t){const n=(e.details||"").toLowerCase(),r=e instanceof k?e.walk(a=>(a==null?void 0:a.code)===Yt.code):e;return r instanceof k?new Yt({cause:e,message:r.details}):Yt.nodeMessage.test(n)?new Yt({cause:e,message:e.details}):Er.nodeMessage.test(n)?new Er({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):Ja.nodeMessage.test(n)?new Ja({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas}):es.nodeMessage.test(n)?new es({cause:e,nonce:t==null?void 0:t.nonce}):ts.nodeMessage.test(n)?new ts({cause:e,nonce:t==null?void 0:t.nonce}):ns.nodeMessage.test(n)?new ns({cause:e,nonce:t==null?void 0:t.nonce}):rs.nodeMessage.test(n)?new rs({cause:e}):as.nodeMessage.test(n)?new as({cause:e,gas:t==null?void 0:t.gas}):ss.nodeMessage.test(n)?new ss({cause:e,gas:t==null?void 0:t.gas}):is.nodeMessage.test(n)?new is({cause:e}):Ir.nodeMessage.test(n)?new Ir({cause:e,maxFeePerGas:t==null?void 0:t.maxFeePerGas,maxPriorityFeePerGas:t==null?void 0:t.maxPriorityFeePerGas}):new Jr({cause:e})}function $2(e,{docsPath:t,...n}){const r=(()=>{const a=oi(e,n);return a instanceof Jr?e:a})();return new S2(r,{docsPath:t,...n})}function li(e,{format:t}){if(!t)return{};const n={};function r(s){const i=Object.keys(s);for(const o of i)o in e&&(n[o]=e[o]),s[o]&&typeof s[o]=="object"&&!Array.isArray(s[o])&&r(s[o])}const a=t(e||{});return r(a),n}const O2={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function ci(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=j2(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>Ee(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=q(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=q(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=q(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=q(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=q(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=q(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=O2[e.type]),typeof e.value<"u"&&(n.value=q(e.value)),n}function j2(e){return e.map(t=>({address:t.address,r:t.r?q(BigInt(t.r)):t.r,s:t.s?q(BigInt(t.s)):t.s,chainId:q(t.chainId),nonce:q(t.nonce),...typeof t.yParity<"u"?{yParity:q(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:q(t.v)}:{}}))}function Io(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new po({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new po({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function F2(e){const{balance:t,nonce:n,state:r,stateDiff:a,code:s}=e,i={};if(s!==void 0&&(i.code=s),t!==void 0&&(i.balance=q(t)),n!==void 0&&(i.nonce=q(n)),r!==void 0&&(i.state=Io(r)),a!==void 0){if(i.state)throw new d2;i.stateDiff=Io(a)}return i}function Xu(e){if(!e)return;const t={};for(const{address:n,...r}of e){if(!de(n,{strict:!1}))throw new sn({address:n});if(t[n])throw new u2({address:n});t[n]=F2(r)}return t}const L2=2n**256n-1n;function ea(e){const{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:a,to:s}=e,i=t?jt(t):void 0;if(i&&!de(i.address))throw new sn({address:i.address});if(s&&!de(s))throw new sn({address:s});if(typeof n<"u"&&(typeof r<"u"||typeof a<"u"))throw new f2;if(r&&r>L2)throw new Er({maxFeePerGas:r});if(a&&r&&a>r)throw new Ir({maxFeePerGas:r,maxPriorityFeePerGas:a})}class D2 extends k{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class ui extends k{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class z2 extends k{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Ce(t)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class Ku extends k{constructor({blockHash:t,blockNumber:n}){let r="Block";t&&(r=`Block at hash "${t}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const Ju={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function ed(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?$t(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?$t(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ju[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Q2(e.authorizationList)),n.yParity=(()=>
48{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}function Q2(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function V2(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:ed(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}async function Ln(e,{blockHash:t,blockNumber:n,blockTag:r=e.experimental_blockTag??"latest",includeTransactions:a}={}){var u,c,d;const s=a??!1,i=n!==void 0?q(n):void 0;let o=null;if(t?o=await e.request({method:"eth_getBlockByHash",params:[t,s]},{dedupe:!0}):o=await e.request({method:"eth_getBlockByNumber",params:[i||r,s]},{dedupe:!!i}),!o)throw new Ku({blockHash:t,blockNumber:n});return(((d=(c=(u=e.chain)==null?void 0:u.formatters)==null?void 0:c.block)==null?void 0:d.format)||V2)(o,"getBlock")}async function td(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function U2(e,t){var s,i;const{block:n,chain:r=e.chain,request:a}=t||{};try{const o=((s=r==null?void 0:r.fees)==null?void 0:s.maxPriorityFeePerGas)??((i=r==null?void 0:r.fees)==null?void 0:i.defaultPriorityFee);if(typeof o=="function"){const u=n||await se(e,Ln,"getBlock")({}),c=await o({block:u,client:e,request:a});if(c===null)throw new Error;return c}if(typeof o<"u")return o;const l=await e.request({method:"eth_maxPriorityFeePerGas"});return an(l)}catch{const[o,l]=await Promise.all([n?Promise.resolve(n):se(e,Ln,"getBlock")({}),se(e,td,"getGasPrice")({})]);if(typeof o.baseFeePerGas!="bigint")throw new ui;const u=l-o.baseFeePerGas;return u<0n?0n:u}}async function W2(e,t){return os(e,t)}async function os(e,t){var f,m;const{block:n,chain:r=e.chain,request:a,type:s="eip1559"}=t||{},i=await(async()=>{var b,h;return typeof((b=r==null?void 0:r.fees)==null?void 0:b.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:e,request:a}):((h=r==null?void 0:r.fees)==null?void 0:h.baseFeeMultiplier)??1.2})();if(i<1)throw new D2;const l=10**(((f=i.toString().split(".")[1])==null?void 0:f.length)??0),u=b=>b*BigInt(Math.ceil(i*l))/BigInt(l),c=n||await se(e,Ln,"getBlock")({});if(typeof((m=r==null?void 0:r.fees)==null?void 0:m.estimateFeesPerGas)=="function"){const b=await r.fees.estimateFeesPerGas({block:n,client:e,multiply:u,request:a,type:s});if(b!==null)return b}if(s==="eip1559"){if(typeof c.baseFeePerGas!="bigint")throw new ui;const b=typeof(a==null?void 0:a.maxPriorityFeePerGas)=="bigint"?a.maxPriorityFeePerGas:await U2(e,{block:c,chain:r,request:a}),h=u(c.baseFeePerGas);return{maxFeePerGas:(a==null?void 0:a.maxFeePerGas)??h+b,maxPriorityFeePerGas:b}}return{gasPrice:(a==null?void 0:a.gasPrice)??u(await se(e,td,"getGasPrice")({}))}}async function G2(e,{address:t,blockTag:n="latest",blockNumber:r}){const a=await e.request({method:"eth_getTransactionCount",params:[t,typeof r=="bigint"?q(r):n]},{dedupe:!!r});return $t(a)}function nd(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(s=>rt(s)):e.blobs,a=[];for(const s of r)a.push(Uint8Array.from(t.blobToKzgCommitment(s)));return n==="bytes"?a:a.map(s=>Ee(s))}function rd(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(i=>rt(i)):e.blobs,a=typeof e.commitments[0]=="string"?e.commitments.map(i=>rt(i)):e.commitments,s=[];for(let i=0;i<r.length;i++){const o=r[i],l=a[i];s.push(Uint8Array.from(t.computeBlobKzgProof(o,l)))}return n==="bytes"?s:s.map(i=>Ee(i))}function H2(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const a=BigInt(32),s=BigInt(4294967295),i=Number(n>>a&s),o=Number(n&s),l=r?4:0,u=r?0:4;e.setUint32(t+l,i,r),e.setUint32(t+u,o,r)}function _2(e,t,n){return e&t^~e&n}function q2(e,t,n){return e&t^e&n^t&n}class Z2 extends Mu{constructor(t,n,r,a){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.buffer=new Uint8Array(t),this.view=ba(this.buffer)}update(t){Tr(this),t=Xs(t),$n(t);const{view:n,buffer:r,blockLen:a}=this,s=t.length;for(let i=0;i<s;){const o=Math.min(a-this.pos,s-i);if(o===a){const l=ba(t);for(;a<=s-i;i+=a)this.process(l,i);continue}r.set(t.subarray(i,i+o),this.pos),this.pos+=o,i+=o,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Tr(this),Ru(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:s}=this;let{pos:i}=this;n[i++]=128,On(this.buffer.subarray(i)),this.padOffset>a-i&&(this.process(r,0),i=0);for(let d=i;d<a;d++)n[d]=0;H2(r,a-8,BigInt(this.length*8),s),this.process(r,0);const o=ba(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=l/4,c=this.get();if(u>c.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)o.setUint32(4*d,c[d],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:a,finished:s,destroyed:i,pos:o}=this;return t.destroyed=i,t.finished=s,t.length=a,t.pos=o,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const dt=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Y2=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,2756
48734187,3204031479,3329325298]),pt=new Uint32Array(64);class X2 extends Z2{constructor(t=32){super(64,t,8,!1),this.A=dt[0]|0,this.B=dt[1]|0,this.C=dt[2]|0,this.D=dt[3]|0,this.E=dt[4]|0,this.F=dt[5]|0,this.G=dt[6]|0,this.H=dt[7]|0}get(){const{A:t,B:n,C:r,D:a,E:s,F:i,G:o,H:l}=this;return[t,n,r,a,s,i,o,l]}set(t,n,r,a,s,i,o,l){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=s|0,this.F=i|0,this.G=o|0,this.H=l|0}process(t,n){for(let d=0;d<16;d++,n+=4)pt[d]=t.getUint32(n,!1);for(let d=16;d<64;d++){const f=pt[d-15],m=pt[d-2],b=De(f,7)^De(f,18)^f>>>3,h=De(m,17)^De(m,19)^m>>>10;pt[d]=h+pt[d-7]+b+pt[d-16]|0}let{A:r,B:a,C:s,D:i,E:o,F:l,G:u,H:c}=this;for(let d=0;d<64;d++){const f=De(o,6)^De(o,11)^De(o,25),m=c+f+_2(o,l,u)+Y2[d]+pt[d]|0,h=(De(r,2)^De(r,13)^De(r,22))+q2(r,a,s)|0;c=u,u=l,l=o,o=i+m|0,i=s,s=a,a=r,r=m+h|0}r=r+this.A|0,a=a+this.B|0,s=s+this.C|0,i=i+this.D|0,o=o+this.E|0,l=l+this.F|0,u=u+this.G|0,c=c+this.H|0,this.set(r,a,s,i,o,l,u,c)}roundClean(){On(pt)}destroy(){this.set(0,0,0,0,0,0,0,0),On(this.buffer)}}const K2=Bu(()=>new X2),J2=K2;function e5(e,t){return J2(nt(e,{strict:!1})?Kn(e):e)}function t5(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),a=e5(t);return a.set([n],0),r==="bytes"?a:Ee(a)}function n5(e){const{commitments:t,version:n}=e,r=e.to,a=[];for(const s of t)a.push(t5({commitment:s,to:r,version:n}));return a}const Ro=6,ad=32,di=4096,sd=ad*di,Mo=sd*Ro-1-1*di*Ro;class r5 extends k{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class a5 extends k{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function s5(e){const t=typeof e.data=="string"?rt(e.data):e.data,n=ce(t);if(!n)throw new a5;if(n>Mo)throw new r5({maxSize:Mo,size:n});const r=[];let a=!0,s=0;for(;a;){const i=si(new Uint8Array(sd));let o=0;for(;o<di;){const l=t.slice(s,s+(ad-1));if(i.pushByte(0),i.pushBytes(l),l.length<31){i.pushByte(128),a=!1;break}o++,s+=31}r.push(i)}return r.map(i=>Ee(i.bytes))}function i5(e){const{data:t,kzg:n,to:r}=e,a=e.blobs??s5({data:t}),s=e.commitments??nd({blobs:a,kzg:n,to:r}),i=e.proofs??rd({blobs:a,commitments:s,kzg:n,to:r}),o=[];for(let l=0;l<a.length;l++)o.push({blob:a[l],commitment:s[l],proof:i[l]});return o}function o5(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return"eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return"eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new y2({transaction:e})}async function id(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return $t(t)}const od=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Bo=new Map;async function ld(e,t){const{account:n=e.account,blobs:r,chain:a,gas:s,kzg:i,nonce:o,nonceManager:l,parameters:u=od,type:c}=t,d=n&&jt(n),f={...t,...d?{from:d==null?void 0:d.address}:{}};let m;async function b(){return m||(m=await se(e,Ln,"getBlock")({blockTag:"latest"}),m)}let h;async function w(){return h||(a?a.id:typeof t.chainId<"u"?t.chainId:(h=await se(e,id,"getChainId")({}),h))}if(u.includes("nonce")&&typeof o>"u"&&d)if(l){const y=await w();f.nonce=await l.consume({address:d.address,chainId:y,client:e})}else f.nonce=await se(e,G2,"getTransactionCount")({address:d.address,blockTag:"pending"});if((u.includes("blobVersionedHashes")||u.includes("sidecars"))&&r&&i){const y=nd({blobs:r,kzg:i});if(u.includes("blobVersionedHashes")){const A=n5({commitments:y,to:"hex"});f.blobVersionedHashes=A}if(u.includes("sidecars")){const A=rd({blobs:r,commitments:y,kzg:i}),v=i5({blobs:r,commitments:y,proofs:A,to:"hex"});f.sidecars=v}}if(u.includes("chainId")&&(f.chainId=await w()),(u.includes("fees")||u.includes("type"))&&typeof c>"u")try{f.type=o5(f)}catch{let y=Bo.get(e.uid);if(typeof y>"u"){const A=await b();y=typeof(A==null?void 0:A.baseFeePerGas)=="bigint",Bo.set(e.uid,y)}f.type=y?"eip1559":"legacy"}if(u.includes("fees"))if(f.type!=="legacy"&&f.type!=="eip2930"){if(typeof f.maxFeePerGas>"u"||typeof f.maxPriorityFeePerGas>"u"){const y=await b(),{maxFeePerGas:A,maxPriorityFeePerGas:v}=await os(e,{block:y,chain:a,request:f});if(typeof t.maxPriorityFeePerGas>"u"&&t.maxFeePerGas&&t.maxFeePerGas<v)throw new z2({maxPriorityFeePerGas:v});f.maxPriorityFeePerGas=v,f.maxFeePerGas=A}}else{if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")throw new ui;if(typeof t.gasPrice>"u"){const y=await b(),{gasPrice:A}=await os(e,{block:y,chain:a,request:f,type:"legacy"});f.gasPrice=A}}return u.includes("gas")&&typeof s>"u"&&(f.gas=await se(e,cd,"estimateGas")({...f,account:d,prepare:(d==null?void 0:d.type)==="local"?[]:["blobVersionedHashes"]})),ea(f),delete f.parameters,f}async function cd(e,t){var i,o,l;const{account:n=e.account,prepare:r=!0}=t,a=n?jt(n):void 0,s=(()=>
48{if(Array.isArray(r))return r;if((a==null?void 0:a.type)!=="local")return["blobVersionedHashes"]})();try{const{accessList:u,authorizationList:c,blobs:d,blobVersionedHashes:f,blockNumber:m,blockTag:b,data:h,gas:w,gasPrice:y,maxFeePerBlobGas:A,maxFeePerGas:v,maxPriorityFeePerGas:g,nonce:x,value:C,stateOverride:I,...M}=r?await ld(e,{...t,parameters:s}):t,O=(typeof m=="bigint"?q(m):void 0)||b,N=Xu(I),Q=await(async()=>{if(M.to)return M.to;if(c&&c.length>0)return await Yu({authorization:c[0]}).catch(()=>{throw new k("`to` is required. Could not infer from `authorizationList`")})})();ea(t);const D=(l=(o=(i=e.chain)==null?void 0:i.formatters)==null?void 0:o.transactionRequest)==null?void 0:l.format,P=(D||ci)({...li(M,{format:D}),account:a,accessList:u,authorizationList:c,blobs:d,blobVersionedHashes:f,data:h,gas:w,gasPrice:y,maxFeePerBlobGas:A,maxFeePerGas:v,maxPriorityFeePerGas:g,nonce:x,to:Q,value:C},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:N?[P,O??e.experimental_blockTag??"latest",N]:O?[P,O]:[P]}))}catch(u){throw $2(u,{...t,account:a,chain:e.chain})}}function yr(e,t){if(!de(e,{strict:!1}))throw new sn({address:e});if(!de(t,{strict:!1}))throw new sn({address:t});return e.toLowerCase()===t.toLowerCase()}const Po="/docs/contract/decodeEventLog";function l5(e){const{abi:t,data:n,strict:r,topics:a}=e,s=r??!0,[i,...o]=a;if(!i)throw new W6({docsPath:Po});const l=t.find(h=>h.type==="event"&&i===_r(tt(h)));if(!(l&&"name"in l)||l.type!=="event")throw new wu(i,{docsPath:Po});const{name:u,inputs:c}=l,d=c==null?void 0:c.some(h=>!("name"in h&&h.name)),f=d?[]:{},m=c.map((h,w)=>[h,w]).filter(([h])=>"indexed"in h&&h.indexed);for(let h=0;h<m.length;h++){const[w,y]=m[h],A=o[h];if(!A)throw new vu({abiItem:l,param:w});f[d?y:w.name||y]=c5({param:w,value:A})}const b=c.filter(h=>!("indexed"in h&&h.indexed));if(b.length>0){if(n&&n!=="0x")try{const h=Xr(b,n);if(h)if(d)for(let w=0;w<c.length;w++)f[w]=f[w]??h.shift();else for(let w=0;w<b.length;w++)f[b[w].name]=h[w]}catch(h){if(s)throw h instanceof hu||h instanceof Du?new Za({abiItem:l,data:n,params:b,size:ce(n)}):h}else if(s)throw new Za({abiItem:l,data:"0x",params:b,size:0})}return{eventName:u,args:Object.values(f).length>0?f:void 0}}function c5({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Xr([e],t)||[])[0]}function ls(e){const{abi:t,args:n,logs:r,strict:a=!0}=e,s=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return r.map(i=>{var o;try{const l=t.find(c=>c.type==="event"&&i.topics[0]===_r(c));if(!l)return null;const u=l5({...i,abi:[l],strict:a});return s&&!s.includes(u.eventName)||!u5({args:u.args,inputs:l.inputs,matchArgs:n})?null:{...u,...i}}catch(l){let u,c;if(l instanceof wu)return null;if(l instanceof Za||l instanceof vu){if(a)return null;u=l.abiItem.name,c=(o=l.abiItem.inputs)==null?void 0:o.some(d=>!("name"in d&&d.name))}return{...i,args:c?[]:{},eventName:u}}}).filter(Boolean)}function u5(e){const{args:t,inputs:n,matchArgs:r}=e;if(!r)return!0;if(!t)return!1;function a(s,i,o){try{return s.type==="address"?yr(i,o):s.type==="string"||s.type==="bytes"?bn(Kn(i))===o:i===o}catch{return!1}}return Array.isArray(t)&&Array.isArray(r)?r.every((s,i)=>{if(s==null)return!0;const o=n[i];return o?(Array.isArray(s)?s:[s]).some(u=>a(o,u,t[i])):!1}):typeof t=="object"&&!Array.isArray(t)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,i])=>{if(i==null)return!0;const o=n.find(u=>u.name===s);return o?(Array.isArray(i)?i:[i]).some(u=>a(o,u,t[s])):!1}):!1}function ud(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}async function d5(e,{address:t,blockHash:n,fromBlock:r,toBlock:a,event:s,events:i,args:o,strict:l}={}){const u=l??!1,c=i??(s?[s]:void 0);let d=[];c&&(d=[c.flatMap(h=>Wg({abi:[h],eventName:h.name,args:i?void 0:o}))],s&&(d=d[0]));let f;n?f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:n}]}):f=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof r=="bigint"?q(r):r,toBlock:typeof a=="bigint"?q(a):a}]});const m=f.map(b=>ud(b));return c?ls({abi:c,args:o,logs:m,strict:u}):m}const wa="/docs/contract/decodeFunctionResult";function dd(e){const{abi:t,args:n,functionName:r,data:a}=e;let s=t[0];if(r){const o=Zr({abi:t,args:n,name:r});if(!o)throw new xr(r,{docsPath:wa});s=o}if(s.type!=="function")throw new xr(void 0,{docsPath:wa});if(!s.outputs)throw new G6(s.name,{docsPath:wa});const i=Xr(s.outputs,a);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const p5="0.1.1";function f5(){return p5}
48class Dn extends Error{constructor(t,n={}){const r=(()=>{var l;if(n.cause instanceof Dn){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(l=n.cause)!=null&&l.message?n.cause.message:n.details})(),a=n.cause instanceof Dn&&n.cause.docsPath||n.docsPath,i=`https://oxlib.sh${a??""}`,o=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||a?["",r?`Details: ${r}`:void 0,a?`See: ${i}`:void 0]:[]].filter(l=>typeof l=="string").join(`
49`);super(o,n.cause?{cause:n.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@${f5()}`}),this.cause=n.cause,this.details=r,this.docs=i,this.docsPath=a,this.shortMessage=t}walk(t){return pd(this,t)}}function pd(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?pd(e.cause,t):t?null:e}function y5(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const a=e.replace("0x","");if(a.length>r*2)throw new h5({size:Math.ceil(a.length/2),targetSize:r,type:"Hex"});return`0x${a[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function Ye(e,t={}){const{signed:n,size:r}=t,a=BigInt(e);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&n?-s-1n:0;if(s&&a>s||a<i){const u=typeof e=="bigint"?"n":"";throw new b5({max:s?`${s}${u}`:void 0,min:`${i}${u}`,signed:n,size:r,value:`${e}${u}`})}const l=`0x${(n&&a<0?(1n<<BigInt(r*8))+BigInt(a):a).toString(16)}`;return r?m5(l,r):l}function m5(e,t){return y5(e,{dir:"left",size:t})}class b5 extends Dn{constructor({max:t,min:n,signed:r,size:a,value:s}){super(`Number \`${s}\` is not in safe${a?` ${a*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class h5 extends Dn{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function g5(e){return{address:e.address,amount:Ye(e.amount),index:Ye(e.index),validatorIndex:Ye(e.validatorIndex)}}function w5(e){return{...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ye(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ye(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ye(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ye(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ye(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ye(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(g5)}}}const ko=[{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"}],U8=[{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"}]}],v5="0x82ad56cb",A5="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b
49602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",x5="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",T5="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9
49150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";class cs extends k{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class C5 extends k{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID:  ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class E5 extends k{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(`
50`),{name:"ChainNotFoundError"})}}class fd extends k{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}const va="/docs/contract/encodeDeployData";function yd(e){const{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;const a=t.find(i=>"type"in i&&i.type==="constructor");if(!a)throw new z6({docsPath:va});if(!("inputs"in a))throw new co({docsPath:va});if(!a.inputs||a.inputs.length===0)throw new co({docsPath:va});const s=jn(a.inputs,n);return qr([r,s])}function I5({blockNumber:e,chain:t,contract:n}){var a;const r=(a=t==null?void 0:t.contracts)==null?void 0:a[n];if(!r)throw new cs({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new cs({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}function R5(e,{docsPath:t,...n}){const r=(()=>{const a=oi(e,n);return a instanceof Jr?e:a})();return new g2(r,{docsPath:t,...n})}function md(){let e=()=>{},t=()=>{};return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}const Aa=new Map;function M5({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:a}){const s=async()=>{const c=l();i();const d=c.map(({args:f})=>f);d.length!==0&&e(d).then(f=>{a&&Array.isArray(f)&&f.sort(a);for(let m=0;m<c.length;m++){const{resolve:b}=c[m];b==null||b([f[m],f])}}).catch(f=>{for(let m=0;m<c.length;m++){const{reject:b}=c[m];b==null||b(f)}})},i=()=>Aa.delete(t),o=()=>l().map(({args:c})=>c),l=()=>Aa.get(t)||[],u=c=>Aa.set(t,[...l(),c]);return{flush:i,async schedule(c){const{promise:d,resolve:f,reject:m}=md();return(n==null?void 0:n([...o(),c]))&&s(),l().length>0?(u({args:c,resolve:f,reject:m}),d):(u({args:c,resolve:f,reject:m}),setTimeout(s,r),d)}}}async function B5(e,t){var D,S,P,B;const{account:n=e.account,authorizationList:r,batch:a=!!((D=e.batch)!=null&&D.multicall),blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",accessList:o,blobs:l,blockOverrides:u,code:c,data:d,factory:f,factoryData:m,gas:b,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:y,maxPriorityFeePerGas:A,nonce:v,to:g,value:x,stateOverride:C,...I}=t,M=n?jt(n):void 0;if(c&&(f||m))throw new k("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&g)throw new k("Cannot provide both `code` & `to` as parameters.");const R=c&&d,O=f&&m&&g&&d,N=R||O,Q=R?bd({code:c,data:d}):O?N5({data:d,factory:f,factoryData:m,to:g}):d;try{ea(t);const E=(typeof s=="bigint"?q(s):void 0)||i,j=u?w5(u):void 0,F=Xu(C),V=(B=(P=(S=e.chain)==null?void 0:S.formatters)==null?void 0:P.transactionRequest)==null?void 0:B.format,_=(V||ci)({...li(I,{format:V}),accessList:o,account:M,authorizationList:r,blobs:l,data:Q,gas:b,gasPrice:h,maxFeePerBlobGas:w,maxFeePerGas:y,maxPriorityFeePerGas:A,nonce:v,to:N?void 0:g,value:x},"call");if(a&&P5({request:_})&&!F&&!j)try{return await k5(e,{..._,blockNumber:s,blockTag:i})}catch(z){if(!(z instanceof fd)&&!(z instanceof cs))throw z}const Y=(()=>{const z=[_,E];return F&&j?[...z,F,j]:F?[...z,F]:j?[...z,{},j]:z})(),ie=await e.request({method:"eth_call",params:Y});return ie==="0x"?{data:void 0}:{data:ie}}catch($){const E=S5($),{offchainLookup:j,offchainLookupSignature:F}=await Ml(async()=>{const{offchainLookup:V,offchainLookupSignature:W}=await import("./ccip-DLZ_JHpP.js");return{offchainLookup:V,offchainLookupSignature:W}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51]));if(e.ccipRead!==!1&&(E==null?void 0:E.slice(0,10))===F&&g)return{data:await j(e,{data:E,to:g})};throw N&&(E==null?void 0:E.slice(0,10))==="0x101bb98d"?new x2({factory:f}):R5($,{...t,account:M,chain:e.chain})}}function P5({request:e}){const{data:t,to:n,...r}=e;return!(!t||t.startsWith(v5)||!n||Object.values(r).filter(a=>typeof a<"u").length>0)}async function k5(e,t){var h;const{batchSize:n=1024,deployless:r=!1,wait:a=0}=typeof((h=e.batch)==null?void 0:h.multicall)=="object"?e.batch.multicall:{},{blockNumber:s,blockTag:i=e.experimental_blockTag??"latest",data:o,to:l}=t,u=(()=>
50{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return I5({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new fd})(),d=(typeof s=="bigint"?q(s):void 0)||i,{schedule:f}=M5({id:`${e.uid}.${d}`,wait:a,shouldSplitBatch(w){return w.reduce((A,{data:v})=>A+(v.length-2),0)>n*2},fn:async w=>{const y=w.map(g=>({allowFailure:!0,callData:g.data,target:g.to})),A=Yr({abi:ko,args:[y],functionName:"aggregate3"}),v=await e.request({method:"eth_call",params:[{...u===null?{data:bd({code:T5,data:A})}:{to:u,data:A}},d]});return dd({abi:ko,args:[y],functionName:"aggregate3",data:v||"0x"})}}),[{returnData:m,success:b}]=await f({data:o,to:l});if(!b)throw new Gu({data:m});return m==="0x"?{data:void 0}:{data:m}}function bd(e){const{code:t,data:n}=e;return yd({abi:Mn(["constructor(bytes, bytes)"]),bytecode:A5,args:[t,n]})}function N5(e){const{data:t,factory:n,factoryData:r,to:a}=e;return yd({abi:Mn(["constructor(address, bytes, address, bytes)"]),bytecode:x5,args:[a,t,n,r]})}function S5(e){var n;if(!(e instanceof k))return;const t=e.walk();return typeof(t==null?void 0:t.data)=="object"?(n=t.data)==null?void 0:n.data:t.data}async function be(e,t){const{abi:n,address:r,args:a,functionName:s,...i}=t,o=Yr({abi:n,args:a,functionName:s});try{const{data:l}=await se(e,B5,"call")({...i,data:o,to:r});return dd({abi:n,args:a,functionName:s,data:l||"0x"})}catch(l){throw _u(l,{abi:n,address:r,args:a,docsPath:"/docs/contract/readContract",functionName:s})}}const xa=new Map,No=new Map;let $5=0;function us(e,t,n){const r=++$5,a=()=>xa.get(e)||[],s=()=>{const c=a();xa.set(e,c.filter(d=>d.id!==r))},i=()=>{const c=a();if(!c.some(f=>f.id===r))return;const d=No.get(e);if(c.length===1&&d){const f=d();f instanceof Promise&&f.catch(()=>{})}s()},o=a();if(xa.set(e,[...o,{id:r,fns:t}]),o&&o.length>0)return i;const l={};for(const c in t)l[c]=(...d)=>{var m,b;const f=a();if(f.length!==0)for(const h of f)(b=(m=h.fns)[c])==null||b.call(m,...d)};const u=n(l);return typeof u=="function"&&No.set(e,u),i}async function ds(e){return new Promise(t=>setTimeout(t,e))}function O5(e,{emitOnBegin:t,initialWaitTime:n,interval:r}){let a=!0;const s=()=>a=!1;return(async()=>{let o;t&&(o=await e({unpoll:s}));const l=await(n==null?void 0:n(o))??r;await ds(l);const u=async()=>{a&&(await e({unpoll:s}),await ds(r),u())};u()})(),s}const j5=new Map,F5=new Map;function L5(e){const t=(a,s)=>({clear:()=>s.delete(a),get:()=>s.get(a),set:i=>s.set(a,i)}),n=t(e,j5),r=t(e,F5);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function D5(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=L5(t),a=r.response.get();if(a&&n>0&&Date.now()-a.created.getTime()<n)return a.data;let s=r.promise.get();s||(s=e(),r.promise.set(s));try{const i=await s;return r.response.set({created:new Date,data:i}),i}finally{r.promise.clear()}}const z5=e=>`blockNumber.${e}`;async function hd(e,{cacheTime:t=e.cacheTime}={}){const n=await D5(()=>e.request({method:"eth_blockNumber"}),{cacheKey:z5(e.uid),cacheTime:t});return BigInt(n)}class gd extends k{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
51`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"})}}class Ta extends k{constructor({docsPath:t,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function Q5({chain:e,currentChainId:t}){if(!e)throw new E5;if(t!==e.id)throw new C5({chain:e,currentChainId:t})}function V5(e,{docsPath:t,...n}){const r=(()=>{const a=oi(e,n);return a instanceof Jr?e:a})();return new m2(r,{docsPath:t,...n})}async function U5(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}const Ca=new Js(128);async function W5(e,t){var A,v,g,x;const{account:n=e.account,chain:r=e.chain,accessList:a,authorizationList:s,blobs:i,data:o,gas:l,gasPrice:u,maxFeePerBlobGas:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,type:b,value:h,...w}=t;if(typeof n>"u")throw new gd({docsPath:"/docs/actions/wallet/sendTransaction"});const y=n?jt(n):null;try{ea(t);const C=await(async()=>
51{if(t.to)return t.to;if(t.to!==null&&s&&s.length>0)return await Yu({authorization:s[0]}).catch(()=>{throw new k("`to` is required. Could not infer from `authorizationList`.")})})();if((y==null?void 0:y.type)==="json-rpc"||y===null){let I;r!==null&&(I=await se(e,id,"getChainId")({}),Q5({currentChainId:I,chain:r}));const M=(g=(v=(A=e.chain)==null?void 0:A.formatters)==null?void 0:v.transactionRequest)==null?void 0:g.format,O=(M||ci)({...li(w,{format:M}),accessList:a,account:y,authorizationList:s,blobs:i,chainId:I,data:o,gas:l,gasPrice:u,maxFeePerBlobGas:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,to:C,type:b,value:h},"sendTransaction"),N=Ca.get(e.uid),Q=N?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:Q,params:[O]},{retryCount:0})}catch(D){if(N===!1)throw D;const S=D;if(S.name==="InvalidInputRpcError"||S.name==="InvalidParamsRpcError"||S.name==="MethodNotFoundRpcError"||S.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[O]},{retryCount:0}).then(P=>(Ca.set(e.uid,!0),P)).catch(P=>{const B=P;throw B.name==="MethodNotFoundRpcError"||B.name==="MethodNotSupportedRpcError"?(Ca.set(e.uid,!1),S):B});throw S}}if((y==null?void 0:y.type)==="local"){const I=await se(e,ld,"prepareTransactionRequest")({account:y,accessList:a,authorizationList:s,blobs:i,chain:r,data:o,gas:l,gasPrice:u,maxFeePerBlobGas:c,maxFeePerGas:d,maxPriorityFeePerGas:f,nonce:m,nonceManager:y.nonceManager,parameters:[...od,"sidecars"],type:b,value:h,...w,to:C}),M=(x=r==null?void 0:r.serializers)==null?void 0:x.transaction,R=await y.signTransaction(I,{serializer:M});return await se(e,U5,"sendRawTransaction")({serializedTransaction:R})}throw(y==null?void 0:y.type)==="smart"?new Ta({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new Ta({docsPath:"/docs/actions/wallet/sendTransaction",type:y==null?void 0:y.type})}catch(C){throw C instanceof Ta?C:V5(C,{...t,account:y,chain:t.chain||void 0})}}async function en(e,t){return en.internal(e,W5,"sendTransaction",t)}(function(e){async function t(n,r,a,s){const{abi:i,account:o=n.account,address:l,args:u,dataSuffix:c,functionName:d,...f}=s;if(typeof o>"u")throw new gd({docsPath:"/docs/contract/writeContract"});const m=o?jt(o):null,b=Yr({abi:i,args:u,functionName:d});try{return await se(n,r,a)({data:`${b}${c?c.replace("0x",""):""}`,to:l,account:m,...f})}catch(h){throw _u(h,{abi:i,address:l,args:u,docsPath:"/docs/contract/writeContract",functionName:d,sender:m==null?void 0:m.address})}}e.internal=t})(en||(en={}));function So(e,{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((a,s)=>{const i=async({count:o=0}={})=>{const l=async({error:u})=>{const c=typeof t=="function"?t({count:o,error:u}):t;c&&await ds(c),i({count:o+1})};try{const u=await e();a(u)}catch(u){if(o<n&&await r({count:o,error:u}))return l({error:u});s(u)}};i()})}const G5={"0x0":"reverted","0x1":"success"};function H5(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>ud(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?$t(e.transactionIndex):null,status:e.status?G5[e.status]:null,type:e.type?Ju[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}function $o(e){return nt(e)&&ce(e)===32}const _5="0x0000000000000000000000000000000000000000000000000000000000000000";async function q5(e,{blockHash:t,blockNumber:n,blockTag:r,hash:a,index:s}){var c,d,f;const i=r||"latest",o=n!==void 0?q(n):void 0;let l=null;if(a?l=await e.request({method:"eth_getTransactionByHash",params:[a]},{dedupe:!0}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,q(s)]},{dedupe:!0}):l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[o||i,q(s)]},{dedupe:!!o}),!l)throw new Vu({blockHash:t,blockNumber:n,blockTag:i,hash:a,index:s});return(((f=(d=(c=e.chain)==null?void 0:c.formatters)==null?void 0:d.transaction)==null?void 0:f.format)||ed)(l,"getTransaction")}async function mr(e,{hash:t}){var a,s,i;const n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new Uu({hash:t});return(((i=(s=(a=e.chain)==null?void 0:a.formatters)==null?void 0:s.transactionReceipt)==null?void 0:i.format)||H5)(n,"getTransactionReceipt")}const ur="0x0000000000000000000000000000000000000000";function Z5(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:r,onError:a,poll:s,pollingInterval:i=e.pollingInterval}){const o=typeof s<"u"?s:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].c
51onfig.type==="webSocket"||e.transport.transports[0].config.type==="ipc"));let l;return o?(()=>{const d=ln(["watchBlockNumber",e.uid,t,n,i]);return us(d,{onBlockNumber:r,onError:a},f=>O5(async()=>{var m;try{const b=await se(e,hd,"getBlockNumber")({cacheTime:0});if(l!==void 0){if(b===l)return;if(b-l>1&&n)for(let h=l+1n;h<b;h++)f.onBlockNumber(h,l),l=h}(l===void 0||b>l)&&(f.onBlockNumber(b,l),l=b)}catch(b){(m=f.onError)==null||m.call(f,b)}},{emitOnBegin:t,interval:i}))})():(()=>{const d=ln(["watchBlockNumber",e.uid,t,n]);return us(d,{onBlockNumber:r,onError:a},f=>{let m=!0,b=()=>m=!1;return(async()=>{try{const h=(()=>{if(e.transport.type==="fallback"){const y=e.transport.transports.find(A=>A.config.type==="webSocket"||A.config.type==="ipc");return y?y.value:e.transport}return e.transport})(),{unsubscribe:w}=await h.subscribe({params:["newHeads"],onData(y){var v;if(!m)return;const A=an((v=y.result)==null?void 0:v.number);f.onBlockNumber(A,l),l=A},onError(y){var A;(A=f.onError)==null||A.call(f,y)}});b=w,m||b()}catch(h){a==null||a(h)}})(),()=>b()})})()}async function Ea(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:a,onReplaced:s,retryCount:i=6,retryDelay:o=({count:x})=>~~(1<<x)*200,timeout:l=18e4}
51=t,u=ln(["waitForTransactionReceipt",e.uid,a]),c=(()=>{var x;return t.pollingInterval?t.pollingInterval:(x=e.chain)!=null&&x.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval})();let d,f,m,b=!1,h,w;const{promise:y,resolve:A,reject:v}=md(),g=l?setTimeout(()=>{w==null||w(),h==null||h(),v(new b2({hash:a}))},l):void 0;return h=us(u,{onReplaced:s,resolve:A,reject:v},async x=>{if(m=await se(e,mr,"getTransactionReceipt")({hash:a}).catch(()=>{}),m&&r<=1){clearTimeout(g),x.resolve(m),h==null||h();return}w=se(e,Z5,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:c,async onBlockNumber(C){const I=R=>{clearTimeout(g),w==null||w(),R(),h==null||h()};let M=C;if(!b)try{if(m){if(r>1&&(!m.blockNumber||M-m.blockNumber+1n<r))return;I(()=>x.resolve(m));return}if(n&&!d&&(b=!0,await So(async()=>{d=await se(e,q5,"getTransaction")({hash:a}),d.blockNumber&&(M=d.blockNumber)},{delay:o,retryCount:i}),b=!1),m=await se(e,mr,"getTransactionReceipt")({hash:a}),r>1&&(!m.blockNumber||M-m.blockNumber+1n<r))return;I(()=>x.resolve(m))}catch(R){if(R instanceof Vu||R instanceof Uu){if(!d){b=!1;return}try{f=d,b=!0;const O=await So(()=>se(e,Ln,"getBlock")({blockNumber:M,includeTransactions:!0}),{delay:o,retryCount:i,shouldRetry:({error:D})=>D instanceof Ku});b=!1;const N=O.transactions.find(({from:D,nonce:S})=>D===f.from&&S===f.nonce);if(!N||(m=await se(e,mr,"getTransactionReceipt")({hash:N.hash}),r>1&&(!m.blockNumber||M-m.blockNumber+1n<r)))return;let Q="replaced";N.to===f.to&&N.value===f.value&&N.input===f.input?Q="repriced":N.from===N.to&&N.value===0n&&(Q="cancelled"),I(()=>{var D;(D=x.onReplaced)==null||D.call(x,{reason:Q,replacedTransaction:f,transaction:N,transactionReceipt:m}),x.resolve(m)})}catch(O){I(()=>x.reject(O))}}else I(()=>x.reject(R))}}})}),y}const Ne=[{type:"constructor",inputs:[{name:"wrappedNative",type:"address",internalType:"address"},{name:"armProxy",type:"address",internalType:"address"}],stateMutability:"nonpayable"},{type:"function",name:"MAX_RET_BYTES",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"acceptOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"applyRampUpdates",inputs:[{name:"onRampUpdates",type:"tuple[]",internalType:"struct Router.OnRamp[]",components:[{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"onRamp",type:"address",internalType:"address"}]},{name:"offRampRemoves",type:"tuple[]",internalType:"struct Router.OffRamp[]",components:[{name:"sourceChainSelector",type:"uint64",internalType:"uint64"},{name:"offRamp",type:"address",internalType:"address"}]},{name:"offRampAdds",type:"tuple[]",internalType:"struct Router.OffRamp[]",components:[{name:"sourceChainSelector",type:"uint64",internalType:"uint64"},{name:"offRamp",type:"address",internalType:"address"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"ccipSend",inputs:[{name:"destinationChainSelector",type:"uint64",internalType:"uint64"},{name:"message",type:"tuple",internalType:"struct Client.EVM2AnyMessage",components:[{name:"receiver",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes",internalType:"bytes"},{name:"tokenAmounts",type:"tuple[]",internalType:"struct Client.EVMTokenAmount[]",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"feeToken",type:"address",internalType:"address"},{name:"extraArgs",type:"bytes",internalType:"bytes"}]}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"payable"},{type:"function",name:"getArmProxy",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getFee",inputs:[{name:"destinationChainSelector",type:"uint64",internalType:"uint64"},{name:"message",type:"tuple",internalType:"struct Client.EVM2AnyMessage",components:[{name:"receiver",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes",internalType:"bytes"},{name:"tokenAmounts",type:"tuple[]",internalType:"struct Client.EVMTokenAmount[]",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"feeToken",type:"address",internalType:"address"},{name:"extraArgs",type:"bytes",internalType:"bytes"}]}],outputs:[{name:"fee",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getOffRamps",inputs:[],outputs:[{name:"",type:"tuple[]",internalType:"struct Router.OffRamp[]",components:[{name:"sourceChainSelector",type:"uint64",internalType:"uint64"},{name:"offRamp",type:"address",internalType:"address"}]}],stateMutability:"view"},{type:"function",name:"getOnRamp",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getWrappedNative",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"isChainSupported",inputs:[{name:"chainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"isOffRamp",inputs:[{name:"sourceChainSelector",type:"uint64",internalType:"uint64"},{name:"offRamp",type:"address",internalType:"address"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"}
vendor: 6,572 bytes, line 51
51,{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"recoverTokens",inputs:[{name:"tokenAddress",type:"address",internalType:"address"},{name:"to",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"routeMessage",inputs:[{name:"message",type:"tuple",internalType:"struct Client.Any2EVMMessage",components:[{name:"messageId",type:"bytes32",internalType:"bytes32"},{name:"sourceChainSelector",type:"uint64",internalType:"uint64"},{name:"sender",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes",internalType:"bytes"},{name:"destTokenAmounts",type:"tuple[]",internalType:"struct Client.EVMTokenAmount[]",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]}]},{name:"gasForCallExactCheck",type:"uint16",internalType:"uint16"},{name:"gasLimit",type:"uint256",internalType:"uint256"},{name:"receiver",type:"address",internalType:"address"}],outputs:[{name:"success",type:"bool",internalType:"bool"},{name:"retData",type:"bytes",internalType:"bytes"},{name:"gasUsed",type:"uint256",internalType:"uint256"}],stateMutability:"nonpayable"},{type:"function",name:"setWrappedNative",inputs:[{name:"wrappedNative",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"transferOwnership",inputs:[{name:"to",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"typeAndVersion",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"event",name:"MessageExecuted",inputs:[{name:"messageId",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"sourceChainSelector",type:"uint64",indexed:!1,internalType:"uint64"},{name:"offRamp",type:"address",indexed:!1,internalType:"address"},{name:"calldataHash",type:"bytes32",indexed:!1,internalType:"bytes32"}],anonymous:!1},{type:"event",name:"OffRampAdded",inputs:[{name:"sourceChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"offRamp",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"OffRampRemoved",inputs:[{name:"sourceChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"offRamp",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"OnRampSet",inputs:[{name:"destChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"onRamp",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"OwnershipTransferRequested",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"error",name:"BadARMSignal",inputs:[]},{type:"error",name:"FailedToSendValue",inputs:[]},{type:"error",name:"InsufficientFeeTokenAmount",inputs:[]},{type:"error",name:"InvalidMsgValue",inputs:[]},{type:"error",name:"InvalidRecipientAddress",inputs:[{name:"to",type:"address",internalType:"address"}]},{type:"error",name:"OffRampMismatch",inputs:[{name:"chainSelector",type:"uint64",internalType:"uint64"},{name:"offRamp",type:"address",internalType:"address"}]},{type:"error",name:"OnlyOffRamp",inputs:[]},{type:"error",name:"UnsupportedDestinationChain",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}]}],Ze=[{inputs:[{components:[{internalType:"address",name:"linkToken",type:"address"},{internalType:"uint64",name:"chainSelector",type:"uint64"},{internalType:"uint64",name:"destChainSelector",type:"uint64"},{internalType:"uint64",name:"defaultTxGasLimit",type:"uint64"},{internalType:"uint96",name:"maxNopFeesJuels",type:"uint96"},{internalType:"address",name:"prevOnRamp",type:"address"},{internalType:"address",name:"rmnProxy",type:"address"},{internalType:"address",name:"tokenAdminRegistry",type:"address"}],internalType:"struct EVM2EVMOnRamp.StaticConfig",name:"staticConfig",type:"tuple"},{components:[{internalType:"address",name:"router",type:"address"},{internalType:"uint16",name:"maxNumberOfTokensPerMsg",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint16",name:"destGasPerPayloadByte",type:"uint16"},{internalType:"uint32",name:"destDataAvailabilityOverheadGas",type:"uint32"},{internalType:"uint16",name:"destGasPerDataAvailabilityByte",type:"uint16"},{internalType:"uint16",name:"destDataAvailabilityMultiplierBps",type:"uint16"},{internalType:"address",name:"priceRegistry",type:"address"},{internalType:"uint32",name:"maxDataBytes",type:"uint32"},{internalType:"uint32",name:"maxPerMsgGasLimit",type:"uint32"},{internalType:"uint16",name:"defaultTokenFeeUSDCents",type:"uint16"},{internalType:"uint32",name:"defaultTokenDestGasOverhead",type:"uint32"},{internalType:"bool",name:"enforceOutOfOrder",type:"bool"}],internalType:"struct EVM2EVMOnRamp.DynamicConfig",name:"dynamicConfig",type:"tuple"},{components:[{internalType:"bool",name:"isEnabled",type:"bool"},{internalType:"uint128",name:"capacity",type:"uint128"},{internalType:"uint128",name:"rate",type:"uint128"}],internalType:"struct RateLimiter.Config",name:"rateLimiterConfig",type:"tuple"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"networkFeeUSDCents",type:"uint32"},{internalType:"uint64",name:"gasMultiplierWeiPerEth",type:"uint64"},{internalType:"uint64",name:"premiumMultiplierWeiPerEth",type:"uint64"},{internalType:"bool",name:"enabled",type:"bool"}],internalType:"struct EVM2EVMOnRamp.FeeTokenConfigArgs[]",name:"feeTokenConfigs",type:"tuple[]"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"minFeeUSDCents",type:"uint32"},{internalType:"uint32",name:"maxFeeUSDCents",type:"uint32"},{internalType:"uint16",name:"deciBps",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint32",name:"destBytesOverhead",type:"uint32"},{internalType:"bool",name:"aggregateRateLimitEnabled",type:"bool"}],internalType:"struct EVM2EVMOnRamp.TokenTransferFeeConfigArgs[]",name:"tokenTransferFeeConfigArgs",type:"tuple[]"},{components:[{internalType:"address",name:"nop",type:"address"},{internalType:"uint16",name:"weight",type:"uint16"}
51],internalType:"struct EVM2EVMOnRamp.NopAndWeight[]",name:"nopsAndWeights",type:"tuple[]"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"uint256",name:"capacity",type:"uint256"},{internalType:"uint256",name:"requested",type:"uint256"}],name:"AggregateValueMaxCapacityExceeded",type:"error"},{inputs:[{internalType:"uint256",name:"minWaitInSeconds",type:"uint256"},{internalType:"uint256",name:"available",type:"uint256"}],name:"AggregateValueRateLimitReached",type:"error"},{inputs:[],name:"BucketOverfilled",type:"error"},{inputs:[],name:"CannotSendZeroTokens",type:"error"},{inputs:[],name:"CursedByRMN",type:"error"},{inputs:[],name:"ExtraArgOutOfOrderExecutionMustBeTrue",type:"error"},{inputs:[],name:"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry",type:"error"},{inputs:[],name:"InsufficientBalance",type:"error"},{inputs:[{internalType:"uint64",name:"chainSelector",type:"uint64"}],name:"InvalidChainSelector",type:"error"},{inputs:[],name:"InvalidConfig",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"destBytesOverhead",type:"uint32"}],name:"InvalidDestBytesOverhead",type:"error"},{inputs:[{internalType:"bytes",name:"encodedAddress",type:"bytes"}],name:"InvalidEVMAddress",type:"error"},{inputs:[],name:"InvalidExtraArgsTag",type:"error"},{inputs:[{internalType:"address",name:"nop",type:"address"}],name:"InvalidNopAddress",type:"error"},{inputs:[],name:"InvalidWithdrawParams",type:"error"},{inputs:[],name:"LinkBalanceNotSettled",type:"error"},{inputs:[],name:"MaxFeeBalanceReached",type:"error"},{inputs:[],name:"MessageGasLimitTooHigh",type:"error"},{inputs:[{internalType:"uint256",name:"maxSize",type:"uint256"},{internalType:"uint256",name:"actualSize",type:"uint256"}],name:"MessageTooLarge",type:"error"},{inputs:[],name:"MustBeCalledByRouter",type:"error"},{inputs:[],name:"NoFeesToPay",type:"error"},{inputs:[],name:"NoNopsToPay",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"NotAFeeToken",type:"error"},{inputs:[],name:"OnlyCallableByAdminOrOwner",type:"error"},{inputs:[],name:"OnlyCallableByOwnerOrAdmin",type:"error"},{inputs:[],name:"OnlyCallableByOwnerOrAdminOrNop",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"PriceNotFoundForToken",type:"error"},{inputs:[],name:"RouterMustSetOriginalSender",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"SourceTokenDataTooLarge",type:"error"},{inputs:[{internalType:"uint256",name:"capacity",type:"uint256"},{internalType:"uint256",name:"requested",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenMaxCapacityExceeded",type:"error"},{inputs:[{internalType:"uint256",name:"minWaitInSeconds",type:"uint256"},{internalType:"uint256",name:"available",type:"uint256"},{internalType:"address",name:"tokenAddress",type:"address"}],name:"TokenRateLimitReached",type:"error"},{inputs:[],name:"TooManyNops",type:"error"},{inputs:[],name:"UnsupportedNumberOfTokens",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"UnsupportedToken",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminSet",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"uint64",name:"sourceChainSelector",type:"uint64"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint64",name:"sequenceNumber",type:"uint64"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"bool",name:"strict",type:"bool"},{internalType:"uint64",name:"nonce",type:"uint64"},{internalType:"address",name:"feeToken",type:"address"},{internalType:"uint256",name:"feeTokenAmount",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Client.EVMTokenAmount[]",name:"tokenAmounts",type:"tuple[]"},{internalType:"bytes[]",name:"sourceTokenData",type:"bytes[]"},{internalType:"bytes32",name:"messageId",type:"bytes32"}],indexed:!1,internalType:"struct Internal.EVM2EVMMessage",name:"message",type:"tuple"}],name:"CCIPSendRequested",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"bool",name:"isEnabled",type:"bool"},{internalType:"uint128",name:"capacity",type:"uint128"},{internalType:"uint128",name:"rate",type:"uint128"}],indexed:!1,internalType:"struct RateLimiter.Config",name:"config",type:"tuple"}],name:"ConfigChanged",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"address",name:"linkToken",type:"address"},{internalType:"uint64",name:"chainSelector",type:"uint64"},{internalType:"uint64",name:"destChainSelector",type:"uint64"},{internalType:"uint64",name:"defaultTxGasLimit",type:"uint64"},{internalType:"uint96",name:"maxNopFeesJuels",type:"uint96"},{internalType:"address",name:"prevOnRamp",type:"address"},{internalType:"address",name:"rmnProxy",type:"address"},{internalType:"address",name:"tokenAdminRegistry",type:"address"}],indexed:!1,internalType:"struct EVM2EVMOnRamp.StaticConfig",name:"staticConfig",type:"tuple"},{components:[{internalType:"address",name:"router",type:"address"},{internalType:"uint16",name:"maxNumberOfTokensPerMsg",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint16",name:"destGasPerPayloadByte",type:"uint16"},{internalType:"uint32",name:"destDataAvailabilityOverheadGas",type:"uint32"},{internalType:"uint16",name:"destGasPerDataAvailabilityByte",type:"uint16"},{internalType:"uint16",name:"destDataAvailabilityMultiplierBps",type:"uint16"},{internalType:"address",name:"priceRegistry",type:"address"},{internalType:"uint32",name:"maxDataBytes",type:"uint32"},{internalType:"uint32",name:"maxPerMsgGasLimit",type:"uint32"},{internalType:"uint16",name:"defaultTokenFeeUSDCents",type:"uint16"},{internalType:"uint32",name:"defaultTokenDestGasOverhead",type:"uint32"},{internalType:"bool",name:"enforceOutOfOrder",type:"bool"}],indexed:!1,internalType:"struct EVM2EVMOnRamp.DynamicConfig",name:"dynamicConfig",type:"tuple"}],name:"ConfigSet",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"networkFeeUSDCents",type:"uint32"},{internalType:"uint64",name:"gasMultiplierWeiPerEth",type:"uint64"},{internalType:"uint64",name:"premiumMultiplierWeiPerEth",type:"uint64"},{internalType:"bool",name:"enabled",type:"bool"}],indexed:!1,internalType:"struct EVM2EVMOnRamp.FeeTokenConfigArgs[]",name:"feeConfig",type:"tuple[]"}],name:"FeeConfigSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"nop",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"NopPaid",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"nopWeightsTotal",type:"uint256"},{components:[{internalType:"address",name:"nop",type:"address"},{internalType:"uint16",name:"weight",type:"uint16"}],indexed:!1,internalType:"struct EVM2EVMOnRamp.NopAndWeight[]",
51name:"nopsAndWeights",type:"tuple[]"}],name:"NopsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"OwnershipTransferRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address[]",name:"tokens",type:"address[]"}],name:"TokenTransferFeeConfigDeleted",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"minFeeUSDCents",type:"uint32"},{internalType:"uint32",name:"maxFeeUSDCents",type:"uint32"},{internalType:"uint16",name:"deciBps",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint32",name:"destBytesOverhead",type:"uint32"},{internalType:"bool",name:"aggregateRateLimitEnabled",type:"bool"}],indexed:!1,internalType:"struct EVM2EVMOnRamp.TokenTransferFeeConfigArgs[]",name:"transferFeeConfig",type:"tuple[]"}],name:"TokenTransferFeeConfigSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"tokens",type:"uint256"}],name:"TokensConsumed",type:"event"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"currentRateLimiterState",outputs:[{components:[{internalType:"uint128",name:"tokens",type:"uint128"},{internalType:"uint32",name:"lastUpdated",type:"uint32"},{internalType:"bool",name:"isEnabled",type:"bool"},{internalType:"uint128",name:"capacity",type:"uint128"},{internalType:"uint128",name:"rate",type:"uint128"}],internalType:"struct RateLimiter.TokenBucket",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"destChainSelector",type:"uint64"},{components:[{internalType:"bytes",name:"receiver",type:"bytes"},{internalType:"bytes",name:"data",type:"bytes"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Client.EVMTokenAmount[]",name:"tokenAmounts",type:"tuple[]"},{internalType:"address",name:"feeToken",type:"address"},{internalType:"bytes",name:"extraArgs",type:"bytes"}],internalType:"struct Client.EVM2AnyMessage",name:"message",type:"tuple"},{internalType:"uint256",name:"feeTokenAmount",type:"uint256"},{internalType:"address",name:"originalSender",type:"address"}],name:"forwardFromRouter",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getDynamicConfig",outputs:[{components:[{internalType:"address",name:"router",type:"address"},{internalType:"uint16",name:"maxNumberOfTokensPerMsg",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint16",name:"destGasPerPayloadByte",type:"uint16"},{internalType:"uint32",name:"destDataAvailabilityOverheadGas",type:"uint32"},{internalType:"uint16",name:"destGasPerDataAvailabilityByte",type:"uint16"},{internalType:"uint16",name:"destDataAvailabilityMultiplierBps",type:"uint16"},{internalType:"address",name:"priceRegistry",type:"address"},{internalType:"uint32",name:"maxDataBytes",type:"uint32"},{internalType:"uint32",name:"maxPerMsgGasLimit",type:"uint32"},{internalType:"uint16",name:"defaultTokenFeeUSDCents",type:"uint16"},{internalType:"uint32",name:"defaultTokenDestGasOverhead",type:"uint32"},{internalType:"bool",name:"enforceOutOfOrder",type:"bool"}],internalType:"struct EVM2EVMOnRamp.DynamicConfig",name:"dynamicConfig",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getExpectedNextSequenceNumber",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"destChainSelector",type:"uint64"},{components:[{internalType:"bytes",name:"receiver",type:"bytes"},{internalType:"bytes",name:"data",type:"bytes"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Client.EVMTokenAmount[]",name:"tokenAmounts",type:"tuple[]"},{internalType:"address",name:"feeToken",type:"address"},{internalType:"bytes",name:"extraArgs",type:"bytes"}],internalType:"struct Client.EVM2AnyMessage",name:"message",type:"tuple"}],name:"getFee",outputs:[{internalType:"uint256",name:"feeTokenAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getFeeTokenConfig",outputs:[{components:[{internalType:"uint32",name:"networkFeeUSDCents",type:"uint32"},{internalType:"uint64",name:"gasMultiplierWeiPerEth",type:"uint64"},{internalType:"uint64",name:"premiumMultiplierWeiPerEth",type:"uint64"},{internalType:"bool",name:"enabled",type:"bool"}],internalType:"struct EVM2EVMOnRamp.FeeTokenConfig",name:"feeTokenConfig",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNopFeesJuels",outputs:[{internalType:"uint96",name:"",type:"uint96"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNops",outputs:[{components:[{internalType:"address",name:"nop",type:"address"},{internalType:"uint16",name:"weight",type:"uint16"}
51],internalType:"struct EVM2EVMOnRamp.NopAndWeight[]",name:"nopsAndWeights",type:"tuple[]"},{internalType:"uint256",name:"weightsTotal",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"",type:"uint64"},{internalType:"contract IERC20",name:"sourceToken",type:"address"}],name:"getPoolBySourceToken",outputs:[{internalType:"contract IPoolV1",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"getSenderNonce",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStaticConfig",outputs:[{components:[{internalType:"address",name:"linkToken",type:"address"},{internalType:"uint64",name:"chainSelector",type:"uint64"},{internalType:"uint64",name:"destChainSelector",type:"uint64"},{internalType:"uint64",name:"defaultTxGasLimit",type:"uint64"},{internalType:"uint96",name:"maxNopFeesJuels",type:"uint96"},{internalType:"address",name:"prevOnRamp",type:"address"},{internalType:"address",name:"rmnProxy",type:"address"},{internalType:"address",name:"tokenAdminRegistry",type:"address"}],internalType:"struct EVM2EVMOnRamp.StaticConfig",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"",type:"uint64"}],name:"getSupportedTokens",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getTokenLimitAdmin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTokenTransferFeeConfig",outputs:[{components:[{internalType:"uint32",name:"minFeeUSDCents",type:"uint32"},{internalType:"uint32",name:"maxFeeUSDCents",type:"uint32"},{internalType:"uint16",name:"deciBps",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint32",name:"destBytesOverhead",type:"uint32"},{internalType:"bool",name:"aggregateRateLimitEnabled",type:"bool"},{internalType:"bool",name:"isEnabled",type:"bool"}],internalType:"struct EVM2EVMOnRamp.TokenTransferFeeConfig",name:"tokenTransferFeeConfig",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"linkAvailableForPayment",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"payNops",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"setAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"router",type:"address"},{internalType:"uint16",name:"maxNumberOfTokensPerMsg",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint16",name:"destGasPerPayloadByte",type:"uint16"},{internalType:"uint32",name:"destDataAvailabilityOverheadGas",type:"uint32"},{internalType:"uint16",name:"destGasPerDataAvailabilityByte",type:"uint16"},{internalType:"uint16",name:"destDataAvailabilityMultiplierBps",type:"uint16"},{internalType:"address",name:"priceRegistry",type:"address"},{internalType:"uint32",name:"maxDataBytes",type:"uint32"},{internalType:"uint32",name:"maxPerMsgGasLimit",type:"uint32"},{internalType:"uint16",name:"defaultTokenFeeUSDCents",type:"uint16"},{internalType:"uint32",name:"defaultTokenDestGasOverhead",type:"uint32"},{internalType:"bool",name:"enforceOutOfOrder",type:"bool"}],internalType:"struct EVM2EVMOnRamp.DynamicConfig",name:"dynamicConfig",type:"tuple"}],name:"setDynamicConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"networkFeeUSDCents",type:"uint32"},{internalType:"uint64",name:"gasMultiplierWeiPerEth",type:"uint64"},{internalType:"uint64",name:"premiumMultiplierWeiPerEth",type:"uint64"},{internalType:"bool",name:"enabled",type:"bool"}],internalType:"struct EVM2EVMOnRamp.FeeTokenConfigArgs[]",name:"feeTokenConfigArgs",type:"tuple[]"}],name:"setFeeTokenConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"nop",type:"address"},{internalType:"uint16",name:"weight",type:"uint16"}
vendor: 3,766 bytes, line 51
51],internalType:"struct EVM2EVMOnRamp.NopAndWeight[]",name:"nopsAndWeights",type:"tuple[]"}],name:"setNops",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"isEnabled",type:"bool"},{internalType:"uint128",name:"capacity",type:"uint128"},{internalType:"uint128",name:"rate",type:"uint128"}],internalType:"struct RateLimiter.Config",name:"config",type:"tuple"}],name:"setRateLimiterConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint32",name:"minFeeUSDCents",type:"uint32"},{internalType:"uint32",name:"maxFeeUSDCents",type:"uint32"},{internalType:"uint16",name:"deciBps",type:"uint16"},{internalType:"uint32",name:"destGasOverhead",type:"uint32"},{internalType:"uint32",name:"destBytesOverhead",type:"uint32"},{internalType:"bool",name:"aggregateRateLimitEnabled",type:"bool"}],internalType:"struct EVM2EVMOnRamp.TokenTransferFeeConfigArgs[]",name:"tokenTransferFeeConfigArgs",type:"tuple[]"},{internalType:"address[]",name:"tokensToUseDefaultFeeConfigs",type:"address[]"}],name:"setTokenTransferFeeConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"typeAndVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"feeToken",type:"address"},{internalType:"address",name:"to",type:"address"}],name:"withdrawNonLinkFees",outputs:[],stateMutability:"nonpayable",type:"function"}],ps=[{type:"constructor",inputs:[{name:"staticConfig",type:"tuple",internalType:"struct OnRamp.StaticConfig",components:[{name:"chainSelector",type:"uint64",internalType:"uint64"},{name:"rmnRemote",type:"address",internalType:"contract IRMNRemote"},{name:"nonceManager",type:"address",internalType:"address"},{name:"tokenAdminRegistry",type:"address",internalType:"address"}]},{name:"dynamicConfig",type:"tuple",internalType:"struct OnRamp.DynamicConfig",components:[{name:"feeQuoter",type:"address",internalType:"address"},{name:"reentrancyGuardEntered",type:"bool",internalType:"bool"},{name:"messageInterceptor",type:"address",internalType:"address"},{name:"feeAggregator",type:"address",internalType:"address"},{name:"allowlistAdmin",type:"address",internalType:"address"}]},{name:"destChainConfigArgs",type:"tuple[]",internalType:"struct OnRamp.DestChainConfigArgs[]",components:[{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"router",type:"address",internalType:"contract IRouter"},{name:"allowlistEnabled",type:"bool",internalType:"bool"}]}],stateMutability:"nonpayable"},{type:"function",name:"acceptOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"applyAllowlistUpdates",inputs:[{name:"allowlistConfigArgsItems",type:"tuple[]",internalType:"struct OnRamp.AllowlistConfigArgs[]",components:[{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"allowlistEnabled",type:"bool",internalType:"bool"},{name:"addedAllowlistedSenders",type:"address[]",internalType:"address[]"},{name:"removedAllowlistedSenders",type:"address[]",internalType:"address[]"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"applyDestChainConfigUpdates",inputs:[{name:"destChainConfigArgs",type:"tuple[]",internalType:"struct OnRamp.DestChainConfigArgs[]",components:[{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"router",type:"address",internalType:"contract IRouter"},{name:"allowlistEnabled",type:"bool",internalType:"bool"}]}],outputs:[],stateMutability:"nonpayable"}
51,{type:"function",name:"forwardFromRouter",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"message",type:"tuple",internalType:"struct Client.EVM2AnyMessage",components:[{name:"receiver",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes",internalType:"bytes"},{name:"tokenAmounts",type:"tuple[]",internalType:"struct Client.EVMTokenAmount[]",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"feeToken",type:"address",internalType:"address"},{name:"extraArgs",type:"bytes",internalType:"bytes"}]},{name:"feeTokenAmount",type:"uint256",internalType:"uint256"},{name:"originalSender",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"nonpayable"},{type:"function",name:"getAllowedSendersList",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"configuredAddresses",type:"address[]",internalType:"address[]"}],stateMutability:"view"},{type:"function",name:"getDestChainConfig",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"sequenceNumber",type:"uint64",internalType:"uint64"},{name:"allowlistEnabled",type:"bool",internalType:"bool"},{name:"router",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getDynamicConfig",inputs:[],outputs:[{name:"dynamicConfig",type:"tuple",internalType:"struct OnRamp.DynamicConfig",components:[{name:"feeQuoter",type:"address",internalType:"address"},{name:"reentrancyGuardEntered",type:"bool",internalType:"bool"},{name:"messageInterceptor",type:"address",internalType:"address"},{name:"feeAggregator",type:"address",internalType:"address"},{name:"allowlistAdmin",type:"address",internalType:"address"}]}],stateMutability:"view"},{type:"function",name:"getExpectedNextSequenceNumber",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"uint64",internalType:"uint64"}],stateMutability:"view"},{type:"function",name:"getFee",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"message",type:"tuple",internalType:"struct Client.EVM2AnyMessage",components:[{name:"receiver",type:"bytes",internalType:"bytes"},{name:"data",type:"bytes",internalType:"bytes"},{name:"tokenAmounts",type:"tuple[]",internalType:"struct Client.EVMTokenAmount[]",components:[{name:"token",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"}]},{name:"feeToken",type:"address",internalType:"address"},{name:"extraArgs",type:"bytes",internalType:"bytes"}]}],outputs:[{name:"feeTokenAmount",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getPoolBySourceToken",inputs:[{name:"",type:"uint64",internalType:"uint64"},{name:"sourceToken",type:"address",internalType:"contract IERC20"}],outputs:[{name:"",type:"address",internalType:"contract IPoolV1"}],stateMutability:"view"},{type:"function",name:"getStaticConfig",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct OnRamp.StaticConfig",components:[{name:"chainSelector",type:"uint64",internalType:"uint64"},{name:"rmnRemote",type:"address",internalType:"contract IRMNRemote"},{name:"nonceManager",type:"address",internalType:"address"},{name:"tokenAdminRegistry",type:"address",internalType:"address"}]}],stateMutability:"view"},{type:"function",name:"getSupportedTokens",inputs:[{name:"",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"address[]",internalType:"address[]"}],stateMutability:"pure"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"setDynamicConfig",inputs:[{name:"dynamicConfig",type:"tuple",internalType:"struct OnRamp.DynamicConfig",components:[{name:"feeQuoter",type:"address",internalType:"address"},{name:"reentrancyGuardEntered",type:"bool",internalType:"bool"},{name:"messageInterceptor",type:"address",internalType:"address"},{name:"feeAggregator",type:"address",internalType:"address"},{name:"allowlistAdmin",type:"address",internalType:"address"}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"transferOwnership",inputs:[{name:"to",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"typeAndVersion",inputs:[],outputs:[{name:"",type:"string",internalType:"string"}],stateMutability:"view"},{type:"function",name:"withdrawFeeTokens",inputs:[{name:"feeTokens",type:"address[]",internalType:"address[]"}],outputs:[],stateMutability:"nonpayable"}
51,{type:"event",name:"AllowListAdminSet",inputs:[{name:"allowlistAdmin",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"AllowListSendersAdded",inputs:[{name:"destChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"senders",type:"address[]",indexed:!1,internalType:"address[]"}],anonymous:!1},{type:"event",name:"AllowListSendersRemoved",inputs:[{name:"destChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"senders",type:"address[]",indexed:!1,internalType:"address[]"}],anonymous:!1},{type:"event",name:"CCIPMessageSent",inputs:[{name:"destChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"sequenceNumber",type:"uint64",indexed:!0,internalType:"uint64"},{name:"message",type:"tuple",indexed:!1,internalType:"struct Internal.EVM2AnyRampMessage",components:[{name:"header",type:"tuple",internalType:"struct Internal.RampMessageHeader",components:[{name:"messageId",type:"bytes32",internalType:"bytes32"},{name:"sourceChainSelector",type:"uint64",internalType:"uint64"},{name:"destChainSelector",type:"uint64",internalType:"uint64"},{name:"sequenceNumber",type:"uint64",internalType:"uint64"},{name:"nonce",type:"uint64",internalType:"uint64"}]},{name:"sender",type:"address",internalType:"address"},{name:"data",type:"bytes",internalType:"bytes"},{name:"receiver",type:"bytes",internalType:"bytes"},{name:"extraArgs",type:"bytes",internalType:"bytes"},{name:"feeToken",type:"address",internalType:"address"},{name:"feeTokenAmount",type:"uint256",internalType:"uint256"},{name:"feeValueJuels",type:"uint256",internalType:"uint256"},{name:"tokenAmounts",type:"tuple[]",internalType:"struct Internal.EVM2AnyTokenTransfer[]",components:[{name:"sourcePoolAddress",type:"address",internalType:"address"},{name:"destTokenAddress",type:"bytes",internalType:"bytes"},{name:"extraData",type:"bytes",internalType:"bytes"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"destExecData",type:"bytes",internalType:"bytes"}]}]}],anonymous:!1},{type:"event",name:"ConfigSet",inputs:[{name:"staticConfig",type:"tuple",indexed:!1,internalType:"struct OnRamp.StaticConfig",components:[{name:"chainSelector",type:"uint64",internalType:"uint64"},{name:"rmnRemote",type:"address",internalType:"contract IRMNRemote"},{name:"nonceManager",type:"address",internalType:"address"},{name:"tokenAdminRegistry",type:"address",internalType:"address"}]},{name:"dynamicConfig",type:"tuple",indexed:!1,internalType:"struct OnRamp.DynamicConfig",components:[{name:"feeQuoter",type:"address",internalType:"address"},{name:"reentrancyGuardEntered",type:"bool",internalType:"bool"},{name:"messageInterceptor",type:"address",internalType:"address"},{name:"feeAggregator",type:"address",internalType:"address"},{name:"allowlistAdmin",type:"address",internalType:"address"}]}],anonymous:!1},{type:"event",name:"DestChainConfigSet",inputs:[{name:"destChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"sequenceNumber",type:"uint64",indexed:!1,internalType:"uint64"},{name:"router",type:"address",indexed:!1,internalType:"contract IRouter"},{name:"allowlistEnabled",type:"bool",indexed:!1,internalType:"bool"}],anonymous:!1},{type:"event",name:"FeeTokenWithdrawn",inputs:[{name:"feeAggregator",type:"address",indexed:!0,internalType:"address"},{name:"feeToken",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"OwnershipTransferRequested",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"error",name:"CannotSendZeroTokens",inputs:[]},{type:"error",name:"CannotTransferToSelf",inputs:[]},{type:"error",name:"CursedByRMN",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}]},{type:"error",name:"GetSupportedTokensFunctionalityRemovedCheckAdminRegistry",inputs:[]},{type:"error",name:"InvalidAllowListRequest",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}]},{type:"error",name:"InvalidConfig",inputs:[]},{type:"error",name:"InvalidDestChainConfig",inputs:[{name:"destChainSelector",type:"uint64",internalType:"uint64"}]}
vendor: 5,298 bytes, line 51
51,{type:"error",name:"MustBeCalledByRouter",inputs:[]},{type:"error",name:"MustBeProposedOwner",inputs:[]},{type:"error",name:"OnlyCallableByOwner",inputs:[]},{type:"error",name:"OnlyCallableByOwnerOrAllowlistAdmin",inputs:[]},{type:"error",name:"OwnerCannotBeZero",inputs:[]},{type:"error",name:"ReentrancyGuardReentrantCall",inputs:[]},{type:"error",name:"RouterMustSetOriginalSender",inputs:[]},{type:"error",name:"SenderNotAllowed",inputs:[{name:"sender",type:"address",internalType:"address"}]},{type:"error",name:"UnsupportedToken",inputs:[{name:"token",type:"address",internalType:"address"}]}],Oo=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],jo=[{type:"function",name:"acceptOwnership",inputs:[],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"applyAllowListUpdates",inputs:[{name:"removes",type:"address[]",internalType:"address[]"},{name:"adds",type:"address[]",internalType:"address[]"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"applyChainUpdates",inputs:[{name:"chains",type:"tuple[]",internalType:"struct TokenPool.ChainUpdate[]",components:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"},{name:"allowed",type:"bool",internalType:"bool"},{name:"outboundRateLimiterConfig",type:"tuple",internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]},{name:"inboundRateLimiterConfig",type:"tuple",internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}]}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"getAllowList",inputs:[],outputs:[{name:"",type:"address[]",internalType:"address[]"}],stateMutability:"view"},{type:"function",name:"getAllowListEnabled",inputs:[],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"getArmProxy",inputs:[],outputs:[{name:"armProxy",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getCurrentInboundRateLimiterState",inputs:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"tuple",internalType:"struct RateLimiter.TokenBucket",components:[{name:"tokens",type:"uint128",internalType:"uint128"},{name:"lastUpdated",type:"uint32",internalType:"uint32"},{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}],stateMutability:"view"},{type:"function",name:"getCurrentOutboundRateLimiterState",inputs:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"tuple",internalType:"struct RateLimiter.TokenBucket",components:[{name:"tokens",type:"uint128",internalType:"uint128"},{name:"lastUpdated",type:"uint32",internalType:"uint32"},{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}],stateMutability:"view"}
51,{type:"function",name:"getRouter",inputs:[],outputs:[{name:"router",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"getSupportedChains",inputs:[],outputs:[{name:"",type:"uint64[]",internalType:"uint64[]"}],stateMutability:"view"},{type:"function",name:"getToken",inputs:[],outputs:[{name:"token",type:"address",internalType:"contract IERC20"}],stateMutability:"view"},{type:"function",name:"isSupportedChain",inputs:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"view"},{type:"function",name:"lockOrBurn",inputs:[{name:"originalSender",type:"address",internalType:"address"},{name:"receiver",type:"bytes",internalType:"bytes"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"remoteChainSelector",type:"uint64",internalType:"uint64"},{name:"extraArgs",type:"bytes",internalType:"bytes"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"nonpayable"},{type:"function",name:"owner",inputs:[],outputs:[{name:"",type:"address",internalType:"address"}],stateMutability:"view"},{type:"function",name:"releaseOrMint",inputs:[{name:"originalSender",type:"bytes",internalType:"bytes"},{name:"receiver",type:"address",internalType:"address"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"remoteChainSelector",type:"uint64",internalType:"uint64"},{name:"extraData",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"setChainRateLimiterConfig",inputs:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"},{name:"outboundConfig",type:"tuple",internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]},{name:"inboundConfig",type:"tuple",internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}],outputs:[],stateMutability:"nonpayable"}
51,{type:"function",name:"setRouter",inputs:[{name:"newRouter",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"supportsInterface",inputs:[{name:"interfaceId",type:"bytes4",internalType:"bytes4"}],outputs:[{name:"",type:"bool",internalType:"bool"}],stateMutability:"pure"},{type:"function",name:"transferOwnership",inputs:[{name:"to",type:"address",internalType:"address"}],outputs:[],stateMutability:"nonpayable"},{type:"event",name:"AllowListAdd",inputs:[{name:"sender",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"AllowListRemove",inputs:[{name:"sender",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"event",name:"Burned",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"ChainAdded",inputs:[{name:"remoteChainSelector",type:"uint64",indexed:!1,internalType:"uint64"},{name:"outboundRateLimiterConfig",type:"tuple",indexed:!1,internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]},{name:"inboundRateLimiterConfig",type:"tuple",indexed:!1,internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}],anonymous:!1},{type:"event",name:"ChainConfigured",inputs:[{name:"remoteChainSelector",type:"uint64",indexed:!1,internalType:"uint64"},{name:"outboundRateLimiterConfig",type:"tuple",indexed:!1,internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]},{name:"inboundRateLimiterConfig",type:"tuple",indexed:!1,internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}],anonymous:!1},{type:"event",name:"ChainRemoved",inputs:[{name:"remoteChainSelector",type:"uint64",indexed:!1,internalType:"uint64"}],anonymous:!1},{type:"event",name:"Locked",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"Minted",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"recipient",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"OwnershipTransferRequested",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"OwnershipTransferred",inputs:[{name:"from",type:"address",indexed:!0,internalType:"address"},{name:"to",type:"address",indexed:!0,internalType:"address"}],anonymous:!1},{type:"event",name:"Released",inputs:[{name:"sender",type:"address",indexed:!0,internalType:"address"},{name:"recipient",type:"address",indexed:!0,internalType:"address"},{name:"amount",type:"uint256",indexed:!1,internalType:"uint256"}],anonymous:!1},{type:"event",name:"RouterUpdated",inputs:[{name:"oldRouter",type:"address",indexed:!1,internalType:"address"},{name:"newRouter",type:"address",indexed:!1,internalType:"address"}],anonymous:!1},{type:"error",name:"AllowListNotEnabled",inputs:[]},{type:"error",name:"BadARMSignal",inputs:[]}
51,{type:"error",name:"CallerIsNotARampOnRouter",inputs:[{name:"caller",type:"address",internalType:"address"}]},{type:"error",name:"ChainAlreadyExists",inputs:[{name:"chainSelector",type:"uint64",internalType:"uint64"}]},{type:"error",name:"ChainNotAllowed",inputs:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"}]},{type:"error",name:"DisabledNonZeroRateLimit",inputs:[{name:"config",type:"tuple",internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}]},{type:"error",name:"InvalidRatelimitRate",inputs:[{name:"rateLimiterConfig",type:"tuple",internalType:"struct RateLimiter.Config",components:[{name:"isEnabled",type:"bool",internalType:"bool"},{name:"capacity",type:"uint128",internalType:"uint128"},{name:"rate",type:"uint128",internalType:"uint128"}]}]},{type:"error",name:"NonExistentChain",inputs:[{name:"remoteChainSelector",type:"uint64",internalType:"uint64"}]},{type:"error",name:"RateLimitMustBeDisabled",inputs:[]},{type:"error",name:"SenderNotAllowed",inputs:[{name:"sender",type:"address",internalType:"address"}]},{type:"error",name:"ZeroAddressNotAllowed",inputs:[]}],Y5=[{inputs:[{internalType:"address",name:"token",type:"address"}],name:"AlreadyRegistered",type:"error"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"InvalidTokenPoolToken",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"token",type:"address"}],name:"OnlyAdministrator",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"token",type:"address"}],name:"OnlyPendingAdministrator",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"OnlyRegistryModuleOrOwner",type:"error"},{inputs:[],name:"ZeroAddress",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"currentAdmin",type:"address"},{indexed:!0,internalType:"address",name:"newAdmin",type:"address"}],name:"AdministratorTransferRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"newAdmin",type:"address"}],name:"AdministratorTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"OwnershipTransferRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"previousPool",type:"address"},{indexed:!0,internalType:"address",name:"newPool",type:"address"}],name:"PoolSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"module",type:"address"}],name:"RegistryModuleAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"module",type:"address"}],name:"RegistryModuleRemoved",type:"event"},{inputs:[{internalType:"address",name:"localToken",type:"address"}],name:"acceptAdminRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"module",type:"address"}],name:"addRegistryModule",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"startIndex",type:"uint64"},{internalType:"uint64",name:"maxCount",type:"uint64"}],name:"getAllConfiguredTokens",outputs:[{internalType:"address[]",name:"tokens",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"tokens",type:"address[]"}],name:"getPools",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getTokenConfig",outputs:[{components:[{internalType:"address",name:"administrator",type:"address"},{internalType:"address",name:"pendingAdministrator",type:"address"},{internalType:"address",name:"tokenPool",type:"address"}],internalType:"struct TokenAdminRegistry.TokenConfig",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"localToken",type:"address"},{internalType:"address",name:"administrator",type:"address"}],name:"isAdministrator",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"module",type:"address"}],name:"isRegistryModule",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"localToken",type:"address"},{internalType:"address",name:"administrator",type:"address"}],name:"proposeAdministrator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"module",type:"address"}],name:"removeRegistryModule",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"localToken",type:"address"},{internalType:"address",name:"pool",type:"address"}],name:"setPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"localToken",type:"address"},{internalType:"address",name:"newAdmin",type:"address"}],name:"transferAdminRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"typeAndVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],X5=100,K5={type:"event",name:"ExecutionStateChanged",inputs:[{name:"sourceChainSelector",type:"uint64",indexed:!0,internalType:"uint64"},{name:"sequenceNumber",type:"uint64",indexed:!0,internalType:"uint64"},{name:"messageId",type:"bytes32",indexed:!0,internalType:"bytes32"},{name:"messageHash",type:"bytes32",indexed:!1,internalType:"bytes32"},{name:"state",type:"uint8",indexed:!1,internalType:"enum Internal.MessageExecutionState"},{name:"returnData",type:"bytes",indexed:!1,internalType:"bytes"},{name:"gasUsed",type:"uint256",indexed:!1,internalType:"uint256"}]},J5=()=>{return{approveRouter:e,getAllowance:t,getOnRampAddress:n,getSupportedFeeTokens:r,getLaneRateRefillLimits:a,getTokenRateLimitByLane:s,getFee:o,getTokenAdminRegistry:l,isTokenSupported:u,transferTokens:c,sendCCIPMessage:d,getTransferStatus:f,getTransactionReceipt:m};async function e(y){if(w(y),h(y.routerAddress,`PARAMETER INPUT ERROR: Router address ${y.routerAddress}
51 is not valid`),h(y.tokenAddress,`PARAMETER INPUT ERROR: Token address ${y.tokenAddress} is not valid`),y.amount<BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid approve amount. Amount can not be negative");const A=await en(y.client,{chain:y.client.chain,account:y.client.account,abi:Oo,address:y.tokenAddress,functionName:"approve",args:[y.routerAddress,y.amount],...y.writeContractParameters});if(!y.waitForReceipt)return{txHash:A};const v=await Ea(y.client,{hash:A,confirmations:2,...y.waitForTransactionReceiptParameters});return{txHash:A,txReceipt:v}}async function t(y){return h(y.routerAddress,`PARAMETER INPUT ERROR: Router address ${y.routerAddress} is not valid`),h(y.tokenAddress,`PARAMETER INPUT ERROR: Token address ${y.tokenAddress} is not valid`),h(y.account,`PARAMETER INPUT ERROR: Account address ${y.account} is not valid`),await be(y.client,{abi:Oo,address:y.tokenAddress,functionName:"allowance",args:[y.account,y.routerAddress]})}async function n(y){h(y.routerAddress,`PARAMETER INPUT ERROR: Router address ${y.routerAddress} is not valid`);const A=await be(y.client,{abi:Ne,address:y.routerAddress,functionName:"getOnRamp",args:[y.destinationChainSelector]});return h(A,"CONTRACT CALL ERROR: OnRamp address is not valid. Execution can not be continued"),A}async function r(y){const A=await n(y),v=await be(y.client,{abi:Ze,address:A,functionName:"getDynamicConfig"}),g=await be(y.client,{abi:Ze,address:A,functionName:"typeAndVersion"});console.info("getSupportedFeeTokens():  CCIP type and version: ",g);let x;return g==="EVM2EVMOnRamp 1.5.0"?x=v.priceRegistry:x=v.feeQuoter,h(x,`CONTRACT CALL ERROR: Price regisry '${x}' is not valid. Execution can not be continued`),await be(y.client,{abi:Mn(["function getFeeTokens() returns (address[] feeTokens)"]),address:x,functionName:"getFeeTokens"})}async function a(y){const A=await n(y);return await be(y.client,{abi:Ze,address:A,functionName:"currentRateLimiterState"})}async function s(y){h(y.supportedTokenAddress,`PARAMETER INPUT ERROR: Token address ${y.supportedTokenAddress} is not valid. Execution can not be continued`);const A=await n(y),v=await be(y.client,{abi:Ze,address:A,functionName:"getPoolBySourceToken",args:[y.destinationChainSelector,y.supportedTokenAddress]});return h(v,`CONTRACT CALL ERROR: Token pool for ${y.supportedTokenAddress} is missing. Execution can not be continued`),await be(y.client,{abi:jo,address:v,functionName:"getCurrentOutboundRateLimiterState",args:[y.destinationChainSelector]})}function i(y,A){const v={hedera:10},g=Object.keys(v).find(x=>A.name.toLowerCase().includes(x));if(g){const x=y*BigInt(10**v[g]);return console.info(`scaleFeeDecimals(): Source chain '${A.name}' has non-standard decimals. Scaling fee by ${v[g]} decimals`),x}return y}async function o(y){if(h(y.routerAddress,`PARAMETER INPUT ERROR: Router address ${y.routerAddress} is not valid`),y.amount&&y.amount<BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount can not be negative");if(!de(y.destinationAccount))throw new Error(`PARAMETER INPUT ERROR: ${y.destinationAccount} is not a valid destionation account address`);if(y.tokenAddress&&h(y.tokenAddress,`PARAMETER INPUT ERROR: Token address ${y.tokenAddress} is not valid`),y.feeTokenAddress&&!de(y.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${y.feeTokenAddress} is not a valid fee token address`);const A=await be(y.client,{abi:Ne,address:y.routerAddress,functionName:"getFee",args:b(y)});return i(A,y.client.chain)}async function l(y){if(!de(y.tokenAddress)||yr(y.tokenAddress,ur))throw new Error(`PARAMETER INPUT ERROR: Token address ${y.tokenAddress} is not valid`);const A=await n(y),g=(await be(y.client,{abi:Ze,address:A,functionName:"getStaticConfig"})).tokenAdminRegistry;return h(g,"CONTRACT CALL ERROR: Token admin registry address is not valid. Execution can not be continued"),g}async function u(y){const A=await l(y),v=await be(y.client,{abi:Y5,address:A,functionName:"getPool",args:[y.tokenAddress]});return!de(v)||yr(v,ur)?!1:await be(y.client,{abi:jo,address:v,functionName:"isSupportedChain",args:[y.destinationChainSelector]})}async function c(y){var S,P,B,$,E,j,F;if(w(y),!y.amount||y.amount<=BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount must be greater than 0");if(!de(y.destinationAccount))throw new Error(`PARAMETER INPUT ERROR: ${y.destinationAccount} is not a valid destionation account address`);if(y.feeTokenAddress&&!de(y.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${y.feeTokenAddress} is not a valid fee token address`);const{maxFeePerGas:A,maxPriorityFeePerGas:v}=await W2(y.client),g={chain:y.client.chain,abi:Ne,address:y.routerAddress,functionName:"
51ccipSend",args:b(y),account:y.client.account,value:y.feeTokenAddress?void 0:await o(y),maxFeePerGas:A,maxPriorityFeePerGas:v,...y.writeContractParameters},x=await cd(y.client,{data:Yr({abi:Ne,functionName:"ccipSend",args:g.args}),value:g.value,to:y.routerAddress,account:y.client.account.address,maxFeePerGas:A,maxPriorityFeePerGas:v}),C=await en(y.client,{...g,gas:x}),I=await Ea(y.client,{hash:C,confirmations:2,...y.waitForTransactionReceiptParameters}),M=await n(y),R=await be(y.client,{abi:Mn(["function typeAndVersion() returns (string)"]),address:M,functionName:"typeAndVersion"});console.info("transferTokens():  CCIP onramp, typeAndVersion: ",M,R);const O=R==="EVM2EVMOnRamp 1.5.0"?"CCIPSendRequested":"CCIPMessageSent",Q=ls({abi:R==="EVM2EVMOnRamp 1.5.0"?Ze:ps,logs:I.logs,eventName:O});let D;if(R==="EVM2EVMOnRamp 1.5.0"?D=(B=(P=(S=Q[0])==null?void 0:S.args)==null?void 0:P.message)==null?void 0:B.messageId:D=(F=(j=(E=($=Q[0])==null?void 0:$.args)==null?void 0:E.message)==null?void 0:j.header)==null?void 0:F.messageId,!D)throw new Error("EVENTS LOG ERROR: Message ID not found in the transaction logs");return{txHash:C,messageId:D,txReceipt:I}}async function d(y){var N,Q,D,S,P,B,$;if(w(y),h(y.routerAddress,`Router address ${y.routerAddress} is not valid`),!de(y.destinationAccount))throw new Error(`${y.destinationAccount} is not a valid destionation account address`);if(y.feeTokenAddress&&!de(y.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${y.feeTokenAddress} is not a valid fee token address`);const A={chain:y.client.chain,abi:Ne,address:y.routerAddress,functionName:"ccipSend",args:b(y),account:y.client.account,...!y.feeTokenAddress&&{value:await o(y)},...y.writeContractParameters},v=await en(y.client,A),g=await Ea(y.client,{hash:v,confirmations:2,...y.waitForTransactionReceiptParameters}),x=await n(y),C=await be(y.client,{abi:Mn(["function typeAndVersion() returns (string)"]),address:x,functionName:"typeAndVersion"});console.info("sendCCIPMessage():  CCIP type and version: ",C);const I=C==="EVM2EVMOnRamp 1.5.0"?"CCIPSendRequested":"CCIPMessageSent",R=ls({abi:C==="EVM2EVMOnRamp 1.5.0"?Ze:ps,logs:g.logs,eventName:I});let O;if(C==="EVM2EVMOnRamp 1.5.0"?O=(D=(Q=(N=R[0])==null?void 0:N.args)==null?void 0:Q.message)==null?void 0:D.messageId:O=($=(B=(P=(S=R[0])==null?void 0:S.args)==null?void 0:P.message)==null?void 0:B.header)==null?void 0:$.messageId,!O)throw new Error("EVENTS LOG ERROR: Message ID not found in the transaction logs");return{txHash:v,messageId:O,txReceipt:g}}async function f(y){if(h(y.destinationRouterAddress,`PARAMETER INPUT ERROR: Destination router address ${y.destinationRouterAddress} is not valid`),!$o(y.messageId))throw new Error(`PARAMETER INPUT ERROR: ${y.messageId} is not a valid message ID`);if(!y.sourceChainSelector)throw new Error("PARAMETER INPUT ERROR: Source chain selector is missing or invalid");const v=(await be(y.client,{abi:Ne,address:y.destinationRouterAddress,functionName:"getOffRamps"})).filter(x=>String(x.sourceChainSelector)===y.sourceChainSelector);if(v.length===0)throw new Error("CONTRACT CALL ERROR: No matching off-ramp found");let g=y.fromBlockNumber;g||(g=await hd(y.client)-BigInt(X5));for(const x of v){const C=await d5(y.client,{event:K5,address:x.offRamp,args:{messageId:y.messageId},fromBlock:g});if(C&&C.length>0){const{state:I}=C[0].args;if(I)return I}}return null}async function m(y){if(!$o(y.hash))throw new Error(`PARAMETER INPUT ERROR: ${y.hash} is not a valid transaction hash`);return await mr(y.client,{hash:y.hash})}function b(y){const{destinationAccount:A,destinationChainSelector:v,tokenAddress:g,amount:x,feeTokenAddress:C,data:I,extraArgs:M}=y,R=BigInt((M==null?void 0:M.gasLimit)??0),O=(M==null?void 0:M.allowOutOfOrderExecution)!==!1,D="0x181dcf10"+jn([{type:"uint256",name:"gasLimit"},{type:"bool",name:"allowOutOfOrderExecution"}],[R,O]).slice(2);return[v,{receiver:jn([{type:"address",name:"receiver"}],[A]),data:I??_5,tokenAmounts:x&&g?[{token:g,amount:x}]:[],feeToken:C||ur,extraArgs:D}]}function h(y,A){if(!de(y)||yr(y,ur))throw new Error(A)}function w(y){if(!y.client.account)throw new Error("WALLET ERROR: account is not val
51id");h(y.client.account.address,"WALLET ERROR: account address is not valid")}};var Fo;(function(e){e[e.Untouched=0]="Untouched",e[e.InProgress=1]="InProgress",e[e.Success=2]="Success",e[e.Failure=3]="Failure"})(Fo||(Fo={}));const ew=()=>{return{getFee:e,transferTokens:t,estimateTransferGas:n};async function e(o){if(s(o.routerAddress,`PARAMETER INPUT ERROR: Router address ${o.routerAddress} is not valid`),o.amount&&o.amount<BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount can not be negative");if(o.tokenAddress&&s(o.tokenAddress,`PARAMETER INPUT ERROR: Token address ${o.tokenAddress} is not valid`),o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);return await we(o.client,{abi:Ne,address:o.routerAddress,functionName:"getFee",args:a(o)})}async function t(o){var g,x,C,I,M,R,O;if(i(o),!o.amount||o.amount<=BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount must be greater than 0");if(o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);const{maxFeePerGas:l,maxPriorityFeePerGas:u}=await kn(o.client),c={chain:o.client.chain,abi:Ne,address:o.routerAddress,functionName:"ccipSend",args:a(o),account:o.client.account.address,...!o.feeTokenAddress&&{value:await e(o)},maxFeePerGas:l,maxPriorityFeePerGas:u},d=await Rt(o.client,{data:ue({abi:Ne,functionName:"ccipSend",args:c.args}),value:c.value,to:o.routerAddress,account:o.client.account.address,maxFeePerGas:l,maxPriorityFeePerGas:u}),f=await jr(o.client,{...c,gas:d}),m=await Or(o.client,{hash:f,confirmations:2,...o.waitForTransactionReceiptParameters}),b=await r(o),h=await we(o.client,{abi:Ff(["function typeAndVersion() returns (string)"]),address:b,functionName:"typeAndVersion"});console.info("transferTokens():  CCIP onramp, typeAndVersion: ",b,h);const w=h==="EVM2EVMOnRamp 1.5.0"?"CCIPSendRequested":"CCIPMessageSent",A=Yn({abi:h==="EVM2EVMOnRamp 1.5.0"?Ze:ps,logs:m.logs,eventName:w});console.info("transferTokens():  CCIP onramp, parsedLog: ",A);let v;if(h==="EVM2EVMOnRamp 1.5.0"?v=(C=(x=(g=A[0])==null?void 0:g.args)==null?void 0:x.message)==null?void 0:C.messageId:v=(O=(R=(M=(I=A[0])==null?void 0:I.args)==null?void 0:M.message)==null?void 0:R.header)==null?void 0:O.messageId,!v)throw new Error("EVENTS LOG ERROR: Message ID not found in the transaction logs");return{txHash:f,messageId:v,txReceipt:m}}async function n(o){if(i(o),!o.amount||o.amount<=BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount must be greater than 0");if(o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);const{maxFeePerGas:l,maxPriorityFeePerGas:u}=await kn(o.client),c={chain:o.client.chain,address:o.routerAddress,args:a(o),account:o.client.account.address,...!o.feeTokenAddress&&{value:o.amount+await e(o)}};return await Rt(o.client,{data:ue({abi:Ne,functionName:"ccipSend",args:c.args}),value:c.value,to:o.routerAddress,account:o.client.account.address,maxFeePerGas:l,maxPriorityFeePerGas:u})*l}async function r(o){s(o.routerAddress,`PARAMETER INPUT ERROR: Router address ${o.routerAddress} is not valid`);const l=await we(o.client,{abi:Ne,address:o.routerAddress,functionName:"getOnRamp",args:[o.destinationChainSelector]});return s(l,"CONTRACT CALL ERROR: OnRamp address is not valid. Execution can not be continued"),l}function a(o){const{destinationAccount:l,destinationChainSelector:u,tokenAddress:c,amount:d,feeTokenAddress:f,data:m,extraArgs:b}=o,h=(b==null?void 0:b.allowOutOfOrderExecution)!==!1,w=(b==null?void 0:b.computeUnits)??0,y=(b==null?void 0:b.accountIsWritableBitmap)??0n,A=(b==null?void 0:b.tokenReceiver)??nw(l),v=(b==null?void 0:b.accounts)??[],g=Xe([{type:"tuple",components:[{name:"computeUnits",type:"uint32"},{name:"accountIsWritableBitmap",type:"uint64"},{name:"allowOutOfOrderExecution",type:"bool"},{name:"tokenReceiver",type:"bytes32"},{name:"accounts",type:"bytes32[]"}]}],[{computeUnits:w,accountIsWritableBitmap:y,allowOutOfOrderExecution:h,tokenReceiver:A,accounts:v}
51]),C=tw+g.slice(2);return[u,{receiver:"0x0000000000000000000000000000000000000000000000000000000000000000",data:m??js,tokenAmounts:d&&c?[{token:c,amount:d}]:[],feeToken:f||he,extraArgs:C}]}function s(o,l){if(!fe(o)||Ot(o,he))throw new Error(l)}function i(o){if(!o.client.account)throw new Error("WALLET ERROR: account is not valid");s(o.client.account.address,"WALLET ERROR: account address is not valid")}},tw="0x1f3b3aba";function nw(e){if(!e||e===js||e.startsWith("0x"))return e;const t=Mp.decode(e);return Pt(t)}var It=256,wd=[],Lo=256,dr;for(;It--;)wd[It]=(It+256).toString(16).substring(1);function rw(e){var t=0,n=e;if(!dr||It+n>Lo*2)for(dr="",It=0;t<Lo;t++)dr+=wd[Math.random()*256|0];return dr.substring(It,It+++n)}const In=[{inputs:[{internalType:"address",name:"router",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"uint256",name:"minLimit",type:"uint256"},{internalType:"uint256",name:"gotLimit",type:"uint256"}],name:"GasLimitTooLow",type:"error"},{inputs:[{internalType:"uint256",name:"gotFee",type:"uint256"},{internalType:"uint256",name:"fee",type:"uint256"}],name:"InsufficientFee",type:"error"},{inputs:[{internalType:"uint256",name:"gotAmount",type:"uint256"},{internalType:"uint256",name:"msgValue",type:"uint256"}],name:"InsufficientMsgValue",type:"error"},{inputs:[{internalType:"address",name:"router",type:"address"}],name:"InvalidRouter",type:"error"},{inputs:[{internalType:"uint256",name:"gotAmounts",type:"uint256"}],name:"InvalidTokenAmounts",type:"error"},{inputs:[{internalType:"uint256",name:"gotAmount",type:"uint256"},{internalType:"uint256",name:"msgValue",type:"uint256"}],name:"TokenAmountNotEqualToMsgValue",type:"error"},{inputs:[{components:[{internalType:"bytes32",name:"messageId",type:"bytes32"},{internalType:"uint64",name:"sourceChainSelector",type:"uint64"},{internalType:"bytes",name:"sender",type:"bytes"},{internalType:"bytes",name:"data",type:"bytes"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Client.EVMTokenAmount[]",name:"destTokenAmounts",type:"tuple[]"}],internalType:"struct Client.Any2EVMMessage",name:"message",type:"tuple"}],name:"ccipReceive",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"destinationChainSelector",type:"uint64"},{components:[{internalType:"bytes",name:"receiver",type:"bytes"},{internalType:"bytes",name:"data",type:"bytes"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Client.EVMTokenAmount[]",name:"tokenAmounts",type:"tuple[]"},{internalType:"address",name:"feeToken",type:"address"},{internalType:"bytes",name:"extraArgs",type:"bytes"}],internalType:"struct Client.EVM2AnyMessage",name:"message",type:"tuple"}],name:"ccipSend",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint64",name:"destinationChainSelector",type:"uint64"},{components:[{internalType:"bytes",name:"receiver",type:"bytes"},{internalType:"bytes",name:"data",type:"bytes"},{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct Client.EVMTokenAmount[]",name:"tokenAmounts",type:"tuple[]"},{internalType:"address",name:"feeToken",type:"address"},{internalType:"bytes",name:"extraArgs",type:"bytes"}],internalType:"struct Client.EVM2AnyMessage",name:"message",type:"tuple"}],name:"getFee",outputs:[{internalType:"uint256",name:"fee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRouter",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"i_weth",outputs:[{internalType:"contract IWrappedNative",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[],name:"typeAndVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{stateMutability:"payable",type:"receive"}],pi=()=>{return{getFee:e,transferTokens:n,estimateReceiveGas:t,estimateTransferGas:r};async function e(o){if(s(o.routerAddress,`PARAMETER INPUT ERROR: Router address ${o.routerAddress}
51 is not valid`),o.amount&&o.amount<BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount can not be negative");if(!fe(o.destinationAccount))throw new Error(`PARAMETER INPUT ERROR: ${o.destinationAccount} is not a valid destionation account address`);if(o.tokenAddress&&s(o.tokenAddress,`PARAMETER INPUT ERROR: Token address ${o.tokenAddress} is not valid`),o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);return await we(o.client,{abi:In,address:o.routerAddress,functionName:"getFee",args:a(o)})}async function t(o){if(s(o.routerAddress,`PARAMETER INPUT ERROR: Router address ${o.routerAddress} is not valid`),o.amount&&o.amount<BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount can not be negative");if(!fe(o.destinationAccount))throw new Error(`PARAMETER INPUT ERROR: ${o.destinationAccount} is not a valid destionation account address`);if(o.tokenAddress&&s(o.tokenAddress,`PARAMETER INPUT ERROR: Token address ${o.tokenAddress} is not valid`),o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);const l=Xt(rw(20),{size:32}),u=ue({abi:In,functionName:"ccipReceive",args:[{messageId:Pt(l),sourceChainSelector:BigInt(o.destinationChainSelector),sender:Xe([{type:"address",name:"sender"}],[o.accountAddress]),data:Xe([{type:"uint256"}],[99n]),destTokenAmounts:[{token:o.tokenAddress||he,amount:o.amount||BigInt(0)}]}]});return await Rt(o.client,{data:u,to:o.routerAddress,account:o.accountAddress})}async function n(o){var w,y,A;if(i(o),!o.amount||o.amount<=BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount must be greater than 0");if(!fe(o.destinationAccount))throw new Error(`PARAMETER INPUT ERROR: ${o.destinationAccount} is not a valid destionation account address`);if(o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);const{maxFeePerGas:l,maxPriorityFeePerGas:u}=await kn(o.client),c={chain:o.client.chain,abi:In,address:o.routerAddress,functionName:"ccipSend",args:a(o),account:o.client.account.address,...!o.feeTokenAddress&&{value:o.amount+await e(o)},maxFeePerGas:l,maxPriorityFeePerGas:u},d=await Rt(o.client,{data:ue({abi:In,functionName:"ccipSend",args:c.args}),value:c.value,to:o.routerAddress,account:o.client.account.address,maxFeePerGas:l,maxPriorityFeePerGas:u}),f=await jr(o.client,{...c,gas:d}),m=await Or(o.client,{hash:f,confirmations:2,...o.waitForTransactionReceiptParameters}),h=(A=(y=(w=Yn({abi:Ze,logs:m.logs,eventName:"CCIPSendRequested"})[0])==null?void 0:w.args)==null?void 0:y.message)==null?void 0:A.messageId;if(!h)throw new Error("EVENTS LOG ERROR: Message ID not found in the transaction logs");return{txHash:f,messageId:h,txReceipt:m}}async function r(o){if(i(o),!o.amount||o.amount<=BigInt(0))throw new Error("PARAMETER INPUT ERROR: Invalid amount. Amount must be greater than 0");if(!fe(o.destinationAccount))throw new Error(`PARAMETER INPUT ERROR: ${o.destinationAccount} is not a valid destionation account address`);if(o.feeTokenAddress&&!fe(o.feeTokenAddress))throw new Error(`PARAMETER INPUT ERROR: ${o.feeTokenAddress} is not a valid fee token address`);const{maxFeePerGas:l,maxPriorityFeePerGas:u}=await kn(o.client),c={chain:o.client.chain,address:o.routerAddress,args:a(o),account:o.client.account.address,...!o.feeTokenAddress&&{value:o.amount+await e(o)}};return await Rt(o.client,{data:ue({abi:In,functionName:"ccipSend",args:c.args}),value:c.value,to:o.routerAddress,account:o.client.account.address,maxFeePerGas:l,maxPriorityFeePerGas:u})*l}function a(o){const{destinationAccount:l,destinationChainSelector:u,tokenAddress:c,amount:d,feeTokenAddress:f,data:m,extraArgs:b}=o,h=BigInt((b==null?void 0:b.gasLimit)??0),w=(b==null?void 0:b.allowOutOfOrderExecution)!==!1,v="0x181dcf10"+Xe([{type:"uint256",name:"gasLimit"},{type:"bool",name:"allowOutOfOrderExecution"}],[h,w]).slice(2);return[BigInt(u),{receiver:Xe([{type:"address",name:"receiver"}],[l]),data:m??js,tokenAmounts:d&&c?[{token:c,amount:d}]:[],feeToken:f||he,extraArgs:v}]}function s(o,l){if(!fe(o)||Ot(o,he))throw new Error(l)}function i(o){if(!o.client.account)throw new Error("WALLET ERROR: account is not val
51id");s(o.client.account.address,"WALLET ERROR: account address is not valid")}},W8=async({config:e},{to:t,amount:n,fromChain:r,fee:a})=>{var s;if(!e)throw new Error("Config is required");if(((s=r.contracts)==null?void 0:s.bridge)===void 0)throw new Error("Bridge contract not found");try{const i=await dn(e),o=r.contracts.bridge.address,l=ue({abi:Sn,functionName:"lock",args:[t]}),u=await pn(e,{data:l,to:o,value:n.add(a).toBigInt(),account:o});return await Hn(e,{abi:Sn,address:o,functionName:"lock",args:[t],value:n.add(a).toBigInt(),chainId:r.chain.id,gas:u,maxFeePerGas:i.maxFeePerGas,maxPriorityFeePerGas:i.maxPriorityFeePerGas})}catch(i){We(i)}},G8=async({config:e},{to:t,fromChain:n,fee:r,min:a,balance:s})=>{var i;if(!e)throw new Error("Config is required");if(((i=n.contracts)==null?void 0:i.bridge)===void 0)throw new Error("Bridge contract not found");if(!r)return console.warn("Fee is required"),s;try{const o=await dn(e),l=n.contracts.bridge.address,u=a?a+r.toBigInt():r.toBigInt()+1n,c=await pn(e,{data:ue({abi:Sn,functionName:"lock",args:[t]}),to:l,value:u,account:l});return s-r.toBigInt()-c*o.maxFeePerGas}catch(o){return console.warn("Failed to get max transfer amount",o),s}},H8=async({config:e},{from:t,to:n,amount:r,fromChain:a,fee:s,token:i})=>{var o;if(!e)throw new Error("Config is required");if(((o=a.contracts)==null?void 0:o.bridge)===void 0)throw new Error("Bridge contract not found");try{const l=await dn(e),u=a.contracts.bridge.address,c=[i.contractAddress,r.toBigInt(),n],d=await pn(e,{data:ue({abi:Sn,functionName:"crossoutBurn",args:c}),to:u,value:s.toBigInt(),account:t});return await Hn(e,{abi:Sn,address:u,functionName:"crossoutBurn",args:c,value:s.toBigInt(),chainId:a.chain.id,gas:d,maxFeePerGas:l.maxFeePerGas,maxPriorityFeePerGas:l.maxPriorityFeePerGas})}catch(l){We(l)}},Ia=(e,t)=>pp.from(e).mul(Math.floor(100*(1+t))).div(100).toBigInt(),_8=async(e,t)=>{var l,u,c,d;const{config:n}=e;if(!n)throw new Error("Config is required");let{token:r}=t;const{amount:a,fromChain:s,toChain:i}=t;if(!((l=s.contracts)!=null&&l.ccip)||!i.ccip)throw new Error("Invalid chain config");if(r.type==="native"&&((u=r.wrappedTokens)!=null&&u.default)&&(r=(c=r.wrappedTokens)==null?void 0:c.default),!((d=r.ccip)!=null&&d.pool)){console.warn("No pool configuration for token",r.contractAddress);return}const o=await Pc(n,{abi:Yh,address:r.ccip.pool,functionName:"getCurrentOutboundRateLimiterState",args:[BigInt(i.ccip.selector)]});if(o.isEnabled&&o.tokens<a.toBigInt())throw new Br("withdrawLimitReached","amountExceed",{limit:ta(o.capacity,r.decimals,{keepDecimals:6,trimZeros:!0}),available:ta(o.tokens,r.decimals,{keepDecimals:6,trimZeros:!0}),recovery:ta(o.rate,r.decimals,{keepDecimals:6,trimZeros:!0}),token:r.symbol})},q8=async(e,t)=>{var f,m;const{config:n}=e;if(!n)throw new Error("Config is required");const{from:r,to:a,amount:s,fromChain:i,toChain:o,token:l}=t;if(!((f=i.contracts)!=null&&f.ccipNative)||!o.ccip)throw new Error("Invalid chain config");const u=(m=l.wrappedTokens)==null?void 0:m.default;if(!u)throw new Error("Fee token not found");const c=await Wr(n,{account:r}),d=pi();try{const{txHash:b}=await d.transferTokens({client:c,routerAddress:i.contracts.ccipNative.address,tokenAddress:u.contractAddress,destinationAccount:a,destinationChainSelector:o.ccip.selector,amount:s.toBigInt(),waitForTransactionReceiptParameters:{confirmations:1,pollingInterval:1e4}});return b}catch(b){We(b)}},Z8=async({config:e},{from:t,to:n,fromChain:r,toChain:a,token:s,balance:i})=>{var c,d,f;if(!e)throw new Error("Config is required");if(!((c=r.contracts)!=null&&c.ccipNative)||!a.ccip)throw new Error("Invalid chain config");const o=(d=s.wrappedTokens)==null?void 0:d.default;if(!o)throw new Error("Fee token not found");const l=await Wr(e,{account:t}),u=pi();try{const m=await u.getFee({client:l,routerAddress:(f=r.contracts)==null?void 0:f.ccip.address,tokenAddress:o.contractAddress,destinationAccount:n,destinationChainSelector:a.ccip.selector,amount:1n}),b=await u.estimateTransferGas({client:l,routerAddress:r.contracts.ccipNative.address,tokenAddress:o.contractAddress,destinationAccount:n,destinationChainSelector:a.ccip.selector,amount:1n});return i-m-b}catch(m){We(m)}},Y8=async(e,{balance:t,max:n})=>{try{return n&&t>=n?n:t}catch(r){We(r)}},X8=async(e,t)=>{var d,f,m;const{config:n}=e;if(!n)throw new Error("Config is required");const{from:r,to:a,amount:s,fromChain:i,toChain:o,token:l}=t;if(!((d=i.contracts)!=null&&d.ccip)||!o.ccip||!i.ccip)throw new Error("Invalid chain config");const u=await Wr(n,{account:r}),c=J5();try{let b,h,w=a;if(((f=l.ccip)==null?void 0:f.receiver)==="router"){const A=(m=o.contracts)==null?void 0:m.ccipNative.address;if(!A)throw new Error("Router not found");const v=pi();let g=o.ccip.gasLimit||0;try{const x=db({chain:o.chain,transport:Pp()}),C=await v.estimateReceiveGas({accountAddress:r,client:x,routerAddress:i.contracts.ccip.address,destinationAccount:A,destinationChainSelector:i.ccip.selector,amount:s.toBigInt(),tokenAddress:l.contractAddress});g=o.ccip.gasLimitOverride?o.ccip.gasLimitOverride(Number(C)):Number(C),console.log("Using gas limit",g)}catch(x){console.warn("Failed to estimate gas limit, using default value",x)}w=A,h=Xe([{type:"address",name:"data"}],[a]),b={gasLimit:g,allowOutOfOrderExecution:!0}}const{txHash:y}=await c.transferTokens({client:u,routerAddress:i.contracts.ccip.address,tokenAddress:l.contractAddress,destinationAccount:w,destinationChainSelector:o.ccip.selector,amount:s.toBigInt(),data:h,extraArgs:b,waitForTransactionReceiptParameters:{confirmations:1,pollingInterval:1e4}});return y}catch(b){We(b)}},K8=async(e,t)=>{var u;const{config:n}=e;if(!n)throw new Error("Config is required");const{from:r,to:a,amount:s,fromChain:i,toChain:o,token:l}=t;
51if(!((u=i.contracts)!=null&&u.bitnova)||!l.bitnova||!o.bitnova)throw new Error("Invalid chain config");try{const c=[l.bitnova.tokenId,s.toBigInt(),a,o.bitnova.chainId],d=await dn(e.config),f=await pn(e.config,{data:ue({abi:oo,functionName:"bridgeERC20",args:c}),to:i.contracts.bitnova.address,account:r});return await Hn(e.config,{abi:oo,address:i.contracts.bitnova.address,functionName:"bridgeERC20",args:c,chainId:i.chain.id,gas:f,maxFeePerGas:d.maxFeePerGas,maxPriorityFeePerGas:d.maxPriorityFeePerGas})}catch(c){We(c)}},J8=async(e,t)=>{var d;const{config:n}=e;if(!n)throw new Error("Config is required");const{from:r,to:a,amount:s,fromChain:i,toChain:o,token:l}=t;if(!((d=i.contracts)!=null&&d.ccip)||!o.ccip||!i.ccip)throw new Error("Invalid chain config");const u=await Wr(n,{account:r}),c=ew();try{const m=a,{txHash:b}=await c.transferTokens({client:u,routerAddress:i.contracts.ccip.address,tokenAddress:l.contractAddress,destinationAccount:m,destinationChainSelector:o.ccip.selector,amount:s.toBigInt(),data:void 0,waitForTransactionReceiptParameters:{confirmations:1,pollingInterval:1e4}});return b}catch(f){We(f)}},e3=async(e,t,{from:n,amount:r,token:a})=>{const{config:s}=t;if(!s)throw new Error("Config is required");const i=a.contractAddress,o=a.abi?a.abi:Lf;try{na.set(ya,"checkingAllowance");const l=await Pc(s,{abi:o,address:i,functionName:"allowance",args:[n,e]});if(l>=r.toBigInt())return;na.set(ya,"approveInProgress"),a.continuouslyApprove===!1&&l>0&&await Do(o,{spender:e,address:i,account:n,allowance:0n},t),await Do(o,{spender:e,address:i,account:n,allowance:0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn},t)}catch(l){We(l,"Failed to approve")}finally{na.set(ya,void 0)}},Do=async(e,{address:t,account:n,spender:r,allowance:a},{config:s})=>{const i=[r,a],o="approve",l=await dn(s),u=await pn(s,{data:ue({abi:e,functionName:o,args:i}),to:t,account:n}),c=await Hn(s,{abi:e,address:t,functionName:o,args:i,gas:Ia(u,.2),maxFeePerGas:Ia(l.maxFeePerGas,.5),maxPriorityFeePerGas:Ia(l.maxPriorityFeePerGas,.5)});await hl(s,{hash:c,pollingInterval:5e3})};function We(e,t="Failed to transfer"){if(e instanceof pe){if(e.walk(a=>a instanceof Bp))throw new Yo;const r=e.walk(a=>a instanceof Yp);if(r)throw console.warn("InsufficientFundsError:",r.details),new Br("insufficientFunds")}throw console.error(e),new Error(t)}const er="NavigationMenu",[fi,vd,aw]=Pl(er),[fs,sw,iw]=Pl(er),[yi,t3]=uy(er,[aw,iw]),[ow,je]=yi(er),[lw,cw]=yi(er),uw=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:a,defaultValue:s,delayDuration:i=200,skipDelayDuration:o=300,orientation:l="horizontal",dir:u,...c}=e,[d,f]=T.useState(null),m=Qn(t,R=>f(R)),b=dy(u),h=T.useRef(0),w=T.useRef(0),y=T.useRef(0),[A,v]=T.useState(!0),[g="",x]=cy({prop:r,onChange:R=>{const O=R!=="",N=o>0;O?(window.clearTimeout(y.current),N&&v(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>v(!0),o)),a==null||a(R)},defaultProp:s}),C=T.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>x(""),150)},[x]),I=T.useCallback(R=>{window.clearTimeout(w.current),x(R)},[x]),M=T.useCallback(R=>{g===R?window.clearTimeout(w.current):h.current=window.setTimeout(()=>{window.clearTimeout(w.current),x(R)},i)},[g,x,i]);return T.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(w.current),window.clearTimeout(y.current)},[]),T.createElement(dw,{scope:n,isRootMenu:!0,value:g,dir:b,orientation:l,rootNavigationMenu:d,onTriggerEnter:R=>{window.clearTimeout(h.current),A?M(R):I(R)},onTriggerLeave:()=>{window.clearTimeout(h.current),C()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:C,onItemSelect:R=>{x(O=>O===R?"":R)},onItemDismiss:()=>x("")},T.createElement(Ve.nav,ve({"aria-label":"Main","data-orientation":l,dir:b},c,{ref:m})))}),dw=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:a,orientation:s,children:i,value:o,onItemSelect:l,onItemDismiss:u,onTriggerEnter:c,onTriggerLeave:d,onContentEnter:f,onContentLeave:m}=e,[b,h]=T.useState(null),[w,y]=T.useState(new Map),[A,v]=T.useState(null);return T.createElement(ow,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:o,previousValue:sy(o),baseId:Bl(),dir:a,orientation:s,viewport:b,onViewportChange:h,indicatorTrack:A,onIndicatorTrackChange:v,onTriggerEnter:Ct(c),onTriggerLeave:Ct(d),onContentEnter:Ct(f),onContentLeave:Ct(m),onItemSelect:Ct(l),onItemDismiss:Ct(u),onViewportContentChange:T.useCallback((g,x)=>{y(C=>(C.set(g,x),new Map(C)))},[]),onViewportContentRemove:T.useCallback(g=>{y(x=>x.has(g)?(x.delete(g),new Map(x)):x)},[])},T.createElement(fi.Provider,{scope:t},T.createElement(lw,{scope:t,items:w},i)))},pw="NavigationMenuList",fw=T.forwardRef((e,t)=>
51{const{__scopeNavigationMenu:n,...r}=e,a=je(pw,n),s=T.createElement(Ve.ul,ve({"data-orientation":a.orientation},r,{ref:t}));return T.createElement(Ve.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange},T.createElement(fi.Slot,{scope:n},a.isRootMenu?T.createElement(Ed,{asChild:!0},s):s))}),yw="NavigationMenuItem",[mw,Ad]=yi(yw),bw=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...a}=e,s=Bl(),i=r||s||"LEGACY_REACT_AUTO_VALUE",o=T.useRef(null),l=T.useRef(null),u=T.useRef(null),c=T.useRef(()=>{}),d=T.useRef(!1),f=T.useCallback((b="start")=>{if(o.current){c.current();const h=ys(o.current);h.length&&mi(b==="start"?h:h.reverse())}},[]),m=T.useCallback(()=>{if(o.current){const b=ys(o.current);b.length&&(c.current=Rw(b))}},[]);return T.createElement(mw,{scope:n,value:i,triggerRef:l,contentRef:o,focusProxyRef:u,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:m,onContentFocusOutside:m},T.createElement(Ve.li,ve({},a,{ref:t})))}),zo="NavigationMenuTrigger",hw=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...a}=e,s=je(zo,e.__scopeNavigationMenu),i=Ad(zo,e.__scopeNavigationMenu),o=T.useRef(null),l=Qn(o,i.triggerRef,t),u=Rd(s.baseId,i.value),c=Md(s.baseId,i.value),d=T.useRef(!1),f=T.useRef(!1),m=i.value===s.value;return T.createElement(T.Fragment,null,T.createElement(fi.ItemSlot,{scope:n,value:i.value},T.createElement(Id,{asChild:!0},T.createElement(Ve.button,ve({id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":bi(m),"aria-expanded":m,"aria-controls":c},a,{ref:l,onPointerEnter:ge(e.onPointerEnter,()=>{f.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:ge(e.onPointerMove,Rr(()=>{r||f.current||i.wasEscapeCloseRef.current||d.current||(s.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:ge(e.onPointerLeave,Rr(()=>{r||(s.onTriggerLeave(),d.current=!1)})),onClick:ge(e.onClick,()=>{s.onItemSelect(i.value),f.current=m}),onKeyDown:ge(e.onKeyDown,b=>{const w={horizontal:"ArrowDown",vertical:s.dir==="rtl"?"ArrowLeft":"ArrowRight"}[s.orientation];m&&b.key===w&&(i.onEntryKeyDown(),b.preventDefault())})})))),m&&T.createElement(T.Fragment,null,T.createElement(fy,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:b=>{const h=i.contentRef.current,w=b.relatedTarget,y=w===o.current,A=h==null?void 0:h.contains(w);(y||!A)&&i.onFocusProxyEnter(y?"start":"end")}}),s.viewport&&T.createElement("span",{"aria-owns":c})))}),Qo="navigationMenu.linkSelect",gw=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:a,...s}=e;return T.createElement(Id,{asChild:!0},T.createElement(Ve.a,ve({"data-active":r?"":void 0,"aria-current":r?"page":void 0},s,{ref:t,onClick:ge(e.onClick,i=>{const o=i.target,l=new CustomEvent(Qo,{bubbles:!0,cancelable:!0});if(o.addEventListener(Qo,u=>a==null?void 0:a(u),{once:!0}),Si(o,l),!l.defaultPrevented&&!i.metaKey){const u=new CustomEvent(br,{bubbles:!0,cancelable:!0});Si(o,u)}},{checkForDefaultPrevented:!1})})))}),xd="NavigationMenuIndicator",ww=T.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=je(xd,e.__scopeNavigationMenu),s=!!a.value;return a.indicatorTrack?ly.createPortal(T.createElement(Fr,{present:n||s},T.createElement(vw,ve({},r,{ref:t}))),a.indicatorTrack):null}),vw=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,a=je(xd,n),s=vd(n),[i,o]=T.useState(null),[l,u]=T.useState(null),c=a.orientation==="horizontal",d=!!a.value;T.useEffect(()=>{var m;const h=(m=s().find(w=>w.value===a.value))===null||m===void 0?void 0:m.ref.current;h&&o(h)},[s,a.value]);const f=()=>{i&&u({size:c?i.offsetWidth:i.offsetHeight,offset:c?i.offsetLeft:i.offsetTop})};return ms(i,f),ms(a.indicatorTrack,f),l?T.createElement(Ve.div,ve({"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":a.orientation},r,{ref:t,style:{position:"absolute",...c?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...r.style}})):null}),zn="NavigationMenuContent",Aw=T.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=je(zn,e.__scopeNavigationMenu),s=Ad(zn,e.__scopeNavigationMenu),i=Qn(s.contentRef,t),o=s.value===a.value,l={value:s.value,triggerRef:s.triggerRef,focu
51sProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...r};return a.viewport?T.createElement(xw,ve({forceMount:n},l,{ref:i})):T.createElement(Fr,{present:n||o},T.createElement(Td,ve({"data-state":bi(o)},l,{ref:i,onPointerEnter:ge(e.onPointerEnter,a.onContentEnter),onPointerLeave:ge(e.onPointerLeave,Rr(a.onContentLeave)),style:{pointerEvents:!o&&a.isRootMenu?"none":void 0,...l.style}})))}),xw=T.forwardRef((e,t)=>{const n=je(zn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:a}=n;return Ba(()=>{r(e.value,{ref:t,...e})},[e,t,r]),Ba(()=>()=>a(e.value),[e.value,a]),null}),br="navigationMenu.rootContentDismiss",Td=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:a,focusProxyRef:s,wasEscapeCloseRef:i,onRootContentClose:o,onContentFocusOutside:l,...u}=e,c=je(zn,n),d=T.useRef(null),f=Qn(d,t),m=Rd(c.baseId,r),b=Md(c.baseId,r),h=vd(n),w=T.useRef(null),{onItemDismiss:y}=c;T.useEffect(()=>{const v=d.current;if(c.isRootMenu&&v){const g=()=>{var x;y(),o(),v.contains(document.activeElement)&&((x=a.current)===null||x===void 0||x.focus())};return v.addEventListener(br,g),()=>v.removeEventListener(br,g)}},[c.isRootMenu,e.value,a,y,o]);const A=T.useMemo(()=>{const g=h().map(O=>O.value);c.dir==="rtl"&&g.reverse();const x=g.indexOf(c.value),C=g.indexOf(c.previousValue),I=r===c.value,M=C===g.indexOf(r);if(!I&&!M)return w.current;const R=(()=>{if(x!==C){if(I&&C!==-1)return x>C?"from-end":"from-start";if(M&&x!==-1)return x>C?"to-start":"to-end"}return null})();return w.current=R,R},[c.previousValue,c.value,c.dir,h,r]);return T.createElement(Ed,{asChild:!0},T.createElement(py,ve({id:b,"aria-labelledby":m,"data-motion":A,"data-orientation":c.orientation},u,{ref:f,onDismiss:()=>{var v;const g=new Event(br,{bubbles:!0,cancelable:!0});(v=d.current)===null||v===void 0||v.dispatchEvent(g)},onFocusOutside:ge(e.onFocusOutside,v=>{var g;l();const x=v.target;(g=c.rootNavigationMenu)!==null&&g!==void 0&&g.contains(x)&&v.preventDefault()}),onPointerDownOutside:ge(e.onPointerDownOutside,v=>{var g;const x=v.target,C=h().some(M=>{var R;return(R=M.ref.current)===null||R===void 0?void 0:R.contains(x)}),I=c.isRootMenu&&((g=c.viewport)===null||g===void 0?void 0:g.contains(x));(C||I||!c.isRootMenu)&&v.preventDefault()}),onKeyDown:ge(e.onKeyDown,v=>{const g=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!g){const I=ys(v.currentTarget),M=document.activeElement,R=I.findIndex(Q=>Q===M),N=v.shiftKey?I.slice(0,R).reverse():I.slice(R+1,I.length);if(mi(N))v.preventDefault();else{var C;(C=s.current)===null||C===void 0||C.focus()}}}),onEscapeKeyDown:ge(e.onEscapeKeyDown,v=>{i.current=!0})}
51)))}),Cd="NavigationMenuViewport",Tw=T.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=!!je(Cd,e.__scopeNavigationMenu).value;return T.createElement(Fr,{present:n||s},T.createElement(Cw,ve({},r,{ref:t})))}),Cw=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...a}=e,s=je(Cd,n),i=Qn(t,s.onViewportChange),o=cw(zn,e.__scopeNavigationMenu),[l,u]=T.useState(null),[c,d]=T.useState(null),f=l?(l==null?void 0:l.width)+"px":void 0,m=l?(l==null?void 0:l.height)+"px":void 0,b=!!s.value,h=b?s.value:s.previousValue;return ms(c,()=>{c&&u({width:c.offsetWidth,height:c.offsetHeight})}),T.createElement(Ve.div,ve({"data-state":bi(b),"data-orientation":s.orientation},a,{ref:i,style:{pointerEvents:!b&&s.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":f,"--radix-navigation-menu-viewport-height":m,...a.style},onPointerEnter:ge(e.onPointerEnter,s.onContentEnter),onPointerLeave:ge(e.onPointerLeave,Rr(s.onContentLeave))}),Array.from(o.items).map(([y,{ref:A,forceMount:v,...g}])=>{const x=h===y;return T.createElement(Fr,{key:y,present:v||x},T.createElement(Td,ve({},g,{ref:ip(A,C=>{x&&C&&d(C)})})))}))}),Ew="FocusGroup",Ed=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,a=je(Ew,n);return T.createElement(fs.Provider,{scope:n},T.createElement(fs.Slot,{scope:n},T.createElement(Ve.div,ve({dir:a.dir},r,{ref:t}))))}),Vo=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Iw="FocusGroupItem",Id=T.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,a=sw(n),s=je(Iw,n);return T.createElement(fs.ItemSlot,{scope:n},T.createElement(Ve.button,ve({},r,{ref:t,onKeyDown:ge(e.onKeyDown,i=>
51{if(["Home","End",...Vo].includes(i.key)){let l=a().map(d=>d.ref.current);if([s.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),Vo.includes(i.key)){const d=l.indexOf(i.currentTarget);l=l.slice(d+1)}setTimeout(()=>mi(l)),i.preventDefault()}})})))});function ys(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function mi(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Rw(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function ms(e,t){const n=Ct(t);Ba(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}function bi(e){return e?"open":"closed"}function Rd(e,t){return`${e}-trigger-${t}`}function Md(e,t){return`${e}-content-${t}`}function Rr(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Bd=uw,Pd=fw,Mw=bw,kd=hw,Bw=gw,Nd=ww,Sd=Aw,$d=Tw,Pw=T.forwardRef(({className:e,children:t,value:n,viewportContainerStyle:r,...a},s)=>{const[i,o]=T.useState(n||"");return p.jsxs(Bd,{ref:s,className:X("bl-relative bl-pr-1 bl-z-10 bl-flex bl-max-w-max bl-flex-1 bl-items-center bl-justify-center",e),value:i,onValueChange:o,...a,children:[t,p.jsx(Od,{containerClassName:r})]})});Pw.displayName=Bd.displayName;const kw=T.forwardRef(({className:e,...t},n)=>p.jsx(Pd,{ref:n,className:X("bl-group bl-flex bl-flex-1 bl-list-none bl-items-center bl-justify-center bl-space-x-1",e),...t}));kw.displayName=Pd.displayName;const n3=Mw,Nw=fp("bl-group bl-inline-flex bl-h-10 bl-w-max bl-items-center bl-justify-center bl-rounded-md bl-bg-background bl-px-4 bl-py-2 bl-text-xl bl-font-medium bl-text-primary bl-transition-colors hover:bl-bg-accent hover:bl-text-accent-foreground focus:bl-outline-none disabled:bl-pointer-events-none disabled:bl-opacity-50 data-[active]:bl-bg-accent/50 data-[state=open]:bl-bg-accent/50 data-[state=open]:bl-text-white btn-mask"),Sw=T.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(kd,{ref:r,className:X(Nw(),"bl-group",e),...n,children:[t," ",p.jsx(kl,{className:"bl-relative bl-top-[1px] bl-ml-1 bl-size-4 bl-transition bl-duration-200 group-data-[state=open]:bl-rotate-180","aria-hidden":"true"})]}));Sw.displayName=kd.displayName;const $w=T.forwardRef(({className:e,...t},n)=>p.jsx(Sd,{ref:n,className:X("bl-left-0 bl-top-0 bl-w-full bl-min-w-[30rem] bl-px-11 bl-py-7 data-[motion^=from-]:bl-animate-in data-[motion^=to-]:bl-animate-out data-[motion^=from-]:bl-fade-in data-[motion^=to-]:bl-fade-out data-[motion=from-end]:bl-slide-in-from-right-52 data-[motion=from-start]:bl-slide-in-from-left-52 data-[motion=to-end]:bl-slide-out-to-right-52 data-[motion=to-start]:bl-slide-out-to-left-52 md:bl-absolute md:bl-w-auto",e),...t}));$w.displayName=Sd.displayName;const r3=Bw,Od=T.forwardRef(({className:e,containerClassName:t,...n},r)=>p.jsx("div",{className:X("bl-absolute bl-left-0 bl-top-full bl-flex bl-justify-center",t),children:p.jsx($d,{className:X("bl-origin-top-center bl-relative bl-mt-1.5 bl-h-[var(--radix-navigation-menu-viewport-height)] bl-w-full bl-overflow-hidden bl-rounded-none bl-border-0 bl-bg-primary bl-text-popover-foreground bl-shadow-lg data-[state=open]:bl-animate-in data-[state=closed]:bl-animate-out data-[state=closed]:bl-zoom-out-95 data-[state=open]:bl-zoom-in-90 md:bl-w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...n})}));Od.displayName=$d.displayName;const Ow=T.forwardRef(({className:e,...t},n)=>p.jsx(Nd,{ref:n,className:X("bl-top-full bl-z-[1] bl-flex bl-h-1.5 bl-items-end bl-justify-center bl-overflow-hidden data-[state=visible]:bl-animate-in data-[state=hidden]:bl-animate-out data-[state=hidden]:bl-fade-out data-[state=visible]:bl-fade-in",e),...t,children:p.jsx("div",{className:"bl-relative bl-top-[60%] bl-h-2 bl-w-2 bl-rotate-45 bl-rounded-tl-sm bl-bg-border bl-shadow-md"})}));Ow.displayName=Nd.displayName;const jw=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e,children:p.jsx("path",{d:"M23.995 8.203C23.57 4.66 20.32 1.997 16.575.764 18.281 2.611 19.5 5.48 19.5 9h1.317l-5.465 6.07c-.117-.028-.225-.07-.352-.07h-2.25V9H18c0-5.4-3.23-9-6-9S6 3.6 6 9h5.25v6H9c-.126 0-.234.042-.351.07L3.183 9H4.5C4.5 5.48 5.72 2.61 7.425.764 3.68 2.002.431 4.664.005 8.204-.047 8.63.324 9 .755 9h.408l6.407 7.12c-.032.122-.075.244-.075.38v6c0 .83.67 1.5 1.5 1.5h6c.83 0 1.5-.67 1.5-1.5v-6c0-.136-.042-.253-.075-.38L22.833 9h.408c.436 0 .806-.366.754-.797Z",fill:"currentColor"})});var jd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(sp,function(){var n=1e3,r=6e4,a=36e5,s="millisecond",i="second",o="minute",l="hour",u="day",c="week",d="month",f="quarter",m="year",b="date",h="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}
vendor: 5,482 bytes, line 51
51|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var P=["th","st","nd","rd"],B=S%100;return"["+S+(P[(B-20)%10]||P[B]||P[0])+"]"}},v=function(S,P,B){var $=String(S);return!$||$.length>=P?S:""+Array(P+1-$.length).join(B)+S},g={s:v,z:function(S){var P=-S.utcOffset(),B=Math.abs(P),$=Math.floor(B/60),E=B%60;return(P<=0?"+":"-")+v($,2,"0")+":"+v(E,2,"0")},m:function S(P,B){if(P.date()<B.date())return-S(B,P);var $=12*(B.year()-P.year())+(B.month()-P.month()),E=P.clone().add($,d),j=B-E<0,F=P.clone().add($+(j?-1:1),d);return+(-($+(B-E)/(j?E-F:F-E))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:d,y:m,w:c,d:u,D:b,h:l,m:o,s:i,ms:s,Q:f}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},x="en",C={};C[x]=A;var I="$isDayjsObject",M=function(S){return S instanceof Q||!(!S||!S[I])},R=function S(P,B,$){var E;if(!P)return x;if(typeof P=="string"){var j=P.toLowerCase();C[j]&&(E=j),B&&(C[j]=B,E=j);var F=P.split("-");if(!E&&F.length>1)return S(F[0])}else{var V=P.name;C[V]=P,E=V}return!$&&E&&(x=E),E||!$&&x},O=function(S,P){if(M(S))return S.clone();var B=typeof P=="object"?P:{};return B.date=S,B.args=arguments,new Q(B)},N=g;N.l=R,N.i=M,N.w=function(S,P){return O(S,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var Q=function(){function S(B){this.$L=R(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[I]=!0}var P=S.prototype;return P.parse=function(B){this.$d=function($){var E=$.date,j=$.utc;if(E===null)return new Date(NaN);if(N.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var F=E.match(w);if(F){var V=F[2]-1||0,W=(F[7]||"0").substring(0,3);return j?new Date(Date.UTC(F[1],V,F[3]||1,F[4]||0,F[5]||0,F[6]||0,W)):new Date(F[1],V,F[3]||1,F[4]||0,F[5]||0,F[6]||0,W)}}return new Date(E)}(B),this.init()},P.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},P.$utils=function(){return N},P.isValid=function(){return this.$d.toString()!==h},P.isSame=function(B,$){var E=O(B);return this.startOf($)<=E&&E<=this.endOf($)},P.isAfter=function(B,$){return O(B)<this.startOf($)},P.isBefore=function(B,$){return this.endOf($)<O(B)},P.$g=function(B,$,E){return N.u(B)?this[$]:this.set(E,B)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(B,$){var E=this,j=!!N.u($)||$,F=N.p(B),V=function(He,ye){var Ae=N.w(E.$u?Date.UTC(E.$y,ye,He):new Date(E.$y,ye,He),E);return j?Ae:Ae.endOf(u)},W=function(He,ye){return N.w(E.toDate()[He].apply(E.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ye)),E)},_=this.$W,Y=this.$M,ie=this.$D,z="set"+(this.$u?"UTC":"");switch(F){case m:return j?V(1,0):V(31,11);case d:return j?V(1,Y):V(0,Y+1);case c:var Fe=this.$locale().weekStart||0,Ge=(_<Fe?_+7:_)-Fe;return V(j?ie-Ge:ie+(6-Ge),Y);case u:case b:return W(z+"Hours",0);case l:return W(z+"Minutes",1);case o:return W(z+"Seconds",2);case i:return W(z+"Milliseconds",3);default:return this.clone()}},P.endOf=function(B){return this.startOf(B,!1)},P.$set=function(B,$){var E,j=N.p(B),F="set"+(this.$u?"UTC":""),V=(E={},E[u]=F+"Date",E[b]=F+"Date",E[d]=F+"Month",E[m]=F+"FullYear",E[l]=F+"Hours",E[o]=F+"Minutes",E[i]=F+"Seconds",E[s]=F+"Milliseconds",E)[j],W=j===u?this.$D+($-this.$W):$;if(j===d||j===m){var _=this.clone().set(b,1);_.$d[V](W),_.init(),this.$d=_.set(b,Math.min(this.$D,_.daysInMonth())).$d}else V&&this.$d[V](W);return this.init(),this},P.set=function(B,$){return this.clone().$set(B,$)},P.get=function(B){return this[N.p(B)]()},P.add=function(B,$){var E,j=this;B=Number(B);var F=N.p($),V=function(Y){var ie=O(j);return N.w(ie.date(ie.date()+Math.round(Y*B)),j)};if(F===d)return this.set(d,this.$M+B);if(F===m)return this.set(m,this.$y+B);if(F===u)return V(1);if(F===c)return V(7);var W=(E={},E[o]=r,E[l]=a,E[i]=n,E)[F]||1,_=this.$d.getTime()+B*W;return N.w(_,this)},P.subtract=function(B,$){return this.add(-1*B,$)},P.format=function(B){var $=this,E=this.$locale();if(!this.isValid())return E.invalidDate||h;var j=B||"YYYY-MM-DDTHH:mm:ssZ",F=N.z(this),V=this.$H,W=this.$m,_=this.$M,Y=E.weekdays,ie=E.months,z=E.meridiem,Fe=function(ye,Ae,it,Ft){return ye&&(ye[Ae]||ye($,j))||it[Ae].slice(0,Ft)},Ge=function(ye){return N.s(V%12||12,ye,"0")},He=z||function(ye,Ae,it){var Ft=ye<12?"AM":"PM";return it?Ft.toLowerCase():Ft};return j.replace(y,function(ye,Ae){return Ae||function(it){switch(it){case"YY":return String($.$y).slice(-2);case"YYYY":return N.s($.$y,4,"0");case"M":return _+1;case"MM":return N.s(_+1,2,"0");case"MMM":return Fe(E.monthsShort,_,ie,3);case"MMMM":return Fe(ie,_);case"D":return $.$D;case"DD":return N.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Fe(E.weekdaysMin,$.$W,Y,2);case"ddd":return Fe(E.weekdaysShort,$.$W,Y,3);case"dddd":return Y[$.$W];case"H":return String(V);case"HH":return N.s(V,2,"0");case"h":return Ge(1);case"hh":return Ge(2);case"a":return He(V,W,!0);case"A":return He(V,W,!1);case"m":return String(W);case"mm":return N.s(W,2,"0");case"s":return String($.$s);case"ss":return N.s($.$s,2,"0");case"SSS":return N.s($.$ms,3,"0");case"Z":return F}return null}(ye)||F.replace(":","")})}
51,P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(B,$,E){var j,F=this,V=N.p($),W=O(B),_=(W.utcOffset()-this.utcOffset())*r,Y=this-W,ie=function(){return N.m(F,W)};switch(V){case m:j=ie()/12;break;case d:j=ie();break;case f:j=ie()/3;break;case c:j=(Y-_)/6048e5;break;case u:j=(Y-_)/864e5;break;case l:j=Y/a;break;case o:j=Y/r;break;case i:j=Y/n;break;default:j=Y}return E?j:N.a(j)},P.daysInMonth=function(){return this.endOf(d).$D},P.$locale=function(){return C[this.$L]},P.locale=function(B,$){if(!B)return this.$L;var E=this.clone(),j=R(B,$,!0);return j&&(E.$L=j),E},P.clone=function(){return N.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},S}(),D=Q.prototype;return O.prototype=D,[["$ms",s],["$s",i],["$m",o],["$H",l],["$W",u],["$M",d],["$y",m],["$D",b]].forEach(function(S){D[S[1]]=function(P){return this.$g(P,S[0],S[1])}}),O.extend=function(S,P){return S.$i||(S(P,Q,O),S.$i=!0),O},O.locale=R,O.isDayjs=M,O.unix=function(S){return O(1e3*S)},O.en=C[x],O.Ls=C,O.p={},O})})(jd);var Fw=jd.exports;const Lw=ap(Fw);var Ra=function(e){if(!e)return 0;var t=Lw(e).valueOf()-Date.now();return t<0?0:t},Dw=function(e){return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},zw=function(e){e===void 0&&(e={});var t=e||{},n=t.leftTime,r=t.targetDate,a=t.interval,s=a===void 0?1e3:a,i=t.onEnd,o=T.useMemo(function(){return Cy(n)&&n>0?Date.now()+n:void 0},[n]),l="leftTime"in e?o:r,u=Ty(T.useState(function(){return Ra(l)}),2),c=u[0],d=u[1],f=Ey(i);T.useEffect(function(){if(!l){d(0);return}d(Ra(l));var b=setInterval(function(){var h,w=Ra(l);d(w),w===0&&(clearInterval(b),(h=f.current)===null||h===void 0||h.call(f))},s);return function(){return clearInterval(b)}},[l,s]);var m=T.useMemo(function(){return Dw(c)},[c]);return[c,m]};const Qw=Xp,Vw={"Build Now":"https://docs.bitlayer.org/docs/Build/GettingStarted/QuickStart/","The Graph":"https://docs.bitlayer.org/docs/Build/DeveloperResources/Indexers/TheGraph","Get start":"https://docs.bitlayer.org/docs/Build/GettingStarted/QuickStart","Bitlayer Architecture":"https://docs.bitlayer.org/docs/Learn/Bitlayer%20Rollup/system-design/","Bitlayer Roadmap":"https://docs.bitlayer.org/docs/Learn/Introduction/Roadmap/","Dapp Security Manual":"https://docs.bitlayer.org/docs/Build/TrackPack/DappSecurityManual","Security Network":"https://docs.bitlayer.org/docs/Build/TrackPack/SecurityNetwork","Opensource tools":"https://docs.bitlayer.org/docs/Build/TrackPack/OpensourceTools/","Explore More Tools":"https://docs.bitlayer.org/docs/Build/TrackPack/BoostTools/"},a3=Vw,s3={name:"navigation.links.btrAirdrop",link:"/airdrop/btr",icon:jw},Uw=({token:e,disable:t,refetch:n,children:r})=>{const{toast:a}=Rl(),{address:s}=gs(),[i,o]=T.useState(""),{mutateAsync:l,isPending:u}=Ww(),[c,d]=T.useState(""),{data:f,refetch:m}=Tt({abi:Fd,address:e.token_address,functionName:"ownerOf",args:[BigInt(e.token_id)],query:{refetchOnWindowFocus:!0}}),b=f&&s&&f.toLowerCase()!==s.toLowerCase(),h=g=>{o(g.target.value)},w=()=>{n()},y=async()=>{if(!i){a("Please input transfer address");return}if(!fe(i)){a("Please input the correct address.");return}try{const g=await l({to:i,token:{...e,token_id:e.token_id}});d(g==null?void 0:g.transactionHash),w(),window.setTimeout(()=>{},1e4),window.setTimeout(()=>{},2e4),window.setTimeout(()=>{},3e4)}catch(g){if(g instanceof Br&&g.message==="insufficientFunds"){a("Insufficient BTC Balance");return}if(g instanceof Yo){a("User rejected");return}a("Transfer failed")}},A=()=>{const g=yp(Qw,c);window.open(g,"_blank")},v=()=>{m()};return t?p.jsx(p.Fragment,{children:r}):p.jsxs(Es,{onOpenChange:v,children:[p.jsx(gl,{asChild:!0,children:r}),p.jsxs(Is,{className:"md:bl-w-[460px] bl-p-0 bl-bg-primary bl-text-black",children:[p.jsxs(wl,{children:[p.jsx("h4",{className:"bl-text-2xl bl-text-center",children:b?"NFT has been transferred":c?"Transfer Successful!":"Transfer"}),p.jsx(vl,{className:"bl-absolute bl-top-0 bl-right-3"})]}),p.jsxs("div",{className:"bl-relative bl-w-full bl-flex bl-flex-col bl-items-center bl-justify-center",children:[p.jsx("img",{src:e.token_image,alt:"icon",className:"bl-w-30 md:bl-w-[155px] bl-object-scale-down bl-mt-2"}),p.jsxs("div",{className:"bl-w-full bl-flex bl-items-center bl-justify-center bl-gap-6 bl-py-3 bl-text-white bl-text-xl md:bl-text-2xl bl-font-[600] bl-pb-6",children:[p.jsxs("div",{className:"",children:["#",e.token_id]}),p.jsx("div",{className:"",children:e.token_name})]}
51),p.jsxs("div",{className:X("bl-w-full bl-pt-5 bl-px-4 md:bl-px-9 bl-border-t-[2px] bl-border-[#D36619]",{"bl-hidden":!!c||b}),children:[p.jsx("div",{className:"bl-text-base md:bl-text-lg bl-mb-2",children:"Transfer Address"}),p.jsxs("div",{className:"bl-flex bl-items-center bl-gap-2 bl-relative",children:[p.jsx(El,{value:i,onChange:h,placeholder:"Please enter a transfer address",className:"bl-bg-transparent bl-pl-8 focus-within:bl-bg-transparent bl-text-black focus-within:bl-text-black focus:bl-bg-transparent focus:bl-text-black focus-visible:bl-bg-transparent md:focus-visible:bl-bg-transparent focus-visible:bl-text-black md:focus-visible:bl-text-black placeholder:bl-text-divider/60 md:focus-visible:placeholder:bl-text-divider/60 bl-text-[12px] md:bl-text-base"}),p.jsx(Zh,{className:"bl-text-[#1B1E21] bl-size-4 md:bl-size-5 bl-absolute bl-left-2 bl-z-50"})]})]})]}),p.jsx(Al,{className:"bl-gap-6 bl-pt-10 bl-pb-8",children:b?p.jsx(Bi,{asChild:!0,children:p.jsx(ae,{variant:"dark",className:"bl-w-44",onClick:w,children:p.jsx("span",{className:"bl-text-base md:bl-text-2xl",children:"Confirm"})})}):c?p.jsx(Bi,{asChild:!0,children:p.jsx(ae,{variant:"dark",className:"bl-w-44",onClick:A,children:p.jsx("span",{className:"bl-text-base md:bl-text-2xl",children:"View on Explorer"})})}):p.jsxs(ae,{variant:"dark",className:"bl-w-44",onClick:y,disabled:u||!i||!fe(i),children:[u?p.jsx(Mr,{className:"bl-size-6 bl-animate-spin"}):null,p.jsx("span",{className:"bl-text-base md:bl-text-2xl",children:"Confirm"})]})}),p.jsx(Il,{variant:"dark",positions:["tl","bl","br"]})]})]})},Ww=()=>{const e=cn(),{address:t,chain:n}=gs();return Un({mutationFn:async({to:r,token:a})=>{try{const s=Fd,i="transferFrom",o=[t,r,BigInt(a.token_id)],l=await dn(e),u=await pn(e,{data:ue({abi:s,functionName:i,args:o}),to:a.token_address,account:t,maxFeePerGas:l.maxFeePerGas,maxPriorityFeePerGas:l.maxPriorityFeePerGas}),c=await Hn(e,{abi:s,address:a.token_address,chainId:n.id,functionName:i,args:o,gas:u,maxFeePerGas:l.maxFeePerGas,maxPriorityFeePerGas:l.maxPriorityFeePerGas});return await hl(e,{hash:c,pollingInterval:5e3,confirmations:3})}catch(s){if(s instanceof pe&&s!=null&&s.message.includes("gas required exceeds allowance"))throw new Br("insufficientFunds");We(s)}}})},Fd=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"_baseUrl",type:"string"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint64",name:"wlStartTime",type:"uint64"},{internalType:"uint64",name:"wlEndTime",type:"uint64"},{internalType:"uint256",name:"maxSupply",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"}
51,{inputs:[],name:"AccessControlBadConfirmation",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"bytes32",name:"neededRole",type:"bytes32"}],name:"AccessControlUnauthorizedAccount",type:"error"},{inputs:[],name:"ERC721EnumerableForbiddenBatchMint",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"ERC721OutOfBoundsIndex",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",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:!1,internalType:"string",name:"oldUrl",type:"string"},{indexed:!1,internalType:"string",name:"newUrl",type:"string"}],name:"BaseUrlSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"fmStartTime",type:"uint64"}],name:"FreeMintStartTimeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"FreeMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"wlEndTime",type:"uint64"}],name:"WhiteListEndTimeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"wlStartTime",type:"uint64"}],name:"WhiteListStartTimeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"wl",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"WhitelistMinted",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"MaxSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"OperatorRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"OwnerRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"isWhitelist",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"minted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"wls",type:"bytes32[]"}],name:"removeWhitelists",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"callerConfirmation",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",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:"string",name:"_baseUrl",type:"string"}],name:"setBaseUri",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"wlEndTime",type:"uint64"}],name:"setWhitelistEndTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"wlStartTime",type:"uint64"}],name:"setWhitelistStartTime",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:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"wls",type:"bytes32[]"}],name:"uploadWhitelists",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"whitelistMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"whitelistMintEndAt",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"whitelistMintStartAt",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"whitelists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],Vt=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:64,height:57,viewB
51ox:"0 0 64 57",fill:"none",...e,children:p.jsx("path",{d:"M27.837 57H.98L35.163 0h26.859L27.838 57Z",fill:"currentColor"})}),Gw=[{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"_baseUrl",type:"string"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint64",name:"wlStartTime",type:"uint64"},{internalType:"uint64",name:"wlEndTime",type:"uint64"},{internalType:"uint256",name:"maxSupply",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessControlBadConfirmation",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"bytes32",name:"neededRole",type:"bytes32"}],name:"AccessControlUnauthorizedAccount",type:"error"},{inputs:[],name:"ERC721EnumerableForbiddenBatchMint",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"ERC721OutOfBoundsIndex",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",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:!1,internalType:"string",name:"oldUrl",type:"string"},{indexed:!1,internalType:"string",name:"newUrl",type:"string"}],name:"BaseUrlSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"fmStartTime",type:"uint64"}],name:"FreeMintStartTimeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"FreeMinted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"wlEndTime",type:"uint64"}],name:"WhiteListEndTimeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"wlStartTime",type:"uint64"}],name:"WhiteListStartTimeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"wl",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"WhitelistMinted",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"MaxSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"OperatorRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"OwnerRole",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"wallet",type:"address"}],name:"isWhitelist",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"minted",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"wls",type:"bytes32[]"}],name:"removeWhitelists",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"callerConfirmation",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",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:"string",name:"_baseUrl",type:"string"}],name:"setBaseUri",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"wlEndTime",type:"uint64"}],name:"setWhitelistEndTime",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint64",name:"wlStartTime",type:"uint64"}],name:"setWhitelistStartTime",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:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"wls",type:"bytes32[]"}],name:"uploadWhitelists",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"whitelistMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"whitelistMintEndAt",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"whitelistMintStartAt",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"whitelists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"}],Ut={abi:Gw},Hw=e=>p.jsx("svg",{width:"28",height:"28",viewBox:"0 0 28 28",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M5.18 21.084C5.18 21.5693 5.348 21.98 5.684 22.316C6.02 22.652 6.44 22.8293 6.944 22.848H10.472C10.9573 22.848 11.3773 22.6707 11.732 22.316C12.0867 21.9613 12.2547 21.5507 12.236 21.084V6.944C12.23
516 6.45867 12.068 6.03867 11.732 5.684C11.396 5.32934 10.976 5.16134 10.472 5.18H6.944C6.45867 5.18 6.03867 5.348 5.684 5.684C5.32933 6.02 5.16133 6.44 5.18 6.944V21.084ZM15.764 21.084C15.764 21.5693 15.9413 21.98 16.296 22.316C16.6507 22.652 17.0613 22.8293 17.528 22.848H21.056C21.5413 22.848 21.9613 22.6707 22.316 22.316C22.6707 21.9613 22.8387 21.5507 22.82 21.084V6.944C22.82 6.45867 22.652 6.03867 22.316 5.684C21.98 5.32934 21.56 5.16134 21.056 5.18H17.528C17.0427 5.18 16.632 5.348 16.296 5.684C15.96 6.02 15.7827 6.44 15.764 6.944V21.084Z"})}),_w=e=>p.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("g",{clipPath:"url(#clip0_3580_7231)",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4151 6.61716L5.14487 0.365623C3.42543 -0.680357 1.28577 0.642997 1.28577 2.74871V15.2512C1.28577 17.3596 3.42543 18.6802 5.14487 17.6342L15.4151 11.3859C17.1475 10.3316 17.1475 7.67137 15.4151 6.61716Z"})}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_3580_7231",children:p.jsx("rect",{width:"18",height:"18"})})})]}),qw=e=>p.jsxs("svg",{width:"178",height:"147",viewBox:"0 0 178 147",fill:"none",...e,children:[p.jsx("rect",{width:"178",height:"147",fill:"url(#pattern0_6796_19818)"}),p.jsxs("defs",{children:[p.jsx("pattern",{id:"pattern0_6796_19818",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:p.jsx("use",{xlinkHref:"#image0_6796_19818",transform:"matrix(0.00334831 0 0 0.00405442 -0.314607 -0.503401)"})}),p.jsx("image",{id:"image0_6796_19818",width:"500",height:"500",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAYAAADL1t+KAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3Nt2GDeOBVD3/3/0zNK0PbEdSXUDWeTB7lfVhdg4BUTK6vznh/8RIECAAAEC2wv8Z/sKFECAAAECBAj8sNCFgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYAAAQIECAQIWOgBTVQCAQIECBCw0GWAAAECBAgECFjoAU1UAgECBAgQsNBlgAABAgQIBAhY6AFNVAIBAgQIELDQZYBAlsD//FaO7zurt6oh8K2AD15ACKwr8PtynnVKM2GWtPcQKBbw8RaDehyBGwJvLO6rxzQrroq5nsBkAR/pZHCvI/Djx48dFvhRo8yOI6Hjn3+XA77Hfq74S0BoRILAeIGEBX6kZJYcCf3z8yt54Hretf2VwtI+AgAGCVwZ2oOO8OpjzZbP+e/kguWrU
51d7n5YKyT6+cdH2BO8N6/aqendCMufeb+d/qHJ/lsMXdQtKizYocKGCJn8ftPG+e5qSz3fmENb9SSJoHQPm3BZ4O6NsvDrix29ypyko3t4Cozy1BQOZ6e9veAlWDeW+F2tOnz6DKzKRb1Sar4dMEpGHTlXxZoHIoX355gxtS51B1blKdGkR8TokCMsfZW/YUqB7IeyrMOXXaLBqRnTSjOclq9BYBadRspZ4WGDGMT7+88YUp82hUflJ8Gkd8bOkCMtbX0/cTGDWM95OYf+KEeTQyPwk+81PV6I0C0qjZSv1WYOQgRn9OYPd5NDpDu/ucS4GrbgsIyG06N4YIjB7CIUzTyth1Js3I0a4208LT/UUC0j0BveufMYR7C1+vfseZNCNHO7pc7747HgkIySM+N28qMGMAb0rz+rF3m0kzsrSbyesh6noAQena+Z51zxi+I2RHf6cruYyutbI/M9x28qi09awbAsJyA80tWwrMGL5PYVb8Hme6rVj/Vz2d4bKTx9Psu79AQGAKED1ieYEZw/cOwm7f32jHXTxGO3xkaReLO7l3zyABoRkE67FLCMwYvFcKTfveKn13sams+avs7GJxJfuunSAgOBOQveIVgRmD92xhHb6zp947GD2t8UxednA4U4drXhAQnhfQvXK4wIzBe1RE12/rjv0OVnfqOsrI3z/fweFqTa6fKCBAE7G9aorAjMH7XSG+qX90jnqxi9VRHRXB3sWiolbPGCQgRINgPfYVgRmD97PCfEfn2v3Rn92sZmRqN5Nz3XbVdAFBmk7uhQMEZgxdi3xA4xZ/5IxcmcGLh2Cn4wnTTt1y1s8EZgxd/66zX/Zm5Mr87ZeroRUL1FBeDx8sMGPoWuaDm7jg42fkyuxdsPG7H0modu9g3/PPGLq/6/pWemRtRq5kqUeWplcpWNPJvbBAYMbQ/XVM30hBwzZ5xIxcydMmYdjxmMK1Y9d6n3nG0LXM+2VsRq7M2365mlqxgE3l9rKHAjOG7scRfRcPG7XZ7TNyJVObhWLH4wrZjl3reeYZQ9cy75etGbkyZ/vl6pWKBe0Vdi+9KDBj6FrmF5sScPmMXJmxAUHZpQRh26VTvc85evD6Dvrla3Sm/ANiv0y9XrFB9noLHOBAYPTg9Q30i+DoTFnm/TK1RMWG2RJtcIgvBEYPXvnvF73RmbLM+2VqmYoNtGVa4SB/CYwevLLfL3KjM2WZ98vUUhUbaku1w2F+CowevHLfL2qjM2WZ98vUchUbbMu1pP2BRg9eme8XsdGZssz7ZWrJig23JdvS+lAjh6+894vWyDz90pSrfrlasmJBXLItbQ81avjKec9IjcrT75qy1TNbS1YtjEu2peWhRg5fOe8XqZF58pt5vzxtUbFBt0Wb4g85cvjKeHx8/lXgyDxZ5v3ytE3Fht02rYo+6KgBLN/Rsfm0uFFZ8mf2flnarmIDb7uWxR141ACW7bioHBY0KkuW+SG9C1YQMPRW6ELvM4wYwnLdL1MjcvS3olz1y9VWFQvoVu2KO+yIISzTcTE5LGhEjizzQ3YXrCZg+K3WkT7nGTGE5blPfn5VOiJHlnm/HEVUbABGtHHLIqoHsSxvGYNHh67O0GeHkatHLXLzTAFhnantXSN/q5LlXvmyzHv1W7UnBAzBE0guKRUYMYjluLRFyz9sRIb8mX35tjvgkYBBeCTk59UC1cNYhqs7tPbzqvPjz+xr99vpLggYhhewXPpYoHoYy+/jlmz1gOr8WOZbtd9hjwQMxCMhP68UqB7I8lvZnbWfVZ0dy3ztfjvdDQED8QaaW24JVA9k2b3Vhi1vqs6OZb5lDBz6SMBQPBLy8yqB6qEsu1WdWfs51bmxzNfut9M9EDAUH+C59bRA9VCW29P0W19YnRvLfOs4OPyRgMF4JOTnFQKVg1lmKzqy/jMqM/NVtbK0fg6c8IKAQF/AcuktgerBLLO32rDVTdWZ8Zv5Vu132LsChuNdOfedFagczvJ6Vn3f6yrz4jfzfXPg5DcEDMgbaG65JFA1oGX1EvuWF1dl5bvi5WjLaDj0GQHhPqPkmrsClQNaVu92YY/7KrPiN/M9eu6UxQKGZDGox/0hUDmkZTU3XJU5scxzc6KyAwFDUkRGCVQOaTkd1aX3n1uZE8v8/X46wYsCBuWL+OGvrhzUcpoZlsqMWOaZGVHVBQGD8gKWSy8JVA1rGb3Evs3FVfn4rmDZ2SYODlohIPAVip7xt0DlsJbRvHxV5sNv5nn5UNFNAcPyJpzbvhWoGtjymRe0qmz4zTwvGyp6KGBgPgR0+6cCVUNbPrMCVpULyzwrF6opEjAwiyA95v8Fqoa2bGaFqioXlnlWLlRTKGBoFmJ61P8JVA1u2cwJVFUmLPOcTKhkgIChOQC1+SOrhrdsZgSpKg+WeUYeVDFQwNAciNvw0VXDWy4zwlOVB8s8Iw+qGCxgcA4Gbvb4qgEul/sHpyoLlvn+WVDBJAGDcxJ0k9dUDXG53DswVTmwzPfOgdNPFjA4J4OHv65ikMvk3iGpyMCRgIwcCfl5SwEfRsu2Dym6apDvlMmjmneqpSIURx4V7+hmWmHmGU0EfBxNGj2hzKphvksmz9a7Sz1PI3LW48l7ulg+MXJvYwEfSOPmF5deNdBXz+TdOlev60kc7ppceWey3xUH1xL4UsBHIhxVAhVDfYc8Pqlzh/qu5uGJx9l3Jbqdrd11BE4L+FBOU7nwG4Gqob56HivqXL3GK0Gv8Dh6X5LXUa1+TuCRgI/lEZ+bfwpUDfbV89ilzjPBrrL47l2r5+GMk2sITBPwwUyjjn5R1XBfOY9VNf4Kwsq1HoW12uKz9+3sc+Tn5wSGCPhohrC2e2jFgF89i
51xU1/h2M1Wv+LMgjHBJc2n30Cl5PYMeBsp6iE1UM+dWzWFHj7r+JjjL43WX1HPx+1u88dqrDBAsRELqQRr5cRsWgXz2LFTV+1abVa/8498j6d/vXEFcsdujty+PD66sEhK1Ksu9zrgy375RWz2JVnTsu9dG1f5is3v9ffbtjsUttfadYSOWCFtLIF8u4M+B2/dNzVa07LfXRNacv893++vDiKPHqpwIW+lNB91cN/B2yWFXrLn+p6Fbv0df8xGOHfB/V7+eLCwjZ4g3a4HhPhtzv5e2Sxap6V1/qXeo8+4lVeOyS8bMmrltMQMAWa8iGx+k26CrqPdPmN7/NGTW+Wd8Z/7+vqTDZreY7Tu55UUDAXsQPeXXHQVdR85n2v/F9zqjtjbrOeH93TYXLjnU/dXP/RAEBm4gd+qqug66i7jORmPmNzqhpZj1nfM9eU2Gza+1njVz3soCAvdyAgNd3HnQVtZ+JwIzvdEYtM+o443nnmgqfneu/Y+aeyQICNhk88HXdB11F/WdiMfJbnVHDyPOf8Xt6TYXR7gZPDd0/WEDABgM3eLxBN+e/ovYRpRHfa0X/jmI+4txH76z+eYVTgkO1q+cVCghYIWbTRxl0/218hcOZCFV+szPOXHneMz6jrqmySvEY5ey5DwSE6wGeW8sWWUoOq4b+UbQqvGacteKcRxazfl7llWQyy957TgoI10kol30qYMj9m6XK5ChyT77dGWd8cr6j2t/4eZVZmssbvfDOLwSESzSeCBhyn+tVuRz15s73O+Nsd851VOvbP69yS7R5uzfe/1NAuEThiYAh97Velc1Rf658wzPOdOU8R7Wt9PMqu1SflXrV9izC1bb1JYUbct8zVvkcNevMdzzjLGfOcVTLqj+v8ks2WrV3bc4lXG1aPazQikGXnMMKnzPN+85wxhmSe/jhX2GYbnQmp64ZKCBgA3GbPNqgO250hdHxWz7//6nPeHeHOVLh2MHpTE5dM0hAwAbBNnqsQXeu2RVOZ970+zc9451dZkiFZRerMzl1zQABARuA2uyRBt35hldYnXnbx3c9412d5keFZyevMzl1TbGAgBWDNnycQXet6RVe19445upus6Oib93MxiTPU78UEDDheCpg0F0XrDC7/ta6OzrOjYqedXSrS50nHQoI2CGRCw4EDLp7Ealwu/fmZ3d1nRkV/epq9yxx7j4tIGCnqVz4hYBBdz8aFXb33379zs7zoqJXnf2up80dlwUE7DKZG/4SMOieRaLC79kJzt3dfVZU9Km74bmkueq2gIDdpnPjT4GKQffxqM5ZrDIcFcrOvfkwrepPd8dR+fTcnwICJgpPBQy7p4L/vb/KseY0/zzFjKjrDcvqdHreHwICJhBPBaoWkSzWLY6nPf11v57U/sMWz6pkes6nAgImGBUCFUtdFmuXx9O+6sc/gvL9NE3unyLgo53CHP8SA6+2xRWeT05kLvypV9EPpk8S6d5TAkJ2islFBwIGXn1EKkzvnMpM+LdaRS+43kmjey4JCNklLhd/IWDgjYlGheuVk5kHn2tV9IHtlSS69paAkN1ic9NfAhUD7+OR8jjmt8MzgWU/bpnL9pkEuuaxgI/4MaEHFP5fruRx7FL5Kqzcv/6M/cOqEbeNgA95m1YtfVBDb3x7qoz/PqkZ8H3vqtw5j/9G2r9ByNpHoAygYvDJ45zl8ustvI/jL9fHRq5YRMAHvUgjAo5RMfj8u8bjIHA+Nqq6gnWVpOdMEbDQpzC3eInhN6/NT6199+d69dTZX0LOObuqSMCHXQTpMWX/LXKZPBemu8uG7znfj6vuGv/+Bt7nvV35UEDYHgK6/Q8BA3BuIK56+96v9eeq72dPZ37N3NUPBITtAZ5b/yVQMQA/HiqX18J1xp1pvemZJ3I/o+SaEgFhK2H0kJ8CZxbLGSy5PKP072v+9ud4z7Hqz+3+4fS+vztvCPjgb6C55VuBiqUul0L2toAcv90B778sYHBeJnPDgUDFIPSbjZi9KSDDb+p7920BC/02nRu/EDAMRWN3ARnevYNNz2+hN238wLKrhqHf0gc2yaO/FJBf4dhWwELftnVLH7xqKMrn0m2OPJzsRra1R1EGZo8+z67SUJwt7n1VArJbJek50wUs9OnkbV5oMLZpdUyhMhvTyp6FWOg9+z6jasNxhrJ3VArIbKWmZ00XsNCnk7d5YdVw/ACT0zaxea1QeX2N3ourBAzKKknP+UygakjKqXyNFpDV0cKeP1zAoBxO3PoFVUPSb+mtYzS8eDkdTuwFMwQs9BnKfd9hUPbt/U6Vy+lO3XLWLwUsdOEYLWBYjhb2/CcC8vlEz71LCVjoS7Uj8jAGZmRbY4qSz5hWKsRCl4EZAobmDGXvuCogl1fFXL+0gIW+dHtiDlc5OD9Q5DYmGq8VIpOv0XvxKAGDcZSs5/4tUDlA5Va+ngrI41NB9y8nYDAu15LYA1UOUL+lx8ZkSmGyOIXZS2YLWOizxXu/r3KQym7vLD2pXg6f6Ll3WQFDcdnWRB6scpD6LT0yIsOLksHhxF7wloCF/pZ83/caqH17/3blsvd2B7x/qICFPpTXwz8RqB6qflMXszMCcndGyTVbC1joW7dv28NXD1c53jYK0w4uc9OovegtAYPwLfne760ern5L752no+rl7UjIzyMELPSINm5ZhCG7Zdu2O7ScbdcyB74rYKHflXNfhYBhW6HoGV8JyJdstBKw0Fu1e7liDdzlWhJ1IPmKaqdijgQs9CMhPx8tYOiOFu75fLnq2ffWVVvordu/RPEjBu9HYbK9RHtfOYRMvcLupW8LGHpvd8D7PwQMYDmoEpClKknP2U7AQt+uZbEHNohjWzutMBmaRu1FKwpY6Ct2pe+ZDOS+vX9auew8FXT/9gIW+vYtjCpg1FD279SjYvKvYuQmu7+qOylgoZ+Ectk0AcN5GnXEi+Qloo2KqBCw0CsUPaNawJCuFs18npxk9lVVNwUs9JtwbhsuYFgPJ976BfKxdfscfoSAhT5C1TMrBEYO7I/zyX5Fl955hmy84+6tiwsYaos3qPnxDO7mAfikfJmQCQJfCFjoorG6wOgB7rf11RPw3/PJwR59csoXBSz0F/G9+rSAYX6aKvJC/Y9sq6KqBSz0alHPGyVgqI+SXfu5+r52f5xuIQELfaFmOMqhwIzh7k/wh22YcoFeT2H2kiQBCz2pmz1qMejz+6zH+T1W4QABC30AqkcOFzDwhxO/9gK9fY3ei3cXsNB372Df888a/P4EPydj+jnH2VuCBSz04OY2KG3mErDYxwRKD8e4empDAQu9YdPDSrYQ9m2o3u3bOydfUMBCX7ApjnRZYPZi8Nv65Rb9cYN+PfNzN4FPBSx0wUgReGNJWOzX0qNH17xcTeCSgIV+icvFiwu8tTAs9u+DoS+LfziOlyFgoWf0URX/CLy5PCz2P5OoF75MAhMFLPSJ2F41TeDtRfKr0I7fF/tpMfciAn8KdBw4MtBHYJXlkv6bO+c+35RKFxaw0BdujqOVCKy0bJJ+c+daEk8PIVAnYKHXWXrSugIrLp8dlzvHdTPuZAR+WOhC0Elg5YX0ex9W+C5Zdfoy1BohsMLgiIBUxDYCuyyqz0BHfK88tomugxL4XmDEgGBOYHWBnZfY6razzmd2zZL2nm0EfBTbtMpBBwhY7ANQBz/SzBoM7PH7Cvg49u2dk9cJWOx1lqOeZFaNkvXcGAEfSUwrFfJQwFJ/CDjwdnNqIK5H5wj4UHJ6qZIaAYu9xrHiKeZThaJntBHwwbRptUIvCljsF8EKLzeXCjE9qo+AD6dPr1V6T8Biv+d25y7z6I6aewj8FPABiQKBcwIW+zmnO1eZQ3fU3EPgLwEfkkgQuCZgsV/z+u5q86fO0pMI+E+/ygCBmwIW+024Hz/Mnft07iTwtYB/QpYOAs8FLPdjQ7Pm2MgVBB4J+Mge8bmZwL8ELPd/SMwXHwiBiQI+uInYXtVOoONyN1PaxVzBqwj4+FbphHOkCyQvd3MkPb3q20LAh7hFmxwyUGDnBW9uBAZSSfsL+DD376EKMgRWXvDmREbGVBEu4EMNb7DyIgRmLHuzICIqiugs4CPu3H21EyBAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBSz0zt1XOwECBAjECFjoMa1UCAECBAh0FrDQO3df7QQIECAQI2Chx7RSIQQIECDQWcBC79x9tRMgQIBAjICFHtNKhRAgQIBAZwELvXP31U6AAAECMQIWekwrFUKAAAECnQUs9M7dVzsBAgQIxAhY6DGtVAgBAgQIdBaw0Dt3X+0ECBAgECNgoce0UiEECBAg0FnAQu/cfbUTIECAQIyAhR7TSoUQIECAQGcBC71z99VOgAABAjECFnpMKxVCgAABAp0FLPTO3
51Vc7AQIECMQIWOgxrVQIAQIECHQWsNA7d1/tBAgQIBAjYKHHtFIhBAgQINBZwELv3H21EyBAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBSz0zt1XOwECBAjECFjoMa1UCAECBAh0FrDQO3df7QQIECAQI2Chx7RSIQQIECDQWcBC79x9tRMgQIBAjICFHtNKhRAgQIBAZwELvXP31U6AAAECMQIWekwrFUKAAAECnQUs9M7dVzsBAgQIxAhY6DGtVAgBAgQIdBaw0Dt3X+0ECBAgECNgoce0UiEECBAg0FnAQu/cfbUTIECAQIyAhR7TSoUQIECAQGcBC71z99VOgAABAjECFnpMKxVCgAABAp0FLPTO3Vc7AQIECMQIWOgxrVQIAQIECHQWsNA7d1/tBAgQIBAjYKHHtFIhBAgQINBZwELv3H21EyBAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBSz0zt1XOwECBAjECFjoMa1UCAECBAh0FrDQO3df7QQIECAQI2Chx7RSIQQIECDQWcBC79x9tRMgQIBAjICFHtNKhRAgQIBAZwELvXP31U6AAAECMQIWekwrFUKAAAECnQUs9M7dVzsBAgQIxAhY6DGtVAgBAgQIdBaw0Dt3X+0ECBAgECNgoce0UiEECBAg0FnAQu/cfbUTIECAQIyAhR7TSoUQIECAQGcBC71z99VOgAABAjECFnpMKxVCgAABAp0FLPTO3Vc7AQIECMQIWOgxrVQIAQIECHQWsNA7d1/tBAgQIBAjYKHHtFIhBAgQINBZwELv3H21EyBAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBSz0zt1XOwECBAjECFjoMa1UCAECBAh0FrDQO3df7QQIECAQI2Chx7RSIQQIECDQWcBC79x9tRMgQIBAjICFHtNKhRAgQIBAZwELvXP31U6AAAECMQIWekwrFUKAAAECnQUs9M7dVzsBAgQIxAhY6DGtVAgBAgQIdBaw0Dt3X+0ECBAgECNgoce0UiEECBAg0FnAQu/cfbUTIECAQIyAhR7TSoUQIECAQGcBC71z99VOgAABAjECFnpMKxVCgAABAp0FLPTO3Vc7AQIECMQIWOgxrVQIAQIECHQWsNA7d1/tBAgQIBAjYKHHtFIhBAgQINBZwELv3H21EyDREGfMAAACdUlEQVRAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBSz0zt1XOwECBAjECFjoMa1UCAECBAh0FrDQO3df7QQIECAQI2Chx7RSIQQIECDQWcBC79x9tRMgQIBAjICFHtNKhRAgQIBAZwELvXP31U6AAAECMQIWekwrFUKAAAECnQUs9M7dVzsBAgQIxAhY6DGtVAgBAgQIdBaw0Dt3X+0ECBAgECNgoce0UiEECBAg0FnAQu/cfbUTIECAQIyAhR7TSoUQIECAQGcBC71z99VOgAABAjECFnpMKxVCgAABAp0FLPTO3Vc7AQIECMQIWOgxrVQIAQIECHQWsNA7d1/tBAgQIBAjYKHHtFIhBAgQINBZwELv3H21EyBAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBSz0zt1XOwECBAjECFjoMa1UCAECBAh0FrDQO3df7QQIECAQI2Chx7RSIQQIECDQWcBC79x9tRMgQIBAjICFHtNKhRAgQIBAZwELvXP31U6AAAECMQIWekwrFUKAAAECnQUs9M7dVzsBAgQIxAhY6DGtVAgBAgQIdBaw0Dt3X+0ECBAgECNgoce0UiEECBAg0FnAQu/cfbUTIECAQIyAhR7TSoUQIECAQGcBC71z99VOgAABAjECFnpMKxVCgAABAp0FLPTO3Vc7AQIECMQIWOgxrVQIAQIECHQWsNA7d1/tBAgQIBAjYKHHtFIhBAgQINBZwELv3H21EyBAgECMgIUe00qFECBAgEBnAQu9c/fVToAAAQIxAhZ6TCsVQoAAAQKdBf4XF3vYBOBO0O4AAAAASUVORK5CYII="})]})]}),Zw=e=>p.jsxs("svg",{width:152,height:152,viewBox:"0 0 152 152",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("rect",{width:"152",height:"152",fill:"url(#pattern0_6796_19833)"}),p.jsxs("defs",{children:[p.jsx("pattern",{id:"pattern0_6796_19833",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:p.jsx("use",{xlinkHref:"#image0_6796_19833",transform:"scale(0.002)"})}),p.jsx("image",{id:"image0_6796_19833",width:"500",height:"500",xlinkHref:"data:image/png;base64,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"})]})]}),Yw="pages.luckyhelmet",Xw=({open:e,close:t,isWhitelist:n,mintSuccess:r})=>{const{t:a}=vt("",{keyPrefix:Yw});return p.jsx(Es,{open:e,children:p.jsx(Is,{className:"bl-w-[90%] md:bl-min-w-[490px] bl-h-[400px] md:bl-h-[427px] bl-overflow-hidden bl-scale-90 sm:bl-scale-100",children:p.jsxs("div",{className:"bl-relative bl-z-20 bl-flex bl-flex-col bl-gap-6 bl-items-center bl-bg-primary bl-text-black bl-font-body",children:[p.jsx("div",{className:"bl-absolute bl-top-[78px] bl-h-[2px] bl-w-full bl-bg-[#d36619]"}),p.jsxs("div",{className:"bl-relative bl-w-full bl-px-10 bl-flex bl-flex-col bl-items-center",children:[p.jsx(Te,{variant:"dark",size:"none",className:"bl-text-[20px] bl-my-6 md:bl-text-2xl/[30px]",children:a(r?"mintingSuccess":"checkWhitelist")}),p.jsx("div",{className:"bl-py-[25px]",children:n?p.jsx(qw,{}):p.jsx(Zw,{})}),p.jsx(Te,{variant:"secondary",size:"sm",className:"bl-text-center bl-text-black bl-text-lg md:bl-text-[22px]/[33px] bl-mb-10 md:bl-mb-[75px]",children:p.jsx(p.Fragment,{children:r?p.jsx("p",{children:a("congratulations")}):n?p.jsxs(p.Fragment,{children:[p.jsx("p",{children:a("congratulations")}),p.jsx("p",{children:a("success")})]}):p.jsxs(p.Fragment,{children:[p.jsx("p",{children:a("sorry")}),p.jsx("p",{children:a("failure")})]})})})]}),p.jsx(ae,{className:"bl-fixed bl-top-[12px] bl-right-[18px] bl-r bl-size-7.5 bl-rounded-full bl-border bl-border-black bl-bg-primary bl-text-black bl-text-base/none hover:bl-text-primary bl-translate-y-2 bl-px-0 bl-py-0",style:{WebkitMask:"none"},onClick:t,children:p.jsx(qf,{className:"bl-size-3"})}),p.jsx(Et,{position:"tl",variant:"dark"}),p.jsx(Et,{position:"bl",variant:"dark"}),p.jsx(Et,{position:"br",variant:"dark"})]})})})},Kw=e=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:22,height:22,viewBox:"0 0 22 22",fill:"none",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.208 17.366a8.605 8.605 0 0 1-2.399 1.726 1.091 1.091 0 0 1-1.579-.993v-7.037c0-1.226-1.04-2.188-2.259-2.188H2.44c1.747-5 5.517-7.084 9.636-6.589 3.897.47 7.088 3.62 7.628 7.53.392 2.834-.532 5.577-2.495 7.551Zm-6.183 2.742c0 1.165 1.021 2.086 2.157 1.857.008-.001 0-.002.008-.005a10.95 10.95 0 0 0 5.584-3.025c2.397-2.41 3.69-5.926 3.072-9.722C21.096 4.617 17.41.91 12.84.154 6.709-.857 1.308 3.224.168 8.874l-.005.022a8.365 8.365 0 0 0-.003 3.273l.716 3.595c.1.508.544.874 1.059.874.683 0 1.194-.628 1.06-1.301l-.58-2.919a1.108 1.108 0 0 1 1.081-1.326H9.87c.608 0 1.156.497 1.156 1.11v7.906Z",fill:"currentColor"})}),Jw=({children:e})=>{const{toast:t}=Rl(),[n,r]=T.useState(""),[a,s]=T.useState(void 0),[i,o]=T.useState([]),{mutateAsync:l,isPending:u}
51=tv(),c=m=>{r(m.target.value),s(void 0)},d=async()=>{if(!n){t("Please input NFT ID");return}if(isNaN(Number(n))||String(n).length>10){t("Please input the correct NFT ID.");return}try{const m=await l({tokenId:n});if(s((m==null?void 0:m.used)||!1),o((m==null?void 0:m.list)||[]),m!=null&&m.used){t("The NFT has been used");return}}catch{t("Check failed")}},f=m=>{m||(r(""),s(void 0),o([]))};return p.jsxs(Es,{onOpenChange:f,children:[p.jsx(gl,{asChild:!0,children:e}),p.jsxs(Is,{className:"bl-w-[80%] md:bl-w-[460px] bl-p-0 bl-bg-primary bl-text-black",children:[p.jsxs(wl,{children:[p.jsx("h4",{className:"bl-text-2xl bl-text-center",children:"Lucky Helmet"}),p.jsx(vl,{className:"bl-absolute bl-top-0 bl-right-3"})]}),p.jsx("div",{className:"bl-relative bl-w-full bl-flex bl-flex-col bl-items-center bl-justify-center",children:p.jsxs("div",{className:X("bl-w-full bl-pt-5 bl-px-4 md:bl-px-0 bl-overflow-hidden bl-box-border md:bl-max-w-[400px]"),children:[p.jsx("div",{className:"bl-text-[#393D44] bl-font-[400] bl-text-xl",children:"Enter the NFT ID to check whether the Binance Booster Campaign has been completed."}),p.jsxs("div",{className:"bl-flex bl-items-center bl-relative bl-mt-5 bl-overflow-hidden",children:[p.jsx(El,{value:n,onChange:c,placeholder:"Enter the NFT ID",className:"bl-bg-transparent bl-pl-10 focus-within:bl-bg-transparent bl-text-black focus-within:bl-text-black focus:bl-bg-transparent focus:bl-text-black focus-visible:bl-bg-transparent md:focus-visible:bl-bg-transparent focus-visible:bl-text-black md:focus-visible:bl-text-black placeholder:bl-text-divider/60 md:focus-visible:placeholder:bl-text-divider/60 bl-text-lg md:bl-text-xl md:bl-w-[400px]"}),p.jsx(Kw,{className:"bl-text-[#1B1E21]/80 bl-size-4 md:bl-size-5 bl-absolute bl-left-2 bl-z-50"})]}),p.jsx(ev,{value:n,used:a,checkList:i})]})}),p.jsx(Al,{className:"bl-gap-6 bl-pt-4 bl-pb-8",children:p.jsxs(ae,{variant:"dark",className:"bl-w-44",onClick:d,disabled:u||!n||isNaN(Number(n))||String(n).length>10,children:[u?p.jsx(Mr,{className:"bl-size-6 bl-animate-spin"}):null,p.jsx("span",{className:"bl-text-base md:bl-text-2xl",children:"Confirm"})]})}),p.jsx(Il,{variant:"dark",positions:["tl","bl","br"]})]})]})},Ma=({children:e})=>p.jsx("div",{className:"bl-h-15 bl-mt-2 bl-w-full bl-px-0 md:bl-px-0 bl-flex bl-flex-col",children:e}),Uo=({token_id:e,title:t,used:n})=>p.jsxs("div",{className:"bl-text-white bl-text-sm md:bl-text-lg bl-font-normal ",children:[p.jsxs("span",{children:["ID ",e,": ",n?"Used":"Not Used"]}),p.jsx("span",{className:"bl-text-xs md:bl-text-base bl-ml-1",children:n?`(${t})`:null})]}),ev=({value:e,used:t,checkList:n})=>t===void 0?p.jsx(Ma,{}):typeof t=="boolean"&&t===!1?p.jsx(Ma,{children:p.jsx(Uo,{token_id:e,used:t})}):p.jsx(Ma,{children:n.filter(r=>r.used).map(r=>p.jsx(Uo,{token_id:r.token_id,title:r.title,used:r.used},r.task_id))}),tv=()=>Un({mutationFn:async({tokenId:e})=>{try{const t="https://api-dev-rankinglist.bitlayer.org/chain-act",a=`https://bn-api.bitlayer.org/external/binance/v1/task/is_helmet_used?token_id=${e}`,i=await(await fetch(a)).json();if(i.code===0)return i.data;throw new Error(i.message)}catch(t){console.log(t)}}}),Ld="0x8b41E04e4de2E6D464bA5Bdb7CBed82226905a79",Dd="0x260Ac1A14a89Fd24c72B84092629F14964556299",Wo=({className:e})=>p.jsxs("div",{className:X("bl-relative bl-flex bl-flex-nowrap bl-w-18",e),children:[p.jsx(Vt,{className:"bl-w-4 bl-absolute bl-left-0",width:17,height:16}),p.jsx(Vt,{className:"bl-w-4 bl-absolute bl-left-3",width:17,height:16}),p.jsx(Vt,{className:"bl-w-4 bl-absolute bl-left-6",width:17,height:16}),p.jsx(Vt,{className:"bl-w-4 bl-absolute bl-left-9",width:17,height:16}),p.jsx(Vt,{className:"bl-w-4 bl-absolute bl-left-12",width:17,height:16}),p.jsx(Vt,{className:"bl-w-4 bl-absolute bl-left-15",width:17,height:16})]}),nv=()=>p.jsx("div",{className:"bl-w-full bl-h-[16px] bl-overflow-hidden",style:{WebkitMaskSize:"100% 100%",WebkitMaskImage:"linear-gradient(to right, transparent, #fff,  #aaa)"},children:p.jsxs(hy,{baseVelocity:100,transformX:[0,36],className:"bl-relative bl-text-primary",children:[p.jsx(Wo,{}),p.jsx(Wo,{})]})}),rv=({width:e})=>p.jsxs("div",{className:"bl-relative bl-w-[310px] md:bl-w-[615px] bl-overflow-hidden bl-pt-12",children:[p.jsx("div",{className:"bl-absolute -bl-z-10 bl-top-0 bl-left-0 bl-w-full bl-h-full bl-overflow-hidden bl-bg-gradient-to-b bl-from-[#311705]/80 bl-duration-200"}),p.jsx("div",{className:"bl-absolute bl-top-0 bl-bottom-0 bl-w-full bl-flex bl-items-center bl-justify-start",children:p.jsx("div",{className:"bl-bg-[#43220E] bl-w-[286px] md:bl-w-full  bl-h-[25px] bl-flex bl-items-center bl-mx-[10
51px] ",children:p.jsx("div",{className:"bl-h-[16px] bl-relative bl-flex bl-items-center",style:{width:e},children:p.jsx(nv,{})})})}),p.jsx(Et,{position:"tl",className:"bl-top-0 bl-left-0"}),p.jsx(Et,{position:"tr",className:"bl-top-0 bl-right-0"}),p.jsx(Et,{position:"bl",className:"bl-bottom-0 bl-left-0"}),p.jsx(Et,{position:"br",className:"bl-bottom-0 bl-right-0"})]}),av={href:"https://element.market/collections/bitlayer-lucky-helmet",logo:"/images/element-square.png",title:"Element"},sv=[{href:"https://www.okx.com/web3/marketplace/nft/collection/bitlayer/bitlayer-lucky-helmet/",logo:"/images/okx.svg",title:"OKX"},{href:"https://bitmagic.one/details/0x260Ac1A14a89Fd24c72B84092629F14964556299",logo:"/images/bitmagic.svg",title:"Bitmagic"},{href:"https://dapp.paddlefi.com/",logo:"/images/paddle.svg",title:"Paddle Finance"}];function i3(){const[e,t]=T.useState(!1),[n]=kp(by),r=Cl("(max-width: 640px)"),[a,s]=T.useState(!1),{address:i}=gs(),o=T.useRef(null);Df(),Xn();const[l,u]=T.useState(!1),[c,d]=T.useState(),[f,m]=T.useState(!1),[b,h]=T.useState(!1),{t:w}=vt(),y="pages.luckyhelmet",[,A]=zw({targetDate:c}),{days:v,hours:g,minutes:x,seconds:C}=A,I=Iy(),M=I.network==="testnet"?"bitlayer_testnet":"bitlayer_mainnet",R=I.network==="testnet"?Ld:Dd,O=Ko[M],N=T.useCallback(()=>u(!l),[l]);Np({chain:O});const{data:Q=0,refetch:D}=Tt({abi:Ut.abi,address:R,functionName:"totalSupply",args:[]}),{data:S}=Tt({abi:Ut.abi,address:R,functionName:"whitelistMintStartAt",args:[]}),{data:P}=Tt({abi:Ut.abi,address:R,functionName:"whitelistMintEndAt",args:[]}),{data:B=!1}=Tt({abi:Ut.abi,address:R,functionName:"isWhitelist",args:[i]}),{data:$=0}=Tt({abi:Ut.abi,address:R,functionName:"MaxSupply",args:[]}),{data:E=!1,refetch:j}=Tt({abi:Ut.abi,address:R,functionName:"minted",args:[Sp(i)]});T.useEffect(()=>{S&&d(Number(S)*1e3)},[S]);const F=gn(Number(P)*1e3).format("YYYY-MM-DD HH:mm:ss");gn(Number(S)*1e3).isAfter(gn()),gn(F).isBefore(gn())||Q===$&&Number($)>0,T.useEffect(()=>{const W=r?"https://prod.spline.design/T3dy7eto8AQ3WGWR/scene.splinecode":"https://prod.spline.design/iNyaYG4MqMw4Fmw1/scene.splinecode",_=document.getElementById("canvas3d");_&&new xy(_).load(W)},[r]);const V=()=>{o.current&&(e?(o.current.pause(),t(!1)):(o.current.play(),t(!0)))};return T.useEffect(()=>{E&&s(!1)},[E]),p.jsx(yy,{children:p.jsxs("section",{className:"bl-w-screen bl-min-h-[760px] bl-h-screen bl-relative bl-flex bl-flex-col bl-items-center bl-border-b-[1px] bl-border-[#363636]",children:[p.jsx("div",{className:"bl-absolute bl-left-0 -bl-z-10 bl-w-screen bl-h-screen bl-bg-cover",style:{backgroundImage:"url(/images/tracer/tracer_bg.gif)",backgroundPosition:"center",WebkitMaskSize:"100% 100%",WebkitMaskImage:"linear-gradient(180deg, #fff 73.35%, transparent 95.34%)"},children:p.jsx("audio",{src:"/music/Live-Gamer.mp3",loop:!0,ref:o,children:p.jsx("track",{kind:"captions",src:"",srcLang:"",label:""})})}),p.jsx("div",{className:"bl-z-10 bl-pt-[110px] md:bl-pt-0",children:p.jsx("canvas",{id:"canvas3d",className:""})}),n&&p.jsx(Wt.div,{initial:{opacity:0,y:100},animate:{opacity:1,y:0},transition:{duration:.5,delay:r?0:.3,type:"tween",stiffness:100},className:"bl-absolute bl-top-[300px] md:bl-top-[430px] bl-z-[1] bl-text-center bl-flex bl-flex-col bl-justify-center bl-items-center bl-cursor-pointer",children:p.jsx(my,{variant:"default",className:"bl-whitespace-nowrap bl-flex bl-flex-col bl-text-[46px] md:bl-text-[80px]",children:w(`${y}.title`)})}),p.jsxs("div",{className:"bl-absolute bl-bottom-[100px] md:bl-bottom-[120px] bl-z-[10] bl-text-center bl-flex bl-flex-col bl-justify-center bl-items-center",children:[p.jsx("div",{className:"bl-w-[338px] md:bl-w-[586px] bl-flex bl-justify-start",children:n&&p.jsx(Wt.div,{initial:{opacity:0,y:100},animate:{opacity:1,y:0},transition:{duration:.5,delay:r?.3:0,type:"tween",stiffness:100},children:p.jsx(Te,{className:"bl-w-[64px] md:bl-w-[84px] bl-h-[28px] md:bl-h-[38px] bl-mb-[10px] md:bl-mb-[98px] bl-bg-primary btn-mask bl-rounded btn-xs bl-scale-x-[-1] bl-flex bl-items-center bl-justify-center bl-group bl-cursor-pointer",onClick:V,children:p.jsx("div",{className:"bl-scale-x-[-1] bl-z-[-10] bl-flex",children:e?p.jsx(Hw,{className:"group-hover:bl-fill-white bl-fill-black bl-w-[22px] md:bl-w-[28px] bl-h-[22px] md:bl-h-[28px]"}):p.jsx(_w,{className:"group-hover:bl-fill-white bl-fill-black bl-w-[16px] md:bl-w-[20px] bl-h-[22px] md:bl-h-[28px]"})})})})}),n&&p.jsxs(Wt.div,{initial:{opacity:0,y:100}
51,animate:{opacity:1,y:0},transition:{duration:.5,delay:.6,type:"tween",stiffness:100},className:"bl-flex bl-flex-col bl-gap-2 bl-items-center md:bl-items-end",children:[p.jsxs(Te,{variant:"secondary",className:"bl-text-center bl-flex-col md:bl-flex-row bl-w-full bl-flex-center bl-whitespace-nowrap bl-normal-case md:bl-pt-[10px] bl-pt-[17px]",children:[p.jsxs(Te,{variant:"secondary",children:[p.jsx("span",{className:"bl-block md:bl-inline",children:w(`${y}.description`)}),p.jsx("a",{className:"bl-inline md:bl-inline bl-text-white bl-duration-200 hover:bl-text-primary",href:"https://medium.com/@Bitlayer/bitlayer-announces-the-launch-of-its-first-official-nft-following-mainnet-release-ae7412662b20",target:"_blank",rel:"noreferrer",children:w(`${y}.toGet`)})]}),p.jsxs("div",{className:"bl-inline-flex bl-ml-[10px] bl-pt-[10px] md:bl-pt-0",children:[p.jsx("a",{href:"https://twitter.com/BitLayerLabs",className:"hover:bl-text-primary",target:"_black",children:p.jsx(wy,{className:"bl-w-[19px] bl-h-[19px] md:bl-w-[19px] md:bl-h-[19px]",target:"_black",opacity:1})}),p.jsx("a",{href:"https://discord.gg/bitlayer",className:"hover:bl-text-primary",target:"_black",children:p.jsx(vy,{className:"bl-w-[26px] bl-h-[19px] md:bl-w-[26px] md:bl-h-[19px] bl-mx-[10px]",opacity:1})}),p.jsx("a",{href:"https://medium.com/@Bitlayer",className:"hover:bl-text-primary",target:"_black",children:p.jsx(Ay,{className:"bl-w-[34px] bl-h-[19px] md:bl-w-[34px] md:bl-h-[19px]",opacity:1})})]})]}),p.jsx(ae,{size:"xs",variant:"secondary",asChild:!0,children:p.jsxs("div",{children:[p.jsx("span",{className:"bl-pr-[14px] bl-block bl-text-black md:bl-inline",children:w(`${y}.finished`)}),p.jsx("span",{className:"bl-text-primary group-hover:bl-text-white",children:"5000"}),p.jsx("span",{className:"bl-text-black",children:"/5000"}),p.jsx("span",{className:"bl-pl-[6px] bl-block bl-text-black md:bl-inline",children:w(`${y}.minted`)})]})})]}),p.jsxs("div",{children:[p.jsx(Wt.div,{initial:{opacity:0,y:100},animate:{opacity:1,y:0},transition:{duration:.5,delay:.9},children:p.jsxs("div",{className:"bl-w-full bl-flex bl-flex-col md:bl-flex-row bl-items-center bl-justify-center bl-gap-10 bl-pt-8",children:[p.jsxs("div",{children:[p.jsx("div",{className:"bl-flex bl-w-full bl-items-center bl-justify-center",children:p.jsx("div",{className:"bl-w-[279px] bl-border bl-border-card-border bl-p-2 bl-items-center bl-justify-center bl-duration-200 hover:bl-border-primary",children:p.jsx("div",{className:"bl-text-2xl bl-text-primary",children:w(`${y}.trade`)})})}),p.jsx("div",{className:"bl-w-full bl-items-center bl-justify-center bl-flex bl-flex-col md:bl-flex-row bl-gap-4 md:bl-gap-8 bl-pt-8 md:bl-pt-4",children:[av].map((W,_)=>p.jsx("a",{href:W.href,target:"_blank",rel:"noreferrer",children:p.jsx(ae,{size:"md",variant:"secondary",asChild:!0,className:"bl-w-[150px] md:bl-w-[224px] md:bl-mt-[20px]",children:p.jsxs("div",{className:"bl-flex bl-flex-row bl-gap-3",children:[p.jsx("img",{src:W.logo,alt:W.title,className:"bl-min-0 bl-shrink-0 bl-w-[25px] md:bl-w-[30px]"}),p.jsx("div",{children:p.jsx("span",{className:"bl-text-sm md:bl-text-lg",children:W.title})})]})})},_))})]}),p.jsx("div",{className:"bl-w-full md:bl-w-[1px] bl-h-[1px] md:bl-h-[140px] bl-bg-[#B4BBCA]"}),p.jsxs("div",{children:[p.jsx("div",{className:"bl-flex bl-w-full bl-items-center bl-justify-center",children:p.jsx("div",{className:"bl-w-[315px] bl-border bl-border-card-border bl-p-2 bl-items-center bl-justify-center bl-duration-200 hover:bl-border-primary",children:p.jsx("div",{className:"bl-text-2xl bl-text-primary",children:"Binance Booster Campaign"})})}),p.jsx("div",{className:"bl-w-full bl-items-center bl-justify-center bl-flex bl-flex-col md:bl-flex-row bl-gap-4 md:bl-gap-8 bl-pt-8 md:bl-pt-4",children:p.jsx(Jw,{children:p.jsx(ae,{size:"md",variant:"secondary",asChild:!0,className:"bl-w-[150px] md:bl-w-[224px] md:bl-mt-[20px] bl-cursor-pointer",children:p.jsx("div",{className:"bl-flex bl-flex-row bl-gap-3",children:p.jsx("div",{children:p.jsx("span",{className:"bl-text-sm md:bl-text-lg",children:"Check"})})})})})})]})]})}),n&&p.jsxs(Wt.div,{initial:{opacity:0,y:100}
51,animate:{opacity:1,y:0},transition:{duration:.5,delay:.9},children:[p.jsx("div",{className:"bl-w-full bl-flex bl-justify-center bl-pt-[16px] md:bl-pt-[38px]",children:p.jsx(rv,{width:Number(Q)/Number($)*100+"%"})}),p.jsx("div",{className:"bl-flex bl-w-full bl-items-center bl-justify-center bl-pt-8",children:p.jsx("div",{className:"bl-w-[279px] bl-border bl-border-card-border bl-p-2 bl-items-center bl-justify-center bl-duration-200 hover:bl-border-primary",children:p.jsx("div",{className:"bl-text-2xl bl-text-primary",children:w(`${y}.trade`)})})}),p.jsx("div",{className:"bl-w-full bl-items-center bl-justify-center bl-flex bl-flex-col md:bl-flex-row bl-gap-4 md:bl-gap-8 bl-pt-8 md:bl-pt-4",children:sv.map((W,_)=>p.jsx("a",{href:W.href,target:"_blank",rel:"noreferrer",children:p.jsx(ae,{size:"md",variant:"secondary",asChild:!0,className:"bl-w-[150px] md:bl-w-[224px] md:bl-mt-[20px]",children:p.jsxs("div",{className:"bl-flex bl-flex-row bl-gap-3",children:[p.jsx("img",{src:W.logo,alt:W.title,className:"bl-min-0 bl-shrink-0 bl-w-[20px] md:bl-w-[25px]"}),p.jsx("div",{children:p.jsx("span",{className:"bl-text-sm md:bl-text-lg",children:W.title})})]})})},_))})]})]})]}),p.jsx(Xw,{open:l,close:N,isWhitelist:B,mintSuccess:f})]})})}function zd(e){if(e)return`${e.slice(0,4)}...${e.slice(-4)}`}const Qd=({icon:e,className:t})=>typeof e=="string"?p.jsx("img",{src:e,alt:"icon",className:t}):e?p.jsx(e,{className:t}):p.jsx(Hc,{className:t}),Vd=({className:e,...t})=>p.jsx(ae,{...t,variant:"dark2",type:"button",className:X("btn-xs bl-h-7 bl-text-base/none bl-min-w-52 md:bl-w-52 bl-py-0",e)}),Ud=({chain:e,title:t,description:n,onSuccess:r,close:a})=>{const{connect:s}=gv(),[i,o]=T.useState(""),l=$p(e.networkType),u=c=>{const{id:d,wallectConnectQRName:f,name:m}=c;Op(f||""),o(m),s(d,e.networkType,{chain:e,onSuccess:()=>{a(),r==null||r()},onSettled:()=>{o("")}})};return p.jsxs("div",{className:"bl-relative bl-w-72 bl-flex bl-flex-col bl-items-center",children:[p.jsx(Te,{variant:"dark",size:"none",className:"bl-text-2xl/9",children:t||p.jsx(mt,{i18nKey:"common.connect"})}),p.jsx(Te,{variant:"secondary",size:"sm",className:"bl-text-center bl-text-primary-foreground",children:n||p.jsx(mt,{i18nKey:"common.connectDesc"})}),p.jsx(nu,{autoHide:!1,className:"dialogScrollBar bl-w-[258px] sm:bl-w-72 bl-pl-6 bl-pr-5 bl-mt-4 bl-max-h-[210px]",children:l.map(c=>{const d=c.icon,f=c.name;return p.jsx(Vd,{onClick:()=>u(c),className:"bl-shrink-0",children:p.jsxs("div",{className:"bl-flex bl-w-full bl-h-full bl-pl-1 bl-items-center bl-justify-between",children:[p.jsx(d,{className:X("bl-size-4 bl-rounded-full bl-shrink-0",c.name==="MetaMask"?"bl-w-[14px] bl-h-5 bl-ml-[1px]":"")}),p.jsx("span",{className:"bl-w-full bl-h-4 bl-leading-[18px] bl-ml-3 bl-text-center",children:f}),p.jsx("span",{className:"bl-w-2 bl-h-6 bl-shrink-0",children:i===c.name&&p.jsx(Mr,{className:"bl-w-[14px] bl-animate-spin"})})]})},c.name)})})]})},o3=({chain:e,close:t})=>{const{ensure:n}=Gr(),r=async()=>{await n({chain:e}),t()};return p.jsxs("div",{className:"bl-relative bl-w-72 bl-flex bl-flex-col bl-items-center",children:[p.jsx(Te,{variant:"dark",size:"none",className:"bl-text-2xl/9",children:p.jsx(mt,{i18nKey:"common.switchChain",values:{chainName:e==null?void 0:e.name}})}),p.jsx(Te,{variant:"secondary",size:"sm",className:"bl-text-center bl-text-primary-foreground",children:p.jsx(mt,{i18nKey:"pages.bridge.switchChainDesc",values:{chainName:e.name,networkType:e.networkType}})}),p.jsx(ae,{size:"lg",variant:"dark2",className:"bl-h-10 bl-mt-8 bl-mb-8 hover:bl-border-primary",outlineClassName:"group-hover/button:bl-border-primary",type:"button",onClick:r,children:p.jsx("div",{children:p.jsx(mt,{i18nKey:"common.switchChain",values:{chainName:e==null?void 0:e.name}})})})]})},l3=({chain:e,children:t,title:n="Connect Wallet",description:r="Connect your wallet to transfer tokens"})=>{const{open:a}=Xn(),s=()=>{e&&a({content:({close:i})=>p.jsx(Ud,{title:n,description:r,chain:e,close:i})})};return p.jsx(op,{onClick:s,children:t})},hi=({className:e,children:t})=>p.jsx("div",{className:X("bl-flex bl-w-full bl-py-7 bl-border-b-2 bl-border-card-border last:bl-border-b-0",e),children:t}),iv=({link:e,className:t})=>{const n=e.icon;return p.jsx(_s,{asChild:!0,children:p.jsx(ae,{variant:"outline",overlayVariant:"secondary",className:"bl-h-20 bl-w-full bl-duration-200 hover:bl-border-primary hover:bl-text-black",outlineClassName:"bl-duration-200 group-hover/button:bl-border-primary",asChild:!0,children:p.jsx(bs,{to:e.link,children:p.jsxs("div",{className:"bl-space-y-2",children:[p.jsx(n,{className:"bl-size-6"}),p.jsx("div",{className:"bl-text-sm sm:bl-text-base",children:e.name})]})})})})},ov=({token:e})=>{const t=e.type==="native"?e.name:e.type;return p.jsx("div",{className:"bl-w-fit bl-text-primary bl-bg-primary/20 bl-text-sm/[18px] bl-px-2 bl-uppercase group-data-[highlighted]:bl-text-white",children:t})},lv=({balance:e,usdBalance:t,token:n})=>p.jsxs("div",{className:"bl-flex bl-items-center bl-justify-between bl-w-full bl-border-b bl-border-card-border bl-text-lg/none bl-py-5",children:[p.jsxs("div",{className:"bl-flex bl-items-center bl-gap-3.5",children:[p.jsx(gh,{token:n,className:"bl-size-8"}),p.jsxs("div",{className:"bl-space-y-1",children:[p.jsx("div",{children:n.name}),p.jsx(ov,{token:n})]})]}),p.jsxs("div",{className:"bl-text-right",children:[p.jsx("div",{children:mp(e==null?void 0:e.formatted)}),p.jsx("div",{className:"bl-text-base bl-text-[#515151]",children:bp(t)})]})]}),cv=({token:e,refetch:t})=>{const r=[Ld.toLowerCase(),Dd.toLowerCase()].includes(e.token_address.toLowerCase());return p.jsx(Uw,{token:e,disable:!r,refetch:t,children:p.jsxs("div",{className:"bl-w-1/2 bl-bg-black bl-h-[270px] bl-relative bl-group",children:[p.jsx("div",{className:"bl-w-full bl-h-48 bl-border bl-border-l-0 bl-border-card-border",children:p.jsx("img",{src:e.token_image,alt:"icon",className:"bl-w-full bl-h-full bl-object-scale-down"})}),p.jsxs("div",{className:"bl-py-3 bl-border-r bl-border-card-border bl-h-[62px]",children:[p.jsxs("div",{className:"bl-h-5 bl-pl-3",children:["#",e.token_id]}),p.jsx("div",{className:"bl-pl-3 bl-text-sm/5 bl-text-secondary",children:e.token_name})]}),r?p.jsx("div",{className:"bl-bg-[#F5F5F5] bl-h-[62px] bl-absolute bl-top-48 bl-left-0 bl-right-0 bl-hidden md:group-hover:bl-flex bl-transition-all bl-justify-center bl-items-center bl-text-black bl-text-base hover:bl-text-primary bl-cursor-pointer",children:"Transfer"}):null]})})},uv=({address:e,type:t,chain:n})=>{const{data:r,isLoading:a,refetch:s}=hh({address:e,type:t,chain:n});return a?p.jsx("div",{className:"bl-flex bl-justify-center bl-items-center bl-h-15 bl-mt-20",children:p.jsx(Mr,{className:"bl-w-10 bl-animate-spin"})}):r&&r.list?t===ft.NFT?r.list.length?p.jsx("div",{className:"bl-relative bl-mt-10",children:p.jsx("div",{className:"bl-absolute bl-w-[calc(100%+56px)] bl-overflow-y-auto bl-h-[calc(100vh-428px)] sm:bl-h-[calc(100vh-364px)] -bl-translate-x-7 bl-flex bl-flex-wrap",children:r.list.map(i=>p.jsx(cv,{token:i,refetch:s},i.token_id))})}):p.jsx(ay,{className:"bl-w-56 bl-h-12 bl-mt-28 bl-mx-auto",children:p.jsx(mt,{i18nKey:"navigation.walletDrawer.noNFT"})}):p.jsx("div",{className:X(t===ft.BTC?"":"bl-mt-5"),children:r.list.map(i=>p.jsx(lv,{usdBalance:i.usdBalance,balance:i.balance,token:i},i.asset_id))}):""},dv=({address:e,chain:t})=>{const[n,r]=T.useState("Token"),a=t.networkType===ze.evm;return p.jsxs(hi,{className:"bl-flex-col",children:[a&&p.jsxs("div",{className:"bl-flex bl-justify-between bl-gap-6",children:[p.jsx(ae,{variant:"outline",overlayVariant:"secondary",onClick:()=>r("Token"),className:X("bl-h-10 bl-w-full bl-duration-200 hover:bl-border-primary",n==="Token"?"bl-bg-white bl-text-black":""),outlineClassName:"bl-duration-200 group-hover/button:bl-border-primary",children:p.jsx("span",{children:"Token"})}),p.jsx(ae,{variant:"outline",overlayVariant:"secondary",onClick:()=>r("NFT"),className:X("bl-h-10 bl-w-full bl-duration-200 hover:bl-border-primary",n==="NFT"?"bl-bg-white bl-text-black":""),outlineClassName:"bl-duration-200 group-hover/button:bl-border-primary",children:p.jsx("span",{children:"NFT"})})]}),p.jsx(uv,{address:e,type:a?n==="NFT"?ft.NFT:ft.ERC20:ft.BTC,chain:t})]})},pv=()=>p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"bl-bg-background bl-fixed bl-w-full bl-z-50 bl-top-0 bl-left-0 bl-h-16 bl-pl-7 bl-flex bl-items-center sm:bl-hidden",children:p.jsxs(_s,{className:"bl-flex bl-w-full bl-items-center bl-gap-2 bl-text-secondary bl-text-lg",children:[p.jsx(gy,{className:"bl-size-3.5",strokeWidth:2}),"Return"]})}),p.jsx("div",{className:"bl-h-16 sm:bl-hidden"})]}),fv=()=>p.jsx(_s,{className:"bl-h-full bl-w-8 bl-border-x bl-border-card-border bl-justify-center bl-items-center bl-text-primary hover:bl-text-white hover:bl-bg-primary bl-duration-200 bl-hidden sm:bl-flex",children:p.jsx(Yb,{className:"bl-size-3 bl-rotate-180"})}),yv=({address:e,driver:t,chain:n,shouldSwitch:r=!0})=>{var w,y;const{copied:a,copy:s,reset:i}=Kb(e),{chainId:o}=ws({network:n.networkType}),{disconnect:l}=qb(),{ensure:u}=Gr(),c=()=>
51{l(n.networkType)},d=r&&n.chain.id!==o,f=()=>{s(),setTimeout(i,2e3)},m=()=>{u({chain:n})},b=`${(w=n.chain.blockExplorers)==null?void 0:w.default.url}/address/${e}`,h=(y=yt[t])==null?void 0:y.icon;return p.jsxs(hi,{className:"bl-justify-between",children:[p.jsxs("div",{className:"bl-flex bl-items-center bl-gap-2",children:[p.jsxs("div",{className:"bl-relative bl-size-[50px] bl-shrink-0",children:[p.jsx(Qd,{icon:n.icon,className:"bl-size-[50px]"}),p.jsx("div",{className:"bl-size-7 bl-flex bl-items-center bl-justify-center bl-absolute -bl-bottom-2 -bl-right-[10px] bl-bg-primary bl-rounded-full",children:h&&p.jsx(h,{className:"bl-size-5"})})]}),p.jsxs("div",{className:"bl-pl-3 bl-mt-2 bl-flex bl-flex-col bl-items-start bl-justify-between",children:[p.jsxs("div",{className:"bl-flex bl-items-center bl-justify-center",children:[p.jsx("a",{href:b,target:"_blank",rel:"noreferer noreferrer",className:" bl-text-xl/none hover:bl-text-primary",children:zd(e)}),p.jsx("button",{className:"hover:bl-text-white",onClick:f,children:a?p.jsx(eh,{className:"bl-size-4.5"}):p.jsx(th,{className:"bl-size-4.5"})})]}),p.jsx("button",{className:X("bl-text-indicator bl-cursor-pointer bl-text-left bl-leading-4 bl-mt-1",{"bl-text-button-error":d}),onClick:d?m:void 0,children:d?p.jsx(mt,{i18nKey:"navigation.walletDrawer.wrongNet",values:{chainName:n.name}}):n.name})]})]}),p.jsx(ae,{className:"bl-size-12 bl-rounded-full bl-border bl-border-primary bl-text-primary bl-text-2xl/none hover:bl-text-black bl-p-0 bl-bg-background",overlayVariant:"secondary",style:{WebkitMask:"none"},onClick:c,children:p.jsx(Tb,{className:"bl-size-5"})})]})},mv=({chain:e,address:t})=>{const{t:n}=vt(),r=[{name:n("common.bridge"),link:"/bridge",icon:Zb}];return p.jsxs(hi,{className:"bl-flex-col bl-justify-between bl-gap-3.5",children:[p.jsx("div",{className:"bl-text-[50px] bl-hidden"}),p.jsx("div",{className:"bl-grid bl-grid-cols-2 bl-gap-6",children:r.map((a,s)=>p.jsx(iv,{className:"bl-text-black bl-w-full",link:a},s))})]})};function c3({chain:e}){var o;const t=e.networkType,{t:n}=vt(),{address:r,driver:a}=ws({network:t}),{open:s}=Xn();if(!r){const l=()=>{s({content:({close:u})=>p.jsx(Ud,{title:n("common.connect"),description:n("common.connectDesc"),chain:e,close:u})})};return p.jsx(ae,{variant:"ghost",className:"bl-px-2 md:bl-px-3 bl-text-base/none bl-w-36 md:bl-w-44 md:bl-text-xl/none bl-h-7 md:bl-h-9",onClick:l,children:n("common.connect")})}const i=(o=yt[a])==null?void 0:o.icon;return p.jsx(bv,{address:r,chain:e,children:p.jsx(ae,{variant:"ghost",className:"bl-w-36 md:bl-w-44 bl-h-7 md:bl-h-9",children:p.jsxs("div",{className:"bl-flex bl-items-center bl-gap-2 md:bl-gap-3.5",children:[p.jsxs("div",{className:"bl-relative",children:[p.jsx("div",{className:"bl-size-6 bl-rounded-full",children:p.jsx(Qd,{icon:e.icon,className:"bl-size-6"})}),p.jsx("div",{className:"bl-absolute -bl-bottom-1 -bl-right-1 bl-size-3  bl-bg-primary bl-rounded-full",children:i&&p.jsx(i,{className:"bl-size-3"})})]}),p.jsx("span",{className:"bl-text-base/none md:bl-text-xl/none",children:zd(r)})]})})})}function bv({address:e,chain:t,children:n,shouldSwitch:r}){const a=t.networkType,{driver:s}=ws({network:a});return p.jsx(Wt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"bl-flex",children:p.jsxs(Vc,{direction:"right",shouldScaleBackground:!1,children:[p.jsx(Gb,{asChild:!0,children:n}),p.jsx(Uc,{children:p.jsxs(Gc,{className:"bl-fixed bl-bottom-0 bl-right-0 bl-h-dvh bl-w-[100vw] sm:bl-w-[26rem] bl-bg-background bl-border-l-card-border bl-flex-row",children:[p.jsx(fv,{}),p.jsxs("div",{className:"bl-grow bl-flex-1 bl-text-white bl-px-7 bl-relative bl-overflow-y-auto",children:[p.jsx(pv,{}),p.jsx(yv,{address:e,driver:s,chain:t,shouldSwitch:r}),p.jsx(mv,{address:e,chain:t}),p.jsx(dv,{address:e,chain:t})]})]})})]})})}const hv=T.forwardRef(({chain:e,onClick:t,children:n,...r},a)=>{const{ensure:s,isPending:i}=Gr(),o=async l=>{t?t(l):await s({chain:e})};return p.jsx(ae,{ref:a,onClick:o,...r,disabled:i,children:n||p.jsx(mt,{i18nKey:"common.switchChain",values:{chainName:e==null?void 0:e.name}})})});hv.displayName="SwitchChainButton";const Wd=({id:e,close:t})=>{const n=yt[e].name,r=yt[e].icon,a=()=>{t()};return p.jsxs("div",{className:"bl-w-72 bl-space-y-6",children:[p.jsxs(Te,{variant:"secondary",size:"sm",className:"bl-text-center bl-text-primary-foreground",children:["Looks like you don't have ",n," installed!"]}),p.jsx("div",{className:"bl-flex bl-justify-center",children:p.jsx(Vd,{onClick:a,asChild:!0,children:p.jsx("a",{target:"_blank",rel:"noreferrer",href:yt[e].website,children:p.jsxs("div",{className:"bl-flex bl-gap-2 bl-items-center",children:[p.jsx(r,{className:X("bl-size-4 bl-rounded-full bl-shrink-0",n==="MetaMask"?"bl-w-[14px] bl-h-5 bl-ml-[1px]":"")}),p.jsxs("span",{children:["Get ",n]})]})})})})]})};
51function gv(){const{connect:e}=hb(),{connectors:t,connect:n}=jp(),{ensure:r}=Gr(),{open:a}=Xn(),s=qo(),{connect:i,wallets:o}=Ab(),l=T.useCallback(c=>{a({content:({close:d})=>p.jsx(Wd,{id:c,close:d})})},[a]),u=T.useCallback(async(c,d,f)=>{var m,b,h,w,y,A;if(d===ze.btc){const v=t.find(g=>g.id.startsWith(c));if(!(v!=null&&v.installed))return l(c);await n(c,{onSuccess:async()=>{var g;(g=f.onSuccess)==null||g.call(f),await r({chain:f.chain})},onError:g=>{var x;console.warn("connect error",g),(x=f.onError)==null||x.call(f)},onSettled:()=>{var g;(g=f.onSettled)==null||g.call(f)}})}else if(d===ze.sui){const v=yt[c];if(!v.connectorId||!s.allAvailableWallets.some(g=>g.name===v.connectorId))return l(c);try{await s.select(v.connectorId),(m=f.onSuccess)==null||m.call(f)}catch(g){console.error("sui connect error",g),(b=f.onError)==null||b.call(f)}finally{(h=f.onSettled)==null||h.call(f)}}else if(d===ze.solana){const v=yt[c];if(!v.connectorId)return l(c);const g=o.installed.find(x=>x.adapter.name===v.connectorId);if(!g)return l(c);try{await i(g.adapter.name),(w=f.onSuccess)==null||w.call(f)}catch(x){console.error("solana connect error",x),(y=f.onError)==null||y.call(f)}finally{(A=f.onSettled)==null||A.call(f)}}else{const v=Fp(),g=v.find(x=>x.id.startsWith(c));if(console.log("connectors",{connector:g,connectors:v,connectorId:c}),!g)return l(c);e({chainId:f.chain.chain.id,connector:g},{onSuccess:async()=>{var x;(x=f.onSuccess)==null||x.call(f),f.chain&&await r({chain:f.chain})},onError:async x=>{var C,I;x instanceof Ho?(console.warn("wallet already connected"),(C=f.onSuccess)==null||C.call(f),f.chain&&await r({chain:f.chain})):x.message.includes("Provider not found")?l(c):(console.warn("connect error",x),(I=f.onError)==null||I.call(f))},onSettled:()=>{var x;(x=f.onSettled)==null||x.call(f)}})}},[n,t,e,r,l]);return{wallets:yt,connect:u}}const Mt=({link:e})=>{const{t}=vt(),n=e.icon;return p.jsxs("div",{className:"bl-flex bl-items-center bl-pr-4 md:bl-pr-0 bl-justify-between bl-w-full bl-text-lg/5 bl-font-normal bl-flex-1 bl-overflow-hidden",children:[p.jsxs("div",{className:X("bl-flex bl-items-center bl-gap-2 bl-whitespace-nowrap bl-w-[86%]",e.className),children:[e.hint?p.jsxs("div",{className:"bl-space-y-0.5 bl-w-full",children:[p.jsx("div",{children:t(e.name)}),p.jsx("div",{className:"bl-text-sm/none bl-text-[#4A4A4A] bl-w-full bl-overflow-scroll md:bl-overflow-hidden",children:p.jsx("div",{children:t(e.hint)})})]}):t(e.name),e.coming&&p.jsx("div",{className:"bl-opacity-0 bl-whitespace-nowrap bl-duration-200 group-hover:bl-opacity-100",children:p.jsx("span",{className:"bl-text-sm/none bl-text-[#4A4A4A] bl-w-fit",children:"Coming soon"})})]}),n&&p.jsx(n,{className:"bl-size-5 bl-min-w-0 bl-shrink-0"})]})},Gd=L.forwardRef(({link:e,...t},n)=>{const{t:r}=vt();return e.link?p.jsx(ae,{ref:n,overlayFrom:"left",asChild:!0,...t,children:e.link.startsWith("http")?p.jsx("a",{className:"bl-inline-flex bl-w-full bl-items-center bl-justify-between",href:e.link,target:"_blank",rel:"noreferrer",children:p.jsx(Mt,{link:e})}):p.jsx(bs,{to:e.link,target:e!=null&&e.isBlank?"_blank":"_self",rel:"noreferrer",children:p.jsx(Mt,{link:e})})}):e.anchor?p.jsx(ae,{ref:n,overlayFrom:"left",asChild:!0,...t,onClick:()=>{setTimeout(()=>{window.location.href=window.location.origin+e.anchor},500)},children:p.jsx("a",{className:"bl-inline-flex bl-w-full bl-items-center bl-justify-between",href:e.anchor,children:p.jsx(Mt,{link:e})})}):p.jsx(ae,{ref:n,overlayFrom:"left",asChild:!0,onClick:a=>a.stopPropagation(),...t,children:p.jsxs("div",{className:"bl-inline-flex bl-w-full bl-items-center bl-justify-between bl-cursor-pointer",children:[p.jsx("span",{children:r(e.name)}),e.coming&&p.jsx(Te,{variant:"default",size:"md",className:"bl-ml-2",children:"Coming soon"})]})})});Gd.displayName="LinkButton";const wv=({link:e,linkComponent:t})=>{var a;const n=t||Hd,r=X("bl-w-full bl-flex bl-justify-between bl-text-lg/none md:bl-text-xl/none bl-text-black bl-cursor-pointer","bl-duration-200 hover:bl-text-white bl-group bl-py-4","bl-text-left");return e.render?p.jsx(n,{asChild:!0,children:e.render({name:e.name,link:e.link,className:r})}):(a=e.link)!=null&&a.startsWith("http")?p.jsx(n,{asChild:!0,children:p.jsx("a",{href:e.link,className:r,target:"_blank",rel:"noreferrer",children:p.jsx(Mt,{link:e})})}):e.link?p.jsx(n,{asChild:!0,children:p.jsx(bs,{to:e.link,className:r,children:p.jsx(Mt,{link:e})})}):p.jsx("button",{className:r,onClick:s=>s.stopPropagation(),children:p.jsx(Mt,{link:e})})},Hd=({children:e})=>p.jsx(p.Fragment,{children:e}),vv=({isActive:e,index:t,link:n,onMouseHover:r,showOrder:a=!0,showSubOrder:s=!1,linkComponent:i})=>{var w,y,A;const{t:o}=vt(),l=Cl("(max-width: 640px)"),u=i||Hd,c=(t+1).toString().padStart(2,"0"),d=(w=n==null?void 0:n.children)==null?void 0:w.some(v=>v.type),f=(y=n==null?void 0:n.children)==null?void 0:y.filter(v=>v.type),m=f==null?void 0:f.filter(v=>v.type==="product"),b=f==null?void 0:f.filter(v=>v.type==="innovation");if(!n.children){const v="bl-w-full bl-h-10 md:bl-h-12 bl-justify-start bl-text-black bl-flex-nowrap bl-text-lg/none md:bl-text-xl/none";return p.jsx(u,{asChild:!0,children:p.jsxs("div",{className:"bl-border-b bl-border-primary-divider bl-py-2.5 bl-flex bl-gap-4 bl-items-center last:bl-border-b-0",children:[a&&!n.hideOrder&&p.jsx(Te,{variant:"dark",size:"md",className:"w-6",children:c}),typeof n.render=="function"?n.render({name:n.name,link:n.link,className:v}):p.jsx(Gd,{className:v,link:n,onMouseOver:()=>r==null?void 0:r(t)})]},t)})}const h=(A=n.children)==null?void 0:A.some(v=>{var g;return(g=v.children)==null?void 0:g.length});return p.jsxs(cp,{value:n.name,className:"bl-border-b bl-border-primary-divider last:bl-border-b-0",children:[p.jsx(up,{className:"bl-w-full",asChild:!0,onClick:v=>v.stopPropagation(),onMouseOver:()=>r==null?void 0:r(t),children:p.jsxs("div",{className:"bl-py-2.5 bl-flex bl-gap-4",children:[a&&!n.hideOrder&&p.jsx(Te,{variant:"dark",size:"md",className:"bl-w-6 bl-font-normal bl-py-2",children:c}),p.jsx(ae,{className:X("bl-w-full bl-justify-start bl-text-black bl-flex-nowrap md:bl-px-4",{"bl-text-white":e}),overlayFrom:"left",keepOverlay:e,size:l?"default":"lg",children:p.jsxs("div",{className:"bl-w-full bl-flex bl-justify-between bl-items-center bl-text-lg/none md:bl-text-xl/none bl-text-left",children:[p.jsx(Mt,{link:n}),p.jsx(kl,{className:X("bl-w-5 bl-h-5 bl-duration-200",{"bl-rotate-180":e})})]})})]})}),p.jsx(dp,{className:"bl-pb-0",children:p.jsx("div",{className:X("bl-w-full bl-flex bl-flex-col bl-pl-6 md:bl-pl-12",{"bl-pl-12":a}),children:h?p.jsx(Av,{links:n.children,defaultValue:n.default,showOrder:!0}):n.children.map((v,g)=>{var C,I;const x=(g+1).toString().padStart(2,"0");return p.jsxs("div",{children:[((C=m==null?void 0:m[0])==null?void 0:C.name)===v.name&&p.jsxs("div",{className:"bl-h-[48px] bl-border-b bl-border-primary-divider bl-flex bl-font-bold bl-items-center bl-justify-start bl-gap-5 bl-text-lg bl-text-black",children:[p.jsx("span",{className:"bl-font-normal",children:"01"}),p.jsx("span",{children:o("navigation.links.product")})]}),((I=b==null?void 0:b[0])==null?void 0:I.name)===v.name&&p.jsxs("div",{className:"bl-h-[48px] bl-border-b bl-border-primary-divider bl-font-bold bl-flex bl-items-center bl-justify-start bl-gap-5 bl-text-lg bl-text-black",children:[p.jsx("span",{className:"bl-font-normal",children:"02"}),p.jsx("span",{children:o("navigation.links.innovation")})]}),p.jsxs("div",{className:X("bl-w-full bl-flex bl-items-center bl-gap-3 bl-border-b bl-border-primary-divider last:bl-border-b-0 md:bl-pl-2 md:bl-pr-4 bl-text-left",{"bl-pl-10":d&&l}),children:[s&&!v.hideOrder&&p.jsx(Te,{variant:"dark",size:"md",className:"w-6",children:x}),p.jsx(wv,{link:v,linkComponent:i})]})]},g)})})})]})},Av=({links:e,value:t,defaultValue:n,onValueChange:r,onMouseHoverItem:a,onClick:s,showOrder:i=!0,showSubOrder:o=!1,linkComponent:l})=>{const[u,c]=T.useState(n),d=f=>{c(f),r==null||r(f)};return T.useEffect(()=>{t&&c(t)},[t,c]),p.jsx(lp,{type:"single",collapsible:!0,className:"bl-w-full",value:u,defaultValue:n,onValueChange:d,onClick:s,children:e.map((f,m)=>p.jsx(vv,{index:m,link:f,isActive:u===f.name,onMouseHover:a,showOrder:i,showSubOrder:o,linkComponent:l},m))})},xv=L.forwardRef(({name:e,className:t,chain:n},r)=>{const{t:a}=vt(),s=Bc(),{open:i}=Xn(),o=Lp.MetaMask,l=async()=>{var d,f;const u=s.find(m=>m.id.startsWith(o));if(!u)return i({content:({close:m})=>p.jsx(Wd,{id:o,close:m})});(await u.getProvider()).request({method:"wallet_addEthereumChain",params:[{chainId:`0
51x${n.id.toString(16)}`,chainName:n.name,nativeCurrency:n.nativeCurrency,rpcUrls:n.rpcUrls.default.http,blockExplorerUrls:[(d=n.blockExplorers)==null?void 0:d.default.url],iconUrls:(f=n.custom)==null?void 0:f.iconUrls}]})};return p.jsxs("button",{className:t,onClick:l,ref:r,children:[p.jsx("span",{className:"bl-whitespace-nowrap",children:a(e)}),p.jsx(Dp,{className:"bl-min-w-0 bl-shrink-0"})]})});xv.displayName="AddTestNetLink";const u3=({children:e})=>{const[t,n]=T.useState(null),[r,a]=T.useState(!1);return p.jsx(zp.Provider,{value:{widget:t,setWidget:n,pinned:r,setPinned:a},children:e})};export{Pw as $,D8 as A,k as B,eh as C,B5 as D,on as E,V8 as F,Cb as G,u3 as H,Z6 as I,nt as J,Wr as K,ew as L,J5 as M,Sn as N,i3 as O,Zi as P,a3 as Q,Kw as R,th as S,gh as T,Gr as U,zw as V,l3 as W,qb as X,s3 as Y,Nw as Z,c3 as _,Vd as a,kw as a0,jw as a1,n3 as a2,Vc as a3,Gb as a4,Uc as a5,Gc as a6,Av as a7,r3 as a8,Sw as a9,$w as aa,Bc as ab,Wd as ac,zd as ad,o3 as ae,e3 as af,G8 as ag,W8 as ah,_8 as ai,X8 as aj,Y8 as ak,K8 as al,J8 as am,H8 as an,Z8 as ao,q8 as ap,ya as aq,bv as ar,ih as as,j8 as at,Xn as b,Ud as c,Yb as d,hv as e,Qd as f,tt as g,We as h,Xr as i,Zr as j,L8 as k,F8 as l,jn as m,qr as n,xr as o,G6 as p,U8 as q,Pc as r,Cr as s,ai as t,Kb as u,_g as v,Wu as w,ln as x,o2 as y,yr as z};

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.