@stakekit/widget 0.0.280 → 0.0.282

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 (241) hide show
  1. package/dist/{website/assets/build-Dn2S6Ko5.js → bundle/build-BjTGUKBb.js} +1 -1
  2. package/dist/bundle/{build-DXRLzwHe.js → build-DaXa2hFa.js} +1 -1
  3. package/dist/bundle/{cardano-connector-ebl32zUD.js → cardano-connector-Bxl4EuKG.js} +1 -1
  4. package/dist/bundle/dist-C6DxN7oQ.js +1 -0
  5. package/dist/bundle/index.bundle.js +3 -3
  6. package/dist/bundle/{ledger-connector-BN25ujqn.js → ledger-connector-BYlWQcC2.js} +1 -1
  7. package/dist/bundle/{ledger-live-connector-meta-DPFZoSjd.js → ledger-live-connector-meta-BSOi7ps6.js} +2 -2
  8. package/dist/bundle/{misc-C7prhhSc.js → misc-B58_8Z_Y.js} +1 -1
  9. package/dist/bundle/name-service-WTCg35Ui.js +1 -0
  10. package/dist/bundle/networks-DcV8Uo1h.js +1 -0
  11. package/dist/bundle/{solana-connector-G7AHadyF.js → solana-connector-C4fvrXDL.js} +1 -1
  12. package/dist/bundle/{substrate-connector-C1B1qvJ7.js → substrate-connector-DjL2B0YP.js} +1 -1
  13. package/dist/bundle/{ton-connector-GT3crFFI.js → ton-connector-CFA850-u.js} +1 -1
  14. package/dist/bundle/{tron-connector-gqA-Dier.js → tron-connector-Bi9vQYaJ.js} +1 -1
  15. package/dist/bundle/tx-DTVo9zYr.js +1 -0
  16. package/dist/bundle/{utils-D25hFEIj.js → utils-UHcv2aK_.js} +1 -1
  17. package/dist/bundle/{wallet-manager-l_QoGIj_.js → wallet-manager-st5o-xIp.js} +3 -3
  18. package/dist/package/{build-BdpEvliU.js → build-19T6Y-f2.js} +1 -1
  19. package/dist/package/{build-vbzY6oYn.js → build-BrztUmTv.js} +2 -2
  20. package/dist/package/{cardano-connector-BZZm7XoD.js → cardano-connector-CKtTdyDA.js} +2 -2
  21. package/dist/package/dist-CDUoHqPz.js +3 -0
  22. package/dist/package/index.package.js +83 -23
  23. package/dist/package/{ledger-connector-C4iWqKKK.js → ledger-connector-Cs_sRWr9.js} +2 -2
  24. package/dist/package/{ledger-live-connector-meta-DaQZkCPN.js → ledger-live-connector-meta-BhqB5kyr.js} +24 -3
  25. package/dist/package/{misc-D2AZp5-W.js → misc-sZYZi3H7.js} +1 -1
  26. package/dist/package/name-service-CKkyMnnB.js +3 -0
  27. package/dist/package/{networks-CdsbwZ0i.js → networks-3BCZBoc0.js} +2 -1
  28. package/dist/package/{solana-connector-YHtJzNsy.js → solana-connector-BBT9LAWs.js} +2 -2
  29. package/dist/package/{substrate-connector-BfDsxLU7.js → substrate-connector-DfK3K0B4.js} +1 -1
  30. package/dist/package/{ton-connector-CJQSQVZ4.js → ton-connector-CRoAd0ZH.js} +2 -2
  31. package/dist/package/{tron-connector-CMwQ3mXk.js → tron-connector-DQfLwaZm.js} +2 -2
  32. package/dist/package/tx-DgblqE_C.js +3 -0
  33. package/dist/package/{utils-pXuPoWum.js → utils-CHNRVjvx.js} +1 -1
  34. package/dist/package/{wallet-manager-kCjbi0Rb.js → wallet-manager-DvGKqMe3.js} +17 -17
  35. package/dist/types/common/get-enabled-networks.d.ts +1 -1
  36. package/dist/types/domain/types/chains/evm.d.ts +4 -3
  37. package/dist/types/domain/types/chains/networks.d.ts +2 -0
  38. package/dist/types/domain/types/yields.d.ts +2 -2
  39. package/dist/types/generated/api/legacy.d.ts +244 -74
  40. package/dist/types/generated/api/yield.d.ts +120 -30
  41. package/dist/types/hooks/api/use-activity-actions.d.ts +1 -1
  42. package/dist/types/hooks/use-init-query-params.d.ts +2 -2
  43. package/dist/types/hooks/use-reward-token-details/index.d.ts +1 -1
  44. package/dist/types/pages/details/earn-page/state/use-get-token-balances-map.d.ts +1 -1
  45. package/dist/types/pages/details/earn-page/state/use-token-balances-map.d.ts +1 -1
  46. package/dist/types/pages/details/positions-page/hooks/use-position-list-item.d.ts +2 -2
  47. package/dist/types/pages/review/hooks/use-pending-review.hook.d.ts +1 -1
  48. package/dist/types/pages/review/hooks/use-stake-review.hook.d.ts +1 -1
  49. package/dist/types/pages/review/hooks/use-unstake-review.hook.d.ts +1 -1
  50. package/dist/website/assets/{AccountController-BXsRFth1.js → AccountController-CZ3AskK0.js} +1 -1
  51. package/dist/website/assets/{ConnectorUtil-DaRsDYoB.js → ConnectorUtil-DhfSckTl.js} +1 -1
  52. package/dist/website/assets/{ConnectorUtil-DdfNBWZU.js → ConnectorUtil-Dr-Sj5Xi.js} +1 -1
  53. package/dist/website/assets/{ConstantsUtil-fZnrIu9U.js → ConstantsUtil-KBrAwQeh.js} +1 -1
  54. package/dist/website/assets/{ConstantsUtil-BRcDxkmi.js → ConstantsUtil-cWzo_bL6.js} +1 -1
  55. package/dist/website/assets/{EnsController-mVupdCk3.js → EnsController-DCvEdmLX.js} +1 -1
  56. package/dist/website/assets/{ErrorUtil-DvzHlG5i.js → ErrorUtil-CqiPmwUQ.js} +1 -1
  57. package/dist/website/assets/{HelpersUtil-CDNW2Itr.js → HelpersUtil-5BtTobdy.js} +1 -1
  58. package/dist/website/assets/{OnRampController-zR3Eg9Lb.js → OnRampController-Bja8dlwC.js} +1 -1
  59. package/dist/website/assets/{ProviderUtil-CSca7Bc2.js → ProviderUtil-B7GUQMp6.js} +1 -1
  60. package/dist/website/assets/{SIWXUtil-6dcrtQP6.js → SIWXUtil-WhCFYYeb.js} +1 -1
  61. package/dist/website/assets/{SIWXUtil-CikouSg3.js → SIWXUtil-cetRK2TM.js} +1 -1
  62. package/dist/website/assets/{SwapController-CA8FjUeg.js → SwapController-CM-1PbEv.js} +1 -1
  63. package/dist/website/assets/{W3mFrameHelpers-Ck9yu4pb.js → W3mFrameHelpers-B8kV5Q0n.js} +1 -1
  64. package/dist/website/assets/{W3mFrameProvider-DfcFoA3B.js → W3mFrameProvider-ohY0LTwE.js} +1 -1
  65. package/dist/website/assets/{add-8n0zSoWt.js → add-DM2nvQT-.js} +1 -1
  66. package/dist/website/assets/{all-wallets-CZgEQ_8C.js → all-wallets-CbBymuk3.js} +1 -1
  67. package/dist/website/assets/{app-store-DvXsDq9r.js → app-store-DDxmj9Lx.js} +1 -1
  68. package/dist/website/assets/{apple-GZlzW650.js → apple-Dn7auf4q.js} +1 -1
  69. package/dist/website/assets/{arrow-bottom-tnog9Vhw.js → arrow-bottom-Bb9Or_Vr.js} +1 -1
  70. package/dist/website/assets/{arrow-bottom-circle-j8xr3qhF.js → arrow-bottom-circle-Dtsu395i.js} +1 -1
  71. package/dist/website/assets/{arrow-left-BR73rwFp.js → arrow-left-urUveqA6.js} +1 -1
  72. package/dist/website/assets/{arrow-right-BuoaNM6r.js → arrow-right-Cy0Ygemc.js} +1 -1
  73. package/dist/website/assets/{arrow-top-3HeVqrTn.js → arrow-top-CMkFVUPL.js} +1 -1
  74. package/dist/website/assets/{bank-BMOvHygc.js → bank-BfpbjcJU.js} +1 -1
  75. package/dist/website/assets/{basic-myS4JgJ0.js → basic-BOLR86Me.js} +1 -1
  76. package/dist/website/assets/{basic-CFWydhJA.js → basic-CelNIwvX.js} +1 -1
  77. package/dist/website/assets/{browser-BXu6SRdK.js → browser-DjOYXDTm.js} +1 -1
  78. package/dist/website/assets/{browser-9eOj1g61.js → browser-MeMHJ-8U.js} +1 -1
  79. package/dist/website/assets/{build-DbM8T8c9.js → build-CWk0QocV.js} +1 -1
  80. package/dist/{bundle/build-Z489QYQJ.js → website/assets/build-CpWkW2tw.js} +1 -1
  81. package/dist/website/assets/{card-CvTZC_8L.js → card-BGKYxgPZ.js} +1 -1
  82. package/dist/website/assets/{cardano-connector-C_muiVsd.js → cardano-connector-BYu3bSHH.js} +1 -1
  83. package/dist/website/assets/{ccip-CcZo2Fpk.js → ccip-DQel3KVV.js} +1 -1
  84. package/dist/website/assets/{ccip-tbBiP3Dz.js → ccip-DfRE0PKO.js} +1 -1
  85. package/dist/website/assets/{checkmark-C13udN5Q.js → checkmark-B54WvXLf.js} +1 -1
  86. package/dist/website/assets/{checkmark-bold-wLzOfJZ0.js → checkmark-bold-CCJMCK3Y.js} +1 -1
  87. package/dist/website/assets/{chevron-bottom-C4Kw4oUb.js → chevron-bottom-hwdmvWLF.js} +1 -1
  88. package/dist/website/assets/{chevron-left-Dm0ksS2E.js → chevron-left-CN6NEo1b.js} +1 -1
  89. package/dist/website/assets/{chevron-right-zYUb5bDP.js → chevron-right-CWf6ew-m.js} +1 -1
  90. package/dist/website/assets/{chevron-top-D7uyjciW.js → chevron-top-BfSjLB5_.js} +1 -1
  91. package/dist/website/assets/{chrome-store-cdiN0IyG.js → chrome-store-ClZGfzcx.js} +1 -1
  92. package/dist/website/assets/{clock-DK84tN8N.js → clock-DSZaUPCM.js} +1 -1
  93. package/dist/website/assets/{close-D6qsR_P7.js → close-o8u0_8yN.js} +1 -1
  94. package/dist/website/assets/{coinPlaceholder-sLFUGuQp.js → coinPlaceholder-XznZsK4p.js} +1 -1
  95. package/dist/website/assets/{compass-Dt478IJg.js → compass-YEYH0wOn.js} +1 -1
  96. package/dist/website/assets/{copy-sUG2jNjJ.js → copy-pInvOcim.js} +1 -1
  97. package/dist/website/assets/{core-DGhf5Owi.js → core-CfyKWiQv.js} +2 -2
  98. package/dist/website/assets/cursor-BkSthN9t.js +3 -0
  99. package/dist/website/assets/{cursor-transparent-BhKJkrPt.js → cursor-transparent-D3AJK0My.js} +1 -1
  100. package/dist/website/assets/{data-capture-BMbc2_PH.js → data-capture-DU463HBK.js} +1 -1
  101. package/dist/website/assets/{decode-XNepIc6v.js → decode-DmPUixTK.js} +3 -3
  102. package/dist/website/assets/{desktop-C8MpypxK.js → desktop-D9coRt6t.js} +1 -1
  103. package/dist/website/assets/{disconnect-DtDN7daS.js → disconnect-BP3wbEyx.js} +1 -1
  104. package/dist/website/assets/{discord-QWpY_3BZ.js → discord-Bue5RU-6.js} +1 -1
  105. package/dist/website/assets/dist-C582ZtDs.js +1 -0
  106. package/dist/website/assets/{dist-BV2fmIQl.js → dist-DZQMP5L_.js} +2 -2
  107. package/dist/website/assets/{email-Bdyjfw-1.js → email-BYn06MIp.js} +1 -1
  108. package/dist/website/assets/{embedded-wallet-CoS-5Uth.js → embedded-wallet-DHUvMYek.js} +1 -1
  109. package/dist/website/assets/en_US-IFPOGBSL-BK5IEFRX.js +1 -0
  110. package/dist/website/assets/{esm-ERsoOQ9y.js → esm-ONCreVwv.js} +1 -1
  111. package/dist/website/assets/{etherscan-CH4C08Og.js → etherscan-DQBoFKLv.js} +1 -1
  112. package/dist/website/assets/{exclamation-triangle-BSxl84FF.js → exclamation-triangle-kDYUulbA.js} +1 -1
  113. package/dist/website/assets/{exports-JNRgcf-r.js → exports-BvOrlL9b.js} +1 -1
  114. package/dist/website/assets/{exports-Cl6RAY1Q.js → exports-CzRzpkCO.js} +1 -1
  115. package/dist/website/assets/{exports-B9Pw3cj2.js → exports-DFrhs9-4.js} +1 -1
  116. package/dist/website/assets/{extension-CP45VJnn.js → extension-7ZdOFRsz.js} +1 -1
  117. package/dist/website/assets/{external-link-CtDMyV_K.js → external-link-tgLj5Ewp.js} +1 -1
  118. package/dist/website/assets/{facebook-Crz6X9gg.js → facebook-l5ej5aLA.js} +1 -1
  119. package/dist/website/assets/{farcaster-Df4-Pp3Z.js → farcaster-B4by4dn_.js} +1 -1
  120. package/dist/website/assets/{features-DDNuqQ4C.js → features-DQXem-4z.js} +1 -1
  121. package/dist/website/assets/{filters-DDCtxBrn.js → filters-DcZXEY3g.js} +1 -1
  122. package/dist/website/assets/{github-DbYOVtqT.js → github-BDsHglT5.js} +1 -1
  123. package/dist/website/assets/{google-1BSMH8E-.js → google-Jkx1oZdL.js} +1 -1
  124. package/dist/website/assets/{help-circle-DrNe6qj7.js → help-circle-CFwJ8FAj.js} +1 -1
  125. package/dist/website/assets/{id-C-sagMdh.js → id-XqBLPO2G.js} +1 -1
  126. package/dist/website/assets/{image-DtElFp4Y.js → image-lo_miGZb.js} +1 -1
  127. package/dist/website/assets/{index-Df3qcnRy.js → index--r1G5ij4.js} +8 -8
  128. package/dist/website/assets/{index.es-CxlQAn5S.js → index.es-B5D3HtzA.js} +1 -1
  129. package/dist/website/assets/{index.es-DwDX0D6n.js → index.es-CoCSILjf.js} +2 -2
  130. package/dist/website/assets/{info-circle-B_M3A6w3.js → info-circle-DmYANINU.js} +1 -1
  131. package/dist/website/assets/{info-z8hrOu6P.js → info-eVFjXpEa.js} +1 -1
  132. package/dist/website/assets/{ledger-connector-B2SyUFPi.js → ledger-connector-BD7bNK8U.js} +1 -1
  133. package/dist/website/assets/{lightbulb-Co2k7Lz3.js → lightbulb-CNNrGCtj.js} +1 -1
  134. package/dist/website/assets/{localBatchGatewayRequest-BX1SDCRT.js → localBatchGatewayRequest-gb19_uU1.js} +3 -3
  135. package/dist/website/assets/{mail-B0V2obJI.js → mail-CtNG1vZT.js} +1 -1
  136. package/dist/website/assets/{mobile-BNu_yxHf.js → mobile-AWJ5nLmy.js} +1 -1
  137. package/dist/website/assets/{more-C5mME45o.js → more-DfEQIkwx.js} +1 -1
  138. package/dist/website/assets/name-service-tewBv0Xj.js +1 -0
  139. package/dist/website/assets/{network-placeholder-B140DISA.js → network-placeholder-NmjG-bQA.js} +1 -1
  140. package/dist/website/assets/{nftPlaceholder-BA-KEOI4.js → nftPlaceholder-5eI3PZnu.js} +1 -1
  141. package/dist/website/assets/{off-DYT0HW2y.js → off-B-dZyTnf.js} +1 -1
  142. package/dist/website/assets/{onramp-B86Uxabn.js → onramp-BqLRcbU9.js} +1 -1
  143. package/dist/website/assets/{p256-mV6uWy_F.js → p256-CAvUfeCP.js} +1 -1
  144. package/dist/website/assets/{pay-with-exchange-Ci1fJF9C.js → pay-with-exchange-BB04DYim.js} +1 -1
  145. package/dist/website/assets/{play-store-DJvTk1V0.js → play-store-BUU7RrlP.js} +1 -1
  146. package/dist/website/assets/{plus-BXC5vq-0.js → plus-Bs4s1rv1.js} +1 -1
  147. package/dist/website/assets/{qr-code-DW-VBpT0.js → qr-code-bQtPB-Gz.js} +1 -1
  148. package/dist/website/assets/{receive-kh6a9nq_.js → receive-Czcadidc.js} +1 -1
  149. package/dist/website/assets/{recycle-horizontal-n9mD83wS.js → recycle-horizontal-Cx8_xLt7.js} +1 -1
  150. package/dist/website/assets/{refresh-DQKyv14D.js → refresh-DZ2CzY4A.js} +1 -1
  151. package/dist/website/assets/{registry-BVCSWVxM.js → registry-CCoDEOty.js} +1 -1
  152. package/dist/website/assets/{reown-logo-_oyKlw_B.js → reown-logo-Bc69tk_B.js} +1 -1
  153. package/dist/website/assets/{safe-connector-tu0CEuPs.js → safe-connector-ChHN6PFH.js} +1 -1
  154. package/dist/website/assets/{search-DZBY0SV8.js → search-BMdCijEz.js} +1 -1
  155. package/dist/website/assets/{send-DVhV-fml.js → send-Cml8YGtH.js} +1 -1
  156. package/dist/website/assets/{send-CZrkBquG.js → send-welRl4pB.js} +1 -1
  157. package/dist/website/assets/{socials-Ce3JBjG9.js → socials-lvk_JwAC.js} +1 -1
  158. package/dist/website/assets/{solana-connector-Bfis347u.js → solana-connector-C-tqKpo-.js} +1 -1
  159. package/dist/website/assets/{substrate-connector-D5z4oo_G.js → substrate-connector-C0UxydKR.js} +2 -2
  160. package/dist/website/assets/{swapHorizontal-C61iNGv-.js → swapHorizontal-XLOsaD8E.js} +1 -1
  161. package/dist/website/assets/{swapHorizontalBold-7_y3kYSs.js → swapHorizontalBold-rltpBI6G.js} +1 -1
  162. package/dist/website/assets/{swapHorizontalMedium-2z9azSx2.js → swapHorizontalMedium-B66Ecuau.js} +1 -1
  163. package/dist/website/assets/{swapHorizontalRoundedBold-DPiVhN-O.js → swapHorizontalRoundedBold-D-nAnu47.js} +1 -1
  164. package/dist/website/assets/{swapVertical-Fc8jF_6a.js → swapVertical-DXYw64Gv.js} +1 -1
  165. package/dist/website/assets/{swaps-D7h2vN4O.js → swaps-DcF_cAL3.js} +1 -1
  166. package/dist/website/assets/{telegram-s8DNJhqL.js → telegram-D6f1t_w1.js} +1 -1
  167. package/dist/website/assets/{three-dots-DUPBzsjQ.js → three-dots-Ct4Bt9fa.js} +1 -1
  168. package/dist/website/assets/{ton-connector-b37k02lA.js → ton-connector-DX6PEEu6.js} +1 -1
  169. package/dist/website/assets/{transactions-BRUgq8XT.js → transactions-NlQoRKDN.js} +1 -1
  170. package/dist/website/assets/{tron-connector-ox8kl_zv.js → tron-connector-DnNZm1ad.js} +3 -3
  171. package/dist/website/assets/{twitch-Caz90Rn_.js → twitch-D6l2ucO_.js} +1 -1
  172. package/dist/website/assets/{twitterIcon-BxKf8Jh_.js → twitterIcon-B_BwiCHt.js} +1 -1
  173. package/dist/website/assets/tx-M8zFD10L.js +1 -0
  174. package/dist/website/assets/{utils-CGAMSRtW.js → utils-yNiv3ygK.js} +1 -1
  175. package/dist/website/assets/{verify-wZntm1qK.js → verify-Dqnc4oTE.js} +1 -1
  176. package/dist/website/assets/{verify-filled-Dn15pE3Y.js → verify-filled-CMUc8_Tu.js} +1 -1
  177. package/dist/website/assets/{w3m-activity-list-CSy1D7Px.js → w3m-activity-list-OGYrJa_i.js} +1 -1
  178. package/dist/website/assets/{w3m-email-otp-widget-ZZK1MWCg.js → w3m-email-otp-widget-CQKNfGsf.js} +1 -1
  179. package/dist/website/assets/{w3m-legal-footer-CyRmKgcT.js → w3m-legal-footer-QkjY632O.js} +1 -1
  180. package/dist/website/assets/{w3m-modal-C74Z-Wde.js → w3m-modal-K5qblTEQ.js} +1 -1
  181. package/dist/website/assets/{w3m-modal-BmJeZR8F.js → w3m-modal-VMveiR8F.js} +1 -1
  182. package/dist/website/assets/{w3m-modal-ClrTQhCp.js → w3m-modal-XAHgBJGP.js} +1 -1
  183. package/dist/website/assets/{w3m-router-D2i1-9eU.js → w3m-router-o5zv6Iwe.js} +1 -1
  184. package/dist/website/assets/{w3m-tooltip-B65dDAf0.js → w3m-tooltip-Cf2MoT2S.js} +1 -1
  185. package/dist/website/assets/{w3m-tooltip-trigger-Dkf1to8X.js → w3m-tooltip-trigger-DANArbtb.js} +1 -1
  186. package/dist/website/assets/{wallet-CiIFi6Ow.js → wallet-CwzDEuji.js} +1 -1
  187. package/dist/website/assets/{wallet-manager-BahrWHsh.js → wallet-manager-DlDW8sTG.js} +4 -4
  188. package/dist/website/assets/{wallet-placeholder-CS75xGdX.js → wallet-placeholder-lvbGOM19.js} +1 -1
  189. package/dist/website/assets/{walletconnect-C8bigzxh.js → walletconnect-1RONYn1c.js} +1 -1
  190. package/dist/website/assets/{warning-circle-CU03RvAv.js → warning-circle-rLUGv8BB.js} +1 -1
  191. package/dist/website/assets/{wui-button-El6Iki-c.js → wui-button-RbojCS_V.js} +1 -1
  192. package/dist/website/assets/{wui-chip-button-r2MeEzUd.js → wui-chip-button-DJqoVDqs.js} +1 -1
  193. package/dist/website/assets/{wui-email-input-KVuJsbZ7.js → wui-email-input-BDTuv7qX.js} +1 -1
  194. package/dist/website/assets/wui-icon-CX2U1cQN.js +1 -0
  195. package/dist/website/assets/{wui-icon-CWzpC6lY.js → wui-icon-DGvilNiQ.js} +1 -1
  196. package/dist/website/assets/wui-icon-box-DVQU4OBo.js +1 -0
  197. package/dist/website/assets/{wui-icon-box-DUCAMlgp.js → wui-icon-box-DcWR69zt.js} +1 -1
  198. package/dist/website/assets/{wui-icon-link-NP-6zNqd.js → wui-icon-link-DHSEK3F6.js} +1 -1
  199. package/dist/website/assets/{wui-image-DDLPZ8QL.js → wui-image-C7Cs2dFG.js} +1 -1
  200. package/dist/website/assets/wui-image-Z7-7hOwu.js +1 -0
  201. package/dist/website/assets/wui-input-text-D3nDS5vo.js +1 -0
  202. package/dist/website/assets/{wui-input-text-DGKNu3Vs.js → wui-input-text-DNXtkc3b.js} +1 -1
  203. package/dist/website/assets/{wui-link-Dx14km_P.js → wui-link-B3ACN9m1.js} +1 -1
  204. package/dist/website/assets/{wui-list-item-D48C89uG.js → wui-list-item-IkfIdqB_.js} +1 -1
  205. package/dist/website/assets/{wui-list-social-CS4muZ7_.js → wui-list-social-1TJN_kN9.js} +1 -1
  206. package/dist/website/assets/{wui-list-token-SM4Gg8uh.js → wui-list-token-BEOVjAxO.js} +1 -1
  207. package/dist/website/assets/wui-loading-spinner-DYStep66.js +1 -0
  208. package/dist/website/assets/{wui-loading-spinner-E_XVq0Ku.js → wui-loading-spinner-Dit3fDIZ.js} +1 -1
  209. package/dist/website/assets/{wui-loading-thumbnail-DZDea1B9.js → wui-loading-thumbnail-CgsJwZcw.js} +1 -1
  210. package/dist/website/assets/{wui-qr-code-CKi_M-xO.js → wui-qr-code-aMc5Qnn_.js} +1 -1
  211. package/dist/website/assets/{wui-separator-Cif5cLAA.js → wui-separator-tSBrE8qX.js} +1 -1
  212. package/dist/website/assets/wui-shimmer-BJS_0nwN.js +1 -0
  213. package/dist/website/assets/{wui-shimmer-C1HyYtrS.js → wui-shimmer-Bdko9qLE.js} +1 -1
  214. package/dist/website/assets/{wui-tag-BmR8aESq.js → wui-tag-2uJXk-g0.js} +1 -1
  215. package/dist/website/assets/{wui-text-CkYfVs2Q.js → wui-text-CwFmUhFG.js} +1 -1
  216. package/dist/website/assets/{wui-text-BTGzDPZb.js → wui-text-DkRtRoYA.js} +1 -1
  217. package/dist/website/assets/{wui-text-D7fAhGZ-.js → wui-text-NSwyfOcr.js} +3 -3
  218. package/dist/website/assets/{wui-token-button-BZHb2bII.js → wui-token-button-Fd4nqF_T.js} +1 -1
  219. package/dist/website/assets/{wui-visual-Dmg8Q6ZO.js → wui-visual-Dqd3OHrH.js} +1 -1
  220. package/dist/website/assets/{wui-wallet-image-D2jDLEip.js → wui-wallet-image-BbrxI49C.js} +1 -1
  221. package/dist/website/assets/{x-g7NuP_zt.js → x-B927Ooe7.js} +1 -1
  222. package/dist/website/index.html +1 -1
  223. package/package.json +1 -1
  224. package/dist/bundle/dist-Dg6gWrxW.js +0 -1
  225. package/dist/bundle/name-service-C5U_6bCa.js +0 -1
  226. package/dist/bundle/networks-DkZQuO0f.js +0 -1
  227. package/dist/bundle/tx-J4VM1ks9.js +0 -1
  228. package/dist/package/dist-Ird-eHMD.js +0 -3
  229. package/dist/package/name-service-DZL_wu3E.js +0 -3
  230. package/dist/package/tx-BMW2v_GY.js +0 -3
  231. package/dist/website/assets/cursor-DTyK8ya2.js +0 -3
  232. package/dist/website/assets/dist-DvvuyouA.js +0 -1
  233. package/dist/website/assets/en_US-IFPOGBSL-CpUUm4oA.js +0 -1
  234. package/dist/website/assets/name-service-_X3z8z-1.js +0 -1
  235. package/dist/website/assets/tx-D_pX3LCM.js +0 -1
  236. package/dist/website/assets/wui-icon-BSkhJpAH.js +0 -1
  237. package/dist/website/assets/wui-icon-box-aq-ZFyFc.js +0 -1
  238. package/dist/website/assets/wui-image-DTA4cjmw.js +0 -1
  239. package/dist/website/assets/wui-input-text-CZWEFoh2.js +0 -1
  240. package/dist/website/assets/wui-loading-spinner-CKB70hw4.js +0 -1
  241. package/dist/website/assets/wui-shimmer-CSJ2ENlN.js +0 -1
@@ -1,4 +1,4 @@
1
- import{s as e,t}from"./chunk-CJJwijRH.js";import{G as n,H as r,S as i,U as a,W as o,n as s,t as c,w as l,z as u}from"./createConnector-BkcvlarK.js";import{I as d,K as f,O as p,a as m,t as h}from"./ledger-live-connector-meta-DPFZoSjd.js";import{n as g}from"./MaybeAsync-CX7KsWzr.js";import{t as _}from"./images-BvVHcgJ_.js";import{r as v,t as y}from"./dist-BQMAk709.js";import{a as b,n as x,r as S,t as C}from"./networks-DkZQuO0f.js";import{t as ee}from"./toBytes-95hyeuU1.js";import{a as w,c as te,d as T,f as E,o as D,u as ne}from"./transaction-D6Q02zs-.js";import{t as re}from"./events-H7eok89L.js";import{t as ie}from"./lib-es-5LFNYQ9J.js";import{t as ae}from"./registry-DLj6GbFZ.js";var oe=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,se=Math.ceil,ce=Math.floor,O=`[BigNumber Error] `,le=O+`Number primitive has more than 15 significant digits: `,ue=0x5af3107a4000,k=14,de=9007199254740991,fe=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],pe=1e7,A=1e9;function me(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!oe.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(j(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(le+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>de||e!==ce(e)))throw Error(le+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%k,l<0&&(f+=k),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=k;f<m;)y.c.push(+h.slice(f,f+=k));f=k-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=me,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],j(n,0,A,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],j(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(j(n[0],-A,0,t),j(n[1],0,A,t),c=n[0],l=n[1]):(j(n,-A,A,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)j(n[0],-A,-1,t),j(n[1],1,A,t),u=n[0],d=n[1];else if(j(n,-A,A,t),n)u=-(d=n<0?-n:n);else throw Error(O+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(O+`crypto unavailable`);else f=n;else throw Error(O+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],j(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],j(n,0,A,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(O+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(O+t+` invalid: `+n)}else throw Error(O+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-A&&i<=A&&i===ce(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%k,t<1&&(t+=k),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=ue||n!==ce(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(O+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return ce(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:j(e,0,A),s=se(e/k),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(O+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=k,s&&e&&(c=fe[k-e],u[l]=ce(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=k);for(l=1,c=u[0];c>=10;c/=10,l++);l<k&&(i-=k-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(be(ge(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?be(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=be(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%pe,u=t/pe|0;for(e=e.slice();c--;)a=e[c]%pe,o=e[c]/pe|0,r=u*a+o*l,i=l*a+r%pe*pe+s,s=(i/n|0)+(r/pe|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,ee,w,te,T=r.s==i.s?1:-1,E=r.c,D=i.c;if(!E||!E[0]||!D||!D[0])return new v(!r.s||!i.s||(E?D&&E[0]==D[0]:!D)?NaN:E&&E[0]==0||!D?T*0:T/0);for(h=new v(T),g=h.c=[],l=r.e-i.e,T=a+l+1,s||(s=ue,l=he(r.e/k)-he(i.e/k),T=T/k|0),u=0;D[u]==(E[u]||0);u++);if(D[u]>(E[u]||0)&&l--,T<0)g.push(1),d=!0;else{for(C=E.length,w=D.length,u=0,T+=2,f=ce(s/(D[0]+1)),f>1&&(D=e(D,f,s),E=e(E,f,s),w=D.length,C=E.length),x=w,_=E.slice(0,w),y=_.length;y<w;_[y++]=0);te=D.slice(),te=[0].concat(te),ee=D[0],D[1]>=s/2&&ee++;do{if(f=0,c=t(D,_,w,y),c<0){if(b=_[0],w!=y&&(b=b*s+(_[1]||0)),f=ce(b/ee),f>1)for(f>=s&&(f=s-1),p=e(D,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,w<m?te:D,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=D.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(D,_,w,y)<1;)f++,n(_,w<y?te:D,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=E[x]||0:(_=[E[x]],y=1)}while((x++<C||_[0]!=null)&&T--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==ue){for(u=1,T=g[0];T>=10;T/=10,u++);S(h,a+(h.e=u+l*k-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:j(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=ge(e.c),d=r==1||r==2&&(o<=c||o>=l)?ye(d,o):be(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=ge(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=ye(d,a)}else if(t-=o+(r===2&&a>o),d=be(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=_e(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*k-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(O+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=fe;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=k,o=t,c=p[l=0],f=ce(c/m[i-o-1]%10);else if(l=se((a+1)/k),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=k,o=a-k+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=k,o=a-k+i,f=o<0?0:ce(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(k-t%k)%k],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[k-a],p[l]=o>0?ce(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==ue&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=ue)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=ge(e.c),t=n<=c||n>=l?ye(t,n):be(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return _e(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return j(e,0,A),t==null?t=s:j(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-he(this.e/k))*k,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(O+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-ve(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&ve(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=se(m/k+2));for(l?(n=new v(.5),u&&(e.s=1),d=ve(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=ce(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=ve(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:j(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return _e(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return _e(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=_e(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&he(this.e/k)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return _e(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=_e(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/k,u=e.e/k,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=he(l),u=he(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=ue-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=ue}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=he(_.e/k)+he(e.e/k),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=ue,g=pe,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/k,o=e.e/k,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=he(a),o=he(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/ue|0,s[t]=ue===s[t]?0:s[t]%ue;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return j(e,1,A),t==null?t=s:j(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*k+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return j(e,-de,de),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=ge(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=he((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),ge(a.c).slice(0,u)===(n=ge(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(j(e,0,A),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(j(e,0,A),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(O+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(O+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=ge(y),c=n.e=g.length-_.e-1,n.c[0]=fe[(l=c%k)<0?k+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&j(e,1,A),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?ye(ge(r.c),a):be(ge(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=be(ge(r.c),r.e,`0`)):(j(e,2,g.length,`Base`),t=n(be(ge(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function he(e){var t=e|0;return e>0||e===t?t:t-1}function ge(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=k-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function _e(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function j(e,t,n,r){if(e<t||e>n||e!==ce(e))throw Error(O+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function ve(e){var t=e.c.length-1;return he(e.e/k)==t&&e.c[t]%2!=0}function ye(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function be(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var M=me(),xe;function N(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Se=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ce=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(xe=globalThis).__zod_globalConfig??(xe.__zod_globalConfig={});var we=globalThis.__zod_globalConfig;function Te(e){return e&&Object.assign(we,e),we}function Ee(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function De(e,t){return typeof t==`bigint`?t.toString():t}function Oe(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ke(e){return e==null}function Ae(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function je(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Me=Symbol(`evaluating`);function P(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Me)return r===void 0&&(r=Me,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ne(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Pe(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Fe(e){return JSON.stringify(e)}function Ie(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Le=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Re(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ze=Oe(()=>{if(we.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Be(e){if(Re(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Re(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ve(e){return Be(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var He=new Set([`string`,`number`,`symbol`]);function Ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function We(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function F(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ge(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ke={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function qe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return We(e,Pe(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ne(this,`shape`,e),e},checks:[]}))}function Je(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return We(e,Pe(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ne(this,`shape`,r),r},checks:[]}))}function Ye(e,t){if(!Be(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return We(e,Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ne(this,`shape`,n),n}}))}function Xe(e,t){if(!Be(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return We(e,Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ne(this,`shape`,n),n}}))}function Ze(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return We(e,Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ne(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Qe(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return We(t,Pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ne(this,`shape`,i),i},checks:[]}))}function $e(e,t,n){return We(t,Pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ne(this,`shape`,i),i}}))}function et(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function tt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function nt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rt(e){return typeof e==`string`?e:e?.message}function it(e,t,n){let r=e.message?e.message:rt(e.inst?._zod.def?.error?.(e))??rt(t?.error?.(e))??rt(n.customError?.(e))??rt(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function at(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ot(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var st=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,De,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ct=N(`$ZodError`,st),lt=N(`$ZodError`,st,{Parent:Error});function ut(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function dt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var ft=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Se;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>it(e,a,Te())));throw Le(t,i?.callee),t}return o.value},pt=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>it(e,a,Te())));throw Le(t,i?.callee),t}return o.value},mt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Se;return a.issues.length?{success:!1,error:new(e??ct)(a.issues.map(e=>it(e,i,Te())))}:{success:!0,data:a.value}},ht=mt(lt),gt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>it(e,i,Te())))}:{success:!0,data:a.value}},_t=gt(lt),vt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ft(e)(t,n,i)},yt=e=>(t,n,r)=>ft(e)(t,n,r),bt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pt(e)(t,n,i)},xt=e=>async(t,n,r)=>pt(e)(t,n,r),St=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mt(e)(t,n,i)},Ct=e=>(t,n,r)=>mt(e)(t,n,r),wt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gt(e)(t,n,i)},Tt=e=>async(t,n,r)=>gt(e)(t,n,r),Et=/^[cC][0-9a-z]{6,}$/,Dt=/^[0-9a-z]+$/,Ot=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kt=/^[0-9a-vA-V]{20}$/,At=/^[A-Za-z0-9]{27}$/,jt=/^[a-zA-Z0-9_-]{21}$/,Mt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ft=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,It=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Lt(){return new RegExp(It,`u`)}var Rt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Bt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ht=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ut=/^[A-Za-z0-9_-]*$/,Wt=/^https?$/,Gt=/^\+[1-9]\d{6,14}$/,Kt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,qt=RegExp(`^${Kt}$`);function Jt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yt(e){return RegExp(`^${Jt(e)}$`)}function Xt(e){let t=Jt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Kt}T(?:${r})$`)}var Zt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Qt=/^-?\d+$/,$t=/^-?\d+(?:\.\d+)?$/,en=/^(?:true|false)$/i,tn=/^null$/i,nn=/^undefined$/i,rn=/^[^A-Z]*$/,an=/^[^a-z]*$/,on=N(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sn={number:`number`,bigint:`bigint`,object:`date`},cn=N(`$ZodCheckLessThan`,(e,t)=>{on.init(e,t);let n=sn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ln=N(`$ZodCheckGreaterThan`,(e,t)=>{on.init(e,t);let n=sn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),un=N(`$ZodCheckMultipleOf`,(e,t)=>{on.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):je(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dn=N(`$ZodCheckNumberFormat`,(e,t)=>{on.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ke[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Qt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),fn=N(`$ZodCheckMaxLength`,(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ke(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=at(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pn=N(`$ZodCheckMinLength`,(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ke(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=at(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mn=N(`$ZodCheckLengthEquals`,(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ke(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=at(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hn=N(`$ZodCheckStringFormat`,(e,t)=>{var n,r;on.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),gn=N(`$ZodCheckRegex`,(e,t)=>{hn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_n=N(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=rn,hn.init(e,t)}),vn=N(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=an,hn.init(e,t)}),yn=N(`$ZodCheckIncludes`,(e,t)=>{on.init(e,t);let n=Ue(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),bn=N(`$ZodCheckStartsWith`,(e,t)=>{on.init(e,t);let n=RegExp(`^${Ue(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),xn=N(`$ZodCheckEndsWith`,(e,t)=>{on.init(e,t);let n=RegExp(`.*${Ue(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Sn=N(`$ZodCheckOverwrite`,(e,t)=>{on.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Cn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
1
+ import{s as e,t}from"./chunk-CJJwijRH.js";import{G as n,H as r,S as i,U as a,W as o,n as s,t as c,w as l,z as u}from"./createConnector-BkcvlarK.js";import{I as d,K as f,O as p,a as m,t as h}from"./ledger-live-connector-meta-BSOi7ps6.js";import{n as g}from"./MaybeAsync-CX7KsWzr.js";import{t as _}from"./images-BvVHcgJ_.js";import{r as v,t as y}from"./dist-BQMAk709.js";import{a as b,n as x,r as S,t as C}from"./networks-DcV8Uo1h.js";import{t as ee}from"./toBytes-95hyeuU1.js";import{a as w,c as te,d as T,f as E,o as D,u as ne}from"./transaction-D6Q02zs-.js";import{t as re}from"./events-H7eok89L.js";import{t as ie}from"./lib-es-5LFNYQ9J.js";import{t as ae}from"./registry-DLj6GbFZ.js";var oe=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,se=Math.ceil,ce=Math.floor,O=`[BigNumber Error] `,le=O+`Number primitive has more than 15 significant digits: `,ue=0x5af3107a4000,k=14,de=9007199254740991,fe=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,0xe8d4a51000,0x9184e72a000],pe=1e7,A=1e9;function me(e){var t,n,r,i=v.prototype={constructor:v,toString:null,valueOf:null},a=new v(1),o=20,s=4,c=-7,l=21,u=-1e7,d=1e7,f=!1,p=1,m=0,h={prefix:``,groupSize:3,secondaryGroupSize:0,groupSeparator:`,`,decimalSeparator:`.`,fractionGroupSize:0,fractionGroupSeparator:`\xA0`,suffix:``},g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=!0;function v(e,t){var i,a,c,l,f,p,m,h,y=this;if(!(y instanceof v))return new v(e,t);if(t==null){if(e&&e._isBigNumber===!0){y.s=e.s,!e.c||e.e>d?y.c=y.e=null:e.e<u?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice());return}if((p=typeof e==`number`)&&e*0==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,f=e;f>=10;f/=10,l++);l>d?y.c=y.e=null:(y.e=l,y.c=[e]);return}h=String(e)}else{if(!oe.test(h=String(e)))return r(y,h,p);y.s=h.charCodeAt(0)==45?(h=h.slice(1),-1):1}(l=h.indexOf(`.`))>-1&&(h=h.replace(`.`,``)),(f=h.search(/e/i))>0?(l<0&&(l=f),l+=+h.slice(f+1),h=h.substring(0,f)):l<0&&(l=h.length)}else{if(j(t,2,g.length,`Base`),t==10&&_)return y=new v(e),S(y,o+y.e+1,s);if(h=String(e),p=typeof e==`number`){if(e*0!=0)return r(y,h,p,t);if(y.s=1/e<0?(h=h.slice(1),-1):1,v.DEBUG&&h.replace(/^0\.0*|\./,``).length>15)throw Error(le+e)}else y.s=h.charCodeAt(0)===45?(h=h.slice(1),-1):1;for(i=g.slice(0,t),l=f=0,m=h.length;f<m;f++)if(i.indexOf(a=h.charAt(f))<0){if(a==`.`){if(f>l){l=m;continue}}else if(!c&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){c=!0,f=-1,l=0;continue}return r(y,String(e),p,t)}p=!1,h=n(h,t,10,y.s),(l=h.indexOf(`.`))>-1?h=h.replace(`.`,``):l=h.length}for(f=0;h.charCodeAt(f)===48;f++);for(m=h.length;h.charCodeAt(--m)===48;);if(h=h.slice(f,++m)){if(m-=f,p&&v.DEBUG&&m>15&&(e>de||e!==ce(e)))throw Error(le+y.s*e);if((l=l-f-1)>d)y.c=y.e=null;else if(l<u)y.c=[y.e=0];else{if(y.e=l,y.c=[],f=(l+1)%k,l<0&&(f+=k),f<m){for(f&&y.c.push(+h.slice(0,f)),m-=k;f<m;)y.c.push(+h.slice(f,f+=k));f=k-(h=h.slice(f)).length}else f-=m;for(;f--;h+=`0`);y.c.push(+h)}}else y.c=[y.e=0]}v.clone=me,v.ROUND_UP=0,v.ROUND_DOWN=1,v.ROUND_CEIL=2,v.ROUND_FLOOR=3,v.ROUND_HALF_UP=4,v.ROUND_HALF_DOWN=5,v.ROUND_HALF_EVEN=6,v.ROUND_HALF_CEIL=7,v.ROUND_HALF_FLOOR=8,v.EUCLID=9,v.config=v.set=function(e){var t,n;if(e!=null)if(typeof e==`object`){if(e.hasOwnProperty(t=`DECIMAL_PLACES`)&&(n=e[t],j(n,0,A,t),o=n),e.hasOwnProperty(t=`ROUNDING_MODE`)&&(n=e[t],j(n,0,8,t),s=n),e.hasOwnProperty(t=`EXPONENTIAL_AT`)&&(n=e[t],n&&n.pop?(j(n[0],-A,0,t),j(n[1],0,A,t),c=n[0],l=n[1]):(j(n,-A,A,t),c=-(l=n<0?-n:n))),e.hasOwnProperty(t=`RANGE`))if(n=e[t],n&&n.pop)j(n[0],-A,-1,t),j(n[1],1,A,t),u=n[0],d=n[1];else if(j(n,-A,A,t),n)u=-(d=n<0?-n:n);else throw Error(O+t+` cannot be zero: `+n);if(e.hasOwnProperty(t=`CRYPTO`))if(n=e[t],n===!!n)if(n)if(typeof crypto<`u`&&crypto&&(crypto.getRandomValues||crypto.randomBytes))f=n;else throw f=!n,Error(O+`crypto unavailable`);else f=n;else throw Error(O+t+` not true or false: `+n);if(e.hasOwnProperty(t=`MODULO_MODE`)&&(n=e[t],j(n,0,9,t),p=n),e.hasOwnProperty(t=`POW_PRECISION`)&&(n=e[t],j(n,0,A,t),m=n),e.hasOwnProperty(t=`FORMAT`))if(n=e[t],typeof n==`object`)h=n;else throw Error(O+t+` not an object: `+n);if(e.hasOwnProperty(t=`ALPHABET`))if(n=e[t],typeof n==`string`&&!/^.?$|[+\-.\s]|(.).*\1/.test(n))_=n.slice(0,10)==`0123456789`,g=n;else throw Error(O+t+` invalid: `+n)}else throw Error(O+`Object expected: `+e);return{DECIMAL_PLACES:o,ROUNDING_MODE:s,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:f,MODULO_MODE:p,POW_PRECISION:m,FORMAT:h,ALPHABET:g}},v.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!v.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;out:if({}.toString.call(r)==`[object Array]`){if((a===1||a===-1)&&i>=-A&&i<=A&&i===ce(i)){if(r[0]===0){if(i===0&&r.length===1)return!0;break out}if(t=(i+1)%k,t<1&&(t+=k),String(r[0]).length==t){for(t=0;t<r.length;t++)if(n=r[t],n<0||n>=ue||n!==ce(n))break out;if(n!==0)return!0}}}else if(r===null&&i===null&&(a===null||a===1||a===-1))return!0;throw Error(O+`Invalid BigNumber: `+e)},v.maximum=v.max=function(){return b(arguments,-1)},v.minimum=v.min=function(){return b(arguments,1)},v.random=(function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return ce(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var n,r,i,s,c,l=0,u=[],d=new v(a);if(e==null?e=o:j(e,0,A),s=se(e/k),f)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));l<s;)c=n[l]*131072+(n[l+1]>>>11),c>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(u.push(c%0x5af3107a4000),l+=2);l=s/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(s*=7);l<s;)c=(n[l]&31)*281474976710656+n[l+1]*1099511627776+n[l+2]*4294967296+n[l+3]*16777216+(n[l+4]<<16)+(n[l+5]<<8)+n[l+6],c>=9e15?crypto.randomBytes(7).copy(n,l):(u.push(c%0x5af3107a4000),l+=7);l=s/7}else throw f=!1,Error(O+`crypto unavailable`);if(!f)for(;l<s;)c=t(),c<9e15&&(u[l++]=c%0x5af3107a4000);for(s=u[--l],e%=k,s&&e&&(c=fe[k-e],u[l]=ce(s/c)*c);u[l]===0;u.pop(),l--);if(l<0)u=[i=0];else{for(i=-1;u[0]===0;u.splice(0,1),i-=k);for(l=1,c=u[0];c>=10;c/=10,l++);l<k&&(i-=k-l)}return d.e=i,d.c=u,d}})(),v.sum=function(){for(var e=1,t=arguments,n=new v(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=(function(){var e=`0123456789`;function n(e,t,n,r){for(var i,a=[0],o,s=0,c=e.length;s<c;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(a[i+1]??(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,a,c,l){var u,d,f,p,h,_,y,b,x=r.indexOf(`.`),S=o,C=s;for(x>=0&&(p=m,m=0,r=r.replace(`.`,``),b=new v(i),_=b.pow(r.length-x),m=p,b.c=n(be(ge(_.c),_.e,`0`),10,a,e),b.e=b.c.length),y=n(r,i,a,l?(u=g,e):(u=e,g)),f=p=y.length;y[--p]==0;y.pop());if(!y[0])return u.charAt(0);if(x<0?--f:(_.c=y,_.e=f,_.s=c,_=t(_,b,S,C,a),y=_.c,h=_.r,f=_.e),d=f+S+1,x=y[d],p=a/2,h=h||d<0||y[d+1]!=null,h=C<4?(x!=null||h)&&(C==0||C==(_.s<0?3:2)):x>p||x==p&&(C==4||h||C==6&&y[d-1]&1||C==(_.s<0?8:7)),d<1||!y[0])r=h?be(u.charAt(1),-S,u.charAt(0)):u.charAt(0);else{if(y.length=d,h)for(--a;++y[--d]>a;)y[d]=0,d||(++f,y=[1].concat(y));for(p=y.length;!y[--p];);for(x=0,r=``;x<=p;r+=u.charAt(y[x++]));r=be(r,f,u.charAt(0))}return r}})(),t=(function(){function e(e,t,n){var r,i,a,o,s=0,c=e.length,l=t%pe,u=t/pe|0;for(e=e.slice();c--;)a=e[c]%pe,o=e[c]/pe|0,r=u*a+o*l,i=l*a+r%pe*pe+s,s=(i/n|0)+(r/pe|0)+u*o,e[c]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,u,d,f,p,m,h,g,_,y,b,x,C,ee,w,te,T=r.s==i.s?1:-1,E=r.c,D=i.c;if(!E||!E[0]||!D||!D[0])return new v(!r.s||!i.s||(E?D&&E[0]==D[0]:!D)?NaN:E&&E[0]==0||!D?T*0:T/0);for(h=new v(T),g=h.c=[],l=r.e-i.e,T=a+l+1,s||(s=ue,l=he(r.e/k)-he(i.e/k),T=T/k|0),u=0;D[u]==(E[u]||0);u++);if(D[u]>(E[u]||0)&&l--,T<0)g.push(1),d=!0;else{for(C=E.length,w=D.length,u=0,T+=2,f=ce(s/(D[0]+1)),f>1&&(D=e(D,f,s),E=e(E,f,s),w=D.length,C=E.length),x=w,_=E.slice(0,w),y=_.length;y<w;_[y++]=0);te=D.slice(),te=[0].concat(te),ee=D[0],D[1]>=s/2&&ee++;do{if(f=0,c=t(D,_,w,y),c<0){if(b=_[0],w!=y&&(b=b*s+(_[1]||0)),f=ce(b/ee),f>1)for(f>=s&&(f=s-1),p=e(D,f,s),m=p.length,y=_.length;t(p,_,m,y)==1;)f--,n(p,w<m?te:D,m,s),m=p.length,c=1;else f==0&&(c=f=1),p=D.slice(),m=p.length;if(m<y&&(p=[0].concat(p)),n(_,p,y,s),y=_.length,c==-1)for(;t(D,_,w,y)<1;)f++,n(_,w<y?te:D,y,s),y=_.length}else c===0&&(f++,_=[0]);g[u++]=f,_[0]?_[y++]=E[x]||0:(_=[E[x]],y=1)}while((x++<C||_[0]!=null)&&T--);d=_[0]!=null,g[0]||g.splice(0,1)}if(s==ue){for(u=1,T=g[0];T>=10;T/=10,u++);S(h,a+(h.e=u+l*k-1)+1,o,d)}else h.e=l,h.r=+d;return h}})();function y(e,t,n,r){var i,a,o,u,d;if(n==null?n=s:j(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,t==null)d=ge(e.c),d=r==1||r==2&&(o<=c||o>=l)?ye(d,o):be(d,o,`0`);else if(e=S(new v(e),t,n),a=e.e,d=ge(e.c),u=d.length,r==1||r==2&&(t<=a||a<=c)){for(;u<t;d+=`0`,u++);d=ye(d,a)}else if(t-=o+(r===2&&a>o),d=be(d,a,`0`),a+1>u){if(--t>0)for(d+=`.`;t--;d+=`0`);}else if(t+=a-u,t>0)for(a+1==u&&(d+=`.`);t--;d+=`0`);return e.s<0&&i?`-`+d:d}function b(e,t){for(var n,r,i=1,a=new v(e[0]);i<e.length;i++)r=new v(e[i]),(!r.s||(n=_e(a,r))===t||n===0&&a.s===t)&&(a=r);return a}function x(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*k-1)>d?e.c=e.e=null:n<u?e.c=[e.e=0]:(e.e=n,e.c=t),e}r=(function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,c){var l,u=s?o:o.replace(i,``);if(r.test(u))a.s=isNaN(u)?null:u<0?-1:1;else{if(!s&&(u=u.replace(e,function(e,t,n){return l=(n=n.toLowerCase())==`x`?16:n==`b`?2:8,!c||c==l?t:e}),c&&(l=c,u=u.replace(t,`$1`).replace(n,`0.$1`)),o!=u))return new v(u,l);if(v.DEBUG)throw Error(O+`Not a`+(c?` base `+c:``)+` number: `+o);a.s=null}a.c=a.e=null}})();function S(e,t,n,r){var i,a,o,s,c,l,f,p=e.c,m=fe;if(p){out:{for(i=1,s=p[0];s>=10;s/=10,i++);if(a=t-i,a<0)a+=k,o=t,c=p[l=0],f=ce(c/m[i-o-1]%10);else if(l=se((a+1)/k),l>=p.length)if(r){for(;p.length<=l;p.push(0));c=f=0,i=1,a%=k,o=a-k+1}else break out;else{for(c=s=p[l],i=1;s>=10;s/=10,i++);a%=k,o=a-k+i,f=o<0?0:ce(c/m[i-o-1]%10)}if(r=r||t<0||p[l+1]!=null||(o<0?c:c%m[i-o-1]),r=n<4?(f||r)&&(n==0||n==(e.s<0?3:2)):f>5||f==5&&(n==4||r||n==6&&(a>0?o>0?c/m[i-o]:0:p[l-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,r?(t-=e.e+1,p[0]=m[(k-t%k)%k],e.e=-t||0):p[0]=e.e=0,e;if(a==0?(p.length=l,s=1,l--):(p.length=l+1,s=m[k-a],p[l]=o>0?ce(c/m[i-o]%m[o])*s:0),r)for(;;)if(l==0){for(a=1,o=p[0];o>=10;o/=10,a++);for(o=p[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,p[0]==ue&&(p[0]=1));break}else{if(p[l]+=s,p[l]!=ue)break;p[l--]=0,s=1}for(a=p.length;p[--a]===0;p.pop());}e.e>d?e.c=e.e=null:e.e<u&&(e.c=[e.e=0])}return e}function C(e){var t,n=e.e;return n===null?e.toString():(t=ge(e.c),t=n<=c||n>=l?ye(t,n):be(t,n,`0`),e.s<0?`-`+t:t)}return i.absoluteValue=i.abs=function(){var e=new v(this);return e.s<0&&(e.s=1),e},i.comparedTo=function(e,t){return _e(this,new v(e,t))},i.decimalPlaces=i.dp=function(e,t){var n,r,i,a=this;if(e!=null)return j(e,0,A),t==null?t=s:j(t,0,8),S(new v(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-he(this.e/k))*k,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},i.dividedBy=i.div=function(e,n){return t(this,new v(e,n),o,s)},i.dividedToIntegerBy=i.idiv=function(e,n){return t(this,new v(e,n),0,1)},i.exponentiatedBy=i.pow=function(e,t){var n,r,i,o,c,l,u,d,f,p=this;if(e=new v(e),e.c&&!e.isInteger())throw Error(O+`Exponent not an integer: `+C(e));if(t!=null&&(t=new v(t)),l=e.e>14,!p.c||!p.c[0]||p.c[0]==1&&!p.e&&p.c.length==1||!e.c||!e.c[0])return f=new v(C(p)**(l?e.s*(2-ve(e)):+C(e))),t?f.mod(t):f;if(u=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new v(NaN);r=!u&&p.isInteger()&&t.isInteger(),r&&(p=p.mod(t))}else if(e.e>9&&(p.e>0||p.e<-1||(p.e==0?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return o=p.s<0&&ve(e)?-0:0,p.e>-1&&(o=1/o),new v(u?1/o:o);else m&&(o=se(m/k+2));for(l?(n=new v(.5),u&&(e.s=1),d=ve(e)):(i=Math.abs(+C(e)),d=i%2),f=new v(a);;){if(d){if(f=f.times(p),!f.c)break;o?f.c.length>o&&(f.c.length=o):r&&(f=f.mod(t))}if(i){if(i=ce(i/2),i===0)break;d=i%2}else if(e=e.times(n),S(e,e.e+1,1),e.e>14)d=ve(e);else{if(i=+C(e),i===0)break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?f:(u&&(f=a.div(f)),t?f.mod(t):o?S(f,m,s,c):f)},i.integerValue=function(e){var t=new v(this);return e==null?e=s:j(e,0,8),S(t,t.e+1,e)},i.isEqualTo=i.eq=function(e,t){return _e(this,new v(e,t))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(e,t){return _e(this,new v(e,t))>0},i.isGreaterThanOrEqualTo=i.gte=function(e,t){return(t=_e(this,new v(e,t)))===1||t===0},i.isInteger=function(){return!!this.c&&he(this.e/k)>this.c.length-2},i.isLessThan=i.lt=function(e,t){return _e(this,new v(e,t))<0},i.isLessThanOrEqualTo=i.lte=function(e,t){return(t=_e(this,new v(e,t)))===-1||t===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(e,t){var n,r,i,a,o=this,c=o.s;if(e=new v(e,t),t=e.s,!c||!t)return new v(NaN);if(c!=t)return e.s=-t,o.plus(e);var l=o.e/k,u=e.e/k,d=o.c,f=e.c;if(!l||!u){if(!d||!f)return d?(e.s=-t,e):new v(f?o:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new v(d[0]?o:s==3?-0:0)}if(l=he(l),u=he(u),d=d.slice(),c=l-u){for((a=c<0)?(c=-c,i=d):(u=l,i=f),i.reverse(),t=c;t--;i.push(0));i.reverse()}else for(r=(a=(c=d.length)<(t=f.length))?c:t,c=t=0;t<r;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),t=(r=f.length)-(n=d.length),t>0)for(;t--;d[n++]=0);for(t=ue-1;r>c;){if(d[--r]<f[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=ue}d[r]-=f[r]}for(;d[0]==0;d.splice(0,1),--u);return d[0]?x(e,d,u):(e.s=s==3?-1:1,e.c=[e.e=0],e)},i.modulo=i.mod=function(e,n){var r,i,a=this;return e=new v(e,n),!a.c||!e.s||e.c&&!e.c[0]?new v(NaN):!e.c||a.c&&!a.c[0]?new v(a):(p==9?(i=e.s,e.s=1,r=t(a,e,0,3),e.s=i,r.s*=i):r=t(a,e,0,p),e=a.minus(r.times(e)),!e.c[0]&&p==1&&(e.s=a.s),e)},i.multipliedBy=i.times=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=this,y=_.c,b=(e=new v(e,t)).c;if(!y||!b||!y[0]||!b[0])return!_.s||!e.s||y&&!y[0]&&!b||b&&!b[0]&&!y?e.c=e.e=e.s=null:(e.s*=_.s,!y||!b?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(r=he(_.e/k)+he(e.e/k),e.s*=_.s,c=y.length,d=b.length,c<d&&(m=y,y=b,b=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(h=ue,g=pe,i=d;--i>=0;){for(n=0,f=b[i]%g,p=b[i]/g|0,o=c,a=i+o;a>i;)l=y[--o]%g,u=y[o]/g|0,s=p*l+u*f,l=f*l+s%g*g+m[a]+n,n=(l/h|0)+(s/g|0)+p*u,m[a--]=l%h;m[a]=n}return n?++r:m.splice(0,1),x(e,m,r)},i.negated=function(){var e=new v(this);return e.s=-e.s||null,e},i.plus=function(e,t){var n,r=this,i=r.s;if(e=new v(e,t),t=e.s,!i||!t)return new v(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/k,o=e.e/k,s=r.c,c=e.c;if(!a||!o){if(!s||!c)return new v(i/0);if(!s[0]||!c[0])return c[0]?e:new v(s[0]?r:i*0)}if(a=he(a),o=he(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=c):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for(i=s.length,t=c.length,i-t<0&&(n=c,c=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/ue|0,s[t]=ue===s[t]?0:s[t]%ue;return i&&(s=[i].concat(s),++o),x(e,s,o)},i.precision=i.sd=function(e,t){var n,r,i,a=this;if(e!=null&&e!==!!e)return j(e,1,A),t==null?t=s:j(t,0,8),S(new v(a),e,t);if(!(n=a.c))return null;if(i=n.length-1,r=i*k+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},i.shiftedBy=function(e){return j(e,-de,de),this.times(`1e`+e)},i.squareRoot=i.sqrt=function(){var e,n,r,i,a,c=this,l=c.c,u=c.s,d=c.e,f=o+4,p=new v(`0.5`);if(u!==1||!l||!l[0])return new v(!u||u<0&&(!l||l[0])?NaN:l?c:1/0);if(u=Math.sqrt(+C(c)),u==0||u==1/0?(n=ge(l),(n.length+d)%2==0&&(n+=`0`),u=Math.sqrt(+n),d=he((d+1)/2)-(d<0||d%2),u==1/0?n=`5e`+d:(n=u.toExponential(),n=n.slice(0,n.indexOf(`e`)+1)+d),r=new v(n)):r=new v(u+``),r.c[0]){for(d=r.e,u=d+f,u<3&&(u=0);;)if(a=r,r=p.times(a.plus(t(c,a,f,1))),ge(a.c).slice(0,u)===(n=ge(r.c)).slice(0,u))if(r.e<d&&--u,n=n.slice(u-3,u+1),n==`9999`||!i&&n==`4999`){if(!i&&(S(a,a.e+o+2,0),a.times(a).eq(c))){r=a;break}f+=4,u+=4,i=1}else{(!+n||!+n.slice(1)&&n.charAt(0)==`5`)&&(S(r,r.e+o+2,1),e=!r.times(r).eq(c));break}}return S(r,r.e+o+1,s,e)},i.toExponential=function(e,t){return e!=null&&(j(e,0,A),e++),y(this,e,t,1)},i.toFixed=function(e,t){return e!=null&&(j(e,0,A),e=e+this.e+1),y(this,e,t)},i.toFormat=function(e,t,n){var r,i=this;if(n==null)e!=null&&t&&typeof t==`object`?(n=t,t=null):e&&typeof e==`object`?(n=e,e=t=null):n=h;else if(typeof n!=`object`)throw Error(O+`Argument not an object: `+n);if(r=i.toFixed(e,t),i.c){var a,o=r.split(`.`),s=+n.groupSize,c=+n.secondaryGroupSize,l=n.groupSeparator||``,u=o[0],d=o[1],f=i.s<0,p=f?u.slice(1):u,m=p.length;if(c&&(a=s,s=c,c=a,m-=a),s>0&&m>0){for(a=m%s||s,u=p.substr(0,a);a<m;a+=s)u+=l+p.substr(a,s);c>0&&(u+=l+p.slice(a)),f&&(u=`-`+u)}r=d?u+(n.decimalSeparator||``)+((c=+n.fractionGroupSize)?d.replace(RegExp(`\\d{`+c+`}\\B`,`g`),`$&`+(n.fractionGroupSeparator||``)):d):u}return(n.prefix||``)+r+(n.suffix||``)},i.toFraction=function(e){var n,r,i,o,c,l,u,f,p,m,h,g,_=this,y=_.c;if(e!=null&&(u=new v(e),!u.isInteger()&&(u.c||u.s!==1)||u.lt(a)))throw Error(O+`Argument `+(u.isInteger()?`out of range: `:`not an integer: `)+C(u));if(!y)return new v(_);for(n=new v(a),p=r=new v(a),i=f=new v(a),g=ge(y),c=n.e=g.length-_.e-1,n.c[0]=fe[(l=c%k)<0?k+l:l],e=!e||u.comparedTo(n)>0?c>0?n:p:u,l=d,d=1/0,u=new v(g),f.c[0]=0;m=t(u,n,0,1),o=r.plus(m.times(i)),o.comparedTo(e)!=1;)r=i,i=o,p=f.plus(m.times(o=p)),f=o,n=u.minus(m.times(o=n)),u=o;return o=t(e.minus(r),i,0,1),f=f.plus(o.times(p)),r=r.plus(o.times(i)),f.s=p.s=_.s,c*=2,h=t(p,i,c,s).minus(_).abs().comparedTo(t(f,r,c,s).minus(_).abs())<1?[p,i]:[f,r],d=l,h},i.toNumber=function(){return+C(this)},i.toPrecision=function(e,t){return e!=null&&j(e,1,A),y(this,e,t,2)},i.toString=function(e){var t,r=this,i=r.s,a=r.e;return a===null?i?(t=`Infinity`,i<0&&(t=`-`+t)):t=`NaN`:(e==null?t=a<=c||a>=l?ye(ge(r.c),a):be(ge(r.c),a,`0`):e===10&&_?(r=S(new v(r),o+a+1,s),t=be(ge(r.c),r.e,`0`)):(j(e,2,g.length,`Base`),t=n(be(ge(r.c),a,`0`),10,e,i,!0)),i<0&&r.c[0]&&(t=`-`+t)),t},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]=`BigNumber`,i[Symbol.for(`nodejs.util.inspect.custom`)]=i.valueOf,e!=null&&v.set(e),v}function he(e){var t=e|0;return e>0||e===t?t:t-1}function ge(e){for(var t,n,r=1,i=e.length,a=e[0]+``;r<i;){for(t=e[r++]+``,n=k-t.length;n--;t=`0`+t);a+=t}for(i=a.length;a.charCodeAt(--i)===48;);return a.slice(0,i+1||1)}function _e(e,t){var n,r,i=e.c,a=t.c,o=e.s,s=t.s,c=e.e,l=t.e;if(!o||!s)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=c==l,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(s=(c=i.length)<(l=a.length)?c:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function j(e,t,n,r){if(e<t||e>n||e!==ce(e))throw Error(O+(r||`Argument`)+(typeof e==`number`?e<t||e>n?` out of range: `:` not an integer: `:` not a primitive number: `)+String(e))}function ve(e){var t=e.c.length-1;return he(e.e/k)==t&&e.c[t]%2!=0}function ye(e,t){return(e.length>1?e.charAt(0)+`.`+e.slice(1):e)+(t<0?`e`:`e+`)+t}function be(e,t,n){var r,i;if(t<0){for(i=n+`.`;++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+`.`+e.slice(t));return e}var M=me(),xe;function N(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Se=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ce=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(xe=globalThis).__zod_globalConfig??(xe.__zod_globalConfig={});var we=globalThis.__zod_globalConfig;function Te(e){return e&&Object.assign(we,e),we}function Ee(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function De(e,t){return typeof t==`bigint`?t.toString():t}function Oe(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ke(e){return e==null}function Ae(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function je(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Me=Symbol(`evaluating`);function P(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Me)return r===void 0&&(r=Me,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ne(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Pe(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Fe(e){return JSON.stringify(e)}function Ie(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Le=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Re(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ze=Oe(()=>{if(we.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Be(e){if(Re(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Re(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ve(e){return Be(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var He=new Set([`string`,`number`,`symbol`]);function Ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function We(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function F(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ge(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Ke={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function qe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return We(e,Pe(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Ne(this,`shape`,e),e},checks:[]}))}function Je(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return We(e,Pe(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Ne(this,`shape`,r),r},checks:[]}))}function Ye(e,t){if(!Be(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return We(e,Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ne(this,`shape`,n),n}}))}function Xe(e,t){if(!Be(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return We(e,Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Ne(this,`shape`,n),n}}))}function Ze(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return We(e,Pe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Ne(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Qe(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return We(t,Pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Ne(this,`shape`,i),i},checks:[]}))}function $e(e,t,n){return We(t,Pe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Ne(this,`shape`,i),i}}))}function et(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function tt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function nt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function rt(e){return typeof e==`string`?e:e?.message}function it(e,t,n){let r=e.message?e.message:rt(e.inst?._zod.def?.error?.(e))??rt(t?.error?.(e))??rt(n.customError?.(e))??rt(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function at(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ot(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var st=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,De,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ct=N(`$ZodError`,st),lt=N(`$ZodError`,st,{Parent:Error});function ut(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function dt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var ft=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Se;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>it(e,a,Te())));throw Le(t,i?.callee),t}return o.value},pt=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>it(e,a,Te())));throw Le(t,i?.callee),t}return o.value},mt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Se;return a.issues.length?{success:!1,error:new(e??ct)(a.issues.map(e=>it(e,i,Te())))}:{success:!0,data:a.value}},ht=mt(lt),gt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>it(e,i,Te())))}:{success:!0,data:a.value}},_t=gt(lt),vt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ft(e)(t,n,i)},yt=e=>(t,n,r)=>ft(e)(t,n,r),bt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pt(e)(t,n,i)},xt=e=>async(t,n,r)=>pt(e)(t,n,r),St=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mt(e)(t,n,i)},Ct=e=>(t,n,r)=>mt(e)(t,n,r),wt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gt(e)(t,n,i)},Tt=e=>async(t,n,r)=>gt(e)(t,n,r),Et=/^[cC][0-9a-z]{6,}$/,Dt=/^[0-9a-z]+$/,Ot=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kt=/^[0-9a-vA-V]{20}$/,At=/^[A-Za-z0-9]{27}$/,jt=/^[a-zA-Z0-9_-]{21}$/,Mt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Nt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ft=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,It=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Lt(){return new RegExp(It,`u`)}var Rt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Bt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ht=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ut=/^[A-Za-z0-9_-]*$/,Wt=/^https?$/,Gt=/^\+[1-9]\d{6,14}$/,Kt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,qt=RegExp(`^${Kt}$`);function Jt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yt(e){return RegExp(`^${Jt(e)}$`)}function Xt(e){let t=Jt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Kt}T(?:${r})$`)}var Zt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Qt=/^-?\d+$/,$t=/^-?\d+(?:\.\d+)?$/,en=/^(?:true|false)$/i,tn=/^null$/i,nn=/^undefined$/i,rn=/^[^A-Z]*$/,an=/^[^a-z]*$/,on=N(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sn={number:`number`,bigint:`bigint`,object:`date`},cn=N(`$ZodCheckLessThan`,(e,t)=>{on.init(e,t);let n=sn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ln=N(`$ZodCheckGreaterThan`,(e,t)=>{on.init(e,t);let n=sn[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),un=N(`$ZodCheckMultipleOf`,(e,t)=>{on.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):je(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dn=N(`$ZodCheckNumberFormat`,(e,t)=>{on.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ke[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Qt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),fn=N(`$ZodCheckMaxLength`,(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ke(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=at(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pn=N(`$ZodCheckMinLength`,(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ke(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=at(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mn=N(`$ZodCheckLengthEquals`,(e,t)=>{var n;on.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ke(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=at(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hn=N(`$ZodCheckStringFormat`,(e,t)=>{var n,r;on.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),gn=N(`$ZodCheckRegex`,(e,t)=>{hn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_n=N(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=rn,hn.init(e,t)}),vn=N(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=an,hn.init(e,t)}),yn=N(`$ZodCheckIncludes`,(e,t)=>{on.init(e,t);let n=Ue(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),bn=N(`$ZodCheckStartsWith`,(e,t)=>{on.init(e,t);let n=RegExp(`^${Ue(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),xn=N(`$ZodCheckEndsWith`,(e,t)=>{on.init(e,t);let n=RegExp(`.*${Ue(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Sn=N(`$ZodCheckOverwrite`,(e,t)=>{on.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Cn=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
2
2
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
3
3
  `))}},wn={major:4,minor:4,patch:3},I=N(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=et(e),i;for(let a of t){if(a._zod.def.when){if(tt(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Se;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=et(e,t))});else{if(e.issues.length===t)continue;r||=et(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(et(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Se;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Se;return o.then(e=>t(e,r,a))}return t(o,r,a)}}P(e,`~standard`,()=>({validate:t=>{try{let n=ht(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return _t(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Tn=N(`$ZodString`,(e,t)=>{I.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),L=N(`$ZodStringFormat`,(e,t)=>{hn.init(e,t),Tn.init(e,t)}),En=N(`$ZodGUID`,(e,t)=>{t.pattern??=Nt,L.init(e,t)}),Dn=N(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Pt(e)}else t.pattern??=Pt();L.init(e,t)}),On=N(`$ZodEmail`,(e,t)=>{t.pattern??=Ft,L.init(e,t)}),kn=N(`$ZodURL`,(e,t)=>{L.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Wt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),An=N(`$ZodEmoji`,(e,t)=>{t.pattern??=Lt(),L.init(e,t)}),jn=N(`$ZodNanoID`,(e,t)=>{t.pattern??=jt,L.init(e,t)}),Mn=N(`$ZodCUID`,(e,t)=>{t.pattern??=Et,L.init(e,t)}),Nn=N(`$ZodCUID2`,(e,t)=>{t.pattern??=Dt,L.init(e,t)}),Pn=N(`$ZodULID`,(e,t)=>{t.pattern??=Ot,L.init(e,t)}),Fn=N(`$ZodXID`,(e,t)=>{t.pattern??=kt,L.init(e,t)}),In=N(`$ZodKSUID`,(e,t)=>{t.pattern??=At,L.init(e,t)}),Ln=N(`$ZodISODateTime`,(e,t)=>{t.pattern??=Xt(t),L.init(e,t)}),Rn=N(`$ZodISODate`,(e,t)=>{t.pattern??=qt,L.init(e,t)}),zn=N(`$ZodISOTime`,(e,t)=>{t.pattern??=Yt(t),L.init(e,t)}),Bn=N(`$ZodISODuration`,(e,t)=>{t.pattern??=Mt,L.init(e,t)}),Vn=N(`$ZodIPv4`,(e,t)=>{t.pattern??=Rt,L.init(e,t),e._zod.bag.format=`ipv4`}),Hn=N(`$ZodIPv6`,(e,t)=>{t.pattern??=zt,L.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Un=N(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Bt,L.init(e,t)}),Wn=N(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Vt,L.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Gn(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Kn=N(`$ZodBase64`,(e,t)=>{t.pattern??=Ht,L.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Gn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function qn(e){if(!Ut.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Gn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Jn=N(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ut,L.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{qn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Yn=N(`$ZodE164`,(e,t)=>{t.pattern??=Gt,L.init(e,t)});function Xn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Zn=N(`$ZodJWT`,(e,t)=>{L.init(e,t),e._zod.check=n=>{Xn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Qn=N(`$ZodNumber`,(e,t)=>{I.init(e,t),e._zod.pattern=e._zod.bag.pattern??$t,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),$n=N(`$ZodNumberFormat`,(e,t)=>{dn.init(e,t),Qn.init(e,t)}),er=N(`$ZodBoolean`,(e,t)=>{I.init(e,t),e._zod.pattern=en,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),tr=N(`$ZodUndefined`,(e,t)=>{I.init(e,t),e._zod.pattern=nn,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),nr=N(`$ZodNull`,(e,t)=>{I.init(e,t),e._zod.pattern=tn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),rr=N(`$ZodAny`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),ir=N(`$ZodUnknown`,(e,t)=>{I.init(e,t),e._zod.parse=e=>e}),ar=N(`$ZodNever`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),or=N(`$ZodVoid`,(e,t)=>{I.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}});function sr(e,t,n){e.issues.length&&t.issues.push(...nt(n,e.issues)),t.value[n]=e.value}var cr=N(`$ZodArray`,(e,t)=>{I.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>sr(t,n,e))):sr(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function lr(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...nt(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function ur(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Ge(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function dr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>lr(e,n,i,t,u,d))):lr(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var fr=N(`$ZodObject`,(e,t)=>{if(I.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Oe(()=>ur(t));P(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Re,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>lr(n,t,e,s,r,i))):lr(a,t,e,s,r,i)}return i?dr(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),pr=N(`$ZodObjectJIT`,(e,t)=>{fr.init(e,t);let n=e._zod.parse,r=Oe(()=>ur(t)),i=e=>{let t=new Cn([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Fe(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Fe(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
4
4
  if (${n}.issues.length) {
@@ -1,2 +1,2 @@
1
- import{G as e,K as t,M as n,R as r,U as i,W as a,f as o,q as s,s as c,y as l,z as u}from"./createConnector-BkcvlarK.js";import{d}from"./Codec-DbDD5C2D.js";import{a as f,n as p,r as m,t as h}from"./networks-DkZQuO0f.js";import{g,l as _,m as v,u as y}from"./getAbiItem-CSTQJ-WB.js";import{a as b,b as ee,c as x,f as S,o as C,p as w,r as te,t as T,u as E,y as ne}from"./toBytes-95hyeuU1.js";import{t as D}from"./base-3h_1QOcC.js";import{I as re,P as O,_ as ie,a as k,g as ae,h as oe,i as se,k as ce,n as A,o as le,r as ue,s as de,t as fe}from"./assertRequest-CcS5Fjvi.js";import{n as j,u as pe}from"./node-BO78CZA-.js";import{n as me,t as he}from"./sha256-qwlK_Blg.js";import{a as ge}from"./misc-C7prhhSc.js";var M=class{constructor(e,t){this.first=e,this.second=t,this.length=2,this[0]=e,this[1]=t}*[Symbol.iterator](){yield this.first,yield this.second}toJSON(){return this.toArray()}inspect(){return`Tuple(${JSON.stringify(this.first)}, ${JSON.stringify(this.second)})`}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return`Tuple(${n(this.first,t)}, ${n(this.second,t)})`}toString(){return this.inspect()}fst(){return this.first}snd(){return this.second}equals(e){return this.first===e.fst()&&this.second===e.snd()}bimap(e,t){return N(e(this.first),t(this.second))}mapFirst(e){return N(e(this.first),this.second)}map(e){return N(this.first,e(this.second))}reduce(e,t){return e(t,this.second)}toArray(){return[this.first,this.second]}swap(){return N(this.second,this.first)}ap(e){return N(this.first,e.snd()(this.second))}every(e){return e(this.first)&&e(this.second)}some(e){return e(this.first)||e(this.second)}};M.prototype[`fantasy-land/equals`]=M.prototype.equals,M.prototype[`fantasy-land/bimap`]=M.prototype.bimap,M.prototype[`fantasy-land/map`]=M.prototype.map,M.prototype[`fantasy-land/reduce`]=M.prototype.reduce,M.prototype[`fantasy-land/ap`]=M.prototype.ap;var N=Object.assign((e,t)=>new M(e,t),{fromArray:([e,t])=>N(e,t),fanout:(...e)=>{let[t,n,r]=e;switch(e.length){case 3:return N(t(r),n(r));case 2:return e=>N.fanout(t,n,e);default:return e=>n=>N.fanout(t,e,n)}}});M.prototype.constructor=N;var _e=e=>e.length>0?t(e[0]):s,ve=e=>e.length>0?t(e[e.length-1]):s,ye=e=>e.length>0?t(e.slice(1)):s,be=e=>e.length>0?t(e.slice(0,-1)):s,xe=e=>e.length>0?t(N(e[0],e.slice(1))):s,Se=e=>e.reduce((e,t)=>e+t,0);function Ce(t,n){switch(arguments.length){case 1:return e=>Ce(t,e);default:return e.fromNullable(n.find(t))}}function P(t,n){switch(arguments.length){case 1:return e=>P(t,e);default:return e.fromPredicate(e=>e!==-1,n.findIndex(t))}}function we(e,n){switch(arguments.length){case 1:return t=>we(e,t);default:return n[e]===void 0?s:t(n[e])}}function Te(e,t){switch(arguments.length){case 1:return t=>Te(e,t);default:return[...t].sort((t,n)=>d(e(t,n)))}}var Ee={init:be,uncons:xe,at:we,head:_e,last:ve,tail:ye,find:Ce,findIndex:P,sum:Se,sort:Te},F=e=>`${e.network}-${e.address?.toLowerCase()??``}`,De=(e,t)=>F(e)===F(t)&&e.symbol===t.symbol,Oe=e=>!!je(e)?.required,ke=e=>!!I(e,`validatorAddress`)?.required,Ae=e=>!!I(e,`validatorAddresses`)?.required,je=e=>{let t=I(e,`amount`);if(!t)return null;let n=Me(t.minimum),r=Me(t.maximum);return{required:!!t.required,minimum:n,maximum:r,forceMax:n===-1&&r===-1}},I=(e,t)=>{let n=e.arguments?.fields?.find(e=>e.name===t);if(n)return{required:!!n.required,minimum:n.minimum??null,maximum:n.maximum??null};let r=e.args?.args?.[t];return r?{required:!!r.required,minimum:r.minimum??null,maximum:r.maximum??null}:null},Me=e=>{if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=Number(e);return Number.isFinite(t)?t:null},Ne=class{value;constructor(e){this.value=e}getByToken(t){return e.fromNullable(this.value.get(F(t)))}},Pe=({token:e,baseToken:t,amount:n,prices:r,pricePerShare:i})=>{let a=u(n);if(i&&t){let e=new u(r.getByToken(t).chainNullable(e=>e.price).orDefault(0)),n=u(i);return a.times(e).times(n)}let o=new u(r.getByToken(e).chainNullable(e=>e.price).orDefault(0));return a.times(o)},Fe=({stakeToken:e,yieldDto:t})=>De(e,t.mechanics.gasFeeToken),Ie=({availableAmount:e,gasEstimateTotal:t,integrationMaxLimit:n})=>u.max(u.min(n.orDefault(u(1/0)),e.minus(t)),new u(0)),Le=e=>{let t={...e,transactions:e.transactions.filter(e=>e.status!==`SKIPPED`)};return t.transactions.some(e=>Re(e.status))?i(Error(`Transaction failed`)):a(t)},Re=e=>e===`FAILED`||e===`BLOCKED`,ze=e=>Ae(e),Be=e=>ke(e),Ve=e=>{let t=Number(e);return Number.isNaN(t)?e:t};function He(e){return o(e?.lift)}function Ue(e){return function(t){if(He(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}r();function We(e,t,n,r,i){return new Ge(e,t,n,r,i)}var Ge=function(e){n(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(c);function Ke(e,t){return Ue(function(n,r){var i=0;n.subscribe(We(r,function(n){r.next(e.call(t,n,i++))}))})}function L(e,t=`hex`){let n=qe(e),r=re(new Uint8Array(n.length));return n.encode(r),t===`hex`?b(r.bytes):r.bytes}function qe(e){return Array.isArray(e)?Je(e.map(e=>qe(e))):Ye(e)}function Je(e){let t=e.reduce((e,t)=>e+t.length,0),n=R(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),n===1?r.pushUint8(t):n===2?r.pushUint16(t):n===3?r.pushUint24(t):r.pushUint32(t));for(let{encode:t}of e)t(r)}}}function Ye(e){let t=typeof e==`string`?T(e):e,n=R(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){t.length===1&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),n===1?e.pushUint8(t.length):n===2?e.pushUint16(t.length):n===3?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}function R(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new D(`Length is too large.`)}var z={"0x0":`legacy`,"0x1":`eip2930`,"0x2":`eip1559`,"0x3":`eip4844`,"0x4":`eip7702`};function B(e,t){let n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?S(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?S(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?z[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Ze(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v==`bigint`){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return+(n.v%2n==0n)}})(),n.type===`legacy`&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type===`eip2930`&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type===`eip1559`&&delete n.maxFeePerBlobGas,n}var Xe=k(`transaction`,B);function Ze(e){return e.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}function Qe(e,t){let n=(e.transactions??[]).map(e=>typeof e==`string`?e:B(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var $e=k(`block`,Qe);function V(e){let{kzg:t}=e,n=e.to??(typeof e.blobs[0]==`string`?`hex`:`bytes`),r=typeof e.blobs[0]==`string`?e.blobs.map(e=>T(e)):e.blobs,i=[];for(let e of r)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return n===`bytes`?i:i.map(e=>b(e))}function H(e){let{kzg:t}=e,n=e.to??(typeof e.blobs[0]==`string`?`hex`:`bytes`),r=typeof e.blobs[0]==`string`?e.blobs.map(e=>T(e)):e.blobs,i=typeof e.commitments[0]==`string`?e.commitments.map(e=>T(e)):e.commitments,a=[];for(let e=0;e<r.length;e++){let n=r[e],o=i[e];a.push(Uint8Array.from(t.computeBlobKzgProof(n,o)))}return n===`bytes`?a:a.map(e=>b(e))}he();function et(e,t){let n=t||`hex`,r=me(ee(e,{strict:!1})?te(e):e);return n===`bytes`?r:x(r)}function tt(e){let{commitment:t,version:n=1}=e,r=e.to??(typeof t==`string`?`hex`:`bytes`),i=et(t,`bytes`);return i.set([n],0),r===`bytes`?i:b(i)}function nt(e){let{commitments:t,version:n}=e,r=e.to??(typeof t[0]==`string`?`hex`:`bytes`),i=[];for(let e of t)i.push(tt({commitment:e,to:r,version:n}));return i}var rt=6,U=4096,it=32*U,at=it*rt-1-1*U*rt,ot=class extends D{constructor({maxSize:e,size:t}){super(`Blob size is too large.`,{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:`BlobSizeTooLargeError`})}},st=class extends D{constructor(){super(`Blob data must not be empty.`,{name:`EmptyBlobError`})}},ct=class extends D{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:[`Expected: 32`,`Received: ${t}`],name:`InvalidVersionedHashSizeError`})}},lt=class extends D{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: 1`,`Received: ${t}`],name:`InvalidVersionedHashVersionError`})}};function ut(e){let t=e.to??(typeof e.data==`string`?`hex`:`bytes`),n=typeof e.data==`string`?T(e.data):e.data,r=ne(n);if(!r)throw new st;if(r>761855)throw new ot({maxSize:at,size:r});let i=[],a=!0,o=0;for(;a;){let e=re(new Uint8Array(it)),t=0;for(;t<U;){let r=n.slice(o,o+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),a=!1;break}t++,o+=31}i.push(e)}return t===`bytes`?i.map(e=>e.bytes):i.map(e=>b(e.bytes))}function dt(e){let{data:t,kzg:n,to:r}=e,i=e.blobs??ut({data:t,to:r}),a=e.commitments??V({blobs:i,kzg:n,to:r}),o=e.proofs??H({blobs:i,commitments:a,kzg:n,to:r}),s=[];for(let e=0;e<i.length;e++)s.push({blob:i[e],commitment:a[e],proof:o[e]});return s}function ft(e){if(e.type)return e.type;if(e.authorizationList!==void 0)return`eip7702`;if(e.blobs!==void 0||e.blobVersionedHashes!==void 0||e.maxFeePerBlobGas!==void 0||e.sidecars!==void 0)return`eip4844`;if(e.maxFeePerGas!==void 0||e.maxPriorityFeePerGas!==void 0)return`eip1559`;if(e.gasPrice!==void 0)return e.accessList===void 0?`legacy`:`eip2930`;throw new ae({transaction:e})}function pt(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}function mt(e){let{authorizationList:t}=e;if(t)for(let e of t){let{chainId:t}=e,n=e.address;if(!v(n))throw new g({address:n});if(t<0)throw new O({chainId:t})}W(e)}function ht(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new st;for(let e of t){let t=ne(e),n=S(y(e,0,1));if(t!==32)throw new ct({hash:e,size:t});if(n!==1)throw new lt({hash:e,version:n})}}W(e)}function W(e){let{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new O({chainId:t});if(i&&!v(i))throw new g({address:i});if(r&&r>A)throw new j({maxFeePerGas:r});if(n&&r&&n>r)throw new pe({maxFeePerGas:r,maxPriorityFeePerGas:n})}function gt(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(t<=0)throw new O({chainId:t});if(a&&!v(a))throw new g({address:a});if(n||i)throw new D("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>A)throw new j({maxFeePerGas:r})}function _t(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(a&&!v(a))throw new g({address:a});if(t!==void 0&&t<=0)throw new O({chainId:t});if(n||i)throw new D("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>A)throw new j({maxFeePerGas:r})}function G(e){if(!e||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new ie({storageKey:i[e]});if(!v(r,{strict:!1}))throw new g({address:r});t.push([r,i])}return t}function vt(e,t){let n=ft(e);return n===`eip1559`?xt(e,t):n===`eip2930`?St(e,t):n===`eip4844`?bt(e,t):n===`eip7702`?yt(e,t):Ct(e,t)}function yt(e,t){let{authorizationList:n,chainId:r,gas:i,nonce:a,to:o,value:s,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;mt(e);let f=G(u),p=wt(n);return _([`0x04`,L([C(r),a?C(a):`0x`,l?C(l):`0x`,c?C(c):`0x`,i?C(i):`0x`,o??`0x`,s?C(s):`0x`,d??`0x`,f,p,...K(e,t)])])}function bt(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;ht(e);let f=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(f===void 0||p===void 0)){let t=typeof e.blobs[0]==`string`?e.blobs:e.blobs.map(e=>b(e)),n=e.kzg,r=V({blobs:t,kzg:n});f===void 0&&(f=nt({commitments:r})),p===void 0&&(p=dt({blobs:t,commitments:r,proofs:H({blobs:t,commitments:r,kzg:n})}))}let m=G(u),h=[C(n),i?C(i):`0x`,l?C(l):`0x`,c?C(c):`0x`,r?C(r):`0x`,a??`0x`,o?C(o):`0x`,d??`0x`,m,s?C(s):`0x`,f??[],...K(e,t)],g=[],v=[],y=[];if(p)for(let e=0;e<p.length;e++){let{blob:t,commitment:n,proof:r}=p[e];g.push(t),v.push(n),y.push(r)}return _([`0x03`,L(p?[h,g,v,y]:h)])}function xt(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:l,data:u}=e;W(e);let d=G(l);return _([`0x02`,L([C(n),i?C(i):`0x`,c?C(c):`0x`,s?C(s):`0x`,r?C(r):`0x`,a??`0x`,o?C(o):`0x`,u??`0x`,d,...K(e,t)])])}function St(e,t){let{chainId:n,gas:r,data:i,nonce:a,to:o,value:s,accessList:c,gasPrice:l}=e;gt(e);let u=G(c);return _([`0x01`,L([C(n),a?C(a):`0x`,l?C(l):`0x`,r?C(r):`0x`,o??`0x`,s?C(s):`0x`,i??`0x`,u,...K(e,t)])])}function Ct(e,t){let{chainId:n=0,gas:r,data:i,nonce:a,to:o,value:s,gasPrice:c}=e;_t(e);let l=[a?C(a):`0x`,c?C(c):`0x`,r?C(r):`0x`,o??`0x`,s?C(s):`0x`,i??`0x`];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);let e=27n+(t.v===27n?0n:1n);if(t.v!==e)throw new oe({v:t.v});return e})(),r=w(t.r),i=w(t.s);l=[...l,C(e),r===`0x00`?`0x`:r,i===`0x00`?`0x`:i]}else n>0&&(l=[...l,C(n),`0x`,`0x`]);return L(l)}function K(e,t){let n=t??e,{v:r,yParity:i}=n;if(n.r===void 0||n.s===void 0||r===void 0&&i===void 0)return[];let a=w(n.r),o=w(n.s);return[typeof i==`number`?i?C(1):`0x`:r===0n?`0x`:r===1n?C(1):r===27n?`0x`:C(1),a===`0x00`?`0x`:a,o===`0x00`?`0x`:o]}function wt(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let{chainId:e,nonce:r,...i}=n,a=n.address;t.push([e?x(e):`0x`,a,r?x(r):`0x`,...K({},i)])}return t}function q(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(e){return t=>{let r=typeof t==`function`?t(e):t,i={...e,...r};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}var Tt={"0x0":`reverted`,"0x1":`success`};function Et(e,t){let n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>pt(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?S(e.transactionIndex):null,status:e.status?Tt[e.status]:null,type:e.type?z[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}var Dt=k(`transactionReceipt`,Et),Ot=class extends D{constructor({docsPath:e}={}){super([`Could not find an Account to execute with this Action.`,"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
2
- `),{docsPath:e,docsSlug:`account`,name:`AccountNotFoundError`})}},kt=class extends D{constructor({docsPath:e,metaMessages:t,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:e,metaMessages:t,name:`AccountTypeNotSupportedError`})}},At=[h.Akash,h.Cosmos,h.Juno,h.Kava,h.Osmosis,h.Stargaze,h.Onomy,h.Persistence,h.Axelar,h.Quicksilver,h.Agoric,h.BandProtocol,h.Bitsong,h.Chihuahua,h.Comdex,h.Crescent,h.Cronos,h.Cudos,h.FetchAi,h.GravityBridge,h.IRISnet,h.KiNetwork,h.MarsProtocol,h.Regen,h.Secret,h.Sentinel,h.Sommelier,h.Teritori,h.Umee,h.Coreum,h.Desmos,h.Dydx,h.Injective,h.Sei,h.Mantra],jt=new Set(At),Mt={gasPriceOracle:{address:`0x420000000000000000000000000000000000000F`},l1Block:{address:`0x4200000000000000000000000000000000000015`},l2CrossDomainMessenger:{address:`0x4200000000000000000000000000000000000007`},l2Erc721Bridge:{address:`0x4200000000000000000000000000000000000014`},l2StandardBridge:{address:`0x4200000000000000000000000000000000000010`},l2ToL1MessagePasser:{address:`0x4200000000000000000000000000000000000016`}},Nt={block:$e({format(e){return{transactions:e.transactions?.map(e=>{if(typeof e==`string`)return e;let t=B(e);return t.typeHex===`0x7e`&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?E(e.mint):void 0,t.sourceHash=e.sourceHash,t.type=`deposit`),t}),stateRoot:e.stateRoot}}}),transaction:Xe({format(e){let t={};return e.type===`0x7e`&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?E(e.mint):void 0,t.sourceHash=e.sourceHash,t.type=`deposit`),t}}),transactionReceipt:Dt({format(e){return{l1GasPrice:e.l1GasPrice?E(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?E(e.l1GasUsed):null,l1Fee:e.l1Fee?E(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function Pt(e,t){return Lt(e)?It(e):vt(e,t)}var Ft={transaction:Pt};function It(e){Rt(e);let{sourceHash:t,data:n,from:r,gas:i,isSystemTx:a,mint:o,to:s,value:c}=e;return _([`0x7e`,L([t,r,s??`0x`,o?x(o):`0x`,c?x(c):`0x`,i?x(i):`0x`,a?`0x1`:`0x`,n??`0x`])])}function Lt(e){return e.type===`deposit`||e.sourceHash!==void 0}function Rt(e){let{from:t,to:n}=e;if(t&&!v(t))throw new g({address:t});if(n&&!v(n))throw new g({address:n})}var J={blockTime:2e3,contracts:Mt,formatters:Nt,serializers:Ft},zt=q({id:42161,name:`Arbitrum One`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:250,rpcUrls:{default:{http:[`https://arb1.arbitrum.io/rpc`]}},blockExplorers:{default:{name:`Arbiscan`,url:`https://arbiscan.io`,apiUrl:`https://api.arbiscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:7654707}}}),Bt=q({id:43114,name:`Avalanche`,blockTime:1700,nativeCurrency:{decimals:18,name:`Avalanche`,symbol:`AVAX`},rpcUrls:{default:{http:[`https://api.avax.network/ext/bc/C/rpc`]}},blockExplorers:{default:{name:`SnowTrace`,url:`https://snowtrace.io`,apiUrl:`https://api.snowtrace.io`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:11907934}}}),Y=1,Vt=q({...J,id:8453,name:`Base`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://mainnet.base.org`]}},blockExplorers:{default:{name:`Basescan`,url:`https://basescan.org`,apiUrl:`https://api.basescan.org/api`}},contracts:{...J.contracts,disputeGameFactory:{[Y]:{address:`0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e`}},l2OutputOracle:{[Y]:{address:`0x56315b90c40730925ec5485cf004d835058518A0`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:5022},portal:{[Y]:{address:`0x49048044D57e1C92A77f79988d21Fa8fAF74E97e`,blockCreated:17482143}},l1StandardBridge:{[Y]:{address:`0x3154Cf16ccdb4C6d922629664174b904d80F2C35`,blockCreated:17482143}}},sourceId:Y});({...Vt});var Ht=q({id:56,name:`BNB Smart Chain`,blockTime:750,nativeCurrency:{decimals:18,name:`BNB`,symbol:`BNB`},rpcUrls:{default:{http:[`https://56.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`BscScan`,url:`https://bscscan.com`,apiUrl:`https://api.bscscan.com/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:15921452}}}),Ut={estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;let[t,n]=await Promise.all([Wt(e.client,e.request.feeCurrency),Gt(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-n)+n,maxPriorityFeePerGas:n}}};async function Wt(e,t){let n=await e.request({method:`eth_gasPrice`,params:[t]});return BigInt(n)}async function Gt(e,t){let n=await e.request({method:`eth_maxPriorityFeePerGas`,params:[t]});return BigInt(n)}function X(e){return e===0||e===0n||e==null||e===`0`||e===``||typeof e==`string`&&(w(e).toLowerCase()===`0x`||w(e).toLowerCase()===`0x00`)}function Z(e){return!X(e)}function Kt(e){return e.maxFeePerGas!==void 0&&e.maxPriorityFeePerGas!==void 0}function qt(e){return e.type===`cip64`?!0:Kt(e)&&Z(e.feeCurrency)}var Jt={block:$e({format(e){return{transactions:e.transactions?.map(e=>typeof e==`string`?e:{...B(e),...e.gatewayFee?{gatewayFee:E(e.gatewayFee),gatewayFeeRecipient:e.gatewayFeeRecipient}:{},feeCurrency:e.feeCurrency})}}}),transaction:Xe({format(e){if(e.type===`0x7e`)return{isSystemTx:e.isSystemTx,mint:e.mint?E(e.mint):void 0,sourceHash:e.sourceHash,type:`deposit`};let t={feeCurrency:e.feeCurrency};return e.type===`0x7b`?t.type=`cip64`:(e.type===`0x7c`&&(t.type=`cip42`),t.gatewayFee=e.gatewayFee?E(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:ue({format(e){let t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),qt(e)&&(t.type=`0x7b`),t}})};function Yt(e,t){return qt(e)?Zt(e,t):Pt(e,t)}var Xt={transaction:Yt};function Zt(e,t){$t(e);let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e;return _([`0x7b`,L([x(n),i?x(i):`0x`,c?x(c):`0x`,s?x(s):`0x`,r?x(r):`0x`,a??`0x`,o?x(o):`0x`,d??`0x`,G(l),u,...K(e,t)])])}var Qt=A;function $t(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a,feeCurrency:o}=e;if(t<=0)throw new O({chainId:t});if(a&&!v(a))throw new g({address:a});if(r)throw new D("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Z(i)&&i>Qt)throw new j({maxFeePerGas:i});if(Z(n)&&Z(i)&&n>i)throw new pe({maxFeePerGas:i,maxPriorityFeePerGas:n});if(Z(o)&&!v(o))throw new D("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(X(o))throw new D("`feeCurrency` must be provided for CIP-64 transactions.")}var en=q({blockTime:1e3,contracts:Mt,formatters:Jt,serializers:Xt,fees:Ut,id:42220,name:`Celo`,nativeCurrency:{decimals:18,name:`CELO`,symbol:`CELO`},rpcUrls:{default:{http:[`https://forno.celo.org`]}},blockExplorers:{default:{name:`Celo Explorer`,url:`https://celoscan.io`,apiUrl:`https://api.celoscan.io/api`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:13112599}},testnet:!1}),tn=q({id:1116,name:`Core Dao`,nativeCurrency:{decimals:18,name:`Core`,symbol:`CORE`},rpcUrls:{default:{http:[`https://rpc.coredao.org`]}},blockExplorers:{default:{name:`CoreDao`,url:`https://scan.coredao.org`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:11907934}},testnet:!1}),nn=q({id:100,name:`Gnosis`,nativeCurrency:{decimals:18,name:`xDAI`,symbol:`XDAI`},blockTime:5e3,rpcUrls:{default:{http:[`https://rpc.gnosischain.com`],webSocket:[`wss://rpc.gnosischain.com/wss`]}},blockExplorers:{default:{name:`Gnosisscan`,url:`https://gnosisscan.io`,apiUrl:`https://api.gnosisscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:21022491}}}),rn=q({id:5,name:`Goerli`,nativeCurrency:{name:`Goerli Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://5.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://goerli.etherscan.io`,apiUrl:`https://api-goerli.etherscan.io/api`}},contracts:{ensRegistry:{address:`0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e`},ensUniversalResolver:{address:`0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1`,blockCreated:10339206},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:6507670}},testnet:!0}),an=q({id:16666e5,name:`Harmony One`,nativeCurrency:{name:`Harmony`,symbol:`ONE`,decimals:18},rpcUrls:{default:{http:[`https://1666600000.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`Harmony Explorer`,url:`https://explorer.harmony.one`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:24185753}}}),on=q({id:560048,name:`Hoodi`,nativeCurrency:{name:`Hoodi Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.hoodi.ethpandaops.io`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://hoodi.etherscan.io`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:2589}},testnet:!0});async function sn(e,t){let{account:n=e.account}=t;if(!n)throw new Ot;let r=ce(n);try{let{accessList:n,blockNumber:i,blockTag:a,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:f,value:p,...m}=t,h=(typeof i==`bigint`?C(i):void 0)||a;fe(t);let g=e.chain?.formatters?.transactionRequest?.format,_=(g||se)({...le(m,{format:g}),account:r,accessList:n,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:f,value:p},`estimateGas`),{baseFeePerGas:v,gasLimit:y,priorityFeePerGas:b}=await e.request({method:`linea_estimateGas`,params:h?[_,h]:[_]});return{baseFeePerGas:BigInt(v),gasLimit:BigInt(y),priorityFeePerGas:BigInt(b)}}catch(n){throw de(n,{...t,account:r,chain:e.chain})}}var cn={fees:{estimateFeesPerGas:ln,async maxPriorityFeePerGas({block:e,client:t,request:n}){let r=await ln({block:e,client:t,multiply:e=>e,request:n,type:`eip1559`});return r?.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}}};async function ln({client:e,multiply:t,request:n,type:r}){try{let i=await sn(e,{...n,account:n?.account}),{priorityFeePerGas:a}=i,o=t(BigInt(i.baseFeePerGas))+a;return r===`legacy`?{gasPrice:o}:{maxFeePerGas:o,maxPriorityFeePerGas:a}}catch{return null}}var un=q({...cn,id:59144,name:`Linea Mainnet`,blockTime:2e3,nativeCurrency:{name:`Linea Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.linea.build`],webSocket:[`wss://rpc.linea.build`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://lineascan.build`,apiUrl:`https://api.lineascan.build/api`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:42},ensRegistry:{address:`0x50130b669B28C339991d8676FA73CF122a121267`,blockCreated:6682888},ensUniversalResolver:{address:`0x4D41762915F83c76EcaF6776d9b08076aA32b492`,blockCreated:22222151}},ensTlds:[`.linea.eth`],testnet:!1}),dn=q({id:1,name:`Ethereum`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:12e3,rpcUrls:{default:{http:[`https://eth.merkle.io`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://etherscan.io`,apiUrl:`https://api.etherscan.io/api`}},contracts:{ensUniversalResolver:{address:`0xeeeeeeee14d718c2b47d9923deab1335e144eeee`,blockCreated:23085558},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:14353601}}}),fn=q({id:10143,name:`Monad Testnet`,blockTime:400,nativeCurrency:{name:`Testnet MON Token`,symbol:`MON`,decimals:18},rpcUrls:{default:{http:[`https://testnet-rpc.monad.xyz`]}},blockExplorers:{default:{name:`Monad Testnet explorer`,url:`https://testnet.monadexplorer.com`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:251449}},testnet:!0}),Q=1,pn=q({...J,id:10,name:`OP Mainnet`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://mainnet.optimism.io`]}},blockExplorers:{default:{name:`Optimism Explorer`,url:`https://optimistic.etherscan.io`,apiUrl:`https://api-optimistic.etherscan.io/api`}},contracts:{...J.contracts,disputeGameFactory:{[Q]:{address:`0xe5965Ab5962eDc7477C8520243A95517CD252fA9`}},l2OutputOracle:{[Q]:{address:`0xdfe97868233d1aa22e815a266982f2cf17685a27`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:4286263},portal:{[Q]:{address:`0xbEb5Fc579115071764c7423A4f12eDde41f106Ed`}},l1StandardBridge:{[Q]:{address:`0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1`}}},sourceId:Q}),mn=q({id:9746,name:`Plasma Testnet`,nativeCurrency:{name:`Testnet Plasma`,symbol:`XPL`,decimals:18},rpcUrls:{default:{http:[`https://testnet-rpc.plasma.to`]}},blockExplorers:{default:{name:`RouteScan`,url:`https://testnet.plasmascan.to`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:0}},testnet:!0}),hn=q({id:137,name:`Polygon`,blockTime:2e3,nativeCurrency:{name:`POL`,symbol:`POL`,decimals:18},rpcUrls:{default:{http:[`https://polygon.drpc.org`]}},blockExplorers:{default:{name:`PolygonScan`,url:`https://polygonscan.com`,apiUrl:`https://api.etherscan.io/v2/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:25770160}}}),gn=q({id:11155111,name:`Sepolia`,nativeCurrency:{name:`Sepolia Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://11155111.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://sepolia.etherscan.io`,apiUrl:`https://api-sepolia.etherscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:751532},ensUniversalResolver:{address:`0xeeeeeeee14d718c2b47d9923deab1335e144eeee`,blockCreated:8928790}},testnet:!0}),_n=q({id:146,name:`Sonic`,blockTime:630,nativeCurrency:{decimals:18,name:`Sonic`,symbol:`S`},rpcUrls:{default:{http:[`https://rpc.soniclabs.com`]}},blockExplorers:{default:{name:`Sonic Explorer`,url:`https://sonicscan.org`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:60}},testnet:!1}),$=1,vn=q({...J,id:130,name:`Unichain`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:1e3,rpcUrls:{default:{http:[`https://mainnet.unichain.org/`]}},blockExplorers:{default:{name:`Uniscan`,url:`https://uniscan.xyz`,apiUrl:`https://api.uniscan.xyz/api`}},contracts:{...J.contracts,multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:0},disputeGameFactory:{[$]:{address:`0x2F12d621a16e2d3285929C9996f478508951dFe4`}},portal:{[$]:{address:`0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2`}},l1StandardBridge:{[$]:{address:`0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA`}}},sourceId:$}),yn=q({id:88,name:`Viction`,nativeCurrency:{name:`Viction`,symbol:`VIC`,decimals:18},rpcUrls:{default:{http:[`https://rpc.viction.xyz`]}},blockExplorers:{default:{name:`VIC Scan`,url:`https://vicscan.xyz`}},testnet:!1}),bn=[p.AvalancheC,p.Arbitrum,p.Binance,p.Celo,p.Ethereum,p.EthereumGoerli,p.Harmony,p.Optimism,p.Polygon,p.Viction,p.EthereumHoodi,p.Base,p.Linea,p.Core,p.Sonic,p.EthereumSepolia,p.Unichain,p.Katana,p.Gnosis,p.HyperEVM,p.Plasma,p.Monad,p.MonadTestnet],xn=new Set(bn),Sn={[p.Ethereum]:{type:`evm`,skChainName:p.Ethereum,wagmiChain:dn},[p.Polygon]:{type:`evm`,skChainName:p.Polygon,wagmiChain:hn},[p.Optimism]:{type:`evm`,skChainName:p.Optimism,wagmiChain:pn},[p.Arbitrum]:{type:`evm`,skChainName:p.Arbitrum,wagmiChain:zt},[p.AvalancheC]:{type:`evm`,skChainName:p.AvalancheC,wagmiChain:Bt},[p.Celo]:{type:`evm`,skChainName:p.Celo,wagmiChain:{...en,iconUrl:l(p.Celo)}},[p.Harmony]:{type:`evm`,skChainName:p.Harmony,wagmiChain:{...an,iconUrl:l(p.Harmony)}},[p.Viction]:{type:`evm`,skChainName:p.Viction,wagmiChain:{...yn,iconUrl:l(p.Viction)}},[p.Binance]:{type:`evm`,skChainName:p.Binance,wagmiChain:{...Ht,name:`BNB Chain`}},[p.Base]:{type:`evm`,skChainName:p.Base,wagmiChain:Vt},[p.Linea]:{type:`evm`,skChainName:p.Linea,wagmiChain:{...un,iconUrl:l(p.Linea)}},[p.Core]:{type:`evm`,skChainName:p.Core,wagmiChain:{...tn,name:`Core`,iconUrl:l(p.Core)}},[p.Sonic]:{type:`evm`,skChainName:p.Sonic,wagmiChain:{..._n,name:`Sonic`,iconUrl:l(p.Sonic)}},[p.EthereumHoodi]:{type:`evm`,skChainName:p.EthereumHoodi,wagmiChain:{...on,iconUrl:l(p.EthereumHoodi)}},[p.EthereumGoerli]:{type:`evm`,skChainName:p.EthereumGoerli,wagmiChain:rn},[p.EthereumSepolia]:{type:`evm`,skChainName:p.EthereumSepolia,wagmiChain:gn},[p.Unichain]:{type:`evm`,skChainName:p.Unichain,wagmiChain:vn},[p.Gnosis]:{type:`evm`,skChainName:p.Gnosis,wagmiChain:nn},[p.Plasma]:{type:`evm`,skChainName:p.Plasma,wagmiChain:{id:9745,name:`Plasma`,iconUrl:l(p.Plasma),nativeCurrency:mn.nativeCurrency,rpcUrls:{default:{http:[`https://rpc.plasma.to`]}}}},[p.Katana]:{type:`evm`,skChainName:p.Katana,wagmiChain:{id:747474,name:`Katana`,iconUrl:l(p.Katana),nativeCurrency:{name:`Ethereum`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.katana.network/`]}}}},[p.HyperEVM]:{type:`evm`,skChainName:p.HyperEVM,wagmiChain:{id:999,name:`HyperEVM`,iconUrl:l(p.HyperEVM),nativeCurrency:{name:`Ethereum`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.hyperliquid.xyz/evm`]}}}},[p.MonadTestnet]:{type:`evm`,skChainName:p.MonadTestnet,wagmiChain:{...fn,iconUrl:l(p.MonadTestnet)}},[p.Monad]:{type:`evm`,skChainName:p.Monad,wagmiChain:{id:143,name:`Monad`,iconUrl:l(p.Monad),nativeCurrency:{name:`Monad`,symbol:`MON`,decimals:18},rpcUrls:{default:{http:[`https://rpc-mainnet.monadinfra.com/rpc/wibIOSEgRVbSCBJwHBho3mLEQODJvzd2`]}}}}},Cn=function(e){return e[e.Ethereum=1]=`Ethereum`,e[e.Polygon=137]=`Polygon`,e[e.Optimism=10]=`Optimism`,e[e.Arbitrum=42161]=`Arbitrum`,e[e.AvalancheC=43114]=`AvalancheC`,e[e.Celo=42220]=`Celo`,e[e.Harmony=16666e5]=`Harmony`,e[e.Viction=88]=`Viction`,e[e.Binance=56]=`Binance`,e[e.Base=8453]=`Base`,e[e.Linea=59144]=`Linea`,e[e.Core=1116]=`Core`,e[e.Sonic=146]=`Sonic`,e[e.EthereumHoodi=560048]=`EthereumHoodi`,e[e.EthereumGoerli=5]=`EthereumGoerli`,e[e.EthereumSepolia=11155111]=`EthereumSepolia`,e[e.Unichain=130]=`Unichain`,e[e.Katana=747474]=`Katana`,e[e.Gnosis=100]=`Gnosis`,e[e.Hyperevm=999]=`Hyperevm`,e[e.Plasma=9745]=`Plasma`,e[e.Monad=143]=`Monad`,e[e.MonadTestnet=10143]=`MonadTestnet`,e}({}),wn=[f.Polkadot,f.Bittensor],Tn=new Set(wn),En={id:9999,name:`Polkadot`,iconUrl:l(f.Polkadot),nativeCurrency:{decimals:10,name:`Polkadot`,symbol:`DOT`},rpcUrls:{public:{http:[`https://rpc.polkadot.io`,`https://flashy-side-arrow.dot-mainnet.quiknode.pro/97d5006f66e37488fb9dc1575ef8960e3870dd0f/`],webSocket:[`wss://rpc.polkadot.io`]},default:{http:[`https://rpc.polkadot.io`,`https://flashy-side-arrow.dot-mainnet.quiknode.pro/97d5006f66e37488fb9dc1575ef8960e3870dd0f/`],webSocket:[`wss://rpc.polkadot.io`]}}},Dn={id:558,name:`Bittensor`,iconUrl:l(f.Bittensor),nativeCurrency:{decimals:9,name:`Bittensor Token`,symbol:`TAO`},rpcUrls:{default:{http:[`https://entrypoint-finney.opentensor.ai`],webSocket:[`wss://entrypoint-finney.opentensor.ai`]}}},On={[f.Polkadot]:{type:`substrate`,skChainName:f.Polkadot,wagmiChain:En,genesisHash:`0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3`,ss58Format:0},[f.Bittensor]:{type:`substrate`,skChainName:f.Bittensor,wagmiChain:Dn,genesisHash:`0x2f0555cc76fc2840a25a6ea3b9637146806f1f44b090c175ffde2a7e5ab36c03`,ss58Format:0}},kn=function(e){return e[e.Polkadot=9999]=`Polkadot`,e[e.Bittensor=558]=`Bittensor`,e}({}),An=e=>xn.has(e),jn=e=>e===m.Solana,Mn=e=>e===m.Ton,Nn=e=>e===m.Tron,Pn=e=>e===f.Bittensor,Fn=e=>An(e)||jt.has(e)||ge.has(e)||Tn.has(e),In={iconUrl:l(p.Ethereum),title:`EVM`,id:`evm`},Ln={id:`ledgerLive`,name:`Ledger Live`,type:`ledgerLive`},Rn=e=>e.id===Ln.id;export{Ue as A,je as B,H as C,L as D,B as E,Re as F,F as G,ke as H,Ve as I,Ee as K,Fe as L,Be as M,Ie as N,Ke as O,Le as P,Ne as R,nt as S,Qe as T,Ae as U,Oe as V,De as W,kt as _,An as a,ft as b,Mn as c,On as d,Cn as f,Ot as g,At as h,Pn as i,ze as j,We as k,Nn as l,dn as m,Rn as n,jn as o,Sn as p,In as r,Fn as s,Ln as t,kn as u,Et as v,V as w,dt as x,pt as y,Pe as z};
1
+ import{G as e,K as t,M as n,R as r,U as i,W as a,f as o,q as s,s as c,y as l,z as u}from"./createConnector-BkcvlarK.js";import{d}from"./Codec-DbDD5C2D.js";import{a as f,n as p,r as m,t as h}from"./networks-DcV8Uo1h.js";import{g,l as _,m as v,u as y}from"./getAbiItem-CSTQJ-WB.js";import{a as b,b as ee,c as x,f as S,o as C,p as w,r as te,t as T,u as E,y as ne}from"./toBytes-95hyeuU1.js";import{t as D}from"./base-3h_1QOcC.js";import{I as re,P as O,_ as ie,a as k,g as ae,h as oe,i as se,k as ce,n as A,o as le,r as ue,s as de,t as fe}from"./assertRequest-CcS5Fjvi.js";import{n as j,u as pe}from"./node-BO78CZA-.js";import{n as me,t as he}from"./sha256-qwlK_Blg.js";import{a as ge}from"./misc-B58_8Z_Y.js";var M=class{constructor(e,t){this.first=e,this.second=t,this.length=2,this[0]=e,this[1]=t}*[Symbol.iterator](){yield this.first,yield this.second}toJSON(){return this.toArray()}inspect(){return`Tuple(${JSON.stringify(this.first)}, ${JSON.stringify(this.second)})`}[Symbol.for(`nodejs.util.inspect.custom`)](e,t,n){return`Tuple(${n(this.first,t)}, ${n(this.second,t)})`}toString(){return this.inspect()}fst(){return this.first}snd(){return this.second}equals(e){return this.first===e.fst()&&this.second===e.snd()}bimap(e,t){return N(e(this.first),t(this.second))}mapFirst(e){return N(e(this.first),this.second)}map(e){return N(this.first,e(this.second))}reduce(e,t){return e(t,this.second)}toArray(){return[this.first,this.second]}swap(){return N(this.second,this.first)}ap(e){return N(this.first,e.snd()(this.second))}every(e){return e(this.first)&&e(this.second)}some(e){return e(this.first)||e(this.second)}};M.prototype[`fantasy-land/equals`]=M.prototype.equals,M.prototype[`fantasy-land/bimap`]=M.prototype.bimap,M.prototype[`fantasy-land/map`]=M.prototype.map,M.prototype[`fantasy-land/reduce`]=M.prototype.reduce,M.prototype[`fantasy-land/ap`]=M.prototype.ap;var N=Object.assign((e,t)=>new M(e,t),{fromArray:([e,t])=>N(e,t),fanout:(...e)=>{let[t,n,r]=e;switch(e.length){case 3:return N(t(r),n(r));case 2:return e=>N.fanout(t,n,e);default:return e=>n=>N.fanout(t,e,n)}}});M.prototype.constructor=N;var _e=e=>e.length>0?t(e[0]):s,ve=e=>e.length>0?t(e[e.length-1]):s,ye=e=>e.length>0?t(e.slice(1)):s,be=e=>e.length>0?t(e.slice(0,-1)):s,xe=e=>e.length>0?t(N(e[0],e.slice(1))):s,Se=e=>e.reduce((e,t)=>e+t,0);function Ce(t,n){switch(arguments.length){case 1:return e=>Ce(t,e);default:return e.fromNullable(n.find(t))}}function P(t,n){switch(arguments.length){case 1:return e=>P(t,e);default:return e.fromPredicate(e=>e!==-1,n.findIndex(t))}}function we(e,n){switch(arguments.length){case 1:return t=>we(e,t);default:return n[e]===void 0?s:t(n[e])}}function Te(e,t){switch(arguments.length){case 1:return t=>Te(e,t);default:return[...t].sort((t,n)=>d(e(t,n)))}}var Ee={init:be,uncons:xe,at:we,head:_e,last:ve,tail:ye,find:Ce,findIndex:P,sum:Se,sort:Te},F=e=>`${e.network}-${e.address?.toLowerCase()??``}`,De=(e,t)=>F(e)===F(t)&&e.symbol===t.symbol,Oe=e=>!!je(e)?.required,ke=e=>!!I(e,`validatorAddress`)?.required,Ae=e=>!!I(e,`validatorAddresses`)?.required,je=e=>{let t=I(e,`amount`);if(!t)return null;let n=Me(t.minimum),r=Me(t.maximum);return{required:!!t.required,minimum:n,maximum:r,forceMax:n===-1&&r===-1}},I=(e,t)=>{let n=e.arguments?.fields?.find(e=>e.name===t);if(n)return{required:!!n.required,minimum:n.minimum??null,maximum:n.maximum??null};let r=e.args?.args?.[t];return r?{required:!!r.required,minimum:r.minimum??null,maximum:r.maximum??null}:null},Me=e=>{if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=Number(e);return Number.isFinite(t)?t:null},Ne=class{value;constructor(e){this.value=e}getByToken(t){return e.fromNullable(this.value.get(F(t)))}},Pe=({token:e,baseToken:t,amount:n,prices:r,pricePerShare:i})=>{let a=u(n);if(i&&t){let e=new u(r.getByToken(t).chainNullable(e=>e.price).orDefault(0)),n=u(i);return a.times(e).times(n)}let o=new u(r.getByToken(e).chainNullable(e=>e.price).orDefault(0));return a.times(o)},Fe=({stakeToken:e,yieldDto:t})=>De(e,t.mechanics.gasFeeToken),Ie=({availableAmount:e,gasEstimateTotal:t,integrationMaxLimit:n})=>u.max(u.min(n.orDefault(u(1/0)),e.minus(t)),new u(0)),Le=e=>{let t={...e,transactions:e.transactions.filter(e=>e.status!==`SKIPPED`)};return t.transactions.some(e=>Re(e.status))?i(Error(`Transaction failed`)):a(t)},Re=e=>e===`FAILED`||e===`BLOCKED`,ze=e=>Ae(e),Be=e=>ke(e),Ve=e=>{let t=Number(e);return Number.isNaN(t)?e:t};function He(e){return o(e?.lift)}function Ue(e){return function(t){if(He(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}r();function We(e,t,n,r,i){return new Ge(e,t,n,r,i)}var Ge=function(e){n(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(c);function Ke(e,t){return Ue(function(n,r){var i=0;n.subscribe(We(r,function(n){r.next(e.call(t,n,i++))}))})}function L(e,t=`hex`){let n=qe(e),r=re(new Uint8Array(n.length));return n.encode(r),t===`hex`?b(r.bytes):r.bytes}function qe(e){return Array.isArray(e)?Je(e.map(e=>qe(e))):Ye(e)}function Je(e){let t=e.reduce((e,t)=>e+t.length,0),n=R(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),n===1?r.pushUint8(t):n===2?r.pushUint16(t):n===3?r.pushUint24(t):r.pushUint32(t));for(let{encode:t}of e)t(r)}}}function Ye(e){let t=typeof e==`string`?T(e):e,n=R(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){t.length===1&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),n===1?e.pushUint8(t.length):n===2?e.pushUint16(t.length):n===3?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}function R(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new D(`Length is too large.`)}var z={"0x0":`legacy`,"0x1":`eip2930`,"0x2":`eip1559`,"0x3":`eip4844`,"0x4":`eip7702`};function B(e,t){let n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?S(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?S(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?z[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Ze(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v==`bigint`){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return+(n.v%2n==0n)}})(),n.type===`legacy`&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type===`eip2930`&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type===`eip1559`&&delete n.maxFeePerBlobGas,n}var Xe=k(`transaction`,B);function Ze(e){return e.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))}function Qe(e,t){let n=(e.transactions??[]).map(e=>typeof e==`string`?e:B(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var $e=k(`block`,Qe);function V(e){let{kzg:t}=e,n=e.to??(typeof e.blobs[0]==`string`?`hex`:`bytes`),r=typeof e.blobs[0]==`string`?e.blobs.map(e=>T(e)):e.blobs,i=[];for(let e of r)i.push(Uint8Array.from(t.blobToKzgCommitment(e)));return n===`bytes`?i:i.map(e=>b(e))}function H(e){let{kzg:t}=e,n=e.to??(typeof e.blobs[0]==`string`?`hex`:`bytes`),r=typeof e.blobs[0]==`string`?e.blobs.map(e=>T(e)):e.blobs,i=typeof e.commitments[0]==`string`?e.commitments.map(e=>T(e)):e.commitments,a=[];for(let e=0;e<r.length;e++){let n=r[e],o=i[e];a.push(Uint8Array.from(t.computeBlobKzgProof(n,o)))}return n===`bytes`?a:a.map(e=>b(e))}he();function et(e,t){let n=t||`hex`,r=me(ee(e,{strict:!1})?te(e):e);return n===`bytes`?r:x(r)}function tt(e){let{commitment:t,version:n=1}=e,r=e.to??(typeof t==`string`?`hex`:`bytes`),i=et(t,`bytes`);return i.set([n],0),r===`bytes`?i:b(i)}function nt(e){let{commitments:t,version:n}=e,r=e.to??(typeof t[0]==`string`?`hex`:`bytes`),i=[];for(let e of t)i.push(tt({commitment:e,to:r,version:n}));return i}var rt=6,U=4096,it=32*U,at=it*rt-1-1*U*rt,ot=class extends D{constructor({maxSize:e,size:t}){super(`Blob size is too large.`,{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:`BlobSizeTooLargeError`})}},st=class extends D{constructor(){super(`Blob data must not be empty.`,{name:`EmptyBlobError`})}},ct=class extends D{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:[`Expected: 32`,`Received: ${t}`],name:`InvalidVersionedHashSizeError`})}},lt=class extends D{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: 1`,`Received: ${t}`],name:`InvalidVersionedHashVersionError`})}};function ut(e){let t=e.to??(typeof e.data==`string`?`hex`:`bytes`),n=typeof e.data==`string`?T(e.data):e.data,r=ne(n);if(!r)throw new st;if(r>761855)throw new ot({maxSize:at,size:r});let i=[],a=!0,o=0;for(;a;){let e=re(new Uint8Array(it)),t=0;for(;t<U;){let r=n.slice(o,o+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),a=!1;break}t++,o+=31}i.push(e)}return t===`bytes`?i.map(e=>e.bytes):i.map(e=>b(e.bytes))}function dt(e){let{data:t,kzg:n,to:r}=e,i=e.blobs??ut({data:t,to:r}),a=e.commitments??V({blobs:i,kzg:n,to:r}),o=e.proofs??H({blobs:i,commitments:a,kzg:n,to:r}),s=[];for(let e=0;e<i.length;e++)s.push({blob:i[e],commitment:a[e],proof:o[e]});return s}function ft(e){if(e.type)return e.type;if(e.authorizationList!==void 0)return`eip7702`;if(e.blobs!==void 0||e.blobVersionedHashes!==void 0||e.maxFeePerBlobGas!==void 0||e.sidecars!==void 0)return`eip4844`;if(e.maxFeePerGas!==void 0||e.maxPriorityFeePerGas!==void 0)return`eip1559`;if(e.gasPrice!==void 0)return e.accessList===void 0?`legacy`:`eip2930`;throw new ae({transaction:e})}function pt(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}function mt(e){let{authorizationList:t}=e;if(t)for(let e of t){let{chainId:t}=e,n=e.address;if(!v(n))throw new g({address:n});if(t<0)throw new O({chainId:t})}W(e)}function ht(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new st;for(let e of t){let t=ne(e),n=S(y(e,0,1));if(t!==32)throw new ct({hash:e,size:t});if(n!==1)throw new lt({hash:e,version:n})}}W(e)}function W(e){let{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new O({chainId:t});if(i&&!v(i))throw new g({address:i});if(r&&r>A)throw new j({maxFeePerGas:r});if(n&&r&&n>r)throw new pe({maxFeePerGas:r,maxPriorityFeePerGas:n})}function gt(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(t<=0)throw new O({chainId:t});if(a&&!v(a))throw new g({address:a});if(n||i)throw new D("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>A)throw new j({maxFeePerGas:r})}function _t(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a}=e;if(a&&!v(a))throw new g({address:a});if(t!==void 0&&t<=0)throw new O({chainId:t});if(n||i)throw new D("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>A)throw new j({maxFeePerGas:r})}function G(e){if(!e||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!=64)throw new ie({storageKey:i[e]});if(!v(r,{strict:!1}))throw new g({address:r});t.push([r,i])}return t}function vt(e,t){let n=ft(e);return n===`eip1559`?xt(e,t):n===`eip2930`?St(e,t):n===`eip4844`?bt(e,t):n===`eip7702`?yt(e,t):Ct(e,t)}function yt(e,t){let{authorizationList:n,chainId:r,gas:i,nonce:a,to:o,value:s,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;mt(e);let f=G(u),p=wt(n);return _([`0x04`,L([C(r),a?C(a):`0x`,l?C(l):`0x`,c?C(c):`0x`,i?C(i):`0x`,o??`0x`,s?C(s):`0x`,d??`0x`,f,p,...K(e,t)])])}function bt(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerBlobGas:s,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;ht(e);let f=e.blobVersionedHashes,p=e.sidecars;if(e.blobs&&(f===void 0||p===void 0)){let t=typeof e.blobs[0]==`string`?e.blobs:e.blobs.map(e=>b(e)),n=e.kzg,r=V({blobs:t,kzg:n});f===void 0&&(f=nt({commitments:r})),p===void 0&&(p=dt({blobs:t,commitments:r,proofs:H({blobs:t,commitments:r,kzg:n})}))}let m=G(u),h=[C(n),i?C(i):`0x`,l?C(l):`0x`,c?C(c):`0x`,r?C(r):`0x`,a??`0x`,o?C(o):`0x`,d??`0x`,m,s?C(s):`0x`,f??[],...K(e,t)],g=[],v=[],y=[];if(p)for(let e=0;e<p.length;e++){let{blob:t,commitment:n,proof:r}=p[e];g.push(t),v.push(n),y.push(r)}return _([`0x03`,L(p?[h,g,v,y]:h)])}function xt(e,t){let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:l,data:u}=e;W(e);let d=G(l);return _([`0x02`,L([C(n),i?C(i):`0x`,c?C(c):`0x`,s?C(s):`0x`,r?C(r):`0x`,a??`0x`,o?C(o):`0x`,u??`0x`,d,...K(e,t)])])}function St(e,t){let{chainId:n,gas:r,data:i,nonce:a,to:o,value:s,accessList:c,gasPrice:l}=e;gt(e);let u=G(c);return _([`0x01`,L([C(n),a?C(a):`0x`,l?C(l):`0x`,r?C(r):`0x`,o??`0x`,s?C(s):`0x`,i??`0x`,u,...K(e,t)])])}function Ct(e,t){let{chainId:n=0,gas:r,data:i,nonce:a,to:o,value:s,gasPrice:c}=e;_t(e);let l=[a?C(a):`0x`,c?C(c):`0x`,r?C(r):`0x`,o??`0x`,s?C(s):`0x`,i??`0x`];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(n>0)return BigInt(n*2)+BigInt(35n+t.v-27n);let e=27n+(t.v===27n?0n:1n);if(t.v!==e)throw new oe({v:t.v});return e})(),r=w(t.r),i=w(t.s);l=[...l,C(e),r===`0x00`?`0x`:r,i===`0x00`?`0x`:i]}else n>0&&(l=[...l,C(n),`0x`,`0x`]);return L(l)}function K(e,t){let n=t??e,{v:r,yParity:i}=n;if(n.r===void 0||n.s===void 0||r===void 0&&i===void 0)return[];let a=w(n.r),o=w(n.s);return[typeof i==`number`?i?C(1):`0x`:r===0n?`0x`:r===1n?C(1):r===27n?`0x`:C(1),a===`0x00`?`0x`:a,o===`0x00`?`0x`:o]}function wt(e){if(!e||e.length===0)return[];let t=[];for(let n of e){let{chainId:e,nonce:r,...i}=n,a=n.address;t.push([e?x(e):`0x`,a,r?x(r):`0x`,...K({},i)])}return t}function q(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(e){return t=>{let r=typeof t==`function`?t(e):t,i={...e,...r};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}var Tt={"0x0":`reverted`,"0x1":`success`};function Et(e,t){let n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>pt(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?S(e.transactionIndex):null,status:e.status?Tt[e.status]:null,type:e.type?z[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}var Dt=k(`transactionReceipt`,Et),Ot=class extends D{constructor({docsPath:e}={}){super([`Could not find an Account to execute with this Action.`,"Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
2
+ `),{docsPath:e,docsSlug:`account`,name:`AccountNotFoundError`})}},kt=class extends D{constructor({docsPath:e,metaMessages:t,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:e,metaMessages:t,name:`AccountTypeNotSupportedError`})}},At=[h.Akash,h.Cosmos,h.Juno,h.Kava,h.Osmosis,h.Stargaze,h.Onomy,h.Persistence,h.Axelar,h.Quicksilver,h.Agoric,h.BandProtocol,h.Bitsong,h.Chihuahua,h.Comdex,h.Crescent,h.Cronos,h.Cudos,h.FetchAi,h.GravityBridge,h.IRISnet,h.KiNetwork,h.MarsProtocol,h.Regen,h.Secret,h.Sentinel,h.Sommelier,h.Teritori,h.Umee,h.Coreum,h.Desmos,h.Dydx,h.Injective,h.Sei,h.Mantra],jt=new Set(At),Mt={gasPriceOracle:{address:`0x420000000000000000000000000000000000000F`},l1Block:{address:`0x4200000000000000000000000000000000000015`},l2CrossDomainMessenger:{address:`0x4200000000000000000000000000000000000007`},l2Erc721Bridge:{address:`0x4200000000000000000000000000000000000014`},l2StandardBridge:{address:`0x4200000000000000000000000000000000000010`},l2ToL1MessagePasser:{address:`0x4200000000000000000000000000000000000016`}},Nt={block:$e({format(e){return{transactions:e.transactions?.map(e=>{if(typeof e==`string`)return e;let t=B(e);return t.typeHex===`0x7e`&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?E(e.mint):void 0,t.sourceHash=e.sourceHash,t.type=`deposit`),t}),stateRoot:e.stateRoot}}}),transaction:Xe({format(e){let t={};return e.type===`0x7e`&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?E(e.mint):void 0,t.sourceHash=e.sourceHash,t.type=`deposit`),t}}),transactionReceipt:Dt({format(e){return{l1GasPrice:e.l1GasPrice?E(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?E(e.l1GasUsed):null,l1Fee:e.l1Fee?E(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};function Pt(e,t){return Lt(e)?It(e):vt(e,t)}var Ft={transaction:Pt};function It(e){Rt(e);let{sourceHash:t,data:n,from:r,gas:i,isSystemTx:a,mint:o,to:s,value:c}=e;return _([`0x7e`,L([t,r,s??`0x`,o?x(o):`0x`,c?x(c):`0x`,i?x(i):`0x`,a?`0x1`:`0x`,n??`0x`])])}function Lt(e){return e.type===`deposit`||e.sourceHash!==void 0}function Rt(e){let{from:t,to:n}=e;if(t&&!v(t))throw new g({address:t});if(n&&!v(n))throw new g({address:n})}var J={blockTime:2e3,contracts:Mt,formatters:Nt,serializers:Ft},zt=q({id:42161,name:`Arbitrum One`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:250,rpcUrls:{default:{http:[`https://arb1.arbitrum.io/rpc`]}},blockExplorers:{default:{name:`Arbiscan`,url:`https://arbiscan.io`,apiUrl:`https://api.arbiscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:7654707}}}),Bt=q({id:43114,name:`Avalanche`,blockTime:1700,nativeCurrency:{decimals:18,name:`Avalanche`,symbol:`AVAX`},rpcUrls:{default:{http:[`https://api.avax.network/ext/bc/C/rpc`]}},blockExplorers:{default:{name:`SnowTrace`,url:`https://snowtrace.io`,apiUrl:`https://api.snowtrace.io`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:11907934}}}),Y=1,Vt=q({...J,id:8453,name:`Base`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://mainnet.base.org`]}},blockExplorers:{default:{name:`Basescan`,url:`https://basescan.org`,apiUrl:`https://api.basescan.org/api`}},contracts:{...J.contracts,disputeGameFactory:{[Y]:{address:`0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e`}},l2OutputOracle:{[Y]:{address:`0x56315b90c40730925ec5485cf004d835058518A0`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:5022},portal:{[Y]:{address:`0x49048044D57e1C92A77f79988d21Fa8fAF74E97e`,blockCreated:17482143}},l1StandardBridge:{[Y]:{address:`0x3154Cf16ccdb4C6d922629664174b904d80F2C35`,blockCreated:17482143}}},sourceId:Y});({...Vt});var Ht=q({id:56,name:`BNB Smart Chain`,blockTime:750,nativeCurrency:{decimals:18,name:`BNB`,symbol:`BNB`},rpcUrls:{default:{http:[`https://56.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`BscScan`,url:`https://bscscan.com`,apiUrl:`https://api.bscscan.com/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:15921452}}}),Ut={estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;let[t,n]=await Promise.all([Wt(e.client,e.request.feeCurrency),Gt(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-n)+n,maxPriorityFeePerGas:n}}};async function Wt(e,t){let n=await e.request({method:`eth_gasPrice`,params:[t]});return BigInt(n)}async function Gt(e,t){let n=await e.request({method:`eth_maxPriorityFeePerGas`,params:[t]});return BigInt(n)}function X(e){return e===0||e===0n||e==null||e===`0`||e===``||typeof e==`string`&&(w(e).toLowerCase()===`0x`||w(e).toLowerCase()===`0x00`)}function Z(e){return!X(e)}function Kt(e){return e.maxFeePerGas!==void 0&&e.maxPriorityFeePerGas!==void 0}function qt(e){return e.type===`cip64`?!0:Kt(e)&&Z(e.feeCurrency)}var Jt={block:$e({format(e){return{transactions:e.transactions?.map(e=>typeof e==`string`?e:{...B(e),...e.gatewayFee?{gatewayFee:E(e.gatewayFee),gatewayFeeRecipient:e.gatewayFeeRecipient}:{},feeCurrency:e.feeCurrency})}}}),transaction:Xe({format(e){if(e.type===`0x7e`)return{isSystemTx:e.isSystemTx,mint:e.mint?E(e.mint):void 0,sourceHash:e.sourceHash,type:`deposit`};let t={feeCurrency:e.feeCurrency};return e.type===`0x7b`?t.type=`cip64`:(e.type===`0x7c`&&(t.type=`cip42`),t.gatewayFee=e.gatewayFee?E(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:ue({format(e){let t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),qt(e)&&(t.type=`0x7b`),t}})};function Yt(e,t){return qt(e)?Zt(e,t):Pt(e,t)}var Xt={transaction:Yt};function Zt(e,t){$t(e);let{chainId:n,gas:r,nonce:i,to:a,value:o,maxFeePerGas:s,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e;return _([`0x7b`,L([x(n),i?x(i):`0x`,c?x(c):`0x`,s?x(s):`0x`,r?x(r):`0x`,a??`0x`,o?x(o):`0x`,d??`0x`,G(l),u,...K(e,t)])])}var Qt=A;function $t(e){let{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:a,feeCurrency:o}=e;if(t<=0)throw new O({chainId:t});if(a&&!v(a))throw new g({address:a});if(r)throw new D("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(Z(i)&&i>Qt)throw new j({maxFeePerGas:i});if(Z(n)&&Z(i)&&n>i)throw new pe({maxFeePerGas:i,maxPriorityFeePerGas:n});if(Z(o)&&!v(o))throw new D("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(X(o))throw new D("`feeCurrency` must be provided for CIP-64 transactions.")}var en=q({blockTime:1e3,contracts:Mt,formatters:Jt,serializers:Xt,fees:Ut,id:42220,name:`Celo`,nativeCurrency:{decimals:18,name:`CELO`,symbol:`CELO`},rpcUrls:{default:{http:[`https://forno.celo.org`]}},blockExplorers:{default:{name:`Celo Explorer`,url:`https://celoscan.io`,apiUrl:`https://api.celoscan.io/api`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:13112599}},testnet:!1}),tn=q({id:1116,name:`Core Dao`,nativeCurrency:{decimals:18,name:`Core`,symbol:`CORE`},rpcUrls:{default:{http:[`https://rpc.coredao.org`]}},blockExplorers:{default:{name:`CoreDao`,url:`https://scan.coredao.org`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:11907934}},testnet:!1}),nn=q({id:100,name:`Gnosis`,nativeCurrency:{decimals:18,name:`xDAI`,symbol:`XDAI`},blockTime:5e3,rpcUrls:{default:{http:[`https://rpc.gnosischain.com`],webSocket:[`wss://rpc.gnosischain.com/wss`]}},blockExplorers:{default:{name:`Gnosisscan`,url:`https://gnosisscan.io`,apiUrl:`https://api.gnosisscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:21022491}}}),rn=q({id:5,name:`Goerli`,nativeCurrency:{name:`Goerli Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://5.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://goerli.etherscan.io`,apiUrl:`https://api-goerli.etherscan.io/api`}},contracts:{ensRegistry:{address:`0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e`},ensUniversalResolver:{address:`0xfc4AC75C46C914aF5892d6d3eFFcebD7917293F1`,blockCreated:10339206},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:6507670}},testnet:!0}),an=q({id:16666e5,name:`Harmony One`,nativeCurrency:{name:`Harmony`,symbol:`ONE`,decimals:18},rpcUrls:{default:{http:[`https://1666600000.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`Harmony Explorer`,url:`https://explorer.harmony.one`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:24185753}}}),on=q({id:560048,name:`Hoodi`,nativeCurrency:{name:`Hoodi Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.hoodi.ethpandaops.io`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://hoodi.etherscan.io`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:2589}},testnet:!0});async function sn(e,t){let{account:n=e.account}=t;if(!n)throw new Ot;let r=ce(n);try{let{accessList:n,blockNumber:i,blockTag:a,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:f,value:p,...m}=t,h=(typeof i==`bigint`?C(i):void 0)||a;fe(t);let g=e.chain?.formatters?.transactionRequest?.format,_=(g||se)({...le(m,{format:g}),account:r,accessList:n,data:o,gas:s,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:f,value:p},`estimateGas`),{baseFeePerGas:v,gasLimit:y,priorityFeePerGas:b}=await e.request({method:`linea_estimateGas`,params:h?[_,h]:[_]});return{baseFeePerGas:BigInt(v),gasLimit:BigInt(y),priorityFeePerGas:BigInt(b)}}catch(n){throw de(n,{...t,account:r,chain:e.chain})}}var cn={fees:{estimateFeesPerGas:ln,async maxPriorityFeePerGas({block:e,client:t,request:n}){let r=await ln({block:e,client:t,multiply:e=>e,request:n,type:`eip1559`});return r?.maxPriorityFeePerGas?r.maxPriorityFeePerGas:null}}};async function ln({client:e,multiply:t,request:n,type:r}){try{let i=await sn(e,{...n,account:n?.account}),{priorityFeePerGas:a}=i,o=t(BigInt(i.baseFeePerGas))+a;return r===`legacy`?{gasPrice:o}:{maxFeePerGas:o,maxPriorityFeePerGas:a}}catch{return null}}var un=q({...cn,id:59144,name:`Linea Mainnet`,blockTime:2e3,nativeCurrency:{name:`Linea Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.linea.build`],webSocket:[`wss://rpc.linea.build`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://lineascan.build`,apiUrl:`https://api.lineascan.build/api`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:42},ensRegistry:{address:`0x50130b669B28C339991d8676FA73CF122a121267`,blockCreated:6682888},ensUniversalResolver:{address:`0x4D41762915F83c76EcaF6776d9b08076aA32b492`,blockCreated:22222151}},ensTlds:[`.linea.eth`],testnet:!1}),dn=q({id:1,name:`Ethereum`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:12e3,rpcUrls:{default:{http:[`https://eth.merkle.io`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://etherscan.io`,apiUrl:`https://api.etherscan.io/api`}},contracts:{ensUniversalResolver:{address:`0xeeeeeeee14d718c2b47d9923deab1335e144eeee`,blockCreated:23085558},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:14353601}}}),fn=q({id:10143,name:`Monad Testnet`,blockTime:400,nativeCurrency:{name:`Testnet MON Token`,symbol:`MON`,decimals:18},rpcUrls:{default:{http:[`https://testnet-rpc.monad.xyz`]}},blockExplorers:{default:{name:`Monad Testnet explorer`,url:`https://testnet.monadexplorer.com`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:251449}},testnet:!0}),Q=1,pn=q({...J,id:10,name:`OP Mainnet`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://mainnet.optimism.io`]}},blockExplorers:{default:{name:`Optimism Explorer`,url:`https://optimistic.etherscan.io`,apiUrl:`https://api-optimistic.etherscan.io/api`}},contracts:{...J.contracts,disputeGameFactory:{[Q]:{address:`0xe5965Ab5962eDc7477C8520243A95517CD252fA9`}},l2OutputOracle:{[Q]:{address:`0xdfe97868233d1aa22e815a266982f2cf17685a27`}},multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:4286263},portal:{[Q]:{address:`0xbEb5Fc579115071764c7423A4f12eDde41f106Ed`}},l1StandardBridge:{[Q]:{address:`0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1`}}},sourceId:Q}),mn=q({id:9746,name:`Plasma Testnet`,nativeCurrency:{name:`Testnet Plasma`,symbol:`XPL`,decimals:18},rpcUrls:{default:{http:[`https://testnet-rpc.plasma.to`]}},blockExplorers:{default:{name:`RouteScan`,url:`https://testnet.plasmascan.to`}},contracts:{multicall3:{address:`0xcA11bde05977b3631167028862bE2a173976CA11`,blockCreated:0}},testnet:!0}),hn=q({id:137,name:`Polygon`,blockTime:2e3,nativeCurrency:{name:`POL`,symbol:`POL`,decimals:18},rpcUrls:{default:{http:[`https://polygon.drpc.org`]}},blockExplorers:{default:{name:`PolygonScan`,url:`https://polygonscan.com`,apiUrl:`https://api.etherscan.io/v2/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:25770160}}}),gn=q({id:11155111,name:`Sepolia`,nativeCurrency:{name:`Sepolia Ether`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://11155111.rpc.thirdweb.com`]}},blockExplorers:{default:{name:`Etherscan`,url:`https://sepolia.etherscan.io`,apiUrl:`https://api-sepolia.etherscan.io/api`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:751532},ensUniversalResolver:{address:`0xeeeeeeee14d718c2b47d9923deab1335e144eeee`,blockCreated:8928790}},testnet:!0}),_n=q({id:146,name:`Sonic`,blockTime:630,nativeCurrency:{decimals:18,name:`Sonic`,symbol:`S`},rpcUrls:{default:{http:[`https://rpc.soniclabs.com`]}},blockExplorers:{default:{name:`Sonic Explorer`,url:`https://sonicscan.org`}},contracts:{multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:60}},testnet:!1}),$=1,vn=q({...J,id:130,name:`Unichain`,nativeCurrency:{name:`Ether`,symbol:`ETH`,decimals:18},blockTime:1e3,rpcUrls:{default:{http:[`https://mainnet.unichain.org/`]}},blockExplorers:{default:{name:`Uniscan`,url:`https://uniscan.xyz`,apiUrl:`https://api.uniscan.xyz/api`}},contracts:{...J.contracts,multicall3:{address:`0xca11bde05977b3631167028862be2a173976ca11`,blockCreated:0},disputeGameFactory:{[$]:{address:`0x2F12d621a16e2d3285929C9996f478508951dFe4`}},portal:{[$]:{address:`0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2`}},l1StandardBridge:{[$]:{address:`0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA`}}},sourceId:$}),yn=q({id:88,name:`Viction`,nativeCurrency:{name:`Viction`,symbol:`VIC`,decimals:18},rpcUrls:{default:{http:[`https://rpc.viction.xyz`]}},blockExplorers:{default:{name:`VIC Scan`,url:`https://vicscan.xyz`}},testnet:!1}),bn=[p.AvalancheC,p.Arbitrum,p.Binance,p.Celo,p.Ethereum,p.EthereumGoerli,p.Harmony,p.Optimism,p.Polygon,p.Viction,p.EthereumHoodi,p.Base,p.Linea,p.Core,p.Sonic,p.EthereumSepolia,p.Unichain,p.Katana,p.Gnosis,p.HyperEVM,p.Plasma,p.Monad,p.MonadTestnet,p.Pharos],xn=new Set(bn),Sn={[p.Ethereum]:{type:`evm`,skChainName:p.Ethereum,wagmiChain:dn},[p.Polygon]:{type:`evm`,skChainName:p.Polygon,wagmiChain:hn},[p.Optimism]:{type:`evm`,skChainName:p.Optimism,wagmiChain:pn},[p.Arbitrum]:{type:`evm`,skChainName:p.Arbitrum,wagmiChain:zt},[p.AvalancheC]:{type:`evm`,skChainName:p.AvalancheC,wagmiChain:Bt},[p.Celo]:{type:`evm`,skChainName:p.Celo,wagmiChain:{...en,iconUrl:l(p.Celo)}},[p.Harmony]:{type:`evm`,skChainName:p.Harmony,wagmiChain:{...an,iconUrl:l(p.Harmony)}},[p.Viction]:{type:`evm`,skChainName:p.Viction,wagmiChain:{...yn,iconUrl:l(p.Viction)}},[p.Binance]:{type:`evm`,skChainName:p.Binance,wagmiChain:{...Ht,name:`BNB Chain`}},[p.Base]:{type:`evm`,skChainName:p.Base,wagmiChain:Vt},[p.Linea]:{type:`evm`,skChainName:p.Linea,wagmiChain:{...un,iconUrl:l(p.Linea)}},[p.Core]:{type:`evm`,skChainName:p.Core,wagmiChain:{...tn,name:`Core`,iconUrl:l(p.Core)}},[p.Sonic]:{type:`evm`,skChainName:p.Sonic,wagmiChain:{..._n,name:`Sonic`,iconUrl:l(p.Sonic)}},[p.EthereumHoodi]:{type:`evm`,skChainName:p.EthereumHoodi,wagmiChain:{...on,iconUrl:l(p.EthereumHoodi)}},[p.EthereumGoerli]:{type:`evm`,skChainName:p.EthereumGoerli,wagmiChain:rn},[p.EthereumSepolia]:{type:`evm`,skChainName:p.EthereumSepolia,wagmiChain:gn},[p.Unichain]:{type:`evm`,skChainName:p.Unichain,wagmiChain:vn},[p.Gnosis]:{type:`evm`,skChainName:p.Gnosis,wagmiChain:nn},[p.Plasma]:{type:`evm`,skChainName:p.Plasma,wagmiChain:{id:9745,name:`Plasma`,iconUrl:l(p.Plasma),nativeCurrency:mn.nativeCurrency,rpcUrls:{default:{http:[`https://rpc.plasma.to`]}}}},[p.Katana]:{type:`evm`,skChainName:p.Katana,wagmiChain:{id:747474,name:`Katana`,iconUrl:l(p.Katana),nativeCurrency:{name:`Ethereum`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.katana.network/`]}}}},[p.HyperEVM]:{type:`evm`,skChainName:p.HyperEVM,wagmiChain:{id:999,name:`HyperEVM`,iconUrl:l(p.HyperEVM),nativeCurrency:{name:`Ethereum`,symbol:`ETH`,decimals:18},rpcUrls:{default:{http:[`https://rpc.hyperliquid.xyz/evm`]}}}},[p.MonadTestnet]:{type:`evm`,skChainName:p.MonadTestnet,wagmiChain:{...fn,iconUrl:l(p.MonadTestnet)}},[p.Monad]:{type:`evm`,skChainName:p.Monad,wagmiChain:{id:143,name:`Monad`,iconUrl:l(p.Monad),nativeCurrency:{name:`Monad`,symbol:`MON`,decimals:18},rpcUrls:{default:{http:[`https://rpc-mainnet.monadinfra.com/rpc/wibIOSEgRVbSCBJwHBho3mLEQODJvzd2`]}}}},[p.Pharos]:{type:`evm`,skChainName:p.Pharos,wagmiChain:{id:1672,name:`Pharos`,iconUrl:l(p.Pharos),nativeCurrency:{name:`PROS`,symbol:`PROS`,decimals:18},rpcUrls:{default:{http:[`https://rpc.pharos.xyz`]}},blockExplorers:{default:{name:`Pharos Explorer`,url:`https://pharosscan.xyz`}}}}},Cn=function(e){return e[e.Ethereum=1]=`Ethereum`,e[e.Polygon=137]=`Polygon`,e[e.Optimism=10]=`Optimism`,e[e.Arbitrum=42161]=`Arbitrum`,e[e.AvalancheC=43114]=`AvalancheC`,e[e.Celo=42220]=`Celo`,e[e.Harmony=16666e5]=`Harmony`,e[e.Viction=88]=`Viction`,e[e.Binance=56]=`Binance`,e[e.Base=8453]=`Base`,e[e.Linea=59144]=`Linea`,e[e.Core=1116]=`Core`,e[e.Sonic=146]=`Sonic`,e[e.EthereumHoodi=560048]=`EthereumHoodi`,e[e.EthereumGoerli=5]=`EthereumGoerli`,e[e.EthereumSepolia=11155111]=`EthereumSepolia`,e[e.Unichain=130]=`Unichain`,e[e.Katana=747474]=`Katana`,e[e.Gnosis=100]=`Gnosis`,e[e.Hyperevm=999]=`Hyperevm`,e[e.Plasma=9745]=`Plasma`,e[e.Monad=143]=`Monad`,e[e.MonadTestnet=10143]=`MonadTestnet`,e[e.Pharos=1672]=`Pharos`,e}({}),wn=[f.Polkadot,f.Bittensor],Tn=new Set(wn),En={id:9999,name:`Polkadot`,iconUrl:l(f.Polkadot),nativeCurrency:{decimals:10,name:`Polkadot`,symbol:`DOT`},rpcUrls:{public:{http:[`https://rpc.polkadot.io`,`https://flashy-side-arrow.dot-mainnet.quiknode.pro/97d5006f66e37488fb9dc1575ef8960e3870dd0f/`],webSocket:[`wss://rpc.polkadot.io`]},default:{http:[`https://rpc.polkadot.io`,`https://flashy-side-arrow.dot-mainnet.quiknode.pro/97d5006f66e37488fb9dc1575ef8960e3870dd0f/`],webSocket:[`wss://rpc.polkadot.io`]}}},Dn={id:558,name:`Bittensor`,iconUrl:l(f.Bittensor),nativeCurrency:{decimals:9,name:`Bittensor Token`,symbol:`TAO`},rpcUrls:{default:{http:[`https://entrypoint-finney.opentensor.ai`],webSocket:[`wss://entrypoint-finney.opentensor.ai`]}}},On={[f.Polkadot]:{type:`substrate`,skChainName:f.Polkadot,wagmiChain:En,genesisHash:`0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3`,ss58Format:0},[f.Bittensor]:{type:`substrate`,skChainName:f.Bittensor,wagmiChain:Dn,genesisHash:`0x2f0555cc76fc2840a25a6ea3b9637146806f1f44b090c175ffde2a7e5ab36c03`,ss58Format:0}},kn=function(e){return e[e.Polkadot=9999]=`Polkadot`,e[e.Bittensor=558]=`Bittensor`,e}({}),An=e=>xn.has(e),jn=e=>e===m.Solana,Mn=e=>e===m.Ton,Nn=e=>e===m.Tron,Pn=e=>e===f.Bittensor,Fn=e=>An(e)||jt.has(e)||ge.has(e)||Tn.has(e),In={iconUrl:l(p.Ethereum),title:`EVM`,id:`evm`},Ln={id:`ledgerLive`,name:`Ledger Live`,type:`ledgerLive`},Rn=e=>e.id===Ln.id;export{Ue as A,je as B,H as C,L as D,B as E,Re as F,F as G,ke as H,Ve as I,Ee as K,Fe as L,Be as M,Ie as N,Ke as O,Le as P,Ne as R,nt as S,Qe as T,Ae as U,Oe as V,De as W,kt as _,An as a,ft as b,Mn as c,On as d,Cn as f,Ot as g,At as h,Pn as i,ze as j,We as k,Nn as l,dn as m,Rn as n,jn as o,Sn as p,In as r,Fn as s,Ln as t,kn as u,Et as v,V as w,dt as x,pt as y,Pe as z};
@@ -1 +1 @@
1
- import{b as e}from"./createConnector-BkcvlarK.js";import{r as t}from"./networks-DkZQuO0f.js";var n=[t.Near,t.Tezos,t.Solana,t.Tron,t.Ton,t.Cardano],r=new Set(n),i={id:397,name:`NEAR Protocol`,iconUrl:e(`near`),nativeCurrency:{decimals:24,name:`Near`,symbol:`NEAR`},rpcUrls:{public:{http:[`https://rpc.mainnet.near.org`]},default:{http:[`https://rpc.mainnet.near.org`]}}},a={id:1729,name:`Tezos`,iconUrl:e(`xtz`),nativeCurrency:{decimals:6,name:`Tezos`,symbol:`XTZ`},rpcUrls:{public:{http:[`https://rpc.tzbeta.net/`]},default:{http:[`https://rpc.tzbeta.net/`]}}},o={id:501,name:`Solana`,iconUrl:e(`sol`),nativeCurrency:{decimals:9,name:`Solana`,symbol:`SOL`},rpcUrls:{public:{http:[`https://api.mainnet-beta.solana.com/`]},default:{http:[`https://api.mainnet-beta.solana.com/`]}}},s={id:79,name:`Tron`,iconUrl:e(`trx`),nativeCurrency:{decimals:6,name:`Tron`,symbol:`TRX`},rpcUrls:{public:{http:[`https://api.trongrid.io`]},default:{http:[`https://api.trongrid.io`]}}},c={id:3412,name:`Ton`,iconUrl:e(`ton`),nativeCurrency:{decimals:9,name:`Toncoin`,symbol:`TON`},rpcUrls:{public:{http:[`https://ton.nownodes.io`]},default:{http:[`https://ton.nownodes.io`]}}},l={id:2e3,name:`Cardano`,iconUrl:e(`ada`),nativeCurrency:{decimals:6,name:`Cardano`,symbol:`ADA`},rpcUrls:{public:{http:[]},default:{http:[]}}},u={[t.Near]:{type:`misc`,skChainName:t.Near,wagmiChain:i},[t.Tezos]:{type:`misc`,skChainName:t.Tezos,wagmiChain:a},[t.Solana]:{type:`misc`,skChainName:t.Solana,wagmiChain:o},[t.Tron]:{type:`misc`,skChainName:t.Tron,wagmiChain:s},[t.Ton]:{type:`misc`,skChainName:t.Ton,wagmiChain:c},[t.Cardano]:{type:`misc`,skChainName:t.Cardano,wagmiChain:l}},d=function(e){return e[e.Near=397]=`Near`,e[e.Tezos=1729]=`Tezos`,e[e.Solana=501]=`Solana`,e[e.Tron=79]=`Tron`,e[e.Ton=3412]=`Ton`,e[e.Cardano=2e3]=`Cardano`,e}({});export{r as a,o as i,l as n,c as o,u as r,s,d as t};
1
+ import{b as e}from"./createConnector-BkcvlarK.js";import{r as t}from"./networks-DcV8Uo1h.js";var n=[t.Near,t.Tezos,t.Solana,t.Tron,t.Ton,t.Cardano],r=new Set(n),i={id:397,name:`NEAR Protocol`,iconUrl:e(`near`),nativeCurrency:{decimals:24,name:`Near`,symbol:`NEAR`},rpcUrls:{public:{http:[`https://rpc.mainnet.near.org`]},default:{http:[`https://rpc.mainnet.near.org`]}}},a={id:1729,name:`Tezos`,iconUrl:e(`xtz`),nativeCurrency:{decimals:6,name:`Tezos`,symbol:`XTZ`},rpcUrls:{public:{http:[`https://rpc.tzbeta.net/`]},default:{http:[`https://rpc.tzbeta.net/`]}}},o={id:501,name:`Solana`,iconUrl:e(`sol`),nativeCurrency:{decimals:9,name:`Solana`,symbol:`SOL`},rpcUrls:{public:{http:[`https://api.mainnet-beta.solana.com/`]},default:{http:[`https://api.mainnet-beta.solana.com/`]}}},s={id:79,name:`Tron`,iconUrl:e(`trx`),nativeCurrency:{decimals:6,name:`Tron`,symbol:`TRX`},rpcUrls:{public:{http:[`https://api.trongrid.io`]},default:{http:[`https://api.trongrid.io`]}}},c={id:3412,name:`Ton`,iconUrl:e(`ton`),nativeCurrency:{decimals:9,name:`Toncoin`,symbol:`TON`},rpcUrls:{public:{http:[`https://ton.nownodes.io`]},default:{http:[`https://ton.nownodes.io`]}}},l={id:2e3,name:`Cardano`,iconUrl:e(`ada`),nativeCurrency:{decimals:6,name:`Cardano`,symbol:`ADA`},rpcUrls:{public:{http:[]},default:{http:[]}}},u={[t.Near]:{type:`misc`,skChainName:t.Near,wagmiChain:i},[t.Tezos]:{type:`misc`,skChainName:t.Tezos,wagmiChain:a},[t.Solana]:{type:`misc`,skChainName:t.Solana,wagmiChain:o},[t.Tron]:{type:`misc`,skChainName:t.Tron,wagmiChain:s},[t.Ton]:{type:`misc`,skChainName:t.Ton,wagmiChain:c},[t.Cardano]:{type:`misc`,skChainName:t.Cardano,wagmiChain:l}},d=function(e){return e[e.Near=397]=`Near`,e[e.Tezos=1729]=`Tezos`,e[e.Solana=501]=`Solana`,e[e.Tron=79]=`Tron`,e[e.Ton=3412]=`Ton`,e[e.Cardano=2e3]=`Cardano`,e}({});export{r as a,o as i,l as n,c as o,u as r,s,d as t};
@@ -0,0 +1 @@
1
+ import{Er as e}from"./wallet-manager-st5o-xIp.js";export{e as NameService};
@@ -0,0 +1 @@
1
+ var e={Ethereum:`ethereum`,EthereumGoerli:`ethereum-goerli`,EthereumHolesky:`ethereum-holesky`,EthereumSepolia:`ethereum-sepolia`,EthereumHoodi:`ethereum-hoodi`,Arbitrum:`arbitrum`,Base:`base`,BaseSepolia:`base-sepolia`,Gnosis:`gnosis`,Optimism:`optimism`,Polygon:`polygon`,PolygonAmoy:`polygon-amoy`,Starknet:`starknet`,zkSync:`zksync`,Linea:`linea`,Unichain:`unichain`,Katana:`katana`,MonadTestnet:`monad-testnet`,Monad:`monad`,AvalancheC:`avalanche-c`,AvalancheCAtomic:`avalanche-c-atomic`,AvalancheP:`avalanche-p`,Binance:`binance`,Celo:`celo`,Fantom:`fantom`,Harmony:`harmony`,Moonriver:`moonriver`,OKC:`okc`,Viction:`viction`,Core:`core`,Sonic:`sonic`,HyperEVM:`hyperevm`,Plasma:`plasma`,Pharos:`pharos`},t={Agoric:`agoric`,Akash:`akash`,Axelar:`axelar`,BandProtocol:`band-protocol`,Bitsong:`bitsong`,Canto:`canto`,Chihuahua:`chihuahua`,Comdex:`comdex`,Coreum:`coreum`,Cosmos:`cosmos`,Crescent:`crescent`,Cronos:`cronos`,Cudos:`cudos`,Desmos:`desmos`,Dydx:`dydx`,Evmos:`evmos`,FetchAi:`fetch-ai`,GravityBridge:`gravity-bridge`,Injective:`injective`,IRISnet:`irisnet`,Juno:`juno`,Kava:`kava`,KiNetwork:`ki-network`,MarsProtocol:`mars-protocol`,NYM:`nym`,OKExChain:`okex-chain`,Onomy:`onomy`,Osmosis:`osmosis`,Persistence:`persistence`,Quicksilver:`quicksilver`,Regen:`regen`,Secret:`secret`,Sentinel:`sentinel`,Sommelier:`sommelier`,StaFi:`stafi`,Stargaze:`stargaze`,Stride:`stride`,Teritori:`teritori`,TGrade:`tgrade`,Umee:`umee`,Sei:`sei`,Mantra:`mantra`,Celestia:`celestia`,Saga:`saga`,Zetachain:`zetachain`,Dymension:`dymension`,HumansAi:`humansai`,Neutron:`neutron`},n={Polkadot:`polkadot`,Westend:`westend`,Kusama:`kusama`,Bittensor:`bittensor`},r={BinanceBeacon:`binancebeacon`,Cardano:`cardano`,Near:`near`,Solana:`solana`,SolanaDevnet:`solana-devnet`,Tezos:`tezos`,Tron:`tron`,Ton:`ton`,TonTestnet:`ton-testnet`,Aptos:`aptos`,Stellar:`stellar`,StellarTestnet:`stellar-testnet`,Sui:`sui`},i={...r,...n,...t,...e};export{n as a,i,e as n,r,t};
@@ -1 +1 @@
1
- import{G as e,n as t,t as n,y as r}from"./createConnector-BkcvlarK.js";import{r as i}from"./networks-DkZQuO0f.js";import{i as a}from"./misc-C7prhhSc.js";import{n as o}from"./transaction-D6Q02zs-.js";import{i as s,l as c,n as l,p as u,t as d,u as f}from"./porto-CK2p4yYV.js";u();var p=e=>{let t=o(e),n;try{return f.deserialize(t.buffer)}catch(e){n=e}try{return c.from(t.buffer)}catch(e){throw Error(`Failed to deserialize Solana transaction. encoding=${t.encoding} bufferLength=${t.buffer.length} VersionedTransaction error: ${n instanceof Error?n.message:String(n)}. Legacy Transaction error: ${e instanceof Error?e.message:String(e)}`)}},m=({solanaWallet:r,walletDetailsParams:i,connection:o})=>n(n=>({...i,isSolanaConnector:!0,id:r.adapter.name,name:r.adapter.name,type:r.adapter.name,showQrModal:!1,sendTransaction:async e=>{let t=p(e);return await r.adapter.sendTransaction(t,o)},connect:async e=>(n.emitter.emit(`message`,{type:`connecting`}),n.storage?.removeItem(`solana.disconnected`),await r.adapter.connect(),{accounts:e?.withCapabilities?[{address:r.adapter.publicKey?.toBase58(),capabilities:{}}]:[r.adapter.publicKey?.toBase58()],chainId:a.id}),disconnect:()=>(n.storage?.setItem(`solana.disconnected`,!0),r.adapter.disconnect()),getAccounts:async()=>e.fromNullable(r.adapter.publicKey?.toBase58()).map(e=>[e]).unsafeCoerce(),switchChain:async()=>a,getChainId:async()=>a.id,isAuthorized:async()=>{if(await n.storage?.getItem(`solana.disconnected`))return!1;let e=await n.storage?.getItem(`recentConnectorId`);return e&&e===r.adapter.name&&await r.adapter.autoConnect(),!!(r.adapter.connected&&r.adapter.publicKey?.toBase58())},onAccountsChanged:e=>{e.length===0?n.emitter.emit(`disconnect`):n.emitter.emit(`change`,{accounts:e})},onChainChanged:e=>{n.emitter.emit(`change`,{chainId:e})},onDisconnect:()=>{n.emitter.emit(`disconnect`)},getProvider:async()=>({}),$filteredChains:new t([a]).asObservable()})),h=({wallets:e,forceWalletConnectOnly:t,connection:n,variant:a})=>({groupName:`Solana`,wallets:t?[]:e.filter(e=>a===`porto`?e.adapter instanceof s:!0).map(e=>()=>({id:e.adapter.name,name:a===`porto`?`Porto`:e.adapter.name,iconUrl:a===`porto`?d:e.adapter.icon,iconBackground:a===`porto`?`#000`:`#fff`,chainGroup:{iconUrl:r(i.Solana),title:`Solana`,id:`solana`},installed:e.readyState===`Installed`||e.readyState===`Loadable`,...l(e.adapter),createConnector:t=>m({solanaWallet:e,walletDetailsParams:t,connection:n})}))});export{p as deserializeSolanaTransaction,h as getSolanaConnectors};
1
+ import{G as e,n as t,t as n,y as r}from"./createConnector-BkcvlarK.js";import{r as i}from"./networks-DcV8Uo1h.js";import{i as a}from"./misc-B58_8Z_Y.js";import{n as o}from"./transaction-D6Q02zs-.js";import{i as s,l as c,n as l,p as u,t as d,u as f}from"./porto-CK2p4yYV.js";u();var p=e=>{let t=o(e),n;try{return f.deserialize(t.buffer)}catch(e){n=e}try{return c.from(t.buffer)}catch(e){throw Error(`Failed to deserialize Solana transaction. encoding=${t.encoding} bufferLength=${t.buffer.length} VersionedTransaction error: ${n instanceof Error?n.message:String(n)}. Legacy Transaction error: ${e instanceof Error?e.message:String(e)}`)}},m=({solanaWallet:r,walletDetailsParams:i,connection:o})=>n(n=>({...i,isSolanaConnector:!0,id:r.adapter.name,name:r.adapter.name,type:r.adapter.name,showQrModal:!1,sendTransaction:async e=>{let t=p(e);return await r.adapter.sendTransaction(t,o)},connect:async e=>(n.emitter.emit(`message`,{type:`connecting`}),n.storage?.removeItem(`solana.disconnected`),await r.adapter.connect(),{accounts:e?.withCapabilities?[{address:r.adapter.publicKey?.toBase58(),capabilities:{}}]:[r.adapter.publicKey?.toBase58()],chainId:a.id}),disconnect:()=>(n.storage?.setItem(`solana.disconnected`,!0),r.adapter.disconnect()),getAccounts:async()=>e.fromNullable(r.adapter.publicKey?.toBase58()).map(e=>[e]).unsafeCoerce(),switchChain:async()=>a,getChainId:async()=>a.id,isAuthorized:async()=>{if(await n.storage?.getItem(`solana.disconnected`))return!1;let e=await n.storage?.getItem(`recentConnectorId`);return e&&e===r.adapter.name&&await r.adapter.autoConnect(),!!(r.adapter.connected&&r.adapter.publicKey?.toBase58())},onAccountsChanged:e=>{e.length===0?n.emitter.emit(`disconnect`):n.emitter.emit(`change`,{accounts:e})},onChainChanged:e=>{n.emitter.emit(`change`,{chainId:e})},onDisconnect:()=>{n.emitter.emit(`disconnect`)},getProvider:async()=>({}),$filteredChains:new t([a]).asObservable()})),h=({wallets:e,forceWalletConnectOnly:t,connection:n,variant:a})=>({groupName:`Solana`,wallets:t?[]:e.filter(e=>a===`porto`?e.adapter instanceof s:!0).map(e=>()=>({id:e.adapter.name,name:a===`porto`?`Porto`:e.adapter.name,iconUrl:a===`porto`?d:e.adapter.icon,iconBackground:a===`porto`?`#000`:`#fff`,chainGroup:{iconUrl:r(i.Solana),title:`Solana`,id:`solana`},installed:e.readyState===`Installed`||e.readyState===`Loadable`,...l(e.adapter),createConnector:t=>m({solanaWallet:e,walletDetailsParams:t,connection:n})}))});export{p as deserializeSolanaTransaction,h as getSolanaConnectors};
@@ -1 +1 @@
1
- import{G as e,H as t,V as n,W as r,n as i,t as a,y as o}from"./createConnector-BkcvlarK.js";import{n as s}from"./MaybeAsync-CX7KsWzr.js";import{r as c}from"./dist-BQMAk709.js";import{a as l}from"./networks-DkZQuO0f.js";import{l as u,m as d,p as f,s as p}from"./utils-GIC7NcXf.js";import{n as m}from"./eventemitter3-wLTAlMbm.js";import{t as h}from"./substrate-connector-meta-BckNG5i_.js";import{n as g}from"./esm-DZjVTWAH.js";import{n as _,r as v,t as y}from"./registry-DLj6GbFZ.js";d();function b(e){return e?O(p(e)):`0x`}new TextDecoder(`utf-8`);function x(e,t){return e.length===t.length?e.every((e,n)=>t[n]===e):!1}function S(e){return typeof e==`string`}function C(e){return typeof e==`number`}function w(e){return e instanceof Uint8Array}var T=/^0x[\da-fA-F]+$/;function E(e,t){return S(e)&&(e===`0x`||T.test(e))&&(!t||e.length%2==0)}new Uint8Array([0,97,115,109]),new Uint8Array([80,86,77]),d();function D(e){return f(k(e))}var O=e=>e?e.startsWith(`0x`)?e:`0x${e}`:`0x`,k=e=>e?e.startsWith(`0x`)?e.substring(2):e:``;function A(e){let t=(e??0).toString(16);return O(t.length%2?`0${t}`:t)}function ee(e){return D(A(e))}var j=new TextEncoder;function M(e){return j.encode(e)}function N(e){return b(M(e))}function P(e){if(w(e))return e;if(C(e))return ee(e);if(E(e))return D(e);if(S(e))return M(e);throw Error(`Invalid input type of: ${e}`)}function F(e,t=256,n){let r=Math.ceil(t/8),i=P(e);return n?_(i,{dkLen:r,key:n}):_(i,{dkLen:r})}d();function I(...e){return u(...e)}var L=M(`SS58PRE`);function R(e){return F(I(L,e),512)}function z(e){let t=e[0]&64?2:1,n=t===1?e[0]:(e[0]&63)<<2|e[1]>>6|(e[1]&63)<<8,r=[34+t,35+t].includes(e.length),i=e.length-(r?2:1),a=R(e.subarray(0,i));return[(e[0]&128)==0&&![46,47].includes(e[0])&&(r?e[e.length-2]===a[0]&&e[e.length-1]===a[1]:e[e.length-1]===a[0]),i,t,n]}var B=[3,4,6,10,35,36,37,38];function V(e,t,n=-1){if(!e)throw Error(`Invalid empty address passed`);if(w(e)||E(e))return P(e);try{let r=g.decode(e);if(!B.includes(r.length))throw Error(`Invalid decoded address length`);let[i,a,o,s]=z(r);if(!i&&!t)throw Error(`Invalid decoded address checksum`);if(n!==-1&&n!==s)throw Error(`Expected ss58Format ${n}, received ${s}`);return r.slice(o,a)}catch(t){throw Error(`Decoding ${e}: ${t.message}`)}}c();function H({storage:e,keyPrefix:t=`luno.`}){let n=e=>`${t}${e}`;return{async getItem(t){try{let r=n(t),i=await e.getItem(r);return i==null?null:String(i)}catch{return null}},async setItem(t,r){try{let i=n(t);await e.setItem(i,r)}catch{}},async removeItem(t){try{let r=n(t);await e.removeItem(r)}catch{}}}}H({storage:typeof window<`u`&&window.localStorage?window.localStorage:{getItem:async e=>null,setItem:async(e,t)=>{},removeItem:async e=>{}},keyPrefix:`luno.`});var U=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzA0IiBoZWlnaHQ9IjcwNCIgdmlld0JveD0iMCAwIDcwNCA3MDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd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LjU1OC05LjQ4IDAtNS45NjcgMS44NTYtMTIuMDQ4IDIuNjQtMTguMjA2LjcwMWwtMy42MjYtMS4yMzhabTI2LjY2NSA0NC43MzJjMTMuMzkgMCAyNC4yNDEtMTUuNTk2IDI0LjI0MS0xNS41OTZTNzYuNDEgNzIuNDk5IDYzLjAyIDcyLjQ5OWMtMTMuMzg1IDAtMjQuMjM2IDE1LjU5Ny0yNC4yMzYgMTUuNTk3czEwLjg1MSAxNS41OTYgMjQuMjQgMTUuNTk2Wm0xMC44ODMtMTUuNTk2YzAgNi4wMS00Ljg3MiAxMC44ODItMTAuODgzIDEwLjg4Mi02LjAxIDAtMTAuODgyLTQuODcyLTEwLjg4Mi0xMC44ODJzNC44NzItMTAuODgzIDEwLjg4Mi0xMC44ODMgMTAuODgzIDQuODcyIDEwLjg4MyAxMC44ODNabS0xMC44ODMgNC45MzZhNC45MzYgNC45MzYgMCAxIDAgMC05Ljg3MiA0LjkzNiA0LjkzNiAwIDAgMCAwIDkuODcyWiIvPgo8L3N2Zz4K`;function G(e,t){try{return x(V(e),V(t))}catch{return!1}}function K(e,t){if(!e)return[];try{return e.map(e=>{let n;try{n=b(V(e.address))}catch{}return{address:e.address,name:e.name,publicKey:n,meta:{source:t,genesisHash:e.genesisHash},type:e.type}})}catch(e){throw Error(`Failed to map injected accounts: ${e.message}`)}}var q=class extends m.default{constructor(){super(),this.links={},this.accounts=[],this.signer=void 0,this.connectionUri=void 0}async getAccounts(){return[...this.accounts]}async getSigner(){return this.signer,this.signer}hasConnectionUri(){return!1}async getConnectionUri(){return this.connectionUri}},J=class extends q{constructor(e){super(),this.unsubscribe=null,this.specificInjector=void 0,this.id=e.id,this.name=e.name,this.icon=e.icon,this.links=e.links,this.injectorId=e.injectorId||e.id}isInstalled(){if(typeof window>`u`)return!1;let e=window.injectedWeb3;return typeof e==`object`&&typeof e[this.injectorId]<`u`}async isAvailable(){return this.isInstalled()}async connect(e){if(this.signer)return[...this.accounts];if(!await this.isAvailable())throw Error(`${this.name} extension not found or not enabled.`);try{if(this.specificInjector=await window.injectedWeb3[this.injectorId].enable(e),!this.specificInjector)throw Error(`Failed to enable the '${this.id}' extension.`);if(this.signer=this.specificInjector.signer,!this.signer)throw Error(`Could not get signer from ${this.name}.`);let t=await this.specificInjector.accounts.get();if(t.length===0)throw Error(`No accounts found in ${this.name}. Make sure accounts are visible and access is granted.`);return this.accounts=K(t,this.id),await this.startSubscription(),this.emit(`connect`,[...this.accounts]),[...this.accounts]}catch(e){throw await this.cleanup(),e}}async disconnect(){await this.cleanup(),this.emit(`disconnect`)}async signMessage(e,t){if(!t||!e)return;let n=await this.getSigner();if(!n||!n?.signRaw)throw Error(`Signer is not available or does not support signRaw.`);if(!(await this.getAccounts()).some(e=>e.address.toLowerCase()===t.toLowerCase()))throw Error(`Address ${t} is not managed by ${this.name}.`);try{let r=N(e);return(await n.signRaw({address:t,data:r,type:`bytes`})).signature}catch(e){throw Error(`Connector ${this.id}: Failed to sign message: ${e.message}`)}}async startSubscription(){if(await this.cleanupSubscription(),!this.specificInjector)throw Error(`Connector ${this.id}: Cannot subscribe, specificInjector not available.`);try{this.unsubscribe=this.specificInjector.accounts.subscribe(e=>{let t=K(e,this.id);JSON.stringify(this.accounts)!==JSON.stringify(t)&&(this.accounts=t,this.emit(`accountsChanged`,[...this.accounts]))})}catch{this.unsubscribe=null}}async cleanupSubscription(){this.unsubscribe&&=(this.unsubscribe(),null)}async cleanup(){await this.cleanupSubscription(),this.accounts=[],this.signer=void 0,this.specificInjector=void 0}},Y=class extends q{constructor(e){super(),this.supportedChains=[],this.unsubscribe=null,this.id=e.id||`walletconnect`,this.name=e.name||`WalletConnect`,this.links=e.links||{},this.icon=e.icon||`data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjQwMCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHdpZHRoPSI0MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIC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tMi4wODYgNy43NDgxIDBsNTAuMTc4OSA0OC45MzJjLjUzNS41MjIgMS40MDIuNTIyIDEuOTM3IDBsNTAuMTc3LTQ4LjkzMmMyLjEzOS0yLjA4NyA1LjYwOC0yLjA4NyA3Ljc0OCAwbDUwLjE3OSA0OC45MzJjLjUzNS41MjIgMS40MDIuNTIyIDEuOTM3IDBsNTAuMTc5LTQ4LjkzMWMyLjEzOS0yLjA4NyA1LjYwOC0yLjA4NyA3Ljc0OCAweiIKICAgICAgICAgICAgICBmaWxsPSIjZmZmIi8+CiAgICA8L2c+Cjwvc3ZnPgo=`,this.projectId=e.projectId,this.relayUrl=e.relayUrl||`wss://relay.walletconnect.com`,this.metadata=e.metadata,this.supportedChains=e.supportedChains||[]}isInstalled(){return!1}async isAvailable(){return!0}convertChainIdToCaipId(e){return e.map(e=>`polkadot:${(e.genesisHash||e).replace(`0x`,``).slice(0,32)}`)}async connect(e,t){if(!this.projectId)throw Error(`${this.name} requires a projectId. Please visit https://cloud.walletconnect.com to get one.`);let n=t?.length?t:this.supportedChains.length?this.supportedChains:void 0;if(!n||n.length===0)throw Error(`${this.name} requires chains configuration.`);this.connectedChains=n;let{UniversalProvider:r}=await import(`./index.es-dse7zhPX.js`);try{if(this.provider=await r.init({projectId:this.projectId,relayUrl:this.relayUrl,metadata:this.metadata||{name:e,description:`LunoKit DApp`,url:typeof window<`u`?window.location.origin:``,icons:[this.icon]}}),this.provider.session){this.session=this.provider.session;let e=this.getAccountsFromSession(n);return this.accounts=e,await this.startSubscription(),this.emit(`connect`,[...this.accounts]),[...this.accounts]}if(!this.provider?.client)throw Error(`Provider not initialized or not connected`);let{uri:t,approval:i}=await this.provider.client.connect({requiredNamespaces:{polkadot:{methods:[`polkadot_signMessage`,`polkadot_sendTransaction`,`polkadot_signTransaction`,`polkadot_requestAccounts`],chains:this.convertChainIdToCaipId(n),events:[`accountsChanged`,`chainChanged`,`connect`]}},optionalNamespaces:{polkadot:{methods:[`polkadot_signMessage`,`polkadot_sendTransaction`,`polkadot_signTransaction`,`polkadot_requestAccounts`],chains:this.convertChainIdToCaipId(n),events:[`accountsChanged`,`chainChanged`,`connect`]}}});this.emit(`get_uri`,t);let a=await i();this.session=a,this.provider.session=a,this.connectionUri=void 0;let o=this.getAccountsFromSession(n);return this.accounts=o,await this.startSubscription(),this.emit(`connect`,[...this.accounts]),[...this.accounts]}catch(e){throw this.connectionUri=void 0,e}}getAccountsFromSession(e){let t=[e[0].genesisHash||e[0]],n=this.convertChainIdToCaipId(t)[0],r=this.session?.namespaces.polkadot.accounts.flat().filter(e=>e.includes(n)).map(e=>e.replace(`${n}:`,``));if(r&&r.length===0){let t=this.convertChainIdToCaipId(e)[0];r=this.session?.namespaces.polkadot.accounts.flat().filter(e=>e.includes(t)).map(e=>e.replace(`${t}:`,``))}let i=r.map(e=>({address:e,name:`${this.name} Account`,meta:{source:this.id},publicKey:void 0}));return this.emit(`accountsChanged`,[...i]),i}async disconnect(){try{this.provider&&await Promise.race([await this.provider.disconnect(),new Promise((e,t)=>setTimeout(()=>t(Error(`Disconnect timeout`)),5e3))])}catch{}await this.cleanup(),this.emit(`disconnect`)}async signMessage(e,t){if(!this.provider?.client||!this.session?.topic)throw Error(`Provider not initialized or not connected`);try{let n=await this.getSigner();if(!n)throw Error(`No signer provided`);let{signature:r}=await n.signRaw({address:t,data:e,type:`bytes`});return r}catch(e){throw e}}hasConnectionUri(){return!0}async getConnectionUri(){return this.connectionUri?this.connectionUri:new Promise(e=>{this.once(`get_uri`,t=>{this.connectionUri=t,e(t)})})}async getSigner(){if(!(!this.provider?.client||!this.session))return{signPayload:async e=>{let t=`polkadot:${e.genesisHash.replace(`0x`,``).slice(0,32)}`,n=this.session.namespaces.polkadot.accounts.find(n=>{let r=n.replace(`${t}:`,``);return n.includes(t)&&G(e.address,r)});if(!n)throw Error(`Chain ${e.genesisHash} is not supported by the wallet.}`);let r=n.replace(`${t}:`,``),i={...e,address:r};return await this.provider?.client?.request({topic:this.session.topic,chainId:`polkadot:${i.genesisHash.replace(`0x`,``).slice(0,32)}`,request:{method:`polkadot_signTransaction`,params:{address:r,transactionPayload:i}}})},signRaw:async e=>{let t=this.convertChainIdToCaipId(this.connectedChains)[0],n=this.session.namespaces.polkadot.accounts.find(n=>{let r=n.replace(`${t}:`,``);return n.includes(t)&&G(e.address,r)});if(!n)throw Error(`No accounts available for chain ${t}`);let r=n.replace(`${t}:`,``),i={...e};return await this.provider.client.request({topic:this.session.topic,chainId:t,request:{method:`polkadot_signMessage`,params:{address:r,message:i.data,type:i.type}}})}}}async startSubscription(){if(await this.cleanupSubscription(),!this.provider?.client||!this.session)throw Error(`Connector ${this.id}: Cannot subscribe, provider or session not available.`);try{let e=async()=>{await this.cleanup(),this.emit(`disconnect`)};this.provider.client.on(`session_delete`,e),this.unsubscribe=()=>{this.provider?.client?.off(`session_delete`,e)}}catch{this.unsubscribe=null}}async cleanupSubscription(){this.unsubscribe&&=(this.unsubscribe(),null)}async cleanup(){await this.cleanupSubscription(),this.accounts=[],this.signer=void 0,this.provider=void 0,this.session=void 0}},X=e=>new Y(e),Z=()=>new J({id:`subwallet-js`,name:`SubWallet`,icon:U,links:{browserExtension:`https://chromewebstore.google.com/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn`,deepLink:`https://mobile.subwallet.app/browser`}}),Q=()=>new J({id:`talisman`,name:`Talisman`,icon:W,links:{browserExtension:`https://chromewebstore.google.com/detail/talisman-wallet/fijngjgcjhjmmpcmkeiomlglpeiijkld`}}),$=({id:n,name:o,type:c,baseConnector:l,walletDetailsParams:u,chains:d,lunoKitChains:f})=>a(a=>{let p=new i(d);return{...u,id:n,name:o,type:c,showQrModal:!0,signTransaction:n=>s(()=>l.getSigner()).chain(i=>s.liftEither(e.fromNullable(i?.signPayload?.bind(i)).toEither(Error(`signer missing`))).chain(e=>s(()=>e({...n.tx,withSignedTransaction:!0}))).chain(e=>e.signedTransaction?s.liftEither(r(typeof e.signedTransaction==`string`?e.signedTransaction:v(e.signedTransaction))):s.liftEither(t.encase(()=>{let t=new y;t.setMetadata(t.createType(`Metadata`,n.metadataRpc));let r=t.createType(`Extrinsic`,{method:n.tx.method},{version:n.tx.version});return r.addSignature(n.tx.address,e.signature,n.tx),v(r.toU8a())})))).mapLeft(e=>Error(`Failed to sign transaction`,{cause:e})),connect:async e=>{a.emitter.emit(`message`,{type:`connecting`}),l.once(`get_uri`,e=>l.emit(`display_uri`,e));let t=await l.connect(o,f);if(!t||t.length===0)throw Error(`No accounts found`);return a.storage?.removeItem(`substrate.disconnected`),a.storage?.setItem(`substrate.lastConnectedId`,l.id),{accounts:e?.withCapabilities?t.map(e=>({address:e.address,capabilities:{}})):t.map(e=>e.address),chainId:p.getValue()[0].id}},disconnect:()=>(a.storage?.setItem(`substrate.disconnected`,!0),a.storage?.removeItem(`substrate.lastConnectedId`),l.disconnect()),getAccounts:()=>l.getAccounts().then(e=>e.map(e=>e.address)),switchChain:async e=>{let t=p.getValue().find(t=>t.id===e.chainId);if(!t)throw Error(`Chain not found`);return a.emitter.emit(`change`,{chainId:e.chainId}),t},getChainId:async()=>p.getValue()[0].id,isAuthorized:async()=>{if(await a.storage?.getItem(`substrate.disconnected`))return!1;let e=await a.storage?.getItem(`substrate.lastConnectedId`);return!!(e&&e===l.id)},onAccountsChanged:e=>{e.length===0?a.emitter.emit(`disconnect`):a.emitter.emit(`change`,{accounts:e})},onChainChanged:e=>{a.emitter.emit(`change`,{chainId:e})},onDisconnect:()=>{a.emitter.emit(`disconnect`)},getProvider:async()=>l,$filteredChains:p.asObservable()}}),te=(e,t,r)=>{let i=Z(),a=Q(),s=X({projectId:n.walletConnectV2.projectId}),c={iconUrl:o(l.Polkadot),title:`Substrate`,id:`substrate`},u=()=>({id:s.id,name:s.name,iconUrl:s.icon,iconBackground:`#fff`,chainGroup:c,installed:!0,qrCode:{getUri:e=>e},createConnector:n=>{let r=$({baseConnector:s,id:s.id,name:s.name,type:h.type,walletDetailsParams:n,chains:e,lunoKitChains:t});return e=>{let t=r(e);return{...t,...n,rkDetails:{...n.rkDetails,walletConnectModalConnector:t}}}}});return{groupName:`Substrate`,wallets:r?[u]:[u,()=>({id:a.id,name:a.name,iconUrl:a.icon,iconBackground:`#fff`,chainGroup:c,installed:a.isInstalled(),downloadUrls:{browserExtension:a.links.browserExtension,chrome:a.links.browserExtension},createConnector:n=>$({baseConnector:a,id:a.id,name:a.name,type:h.type,walletDetailsParams:n,chains:e,lunoKitChains:t})}),()=>({id:i.id,name:i.name,iconUrl:i.icon,iconBackground:`#fff`,chainGroup:c,installed:i.isInstalled(),downloadUrls:{browserExtension:i.links.browserExtension,chrome:i.links.browserExtension},createConnector:n=>$({baseConnector:i,id:i.id,name:i.name,type:h.type,walletDetailsParams:n,chains:e,lunoKitChains:t})})]}};export{te as getSubstrateConnectors};
1
+ import{G as e,H as t,V as n,W as r,n as i,t as a,y as o}from"./createConnector-BkcvlarK.js";import{n as s}from"./MaybeAsync-CX7KsWzr.js";import{r as c}from"./dist-BQMAk709.js";import{a as l}from"./networks-DcV8Uo1h.js";import{l as u,m as d,p as f,s as p}from"./utils-GIC7NcXf.js";import{n as m}from"./eventemitter3-wLTAlMbm.js";import{t as h}from"./substrate-connector-meta-BckNG5i_.js";import{n as g}from"./esm-DZjVTWAH.js";import{n as _,r as v,t as y}from"./registry-DLj6GbFZ.js";d();function b(e){return e?O(p(e)):`0x`}new TextDecoder(`utf-8`);function x(e,t){return e.length===t.length?e.every((e,n)=>t[n]===e):!1}function S(e){return typeof e==`string`}function C(e){return typeof e==`number`}function w(e){return e instanceof Uint8Array}var T=/^0x[\da-fA-F]+$/;function E(e,t){return S(e)&&(e===`0x`||T.test(e))&&(!t||e.length%2==0)}new Uint8Array([0,97,115,109]),new Uint8Array([80,86,77]),d();function D(e){return f(k(e))}var O=e=>e?e.startsWith(`0x`)?e:`0x${e}`:`0x`,k=e=>e?e.startsWith(`0x`)?e.substring(2):e:``;function A(e){let t=(e??0).toString(16);return O(t.length%2?`0${t}`:t)}function ee(e){return D(A(e))}var j=new TextEncoder;function M(e){return j.encode(e)}function N(e){return b(M(e))}function P(e){if(w(e))return e;if(C(e))return ee(e);if(E(e))return D(e);if(S(e))return M(e);throw Error(`Invalid input type of: ${e}`)}function F(e,t=256,n){let r=Math.ceil(t/8),i=P(e);return n?_(i,{dkLen:r,key:n}):_(i,{dkLen:r})}d();function I(...e){return u(...e)}var L=M(`SS58PRE`);function R(e){return F(I(L,e),512)}function z(e){let t=e[0]&64?2:1,n=t===1?e[0]:(e[0]&63)<<2|e[1]>>6|(e[1]&63)<<8,r=[34+t,35+t].includes(e.length),i=e.length-(r?2:1),a=R(e.subarray(0,i));return[(e[0]&128)==0&&![46,47].includes(e[0])&&(r?e[e.length-2]===a[0]&&e[e.length-1]===a[1]:e[e.length-1]===a[0]),i,t,n]}var B=[3,4,6,10,35,36,37,38];function V(e,t,n=-1){if(!e)throw Error(`Invalid empty address passed`);if(w(e)||E(e))return P(e);try{let r=g.decode(e);if(!B.includes(r.length))throw Error(`Invalid decoded address length`);let[i,a,o,s]=z(r);if(!i&&!t)throw Error(`Invalid decoded address checksum`);if(n!==-1&&n!==s)throw Error(`Expected ss58Format ${n}, received ${s}`);return r.slice(o,a)}catch(t){throw Error(`Decoding ${e}: ${t.message}`)}}c();function H({storage:e,keyPrefix:t=`luno.`}){let n=e=>`${t}${e}`;return{async getItem(t){try{let r=n(t),i=await e.getItem(r);return i==null?null:String(i)}catch{return null}},async setItem(t,r){try{let i=n(t);await e.setItem(i,r)}catch{}},async removeItem(t){try{let r=n(t);await e.removeItem(r)}catch{}}}}H({storage:typeof window<`u`&&window.localStorage?window.localStorage:{getItem:async e=>null,setItem:async(e,t)=>{},removeItem:async e=>{}},keyPrefix:`luno.`});var U=`data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzA0IiBoZWlnaHQ9IjcwNCIgdmlld0JveD0iMCAwIDcwNCA3MDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3Lncz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05LjQ4IDAtNS45NjcgMS44NTYtMTIuMDQ4IDIuNjQtMTguMjA2LjcwMWwtMy42MjYtMS4yMzhabTI2LjY2NSA0NC43MzJjMTMuMzkgMCAyNC4yNDEtMTUuNTk2IDI0LjI0MS0xNS41OTZTNzYuNDEgNzIuNDk5IDYzLjAyIDcyLjQ5OWMtMTMuMzg1IDAtMjQuMjM2IDE1LjU5Ny0yNC4yMzYgMTUuNTk3czEwLjg1MSAxNS41OTYgMjQuMjQgMTUuNTk2Wm0xMC44ODMtMTUuNTk2YzAgNi4wMS00Ljg3MiAxMC44ODItMTAuODgzIDEwLjg4Mi02LjAxIDAtMTAuODgyLTQuODcyLTEwLjg4Mi0xMC44ODJzNC44NzItMTAuODgzIDEwLjg4Mi0xMC44ODMgMTAuODgzIDQuODcyIDEwLjg4MyAxMC44ODNabS0xMC44ODMgNC45MzZhNC45MzYgNC45MzYgMCAxIDAgMC05Ljg3MiA0LjkzNiA0LjkzNiAwIDAgMCAwIDkuODcyWiIvPgo8L3N2Zz4K`;function G(e,t){try{return x(V(e),V(t))}catch{return!1}}function K(e,t){if(!e)return[];try{return e.map(e=>{let n;try{n=b(V(e.address))}catch{}return{address:e.address,name:e.name,publicKey:n,meta:{source:t,genesisHash:e.genesisHash},type:e.type}})}catch(e){throw Error(`Failed to map injected accounts: ${e.message}`)}}var q=class extends m.default{constructor(){super(),this.links={},this.accounts=[],this.signer=void 0,this.connectionUri=void 0}async getAccounts(){return[...this.accounts]}async getSigner(){return this.signer,this.signer}hasConnectionUri(){return!1}async getConnectionUri(){return this.connectionUri}},J=class extends q{constructor(e){super(),this.unsubscribe=null,this.specificInjector=void 0,this.id=e.id,this.name=e.name,this.icon=e.icon,this.links=e.links,this.injectorId=e.injectorId||e.id}isInstalled(){if(typeof window>`u`)return!1;let e=window.injectedWeb3;return typeof e==`object`&&typeof e[this.injectorId]<`u`}async isAvailable(){return this.isInstalled()}async connect(e){if(this.signer)return[...this.accounts];if(!await this.isAvailable())throw Error(`${this.name} extension not found or not enabled.`);try{if(this.specificInjector=await window.injectedWeb3[this.injectorId].enable(e),!this.specificInjector)throw Error(`Failed to enable the '${this.id}' extension.`);if(this.signer=this.specificInjector.signer,!this.signer)throw Error(`Could not get signer from ${this.name}.`);let t=await this.specificInjector.accounts.get();if(t.length===0)throw Error(`No accounts found in ${this.name}. Make sure accounts are visible and access is granted.`);return this.accounts=K(t,this.id),await this.startSubscription(),this.emit(`connect`,[...this.accounts]),[...this.accounts]}catch(e){throw await this.cleanup(),e}}async disconnect(){await this.cleanup(),this.emit(`disconnect`)}async signMessage(e,t){if(!t||!e)return;let n=await this.getSigner();if(!n||!n?.signRaw)throw Error(`Signer is not available or does not support signRaw.`);if(!(await this.getAccounts()).some(e=>e.address.toLowerCase()===t.toLowerCase()))throw Error(`Address ${t} is not managed by ${this.name}.`);try{let r=N(e);return(await n.signRaw({address:t,data:r,type:`bytes`})).signature}catch(e){throw Error(`Connector ${this.id}: Failed to sign message: ${e.message}`)}}async startSubscription(){if(await this.cleanupSubscription(),!this.specificInjector)throw Error(`Connector ${this.id}: Cannot subscribe, specificInjector not available.`);try{this.unsubscribe=this.specificInjector.accounts.subscribe(e=>{let t=K(e,this.id);JSON.stringify(this.accounts)!==JSON.stringify(t)&&(this.accounts=t,this.emit(`accountsChanged`,[...this.accounts]))})}catch{this.unsubscribe=null}}async cleanupSubscription(){this.unsubscribe&&=(this.unsubscribe(),null)}async cleanup(){await this.cleanupSubscription(),this.accounts=[],this.signer=void 0,this.specificInjector=void 0}},Y=class extends q{constructor(e){super(),this.supportedChains=[],this.unsubscribe=null,this.id=e.id||`walletconnect`,this.name=e.name||`WalletConnect`,this.links=e.links||{},this.icon=e.icon||`data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjQwMCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHdpZHRoPSI0MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgICB4bWxu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YgNy43NDgxIDBsNTAuMTc4OSA0OC45MzJjLjUzNS41MjIgMS40MDIuNTIyIDEuOTM3IDBsNTAuMTc3LTQ4LjkzMmMyLjEzOS0yLjA4NyA1LjYwOC0yLjA4NyA3Ljc0OCAwbDUwLjE3OSA0OC45MzJjLjUzNS41MjIgMS40MDIuNTIyIDEuOTM3IDBsNTAuMTc5LTQ4LjkzMWMyLjEzOS0yLjA4NyA1LjYwOC0yLjA4NyA3Ljc0OCAweiIKICAgICAgICAgICAgICBmaWxsPSIjZmZmIi8+CiAgICA8L2c+Cjwvc3ZnPgo=`,this.projectId=e.projectId,this.relayUrl=e.relayUrl||`wss://relay.walletconnect.com`,this.metadata=e.metadata,this.supportedChains=e.supportedChains||[]}isInstalled(){return!1}async isAvailable(){return!0}convertChainIdToCaipId(e){return e.map(e=>`polkadot:${(e.genesisHash||e).replace(`0x`,``).slice(0,32)}`)}async connect(e,t){if(!this.projectId)throw Error(`${this.name} requires a projectId. Please visit https://cloud.walletconnect.com to get one.`);let n=t?.length?t:this.supportedChains.length?this.supportedChains:void 0;if(!n||n.length===0)throw Error(`${this.name} requires chains configuration.`);this.connectedChains=n;let{UniversalProvider:r}=await import(`./index.es-dse7zhPX.js`);try{if(this.provider=await r.init({projectId:this.projectId,relayUrl:this.relayUrl,metadata:this.metadata||{name:e,description:`LunoKit DApp`,url:typeof window<`u`?window.location.origin:``,icons:[this.icon]}}),this.provider.session){this.session=this.provider.session;let e=this.getAccountsFromSession(n);return this.accounts=e,await this.startSubscription(),this.emit(`connect`,[...this.accounts]),[...this.accounts]}if(!this.provider?.client)throw Error(`Provider not initialized or not connected`);let{uri:t,approval:i}=await this.provider.client.connect({requiredNamespaces:{polkadot:{methods:[`polkadot_signMessage`,`polkadot_sendTransaction`,`polkadot_signTransaction`,`polkadot_requestAccounts`],chains:this.convertChainIdToCaipId(n),events:[`accountsChanged`,`chainChanged`,`connect`]}},optionalNamespaces:{polkadot:{methods:[`polkadot_signMessage`,`polkadot_sendTransaction`,`polkadot_signTransaction`,`polkadot_requestAccounts`],chains:this.convertChainIdToCaipId(n),events:[`accountsChanged`,`chainChanged`,`connect`]}}});this.emit(`get_uri`,t);let a=await i();this.session=a,this.provider.session=a,this.connectionUri=void 0;let o=this.getAccountsFromSession(n);return this.accounts=o,await this.startSubscription(),this.emit(`connect`,[...this.accounts]),[...this.accounts]}catch(e){throw this.connectionUri=void 0,e}}getAccountsFromSession(e){let t=[e[0].genesisHash||e[0]],n=this.convertChainIdToCaipId(t)[0],r=this.session?.namespaces.polkadot.accounts.flat().filter(e=>e.includes(n)).map(e=>e.replace(`${n}:`,``));if(r&&r.length===0){let t=this.convertChainIdToCaipId(e)[0];r=this.session?.namespaces.polkadot.accounts.flat().filter(e=>e.includes(t)).map(e=>e.replace(`${t}:`,``))}let i=r.map(e=>({address:e,name:`${this.name} Account`,meta:{source:this.id},publicKey:void 0}));return this.emit(`accountsChanged`,[...i]),i}async disconnect(){try{this.provider&&await Promise.race([await this.provider.disconnect(),new Promise((e,t)=>setTimeout(()=>t(Error(`Disconnect timeout`)),5e3))])}catch{}await this.cleanup(),this.emit(`disconnect`)}async signMessage(e,t){if(!this.provider?.client||!this.session?.topic)throw Error(`Provider not initialized or not connected`);try{let n=await this.getSigner();if(!n)throw Error(`No signer provided`);let{signature:r}=await n.signRaw({address:t,data:e,type:`bytes`});return r}catch(e){throw e}}hasConnectionUri(){return!0}async getConnectionUri(){return this.connectionUri?this.connectionUri:new Promise(e=>{this.once(`get_uri`,t=>{this.connectionUri=t,e(t)})})}async getSigner(){if(!(!this.provider?.client||!this.session))return{signPayload:async e=>{let t=`polkadot:${e.genesisHash.replace(`0x`,``).slice(0,32)}`,n=this.session.namespaces.polkadot.accounts.find(n=>{let r=n.replace(`${t}:`,``);return n.includes(t)&&G(e.address,r)});if(!n)throw Error(`Chain ${e.genesisHash} is not supported by the wallet.}`);let r=n.replace(`${t}:`,``),i={...e,address:r};return await this.provider?.client?.request({topic:this.session.topic,chainId:`polkadot:${i.genesisHash.replace(`0x`,``).slice(0,32)}`,request:{method:`polkadot_signTransaction`,params:{address:r,transactionPayload:i}}})},signRaw:async e=>{let t=this.convertChainIdToCaipId(this.connectedChains)[0],n=this.session.namespaces.polkadot.accounts.find(n=>{let r=n.replace(`${t}:`,``);return n.includes(t)&&G(e.address,r)});if(!n)throw Error(`No accounts available for chain ${t}`);let r=n.replace(`${t}:`,``),i={...e};return await this.provider.client.request({topic:this.session.topic,chainId:t,request:{method:`polkadot_signMessage`,params:{address:r,message:i.data,type:i.type}}})}}}async startSubscription(){if(await this.cleanupSubscription(),!this.provider?.client||!this.session)throw Error(`Connector ${this.id}: Cannot subscribe, provider or session not available.`);try{let e=async()=>{await this.cleanup(),this.emit(`disconnect`)};this.provider.client.on(`session_delete`,e),this.unsubscribe=()=>{this.provider?.client?.off(`session_delete`,e)}}catch{this.unsubscribe=null}}async cleanupSubscription(){this.unsubscribe&&=(this.unsubscribe(),null)}async cleanup(){await this.cleanupSubscription(),this.accounts=[],this.signer=void 0,this.provider=void 0,this.session=void 0}},X=e=>new Y(e),Z=()=>new J({id:`subwallet-js`,name:`SubWallet`,icon:U,links:{browserExtension:`https://chromewebstore.google.com/detail/subwallet-polkadot-wallet/onhogfjeacnfoofkfgppdlbmlmnplgbn`,deepLink:`https://mobile.subwallet.app/browser`}}),Q=()=>new J({id:`talisman`,name:`Talisman`,icon:W,links:{browserExtension:`https://chromewebstore.google.com/detail/talisman-wallet/fijngjgcjhjmmpcmkeiomlglpeiijkld`}}),$=({id:n,name:o,type:c,baseConnector:l,walletDetailsParams:u,chains:d,lunoKitChains:f})=>a(a=>{let p=new i(d);return{...u,id:n,name:o,type:c,showQrModal:!0,signTransaction:n=>s(()=>l.getSigner()).chain(i=>s.liftEither(e.fromNullable(i?.signPayload?.bind(i)).toEither(Error(`signer missing`))).chain(e=>s(()=>e({...n.tx,withSignedTransaction:!0}))).chain(e=>e.signedTransaction?s.liftEither(r(typeof e.signedTransaction==`string`?e.signedTransaction:v(e.signedTransaction))):s.liftEither(t.encase(()=>{let t=new y;t.setMetadata(t.createType(`Metadata`,n.metadataRpc));let r=t.createType(`Extrinsic`,{method:n.tx.method},{version:n.tx.version});return r.addSignature(n.tx.address,e.signature,n.tx),v(r.toU8a())})))).mapLeft(e=>Error(`Failed to sign transaction`,{cause:e})),connect:async e=>{a.emitter.emit(`message`,{type:`connecting`}),l.once(`get_uri`,e=>l.emit(`display_uri`,e));let t=await l.connect(o,f);if(!t||t.length===0)throw Error(`No accounts found`);return a.storage?.removeItem(`substrate.disconnected`),a.storage?.setItem(`substrate.lastConnectedId`,l.id),{accounts:e?.withCapabilities?t.map(e=>({address:e.address,capabilities:{}})):t.map(e=>e.address),chainId:p.getValue()[0].id}},disconnect:()=>(a.storage?.setItem(`substrate.disconnected`,!0),a.storage?.removeItem(`substrate.lastConnectedId`),l.disconnect()),getAccounts:()=>l.getAccounts().then(e=>e.map(e=>e.address)),switchChain:async e=>{let t=p.getValue().find(t=>t.id===e.chainId);if(!t)throw Error(`Chain not found`);return a.emitter.emit(`change`,{chainId:e.chainId}),t},getChainId:async()=>p.getValue()[0].id,isAuthorized:async()=>{if(await a.storage?.getItem(`substrate.disconnected`))return!1;let e=await a.storage?.getItem(`substrate.lastConnectedId`);return!!(e&&e===l.id)},onAccountsChanged:e=>{e.length===0?a.emitter.emit(`disconnect`):a.emitter.emit(`change`,{accounts:e})},onChainChanged:e=>{a.emitter.emit(`change`,{chainId:e})},onDisconnect:()=>{a.emitter.emit(`disconnect`)},getProvider:async()=>l,$filteredChains:p.asObservable()}}),te=(e,t,r)=>{let i=Z(),a=Q(),s=X({projectId:n.walletConnectV2.projectId}),c={iconUrl:o(l.Polkadot),title:`Substrate`,id:`substrate`},u=()=>({id:s.id,name:s.name,iconUrl:s.icon,iconBackground:`#fff`,chainGroup:c,installed:!0,qrCode:{getUri:e=>e},createConnector:n=>{let r=$({baseConnector:s,id:s.id,name:s.name,type:h.type,walletDetailsParams:n,chains:e,lunoKitChains:t});return e=>{let t=r(e);return{...t,...n,rkDetails:{...n.rkDetails,walletConnectModalConnector:t}}}}});return{groupName:`Substrate`,wallets:r?[u]:[u,()=>({id:a.id,name:a.name,iconUrl:a.icon,iconBackground:`#fff`,chainGroup:c,installed:a.isInstalled(),downloadUrls:{browserExtension:a.links.browserExtension,chrome:a.links.browserExtension},createConnector:n=>$({baseConnector:a,id:a.id,name:a.name,type:h.type,walletDetailsParams:n,chains:e,lunoKitChains:t})}),()=>({id:i.id,name:i.name,iconUrl:i.icon,iconBackground:`#fff`,chainGroup:c,installed:i.isInstalled(),downloadUrls:{browserExtension:i.links.browserExtension,chrome:i.links.browserExtension},createConnector:n=>$({baseConnector:i,id:i.id,name:i.name,type:h.type,walletDetailsParams:n,chains:e,lunoKitChains:t})})]}};export{te as getSubstrateConnectors};