@dcl/shop 1.11.3 → 1.11.4-33628288029.commit-5601750

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 (400) hide show
  1. package/_assets/{Activity-BEOVOdVV.js → Activity-DVcMKbNj.js} +12 -12
  2. package/_assets/{AnimatedBackground-wAz9Odt0.js → AnimatedBackground-CVpfYlgc.js} +2 -2
  3. package/_assets/{Assets-P4H-lV4U.js → Assets-CadbAH-d.js} +62 -61
  4. package/_assets/{Authorizations-BUN1TioY.js → Authorizations-BrjSovNx.js} +3 -3
  5. package/_assets/{Cart-CUPHFj39.js → Cart-Bh7D1QtO.js} +2 -2
  6. package/_assets/{Collection-BHRp_9DS.js → Collection-BRhC2BaV.js} +5 -5
  7. package/_assets/{CollectionCarousel-7w9vcOQY.js → CollectionCarousel-5MXabHdC.js} +7 -7
  8. package/_assets/{Confetti-CYh3a_SI.js → Confetti-DXKqtEKd.js} +4 -4
  9. package/_assets/{ConstantsUtil-DblXIgum.js → ConstantsUtil--85PHkB8.js} +2 -2
  10. package/_assets/{ContentClient-BgeGbQMc.js → ContentClient-Cwp02_mI.js} +2 -2
  11. package/_assets/{Creator-DHomo97d.js → Creator-B73Xme-u.js} +23 -23
  12. package/_assets/{DeploymentBuilder-j66rJfGs.js → DeploymentBuilder-CwOAXMfU.js} +3 -3
  13. package/_assets/{EmotePlaybackBar-BERHYvEN.js → EmotePlaybackBar-CWLvfHqX.js} +5 -5
  14. package/_assets/{ErrorNotice-AmLNAAkn.js → ErrorNotice-DgQUv49_.js} +2 -2
  15. package/_assets/{ExchangeController-CxJiKrmf.js → ExchangeController-DPTY01-r.js} +2 -2
  16. package/_assets/{Faq-B-2IAlN1.js → Faq-DAVASCRd.js} +2 -2
  17. package/_assets/{GetCredits-ncUz7MSF.js → GetCredits-DzNVqifI.js} +2 -2
  18. package/_assets/{Grow-BrH_WQ15.js → Grow-CCcpl-Dh.js} +2 -2
  19. package/_assets/HelpersUtil-CHboEknS.js +63 -0
  20. package/_assets/ItemDetail-CaKUjwDf.js +3685 -0
  21. package/_assets/{LoadMore-DscEf3Fk.js → LoadMore-DGqR7eZS.js} +2 -2
  22. package/_assets/{ManaPricingBanner.styles-D9T4JSll.js → ManaPricingBanner.styles-BNRvmWHA.js} +2 -2
  23. package/_assets/{MyAssets-D-0qpt_J.js → MyAssets-BnjqvNmW.js} +2 -2
  24. package/_assets/{MyFavorites-BM0Fy0t_.js → MyFavorites-BGB9oj5g.js} +3 -3
  25. package/_assets/{NetworkUtil-CcWpYyVE.js → NetworkUtil-ZXSOAWFf.js} +2 -2
  26. package/_assets/{NotFound-DngznS1a.js → NotFound-BfSJiM9z.js} +4 -4
  27. package/_assets/{NotificationsBell-DlvSN7Il.js → NotificationsBell-BA-qJjwp.js} +2 -2
  28. package/_assets/{OutfitDetail-DASkQM6x.js → OutfitDetail-Co14Sy29.js} +32 -31
  29. package/_assets/{OutfitPreview-CuWTYpJV.js → OutfitPreview-mTWjVMVR.js} +3 -3
  30. package/_assets/{OutfitStudio-CI-08PA0.js → OutfitStudio-CNFaMK4t.js} +2 -2
  31. package/_assets/{PhArrowCircleDown-vJZVrJ42.js → PhArrowCircleDown-DBmTctYK.js} +5 -5
  32. package/_assets/{PhArrowClockwise-BdoT04dp.js → PhArrowClockwise-ZWBqR1iF.js} +5 -5
  33. package/_assets/{PhArrowDown-CcGbWaQp.js → PhArrowDown-WIeXIufM.js} +5 -5
  34. package/_assets/{PhArrowLeft-B1wZcKN1.js → PhArrowLeft-DvlPA_kr.js} +2 -2
  35. package/_assets/{PhArrowRight-CxxvhfEq.js → PhArrowRight-CcUcrmQK.js} +3 -3
  36. package/_assets/{PhArrowSquareOut-C7VVJaUM.js → PhArrowSquareOut-eQSuZWr9.js} +4 -4
  37. package/_assets/{PhArrowUp-ZLIFqDsg.js → PhArrowUp-oNKVxFhx.js} +5 -5
  38. package/_assets/{PhArrowUpRight-CASBOtJ6.js → PhArrowUpRight-mk1FSkK1.js} +3 -3
  39. package/_assets/{PhArrowsClockwise-Cg_DKbkh.js → PhArrowsClockwise-DvXb79Nq.js} +4 -4
  40. package/_assets/{PhArrowsDownUp-DcDTQ9Nq.js → PhArrowsDownUp-fJXobkfl.js} +5 -5
  41. package/_assets/{PhArrowsLeftRight-Cp6Duw59.js → PhArrowsLeftRight-DsRlafed.js} +4 -4
  42. package/_assets/{PhBank-DaH1J2fm.js → PhBank-BxBmdtlc.js} +5 -5
  43. package/_assets/{PhBrowser-CuEI8T8V.js → PhBrowser-TbGdYALn.js} +3 -3
  44. package/_assets/PhCaretDown-DjcNJ1zq.js +15 -0
  45. package/_assets/{PhCaretLeft-C6AiFDuB.js → PhCaretLeft-BkF0xuuP.js} +4 -4
  46. package/_assets/{PhCaretRight-DfyFNdXD.js → PhCaretRight-cZcclogr.js} +4 -4
  47. package/_assets/PhCaretUp-BTUuw_V5.js +15 -0
  48. package/_assets/{PhCheck-CR4ph65X.js → PhCheck-Dok-YRwJ.js} +3 -3
  49. package/_assets/{PhCircleHalf-bf4_rQfM.js → PhCircleHalf-C_G0Deju.js} +5 -5
  50. package/_assets/{PhClock-GAqyMVHL.js → PhClock-DxtyCCHN.js} +3 -3
  51. package/_assets/{PhCompass-Bgio4FOk.js → PhCompass-Cr5Wk3ha.js} +4 -4
  52. package/_assets/{PhCopy-CIyquHtv.js → PhCopy-DpSRSBDo.js} +5 -5
  53. package/_assets/{PhCreditCard-BSXEWsER.js → PhCreditCard-rQSlkLhU.js} +2 -2
  54. package/_assets/{PhCurrencyDollar-CqUojjE3.js → PhCurrencyDollar-DSXfHZr-.js} +4 -4
  55. package/_assets/{PhDesktop-BogmbwY2.js → PhDesktop-B8t_jyeP.js} +4 -4
  56. package/_assets/{PhDeviceMobile-Dmvj5_IH.js → PhDeviceMobile-CKMo2R-O.js} +5 -5
  57. package/_assets/{PhDotsThree-BQIClXtD.js → PhDotsThree-CBBnUUK5.js} +3 -3
  58. package/_assets/{PhEnvelope-BfJyEfUD.js → PhEnvelope-B3Ot4kfs.js} +3 -3
  59. package/_assets/{PhFunnelSimple-CGNzs6Mz.js → PhFunnelSimple-ST58vUHY.js} +4 -4
  60. package/_assets/{PhGlobe-Cs0mC85b.js → PhGlobe-B1QBE0Ic.js} +3 -3
  61. package/_assets/{PhIdentificationCard-BQUI9UIj.js → PhIdentificationCard-CmHEoEuJ.js} +2 -2
  62. package/_assets/{PhImage-mIqmB6rB.js → PhImage-BM2XMyb9.js} +5 -5
  63. package/_assets/{PhInfo-Bq-uaME7.js → PhInfo-DfmzAoRe.js} +4 -4
  64. package/_assets/{PhLightbulb-D4uDMi2O.js → PhLightbulb-Dhfv4D4c.js} +4 -4
  65. package/_assets/{PhMagnifyingGlass-CzUCQ7HZ.js → PhMagnifyingGlass-Djq6rEa-.js} +2 -2
  66. package/_assets/{PhPaperPlaneRight-DFGlqosO.js → PhPaperPlaneRight-d8LGOK8o.js} +2 -2
  67. package/_assets/{PhPlus-DzP_I_Lh.js → PhPlus-B6aOwiLq.js} +4 -4
  68. package/_assets/{PhPower-BU0zl-V8.js → PhPower-DAs5tvdn.js} +5 -5
  69. package/_assets/{PhPuzzlePiece-B06cIo0S.js → PhPuzzlePiece-C5F9l0Xz.js} +4 -4
  70. package/_assets/{PhQrCode-CO2vMeyK.js → PhQrCode-DjCH9MIj.js} +2 -2
  71. package/_assets/{PhQuestion-CGnki4M2.js → PhQuestion-Bd3_nr1y.js} +3 -3
  72. package/_assets/{PhQuestionMark-VYuR2-QR.js → PhQuestionMark-Chm0gISn.js} +5 -5
  73. package/_assets/{PhSealCheck-7OjMmNjK.js → PhSealCheck-BighefRp.js} +2 -2
  74. package/_assets/{PhSignOut-BTcF9VJt.js → PhSignOut-X3VDO26Z.js} +3 -3
  75. package/_assets/{PhSpinner-d4GybHgJ.js → PhSpinner-CMt3xHt0.js} +3 -3
  76. package/_assets/{PhTrash-Cs80GpfS.js → PhTrash-CBxSNELa.js} +2 -2
  77. package/_assets/{PhUser-CrV8vTcH.js → PhUser-zWIlEtkm.js} +3 -3
  78. package/_assets/{PhVault-DXMjxe4B.js → PhVault-B5GZzffa.js} +2 -2
  79. package/_assets/{PhWallet-B1y2ir8X.js → PhWallet-D6uFkw0p.js} +4 -4
  80. package/_assets/{PhWarning-DiUh_2q2.js → PhWarning-C2cnWjQI.js} +3 -3
  81. package/_assets/{PhWarningCircle-DwMiptTF.js → PhWarningCircle-BN86yUC5.js} +5 -5
  82. package/_assets/{PhX-D10cz3zh.js → PhX-D9xXQPUU.js} +5 -5
  83. package/_assets/{StoreSettings-CrnV-oDS.js → StoreSettings-DkXAIuje.js} +3 -3
  84. package/_assets/{Success-CuN1jEku.js → Success-CnzBn1_w.js} +2 -2
  85. package/_assets/{SwapController-CD6bIKjn.js → SwapController-D6djT4jA.js} +2 -2
  86. package/_assets/{TradeService-BBCk0RYw.js → TradeService-aqrX89ju.js} +2 -2
  87. package/_assets/{W3MFrameProviderSingleton-35iFXIWF.js → W3MFrameProviderSingleton-DZpGQQon.js} +4 -4
  88. package/_assets/{WebCryptoP256-Cf-XLLKK.js → WebCryptoP256-CzebXpYk.js} +2 -2
  89. package/_assets/{add-C6BISYDT.js → add-CSXcCGk_.js} +2 -2
  90. package/_assets/{all-wallets-xo-RBy44.js → all-wallets-DqZYwMwo.js} +2 -2
  91. package/_assets/{app-store-BkcDu50q.js → app-store-BefptbeL.js} +3 -3
  92. package/_assets/{apple-pa1-mgQL.js → apple-Bfh__HiP.js} +3 -3
  93. package/_assets/{arrow-bottom-B2TV7ghp.js → arrow-bottom-B24463bX.js} +2 -2
  94. package/_assets/{arrow-bottom-circle-BTYP_ql9.js → arrow-bottom-circle-u1TPNWtr.js} +2 -2
  95. package/_assets/{arrow-left-D8Zy5CGX.js → arrow-left-BvEq2K0o.js} +3 -3
  96. package/_assets/{arrow-right-PuYqHFou.js → arrow-right-W2XAOWM7.js} +3 -3
  97. package/_assets/{arrow-top-BdiVfpFf.js → arrow-top-nu1PUCK6.js} +3 -3
  98. package/_assets/async-directive--Ed0QLAK.js +10 -0
  99. package/_assets/{authorizations-BYnIZF10.js → authorizations-D1BbA9p2.js} +2 -2
  100. package/_assets/{bank-h_csYWke.js → bank-BBag9zS_.js} +2 -2
  101. package/_assets/{basic-Kurqa6Hg.js → basic-Dgp4Dcak.js} +2 -2
  102. package/_assets/{biconomy-DGTyqkE9.js → biconomy-B_aNN_ox.js} +2 -2
  103. package/_assets/{browseLayout.styles-C3O3rJ6E.js → browseLayout.styles-ChGfNJVc.js} +2 -2
  104. package/_assets/{browser-BBrR2BtI.js → browser-CPTAYjan.js} +3 -3
  105. package/_assets/{browser-CKLQ1qFk.js → browser-CV7wS6Az.js} +2 -2
  106. package/_assets/{browser-ponyfill-DiBM5SBC.js → browser-ponyfill-DglQxapv.js} +2 -2
  107. package/_assets/{builder-Db2C6JNf.js → builder-Bi6UhAKa.js} +2 -2
  108. package/_assets/{buy-Tscnuj8P.js → buy-BvjG3HoA.js} +2 -2
  109. package/_assets/{buy-gasless-C1ToktQG.js → buy-gasless-DeqprVqZ.js} +2 -2
  110. package/_assets/{card-BBiBeHzu.js → card-C81sr-3j.js} +2 -2
  111. package/_assets/{categories-B1BKLZKW.js → categories-BryOs5_2.js} +2 -2
  112. package/_assets/{ccip-05aiYT-K.js → ccip-DzkB_Sdd.js} +2 -2
  113. package/_assets/{ccip-CNYS3aQW.js → ccip-rSWkRPSp.js} +2 -2
  114. package/_assets/{chains-ZAiL12Bm.js → chains-qd5x_hCj.js} +2 -2
  115. package/_assets/{checkmark-DGh2aL9_.js → checkmark-Bo-gp4Ll.js} +2 -2
  116. package/_assets/{checkmark-bold-BWpmcvWa.js → checkmark-bold-CrqYbcSP.js} +2 -2
  117. package/_assets/chevron-bottom-B7xC8zte.js +9 -0
  118. package/_assets/{chevron-left-BSMCiWRu.js → chevron-left-KdfBU_7V.js} +3 -3
  119. package/_assets/chevron-right-r7vxjQcl.js +9 -0
  120. package/_assets/chevron-top-B9aXAl0y.js +9 -0
  121. package/_assets/{chrome-store-BQ9_RhUA.js → chrome-store-DtnWFF8y.js} +2 -2
  122. package/_assets/{class-map-DopF_Eyi.js → class-map-C1Xjz5Lx.js} +2 -2
  123. package/_assets/{clock-D5AXnR4c.js → clock-Baa7165K.js} +3 -3
  124. package/_assets/{close-vtnC_SRG.js → close-wDYvpJu8.js} +2 -2
  125. package/_assets/{coinPlaceholder-Bbk6i-Hs.js → coinPlaceholder-De2q0FMg.js} +2 -2
  126. package/_assets/collectionPage.styles-CpbLmz3k.js +41 -0
  127. package/_assets/common-BMndxnpw.js +2 -0
  128. package/_assets/{compass-CHspogsk.js → compass-BP3lwd_h.js} +3 -3
  129. package/_assets/{controller-Qvm0QW2h.js → controller-BqYGcrHV.js} +3 -3
  130. package/_assets/{copy-QgJXjsdf.js → copy-EHnRey4G.js} +2 -2
  131. package/_assets/{core-DANcYiPS.js → core-CkH8bhAy.js} +5 -5
  132. package/_assets/{createSvgIcon-DqIhLrW2.js → createSvgIcon-BUIRhhMA.js} +3 -3
  133. package/_assets/crumbs.styles-C4VH2RbU.js +10 -0
  134. package/_assets/{cursor-CIvWVuwc.js → cursor-BuTKrcda.js} +3 -3
  135. package/_assets/{cursor-transparent-CMFKnbKD.js → cursor-transparent-7tV62vAu.js} +3 -3
  136. package/_assets/{custom-DTxuVuIB.js → custom-D9D65mcY.js} +2 -2
  137. package/_assets/{data-capture-DD7sCiZr.js → data-capture-COPtj-FW.js} +2 -2
  138. package/_assets/{dcl-schemas-BHtFmNb-.js → dcl-schemas-BgiaAr0Q.js} +2 -2
  139. package/_assets/decimals-CnzwxQ4g.js +2 -0
  140. package/_assets/decimals-LomXsZs8.js +2 -0
  141. package/_assets/{desktop-BQs8_lD6.js → desktop-wbkE-tMP.js} +3 -3
  142. package/_assets/detectExtension-B-U7E9JC.js +2 -0
  143. package/_assets/{disconnect-CN9A3nDW.js → disconnect-DR7Yq8KR.js} +3 -3
  144. package/_assets/{discord-BtZldxgt.js → discord-BcAZXa5x.js} +2 -2
  145. package/_assets/{disposePreview-BtvqOg7t.js → disposePreview-ByEJJLe4.js} +2 -2
  146. package/_assets/{email-DaxW64cs.js → email-C0quSkap.js} +7 -7
  147. package/_assets/{embedded-wallet-B0Fwgs2K.js → embedded-wallet-DEpGcrdH.js} +2 -2
  148. package/_assets/{emotion-styled.browser.esm-BxkApjMl.js → emotion-styled.browser.esm-CHARTXwb.js} +2 -2
  149. package/_assets/{engine-JThGOFXd.js → engine-Bk_K7Llo.js} +2 -2
  150. package/_assets/{errors-C8Iz-trA.js → errors-PvH07fNC.js} +2 -2
  151. package/_assets/estimate-l1-fee-Bvzc_7mE.js +2 -0
  152. package/_assets/eth_estimateGas-B-_VduTE.js +2 -0
  153. package/_assets/eth_getStorageAt-7pUwG8Gh.js +2 -0
  154. package/_assets/eth_getTransactionCount-Gc7_TGEQ.js +2 -0
  155. package/_assets/ethereum-CZGDB5nW.js +2 -0
  156. package/_assets/{ethers-DgOG59Su.js → ethers-DtlHlsbT.js} +2 -2
  157. package/_assets/{etherscan-DQsvLcA9.js → etherscan-DmDyp2wT.js} +2 -2
  158. package/_assets/{events-DibVD_t7.js → events-BSj7lvll.js} +2 -2
  159. package/_assets/{exclamation-triangle-Cy7ZFMOM.js → exclamation-triangle-COwloaAZ.js} +3 -3
  160. package/_assets/{execute-CNwyt0G_.js → execute-ChBr2MGE.js} +3 -3
  161. package/_assets/{extension-02r3DmNk.js → extension-BXZVsCm9.js} +2 -2
  162. package/_assets/external-link-DY6qwfgd.js +9 -0
  163. package/_assets/extractIPFS-D0kULLVp.js +2 -0
  164. package/_assets/{facebook-D9vyDeMs.js → facebook-Ce3bxU5i.js} +2 -2
  165. package/_assets/{farcaster-CUy-7jKk.js → farcaster-5HoyJqWe.js} +3 -3
  166. package/_assets/{features-ol0SSx5c.js → features-CpgDMGhl.js} +2 -2
  167. package/_assets/{fetchTokenMetadata-lhSHn6xi.js → fetchTokenMetadata-5_kMewrx.js} +3 -3
  168. package/_assets/{field.styles-B41qYJoU.js → field.styles-9PK5ZjQC.js} +2 -2
  169. package/_assets/{filters-BlIPZ-w_.js → filters-B_7HUVyj.js} +3 -3
  170. package/_assets/{fortmatic-uL_s0OSn.js → fortmatic-Bkf_fBXp.js} +2 -2
  171. package/_assets/{get-bytecode-BOwL4NWW.js → get-bytecode-G5plVf_C.js} +2 -2
  172. package/_assets/get-ecosystem-wallet-info-BUx1xmWw.js +2 -0
  173. package/_assets/{getBalance-ZoN1tP3C.js → getBalance-Cm42REPM.js} +3 -3
  174. package/_assets/getInstalledModules-B1vN2yPB.js +2 -0
  175. package/_assets/getNFT-BZXk8qUN.js +3 -0
  176. package/_assets/getNFT-DlEEFVcB.js +2 -0
  177. package/_assets/{github-CAcAfKle.js → github-psRgdSRX.js} +3 -3
  178. package/_assets/{google-CxMs1yY4.js → google-zz0wXA6h.js} +3 -3
  179. package/_assets/{grid.styles-Bfq3tOD5.js → grid.styles-CLdt2Olw.js} +2 -2
  180. package/_assets/{hashTypedData-KzAb0OXw.js → hashTypedData-BD5i5BR6.js} +2 -2
  181. package/_assets/{hashTypedData-qEav_ih0.js → hashTypedData-BWJt0IsY.js} +2 -2
  182. package/_assets/{help-circle-D3pVuyNX.js → help-circle-CaVlHgtL.js} +2 -2
  183. package/_assets/{id-EZmnUdnm.js → id-B-QQrIC1.js} +2 -2
  184. package/_assets/{image-D_jaNeLn.js → image-C2jmt9mb.js} +2 -2
  185. package/_assets/{in-app-DsTcp9g1.js → in-app-CuYsf-cA.js} +2 -2
  186. package/_assets/in-app-wallet-calls-BAaDg6fC.js +2 -0
  187. package/_assets/{index-CkpRws4w.js → index-B10Dj2XU.js} +5 -5
  188. package/_assets/{index-C-Vm4vxE.js → index-B1d4yULy.js} +7 -7
  189. package/_assets/{index-CyyRHdbc.js → index-B2AQ__Fq.js} +3 -3
  190. package/_assets/{index-Ba6ZjOcU.js → index-B58wHtBu.js} +14 -14
  191. package/_assets/{index-B_oRHv6S.js → index-B7GGo3Id.js} +2 -2
  192. package/_assets/{index-XkbNngUP.js → index-B8XonCeM.js} +5 -5
  193. package/_assets/{index-DdQvxv6H.js → index-B9S3LtOS.js} +2 -2
  194. package/_assets/{index-CrE3Fjux.js → index-B9geIMUz.js} +2 -2
  195. package/_assets/{index-vA8IIEKD.js → index-BBH2biv-.js} +2 -2
  196. package/_assets/{index-McPhRhdX.js → index-BCVvkzfZ.js} +2 -2
  197. package/_assets/{index-DDo55DDH.js → index-BI9zaAKH.js} +3 -3
  198. package/_assets/{index-Bh1_eNVo.js → index-BMfWKVqh.js} +2 -2
  199. package/_assets/{index-CUe36oKW.js → index-BNzfmcOe.js} +4 -4
  200. package/_assets/{index-DeldA2Me.js → index-BRH_6XKn.js} +2 -2
  201. package/_assets/{index-B7wtabS1.js → index-BSjwAPSF.js} +5 -5
  202. package/_assets/{index-wfbbVR0C.js → index-BVxBXQ8s.js} +2 -2
  203. package/_assets/{index-BTGqCcTp.js → index-BdcnU3DD.js} +2 -2
  204. package/_assets/{index-bPrjbeDi.js → index-BewGZELM.js} +2 -2
  205. package/_assets/{index-XKm4O5jb.js → index-Bj1e8n8t.js} +2 -2
  206. package/_assets/index-BlR1h3iB.js +31 -0
  207. package/_assets/{index-CrawRT0o.js → index-BmV0Ztwk.js} +2 -2
  208. package/_assets/{index-BB63hriw.js → index-Bmp5whcS.js} +2 -2
  209. package/_assets/{index-DwM-JZSi.js → index-Bqx9Q4Ql.js} +2 -2
  210. package/_assets/{index-CpepHIup.js → index-Bvr2fgKy.js} +2 -2
  211. package/_assets/index-BzHItohU.js +2 -0
  212. package/_assets/{index-BY7ZDgU3.js → index-C0epQ9nm.js} +2 -2
  213. package/_assets/{index-CmH_zvOx.js → index-C5K_Xtzs.js} +4 -4
  214. package/_assets/{index-DclRc8UN.js → index-CCJlpUO5.js} +2 -2
  215. package/_assets/{index-KBa4w5_b.js → index-CNg2-01g.js} +2 -2
  216. package/_assets/{index-Bmjs-VA2.js → index-CQI09SJY.js} +2 -2
  217. package/_assets/index-CWe6A1Zs.js +2 -0
  218. package/_assets/{index-DF6WG3qn.js → index-C_-3KJ53.js} +5 -5
  219. package/_assets/{index-CskSOnyZ.js → index-Cdg9qDsi.js} +2 -2
  220. package/_assets/{index-D3fQaxNZ.js → index-CfWc1FaA.js} +2 -2
  221. package/_assets/{index-ozHAxPgl.js → index-CmJIEIDP.js} +2 -2
  222. package/_assets/{index-yeutDs-n.js → index-CmO5nOV-.js} +13 -13
  223. package/_assets/{index-D-peO4dU.js → index-CosgB6RO.js} +2 -2
  224. package/_assets/{index-mkHeSqYe.js → index-Cqi1CJJ8.js} +2 -2
  225. package/_assets/{index-BSUctRYP.js → index-CrIepX27.js} +2 -2
  226. package/_assets/{index-YkV_OCpx.js → index-Cup8xZuk.js} +2 -2
  227. package/_assets/{index-GKtnnyfC.js → index-CxzWRDRI.js} +2 -2
  228. package/_assets/{index-DtVc4xk5.js → index-CzFC6Sih.js} +6 -6
  229. package/_assets/{index-DMAEUsQc.js → index-D-IxjOuS.js} +2 -2
  230. package/_assets/{index-CFSE-4g9.js → index-D0eDFsbU.js} +4 -4
  231. package/_assets/{index-CTVBoJue.js → index-D21UVRUB.js} +6 -6
  232. package/_assets/{index-DiQlp13b.js → index-D3UiKOeM.js} +6 -6
  233. package/_assets/{index-BX5k8Ia-.js → index-D83kRPLh.js} +2 -2
  234. package/_assets/{index-btSRhLw4.js → index-DE21KW0O.js} +6 -6
  235. package/_assets/{index-lZ0PPqQV.js → index-DIcmZ-2A.js} +4 -4
  236. package/_assets/{index-CF0TwWos.js → index-DOxi-R6P.js} +4 -4
  237. package/_assets/{index-BvHOSZKj.js → index-DQJP9ztl.js} +4 -4
  238. package/_assets/{index-fmt3aBMt.js → index-DjqGVOuG.js} +2 -2
  239. package/_assets/{index-BDoxreOH.js → index-DpmIXdhp.js} +2 -2
  240. package/_assets/{index-CAJOEhqU.js → index-DrPTgN46.js} +10 -10
  241. package/_assets/{index-ClTFdTLe.js → index-DtyGjGdJ.js} +9 -9
  242. package/_assets/{index-BEPvT81m.js → index-DukEWuqs.js} +2 -2
  243. package/_assets/{index-Dana8qUZ.js → index-DuvaiQAa.js} +4 -4
  244. package/_assets/{index-DVjQDdLu.js → index-DvBcVM9J.js} +4 -4
  245. package/_assets/{index-oAZ1ZU-c.js → index-Dwqhet3G.js} +3 -3
  246. package/_assets/{index-Be1NJYDT.js → index-Ix4tk_IH.js} +3 -3
  247. package/_assets/{index-Ce4Edp7-.js → index-JHFG4lY9.js} +3 -3
  248. package/_assets/{index-DZJvVVBz.js → index-aT59DNNF.js} +2 -2
  249. package/_assets/{index-C-Jqa8tU.js → index-biKFWDSr.js} +2 -2
  250. package/_assets/{index-CvYt90O2.js → index-fwgXlNaQ.js} +2 -2
  251. package/_assets/{index-DW3ULbU6.js → index-jZl60cNc.js} +3 -3
  252. package/_assets/{index-CXi4JrFW.js → index-qMSCNYPa.js} +2 -2
  253. package/_assets/{index-DvWRa5G-.js → index-zDPqvcfw.js} +3 -3
  254. package/_assets/{index.es-DiYQfgia.js → index.es-Bkj-CiW7.js} +2 -2
  255. package/_assets/{index.es-Uf1O-fY2.js → index.es-Cj_IdjQu.js} +5 -5
  256. package/_assets/{index.es-7_2j1y1c.js → index.es-DQrmcgkm.js} +2 -2
  257. package/_assets/{index.es-CX2yBV9N.js → index.es-Ddq4Lbem.js} +2 -2
  258. package/_assets/{info-DnsR7NqF.js → info-OmyNm-OX.js} +2 -2
  259. package/_assets/{info-circle-CYhLz303.js → info-circle-BXcv2mSp.js} +3 -3
  260. package/_assets/items-empty-CgbdohG5.js +2 -0
  261. package/_assets/jsxRuntime.module-MtWsgs3K.js +2 -0
  262. package/_assets/{jump-DKhwghhc.js → jump-DAtja6hb.js} +2 -2
  263. package/_assets/{lightbulb-CrV2ehUv.js → lightbulb-BhYYPKCa.js} +3 -3
  264. package/_assets/linkAccount-CGX79VBg.js +2 -0
  265. package/_assets/{localBatchGatewayRequest-CfRrj7XF.js → localBatchGatewayRequest-B_OZrQFS.js} +2 -2
  266. package/_assets/{mail-DCBuUzr3.js → mail-BujAiJT_.js} +2 -2
  267. package/_assets/{mobile-BaKd3Qnj.js → mobile-DbqgdYYl.js} +2 -2
  268. package/_assets/{more-LgdfAy-0.js → more-DW0Ubi-A.js} +2 -2
  269. package/_assets/{native-Do2B-Qxb.js → native-CUQI8Usw.js} +2 -2
  270. package/_assets/{network-placeholder-DGOUzxhW.js → network-placeholder-9yKv-UCl.js} +2 -2
  271. package/_assets/{networks-Dqe7-N6R.js → networks-DnyaIwSs.js} +2 -2
  272. package/_assets/{nftPlaceholder-DfAiM1YP.js → nftPlaceholder-Dp7HrYOG.js} +3 -3
  273. package/_assets/{off-I_Bs0UMa.js → off-B06N3u5j.js} +2 -2
  274. package/_assets/{onramp-gJypUnb8.js → onramp-DYuBkoqF.js} +2 -2
  275. package/_assets/openzeppelin-DPY-3NEU.js +2 -0
  276. package/_assets/ownerOf-DQmrd_HT.js +2 -0
  277. package/_assets/parseNft-CjWZO5mt.js +3 -0
  278. package/_assets/{parseSignature-BMAMdfMY.js → parseSignature-DBX2qFze.js} +4 -4
  279. package/_assets/{parseSignature-BkC3FKxl.js → parseSignature-DPlMGBqN.js} +2 -2
  280. package/_assets/{passkeys-BMA2Vzjg.js → passkeys-CMTPFjWM.js} +2 -2
  281. package/_assets/{pay-with-exchange-BbaFUQ7y.js → pay-with-exchange-CmQ-U7JD.js} +2 -2
  282. package/_assets/{play-store-Zdx677t2.js → play-store-CGV0O_Jz.js} +3 -3
  283. package/_assets/{plus-BpaXWvxm.js → plus-D8Do9lRK.js} +2 -2
  284. package/_assets/{prepare-contract-call-CTis3Ksb.js → prepare-contract-call-iHQ3P-dt.js} +2 -2
  285. package/_assets/{qr-code-Bc1ba80O.js → qr-code-CnvkPJlE.js} +3 -3
  286. package/_assets/{qr-overlay-C1Y4nmkc.js → qr-overlay-7h6r2g--.js} +4 -4
  287. package/_assets/{react-DyPiTXWH.js → react-DDKWENsC.js} +2 -2
  288. package/_assets/{receive-BC-Faqrt.js → receive--7zwd0t9.js} +9 -9
  289. package/_assets/{recycle-horizontal-n6I99nC_.js → recycle-horizontal-BUI1wFhc.js} +3 -3
  290. package/_assets/{ref-Uk7bJ2Ii.js → ref-LkxlwUph.js} +2 -2
  291. package/_assets/{refresh-DqnhFnmq.js → refresh-gWkM7TpU.js} +2 -2
  292. package/_assets/{reown-logo-BV-uLdVW.js → reown-logo-CpiN-NOh.js} +3 -3
  293. package/_assets/{resolveImplementation-C7gGuPZF.js → resolveImplementation-CygWPpYC.js} +2 -2
  294. package/_assets/{resume-buy-CrOe5wve.js → resume-buy-xmt0f2W1.js} +2 -2
  295. package/_assets/{rpc-EFTC3eie.js → rpc-wIhNw4ZJ.js} +2 -2
  296. package/_assets/{sales-empty-B90K0W8H.js → sales-empty-D2JONTvc.js} +2 -2
  297. package/_assets/{search-8HlgtNap.js → search-Wn0h8HYX.js} +2 -2
  298. package/_assets/{search-empty-GvvlNANs.js → search-empty-CmebVXGx.js} +2 -2
  299. package/_assets/{secp256k1-CSKPyg7G.js → secp256k1-BhMmf6Dr.js} +2 -2
  300. package/_assets/{secp256k1-DruP3eGK.js → secp256k1-CfFoIY9f.js} +2 -2
  301. package/_assets/{secp256k1-Cth-fPBi.js → secp256k1-Cfvuwdh5.js} +2 -2
  302. package/_assets/{send-BHKhUGFX.js → send-BbZytlP1.js} +2 -2
  303. package/_assets/{send-CSn4ZY-1.js → send-CRwGmod1.js} +2 -2
  304. package/_assets/send-batch-transaction-DkCtBwJz.js +2 -0
  305. package/_assets/{send-eip712-transaction-C4Sq8ViN.js → send-eip712-transaction-CPq78eLB.js} +3 -3
  306. package/_assets/send-gasless-transaction-CiZLCLLp.js +3 -0
  307. package/_assets/send-transaction-DgreB77T.js +3 -0
  308. package/_assets/{sendMetaTransaction-DdKlulxU.js → sendMetaTransaction-DAAlKScV.js} +2 -2
  309. package/_assets/{sendRawTransaction-CoNlS87a.js → sendRawTransaction-Fhai_2kM.js} +4 -4
  310. package/_assets/{sentry-wjuCVNXH.js → sentry-DAZHYHIo.js} +3 -3
  311. package/_assets/{serializeTransaction-Be5yK09O.js → serializeTransaction-DNNoTsvT.js} +2 -2
  312. package/_assets/{session-proposal-Cr1bW3vR.js → session-proposal-Cq_Q0vId.js} +2 -2
  313. package/_assets/session-request-CupD7Nwd.js +3 -0
  314. package/_assets/{sha256-UiFg1E6a.js → sha256-C786HL5r.js} +2 -2
  315. package/_assets/{signing-B6MLGmUe.js → signing-BWFHrcT1.js} +4 -4
  316. package/_assets/{skeleton.styles-DGb4Vags.js → skeleton.styles-CBEhKJdF.js} +2 -2
  317. package/_assets/{socials-B1QMNGq2.js → socials-D32k24BB.js} +2 -2
  318. package/_assets/{styled-Bgmkc9S2.js → styled-8ELexPnY.js} +3 -3
  319. package/_assets/{swapHorizontal-CXfaNtti.js → swapHorizontal-3Mejt9DE.js} +2 -2
  320. package/_assets/{swapHorizontalBold-gpSWS3ym.js → swapHorizontalBold-DkYUmHIw.js} +3 -3
  321. package/_assets/{swapHorizontalMedium-YvybS1X0.js → swapHorizontalMedium-C-AChIRi.js} +3 -3
  322. package/_assets/{swapHorizontalRoundedBold-4mt2CKzr.js → swapHorizontalRoundedBold-BtKMBAIU.js} +2 -2
  323. package/_assets/{swapVertical-D7tPfByp.js → swapVertical-drqnjZhx.js} +3 -3
  324. package/_assets/{swaps-DII4kYq8.js → swaps-CC56uG3K.js} +2 -2
  325. package/_assets/{telegram-CZbPcX2g.js → telegram-B0zQ2xux.js} +2 -2
  326. package/_assets/{thirdweb-B1YDVAJI.js → thirdweb-BmTVY5C4.js} +4 -4
  327. package/_assets/{three-dots-Cf1FPHh0.js → three-dots-CalKjIbH.js} +2 -2
  328. package/_assets/{to-serializable-transaction-D2a8RSyu.js → to-serializable-transaction-Sxn7kdiH.js} +3 -3
  329. package/_assets/totalSupply-B9MQHpV3.js +2 -0
  330. package/_assets/{transaction-CSbiSCR6.js → transaction-DBRvSL88.js} +2 -2
  331. package/_assets/transactionReceipt-BVxX2az8.js +2 -0
  332. package/_assets/transactions-DqPg-dZx.js +17 -0
  333. package/_assets/{twitch-DW3PgCNj.js → twitch-DFJ9vbRU.js} +3 -3
  334. package/_assets/{twitterIcon-CnG-gacS.js → twitterIcon-PQaPXSEq.js} +3 -3
  335. package/_assets/{useCreditPacks-oQYk8AXU.js → useCreditPacks-Ct4uK4wK.js} +2 -2
  336. package/_assets/{useInfiniteGrid-BKQ811RA.js → useInfiniteGrid-BT5fAUrc.js} +2 -2
  337. package/_assets/useStore-BIyKj4_V.js +3 -0
  338. package/_assets/useTheme-CTDSytfO.js +2 -0
  339. package/_assets/{utils-6qnhg71x.js → utils-CwCJ6zqR.js} +2 -2
  340. package/_assets/{verify-BVFN0KHq.js → verify-BkXjhgFz.js} +3 -3
  341. package/_assets/{verify-filled-CgBDmJEs.js → verify-filled-Bgl9j8Ps.js} +3 -3
  342. package/_assets/{verifyHash-CHp_1dkh.js → verifyHash-Dyshna4Z.js} +2 -2
  343. package/_assets/{w3m-modal-D-YLR-nS.js → w3m-modal-CEIt-VQh.js} +2 -2
  344. package/_assets/{w3m-modal-BidasrnU.js → w3m-modal-DkWb81UO.js} +2 -2
  345. package/_assets/{wait-for-tx-receipt-CuAEC_h9.js → wait-for-tx-receipt-Bn2n7Hj9.js} +2 -2
  346. package/_assets/{wallet-FHuzmtut.js → wallet-h2At2yYW.js} +2 -2
  347. package/_assets/{wallet-placeholder-BaNh3suA.js → wallet-placeholder-BAdAxbaS.js} +3 -3
  348. package/_assets/{walletconnect-SOaTuXVA.js → walletconnect-DGwNgL-R.js} +2 -2
  349. package/_assets/{wallets-IqNjjBUC.js → wallets-CcfuYkMe.js} +6 -6
  350. package/_assets/{warning-circle-IYnfnelV.js → warning-circle-BcDrWyl5.js} +2 -2
  351. package/_assets/{web-connector-B6ZK-KnR.js → web-connector-BcQFY8w9.js} +4 -4
  352. package/_assets/{writeContract-BhYblJOj.js → writeContract-DM0AL5N_.js} +2 -2
  353. package/_assets/{x-C1-09R-N.js → x-DoyXusK-.js} +3 -3
  354. package/_assets/{zora-sepolia-MBZVLRHn.js → zora-sepolia-DDVtk4JR.js} +2 -2
  355. package/_assets/{zoraTestnet-z1EEFkWs.js → zoraTestnet-CvXAiUDr.js} +2 -2
  356. package/index.html +11 -11
  357. package/package.json +2 -2
  358. package/_assets/HelpersUtil-PZUZTOEJ.js +0 -63
  359. package/_assets/ItemDetail-CTfaTNRb.js +0 -3684
  360. package/_assets/PhCaretDown-C_h7B-wg.js +0 -15
  361. package/_assets/PhCaretUp-_p9r-ftN.js +0 -15
  362. package/_assets/async-directive-BF5rCMgn.js +0 -10
  363. package/_assets/chevron-bottom-CKrN3wHT.js +0 -9
  364. package/_assets/chevron-right-NSTsMrfQ.js +0 -9
  365. package/_assets/chevron-top-BiVhyzKv.js +0 -9
  366. package/_assets/collectionPage.styles-CUZMIu19.js +0 -40
  367. package/_assets/common-jIM0_xX0.js +0 -2
  368. package/_assets/decimals-CjF-BdSX.js +0 -2
  369. package/_assets/decimals-Ckn9cRy4.js +0 -2
  370. package/_assets/detectExtension-Gnu7LiZD.js +0 -2
  371. package/_assets/estimate-l1-fee-Dbvud_Cw.js +0 -2
  372. package/_assets/eth_estimateGas-rS25vqwZ.js +0 -2
  373. package/_assets/eth_getStorageAt-Dfz80jyN.js +0 -2
  374. package/_assets/eth_getTransactionCount-T_shF7-r.js +0 -2
  375. package/_assets/ethereum-CJCFASug.js +0 -2
  376. package/_assets/external-link-CGMMz88J.js +0 -9
  377. package/_assets/extractIPFS-C9dhUG6w.js +0 -2
  378. package/_assets/get-ecosystem-wallet-info-u8rFPFzM.js +0 -2
  379. package/_assets/getInstalledModules-B4P_9Ec-.js +0 -2
  380. package/_assets/getNFT-UlaoLDKl.js +0 -3
  381. package/_assets/getNFT-xR-ZGgUx.js +0 -2
  382. package/_assets/in-app-wallet-calls-BHDyG_Hm.js +0 -2
  383. package/_assets/index-BSiVr0DD.js +0 -2
  384. package/_assets/index-CbK4PiBW.js +0 -31
  385. package/_assets/index-DNnRMWE4.js +0 -2
  386. package/_assets/items-empty-Di8AuNKB.js +0 -2
  387. package/_assets/jsxRuntime.module-BdZCPzuh.js +0 -2
  388. package/_assets/linkAccount-CI2WbmeE.js +0 -2
  389. package/_assets/openzeppelin-CqvwIh1K.js +0 -2
  390. package/_assets/ownerOf-CSaLDIRi.js +0 -2
  391. package/_assets/parseNft-Abg8wFVh.js +0 -3
  392. package/_assets/send-batch-transaction-BJtaWfLS.js +0 -2
  393. package/_assets/send-gasless-transaction-6SwFGxtl.js +0 -3
  394. package/_assets/send-transaction-BS3sJtZU.js +0 -3
  395. package/_assets/session-request-C7XtyHpP.js +0 -3
  396. package/_assets/totalSupply-Cz_d9KgH.js +0 -2
  397. package/_assets/transactionReceipt-Cs2L3s90.js +0 -2
  398. package/_assets/transactions-BM0AB6rD.js +0 -17
  399. package/_assets/useStore-Dvc10vNY.js +0 -3
  400. package/_assets/useTheme-kL3HtKAH.js +0 -2
@@ -1,4 +1,4 @@
1
- import{i as b,b as u}from"./lit-element-wjYUA6aF.js";import{n}from"./class-map-DopF_Eyi.js";import{c as g}from"./index-yeutDs-n.js";import"./index-CpepHIup.js";import{d as p,r as m,e as h}from"./index-DVjQDdLu.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="e1fc8103-17dd-4f87-b649-cc1a61917f9b",t._sentryDebugIdIdentifier="sentry-dbid-e1fc8103-17dd-4f87-b649-cc1a61917f9b")}catch{}})();const v=p`
1
+ import{i as b,b as c}from"./lit-element-wjYUA6aF.js";import{n}from"./class-map-C1Xjz5Lx.js";import{c as g}from"./index-CmO5nOV-.js";import"./index-Bvr2fgKy.js";import{d as p,r as m,e as h}from"./index-DvBcVM9J.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="098d42c9-dbb7-4fe2-a043-a433c48ebe0b",t._sentryDebugIdIdentifier="sentry-dbid-098d42c9-dbb7-4fe2-a043-a433c48ebe0b")}catch{}})();const v=p`
2
2
  :host {
3
3
  width: var(--local-width);
4
4
  }
@@ -138,16 +138,16 @@ import{i as b,b as u}from"./lit-element-wjYUA6aF.js";import{n}from"./class-map-D
138
138
  button:disabled {
139
139
  opacity: 0.3;
140
140
  }
141
- `;var i=function(t,r,a,d){var s=arguments.length,o=s<3?r:d===null?d=Object.getOwnPropertyDescriptor(r,a):d,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,r,a,d);else for(var c=t.length-1;c>=0;c--)(l=t[c])&&(o=(s<3?l(o):s>3?l(r,a,o):l(r,a))||o);return s>3&&o&&Object.defineProperty(r,a,o),o};const f={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},y={lg:"md",md:"md",sm:"sm"};let e=class extends b{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=`
141
+ `;var i=function(t,e,a,d){var s=arguments.length,o=s<3?e:d===null?d=Object.getOwnPropertyDescriptor(e,a):d,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,a,d);else for(var u=t.length-1;u>=0;u--)(l=t[u])&&(o=(s<3?l(o):s>3?l(e,a,o):l(e,a))||o);return s>3&&o&&Object.defineProperty(e,a,o),o};const y={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},f={lg:"md",md:"md",sm:"sm"};let r=class extends b{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=`
142
142
  --local-width: ${this.fullWidth?"100%":"auto"};
143
- `;const r=this.textVariant??f[this.size];return u`
143
+ `;const e=this.textVariant??y[this.size];return c`
144
144
  <button data-variant=${this.variant} data-size=${this.size} ?disabled=${this.disabled}>
145
145
  ${this.loadingTemplate()}
146
146
  <slot name="iconLeft"></slot>
147
- <wui-text variant=${r} color="inherit">
147
+ <wui-text variant=${e} color="inherit">
148
148
  <slot></slot>
149
149
  </wui-text>
150
150
  <slot name="iconRight"></slot>
151
151
  </button>
152
- `}loadingTemplate(){if(this.loading){const r=y[this.size],a=this.variant==="neutral-primary"||this.variant==="accent-primary"?"invert":"primary";return u`<wui-loading-spinner color=${a} size=${r}></wui-loading-spinner>`}return null}};e.styles=[m,h,v];i([n()],e.prototype,"size",void 0);i([n({type:Boolean})],e.prototype,"disabled",void 0);i([n({type:Boolean})],e.prototype,"fullWidth",void 0);i([n({type:Boolean})],e.prototype,"loading",void 0);i([n()],e.prototype,"variant",void 0);i([n()],e.prototype,"textVariant",void 0);e=i([g("wui-button")],e);
153
- //# sourceMappingURL=index-DtVc4xk5.js.map
152
+ `}loadingTemplate(){if(this.loading){const e=f[this.size],a=this.variant==="neutral-primary"||this.variant==="accent-primary"?"invert":"primary";return c`<wui-loading-spinner color=${a} size=${e}></wui-loading-spinner>`}return null}};r.styles=[m,h,v];i([n()],r.prototype,"size",void 0);i([n({type:Boolean})],r.prototype,"disabled",void 0);i([n({type:Boolean})],r.prototype,"fullWidth",void 0);i([n({type:Boolean})],r.prototype,"loading",void 0);i([n()],r.prototype,"variant",void 0);i([n()],r.prototype,"textVariant",void 0);r=i([g("wui-button")],r);
153
+ //# sourceMappingURL=index-CzFC6Sih.js.map
@@ -1,4 +1,4 @@
1
- import{i as _,b as l,a as Te}from"./lit-element-wjYUA6aF.js";import{n as x,o as f,r as h,a as Ie}from"./class-map-DopF_Eyi.js";import{d as U,r as Ne,e as Se,v as ke}from"./index-DVjQDdLu.js";import{c as C,U as _e}from"./index-yeutDs-n.js";import"./index-DtVc4xk5.js";import"./index-CmH_zvOx.js";import"./index-DF6WG3qn.js";import"./index-btSRhLw4.js";import"./index-CpepHIup.js";import"./index-ClTFdTLe.js";import"./index-DvWRa5G-.js";import{$ as Ce,k as T,a0 as $e,a1 as y,b as O,a2 as Re,a3 as N,O as ce,N as A,a4 as me,C as m,q as v,E as M,S as R,n as Oe,M as G,e as Ue,i as Le,p as qe,o as P,R as z}from"./W3MFrameProviderSingleton-35iFXIWF.js";import{au as I}from"./NetworkUtil-CcWpYyVE.js";import"./index-CbK4PiBW.js";import{M as ge}from"./MathUtil-BvP0JcjY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="98d0b7c5-a2c2-4f59-96d8-94fa819634b1",t._sentryDebugIdIdentifier="sentry-dbid-98d0b7c5-a2c2-4f59-96d8-94fa819634b1")}catch{}})();const De=U`
1
+ import{i as _,b as l,a as Te}from"./lit-element-wjYUA6aF.js";import{n as x,o as f,r as h,a as Ie}from"./class-map-C1Xjz5Lx.js";import{d as U,r as Ne,e as Se,v as ke}from"./index-DvBcVM9J.js";import{c as C,U as _e}from"./index-CmO5nOV-.js";import"./index-CzFC6Sih.js";import"./index-C5K_Xtzs.js";import"./index-C_-3KJ53.js";import"./index-DE21KW0O.js";import"./index-Bvr2fgKy.js";import"./index-DtyGjGdJ.js";import"./index-zDPqvcfw.js";import{$ as Ce,k as T,a0 as $e,a1 as y,b as O,a2 as Re,a3 as N,O as ce,N as A,a4 as me,C as m,q as v,E as M,S as R,n as Oe,M as G,e as Ue,i as Le,p as qe,o as P,R as z}from"./W3MFrameProviderSingleton-DZpGQQon.js";import{au as I}from"./NetworkUtil-ZXSOAWFf.js";import"./index-BlR1h3iB.js";import{M as ge}from"./MathUtil-BvP0JcjY.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="2d4ec0ea-1b73-4826-bb23-711facb3c805",t._sentryDebugIdIdentifier="sentry-dbid-2d4ec0ea-1b73-4826-bb23-711facb3c805")}catch{}})();const De=U`
2
2
  :host {
3
3
  position: relative;
4
4
  }
@@ -1062,4 +1062,4 @@ import{i as _,b as l,a as Te}from"./lit-element-wjYUA6aF.js";import{n as x,o as
1062
1062
  ></wui-icon>`}
1063
1063
  </wui-button>
1064
1064
  `}getPaymentAssetFromTokenBalances(){return this.namespace?(this.tokenBalances[this.namespace]??[]).map(i=>{try{return tt(i)}catch{return null}}).filter(i=>!!i).filter(i=>{const{chainId:a}=y.parseCaipNetworkId(i.network),{chainId:o}=y.parseCaipNetworkId(this.paymentAsset.network);return N.isLowerCaseMatch(i.asset,this.paymentAsset.asset)?!0:this.selectedExchange?!N.isLowerCaseMatch(a.toString(),o.toString()):!0}):[]}onTokenBalancesChanged(e){this.tokenBalances=e;const[n]=this.getPaymentAssetFromTokenBalances();n&&u.setSelectedPaymentAsset(n)}async onConnectOtherWallet(){await P.connect(),await G.open({view:"PayQuote"})}onAccountStateChanged(e){const{address:n}=this.caipAddress?y.parseCaipAddress(this.caipAddress):{};if(this.caipAddress=e==null?void 0:e.caipAddress,this.profileName=(e==null?void 0:e.profileName)??null,n){const{address:s}=this.caipAddress?y.parseCaipAddress(this.caipAddress):{};s?N.isLowerCaseMatch(s,n)||(this.resetAssetsState(),this.resetQuoteState(),this.fetchTokens()):G.close()}}onSelectedPaymentAssetChanged(e){this.isFetchingQuote||u.setSelectedPaymentAsset(e)}async onTransfer(){var n,s,i;const e=ie(this.quote);if(e){if(!N.isLowerCaseMatch((n=this.selectedPaymentAsset)==null?void 0:n.asset,e.deposit.currency))throw new Error("Quote asset is not the same as the selected payment asset");const o=((s=this.selectedPaymentAsset)==null?void 0:s.amount)??"0",c=A.formatNumber(e.deposit.amount,{decimals:((i=this.selectedPaymentAsset)==null?void 0:i.metadata.decimals)??0}).toString();if(!A.bigNumber(o).gte(c)){R.showError("Insufficient funds");return}if(this.quote&&this.selectedPaymentAsset&&this.caipAddress&&this.namespace){const{address:L}=y.parseCaipAddress(this.caipAddress);await u.onTransfer({chainNamespace:this.namespace,fromAddress:L,toAddress:e.deposit.receiver,amount:c,paymentAsset:this.selectedPaymentAsset}),u.setRequestId(e.requestId),z.push("PayLoading")}}}async onSendTransactions(){var o,c,g;const e=((o=this.selectedPaymentAsset)==null?void 0:o.amount)??"0",n=A.formatNumber(((c=this.quote)==null?void 0:c.origin.amount)??0,{decimals:((g=this.selectedPaymentAsset)==null?void 0:g.metadata.decimals)??0}).toString();if(!A.bigNumber(e).gte(n)){R.showError("Insufficient funds");return}const i=te(this.quote),[a]=te(this.quote,this.completedTransactionsCount);a&&this.namespace&&(await u.onSendTransaction({namespace:this.namespace,transactionStep:a}),this.completedTransactionsCount+=1,this.completedTransactionsCount===i.length&&(u.setRequestId(a.requestId),z.push("PayLoading")))}onPayWithExchange(){if(this.exchangeUrlForQuote){const e=O.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!e)throw new Error("Could not create popup window");e.location.href=this.exchangeUrlForQuote;const n=ie(this.quote);n&&u.setRequestId(n.requestId),u.initiatePayment(),z.push("PayLoading")}}resetAssetsState(){u.setSelectedPaymentAsset(null)}resetQuoteState(){u.resetQuoteState()}};w.styles=Nt;b([h()],w.prototype,"profileName",void 0);b([h()],w.prototype,"paymentAsset",void 0);b([h()],w.prototype,"namespace",void 0);b([h()],w.prototype,"caipAddress",void 0);b([h()],w.prototype,"amount",void 0);b([h()],w.prototype,"recipient",void 0);b([h()],w.prototype,"activeConnectorIds",void 0);b([h()],w.prototype,"selectedPaymentAsset",void 0);b([h()],w.prototype,"selectedExchange",void 0);b([h()],w.prototype,"isFetchingQuote",void 0);b([h()],w.prototype,"quoteError",void 0);b([h()],w.prototype,"quote",void 0);b([h()],w.prototype,"isFetchingTokenBalances",void 0);b([h()],w.prototype,"tokenBalances",void 0);b([h()],w.prototype,"isPaymentInProgress",void 0);b([h()],w.prototype,"exchangeUrlForQuote",void 0);b([h()],w.prototype,"completedTransactionsCount",void 0);w=b([C("w3m-pay-quote-view")],w);export{p as A,u as P,E as W,d as a,w as b,k as c};
1065
- //# sourceMappingURL=index-DMAEUsQc.js.map
1065
+ //# sourceMappingURL=index-D-IxjOuS.js.map
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-Ce4Edp7-.js","_assets/index-Ba6ZjOcU.js","_assets/react-DyPiTXWH.js","_assets/dcl-schemas-BHtFmNb-.js","_assets/sentry-wjuCVNXH.js","_assets/ethers-DgOG59Su.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sendRawTransaction-CoNlS87a.js","_assets/NetworkUtil-CcWpYyVE.js","_assets/W3MFrameProviderSingleton-35iFXIWF.js","_assets/index-CXi4JrFW.js","_assets/index-Be1NJYDT.js","_assets/events-DibVD_t7.js","_assets/browser-ponyfill-DiBM5SBC.js","_assets/custom-DTxuVuIB.js","_assets/index-DNnRMWE4.js","_assets/index-wfbbVR0C.js","_assets/store-80QKZ2rN.js","_assets/writeContract-BhYblJOj.js"])))=>i.map(i=>d[i]);
2
- import{w as Me,a as We,l as Ie,C as k,o as Le,a5 as ye,F as W,a6 as J,A as D,Z as qe,t as H,O as x,a7 as $e,e as De,p as xe,b as ne,a8 as He,a9 as X,aa as j,L as Fe,a3 as Y,ab as Q,X as be,ac as Be}from"./W3MFrameProviderSingleton-35iFXIWF.js";import{al as ze,ao as Ve,ab as Ge,x as B,af as re,Y as _,r as de,au as S,az as ge,a4 as Ke}from"./NetworkUtil-CcWpYyVE.js";import{b7 as Je,bh as Te,aI as q,cv as Xe,bc as Ye,bi as Qe,ah as Ze}from"./sendRawTransaction-CoNlS87a.js";import"./dcl-schemas-BHtFmNb-.js";import"./index-CXi4JrFW.js";import"./index-Be1NJYDT.js";import"./browser-ponyfill-DiBM5SBC.js";import{_ as we}from"./index-Ba6ZjOcU.js";import{E as et}from"./index-DNnRMWE4.js";import{c as tt}from"./store-80QKZ2rN.js";import{c as Pe,a as nt,g as it,b as st,d as ot,e as rt,p as ct}from"./custom-DTxuVuIB.js";import{s as at,w as dt}from"./writeContract-BhYblJOj.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="ca765f95-f73d-4260-8744-fde508dbff27",i._sentryDebugIdIdentifier="sentry-dbid-ca765f95-f73d-4260-8744-fde508dbff27")}catch{}})();async function ut(i,{account:e=i.account,message:t}){if(!e)throw new Je({docsPath:"/docs/actions/wallet/signMessage"});const n=Te(e);if(n.signMessage)return n.signMessage({message:t});const o=typeof t=="string"?ze(t):t.raw instanceof Uint8Array?Ve(t.raw):t.raw;return i.request({method:"personal_sign",params:[o,n.address]},{retryCount:0})}function U(i,e,t){const n=i[e.name];if(typeof n=="function")return n;const o=i[t];return typeof o=="function"?o:s=>e(i,s)}const ie="3.5.5",lt=()=>`@wagmi/core@${ie}`;var ke=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},ce,Re;class O extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return lt()}constructor(e,t={}){var s;super(),ce.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=t.cause instanceof O?t.cause.details:(s=t.cause)!=null&&s.message?t.cause.message:t.details,o=t.cause instanceof O&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${this.docsBaseUrl}${o}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
3
- `),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=o,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return ke(this,ce,"m",Re).call(this,this,e)}}ce=new WeakSet,Re=function i(e,t){return t!=null&&t(e)?e:e.cause?ke(this,ce,"m",i).call(this,e.cause,t):e};class z extends O{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class ht extends O{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class ft extends O{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class gt extends O{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class mt extends O{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class Ct extends O{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function ue(i,e){var n;let t;if(typeof e.connector=="function"?t=i._internal.connectors.setup(e.connector):t=e.connector,t.uid===i.state.current)throw new ht;try{i.setState(c=>({...c,status:"connecting"})),t.emitter.emit("message",{type:"connecting"});const{connector:o,...s}=e,u=await t.connect(s);return t.emitter.off("connect",i._internal.events.connect),t.emitter.on("change",i._internal.events.change),t.emitter.on("disconnect",i._internal.events.disconnect),await((n=i.storage)==null?void 0:n.setItem("recentConnectorId",t.id)),i.setState(c=>({...c,connections:new Map(c.connections).set(t.uid,{accounts:s.withCapabilities?u.accounts.map(d=>typeof d=="object"?d.address:d):u.accounts,chainId:u.chainId,connector:t}),current:t.uid,status:"connected"})),{accounts:s.withCapabilities?u.accounts.map(c=>typeof c=="object"?c:{address:c,capabilities:{}}):u.accounts,chainId:u.chainId}}catch(o){throw i.setState(s=>({...s,status:s.current?"connected":"disconnected"})),o}}async function G(i,e={}){const{assertChainId:t=!0}=e;let n;if(e.connector){const{connector:r}=e;if(i.state.status==="reconnecting"&&!r.getAccounts&&!r.getChainId)throw new Ct({connector:r});const[l,g]=await Promise.all([r.getAccounts().catch(f=>{if(e.account===null)return[];throw f}),r.getChainId()]);n={accounts:l,chainId:g,connector:r}}else n=i.state.connections.get(i.state.current);if(!n)throw new ft;const o=e.chainId??n.chainId,s=await n.connector.getChainId();if(t&&s!==o)throw new mt({connectionChainId:o,connectorChainId:s});const u=n.connector;if(u.getClient)return u.getClient({chainId:o});const c=Te(e.account??n.accounts[0]);if(c&&(c.address=q(c.address)),e.account&&!n.accounts.some(r=>r.toLowerCase()===c.address.toLowerCase()))throw new gt({address:c.address,connector:u});const d=i.chains.find(r=>r.id===o),a=await n.connector.getProvider({chainId:o});return Pe({account:c,chain:d,name:"Connector Client",transport:r=>nt(a)({...r,retryCount:0})})}async function ve(i,e={}){var o,s;let t;if(e.connector)t=e.connector;else{const{connections:u,current:c}=i.state,d=u.get(c);t=d==null?void 0:d.connector}const n=i.state.connections;t&&(await t.disconnect(),t.emitter.off("change",i._internal.events.change),t.emitter.off("disconnect",i._internal.events.disconnect),t.emitter.on("connect",i._internal.events.connect),n.delete(t.uid)),i.setState(u=>{if(n.size===0)return{...u,connections:new Map,current:null,status:"disconnected"};const c=n.values().next().value;return{...u,connections:new Map(n),current:c.connector.uid}});{const u=i.state.current;if(!u)return;const c=(o=i.state.connections.get(u))==null?void 0:o.connector;if(!c)return;await((s=i.storage)==null?void 0:s.setItem("recentConnectorId",c.id))}}async function wt(i,e){const{chainId:t,connector:n,...o}=e;let s;e.account?s=e.account:s=(await G(i,{account:e.account,assertChainId:!1,chainId:t,connector:n})).account;const u=i.getClient({chainId:t});return U(u,Xe,"estimateGas")({...o,account:s})}async function pt(i,e){const{address:t,blockNumber:n,blockTag:o,chainId:s}=e,u=i.getClient({chainId:s}),d=await U(u,it,"getBalance")(n?{address:t,blockNumber:n}:{address:t,blockTag:o}),a=i.chains.find(r=>r.id===s)??u.chain;return{decimals:a.nativeCurrency.decimals,symbol:a.nativeCurrency.symbol,value:d}}function V(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){if(i.constructor!==e.constructor)return!1;let t,n;if(Array.isArray(i)&&Array.isArray(e)){if(t=i.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!V(i[n],e[n]))return!1;return!0}if(typeof i.valueOf=="function"&&i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(typeof i.toString=="function"&&i.toString!==Object.prototype.toString)return i.toString()===e.toString();const o=Object.keys(i);if(t=o.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!Object.hasOwn(e,o[n]))return!1;for(n=t;n--!==0;){const s=o[n];if(s&&!V(i[s],e[s]))return!1}return!0}return i!==i&&e!==e}function se(i){const e=i.state.current,t=i.state.connections.get(e),n=t==null?void 0:t.accounts,o=n==null?void 0:n[0],s=i.chains.find(c=>c.id===(t==null?void 0:t.chainId)),u=i.state.status;switch(u){case"connected":return{address:o,addresses:n,chain:s,chainId:t==null?void 0:t.chainId,connector:t==null?void 0:t.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:u};case"reconnecting":return{address:o,addresses:n,chain:s,chainId:t==null?void 0:t.chainId,connector:t==null?void 0:t.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:u};case"connecting":return{address:o,addresses:n,chain:s,chainId:t==null?void 0:t.chainId,connector:t==null?void 0:t.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:u};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:u}}}let Z=[];function M(i){const e=[...i.state.connections.values()];return i.state.status==="reconnecting"||V(Z,e)?Z:(Z=e,e)}async function It(i,e){const{account:t,chainId:n,connector:o,...s}=e;let u;return typeof t=="object"&&(t==null?void 0:t.type)==="local"?u=i.getClient({chainId:n}):u=await G(i,{account:t??void 0,assertChainId:!1,chainId:n,connector:o}),U(u,Ye,"prepareTransactionRequest")({...s,...t?{account:t}:{}})}let le=!1;async function he(i,e={}){var a,r;if(le)return[];le=!0,i.setState(l=>({...l,status:l.current?"reconnecting":"connecting"}));const t=[];if((a=e.connectors)!=null&&a.length)for(const l of e.connectors){let g;typeof l=="function"?g=i._internal.connectors.setup(l):g=l,t.push(g)}else t.push(...i.connectors);let n;try{n=await((r=i.storage)==null?void 0:r.getItem("recentConnectorId"))}catch{}const o={};for(const[,l]of i.state.connections)o[l.connector.id]=1;n&&(o[n]=0);const s=Object.keys(o).length>0?[...t].sort((l,g)=>(o[l.id]??10)-(o[g.id]??10)):t;let u=!1;const c=[],d=[];for(const l of s){const g=await l.getProvider().catch(()=>{});if(!g||d.some(m=>m===g)||!await l.isAuthorized())continue;const p=await l.connect({isReconnecting:!0}).catch(()=>null);p&&(l.emitter.off("connect",i._internal.events.connect),l.emitter.on("change",i._internal.events.change),l.emitter.on("disconnect",i._internal.events.disconnect),i.setState(m=>{const I=new Map(u?m.connections:new Map).set(l.uid,{accounts:p.accounts,chainId:p.chainId,connector:l});return{...m,current:u?m.current:l.uid,connections:I}}),c.push({accounts:p.accounts,chainId:p.chainId,connector:l}),d.push(g),u=!0)}return(i.state.status==="reconnecting"||i.state.status==="connecting")&&(u?i.setState(l=>({...l,status:"connected"})):i.setState(l=>({...l,connections:new Map,current:null,status:"disconnected"}))),le=!1,c}async function yt(i,e){const{account:t,chainId:n,connector:o,...s}=e;let u;typeof t=="object"&&(t==null?void 0:t.type)==="local"?u=i.getClient({chainId:n}):u=await G(i,{account:t??void 0,assertChainId:!1,chainId:n,connector:o});const c=(()=>{var r;return!n||((r=u.chain)==null?void 0:r.id)===n?u.chain:{id:n}})();return await U(u,at,"sendTransaction")({...s,...t?{account:t}:{},assertChainId:!!n,chain:c,gas:s.gas??void 0})}async function bt(i,e){const{account:t,connector:n,...o}=e;let s;return typeof t=="object"&&t.type==="local"?s=i.getClient():s=await G(i,{account:t,connector:n}),U(s,ut,"signMessage")({...o,...t?{account:t}:{}})}class L extends O{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class vt extends O{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function Ae(i,e){var u;const{addEthereumChainParameter:t,chainId:n}=e,o=i.state.connections.get(((u=e.connector)==null?void 0:u.uid)??i.state.current);if(o){const c=o.connector;if(!c.switchChain)throw new vt({connector:c});return await c.switchChain({addEthereumChainParameter:t,chainId:n})}const s=i.chains.find(c=>c.id===n);if(!s)throw new z;return i.setState(c=>({...c,chainId:n})),s}async function At(i,e){const{chainId:t,timeout:n=0,...o}=e,s=i.getClient({chainId:t}),c=await U(s,st,"waitForTransactionReceipt")({...o,timeout:n});if(c.status==="reverted"){const d=U(s,ot,"getTransaction"),{from:a,...r}=await d({hash:c.transactionHash}),g=await U(s,Qe,"call")({...r,account:a,data:r.input,gasPrice:r.type!=="eip1559"?r.gasPrice:void 0,maxFeePerGas:r.type==="eip1559"?r.maxFeePerGas:void 0,maxPriorityFeePerGas:r.type==="eip1559"?r.maxPriorityFeePerGas:void 0}),f=g!=null&&g.data?Ge(`0x${g.data.substring(138)}`):"unknown reason";throw new Error(f)}return{...c,chainId:s.chain.id}}function Nt(i,e){const{onChange:t}=e;return i.subscribe(()=>se(i),t,{equalityFn(n,o){const{connector:s,...u}=n,{connector:c,...d}=o;return V(u,d)&&(s==null?void 0:s.id)===(c==null?void 0:c.id)&&(s==null?void 0:s.uid)===(c==null?void 0:c.uid)}})}function Et(i,e){const{onChange:t}=e;return i.subscribe(()=>M(i),t,{equalityFn:V})}function St(i,e){const{onChange:t}=e;return i._internal.connectors.subscribe((n,o)=>{t(Object.values(n),o)})}function _t(i,e){const{syncConnectedChain:t=i._internal.syncConnectedChain,...n}=e;let o;const s=d=>{o&&o();const a=i.getClient({chainId:d});return o=U(a,rt,"watchPendingTransactions")(n),o},u=s(e.chainId);let c;return t&&!e.chainId&&(c=i.subscribe(({chainId:d})=>d,async d=>s(d))),()=>{u==null||u(),c==null||c()}}async function Tt(i,e){const{account:t,chainId:n,connector:o,...s}=e;let u;typeof t=="object"&&(t==null?void 0:t.type)==="local"?u=i.getClient({chainId:n}):u=await G(i,{account:t??void 0,assertChainId:!1,chainId:n,connector:o});const c=(()=>{var r;return!n||((r=u.chain)==null?void 0:r.id)===n?u.chain:{id:n}})();return await U(u,dt,"writeContract")({...s,...t?{account:t}:{},assertChainId:!!n,chain:c})}function dn(i){return i}ae.type="injected";function ae(i={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:t}=i;function n(){const d=i.target;if(typeof d=="function"){const a=d();if(a)return a}return typeof d=="object"?d:typeof d=="string"?{...Pt[d]??{id:d,name:`${d[0].toUpperCase()}${d.slice(1)}`,provider:`is${d[0].toUpperCase()}${d.slice(1)}`}}:{id:"injected",name:"Injected",provider(a){return a==null?void 0:a.ethereum}}}let o,s,u,c;return d=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},type:ae.type,async setup(){const a=await this.getProvider();a!=null&&a.on&&i.target&&(u||(u=this.onConnect.bind(this),a.on("connect",u)),o||(o=this.onAccountsChanged.bind(this),a.on("accountsChanged",o)))},async connect({chainId:a,isReconnecting:r,withCapabilities:l}={}){var p,m,I,v,y,E;const g=await this.getProvider();if(!g)throw new L;let f=[];if(r)f=await this.getAccounts().catch(()=>[]);else if(e)try{f=(v=(I=(m=(p=(await g.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:p.caveats)==null?void 0:m[0])==null?void 0:I.value)==null?void 0:v.map(h=>q(h)),f.length>0&&(f=await this.getAccounts())}catch(N){const h=N;if(h.code===_.code)throw new _(h);if(h.code===de.code)throw h}try{!(f!=null&&f.length)&&!r&&(f=(await g.request({method:"eth_requestAccounts"})).map(C=>q(C))),u&&(g.removeListener("connect",u),u=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c));let N=await this.getChainId();if(a&&N!==a){const h=await this.switchChain({chainId:a}).catch(C=>{if(C.code===_.code)throw C;return{id:N}});N=(h==null?void 0:h.id)??N}return e&&await((y=d.storage)==null?void 0:y.removeItem(`${this.id}.disconnected`)),i.target||await((E=d.storage)==null?void 0:E.setItem("injected.connected",!0)),{accounts:l?f.map(h=>({address:h,capabilities:{}})):f,chainId:N}}catch(N){const h=N;throw h.code===_.code?new _(h):h.code===de.code?new de(h):h}},async disconnect(){var r,l;const a=await this.getProvider();if(!a)throw new L;s&&(a.removeListener("chainChanged",s),s=void 0),c&&(a.removeListener("disconnect",c),c=void 0),u||(u=this.onConnect.bind(this),a.on("connect",u));try{await We(()=>a.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await((r=d.storage)==null?void 0:r.setItem(`${this.id}.disconnected`,!0)),i.target||await((l=d.storage)==null?void 0:l.removeItem("injected.connected"))},async getAccounts(){const a=await this.getProvider();if(!a)throw new L;return(await a.request({method:"eth_accounts"})).map(l=>q(l))},async getChainId(){const a=await this.getProvider();if(!a)throw new L;const r=await a.request({method:"eth_chainId"});return Number(r)},async getProvider(){if(typeof window>"u")return;let a;const r=n();return typeof r.provider=="function"?a=r.provider(window):typeof r.provider=="string"?a=oe(window,r.provider):a=r.provider,a&&!a.removeListener&&("off"in a&&typeof a.off=="function"?a.removeListener=a.off:a.removeListener=()=>{}),a},async isAuthorized(){var a,r;try{if(e&&await((a=d.storage)==null?void 0:a.getItem(`${this.id}.disconnected`))||!i.target&&!await((r=d.storage)==null?void 0:r.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(t!==void 0&&t!==!1){const p=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",p),!!await this.getProvider()),m=typeof t=="number"?t:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(v=>window.addEventListener("ethereum#initialized",()=>v(p()),{once:!0}))]:[],new Promise(v=>setTimeout(()=>v(p()),m))]))return!0}throw new L}return!!(await Me(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:r}){var p,m,I,v;const l=await this.getProvider();if(!l)throw new L;const g=d.chains.find(y=>y.id===r);if(!g)throw new B(new z);const f=new Promise(y=>{const E=(N=>{"chainId"in N&&N.chainId===r&&(d.emitter.off("change",E),y())});d.emitter.on("change",E)});try{return await Promise.all([l.request({method:"wallet_switchEthereumChain",params:[{chainId:re(r)}]}).then(async()=>{await this.getChainId()===r&&d.emitter.emit("change",{chainId:r})}),f]),g}catch(y){const E=y;if(E.code===4902||((m=(p=E==null?void 0:E.data)==null?void 0:p.originalError)==null?void 0:m.code)===4902)try{const{default:N,...h}=g.blockExplorers??{};let C;a!=null&&a.blockExplorerUrls?C=a.blockExplorerUrls:N&&(C=[N.url,...Object.values(h).map(b=>b.url)]);let w;(I=a==null?void 0:a.rpcUrls)!=null&&I.length?w=a.rpcUrls:w=[((v=g.rpcUrls.default)==null?void 0:v.http[0])??""];const A={blockExplorerUrls:C,chainId:re(r),chainName:(a==null?void 0:a.chainName)??g.name,iconUrls:a==null?void 0:a.iconUrls,nativeCurrency:(a==null?void 0:a.nativeCurrency)??g.nativeCurrency,rpcUrls:w};return await Promise.all([l.request({method:"wallet_addEthereumChain",params:[A]}).then(async()=>{if(await this.getChainId()===r)d.emitter.emit("change",{chainId:r});else throw new _(new Error("User rejected switch after adding network."))}),f]),g}catch(N){throw new _(N)}throw E.code===_.code?new _(E):new B(E)}},async onAccountsChanged(a){var r;if(a.length===0)this.onDisconnect();else if(d.emitter.listenerCount("connect")){const l=(await this.getChainId()).toString();this.onConnect({chainId:l}),e&&await((r=d.storage)==null?void 0:r.removeItem(`${this.id}.disconnected`))}else d.emitter.emit("change",{accounts:a.map(l=>q(l))})},onChainChanged(a){const r=Number(a);d.emitter.emit("change",{chainId:r})},async onConnect(a){const r=await this.getAccounts();if(r.length===0)return;const l=Number(a.chainId);d.emitter.emit("connect",{accounts:r,chainId:l});const g=await this.getProvider();g&&(u&&(g.removeListener("connect",u),u=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c)))},async onDisconnect(a){const r=await this.getProvider();a&&a.code===1013&&r&&(await this.getAccounts()).length||(d.emitter.emit("disconnect"),r&&(s&&(r.removeListener("chainChanged",s),s=void 0),c&&(r.removeListener("disconnect",c),c=void 0),u||(u=this.onConnect.bind(this),r.on("connect",u))))}})}const Pt={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(i){return i!=null&&i.coinbaseWalletExtension?i.coinbaseWalletExtension:oe(i,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(i){return oe(i,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(i){var e,t;return(e=i==null?void 0:i.phantom)!=null&&e.ethereum?(t=i.phantom)==null?void 0:t.ethereum:oe(i,"isPhantom")}}};function oe(i,e){function t(o){return typeof e=="function"?e(o):typeof e=="string"?o[e]:!0}const n=i.ethereum;if(n!=null&&n.providers)return n.providers.find(o=>t(o));if(n&&t(n))return n}const kt=i=>(e,t,n)=>{const o=n.subscribe;return n.subscribe=(u,c,d)=>{let a=u;if(c){const r=(d==null?void 0:d.equalityFn)||Object.is;let l=u(n.getState());a=g=>{const f=u(g);if(!r(l,f)){const p=l;c(l=f,p)}},d!=null&&d.fireImmediately&&c(l,l)}return o(a)},i(e,t,n)},Rt=kt;function Ot(i,e){let t;try{t=i()}catch{return}return{getItem:o=>{var s;const u=d=>d===null?null:JSON.parse(d,void 0),c=(s=t.getItem(o))!=null?s:null;return c instanceof Promise?c.then(u):u(c)},setItem:(o,s)=>t.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>t.removeItem(o)}}const me=i=>e=>{try{const t=i(e);return t instanceof Promise?t:{then(n){return me(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return me(n)(t)}}}},Ut=(i,e)=>(t,n,o)=>{let s={storage:Ot(()=>localStorage),partialize:m=>m,version:0,merge:(m,I)=>({...I,...m}),...e},u=!1;const c=new Set,d=new Set;let a=s.storage;if(!a)return i((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...m)},n,o);const r=()=>{const m=s.partialize({...n()});return a.setItem(s.name,{state:m,version:s.version})},l=o.setState;o.setState=(m,I)=>{l(m,I),r()};const g=i((...m)=>{t(...m),r()},n,o);o.getInitialState=()=>g;let f;const p=()=>{var m,I;if(!a)return;u=!1,c.forEach(y=>{var E;return y((E=n())!=null?E:g)});const v=((I=s.onRehydrateStorage)==null?void 0:I.call(s,(m=n())!=null?m:g))||void 0;return me(a.getItem.bind(a))(s.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==s.version){if(s.migrate)return[!0,s.migrate(y.state,y.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var E;const[N,h]=y;if(f=s.merge(h,(E=n())!=null?E:g),t(f,!0),N)return r()}).then(()=>{v==null||v(f,void 0),f=n(),u=!0,d.forEach(y=>y(f))}).catch(y=>{v==null||v(void 0,y)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(a=m.storage)},clearStorage:()=>{a==null||a.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>u,onHydrate:m=>(c.add(m),()=>{c.delete(m)}),onFinishHydration:m=>(d.add(m),()=>{d.delete(m)})},s.skipHydration||p(),f||g},jt=Ut,Ne=i=>{let e;const t=new Set,n=(a,r)=>{const l=typeof a=="function"?a(e):a;if(!Object.is(l,e)){const g=e;e=r??(typeof l!="object"||l===null)?l:Object.assign({},e,l),t.forEach(f=>f(e,g))}},o=()=>e,c={setState:n,getState:o,getInitialState:()=>d,subscribe:a=>(t.add(a),()=>t.delete(a))},d=e=i(n,o,c);return c},fe=i=>i?Ne(i):Ne;class Mt{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new et})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){const n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function Wt(i){return new Mt(i)}function Lt(i,e){return JSON.parse(i,(t,n)=>{let o=n;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(e==null?void 0:e(t,o))??o})}function Ee(i,e){return i.slice(0,e).join(".")||"."}function Se(i,e){const{length:t}=i;for(let n=0;n<t;++n)if(i[n]===e)return n+1;return 0}function qt(i,e){const t=typeof i=="function",n=typeof e=="function",o=[],s=[];return function(c,d){if(typeof d=="object")if(o.length){const a=Se(o,this);a===0?o[o.length]=this:(o.splice(a),s.splice(a)),s[s.length]=c;const r=Se(o,d);if(r!==0)return n?e.call(this,c,d,Ee(s,r)):`[ref=${Ee(s,r)}]`}else o[0]=d,s[0]=c;return t?i.call(this,c,d):d}}function $t(i,e,t,n){return JSON.stringify(i,qt((o,s)=>{let u=s;return typeof u=="bigint"&&(u={__type:"bigint",value:s.toString()}),u instanceof Map&&(u={__type:"Map",value:Array.from(s.entries())}),(e==null?void 0:e(o,u))??u},n),t??void 0)}function Dt(i){const{deserialize:e=Lt,key:t="wagmi",serialize:n=$t,storage:o=Oe}=i;function s(u){return u instanceof Promise?u.then(c=>c).catch(()=>null):u}return{...o,key:t,async getItem(u,c){const d=o.getItem(`${t}.${u}`),a=await s(d);return a?e(a)??null:c??null},async setItem(u,c){const d=`${t}.${u}`;c===null?await s(o.removeItem(d)):await s(o.setItem(d,n(c)))},async removeItem(u){await s(o.removeItem(`${t}.${u}`))}}}const Oe={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function xt(){const i=typeof window<"u"&&window.localStorage?window.localStorage:Oe;return{getItem(e){return i.getItem(e)},removeItem(e){i.removeItem(e)},setItem(e,t){try{i.setItem(e,t)}catch{}}}}const Ce=256;let ee=Ce,te;function Ht(i=11){if(!te||ee+i>Ce*2){te="",ee=0;for(let e=0;e<Ce;e++)te+=(256+Math.random()*256|0).toString(16).substring(1)}return te.substring(ee,ee+++i)}function Ft(i){const{multiInjectedProviderDiscovery:e=!0,storage:t=Dt({storage:xt()}),syncConnectedChain:n=!0,ssr:o=!1,...s}=i,u=typeof window<"u"&&e?tt():void 0,c=fe(()=>s.chains),d=fe(()=>{const h=[],C=new Set;for(const w of s.connectors??[]){const A=a(w);if(h.push(A),!o&&A.rdns){const b=typeof A.rdns=="string"?[A.rdns]:A.rdns;for(const T of b)C.add(T)}}if(!o&&u){const w=u.getProviders();for(const A of w)C.has(A.info.rdns)||h.push(a(r(A)))}return h});function a(h){var b;const C=Wt(Ht());let w;const A={...h({emitter:C,chains:c.getState(),get providers(){if(!u||!w)return[];const T=typeof w=="string"?[w]:w,R=u.getProviders();return T.flatMap(K=>R.filter(P=>P.info.rdns===K))},storage:t,transports:s.transports}),emitter:C,uid:C.uid};return w=A.rdns,C.on("connect",E),(b=A.setup)==null||b.call(A),A}function r(h){const{info:C}=h,w=h.provider;return ae({target:{...C,id:C.rdns,provider:w}})}const l=new Map;function g(h={}){const C=h.chainId??I.getState().chainId,w=c.getState().find(b=>b.id===C);if(h.chainId&&!w)throw new z;{const b=l.get(I.getState().chainId);if(b&&!w)return b;if(!w)throw new z}{const b=l.get(C);if(b)return b}let A;if(s.client)A=s.client({chain:w});else{const b=w.id,T=c.getState().map(P=>P.id),R={},K=Object.entries(s);for(const[P,$]of K)if(!(P==="chains"||P==="client"||P==="connectors"||P==="transports"))if(typeof $=="object")if(b in $)R[P]=$[b];else{if(T.some(je=>je in $))continue;R[P]=$}else R[P]=$;A=Pe({...R,chain:w,batch:R.batch??{multicall:!0},transport:P=>s.transports[b]({...P,connectors:d})})}return l.set(C,A),A}function f(){return{chainId:c.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p;const m="0.0.0-canary-";ie.startsWith(m)?p=Number.parseInt(ie.replace(m,""),10):p=Number.parseInt(ie.split(".")[0]??"0",10);const I=fe(Rt(t?jt(f,{migrate(h,C){if(C===p)return h;const w=f(),A=v(h,w.chainId);return{...w,chainId:A}},name:"store",partialize(h){return{connections:{__type:"Map",value:Array.from(h.connections.entries()).map(([C,w])=>{const{id:A,name:b,type:T,uid:R}=w.connector;return[C,{...w,connector:{id:A,name:b,type:T,uid:R}}]})},chainId:h.chainId,current:h.current}},merge(h,C){typeof h=="object"&&h&&"status"in h&&delete h.status;const w=v(h,C.chainId);return{...C,...h,chainId:w}},skipHydration:o,storage:t,version:p}):f));I.setState(f());function v(h,C){return h&&typeof h=="object"&&"chainId"in h&&typeof h.chainId=="number"&&c.getState().some(w=>w.id===h.chainId)?h.chainId:C}n&&I.subscribe(({connections:h,current:C})=>{var w;return C?(w=h.get(C))==null?void 0:w.chainId:void 0},h=>{if(c.getState().some(w=>w.id===h))return I.setState(w=>({...w,chainId:h??w.chainId}))}),u==null||u.subscribe(h=>{const C=new Set,w=new Set;for(const b of d.getState())if(C.add(b.id),b.rdns){const T=typeof b.rdns=="string"?[b.rdns]:b.rdns;for(const R of T)w.add(R)}const A=[];for(const b of h){if(w.has(b.info.rdns))continue;const T=a(r(b));C.has(T.id)||A.push(T)}t&&!I.persist.hasHydrated()||d.setState(b=>[...b,...A],!0)});function y(h){I.setState(C=>{const w=C.connections.get(h.uid);return w?{...C,connections:new Map(C.connections).set(h.uid,{accounts:h.accounts??w.accounts,chainId:h.chainId??w.chainId,connector:w.connector})}:C})}function E(h){I.getState().status==="connecting"||I.getState().status==="reconnecting"||I.setState(C=>{const w=d.getState().find(A=>A.uid===h.uid);return w?(w.emitter.listenerCount("connect")&&w.emitter.off("connect",y),w.emitter.listenerCount("change")||w.emitter.on("change",y),w.emitter.listenerCount("disconnect")||w.emitter.on("disconnect",N),{...C,connections:new Map(C.connections).set(h.uid,{accounts:h.accounts,chainId:h.chainId,connector:w}),current:h.uid,status:"connected"}):C})}function N(h){I.setState(C=>{const w=C.connections.get(h.uid);if(w){const b=w.connector;b.emitter.listenerCount("change")&&w.connector.emitter.off("change",y),b.emitter.listenerCount("disconnect")&&w.connector.emitter.off("disconnect",N),b.emitter.listenerCount("connect")||w.connector.emitter.on("connect",E)}if(C.connections.delete(h.uid),C.connections.size===0)return{...C,connections:new Map,current:null,status:"disconnected"};const A=C.connections.values().next().value;return{...C,connections:new Map(C.connections),current:A.connector.uid}})}return{get chains(){return c.getState()},get connectors(){return d.getState()},storage:t,getClient:g,get state(){return I.getState()},setState(h){let C;typeof h=="function"?C=h(I.getState()):C=h;const w=f();typeof C!="object"&&(C=w),Object.keys(w).some(b=>!(b in C))&&(C=w),I.setState(C,!0)},subscribe(h,C,w){return I.subscribe(h,C,w?{...w,fireImmediately:w.emitImmediately}:void 0)},_internal:{mipd:u,async revalidate(){const h=I.getState(),C=h.connections;let w=h.current;for(const[,A]of C){const b=A.connector;b.isAuthorized&&await b.isAuthorized()||(C.delete(b.uid),w===b.uid&&(w=null))}I.setState(A=>({...A,connections:C,current:w}))},store:I,ssr:!!o,syncConnectedChain:n,transports:s.transports,chains:{setState(h){const C=typeof h=="function"?h(c.getState()):h;if(C.length!==0)return c.setState(C,!0)},subscribe(h){return c.subscribe(h)}},connectors:{providerDetailToConnector:r,setup:a,setState(h){return d.setState(typeof h=="function"?h(d.getState()):h,!0)},subscribe(h){return d.subscribe(h)}},events:{change:y,connect:E,disconnect:N}}}}function Ue(i){let e=[],t,n;function o(c){var r,l;const d=k.getCaipNetworks(S.CHAIN.EVM);let a=Number(ge.parseEvmChainId(c));if(!d.some(g=>String(g.id)===String(c))){const g=((r=k.getActiveCaipNetwork(S.CHAIN.EVM))==null?void 0:r.id)||((l=d[0])==null?void 0:l.id);g&&Number.isInteger(Number(g))&&(a=Number(g))}if(!a)throw new Error("ChainId not found in networks");return a}function s(){var c;return t||(t=ye.getInstance({projectId:i.options.projectId,chainId:(c=J())==null?void 0:c.caipNetworkId,enableLogger:i.options.enableAuthLogger,onTimeout:d=>{d==="iframe_load_failed"?D.open(W.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):d==="iframe_request_timeout"?D.open(W.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):d==="unverified_domain"&&D.open(W.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},abortController:W.EmbeddedWalletAbortController,getActiveCaipNetwork:d=>J(d),getCaipNetworks:d=>k.getCaipNetworks(d)})),t}async function u(c={}){var m;const d=s();let a=c.chainId;if(c.isReconnecting){const I=ge.parseEvmChainId(d.getLastUsedChainId()||""),v=(m=i.chains)==null?void 0:m[0].id;if(a=I||v,!a)throw new Error("ChainId not found in provider")}const r=Ie("eip155"),{address:l,chainId:g,accounts:f}=await qe.authConnectorAuthenticate({authConnector:d,chainId:a,preferredAccountType:r,socialUri:c.socialUri,chainNamespace:S.CHAIN.EVM});e=(f==null?void 0:f.map(I=>I.address))||[l];const p=o(g);return{accounts:e,account:l,chainId:p,chain:{id:p,unsupported:!1}}}return c=>({id:S.CONNECTOR_ID.AUTH,name:S.CONNECTOR_NAMES.AUTH,type:"AUTH",chain:S.CHAIN.EVM,async connect(d={}){if(n){const r=await n;return{accounts:d.withCapabilities?r.accounts.map(l=>({address:l,capabilities:{}})):r.accounts,chainId:r.chainId}}n||(n=new Promise(r=>{r(u(d))}));const a=await n;return n=void 0,{accounts:d.withCapabilities?a.accounts.map(r=>({address:r,capabilities:{}})):a.accounts,chainId:a.chainId}},async disconnect(){await(await this.getProvider()).disconnect()},getAccounts(){return e!=null&&e.length?(c.emitter.emit("change",{accounts:e}),Promise.resolve(e)):Promise.resolve([])},async getProvider(){var d;return this.provider||(this.provider=ye.getInstance({projectId:i.options.projectId,chainId:(d=J())==null?void 0:d.caipNetworkId,enableLogger:i.options.enableAuthLogger,abortController:W.EmbeddedWalletAbortController,onTimeout:a=>{a==="iframe_load_failed"?D.open(W.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):a==="iframe_request_timeout"?D.open(W.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):a==="unverified_domain"&&D.open(W.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:a=>J(a),getCaipNetworks:a=>k.getCaipNetworks(a)})),Promise.resolve(this.provider)},async getChainId(){const d=await this.getProvider(),{chainId:a}=await d.getChainId();return o(a)},async isAuthorized(){const a=k.state.activeChain===S.CHAIN.EVM;if(S.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(g=>Le.getConnectorId(g)===S.CONNECTOR_ID.AUTH)&&!a)return!1;const l=await this.getProvider();return Promise.resolve(l.getLoginEmailUsed())},async switchChain({chainId:d}){var a;try{const r=c.chains.find(p=>p.id===d);if(!r)throw new B(new Error("chain not found on connector."));const l=await this.getProvider(),g=Ie("eip155"),f=await l.connect({chainId:d,preferredAccountType:g});return e=((a=f==null?void 0:f.accounts)==null?void 0:a.map(p=>p.address))||[f.address],c.emitter.emit("change",{chainId:Number(d),accounts:e}),r}catch(r){throw r instanceof Error?new B(r):r}},onAccountsChanged(d){d.length===0?this.onDisconnect():c.emitter.emit("change",{accounts:d.map(q)})},onChainChanged(d){const a=Number(d);c.emitter.emit("change",{chainId:a})},async onDisconnect(d){await(await this.getProvider()).disconnect()}})}pe.type="walletConnect";function pe(i){const e=i.isNewChainsStale??!0;let t,n,o,s,u,c,d;return a=>({id:"walletConnect",name:"WalletConnect",type:pe.type,provider:i.universalProvider,async setup(){const r=await this.getProvider().catch(()=>null);r&&(s||(s=this.onConnect.bind(this),r.on("connect",s)),c||(c=this.onSessionDelete.bind(this),r.on("session_delete",c)))},async connect({...r}={}){var l,g,f;try{const p=k.getCaipNetworks(),m=await this.getProvider();if(!m)throw new L;u||(u=this.onDisplayUri,m.on("display_uri",u));const I=await this.isChainsStale();m.session&&I&&await m.disconnect();const v=x.state.universalProviderConfigOverride;if(!m.session||I){const A=$e.createNamespaces(p,v);await m.connect({optionalNamespaces:A,..."pairingTopic"in r?{pairingTopic:r.pairingTopic}:{}}),this.setRequestedChainsIds(p.map(b=>Number(b.id)))}const y=await this.getAccounts(),E=await this.getChainId(),N=(f=(g=(l=m.session)==null?void 0:l.namespaces)==null?void 0:g.eip155)==null?void 0:f.chains,h=N==null?void 0:N.some(A=>Number(A.split(":")[1])===E);let C=1;h?C=E:N!=null&&N[0]&&(C=Number(N[0].split(":")[1])),u&&(m.removeListener("display_uri",u),u=void 0),s&&(m.removeListener("connect",s),s=void 0),n||(n=this.onAccountsChanged.bind(this),m.on("accountsChanged",n)),o||(o=this.onChainChanged.bind(this),m.on("chainChanged",o)),d||(d=this.onDisconnect.bind(this),m.on("disconnect",d)),c||(c=this.onSessionDelete.bind(this),m.on("session_delete",c));const w=v==null?void 0:v.defaultChain;return m.setDefaultChain(w??`eip155:${C}`),{accounts:y,chainId:C}}catch(p){throw/(user rejected|connection request reset)/i.test(p==null?void 0:p.message)?new _(p):p}},async disconnect(){const r=await this.getProvider();try{await(r==null?void 0:r.disconnect())}catch(l){if(!/No matching key/i.test(l.message))throw l}finally{o&&(r==null||r.removeListener("chainChanged",o),o=void 0),d&&(r==null||r.removeListener("disconnect",d),d=void 0),s||(s=this.onConnect.bind(this),r==null||r.on("connect",s)),n&&(r==null||r.removeListener("accountsChanged",n),n=void 0),c&&(r==null||r.removeListener("session_delete",c),c=void 0),this.setRequestedChainsIds([])}},async getAccounts(){var m,I,v;const r=await this.getProvider();if(!((m=r==null?void 0:r.session)!=null&&m.namespaces))return[];const l=(v=(I=r==null?void 0:r.session)==null?void 0:I.namespaces[S.CHAIN.EVM])==null?void 0:v.accounts,g=(l==null?void 0:l.map(y=>y.split(":")[2]))??[],f=new Set;return g.filter(y=>{const E=y==null?void 0:y.toLowerCase();return f.has(E)?!1:(f.add(E),!0)})},async getProvider({chainId:r}={}){var f,p;t||(t=i.universalProvider,t==null||t.events.setMaxListeners(Number.POSITIVE_INFINITY));const l=H.getActiveNamespace(),g=(f=k.getActiveCaipNetwork())==null?void 0:f.id;if(r&&g!==r&&l){const m=H.getStoredActiveCaipNetworkId(),I=l?k.getCaipNetworks(l):[],v=I==null?void 0:I.find(y=>y.id===m);v&&v.chainNamespace===S.CHAIN.EVM&&await((p=this.switchChain)==null?void 0:p.call(this,{chainId:Number(v.id)}))}return t},async getChainId(){var p,m,I,v;const r=(p=k.getActiveCaipNetwork(S.CHAIN.EVM))==null?void 0:p.id;if(r)return r;const g=(v=(I=(m=(await this.getProvider()).session)==null?void 0:m.namespaces[S.CHAIN.EVM])==null?void 0:I.chains)==null?void 0:v[0],f=k.getCaipNetworks().find(y=>y.id===g);return f==null?void 0:f.id},async isAuthorized(){try{const[r,l]=await Promise.all([this.getAccounts(),this.getProvider()]);return r.length?await this.isChainsStale()&&l.session?(await l.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:r,chainId:l}){var p,m,I,v;const g=await this.getProvider();if(!g)throw new L;const f=k.getCaipNetworks().find(y=>y.id===l);if(!f)throw new B(new z);try{await g.request({method:"wallet_switchEthereumChain",params:[{chainId:re(l)}]}),f!=null&&f.caipNetworkId&&g.setDefaultChain(f==null?void 0:f.caipNetworkId),a.emitter.emit("change",{chainId:Number(l)});const y=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...y,l]),{...f,id:f.id}}catch(y){const E=y;if(/(?:user rejected)/iu.test(E.message))throw new _(E);try{let N;r!=null&&r.blockExplorerUrls?N=r.blockExplorerUrls:N=(p=f.blockExplorers)!=null&&p.default.url?[(m=f.blockExplorers)==null?void 0:m.default.url]:[];const h=((v=(I=f.rpcUrls)==null?void 0:I.chainDefault)==null?void 0:v.http)||[],C={blockExplorerUrls:N,chainId:re(l),chainName:f.name,iconUrls:r==null?void 0:r.iconUrls,nativeCurrency:f.nativeCurrency,rpcUrls:h};await g.request({method:"wallet_addEthereumChain",params:[C]});const w=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...w,l]),{...f,id:f.id}}catch(N){throw new _(N)}}},onAccountsChanged(r){r.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:r.map(l=>q(l))})},onChainChanged(r){const l=Number(r);a.emitter.emit("change",{chainId:l})},onConnect(r){this.setRequestedChainsIds(k.getCaipNetworks().map(l=>Number(l.id)))},async onDisconnect(r){this.setRequestedChainsIds([]),a.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),o&&(l.removeListener("chainChanged",o),o=void 0),d&&(l.removeListener("disconnect",d),d=void 0),c&&(l.removeListener("session_delete",c),c=void 0),s||(s=this.onConnect.bind(this),l.on("connect",s))},onDisplayUri(r){a.emitter.emit("message",{type:"display_uri",data:r})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var g,f,p;if(!((g=t==null?void 0:t.session)!=null&&g.namespaces))return[];const r=(p=(f=t==null?void 0:t.session)==null?void 0:f.namespaces[S.CHAIN.EVM])==null?void 0:p.accounts;return(r==null?void 0:r.map(m=>Number.parseInt(m.split(":")[1]??"")))??[]},async getRequestedChainsIds(){var l;const r=await((l=a.storage)==null?void 0:l.getItem(this.requestedChainsStorageKey))??[];return[...new Set(r)]},async isChainsStale(){if(!e)return!1;const r=a.chains.map(f=>f.id),l=this.getNamespaceChainsIds();if(l.length&&!l.some(f=>r.includes(f)))return!1;const g=await this.getRequestedChainsIds();return!r.every(f=>g.includes(Number(f)))},async setRequestedChainsIds(r){var l;await((l=a.storage)==null?void 0:l.setItem(this.requestedChainsStorageKey,r))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}const F=xe({pendingTransactions:0}),_e={state:F,subscribeKey(i,e){return De(F,i,e)},increase(i){F[i]+=1},decrease(i){F[i]-=1},reset(i){F[i]=0}};async function Bt(i){if(ne.isSafeApp()){const{safe:e}=await we(async()=>{const{safe:t}=await import("./index-Ce4Edp7-.js");return{safe:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));if(e&&!i.some(t=>t.type==="safe"))return e()}return null}async function zt(i){try{const{baseAccount:e}=await we(async()=>{const{baseAccount:t}=await import("./index-Ce4Edp7-.js");return{baseAccount:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));if(e&&!i.some(t=>t.id==="baseAccount"))return e()}catch(e){console.error("Failed to import Base Account SDK:",e)}return null}async function Vt(i){try{const{coinbaseWallet:e}=await we(async()=>{const{coinbaseWallet:t}=await import("./index-Ce4Edp7-.js");return{coinbaseWallet:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));if(e&&!i.some(t=>t.id==="coinbaseWallet"))return e()}catch(e){console.error("Failed to import Coinbase Wallet SDK:",e)}return null}const Gt={enable:!1,pollingInterval:3e4};class Kt extends He{constructor(e){const t=X.extendCaipNetworks(e.networks,{projectId:e.projectId,customNetworkImageUrls:{},customRpcUrls:e.customRpcUrls});super(),this.balancePromises={},this.namespace=S.CHAIN.EVM,this.adapterType=S.ADAPTER_TYPES.WAGMI,this.projectId=e.projectId,this.pendingTransactionsFilter={...Gt,...e.pendingTransactionsFilter??{}},this.createConfig({...e,networks:t}),this.checkChainId()}construct(e){this.checkChainId(),this.setupWatchers()}async getAccounts(e){const t=this.getWagmiConnector(e.id);if(!t)return{accounts:[]};if(t.id===S.CONNECTOR_ID.AUTH){const u=await t.getProvider();if(!(u!=null&&u.user))return{accounts:[]};const{address:c,accounts:d,chainId:a}=u.user;return Promise.resolve({accounts:(d||[{address:c,type:"eoa"}]).map(r=>ne.createAccount({caipAddress:`eip155:${a}:${r.address}`,type:r.type}))})}const{addresses:n,address:o,chainId:s}=se(this.wagmiConfig);return Promise.resolve({accounts:s?[...new Set(n||[o])].map(u=>ne.createAccount({caipAddress:`eip155:${s}:${u||""}`,type:"eoa"})):[]})}checkChainId(){const{chainId:e}=se(this.wagmiConfig);e&&this.emit("switchNetwork",{chainId:e})}getWagmiConnector(e){return this.wagmiConfig.connectors.find(t=>t.id===e)}createConfig(e){this.wagmiChains=e.networks.filter(o=>o.chainNamespace===S.CHAIN.EVM);const t={},n=[...e.connectors??[]];this.wagmiChains.forEach(o=>{var c,d;const s=(c=e.transports)==null?void 0:c[o.id],u=X.getCaipNetworkId(o);s?t[o.id]=X.extendWagmiTransports(o,e.projectId,s):t[o.id]=X.getViemTransport(o,e.projectId,(d=e.customRpcUrls)==null?void 0:d[u])}),this.wagmiConfig=Ft({...e,chains:this.wagmiChains,connectors:n,transports:t})}setupWatchPendingTransactions(){if(!this.pendingTransactionsFilter.enable||this.unwatchPendingTransactions)return;this.unwatchPendingTransactions=_t(this.wagmiConfig,{pollingInterval:this.pendingTransactionsFilter.pollingInterval,onError:()=>{},onTransactions:()=>{this.emit("pendingTransactions"),_e.increase("pendingTransactions")}});const e=_e.subscribeKey("pendingTransactions",t=>{var n;t>=S.LIMITS.PENDING_TRANSACTIONS&&((n=this.unwatchPendingTransactions)==null||n.call(this),e())})}setupWatchers(){Et(this.wagmiConfig,{onChange:e=>{this.clearConnections(),this.addConnection(...e.map(t=>{const n=this.getCaipNetworks().find(s=>s.id===t.chainId),o=t.connector.id===S.CONNECTOR_ID.AUTH;return{accounts:t.accounts.map(s=>({address:this.toChecksummedAddress(s)})),caipNetwork:n,connectorId:t.connector.id,auth:o?{name:H.getConnectedSocialProvider(),username:H.getConnectedSocialUsername()}:void 0}}))}}),Nt(this.wagmiConfig,{onChange:(e,t)=>{var n;if(e.status==="disconnected"&&t.address&&this.emit("disconnect"),e!=null&&e.chainId&&(e==null?void 0:e.chainId)!==(t==null?void 0:t.chainId)&&this.emit("switchNetwork",{chainId:e.chainId}),e.status==="connected"){const o=e.address!==(t==null?void 0:t.address),s=e.connector.id!==((n=t.connector)==null?void 0:n.id),u=t.status!=="connected";(o||s||u)&&(this.setupWatchPendingTransactions(),this.handleAccountChanged({address:e.address,chainId:e.chainId,connector:e.connector}))}}})}async addThirdPartyConnectors(){const e=[],{enableCoinbase:t,enableBaseAccount:n}=x.state||{};if(n!==!1){const s=await zt(this.wagmiConfig.connectors);s&&e.push(s)}if(t!==!1){const s=await Vt(this.wagmiConfig.connectors);s&&e.push(s)}const o=await Bt(this.wagmiConfig.connectors);o&&e.push(o),await Promise.all(e.map(s=>{const u=this.configureInternalConnector(s);return this.addWagmiConnector(u)}))}addWagmiConnectors(){const e=[];x.state.enableInjected!==!1&&e.push(ae({shimDisconnect:!0}));const{features:t,remoteFeatures:n,projectId:o,enableAuthLogger:s}=x.state,u=(n==null?void 0:n.email)??(t==null?void 0:t.email)??!0,c=(n==null?void 0:n.socials)??(t==null?void 0:t.socials),d=Array.isArray(c)&&(c==null?void 0:c.length)>0;(u||d)&&e.push(Ue({chains:this.wagmiChains,options:{projectId:o,enableAuthLogger:s}})),e.forEach(a=>{this.configureInternalConnector(a)})}configureInternalConnector(e){const t=this.wagmiConfig._internal.connectors.setup(e);return this.wagmiConfig._internal.connectors.setState(n=>[...n,t]),t}async handleAccountChanged({address:e,chainId:t,connector:n}){if(!this.namespace)throw new Error("WagmiAdapter:handleAccountChanged - namespace is required");const o=await n.getProvider().catch(()=>{});this.emit("accountChanged",{address:this.toChecksummedAddress(e),chainId:t,connector:{id:n.id,name:j.ConnectorNamesMap[n.id]??n.name,imageId:j.ConnectorImageIds[n.id],type:j.ConnectorTypesMap[n.type]??"EXTERNAL",info:n.id===S.CONNECTOR_ID.INJECTED?void 0:{rdns:n.id},provider:o,chain:this.namespace,chains:[]}})}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async signMessage(e){try{return{signature:await bt(this.wagmiConfig,{message:e.message,account:e.address})}}catch{throw new Error("WagmiAdapter:signMessage - Sign message failed")}}async sendTransaction(e){var c;const{chainId:t,address:n}=se(this.wagmiConfig),o=(c=this.wagmiChains)==null?void 0:c.find(d=>d.id===t),s={account:n,to:e.to,value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,data:e.data,chain:o,type:"legacy",parameters:["nonce"]};await It(this.wagmiConfig,s);const u=await yt(this.wagmiConfig,s);return await At(this.wagmiConfig,{hash:u,timeout:25e3}),{hash:u}}async writeContract(e){var c;const{caipNetwork:t,...n}=e,o=Number(ge.caipNetworkIdToNumber(t.caipNetworkId)),s=(c=this.wagmiChains)==null?void 0:c.find(d=>d.id===o);return{hash:await Tt(this.wagmiConfig,{chain:s,address:n.tokenAddress,account:n.fromAddress,abi:n.abi,functionName:n.method,args:n.args,__mode:"prepared"})}}async estimateGas(e){try{return{gas:await wt(this.wagmiConfig,{account:e.address,to:e.to,data:e.data,type:"legacy"})}}catch{throw new Error("WagmiAdapter:estimateGas - error estimating gas")}}parseUnits(e){return ct(e.value,e.decimals)}formatUnits(e){return Ke(e.value,e.decimals)}async addWagmiConnector(e){if(!this.namespace)throw new Error("WagmiAdapter:addWagmiConnector - namespace is required");const{enableEIP6963:t,enableInjected:n}=x.state||{},o=e.type===S.CONNECTOR_ID.INJECTED,s=e.id===S.CONNECTOR_ID.INJECTED,u=o&&!s;if(s&&n===!1||u&&t===!1||e.id===S.CONNECTOR_ID.AUTH||e.id===S.CONNECTOR_ID.WALLET_CONNECT)return;let c;e.id!==S.CONNECTOR_ID.BASE_ACCOUNT&&(c=await e.getProvider().catch(()=>{}));const d=Fe.state.connectorImages;this.addConnector({id:e.id,explorerId:j.ConnectorExplorerIds[e.id]??j.ConnectorExplorerIds[e.name],imageUrl:(d==null?void 0:d[e.id])??e.icon,name:j.ConnectorNamesMap[e.id]??e.name,imageId:j.ConnectorImageIds[e.id],type:j.ConnectorTypesMap[e.type]??"EXTERNAL",info:e.id===S.CONNECTOR_ID.INJECTED?void 0:{rdns:e.id},provider:c,chain:this.namespace,chains:[]})}async syncConnectors(){St(this.wagmiConfig,{onChange:e=>{e.forEach(t=>this.addWagmiConnector(t))}}),this.addWagmiConnectors(),await Promise.all(this.wagmiConfig.connectors.map(e=>this.addWagmiConnector(e))),await this.addThirdPartyConnectors()}async syncConnections(){const e=this.connectors.filter(t=>{const{hasDisconnected:n,hasConnected:o}=Y.getConnectorStorageInfo(t.id,this.namespace);return!n&&o}).map(t=>this.getWagmiConnector(t.id)).filter(Boolean);await he(this.wagmiConfig,{connectors:e})}async syncConnection(e){var a,r;const{id:t,chainId:n}=e,s=M(this.wagmiConfig).find(l=>l.connector.id===t),u=this.getWagmiConnector(t),c=await(u==null?void 0:u.getProvider());if(ne.isSafeApp()&&t===S.CONNECTOR_ID.SAFE&&!(s!=null&&s.accounts.length)){const l=this.getWagmiConnector("safe");if(l){const g=await ue(this.wagmiConfig,{connector:l,chainId:Number(n)}),f=await l.getProvider();return{chainId:Number(n),address:this.toChecksummedAddress(g.accounts[0]),provider:f,type:(a=s==null?void 0:s.connector.type)==null?void 0:a.toUpperCase(),id:s==null?void 0:s.connector.id}}}return{chainId:Number(s==null?void 0:s.chainId),address:this.toChecksummedAddress(s==null?void 0:s.accounts[0]),provider:c,type:(r=s==null?void 0:s.connector.type)==null?void 0:r.toUpperCase(),id:s==null?void 0:s.connector.id}}async connectWalletConnect(e){try{const t=this.getWalletConnectConnector();await t.authenticate();const n=this.getWagmiConnector("walletConnect");if(!n)throw new Error("UniversalAdapter:connectWalletConnect - connector not found");const o=await ue(this.wagmiConfig,{connector:n,chainId:e?Number(e):void 0});return o.chainId!==Number(e)&&await Ae(this.wagmiConfig,{chainId:o.chainId}),{clientId:await t.provider.client.core.crypto.getClientId()}}catch(t){throw t instanceof _?new Q(t):be.isUserRejectedRequestError(t)?new Q(t):t}}async connect(e){var t,n,o,s,u;try{const{id:c,address:d,provider:a,type:r,info:l,chainId:g,socialUri:f}=e,p=this.getWagmiConnector(c);if(!p)throw new Error("connectionControllerClient:connectExternal - connector is undefined");a&&l&&p.id===S.CONNECTOR_ID.EIP6963&&((t=p.setEip6963Wallet)==null||t.call(p,{provider:a,info:l}));const m=(o=(n=this.wagmiConfig.state)==null?void 0:n.connections)==null?void 0:o.get(p.uid);if(m){await((s=this.wagmiConfig.storage)==null?void 0:s.setItem("recentConnectorId",p.id));const y=[...m.accounts].sort((E,N)=>Y.isLowerCaseMatch(E,d)?-1:Y.isLowerCaseMatch(N,d)?1:0);return(u=this.wagmiConfig)==null||u.setState(E=>({...E,connections:new Map(E.connections).set(p.uid,{accounts:y,chainId:m.chainId,connector:m.connector}),current:p.uid,status:"connected"})),{address:this.toChecksummedAddress(y[0]),chainId:m.chainId,provider:a,type:r,id:c}}const I=await ue(this.wagmiConfig,{connector:p,chainId:g?Number(g):void 0,socialUri:f}),v=a??await p.getProvider();return{address:this.toChecksummedAddress(I.accounts[0]),chainId:I.chainId,provider:v,type:r,id:c}}catch(c){throw c instanceof _?new Q(c):be.isUserRejectedRequestError(c)?new Q(c):c}}get connections(){return Array.from(this.wagmiConfig.state.connections.values()).map(e=>({accounts:e.accounts.map(t=>({address:this.toChecksummedAddress(t)})),connectorId:e.connector.id}))}async reconnect(e){const{id:t}=e,n=this.getWagmiConnector(t);if(!n)throw new Error("connectionControllerClient:connectExternal - connector is undefined");await he(this.wagmiConfig,{connectors:[n]})}async getBalance(e){const t=e.address,n=this.getCaipNetworks().find(o=>o.id===e.chainId);if(!t)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(n&&this.wagmiConfig){const o=`${n.caipNetworkId}:${e.address}`,s=this.balancePromises[o];if(s)return s;const u=H.getNativeBalanceCacheForCaipAddress(o);return u?{balance:u.balance,symbol:u.symbol}:(this.balancePromises[o]=new Promise(async c=>{var d,a;try{const r=Number(e.chainId),l=await pt(this.wagmiConfig,{address:e.address,chainId:r,token:(a=(d=e.tokens)==null?void 0:d[n.caipNetworkId])==null?void 0:a.address});H.updateNativeBalanceCache({caipAddress:o,balance:l.formatted,symbol:l.symbol,timestamp:Date.now()}),c({balance:l.formatted,symbol:l.symbol})}catch(r){console.warn("Appkit:WagmiAdapter:getBalance - Error getting balance",r),c({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[o]}),this.balancePromises[o]||{balance:"0.00",symbol:"ETH"})}return{balance:"",symbol:""}}getWalletConnectProvider(){var e;return(e=this.getWagmiConnector("walletConnect"))==null?void 0:e.provider}async disconnect(e){if(e.id){const t=this.getWagmiConnector(e.id),o=M(this.wagmiConfig).find(s=>Y.isLowerCaseMatch(s.connector.id,e.id));return await ve(this.wagmiConfig,{connector:t}),x.state.enableReconnect===!1&&this.deleteConnection(e.id),o?{connections:[{accounts:o.accounts.map(s=>({address:this.toChecksummedAddress(s)})),connectorId:o.connector.id}]}:{connections:[]}}return this.disconnectAll()}async disconnectAll(){const e=M(this.wagmiConfig),t=await Promise.allSettled(e.map(async n=>{const o=this.getWagmiConnector(n.connector.id);return o&&await ve(this.wagmiConfig,{connector:o}),n}));return this.wagmiConfig.state.connections.clear(),{connections:t.filter(n=>n.status==="fulfilled").map(({value:n})=>({accounts:n.accounts.map(o=>({address:this.toChecksummedAddress(o)})),connectorId:n.connector.id}))}}async switchNetwork(e){var f,p,m,I,v;const{caipNetwork:t}=e,n=this.wagmiConfig.chains.find(y=>y.id.toString()===t.id.toString());if(!n)throw new Error("connectionControllerClient:switchNetwork - wagmiChain is undefined");const{name:o,nativeCurrency:s,rpcUrls:u,blockExplorers:c,id:d}=n,a=((m=(p=(f=t.rpcUrls)==null?void 0:f.chainDefault)==null?void 0:p.http)==null?void 0:m[0])??u.default.http[0]??"",r=(c==null?void 0:c.default.url)??((v=(I=t.blockExplorers)==null?void 0:I.default)==null?void 0:v.url)??"",l=s??t.nativeCurrency,g=o??t.name;await Ae(this.wagmiConfig,{chainId:d,addEthereumChainParameter:{chainName:g,nativeCurrency:l,rpcUrls:[a],blockExplorerUrls:[r]}}),await super.switchNetwork(e)}async getCapabilities(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:getCapabilities - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:getCapabilities - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:getCapabilities - provider is undefined");return await s.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:grantPermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:grantPermissions - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return s.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:revokePermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:revokePermissions - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:revokePermissions - provider is undefined");return s.request({method:"wallet_revokePermissions",params:e})}async walletGetAssets(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:walletGetAssets - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:walletGetAssets - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:walletGetAssets - provider is undefined");return s.request({method:"wallet_getAssets",params:[e]})}setAuthProvider(e){if(!this.namespace)throw new Error("WagmiAdapter:setAuthProvider - namespace is required");this.addConnector({id:S.CONNECTOR_ID.AUTH,type:"AUTH",name:S.CONNECTOR_NAMES.AUTH,provider:e,imageId:j.ConnectorImageIds[S.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}async setUniversalProvider(e){e.on("connect",()=>{const n=M(this.wagmiConfig),o=this.getWagmiConnector("walletConnect");if(o&&!n.find(s=>s.connector.id===o.id)){if(k.state.activeChain==="eip155")return;he(this.wagmiConfig,{connectors:[o]})}});const t=pe({universalProvider:e});return this.configureInternalConnector(t),this.addConnector(new Be({provider:e,caipNetworks:this.getCaipNetworks(),namespace:"eip155"})),Promise.resolve()}toChecksummedAddress(e){if(!e)return e;try{return Ze(e.toLowerCase())}catch{return e}}}const un=Object.freeze(Object.defineProperty({__proto__:null,WagmiAdapter:Kt,authConnector:Ue},Symbol.toStringTag,{value:"Module"}));export{z as C,L as P,ft as a,un as b,dn as c,ae as i};
4
- //# sourceMappingURL=index-CFSE-4g9.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-JHFG4lY9.js","_assets/index-B58wHtBu.js","_assets/react-DDKWENsC.js","_assets/dcl-schemas-BgiaAr0Q.js","_assets/sentry-DAZHYHIo.js","_assets/ethers-DtlHlsbT.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sendRawTransaction-Fhai_2kM.js","_assets/NetworkUtil-ZXSOAWFf.js","_assets/W3MFrameProviderSingleton-DZpGQQon.js","_assets/index-qMSCNYPa.js","_assets/index-Ix4tk_IH.js","_assets/events-BSj7lvll.js","_assets/browser-ponyfill-DglQxapv.js","_assets/custom-D9D65mcY.js","_assets/index-BzHItohU.js","_assets/index-BVxBXQ8s.js","_assets/store-80QKZ2rN.js","_assets/writeContract-DM0AL5N_.js"])))=>i.map(i=>d[i]);
2
+ import{w as Me,a as We,l as Ie,C as k,o as Le,a5 as ye,F as W,a6 as J,A as D,Z as qe,t as H,O as x,a7 as $e,e as De,p as xe,b as ne,a8 as He,a9 as X,aa as j,L as Fe,a3 as Y,ab as Q,X as be,ac as Be}from"./W3MFrameProviderSingleton-DZpGQQon.js";import{al as ze,ao as Ve,ab as Ge,x as B,af as re,Y as _,r as de,au as S,az as ge,a4 as Ke}from"./NetworkUtil-ZXSOAWFf.js";import{b7 as Je,bh as Te,aI as q,cv as Xe,bc as Ye,bi as Qe,ah as Ze}from"./sendRawTransaction-Fhai_2kM.js";import"./dcl-schemas-BgiaAr0Q.js";import"./index-qMSCNYPa.js";import"./index-Ix4tk_IH.js";import"./browser-ponyfill-DglQxapv.js";import{_ as we}from"./index-B58wHtBu.js";import{E as et}from"./index-BzHItohU.js";import{c as tt}from"./store-80QKZ2rN.js";import{c as Pe,a as nt,g as it,b as st,d as ot,e as rt,p as ct}from"./custom-D9D65mcY.js";import{s as at,w as dt}from"./writeContract-DM0AL5N_.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new i.Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="67a612fd-c16b-4715-bdc9-2036e25a4747",i._sentryDebugIdIdentifier="sentry-dbid-67a612fd-c16b-4715-bdc9-2036e25a4747")}catch{}})();async function ut(i,{account:e=i.account,message:t}){if(!e)throw new Je({docsPath:"/docs/actions/wallet/signMessage"});const n=Te(e);if(n.signMessage)return n.signMessage({message:t});const o=typeof t=="string"?ze(t):t.raw instanceof Uint8Array?Ve(t.raw):t.raw;return i.request({method:"personal_sign",params:[o,n.address]},{retryCount:0})}function U(i,e,t){const n=i[e.name];if(typeof n=="function")return n;const o=i[t];return typeof o=="function"?o:s=>e(i,s)}const ie="3.5.5",lt=()=>`@wagmi/core@${ie}`;var ke=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},ce,Re;class O extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return lt()}constructor(e,t={}){var s;super(),ce.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=t.cause instanceof O?t.cause.details:(s=t.cause)!=null&&s.message?t.cause.message:t.details,o=t.cause instanceof O&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...o?[`Docs: ${this.docsBaseUrl}${o}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
3
+ `),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=o,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return ke(this,ce,"m",Re).call(this,this,e)}}ce=new WeakSet,Re=function i(e,t){return t!=null&&t(e)?e:e.cause?ke(this,ce,"m",i).call(this,e.cause,t):e};class z extends O{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class ht extends O{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class ft extends O{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class gt extends O{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class mt extends O{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class Ct extends O{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}async function ue(i,e){var n;let t;if(typeof e.connector=="function"?t=i._internal.connectors.setup(e.connector):t=e.connector,t.uid===i.state.current)throw new ht;try{i.setState(c=>({...c,status:"connecting"})),t.emitter.emit("message",{type:"connecting"});const{connector:o,...s}=e,u=await t.connect(s);return t.emitter.off("connect",i._internal.events.connect),t.emitter.on("change",i._internal.events.change),t.emitter.on("disconnect",i._internal.events.disconnect),await((n=i.storage)==null?void 0:n.setItem("recentConnectorId",t.id)),i.setState(c=>({...c,connections:new Map(c.connections).set(t.uid,{accounts:s.withCapabilities?u.accounts.map(d=>typeof d=="object"?d.address:d):u.accounts,chainId:u.chainId,connector:t}),current:t.uid,status:"connected"})),{accounts:s.withCapabilities?u.accounts.map(c=>typeof c=="object"?c:{address:c,capabilities:{}}):u.accounts,chainId:u.chainId}}catch(o){throw i.setState(s=>({...s,status:s.current?"connected":"disconnected"})),o}}async function G(i,e={}){const{assertChainId:t=!0}=e;let n;if(e.connector){const{connector:r}=e;if(i.state.status==="reconnecting"&&!r.getAccounts&&!r.getChainId)throw new Ct({connector:r});const[l,g]=await Promise.all([r.getAccounts().catch(f=>{if(e.account===null)return[];throw f}),r.getChainId()]);n={accounts:l,chainId:g,connector:r}}else n=i.state.connections.get(i.state.current);if(!n)throw new ft;const o=e.chainId??n.chainId,s=await n.connector.getChainId();if(t&&s!==o)throw new mt({connectionChainId:o,connectorChainId:s});const u=n.connector;if(u.getClient)return u.getClient({chainId:o});const c=Te(e.account??n.accounts[0]);if(c&&(c.address=q(c.address)),e.account&&!n.accounts.some(r=>r.toLowerCase()===c.address.toLowerCase()))throw new gt({address:c.address,connector:u});const d=i.chains.find(r=>r.id===o),a=await n.connector.getProvider({chainId:o});return Pe({account:c,chain:d,name:"Connector Client",transport:r=>nt(a)({...r,retryCount:0})})}async function ve(i,e={}){var o,s;let t;if(e.connector)t=e.connector;else{const{connections:u,current:c}=i.state,d=u.get(c);t=d==null?void 0:d.connector}const n=i.state.connections;t&&(await t.disconnect(),t.emitter.off("change",i._internal.events.change),t.emitter.off("disconnect",i._internal.events.disconnect),t.emitter.on("connect",i._internal.events.connect),n.delete(t.uid)),i.setState(u=>{if(n.size===0)return{...u,connections:new Map,current:null,status:"disconnected"};const c=n.values().next().value;return{...u,connections:new Map(n),current:c.connector.uid}});{const u=i.state.current;if(!u)return;const c=(o=i.state.connections.get(u))==null?void 0:o.connector;if(!c)return;await((s=i.storage)==null?void 0:s.setItem("recentConnectorId",c.id))}}async function wt(i,e){const{chainId:t,connector:n,...o}=e;let s;e.account?s=e.account:s=(await G(i,{account:e.account,assertChainId:!1,chainId:t,connector:n})).account;const u=i.getClient({chainId:t});return U(u,Xe,"estimateGas")({...o,account:s})}async function pt(i,e){const{address:t,blockNumber:n,blockTag:o,chainId:s}=e,u=i.getClient({chainId:s}),d=await U(u,it,"getBalance")(n?{address:t,blockNumber:n}:{address:t,blockTag:o}),a=i.chains.find(r=>r.id===s)??u.chain;return{decimals:a.nativeCurrency.decimals,symbol:a.nativeCurrency.symbol,value:d}}function V(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){if(i.constructor!==e.constructor)return!1;let t,n;if(Array.isArray(i)&&Array.isArray(e)){if(t=i.length,t!==e.length)return!1;for(n=t;n--!==0;)if(!V(i[n],e[n]))return!1;return!0}if(typeof i.valueOf=="function"&&i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(typeof i.toString=="function"&&i.toString!==Object.prototype.toString)return i.toString()===e.toString();const o=Object.keys(i);if(t=o.length,t!==Object.keys(e).length)return!1;for(n=t;n--!==0;)if(!Object.hasOwn(e,o[n]))return!1;for(n=t;n--!==0;){const s=o[n];if(s&&!V(i[s],e[s]))return!1}return!0}return i!==i&&e!==e}function se(i){const e=i.state.current,t=i.state.connections.get(e),n=t==null?void 0:t.accounts,o=n==null?void 0:n[0],s=i.chains.find(c=>c.id===(t==null?void 0:t.chainId)),u=i.state.status;switch(u){case"connected":return{address:o,addresses:n,chain:s,chainId:t==null?void 0:t.chainId,connector:t==null?void 0:t.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:u};case"reconnecting":return{address:o,addresses:n,chain:s,chainId:t==null?void 0:t.chainId,connector:t==null?void 0:t.connector,isConnected:!!o,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:u};case"connecting":return{address:o,addresses:n,chain:s,chainId:t==null?void 0:t.chainId,connector:t==null?void 0:t.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:u};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:u}}}let Z=[];function M(i){const e=[...i.state.connections.values()];return i.state.status==="reconnecting"||V(Z,e)?Z:(Z=e,e)}async function It(i,e){const{account:t,chainId:n,connector:o,...s}=e;let u;return typeof t=="object"&&(t==null?void 0:t.type)==="local"?u=i.getClient({chainId:n}):u=await G(i,{account:t??void 0,assertChainId:!1,chainId:n,connector:o}),U(u,Ye,"prepareTransactionRequest")({...s,...t?{account:t}:{}})}let le=!1;async function he(i,e={}){var a,r;if(le)return[];le=!0,i.setState(l=>({...l,status:l.current?"reconnecting":"connecting"}));const t=[];if((a=e.connectors)!=null&&a.length)for(const l of e.connectors){let g;typeof l=="function"?g=i._internal.connectors.setup(l):g=l,t.push(g)}else t.push(...i.connectors);let n;try{n=await((r=i.storage)==null?void 0:r.getItem("recentConnectorId"))}catch{}const o={};for(const[,l]of i.state.connections)o[l.connector.id]=1;n&&(o[n]=0);const s=Object.keys(o).length>0?[...t].sort((l,g)=>(o[l.id]??10)-(o[g.id]??10)):t;let u=!1;const c=[],d=[];for(const l of s){const g=await l.getProvider().catch(()=>{});if(!g||d.some(m=>m===g)||!await l.isAuthorized())continue;const p=await l.connect({isReconnecting:!0}).catch(()=>null);p&&(l.emitter.off("connect",i._internal.events.connect),l.emitter.on("change",i._internal.events.change),l.emitter.on("disconnect",i._internal.events.disconnect),i.setState(m=>{const I=new Map(u?m.connections:new Map).set(l.uid,{accounts:p.accounts,chainId:p.chainId,connector:l});return{...m,current:u?m.current:l.uid,connections:I}}),c.push({accounts:p.accounts,chainId:p.chainId,connector:l}),d.push(g),u=!0)}return(i.state.status==="reconnecting"||i.state.status==="connecting")&&(u?i.setState(l=>({...l,status:"connected"})):i.setState(l=>({...l,connections:new Map,current:null,status:"disconnected"}))),le=!1,c}async function yt(i,e){const{account:t,chainId:n,connector:o,...s}=e;let u;typeof t=="object"&&(t==null?void 0:t.type)==="local"?u=i.getClient({chainId:n}):u=await G(i,{account:t??void 0,assertChainId:!1,chainId:n,connector:o});const c=(()=>{var r;return!n||((r=u.chain)==null?void 0:r.id)===n?u.chain:{id:n}})();return await U(u,at,"sendTransaction")({...s,...t?{account:t}:{},assertChainId:!!n,chain:c,gas:s.gas??void 0})}async function bt(i,e){const{account:t,connector:n,...o}=e;let s;return typeof t=="object"&&t.type==="local"?s=i.getClient():s=await G(i,{account:t,connector:n}),U(s,ut,"signMessage")({...o,...t?{account:t}:{}})}class L extends O{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class vt extends O{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function Ae(i,e){var u;const{addEthereumChainParameter:t,chainId:n}=e,o=i.state.connections.get(((u=e.connector)==null?void 0:u.uid)??i.state.current);if(o){const c=o.connector;if(!c.switchChain)throw new vt({connector:c});return await c.switchChain({addEthereumChainParameter:t,chainId:n})}const s=i.chains.find(c=>c.id===n);if(!s)throw new z;return i.setState(c=>({...c,chainId:n})),s}async function At(i,e){const{chainId:t,timeout:n=0,...o}=e,s=i.getClient({chainId:t}),c=await U(s,st,"waitForTransactionReceipt")({...o,timeout:n});if(c.status==="reverted"){const d=U(s,ot,"getTransaction"),{from:a,...r}=await d({hash:c.transactionHash}),g=await U(s,Qe,"call")({...r,account:a,data:r.input,gasPrice:r.type!=="eip1559"?r.gasPrice:void 0,maxFeePerGas:r.type==="eip1559"?r.maxFeePerGas:void 0,maxPriorityFeePerGas:r.type==="eip1559"?r.maxPriorityFeePerGas:void 0}),f=g!=null&&g.data?Ge(`0x${g.data.substring(138)}`):"unknown reason";throw new Error(f)}return{...c,chainId:s.chain.id}}function Nt(i,e){const{onChange:t}=e;return i.subscribe(()=>se(i),t,{equalityFn(n,o){const{connector:s,...u}=n,{connector:c,...d}=o;return V(u,d)&&(s==null?void 0:s.id)===(c==null?void 0:c.id)&&(s==null?void 0:s.uid)===(c==null?void 0:c.uid)}})}function Et(i,e){const{onChange:t}=e;return i.subscribe(()=>M(i),t,{equalityFn:V})}function St(i,e){const{onChange:t}=e;return i._internal.connectors.subscribe((n,o)=>{t(Object.values(n),o)})}function _t(i,e){const{syncConnectedChain:t=i._internal.syncConnectedChain,...n}=e;let o;const s=d=>{o&&o();const a=i.getClient({chainId:d});return o=U(a,rt,"watchPendingTransactions")(n),o},u=s(e.chainId);let c;return t&&!e.chainId&&(c=i.subscribe(({chainId:d})=>d,async d=>s(d))),()=>{u==null||u(),c==null||c()}}async function Tt(i,e){const{account:t,chainId:n,connector:o,...s}=e;let u;typeof t=="object"&&(t==null?void 0:t.type)==="local"?u=i.getClient({chainId:n}):u=await G(i,{account:t??void 0,assertChainId:!1,chainId:n,connector:o});const c=(()=>{var r;return!n||((r=u.chain)==null?void 0:r.id)===n?u.chain:{id:n}})();return await U(u,dt,"writeContract")({...s,...t?{account:t}:{},assertChainId:!!n,chain:c})}function dn(i){return i}ae.type="injected";function ae(i={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:t}=i;function n(){const d=i.target;if(typeof d=="function"){const a=d();if(a)return a}return typeof d=="object"?d:typeof d=="string"?{...Pt[d]??{id:d,name:`${d[0].toUpperCase()}${d.slice(1)}`,provider:`is${d[0].toUpperCase()}${d.slice(1)}`}}:{id:"injected",name:"Injected",provider(a){return a==null?void 0:a.ethereum}}}let o,s,u,c;return d=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},type:ae.type,async setup(){const a=await this.getProvider();a!=null&&a.on&&i.target&&(u||(u=this.onConnect.bind(this),a.on("connect",u)),o||(o=this.onAccountsChanged.bind(this),a.on("accountsChanged",o)))},async connect({chainId:a,isReconnecting:r,withCapabilities:l}={}){var p,m,I,v,y,E;const g=await this.getProvider();if(!g)throw new L;let f=[];if(r)f=await this.getAccounts().catch(()=>[]);else if(e)try{f=(v=(I=(m=(p=(await g.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:p.caveats)==null?void 0:m[0])==null?void 0:I.value)==null?void 0:v.map(h=>q(h)),f.length>0&&(f=await this.getAccounts())}catch(N){const h=N;if(h.code===_.code)throw new _(h);if(h.code===de.code)throw h}try{!(f!=null&&f.length)&&!r&&(f=(await g.request({method:"eth_requestAccounts"})).map(C=>q(C))),u&&(g.removeListener("connect",u),u=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c));let N=await this.getChainId();if(a&&N!==a){const h=await this.switchChain({chainId:a}).catch(C=>{if(C.code===_.code)throw C;return{id:N}});N=(h==null?void 0:h.id)??N}return e&&await((y=d.storage)==null?void 0:y.removeItem(`${this.id}.disconnected`)),i.target||await((E=d.storage)==null?void 0:E.setItem("injected.connected",!0)),{accounts:l?f.map(h=>({address:h,capabilities:{}})):f,chainId:N}}catch(N){const h=N;throw h.code===_.code?new _(h):h.code===de.code?new de(h):h}},async disconnect(){var r,l;const a=await this.getProvider();if(!a)throw new L;s&&(a.removeListener("chainChanged",s),s=void 0),c&&(a.removeListener("disconnect",c),c=void 0),u||(u=this.onConnect.bind(this),a.on("connect",u));try{await We(()=>a.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await((r=d.storage)==null?void 0:r.setItem(`${this.id}.disconnected`,!0)),i.target||await((l=d.storage)==null?void 0:l.removeItem("injected.connected"))},async getAccounts(){const a=await this.getProvider();if(!a)throw new L;return(await a.request({method:"eth_accounts"})).map(l=>q(l))},async getChainId(){const a=await this.getProvider();if(!a)throw new L;const r=await a.request({method:"eth_chainId"});return Number(r)},async getProvider(){if(typeof window>"u")return;let a;const r=n();return typeof r.provider=="function"?a=r.provider(window):typeof r.provider=="string"?a=oe(window,r.provider):a=r.provider,a&&!a.removeListener&&("off"in a&&typeof a.off=="function"?a.removeListener=a.off:a.removeListener=()=>{}),a},async isAuthorized(){var a,r;try{if(e&&await((a=d.storage)==null?void 0:a.getItem(`${this.id}.disconnected`))||!i.target&&!await((r=d.storage)==null?void 0:r.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(t!==void 0&&t!==!1){const p=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",p),!!await this.getProvider()),m=typeof t=="number"?t:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(v=>window.addEventListener("ethereum#initialized",()=>v(p()),{once:!0}))]:[],new Promise(v=>setTimeout(()=>v(p()),m))]))return!0}throw new L}return!!(await Me(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:r}){var p,m,I,v;const l=await this.getProvider();if(!l)throw new L;const g=d.chains.find(y=>y.id===r);if(!g)throw new B(new z);const f=new Promise(y=>{const E=(N=>{"chainId"in N&&N.chainId===r&&(d.emitter.off("change",E),y())});d.emitter.on("change",E)});try{return await Promise.all([l.request({method:"wallet_switchEthereumChain",params:[{chainId:re(r)}]}).then(async()=>{await this.getChainId()===r&&d.emitter.emit("change",{chainId:r})}),f]),g}catch(y){const E=y;if(E.code===4902||((m=(p=E==null?void 0:E.data)==null?void 0:p.originalError)==null?void 0:m.code)===4902)try{const{default:N,...h}=g.blockExplorers??{};let C;a!=null&&a.blockExplorerUrls?C=a.blockExplorerUrls:N&&(C=[N.url,...Object.values(h).map(b=>b.url)]);let w;(I=a==null?void 0:a.rpcUrls)!=null&&I.length?w=a.rpcUrls:w=[((v=g.rpcUrls.default)==null?void 0:v.http[0])??""];const A={blockExplorerUrls:C,chainId:re(r),chainName:(a==null?void 0:a.chainName)??g.name,iconUrls:a==null?void 0:a.iconUrls,nativeCurrency:(a==null?void 0:a.nativeCurrency)??g.nativeCurrency,rpcUrls:w};return await Promise.all([l.request({method:"wallet_addEthereumChain",params:[A]}).then(async()=>{if(await this.getChainId()===r)d.emitter.emit("change",{chainId:r});else throw new _(new Error("User rejected switch after adding network."))}),f]),g}catch(N){throw new _(N)}throw E.code===_.code?new _(E):new B(E)}},async onAccountsChanged(a){var r;if(a.length===0)this.onDisconnect();else if(d.emitter.listenerCount("connect")){const l=(await this.getChainId()).toString();this.onConnect({chainId:l}),e&&await((r=d.storage)==null?void 0:r.removeItem(`${this.id}.disconnected`))}else d.emitter.emit("change",{accounts:a.map(l=>q(l))})},onChainChanged(a){const r=Number(a);d.emitter.emit("change",{chainId:r})},async onConnect(a){const r=await this.getAccounts();if(r.length===0)return;const l=Number(a.chainId);d.emitter.emit("connect",{accounts:r,chainId:l});const g=await this.getProvider();g&&(u&&(g.removeListener("connect",u),u=void 0),o||(o=this.onAccountsChanged.bind(this),g.on("accountsChanged",o)),s||(s=this.onChainChanged.bind(this),g.on("chainChanged",s)),c||(c=this.onDisconnect.bind(this),g.on("disconnect",c)))},async onDisconnect(a){const r=await this.getProvider();a&&a.code===1013&&r&&(await this.getAccounts()).length||(d.emitter.emit("disconnect"),r&&(s&&(r.removeListener("chainChanged",s),s=void 0),c&&(r.removeListener("disconnect",c),c=void 0),u||(u=this.onConnect.bind(this),r.on("connect",u))))}})}const Pt={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(i){return i!=null&&i.coinbaseWalletExtension?i.coinbaseWalletExtension:oe(i,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(i){return oe(i,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(i){var e,t;return(e=i==null?void 0:i.phantom)!=null&&e.ethereum?(t=i.phantom)==null?void 0:t.ethereum:oe(i,"isPhantom")}}};function oe(i,e){function t(o){return typeof e=="function"?e(o):typeof e=="string"?o[e]:!0}const n=i.ethereum;if(n!=null&&n.providers)return n.providers.find(o=>t(o));if(n&&t(n))return n}const kt=i=>(e,t,n)=>{const o=n.subscribe;return n.subscribe=(u,c,d)=>{let a=u;if(c){const r=(d==null?void 0:d.equalityFn)||Object.is;let l=u(n.getState());a=g=>{const f=u(g);if(!r(l,f)){const p=l;c(l=f,p)}},d!=null&&d.fireImmediately&&c(l,l)}return o(a)},i(e,t,n)},Rt=kt;function Ot(i,e){let t;try{t=i()}catch{return}return{getItem:o=>{var s;const u=d=>d===null?null:JSON.parse(d,void 0),c=(s=t.getItem(o))!=null?s:null;return c instanceof Promise?c.then(u):u(c)},setItem:(o,s)=>t.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>t.removeItem(o)}}const me=i=>e=>{try{const t=i(e);return t instanceof Promise?t:{then(n){return me(n)(t)},catch(n){return this}}}catch(t){return{then(n){return this},catch(n){return me(n)(t)}}}},Ut=(i,e)=>(t,n,o)=>{let s={storage:Ot(()=>localStorage),partialize:m=>m,version:0,merge:(m,I)=>({...I,...m}),...e},u=!1;const c=new Set,d=new Set;let a=s.storage;if(!a)return i((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...m)},n,o);const r=()=>{const m=s.partialize({...n()});return a.setItem(s.name,{state:m,version:s.version})},l=o.setState;o.setState=(m,I)=>{l(m,I),r()};const g=i((...m)=>{t(...m),r()},n,o);o.getInitialState=()=>g;let f;const p=()=>{var m,I;if(!a)return;u=!1,c.forEach(y=>{var E;return y((E=n())!=null?E:g)});const v=((I=s.onRehydrateStorage)==null?void 0:I.call(s,(m=n())!=null?m:g))||void 0;return me(a.getItem.bind(a))(s.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==s.version){if(s.migrate)return[!0,s.migrate(y.state,y.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var E;const[N,h]=y;if(f=s.merge(h,(E=n())!=null?E:g),t(f,!0),N)return r()}).then(()=>{v==null||v(f,void 0),f=n(),u=!0,d.forEach(y=>y(f))}).catch(y=>{v==null||v(void 0,y)})};return o.persist={setOptions:m=>{s={...s,...m},m.storage&&(a=m.storage)},clearStorage:()=>{a==null||a.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>u,onHydrate:m=>(c.add(m),()=>{c.delete(m)}),onFinishHydration:m=>(d.add(m),()=>{d.delete(m)})},s.skipHydration||p(),f||g},jt=Ut,Ne=i=>{let e;const t=new Set,n=(a,r)=>{const l=typeof a=="function"?a(e):a;if(!Object.is(l,e)){const g=e;e=r??(typeof l!="object"||l===null)?l:Object.assign({},e,l),t.forEach(f=>f(e,g))}},o=()=>e,c={setState:n,getState:o,getInitialState:()=>d,subscribe:a=>(t.add(a),()=>t.delete(a))},d=e=i(n,o,c);return c},fe=i=>i?Ne(i):Ne;class Mt{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new et})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){const n=t[0];this._emitter.emit(e,{uid:this.uid,...n})}listenerCount(e){return this._emitter.listenerCount(e)}}function Wt(i){return new Mt(i)}function Lt(i,e){return JSON.parse(i,(t,n)=>{let o=n;return(o==null?void 0:o.__type)==="bigint"&&(o=BigInt(o.value)),(o==null?void 0:o.__type)==="Map"&&(o=new Map(o.value)),(e==null?void 0:e(t,o))??o})}function Ee(i,e){return i.slice(0,e).join(".")||"."}function Se(i,e){const{length:t}=i;for(let n=0;n<t;++n)if(i[n]===e)return n+1;return 0}function qt(i,e){const t=typeof i=="function",n=typeof e=="function",o=[],s=[];return function(c,d){if(typeof d=="object")if(o.length){const a=Se(o,this);a===0?o[o.length]=this:(o.splice(a),s.splice(a)),s[s.length]=c;const r=Se(o,d);if(r!==0)return n?e.call(this,c,d,Ee(s,r)):`[ref=${Ee(s,r)}]`}else o[0]=d,s[0]=c;return t?i.call(this,c,d):d}}function $t(i,e,t,n){return JSON.stringify(i,qt((o,s)=>{let u=s;return typeof u=="bigint"&&(u={__type:"bigint",value:s.toString()}),u instanceof Map&&(u={__type:"Map",value:Array.from(s.entries())}),(e==null?void 0:e(o,u))??u},n),t??void 0)}function Dt(i){const{deserialize:e=Lt,key:t="wagmi",serialize:n=$t,storage:o=Oe}=i;function s(u){return u instanceof Promise?u.then(c=>c).catch(()=>null):u}return{...o,key:t,async getItem(u,c){const d=o.getItem(`${t}.${u}`),a=await s(d);return a?e(a)??null:c??null},async setItem(u,c){const d=`${t}.${u}`;c===null?await s(o.removeItem(d)):await s(o.setItem(d,n(c)))},async removeItem(u){await s(o.removeItem(`${t}.${u}`))}}}const Oe={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function xt(){const i=typeof window<"u"&&window.localStorage?window.localStorage:Oe;return{getItem(e){return i.getItem(e)},removeItem(e){i.removeItem(e)},setItem(e,t){try{i.setItem(e,t)}catch{}}}}const Ce=256;let ee=Ce,te;function Ht(i=11){if(!te||ee+i>Ce*2){te="",ee=0;for(let e=0;e<Ce;e++)te+=(256+Math.random()*256|0).toString(16).substring(1)}return te.substring(ee,ee+++i)}function Ft(i){const{multiInjectedProviderDiscovery:e=!0,storage:t=Dt({storage:xt()}),syncConnectedChain:n=!0,ssr:o=!1,...s}=i,u=typeof window<"u"&&e?tt():void 0,c=fe(()=>s.chains),d=fe(()=>{const h=[],C=new Set;for(const w of s.connectors??[]){const A=a(w);if(h.push(A),!o&&A.rdns){const b=typeof A.rdns=="string"?[A.rdns]:A.rdns;for(const T of b)C.add(T)}}if(!o&&u){const w=u.getProviders();for(const A of w)C.has(A.info.rdns)||h.push(a(r(A)))}return h});function a(h){var b;const C=Wt(Ht());let w;const A={...h({emitter:C,chains:c.getState(),get providers(){if(!u||!w)return[];const T=typeof w=="string"?[w]:w,R=u.getProviders();return T.flatMap(K=>R.filter(P=>P.info.rdns===K))},storage:t,transports:s.transports}),emitter:C,uid:C.uid};return w=A.rdns,C.on("connect",E),(b=A.setup)==null||b.call(A),A}function r(h){const{info:C}=h,w=h.provider;return ae({target:{...C,id:C.rdns,provider:w}})}const l=new Map;function g(h={}){const C=h.chainId??I.getState().chainId,w=c.getState().find(b=>b.id===C);if(h.chainId&&!w)throw new z;{const b=l.get(I.getState().chainId);if(b&&!w)return b;if(!w)throw new z}{const b=l.get(C);if(b)return b}let A;if(s.client)A=s.client({chain:w});else{const b=w.id,T=c.getState().map(P=>P.id),R={},K=Object.entries(s);for(const[P,$]of K)if(!(P==="chains"||P==="client"||P==="connectors"||P==="transports"))if(typeof $=="object")if(b in $)R[P]=$[b];else{if(T.some(je=>je in $))continue;R[P]=$}else R[P]=$;A=Pe({...R,chain:w,batch:R.batch??{multicall:!0},transport:P=>s.transports[b]({...P,connectors:d})})}return l.set(C,A),A}function f(){return{chainId:c.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let p;const m="0.0.0-canary-";ie.startsWith(m)?p=Number.parseInt(ie.replace(m,""),10):p=Number.parseInt(ie.split(".")[0]??"0",10);const I=fe(Rt(t?jt(f,{migrate(h,C){if(C===p)return h;const w=f(),A=v(h,w.chainId);return{...w,chainId:A}},name:"store",partialize(h){return{connections:{__type:"Map",value:Array.from(h.connections.entries()).map(([C,w])=>{const{id:A,name:b,type:T,uid:R}=w.connector;return[C,{...w,connector:{id:A,name:b,type:T,uid:R}}]})},chainId:h.chainId,current:h.current}},merge(h,C){typeof h=="object"&&h&&"status"in h&&delete h.status;const w=v(h,C.chainId);return{...C,...h,chainId:w}},skipHydration:o,storage:t,version:p}):f));I.setState(f());function v(h,C){return h&&typeof h=="object"&&"chainId"in h&&typeof h.chainId=="number"&&c.getState().some(w=>w.id===h.chainId)?h.chainId:C}n&&I.subscribe(({connections:h,current:C})=>{var w;return C?(w=h.get(C))==null?void 0:w.chainId:void 0},h=>{if(c.getState().some(w=>w.id===h))return I.setState(w=>({...w,chainId:h??w.chainId}))}),u==null||u.subscribe(h=>{const C=new Set,w=new Set;for(const b of d.getState())if(C.add(b.id),b.rdns){const T=typeof b.rdns=="string"?[b.rdns]:b.rdns;for(const R of T)w.add(R)}const A=[];for(const b of h){if(w.has(b.info.rdns))continue;const T=a(r(b));C.has(T.id)||A.push(T)}t&&!I.persist.hasHydrated()||d.setState(b=>[...b,...A],!0)});function y(h){I.setState(C=>{const w=C.connections.get(h.uid);return w?{...C,connections:new Map(C.connections).set(h.uid,{accounts:h.accounts??w.accounts,chainId:h.chainId??w.chainId,connector:w.connector})}:C})}function E(h){I.getState().status==="connecting"||I.getState().status==="reconnecting"||I.setState(C=>{const w=d.getState().find(A=>A.uid===h.uid);return w?(w.emitter.listenerCount("connect")&&w.emitter.off("connect",y),w.emitter.listenerCount("change")||w.emitter.on("change",y),w.emitter.listenerCount("disconnect")||w.emitter.on("disconnect",N),{...C,connections:new Map(C.connections).set(h.uid,{accounts:h.accounts,chainId:h.chainId,connector:w}),current:h.uid,status:"connected"}):C})}function N(h){I.setState(C=>{const w=C.connections.get(h.uid);if(w){const b=w.connector;b.emitter.listenerCount("change")&&w.connector.emitter.off("change",y),b.emitter.listenerCount("disconnect")&&w.connector.emitter.off("disconnect",N),b.emitter.listenerCount("connect")||w.connector.emitter.on("connect",E)}if(C.connections.delete(h.uid),C.connections.size===0)return{...C,connections:new Map,current:null,status:"disconnected"};const A=C.connections.values().next().value;return{...C,connections:new Map(C.connections),current:A.connector.uid}})}return{get chains(){return c.getState()},get connectors(){return d.getState()},storage:t,getClient:g,get state(){return I.getState()},setState(h){let C;typeof h=="function"?C=h(I.getState()):C=h;const w=f();typeof C!="object"&&(C=w),Object.keys(w).some(b=>!(b in C))&&(C=w),I.setState(C,!0)},subscribe(h,C,w){return I.subscribe(h,C,w?{...w,fireImmediately:w.emitImmediately}:void 0)},_internal:{mipd:u,async revalidate(){const h=I.getState(),C=h.connections;let w=h.current;for(const[,A]of C){const b=A.connector;b.isAuthorized&&await b.isAuthorized()||(C.delete(b.uid),w===b.uid&&(w=null))}I.setState(A=>({...A,connections:C,current:w}))},store:I,ssr:!!o,syncConnectedChain:n,transports:s.transports,chains:{setState(h){const C=typeof h=="function"?h(c.getState()):h;if(C.length!==0)return c.setState(C,!0)},subscribe(h){return c.subscribe(h)}},connectors:{providerDetailToConnector:r,setup:a,setState(h){return d.setState(typeof h=="function"?h(d.getState()):h,!0)},subscribe(h){return d.subscribe(h)}},events:{change:y,connect:E,disconnect:N}}}}function Ue(i){let e=[],t,n;function o(c){var r,l;const d=k.getCaipNetworks(S.CHAIN.EVM);let a=Number(ge.parseEvmChainId(c));if(!d.some(g=>String(g.id)===String(c))){const g=((r=k.getActiveCaipNetwork(S.CHAIN.EVM))==null?void 0:r.id)||((l=d[0])==null?void 0:l.id);g&&Number.isInteger(Number(g))&&(a=Number(g))}if(!a)throw new Error("ChainId not found in networks");return a}function s(){var c;return t||(t=ye.getInstance({projectId:i.options.projectId,chainId:(c=J())==null?void 0:c.caipNetworkId,enableLogger:i.options.enableAuthLogger,onTimeout:d=>{d==="iframe_load_failed"?D.open(W.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):d==="iframe_request_timeout"?D.open(W.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):d==="unverified_domain"&&D.open(W.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},abortController:W.EmbeddedWalletAbortController,getActiveCaipNetwork:d=>J(d),getCaipNetworks:d=>k.getCaipNetworks(d)})),t}async function u(c={}){var m;const d=s();let a=c.chainId;if(c.isReconnecting){const I=ge.parseEvmChainId(d.getLastUsedChainId()||""),v=(m=i.chains)==null?void 0:m[0].id;if(a=I||v,!a)throw new Error("ChainId not found in provider")}const r=Ie("eip155"),{address:l,chainId:g,accounts:f}=await qe.authConnectorAuthenticate({authConnector:d,chainId:a,preferredAccountType:r,socialUri:c.socialUri,chainNamespace:S.CHAIN.EVM});e=(f==null?void 0:f.map(I=>I.address))||[l];const p=o(g);return{accounts:e,account:l,chainId:p,chain:{id:p,unsupported:!1}}}return c=>({id:S.CONNECTOR_ID.AUTH,name:S.CONNECTOR_NAMES.AUTH,type:"AUTH",chain:S.CHAIN.EVM,async connect(d={}){if(n){const r=await n;return{accounts:d.withCapabilities?r.accounts.map(l=>({address:l,capabilities:{}})):r.accounts,chainId:r.chainId}}n||(n=new Promise(r=>{r(u(d))}));const a=await n;return n=void 0,{accounts:d.withCapabilities?a.accounts.map(r=>({address:r,capabilities:{}})):a.accounts,chainId:a.chainId}},async disconnect(){await(await this.getProvider()).disconnect()},getAccounts(){return e!=null&&e.length?(c.emitter.emit("change",{accounts:e}),Promise.resolve(e)):Promise.resolve([])},async getProvider(){var d;return this.provider||(this.provider=ye.getInstance({projectId:i.options.projectId,chainId:(d=J())==null?void 0:d.caipNetworkId,enableLogger:i.options.enableAuthLogger,abortController:W.EmbeddedWalletAbortController,onTimeout:a=>{a==="iframe_load_failed"?D.open(W.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):a==="iframe_request_timeout"?D.open(W.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):a==="unverified_domain"&&D.open(W.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:a=>J(a),getCaipNetworks:a=>k.getCaipNetworks(a)})),Promise.resolve(this.provider)},async getChainId(){const d=await this.getProvider(),{chainId:a}=await d.getChainId();return o(a)},async isAuthorized(){const a=k.state.activeChain===S.CHAIN.EVM;if(S.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(g=>Le.getConnectorId(g)===S.CONNECTOR_ID.AUTH)&&!a)return!1;const l=await this.getProvider();return Promise.resolve(l.getLoginEmailUsed())},async switchChain({chainId:d}){var a;try{const r=c.chains.find(p=>p.id===d);if(!r)throw new B(new Error("chain not found on connector."));const l=await this.getProvider(),g=Ie("eip155"),f=await l.connect({chainId:d,preferredAccountType:g});return e=((a=f==null?void 0:f.accounts)==null?void 0:a.map(p=>p.address))||[f.address],c.emitter.emit("change",{chainId:Number(d),accounts:e}),r}catch(r){throw r instanceof Error?new B(r):r}},onAccountsChanged(d){d.length===0?this.onDisconnect():c.emitter.emit("change",{accounts:d.map(q)})},onChainChanged(d){const a=Number(d);c.emitter.emit("change",{chainId:a})},async onDisconnect(d){await(await this.getProvider()).disconnect()}})}pe.type="walletConnect";function pe(i){const e=i.isNewChainsStale??!0;let t,n,o,s,u,c,d;return a=>({id:"walletConnect",name:"WalletConnect",type:pe.type,provider:i.universalProvider,async setup(){const r=await this.getProvider().catch(()=>null);r&&(s||(s=this.onConnect.bind(this),r.on("connect",s)),c||(c=this.onSessionDelete.bind(this),r.on("session_delete",c)))},async connect({...r}={}){var l,g,f;try{const p=k.getCaipNetworks(),m=await this.getProvider();if(!m)throw new L;u||(u=this.onDisplayUri,m.on("display_uri",u));const I=await this.isChainsStale();m.session&&I&&await m.disconnect();const v=x.state.universalProviderConfigOverride;if(!m.session||I){const A=$e.createNamespaces(p,v);await m.connect({optionalNamespaces:A,..."pairingTopic"in r?{pairingTopic:r.pairingTopic}:{}}),this.setRequestedChainsIds(p.map(b=>Number(b.id)))}const y=await this.getAccounts(),E=await this.getChainId(),N=(f=(g=(l=m.session)==null?void 0:l.namespaces)==null?void 0:g.eip155)==null?void 0:f.chains,h=N==null?void 0:N.some(A=>Number(A.split(":")[1])===E);let C=1;h?C=E:N!=null&&N[0]&&(C=Number(N[0].split(":")[1])),u&&(m.removeListener("display_uri",u),u=void 0),s&&(m.removeListener("connect",s),s=void 0),n||(n=this.onAccountsChanged.bind(this),m.on("accountsChanged",n)),o||(o=this.onChainChanged.bind(this),m.on("chainChanged",o)),d||(d=this.onDisconnect.bind(this),m.on("disconnect",d)),c||(c=this.onSessionDelete.bind(this),m.on("session_delete",c));const w=v==null?void 0:v.defaultChain;return m.setDefaultChain(w??`eip155:${C}`),{accounts:y,chainId:C}}catch(p){throw/(user rejected|connection request reset)/i.test(p==null?void 0:p.message)?new _(p):p}},async disconnect(){const r=await this.getProvider();try{await(r==null?void 0:r.disconnect())}catch(l){if(!/No matching key/i.test(l.message))throw l}finally{o&&(r==null||r.removeListener("chainChanged",o),o=void 0),d&&(r==null||r.removeListener("disconnect",d),d=void 0),s||(s=this.onConnect.bind(this),r==null||r.on("connect",s)),n&&(r==null||r.removeListener("accountsChanged",n),n=void 0),c&&(r==null||r.removeListener("session_delete",c),c=void 0),this.setRequestedChainsIds([])}},async getAccounts(){var m,I,v;const r=await this.getProvider();if(!((m=r==null?void 0:r.session)!=null&&m.namespaces))return[];const l=(v=(I=r==null?void 0:r.session)==null?void 0:I.namespaces[S.CHAIN.EVM])==null?void 0:v.accounts,g=(l==null?void 0:l.map(y=>y.split(":")[2]))??[],f=new Set;return g.filter(y=>{const E=y==null?void 0:y.toLowerCase();return f.has(E)?!1:(f.add(E),!0)})},async getProvider({chainId:r}={}){var f,p;t||(t=i.universalProvider,t==null||t.events.setMaxListeners(Number.POSITIVE_INFINITY));const l=H.getActiveNamespace(),g=(f=k.getActiveCaipNetwork())==null?void 0:f.id;if(r&&g!==r&&l){const m=H.getStoredActiveCaipNetworkId(),I=l?k.getCaipNetworks(l):[],v=I==null?void 0:I.find(y=>y.id===m);v&&v.chainNamespace===S.CHAIN.EVM&&await((p=this.switchChain)==null?void 0:p.call(this,{chainId:Number(v.id)}))}return t},async getChainId(){var p,m,I,v;const r=(p=k.getActiveCaipNetwork(S.CHAIN.EVM))==null?void 0:p.id;if(r)return r;const g=(v=(I=(m=(await this.getProvider()).session)==null?void 0:m.namespaces[S.CHAIN.EVM])==null?void 0:I.chains)==null?void 0:v[0],f=k.getCaipNetworks().find(y=>y.id===g);return f==null?void 0:f.id},async isAuthorized(){try{const[r,l]=await Promise.all([this.getAccounts(),this.getProvider()]);return r.length?await this.isChainsStale()&&l.session?(await l.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:r,chainId:l}){var p,m,I,v;const g=await this.getProvider();if(!g)throw new L;const f=k.getCaipNetworks().find(y=>y.id===l);if(!f)throw new B(new z);try{await g.request({method:"wallet_switchEthereumChain",params:[{chainId:re(l)}]}),f!=null&&f.caipNetworkId&&g.setDefaultChain(f==null?void 0:f.caipNetworkId),a.emitter.emit("change",{chainId:Number(l)});const y=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...y,l]),{...f,id:f.id}}catch(y){const E=y;if(/(?:user rejected)/iu.test(E.message))throw new _(E);try{let N;r!=null&&r.blockExplorerUrls?N=r.blockExplorerUrls:N=(p=f.blockExplorers)!=null&&p.default.url?[(m=f.blockExplorers)==null?void 0:m.default.url]:[];const h=((v=(I=f.rpcUrls)==null?void 0:I.chainDefault)==null?void 0:v.http)||[],C={blockExplorerUrls:N,chainId:re(l),chainName:f.name,iconUrls:r==null?void 0:r.iconUrls,nativeCurrency:f.nativeCurrency,rpcUrls:h};await g.request({method:"wallet_addEthereumChain",params:[C]});const w=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...w,l]),{...f,id:f.id}}catch(N){throw new _(N)}}},onAccountsChanged(r){r.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:r.map(l=>q(l))})},onChainChanged(r){const l=Number(r);a.emitter.emit("change",{chainId:l})},onConnect(r){this.setRequestedChainsIds(k.getCaipNetworks().map(l=>Number(l.id)))},async onDisconnect(r){this.setRequestedChainsIds([]),a.emitter.emit("disconnect");const l=await this.getProvider();n&&(l.removeListener("accountsChanged",n),n=void 0),o&&(l.removeListener("chainChanged",o),o=void 0),d&&(l.removeListener("disconnect",d),d=void 0),c&&(l.removeListener("session_delete",c),c=void 0),s||(s=this.onConnect.bind(this),l.on("connect",s))},onDisplayUri(r){a.emitter.emit("message",{type:"display_uri",data:r})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var g,f,p;if(!((g=t==null?void 0:t.session)!=null&&g.namespaces))return[];const r=(p=(f=t==null?void 0:t.session)==null?void 0:f.namespaces[S.CHAIN.EVM])==null?void 0:p.accounts;return(r==null?void 0:r.map(m=>Number.parseInt(m.split(":")[1]??"")))??[]},async getRequestedChainsIds(){var l;const r=await((l=a.storage)==null?void 0:l.getItem(this.requestedChainsStorageKey))??[];return[...new Set(r)]},async isChainsStale(){if(!e)return!1;const r=a.chains.map(f=>f.id),l=this.getNamespaceChainsIds();if(l.length&&!l.some(f=>r.includes(f)))return!1;const g=await this.getRequestedChainsIds();return!r.every(f=>g.includes(Number(f)))},async setRequestedChainsIds(r){var l;await((l=a.storage)==null?void 0:l.setItem(this.requestedChainsStorageKey,r))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}const F=xe({pendingTransactions:0}),_e={state:F,subscribeKey(i,e){return De(F,i,e)},increase(i){F[i]+=1},decrease(i){F[i]-=1},reset(i){F[i]=0}};async function Bt(i){if(ne.isSafeApp()){const{safe:e}=await we(async()=>{const{safe:t}=await import("./index-JHFG4lY9.js");return{safe:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));if(e&&!i.some(t=>t.type==="safe"))return e()}return null}async function zt(i){try{const{baseAccount:e}=await we(async()=>{const{baseAccount:t}=await import("./index-JHFG4lY9.js");return{baseAccount:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));if(e&&!i.some(t=>t.id==="baseAccount"))return e()}catch(e){console.error("Failed to import Base Account SDK:",e)}return null}async function Vt(i){try{const{coinbaseWallet:e}=await we(async()=>{const{coinbaseWallet:t}=await import("./index-JHFG4lY9.js");return{coinbaseWallet:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]));if(e&&!i.some(t=>t.id==="coinbaseWallet"))return e()}catch(e){console.error("Failed to import Coinbase Wallet SDK:",e)}return null}const Gt={enable:!1,pollingInterval:3e4};class Kt extends He{constructor(e){const t=X.extendCaipNetworks(e.networks,{projectId:e.projectId,customNetworkImageUrls:{},customRpcUrls:e.customRpcUrls});super(),this.balancePromises={},this.namespace=S.CHAIN.EVM,this.adapterType=S.ADAPTER_TYPES.WAGMI,this.projectId=e.projectId,this.pendingTransactionsFilter={...Gt,...e.pendingTransactionsFilter??{}},this.createConfig({...e,networks:t}),this.checkChainId()}construct(e){this.checkChainId(),this.setupWatchers()}async getAccounts(e){const t=this.getWagmiConnector(e.id);if(!t)return{accounts:[]};if(t.id===S.CONNECTOR_ID.AUTH){const u=await t.getProvider();if(!(u!=null&&u.user))return{accounts:[]};const{address:c,accounts:d,chainId:a}=u.user;return Promise.resolve({accounts:(d||[{address:c,type:"eoa"}]).map(r=>ne.createAccount({caipAddress:`eip155:${a}:${r.address}`,type:r.type}))})}const{addresses:n,address:o,chainId:s}=se(this.wagmiConfig);return Promise.resolve({accounts:s?[...new Set(n||[o])].map(u=>ne.createAccount({caipAddress:`eip155:${s}:${u||""}`,type:"eoa"})):[]})}checkChainId(){const{chainId:e}=se(this.wagmiConfig);e&&this.emit("switchNetwork",{chainId:e})}getWagmiConnector(e){return this.wagmiConfig.connectors.find(t=>t.id===e)}createConfig(e){this.wagmiChains=e.networks.filter(o=>o.chainNamespace===S.CHAIN.EVM);const t={},n=[...e.connectors??[]];this.wagmiChains.forEach(o=>{var c,d;const s=(c=e.transports)==null?void 0:c[o.id],u=X.getCaipNetworkId(o);s?t[o.id]=X.extendWagmiTransports(o,e.projectId,s):t[o.id]=X.getViemTransport(o,e.projectId,(d=e.customRpcUrls)==null?void 0:d[u])}),this.wagmiConfig=Ft({...e,chains:this.wagmiChains,connectors:n,transports:t})}setupWatchPendingTransactions(){if(!this.pendingTransactionsFilter.enable||this.unwatchPendingTransactions)return;this.unwatchPendingTransactions=_t(this.wagmiConfig,{pollingInterval:this.pendingTransactionsFilter.pollingInterval,onError:()=>{},onTransactions:()=>{this.emit("pendingTransactions"),_e.increase("pendingTransactions")}});const e=_e.subscribeKey("pendingTransactions",t=>{var n;t>=S.LIMITS.PENDING_TRANSACTIONS&&((n=this.unwatchPendingTransactions)==null||n.call(this),e())})}setupWatchers(){Et(this.wagmiConfig,{onChange:e=>{this.clearConnections(),this.addConnection(...e.map(t=>{const n=this.getCaipNetworks().find(s=>s.id===t.chainId),o=t.connector.id===S.CONNECTOR_ID.AUTH;return{accounts:t.accounts.map(s=>({address:this.toChecksummedAddress(s)})),caipNetwork:n,connectorId:t.connector.id,auth:o?{name:H.getConnectedSocialProvider(),username:H.getConnectedSocialUsername()}:void 0}}))}}),Nt(this.wagmiConfig,{onChange:(e,t)=>{var n;if(e.status==="disconnected"&&t.address&&this.emit("disconnect"),e!=null&&e.chainId&&(e==null?void 0:e.chainId)!==(t==null?void 0:t.chainId)&&this.emit("switchNetwork",{chainId:e.chainId}),e.status==="connected"){const o=e.address!==(t==null?void 0:t.address),s=e.connector.id!==((n=t.connector)==null?void 0:n.id),u=t.status!=="connected";(o||s||u)&&(this.setupWatchPendingTransactions(),this.handleAccountChanged({address:e.address,chainId:e.chainId,connector:e.connector}))}}})}async addThirdPartyConnectors(){const e=[],{enableCoinbase:t,enableBaseAccount:n}=x.state||{};if(n!==!1){const s=await zt(this.wagmiConfig.connectors);s&&e.push(s)}if(t!==!1){const s=await Vt(this.wagmiConfig.connectors);s&&e.push(s)}const o=await Bt(this.wagmiConfig.connectors);o&&e.push(o),await Promise.all(e.map(s=>{const u=this.configureInternalConnector(s);return this.addWagmiConnector(u)}))}addWagmiConnectors(){const e=[];x.state.enableInjected!==!1&&e.push(ae({shimDisconnect:!0}));const{features:t,remoteFeatures:n,projectId:o,enableAuthLogger:s}=x.state,u=(n==null?void 0:n.email)??(t==null?void 0:t.email)??!0,c=(n==null?void 0:n.socials)??(t==null?void 0:t.socials),d=Array.isArray(c)&&(c==null?void 0:c.length)>0;(u||d)&&e.push(Ue({chains:this.wagmiChains,options:{projectId:o,enableAuthLogger:s}})),e.forEach(a=>{this.configureInternalConnector(a)})}configureInternalConnector(e){const t=this.wagmiConfig._internal.connectors.setup(e);return this.wagmiConfig._internal.connectors.setState(n=>[...n,t]),t}async handleAccountChanged({address:e,chainId:t,connector:n}){if(!this.namespace)throw new Error("WagmiAdapter:handleAccountChanged - namespace is required");const o=await n.getProvider().catch(()=>{});this.emit("accountChanged",{address:this.toChecksummedAddress(e),chainId:t,connector:{id:n.id,name:j.ConnectorNamesMap[n.id]??n.name,imageId:j.ConnectorImageIds[n.id],type:j.ConnectorTypesMap[n.type]??"EXTERNAL",info:n.id===S.CONNECTOR_ID.INJECTED?void 0:{rdns:n.id},provider:o,chain:this.namespace,chains:[]}})}async writeSolanaTransaction(){return Promise.resolve({hash:""})}async signMessage(e){try{return{signature:await bt(this.wagmiConfig,{message:e.message,account:e.address})}}catch{throw new Error("WagmiAdapter:signMessage - Sign message failed")}}async sendTransaction(e){var c;const{chainId:t,address:n}=se(this.wagmiConfig),o=(c=this.wagmiChains)==null?void 0:c.find(d=>d.id===t),s={account:n,to:e.to,value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,data:e.data,chain:o,type:"legacy",parameters:["nonce"]};await It(this.wagmiConfig,s);const u=await yt(this.wagmiConfig,s);return await At(this.wagmiConfig,{hash:u,timeout:25e3}),{hash:u}}async writeContract(e){var c;const{caipNetwork:t,...n}=e,o=Number(ge.caipNetworkIdToNumber(t.caipNetworkId)),s=(c=this.wagmiChains)==null?void 0:c.find(d=>d.id===o);return{hash:await Tt(this.wagmiConfig,{chain:s,address:n.tokenAddress,account:n.fromAddress,abi:n.abi,functionName:n.method,args:n.args,__mode:"prepared"})}}async estimateGas(e){try{return{gas:await wt(this.wagmiConfig,{account:e.address,to:e.to,data:e.data,type:"legacy"})}}catch{throw new Error("WagmiAdapter:estimateGas - error estimating gas")}}parseUnits(e){return ct(e.value,e.decimals)}formatUnits(e){return Ke(e.value,e.decimals)}async addWagmiConnector(e){if(!this.namespace)throw new Error("WagmiAdapter:addWagmiConnector - namespace is required");const{enableEIP6963:t,enableInjected:n}=x.state||{},o=e.type===S.CONNECTOR_ID.INJECTED,s=e.id===S.CONNECTOR_ID.INJECTED,u=o&&!s;if(s&&n===!1||u&&t===!1||e.id===S.CONNECTOR_ID.AUTH||e.id===S.CONNECTOR_ID.WALLET_CONNECT)return;let c;e.id!==S.CONNECTOR_ID.BASE_ACCOUNT&&(c=await e.getProvider().catch(()=>{}));const d=Fe.state.connectorImages;this.addConnector({id:e.id,explorerId:j.ConnectorExplorerIds[e.id]??j.ConnectorExplorerIds[e.name],imageUrl:(d==null?void 0:d[e.id])??e.icon,name:j.ConnectorNamesMap[e.id]??e.name,imageId:j.ConnectorImageIds[e.id],type:j.ConnectorTypesMap[e.type]??"EXTERNAL",info:e.id===S.CONNECTOR_ID.INJECTED?void 0:{rdns:e.id},provider:c,chain:this.namespace,chains:[]})}async syncConnectors(){St(this.wagmiConfig,{onChange:e=>{e.forEach(t=>this.addWagmiConnector(t))}}),this.addWagmiConnectors(),await Promise.all(this.wagmiConfig.connectors.map(e=>this.addWagmiConnector(e))),await this.addThirdPartyConnectors()}async syncConnections(){const e=this.connectors.filter(t=>{const{hasDisconnected:n,hasConnected:o}=Y.getConnectorStorageInfo(t.id,this.namespace);return!n&&o}).map(t=>this.getWagmiConnector(t.id)).filter(Boolean);await he(this.wagmiConfig,{connectors:e})}async syncConnection(e){var a,r;const{id:t,chainId:n}=e,s=M(this.wagmiConfig).find(l=>l.connector.id===t),u=this.getWagmiConnector(t),c=await(u==null?void 0:u.getProvider());if(ne.isSafeApp()&&t===S.CONNECTOR_ID.SAFE&&!(s!=null&&s.accounts.length)){const l=this.getWagmiConnector("safe");if(l){const g=await ue(this.wagmiConfig,{connector:l,chainId:Number(n)}),f=await l.getProvider();return{chainId:Number(n),address:this.toChecksummedAddress(g.accounts[0]),provider:f,type:(a=s==null?void 0:s.connector.type)==null?void 0:a.toUpperCase(),id:s==null?void 0:s.connector.id}}}return{chainId:Number(s==null?void 0:s.chainId),address:this.toChecksummedAddress(s==null?void 0:s.accounts[0]),provider:c,type:(r=s==null?void 0:s.connector.type)==null?void 0:r.toUpperCase(),id:s==null?void 0:s.connector.id}}async connectWalletConnect(e){try{const t=this.getWalletConnectConnector();await t.authenticate();const n=this.getWagmiConnector("walletConnect");if(!n)throw new Error("UniversalAdapter:connectWalletConnect - connector not found");const o=await ue(this.wagmiConfig,{connector:n,chainId:e?Number(e):void 0});return o.chainId!==Number(e)&&await Ae(this.wagmiConfig,{chainId:o.chainId}),{clientId:await t.provider.client.core.crypto.getClientId()}}catch(t){throw t instanceof _?new Q(t):be.isUserRejectedRequestError(t)?new Q(t):t}}async connect(e){var t,n,o,s,u;try{const{id:c,address:d,provider:a,type:r,info:l,chainId:g,socialUri:f}=e,p=this.getWagmiConnector(c);if(!p)throw new Error("connectionControllerClient:connectExternal - connector is undefined");a&&l&&p.id===S.CONNECTOR_ID.EIP6963&&((t=p.setEip6963Wallet)==null||t.call(p,{provider:a,info:l}));const m=(o=(n=this.wagmiConfig.state)==null?void 0:n.connections)==null?void 0:o.get(p.uid);if(m){await((s=this.wagmiConfig.storage)==null?void 0:s.setItem("recentConnectorId",p.id));const y=[...m.accounts].sort((E,N)=>Y.isLowerCaseMatch(E,d)?-1:Y.isLowerCaseMatch(N,d)?1:0);return(u=this.wagmiConfig)==null||u.setState(E=>({...E,connections:new Map(E.connections).set(p.uid,{accounts:y,chainId:m.chainId,connector:m.connector}),current:p.uid,status:"connected"})),{address:this.toChecksummedAddress(y[0]),chainId:m.chainId,provider:a,type:r,id:c}}const I=await ue(this.wagmiConfig,{connector:p,chainId:g?Number(g):void 0,socialUri:f}),v=a??await p.getProvider();return{address:this.toChecksummedAddress(I.accounts[0]),chainId:I.chainId,provider:v,type:r,id:c}}catch(c){throw c instanceof _?new Q(c):be.isUserRejectedRequestError(c)?new Q(c):c}}get connections(){return Array.from(this.wagmiConfig.state.connections.values()).map(e=>({accounts:e.accounts.map(t=>({address:this.toChecksummedAddress(t)})),connectorId:e.connector.id}))}async reconnect(e){const{id:t}=e,n=this.getWagmiConnector(t);if(!n)throw new Error("connectionControllerClient:connectExternal - connector is undefined");await he(this.wagmiConfig,{connectors:[n]})}async getBalance(e){const t=e.address,n=this.getCaipNetworks().find(o=>o.id===e.chainId);if(!t)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(n&&this.wagmiConfig){const o=`${n.caipNetworkId}:${e.address}`,s=this.balancePromises[o];if(s)return s;const u=H.getNativeBalanceCacheForCaipAddress(o);return u?{balance:u.balance,symbol:u.symbol}:(this.balancePromises[o]=new Promise(async c=>{var d,a;try{const r=Number(e.chainId),l=await pt(this.wagmiConfig,{address:e.address,chainId:r,token:(a=(d=e.tokens)==null?void 0:d[n.caipNetworkId])==null?void 0:a.address});H.updateNativeBalanceCache({caipAddress:o,balance:l.formatted,symbol:l.symbol,timestamp:Date.now()}),c({balance:l.formatted,symbol:l.symbol})}catch(r){console.warn("Appkit:WagmiAdapter:getBalance - Error getting balance",r),c({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[o]}),this.balancePromises[o]||{balance:"0.00",symbol:"ETH"})}return{balance:"",symbol:""}}getWalletConnectProvider(){var e;return(e=this.getWagmiConnector("walletConnect"))==null?void 0:e.provider}async disconnect(e){if(e.id){const t=this.getWagmiConnector(e.id),o=M(this.wagmiConfig).find(s=>Y.isLowerCaseMatch(s.connector.id,e.id));return await ve(this.wagmiConfig,{connector:t}),x.state.enableReconnect===!1&&this.deleteConnection(e.id),o?{connections:[{accounts:o.accounts.map(s=>({address:this.toChecksummedAddress(s)})),connectorId:o.connector.id}]}:{connections:[]}}return this.disconnectAll()}async disconnectAll(){const e=M(this.wagmiConfig),t=await Promise.allSettled(e.map(async n=>{const o=this.getWagmiConnector(n.connector.id);return o&&await ve(this.wagmiConfig,{connector:o}),n}));return this.wagmiConfig.state.connections.clear(),{connections:t.filter(n=>n.status==="fulfilled").map(({value:n})=>({accounts:n.accounts.map(o=>({address:this.toChecksummedAddress(o)})),connectorId:n.connector.id}))}}async switchNetwork(e){var f,p,m,I,v;const{caipNetwork:t}=e,n=this.wagmiConfig.chains.find(y=>y.id.toString()===t.id.toString());if(!n)throw new Error("connectionControllerClient:switchNetwork - wagmiChain is undefined");const{name:o,nativeCurrency:s,rpcUrls:u,blockExplorers:c,id:d}=n,a=((m=(p=(f=t.rpcUrls)==null?void 0:f.chainDefault)==null?void 0:p.http)==null?void 0:m[0])??u.default.http[0]??"",r=(c==null?void 0:c.default.url)??((v=(I=t.blockExplorers)==null?void 0:I.default)==null?void 0:v.url)??"",l=s??t.nativeCurrency,g=o??t.name;await Ae(this.wagmiConfig,{chainId:d,addEthereumChainParameter:{chainName:g,nativeCurrency:l,rpcUrls:[a],blockExplorerUrls:[r]}}),await super.switchNetwork(e)}async getCapabilities(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:getCapabilities - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:getCapabilities - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:getCapabilities - provider is undefined");return await s.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:grantPermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:grantPermissions - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:grantPermissions - provider is undefined");return s.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:revokePermissions - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:revokePermissions - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:revokePermissions - provider is undefined");return s.request({method:"wallet_revokePermissions",params:e})}async walletGetAssets(e){if(!this.wagmiConfig)throw new Error("connectionControllerClient:walletGetAssets - wagmiConfig is undefined");const n=M(this.wagmiConfig)[0],o=n?this.getWagmiConnector(n.connector.id):null;if(!o)throw new Error("connectionControllerClient:walletGetAssets - connector is undefined");const s=await o.getProvider();if(!s)throw new Error("connectionControllerClient:walletGetAssets - provider is undefined");return s.request({method:"wallet_getAssets",params:[e]})}setAuthProvider(e){if(!this.namespace)throw new Error("WagmiAdapter:setAuthProvider - namespace is required");this.addConnector({id:S.CONNECTOR_ID.AUTH,type:"AUTH",name:S.CONNECTOR_NAMES.AUTH,provider:e,imageId:j.ConnectorImageIds[S.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}async setUniversalProvider(e){e.on("connect",()=>{const n=M(this.wagmiConfig),o=this.getWagmiConnector("walletConnect");if(o&&!n.find(s=>s.connector.id===o.id)){if(k.state.activeChain==="eip155")return;he(this.wagmiConfig,{connectors:[o]})}});const t=pe({universalProvider:e});return this.configureInternalConnector(t),this.addConnector(new Be({provider:e,caipNetworks:this.getCaipNetworks(),namespace:"eip155"})),Promise.resolve()}toChecksummedAddress(e){if(!e)return e;try{return Ze(e.toLowerCase())}catch{return e}}}const un=Object.freeze(Object.defineProperty({__proto__:null,WagmiAdapter:Kt,authConnector:Ue},Symbol.toStringTag,{value:"Module"}));export{z as C,L as P,ft as a,un as b,dn as c,ae as i};
4
+ //# sourceMappingURL=index-D0eDFsbU.js.map
@@ -1,4 +1,4 @@
1
- import{w as t,a as d,i as n,b as p}from"./lit-element-wjYUA6aF.js";import{n as c}from"./class-map-DopF_Eyi.js";import{c as w,t as g}from"./index-yeutDs-n.js";import{r as k}from"./index-DVjQDdLu.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="62b4cddd-8e0f-4d47-a273-78284f1ff1eb",l._sentryDebugIdIdentifier="sentry-dbid-62b4cddd-8e0f-4d47-a273-78284f1ff1eb")}catch{}})();const v=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ import{w as t,a as d,i as n,b as p}from"./lit-element-wjYUA6aF.js";import{n as f}from"./class-map-C1Xjz5Lx.js";import{c as w,t as g}from"./index-CmO5nOV-.js";import{r as k}from"./index-DvBcVM9J.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="2140570e-e3a9-480e-8af3-e8fa01b0ec62",l._sentryDebugIdIdentifier="sentry-dbid-2140570e-e3a9-480e-8af3-e8fa01b0ec62")}catch{}})();const v=t`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <rect width="64" height="64" fill="#F7931A"/>
3
3
  <g clip-path="url(#clip0_1045_17)">
4
4
  <path d="M63.0394 39.7409C58.7654 56.8839 41.4024 67.3169 24.2574 63.0419C7.11937 58.7679 -3.31363 41.4039 0.962367 24.2619C5.23437 7.11686 22.5974 -3.31714 39.7374 0.956863C56.8814 5.23086 67.3134 22.5969 63.0394 39.7409Z" fill="#F7931A"/>
@@ -363,7 +363,7 @@ import{w as t,a as d,i as n,b as p}from"./lit-element-wjYUA6aF.js";import{n as c
363
363
  </clipPath>
364
364
  </defs>
365
365
  </svg>
366
- `,b=t`<svg
366
+ `,A=t`<svg
367
367
  viewBox="0 0 60 60"
368
368
  fill="none"
369
369
  >
@@ -397,7 +397,7 @@ import{w as t,a as d,i as n,b as p}from"./lit-element-wjYUA6aF.js";import{n as c
397
397
  <rect width="60" height="60" rx="30" fill="white" />
398
398
  </clipPath>
399
399
  </defs>
400
- </svg> `,A=t`<svg fill="none" viewBox="0 0 80 80">
400
+ </svg> `,b=t`<svg fill="none" viewBox="0 0 80 80">
401
401
  <g clip-path="url(#a)">
402
402
  <path fill="url(#b)" d="M40 80a40 40 0 1 0 0-80 40 40 0 0 0 0 80Z" />
403
403
  <path
@@ -463,7 +463,7 @@ import{w as t,a as d,i as n,b as p}from"./lit-element-wjYUA6aF.js";import{n as c
463
463
  width: 100%;
464
464
  height: 100%;
465
465
  }
466
- `;var f=function(l,i,C,a){var r=arguments.length,e=r<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,C):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(l,i,C,a);else for(var s=l.length-1;s>=0;s--)(h=l[s])&&(e=(r<3?h(e):r>3?h(i,C,e):h(i,C))||e);return r>3&&e&&Object.defineProperty(i,C,e),e};const G={browser:u,dao:M,defi:x,defiAlt:Z,eth:y,layers:E,lock:B,login:H,network:_,nft:D,noun:m,profile:b,system:j,meld:F,onrampCard:P,google:L,pencil:S,lightbulb:V,solana:A,ton:g,bitcoin:v};let o=class extends n{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=`
466
+ `;var c=function(l,i,C,o){var r=arguments.length,e=r<3?i:o===null?o=Object.getOwnPropertyDescriptor(i,C):o,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(l,i,C,o);else for(var s=l.length-1;s>=0;s--)(h=l[s])&&(e=(r<3?h(e):r>3?h(i,C,e):h(i,C))||e);return r>3&&e&&Object.defineProperty(i,C,e),e};const G={browser:u,dao:M,defi:x,defiAlt:Z,eth:y,layers:E,lock:B,login:H,network:_,nft:D,noun:m,profile:A,system:j,meld:F,onrampCard:P,google:L,pencil:S,lightbulb:V,solana:b,ton:g,bitcoin:v};let a=class extends n{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=`
467
467
  --local-size: var(--apkt-visual-size-${this.size});
468
- `,p`${G[this.name]}`}};o.styles=[k,z];f([c()],o.prototype,"name",void 0);f([c()],o.prototype,"size",void 0);o=f([w("wui-visual")],o);
469
- //# sourceMappingURL=index-CTVBoJue.js.map
468
+ `,p`${G[this.name]}`}};a.styles=[k,z];c([f()],a.prototype,"name",void 0);c([f()],a.prototype,"size",void 0);a=c([w("wui-visual")],a);
469
+ //# sourceMappingURL=index-D21UVRUB.js.map
@@ -1,4 +1,4 @@
1
- import{i as f,b as d}from"./lit-element-wjYUA6aF.js";import{n as a}from"./class-map-DopF_Eyi.js";import{c as p}from"./index-yeutDs-n.js";import"./index-DF6WG3qn.js";import{d as b,r as g,e as w}from"./index-DVjQDdLu.js";import{N as m}from"./W3MFrameProviderSingleton-35iFXIWF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="18ae690b-0ba8-42f3-8088-9e6545f00229",e._sentryDebugIdIdentifier="sentry-dbid-18ae690b-0ba8-42f3-8088-9e6545f00229")}catch{}})();const h=b`
1
+ import{i as m,b as d}from"./lit-element-wjYUA6aF.js";import{n as a}from"./class-map-C1Xjz5Lx.js";import{c as b}from"./index-CmO5nOV-.js";import"./index-C_-3KJ53.js";import{d as p,r as g,e as w}from"./index-DvBcVM9J.js";import{N as f}from"./W3MFrameProviderSingleton-DZpGQQon.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="56bfa8db-c914-41fb-bb87-f620bbf4bfaf",e._sentryDebugIdIdentifier="sentry-dbid-56bfa8db-c914-41fb-bb87-f620bbf4bfaf")}catch{}})();const h=p`
2
2
  :host {
3
3
  width: 100%;
4
4
  }
@@ -42,7 +42,7 @@ import{i as f,b as d}from"./lit-element-wjYUA6aF.js";import{n as a}from"./class-
42
42
  .token-name-container {
43
43
  flex: 1;
44
44
  }
45
- `;var r=function(e,t,i,l){var u=arguments.length,n=u<3?t:l===null?l=Object.getOwnPropertyDescriptor(t,i):l,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,l);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(n=(u<3?s(n):u>3?s(t,i,n):s(t,i))||n);return u>3&&n&&Object.defineProperty(t,i,n),n};let o=class extends f{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return d`
45
+ `;var r=function(e,t,i,l){var u=arguments.length,n=u<3?t:l===null?l=Object.getOwnPropertyDescriptor(t,i):l,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,l);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(n=(u<3?s(n):u>3?s(t,i,n):s(t,i))||n);return u>3&&n&&Object.defineProperty(t,i,n),n};let o=class extends m{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return d`
46
46
  <button data-clickable=${String(this.clickable)}>
47
47
  <wui-flex gap="2" alignItems="center">
48
48
  ${this.visualTemplate()}
@@ -56,7 +56,7 @@ import{i as f,b as d}from"./lit-element-wjYUA6aF.js";import{n as a}from"./class-
56
56
  ${this.tokenName}
57
57
  </wui-text>
58
58
  <wui-text variant="sm-regular-mono" color="secondary">
59
- ${m.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency}
59
+ ${f.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency}
60
60
  </wui-text>
61
61
  </wui-flex>
62
62
  </wui-flex>
@@ -71,9 +71,9 @@ import{i as f,b as d}from"./lit-element-wjYUA6aF.js";import{n as a}from"./class-
71
71
  >$${this.tokenValue.toFixed(2)}</wui-text
72
72
  >
73
73
  <wui-text variant="sm-regular-mono" color="secondary">
74
- ${m.formatNumberToLocalString(this.tokenAmount,4)}
74
+ ${f.formatNumberToLocalString(this.tokenAmount,4)}
75
75
  </wui-text>
76
76
  </wui-flex>
77
77
  </button>
78
- `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?d`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:d`<wui-icon name="coinPlaceholder" color="default"></wui-icon>`}};o.styles=[g,w,h];r([a()],o.prototype,"tokenName",void 0);r([a()],o.prototype,"tokenImageUrl",void 0);r([a({type:Number})],o.prototype,"tokenValue",void 0);r([a()],o.prototype,"tokenAmount",void 0);r([a()],o.prototype,"tokenCurrency",void 0);r([a({type:Boolean})],o.prototype,"clickable",void 0);o=r([p("wui-list-token")],o);
79
- //# sourceMappingURL=index-DiQlp13b.js.map
78
+ `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?d`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:d`<wui-icon name="coinPlaceholder" color="default"></wui-icon>`}};o.styles=[g,w,h];r([a()],o.prototype,"tokenName",void 0);r([a()],o.prototype,"tokenImageUrl",void 0);r([a({type:Number})],o.prototype,"tokenValue",void 0);r([a()],o.prototype,"tokenAmount",void 0);r([a()],o.prototype,"tokenCurrency",void 0);r([a({type:Boolean})],o.prototype,"clickable",void 0);o=r([b("wui-list-token")],o);
79
+ //# sourceMappingURL=index-D3UiKOeM.js.map