1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="4fba8cc9-6763-77a1-8f74-27029caad39e")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,524928,e=>{"use strict";var t=e.i(693109);class r extends t.BaseError{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class n extends t.BaseError{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}e.s(["AccountNotFoundError",0,r,"AccountTypeNotSupportedError",0,n])},333425,61551,e=>{"use strict";var t=e.i(693109);class r extends t.BaseError{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}e.s(["InvalidDecimalNumberError",0,r],61551),e.s(["parseUnits",0,function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new r({value:e});let[n,s="0"]=e.split("."),i=n.startsWith("-");if(i&&(n=n.slice(1)),s=s.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${s}`))&&(n=`${BigInt(n)+1n}`),s="";else if(s.length>t){let[e,r,i]=[s.slice(0,t-1),s.slice(t-1,t),s.slice(t)],a=Math.round(Number(`${r}.${i}`));(s=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`).length>t&&(s=s.slice(1),n=`${BigInt(n)+1n}`),s=s.slice(0,t)}else s=s.padEnd(t,"0");return BigInt(`${i?"-":""}${n}${s}`)}],333425)},680534,323645,800133,e=>{"use strict";var t=e.i(958008),r=e.i(524928),n=e.i(693109),s=e.i(703035),i=e.i(818666);function a({chain:e,currentChainId:t}){if(!e)throw new i.ChainNotFoundError;if(t!==e.id)throw new i.ChainMismatchError({chain:e,currentChainId:t})}e.s(["assertCurrentChain",0,a],323645);var o=e.i(157104),c=e.i(396758),u=e.i(178350);function l(e,{docsPath:t,...r}){let n,s=(n=(0,u.getNodeError)(e,r))instanceof o.UnknownNodeError?e:n;return new c.TransactionExecutionError(s,{docsPath:t,...r})}e.s(["getTransactionError",0,l],800133);var d=e.i(841381),h=e.i(103806),p=e.i(769598),f=e.i(102302),y=e.i(650084),g=e.i(996544),m=e.i(163547),v=e.i(481279);let b=new f.LruMap(128);async function w(e,i){let{account:o=e.account,chain:c=e.chain,accessList:u,authorizationList:f,blobs:w,data:C,gas:S,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:A,nonce:I,type:O,value:x,...P}=i;if(void 0===o)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});let F=o?(0,t.parseAccount)(o):null;try{(0,y.assertRequest)(i);let t=await (async()=>i.to?i.to:null!==i.to&&f&&f.length>0?await (0,s.recoverAuthorizationAddress)({authorization:f[0]}).catch(()=>{throw new n.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(F?.type==="json-rpc"||null===F){let r;null!==c&&(r=await (0,p.getAction)(e,g.getChainId,"getChainId")({}),a({currentChainId:r,chain:c}));let n=e.chain?.formatters?.transactionRequest?.format,s=(n||h.formatTransactionRequest)({...(0,d.extract)(P,{format:n}),accessList:u,authorizationList:f,blobs:w,chainId:r,data:C,from:F?.address,gas:S,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:A,nonce:I,to:t,type:O,value:x}),i=b.get(e.uid);try{return await e.request({method:i?"wallet_sendTransaction":"eth_sendTransaction",params:[s]},{retryCount:0})}catch(t){if(!1===i)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[s]},{retryCount:0}).then(t=>(b.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw b.set(e.uid,!1),t;throw r});throw t}}if(F?.type==="local"){let r=await (0,p.getAction)(e,m.prepareTransactionRequest,"prepareTransactionRequest")({account:F,accessList:u,authorizationList:f,blobs:w,chain:c,data:C,gas:S,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:T,maxPriorityFeePerGas:A,nonce:I,nonceManager:F.nonceManager,parameters:[...m.defaultParameters,"sidecars"],type:O,value:x,...P,to:t}),n=c?.serializers?.transaction,s=await F.signTransaction(r,{serializer:n});return await (0,p.getAction)(e,v.sendRawTransaction,"sendRawTransaction")({serializedTransaction:s})}if(F?.type==="smart")throw new r.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new r.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:F?.type})}catch(e){if(e instanceof r.AccountTypeNotSupportedError)throw e;throw l(e,{...i,account:F,chain:i.chain||void 0})}}e.s(["sendTransaction",0,w],680534)},148933,e=>{"use strict";var t=e.i(958008),r=e.i(524928),n=e.i(724016),s=e.i(140488),i=e.i(769598),a=e.i(680534);async function o(e,o){let{abi:c,account:u=e.account,address:l,args:d,dataSuffix:h,functionName:p,...f}=o;if(void 0===u)throw new r.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});let y=u?(0,t.parseAccount)(u):null,g=(0,n.encodeFunctionData)({abi:c,args:d,functionName:p});try{return await (0,i.getAction)(e,a.sendTransaction,"sendTransaction")({data:`${g}${h?h.replace("0x",""):""}`,to:l,account:y,...f})}catch(e){throw(0,s.getContractError)(e,{abi:c,address:l,args:d,docsPath:"/docs/contract/writeContract",functionName:p,sender:y?.address})}}e.s(["writeContract",0,o])},13896,e=>{"use strict";var t=e.i(134820);async function r(e,{chain:n}){let{id:s,name:i,nativeCurrency:a,rpcUrls:o,blockExplorers:c}=n;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,t.numberToHex)(s),chainName:i,nativeCurrency:a,rpcUrls:o.default.http,blockExplorerUrls:c?Object.values(c).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})}e.s(["addChain",0,r])},376436,925156,e=>{"use strict";var t=e.i(601236),r=e.i(680534);e.s(["deployContract",0,function(e,n){let{abi:s,args:i,bytecode:a,...o}=n,c=(0,t.encodeDeployData)({abi:s,args:i,bytecode:a});return(0,r.sendTransaction)(e,{...o,...o.authorizationList?{to:null}:{},data:c})}],376436);var n=e.i(62883);async function s(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,n.checksumAddress)(e))}e.s(["getAddresses",0,s],925156)},971089,623206,e=>{"use strict";var t=e.i(617799),r=e.i(544423),n=e.i(440681),s=e.i(809766),i=e.i(958008),a=e.i(693109),o=e.i(996586),c=e.i(724016),u=e.i(65985),l=e.i(134820),d=e.i(800133),h=e.i(680534);let p="0x5792579257925792579257925792579257925792579257925792579257925792",f=(0,l.numberToHex)(0,{size:32});async function y(e,t){let{account:r=e.account,capabilities:s,chain:y=e.chain,experimental_fallback:g,experimental_fallbackDelay:m=32,forceAtomic:v=!1,id:b,version:w="2.0.0"}=t,C=r?(0,i.parseAccount)(r):null,S=t.calls.map(e=>{let t=e.abi?(0,c.encodeFunctionData)({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&t?(0,u.concat)([t,e.dataSuffix]):t,to:e.to,value:e.value?(0,l.numberToHex)(e.value):void 0}});try{let t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:v,calls:S,capabilities:s,chainId:(0,l.numberToHex)(y.id),from:C?.address,id:b,version:w}]},{retryCount:0});if("string"==typeof t)return{id:t};return t}catch(r){if(g&&("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name||"UnknownRpcError"===r.name||r.details.toLowerCase().includes("does not exist / is not available")||r.details.toLowerCase().includes("missing or invalid. request()")||r.details.toLowerCase().includes("did n
2ot match any variant of untagged enum")||r.details.toLowerCase().includes("account upgraded to unsupported contract")||r.details.toLowerCase().includes("eip-7702 not supported")||r.details.toLowerCase().includes("unsupported wc_ method"))){if(s&&Object.values(s).some(e=>!e.optional)){let e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new o.UnsupportedNonOptionalCapabilityError(new a.BaseError(e,{details:e}))}if(v&&S.length>1){let e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new o.AtomicityNotSupportedError(new a.BaseError(e,{details:e}))}let t=[];for(let r of S){let s=(0,h.sendTransaction)(e,{account:C,chain:y,data:r.data,to:r.to,value:r.value?(0,n.hexToBigInt)(r.value):void 0});t.push(s),m>0&&await new Promise(e=>setTimeout(e,m))}let r=await Promise.allSettled(t);if(r.every(e=>"rejected"===e.status))throw r[0].reason;let i=r.map(e=>"fulfilled"===e.status?e.value:f);return{id:(0,u.concat)([...i,(0,l.numberToHex)(y.id,{size:32}),p])}}throw(0,d.getTransactionError)(r,{...t,account:C,chain:t.chain})}}async function g(e,i){let a;async function o(s){if(s.endsWith(p.slice(2))){let i=(0,r.trim)((0,t.sliceHex)(s,-64,-32)),a=(0,t.sliceHex)(s,0,-64).slice(2).match(/.{1,64}/g),o=await Promise.all(a.map(t=>f.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:[`0x${t}`]},{dedupe:!0}):void 0)),c=o.some(e=>null===e)?100:o.every(e=>e?.status==="0x1")?200:o.every(e=>e?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,n.hexToNumber)(i),receipts:o.filter(Boolean),status:c,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[s]})}let{atomic:c=!1,chainId:u,receipts:l,version:d="2.0.0",...h}=await o(i.id),[y,g]=(a=h.status)>=100&&a<200?["pending",a]:a>=200&&a<300?["success",a]:a>=300&&a<700?["failure",a]:"CONFIRMED"===a?["success",200]:"PENDING"===a?["pending",100]:[void 0,a];return{...h,atomic:c,chainId:u?(0,n.hexToNumber)(u):void 0,receipts:l?.map(e=>({...e,blockNumber:(0,n.hexToBigInt)(e.blockNumber),gasUsed:(0,n.hexToBigInt)(e.gasUsed),status:s.receiptStatuses[e.status]}))??[],statusCode:g,status:y,version:d}}e.s(["fallbackMagicIdentifier",0,p,"fallbackTransactionErrorMagicIdentifier",0,f,"sendCalls",0,y],623206),e.s(["getCallsStatus",0,g],971089)},727531,172119,921528,97895,95587,451946,103577,e=>{"use strict";var t=e.i(958008),r=e.i(134820);async function n(e,s={}){let{account:i=e.account,chainId:a}=s,o=i?(0,t.parseAccount)(i):void 0,c=a?[o?.address,[(0,r.numberToHex)(a)]]:[o?.address],u=await e.request({method:"wallet_getCapabilities",params:c}),l={};for(let[e,t]of Object.entries(u))for(let[r,n]of(l[Number(e)]={},Object.entries(t)))"addSubAccount"===r&&(r="unstable_addSubAccount"),l[Number(e)][r]=n;return"number"==typeof a?l[a]:l}async function s(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}e.s(["getCapabilities",0,n],727531),e.s(["getPermissions",0,s],172119);var i=e.i(524928),a=e.i(329397),o=e.i(769598),c=e.i(996544),u=e.i(449197);async function l(e,r){let{account:n=e.account,chainId:s,nonce:l}=r;if(!n)throw new i.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});let d=(0,t.parseAccount)(n),h=(()=>
2{if(r.executor)return"self"===r.executor?r.executor:(0,t.parseAccount)(r.executor)})(),p={address:r.contractAddress??r.address,chainId:s,nonce:l};return void 0===p.chainId&&(p.chainId=e.chain?.id??await (0,o.getAction)(e,c.getChainId,"getChainId")({})),void 0===p.nonce&&(p.nonce=await (0,o.getAction)(e,u.getTransactionCount,"getTransactionCount")({address:d.address,blockTag:"pending"}),("self"===h||h?.address&&(0,a.isAddressEqual)(h.address,d.address))&&(p.nonce+=1)),p}e.s(["prepareAuthorization",0,l],921528);var d=e.i(62883);async function h(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(e=>(0,d.getAddress)(e))}async function p(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function f(e,t){let{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}async function y(e,r){let{account:n=e.account}=r;if(!n)throw new i.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});let s=(0,t.parseAccount)(n);if(!s.signAuthorization)throw new i.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:s.type});let a=await l(e,r);return s.signAuthorization(a)}e.s(["requestAddresses",0,h],97895),e.s(["requestPermissions",0,p],95587),e.s(["showCallsStatus",0,f],451946),e.s(["signAuthorization",0,y],103577)},474374,e=>{"use strict";var t=e.i(958008),r=e.i(524928),n=e.i(134820);async function s(e,{account:i=e.account,message:a}){if(!i)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});let o=(0,t.parseAccount)(i);if(o.signMessage)return o.signMessage({message:a});let c="string"==typeof a?(0,n.stringToHex)(a):a.raw instanceof Uint8Array?(0,n.toHex)(a.raw):a.raw;return e.request({method:"personal_sign",params:[c,o.address]},{retryCount:0})}e.s(["signMessage",0,s])},929542,58204,28102,e=>{"use strict";var t=e.i(958008),r=e.i(524928),n=e.i(323645),s=e.i(134820),i=e.i(103806),a=e.i(769598),o=e.i(650084),c=e.i(996544);async function u(e,u){let{account:l=e.account,chain:d=e.chain,...h}=u;if(!l)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});let p=(0,t.parseAccount)(l);(0,o.assertRequest)({account:p,...u});let f=await (0,a.getAction)(e,c.getChainId,"getChainId")({});null!==d&&(0,n.assertCurrentChain)({currentChainId:f,chain:d});let y=d?.formatters||e.chain?.formatters,g=y?.transactionRequest?.format||i.formatTransactionRequest;return p.signTransaction?p.signTransaction({...h,chainId:f},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...g(h),chainId:(0,s.numberToHex)(f),from:p.address}]},{retryCount:0})}e.s(["signTransaction",0,u],929542);var l=e.i(29818);async function d(e,n){let{account:s=e.account,domain:i,message:a,primaryType:o}=n;if(!s)throw new r.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});let c=(0,t.parseAccount)(s),u={EIP712Domain:(0,l.getTypesForEIP712Domain)({domain:i}),...n.types};if((0,l.validateTypedData)({domain:i,message:a,primaryType:o,types:u}),c.signTypedData)return c.signTypedData({domain:i,message:a,primaryType:o,types:u});let d=(0,l.serializeTypedData)({domain:i,message:a,primaryType:o,types:u});return e.request({method:"eth_signTypedData_v4",params:[c.address,d]},{retryCount:0})}async function h(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.numberToHex)(t)}]},{retryCount:0})}e.s(["signTypedData",0,d],58204),e.s(["switchChain",0,h],28102)},898734,e=>{"use strict";var t=e.i(693109),r=e.i(194117),n=e.i(335244),s=e.i(486108),i=e.i(342220),a=e.i(971089);async function o(e,t){let o,{id:u,pollingInterval:l=e.pollingInterval,status:d=({statusCode:e})=>e>=200,timeout:h=6e4}=t,p=(0,i.stringify)(["waitForCallsStatus",e.uid,u]),{promise:f,resolve:y,reject:g}=(0,s.withResolvers)(),m=(0,r.observe)(p,{resolve:y,reject:g},t=>{let r=(0,n.poll)(async()=>{let n=e=>{clearTimeout(o),r(),e(),m()};try{let r=await (0,a.getCallsStatus)(e,{id:u});if(!d(r))return;n(()=>t.resolve(r))}catch(e){n(()=>t.reject(e))}},{interval:l,emitOnBegin:!0});return r});return o=h?setTimeout(()=>{m(),clearTimeout(o),g(new c({id:u}))},h):void 0,await f}class c extends t.BaseError{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}e.s(["WaitForCallsStatusTimeoutError",0,c,"waitForCallsStatus",0,o])},326476,e=>{"use strict";async function t(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}e.s(["watchAsset",0,t])},733956,e=>{"use strict";var t=e.i(996544),r=e.i(13896),n=e.i(376436),s=e.i(925156),i=e.i(971089),a=e.i(727531),o=e.i(172119),c=e.i(921528),u=e.i(163547),l=e.i(97895),d=e.i(95587),h=e.i(623206),p=e.i(481279),f=e.i(680534),y=e.i(451946),g=e.i(103577),m=e.i(474374),v=e.i(929542),b=e.i(58204),w=e.i(28102),C=e.i(898734),S=e.i(326476),E=e.i(148933);e.s(["walletActions",0,function(e){return{addChain:t=>(0,r.addChain)(e,t),deployContract:t=>(0,n.deployContract)(e,t),getAddresses:()=>(0,s.getAddresses)(e),getCallsStatus:t=>(0,i.getCallsStatus)(e,t),getCapabilities:t=>(0,a.getCapabilities)(e,t),getChainId:()=>(0,t.getChainId)(e),getPermissions:()=>(0,o.getPermissions)(e),prepareAuthorization:t=>(0,c.prepareAuthorization)(e,t),prepareTransactionRequest:t=>(0,u.prepareTransactionRequest)(e,t),requestAddresses:()=>(0,l.requestAddresses)(e),requestPermissions:t=>(0,d.requestPermissions)(e,t),sendCalls:t=>(0,h.sendCalls)(e,t),sendRawTransaction:t=>(0,p.sendRawTransaction)(e,t),sendTransaction:t=>(0,f.sendTransaction)(e,t),showCallsStatus:t=>(0,y.showCallsStatus)(e,t),signAuthorization:t=>(0,g.signAuthorization)(e,t),signMessage:t=>(0,m.signMessage)(e,t),signTransaction:t=>(0,v.signTransaction)(e,t),signTypedData:t=>(0,b.signTypedData)(e,t),switchChain:t=>(0,w.switchChain)(e,t),waitForCallsStatus:t=>(0,C.waitForCallsStatus)(e,t),watchAsset:t=>(0,S.watchAsset)(e,t),writeContract:t=>(0,E.writeContract)(e,t)}}])},347970,e=>{"use strict";var t=e.i(270887);e.s(["custom",0,function(e,r={}){let{key:n="custom",methods:s,name:i="Custom Provider",retryDelay:a}=r;return({retryCount:o})=>(0,t.createTransport)({key:n,methods:s,name:i,request:e.request.bind(e),retryCount:r.retryCount??o,retryDelay:a,type:"custom"})}])},405944,205241,213029,643141,383051,e=>{"use strict";var t,r,n=e.i(975705);let s=!1;async function i(e,t={}){let r;if(s)return[];s=!0,e.setState(e=>({...e,status:e.current?"reconnecting":"connecting"}));let n=[];if(t.connectors?.length)for(let r of t.connectors){let t;t="function"==typeof r?e._internal.connectors.setup(r):r,n.push(t)}else n.push(...e.connectors);try{r=await e.storage?.getItem("recentConnectorId")}catch{}let a={};for(let[,t]of e.state.connections)a[t.connector.id]=1;r&&(a[r]=0);let o=Object.keys(a).length>0?[...n].sort((e,t)=>
2(a[e.id]??10)-(a[t.id]??10)):n,c=!1,u=[],l=[];for(let t of o){let r=await t.getProvider().catch(()=>void 0);if(!r||l.some(e=>e===r)||!await t.isAuthorized())continue;let n=await t.connect({isReconnecting:!0}).catch(()=>null);n&&(t.emitter.off("connect",e._internal.events.connect),t.emitter.on("change",e._internal.events.change),t.emitter.on("disconnect",e._internal.events.disconnect),e.setState(e=>{let r=new Map(c?e.connections:new Map).set(t.uid,{accounts:n.accounts,chainId:n.chainId,connector:t});return{...e,current:c?e.current:t.uid,connections:r}}),u.push({accounts:n.accounts,chainId:n.chainId,connector:t}),l.push(r),c=!0)}return("reconnecting"===e.state.status||"connecting"===e.state.status)&&(c?e.setState(e=>({...e,status:"connected"})):e.setState(e=>({...e,connections:new Map,current:null,status:"disconnected"}))),s=!1,u}function a(e){let{children:t,config:r,initialState:s,reconnectOnMount:a=!0}=e,{onMount:o}=function(e,t){let{initialState:r,reconnectOnMount:n}=t;return r&&!e._internal.store.persist.hasHydrated()&&e.setState({...r,chainId:e.chains.some(e=>e.id===r.chainId)?r.chainId:e.chains[0].id,connections:n?r.connections:new Map,status:n?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(t=>{let r=new Set;for(let e of t??[])if(e.rdns)for(let t of Array.isArray(e.rdns)?e.rdns:[e.rdns])r.add(t);let n=[];for(let t of e._internal.mipd?.getProviders()??[]){if(r.has(t.info.rdns))continue;let s=e._internal.connectors.providerDetailToConnector(t),i=e._internal.connectors.setup(s);n.push(i)}return[...t,...n]})),n?i(e):e.storage&&e.setState(e=>({...e,connections:new Map}))}}}(r,{initialState:s,reconnectOnMount:a});r._internal.ssr||o();let c=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{if(c.current&&r._internal.ssr)return o(),()=>{c.current=!1}},[]),t}let o=(0,n.createContext)(void 0);e.s(["WagmiContext",0,o,"WagmiProvider",0,function(e){let{children:t,config:r}=e;return(0,n.createElement)(a,e,(0,n.createElement)(o.Provider,{value:r},t))}],405944);let c="2.16.3";e.s(["version",0,c],205241);var u=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class l extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return`@wagmi/core@${c}`}constructor(e,r={}){super(),t.add(this),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:"WagmiCoreError"});const n=r.cause instanceof l?r.cause.details:r.cause?.message?r.cause.message:r.details,s=r.cause instanceof l&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${this.docsBaseUrl}${s}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return u(this,t,"m",r).call(this,this,e)}}t=new WeakSet,r=function e(r,n){return n?.(r)?r:r.cause?u(this,t,"m",e).call(this,r.cause,n):r},e.s(["BaseError",0,l],213029),e.s(["ChainNotConfiguredError",0,class extends l{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}},"ConnectorAccountNotFoundError",0,class extends l{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}},"ConnectorAlreadyConnectedError",0,class extends l{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}},"ConnectorChainMismatchError",0,class extends l{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}},"ConnectorNotConnectedError",0,class extends l{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}},"ConnectorUnavailableReconnectingError",0,class extends l{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`. All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored. This error commonly occurs for connectors that asynchronously inject after reconnection has already started."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}
2],643141),e.s(["ProviderNotFoundError",0,class extends l{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}},"SwitchChainNotSupportedError",0,class extends l{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}],383051)},19836,e=>{"use strict";var t=e.i(352768),r=e.i(40358),n=e.i(672018),s=e.i(812226),i=class extends s.Removable{#e;#t;#r;#n;#s;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.client,this.#r=this.#n.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=o(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=o(this.options);void 0!==e.data&&(this.setData(e.data,{updatedAt:e.dataUpdatedAt,manual:!0}),this.#e=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#r.remove(this)}setData(e,r){let n=(0,t.replaceData)(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){let r=this.#s?.promise;return this.#s?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,r){let s;if("idle"!==this.state.fetchStatus&&this.#s?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,a=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#a=!0,i.signal)})},o=()=>{let e,n=(0,t.ensureQueryFn)(this.options,r),s=(a(e={client:this.#n,queryKey:this.queryKey,meta:this.meta}),e);return(this.#a=!1,this.options.persister)?this.options.persister(n,s,this):n(s)},c=(a(s={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:o}),s);this.options.behavior?.onFetch(c,this),this.#t=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#o({type:"fetch",meta:c.fetchOptions?.meta}),this.#s=(0,n.createRetryer)({initialPromise:r?.initialPromise,fn:c.fetchFn,onCancel:e=>{e instanceof n.CancelledError&&e.revert&&this.setState({...this.#t,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{let e=await this.#s.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof n.CancelledError){if(e.silent)return this.#s.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#o({type:"error",error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#o(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...a(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":let n=e.error;
2return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function a(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,n.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function o(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,i,"fetchState",0,a])},139861,(e,t,r)=>{"use strict";var n=e.r(975705),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,o=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}var l="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),s=n[0].inst,l=n[1];return o(function(){s.value=r,s.getSnapshot=t,u(s)&&l({inst:s})},[e,r,t]),a(function(){return u(s)&&l({inst:s}),e(function(){u(s)&&l({inst:s})})},[e]),c(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},458473,(e,t,r)=>{"use strict";t.exports=e.r(139861)},947959,(e,t,r)=>{"use strict";var n=e.r(975705),s=e.r(458473),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=s.useSyncExternalStore,o=n.useRef,c=n.useEffect,u=n.useMemo,l=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,s){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var p=a(e,(d=u(function(){function e(e){if(!c){if(c=!0,a=e,e=n(e),void 0!==s&&h.hasValue){var t=h.value;if(s(t,e))return o=t}return o=e}if(t=o,i(a,e))return t;var r=n(e);return void 0!==s&&s(t,r)?t:(a=e,o=r)}var a,o,c=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,s]))[0],d[1]);return c(function(){h.hasValue=!0,h.value=p},[p]),l(p),p}},145605,(e,t,r)=>{"use strict";t.exports=e.r(947959)},628589,293062,753703,639364,e=>{"use strict";function t(e){let t=e.state.current,r=e.state.connections.get(t),n=r?.accounts,s=n?.[0],i=e.chains.find(e=>e.id===r?.chainId),a=e.state.status;switch(a){case"connected":return{address:s,addresses:n,chain:i,chainId:r?.chainId,connector:r?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:a};case"reconnecting":return{address:s,addresses:n,chain:i,chainId:r?.chainId,connector:r?.connector,isConnected:!!s,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:a};case"connecting":return{address:s,addresses:n,chain:i,chainId:r?.chainId,connector:r?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:a};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:a}}}function r(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){let n,s;if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t)){if((n=e.length)!==t.length)return!1;for(s=n;0!=s--;)if(!r(e[s],t[s]))return!1;return!0}if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();let i=Object.keys(e);if((n=i.length)!==Object.keys(t).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(t,i[s]))return!1;for(s=n;0!=s--;){let n=i[s];if(n&&!r(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function n(e,n){let{onChange:s}=n;return e.subscribe(()=>
2t(e),s,{equalityFn(e,t){let{connector:n,...s}=e,{connector:i,...a}=t;return r(s,a)&&n?.id===i?.id&&n?.uid===i?.uid}})}e.s(["deepEqual",0,r],293062),e.s(["watchAccount",0,n],753703);var s=e.i(975705),i=e.i(405944),a=e.i(213029);class o extends a.BaseError{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return"[email protected]"}}class c extends o{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function u(e={}){let t=e.config??(0,s.useContext)(i.WagmiContext);if(!t)throw new c;return t}e.s(["useConfig",0,u],639364);var l=e.i(145605);let d=e=>"object"==typeof e&&!Array.isArray(e);e.s(["useAccount",0,function(e={}){let i=u(e);return function(e,t,n=t,i=r){let a=(0,s.useRef)([]),o=(0,l.useSyncExternalStoreWithSelector)(e,t,n,e=>e,(e,t)=>{if(d(e)&&d(t)&&a.current.length){for(let r of a.current)if(!i(e[r],t[r]))return!1;return!0}return i(e,t)});return(0,s.useMemo)(()=>{if(d(o)){let e={...o},t={};for(let[r,n]of Object.entries(e))t={...t,[r]:{configurable:!1,enumerable:!0,get:()=>(a.current.includes(r)||a.current.push(r),n)}};return Object.defineProperties(e,t),e}return o},[o])}(e=>n(i,{onChange:e}),()=>t(i))}],628589)},594973,e=>{"use strict";e.s(["getAction",0,function(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let s=e[r];return"function"==typeof s?s:r=>t(e,r)}])},795388,e=>{"use strict";function t(e){return"[object Object]"===Object.prototype.toString.call(e)}e.s(["filterQueryOptions",0,function(e){let{_defaulted:t,behavior:r,gcTime:n,initialData:s,initialDataUpdatedAt:i,maxPages:a,meta:o,networkMode:c,queryFn:u,queryHash:l,queryKey:d,queryKeyHashFn:h,retry:p,retryDelay:f,structuralSharing:y,getPreviousPageParam:g,getNextPageParam:m,initialPageParam:v,_optimisticResults:b,enabled:w,notifyOnChangeProps:C,placeholderData:S,refetchInterval:E,refetchIntervalInBackground:R,refetchOnMount:T,refetchOnReconnect:A,refetchOnWindowFocus:I,retryOnMount:O,select:x,staleTime:P,suspense:F,throwOnError:q,config:M,connector:D,query:Q,...N}=e;return N},"hashFn",0,function(e){return JSON.stringify(e,(e,r)=>!function(e){if(!t(e))return!1;let r=e.constructor;if(void 0===r)return!0;let n=r.prototype;return!!t(n)&&!!n.hasOwnProperty("isPrototypeOf")}(r)?"bigint"==typeof r?r.toString():r:Object.keys(r).sort().reduce((e,t)=>(e[t]=r[t],e),{}))}])},452413,536101,593818,e=>{"use strict";let t;var r=e.i(576973),n=e.i(40358),s=e.i(19836),i=e.i(204955),a=e.i(396452),o=e.i(352768),c=e.i(355317),u=class extends i.Subscribable{constructor(e,t){super(),this.options=t,this.#n=e,this.#c=null,this.#u=(0,a.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#n;#l=void 0;#d=void 0;#h=void 0;#p;#f;#u;#c;#y;#g;#m;#v;#b;#w;#C=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#l.addObserver(this),l(this.#l,this.options)?this.#S():this.updateResult(),this.#E())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#l,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#l,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#T(),this.#l.removeObserver(this)}setOptions(e){let t=this.options,r=this.#l;if(this.options=this.#n.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#l))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#A(),this.#l.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#l,observer:this});let n=this.hasListeners();n&&h(this.#l,r,this.options,t)&&this.#S(),this.updateResult(),n&&(this.#l!==r||(0,o.resolveEnabled)(this.options.enabled,this.#l)!==(0,o.resolveEnabled)(t.enabled,this.#l)||(0,o.resolveStaleTime)(this.options.staleTime,this.#l)!==(0,o.resolveStaleTime)(t.staleTime,this.#l))&&this.#I();let s=this.#O();n&&(this.#l!==r||(0,o.resolveEnabled)(this.options.enabled,this.#l)!==(0,o.resolveEnabled)(t.enabled,this.#l)||s!==this.#w)&&this.#x(s)}getOptimisticResult(e){var t,r;let n=this.#n.getQueryCache().build(this.#n,e),s=this.createResult(n,e);return t=this,r=s,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#h=s,this.#f=this.options,this.#p=this.#l.
2state),s}getCurrentResult(){return this.#h}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#u.status||this.#u.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#C.add(e)}getCurrentQuery(){return this.#l}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#n.defaultQueryOptions(e),r=this.#n.getQueryCache().build(this.#n,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#S({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#h))}#S(e){this.#A();let t=this.#l.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#I(){this.#R();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#l);if(o.isServer||this.#h.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#h.dataUpdatedAt,e);this.#v=c.timeoutManager.setTimeout(()=>{this.#h.isStale||this.updateResult()},t+1)}#O(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#l):this.options.refetchInterval)??!1}#x(e){this.#T(),this.#w=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#l)&&(0,o.isValidTimeout)(this.#w)&&0!==this.#w&&(this.#b=c.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#S()},this.#w))}#E(){this.#I(),this.#x(this.#O())}#R(){this.#v&&(c.timeoutManager.clearTimeout(this.#v),this.#v=void 0)}#T(){this.#b&&(c.timeoutManager.clearInterval(this.#b),this.#b=void 0)}createResult(e,t){let r,n=this.#l,i=this.options,c=this.#h,u=this.#p,d=this.#f,f=e!==n?e.state:this.#d,{state:y}=e,g={...y},m=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&l(e,t),o=r&&h(e,n,t,i);(a||o)&&(g={...g,...(0,s.fetchState)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:w}=g;r=g.data;let C=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===w){let e;c?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=c.data,C=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,void 0!==e&&(w="success",r=(0,o.replaceData)(c?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!C)if(c&&r===u?.data&&t.select===this.#y)r=this.#g;else try{this.#y=t.select,r=t.select(r),r=(0,o.replaceData)(c?.data,r,t),this.#g=r,this.#c=null}catch(e){this.#c=e}this.#c&&(v=this.#c,r=this.#g,b=Date.now(),w="error");let S="fetching"===g.fetchStatus,E="pending"===w,R="error"===w,T=E&&S,A=void 0!==r,I={status:w,fetchStatus:g.fetchStatus,isPending:E,isSuccess:"success"===w,isError:R,isInitialLoading:T,isLoading:T,data:r,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:S,isRefetching:S&&!E,isLoadingError:R&&!A,isPaused:"paused"===g.fetchStatus,isPlaceholderData:m,isRefetchError:R&&A,isStale:p(e,t),refetch:this.refetch,promise:this.#u,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===I.status?e.reject(I.error):void 0!==I.data&&e.resolve(I.data)},r=()=>{t(this.#u=I.promise=(0,a.pendingThenable)())},s=this.#u;switch(s.status){case"pending":e.queryHash===n.queryHash&&t(s);break;case"fulfilled":("error"===I.status||I.data!==s.value)&&r();break;case"rejected":("error"!==I.status||I.error!==s.reason)&&r()}}return I}updateResult(){let e=this.#h,t=this.createResult(this.#l,this.options);if(this.#p=this.#l.state,this.#f=this.options,void 0!==this.#p.data&&(this.#m=this.#l),(0,o.shallowEqualObjects)(t,e))return;this.#h=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#C.size)return!0;let n=new Set(r??this.#C);return this.options.throwOnError&&n.add("error"),Object.keys(this.#h).some(t=>this.#h[t]!==e[t]&&n.has(t))};this.#P({listeners:r()})}#A(){let e=this.#n.getQueryCache().build(this.#n,this.options);if(e===this.#l)return;let t=this.#l;this.#l=e,this.#d=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#E()}#P(e){n.notifyManager.batch(()=>
2{e.listeners&&this.listeners.forEach(e=>{e(this.#h)}),this.#n.getQueryCache().notify({query:this.#l,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&p(e,t)}return!1}function h(e,t,r,n){return(e!==t||!1===(0,o.resolveEnabled)(n.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(343672);var f=e.i(975705),y=e.i(916956);e.i(268601);var g=f.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),m=f.createContext(!1);m.Provider;var v=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function b(e,t){return function(e,t,r){let s=f.useContext(m),i=f.useContext(g),a=(0,y.useQueryClient)(r),c=a.defaultQueryOptions(e);if(a.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=s?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}(c.suspense||c.throwOnError||c.experimental_prefetchInRender)&&!i.isReset()&&(c.retryOnMount=!1),f.useEffect(()=>{i.clearReset()},[i]);let u=!a.getQueryCache().get(c.queryHash),[l]=f.useState(()=>new t(a,c)),d=l.getOptimisticResult(c),h=!s&&!1!==e.subscribed;if(f.useSyncExternalStore(f.useCallback(e=>{let t=h?l.subscribe(n.notifyManager.batchCalls(e)):o.noop;return l.updateResult(),t},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f.useEffect(()=>{l.setOptions(c)},[c,l]),c?.suspense&&d.isPending)throw v(c,l,i);if((({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,n])))({result:d,errorResetBoundary:i,throwOnError:c.throwOnError,query:a.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw d.error;if(a.getDefaultOptions().queries?._experimental_afterQuery?.(c,d),c.experimental_prefetchInRender&&!o.isServer&&d.isLoading&&d.isFetching&&!s){let e=u?v(c,l,i):a.getQueryCache().get(c.queryHash)?.promise;e?.catch(o.noop).finally(()=>{l.updateResult()})}return c.notifyOnChangeProps?d:l.trackResult(d)}(e,u,t)}e.s(["useQuery",0,b],536101),e.i(744313);var w=e.i(795388);function C(e){return e.state.chainId}e.s(["useQuery",0,function(e){let t=b({...e,queryKeyHashFn:w.hashFn});return t.queryKey=e.queryKey,t}],452413);var S=e.i(639364);e.s(["useChainId",0,function(e={}){let t=(0,S.useConfig)(e);return(0,f.useSyncExternalStore)(e=>(function(e,t){let{onChange:r}=t;return e.subscribe(e=>e.chainId,r)})(t,{onChange:e}),()=>C(t),()=>C(t))}],593818)},246839,e=>{"use strict";var t=e.i(624944);function r(e,n={}){let s=function(e,t={}){let r;try{r=e.getClient(t)}catch{}return r}(e,n);return s?.extend(t.publicActions)}var n=e.i(145605),s=e.i(639364);e.s(["usePublicClient",0,function(e={}){let t=(0,s.useConfig)(e);return(0,n.useSyncExternalStoreWithSelector)(e=>(function(e,t){let{onChange:n}=t;return e.subscribe(()=>r(e),n,{equalityFn:(e,t)=>e?.uid===t?.uid})})(t,{onChange:e}),()=>r(t,e),()=>r(t,e),e=>e,(e,t)=>e?.uid===t?.uid)}],246839)},752886,e=>{"use strict";var t=e.i(744313);async function r(e,t={}){let n;if(t.connector)n=t.connector;else{let{connections:t,current:r}=e.state,s=t.get(r);n=s?.connector}let s=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),s.delete(n.uid)),e.setState(e=>{if(0===s.size)return{...e,connections:new Map,current:null,status:"disconnected"};let t=s.values().next().value;return{...e,connections:new Map(s),current:t.connector.uid}});{let t=e.state.current;if(!t)return;let r=e.state.connections.get(t)?.connector;if(!r)return;await e.storage?.setItem("recentConnectorId",r.id)}}var n=e.i(639364),s=e.i(293062);let i=[];function a(e){let t=[...e.state.connections.values()];return"reconnecting"===e.state.status||(0,s.deepEqual)(i,t)?i:(i=t,t)}var o=e.i(975705);e.s(["useDisconnect",0,function(e={}){let{mutation:i}=e,c=(0,n.useConfig)(e),u={mutationFn:e=>r(c,e),mutationKey:["disconnect"]},{mutate:l,mutateAsync:d,...h}=(0,t.useMutation)({...i,...u});return{...h,connectors:(function(e={}){let t=(0,n.useConfig)(e);return(0,o.useSyncExternalStore)(e=>(function(e,t){let{onChange:r}=t;return e.subscribe(()=>a(e),r,{equalityFn:s.deepEqual})})(t,{onChange:e}),()=>a(t),()=>a(t))})({config:c}
2).map(e=>e.connector),disconnect:l,disconnectAsync:d}}],752886)},612245,753742,e=>{"use strict";var t=e.i(744313),r=e.i(643141);async function n(e,t){let n;if((n="function"==typeof t.connector?e._internal.connectors.setup(t.connector):t.connector).uid===e.state.current)throw new r.ConnectorAlreadyConnectedError;try{e.setState(e=>({...e,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});let{connector:r,...s}=t,i=await n.connect(s),a=i.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 e.storage?.setItem("recentConnectorId",n.id),e.setState(e=>({...e,connections:new Map(e.connections).set(n.uid,{accounts:a,chainId:i.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:a,chainId:i.chainId}}catch(t){throw e.setState(e=>({...e,status:e.current?"connected":"disconnected"})),t}}var s=e.i(975705),i=e.i(639364),a=e.i(293062);let o=[];function c(e){let t=e.connectors;return(0,a.deepEqual)(o,t)?o:(o=t,t)}function u(e={}){let t=(0,i.useConfig)(e);return(0,s.useSyncExternalStore)(e=>(function(e,t){let{onChange:r}=t;return e._internal.connectors.subscribe((e,t)=>{r(Object.values(e),t)})})(t,{onChange:e}),()=>c(t),()=>c(t))}e.s(["useConnectors",0,u],753742),e.s(["useConnect",0,function(e={}){let{mutation:r}=e,a=(0,i.useConfig)(e),o={mutationFn:e=>n(a,e),mutationKey:["connect"]},{mutate:c,mutateAsync:l,...d}=(0,t.useMutation)({...r,...o});return(0,s.useEffect)(()=>a.subscribe(({status:e})=>e,(e,t)=>{"connected"===t&&"disconnected"===e&&d.reset()}),[a,d.reset]),{...d,connect:c,connectAsync:l,connectors:u({config:a})}}],612245)},897518,86883,e=>{"use strict";var t=e.i(744313),r=e.i(474374),n=e.i(594973),s=e.i(924030),i=e.i(347970),a=e.i(62883),o=e.i(958008),c=e.i(643141);async function u(e,t={}){let r;if(t.connector){let{connector:n}=t;if("reconnecting"===e.state.status&&!n.getAccounts&&!n.getChainId)throw new c.ConnectorUnavailableReconnectingError({connector:n});let[s,i]=await Promise.all([n.getAccounts(),n.getChainId()]);r={accounts:s,chainId:i,connector:n}}else r=e.state.connections.get(e.state.current);if(!r)throw new c.ConnectorNotConnectedError;let n=t.chainId??r.chainId,l=await r.connector.getChainId();if(l!==r.chainId)throw new c.ConnectorChainMismatchError({connectionChainId:r.chainId,connectorChainId:l});let d=r.connector;if(d.getClient)return d.getClient({chainId:n});let h=(0,o.parseAccount)(t.account??r.accounts[0]);if(h.address=(0,a.getAddress)(h.address),t.account&&!r.accounts.some(e=>e.toLowerCase()===h.address.toLowerCase()))throw new c.ConnectorAccountNotFoundError({address:h.address,connector:d});let p=e.chains.find(e=>e.id===n),f=await r.connector.getProvider({chainId:n});return(0,s.createClient)({account:h,chain:p,name:"Connector Client",transport:e=>(0,i.custom)(f)({...e,retryCount:0})})}async function l(e,t){let s,{account:i,connector:a,...o}=t;return s="object"==typeof i&&"local"===i.type?e.getClient():await u(e,{account:i,connector:a}),(0,n.getAction)(s,r.signMessage,"signMessage")({...o,...i?{account:i}:{}})}e.s(["getConnectorClient",0,u],86883);var d=e.i(639364);e.s(["useSignMessage",0,function(e={}){var r;let{mutation:n}=e,s=(r=(0,d.useConfig)(e),{mutationFn:e=>l(r,e),mutationKey:["signMessage"]}),{mutate:i,mutateAsync:a,...o}=(0,t.useMutation)({...n,...s});return{...o,signMessage:i,signMessageAsync:a}}],897518)},847192,e=>{"use strict";var t=e.i(744313),r=e.i(643141),n=e.i(383051);async function s(e,t){let{addEthereumChainParameter:s,chainId:i}=t,a=e.state.connections.get(t.connector?.uid??e.state.current);if(a){let e=a.connector;if(!e.switchChain)throw new n.SwitchChainNotSupportedError({connector:e});return await e.switchChain({addEthereumChainParameter:s,chainId:i})}let o=e.chains.find(e=>e.id===i);if(!o)throw new r.ChainNotConfiguredError;return e.setState(e=>({...e,chainId:i})),o}var i=e.i(293062);let a=[];function o(e){let t=e.chains;return(0,i.deepEqual)(a,t)?a:(a=t,t)}var c=e.i(975705),u=e.i(639364);e.s(["useSwitchChain",0,function(e={}){let{mutation:r}=e,n=(0,u.useConfig)(e),i={mutationFn:e=>s(n,e),mutationKey:["switchChain"]},{mutate:a,mutateAsync:l,...d}=(0,t.useMutation)({...r,...i});return{...d,chains:function(e={}){let t=(0,u.useConfig)(e);return(0,c.useSyncExternalStore)(e=>(function(e,t){let{onChange:r}=t;return e._internal.chains.subscribe((e,t)=>{r(e,t)})})(t,{onChange:e}),()=>o(t),()=>o(t))}({config:n}),switchChain:a,switchChainAsync:l}}],847192)}]); 3
4//# debugId=4fba8cc9-6763-77a1-8f74-27029caad39e 5//# sourceMappingURL=0emm~nxba3~9g.js.map
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.