@dcl/shop 0.1.0 → 0.1.1-30909439604.commit-4721d83

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 (242) hide show
  1. package/_assets/{Activity-BwdIaUnW.js → Activity-CiQm3fPZ.js} +7 -7
  2. package/_assets/{AnimatedBackground-DP8XKTVN.js → AnimatedBackground-BFRTkuDo.js} +1 -1
  3. package/_assets/{Assets-Degiynxt.js → Assets--cn5UbRN.js} +50 -50
  4. package/_assets/{Assets.styles-CmDKBB8r.js → Assets.styles-CkJWzjdk.js} +1 -1
  5. package/_assets/{Authorizations-CJeq3VNJ.js → Authorizations-Cqqxn9wD.js} +7 -7
  6. package/_assets/{Cart-DsUb4sI3.js → Cart-ByLo0Q5U.js} +12 -12
  7. package/_assets/{CircularProgress-CNroeQ3o.js → CircularProgress-Cv24wKWu.js} +5 -5
  8. package/_assets/Collection-DbZpN_eH.js +119 -0
  9. package/_assets/{CollectionCarousel-D36c6dts.js → CollectionCarousel-DKVvizGs.js} +7 -7
  10. package/_assets/{ConstantsUtil-Dfwpy1eP.js → ConstantsUtil-CNJ3pGKv.js} +1 -1
  11. package/_assets/{ContentClient-D6ofwSpu.js → ContentClient-BJFWm8Bs.js} +1 -1
  12. package/_assets/Creator-CtdwyJXl.js +306 -0
  13. package/_assets/{DeploymentBuilder-ku3det23.js → DeploymentBuilder-CXBC22K0.js} +1 -1
  14. package/_assets/{ErrorNotice-COIh7ro4.js → ErrorNotice-51eOicue.js} +1 -1
  15. package/_assets/{ExchangeController-DOL-_brz.js → ExchangeController--vn2md5b.js} +1 -1
  16. package/_assets/{GetCredits-BkjOQ5or.js → GetCredits-CnE9Mkj3.js} +10 -10
  17. package/_assets/{HelpersUtil-2hZP33Du.js → HelpersUtil-Dg90boC1.js} +1 -1
  18. package/_assets/ImportListings-BxeqcxAE.js +461 -0
  19. package/_assets/{ItemDetail-D57x9bXl.js → ItemDetail-CqkeMLxu.js} +251 -281
  20. package/_assets/LoadMore-BolkAKn7.js +7 -0
  21. package/_assets/ManaPricingBanner.styles-DKUacHFQ.js +74 -0
  22. package/_assets/{MenuList-d6ca0DH6.js → MenuList-D4kLbIwO.js} +2 -2
  23. package/_assets/MyAssets-v3gryjCk.js +381 -0
  24. package/_assets/{MyFavorites-DxYh88wB.js → MyFavorites-Bg2hc3VG.js} +2 -2
  25. package/_assets/{NetworkUtil-HlUKXKcF.js → NetworkUtil-Dh3JWXso.js} +1 -1
  26. package/_assets/{NotFound-DA15lCMu.js → NotFound-R9sTwMQk.js} +1 -1
  27. package/_assets/{NotificationsBell-C8r1c8mg.js → NotificationsBell-BoefPrvQ.js} +1 -1
  28. package/_assets/StoreSettings-GYoZCBBR.js +239 -0
  29. package/_assets/Success-CGQGJeM-.js +296 -0
  30. package/_assets/{SwapController-CRz8E17o.js → SwapController-BcfprLwB.js} +1 -1
  31. package/_assets/{Tooltip-D92WFEmr.js → Tooltip-CoMCVLgL.js} +1 -1
  32. package/_assets/{TradeService-DIWR3GwD.js → TradeService-Be5Jm26-.js} +1 -1
  33. package/_assets/{W3MFrameProviderSingleton-BuQKbZaF.js → W3MFrameProviderSingleton-BLAdE798.js} +3 -3
  34. package/_assets/{WebCryptoP256-BFDAPngw.js → WebCryptoP256-B2g3GckQ.js} +1 -1
  35. package/_assets/{authorizations-BNs0emga.js → authorizations-FkFZVBeE.js} +1 -1
  36. package/_assets/{basic-C6XisVyZ.js → basic-DEelCa7C.js} +1 -1
  37. package/_assets/{biconomy-09nDKxxN.js → biconomy-BuAmKMqp.js} +1 -1
  38. package/_assets/{browseLayout.styles-CTl6D_zv.js → browseLayout.styles-6Bx0cPB_.js} +6 -6
  39. package/_assets/{browser-BGlawS--.js → browser-CMge1DAk.js} +1 -1
  40. package/_assets/{browser-ponyfill-Dm9rZGtt.js → browser-ponyfill-DdemUjDS.js} +1 -1
  41. package/_assets/{builder-C8hUH3RB.js → builder-Z4iUHEpn.js} +1 -1
  42. package/_assets/{buy-Cl7snZzi.js → buy-DiLzTHFT.js} +1 -1
  43. package/_assets/{buy-gasless-DVLP7U8S.js → buy-gasless-Cn4_YLUa.js} +1 -1
  44. package/_assets/{categories-BGGjSLd9.js → categories-Byz019bF.js} +8 -8
  45. package/_assets/{ccip-Dx_KcJBs.js → ccip-CCZIckpG.js} +1 -1
  46. package/_assets/{ccip-DLDLk2fK.js → ccip-DUqe0wPP.js} +1 -1
  47. package/_assets/{chains-DjVUcpdx.js → chains-DwiEm2Ny.js} +1 -1
  48. package/_assets/{clsx-BY1AO2V7.js → clsx-sy6nSRXN.js} +2 -2
  49. package/_assets/{common-BzdjGk0Y.js → common-ChK99Sbg.js} +1 -1
  50. package/_assets/confettiAnimation-BpyTLLuX.js +1 -0
  51. package/_assets/{controller-ZqrzYJ4o.js → controller-D2U901D4.js} +2 -2
  52. package/_assets/{core-CWR04nJr.js → core-BqndrHwC.js} +4 -4
  53. package/_assets/{createSvgIcon-BUIodiet.js → createSvgIcon-nAlfqqgf.js} +5 -5
  54. package/_assets/{custom-DMjRmtpL.js → custom-DJvYgxJy.js} +1 -1
  55. package/_assets/{data-capture-SoaOqGRY.js → data-capture-CLOU8jih.js} +1 -1
  56. package/_assets/{decimals-rMqzXjFU.js → decimals-C49MnWnC.js} +1 -1
  57. package/_assets/decimals-DenLQ0L2.js +1 -0
  58. package/_assets/{detectExtension-0JcORGBX.js → detectExtension-Bs6N_T7E.js} +1 -1
  59. package/_assets/{email-i8v6FMCW.js → email-BxF_EMmd.js} +1 -1
  60. package/_assets/{embedded-wallet-DBT_Ev8g.js → embedded-wallet-6IYwV5B_.js} +1 -1
  61. package/_assets/emotion-styled.browser.esm-9O-_UQ_M.js +1 -0
  62. package/_assets/{engine-Bn2HNIpq.js → engine-CDTFOGA6.js} +1 -1
  63. package/_assets/{errors-Ce5OngHE.js → errors-sJnX14Ki.js} +1 -1
  64. package/_assets/estimate-l1-fee-B4XbNvFY.js +1 -0
  65. package/_assets/eth_estimateGas-DaegCW9w.js +1 -0
  66. package/_assets/{eth_getStorageAt-DIGus6Ic.js → eth_getStorageAt-g-V8ByC9.js} +1 -1
  67. package/_assets/eth_getTransactionCount-ChnmCar0.js +1 -0
  68. package/_assets/{ethereum-7duKFA0R.js → ethereum-DdnrEX6r.js} +1 -1
  69. package/_assets/{ethers-CXBJm_wN.js → ethers-rFeF6PNV.js} +1 -1
  70. package/_assets/{execute-DO9Rpu0c.js → execute-D8YtDqpj.js} +2 -2
  71. package/_assets/{extractIPFS-CTs5XnuT.js → extractIPFS-DiQ3ktqZ.js} +1 -1
  72. package/_assets/{features-5tSUGHg0.js → features-B8MZg8q9.js} +1 -1
  73. package/_assets/{fetchTokenMetadata-CHnDbBcr.js → fetchTokenMetadata-Cn6UkNbd.js} +2 -2
  74. package/_assets/field.styles-o0yoMx97.js +70 -0
  75. package/_assets/{fortmatic-CCMQbesB.js → fortmatic-ZrVXe0if.js} +1 -1
  76. package/_assets/{get-bytecode-Bg8NviKV.js → get-bytecode-B5xpAv7a.js} +1 -1
  77. package/_assets/get-ecosystem-wallet-info-DyEERgSx.js +1 -0
  78. package/_assets/{getBalance-BU5lPIM1.js → getBalance-pdi104jy.js} +2 -2
  79. package/_assets/{getInstalledModules-KP-LSI0j.js → getInstalledModules-vRyVzBkY.js} +1 -1
  80. package/_assets/{getNFT-Ctbterca.js → getNFT-ChdTpPL_.js} +2 -2
  81. package/_assets/getNFT-JwHQ_s5F.js +1 -0
  82. package/_assets/{getThemeProps-xrG7EYWl.js → getThemeProps-CFDZlxj4.js} +1 -1
  83. package/_assets/{grid.styles-B1mDfzvi.js → grid.styles-DVBPQuRz.js} +1 -1
  84. package/_assets/{hashTypedData-DaCcjWXS.js → hashTypedData-2Z2_gEL6.js} +1 -1
  85. package/_assets/{hashTypedData-BiojmScK.js → hashTypedData-DP9JOjjX.js} +1 -1
  86. package/_assets/{in-app-Sb-fFEpv.js → in-app-CRH3jQep.js} +1 -1
  87. package/_assets/{in-app-wallet-calls-BYLiaB1J.js → in-app-wallet-calls-Dp9TxCgN.js} +1 -1
  88. package/_assets/{index-BbxUYBIl.js → index--coIj_2Q.js} +2 -2
  89. package/_assets/{index-BV7d8LIf.js → index-5o0_4PJn.js} +1 -1
  90. package/_assets/{index-CcRW7qMf.js → index-6_pDklk8.js} +1 -1
  91. package/_assets/{index-BBM5Da88.js → index-72R1sLRe.js} +1 -1
  92. package/_assets/{index-CcrwUr4B.js → index-B1YUW9FQ.js} +2 -2
  93. package/_assets/index-B2O7rGJL.js +1 -0
  94. package/_assets/{index-BCG-_RTT.js → index-B8_IX_3e.js} +1 -1
  95. package/_assets/{index-Cw22meEP.js → index-BGPVOBHa.js} +1 -1
  96. package/_assets/{index-DQ2tXB-9.js → index-BHMMC_4O.js} +1 -1
  97. package/_assets/{index-DmGcqzuR.js → index-BLpG8mks.js} +1 -1
  98. package/_assets/{index-CD9t0mSF.js → index-BRGDK96N.js} +1 -1
  99. package/_assets/{index-BzC7P3rh.js → index-BUbZ4ieP.js} +1 -1
  100. package/_assets/{index-BdWG2PoE.js → index-BWXsvDqD.js} +1 -1
  101. package/_assets/{index-CKo0vnRV.js → index-BZWNTqaV.js} +1 -1
  102. package/_assets/{index-DjcstBXY.js → index-BaUli81x.js} +1 -1
  103. package/_assets/index-Bbgy14tN.js +1 -0
  104. package/_assets/index-BiIZh9R9.js +2820 -0
  105. package/_assets/{index-CE-Z89iI.js → index-BkP6Akod.js} +1 -1
  106. package/_assets/{index-8EYFemjW.js → index-BszwI7-F.js} +1 -1
  107. package/_assets/{index-CEP90DOS.js → index-BtLL7F-4.js} +1 -1
  108. package/_assets/{index-DC-Z7MbP.js → index-BtkxBg3h.js} +2 -2
  109. package/_assets/{index-DWFCwLfs.js → index-Bu5mtkuE.js} +1 -1
  110. package/_assets/{index-6HemuoHH.js → index-C-E_Jk-6.js} +1 -1
  111. package/_assets/{index-Bb2mLVTh.js → index-C4AfvPtb.js} +1 -1
  112. package/_assets/{index-CSqaG5Rs.js → index-CBrp3dUZ.js} +1 -1
  113. package/_assets/{index-DgMAf2q5.js → index-CCoJpS6M.js} +1 -1
  114. package/_assets/{index-DMKhInQc.js → index-CDCj0Qak.js} +2 -2
  115. package/_assets/{index-DvlgcdsJ.js → index-CJ03r2wd.js} +1 -1
  116. package/_assets/{index-hesFTmUX.js → index-CY1VUN_S.js} +1 -1
  117. package/_assets/{index-DgKHc2Pp.js → index-CYEynknO.js} +1 -1
  118. package/_assets/{index-OiKTI-o_.js → index-CZQ-Avg8.js} +1 -1
  119. package/_assets/{index-BNnLGudB.js → index-ClSZl7Vh.js} +1 -1
  120. package/_assets/{index-3x98-rKq.js → index-CsEaqK5K.js} +1 -1
  121. package/_assets/{index-DbkHKS7K.js → index-Csd0nRMS.js} +2 -2
  122. package/_assets/{index-BpA1I7hL.js → index-CwLvQ9MJ.js} +1 -1
  123. package/_assets/{index-cSAleFRI.js → index-CyyhNrl2.js} +1 -1
  124. package/_assets/{index-CSu0sG0T.js → index-D0JhTMR7.js} +1 -1
  125. package/_assets/{index-CrlwRjah.js → index-D29EUWHC.js} +1 -1
  126. package/_assets/{index-BsQQxLJN.js → index-D3OKsJLK.js} +1 -1
  127. package/_assets/{index-DLEx9ISf.js → index-D9Dv7ZRq.js} +1 -1
  128. package/_assets/{index-PJSp7ijP.js → index-DDqqXhJL.js} +3 -3
  129. package/_assets/{index-BQG7R5QF.js → index-DGuNIM9a.js} +1 -1
  130. package/_assets/{index-Cv-5v5Ze.js → index-DHFAjoyI.js} +1 -1
  131. package/_assets/{index-BgKl-ydS.js → index-DXe1QzPN.js} +1 -1
  132. package/_assets/{index-CcZyuO92.js → index-DaBMwl5V.js} +1 -1
  133. package/_assets/{index-C6rpfPMS.js → index-DbyPzhzJ.js} +1 -1
  134. package/_assets/{index-BIJ2qchS.js → index-Det24uTr.js} +3 -3
  135. package/_assets/{index-BEtbI0Zv.js → index-Dhe2yejG.js} +1 -1
  136. package/_assets/{index-B4EKT3oF.js → index-DitauyL5.js} +1 -1
  137. package/_assets/{index-DFzHpbP5.js → index-DkdxS38k.js} +1 -1
  138. package/_assets/{index-DyGnajSZ.js → index-DkmumT6q.js} +1 -1
  139. package/_assets/{index-CviVJpxw.js → index-DquJiMJI.js} +1 -1
  140. package/_assets/{index-Bor4cMvk.js → index-Duy_bLYT.js} +1 -1
  141. package/_assets/{index-qVmIz0zn.js → index-Dz7l4WRb.js} +1 -1
  142. package/_assets/{index-ZoIpzYhg.js → index-PfgUlDb3.js} +1 -1
  143. package/_assets/{index-RSxxMPji.js → index-Rjrwrr8k.js} +1 -1
  144. package/_assets/{index-BNEWEGXe.js → index-ThwwXj7K.js} +1 -1
  145. package/_assets/{index-DNaX9VGC.js → index-UOQDoXBN.js} +1 -1
  146. package/_assets/index-XMkvXJnG.js +2 -0
  147. package/_assets/{index-Cso0PIKg.js → index-efx_UGwj.js} +3 -3
  148. package/_assets/{index-D20v1ehb.js → index-hBIDXrfA.js} +1 -1
  149. package/_assets/{index-Fyrl3bgj.js → index-jDLQZQqn.js} +1 -1
  150. package/_assets/{index-DETprG7w.js → index-klYUwFTu.js} +1 -1
  151. package/_assets/index.es-CWcx_MPC.js +11 -0
  152. package/_assets/{index.es-4ugP_xPq.js → index.es-DGdQax5Y.js} +1 -1
  153. package/_assets/{index.es-DWjGiGDB.js → index.es-DWEmsLX5.js} +4 -4
  154. package/_assets/{index.es-BWoKVfSl.js → index.es-gS9A1DPX.js} +1 -1
  155. package/_assets/{linkAccount-D303ryxj.js → linkAccount-DktwtO-V.js} +1 -1
  156. package/_assets/{localBatchGatewayRequest-DxATZPfq.js → localBatchGatewayRequest-DoA6w-sg.js} +1 -1
  157. package/_assets/{mana-convert-BAmJatVq.js → mana-convert-8bdglmK2.js} +1 -1
  158. package/_assets/{mana-rate-COZYJ-5D.js → mana-rate-pg062I50.js} +1 -1
  159. package/_assets/{native-BbO8hggJ.js → native-DUHK6GYV.js} +1 -1
  160. package/_assets/{networks-BgOd8fAQ.js → networks-CS3wn-YQ.js} +1 -1
  161. package/_assets/{onramp-C1zk7UMI.js → onramp-_fU1CUPx.js} +1 -1
  162. package/_assets/{openzeppelin-JqnI3fjU.js → openzeppelin-Byo7VjiL.js} +1 -1
  163. package/_assets/{ownerOf-B0AowHTZ.js → ownerOf-9FPRCliB.js} +1 -1
  164. package/_assets/parseNft-f2SijHni.js +2 -0
  165. package/_assets/{parseSignature-DDl2oW2S.js → parseSignature-7zbxP3S5.js} +3 -3
  166. package/_assets/{parseSignature-Zp5jbuFC.js → parseSignature-B4bdR_8K.js} +1 -1
  167. package/_assets/{passkeys-D630VzP0.js → passkeys--fWD2NEw.js} +1 -1
  168. package/_assets/{pay-with-exchange-DB12e4gP.js → pay-with-exchange-Dk9Xcd3H.js} +1 -1
  169. package/_assets/{prepare-contract-call-BreQKHF6.js → prepare-contract-call-CUP20AbD.js} +1 -1
  170. package/_assets/{qr-overlay-BFMFKV4B.js → qr-overlay-DkdnRl_0.js} +3 -3
  171. package/_assets/{react-vyZjIDcS.js → react-IQWs2nb4.js} +1 -1
  172. package/_assets/{receive-C0p5nZhH.js → receive-C29mXrSs.js} +1 -1
  173. package/_assets/{resolveImplementation-Cpqxrq_P.js → resolveImplementation-Brjkq9B3.js} +1 -1
  174. package/_assets/{rpc-BGoWvIYj.js → rpc-Oikc4qrs.js} +1 -1
  175. package/_assets/{secp256k1-CxwkeDtE.js → secp256k1-CUWzbXuP.js} +1 -1
  176. package/_assets/{secp256k1-JugqR1gN.js → secp256k1-WT42JaIN.js} +1 -1
  177. package/_assets/{secp256k1-DN4fbJll.js → secp256k1-v_OYVKpT.js} +1 -1
  178. package/_assets/{send-DQo6irxp.js → send-CSdyFqol.js} +1 -1
  179. package/_assets/{send-batch-transaction-BwQeKmX0.js → send-batch-transaction-BlExRlz8.js} +1 -1
  180. package/_assets/{send-eip712-transaction-Di3Pi2C5.js → send-eip712-transaction-DyfTHBv1.js} +2 -2
  181. package/_assets/send-gasless-transaction-Daukbk69.js +2 -0
  182. package/_assets/{send-transaction-CboskMcL.js → send-transaction-kmfCvyrI.js} +2 -2
  183. package/_assets/{sendMetaTransaction-DfeiXpP_.js → sendMetaTransaction-BA-2MGdZ.js} +1 -1
  184. package/_assets/{sendRawTransaction-BgAwN3aK.js → sendRawTransaction-CTjGjbSv.js} +3 -3
  185. package/_assets/{sentry-B35L1FdR.js → sentry-DvOx8Rfb.js} +1 -1
  186. package/_assets/{serializeTransaction-Cn_3vzYE.js → serializeTransaction-BmaoI9rx.js} +1 -1
  187. package/_assets/{session-proposal-B7rpIMJh.js → session-proposal-nGkLb8fO.js} +1 -1
  188. package/_assets/{session-request--BJtbaZK.js → session-request-QSI6Jos8.js} +2 -2
  189. package/_assets/{sha256-NdAeiB0X.js → sha256-Dx4Jqb1P.js} +1 -1
  190. package/_assets/{signing-DiwulEsw.js → signing-VekuwpLK.js} +3 -3
  191. package/_assets/{socials-054eJtzB.js → socials-BkZgS9yz.js} +1 -1
  192. package/_assets/{swaps-BPYOHTwx.js → swaps-CAZTnQ-D.js} +1 -1
  193. package/_assets/{thirdweb-bX_k_ayM.js → thirdweb-Xk7WShny.js} +3 -3
  194. package/_assets/{to-serializable-transaction-caU-fqUx.js → to-serializable-transaction-C5BoASVF.js} +2 -2
  195. package/_assets/{totalSupply-BVfGieGk.js → totalSupply-CLQexq9U.js} +1 -1
  196. package/_assets/{trade-encoding-CXbhpVj8.js → trade-encoding-DgV-A2zO.js} +1 -1
  197. package/_assets/{transaction-8aHmZ7ni.js → transaction-ToPxlTkC.js} +1 -1
  198. package/_assets/{transactionReceipt-BzQM-iWX.js → transactionReceipt-BHGI1PBX.js} +1 -1
  199. package/_assets/{transactions-UfEKiBWb.js → transactions-paKZZL-W.js} +1 -1
  200. package/_assets/useCreditPacks-CaE-vAPX.js +1 -0
  201. package/_assets/useInfiniteGrid-CeEt3Zid.js +1 -0
  202. package/_assets/useManaRate-D4_9UlI5.js +1 -0
  203. package/_assets/{useSecondarySales-BUPg_0HB.js → useSecondarySales-3tEx5YvY.js} +1 -1
  204. package/_assets/{useStore-j0moew7P.js → useStore-ByHpJuVH.js} +2 -2
  205. package/_assets/useTheme-xAwBEFWH.js +1 -0
  206. package/_assets/{utils-jd03xFBb.js → utils-BgbaLlfC.js} +1 -1
  207. package/_assets/{verifyHash-BlPjp8uI.js → verifyHash-uE8nq1-h.js} +1 -1
  208. package/_assets/{w3m-modal-CJSqLQbS.js → w3m-modal-BWkASM7Q.js} +1 -1
  209. package/_assets/{w3m-modal-B1fkdBpv.js → w3m-modal-CIhzAZkD.js} +1 -1
  210. package/_assets/{wait-for-tx-receipt-nJ13gHYr.js → wait-for-tx-receipt-Ban9Kz9f.js} +1 -1
  211. package/_assets/{wallets-BfXeGzQ3.js → wallets-COZ4xX__.js} +5 -5
  212. package/_assets/{web-connector-D6DeRRYN.js → web-connector-gi_cmfjU.js} +3 -3
  213. package/_assets/{writeContract-D1XhZg5B.js → writeContract-MVlwq6Xg.js} +1 -1
  214. package/_assets/{zora-sepolia-Bt1F-uU9.js → zora-sepolia-BOt0KLBF.js} +1 -1
  215. package/_assets/{zoraTestnet-YWrqaPWn.js → zoraTestnet-BcRH2RHD.js} +1 -1
  216. package/index.html +11 -11
  217. package/package.json +2 -2
  218. package/_assets/Collection-CP0tfCsZ.js +0 -119
  219. package/_assets/Creator-CWs_Cx5f.js +0 -306
  220. package/_assets/ImportListings-DryzCKJV.js +0 -447
  221. package/_assets/LoadMore-BsvftUzw.js +0 -7
  222. package/_assets/MyAssets-OTnYju0y.js +0 -258
  223. package/_assets/StoreSettings-2jXFUoeV.js +0 -253
  224. package/_assets/Success-2HbLWhw3.js +0 -276
  225. package/_assets/decimals-CTAJwKFW.js +0 -1
  226. package/_assets/emotion-styled.browser.esm-C5sYTDtN.js +0 -1
  227. package/_assets/estimate-l1-fee-BYqkQ2bZ.js +0 -1
  228. package/_assets/eth_estimateGas-BfIHMLbI.js +0 -1
  229. package/_assets/eth_getTransactionCount-CmmgCgZ1.js +0 -1
  230. package/_assets/get-ecosystem-wallet-info-43Mjiw6m.js +0 -1
  231. package/_assets/getNFT-bNpY4yta.js +0 -1
  232. package/_assets/import-DbH_aWZX.js +0 -1
  233. package/_assets/index-9H7pG6F1.js +0 -1
  234. package/_assets/index-B3FH4SmC.js +0 -1
  235. package/_assets/index-CVMO2zcQ.js +0 -2
  236. package/_assets/index-Cn-oc3fB.js +0 -2835
  237. package/_assets/parseNft-yDYimY68.js +0 -2
  238. package/_assets/send-gasless-transaction-CCblCzAN.js +0 -2
  239. package/_assets/useCreditPacks-Ceg0Oam0.js +0 -1
  240. package/_assets/useInfiniteGrid-YGnKZcnB.js +0 -1
  241. package/_assets/useManaRate-BhMxx3e3.js +0 -1
  242. package/_assets/useTheme-cGCeJmwR.js +0 -1
@@ -1 +1 @@
1
- import{o as i,s as a}from"./prepare-contract-call-BreQKHF6.js";function f(n){var c;if(!n)return!1;const t=(typeof n=="string"?n:(n==null?void 0:n.message)||((c=n==null?void 0:n.data)==null?void 0:c.message)||"").toLowerCase();return t.includes("insufficient funds")||t.includes("insufficient balance")||t.includes("insufficient")&&(t.includes("native")||t.includes("gas"))||(n==null?void 0:n.code)==="INSUFFICIENT_FUNDS"||(n==null?void 0:n.reason)==="insufficient funds"}function d(n){var c;if(!n)return{message:"Unknown error"};const s=typeof n=="string"?n:(n==null?void 0:n.message)||((c=n==null?void 0:n.data)==null?void 0:c.message)||String(n);return{code:(n==null?void 0:n.code)||(n==null?void 0:n.reason),message:s}}async function o(n){return u({...n,action:"transaction:sent"})}function u(n){return i({client:n.client,data:{action:n.action,chainId:n.chainId,clientId:n.client.clientId,contractAddress:n.contractAddress,errorCode:a(n.error),functionName:n.functionName,gasPrice:n.gasPrice,transactionHash:n.transactionHash,walletAddress:n.walletAddress,walletType:n.walletType},ecosystem:n.ecosystem})}async function m(n){var t,c,e;const s=d(n.error);return i({client:n.client,data:{action:"transaction:insufficient_funds",chainId:n.chainId,clientId:n.client.clientId,contractAddress:n.contractAddress,errorCode:s.code?a(s.code):void 0,errorMessage:s.message,functionName:n.functionName,requiredAmount:(t=n.requiredAmount)==null?void 0:t.toString(),transactionValue:(c=n.transactionValue)==null?void 0:c.toString(),userBalance:(e=n.userBalance)==null?void 0:e.toString(),walletAddress:n.walletAddress},ecosystem:n.ecosystem})}export{m as a,f as i,o as t};
1
+ import{o as i,s as a}from"./prepare-contract-call-CUP20AbD.js";function f(n){var c;if(!n)return!1;const t=(typeof n=="string"?n:(n==null?void 0:n.message)||((c=n==null?void 0:n.data)==null?void 0:c.message)||"").toLowerCase();return t.includes("insufficient funds")||t.includes("insufficient balance")||t.includes("insufficient")&&(t.includes("native")||t.includes("gas"))||(n==null?void 0:n.code)==="INSUFFICIENT_FUNDS"||(n==null?void 0:n.reason)==="insufficient funds"}function d(n){var c;if(!n)return{message:"Unknown error"};const s=typeof n=="string"?n:(n==null?void 0:n.message)||((c=n==null?void 0:n.data)==null?void 0:c.message)||String(n);return{code:(n==null?void 0:n.code)||(n==null?void 0:n.reason),message:s}}async function o(n){return u({...n,action:"transaction:sent"})}function u(n){return i({client:n.client,data:{action:n.action,chainId:n.chainId,clientId:n.client.clientId,contractAddress:n.contractAddress,errorCode:a(n.error),functionName:n.functionName,gasPrice:n.gasPrice,transactionHash:n.transactionHash,walletAddress:n.walletAddress,walletType:n.walletType},ecosystem:n.ecosystem})}async function m(n){var t,c,e;const s=d(n.error);return i({client:n.client,data:{action:"transaction:insufficient_funds",chainId:n.chainId,clientId:n.client.clientId,contractAddress:n.contractAddress,errorCode:s.code?a(s.code):void 0,errorMessage:s.message,functionName:n.functionName,requiredAmount:(t=n.requiredAmount)==null?void 0:t.toString(),transactionValue:(c=n.transactionValue)==null?void 0:c.toString(),userBalance:(e=n.userBalance)==null?void 0:e.toString(),walletAddress:n.walletAddress},ecosystem:n.ecosystem})}export{m as a,f as i,o as t};
@@ -1 +1 @@
1
- import{m as d}from"./prepare-contract-call-BreQKHF6.js";import{d as r,a as e}from"./to-serializable-transaction-caU-fqUx.js";function m(s,{args:u,eventName:l}={}){return{...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,logIndex:s.logIndex?Number(s.logIndex):null,transactionHash:s.transactionHash?s.transactionHash:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,...l?{args:u,eventName:l}:{}}}const n={"0x0":"reverted","0x1":"success"};function o(s,u){const l={...s,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,contractAddress:s.contractAddress?s.contractAddress:null,cumulativeGasUsed:s.cumulativeGasUsed?BigInt(s.cumulativeGasUsed):null,effectiveGasPrice:s.effectiveGasPrice?BigInt(s.effectiveGasPrice):null,gasUsed:s.gasUsed?BigInt(s.gasUsed):null,logs:s.logs?s.logs.map(b=>m(b)):null,to:s.to?s.to:null,transactionIndex:s.transactionIndex?d(s.transactionIndex):null,status:s.status?n[s.status]:null,type:s.type?e[s.type]||s.type:null};return s.blobGasPrice&&(l.blobGasPrice=BigInt(s.blobGasPrice)),s.blobGasUsed&&(l.blobGasUsed=BigInt(s.blobGasUsed)),l}const I=r("transactionReceipt",o);export{m as a,I as d,o as f,n as r};
1
+ import{m as d}from"./prepare-contract-call-CUP20AbD.js";import{d as r,a as e}from"./to-serializable-transaction-C5BoASVF.js";function m(s,{args:u,eventName:l}={}){return{...s,blockHash:s.blockHash?s.blockHash:null,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,logIndex:s.logIndex?Number(s.logIndex):null,transactionHash:s.transactionHash?s.transactionHash:null,transactionIndex:s.transactionIndex?Number(s.transactionIndex):null,...l?{args:u,eventName:l}:{}}}const n={"0x0":"reverted","0x1":"success"};function o(s,u){const l={...s,blockNumber:s.blockNumber?BigInt(s.blockNumber):null,contractAddress:s.contractAddress?s.contractAddress:null,cumulativeGasUsed:s.cumulativeGasUsed?BigInt(s.cumulativeGasUsed):null,effectiveGasPrice:s.effectiveGasPrice?BigInt(s.effectiveGasPrice):null,gasUsed:s.gasUsed?BigInt(s.gasUsed):null,logs:s.logs?s.logs.map(b=>m(b)):null,to:s.to?s.to:null,transactionIndex:s.transactionIndex?d(s.transactionIndex):null,status:s.status?n[s.status]:null,type:s.type?e[s.type]||s.type:null};return s.blobGasPrice&&(l.blobGasPrice=BigInt(s.blobGasPrice)),s.blobGasUsed&&(l.blobGasUsed=BigInt(s.blobGasUsed)),l}const I=r("transactionReceipt",o);export{m as a,I as d,o as f,n as r};
@@ -1,4 +1,4 @@
1
- import{a as c,i as s,b as f}from"./lit-element-B3y9oplH.js";import"./index-PJSp7ijP.js";import{c as a}from"./index-BpA1I7hL.js";import"./index-OiKTI-o_.js";import"./index-Cn-oc3fB.js";import"./react-vyZjIDcS.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./W3MFrameProviderSingleton-BuQKbZaF.js";import"./index-DgMAf2q5.js";import"./index-DC-Z7MbP.js";import"./events-DQ172AOg.js";import"./browser-ponyfill-Dm9rZGtt.js";import"./NetworkUtil-HlUKXKcF.js";import"./index-CKo0vnRV.js";import"./index-nibyPLVP.js";import"./index-BBM5Da88.js";import"./index.es-4ugP_xPq.js";import"./class-map-CxwNmq0D.js";import"./index-DjcstBXY.js";import"./index-BEtbI0Zv.js";import"./index-D20v1ehb.js";import"./index-DWFCwLfs.js";const d=c`
1
+ import{a as c,i as s,b as f}from"./lit-element-B3y9oplH.js";import"./index-DDqqXhJL.js";import{c as a}from"./index-CwLvQ9MJ.js";import"./index-CZQ-Avg8.js";import"./index-BiIZh9R9.js";import"./react-IQWs2nb4.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./W3MFrameProviderSingleton-BLAdE798.js";import"./index-CCoJpS6M.js";import"./index-BtkxBg3h.js";import"./events-DQ172AOg.js";import"./browser-ponyfill-DdemUjDS.js";import"./NetworkUtil-Dh3JWXso.js";import"./index-BZWNTqaV.js";import"./index-nibyPLVP.js";import"./index-72R1sLRe.js";import"./index.es-DGdQax5Y.js";import"./class-map-CxwNmq0D.js";import"./index-BaUli81x.js";import"./index-Dhe2yejG.js";import"./index-hBIDXrfA.js";import"./index-Bu5mtkuE.js";const d=c`
2
2
  :host > wui-flex:first-child {
3
3
  height: 500px;
4
4
  overflow-y: auto;
@@ -0,0 +1 @@
1
+ import{d as w}from"./dcl-schemas-BICTSpB5.js";import{P as R,R as v,V as A,d as k,c as d,W as $,u as I}from"./index-BiIZh9R9.js";import{m as E}from"./mana-convert-8bdglmK2.js";const V="dcl_shop_resume_cart";function y(t){return A(t)}function U(t,r){const e=t.received[0];return e?e.assetType===Number(w.TradeAssetType.USD_PEGGED_MANA)?R(e.amount):e.assetType===Number(w.TradeAssetType.ERC20)?!r||!e.amount?0:E(e.amount,r):0:0}async function H(t,r,e,s,o){const n=[],i=[],c=[];for(const a of t)try{const u=a.tokenId?1:Math.max(1,Math.floor(a.quantity??1));if((a.acquisition??"trade")==="store"){const m=o?await o(a):null;if(!m||!s){i.push(a);continue}if(m.available<u){i.push(a);continue}const p=E(m.priceWei,s);if(!Number.isFinite(p)||p<=0){i.push(a);continue}n.push({item:a,acquisition:"store",priceWei:m.priceWei,usdCents:p,priceCredits:y(p),quantity:u});continue}const l=await e(a);if(!l){i.push(a);continue}if(v(l,r)){c.push(a);continue}const f=U(l,s);if(!Number.isFinite(f)||f<=0){i.push(a);continue}n.push({item:a,acquisition:"trade",trade:l,usdCents:f,priceCredits:y(f),quantity:u})}catch{i.push(a)}const M=n.reduce((a,u)=>a+u.priceCredits*u.quantity,0),S=i.length>0||c.length>0||n.some(a=>a.priceCredits!==a.item.priceCredits);return{buyable:n,unavailable:i,own:c,liveTotalCredits:M,orderChanged:S}}function X(t){const{reservations:r,spent:e,settled:s}=t,o=r.filter(i=>!e.has(i.salt)).map(i=>i.salt),n=[...new Set(r.filter(i=>s.has(i.salt)).map(i=>i.itemId))];return{toRelease:o,boughtItemIds:n}}function _(){return d.creditsServerUrl}async function D(t,r){const e=await k(`${_()}/credits/checkout`,{method:"POST",identity:r,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:t})});if(!e.ok)throw new Error(`checkout ${e.status}: ${await e.text()}`);const{orderId:s,url:o}=await e.json();return{orderId:s,url:o,mock:!1}}async function O(t,r,e={}){const{intervalMs:s=1500,timeoutMs:o=6e4,signal:n}=e,i=Date.now()+o;for(;;){if(n!=null&&n.aborted)throw new DOMException("Aborted","AbortError");const c=await W(t,r,n);if(c.status!=="processing")return c;if(Date.now()>i)return{status:"pending"};await q(s,n)}}async function W(t,r,e){const s=await k(`${_()}/credits/orders/${t}`,{method:"GET",identity:r,metadata:{},signal:e});if(s.status===404)return{status:"processing"};if(!s.ok)throw new Error(`order status ${s.status}`);return s.json()}function q(t,r){return new Promise((e,s)=>{const o=setTimeout(e,t);r==null||r.addEventListener("abort",()=>{clearTimeout(o),s(new DOMException("Aborted","AbortError"))})})}const K=.1,b=[{id:"pack_5",usd:5.99,credits:40},{id:"pack_10",usd:11.99,credits:100,bestValue:!0},{id:"pack_25",usd:29.99,credits:260},{id:"pack_50",usd:59.99,credits:540}];function Y(t,r){const e=r.reduce((n,i)=>i.usd<n.usd?i:n,r[0]);if(!e||e.id===t.id||!(e.usd>0))return null;const s=Math.floor(e.credits/e.usd*t.usd),o=t.credits-s;return o>0?{baseline:s,bonus:o}:null}const z=4;function C(t){return t.imageUrlWebp||t.imageUrl||void 0}async function L(){const t=await fetch(`${d.creditsServerUrl}/credits/packs`);if(!t.ok)throw new Error(`credit packs ${t.status}`);const{packs:r}=await t.json();return r.slice().sort((e,s)=>(e.order??0)-(s.order??0)).map(e=>({id:e.id,usd:e.usd,credits:e.credits,...e.recommended?{bestValue:!0}:{},...C(e)?{artUrl:C(e)}:{}}))}function T(t){return b.find(r=>r.id===t)}const h="mock_cs_",N=new Set([80002,11155111,1337,31337]);function g(){const t=!d.stripePublishableKey;if(t&&!N.has(d.chainId))throw new Error(`Stripe publishable key is missing on chainId=${d.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return t}async function J(t,r){const e=T(t);if(!e)throw new Error("Unknown pack");if(g())return F(e);if(!(r!=null&&r.identity))throw new Error("Sign in to get credits.");return D(t,r.identity)}async function Q(t,r={}){const{intervalMs:e,timeoutMs:s,signal:o,identity:n}=r;if(g()||t.startsWith(h))return G(t,r);if(!n)throw new Error("Sign in to get credits.");return O(t,n,{intervalMs:e,timeoutMs:s,signal:o})}function F(t){const r=`${h}${t.id}_${Date.now()}`;return P(400).then(()=>({orderId:r,clientSecret:`${h}${t.id}`,mock:!0}))}async function G(t,r={}){await P(r.intervalMs??900);const e=t.replace(h,"").replace(/_\d+$/,""),s=T(e),o=(s==null?void 0:s.credits)??0;if(r.address&&s)try{const n=await $(r.address,Math.round(s.credits*K*100));return{status:"credited",creditsGranted:o,newBalance:n.credits}}catch(n){return{status:"failed",error:n.message}}return{status:"credited",creditsGranted:o,newBalance:o}}function P(t,r){return new Promise((e,s)=>{setTimeout(e,t)})}function Z(){const{data:t,isLoading:r}=I({queryKey:["credit-packs"],queryFn:L,staleTime:3e5,retry:!1});return{packs:t??b,isLoading:r&&t===void 0}}export{z as M,V as R,Q as a,Y as b,J as c,g as i,U as l,X as p,H as r,Z as u};
@@ -0,0 +1 @@
1
+ import{Q as x,L as N,M as p,N as v,O as m}from"./index-BiIZh9R9.js";var b=class extends x{constructor(e,s){super(e,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,s){var d,l;const{state:i}=e,t=super.createResult(e,s),{isFetching:o,isRefetching:P,isError:c,isRefetchError:h}=t,a=(l=(d=i.fetchMeta)==null?void 0:d.fetchMore)==null?void 0:l.direction,r=c&&a==="forward",u=o&&a==="forward",n=c&&a==="backward",g=o&&a==="backward";return{...t,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:p(s,i.data),hasPreviousPage:N(s,i.data),isFetchNextPageError:r,isFetchingNextPage:u,isFetchPreviousPageError:n,isFetchingPreviousPage:g,isRefetchError:h&&!r&&!n,isRefetching:P&&!u&&!g}}};function F(e,s){return v(e,b)}function R(e,s,i={}){var c,h,a;const t=F({queryKey:e,enabled:i.enabled,queryFn:({pageParam:r})=>s(r),initialPageParam:0,getNextPageParam:(r,u)=>{if(r.items.length===0)return;const n=u.reduce((g,f)=>g+f.items.length,0);return n<r.total?n:void 0},placeholderData:m}),o=(((c=t.data)==null?void 0:c.pages)??[]).flatMap(r=>r.items),P=((a=(h=t.data)==null?void 0:h.pages[0])==null?void 0:a.total)??0;return{items:o,total:P,isLoading:t.isLoading,isPlaceholderData:t.isPlaceholderData,isError:t.isError,error:t.error,hasNextPage:t.hasNextPage,isFetchingNextPage:t.isFetchingNextPage,isFetchNextPageError:t.isFetchNextPageError,fetchNextPage:t.fetchNextPage}}export{R as u};
@@ -0,0 +1 @@
1
+ import{u as r,c as e}from"./index-BiIZh9R9.js";import{r as t}from"./mana-rate-pg062I50.js";function s(a=!0){return r({queryKey:["mana-rate",e.chainId],queryFn:()=>t(e.chainId),enabled:a,staleTime:6e4,refetchInterval:6e4,retry:1})}export{s as u};
@@ -1 +1 @@
1
- import{u as r,g as a}from"./index-Cn-oc3fB.js";function t(){const{data:e}=r({queryKey:["feature-flag","shop-secondary-sales"],queryFn:a,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return e===!0}export{t as u};
1
+ import{u as r,g as a}from"./index-BiIZh9R9.js";function t(){const{data:e}=r({queryKey:["feature-flag","shop-secondary-sales"],queryFn:a,staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return e===!0}export{t as u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-Cw22meEP.js","_assets/index-DgKHc2Pp.js","_assets/react-vyZjIDcS.js","_assets/sentry-B35L1FdR.js","_assets/index-BzC7P3rh.js","_assets/index-CEP90DOS.js","_assets/index-CcRW7qMf.js","_assets/ethers-CXBJm_wN.js","_assets/events-DQ172AOg.js","_assets/dcl-schemas-BICTSpB5.js","_assets/DeploymentBuilder-ku3det23.js","_assets/ContentClient-D6ofwSpu.js"])))=>i.map(i=>d[i]);
2
- import{_ as m,k as _,c as v,l as b,u as k}from"./index-Cn-oc3fB.js";import{d as E}from"./dcl-schemas-BICTSpB5.js";const w=()=>({cover:"",coverHash:"",description:"",links:{website:"",twitter:"",discord:"",facebook:""}}),d=t=>`urn:decentraland:off-chain:marketplace-stores:${t.toLowerCase()}`;function f(t,e){var r;const o=((r=t==null?void 0:t.find(n=>n.name===e))==null?void 0:r.url)??"";return o.startsWith("https://")?o:""}async function S(t){var e,o,r;try{const n=await fetch(`${v.peerUrl}/content/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[d(t)]})});if(!n.ok)return w();const i=await n.json(),s=i==null?void 0:i[0];if(!(s!=null&&s.metadata))return w();const{metadata:c,content:l}=s,u=(o=(e=c.images)==null?void 0:e.find(p=>p.name==="cover"))==null?void 0:o.file,h=u?(r=l==null?void 0:l.find(p=>p.file===u))==null?void 0:r.hash:void 0;return{cover:h?`${v.peerUrl}/content/contents/${h}`:"",coverHash:h??"",description:(c.description??"").trim(),links:{website:f(c.links,"website"),twitter:f(c.links,"twitter"),discord:f(c.links,"discord"),facebook:f(c.links,"facebook")}}}catch{return w()}}const g=["website","twitter","discord","facebook"],C={website:"https://",twitter:"https://www.twitter.com/",discord:"https://discord.gg/",facebook:"https://www.facebook.com/"};function I(t){return{cover:t.cover,coverName:t.cover?L(t.cover):"",coverHash:t.coverHash,description:t.description,links:{...t.links}}}const y=new Map;function H(t){let e=y.get(t);return e||(e=(async()=>{const{hashV1:o}=await m(async()=>{const{hashV1:n}=await import("./index-Cw22meEP.js").then(i=>i.i);return{hashV1:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),r=new Uint8Array(await(await fetch(t)).arrayBuffer());return o(r)})(),y.set(t,e)),e}function L(t){return`cover/${decodeURIComponent(t.split("?")[0].split("/").pop()||"")||"cover.jpeg"}`}function $(t,e){return e===""||e.startsWith(C[t])}function T(t,e){const o=t.toLowerCase(),r=g.filter(i=>e.links[i]).map(i=>({name:i,url:e.links[i]})),n=e.cover&&e.coverName?[{name:"cover",file:e.coverName}]:[];return{id:d(o),owner:o,description:e.description,images:n,links:r,version:1}}async function N(t){const e=new Map;if(t.cover&&t.coverName){const o=await fetch(t.cover);e.set(t.coverName,new Uint8Array(await o.arrayBuffer()))}return e}async function A(t,e,o){try{const[{buildEntity:r},{createContentClient:n}]=await Promise.all([m(()=>import("./DeploymentBuilder-ku3det23.js").then(a=>a.D),__vite__mapDeps([10,2,1,3,4,5,6,7,8,9])),m(()=>import("./ContentClient-D6ofwSpu.js").then(a=>a.C),__vite__mapDeps([11,2,1,3,4,5,6,7,8,9]))]),i=T(t,e),s=await N(e),c=await r({type:E.EntityType.STORE,pointers:[d(t)],files:s,metadata:i,timestamp:Date.now()}),l=_.Authenticator.signPayload(o,c.entityId),u={fetch:(a,p)=>globalThis.fetch(a,p)};await n({url:`${v.peerUrl}/content`,fetcher:u}).deploy({...c,authChain:l})}catch(r){b(r,{flow:"saveStore"});const n=new Error("save-failed");throw n.cause=r,n}}function F(t){return k({queryKey:["store",t==null?void 0:t.toLowerCase()],enabled:!!t,staleTime:5*6e4,queryFn:()=>S(t)})}export{g as L,C as a,I as d,$ as i,A as s,H as t,F as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BGPVOBHa.js","_assets/index-CYEynknO.js","_assets/react-IQWs2nb4.js","_assets/sentry-DvOx8Rfb.js","_assets/index-BUbZ4ieP.js","_assets/index-BtLL7F-4.js","_assets/index-6_pDklk8.js","_assets/ethers-rFeF6PNV.js","_assets/events-DQ172AOg.js","_assets/dcl-schemas-BICTSpB5.js","_assets/DeploymentBuilder-CXBC22K0.js","_assets/ContentClient-BJFWm8Bs.js"])))=>i.map(i=>d[i]);
2
+ import{_ as m,j as _,c as v,k as b,u as k}from"./index-BiIZh9R9.js";import{d as E}from"./dcl-schemas-BICTSpB5.js";const w=()=>({cover:"",coverHash:"",description:"",links:{website:"",twitter:"",discord:"",facebook:""}}),d=t=>`urn:decentraland:off-chain:marketplace-stores:${t.toLowerCase()}`;function f(t,e){var r;const o=((r=t==null?void 0:t.find(n=>n.name===e))==null?void 0:r.url)??"";return o.startsWith("https://")?o:""}async function S(t){var e,o,r;try{const n=await fetch(`${v.peerUrl}/content/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[d(t)]})});if(!n.ok)return w();const i=await n.json(),s=i==null?void 0:i[0];if(!(s!=null&&s.metadata))return w();const{metadata:c,content:l}=s,u=(o=(e=c.images)==null?void 0:e.find(p=>p.name==="cover"))==null?void 0:o.file,h=u?(r=l==null?void 0:l.find(p=>p.file===u))==null?void 0:r.hash:void 0;return{cover:h?`${v.peerUrl}/content/contents/${h}`:"",coverHash:h??"",description:(c.description??"").trim(),links:{website:f(c.links,"website"),twitter:f(c.links,"twitter"),discord:f(c.links,"discord"),facebook:f(c.links,"facebook")}}}catch{return w()}}const g=["website","twitter","discord","facebook"],C={website:"https://",twitter:"https://www.twitter.com/",discord:"https://discord.gg/",facebook:"https://www.facebook.com/"};function I(t){return{cover:t.cover,coverName:t.cover?L(t.cover):"",coverHash:t.coverHash,description:t.description,links:{...t.links}}}const y=new Map;function H(t){let e=y.get(t);return e||(e=(async()=>{const{hashV1:o}=await m(async()=>{const{hashV1:n}=await import("./index-BGPVOBHa.js").then(i=>i.i);return{hashV1:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),r=new Uint8Array(await(await fetch(t)).arrayBuffer());return o(r)})(),y.set(t,e)),e}function L(t){return`cover/${decodeURIComponent(t.split("?")[0].split("/").pop()||"")||"cover.jpeg"}`}function $(t,e){return e===""||e.startsWith(C[t])}function T(t,e){const o=t.toLowerCase(),r=g.filter(i=>e.links[i]).map(i=>({name:i,url:e.links[i]})),n=e.cover&&e.coverName?[{name:"cover",file:e.coverName}]:[];return{id:d(o),owner:o,description:e.description,images:n,links:r,version:1}}async function N(t){const e=new Map;if(t.cover&&t.coverName){const o=await fetch(t.cover);e.set(t.coverName,new Uint8Array(await o.arrayBuffer()))}return e}async function A(t,e,o){try{const[{buildEntity:r},{createContentClient:n}]=await Promise.all([m(()=>import("./DeploymentBuilder-CXBC22K0.js").then(a=>a.D),__vite__mapDeps([10,2,1,3,4,5,6,7,8,9])),m(()=>import("./ContentClient-BJFWm8Bs.js").then(a=>a.C),__vite__mapDeps([11,2,1,3,4,5,6,7,8,9]))]),i=T(t,e),s=await N(e),c=await r({type:E.EntityType.STORE,pointers:[d(t)],files:s,metadata:i,timestamp:Date.now()}),l=_.Authenticator.signPayload(o,c.entityId),u={fetch:(a,p)=>globalThis.fetch(a,p)};await n({url:`${v.peerUrl}/content`,fetcher:u}).deploy({...c,authChain:l})}catch(r){b(r,{flow:"saveStore"});const n=new Error("save-failed");throw n.cause=r,n}}function F(t){return k({queryKey:["store",t==null?void 0:t.toLowerCase()],enabled:!!t,staleTime:5*6e4,queryFn:()=>S(t)})}export{g as L,C as a,I as d,$ as i,A as s,H as t,F as u};
@@ -0,0 +1 @@
1
+ import"./react-IQWs2nb4.js";import{h as t,T as m,i as s}from"./index-BiIZh9R9.js";function u(){const e=t(s);return e[m]||e}export{u};
@@ -1 +1 @@
1
- import{p as z}from"./sentry-B35L1FdR.js";const w="rpc.thirdweb.com",L="social.thirdweb.com",A="embedded-wallet.thirdweb.com",R="pay.thirdweb.com",v="storage.thirdweb.com",x="bundler.thirdweb.com",$="c.thirdweb.com",C="insight.thirdweb.com",N="engine.thirdweb.com",O="bridge.thirdweb.com";let T={analytics:$,bridge:O,bundler:x,engineCloud:N,inAppWallet:A,insight:C,pay:R,rpc:w,social:L,storage:v};const H=e=>{T={analytics:e.analytics??$,bridge:e.bridge??O,bundler:e.bundler??x,engineCloud:e.engineCloud??N,inAppWallet:e.inAppWallet??A,insight:e.insight??C,pay:e.pay??R,rpc:e.rpc??w,social:e.social??L,storage:e.storage??v}},l=()=>T,V=e=>{const t=T[e];return t.startsWith("localhost")?`http://${t}`:`https://${t}`};let M=null;const X=e=>{M=e},P=()=>M,Se=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RPC_URL:w,getServiceKey:P,getThirdwebBaseUrl:V,getThirdwebDomains:l,setServiceKey:X,setThirdwebDomains:H},Symbol.toStringTag,{value:"Module"})),G="5.120.1";class Q extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const S=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Y(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?"mobile":typeof navigator<"u"?"browser":"node"}function q(e){for(let t=0,n=S.length;t<n;t++){const[r,s]=S[t];if(s.exec(e))return r}return null}function E(e){return e.split(".").length===3}var J={};const Z=typeof z<"u"&&J&&!1,ee=6e4;function te(e,t){async function n(r,s){const{requestTimeoutMs:c=ee,useAuthToken:o,...y}=s||{};let i=y.headers?new Headers(y.headers):typeof r=="object"?r.headers:void 0;const f=typeof r=="string"?r:r.url;if(_(f)){i||(i=new Headers);const p=o&&e.secretKey&&E(e.secretKey)?e.secretKey:void 0,W=e.secretKey&&!E(e.secretKey)?e.secretKey:void 0,m=e.clientId;p&&ie(f)?(i.set("authorization",`Bearer ${p}`),e.teamId&&i.set("x-team-id",e.teamId),m&&i.set("x-client-id",m)):p&&!re(f)&&!se(f)?(i.set("authorization",`Bearer ${p}`),e.teamId&&i.set("x-team-id",e.teamId)):(W&&i.set("x-secret-key",W),m&&i.set("x-client-id",m)),t&&(i.set("x-ecosystem-id",t.id),t.partnerId&&i.set("x-ecosystem-partner-id",t.partnerId));for(const[j,K]of k())i.set(j,K);const U=P();U&&i.set("x-service-api-key",U)}let u,g;return c&&(u=new AbortController,g=setTimeout(()=>{u==null||u.abort("timeout")},c)),fetch(r,{...y,headers:i,signal:u==null?void 0:u.signal}).finally(()=>{g&&clearTimeout(g)})}return n}const ne=[".thirdweb.com",".ipfscdn.io",".thirdweb.dev",".thirdweb-dev.com",".thirdwebstorage-dev.com"],d=new Q(4096);function _(e){if(d.has(e))return d.get(e);try{const{hostname:t}=new URL(e),n=ne.some(r=>t.endsWith(r));return d.set(e,n),n}catch{return d.set(e,!1),!1}}function re(e){try{const{hostname:t}=new URL(e);return t.startsWith("pay.")}catch{return!1}}function se(e){try{const{hostname:t}=new URL(e);return t.startsWith("in-app-wallet.")||t.startsWith("embedded-wallet.")}catch{return!1}}function ie(e){try{const{hostname:t}=new URL(e);return t.endsWith(".bundler.thirdweb.com")||t.endsWith(".bundler.thirdweb-dev.com")}catch{return!1}}const ce="unified-sdk";let h;function k(){if(h)return h;let e=null;typeof navigator<"u"&&(e=q(navigator.userAgent));let t;return typeof globalThis<"u"&&"Application"in globalThis&&(t=globalThis.Application.applicationId),h=Object.entries({"x-sdk-name":ce,"x-sdk-os":e?oe(e):"unknown","x-sdk-platform":Y(),"x-sdk-version":G,...t?{"x-bundle-id":t}:{}}),h}function oe(e){const t=e.toLowerCase();if(t.startsWith("win"))return"win";switch(e){case"Mac OS":return"mac";case"iOS":return"ios";case"Android OS":return"android";default:return t.replace(/\s/gi,"_")}}const Ee=Object.freeze(Object.defineProperty({__proto__:null,IS_THIRDWEB_URL_CACHE:d,getClientFetch:te,getPlatformHeaders:k,isThirdwebUrl:_},Symbol.toStringTag,{value:"Module"})),ue=new Map,ae=new Map;function le(e){const t=(s,c)=>({clear:()=>c.delete(s),get:()=>c.get(s),set:o=>c.set(s,o)}),n=t(e,ue),r=t(e,ae);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function B(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=le(t),s=r.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let c=r.promise.get();c||(c=e(),r.promise.set(c));try{const o=await c;return r.response.set({created:new Date,data:o}),o}finally{r.promise.clear()}}const a=new Map;function de(e){const t=l().rpc;if(typeof e=="number")return{id:e,rpc:`https://${e}.${t}`};if(we(e))return D(e);if(he(e))return F(e);let n=e.rpc;n||(n=`https://${e.id}.${t}`);const r={...e,rpc:n};return a.set(e.id,r),r}function fe(e){for(const t of e)a.set(t.id,t)}function pe(e){if(a.has(e))return a.get(e);const t=l().rpc;return{id:e,rpc:`https://${e}.${t}`}}function me(e){return a.get(e)}function he(e){return"rpc"in e&&Array.isArray(e.rpc)&&"slug"in e}function F(e){var n;const t=l().rpc;return{blockExplorers:(n=e==null?void 0:e.explorers)==null?void 0:n.map(r=>({apiUrl:r.url,name:r.name,url:r.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpc[0]??`https://${e.chainId}.${t}`,testnet:e.testnet?!0:void 0}}function we(e){return"rpcUrls"in e&&!("rpc"in e)}function D(e){const t=l().rpc;return{blockExplorers:e!=null&&e.blockExplorers?Object.values(e==null?void 0:e.blockExplorers).map(n=>({apiUrl:n.apiUrl,name:n.name,url:n.url})):[],id:e.id,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpcUrls.default.http[0]??`https://${e.id}.${t}`,testnet:e.testnet?!0:void 0}}function be(e){const t=l().rpc;if(typeof e.chain=="number")return`https://${e.chain}.${t}/${e.client.clientId}`;const{rpc:n}=e.chain;if(_(n)){const r=new URL(e.chain.rpc.replace(w,t));return(r.pathname==="/"||r.pathname.startsWith("/$"))&&(r.pathname=`/${e.client.clientId}`),r.toString()}return n}async function ye(e){var t;return(t=e.nativeCurrency)!=null&&t.symbol?e.nativeCurrency.symbol:b(e).then(n=>n.nativeCurrency.symbol).catch(()=>"ETH")}async function ge(e){var t;return(t=e.nativeCurrency)!=null&&t.decimals?e.nativeCurrency.decimals:b(e).then(n=>n.nativeCurrency.decimals).catch(()=>18)}async function Te(e){var t;return(t=e.nativeCurrency)!=null&&t.name?e.nativeCurrency.name:b(e).then(n=>n.nativeCurrency.name).catch(()=>"ETH")}function b(e){const t=e.id;return B(async()=>{try{const n=await fetch(`https://api.thirdweb.com/v1/chains/${t}`);if(!n.ok)throw new Error(`Failed to fetch chain data for chainId ${t}. ${n.status} ${n.statusText}`);const r=await n.json();if(r.error)throw new Error(`Failed to fetch chain data for chainId ${t}`);if(!r.data)throw new Error(`Failed to fetch chain data for chainId ${t}`);const s=r.data;return I(e,s)}catch{return I(e)}},{cacheKey:`chain:${t}`,cacheTime:300*1e3})}async function _e(){return B(async()=>{const e=await fetch("https://api.thirdweb.com/v1/chains/services?service=insight");if(!e.ok)throw new Error(`Failed to fetch services. ${e.status} ${e.statusText}`);const t=await e.json();return Object.keys(t.data).map(n=>Number(n))},{cacheKey:"chain:insight-enabled",cacheTime:1440*60*1e3})}function We(e){var t;return{blockExplorers:(t=e.explorers)==null?void 0:t.map(n=>({apiUrl:n.url,name:n.name,url:n.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:e.nativeCurrency,rpc:e.rpc[0]||"",testnet:e.testnet===!0?!0:void 0}}function I(e,t){var r;const n=e.nativeCurrency?{...t==null?void 0:t.nativeCurrency,...e.nativeCurrency}:t==null?void 0:t.nativeCurrency;return{...t,chain:(t==null?void 0:t.chain)||e.name||"",chainId:e.id||(t==null?void 0:t.chainId)||-1,explorers:((r=e.blockExplorers)==null?void 0:r.map(s=>({name:s.name,standard:"EIP3091",url:s.url})))||(t==null?void 0:t.explorers),icon:e.icon||(t==null?void 0:t.icon),name:e.name||(t==null?void 0:t.name)||"",nativeCurrency:{decimals:(n==null?void 0:n.decimals)||18,name:(n==null?void 0:n.name)||"",symbol:(n==null?void 0:n.symbol)||""},rpc:e.rpc?[e.rpc]:(t==null?void 0:t.rpc)||[""],shortName:(t==null?void 0:t.shortName)||e.name||"",slug:(t==null?void 0:t.slug)||e.name||"",stackType:(t==null?void 0:t.stackType)||"",testnet:e.testnet||(t==null?void 0:t.testnet)||!1}}const Ie=Object.freeze(Object.defineProperty({__proto__:null,CUSTOM_CHAIN_MAP:a,cacheChains:fe,convertApiChainToChain:We,convertLegacyChain:F,convertViemChain:D,defineChain:de,getCachedChain:pe,getCachedChainIfExists:me,getChainDecimals:ge,getChainMetadata:b,getChainNativeCurrencyName:Te,getChainSymbol:ye,getInsightEnabledChainIds:_e,getRpcUrlForChain:be},Symbol.toStringTag,{value:"Module"}));export{Q as L,pe as a,be as b,V as c,de as d,te as e,l as f,_e as g,me as h,_ as i,E as j,b as k,q as l,ye as m,ge as n,Te as o,fe as p,Se as q,Ee as r,Ie as u,B as w};
1
+ import{p as z}from"./sentry-DvOx8Rfb.js";const w="rpc.thirdweb.com",L="social.thirdweb.com",A="embedded-wallet.thirdweb.com",R="pay.thirdweb.com",v="storage.thirdweb.com",x="bundler.thirdweb.com",$="c.thirdweb.com",C="insight.thirdweb.com",N="engine.thirdweb.com",O="bridge.thirdweb.com";let T={analytics:$,bridge:O,bundler:x,engineCloud:N,inAppWallet:A,insight:C,pay:R,rpc:w,social:L,storage:v};const H=e=>{T={analytics:e.analytics??$,bridge:e.bridge??O,bundler:e.bundler??x,engineCloud:e.engineCloud??N,inAppWallet:e.inAppWallet??A,insight:e.insight??C,pay:e.pay??R,rpc:e.rpc??w,social:e.social??L,storage:e.storage??v}},l=()=>T,V=e=>{const t=T[e];return t.startsWith("localhost")?`http://${t}`:`https://${t}`};let M=null;const X=e=>{M=e},P=()=>M,Se=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RPC_URL:w,getServiceKey:P,getThirdwebBaseUrl:V,getThirdwebDomains:l,setServiceKey:X,setThirdwebDomains:H},Symbol.toStringTag,{value:"Module"})),G="5.120.1";class Q extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const S=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Y(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?"mobile":typeof navigator<"u"?"browser":"node"}function q(e){for(let t=0,n=S.length;t<n;t++){const[r,s]=S[t];if(s.exec(e))return r}return null}function E(e){return e.split(".").length===3}var J={};const Z=typeof z<"u"&&J&&!1,ee=6e4;function te(e,t){async function n(r,s){const{requestTimeoutMs:c=ee,useAuthToken:o,...y}=s||{};let i=y.headers?new Headers(y.headers):typeof r=="object"?r.headers:void 0;const f=typeof r=="string"?r:r.url;if(_(f)){i||(i=new Headers);const p=o&&e.secretKey&&E(e.secretKey)?e.secretKey:void 0,W=e.secretKey&&!E(e.secretKey)?e.secretKey:void 0,m=e.clientId;p&&ie(f)?(i.set("authorization",`Bearer ${p}`),e.teamId&&i.set("x-team-id",e.teamId),m&&i.set("x-client-id",m)):p&&!re(f)&&!se(f)?(i.set("authorization",`Bearer ${p}`),e.teamId&&i.set("x-team-id",e.teamId)):(W&&i.set("x-secret-key",W),m&&i.set("x-client-id",m)),t&&(i.set("x-ecosystem-id",t.id),t.partnerId&&i.set("x-ecosystem-partner-id",t.partnerId));for(const[j,K]of k())i.set(j,K);const U=P();U&&i.set("x-service-api-key",U)}let u,g;return c&&(u=new AbortController,g=setTimeout(()=>{u==null||u.abort("timeout")},c)),fetch(r,{...y,headers:i,signal:u==null?void 0:u.signal}).finally(()=>{g&&clearTimeout(g)})}return n}const ne=[".thirdweb.com",".ipfscdn.io",".thirdweb.dev",".thirdweb-dev.com",".thirdwebstorage-dev.com"],d=new Q(4096);function _(e){if(d.has(e))return d.get(e);try{const{hostname:t}=new URL(e),n=ne.some(r=>t.endsWith(r));return d.set(e,n),n}catch{return d.set(e,!1),!1}}function re(e){try{const{hostname:t}=new URL(e);return t.startsWith("pay.")}catch{return!1}}function se(e){try{const{hostname:t}=new URL(e);return t.startsWith("in-app-wallet.")||t.startsWith("embedded-wallet.")}catch{return!1}}function ie(e){try{const{hostname:t}=new URL(e);return t.endsWith(".bundler.thirdweb.com")||t.endsWith(".bundler.thirdweb-dev.com")}catch{return!1}}const ce="unified-sdk";let h;function k(){if(h)return h;let e=null;typeof navigator<"u"&&(e=q(navigator.userAgent));let t;return typeof globalThis<"u"&&"Application"in globalThis&&(t=globalThis.Application.applicationId),h=Object.entries({"x-sdk-name":ce,"x-sdk-os":e?oe(e):"unknown","x-sdk-platform":Y(),"x-sdk-version":G,...t?{"x-bundle-id":t}:{}}),h}function oe(e){const t=e.toLowerCase();if(t.startsWith("win"))return"win";switch(e){case"Mac OS":return"mac";case"iOS":return"ios";case"Android OS":return"android";default:return t.replace(/\s/gi,"_")}}const Ee=Object.freeze(Object.defineProperty({__proto__:null,IS_THIRDWEB_URL_CACHE:d,getClientFetch:te,getPlatformHeaders:k,isThirdwebUrl:_},Symbol.toStringTag,{value:"Module"})),ue=new Map,ae=new Map;function le(e){const t=(s,c)=>({clear:()=>c.delete(s),get:()=>c.get(s),set:o=>c.set(s,o)}),n=t(e,ue),r=t(e,ae);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function B(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){const r=le(t),s=r.response.get();if(s&&n>0&&Date.now()-s.created.getTime()<n)return s.data;let c=r.promise.get();c||(c=e(),r.promise.set(c));try{const o=await c;return r.response.set({created:new Date,data:o}),o}finally{r.promise.clear()}}const a=new Map;function de(e){const t=l().rpc;if(typeof e=="number")return{id:e,rpc:`https://${e}.${t}`};if(we(e))return D(e);if(he(e))return F(e);let n=e.rpc;n||(n=`https://${e.id}.${t}`);const r={...e,rpc:n};return a.set(e.id,r),r}function fe(e){for(const t of e)a.set(t.id,t)}function pe(e){if(a.has(e))return a.get(e);const t=l().rpc;return{id:e,rpc:`https://${e}.${t}`}}function me(e){return a.get(e)}function he(e){return"rpc"in e&&Array.isArray(e.rpc)&&"slug"in e}function F(e){var n;const t=l().rpc;return{blockExplorers:(n=e==null?void 0:e.explorers)==null?void 0:n.map(r=>({apiUrl:r.url,name:r.name,url:r.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpc[0]??`https://${e.chainId}.${t}`,testnet:e.testnet?!0:void 0}}function we(e){return"rpcUrls"in e&&!("rpc"in e)}function D(e){const t=l().rpc;return{blockExplorers:e!=null&&e.blockExplorers?Object.values(e==null?void 0:e.blockExplorers).map(n=>({apiUrl:n.apiUrl,name:n.name,url:n.url})):[],id:e.id,name:e.name,nativeCurrency:{decimals:e.nativeCurrency.decimals,name:e.nativeCurrency.name,symbol:e.nativeCurrency.symbol},rpc:e.rpcUrls.default.http[0]??`https://${e.id}.${t}`,testnet:e.testnet?!0:void 0}}function be(e){const t=l().rpc;if(typeof e.chain=="number")return`https://${e.chain}.${t}/${e.client.clientId}`;const{rpc:n}=e.chain;if(_(n)){const r=new URL(e.chain.rpc.replace(w,t));return(r.pathname==="/"||r.pathname.startsWith("/$"))&&(r.pathname=`/${e.client.clientId}`),r.toString()}return n}async function ye(e){var t;return(t=e.nativeCurrency)!=null&&t.symbol?e.nativeCurrency.symbol:b(e).then(n=>n.nativeCurrency.symbol).catch(()=>"ETH")}async function ge(e){var t;return(t=e.nativeCurrency)!=null&&t.decimals?e.nativeCurrency.decimals:b(e).then(n=>n.nativeCurrency.decimals).catch(()=>18)}async function Te(e){var t;return(t=e.nativeCurrency)!=null&&t.name?e.nativeCurrency.name:b(e).then(n=>n.nativeCurrency.name).catch(()=>"ETH")}function b(e){const t=e.id;return B(async()=>{try{const n=await fetch(`https://api.thirdweb.com/v1/chains/${t}`);if(!n.ok)throw new Error(`Failed to fetch chain data for chainId ${t}. ${n.status} ${n.statusText}`);const r=await n.json();if(r.error)throw new Error(`Failed to fetch chain data for chainId ${t}`);if(!r.data)throw new Error(`Failed to fetch chain data for chainId ${t}`);const s=r.data;return I(e,s)}catch{return I(e)}},{cacheKey:`chain:${t}`,cacheTime:300*1e3})}async function _e(){return B(async()=>{const e=await fetch("https://api.thirdweb.com/v1/chains/services?service=insight");if(!e.ok)throw new Error(`Failed to fetch services. ${e.status} ${e.statusText}`);const t=await e.json();return Object.keys(t.data).map(n=>Number(n))},{cacheKey:"chain:insight-enabled",cacheTime:1440*60*1e3})}function We(e){var t;return{blockExplorers:(t=e.explorers)==null?void 0:t.map(n=>({apiUrl:n.url,name:n.name,url:n.url})),faucets:e.faucets?[...e.faucets]:void 0,icon:e.icon,id:e.chainId,name:e.name,nativeCurrency:e.nativeCurrency,rpc:e.rpc[0]||"",testnet:e.testnet===!0?!0:void 0}}function I(e,t){var r;const n=e.nativeCurrency?{...t==null?void 0:t.nativeCurrency,...e.nativeCurrency}:t==null?void 0:t.nativeCurrency;return{...t,chain:(t==null?void 0:t.chain)||e.name||"",chainId:e.id||(t==null?void 0:t.chainId)||-1,explorers:((r=e.blockExplorers)==null?void 0:r.map(s=>({name:s.name,standard:"EIP3091",url:s.url})))||(t==null?void 0:t.explorers),icon:e.icon||(t==null?void 0:t.icon),name:e.name||(t==null?void 0:t.name)||"",nativeCurrency:{decimals:(n==null?void 0:n.decimals)||18,name:(n==null?void 0:n.name)||"",symbol:(n==null?void 0:n.symbol)||""},rpc:e.rpc?[e.rpc]:(t==null?void 0:t.rpc)||[""],shortName:(t==null?void 0:t.shortName)||e.name||"",slug:(t==null?void 0:t.slug)||e.name||"",stackType:(t==null?void 0:t.stackType)||"",testnet:e.testnet||(t==null?void 0:t.testnet)||!1}}const Ie=Object.freeze(Object.defineProperty({__proto__:null,CUSTOM_CHAIN_MAP:a,cacheChains:fe,convertApiChainToChain:We,convertLegacyChain:F,convertViemChain:D,defineChain:de,getCachedChain:pe,getCachedChainIfExists:me,getChainDecimals:ge,getChainMetadata:b,getChainNativeCurrencyName:Te,getChainSymbol:ye,getInsightEnabledChainIds:_e,getRpcUrlForChain:be},Symbol.toStringTag,{value:"Module"}));export{Q as L,pe as a,be as b,V as c,de as d,te as e,l as f,_e as g,me as h,_ as i,E as j,b as k,q as l,ye as m,ge as n,Te as o,fe as p,Se as q,Ee as r,Ie as u,B as w};
@@ -1,2 +1,2 @@
1
- import{bV as rt,bW as wt,bX as xt,K as Wt,bY as nt,bZ as st,b_ as it,L as Ht,b$ as Ft,c0 as Pt,c1 as x,c2 as Yt,c3 as H,c4 as w,c5 as l,c6 as b,c7 as p,c8 as vt,c9 as qt,ca as It,cb as m,cc as $t,cd as Gt,ce as ot,cf as g,cg as Zt,ch as Xt,ci as Jt,cj as Qt,ck as Kt,cl as B,cm as At,cn as te,co as S,cp as F,cq as O,cr as ee,cs as V,bU as re,ct as ne,aQ as k,b8 as se,aI as U,az as Y,b9 as R,bi as Et,aq as ie,aK as oe,aX as at,am as ae,cu as ce,ay as ue,aA as fe,C as de,x as le}from"./sendRawTransaction-BgAwN3aK.js";import{a7 as ct,a9 as he,ac as ye,$ as pe,af as ut,ad as me,ay as Bt,a1 as ft,a8 as be}from"./NetworkUtil-HlUKXKcF.js";import{s as ge}from"./secp256k1-JugqR1gN.js";function Vr(t){const e={formatters:void 0,fees:void 0,serializers:void 0,...t};function n(r){return s=>{const i=typeof s=="function"?s(r):s,o={...r,...i};return Object.assign(o,{extend:n(o)})}}return Object.assign(e,{extend:n(e)})}function kr(){return{}}function dt(t){let e;if(typeof t=="string")e=rt(t);else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(!xt(i)){e=rt(i,n);break}}}if(!e)throw new Wt({signature:t});return e}function lt(t){const e=[];if(typeof t=="string"){const n=nt(t),r=n.length;for(let s=0;s<r;s++)e.push(st(n[s],{modifiers:it}))}else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(xt(i))continue;const o=nt(i),a=o.length;for(let u=0;u<a;u++)e.push(st(o[u],{modifiers:it,structs:n}))}}if(e.length===0)throw new Ht({params:t});return e}function q(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Ft(Pt(t));return n==="Bytes"?r:x(r)}function Ur(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Yt(Pt(t));return n==="Bytes"?r:x(r)}function Tr(t){return H(t)&&w(t)===32}const we={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new ve({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Pe({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function xe(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(we);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class ht extends l{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class Pe extends l{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class ve extends l{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class Ie extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const $e={checksum:new Ie(8192)},N=$e.checksum;function St(t,e={}){const{compressed:n}=e,{prefix:r,x:s,y:i}=t;if(n===!1||typeof s=="bigint"&&typeof i=="bigint"){if(r!==4)throw new yt({prefix:r,cause:new Se});return}if(n===!0||typeof s=="bigint"&&typeof i>"u"){if(r!==3&&r!==2)throw new yt({prefix:r,cause:new Be});return}throw new Ee({publicKey:t})}function _r(t){const e=(()=>{if(H(t))return zt(t);if(qt(t))return Ae(t);const{prefix:n,x:r,y:s}=t;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return St(e),e}function Ae(t){return zt(x(t))}function zt(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new ze({publicKey:t});if(t.length===130){const r=BigInt(m(t,0,32)),s=BigInt(m(t,32,64));return{prefix:4,x:r,y:s}}if(t.length===132){const r=Number(m(t,0,1)),s=BigInt(m(t,1,33)),i=BigInt(m(t,33,65));return{prefix:r,x:s,y:i}}const e=Number(m(t,0,1)),n=BigInt(m(t,1,33));return{prefix:e,x:n}}function Mr(t,e={}){return vt(Ct(t,e))}function Ct(t,e={}){St(t);const{prefix:n,x:r,y:s}=t,{includePrefix:i=!0}=e;return b(i?p(n,{size:1}):"0x",p(r,{size:32}),typeof s=="bigint"?p(s,{size:32}):"0x")}class Ee extends l{constructor({publicKey:e}){super(`Value \`${It(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class yt extends l{constructor({prefix:e,cause:n}){super(`Prefix "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class Be extends l{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Se extends l{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let ze=class extends l{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Ce=/^0x[a-fA-F0-9]{40}$/;function v(t,e={}){const{strict:n=!0}=e;if(!Ce.test(t))throw new pt({address:t,cause:new Re});if(n){if(t.toLowerCase()===t)return;if(G(t)!==t)throw new pt({address:t,cause:new Le})}}function G(t){if(N.has(t))return N.get(t);v(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=q(Gt(e),{as:"Bytes"}),r=e.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return N.set(t,s),s}function Oe(t,e={}){const{checksum:n=!1}=e;return v(t),n?G(t):t}function Wr(t,e={}){const n=q(`0x${Ct(t).slice(4)}`).substring(26);return Oe(`0x${n}`,e)}function Hr(t,e){return v(t,{strict:!1}),v(e,{strict:!1}),t.toLowerCase()===e.toLowerCase()}function T(t,e={}){const{strict:n=!0}=e??{};try{return v(t,{strict:n}),!0}catch{return!1}}class pt extends l{constructor({address:e,cause:n}){super(`Address "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Re extends l{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Le extends l{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ne=/^(.*)\[([0-9]*)\]$/,je=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,mt=2n**256n-1n;function Z(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new j({signature:t});if(typeof t.s>"u")throw new j({signature:t});if(n&&typeof t.yParity>"u")throw new j({signature:t});if(t.r<0n||t.r>mt)throw new We({value:t.r});if(t.s<0n||t.s>mt)throw new He({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new L({value:t.yParity})}function Ve(t){return Rt(x(t))}function Rt(t){if(t.length!==130&&t.length!==132)throw new De({signature:t});const e=BigInt(m(t,0,32)),n=BigInt(m(t,32,64)),r=(()=>{const s=+`0x${t.slice(130)}`;if(!Number.isNaN(s))try{return X(s)}catch{throw new L({value:s})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function ke(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return Lt(t)}function Lt(t){const e=typeof t=="string"?Rt(t):t instanceof Uint8Array?Ve(t):typeof t.r=="string"?Te(t):t.v?Ue(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return Z(e),e}function Ue(t){return{r:t.r,s:t.s,yParity:X(t.v)}}function Te(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=X(n)),typeof r!="number")throw new L({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Fr(t){const[e,n,r]=t;return Lt({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:e==="0x"?0:Number(e)})}function Yr(t){Z(t);const e=t.r,n=t.s;return b(p(e,{size:32}),p(n,{size:32}),typeof t.yParity=="number"?p(Me(t.yParity),{size:1}):"0x")}function _e(t){const{r:e,s:n,yParity:r}=t;return{r:p(e,{size:32}),s:p(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function qr(t){const{r:e,s:n,yParity:r}=t;return[r?"0x01":"0x",e===0n?"0x":ot(p(e)),n===0n?"0x":ot(p(n))]}function X(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new Fe({value:t})}function Me(t){if(t===0)return 27;if(t===1)return 28;throw new L({value:t})}class De extends l{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class j extends l{constructor({signature:e}){super(`Signature \`${It(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class We extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class He extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class L extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Fe extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function E(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=K(e.type);if(i){const[o,a]=i;return qe(t,{...e,type:a},{checksumAddress:r,length:o,staticPosition:s})}if(e.type==="tuple")return Je(t,e,{checksumAddress:r,staticPosition:s});if(e.type==="address")return Ye(t,{checksum:r});if(e.type==="bool")return Ge(t);if(e.type.startsWith("bytes"))return Ze(t,e,{staticPosition:s});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Xe(t,e);if(e.type==="string")return Qe(t,{staticPosition:s});throw new tt(e.type)}const bt=32,_=32;function Ye(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(i=>n?G(i):i)(x(Zt(r,-20))),32]}function qe(t,e,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const u=g(t.readBytes(_)),c=i+u,f=c+bt;t.setPosition(c);const d=g(t.readBytes(bt)),y=z(e);let h=0;const $=[];for(let P=0;P<d;++P){t.setPosition(f+(y?P*32:h));const[C,Dt]=E(t,e,{checksumAddress:r,staticPosition:f});h+=Dt,$.push(C)}return t.setPosition(i+32),[$,32]}if(z(e)){const u=g(t.readBytes(_)),c=i+u,f=[];for(let d=0;d<s;++d){t.setPosition(c+d*32);const[y]=E(t,e,{checksumAddress:r,staticPosition:c});f.push(y)}return t.setPosition(i+32),[f,32]}let o=0;const a=[];for(let u=0;u<s;++u){const[c,f]=E(t,e,{checksumAddress:r,staticPosition:i+o});o+=f,a.push(c)}return[a,o]}function Ge(t){return[Xt(t.readBytes(32),{size:32}),32]}function Ze(t,e,{staticPosition:n}){const[r,s]=e.type.split("bytes");if(!s){const o=g(t.readBytes(32));t.setPosition(n+o);const a=g(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(a);return t.setPosition(n+32),[x(u),32]}return[x(t.readBytes(Number.parseInt(s,10),32)),32]}function Xe(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),s=t.readBytes(32);return[r>48?Jt(s,{signed:n}):g(s,{signed:n}),32]}function Je(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=e.components.length===0||e.components.some(({name:u})=>!u),o=i?[]:{};let a=0;if(z(e)){const u=g(t.readBytes(_)),c=s+u;for(let f=0;f<e.components.length;++f){const d=e.components[f];t.setPosition(c+a);const[y,h]=E(t,d,{checksumAddress:r,staticPosition:c});a+=h,o[i?f:d==null?void 0:d.name]=y}return t.setPosition(s+32),[o,32]}for(let u=0;u<e.components.length;++u){const c=e.components[u],[f,d]=E(t,c,{checksumAddress:r,staticPosition:s});o[i?u:c==null?void 0:c.name]=f,a+=d}return[o,a]}function Qe(t,{staticPosition:e}){const n=g(t.readBytes(32)),r=e+n;t.setPosition(r);const s=g(t.readBytes(32));if(s===0)return t.setPosition(e+32),["",32];const i=t.readBytes(s,32),o=Qt(Kt(i));return t.setPosition(e+32),[o,32]}function Ke({checksumAddress:t,parameters:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(J({checksumAddress:t,parameter:e[s],value:n[s]}));return r}function J({checksumAddress:t=!1,parameter:e,value:n}){const r=e,s=K(r.type);if(s){const[i,o]=s;return er(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if(r.type==="tuple")return or(n,{checksumAddress:t,parameter:r});if(r.type==="address")return tr(n,{checksum:t});if(r.type==="bool")return nr(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,o="256"]=Ot.exec(r.type)??[];return sr(n,{signed:i,size:Number(o)})}if(r.type.startsWith("bytes"))return rr(n,{type:r.type});if(r.type==="string")return ir(n);throw new tt(r.type)}function Q(t){let e=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?e+=32:e+=w(a)}const n=[],r=[];let s=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?(n.push(p(e+s,{size:32})),r.push(a),s+=w(a)):n.push(a)}return b(...n,...r)}function tr(t,e){const{checksum:n=!1}=e;return v(t,{strict:n}),{dynamic:!1,encoded:B(t.toLowerCase())}}function er(t,e){const{checksumAddress:n,length:r,parameter:s}=e,i=r===null;if(!Array.isArray(t))throw new lr(t);if(!i&&t.length!==r)throw new dr({expectedLength:r,givenLength:t.length,type:`${s.type}[${r}]`});let o=!1;const a=[];for(let u=0;u<t.length;u++){const c=J({checksumAddress:n,parameter:s,value:t[u]});c.dynamic&&(o=!0),a.push(c)}if(i||o){const u=Q(a);if(i){const c=p(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?b(c,u):c}}if(o)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:b(...a.map(({encoded:u})=>u))}}function rr(t,{type:e}){const[,n]=e.split("bytes"),r=w(t);if(!n){let s=t;return r%32!==0&&(s=S(s,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:b(B(p(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new jt({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:S(t)}}function nr(t){if(typeof t!="boolean")throw new l(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(At(t))}}function sr(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,s=e?-r-1n:0n;if(t>r||t<s)throw new te({max:r.toString(),min:s.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:p(t,{size:32,signed:e})}}function ir(t){const e=F(t),n=Math.ceil(w(e)/32),r=[];for(let s=0;s<n;s++)r.push(S(m(e,s*32,(s+1)*32)));return{dynamic:!0,encoded:b(S(p(w(e),{size:32})),...r)}}function or(t,e){const{checksumAddress:n,parameter:r}=e;let s=!1;const i=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],u=Array.isArray(t)?o:a.name,c=J({checksumAddress:n,parameter:a,value:t[u]});i.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Q(i):b(...i.map(({encoded:o})=>o))}}function K(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function z(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(z);const n=K(t.type);return!!(n&&z({...t,type:n[1]}))}function ar(t,e,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof e=="string"?vt(e):e,o=xe(i);if(O(i)===0&&t.length>0)throw new fr;if(O(i)&&O(i)<32)throw new ur({data:typeof e=="string"?e:x(e),parameters:t,size:O(i)});let a=0;const u=r==="Array"?[]:{};for(let c=0;c<t.length;++c){const f=t[c];o.setPosition(a);const[d,y]=E(o,f,{checksumAddress:s,staticPosition:0});a+=y,r==="Array"?u.push(d):u[f.name??c]=d}return u}function cr(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const s=Ke({checksumAddress:r,parameters:t,values:e}),i=Q(s);return i.length===0?"0x":i}function M(t,e){if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r];n.push(M.encode(s,i))}return b(...n)}(function(t){function e(n,r,s=!1){if(n==="address"){const u=r;return v(u),B(u.toLowerCase(),s?32:0)}if(n==="string")return F(r);if(n==="bytes")return r;if(n==="bool")return B(At(r),s?32:1);const i=n.match(Ot);if(i){const[u,c,f="256"]=i,d=Number.parseInt(f,10)/8;return p(r,{size:s?32:d,signed:c==="int"})}const o=n.match(je);if(o){const[u,c]=o;if(Number.parseInt(c,10)!==(r.length-2)/2)throw new jt({expectedSize:Number.parseInt(c,10),value:r});return S(r,s?32:0)}const a=n.match(Ne);if(a&&Array.isArray(r)){const[u,c]=a,f=[];for(let d=0;d<r.length;d++)f.push(e(c,r[d],!0));return f.length===0?"0x":b(...f)}throw new tt(n)}t.encode=e})(M||(M={}));function Nt(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?lt(t):t}class ur extends l{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ee(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class fr extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class dr extends l{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class jt extends l{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${w(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Vt extends l{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(`
1
+ import{bV as rt,bW as wt,bX as xt,K as Wt,bY as nt,bZ as st,b_ as it,L as Ht,b$ as Ft,c0 as Pt,c1 as x,c2 as Yt,c3 as H,c4 as w,c5 as l,c6 as b,c7 as p,c8 as vt,c9 as qt,ca as It,cb as m,cc as $t,cd as Gt,ce as ot,cf as g,cg as Zt,ch as Xt,ci as Jt,cj as Qt,ck as Kt,cl as B,cm as At,cn as te,co as S,cp as F,cq as O,cr as ee,cs as V,bU as re,ct as ne,aQ as k,b8 as se,aI as U,az as Y,b9 as R,bi as Et,aq as ie,aK as oe,aX as at,am as ae,cu as ce,ay as ue,aA as fe,C as de,x as le}from"./sendRawTransaction-CTjGjbSv.js";import{a7 as ct,a9 as he,ac as ye,$ as pe,af as ut,ad as me,ay as Bt,a1 as ft,a8 as be}from"./NetworkUtil-Dh3JWXso.js";import{s as ge}from"./secp256k1-WT42JaIN.js";function Vr(t){const e={formatters:void 0,fees:void 0,serializers:void 0,...t};function n(r){return s=>{const i=typeof s=="function"?s(r):s,o={...r,...i};return Object.assign(o,{extend:n(o)})}}return Object.assign(e,{extend:n(e)})}function kr(){return{}}function dt(t){let e;if(typeof t=="string")e=rt(t);else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(!xt(i)){e=rt(i,n);break}}}if(!e)throw new Wt({signature:t});return e}function lt(t){const e=[];if(typeof t=="string"){const n=nt(t),r=n.length;for(let s=0;s<r;s++)e.push(st(n[s],{modifiers:it}))}else{const n=wt(t),r=t.length;for(let s=0;s<r;s++){const i=t[s];if(xt(i))continue;const o=nt(i),a=o.length;for(let u=0;u<a;u++)e.push(st(o[u],{modifiers:it,structs:n}))}}if(e.length===0)throw new Ht({params:t});return e}function q(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Ft(Pt(t));return n==="Bytes"?r:x(r)}function Ur(t,e={}){const{as:n=typeof t=="string"?"Hex":"Bytes"}=e,r=Yt(Pt(t));return n==="Bytes"?r:x(r)}function Tr(t){return H(t)&&w(t)===32}const we={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new ve({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new Pe({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ht({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function xe(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(we);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}class ht extends l{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class Pe extends l{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class ve extends l{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}class Ie extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const r=this.keys().next().value;r&&this.delete(r)}return this}}const $e={checksum:new Ie(8192)},N=$e.checksum;function St(t,e={}){const{compressed:n}=e,{prefix:r,x:s,y:i}=t;if(n===!1||typeof s=="bigint"&&typeof i=="bigint"){if(r!==4)throw new yt({prefix:r,cause:new Se});return}if(n===!0||typeof s=="bigint"&&typeof i>"u"){if(r!==3&&r!==2)throw new yt({prefix:r,cause:new Be});return}throw new Ee({publicKey:t})}function _r(t){const e=(()=>{if(H(t))return zt(t);if(qt(t))return Ae(t);const{prefix:n,x:r,y:s}=t;return typeof r=="bigint"&&typeof s=="bigint"?{prefix:n??4,x:r,y:s}:{prefix:n,x:r}})();return St(e),e}function Ae(t){return zt(x(t))}function zt(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new ze({publicKey:t});if(t.length===130){const r=BigInt(m(t,0,32)),s=BigInt(m(t,32,64));return{prefix:4,x:r,y:s}}if(t.length===132){const r=Number(m(t,0,1)),s=BigInt(m(t,1,33)),i=BigInt(m(t,33,65));return{prefix:r,x:s,y:i}}const e=Number(m(t,0,1)),n=BigInt(m(t,1,33));return{prefix:e,x:n}}function Mr(t,e={}){return vt(Ct(t,e))}function Ct(t,e={}){St(t);const{prefix:n,x:r,y:s}=t,{includePrefix:i=!0}=e;return b(i?p(n,{size:1}):"0x",p(r,{size:32}),typeof s=="bigint"?p(s,{size:32}):"0x")}class Ee extends l{constructor({publicKey:e}){super(`Value \`${It(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class yt extends l{constructor({prefix:e,cause:n}){super(`Prefix "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class Be extends l{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class Se extends l{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let ze=class extends l{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const Ce=/^0x[a-fA-F0-9]{40}$/;function v(t,e={}){const{strict:n=!0}=e;if(!Ce.test(t))throw new pt({address:t,cause:new Re});if(n){if(t.toLowerCase()===t)return;if(G(t)!==t)throw new pt({address:t,cause:new Le})}}function G(t){if(N.has(t))return N.get(t);v(t,{strict:!1});const e=t.substring(2).toLowerCase(),n=q(Gt(e),{as:"Bytes"}),r=e.split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&r[i]&&(r[i]=r[i].toUpperCase()),(n[i>>1]&15)>=8&&r[i+1]&&(r[i+1]=r[i+1].toUpperCase());const s=`0x${r.join("")}`;return N.set(t,s),s}function Oe(t,e={}){const{checksum:n=!1}=e;return v(t),n?G(t):t}function Wr(t,e={}){const n=q(`0x${Ct(t).slice(4)}`).substring(26);return Oe(`0x${n}`,e)}function Hr(t,e){return v(t,{strict:!1}),v(e,{strict:!1}),t.toLowerCase()===e.toLowerCase()}function T(t,e={}){const{strict:n=!0}=e??{};try{return v(t,{strict:n}),!0}catch{return!1}}class pt extends l{constructor({address:e,cause:n}){super(`Address "${e}" is invalid.`,{cause:n}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class Re extends l{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class Le extends l{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}const Ne=/^(.*)\[([0-9]*)\]$/,je=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ot=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,mt=2n**256n-1n;function Z(t,e={}){const{recovered:n}=e;if(typeof t.r>"u")throw new j({signature:t});if(typeof t.s>"u")throw new j({signature:t});if(n&&typeof t.yParity>"u")throw new j({signature:t});if(t.r<0n||t.r>mt)throw new We({value:t.r});if(t.s<0n||t.s>mt)throw new He({value:t.s});if(typeof t.yParity=="number"&&t.yParity!==0&&t.yParity!==1)throw new L({value:t.yParity})}function Ve(t){return Rt(x(t))}function Rt(t){if(t.length!==130&&t.length!==132)throw new De({signature:t});const e=BigInt(m(t,0,32)),n=BigInt(m(t,32,64)),r=(()=>{const s=+`0x${t.slice(130)}`;if(!Number.isNaN(s))try{return X(s)}catch{throw new L({value:s})}})();return typeof r>"u"?{r:e,s:n}:{r:e,s:n,yParity:r}}function ke(t){if(!(typeof t.r>"u")&&!(typeof t.s>"u"))return Lt(t)}function Lt(t){const e=typeof t=="string"?Rt(t):t instanceof Uint8Array?Ve(t):typeof t.r=="string"?Te(t):t.v?Ue(t):{r:t.r,s:t.s,...typeof t.yParity<"u"?{yParity:t.yParity}:{}};return Z(e),e}function Ue(t){return{r:t.r,s:t.s,yParity:X(t.v)}}function Te(t){const e=(()=>{const n=t.v?Number(t.v):void 0;let r=t.yParity?Number(t.yParity):void 0;if(typeof n=="number"&&typeof r!="number"&&(r=X(n)),typeof r!="number")throw new L({value:t.yParity});return r})();return{r:BigInt(t.r),s:BigInt(t.s),yParity:e}}function Fr(t){const[e,n,r]=t;return Lt({r:n==="0x"?0n:BigInt(n),s:r==="0x"?0n:BigInt(r),yParity:e==="0x"?0:Number(e)})}function Yr(t){Z(t);const e=t.r,n=t.s;return b(p(e,{size:32}),p(n,{size:32}),typeof t.yParity=="number"?p(Me(t.yParity),{size:1}):"0x")}function _e(t){const{r:e,s:n,yParity:r}=t;return{r:p(e,{size:32}),s:p(n,{size:32}),yParity:r===0?"0x0":"0x1"}}function qr(t){const{r:e,s:n,yParity:r}=t;return[r?"0x01":"0x",e===0n?"0x":ot(p(e)),n===0n?"0x":ot(p(n))]}function X(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new Fe({value:t})}function Me(t){if(t===0)return 27;if(t===1)return 28;throw new L({value:t})}class De extends l{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${w($t(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class j extends l{constructor({signature:e}){super(`Signature \`${It(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class We extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class He extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class L extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class Fe extends l{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}function E(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=K(e.type);if(i){const[o,a]=i;return qe(t,{...e,type:a},{checksumAddress:r,length:o,staticPosition:s})}if(e.type==="tuple")return Je(t,e,{checksumAddress:r,staticPosition:s});if(e.type==="address")return Ye(t,{checksum:r});if(e.type==="bool")return Ge(t);if(e.type.startsWith("bytes"))return Ze(t,e,{staticPosition:s});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Xe(t,e);if(e.type==="string")return Qe(t,{staticPosition:s});throw new tt(e.type)}const bt=32,_=32;function Ye(t,e={}){const{checksum:n=!1}=e,r=t.readBytes(32);return[(i=>n?G(i):i)(x(Zt(r,-20))),32]}function qe(t,e,n){const{checksumAddress:r,length:s,staticPosition:i}=n;if(!s){const u=g(t.readBytes(_)),c=i+u,f=c+bt;t.setPosition(c);const d=g(t.readBytes(bt)),y=z(e);let h=0;const $=[];for(let P=0;P<d;++P){t.setPosition(f+(y?P*32:h));const[C,Dt]=E(t,e,{checksumAddress:r,staticPosition:f});h+=Dt,$.push(C)}return t.setPosition(i+32),[$,32]}if(z(e)){const u=g(t.readBytes(_)),c=i+u,f=[];for(let d=0;d<s;++d){t.setPosition(c+d*32);const[y]=E(t,e,{checksumAddress:r,staticPosition:c});f.push(y)}return t.setPosition(i+32),[f,32]}let o=0;const a=[];for(let u=0;u<s;++u){const[c,f]=E(t,e,{checksumAddress:r,staticPosition:i+o});o+=f,a.push(c)}return[a,o]}function Ge(t){return[Xt(t.readBytes(32),{size:32}),32]}function Ze(t,e,{staticPosition:n}){const[r,s]=e.type.split("bytes");if(!s){const o=g(t.readBytes(32));t.setPosition(n+o);const a=g(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const u=t.readBytes(a);return t.setPosition(n+32),[x(u),32]}return[x(t.readBytes(Number.parseInt(s,10),32)),32]}function Xe(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256",10),s=t.readBytes(32);return[r>48?Jt(s,{signed:n}):g(s,{signed:n}),32]}function Je(t,e,n){const{checksumAddress:r,staticPosition:s}=n,i=e.components.length===0||e.components.some(({name:u})=>!u),o=i?[]:{};let a=0;if(z(e)){const u=g(t.readBytes(_)),c=s+u;for(let f=0;f<e.components.length;++f){const d=e.components[f];t.setPosition(c+a);const[y,h]=E(t,d,{checksumAddress:r,staticPosition:c});a+=h,o[i?f:d==null?void 0:d.name]=y}return t.setPosition(s+32),[o,32]}for(let u=0;u<e.components.length;++u){const c=e.components[u],[f,d]=E(t,c,{checksumAddress:r,staticPosition:s});o[i?u:c==null?void 0:c.name]=f,a+=d}return[o,a]}function Qe(t,{staticPosition:e}){const n=g(t.readBytes(32)),r=e+n;t.setPosition(r);const s=g(t.readBytes(32));if(s===0)return t.setPosition(e+32),["",32];const i=t.readBytes(s,32),o=Qt(Kt(i));return t.setPosition(e+32),[o,32]}function Ke({checksumAddress:t,parameters:e,values:n}){const r=[];for(let s=0;s<e.length;s++)r.push(J({checksumAddress:t,parameter:e[s],value:n[s]}));return r}function J({checksumAddress:t=!1,parameter:e,value:n}){const r=e,s=K(r.type);if(s){const[i,o]=s;return er(n,{checksumAddress:t,length:i,parameter:{...r,type:o}})}if(r.type==="tuple")return or(n,{checksumAddress:t,parameter:r});if(r.type==="address")return tr(n,{checksum:t});if(r.type==="bool")return nr(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){const i=r.type.startsWith("int"),[,,o="256"]=Ot.exec(r.type)??[];return sr(n,{signed:i,size:Number(o)})}if(r.type.startsWith("bytes"))return rr(n,{type:r.type});if(r.type==="string")return ir(n);throw new tt(r.type)}function Q(t){let e=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?e+=32:e+=w(a)}const n=[],r=[];let s=0;for(let i=0;i<t.length;i++){const{dynamic:o,encoded:a}=t[i];o?(n.push(p(e+s,{size:32})),r.push(a),s+=w(a)):n.push(a)}return b(...n,...r)}function tr(t,e){const{checksum:n=!1}=e;return v(t,{strict:n}),{dynamic:!1,encoded:B(t.toLowerCase())}}function er(t,e){const{checksumAddress:n,length:r,parameter:s}=e,i=r===null;if(!Array.isArray(t))throw new lr(t);if(!i&&t.length!==r)throw new dr({expectedLength:r,givenLength:t.length,type:`${s.type}[${r}]`});let o=!1;const a=[];for(let u=0;u<t.length;u++){const c=J({checksumAddress:n,parameter:s,value:t[u]});c.dynamic&&(o=!0),a.push(c)}if(i||o){const u=Q(a);if(i){const c=p(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?b(c,u):c}}if(o)return{dynamic:!0,encoded:u}}return{dynamic:!1,encoded:b(...a.map(({encoded:u})=>u))}}function rr(t,{type:e}){const[,n]=e.split("bytes"),r=w(t);if(!n){let s=t;return r%32!==0&&(s=S(s,Math.ceil((t.length-2)/2/32)*32)),{dynamic:!0,encoded:b(B(p(r,{size:32})),s)}}if(r!==Number.parseInt(n,10))throw new jt({expectedSize:Number.parseInt(n,10),value:t});return{dynamic:!1,encoded:S(t)}}function nr(t){if(typeof t!="boolean")throw new l(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(At(t))}}function sr(t,{signed:e,size:n}){if(typeof n=="number"){const r=2n**(BigInt(n)-(e?1n:0n))-1n,s=e?-r-1n:0n;if(t>r||t<s)throw new te({max:r.toString(),min:s.toString(),signed:e,size:n/8,value:t.toString()})}return{dynamic:!1,encoded:p(t,{size:32,signed:e})}}function ir(t){const e=F(t),n=Math.ceil(w(e)/32),r=[];for(let s=0;s<n;s++)r.push(S(m(e,s*32,(s+1)*32)));return{dynamic:!0,encoded:b(S(p(w(e),{size:32})),...r)}}function or(t,e){const{checksumAddress:n,parameter:r}=e;let s=!1;const i=[];for(let o=0;o<r.components.length;o++){const a=r.components[o],u=Array.isArray(t)?o:a.name,c=J({checksumAddress:n,parameter:a,value:t[u]});i.push(c),c.dynamic&&(s=!0)}return{dynamic:s,encoded:s?Q(i):b(...i.map(({encoded:o})=>o))}}function K(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}function z(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(z);const n=K(t.type);return!!(n&&z({...t,type:n[1]}))}function ar(t,e,n={}){const{as:r="Array",checksumAddress:s=!1}=n,i=typeof e=="string"?vt(e):e,o=xe(i);if(O(i)===0&&t.length>0)throw new fr;if(O(i)&&O(i)<32)throw new ur({data:typeof e=="string"?e:x(e),parameters:t,size:O(i)});let a=0;const u=r==="Array"?[]:{};for(let c=0;c<t.length;++c){const f=t[c];o.setPosition(a);const[d,y]=E(o,f,{checksumAddress:s,staticPosition:0});a+=y,r==="Array"?u.push(d):u[f.name??c]=d}return u}function cr(t,e,n){const{checksumAddress:r=!1}={};if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const s=Ke({checksumAddress:r,parameters:t,values:e}),i=Q(s);return i.length===0?"0x":i}function M(t,e){if(t.length!==e.length)throw new Vt({expectedLength:t.length,givenLength:e.length});const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r];n.push(M.encode(s,i))}return b(...n)}(function(t){function e(n,r,s=!1){if(n==="address"){const u=r;return v(u),B(u.toLowerCase(),s?32:0)}if(n==="string")return F(r);if(n==="bytes")return r;if(n==="bool")return B(At(r),s?32:1);const i=n.match(Ot);if(i){const[u,c,f="256"]=i,d=Number.parseInt(f,10)/8;return p(r,{size:s?32:d,signed:c==="int"})}const o=n.match(je);if(o){const[u,c]=o;if(Number.parseInt(c,10)!==(r.length-2)/2)throw new jt({expectedSize:Number.parseInt(c,10),value:r});return S(r,s?32:0)}const a=n.match(Ne);if(a&&Array.isArray(r)){const[u,c]=a,f=[];for(let d=0;d<r.length;d++)f.push(e(c,r[d],!0));return f.length===0?"0x":b(...f)}throw new tt(n)}t.encode=e})(M||(M={}));function Nt(t){return Array.isArray(t)&&typeof t[0]=="string"||typeof t=="string"?lt(t):t}class ur extends l{constructor({data:e,parameters:n,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ee(n)})`,`Data: ${e} (${r} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.DataSizeTooSmallError"})}}class fr extends l{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ZeroDataError"})}}class dr extends l{constructor({expectedLength:e,givenLength:n,type:r}){super(`Array length mismatch for type \`${r}\`. Expected: \`${e}\`. Given: \`${n}\`.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.ArrayLengthMismatchError"})}}class jt extends l{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${w(n)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.BytesSizeMismatchError"})}}class Vt extends l{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${e}`,`Given length (values): ${n}`].join(`
2
2
  `)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.LengthMismatchError"})}}class lr extends l{constructor(e){super(`Value \`${e}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidArrayError"})}}class tt extends l{constructor(e){super(`Type \`${e}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiParameters.InvalidTypeError"})}}function D(t){let e=!0,n="",r=0,s="",i=!1;for(let o=0;o<t.length;o++){const a=t[o];if(["(",")",","].includes(a)&&(e=!0),a==="("&&r++,a===")"&&r--,!!e){if(r===0){if(a===" "&&["event","function","error",""].includes(s))s="";else if(s+=a,a===")"){i=!0;break}continue}if(a===" "){t[o-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}s+=a,n+=a}}if(!i)throw new l("Unable to normalize signature.");return s}function W(t,e){const n=typeof t,r=e.type;switch(r){case"address":return T(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in e?Object.values(e.components).every((s,i)=>W(Object.values(t)[i],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(t)&&t.every(s=>W(s,{...e,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function kt(t,e,n){for(const r in t){const s=t[r],i=e[r];if(s.type==="tuple"&&i.type==="tuple"&&"components"in s&&"components"in i)return kt(s.components,i.components,n[r]);const o=[s.type,i.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?T(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?T(n[r],{strict:!1}):!1)return o}}function Gr(t,e={}){const{prepare:n=!0}=e,r=Array.isArray(t)||typeof t=="string"?dt(t):t;return{...r,...n?{hash:A(r)}:{}}}function et(t,e,n){const{args:r=[],prepare:s=!0}=n??{},i=H(e,{strict:!1}),o=t.filter(c=>i?c.type==="function"||c.type==="error"?hr(c)===m(e,0,4):c.type==="event"?A(c)===e:!1:"name"in c&&c.name===e);if(o.length===0)throw new gt({name:e});if(o.length===1)return{...o[0],...s?{hash:A(o[0])}:{}};let a;for(const c of o){if(!("inputs"in c))continue;if(!r||r.length===0){if(!c.inputs||c.inputs.length===0)return{...c,...s?{hash:A(c)}:{}};continue}if(!c.inputs||c.inputs.length===0||c.inputs.length!==r.length)continue;if(r.every((d,y)=>{const h="inputs"in c&&c.inputs[y];return h?W(d,h):!1})){if(a&&"inputs"in a&&a.inputs){const d=kt(c.inputs,a.inputs,r);if(d)throw new pr({abiItem:c,type:d[0]},{abiItem:a,type:d[1]})}a=c}}const u=(()=>{if(a)return a;const[c,...f]=o;return{...c,overloads:f}})();if(!u)throw new gt({name:e});return{...u,...s?{hash:A(u)}:{}}}function hr(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return et(n,r)}return t[0]})();return m(A(e),0,4)}function yr(...t){const e=(()=>{if(Array.isArray(t[0])){const[r,s]=t;return et(r,s)}return t[0]})(),n=typeof e=="string"?e:V(e);return D(n)}function A(...t){const e=(()=>{if(Array.isArray(t[0])){const[n,r]=t;return et(n,r)}return t[0]})();return typeof e!="string"&&"hash"in e&&e.hash?e.hash:q(F(yr(e)))}class pr extends l{constructor(e,n){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${D(V(e.abiItem))}\`, and`,`\`${n.type}\` in \`${D(V(n.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class gt extends l{constructor({name:e,data:n,type:r="item"}){const s=e?` with name "${e}"`:n?` with data "${n}"`:"";super(`ABI ${r}${s} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}function mr(t,e={}){return typeof t.chainId=="string"?Ut(t):{...t,...e.signature}}function Ut(t){const{address:e,chainId:n,nonce:r}=t,s=ke(t);return{address:e,chainId:Number(n),nonce:BigInt(r),...s}}function Zr(t){return t.map(Ut)}function br(t){const{address:e,chainId:n,nonce:r,...s}=t;return{address:e,chainId:p(n),nonce:p(r),..._e(s)}}function Xr(t){return t.map(br)}async function gr(t,{address:e,blockHash:n,blockNumber:r,blockTag:s="latest",requireCanonical:i}){const o=re({blockHash:n,blockNumber:r,blockTag:s,requireCanonical:i}),a=await t.request({method:"eth_getCode",params:[e,o]},{dedupe:typeof r=="bigint"||n!==void 0});if(a!=="0x")return a}const Tt="0x6492649264926492649264926492649264926492649264926492649264926492";function wr(t){if(m(t,-32)!==Tt)throw new vr(t)}function xr(t){const{data:e,signature:n,to:r}=t;return b(cr(Nt("address, bytes, bytes"),[r,e,n]),Tt)}function Pr(t){try{return wr(t),!0}catch{return!1}}let vr=class extends l{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}};const Ir="0x8010801080108010801080108010801080108010801080108010801080108010",$r=Nt("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function _t(t){if(typeof t=="string"){if(m(t,-32)!==Ir)throw new Br(t)}else Z(t.authorization)}function Ar(t){_t(t);const e=ne(m(t,-64,-32)),n=m(t,-e-64,-64),r=m(t,0,-e-64),[s,i,o]=ar($r,n);return{authorization:mr({address:s.delegation,chainId:Number(s.chainId),nonce:s.nonce,yParity:s.yParity,r:s.r,s:s.s}),signature:r,...o&&o!=="0x"?{data:o,to:i}:{}}}function Er(t){try{return _t(t),!0}catch{return!1}}class Br extends l{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}async function Sr({address:t,authorization:e,signature:n}){return k(U(t),await se({authorization:e,signature:n}))}function zr({r:t,s:e,to:n="hex",v:r,yParity:s}){const i=(()=>{if(s===0||s===1)return s;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new ge.Signature(ct(t),ct(e)).toCompactHex()}${i===0?"1b":"1c"}`;return n==="hex"?o:he(o)}async function Mt(t,e){const{abi:n,address:r,args:s,functionName:i,...o}=e,a=Y({abi:n,args:s,functionName:i});try{const{data:u}=await R(t,Et,"call")({...o,data:a,to:r});return ie({abi:n,args:s,functionName:i,data:u||"0x"})}catch(u){throw oe(u,{abi:n,address:r,args:s,docsPath:"/docs/contract/readContract",functionName:i})}}async function Qr(t,e){var c,f,d,y;const{address:n,chain:r=t.chain,hash:s,erc6492VerifierAddress:i=e.universalSignatureVerifierAddress??((f=(c=r==null?void 0:r.contracts)==null?void 0:c.erc6492Verifier)==null?void 0:f.address),multicallAddress:o=e.multicallAddress??((y=(d=r==null?void 0:r.contracts)==null?void 0:d.multicall3)==null?void 0:y.address),mode:a="auto"}=e;if(r!=null&&r.verifyHash)return await r.verifyHash(t,e);const u=(()=>{const h=e.signature;return ye(h)?h:typeof h=="object"&&"r"in h&&"s"in h?zr(h):pe(h)})();try{if(a==="eoa")try{if(k(U(n),await at({hash:s,signature:u})))return!0}catch{}return Er(u)?await Cr(t,{...e,multicallAddress:o,signature:u}):await Or(t,{...e,verifierAddress:i,signature:u})}catch(h){if(a!=="eoa")try{if(k(U(n),await at({hash:s,signature:u})))return!0}catch{}if(h instanceof I)return!1;throw h}}async function Cr(t,e){var C;const{address:n,blockNumber:r,blockTag:s,hash:i,multicallAddress:o}=e,{authorization:a,data:u,signature:c,to:f}=Ar(e.signature);if(await gr(t,{address:n,blockNumber:r,blockTag:s})===ae(["0xef0100",a.address]))return await Rr(t,{address:n,blockNumber:r,blockTag:s,hash:i,signature:c});const y={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:ut(a.r,{size:32}),s:ut(a.s,{size:32}),yParity:a.yParity};if(!await Sr({address:n,authorization:y}))throw new I;const $=await R(t,Mt,"readContract")({...o?{address:o}:{code:ce},authorizationList:[y],abi:me,blockNumber:r,blockTag:"pending",functionName:"aggregate3",args:[[...u?[{allowFailure:!0,target:f??n,callData:u}]:[],{allowFailure:!0,target:n,callData:Y({abi:Bt,functionName:"isValidSignature",args:[i,c]})}]]}),P=(C=$[$.length-1])==null?void 0:C.returnData;if(P!=null&&P.startsWith("0x1626ba7e"))return!0;throw new I}async function Or(t,e){const{address:n,factory:r,factoryData:s,hash:i,signature:o,verifierAddress:a,...u}=e,c=await(async()=>!r&&!s||Pr(o)?o:xr({data:s,signature:o,to:r}))(),f=a?{to:a,data:Y({abi:ft,functionName:"isValidSig",args:[n,i,c]}),...u}:{data:ue({abi:ft,args:[n,i,c],bytecode:fe}),...u},{data:d}=await R(t,Et,"call")(f).catch(y=>{throw y instanceof de?new I:y});if(be(d??"0x0"))return!0;throw new I}async function Rr(t,e){const{address:n,blockNumber:r,blockTag:s,hash:i,signature:o}=e;if((await R(t,Mt,"readContract")({address:n,abi:Bt,args:[i,o],blockNumber:r,blockTag:s,functionName:"isValidSignature"}).catch(u=>{throw u instanceof le?new I:u})).startsWith("0x1626ba7e"))return!0;throw new I}class I extends Error{}export{_e as A,G as B,v as C,ke as D,Zr as E,Me as F,Xr as G,Tr as H,Lt as I,qr as J,Fr as K,zt as L,gt as N,lt as a,cr as b,et as c,Vr as d,kr as e,Gr as f,gr as g,hr as h,xe as i,Hr as j,Mr as k,_r as l,Wr as m,Ur as n,q as o,dt as p,Oe as q,Mt as r,zr as s,Ct as t,T as u,Qr as v,Rt as w,Z as x,Te as y,Yr as z};
@@ -1,4 +1,4 @@
1
- import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d,o as q}from"./class-map-CxwNmq0D.js";import{w as ve,s as fe,a as ge,p as be,M as g,S as se,R as l,r as P,A as K,e as ce,c as le,C as m,b as Y,d as ye,f as S,E as ie,O as E,g as F,h as oe,i as T,j as H,T as xe,k as Ce,l as ke,m as Se}from"./core-CWR04nJr.js";import{c as u,U as We}from"./index-BsQQxLJN.js";import"./index-Cn-oc3fB.js";import"./react-vyZjIDcS.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./index-DC-Z7MbP.js";import"./events-DQ172AOg.js";import"./index-CKo0vnRV.js";import"./index-DgMAf2q5.js";import"./index.es-DWjGiGDB.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-4ugP_xPq.js";import"./browser-ponyfill-Dm9rZGtt.js";import"./NetworkUtil-HlUKXKcF.js";import"./W3MFrameProviderSingleton-BuQKbZaF.js";import"./async-directive-BRxn_Py3.js";const p=be({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),Re={state:p,subscribe(r){return ge(p,()=>r(p))},subscribeKey(r,e){return fe(p,r,e)},showTooltip({message:r,triggerRect:e,variant:t}){p.open=!0,p.message=r,p.triggerRect=e,p.variant=t},hide(){p.open=!1,p.message="",p.triggerRect={width:0,height:0,top:0,left:0}}},O=ve(Re),de={isUnsupportedChainView(){return l.state.view==="UnsupportedChain"||l.state.view==="SwitchNetwork"&&l.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){g.shake();return}if(await se.isSIWXCloseDisabled()){g.shake();return}g.close()}},$e=v`
1
+ import{a as v,i as f,b as a}from"./lit-element-B3y9oplH.js";import{n as w,r as d,o as q}from"./class-map-CxwNmq0D.js";import{w as ve,s as fe,a as ge,p as be,M as g,S as se,R as l,r as P,A as K,e as ce,c as le,C as m,b as Y,d as ye,f as S,E as ie,O as E,g as F,h as oe,i as T,j as H,T as xe,k as Ce,l as ke,m as Se}from"./core-BqndrHwC.js";import{c as u,U as We}from"./index-D3OKsJLK.js";import"./index-BiIZh9R9.js";import"./react-IQWs2nb4.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./index-BtkxBg3h.js";import"./events-DQ172AOg.js";import"./index-BZWNTqaV.js";import"./index-CCoJpS6M.js";import"./index.es-DWEmsLX5.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index.es-DGdQax5Y.js";import"./browser-ponyfill-DdemUjDS.js";import"./NetworkUtil-Dh3JWXso.js";import"./W3MFrameProviderSingleton-BLAdE798.js";import"./async-directive-BRxn_Py3.js";const p=be({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),Re={state:p,subscribe(r){return ge(p,()=>r(p))},subscribeKey(r,e){return fe(p,r,e)},showTooltip({message:r,triggerRect:e,variant:t}){p.open=!0,p.message=r,p.triggerRect=e,p.variant=t},hide(){p.open=!1,p.message="",p.triggerRect={width:0,height:0,top:0,left:0}}},O=ve(Re),de={isUnsupportedChainView(){return l.state.view==="UnsupportedChain"||l.state.view==="SwitchNetwork"&&l.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){g.shake();return}if(await se.isSIWXCloseDisabled()){g.shake();return}g.close()}},$e=v`
2
2
  :host {
3
3
  display: block;
4
4
  border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
@@ -1,4 +1,4 @@
1
- import{i as g,b as d,a as he}from"./lit-element-B3y9oplH.js";import{n as l,o as $,r as u}from"./class-map-CxwNmq0D.js";import{d as v,r as V,e as me,v as B,i as fe}from"./index-PJSp7ijP.js";import{c as f,U as le}from"./index-BpA1I7hL.js";import{M as k,Z as ce,R as c,k as we,A as H,C as w,q as U,L as be,E as K,O as A,o as M,S as E,z,T as ge,_ as ye}from"./W3MFrameProviderSingleton-BuQKbZaF.js";import{P as D}from"./index-CD9t0mSF.js";import"./index-D20v1ehb.js";import{H as oe}from"./HelpersUtil-2hZP33Du.js";import{C as F}from"./ConstantsUtil-Dfwpy1eP.js";import"./index-BV7d8LIf.js";import"./index-DjcstBXY.js";import"./index-6HemuoHH.js";import"./index-DLEx9ISf.js";import{S as ve}from"./SwapController-CRz8E17o.js";import"./index-cSAleFRI.js";import"./index-Cn-oc3fB.js";import"./react-vyZjIDcS.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./index-DC-Z7MbP.js";import"./events-DQ172AOg.js";import"./index-CKo0vnRV.js";import"./index-DgMAf2q5.js";import"./index-nibyPLVP.js";import"./index-BBM5Da88.js";import"./index.es-4ugP_xPq.js";import"./browser-ponyfill-Dm9rZGtt.js";import"./NetworkUtil-HlUKXKcF.js";import"./index-qVmIz0zn.js";import"./index-CSu0sG0T.js";import"./index-BgKl-ydS.js";import"./index-B4EKT3oF.js";import"./index-DWFCwLfs.js";import"./MathUtil-BGCe3rZ3.js";import"./index-DETprG7w.js";import"./index-BEtbI0Zv.js";const de={isUnsupportedChainView(){return c.state.view==="UnsupportedChain"||c.state.view==="SwitchNetwork"&&c.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){k.shake();return}if(await ce.isSIWXCloseDisabled()){k.shake();return}(c.state.view==="DataCapture"||c.state.view==="DataCaptureOtpConfirm")&&we.disconnect(),k.close()}},xe=v`
1
+ import{i as g,b as d,a as he}from"./lit-element-B3y9oplH.js";import{n as l,o as $,r as u}from"./class-map-CxwNmq0D.js";import{d as v,r as V,e as me,v as B,i as fe}from"./index-DDqqXhJL.js";import{c as f,U as le}from"./index-CwLvQ9MJ.js";import{M as k,Z as ce,R as c,k as we,A as H,C as w,q as U,L as be,E as K,O as A,o as M,S as E,z,T as ge,_ as ye}from"./W3MFrameProviderSingleton-BLAdE798.js";import{P as D}from"./index-BRGDK96N.js";import"./index-hBIDXrfA.js";import{H as oe}from"./HelpersUtil-Dg90boC1.js";import{C as F}from"./ConstantsUtil-CNJ3pGKv.js";import"./index-5o0_4PJn.js";import"./index-BaUli81x.js";import"./index-C-E_Jk-6.js";import"./index-D9Dv7ZRq.js";import{S as ve}from"./SwapController-BcfprLwB.js";import"./index-CyyhNrl2.js";import"./index-BiIZh9R9.js";import"./react-IQWs2nb4.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./index-BtkxBg3h.js";import"./events-DQ172AOg.js";import"./index-BZWNTqaV.js";import"./index-CCoJpS6M.js";import"./index-nibyPLVP.js";import"./index-72R1sLRe.js";import"./index.es-DGdQax5Y.js";import"./browser-ponyfill-DdemUjDS.js";import"./NetworkUtil-Dh3JWXso.js";import"./index-Dz7l4WRb.js";import"./index-D0JhTMR7.js";import"./index-DXe1QzPN.js";import"./index-DitauyL5.js";import"./index-Bu5mtkuE.js";import"./MathUtil-BGCe3rZ3.js";import"./index-klYUwFTu.js";import"./index-Dhe2yejG.js";const de={isUnsupportedChainView(){return c.state.view==="UnsupportedChain"||c.state.view==="SwitchNetwork"&&c.state.history.includes("UnsupportedChain")},async safeClose(){if(this.isUnsupportedChainView()){k.shake();return}if(await ce.isSIWXCloseDisabled()){k.shake();return}(c.state.view==="DataCapture"||c.state.view==="DataCaptureOtpConfirm")&&we.disconnect(),k.close()}},xe=v`
2
2
  :host {
3
3
  display: block;
4
4
  border-radius: clamp(0px, ${({borderRadius:e})=>e[8]}, 44px);
@@ -1 +1 @@
1
- import{f as B}from"./transactionReceipt-BzQM-iWX.js";import{h as g,c as N}from"./prepare-contract-call-BreQKHF6.js";import{s as A}from"./sleep-mAKpSMLY.js";async function I(t){const e=await t({method:"eth_blockNumber"});return g(e)}async function E(t,e){const n=await t({method:"eth_getTransactionReceipt",params:[e.hash]});if(!n)throw new Error("Transaction receipt not found.");return B(n)}const x=5e3,y=1e3,k=500,D=2,T=10;function M(t){for(;t.length<T;)t.unshift(y);return t.reduce((n,i)=>n+i,0)/t.length}function R(t,e,n,i){let l=[],c=[],a=!1,o,r;const b=N({chain:e,client:t});async function p(){if(!a)return;try{const s=await I(b);if(!o||s>o){let m=[];if(o)for(let f=o+1n;f<=s;f++)m.push(BigInt(f));else m=[s];o=s;const w=Date.now();if(r){const f=(w-r)/m.length;c.push(f),c=c.slice(-T)}r=w;for(const f of m)for(const L of l)L(f)}}catch(s){i?i(s):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${s}`)}const h=M(c),u=Math.max(k,Math.min(x,Math.max(k,h)));await A(u/(n??D)),p()}return function(u,s){return l.push(u),a||(o=s,a=!0,p()),function(){l=l.filter(w=>w!==u),l.length===0&&(o=void 0,r=void 0,a=!1)}}}const _=new Map;function O(t){const{client:e,chain:n,onNewBlockNumber:i,overPollRatio:l,latestBlockNumber:c,onError:a}=t,o=n.id;let r=_.get(o);return r||(r=R(e,n,l,a),_.set(o,r)),r(i,c)}const P=100,d=new Map;function S(t){const{transactionHash:e,chain:n,client:i}=t,c=`${n.id}:tx_${e}`,a=t.maxBlocksWaitTime??P;if(d.has(c))return d.get(c);const o=new Promise((r,b)=>{e||b(new Error("Transaction has no transactionHash to wait for, did you execute it?"));const p=N({chain:n,client:i});let h=-1;const u=O({chain:n,client:i,onNewBlockNumber:async()=>{if(h++,h>=a){u(),b(new Error(`Transaction receipt for ${e} not found after ${a} blocks`));return}try{const s=await E(p,{hash:e});u(),r(s)}catch{}}})}).finally(()=>{d.delete(c)});return d.set(c,o),o}export{I as a,O as b,E as e,S as w};
1
+ import{f as B}from"./transactionReceipt-BHGI1PBX.js";import{h as g,c as N}from"./prepare-contract-call-CUP20AbD.js";import{s as A}from"./sleep-mAKpSMLY.js";async function I(t){const e=await t({method:"eth_blockNumber"});return g(e)}async function E(t,e){const n=await t({method:"eth_getTransactionReceipt",params:[e.hash]});if(!n)throw new Error("Transaction receipt not found.");return B(n)}const x=5e3,y=1e3,k=500,D=2,T=10;function M(t){for(;t.length<T;)t.unshift(y);return t.reduce((n,i)=>n+i,0)/t.length}function R(t,e,n,i){let l=[],c=[],a=!1,o,r;const b=N({chain:e,client:t});async function p(){if(!a)return;try{const s=await I(b);if(!o||s>o){let m=[];if(o)for(let f=o+1n;f<=s;f++)m.push(BigInt(f));else m=[s];o=s;const w=Date.now();if(r){const f=(w-r)/m.length;c.push(f),c=c.slice(-T)}r=w;for(const f of m)for(const L of l)L(f)}}catch(s){i?i(s):console.error(`[watchBlockNumber]: Failed to poll for latest block number: ${s}`)}const h=M(c),u=Math.max(k,Math.min(x,Math.max(k,h)));await A(u/(n??D)),p()}return function(u,s){return l.push(u),a||(o=s,a=!0,p()),function(){l=l.filter(w=>w!==u),l.length===0&&(o=void 0,r=void 0,a=!1)}}}const _=new Map;function O(t){const{client:e,chain:n,onNewBlockNumber:i,overPollRatio:l,latestBlockNumber:c,onError:a}=t,o=n.id;let r=_.get(o);return r||(r=R(e,n,l,a),_.set(o,r)),r(i,c)}const P=100,d=new Map;function S(t){const{transactionHash:e,chain:n,client:i}=t,c=`${n.id}:tx_${e}`,a=t.maxBlocksWaitTime??P;if(d.has(c))return d.get(c);const o=new Promise((r,b)=>{e||b(new Error("Transaction has no transactionHash to wait for, did you execute it?"));const p=N({chain:n,client:i});let h=-1;const u=O({chain:n,client:i,onNewBlockNumber:async()=>{if(h++,h>=a){u(),b(new Error(`Transaction receipt for ${e} not found after ${a} blocks`));return}try{const s=await E(p,{hash:e});u(),r(s)}catch{}}})}).finally(()=>{d.delete(c)});return d.set(c,o),o}export{I as a,O as b,E as e,S as w};