@dcl/account-site 6.6.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/assets/{CoinbaseSDKConnection-CZn10zuo.js → CoinbaseSDKConnection-BXH9O0nE.js} +1 -1
  2. package/assets/{ConstantsUtil-CCWoPq6v.js → ConstantsUtil-BBWopuyF.js} +1 -1
  3. package/assets/{ExchangeController-DAvkG56a.js → ExchangeController-CA0zj_3w.js} +1 -1
  4. package/assets/{HelpersUtil-UXuUdUo1.js → HelpersUtil-DSbuW6K9.js} +1 -1
  5. package/assets/{InAppWalletConnectUI-ja-gHAVb.js → InAppWalletConnectUI-4CWClaVJ.js} +1 -1
  6. package/assets/{NetworkUtil-Dyezb5_Z.js → NetworkUtil-Ci2WRYQ5.js} +1 -1
  7. package/assets/{QRCodeRenderer-DVWfONfS.js → QRCodeRenderer-BcVfSFm_.js} +1 -1
  8. package/assets/{SwapController-B9nvNG09.js → SwapController-Czs5wFSm.js} +1 -1
  9. package/assets/{ThirdwebWalletManager-8fp4vDZ-.js → ThirdwebWalletManager-_8PV4raS.js} +14 -14
  10. package/assets/{biconomy-DsiBpaqb.js → biconomy-BthTiVNA.js} +1 -1
  11. package/assets/{biconomy-CAg5-Rne.js → biconomy-Ct9DAkvL.js} +1 -1
  12. package/assets/{ccip-CvLc3NhE.js → ccip-C-GSKBZ0.js} +1 -1
  13. package/assets/{ccip-BOSG5Xf7.js → ccip-COdWpT3c.js} +1 -1
  14. package/assets/{ccip-Omot5-KO.js → ccip-PybIhCr_.js} +1 -1
  15. package/assets/{chains-hQBCRSBK.js → chains-DU-Pa0Wz.js} +1 -1
  16. package/assets/{common-C1bFpXXr.js → common-DttAkYAP.js} +1 -1
  17. package/assets/{common-BP_lAyVn.js → common-FBNyPNTr.js} +1 -1
  18. package/assets/concat-hex-DeWBGZEs.js +1 -0
  19. package/assets/{controller-7UvIet0s.js → controller-CYBQ4arf.js} +2 -2
  20. package/assets/{controller-BbSNXeiw.js → controller-cVVmP7jI.js} +2 -2
  21. package/assets/{data-capture-CDbYPi0B.js → data-capture-BxMZh5-c.js} +1 -1
  22. package/assets/{decimals-jrUfo404.js → decimals-C88RWTdk.js} +1 -1
  23. package/assets/decimals-CDYEp2UZ.js +1 -0
  24. package/assets/{detectExtension-B-qw64Pc.js → detectExtension-C1-4KxEP.js} +1 -1
  25. package/assets/{detectExtension-BHy0tx26.js → detectExtension-DaHwTBEl.js} +1 -1
  26. package/assets/{email-CBQ_fEcd.js → email-CykYjBAl.js} +1 -1
  27. package/assets/{embedded-wallet-BpNjQ35t.js → embedded-wallet-uXcj1MHn.js} +1 -1
  28. package/assets/{engine-Bxq9XExo.js → engine--65dr3zr.js} +1 -1
  29. package/assets/{engine-DBZbir_a.js → engine-CrmGAvB-.js} +1 -1
  30. package/assets/{estimate-l1-fee-0EMQlb1T.js → estimate-l1-fee-BXqjzhsB.js} +1 -1
  31. package/assets/{estimate-l1-fee-gKGPhwem.js → estimate-l1-fee-C8QcwjpU.js} +1 -1
  32. package/assets/eth_estimateGas-BLq5fjmK.js +1 -0
  33. package/assets/eth_estimateGas-CxVJfDAv.js +1 -0
  34. package/assets/{eth_getStorageAt-BFNcSJRC.js → eth_getStorageAt-BdHAJUde.js} +1 -1
  35. package/assets/eth_getTransactionCount-BRhOgzit.js +1 -0
  36. package/assets/{eth_getTransactionCount-Dcc1nhjw.js → eth_getTransactionCount-uA-BuCYb.js} +1 -1
  37. package/assets/{ethereum-CWr8QmFu.js → ethereum-G9jle5Re.js} +1 -1
  38. package/assets/{extractIPFS-BsYIuiLm.js → extractIPFS-CO52kZTe.js} +1 -1
  39. package/assets/{extractIPFS-Ch4Gc35N.js → extractIPFS-EXk4RS2j.js} +1 -1
  40. package/assets/{features-CmIs_0JR.js → features-ulzbeUt3.js} +1 -1
  41. package/assets/{fetchTokenMetadata-DrJFAm_P.js → fetchTokenMetadata-CVbxD3VO.js} +2 -2
  42. package/assets/{fetchTokenMetadata-BKap4LV_.js → fetchTokenMetadata-Cjc5LBLb.js} +2 -2
  43. package/assets/{fortmatic-YfMk-BEE.js → fortmatic-C9YVBZGp.js} +1 -1
  44. package/assets/{get-ecosystem-wallet-info-DU9z8SfE.js → get-ecosystem-wallet-info-C2g4DCWw.js} +1 -1
  45. package/assets/{get-ecosystem-wallet-info-DGKFMj5P.js → get-ecosystem-wallet-info-XD5a_-7n.js} +1 -1
  46. package/assets/{getBalance-De76iO5T.js → getBalance-ChIaoun9.js} +1 -1
  47. package/assets/{getBalance-DnrxzxOV.js → getBalance-Cv-UhnqE.js} +2 -2
  48. package/assets/{getCurrencyMetadata-BDUn1sRt.js → getCurrencyMetadata-BIDrkcKc.js} +2 -2
  49. package/assets/{getInstalledModules-CDg0iuO4.js → getInstalledModules-CXC5NsJK.js} +1 -1
  50. package/assets/{getInstalledModules-pAhupAGP.js → getInstalledModules-DSkh5stL.js} +1 -1
  51. package/assets/{getNFT-DHMnJTqW.js → getNFT-B1GRYjXJ.js} +1 -1
  52. package/assets/{getNFT-Dmgig0jB.js → getNFT-BAV0GrVn.js} +2 -2
  53. package/assets/{getNFT-BBil6owX.js → getNFT-BH7A6Hpm.js} +2 -2
  54. package/assets/{getNFT-B0m3jfoJ.js → getNFT-CzmG4M0Z.js} +1 -1
  55. package/assets/{hashTypedData-CFE7S7Af.js → hashTypedData-LY3QUtcD.js} +1 -1
  56. package/assets/{if-defined-Cf2AacYL.js → if-defined-DDCgUiYp.js} +1 -1
  57. package/assets/{in-app-wallet-calls-BcCtZJWh.js → in-app-wallet-calls--nglUDgv.js} +1 -1
  58. package/assets/{in-app-wallet-calls-DkDeM4Ux.js → in-app-wallet-calls-n-b5hova.js} +1 -1
  59. package/assets/{index-fXUdFiUC.js → index-4dpS6N-D.js} +1 -1
  60. package/assets/{index-DFwjqP80.js → index-6V9vuvkP.js} +1 -1
  61. package/assets/{index-CzwFqL20.js → index-B1poDi8U.js} +1 -1
  62. package/assets/{index-C2_PMI0d.js → index-BFCvu-SQ.js} +1 -1
  63. package/assets/{index-DAiWSMFC.css → index-BGvsmbMC.css} +3 -3
  64. package/assets/{index-CYmaTgjV.js → index-Bef3mmzY.js} +1 -1
  65. package/assets/{index-4kM1zjnS.js → index-BmyXTXyN.js} +1 -1
  66. package/assets/{index-CLEQ0hOn.js → index-BoV3Hrjy.js} +1 -1
  67. package/assets/{index-FfyQsjIX.js → index-Bp09MjvQ.js} +1 -1
  68. package/assets/{index-hu38SAQP.js → index-C8X0edSR.js} +2 -2
  69. package/assets/{index-CTPexb85.js → index-C9kcmpvP.js} +83 -83
  70. package/assets/{index-AQDuAtLD.js → index-CGZLkuWn.js} +1 -1
  71. package/assets/{index-2bKn2TSE.js → index-CMJ_znKB.js} +1 -1
  72. package/assets/{index-_D0X6y83.js → index-CP8kDNsr.js} +1 -1
  73. package/assets/{index-C4PACRDN.js → index-CQCjMzl4.js} +1 -1
  74. package/assets/{index-Darq-_2v.js → index-CQCqaGUZ.js} +1 -1
  75. package/assets/{index-BOfv99jb.js → index-CQW4u1WI.js} +1 -1
  76. package/assets/{index-iYxKn0Oc.js → index-CnyP_n54.js} +1 -1
  77. package/assets/{index-D5Bu0E_X.js → index-Cp3T7PGa.js} +2 -2
  78. package/assets/{index-BiJBjAq_.js → index-Cq3j3T6G.js} +1 -1
  79. package/assets/{index-M-NNRPW4.js → index-CsvMexRW.js} +1 -1
  80. package/assets/{index-B5HUu6ls.js → index-CvAs0GYP.js} +1 -1
  81. package/assets/{index-TCzvey27.js → index-CyiA1q8T.js} +4 -4
  82. package/assets/{index-C1ZzIDiM.js → index-D-Ot-Uy8.js} +1 -1
  83. package/assets/{index-D0ni6GfK.js → index-D2hB4T2W.js} +1 -1
  84. package/assets/{index-4AMDJXW8.js → index-D338ESwc.js} +1 -1
  85. package/assets/{index-BcyyjPYQ.js → index-D8hwIfIc.js} +1 -1
  86. package/assets/{index-ClFb4Tcz.js → index-DF_yMqfP.js} +1 -1
  87. package/assets/{index-B5OgRpRK.js → index-DQ09NiWi.js} +1 -1
  88. package/assets/{index-CcA5U3oD.js → index-DYAskdJA.js} +1 -1
  89. package/assets/{index-CY1hRSE1.js → index-Db5dD53h.js} +1 -1
  90. package/assets/{index-DoVKEDtC.js → index-DiIjEJ0_.js} +1 -1
  91. package/assets/{index-BgpgK5zX.js → index-DlXwok7s.js} +1 -1
  92. package/assets/{index-CbL1z9m0.js → index-Dmgfza45.js} +1 -1
  93. package/assets/{index-CTLEIK7D.js → index-Dn7EsoTj.js} +1 -1
  94. package/assets/{index-BDYX4pI8.js → index-Dn7k_DQ8.js} +1 -1
  95. package/assets/{index-DPPAEOk2.js → index-DpeV9Wam.js} +1 -1
  96. package/assets/{index-CDV_dpO4.js → index-DrDz7oQI.js} +1 -1
  97. package/assets/{index-CcFgdqWi.js → index-DrMbiZ0i.js} +1 -1
  98. package/assets/{index-CyjdNVAU.js → index-DsUVe2Dc.js} +1 -1
  99. package/assets/{index-BblrtGZs.js → index-FICjNWjt.js} +1 -1
  100. package/assets/{index-CzhN2xH6.js → index-IdBnFbaK.js} +1 -1
  101. package/assets/{index-xyaiuxIf.js → index-J_VvzvhB.js} +1 -1
  102. package/assets/{index-BF2AsK0R.js → index-_RP5sd-t.js} +1 -1
  103. package/assets/{index-DFWtng-H.js → index-dU7YfzFY.js} +1 -1
  104. package/assets/{index-CFFw5g7T.js → index-pMedPHw2.js} +2 -2
  105. package/assets/{index-BNPmCVUF.js → index-x7hxyH5-.js} +1 -1
  106. package/assets/{index-vC3WND5c.js → index-zeKYF1_9.js} +2 -2
  107. package/assets/{index.es-CxEKWgLB.js → index.es-BnBQYKMl.js} +1 -1
  108. package/assets/{index.es-gA_UXXxQ.js → index.es-D0_25Oh-.js} +1 -1
  109. package/assets/{index.es-CiDQXtto.js → index.es-Dv1hs6Y0.js} +1 -1
  110. package/assets/{index.es-Ctfyd2a4.js → index.es-arQDsOy9.js} +1 -1
  111. package/assets/{native-DIXXjgvG.js → native-DlthNI6_.js} +1 -1
  112. package/assets/{networks-DS3ZsJHp.js → networks-v--tvMC_.js} +1 -1
  113. package/assets/{onramp-BrCtcXHK.js → onramp-EDzrY1eM.js} +1 -1
  114. package/assets/{openzeppelin-BJbCajkn.js → openzeppelin-B8M9vXqD.js} +1 -1
  115. package/assets/{openzeppelin-DBm5cWZy.js → openzeppelin-Dimjiuxs.js} +1 -1
  116. package/assets/{ownerOf-CJw5i5sY.js → ownerOf-3vffreXZ.js} +1 -1
  117. package/assets/{ownerOf-BXifbKa_.js → ownerOf-BjvDIwi2.js} +1 -1
  118. package/assets/{parseNft-CKnRi_6q.js → parseNft-bgONNYbj.js} +2 -2
  119. package/assets/{parseSignature-BLWHgs4m.js → parseSignature-BC-PtSTA.js} +3 -3
  120. package/assets/{parseSignature-DdX47xNk.js → parseSignature-RSoun7s3.js} +3 -3
  121. package/assets/{pay-with-exchange-CyOggPbb.js → pay-with-exchange-Vox1cIBi.js} +1 -1
  122. package/assets/{qr-overlay-D95UBGA6.js → qr-overlay-C6PNFBky.js} +1 -1
  123. package/assets/{qr-overlay-JyAOpwrY.js → qr-overlay-MsxABgTz.js} +1 -1
  124. package/assets/{receive-ZcLdb8Ck.js → receive-C8W6quVv.js} +1 -1
  125. package/assets/{ref-BvyvP27w.js → ref-C8ELo-FX.js} +1 -1
  126. package/assets/{resolveImplementation-Dpsv_sj3.js → resolveImplementation-Be5g9Og6.js} +1 -1
  127. package/assets/{resolveImplementation-CqZPAWh1.js → resolveImplementation-al_rhKfM.js} +1 -1
  128. package/assets/{rpc-D8oPKl0j.js → rpc-YBySNaPU.js} +1 -1
  129. package/assets/{rpc-D6TzaLpS.js → rpc-fTN6Lg8H.js} +1 -1
  130. package/assets/{secp256k1-BkfYhWy6.js → secp256k1-BSfltYuw.js} +1 -1
  131. package/assets/{secp256k1-CISac59N.js → secp256k1-DbKe55L4.js} +1 -1
  132. package/assets/{send-BibpFq6-.js → send-GzhOSqeF.js} +1 -1
  133. package/assets/{send-batch-transaction-CuvNhAx9.js → send-batch-transaction-BgQySJ-T.js} +1 -1
  134. package/assets/{send-batch-transaction-CzhCEKJe.js → send-batch-transaction-BvT25Mc6.js} +1 -1
  135. package/assets/{send-eip712-transaction-CMDvpVc6.js → send-eip712-transaction-DMiNR15g.js} +2 -2
  136. package/assets/{send-eip712-transaction-ChRagBhu.js → send-eip712-transaction-RxArzXsP.js} +2 -2
  137. package/assets/{send-gasless-transaction-T8FPx_c4.js → send-gasless-transaction-BTboOw9J.js} +2 -2
  138. package/assets/{send-gasless-transaction-C3x4-HC9.js → send-gasless-transaction-ma7UOPHW.js} +2 -2
  139. package/assets/{session-proposal-0RYS24IB.js → session-proposal-BVrALpGO.js} +1 -1
  140. package/assets/{session-proposal-CHgpdx11.js → session-proposal-t7OELfh-.js} +1 -1
  141. package/assets/{session-request-CECX27Q9.js → session-request-CklXcH9d.js} +2 -2
  142. package/assets/{session-request-sg5_TFjt.js → session-request-DHwHTsWb.js} +2 -2
  143. package/assets/{sha256-Bq0kwVlP.js → sha256-B_2-BKc1.js} +1 -1
  144. package/assets/{sha256-rw7X9Nhf.js → sha256-EtKFmWln.js} +1 -1
  145. package/assets/{signing-D7VaTtN_.js → signing-DR1diqT_.js} +5 -5
  146. package/assets/{signing-GeODVl1E.js → signing-Wg6dfZ-_.js} +1 -1
  147. package/assets/{socials-onw0PJ2H.js → socials-DSQ2wMQE.js} +1 -1
  148. package/assets/{swaps-DCWiSyRc.js → swaps-DOmQ-2Ov.js} +1 -1
  149. package/assets/switch-chain-Bwl76z8E.js +1 -0
  150. package/assets/{thirdweb-CXrYv9sq.js → thirdweb-CuTQabzI.js} +3 -3
  151. package/assets/{totalSupply-Dtpa-Rc2.js → totalSupply-CVGbD7FC.js} +1 -1
  152. package/assets/{totalSupply-Ww9yF8QK.js → totalSupply-Ce2t0W0d.js} +1 -1
  153. package/assets/{transactionReceipt-DVqqJQEo.js → transactionReceipt-DgYVdPLL.js} +1 -1
  154. package/assets/{transactions-lxg1tS6E.js → transactions-DB6EqQAb.js} +1 -1
  155. package/assets/{utils-B2dQKDW4.js → utils-CUIXWH1v.js} +1 -1
  156. package/assets/{verifyHash-KOquD8l_.js → verifyHash-CxE8tlN8.js} +3 -3
  157. package/assets/{w3m-modal-oRYZfS8_.js → w3m-modal-BJ9JlRHj.js} +1 -1
  158. package/assets/{wait-for-tx-receipt-BcnY3DRy.js → wait-for-tx-receipt-CdM1R_-M.js} +1 -1
  159. package/assets/{wallets-BBf33h4g.js → wallets-Eh21KMYV.js} +6 -6
  160. package/assets/{web-connector-Dv6jqMvn.js → web-connector-dtXNAwkt.js} +2 -2
  161. package/assets/{web-connector-CqJVeGsM.js → web-connector-i2U4xEAp.js} +3 -3
  162. package/assets/{zora-sepolia-Vn0MFhFe.js → zora-sepolia-BS_ncL_N.js} +1 -1
  163. package/index.html +2 -2
  164. package/package.json +3 -3
  165. package/assets/concat-hex-Cl3ME3Ru.js +0 -1
  166. package/assets/decimals-jCGLItLd.js +0 -1
  167. package/assets/eth_estimateGas-BU0iPlrI.js +0 -1
  168. package/assets/eth_estimateGas-CwwZwCM3.js +0 -1
  169. package/assets/eth_getTransactionCount-D53D7AEK.js +0 -1
  170. package/assets/switch-chain-DkFtBw41.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as u,r as p,l as g,m as c}from"./index-TCzvey27.js";import{n as r,c as f}from"./index-BDYX4pI8.js";import{o as m}from"./if-defined-Cf2AacYL.js";const b=u`
1
+ import{j as u,r as p,l as g,m as c}from"./index-CyiA1q8T.js";import{n as r,c as f}from"./index-Dn7k_DQ8.js";import{o as m}from"./if-defined-DDCgUiYp.js";const b=u`
2
2
  :host {
3
3
  display: block;
4
4
  width: var(--local-width);
@@ -1 +1 @@
1
- import{bV as I,bC as g,eo as h,ep as m,eq as T,er as p}from"./ThirdwebWalletManager-8fp4vDZ-.js";async function o(e){const{transactionHash:r,client:d,transactionId:i}=e,c="chainId"in e?e.chainId:e.chain.id,u=g(d),a=new URL(`${I("bridge")}/v1/status`);a.searchParams.set("transactionHash",r),a.searchParams.set("chainId",c.toString()),i&&a.searchParams.set("transactionId",i);const t=await u(a.toString());if(!t.ok){const s=await t.json();throw new h({code:s.code||"UNKNOWN_ERROR",correlationId:s.correlationId||void 0,message:s.message||t.statusText,statusCode:t.status})}const{data:n}=await t.json();return n.status==="FAILED"?{paymentId:n.paymentId,status:"FAILED",transactions:n.transactions}:n.status==="PENDING"?{destinationChainId:n.destinationChainId,destinationToken:n.destinationToken,destinationTokenAddress:n.destinationTokenAddress,originAmount:BigInt(n.originAmount),originChainId:n.originChainId,originToken:n.originToken,originTokenAddress:n.originTokenAddress,paymentId:n.paymentId,purchaseData:n.purchaseData,receiver:n.receiver,sender:n.sender,status:"PENDING",transactions:n.transactions}:n.status==="NOT_FOUND"?{paymentId:n.paymentId,status:"NOT_FOUND",transactions:[]}:{destinationAmount:BigInt(n.destinationAmount),destinationChainId:n.destinationChainId,destinationToken:n.destinationToken,destinationTokenAddress:n.destinationTokenAddress,originAmount:BigInt(n.originAmount),originChainId:n.originChainId,originToken:n.originToken,originTokenAddress:n.originTokenAddress,paymentId:n.paymentId,purchaseData:n.purchaseData,receiver:n.receiver,sender:n.sender,status:"COMPLETED",transactions:n.transactions}}const l=Object.freeze(Object.defineProperty({__proto__:null,status:o},Symbol.toStringTag,{value:"Module"})),A=Object.freeze(Object.defineProperty({__proto__:null,Onramp:T,chains:m,status:o,tokens:p},Symbol.toStringTag,{value:"Module"}));export{l as S,A as i};
1
+ import{bV as I,bC as g,eo as h,ep as m,eq as T,er as p}from"./ThirdwebWalletManager-_8PV4raS.js";async function o(e){const{transactionHash:r,client:d,transactionId:i}=e,c="chainId"in e?e.chainId:e.chain.id,u=g(d),a=new URL(`${I("bridge")}/v1/status`);a.searchParams.set("transactionHash",r),a.searchParams.set("chainId",c.toString()),i&&a.searchParams.set("transactionId",i);const t=await u(a.toString());if(!t.ok){const s=await t.json();throw new h({code:s.code||"UNKNOWN_ERROR",correlationId:s.correlationId||void 0,message:s.message||t.statusText,statusCode:t.status})}const{data:n}=await t.json();return n.status==="FAILED"?{paymentId:n.paymentId,status:"FAILED",transactions:n.transactions}:n.status==="PENDING"?{destinationChainId:n.destinationChainId,destinationToken:n.destinationToken,destinationTokenAddress:n.destinationTokenAddress,originAmount:BigInt(n.originAmount),originChainId:n.originChainId,originToken:n.originToken,originTokenAddress:n.originTokenAddress,paymentId:n.paymentId,purchaseData:n.purchaseData,receiver:n.receiver,sender:n.sender,status:"PENDING",transactions:n.transactions}:n.status==="NOT_FOUND"?{paymentId:n.paymentId,status:"NOT_FOUND",transactions:[]}:{destinationAmount:BigInt(n.destinationAmount),destinationChainId:n.destinationChainId,destinationToken:n.destinationToken,destinationTokenAddress:n.destinationTokenAddress,originAmount:BigInt(n.originAmount),originChainId:n.originChainId,originToken:n.originToken,originTokenAddress:n.originTokenAddress,paymentId:n.paymentId,purchaseData:n.purchaseData,receiver:n.receiver,sender:n.sender,status:"COMPLETED",transactions:n.transactions}}const l=Object.freeze(Object.defineProperty({__proto__:null,status:o},Symbol.toStringTag,{value:"Module"})),A=Object.freeze(Object.defineProperty({__proto__:null,Onramp:T,chains:m,status:o,tokens:p},Symbol.toStringTag,{value:"Module"}));export{l as S,A as i};
@@ -1,4 +1,4 @@
1
- import{p as g,s as C,i as w,j as k,r as $,l as m,m as d,O as l}from"./index-TCzvey27.js";import{n as x,c as f,r as v}from"./index-BDYX4pI8.js";import{o as z}from"./if-defined-Cf2AacYL.js";import{e as O,n as _}from"./ref-BvyvP27w.js";const h=g({isLegalCheckboxChecked:!1}),u={state:h,subscribe(e){return w(h,()=>e(h))},subscribeKey(e,t){return C(h,e,t)},setIsLegalCheckboxChecked(e){h.isLegalCheckboxChecked=e}},E=k`
1
+ import{p as g,s as C,i as w,j as k,r as $,l as m,m as d,O as l}from"./index-CyiA1q8T.js";import{n as x,c as f,r as v}from"./index-Dn7k_DQ8.js";import{o as z}from"./if-defined-DDCgUiYp.js";import{e as O,n as _}from"./ref-C8ELo-FX.js";const h=g({isLegalCheckboxChecked:!1}),u={state:h,subscribe(e){return w(h,()=>e(h))},subscribeKey(e,t){return C(h,e,t)},setIsLegalCheckboxChecked(e){h.isLegalCheckboxChecked=e}},E=k`
2
2
  label {
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{j as b,r as g,k as p,l as h,m as c}from"./index-TCzvey27.js";import{n,c as v}from"./index-BDYX4pI8.js";import"./index-C4PACRDN.js";const m=b`
1
+ import{j as b,r as g,k as p,l as h,m as c}from"./index-CyiA1q8T.js";import{n,c as v}from"./index-Dn7k_DQ8.js";import"./index-CQCjMzl4.js";const m=b`
2
2
  :host {
3
3
  width: var(--local-width);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{z as t,n as d,r as p,l as n,m as w}from"./index-TCzvey27.js";import{n as f,c as k,a as v}from"./index-BDYX4pI8.js";const g=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{z as t,n as d,r as p,l as n,m as w}from"./index-CyiA1q8T.js";import{n as f,c as k,a as v}from"./index-Dn7k_DQ8.js";const g=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <rect width="64" height="64" fill="#F7931A"/>
3
3
  <g clip-path="url(#clip0_1045_17)">
4
4
  <path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/>
@@ -1,4 +1,4 @@
1
- import{n as p,l as u,R as f,M as g,m as d}from"./index-TCzvey27.js";import{n as b,r as m,c as w}from"./index-BDYX4pI8.js";import{T as l}from"./index-4AMDJXW8.js";const C={interpolate(r,e,t){if(r.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=r[0]||0,i=r[1]||0,o=e[0]||0,s=e[1]||0;return t<n?o:t>i?s:(s-o)/(i-n)*(t-n)+o}},M=p`
1
+ import{n as p,l as u,R as f,M as g,m as d}from"./index-CyiA1q8T.js";import{n as b,r as m,c as w}from"./index-Dn7k_DQ8.js";import{T as l}from"./index-D338ESwc.js";const C={interpolate(r,e,t){if(r.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const n=r[0]||0,i=r[1]||0,o=e[0]||0,s=e[1]||0;return t<n?o:t>i?s:(s-o)/(i-n)*(t-n)+o}},M=p`
2
2
  :host {
3
3
  width: 100%;
4
4
  display: block;
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-DIXXjgvG.js","assets/index-CTPexb85.js","assets/index-DAiWSMFC.css"])))=>i.map(i=>d[i]);
2
- import{p as gt,m as bt,b as Yt,i as Zt,I as Qt,s as ut,A as D,e as Xt,g as k,d as N,f as te,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as le,x as Q,y as me,z as fe,B as he,C as $,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as kt,$ as J,a0 as _e,a1 as Bt,a2 as Re,a3 as qe,a4 as lt,a5 as Fe,a6 as ke,a7 as Be,a8 as Ue,a9 as Ne,aa as Ut,ab as Le}from"./parseSignature-BLWHgs4m.js";import{bf as Er,b1 as Ir,aM as Tr,aN as Cr,aT as vr,aO as Sr,aP as Ar,aQ as Pr,ac as _r,aR as Rr,aU as qr,aV as Fr,aW as kr,aX as Br,b2 as Ur,aZ as Nr,a_ as Lr,a$ as Mr,b0 as Dr,b4 as zr,b5 as Gr,bh as $r,b6 as Hr,b7 as Or,b8 as jr,ad as Wr,ae as Vr,af as Jr,aS as Kr,ag as Yr,ah as Zr,ai as Qr,aj as Xr,bi as ts,ak as es,bj as as,al as ns,b3 as rs,b9 as ss,ba as os,bb as is,aY as cs,ap as us,bg as ds,bc as ls,bk as ms,bl as fs,bm as hs,bd as ps,be as ys,aq as gs,ar as bs,as as ws,bn as xs,bu as Es,bv as Is,bw as Ts,bA as Cs,au as vs,bo as Ss,bp as As,aH as Ps,aI as _s,bq as Rs,br as qs,bs as Fs,aA as ks,ax as Bs,ay as Us,aB as Ns,aC as Ls,aJ as Ms,az as Ds,aE as zs,bL as Gs,bM as $s,bN as Hs,by as Os,bJ as js,bE as Ws,aw as Vs,aD as Js,bz as Ks,bB as Ys,am as Zs,an as Qs,ao as Xs,bE as to,bt as eo,aK as ao,av as no,bF as ro,at as so,bK as oo,bG as io,bH as co,bH as uo,bx as lo,bI as mo,aC as fo,aJ as ho,aL as po,bC as yo,bD as go,aF as bo,aG as wo}from"./parseSignature-BLWHgs4m.js";import{aC as U,cb as B,aD as Me,cc as Y,cd as De,ap as ze,ce as Ge,aG as H,aH as ct,aI as G,al as mt,aq as E,cf as $e,aQ as He,cg as j,aP as wt,aS as Nt,ch as Oe,ci as Lt,x as Mt,cj as R,ck as je,ao as ft,cl as F,cm as A,cn as We,co as Ve,cp as Je,cq as xt,cr as ht,cs as Ke,ct as Ye,cu as Ze,j as Qe,v as Xe,k as ta,cv as ea,cw as Et}from"./ThirdwebWalletManager-8fp4vDZ-.js";import{cx as Eo,cy as Io,cz as To,cA as Co,cB as vo,cC as So,cD as Ao,cE as Po,cF as _o,cG as Ro,cH as qo,cI as Fo,cJ as ko,cK as Bo,cL as Uo,cM as No,cN as Lo,cO as Mo,c$ as Do,cX as zo,cP as Go,cQ as $o,cR as Ho,cY as Oo,cS as jo,d0 as Wo,cZ as Vo,d1 as Jo,d2 as Ko,cV as Yo,c_ as Zo,cW as Qo,cT as Xo,dk as ti,dn as ei,dc as ai,dd as ni,de as ri,df as si,d8 as oi,d9 as ii,an as ci,d3 as ui,dq as di,d7 as li,dt as mi,dw as fi,dy as hi,dF as pi,Z as yi,d4 as gi,dr as bi,ds as wi,du as xi,dx as Ei,dg as Ii,dh as Ti,d5 as Ci,dB as vi,dC as Si,y as Ai,dC as Pi,dD as _i,dE as Ri,di as qi,dj as Fi,dp as ki,dl as Bi,da as Ui,d6 as Ni,dz as Li,cU as Mi,db as Di,dm as zi,am as Gi,dA as $i,dB as Hi,dC as Oi,dA as ji,y as Wi,dC as Vi,dv as Ji}from"./ThirdwebWalletManager-8fp4vDZ-.js";import{T as aa,a as Z,W as It,b as na,U as ra,R as sa}from"./rpc-D6TzaLpS.js";import{c as Yi,A as Zi,B as Qi,C as Xi,D as tc,H as ec,I as ac,d as nc,e as rc,f as sc,J as oc,L as ic,M as cc,h as uc,P as dc,i as lc,j as mc,k as fc,l as hc,m as pc,S as yc,n as gc,o as bc,p as wc,q as xc,r as Ec,s as Ic}from"./rpc-D6TzaLpS.js";import{_ as oa}from"./index-CTPexb85.js";import{t as ia,H as ca}from"./sha256-rw7X9Nhf.js";import{aJ as Cc,aK as vc,n as Sc,o as Ac,p as Pc,q as _c,r as Rc,u as qc,v as Fc,b as kc,w as Bc,x as Uc,y as Nc,z as Lc,A as Mc,B as Dc,C as zc,D as Gc,E as $c,F as Hc,c as Oc,G as jc,I as Wc,J as Vc,d as Jc,e as Kc,f as Yc,g as Zc,h as Qc,i as Xc,a as tu,j as eu,k as au,l as nu,V as ru,W as su,X as ou,Y as iu,Z as cu,_ as uu,$ as du,m as lu,a0 as mu,a1 as fu,a2 as hu,a3 as pu,a4 as yu,a5 as gu,a6 as bu,a7 as wu,a8 as xu,a9 as Eu,L as Iu,aa as Tu,ab as Cu,ac as vu,M as Su,N as Au,O as Pu,P as _u,Q as Ru,R as qu,K as Fu,S as ku,T as Bu,U as Uu,ap as Nu,aq as Lu,ar as Mu,as as Du,at as zu,au as Gu,av as $u,ae as Hu,aw as Ou,ax as ju,ay as Wu,az as Vu,aA as Ju,aB as Ku,aC as Yu,aD as Zu,aE as Qu,aF as Xu,af as td,aG as ed,aH as ad,aI as nd,ag as rd,ah as sd,ai as od,aj as id,ak as cd,al as ud,ad as dd,am as ld,an as md,ao as fd,s as hd}from"./sha256-rw7X9Nhf.js";import{ccipRequest as yd,ccipRequest as gd,offchainLookup as bd,offchainLookupAbiItem as wd,offchainLookupSignature as xd}from"./ccip-Omot5-KO.js";import"./store-CraP4F4Y.js";import"./webauthn.min-CGpVStYZ.js";import"./index.es-gA_UXXxQ.js";function On(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Zt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Qt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:m,...h}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Xt({abi:u,args:i,functionName:m});try{return await k(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:c,account:o,...h})}catch(l){throw te(l,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:m,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function jn({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,m=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(m=!0),i&&f&&m)break;return u&&(i&&(c.read=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(r,ee,"readContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),f&&(c.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),m&&(c.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return k(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return k(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return k(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(s,M,"writeContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:l,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Wn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=U(B(t.from));let a=U(t.nonce);return a[0]===0&&(a=new Uint8Array([])),B(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=U(B(t.from)),a=Me(Tt(t.salt)?t.salt:U(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:U(t.bytecodeHash):Y(t.bytecode,"bytes");return B(De(Y(ze([U("0xff"),e,a,n])),12))}function Vn({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return la(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new mt("Invalid RLP prefix")}function la(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function ma(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),ha=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,m=this.h4|0,h=m;for(let o=0;o<5;o++){const p=4-o,l=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+l,C[x])+m|0;n=m,m=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(p,u,c,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+m+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function Jn(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?U(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let m=0;const{schedule:h}=ie({id:i,fn:async()=>{const l=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&m<d){if(b)return;b=!0,m++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else l.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of l.values())(v=S.onError)==null||v.call(S,new Z({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Z({url:s}));x()},onError(v){var P,S;w=v;for(const _ of l.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,m=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:l,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};l.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Oe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:l,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function K(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-DIXXjgvG.js"),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",m),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function m({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",m),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Z({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Z({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await K(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function Kn(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function Yn(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=le(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Q({hash:me(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Q({hash:je({domain:e,message:a,primaryType:n,types:s}),signature:r})}function Zn(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function Qn({address:t,hash:e,signature:a}){return ft(B(t),await Q({hash:e,signature:a}))}async function Xn({address:t,message:e,signature:a}){return ft(B(t),await Sa({message:e,signature:a}))}async function tr(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return ft(B(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?ka(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):Ba(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:m,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const l={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(l.to=d),E(u)&&u!=="0x"&&(l.gas=A(u)),E(i)&&i!=="0x"&&(l.data=i),E(n)&&(l.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(l.value=A(c)),E(s)&&s!=="0x"&&(l.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(l.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(l.accessList=tt(f)),m.length!==0&&m!=="0x"&&(l.authorizationList=Ua(m)),we(l),{...e.length===13?O(e):void 0,...l}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,m,h,o,p,l,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:m,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:l,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(m)&&m!=="0x"&&(I.value=A(m)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:m,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(u)&&u!=="0x"&&(p.gas=A(u)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(p.value=A(c)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),pe(p),{...e.length===12?O(e):void 0,...p}}function ka(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:m,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function Ba(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(E(s)&&s!=="0x"&&(m.to=s),E(r)&&r!=="0x"&&(m.gas=A(r)),E(d)&&d!=="0x"&&(m.data=d),E(a)&&(m.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(m.value=A(u)),E(n)&&n!=="0x"&&(m.gasPrice=A(n)),xe(m),e.length===6)return m;const h=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return h>0&&(m.chainId=Number(h)),m;const o=h,p=Number((o-35n)/2n);if(p>0)m.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return m.v=o,m.s=f,m.r=i,m.yParity=o%2n===0n?1:0,m}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!We(n,{strict:!1}))throw new Ve({address:n});e.push({address:n,storageKeys:r.map(s=>ma(s)?s:Je(s))})}return e}function Ua(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends mt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function er(t,e="wei"){return Wt(t,Ie[e])}function ar(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ja(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ka(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,l=(o||ht)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[l]})}async function Za(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Qa(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function ln(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function hn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ja(a,n),revert:n=>Ka(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Za(a,n),setBalance:n=>Qa(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>ln(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>fn(a,n)}}}function nr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...hn({mode:n})(s)}))}async function pn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ke(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,m]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=m}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>B(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ye(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:l,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new mt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await k(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ht)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),pt=ot.get(t.uid),Jt=pt?"wallet_sendTransaction":"eth_sendTransaction",Kt=await(async()=>{try{return await t.request({method:Jt,params:[z]},{retryCount:0})}catch(yt){if(pt===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await k(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Kt,pollingInterval:p,timeout:C});if(l&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await k(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await k(t,kt,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:l})}throw(b==null?void 0:b.type)==="smart"?new J({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new J({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof J?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new J({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await Bt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Ze(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,m,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await k(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ht;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(h=(m=t.chain)==null?void 0:m.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Qe({domain:n}),...e.types};if(Xe({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ta({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>pn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>Bt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>kt(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function rr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function sr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>lt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function or(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return({chain:c,pollingInterval:i=4e3,timeout:f,...m})=>{let h=t,o=()=>{};const p=lt({key:a,name:n,async request({method:l,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...m,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:l,params:y});return o({method:l,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:l,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(l):v?!v.includes(l):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:l=>o=l,transports:h.map(l=>l({chain:c,retryCount:0}))});if(r){const l=typeof r=="object"?r:{};kn({chain:c,interval:l.interval??i,onTransports:y=>h=y,ping:l.ping,sampleCount:l.sampleCount,timeout:l.timeout,transports:h,weights:l.weights})}return p}}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function kn({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],m=async()=>{const h=await Promise.all(u.map(async l=>{const y=l({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(l=>Math.max(...l.map(({latency:y})=>y)))),p=u.map((l,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((l,y)=>y[0]-l[0]);a(p.map(([,l])=>u[l])),await ke(e),m()};m()}function ir(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var l;const m=e.retryCount??i,h=f??e.timeout??1e4,o=t||((l=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:l[0]),p={keepAlive:a,reconnect:u};if(!o)throw new Be;return lt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await K(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:m,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return K(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await K(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class cr extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function ur(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new ea({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function dr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const m=c.readByte();if(m===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(m)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function lr(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Ue({commitment:s,to:n,version:a}));return r}const Bn=2147483648;function mr(t){if(t===1)return 60n;if(t>=Bn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function Un({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function fr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return Un(t)}function hr({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function pr(t){const{r:e,s:a}=Ut.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function yr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Q({hash:Y(s),signature:r})}function gr({r:t,yParityAndS:e}){return`0x${new Ut.Signature(A(t),A(e)).toCompactHex()}`}function br(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{ea as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,Eo as AbiDecodingDataSizeInvalidError,Io as AbiDecodingDataSizeTooSmallError,To as AbiDecodingZeroDataError,Co as AbiEncodingArrayLengthMismatchError,vo as AbiEncodingBytesSizeMismatchError,So as AbiEncodingLengthMismatchError,Ao as AbiErrorInputsNotFoundError,Po as AbiErrorNotFoundError,_o as AbiErrorSignatureNotFoundError,Ro as AbiEventNotFoundError,qo as AbiEventSignatureEmptyTopicsError,Fo as AbiEventSignatureNotFoundError,ko as AbiFunctionNotFoundError,Bo as AbiFunctionOutputsNotFoundError,Uo as AbiFunctionSignatureNotFoundError,Er as AccountStateConflictError,Yi as AtomicReadyWalletRejectedUpgradeError,Zi as AtomicityNotSupportedError,mt as BaseError,Ir as BaseFeeScalarError,Tr as BlockNotFoundError,Cr as BundleFailedError,Qi as BundleTooLargeError,No as BytesSizeMismatchError,vr as CallExecutionError,Xi as ChainDisconnectedError,Sr as ChainDoesNotSupportContract,Ar as ChainMismatchError,Pr as ChainNotFoundError,_r as CircularReferenceError,Rr as ClientChainNotConfiguredError,qr as ContractFunctionExecutionError,Fr as ContractFunctionRevertedError,kr as ContractFunctionZeroDataError,Br as CounterfactualDeploymentFailedError,Lo as DecodeLogDataMismatch,Mo as DecodeLogTopicsMismatch,tc as DuplicateIdError,cr as EIP1193ProviderRpcError,Ur as Eip1559FeesNotSupportedError,Nr as EnsAvatarInvalidNftUriError,Lr as EnsAvatarUnsupportedNamespaceError,Mr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Dr as EstimateGasExecutionError,Fe as ExecutionRevertedError,zr as FeeCapTooHighError,Gr as FeeCapTooLowError,$r as FeeConflictError,Do as FilterTypeNotSupportedError,ec as HttpRequestError,Hr as InsufficientFundsError,zo as IntegerOutOfRangeError,ac as InternalRpcError,Or as IntrinsicGasTooHighError,jr as IntrinsicGasTooLowError,Go as InvalidAbiDecodingTypeError,$o as InvalidAbiEncodingTypeError,Wr as InvalidAbiItemError,Qt as InvalidAbiParameterError,Vr as InvalidAbiParametersError,Jr as InvalidAbiTypeParameterError,Ve as InvalidAddressError,Ho as InvalidArrayError,Oo as InvalidBytesBooleanError,Kr as InvalidChainIdError,Na as InvalidDecimalNumberError,jo as InvalidDefinitionTypeError,Wo as InvalidDomainError,Yr as InvalidFunctionModifierError,Vo as InvalidHexBooleanError,Ge as InvalidHexValueError,nc as InvalidInputRpcError,Ee as InvalidLegacyVError,Zr as InvalidModifierError,Qr as InvalidParameterError,rc as InvalidParamsRpcError,Xr as InvalidParenthesisError,Jo as InvalidPrimaryTypeError,sc as InvalidRequestRpcError,ts as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,es as InvalidSignatureError,as as InvalidStorageKeySizeError,ns as InvalidStructSignatureError,Ko as InvalidStructTypeError,oc as JsonRpcVersionUnsupportedError,ic as LimitExceededRpcError,rs as MaxFeePerGasTooLowError,cc as MethodNotFoundRpcError,uc as MethodNotSupportedRpcError,ss as NonceMaxValueError,os as NonceTooHighError,is as NonceTooLowError,dc as ParseRpcError,lc as ProviderDisconnectedError,mc as ProviderRpcError,cs as RawContractError,fc as ResourceNotFoundRpcError,hc as ResourceUnavailableRpcError,pc as RpcError,sa as RpcRequestError,Yo as SizeExceedsPaddingSizeError,Zo as SizeOverflowError,Qo as SliceOffsetOutOfBoundsError,Z as SocketClosedError,us as SolidityProtectedKeywordError,ds as StateAssignmentConflictError,yc as SwitchChainError,aa as TimeoutError,ls as TipAboveFeeCapError,ms as TransactionExecutionError,fs as TransactionNotFoundError,hs as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,ps as TransactionTypeNotSupportedError,gc as UnauthorizedProviderError,bc as UnknownBundleIdError,ys as UnknownNodeError,wc as UnknownRpcError,gs as UnknownSignatureError,bs as UnknownTypeError,xc as UnsupportedChainIdError,Ec as UnsupportedNonOptionalCapabilityError,Xo as UnsupportedPackedAbiType,Ic as UnsupportedProviderMethodError,Be as UrlRequiredError,ra as UserRejectedRequestError,ws as WaitForCallsStatusTimeoutError,xs as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,pe as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,Es as blobsToCommitments,Is as blobsToProofs,ti as boolToBytes,ei as boolToHex,ai as bytesToBigInt,ni as bytesToBool,G as bytesToHex,ri as bytesToNumber,Cc as bytesToRlp,si as bytesToString,yd as ccipFetch,gd as ccipRequest,Ke as checksumAddress,Ue as commitmentToVersionedHash,Ts as commitmentsToVersionedHashes,gr as compactSignatureToHex,hr as compactSignatureToSignature,ze as concat,oi as concatBytes,ii as concatHex,At as createClient,Cs as createNonceManager,vs as createPublicClient,nr as createTestClient,lt as createTransport,rr as createWalletClient,sr as custom,Mt as decodeAbiParameters,ur as decodeDeployData,ci as decodeErrorResult,ui as decodeEventLog,Ss as decodeFunctionData,As as decodeFunctionResult,di as defineBlock,li as defineChain,Un as defineKzg,mi as defineTransaction,fi as defineTransactionReceipt,hi as defineTransactionRequest,Ps as deploylessCallViaBytecodeBytecode,_s as deploylessCallViaFactoryBytecode,pi as domainSeparator,yi as encodeAbiParameters,Ce as encodeDeployData,Rs as encodeErrorResult,gi as encodeEventTopics,Xt as encodeFunctionData,qs as encodeFunctionResult,Fs as encodePacked,ks as erc1155Abi,Bs as erc20Abi,Us as erc20Abi_bytes32,Ns as erc4626Abi,Ls as erc6492SignatureValidatorAbi,Ms as erc6492SignatureValidatorByteCode,Ds as erc721Abi,zs as ethAddress,Ie as etherUnits,Vn as extractChain,or as fallback,bi as formatBlock,Gs as formatEther,$s as formatGwei,wi as formatLog,xi as formatTransaction,Ei as formatTransactionReceipt,ht as formatTransactionRequest,Hs as formatUnits,dr as fromBlobs,Ii as fromBytes,Ti as fromHex,Dt as fromRlp,Ci as getAbiItem,B as getAddress,Os as getChainContractAddress,jn as getContract,Wn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,vi as getEventSelector,Si as getEventSignature,Ai as getFunctionSelector,Pi as getFunctionSignature,Pa as getSerializedTransactionType,js as getTransactionType,Qe as getTypesForEIP712Domain,Te as gweiUnits,_i as hashDomain,me as hashMessage,Ri as hashStruct,je as hashTypedData,A as hexToBigInt,qi as hexToBool,H as hexToBytes,pr as hexToCompactSignature,F as hexToNumber,vc as hexToRlp,Ws as hexToSignature,Fi as hexToString,Vs as http,We as isAddress,ft as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,ma as isHash,E as isHex,Y as keccak256,ki as labelhash,Sc as maxInt104,Ac as maxInt112,Pc as maxInt120,_c as maxInt128,Rc as maxInt136,qc as maxInt144,Fc as maxInt152,kc as maxInt16,Bc as maxInt160,Uc as maxInt168,Nc as maxInt176,Lc as maxInt184,Mc as maxInt192,Dc as maxInt200,zc as maxInt208,Gc as maxInt216,$c as maxInt224,Hc as maxInt232,Oc as maxInt24,jc as maxInt240,Wc as maxInt248,Vc as maxInt256,Jc as maxInt32,Kc as maxInt40,Yc as maxInt48,Zc as maxInt56,Qc as maxInt64,Xc as maxInt72,tu as maxInt8,eu as maxInt80,au as maxInt88,nu as maxInt96,ru as maxUint104,su as maxUint112,ou as maxUint120,iu as maxUint128,cu as maxUint136,uu as maxUint144,du as maxUint152,lu as maxUint16,mu as maxUint160,fu as maxUint168,hu as maxUint176,pu as maxUint184,yu as maxUint192,gu as maxUint200,bu as maxUint208,wu as maxUint216,xu as maxUint224,Eu as maxUint232,Iu as maxUint24,Tu as maxUint240,Cu as maxUint248,vu as maxUint256,Su as maxUint32,Au as maxUint40,Pu as maxUint48,_u as maxUint56,Ru as maxUint64,qu as maxUint72,Fu as maxUint8,ku as maxUint80,Bu as maxUint88,Uu as maxUint96,Nu as minInt104,Lu as minInt112,Mu as minInt120,Du as minInt128,zu as minInt136,Gu as minInt144,$u as minInt152,Hu as minInt16,Ou as minInt160,ju as minInt168,Wu as minInt176,Vu as minInt184,Ju as minInt192,Ku as minInt200,Yu as minInt208,Zu as minInt216,Qu as minInt224,Xu as minInt232,td as minInt24,ed as minInt240,ad as minInt248,nd as minInt256,rd as minInt32,sd as minInt40,od as minInt48,id as minInt56,cd as minInt64,ud as minInt72,dd as minInt8,ld as minInt80,md as minInt88,fd as minInt96,Js as multicall3Abi,Ks as namehash,Ys as nonceManager,Bi as numberToBytes,R as numberToHex,bd as offchainLookup,wd as offchainLookupAbiItem,xd as offchainLookupSignature,Me as pad,Ui as padBytes,xt as padHex,Zs as parseAbi,Qs as parseAbiItem,On as parseAbiParameter,Xs as parseAbiParameters,pr as parseCompactSignature,Kn as parseErc6492Signature,Yn as parseErc8010Signature,er as parseEther,Ni as parseEventLogs,ar as parseGwei,to as parseSignature,_a as parseTransaction,Wt as parseUnits,eo as prepareEncodeFunctionData,ao as presignMessagePrefix,no as publicActions,Q as recoverAddress,Sa as recoverMessageAddress,ro as recoverPublicKey,yr as recoverTransactionAddress,Aa as recoverTypedDataAddress,Jn as ripemd160,so as rpcSchema,Li as rpcTransactionType,oo as serializeAccessList,gr as serializeCompactSignature,io as serializeErc6492Signature,Zn as serializeErc8010Signature,co as serializeSignature,Le as serializeTransaction,ta as serializeTypedData,Mi as setErrorConfig,fr as setupKzg,hd as sha256,Fn as shouldThrow,lr as sidecarsToVersionedHashes,br as signatureToCompactSignature,uo as signatureToHex,$e as size,De as slice,Di as sliceBytes,Lt as sliceHex,zi as stringToBytes,Ze as stringToHex,Gi as stringify,hn as testActions,ge as toBlobSidecars,lo as toBlobs,U as toBytes,mr as toCoinType,$i as toEventHash,Hi as toEventSelector,Oi as toEventSignature,ji as toFunctionHash,Wi as toFunctionSelector,Vi as toFunctionSignature,Nt as toHex,mo as toPrefixedMessage,ia as toRlp,Ji as transactionType,Je as trim,fo as universalSignatureValidatorAbi,ho as universalSignatureValidatorByteCode,Xe as validateTypedData,Qn as verifyHash,Xn as verifyMessage,tr as verifyTypedData,qn as walletActions,ir as webSocket,po as weiUnits,yo as withCache,go as withRetry,Oe as withTimeout,bo as zeroAddress,wo as zeroHash};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-DlthNI6_.js","assets/index-C9kcmpvP.js","assets/index-BGvsmbMC.css"])))=>i.map(i=>d[i]);
2
+ import{p as gt,m as bt,b as Yt,i as Zt,I as Qt,s as ut,A as D,e as Xt,g as k,d as N,f as te,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as le,x as Q,y as me,z as fe,B as he,C as $,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as kt,$ as J,a0 as _e,a1 as Bt,a2 as Re,a3 as qe,a4 as lt,a5 as Fe,a6 as ke,a7 as Be,a8 as Ue,a9 as Ne,aa as Ut,ab as Le}from"./parseSignature-BC-PtSTA.js";import{bf as Er,b1 as Ir,aM as Tr,aN as Cr,aT as vr,aO as Sr,aP as Ar,aQ as Pr,ac as _r,aR as Rr,aU as qr,aV as Fr,aW as kr,aX as Br,b2 as Ur,aZ as Nr,a_ as Lr,a$ as Mr,b0 as Dr,b4 as zr,b5 as Gr,bh as $r,b6 as Hr,b7 as Or,b8 as jr,ad as Wr,ae as Vr,af as Jr,aS as Kr,ag as Yr,ah as Zr,ai as Qr,aj as Xr,bi as ts,ak as es,bj as as,al as ns,b3 as rs,b9 as ss,ba as os,bb as is,aY as cs,ap as us,bg as ds,bc as ls,bk as ms,bl as fs,bm as hs,bd as ps,be as ys,aq as gs,ar as bs,as as ws,bn as xs,bu as Es,bv as Is,bw as Ts,bA as Cs,au as vs,bo as Ss,bp as As,aH as Ps,aI as _s,bq as Rs,br as qs,bs as Fs,aA as ks,ax as Bs,ay as Us,aB as Ns,aC as Ls,aJ as Ms,az as Ds,aE as zs,bL as Gs,bM as $s,bN as Hs,by as Os,bJ as js,bE as Ws,aw as Vs,aD as Js,bz as Ks,bB as Ys,am as Zs,an as Qs,ao as Xs,bE as to,bt as eo,aK as ao,av as no,bF as ro,at as so,bK as oo,bG as io,bH as co,bH as uo,bx as lo,bI as mo,aC as fo,aJ as ho,aL as po,bC as yo,bD as go,aF as bo,aG as wo}from"./parseSignature-BC-PtSTA.js";import{aC as U,cb as B,aD as Me,cc as Y,cd as De,ap as ze,ce as Ge,aG as H,aH as ct,aI as G,al as mt,aq as E,cf as $e,aQ as He,cg as j,aP as wt,aS as Nt,ch as Oe,ci as Lt,x as Mt,cj as R,ck as je,ao as ft,cl as F,cm as A,cn as We,co as Ve,cp as Je,cq as xt,cr as ht,cs as Ke,ct as Ye,cu as Ze,j as Qe,v as Xe,k as ta,cv as ea,cw as Et}from"./ThirdwebWalletManager-_8PV4raS.js";import{cx as Eo,cy as Io,cz as To,cA as Co,cB as vo,cC as So,cD as Ao,cE as Po,cF as _o,cG as Ro,cH as qo,cI as Fo,cJ as ko,cK as Bo,cL as Uo,cM as No,cN as Lo,cO as Mo,c$ as Do,cX as zo,cP as Go,cQ as $o,cR as Ho,cY as Oo,cS as jo,d0 as Wo,cZ as Vo,d1 as Jo,d2 as Ko,cV as Yo,c_ as Zo,cW as Qo,cT as Xo,dk as ti,dn as ei,dc as ai,dd as ni,de as ri,df as si,d8 as oi,d9 as ii,an as ci,d3 as ui,dq as di,d7 as li,dt as mi,dw as fi,dy as hi,dF as pi,Z as yi,d4 as gi,dr as bi,ds as wi,du as xi,dx as Ei,dg as Ii,dh as Ti,d5 as Ci,dB as vi,dC as Si,y as Ai,dC as Pi,dD as _i,dE as Ri,di as qi,dj as Fi,dp as ki,dl as Bi,da as Ui,d6 as Ni,dz as Li,cU as Mi,db as Di,dm as zi,am as Gi,dA as $i,dB as Hi,dC as Oi,dA as ji,y as Wi,dC as Vi,dv as Ji}from"./ThirdwebWalletManager-_8PV4raS.js";import{T as aa,a as Z,W as It,b as na,U as ra,R as sa}from"./rpc-fTN6Lg8H.js";import{c as Yi,A as Zi,B as Qi,C as Xi,D as tc,H as ec,I as ac,d as nc,e as rc,f as sc,J as oc,L as ic,M as cc,h as uc,P as dc,i as lc,j as mc,k as fc,l as hc,m as pc,S as yc,n as gc,o as bc,p as wc,q as xc,r as Ec,s as Ic}from"./rpc-fTN6Lg8H.js";import{_ as oa}from"./index-C9kcmpvP.js";import{t as ia,H as ca}from"./sha256-EtKFmWln.js";import{aJ as Cc,aK as vc,n as Sc,o as Ac,p as Pc,q as _c,r as Rc,u as qc,v as Fc,b as kc,w as Bc,x as Uc,y as Nc,z as Lc,A as Mc,B as Dc,C as zc,D as Gc,E as $c,F as Hc,c as Oc,G as jc,I as Wc,J as Vc,d as Jc,e as Kc,f as Yc,g as Zc,h as Qc,i as Xc,a as tu,j as eu,k as au,l as nu,V as ru,W as su,X as ou,Y as iu,Z as cu,_ as uu,$ as du,m as lu,a0 as mu,a1 as fu,a2 as hu,a3 as pu,a4 as yu,a5 as gu,a6 as bu,a7 as wu,a8 as xu,a9 as Eu,L as Iu,aa as Tu,ab as Cu,ac as vu,M as Su,N as Au,O as Pu,P as _u,Q as Ru,R as qu,K as Fu,S as ku,T as Bu,U as Uu,ap as Nu,aq as Lu,ar as Mu,as as Du,at as zu,au as Gu,av as $u,ae as Hu,aw as Ou,ax as ju,ay as Wu,az as Vu,aA as Ju,aB as Ku,aC as Yu,aD as Zu,aE as Qu,aF as Xu,af as td,aG as ed,aH as ad,aI as nd,ag as rd,ah as sd,ai as od,aj as id,ak as cd,al as ud,ad as dd,am as ld,an as md,ao as fd,s as hd}from"./sha256-EtKFmWln.js";import{ccipRequest as yd,ccipRequest as gd,offchainLookup as bd,offchainLookupAbiItem as wd,offchainLookupSignature as xd}from"./ccip-PybIhCr_.js";import"./store-CraP4F4Y.js";import"./webauthn.min-CGpVStYZ.js";import"./index.es-D0_25Oh-.js";function On(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Zt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Qt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:m,...h}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Xt({abi:u,args:i,functionName:m});try{return await k(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:c,account:o,...h})}catch(l){throw te(l,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:m,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function jn({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,m=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(m=!0),i&&f&&m)break;return u&&(i&&(c.read=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(r,ee,"readContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),f&&(c.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),m&&(c.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return k(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return k(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return k(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(s,M,"writeContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return k(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:l,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function Wn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=U(B(t.from));let a=U(t.nonce);return a[0]===0&&(a=new Uint8Array([])),B(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=U(B(t.from)),a=Me(Tt(t.salt)?t.salt:U(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:U(t.bytecodeHash):Y(t.bytecode,"bytes");return B(De(Y(ze([U("0xff"),e,a,n])),12))}function Vn({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return la(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new mt("Invalid RLP prefix")}function la(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function ma(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),ha=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,m=this.h4|0,h=m;for(let o=0;o<5;o++){const p=4-o,l=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+l,C[x])+m|0;n=m,m=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(p,u,c,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+m+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function Jn(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?U(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let m=0;const{schedule:h}=ie({id:i,fn:async()=>{const l=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&m<d){if(b)return;b=!0,m++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else l.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of l.values())(v=S.onError)==null||v.call(S,new Z({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Z({url:s}));x()},onError(v){var P,S;w=v;for(const _ of l.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,m=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:l,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};l.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Oe(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:l,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function K(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-DlthNI6_.js"),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",m),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function m({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",m),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Z({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Z({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await K(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function Kn(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function Yn(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=le(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Q({hash:me(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Q({hash:je({domain:e,message:a,primaryType:n,types:s}),signature:r})}function Zn(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function Qn({address:t,hash:e,signature:a}){return ft(B(t),await Q({hash:e,signature:a}))}async function Xn({address:t,message:e,signature:a}){return ft(B(t),await Sa({message:e,signature:a}))}async function tr(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return ft(B(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?ka(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):Ba(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:m,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const l={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(l.to=d),E(u)&&u!=="0x"&&(l.gas=A(u)),E(i)&&i!=="0x"&&(l.data=i),E(n)&&(l.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(l.value=A(c)),E(s)&&s!=="0x"&&(l.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(l.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(l.accessList=tt(f)),m.length!==0&&m!=="0x"&&(l.authorizationList=Ua(m)),we(l),{...e.length===13?O(e):void 0,...l}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,m,h,o,p,l,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:m,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:l,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(m)&&m!=="0x"&&(I.value=A(m)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:m,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(u)&&u!=="0x"&&(p.gas=A(u)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(p.value=A(c)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),pe(p),{...e.length===12?O(e):void 0,...p}}function ka(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:m,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function Ba(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(E(s)&&s!=="0x"&&(m.to=s),E(r)&&r!=="0x"&&(m.gas=A(r)),E(d)&&d!=="0x"&&(m.data=d),E(a)&&(m.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(m.value=A(u)),E(n)&&n!=="0x"&&(m.gasPrice=A(n)),xe(m),e.length===6)return m;const h=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return h>0&&(m.chainId=Number(h)),m;const o=h,p=Number((o-35n)/2n);if(p>0)m.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return m.v=o,m.s=f,m.r=i,m.yParity=o%2n===0n?1:0,m}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!We(n,{strict:!1}))throw new Ve({address:n});e.push({address:n,storageKeys:r.map(s=>ma(s)?s:Je(s))})}return e}function Ua(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends mt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function er(t,e="wei"){return Wt(t,Ie[e])}function ar(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ja(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ka(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,l=(o||ht)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[l]})}async function Za(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Qa(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function ln(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function hn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ja(a,n),revert:n=>Ka(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Za(a,n),setBalance:n=>Qa(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>ln(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>fn(a,n)}}}function nr(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...hn({mode:n})(s)}))}async function pn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ke(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,m]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=m}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>B(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Ye(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:l,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new mt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await k(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ht)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),pt=ot.get(t.uid),Jt=pt?"wallet_sendTransaction":"eth_sendTransaction",Kt=await(async()=>{try{return await t.request({method:Jt,params:[z]},{retryCount:0})}catch(yt){if(pt===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await k(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Kt,pollingInterval:p,timeout:C});if(l&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await k(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await k(t,kt,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:l})}throw(b==null?void 0:b.type)==="smart"?new J({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new J({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof J?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new J({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await Bt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Ze(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,m,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await k(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ht;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(h=(m=t.chain)==null?void 0:m.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Qe({domain:n}),...e.types};if(Xe({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ta({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>pn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>Bt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>kt(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function rr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function sr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>lt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function or(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return({chain:c,pollingInterval:i=4e3,timeout:f,...m})=>{let h=t,o=()=>{};const p=lt({key:a,name:n,async request({method:l,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...m,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:l,params:y});return o({method:l,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:l,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(l):v?!v.includes(l):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:l=>o=l,transports:h.map(l=>l({chain:c,retryCount:0}))});if(r){const l=typeof r=="object"?r:{};kn({chain:c,interval:l.interval??i,onTransports:y=>h=y,ping:l.ping,sampleCount:l.sampleCount,timeout:l.timeout,transports:h,weights:l.weights})}return p}}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function kn({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],m=async()=>{const h=await Promise.all(u.map(async l=>{const y=l({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(l=>Math.max(...l.map(({latency:y})=>y)))),p=u.map((l,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((l,y)=>y[0]-l[0]);a(p.map(([,l])=>u[l])),await ke(e),m()};m()}function ir(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var l;const m=e.retryCount??i,h=f??e.timeout??1e4,o=t||((l=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:l[0]),p={keepAlive:a,reconnect:u};if(!o)throw new Be;return lt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await K(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:m,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return K(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await K(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class cr extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function ur(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new ea({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function dr(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const m=c.readByte();if(m===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(m)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function lr(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Ue({commitment:s,to:n,version:a}));return r}const Bn=2147483648;function mr(t){if(t===1)return 60n;if(t>=Bn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function Un({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function fr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return Un(t)}function hr({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function pr(t){const{r:e,s:a}=Ut.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function yr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Q({hash:Y(s),signature:r})}function gr({r:t,yParityAndS:e}){return`0x${new Ut.Signature(A(t),A(e)).toCompactHex()}`}function br(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{ea as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,Eo as AbiDecodingDataSizeInvalidError,Io as AbiDecodingDataSizeTooSmallError,To as AbiDecodingZeroDataError,Co as AbiEncodingArrayLengthMismatchError,vo as AbiEncodingBytesSizeMismatchError,So as AbiEncodingLengthMismatchError,Ao as AbiErrorInputsNotFoundError,Po as AbiErrorNotFoundError,_o as AbiErrorSignatureNotFoundError,Ro as AbiEventNotFoundError,qo as AbiEventSignatureEmptyTopicsError,Fo as AbiEventSignatureNotFoundError,ko as AbiFunctionNotFoundError,Bo as AbiFunctionOutputsNotFoundError,Uo as AbiFunctionSignatureNotFoundError,Er as AccountStateConflictError,Yi as AtomicReadyWalletRejectedUpgradeError,Zi as AtomicityNotSupportedError,mt as BaseError,Ir as BaseFeeScalarError,Tr as BlockNotFoundError,Cr as BundleFailedError,Qi as BundleTooLargeError,No as BytesSizeMismatchError,vr as CallExecutionError,Xi as ChainDisconnectedError,Sr as ChainDoesNotSupportContract,Ar as ChainMismatchError,Pr as ChainNotFoundError,_r as CircularReferenceError,Rr as ClientChainNotConfiguredError,qr as ContractFunctionExecutionError,Fr as ContractFunctionRevertedError,kr as ContractFunctionZeroDataError,Br as CounterfactualDeploymentFailedError,Lo as DecodeLogDataMismatch,Mo as DecodeLogTopicsMismatch,tc as DuplicateIdError,cr as EIP1193ProviderRpcError,Ur as Eip1559FeesNotSupportedError,Nr as EnsAvatarInvalidNftUriError,Lr as EnsAvatarUnsupportedNamespaceError,Mr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Dr as EstimateGasExecutionError,Fe as ExecutionRevertedError,zr as FeeCapTooHighError,Gr as FeeCapTooLowError,$r as FeeConflictError,Do as FilterTypeNotSupportedError,ec as HttpRequestError,Hr as InsufficientFundsError,zo as IntegerOutOfRangeError,ac as InternalRpcError,Or as IntrinsicGasTooHighError,jr as IntrinsicGasTooLowError,Go as InvalidAbiDecodingTypeError,$o as InvalidAbiEncodingTypeError,Wr as InvalidAbiItemError,Qt as InvalidAbiParameterError,Vr as InvalidAbiParametersError,Jr as InvalidAbiTypeParameterError,Ve as InvalidAddressError,Ho as InvalidArrayError,Oo as InvalidBytesBooleanError,Kr as InvalidChainIdError,Na as InvalidDecimalNumberError,jo as InvalidDefinitionTypeError,Wo as InvalidDomainError,Yr as InvalidFunctionModifierError,Vo as InvalidHexBooleanError,Ge as InvalidHexValueError,nc as InvalidInputRpcError,Ee as InvalidLegacyVError,Zr as InvalidModifierError,Qr as InvalidParameterError,rc as InvalidParamsRpcError,Xr as InvalidParenthesisError,Jo as InvalidPrimaryTypeError,sc as InvalidRequestRpcError,ts as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,es as InvalidSignatureError,as as InvalidStorageKeySizeError,ns as InvalidStructSignatureError,Ko as InvalidStructTypeError,oc as JsonRpcVersionUnsupportedError,ic as LimitExceededRpcError,rs as MaxFeePerGasTooLowError,cc as MethodNotFoundRpcError,uc as MethodNotSupportedRpcError,ss as NonceMaxValueError,os as NonceTooHighError,is as NonceTooLowError,dc as ParseRpcError,lc as ProviderDisconnectedError,mc as ProviderRpcError,cs as RawContractError,fc as ResourceNotFoundRpcError,hc as ResourceUnavailableRpcError,pc as RpcError,sa as RpcRequestError,Yo as SizeExceedsPaddingSizeError,Zo as SizeOverflowError,Qo as SliceOffsetOutOfBoundsError,Z as SocketClosedError,us as SolidityProtectedKeywordError,ds as StateAssignmentConflictError,yc as SwitchChainError,aa as TimeoutError,ls as TipAboveFeeCapError,ms as TransactionExecutionError,fs as TransactionNotFoundError,hs as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,ps as TransactionTypeNotSupportedError,gc as UnauthorizedProviderError,bc as UnknownBundleIdError,ys as UnknownNodeError,wc as UnknownRpcError,gs as UnknownSignatureError,bs as UnknownTypeError,xc as UnsupportedChainIdError,Ec as UnsupportedNonOptionalCapabilityError,Xo as UnsupportedPackedAbiType,Ic as UnsupportedProviderMethodError,Be as UrlRequiredError,ra as UserRejectedRequestError,ws as WaitForCallsStatusTimeoutError,xs as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,pe as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,Es as blobsToCommitments,Is as blobsToProofs,ti as boolToBytes,ei as boolToHex,ai as bytesToBigInt,ni as bytesToBool,G as bytesToHex,ri as bytesToNumber,Cc as bytesToRlp,si as bytesToString,yd as ccipFetch,gd as ccipRequest,Ke as checksumAddress,Ue as commitmentToVersionedHash,Ts as commitmentsToVersionedHashes,gr as compactSignatureToHex,hr as compactSignatureToSignature,ze as concat,oi as concatBytes,ii as concatHex,At as createClient,Cs as createNonceManager,vs as createPublicClient,nr as createTestClient,lt as createTransport,rr as createWalletClient,sr as custom,Mt as decodeAbiParameters,ur as decodeDeployData,ci as decodeErrorResult,ui as decodeEventLog,Ss as decodeFunctionData,As as decodeFunctionResult,di as defineBlock,li as defineChain,Un as defineKzg,mi as defineTransaction,fi as defineTransactionReceipt,hi as defineTransactionRequest,Ps as deploylessCallViaBytecodeBytecode,_s as deploylessCallViaFactoryBytecode,pi as domainSeparator,yi as encodeAbiParameters,Ce as encodeDeployData,Rs as encodeErrorResult,gi as encodeEventTopics,Xt as encodeFunctionData,qs as encodeFunctionResult,Fs as encodePacked,ks as erc1155Abi,Bs as erc20Abi,Us as erc20Abi_bytes32,Ns as erc4626Abi,Ls as erc6492SignatureValidatorAbi,Ms as erc6492SignatureValidatorByteCode,Ds as erc721Abi,zs as ethAddress,Ie as etherUnits,Vn as extractChain,or as fallback,bi as formatBlock,Gs as formatEther,$s as formatGwei,wi as formatLog,xi as formatTransaction,Ei as formatTransactionReceipt,ht as formatTransactionRequest,Hs as formatUnits,dr as fromBlobs,Ii as fromBytes,Ti as fromHex,Dt as fromRlp,Ci as getAbiItem,B as getAddress,Os as getChainContractAddress,jn as getContract,Wn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,vi as getEventSelector,Si as getEventSignature,Ai as getFunctionSelector,Pi as getFunctionSignature,Pa as getSerializedTransactionType,js as getTransactionType,Qe as getTypesForEIP712Domain,Te as gweiUnits,_i as hashDomain,me as hashMessage,Ri as hashStruct,je as hashTypedData,A as hexToBigInt,qi as hexToBool,H as hexToBytes,pr as hexToCompactSignature,F as hexToNumber,vc as hexToRlp,Ws as hexToSignature,Fi as hexToString,Vs as http,We as isAddress,ft as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,ma as isHash,E as isHex,Y as keccak256,ki as labelhash,Sc as maxInt104,Ac as maxInt112,Pc as maxInt120,_c as maxInt128,Rc as maxInt136,qc as maxInt144,Fc as maxInt152,kc as maxInt16,Bc as maxInt160,Uc as maxInt168,Nc as maxInt176,Lc as maxInt184,Mc as maxInt192,Dc as maxInt200,zc as maxInt208,Gc as maxInt216,$c as maxInt224,Hc as maxInt232,Oc as maxInt24,jc as maxInt240,Wc as maxInt248,Vc as maxInt256,Jc as maxInt32,Kc as maxInt40,Yc as maxInt48,Zc as maxInt56,Qc as maxInt64,Xc as maxInt72,tu as maxInt8,eu as maxInt80,au as maxInt88,nu as maxInt96,ru as maxUint104,su as maxUint112,ou as maxUint120,iu as maxUint128,cu as maxUint136,uu as maxUint144,du as maxUint152,lu as maxUint16,mu as maxUint160,fu as maxUint168,hu as maxUint176,pu as maxUint184,yu as maxUint192,gu as maxUint200,bu as maxUint208,wu as maxUint216,xu as maxUint224,Eu as maxUint232,Iu as maxUint24,Tu as maxUint240,Cu as maxUint248,vu as maxUint256,Su as maxUint32,Au as maxUint40,Pu as maxUint48,_u as maxUint56,Ru as maxUint64,qu as maxUint72,Fu as maxUint8,ku as maxUint80,Bu as maxUint88,Uu as maxUint96,Nu as minInt104,Lu as minInt112,Mu as minInt120,Du as minInt128,zu as minInt136,Gu as minInt144,$u as minInt152,Hu as minInt16,Ou as minInt160,ju as minInt168,Wu as minInt176,Vu as minInt184,Ju as minInt192,Ku as minInt200,Yu as minInt208,Zu as minInt216,Qu as minInt224,Xu as minInt232,td as minInt24,ed as minInt240,ad as minInt248,nd as minInt256,rd as minInt32,sd as minInt40,od as minInt48,id as minInt56,cd as minInt64,ud as minInt72,dd as minInt8,ld as minInt80,md as minInt88,fd as minInt96,Js as multicall3Abi,Ks as namehash,Ys as nonceManager,Bi as numberToBytes,R as numberToHex,bd as offchainLookup,wd as offchainLookupAbiItem,xd as offchainLookupSignature,Me as pad,Ui as padBytes,xt as padHex,Zs as parseAbi,Qs as parseAbiItem,On as parseAbiParameter,Xs as parseAbiParameters,pr as parseCompactSignature,Kn as parseErc6492Signature,Yn as parseErc8010Signature,er as parseEther,Ni as parseEventLogs,ar as parseGwei,to as parseSignature,_a as parseTransaction,Wt as parseUnits,eo as prepareEncodeFunctionData,ao as presignMessagePrefix,no as publicActions,Q as recoverAddress,Sa as recoverMessageAddress,ro as recoverPublicKey,yr as recoverTransactionAddress,Aa as recoverTypedDataAddress,Jn as ripemd160,so as rpcSchema,Li as rpcTransactionType,oo as serializeAccessList,gr as serializeCompactSignature,io as serializeErc6492Signature,Zn as serializeErc8010Signature,co as serializeSignature,Le as serializeTransaction,ta as serializeTypedData,Mi as setErrorConfig,fr as setupKzg,hd as sha256,Fn as shouldThrow,lr as sidecarsToVersionedHashes,br as signatureToCompactSignature,uo as signatureToHex,$e as size,De as slice,Di as sliceBytes,Lt as sliceHex,zi as stringToBytes,Ze as stringToHex,Gi as stringify,hn as testActions,ge as toBlobSidecars,lo as toBlobs,U as toBytes,mr as toCoinType,$i as toEventHash,Hi as toEventSelector,Oi as toEventSignature,ji as toFunctionHash,Wi as toFunctionSelector,Vi as toFunctionSignature,Nt as toHex,mo as toPrefixedMessage,ia as toRlp,Ji as transactionType,Je as trim,fo as universalSignatureValidatorAbi,ho as universalSignatureValidatorByteCode,Xe as validateTypedData,Qn as verifyHash,Xn as verifyMessage,tr as verifyTypedData,qn as walletActions,ir as webSocket,po as weiUnits,yo as withCache,go as withRetry,Oe as withTimeout,bo as zeroAddress,wo as zeroHash};
@@ -1,4 +1,4 @@
1
- import{j as g,l as f,R as u,m as e,E as P,r as k,k as A}from"./index-TCzvey27.js";import{r as y,c as b,n as w}from"./index-BDYX4pI8.js";import"./index-FfyQsjIX.js";import{H as x}from"./HelpersUtil-UXuUdUo1.js";import{o as v}from"./if-defined-Cf2AacYL.js";import"./index-2bKn2TSE.js";import"./index-_D0X6y83.js";const I=g`
1
+ import{j as g,l as f,R as u,m as e,E as P,r as k,k as A}from"./index-CyiA1q8T.js";import{r as y,c as b,n as w}from"./index-Dn7k_DQ8.js";import"./index-Bp09MjvQ.js";import{H as x}from"./HelpersUtil-DSbuW6K9.js";import{o as v}from"./if-defined-DDCgUiYp.js";import"./index-CMJ_znKB.js";import"./index-CP8kDNsr.js";const I=g`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-DIXXjgvG.js","assets/index-CTPexb85.js","assets/index-DAiWSMFC.css"])))=>i.map(i=>d[i]);
2
- import{p as gt,b as Yt,i as Zt,I as Qt,m as bt,s as ut,A as D,e as Xt,g as U,d as N,f as te,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as le,x as Q,y as me,z as fe,B as he,C as $,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as Ut,$ as J,a0 as _e,a1 as kt,a2 as Re,a3 as qe,a4 as lt,a5 as Fe,a6 as Ue,a7 as ke,a8 as Be,a9 as Ne,aa as Bt,ab as Le}from"./parseSignature-DdX47xNk.js";import{bf as xr,b1 as Er,aM as Ir,aN as Tr,aT as Cr,aO as vr,aP as Sr,aQ as Ar,ac as Pr,aR as _r,aU as Rr,aV as qr,aW as Fr,aX as Ur,b2 as kr,aZ as Br,a_ as Nr,a$ as Lr,b0 as Mr,b4 as Dr,b5 as zr,bh as Gr,b6 as $r,b7 as Hr,b8 as Or,ad as jr,ae as Wr,af as Vr,aS as Jr,ag as Kr,ah as Yr,ai as Zr,aj as Qr,bi as Xr,ak as ts,bj as es,al as as,b3 as ns,b9 as rs,ba as ss,bb as os,aY as is,ap as cs,bg as us,bc as ds,bk as ls,bl as ms,bm as fs,bd as hs,be as ps,aq as ys,ar as gs,as as bs,bn as ws,bu as xs,bv as Es,bw as Is,bB as Ts,au as Cs,bo as vs,bp as Ss,aH as As,aI as Ps,bq as _s,br as Rs,bs as qs,aA as Fs,ax as Us,ay as ks,aB as Bs,aC as Ns,aJ as Ls,az as Ms,aE as Ds,bM as zs,bN as Gs,bO as $s,by as Hs,bK as Os,bF as js,aw as Ws,bz as Vs,aD as Js,bA as Ks,bC as Ys,am as Zs,an as Qs,ao as Xs,bF as to,bt as eo,aK as ao,av as no,bG as ro,at as so,bL as oo,bH as io,bI as co,bI as uo,bx as lo,bJ as mo,aC as fo,aJ as ho,aL as po,bD as yo,bE as go,aF as bo,aG as wo}from"./parseSignature-DdX47xNk.js";import{T as B,ba as k,U as Me,I as Y,bb as De,G as ze,bc as Ge,X as H,_ as ct,$ as G,B as mt,D as E,P as $e,a7 as He,bd as j,a6 as wt,R as Nt,be as Lt,d as Mt,L as R,F as ft,A as F,bf as A,M as Oe,N as je,bg as We,bh as xt,aH as ht,J as Ve,bi as Je,bj as Ke,bk as Ye,bl as Et}from"./signing-D7VaTtN_.js";import{bm as Eo,bn as Io,bo as To,bp as Co,bq as vo,br as So,bs as Ao,bt as Po,bu as _o,bv as Ro,bw as qo,bx as Fo,by as Uo,bz as ko,bA as Bo,Q as No,bB as Lo,bC as Mo,bP as Do,bL as zo,bD as Go,bE as $o,bF as Ho,bM as Oo,bG as jo,bN as Wo,bJ as Vo,bO as Jo,bK as Ko,bH as Yo,c5 as Zo,c8 as Qo,bZ as Xo,b_ as ti,b$ as ei,c0 as ai,bV as ni,bW as ri,E as si,bQ as oi,c9 as ii,bU as ci,ca as ui,cb as di,p as li,bR as mi,au as fi,av as hi,c1 as pi,c2 as yi,bS as gi,ce as bi,cf as wi,f as xi,cf as Ei,c3 as Ii,c4 as Ti,c6 as Ci,bX as vi,bT as Si,cc as Ai,bI as Pi,bY as _i,c7 as Ri,C as qi,cd as Fi,ce as Ui,cf as ki,cd as Bi,f as Ni,cf as Li,z as Mi}from"./signing-D7VaTtN_.js";import{w as Ze,h as Qe,g as Xe,v as ta,s as ea}from"./hashTypedData-CFE7S7Af.js";import{I as zi,a as Gi,b as $i,e as Hi,c as Oi,d as ji}from"./hashTypedData-CFE7S7Af.js";import{T as aa,a as Z,W as It,b as na,U as ra,R as sa}from"./rpc-D8oPKl0j.js";import{c as Vi,A as Ji,B as Ki,C as Yi,D as Zi,H as Qi,I as Xi,d as tc,e as ec,f as ac,J as nc,L as rc,M as sc,h as oc,P as ic,i as cc,j as uc,k as dc,l as lc,m as mc,S as fc,n as hc,o as pc,p as yc,q as gc,r as bc,s as wc}from"./rpc-D8oPKl0j.js";import{_ as oa}from"./index-CTPexb85.js";import{t as ia,H as ca}from"./sha256-Bq0kwVlP.js";import{aJ as Ec,aK as Ic,n as Tc,o as Cc,p as vc,q as Sc,r as Ac,u as Pc,v as _c,b as Rc,w as qc,x as Fc,y as Uc,z as kc,A as Bc,B as Nc,C as Lc,D as Mc,E as Dc,F as zc,c as Gc,G as $c,I as Hc,J as Oc,d as jc,e as Wc,f as Vc,g as Jc,h as Kc,i as Yc,a as Zc,j as Qc,k as Xc,l as tu,V as eu,W as au,X as nu,Y as ru,Z as su,_ as ou,$ as iu,m as cu,a0 as uu,a1 as du,a2 as lu,a3 as mu,a4 as fu,a5 as hu,a6 as pu,a7 as yu,a8 as gu,a9 as bu,L as wu,aa as xu,ab as Eu,ac as Iu,M as Tu,N as Cu,O as vu,P as Su,Q as Au,R as Pu,K as _u,S as Ru,T as qu,U as Fu,ap as Uu,aq as ku,ar as Bu,as as Nu,at as Lu,au as Mu,av as Du,ae as zu,aw as Gu,ax as $u,ay as Hu,az as Ou,aA as ju,aB as Wu,aC as Vu,aD as Ju,aE as Ku,aF as Yu,af as Zu,aG as Qu,aH as Xu,aI as td,ag as ed,ah as ad,ai as nd,aj as rd,ak as sd,al as od,ad as id,am as cd,an as ud,ao as dd,s as ld}from"./sha256-Bq0kwVlP.js";import{ccipRequest as fd,ccipRequest as hd,offchainLookup as pd,offchainLookupAbiItem as yd,offchainLookupSignature as gd}from"./ccip-CvLc3NhE.js";import{d as wd,a as xd,f as Ed}from"./transactionReceipt-DVqqJQEo.js";import"./utils-B2dQKDW4.js";function Hn(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Zt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Qt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:m,...h}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Xt({abi:u,args:i,functionName:m});try{return await U(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:c,account:o,...h})}catch(l){throw te(l,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:m,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function On({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,m=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(m=!0),i&&f&&m)break;return u&&(i&&(c.read=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),f&&(c.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),m&&(c.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(s,M,"writeContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:l,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function jn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=B(k(t.from));let a=B(t.nonce);return a[0]===0&&(a=new Uint8Array([])),k(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=B(k(t.from)),a=Me(Tt(t.salt)?t.salt:B(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:B(t.bytecodeHash):Y(t.bytecode,"bytes");return k(De(Y(ze([B("0xff"),e,a,n])),12))}function Wn({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return la(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new mt("Invalid RLP prefix")}function la(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function ma(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),ha=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,m=this.h4|0,h=m;for(let o=0;o<5;o++){const p=4-o,l=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+l,C[x])+m|0;n=m,m=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(p,u,c,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+m+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function Vn(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?B(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let m=0;const{schedule:h}=ie({id:i,fn:async()=>{const l=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&m<d){if(b)return;b=!0,m++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else l.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of l.values())(v=S.onError)==null||v.call(S,new Z({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Z({url:s}));x()},onError(v){var P,S;w=v;for(const _ of l.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,m=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:l,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};l.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Ze(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:l,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function K(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-DIXXjgvG.js"),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",m),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function m({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",m),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Z({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Z({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await K(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function Jn(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function Kn(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=le(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Q({hash:me(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Q({hash:Qe({domain:e,message:a,primaryType:n,types:s}),signature:r})}function Yn(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function Zn({address:t,hash:e,signature:a}){return ft(k(t),await Q({hash:e,signature:a}))}async function Qn({address:t,message:e,signature:a}){return ft(k(t),await Sa({message:e,signature:a}))}async function Xn(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return ft(k(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):ka(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:m,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const l={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(l.to=d),E(u)&&u!=="0x"&&(l.gas=A(u)),E(i)&&i!=="0x"&&(l.data=i),E(n)&&(l.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(l.value=A(c)),E(s)&&s!=="0x"&&(l.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(l.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(l.accessList=tt(f)),m.length!==0&&m!=="0x"&&(l.authorizationList=Ba(m)),we(l),{...e.length===13?O(e):void 0,...l}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,m,h,o,p,l,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:m,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:l,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(m)&&m!=="0x"&&(I.value=A(m)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:m,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(u)&&u!=="0x"&&(p.gas=A(u)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(p.value=A(c)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),pe(p),{...e.length===12?O(e):void 0,...p}}function Ua(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:m,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function ka(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(E(s)&&s!=="0x"&&(m.to=s),E(r)&&r!=="0x"&&(m.gas=A(r)),E(d)&&d!=="0x"&&(m.data=d),E(a)&&(m.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(m.value=A(u)),E(n)&&n!=="0x"&&(m.gasPrice=A(n)),xe(m),e.length===6)return m;const h=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return h>0&&(m.chainId=Number(h)),m;const o=h,p=Number((o-35n)/2n);if(p>0)m.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return m.v=o,m.s=f,m.r=i,m.yParity=o%2n===0n?1:0,m}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!Oe(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>ma(s)?s:We(s))})}return e}function Ba(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends mt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function tr(t,e="wei"){return Wt(t,Ie[e])}function er(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ja(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ka(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,l=(o||ht)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[l]})}async function Za(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Qa(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function ln(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function hn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ja(a,n),revert:n=>Ka(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Za(a,n),setBalance:n=>Qa(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>ln(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>fn(a,n)}}}function ar(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...hn({mode:n})(s)}))}async function pn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,m]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=m}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>k(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Je(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:l,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new mt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ht)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),pt=ot.get(t.uid),Jt=pt?"wallet_sendTransaction":"eth_sendTransaction",Kt=await(async()=>{try{return await t.request({method:Jt,params:[z]},{retryCount:0})}catch(yt){if(pt===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Kt,pollingInterval:p,timeout:C});if(l&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:l})}throw(b==null?void 0:b.type)==="smart"?new J({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new J({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof J?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new J({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await kt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Ke(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,m,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ht;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(h=(m=t.chain)==null?void 0:m.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Xe({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>pn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>kt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function nr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function rr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>lt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function sr(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return({chain:c,pollingInterval:i=4e3,timeout:f,...m})=>{let h=t,o=()=>{};const p=lt({key:a,name:n,async request({method:l,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...m,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:l,params:y});return o({method:l,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:l,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(l):v?!v.includes(l):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:l=>o=l,transports:h.map(l=>l({chain:c,retryCount:0}))});if(r){const l=typeof r=="object"?r:{};Un({chain:c,interval:l.interval??i,onTransports:y=>h=y,ping:l.ping,sampleCount:l.sampleCount,timeout:l.timeout,transports:h,weights:l.weights})}return p}}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Un({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],m=async()=>{const h=await Promise.all(u.map(async l=>{const y=l({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(l=>Math.max(...l.map(({latency:y})=>y)))),p=u.map((l,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((l,y)=>y[0]-l[0]);a(p.map(([,l])=>u[l])),await Ue(e),m()};m()}function or(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var l;const m=e.retryCount??i,h=f??e.timeout??1e4,o=t||((l=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:l[0]),p={keepAlive:a,reconnect:u};if(!o)throw new ke;return lt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await K(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:m,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return K(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await K(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class ir extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function cr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new Ye({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function ur(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const m=c.readByte();if(m===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(m)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function dr(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Be({commitment:s,to:n,version:a}));return r}const kn=2147483648;function lr(t){if(t===1)return 60n;if(t>=kn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function Bn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function mr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return Bn(t)}function fr({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function hr(t){const{r:e,s:a}=Bt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function pr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Q({hash:Y(s),signature:r})}function yr({r:t,yParityAndS:e}){return`0x${new Bt.Signature(A(t),A(e)).toCompactHex()}`}function gr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{Ye as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,Eo as AbiDecodingDataSizeInvalidError,Io as AbiDecodingDataSizeTooSmallError,To as AbiDecodingZeroDataError,Co as AbiEncodingArrayLengthMismatchError,vo as AbiEncodingBytesSizeMismatchError,So as AbiEncodingLengthMismatchError,Ao as AbiErrorInputsNotFoundError,Po as AbiErrorNotFoundError,_o as AbiErrorSignatureNotFoundError,Ro as AbiEventNotFoundError,qo as AbiEventSignatureEmptyTopicsError,Fo as AbiEventSignatureNotFoundError,Uo as AbiFunctionNotFoundError,ko as AbiFunctionOutputsNotFoundError,Bo as AbiFunctionSignatureNotFoundError,xr as AccountStateConflictError,Vi as AtomicReadyWalletRejectedUpgradeError,Ji as AtomicityNotSupportedError,mt as BaseError,Er as BaseFeeScalarError,Ir as BlockNotFoundError,Tr as BundleFailedError,Ki as BundleTooLargeError,No as BytesSizeMismatchError,Cr as CallExecutionError,Yi as ChainDisconnectedError,vr as ChainDoesNotSupportContract,Sr as ChainMismatchError,Ar as ChainNotFoundError,Pr as CircularReferenceError,_r as ClientChainNotConfiguredError,Rr as ContractFunctionExecutionError,qr as ContractFunctionRevertedError,Fr as ContractFunctionZeroDataError,Ur as CounterfactualDeploymentFailedError,Lo as DecodeLogDataMismatch,Mo as DecodeLogTopicsMismatch,Zi as DuplicateIdError,ir as EIP1193ProviderRpcError,kr as Eip1559FeesNotSupportedError,Br as EnsAvatarInvalidNftUriError,Nr as EnsAvatarUnsupportedNamespaceError,Lr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Mr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Dr as FeeCapTooHighError,zr as FeeCapTooLowError,Gr as FeeConflictError,Do as FilterTypeNotSupportedError,Qi as HttpRequestError,$r as InsufficientFundsError,zo as IntegerOutOfRangeError,Xi as InternalRpcError,Hr as IntrinsicGasTooHighError,Or as IntrinsicGasTooLowError,Go as InvalidAbiDecodingTypeError,$o as InvalidAbiEncodingTypeError,jr as InvalidAbiItemError,Qt as InvalidAbiParameterError,Wr as InvalidAbiParametersError,Vr as InvalidAbiTypeParameterError,je as InvalidAddressError,Ho as InvalidArrayError,Oo as InvalidBytesBooleanError,Jr as InvalidChainIdError,Na as InvalidDecimalNumberError,jo as InvalidDefinitionTypeError,zi as InvalidDomainError,Kr as InvalidFunctionModifierError,Wo as InvalidHexBooleanError,Ge as InvalidHexValueError,tc as InvalidInputRpcError,Ee as InvalidLegacyVError,Yr as InvalidModifierError,Zr as InvalidParameterError,ec as InvalidParamsRpcError,Qr as InvalidParenthesisError,Gi as InvalidPrimaryTypeError,ac as InvalidRequestRpcError,Xr as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,ts as InvalidSignatureError,es as InvalidStorageKeySizeError,as as InvalidStructSignatureError,$i as InvalidStructTypeError,nc as JsonRpcVersionUnsupportedError,rc as LimitExceededRpcError,ns as MaxFeePerGasTooLowError,sc as MethodNotFoundRpcError,oc as MethodNotSupportedRpcError,rs as NonceMaxValueError,ss as NonceTooHighError,os as NonceTooLowError,ic as ParseRpcError,cc as ProviderDisconnectedError,uc as ProviderRpcError,is as RawContractError,dc as ResourceNotFoundRpcError,lc as ResourceUnavailableRpcError,mc as RpcError,sa as RpcRequestError,Vo as SizeExceedsPaddingSizeError,Jo as SizeOverflowError,Ko as SliceOffsetOutOfBoundsError,Z as SocketClosedError,cs as SolidityProtectedKeywordError,us as StateAssignmentConflictError,fc as SwitchChainError,aa as TimeoutError,ds as TipAboveFeeCapError,ls as TransactionExecutionError,ms as TransactionNotFoundError,fs as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,hs as TransactionTypeNotSupportedError,hc as UnauthorizedProviderError,pc as UnknownBundleIdError,ps as UnknownNodeError,yc as UnknownRpcError,ys as UnknownSignatureError,gs as UnknownTypeError,gc as UnsupportedChainIdError,bc as UnsupportedNonOptionalCapabilityError,Yo as UnsupportedPackedAbiType,wc as UnsupportedProviderMethodError,ke as UrlRequiredError,ra as UserRejectedRequestError,bs as WaitForCallsStatusTimeoutError,ws as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,pe as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,xs as blobsToCommitments,Es as blobsToProofs,Zo as boolToBytes,Qo as boolToHex,Xo as bytesToBigInt,ti as bytesToBool,G as bytesToHex,ei as bytesToNumber,Ec as bytesToRlp,ai as bytesToString,fd as ccipFetch,hd as ccipRequest,Ve as checksumAddress,Be as commitmentToVersionedHash,Is as commitmentsToVersionedHashes,yr as compactSignatureToHex,fr as compactSignatureToSignature,ze as concat,ni as concatBytes,ri as concatHex,At as createClient,Ts as createNonceManager,Cs as createPublicClient,ar as createTestClient,lt as createTransport,nr as createWalletClient,rr as custom,Mt as decodeAbiParameters,cr as decodeDeployData,si as decodeErrorResult,oi as decodeEventLog,vs as decodeFunctionData,Ss as decodeFunctionResult,ii as defineBlock,ci as defineChain,Bn as defineKzg,ui as defineTransaction,wd as defineTransactionReceipt,di as defineTransactionRequest,As as deploylessCallViaBytecodeBytecode,Ps as deploylessCallViaFactoryBytecode,Hi as domainSeparator,li as encodeAbiParameters,Ce as encodeDeployData,_s as encodeErrorResult,mi as encodeEventTopics,Xt as encodeFunctionData,Rs as encodeFunctionResult,qs as encodePacked,Fs as erc1155Abi,Us as erc20Abi,ks as erc20Abi_bytes32,Bs as erc4626Abi,Ns as erc6492SignatureValidatorAbi,Ls as erc6492SignatureValidatorByteCode,Ms as erc721Abi,Ds as ethAddress,Ie as etherUnits,Wn as extractChain,sr as fallback,fi as formatBlock,zs as formatEther,Gs as formatGwei,xd as formatLog,hi as formatTransaction,Ed as formatTransactionReceipt,ht as formatTransactionRequest,$s as formatUnits,ur as fromBlobs,pi as fromBytes,yi as fromHex,Dt as fromRlp,gi as getAbiItem,k as getAddress,Hs as getChainContractAddress,On as getContract,jn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,bi as getEventSelector,wi as getEventSignature,xi as getFunctionSelector,Ei as getFunctionSignature,Pa as getSerializedTransactionType,Os as getTransactionType,Xe as getTypesForEIP712Domain,Te as gweiUnits,Oi as hashDomain,me as hashMessage,ji as hashStruct,Qe as hashTypedData,A as hexToBigInt,Ii as hexToBool,H as hexToBytes,hr as hexToCompactSignature,F as hexToNumber,Ic as hexToRlp,js as hexToSignature,Ti as hexToString,Ws as http,Oe as isAddress,ft as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,ma as isHash,E as isHex,Y as keccak256,Vs as labelhash,Tc as maxInt104,Cc as maxInt112,vc as maxInt120,Sc as maxInt128,Ac as maxInt136,Pc as maxInt144,_c as maxInt152,Rc as maxInt16,qc as maxInt160,Fc as maxInt168,Uc as maxInt176,kc as maxInt184,Bc as maxInt192,Nc as maxInt200,Lc as maxInt208,Mc as maxInt216,Dc as maxInt224,zc as maxInt232,Gc as maxInt24,$c as maxInt240,Hc as maxInt248,Oc as maxInt256,jc as maxInt32,Wc as maxInt40,Vc as maxInt48,Jc as maxInt56,Kc as maxInt64,Yc as maxInt72,Zc as maxInt8,Qc as maxInt80,Xc as maxInt88,tu as maxInt96,eu as maxUint104,au as maxUint112,nu as maxUint120,ru as maxUint128,su as maxUint136,ou as maxUint144,iu as maxUint152,cu as maxUint16,uu as maxUint160,du as maxUint168,lu as maxUint176,mu as maxUint184,fu as maxUint192,hu as maxUint200,pu as maxUint208,yu as maxUint216,gu as maxUint224,bu as maxUint232,wu as maxUint24,xu as maxUint240,Eu as maxUint248,Iu as maxUint256,Tu as maxUint32,Cu as maxUint40,vu as maxUint48,Su as maxUint56,Au as maxUint64,Pu as maxUint72,_u as maxUint8,Ru as maxUint80,qu as maxUint88,Fu as maxUint96,Uu as minInt104,ku as minInt112,Bu as minInt120,Nu as minInt128,Lu as minInt136,Mu as minInt144,Du as minInt152,zu as minInt16,Gu as minInt160,$u as minInt168,Hu as minInt176,Ou as minInt184,ju as minInt192,Wu as minInt200,Vu as minInt208,Ju as minInt216,Ku as minInt224,Yu as minInt232,Zu as minInt24,Qu as minInt240,Xu as minInt248,td as minInt256,ed as minInt32,ad as minInt40,nd as minInt48,rd as minInt56,sd as minInt64,od as minInt72,id as minInt8,cd as minInt80,ud as minInt88,dd as minInt96,Js as multicall3Abi,Ks as namehash,Ys as nonceManager,Ci as numberToBytes,R as numberToHex,pd as offchainLookup,yd as offchainLookupAbiItem,gd as offchainLookupSignature,Me as pad,vi as padBytes,xt as padHex,Zs as parseAbi,Qs as parseAbiItem,Hn as parseAbiParameter,Xs as parseAbiParameters,hr as parseCompactSignature,Jn as parseErc6492Signature,Kn as parseErc8010Signature,tr as parseEther,Si as parseEventLogs,er as parseGwei,to as parseSignature,_a as parseTransaction,Wt as parseUnits,eo as prepareEncodeFunctionData,ao as presignMessagePrefix,no as publicActions,Q as recoverAddress,Sa as recoverMessageAddress,ro as recoverPublicKey,pr as recoverTransactionAddress,Aa as recoverTypedDataAddress,Vn as ripemd160,so as rpcSchema,Ai as rpcTransactionType,oo as serializeAccessList,yr as serializeCompactSignature,io as serializeErc6492Signature,Yn as serializeErc8010Signature,co as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Pi as setErrorConfig,mr as setupKzg,ld as sha256,Fn as shouldThrow,dr as sidecarsToVersionedHashes,gr as signatureToCompactSignature,uo as signatureToHex,$e as size,De as slice,_i as sliceBytes,Lt as sliceHex,Ri as stringToBytes,Ke as stringToHex,qi as stringify,hn as testActions,ge as toBlobSidecars,lo as toBlobs,B as toBytes,lr as toCoinType,Fi as toEventHash,Ui as toEventSelector,ki as toEventSignature,Bi as toFunctionHash,Ni as toFunctionSelector,Li as toFunctionSignature,Nt as toHex,mo as toPrefixedMessage,ia as toRlp,Mi as transactionType,We as trim,fo as universalSignatureValidatorAbi,ho as universalSignatureValidatorByteCode,ta as validateTypedData,Zn as verifyHash,Qn as verifyMessage,Xn as verifyTypedData,qn as walletActions,or as webSocket,po as weiUnits,yo as withCache,go as withRetry,Ze as withTimeout,bo as zeroAddress,wo as zeroHash};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/native-DlthNI6_.js","assets/index-C9kcmpvP.js","assets/index-BGvsmbMC.css"])))=>i.map(i=>d[i]);
2
+ import{p as gt,b as Yt,i as Zt,I as Qt,m as bt,s as ut,A as D,e as Xt,g as U,d as N,f as te,r as ee,h as ae,j as ne,k as re,w as se,n as oe,o as ie,q as ce,t as ue,v as de,u as le,x as Q,y as me,z as fe,B as he,C as $,D as pe,E as ye,F as ge,G as be,H as we,J as xe,K as Ee,L as Ie,M as Te,N as St,O as At,P as Ce,Q as Pt,R as _t,S as Rt,T as ve,U as dt,V as qt,W as Se,X as Ae,Y as Ft,Z as Pe,_ as Ut,$ as J,a0 as _e,a1 as kt,a2 as Re,a3 as qe,a4 as lt,a5 as Fe,a6 as Ue,a7 as ke,a8 as Be,a9 as Ne,aa as Bt,ab as Le}from"./parseSignature-RSoun7s3.js";import{bf as xr,b1 as Er,aM as Ir,aN as Tr,aT as Cr,aO as vr,aP as Sr,aQ as Ar,ac as Pr,aR as _r,aU as Rr,aV as qr,aW as Fr,aX as Ur,b2 as kr,aZ as Br,a_ as Nr,a$ as Lr,b0 as Mr,b4 as Dr,b5 as zr,bh as Gr,b6 as $r,b7 as Hr,b8 as Or,ad as jr,ae as Wr,af as Vr,aS as Jr,ag as Kr,ah as Yr,ai as Zr,aj as Qr,bi as Xr,ak as ts,bj as es,al as as,b3 as ns,b9 as rs,ba as ss,bb as os,aY as is,ap as cs,bg as us,bc as ds,bk as ls,bl as ms,bm as fs,bd as hs,be as ps,aq as ys,ar as gs,as as bs,bn as ws,bu as xs,bv as Es,bw as Is,bB as Ts,au as Cs,bo as vs,bp as Ss,aH as As,aI as Ps,bq as _s,br as Rs,bs as qs,aA as Fs,ax as Us,ay as ks,aB as Bs,aC as Ns,aJ as Ls,az as Ms,aE as Ds,bM as zs,bN as Gs,bO as $s,by as Hs,bK as Os,bF as js,aw as Ws,bz as Vs,aD as Js,bA as Ks,bC as Ys,am as Zs,an as Qs,ao as Xs,bF as to,bt as eo,aK as ao,av as no,bG as ro,at as so,bL as oo,bH as io,bI as co,bI as uo,bx as lo,bJ as mo,aC as fo,aJ as ho,aL as po,bD as yo,bE as go,aF as bo,aG as wo}from"./parseSignature-RSoun7s3.js";import{T as B,ba as k,U as Me,I as Y,bb as De,G as ze,bc as Ge,X as H,_ as ct,$ as G,B as mt,D as E,P as $e,a7 as He,bd as j,a6 as wt,R as Nt,be as Lt,d as Mt,L as R,F as ft,A as F,bf as A,M as Oe,N as je,bg as We,bh as xt,aH as ht,J as Ve,bi as Je,bj as Ke,bk as Ye,bl as Et}from"./signing-DR1diqT_.js";import{bm as Eo,bn as Io,bo as To,bp as Co,bq as vo,br as So,bs as Ao,bt as Po,bu as _o,bv as Ro,bw as qo,bx as Fo,by as Uo,bz as ko,bA as Bo,Q as No,bB as Lo,bC as Mo,bP as Do,bL as zo,bD as Go,bE as $o,bF as Ho,bM as Oo,bG as jo,bN as Wo,bJ as Vo,bO as Jo,bK as Ko,bH as Yo,c5 as Zo,c8 as Qo,bZ as Xo,b_ as ti,b$ as ei,c0 as ai,bV as ni,bW as ri,E as si,bQ as oi,c9 as ii,bU as ci,ca as ui,cb as di,p as li,bR as mi,au as fi,av as hi,c1 as pi,c2 as yi,bS as gi,ce as bi,cf as wi,f as xi,cf as Ei,c3 as Ii,c4 as Ti,c6 as Ci,bX as vi,bT as Si,cc as Ai,bI as Pi,bY as _i,c7 as Ri,C as qi,cd as Fi,ce as Ui,cf as ki,cd as Bi,f as Ni,cf as Li,z as Mi}from"./signing-DR1diqT_.js";import{w as Ze,h as Qe,g as Xe,v as ta,s as ea}from"./hashTypedData-LY3QUtcD.js";import{I as zi,a as Gi,b as $i,e as Hi,c as Oi,d as ji}from"./hashTypedData-LY3QUtcD.js";import{T as aa,a as Z,W as It,b as na,U as ra,R as sa}from"./rpc-YBySNaPU.js";import{c as Vi,A as Ji,B as Ki,C as Yi,D as Zi,H as Qi,I as Xi,d as tc,e as ec,f as ac,J as nc,L as rc,M as sc,h as oc,P as ic,i as cc,j as uc,k as dc,l as lc,m as mc,S as fc,n as hc,o as pc,p as yc,q as gc,r as bc,s as wc}from"./rpc-YBySNaPU.js";import{_ as oa}from"./index-C9kcmpvP.js";import{t as ia,H as ca}from"./sha256-B_2-BKc1.js";import{aJ as Ec,aK as Ic,n as Tc,o as Cc,p as vc,q as Sc,r as Ac,u as Pc,v as _c,b as Rc,w as qc,x as Fc,y as Uc,z as kc,A as Bc,B as Nc,C as Lc,D as Mc,E as Dc,F as zc,c as Gc,G as $c,I as Hc,J as Oc,d as jc,e as Wc,f as Vc,g as Jc,h as Kc,i as Yc,a as Zc,j as Qc,k as Xc,l as tu,V as eu,W as au,X as nu,Y as ru,Z as su,_ as ou,$ as iu,m as cu,a0 as uu,a1 as du,a2 as lu,a3 as mu,a4 as fu,a5 as hu,a6 as pu,a7 as yu,a8 as gu,a9 as bu,L as wu,aa as xu,ab as Eu,ac as Iu,M as Tu,N as Cu,O as vu,P as Su,Q as Au,R as Pu,K as _u,S as Ru,T as qu,U as Fu,ap as Uu,aq as ku,ar as Bu,as as Nu,at as Lu,au as Mu,av as Du,ae as zu,aw as Gu,ax as $u,ay as Hu,az as Ou,aA as ju,aB as Wu,aC as Vu,aD as Ju,aE as Ku,aF as Yu,af as Zu,aG as Qu,aH as Xu,aI as td,ag as ed,ah as ad,ai as nd,aj as rd,ak as sd,al as od,ad as id,am as cd,an as ud,ao as dd,s as ld}from"./sha256-B_2-BKc1.js";import{ccipRequest as fd,ccipRequest as hd,offchainLookup as pd,offchainLookupAbiItem as yd,offchainLookupSignature as gd}from"./ccip-C-GSKBZ0.js";import{d as wd,a as xd,f as Ed}from"./transactionReceipt-DgYVdPLL.js";import"./utils-CUIXWH1v.js";function Hn(t){let e;if(typeof t=="string")e=gt(t,{modifiers:bt});else{const a=Yt(t),n=t.length;for(let r=0;r<n;r++){const s=t[r];if(!Zt(s)){e=gt(s,{modifiers:bt,structs:a});break}}}if(!e)throw new Qt({param:t});return e}async function M(t,e){return M.internal(t,ut,"sendTransaction",e)}(function(t){async function e(a,n,r,s){const{abi:u,account:d=a.account,address:c,args:i,dataSuffix:f,functionName:m,...h}=s;if(typeof d>"u")throw new D({docsPath:"/docs/contract/writeContract"});const o=d?N(d):null,p=Xt({abi:u,args:i,functionName:m});try{return await U(a,n,r)({data:`${p}${f?f.replace("0x",""):""}`,to:c,account:o,...h})}catch(l){throw te(l,{abi:u,address:c,args:i,docsPath:"/docs/contract/writeContract",functionName:m,sender:o==null?void 0:o.address})}}t.internal=e})(M||(M={}));function On({abi:t,address:e,client:a}){const n=a,[r,s]=n?"public"in n&&"wallet"in n?[n.public,n.wallet]:"public"in n?[n.public,void 0]:"wallet"in n?[void 0,n.wallet]:[n,n]:[void 0,void 0],u=r!=null,d=s!=null,c={};let i=!1,f=!1,m=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?i=!0:f=!0:h.type==="event"&&(m=!0),i&&f&&m)break;return u&&(i&&(c.read=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(r,ee,"readContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),f&&(c.simulate=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(r,ae,"simulateContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),m&&(c.createEventFilter=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return U(r,ne,"createContractEventFilter")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.getEvents=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return U(r,re,"getContractEvents")({abi:t,address:e,eventName:o,args:y,...w})}}}),c.watchEvent=new Proxy({},{get(h,o){return(...p)=>{const l=t.find(g=>g.type==="event"&&g.name===o),{args:y,options:w}=rt(p,l);return U(r,se,"watchContractEvent")({abi:t,address:e,eventName:o,args:y,...w})}}}))),d&&f&&(c.write=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(s,M,"writeContract")({abi:t,address:e,functionName:o,args:l,...y})}}})),(u||d)&&f&&(c.estimateGas=new Proxy({},{get(h,o){return(...p)=>{const{args:l,options:y}=W(p);return U(r??s,oe,"estimateContractGas")({abi:t,address:e,functionName:o,args:l,...y,account:y.account??s.account})}}})),c.address=e,c.abi=t,c}function W(t){const e=t.length&&Array.isArray(t[0]),a=e?t[0]:[],n=(e?t[1]:t[0])??{};return{args:a,options:n}}function rt(t,e){let a=!1;Array.isArray(t[0])?a=!0:t.length===1?a=e.inputs.some(s=>s.indexed):t.length===2&&(a=!0);const n=a?t[0]:void 0,r=(a?t[1]:t[0])??{};return{args:n,options:r}}function Tt(t){return!t||typeof t!="object"||!("BYTES_PER_ELEMENT"in t)?!1:t.BYTES_PER_ELEMENT===1&&t.constructor.name==="Uint8Array"}function jn(t){return t.opcode==="CREATE2"?da(t):ua(t)}function ua(t){const e=B(k(t.from));let a=B(t.nonce);return a[0]===0&&(a=new Uint8Array([])),k(`0x${Y(ia([e,a],"bytes")).slice(26)}`)}function da(t){const e=B(k(t.from)),a=Me(Tt(t.salt)?t.salt:B(t.salt),{size:32}),n="bytecodeHash"in t?Tt(t.bytecodeHash)?t.bytecodeHash:B(t.bytecodeHash):Y(t.bytecode,"bytes");return k(De(Y(ze([B("0xff"),e,a,n])),12))}function Wn({chains:t,id:e}){return t.find(a=>a.id===e)}function Dt(t,e="hex"){const a=(()=>{if(typeof t=="string"){if(t.length>3&&t.length%2!==0)throw new Ge(t);return H(t)}return t})(),n=ct(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return zt(n,e)}function zt(t,e="hex"){if(t.bytes.length===0)return e==="hex"?G(t.bytes):t.bytes;const a=t.readByte();if(a<128&&t.decrementPosition(1),a<192){const r=Ct(t,a,128),s=t.readBytes(r);return e==="hex"?G(s):s}const n=Ct(t,a,192);return la(t,n,e)}function Ct(t,e,a){if(a===128&&e<128)return 1;if(e<=a+55)return e-a;if(e===a+55+1)return t.readUint8();if(e===a+55+2)return t.readUint16();if(e===a+55+3)return t.readUint24();if(e===a+55+4)return t.readUint32();throw new mt("Invalid RLP prefix")}function la(t,e,a){const n=t.position,r=[];for(;t.position-n<e;)r.push(zt(t,a));return r}function ma(t){return E(t)&&$e(t)===32}const fa=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Gt=Uint8Array.from(new Array(16).fill(0).map((t,e)=>e)),ha=Gt.map(t=>(9*t+5)%16),$t=(()=>{const a=[[Gt],[ha]];for(let n=0;n<4;n++)for(let r of a)r.push(r[n].map(s=>fa[s]));return a})(),Ht=$t[0],Ot=$t[1],jt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>Uint8Array.from(t)),pa=Ht.map((t,e)=>t.map(a=>jt[e][a])),ya=Ot.map((t,e)=>t.map(a=>jt[e][a])),ga=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),ba=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function vt(t,e,a,n){return t===0?e^a^n:t===1?e&a|~e&n:t===2?(e|~a)^n:t===3?e&n|a&~n:e^(a|~n)}const V=new Uint32Array(16);class wa extends ca{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:a,h2:n,h3:r,h4:s}=this;return[e,a,n,r,s]}set(e,a,n,r,s){this.h0=e|0,this.h1=a|0,this.h2=n|0,this.h3=r|0,this.h4=s|0}process(e,a){for(let o=0;o<16;o++,a+=4)V[o]=e.getUint32(a,!0);let n=this.h0|0,r=n,s=this.h1|0,u=s,d=this.h2|0,c=d,i=this.h3|0,f=i,m=this.h4|0,h=m;for(let o=0;o<5;o++){const p=4-o,l=ga[o],y=ba[o],w=Ht[o],g=Ot[o],C=pa[o],b=ya[o];for(let x=0;x<16;x++){const I=j(n+vt(o,s,d,i)+V[w[x]]+l,C[x])+m|0;n=m,m=i,i=j(d,10)|0,d=s,s=I}for(let x=0;x<16;x++){const I=j(r+vt(p,u,c,f)+V[g[x]]+y,b[x])+h|0;r=h,h=f,f=j(c,10)|0,c=u,u=I}}this.set(this.h1+d+f|0,this.h2+i+h|0,this.h3+m+r|0,this.h4+n+u|0,this.h0+s+c|0)}roundClean(){wt(V)}destroy(){this.destroyed=!0,wt(this.buffer),this.set(0,0,0,0,0)}}const xa=He(()=>new wa),Ea=xa;function Vn(t,e){const a=e||"hex",n=Ea(E(t,{strict:!1})?B(t):t);return a==="bytes"?n:Nt(n)}const st=new Map;async function Ia(t){const{getSocket:e,keepAlive:a=!0,key:n="socket",reconnect:r=!0,url:s}=t,{interval:u=3e4}=typeof a=="object"?a:{},{attempts:d=5,delay:c=2e3}=typeof r=="object"?r:{},i=JSON.stringify({keepAlive:a,key:n,url:s,reconnect:r});let f=st.get(i);if(f)return f;let m=0;const{schedule:h}=ie({id:i,fn:async()=>{const l=new Map,y=new Map;let w,g,C,b=!1;function x(){if(r&&m<d){if(b)return;b=!0,m++,g==null||g.close(),setTimeout(async()=>{await I().catch(console.error),b=!1},c)}else l.clear(),y.clear()}async function I(){const T=await e({onClose(){var v,P;for(const S of l.values())(v=S.onError)==null||v.call(S,new Z({url:s}));for(const S of y.values())(P=S.onError)==null||P.call(S,new Z({url:s}));x()},onError(v){var P,S;w=v;for(const _ of l.values())(P=_.onError)==null||P.call(_,w);for(const _ of y.values())(S=_.onError)==null||S.call(_,w);x()},onOpen(){w=void 0,m=0},onResponse(v){const P=v.method==="eth_subscription",S=P?v.params.subscription:v.id,_=P?y:l,q=_.get(S);q&&q.onResponse(v),P||_.delete(S)}});if(g=T,a&&(C&&clearInterval(C),C=setInterval(()=>{var v;return(v=g.ping)==null?void 0:v.call(g)},u)),r&&y.size>0){const v=y.entries();for(const[P,{onResponse:S,body:_,onError:q}]of v)_&&(y.delete(P),f==null||f.request({body:_,onResponse:S,onError:q}))}return T}return await I(),w=void 0,f={close(){C&&clearInterval(C),g.close(),st.delete(i)},get socket(){return g},request({body:T,onError:v,onResponse:P}){w&&v&&v(w);const S=T.id??ce.take(),_=q=>{var z;typeof q.id=="number"&&S!==q.id||(T.method==="eth_subscribe"&&typeof q.result=="string"&&y.set(q.result,{onResponse:_,onError:v,body:T}),T.method==="eth_unsubscribe"&&y.delete((z=T.params)==null?void 0:z[0]),P(q))};l.set(S,{onResponse:_,onError:v});try{g.request({body:{jsonrpc:"2.0",id:S,...T}})}catch(q){v==null||v(q)}},requestAsync({body:T,timeout:v=1e4}){return Ze(()=>new Promise((P,S)=>this.request({body:T,onError:S,onResponse:P})),{errorInstance:new aa({body:T,url:s}),timeout:v})},requests:l,subscriptions:y,url:s},st.set(i,f),[f]}}),[o,[p]]=await h();return p}async function K(t,e={}){const{keepAlive:a,reconnect:n}=e;return Ia({async getSocket({onClose:r,onError:s,onOpen:u,onResponse:d}){const c=await oa(()=>import("./native-DlthNI6_.js"),__vite__mapDeps([0,1,2])).then(o=>o.WebSocket),i=new c(t);function f(){i.removeEventListener("close",f),i.removeEventListener("message",m),i.removeEventListener("error",s),i.removeEventListener("open",u),r()}function m({data:o}){if(!(typeof o=="string"&&o.trim().length===0))try{const p=JSON.parse(o);d(p)}catch(p){s(p)}}i.addEventListener("close",f),i.addEventListener("message",m),i.addEventListener("error",s),i.addEventListener("open",u),i.readyState===c.CONNECTING&&await new Promise((o,p)=>{i&&(i.onopen=o,i.onerror=p)});const{close:h}=i;return Object.assign(i,{close(){h.bind(i)(),f()},ping(){try{if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({url:i.url,cause:new Z({url:i.url})});const o={jsonrpc:"2.0",id:null,method:"net_version",params:[]};i.send(JSON.stringify(o))}catch(o){s(o)}},request({body:o}){if(i.readyState===i.CLOSED||i.readyState===i.CLOSING)throw new It({body:o,url:i.url,cause:new Z({url:i.url})});return i.send(JSON.stringify(o))}})},keepAlive:a,reconnect:n,url:t})}async function Ta(t){const e=await K(t);return Object.assign(e.socket,{requests:e.requests,subscriptions:e.subscriptions})}function Ca(t){return Lt(t,-32)===ue}function va(t){return de(t)}function Jn(t){if(!Ca(t))return{signature:t};const[e,a,n]=Mt([{type:"address"},{type:"bytes"},{type:"bytes"}],t);return{address:e,data:a,signature:n}}function Kn(t){if(!va(t))return{signature:t};const{authorization:e,to:a,...n}=le(t);return{authorization:{address:e.address,chainId:e.chainId,nonce:Number(e.nonce),r:R(e.r,{size:32}),s:R(e.s,{size:32}),yParity:e.yParity},...a?{address:a}:{},...n}}async function Sa({message:t,signature:e}){return Q({hash:me(t),signature:e})}async function Aa(t){const{domain:e,message:a,primaryType:n,signature:r,types:s}=t;return Q({hash:Qe({domain:e,message:a,primaryType:n,types:s}),signature:r})}function Yn(t){const{address:e,data:a,signature:n,to:r="hex"}=t,s=fe({authorization:{address:t.authorization.address,chainId:t.authorization.chainId,nonce:BigInt(t.authorization.nonce),r:BigInt(t.authorization.r),s:BigInt(t.authorization.s),yParity:t.authorization.yParity},data:a,signature:n,to:e});return r==="hex"?s:H(s)}async function Zn({address:t,hash:e,signature:a}){return ft(k(t),await Q({hash:e,signature:a}))}async function Qn({address:t,message:e,signature:a}){return ft(k(t),await Sa({message:e,signature:a}))}async function Xn(t){const{address:e,domain:a,message:n,primaryType:r,signature:s,types:u}=t;return ft(k(e),await Aa({domain:a,message:n,primaryType:r,signature:s,types:u}))}function Pa(t){const e=Lt(t,0,1);if(e==="0x04")return"eip7702";if(e==="0x03")return"eip4844";if(e==="0x02")return"eip1559";if(e==="0x01")return"eip2930";if(e!=="0x"&&F(e)>=192)return"legacy";throw new he({serializedType:e})}function _a(t){const e=Pa(t);return e==="eip1559"?Fa(t):e==="eip2930"?Ua(t):e==="eip4844"?qa(t):e==="eip7702"?Ra(t):ka(t)}function Ra(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o,p]=e;if(e.length!==10&&e.length!==13)throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,authorizationList:m,...e.length>9?{v:h,r:o,s:p}:{}},serializedTransaction:t,type:"eip7702"});const l={chainId:F(a),type:"eip7702"};return E(d)&&d!=="0x"&&(l.to=d),E(u)&&u!=="0x"&&(l.gas=A(u)),E(i)&&i!=="0x"&&(l.data=i),E(n)&&(l.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(l.value=A(c)),E(s)&&s!=="0x"&&(l.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(l.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(l.accessList=tt(f)),m.length!==0&&m!=="0x"&&(l.authorizationList=Ba(m)),we(l),{...e.length===13?O(e):void 0,...l}}function qa(t){const e=X(t),a=e.length===4,n=a?e[0]:e,r=a?e.slice(1):[],[s,u,d,c,i,f,m,h,o,p,l,y,w,g]=n,[C,b,x]=r;if(!(n.length===11||n.length===14))throw new $({attributes:{chainId:s,nonce:u,maxPriorityFeePerGas:d,maxFeePerGas:c,gas:i,to:f,value:m,data:h,accessList:o,...n.length>9?{v:y,r:w,s:g}:{}},serializedTransaction:t,type:"eip4844"});const I={blobVersionedHashes:l,chainId:F(s),to:f,type:"eip4844"};return E(i)&&i!=="0x"&&(I.gas=A(i)),E(h)&&h!=="0x"&&(I.data=h),E(u)&&(I.nonce=u==="0x"?0:F(u)),E(m)&&m!=="0x"&&(I.value=A(m)),E(p)&&p!=="0x"&&(I.maxFeePerBlobGas=A(p)),E(c)&&c!=="0x"&&(I.maxFeePerGas=A(c)),E(d)&&d!=="0x"&&(I.maxPriorityFeePerGas=A(d)),o.length!==0&&o!=="0x"&&(I.accessList=tt(o)),C&&b&&x&&(I.sidecars=ge({blobs:C,commitments:b,proofs:x})),be(I),{...n.length===14?O(n):void 0,...I}}function Fa(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h,o]=e;if(!(e.length===9||e.length===12))throw new $({attributes:{chainId:a,nonce:n,maxPriorityFeePerGas:r,maxFeePerGas:s,gas:u,to:d,value:c,data:i,accessList:f,...e.length>9?{v:m,r:h,s:o}:{}},serializedTransaction:t,type:"eip1559"});const p={chainId:F(a),type:"eip1559"};return E(d)&&d!=="0x"&&(p.to=d),E(u)&&u!=="0x"&&(p.gas=A(u)),E(i)&&i!=="0x"&&(p.data=i),E(n)&&(p.nonce=n==="0x"?0:F(n)),E(c)&&c!=="0x"&&(p.value=A(c)),E(s)&&s!=="0x"&&(p.maxFeePerGas=A(s)),E(r)&&r!=="0x"&&(p.maxPriorityFeePerGas=A(r)),f.length!==0&&f!=="0x"&&(p.accessList=tt(f)),pe(p),{...e.length===12?O(e):void 0,...p}}function Ua(t){const e=X(t),[a,n,r,s,u,d,c,i,f,m,h]=e;if(!(e.length===8||e.length===11))throw new $({attributes:{chainId:a,nonce:n,gasPrice:r,gas:s,to:u,value:d,data:c,accessList:i,...e.length>8?{v:f,r:m,s:h}:{}},serializedTransaction:t,type:"eip2930"});const o={chainId:F(a),type:"eip2930"};return E(u)&&u!=="0x"&&(o.to=u),E(s)&&s!=="0x"&&(o.gas=A(s)),E(c)&&c!=="0x"&&(o.data=c),E(n)&&(o.nonce=n==="0x"?0:F(n)),E(d)&&d!=="0x"&&(o.value=A(d)),E(r)&&r!=="0x"&&(o.gasPrice=A(r)),i.length!==0&&i!=="0x"&&(o.accessList=tt(i)),ye(o),{...e.length===11?O(e):void 0,...o}}function ka(t){const e=Dt(t,"hex"),[a,n,r,s,u,d,c,i,f]=e;if(!(e.length===6||e.length===9))throw new $({attributes:{nonce:a,gasPrice:n,gas:r,to:s,value:u,data:d,...e.length>6?{v:c,r:i,s:f}:{}},serializedTransaction:t,type:"legacy"});const m={type:"legacy"};if(E(s)&&s!=="0x"&&(m.to=s),E(r)&&r!=="0x"&&(m.gas=A(r)),E(d)&&d!=="0x"&&(m.data=d),E(a)&&(m.nonce=a==="0x"?0:F(a)),E(u)&&u!=="0x"&&(m.value=A(u)),E(n)&&n!=="0x"&&(m.gasPrice=A(n)),xe(m),e.length===6)return m;const h=E(c)&&c!=="0x"?A(c):0n;if(f==="0x"&&i==="0x")return h>0&&(m.chainId=Number(h)),m;const o=h,p=Number((o-35n)/2n);if(p>0)m.chainId=p;else if(o!==27n&&o!==28n)throw new Ee({v:o});return m.v=o,m.s=f,m.r=i,m.yParity=o%2n===0n?1:0,m}function X(t){return Dt(`0x${t.slice(4)}`,"hex")}function tt(t){const e=[];for(let a=0;a<t.length;a++){const[n,r]=t[a];if(!Oe(n,{strict:!1}))throw new je({address:n});e.push({address:n,storageKeys:r.map(s=>ma(s)?s:We(s))})}return e}function Ba(t){const e=[];for(let a=0;a<t.length;a++){const[n,r,s,u,d,c]=t[a];e.push({address:r,chainId:n==="0x"?0:F(n),nonce:s==="0x"?0:F(s),...O([u,d,c])})}return e}function O(t){const e=t.slice(-3),a=e[0]==="0x"||A(e[0])===0n?27n:28n;return{r:xt(e[1],{size:32}),s:xt(e[2],{size:32}),v:a,yParity:a===27n?0:1}}class Na extends mt{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function Wt(t,e){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(t))throw new Na({value:t});let[a,n="0"]=t.split(".");const r=a.startsWith("-");if(r&&(a=a.slice(1)),n=n.replace(/(0+)$/,""),e===0)Math.round(+`.${n}`)===1&&(a=`${BigInt(a)+1n}`),n="";else if(n.length>e){const[s,u,d]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${u}.${d}`);c>9?n=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):n=`${s}${c}`,n.length>e&&(n=n.slice(1),a=`${BigInt(a)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${r?"-":""}${a}${n}`)}function tr(t,e="wei"){return Wt(t,Ie[e])}function er(t,e="wei"){return Wt(t,Te[e])}async function La(t,{hash:e}){await t.request({method:`${t.mode}_dropTransaction`,params:[e]})}async function Ma(t){return t.request({method:`${t.mode}_dumpState`})}async function Da(t){return t.mode==="ganache"?await t.request({method:"eth_mining"}):await t.request({method:`${t.mode}_getAutomine`})}async function za(t){return await t.request({method:"txpool_content"})}async function Ga(t){const{pending:e,queued:a}=await t.request({method:"txpool_status"});return{pending:F(e),queued:F(a)}}async function $a(t,{address:e}){await t.request({method:`${t.mode}_impersonateAccount`,params:[e]})}async function Ha(t,{seconds:e}){return await t.request({method:"evm_increaseTime",params:[R(e)]})}async function Oa(t){return await t.request({method:"txpool_inspect"})}async function ja(t,{state:e}){await t.request({method:`${t.mode}_loadState`,params:[e]})}async function Wa(t,{blocks:e,interval:a}){t.mode==="ganache"?await t.request({method:"evm_mine",params:[{blocks:R(e)}]}):await t.request({method:`${t.mode}_mine`,params:[R(e),R(a||0)]})}async function Va(t){await t.request({method:`${t.mode}_removeBlockTimestampInterval`})}async function Ja(t,{blockNumber:e,jsonRpcUrl:a}={}){await t.request({method:`${t.mode}_reset`,params:[{forking:{blockNumber:Number(e),jsonRpcUrl:a}}]})}async function Ka(t,{id:e}){await t.request({method:"evm_revert",params:[e]})}async function Ya(t,e){var w,g,C;const{accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m,...h}=e,o=(C=(g=(w=t.chain)==null?void 0:w.formatters)==null?void 0:g.transactionRequest)==null?void 0:C.format,l=(o||ht)({...St(h,{format:o}),accessList:a,data:n,from:r,gas:s,gasPrice:u,maxFeePerGas:d,maxPriorityFeePerGas:c,nonce:i,to:f,value:m},"sendUnsignedTransaction");return await t.request({method:"eth_sendUnsignedTransaction",params:[l]})}async function Za(t,e){t.mode==="ganache"?e?await t.request({method:"miner_start"}):await t.request({method:"miner_stop"}):await t.request({method:"evm_setAutomine",params:[e]})}async function Qa(t,{address:e,value:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountBalance",params:[e,R(a)]}):await t.request({method:`${t.mode}_setBalance`,params:[e,R(a)]})}async function Xa(t,{gasLimit:e}){await t.request({method:"evm_setBlockGasLimit",params:[R(e)]})}async function tn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:`${t.mode}_setBlockTimestampInterval`,params:[a]})}async function en(t,{address:e,bytecode:a}){t.mode==="ganache"?await t.request({method:"evm_setAccountCode",params:[e,a]}):await t.request({method:`${t.mode}_setCode`,params:[e,a]})}async function an(t,{address:e}){await t.request({method:`${t.mode}_setCoinbase`,params:[e]})}async function nn(t,{interval:e}){const a=t.mode==="hardhat"?e*1e3:e;await t.request({method:"evm_setIntervalMining",params:[a]})}async function rn(t,e){await t.request({method:`${t.mode}_setLoggingEnabled`,params:[e]})}async function sn(t,{gasPrice:e}){await t.request({method:`${t.mode}_setMinGasPrice`,params:[R(e)]})}async function on(t,{baseFeePerGas:e}){await t.request({method:`${t.mode}_setNextBlockBaseFeePerGas`,params:[R(e)]})}async function cn(t,{timestamp:e}){await t.request({method:"evm_setNextBlockTimestamp",params:[R(e)]})}async function un(t,{address:e,nonce:a}){await t.request({method:`${t.mode}_setNonce`,params:[e,R(a)]})}async function dn(t,e){await t.request({method:`${t.mode}_setRpcUrl`,params:[e]})}async function ln(t,{address:e,index:a,value:n}){await t.request({method:`${t.mode}_setStorageAt`,params:[e,typeof a=="number"?R(a):a,n]})}async function mn(t){return await t.request({method:"evm_snapshot"})}async function fn(t,{address:e}){await t.request({method:`${t.mode}_stopImpersonatingAccount`,params:[e]})}function hn({mode:t}){return e=>{const a=e.extend(()=>({mode:t}));return{dropTransaction:n=>La(a,n),dumpState:()=>Ma(a),getAutomine:()=>Da(a),getTxpoolContent:()=>za(a),getTxpoolStatus:()=>Ga(a),impersonateAccount:n=>$a(a,n),increaseTime:n=>Ha(a,n),inspectTxpool:()=>Oa(a),loadState:n=>ja(a,n),mine:n=>Wa(a,n),removeBlockTimestampInterval:()=>Va(a),reset:n=>Ja(a,n),revert:n=>Ka(a,n),sendUnsignedTransaction:n=>Ya(a,n),setAutomine:n=>Za(a,n),setBalance:n=>Qa(a,n),setBlockGasLimit:n=>Xa(a,n),setBlockTimestampInterval:n=>tn(a,n),setCode:n=>en(a,n),setCoinbase:n=>an(a,n),setIntervalMining:n=>nn(a,n),setLoggingEnabled:n=>rn(a,n),setMinGasPrice:n=>sn(a,n),setNextBlockBaseFeePerGas:n=>on(a,n),setNextBlockTimestamp:n=>cn(a,n),setNonce:n=>un(a,n),setRpcUrl:n=>dn(a,n),setStorageAt:n=>ln(a,n),snapshot:()=>mn(a),stopImpersonatingAccount:n=>fn(a,n)}}}function ar(t){const{key:e="test",name:a="Test Client",mode:n}=t;return At({...t,key:e,name:a,type:"testClient"}).extend(s=>({mode:n,...hn({mode:n})(s)}))}async function pn(t,{chain:e}){const{id:a,name:n,nativeCurrency:r,rpcUrls:s,blockExplorers:u}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:R(a),chainName:n,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:u?Object.values(u).map(({url:d})=>d):void 0}]},{dedupe:!0,retryCount:0})}function yn(t,e){const{abi:a,args:n,bytecode:r,...s}=e,u=Ce({abi:a,args:n,bytecode:r});return ut(t,{...s,...s.authorizationList?{to:null}:{},data:u})}async function gn(t){var a;return((a=t.account)==null?void 0:a.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(n=>Ve(n))}async function bn(t,e={}){const{account:a=t.account,chainId:n}=e,r=a?N(a):void 0,s=n?[r==null?void 0:r.address,[R(n)]]:[r==null?void 0:r.address],u=await t.request({method:"wallet_getCapabilities",params:s}),d={};for(const[c,i]of Object.entries(u)){d[Number(c)]={};for(let[f,m]of Object.entries(i))f==="addSubAccount"&&(f="unstable_addSubAccount"),d[Number(c)][f]=m}return typeof n=="number"?d[n]:d}async function wn(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}async function xn(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>k(a))}async function En(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function In(t,e){const{chain:a=t.chain}=e,n=e.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),r=await Pt(t,e);return await _t(t,{...e,id:r.id,timeout:n})}const ot=new Je(128);async function Vt(t,e){var x,I,T,v;const{account:a=t.account,chain:n=t.chain,accessList:r,authorizationList:s,blobs:u,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,pollingInterval:p,throwOnReceiptRevert:l,type:y,value:w,...g}=e,C=e.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new D({docsPath:"/docs/actions/wallet/sendTransactionSync"});const b=a?N(a):null;try{Rt(e);const P=await(async()=>{if(e.to)return e.to;if(e.to!==null&&s&&s.length>0)return await ve({authorization:s[0]}).catch(()=>{throw new mt("`to` is required. Could not infer from `authorizationList`.")})})();if((b==null?void 0:b.type)==="json-rpc"||b===null){let S;n!==null&&(S=await U(t,dt,"getChainId")({}),qt({currentChainId:S,chain:n}));const _=(T=(I=(x=t.chain)==null?void 0:x.formatters)==null?void 0:I.transactionRequest)==null?void 0:T.format,z=(_||ht)({...St(g,{format:_}),accessList:r,account:b,authorizationList:s,blobs:u,chainId:S,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,to:P,type:y,value:w},"sendTransaction"),pt=ot.get(t.uid),Jt=pt?"wallet_sendTransaction":"eth_sendTransaction",Kt=await(async()=>{try{return await t.request({method:Jt,params:[z]},{retryCount:0})}catch(yt){if(pt===!1)throw yt;const L=yt;if(L.name==="InvalidInputRpcError"||L.name==="InvalidParamsRpcError"||L.name==="MethodNotFoundRpcError"||L.name==="MethodNotSupportedRpcError")return await t.request({method:"wallet_sendTransaction",params:[z]},{retryCount:0}).then(at=>(ot.set(t.uid,!0),at)).catch(at=>{const nt=at;throw nt.name==="MethodNotFoundRpcError"||nt.name==="MethodNotSupportedRpcError"?(ot.set(t.uid,!1),L):nt});throw L}})(),et=await U(t,Se,"waitForTransactionReceipt")({checkReplacement:!1,hash:Kt,pollingInterval:p,timeout:C});if(l&&et.status==="reverted")throw new Ae({receipt:et});return et}if((b==null?void 0:b.type)==="local"){const S=await U(t,Ft,"prepareTransactionRequest")({account:b,accessList:r,authorizationList:s,blobs:u,chain:n,data:d,gas:c,gasPrice:i,maxFeePerBlobGas:f,maxFeePerGas:m,maxPriorityFeePerGas:h,nonce:o,nonceManager:b.nonceManager,parameters:[...Pe,"sidecars"],type:y,value:w,...g,to:P}),_=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,q=await b.signTransaction(S,{serializer:_});return await U(t,Ut,"sendRawTransactionSync")({serializedTransaction:q,throwOnReceiptRevert:l})}throw(b==null?void 0:b.type)==="smart"?new J({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new J({docsPath:"/docs/actions/wallet/sendTransactionSync",type:b==null?void 0:b.type})}catch(P){throw P instanceof J?P:_e(P,{...e,account:b,chain:e.chain||void 0})}}async function Tn(t,e){const{id:a}=e;await t.request({method:"wallet_showCallsStatus",params:[a]})}async function Cn(t,e){const{account:a=t.account}=e;if(!a)throw new D({docsPath:"/docs/eip7702/signAuthorization"});const n=N(a);if(!n.signAuthorization)throw new J({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});const r=await kt(t,e);return n.signAuthorization(r)}async function vn(t,{account:e=t.account,message:a}){if(!e)throw new D({docsPath:"/docs/actions/wallet/signMessage"});const n=N(e);if(n.signMessage)return n.signMessage({message:a});const r=typeof a=="string"?Ke(a):a.raw instanceof Uint8Array?Nt(a.raw):a.raw;return t.request({method:"personal_sign",params:[r,n.address]},{retryCount:0})}async function Sn(t,e){var i,f,m,h;const{account:a=t.account,chain:n=t.chain,...r}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTransaction"});const s=N(a);Rt({account:s,...e});const u=await U(t,dt,"getChainId")({});n!==null&&qt({currentChainId:u,chain:n});const d=(n==null?void 0:n.formatters)||((i=t.chain)==null?void 0:i.formatters),c=((f=d==null?void 0:d.transactionRequest)==null?void 0:f.format)||ht;return s.signTransaction?s.signTransaction({...r,chainId:u},{serializer:(h=(m=t.chain)==null?void 0:m.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...r,account:s},"signTransaction"),chainId:R(u),from:s.address}]},{retryCount:0})}async function An(t,e){const{account:a=t.account,domain:n,message:r,primaryType:s}=e;if(!a)throw new D({docsPath:"/docs/actions/wallet/signTypedData"});const u=N(a),d={EIP712Domain:Xe({domain:n}),...e.types};if(ta({domain:n,message:r,primaryType:s,types:d}),u.signTypedData)return u.signTypedData({domain:n,message:r,primaryType:s,types:d});const c=ea({domain:n,message:r,primaryType:s,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,c]},{retryCount:0})}async function Pn(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:R(e)}]},{retryCount:0})}async function _n(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}async function Rn(t,e){return M.internal(t,Vt,"sendTransactionSync",e)}function qn(t){return{addChain:e=>pn(t,e),deployContract:e=>yn(t,e),getAddresses:()=>gn(t),getCallsStatus:e=>qe(t,e),getCapabilities:e=>bn(t,e),getChainId:()=>dt(t),getPermissions:()=>wn(t),prepareAuthorization:e=>kt(t,e),prepareTransactionRequest:e=>Ft(t,e),requestAddresses:()=>xn(t),requestPermissions:e=>En(t,e),sendCalls:e=>Pt(t,e),sendCallsSync:e=>In(t,e),sendRawTransaction:e=>Re(t,e),sendRawTransactionSync:e=>Ut(t,e),sendTransaction:e=>ut(t,e),sendTransactionSync:e=>Vt(t,e),showCallsStatus:e=>Tn(t,e),signAuthorization:e=>Cn(t,e),signMessage:e=>vn(t,e),signTransaction:e=>Sn(t,e),signTypedData:e=>An(t,e),switchChain:e=>Pn(t,e),waitForCallsStatus:e=>_t(t,e),watchAsset:e=>_n(t,e),writeContract:e=>M(t,e),writeContractSync:e=>Rn(t,e)}}function nr(t){const{key:e="wallet",name:a="Wallet Client",transport:n}=t;return At({...t,key:e,name:a,transport:n,type:"walletClient"}).extend(qn)}function rr(t,e={}){const{key:a="custom",methods:n,name:r="Custom Provider",retryDelay:s}=e;return({retryCount:u})=>lt({key:a,methods:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??u,retryDelay:s,type:"custom"})}function sr(t,e={}){const{key:a="fallback",name:n="Fallback",rank:r=!1,shouldThrow:s=Fn,retryCount:u,retryDelay:d}=e;return({chain:c,pollingInterval:i=4e3,timeout:f,...m})=>{let h=t,o=()=>{};const p=lt({key:a,name:n,async request({method:l,params:y}){let w;const g=async(C=0)=>{const b=h[C]({...m,chain:c,retryCount:0,timeout:f});try{const x=await b.request({method:l,params:y});return o({method:l,params:y,response:x,transport:b,status:"success"}),x}catch(x){if(o({error:x,method:l,params:y,transport:b,status:"error"}),s(x)||C===h.length-1||(w??(w=h.slice(C+1).some(I=>{const{include:T,exclude:v}=I({chain:c}).config.methods||{};return T?T.includes(l):v?!v.includes(l):!0})),!w))throw x;return g(C+1)}};return g()},retryCount:u,retryDelay:d,type:"fallback"},{onResponse:l=>o=l,transports:h.map(l=>l({chain:c,retryCount:0}))});if(r){const l=typeof r=="object"?r:{};Un({chain:c,interval:l.interval??i,onTransports:y=>h=y,ping:l.ping,sampleCount:l.sampleCount,timeout:l.timeout,transports:h,weights:l.weights})}return p}}function Fn(t){return!!("code"in t&&typeof t.code=="number"&&(t.code===na.code||t.code===ra.code||Fe.nodeMessage.test(t.message)||t.code===5e3))}function Un({chain:t,interval:e=4e3,onTransports:a,ping:n,sampleCount:r=10,timeout:s=1e3,transports:u,weights:d={}}){const{stability:c=.7,latency:i=.3}=d,f=[],m=async()=>{const h=await Promise.all(u.map(async l=>{const y=l({chain:t,retryCount:0,timeout:s}),w=Date.now();let g,C;try{await(n?n({transport:y}):y.request({method:"net_listening"})),C=1}catch{C=0}finally{g=Date.now()}return{latency:g-w,success:C}}));f.push(h),f.length>r&&f.shift();const o=Math.max(...f.map(l=>Math.max(...l.map(({latency:y})=>y)))),p=u.map((l,y)=>{const w=f.map(I=>I[y].latency),C=1-w.reduce((I,T)=>I+T,0)/w.length/o,b=f.map(I=>I[y].success),x=b.reduce((I,T)=>I+T,0)/b.length;return x===0?[0,y]:[i*C+c*x,y]}).sort((l,y)=>y[0]-l[0]);a(p.map(([,l])=>u[l])),await Ue(e),m()};m()}function or(t,e={}){const{keepAlive:a,key:n="webSocket",methods:r,name:s="WebSocket JSON-RPC",reconnect:u,retryDelay:d}=e;return({chain:c,retryCount:i,timeout:f})=>{var l;const m=e.retryCount??i,h=f??e.timeout??1e4,o=t||((l=c==null?void 0:c.rpcUrls.default.webSocket)==null?void 0:l[0]),p={keepAlive:a,reconnect:u};if(!o)throw new ke;return lt({key:n,methods:r,name:s,async request({method:y,params:w}){const g={method:y,params:w},C=await K(o,p),{error:b,result:x}=await C.requestAsync({body:g,timeout:h});if(b)throw new sa({body:g,error:b,url:o});return x},retryCount:m,retryDelay:d,timeout:h,type:"webSocket"},{getSocket(){return Ta(o)},getRpcClient(){return K(o,p)},async subscribe({params:y,onData:w,onError:g}){const C=await K(o,p),{result:b}=await new Promise((x,I)=>C.request({body:{method:"eth_subscribe",params:y},onError(T){I(T),g==null||g(T)},onResponse(T){if(T.error){I(T.error),g==null||g(T.error);return}if(typeof T.id=="number"){x(T);return}T.method==="eth_subscription"&&w(T.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(x=>C.request({body:{method:"eth_unsubscribe",params:[b]},onResponse:x}))}}}})}}class ir extends Error{constructor(e,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=a}}const it="/docs/contract/decodeDeployData";function cr(t){const{abi:e,bytecode:a,data:n}=t;if(n===a)return{bytecode:a};const r=e.find(u=>"type"in u&&u.type==="constructor");if(!r)throw new Ye({docsPath:it});if(!("inputs"in r))throw new Et({docsPath:it});if(!r.inputs||r.inputs.length===0)throw new Et({docsPath:it});return{args:Mt(r.inputs,`0x${n.replace(a,"")}`),bytecode:a}}function ur(t){const e=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),a=typeof t.blobs[0]=="string"?t.blobs.map(d=>H(d)):t.blobs,n=a.reduce((d,c)=>d+c.length,0),r=ct(new Uint8Array(n));let s=!0;for(const d of a){const c=ct(d);for(;s&&c.position<d.length;){c.incrementPosition(1);let i=31;d.length-c.position<31&&(i=d.length-c.position);for(const f in Array.from({length:i})){const m=c.readByte();if(m===128&&!c.inspectBytes(c.remaining).includes(128)){s=!1;break}r.pushByte(m)}}}const u=r.bytes.slice(0,r.position);return e==="hex"?G(u):u}function dr(t){const{sidecars:e,version:a}=t,n=t.to??(typeof e[0].blob=="string"?"hex":"bytes"),r=[];for(const{commitment:s}of e)r.push(Be({commitment:s,to:n,version:a}));return r}const kn=2147483648;function lr(t){if(t===1)return 60n;if(t>=kn||t<0)throw new Ne({chainId:t});return BigInt((2147483648|t)>>>0)}function Bn({blobToKzgCommitment:t,computeBlobKzgProof:e}){return{blobToKzgCommitment:t,computeBlobKzgProof:e}}function mr(t,e){try{t.loadTrustedSetup(e)}catch(a){const n=a;if(!n.message.includes("trusted setup is already loaded"))throw n}return Bn(t)}function fr({r:t,yParityAndS:e}){const a=H(e),n=a[0]&128?1:0,r=a;return n===1&&(r[0]&=127),{r:t,s:G(r),yParity:n}}function hr(t){const{r:e,s:a}=Bt.Signature.fromCompact(t.slice(2,130));return{r:R(e,{size:32}),yParityAndS:R(a,{size:32})}}async function pr(t){const{serializedTransaction:e,signature:a}=t,n=_a(e),r=a??{r:n.r,s:n.s,v:n.v,yParity:n.yParity},s=Le({...n,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Q({hash:Y(s),signature:r})}function yr({r:t,yParityAndS:e}){return`0x${new Bt.Signature(A(t),A(e)).toCompactHex()}`}function gr(t){const{r:e,s:a,v:n,yParity:r}=t,s=Number(r??n-27n);let u=a;if(s===1){const d=H(a);d[0]|=128,u=G(d)}return{r:e,yParityAndS:u}}export{Ye as AbiConstructorNotFoundError,Et as AbiConstructorParamsNotFoundError,Eo as AbiDecodingDataSizeInvalidError,Io as AbiDecodingDataSizeTooSmallError,To as AbiDecodingZeroDataError,Co as AbiEncodingArrayLengthMismatchError,vo as AbiEncodingBytesSizeMismatchError,So as AbiEncodingLengthMismatchError,Ao as AbiErrorInputsNotFoundError,Po as AbiErrorNotFoundError,_o as AbiErrorSignatureNotFoundError,Ro as AbiEventNotFoundError,qo as AbiEventSignatureEmptyTopicsError,Fo as AbiEventSignatureNotFoundError,Uo as AbiFunctionNotFoundError,ko as AbiFunctionOutputsNotFoundError,Bo as AbiFunctionSignatureNotFoundError,xr as AccountStateConflictError,Vi as AtomicReadyWalletRejectedUpgradeError,Ji as AtomicityNotSupportedError,mt as BaseError,Er as BaseFeeScalarError,Ir as BlockNotFoundError,Tr as BundleFailedError,Ki as BundleTooLargeError,No as BytesSizeMismatchError,Cr as CallExecutionError,Yi as ChainDisconnectedError,vr as ChainDoesNotSupportContract,Sr as ChainMismatchError,Ar as ChainNotFoundError,Pr as CircularReferenceError,_r as ClientChainNotConfiguredError,Rr as ContractFunctionExecutionError,qr as ContractFunctionRevertedError,Fr as ContractFunctionZeroDataError,Ur as CounterfactualDeploymentFailedError,Lo as DecodeLogDataMismatch,Mo as DecodeLogTopicsMismatch,Zi as DuplicateIdError,ir as EIP1193ProviderRpcError,kr as Eip1559FeesNotSupportedError,Br as EnsAvatarInvalidNftUriError,Nr as EnsAvatarUnsupportedNamespaceError,Lr as EnsAvatarUriResolutionError,Ne as EnsInvalidChainIdError,Mr as EstimateGasExecutionError,Fe as ExecutionRevertedError,Dr as FeeCapTooHighError,zr as FeeCapTooLowError,Gr as FeeConflictError,Do as FilterTypeNotSupportedError,Qi as HttpRequestError,$r as InsufficientFundsError,zo as IntegerOutOfRangeError,Xi as InternalRpcError,Hr as IntrinsicGasTooHighError,Or as IntrinsicGasTooLowError,Go as InvalidAbiDecodingTypeError,$o as InvalidAbiEncodingTypeError,jr as InvalidAbiItemError,Qt as InvalidAbiParameterError,Wr as InvalidAbiParametersError,Vr as InvalidAbiTypeParameterError,je as InvalidAddressError,Ho as InvalidArrayError,Oo as InvalidBytesBooleanError,Jr as InvalidChainIdError,Na as InvalidDecimalNumberError,jo as InvalidDefinitionTypeError,zi as InvalidDomainError,Kr as InvalidFunctionModifierError,Wo as InvalidHexBooleanError,Ge as InvalidHexValueError,tc as InvalidInputRpcError,Ee as InvalidLegacyVError,Yr as InvalidModifierError,Zr as InvalidParameterError,ec as InvalidParamsRpcError,Qr as InvalidParenthesisError,Gi as InvalidPrimaryTypeError,ac as InvalidRequestRpcError,Xr as InvalidSerializableTransactionError,$ as InvalidSerializedTransactionError,he as InvalidSerializedTransactionTypeError,ts as InvalidSignatureError,es as InvalidStorageKeySizeError,as as InvalidStructSignatureError,$i as InvalidStructTypeError,nc as JsonRpcVersionUnsupportedError,rc as LimitExceededRpcError,ns as MaxFeePerGasTooLowError,sc as MethodNotFoundRpcError,oc as MethodNotSupportedRpcError,rs as NonceMaxValueError,ss as NonceTooHighError,os as NonceTooLowError,ic as ParseRpcError,cc as ProviderDisconnectedError,uc as ProviderRpcError,is as RawContractError,dc as ResourceNotFoundRpcError,lc as ResourceUnavailableRpcError,mc as RpcError,sa as RpcRequestError,Vo as SizeExceedsPaddingSizeError,Jo as SizeOverflowError,Ko as SliceOffsetOutOfBoundsError,Z as SocketClosedError,cs as SolidityProtectedKeywordError,us as StateAssignmentConflictError,fc as SwitchChainError,aa as TimeoutError,ds as TipAboveFeeCapError,ls as TransactionExecutionError,ms as TransactionNotFoundError,fs as TransactionReceiptNotFoundError,na as TransactionRejectedRpcError,hs as TransactionTypeNotSupportedError,hc as UnauthorizedProviderError,pc as UnknownBundleIdError,ps as UnknownNodeError,yc as UnknownRpcError,ys as UnknownSignatureError,gs as UnknownTypeError,gc as UnsupportedChainIdError,bc as UnsupportedNonOptionalCapabilityError,Yo as UnsupportedPackedAbiType,wc as UnsupportedProviderMethodError,ke as UrlRequiredError,ra as UserRejectedRequestError,bs as WaitForCallsStatusTimeoutError,ws as WaitForTransactionReceiptTimeoutError,It as WebSocketRequestError,qt as assertCurrentChain,Rt as assertRequest,pe as assertTransactionEIP1559,ye as assertTransactionEIP2930,xe as assertTransactionLegacy,xs as blobsToCommitments,Es as blobsToProofs,Zo as boolToBytes,Qo as boolToHex,Xo as bytesToBigInt,ti as bytesToBool,G as bytesToHex,ei as bytesToNumber,Ec as bytesToRlp,ai as bytesToString,fd as ccipFetch,hd as ccipRequest,Ve as checksumAddress,Be as commitmentToVersionedHash,Is as commitmentsToVersionedHashes,yr as compactSignatureToHex,fr as compactSignatureToSignature,ze as concat,ni as concatBytes,ri as concatHex,At as createClient,Ts as createNonceManager,Cs as createPublicClient,ar as createTestClient,lt as createTransport,nr as createWalletClient,rr as custom,Mt as decodeAbiParameters,cr as decodeDeployData,si as decodeErrorResult,oi as decodeEventLog,vs as decodeFunctionData,Ss as decodeFunctionResult,ii as defineBlock,ci as defineChain,Bn as defineKzg,ui as defineTransaction,wd as defineTransactionReceipt,di as defineTransactionRequest,As as deploylessCallViaBytecodeBytecode,Ps as deploylessCallViaFactoryBytecode,Hi as domainSeparator,li as encodeAbiParameters,Ce as encodeDeployData,_s as encodeErrorResult,mi as encodeEventTopics,Xt as encodeFunctionData,Rs as encodeFunctionResult,qs as encodePacked,Fs as erc1155Abi,Us as erc20Abi,ks as erc20Abi_bytes32,Bs as erc4626Abi,Ns as erc6492SignatureValidatorAbi,Ls as erc6492SignatureValidatorByteCode,Ms as erc721Abi,Ds as ethAddress,Ie as etherUnits,Wn as extractChain,sr as fallback,fi as formatBlock,zs as formatEther,Gs as formatGwei,xd as formatLog,hi as formatTransaction,Ed as formatTransactionReceipt,ht as formatTransactionRequest,$s as formatUnits,ur as fromBlobs,pi as fromBytes,yi as fromHex,Dt as fromRlp,gi as getAbiItem,k as getAddress,Hs as getChainContractAddress,On as getContract,jn as getContractAddress,te as getContractError,da as getCreate2Address,ua as getCreateAddress,bi as getEventSelector,wi as getEventSignature,xi as getFunctionSelector,Ei as getFunctionSignature,Pa as getSerializedTransactionType,Os as getTransactionType,Xe as getTypesForEIP712Domain,Te as gweiUnits,Oi as hashDomain,me as hashMessage,ji as hashStruct,Qe as hashTypedData,A as hexToBigInt,Ii as hexToBool,H as hexToBytes,hr as hexToCompactSignature,F as hexToNumber,Ic as hexToRlp,js as hexToSignature,Ti as hexToString,Ws as http,Oe as isAddress,ft as isAddressEqual,Tt as isBytes,Ca as isErc6492Signature,va as isErc8010Signature,ma as isHash,E as isHex,Y as keccak256,Vs as labelhash,Tc as maxInt104,Cc as maxInt112,vc as maxInt120,Sc as maxInt128,Ac as maxInt136,Pc as maxInt144,_c as maxInt152,Rc as maxInt16,qc as maxInt160,Fc as maxInt168,Uc as maxInt176,kc as maxInt184,Bc as maxInt192,Nc as maxInt200,Lc as maxInt208,Mc as maxInt216,Dc as maxInt224,zc as maxInt232,Gc as maxInt24,$c as maxInt240,Hc as maxInt248,Oc as maxInt256,jc as maxInt32,Wc as maxInt40,Vc as maxInt48,Jc as maxInt56,Kc as maxInt64,Yc as maxInt72,Zc as maxInt8,Qc as maxInt80,Xc as maxInt88,tu as maxInt96,eu as maxUint104,au as maxUint112,nu as maxUint120,ru as maxUint128,su as maxUint136,ou as maxUint144,iu as maxUint152,cu as maxUint16,uu as maxUint160,du as maxUint168,lu as maxUint176,mu as maxUint184,fu as maxUint192,hu as maxUint200,pu as maxUint208,yu as maxUint216,gu as maxUint224,bu as maxUint232,wu as maxUint24,xu as maxUint240,Eu as maxUint248,Iu as maxUint256,Tu as maxUint32,Cu as maxUint40,vu as maxUint48,Su as maxUint56,Au as maxUint64,Pu as maxUint72,_u as maxUint8,Ru as maxUint80,qu as maxUint88,Fu as maxUint96,Uu as minInt104,ku as minInt112,Bu as minInt120,Nu as minInt128,Lu as minInt136,Mu as minInt144,Du as minInt152,zu as minInt16,Gu as minInt160,$u as minInt168,Hu as minInt176,Ou as minInt184,ju as minInt192,Wu as minInt200,Vu as minInt208,Ju as minInt216,Ku as minInt224,Yu as minInt232,Zu as minInt24,Qu as minInt240,Xu as minInt248,td as minInt256,ed as minInt32,ad as minInt40,nd as minInt48,rd as minInt56,sd as minInt64,od as minInt72,id as minInt8,cd as minInt80,ud as minInt88,dd as minInt96,Js as multicall3Abi,Ks as namehash,Ys as nonceManager,Ci as numberToBytes,R as numberToHex,pd as offchainLookup,yd as offchainLookupAbiItem,gd as offchainLookupSignature,Me as pad,vi as padBytes,xt as padHex,Zs as parseAbi,Qs as parseAbiItem,Hn as parseAbiParameter,Xs as parseAbiParameters,hr as parseCompactSignature,Jn as parseErc6492Signature,Kn as parseErc8010Signature,tr as parseEther,Si as parseEventLogs,er as parseGwei,to as parseSignature,_a as parseTransaction,Wt as parseUnits,eo as prepareEncodeFunctionData,ao as presignMessagePrefix,no as publicActions,Q as recoverAddress,Sa as recoverMessageAddress,ro as recoverPublicKey,pr as recoverTransactionAddress,Aa as recoverTypedDataAddress,Vn as ripemd160,so as rpcSchema,Ai as rpcTransactionType,oo as serializeAccessList,yr as serializeCompactSignature,io as serializeErc6492Signature,Yn as serializeErc8010Signature,co as serializeSignature,Le as serializeTransaction,ea as serializeTypedData,Pi as setErrorConfig,mr as setupKzg,ld as sha256,Fn as shouldThrow,dr as sidecarsToVersionedHashes,gr as signatureToCompactSignature,uo as signatureToHex,$e as size,De as slice,_i as sliceBytes,Lt as sliceHex,Ri as stringToBytes,Ke as stringToHex,qi as stringify,hn as testActions,ge as toBlobSidecars,lo as toBlobs,B as toBytes,lr as toCoinType,Fi as toEventHash,Ui as toEventSelector,ki as toEventSignature,Bi as toFunctionHash,Ni as toFunctionSelector,Li as toFunctionSignature,Nt as toHex,mo as toPrefixedMessage,ia as toRlp,Mi as transactionType,We as trim,fo as universalSignatureValidatorAbi,ho as universalSignatureValidatorByteCode,ta as validateTypedData,Zn as verifyHash,Qn as verifyMessage,Xn as verifyTypedData,qn as walletActions,or as webSocket,po as weiUnits,yo as withCache,go as withRetry,Ze as withTimeout,bo as zeroAddress,wo as zeroHash};