@wormhole-foundation/wormhole-connect 3.0.0 → 3.0.1-beta.1-development

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 (321) hide show
  1. package/dist/assets/{add-DcSO6g7v.js → add-Cy39EVaY.js} +1 -1
  2. package/dist/assets/{all-wallets-DWzxa3vS.js → all-wallets-BG4OMn19.js} +1 -1
  3. package/dist/assets/{app-store-6phYCHjG.js → app-store-B2VJcnKc.js} +1 -1
  4. package/dist/assets/{apple-DWWnLevU.js → apple-6OWWifFn.js} +1 -1
  5. package/dist/assets/{aptos-DkSiRwPH.js → aptos-BuLH7jck.js} +3 -3
  6. package/dist/assets/{aptos-63ExGocu.js → aptos-gb8snog6.js} +1 -1
  7. package/dist/assets/{arrow-bottom-BAP07o8i.js → arrow-bottom-YGKzRes5.js} +1 -1
  8. package/dist/assets/{arrow-bottom-circle-DsrpzBMS.js → arrow-bottom-circle-BH-P4D_L.js} +1 -1
  9. package/dist/assets/{arrow-left-DUwketVX.js → arrow-left-DF2t0i5J.js} +1 -1
  10. package/dist/assets/{arrow-right-NA0HPVOL.js → arrow-right-CP40LqnJ.js} +1 -1
  11. package/dist/assets/{arrow-top-EZdWHthM.js → arrow-top-DnKSFz-5.js} +1 -1
  12. package/dist/assets/{bank-u2fFSB-h.js → bank-BpG6sNAE.js} +1 -1
  13. package/dist/assets/{basic-BZbF5gyr.js → basic-CLnavz_q.js} +1 -1
  14. package/dist/assets/{blake2b-Bb1VZYtg.js → blake2b-B2b685Yu.js} +1 -1
  15. package/dist/assets/{browser-clrim_u1.js → browser-BhlgRcS6.js} +1 -1
  16. package/dist/assets/{card-7RD9NrX1.js → card-BTep0Fm_.js} +1 -1
  17. package/dist/assets/{ccip-CpYYPW6X.js → ccip-By49zU3M.js} +1 -1
  18. package/dist/assets/{chain-DF9mIQM9.js → chain-Du7paeNG.js} +1 -1
  19. package/dist/assets/{checkmark-BNiNaYKO.js → checkmark-UEyfqUU3.js} +1 -1
  20. package/dist/assets/{checkmark-bold-DIgBXK3A.js → checkmark-bold-DMLl2gC5.js} +1 -1
  21. package/dist/assets/{chevron-bottom-lLKkTFta.js → chevron-bottom-CPv_izmZ.js} +1 -1
  22. package/dist/assets/{chevron-left-7fy1dk8e.js → chevron-left-0a7IeWd5.js} +1 -1
  23. package/dist/assets/{chevron-right-DN4RsCT_.js → chevron-right-B-0wsh8g.js} +1 -1
  24. package/dist/assets/{chevron-top-CxEvK7Z7.js → chevron-top-BHFncmmu.js} +1 -1
  25. package/dist/assets/{chrome-store-C_EP1Dya.js → chrome-store-BIaI9-ba.js} +1 -1
  26. package/dist/assets/{chunk-KJH4KKG6-B7DCZZVY.js → chunk-KJH4KKG6-Po5MChR6.js} +1 -1
  27. package/dist/assets/{clock-DJtk2vKP.js → clock-BQdD9J7H.js} +1 -1
  28. package/dist/assets/{close-DhVxMT3P.js → close-Cjok36co.js} +1 -1
  29. package/dist/assets/{coinPlaceholder-CmJrU68z.js → coinPlaceholder-CneTHrCz.js} +1 -1
  30. package/dist/assets/{compass-DDACJ8hx.js → compass-Dit7B215.js} +1 -1
  31. package/dist/assets/{contract-bGGxC9_m.js → contract-BhySpM-Z.js} +1 -1
  32. package/dist/assets/{copy-CyDvDXaX.js → copy-JvNImG5R.js} +1 -1
  33. package/dist/assets/{create-CbRd6EbF.js → create-gkOVonha.js} +1 -1
  34. package/dist/assets/{cursor-DMi-8XQe.js → cursor-CSwolbdC.js} +1 -1
  35. package/dist/assets/{cursor-transparent-CZoHZhIC.js → cursor-transparent-DQ2bEHaM.js} +1 -1
  36. package/dist/assets/{desktop-ZKhBfFcs.js → desktop-F3wMUZcL.js} +1 -1
  37. package/dist/assets/{disconnect-D6_W2NeZ.js → disconnect-vvd6SXmG.js} +1 -1
  38. package/dist/assets/{discord-CNw9YLkF.js → discord-mwjbbdll.js} +1 -1
  39. package/dist/assets/{etherscan-ZR8F73yU.js → etherscan-ZpIOVA81.js} +1 -1
  40. package/dist/assets/{evm-DwqzhXfk.js → evm-CWAxZ2a7.js} +3 -3
  41. package/dist/assets/{evm-CaU1lKeB.js → evm-fcQsoqVd.js} +4 -4
  42. package/dist/assets/{exclamation-triangle-es13TDGx.js → exclamation-triangle-CrFNsvqc.js} +1 -1
  43. package/dist/assets/{extension-CdAdgyKr.js → extension-C_zCCj6H.js} +1 -1
  44. package/dist/assets/{external-link-BX1h33YE.js → external-link-B0LEq1D3.js} +1 -1
  45. package/dist/assets/{facebook-Jhm06hzF.js → facebook-B_HaXZVY.js} +1 -1
  46. package/dist/assets/{farcaster-DqQ_p1hK.js → farcaster-C9d4q5--.js} +1 -1
  47. package/dist/assets/{filters-tJXH7Nb1.js → filters-Coi2MlO2.js} +1 -1
  48. package/dist/assets/{github-Ct6wtKmx.js → github-DiDkJ9-4.js} +1 -1
  49. package/dist/assets/{google-B0PPXdke.js → google-BHKYD7dA.js} +1 -1
  50. package/dist/assets/{help-circle-CZWvsEZP.js → help-circle-lf3f_u3Q.js} +1 -1
  51. package/dist/assets/{id-BvW00BCn.js → id-BoAkobNw.js} +1 -1
  52. package/dist/assets/{image-C24xCI2p.js → image-C9_T15rA.js} +1 -1
  53. package/dist/assets/{index-CKPf-3Vo.js → index--d0JCrsI.js} +1 -1
  54. package/dist/assets/{index-C0-WLpMA.js → index-BE55BSK7.js} +1 -1
  55. package/dist/assets/{index-Cu0b-jgK.js → index-BJYqkXUw.js} +1 -1
  56. package/dist/assets/{index-C_YTupmk.js → index-BYTZG2bF.js} +1 -1
  57. package/dist/assets/{index-CuKiKQIt.js → index-BZCSByFC.js} +3 -3
  58. package/dist/assets/{index-CVqQ68io.js → index-BedU_k3i.js} +1 -1
  59. package/dist/assets/{index-BTkoFKAW.js → index-BgLBca6k.js} +1 -1
  60. package/dist/assets/{index-DynC8vQ4.js → index-BjvqCh5g.js} +1 -1
  61. package/dist/assets/{index-BqLA4xTj.js → index-BpI-Jtyb.js} +3 -3
  62. package/dist/assets/{index-GmuqTVr0.js → index-Breet2G4.js} +1 -1
  63. package/dist/assets/{index-BUtdFAj3.js → index-Bx8vjRmV.js} +1 -1
  64. package/dist/assets/{index-DA4wR-ie.js → index-DB7g9m_R.js} +1 -1
  65. package/dist/assets/{index-DKdokzug.js → index-DMWfYwZZ.js} +1 -1
  66. package/dist/assets/{index-COZ2cSR6.js → index-DSTd1tRp.js} +1 -1
  67. package/dist/assets/{index-CVqXQiSE.js → index-DZ96gAj4.js} +1 -1
  68. package/dist/assets/{index-CYFq9U58.js → index-TYicGq2L.js} +1 -1
  69. package/dist/assets/index-Z3Xir6L3.js +1 -0
  70. package/dist/assets/{index-DC3x_AFd.js → index-kF0xEQ0E.js} +1 -1
  71. package/dist/assets/{index-CCOXtJ1P.js → index-zEIfo2_n.js} +1 -1
  72. package/dist/assets/index.es-3Tq6bjFW.js +47 -0
  73. package/dist/assets/index.es-CBqWEk7T.js +15 -0
  74. package/dist/assets/{info-SvuGOfi5.js → info-C0I2HHbp.js} +1 -1
  75. package/dist/assets/{info-circle-84iqM8-Q.js → info-circle-BJmxBusI.js} +1 -1
  76. package/dist/assets/{lightbulb-DGPyF6jt.js → lightbulb-Chfw09TV.js} +1 -1
  77. package/dist/assets/{mail-OnqfCeMQ.js → mail-BGqa051c.js} +1 -1
  78. package/dist/assets/{mobile-MUTbclBT.js → mobile-DkPjbMNa.js} +1 -1
  79. package/dist/assets/{more-D7xvB08n.js → more-f7FKhsyw.js} +1 -1
  80. package/dist/assets/{network-placeholder-B3oNxx7m.js → network-placeholder-DyyxIB08.js} +1 -1
  81. package/dist/assets/{nftPlaceholder-BpspzVAZ.js → nftPlaceholder-CfDPimUz.js} +1 -1
  82. package/dist/assets/{off-CKJS0rlt.js → off-BvnUT7bh.js} +1 -1
  83. package/dist/assets/{play-store-DPdM8tTb.js → play-store-Dl8Di4Xz.js} +1 -1
  84. package/dist/assets/{plus-BEacG4PU.js → plus-Dtc5pm0q.js} +1 -1
  85. package/dist/assets/{provider-jsonrpc-DTnJKzTS.js → provider-jsonrpc-CG-x8-V6.js} +1 -1
  86. package/dist/assets/{qr-code-D5Z-jGKj.js → qr-code-b5m8lMyQ.js} +1 -1
  87. package/dist/assets/{recycle-horizontal-Cv9AatSG.js → recycle-horizontal-DztIZMpd.js} +1 -1
  88. package/dist/assets/{refresh-D3McR5aq.js → refresh-Z55s9i8s.js} +1 -1
  89. package/dist/assets/{reown-logo-LTh9tOQw.js → reown-logo-BVpI-nfV.js} +1 -1
  90. package/dist/assets/{search-BbBy9kw3.js → search-CjKBf0db.js} +1 -1
  91. package/dist/assets/{secp256k1-BmFL2ykZ.js → secp256k1-BHTD1Qmp.js} +1 -1
  92. package/dist/assets/{secp256k1-Dzt1ocCq.js → secp256k1-CCS9UBYD.js} +1 -1
  93. package/dist/assets/{send-B86sPReU.js → send-DRsIh8XD.js} +1 -1
  94. package/dist/assets/signer-BRan8q4C.js +2 -0
  95. package/dist/assets/solana-B3bc0p0T.js +2 -0
  96. package/dist/assets/{solana-BqDLZw3p.js → solana-D0M1N7L4.js} +9 -9
  97. package/dist/assets/solanaEmbed.esm-Mnq6o_qa.js +10 -0
  98. package/dist/assets/{sui-Pc10JTxL.js → sui-CXoaI0gx.js} +2 -2
  99. package/dist/assets/{sui-DXg2Lhyt.js → sui-DXdm7DBB.js} +4 -4
  100. package/dist/assets/{swapHorizontal-Dhmacw5x.js → swapHorizontal-COY_WODc.js} +1 -1
  101. package/dist/assets/{swapHorizontalBold-CDIQPrQ8.js → swapHorizontalBold-C0JXN9CW.js} +1 -1
  102. package/dist/assets/{swapHorizontalMedium-DylShk_S.js → swapHorizontalMedium-DH34hVvb.js} +1 -1
  103. package/dist/assets/{swapHorizontalRoundedBold-CfplGW6w.js → swapHorizontalRoundedBold-Cbu2lR_U.js} +1 -1
  104. package/dist/assets/{swapVertical-DrDE8l8C.js → swapVertical-CjpRMkF_.js} +1 -1
  105. package/dist/assets/{telegram-DbwUz_vy.js → telegram-DxmYoEg_.js} +1 -1
  106. package/dist/assets/{three-dots-B8-Bf1M-.js → three-dots-GsCsg39y.js} +1 -1
  107. package/dist/assets/{tokens-BjeNFBPV.js → tokens-DNQKjj3l.js} +2 -2
  108. package/dist/assets/{twitch-CSNqjiLg.js → twitch-LH0w9yHE.js} +1 -1
  109. package/dist/assets/{twitterIcon-Bja28Sjm.js → twitterIcon-Ci6YQIIR.js} +1 -1
  110. package/dist/assets/{verify-BeTF48Me.js → verify-CLWJXQKG.js} +1 -1
  111. package/dist/assets/{verify-filled-CtyAqLP0.js → verify-filled-Bgbn2dT_.js} +1 -1
  112. package/dist/assets/{w3m-modal-CPF3wa2e.js → w3m-modal-BR4v9o5N.js} +1 -1
  113. package/dist/assets/{wallet-BBddJ-Oq.js → wallet-Dy9a13FP.js} +1 -1
  114. package/dist/assets/{wallet-placeholder-CNd4KccY.js → wallet-placeholder-BlMcAG8z.js} +1 -1
  115. package/dist/assets/{walletconnect-ayJrSmrJ.js → walletconnect-BmSWYy7N.js} +1 -1
  116. package/dist/assets/{warning-circle-BGHnveRG.js → warning-circle-DUSLmVwm.js} +1 -1
  117. package/dist/assets/{x-B520PEWg.js → x-D-BfG-2C.js} +1 -1
  118. package/dist/main.js +79 -79
  119. package/dist/src/utils/index.d.ts +1 -1
  120. package/dist/src/utils/index.d.ts.map +1 -1
  121. package/dist/src/views/v2/Bridge/Routes/index.d.ts.map +1 -1
  122. package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  123. package/dist/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
  124. package/lib/{add-CR5Ztf9K.mjs → add-B42z-BMK.mjs} +1 -1
  125. package/lib/{add-DsQYu8-3.js → add-DjQ9ptJ3.js} +1 -1
  126. package/lib/{all-wallets-DjH7e8Le.js → all-wallets-CTXkmZGh.js} +1 -1
  127. package/lib/{all-wallets-DuQYa3_A.mjs → all-wallets-DafV-6aS.mjs} +1 -1
  128. package/lib/{app-store-BxXQ176e.js → app-store-CEiGuBPg.js} +1 -1
  129. package/lib/{app-store-BDd6cFgE.mjs → app-store-Cl2NeyfU.mjs} +1 -1
  130. package/lib/{apple-CAgvMnTl.mjs → apple-Bgd40Qpf.mjs} +1 -1
  131. package/lib/{apple-Djo4pf9S.js → apple-I35UUnyy.js} +1 -1
  132. package/lib/{aptos-CkGw1Mfc.mjs → aptos-CFxhkz1T.mjs} +1 -1
  133. package/lib/{aptos-BSB6qX7S.js → aptos-Cwu1YPJ4.js} +1 -1
  134. package/lib/{arrow-bottom-D9foyHjG.js → arrow-bottom-ChKqsjAW.js} +1 -1
  135. package/lib/{arrow-bottom-circle-DM0xE-Kv.js → arrow-bottom-circle-CZ_7PXrz.js} +1 -1
  136. package/lib/{arrow-bottom-circle-BjCfUqTl.mjs → arrow-bottom-circle-CrW7hvKb.mjs} +1 -1
  137. package/lib/{arrow-bottom-U8uSFPEG.mjs → arrow-bottom-oM7dsIav.mjs} +1 -1
  138. package/lib/{arrow-left-CvpUHKKM.mjs → arrow-left-BnsvMZrw.mjs} +1 -1
  139. package/lib/{arrow-left-D_2byrHa.js → arrow-left-Bsuqh6ly.js} +1 -1
  140. package/lib/{arrow-right-Dz6L1I_M.js → arrow-right-BnOX1FPQ.js} +1 -1
  141. package/lib/{arrow-right-Cngz1-ce.mjs → arrow-right-DCVdKrqV.mjs} +1 -1
  142. package/lib/{arrow-top-C_hqOn2K.js → arrow-top-CGNi9Abs.js} +1 -1
  143. package/lib/{arrow-top-CoJfLN99.mjs → arrow-top-HQD35uzA.mjs} +1 -1
  144. package/lib/{bank-CF44-N3R.mjs → bank-5_XGvsWz.mjs} +1 -1
  145. package/lib/{bank-DCEhbelz.js → bank-CC-gMFj5.js} +1 -1
  146. package/lib/{basic-DFvA-W2I.js → basic-Cg6_7ml5.js} +1 -1
  147. package/lib/{basic-zSaFlloC.mjs → basic-kfkYJmqS.mjs} +2 -2
  148. package/lib/{browser-CZB6pBHh.mjs → browser-CnMcQaL7.mjs} +1 -1
  149. package/lib/{browser-BmnrqP_d.js → browser-QU3oDASy.js} +1 -1
  150. package/lib/{card-CDV4C5Yo.mjs → card-2RHw5YuR.mjs} +1 -1
  151. package/lib/{card-CcJnzKXd.js → card-Drhs2ElR.js} +1 -1
  152. package/lib/{ccip-DNxNSRd4.js → ccip-B-6LnaS-.js} +1 -1
  153. package/lib/{ccip-C3r5a63m.mjs → ccip-HRN5GU9R.mjs} +1 -1
  154. package/lib/{checkmark-5PyusBI3.js → checkmark-DBiIELPX.js} +1 -1
  155. package/lib/{checkmark-Bjj5gfFz.mjs → checkmark-DzamL7X4.mjs} +1 -1
  156. package/lib/{checkmark-bold-dOE8wbJm.mjs → checkmark-bold-Bj1aj7It.mjs} +1 -1
  157. package/lib/{checkmark-bold-NRwRKH0S.js → checkmark-bold-BtLa1z0X.js} +1 -1
  158. package/lib/{chevron-bottom-Uo73BZVA.js → chevron-bottom-BoXMZSSJ.js} +1 -1
  159. package/lib/{chevron-bottom-DwMHk5_9.mjs → chevron-bottom-BwEoAp0U.mjs} +1 -1
  160. package/lib/{chevron-left-qMKjlzUK.js → chevron-left-C8qlvot4.js} +1 -1
  161. package/lib/{chevron-left-DFZlw99v.mjs → chevron-left-Cd53L2Rd.mjs} +1 -1
  162. package/lib/{chevron-right-Ca1KQVa4.js → chevron-right-BKR2Cj8x.js} +1 -1
  163. package/lib/{chevron-right-CsJHgvgE.mjs → chevron-right-BjnbXBQh.mjs} +1 -1
  164. package/lib/{chevron-top-CQgrgMDC.js → chevron-top-C1-UVQzc.js} +1 -1
  165. package/lib/{chevron-top-DmxacwcX.mjs → chevron-top-DZM0Kk5N.mjs} +1 -1
  166. package/lib/{chrome-store-B-3SO4tn.mjs → chrome-store-Be16ARhh.mjs} +1 -1
  167. package/lib/{chrome-store-j17yBO59.js → chrome-store-DEpEGVnh.js} +1 -1
  168. package/lib/{clock-j5OYPG9G.js → clock-2d6ryT3H.js} +1 -1
  169. package/lib/{clock-DND917Zx.mjs → clock-lGyym1Yu.mjs} +1 -1
  170. package/lib/{close-D5eQIZeo.js → close-B-KS6tMf.js} +1 -1
  171. package/lib/{close-BnzlOwgC.mjs → close-Bd0ixtrI.mjs} +1 -1
  172. package/lib/{coinPlaceholder-DZB3lmBK.js → coinPlaceholder-1F-4zLUF.js} +1 -1
  173. package/lib/{coinPlaceholder-5MD4FxJz.mjs → coinPlaceholder-CM171HV_.mjs} +1 -1
  174. package/lib/{compass-BFGiiRyj.mjs → compass-BC4EBgBf.mjs} +1 -1
  175. package/lib/{compass-Hnnvqf4W.js → compass-BtYGtp4s.js} +1 -1
  176. package/lib/{constants-DlMk_6zA.mjs → constants-CbX2Dhdb.mjs} +4 -4
  177. package/lib/constants-D2XMo5x9.js +1 -0
  178. package/lib/{copy-_cD0YCcN.mjs → copy-CBZyjKhN.mjs} +1 -1
  179. package/lib/{copy-BG1v_IT3.js → copy-YhaE0x9J.js} +1 -1
  180. package/lib/{cursor-4OCaNc3A.js → cursor-DbW8CM2r.js} +1 -1
  181. package/lib/{cursor-D51EWHtw.mjs → cursor-HObwislP.mjs} +1 -1
  182. package/lib/{cursor-transparent-D4G8CiJu.js → cursor-transparent-D8qt_JkJ.js} +1 -1
  183. package/lib/{cursor-transparent-BbRm_WoL.mjs → cursor-transparent-DRSuTF8F.mjs} +1 -1
  184. package/lib/{desktop-_jVvy3G9.mjs → desktop-BXB88_hI.mjs} +1 -1
  185. package/lib/{desktop-BPV4Jq7C.js → desktop-DPSb6pT6.js} +1 -1
  186. package/lib/{disconnect-Dp0kUWeF.mjs → disconnect-DQlW_0l3.mjs} +1 -1
  187. package/lib/{disconnect-BRh7LOf_.js → disconnect-voPLjD1W.js} +1 -1
  188. package/lib/{discord-DfkQh97Z.js → discord-ZKqi5hgs.js} +1 -1
  189. package/lib/{discord-DVlxZDzX.mjs → discord-rENS1KkQ.mjs} +1 -1
  190. package/lib/{etherscan-CVTkTQkY.mjs → etherscan-CQI3NP6J.mjs} +1 -1
  191. package/lib/{etherscan-BYTtEWXg.js → etherscan-DuY447FG.js} +1 -1
  192. package/lib/{evm-A_PshNGs.mjs → evm-B2lMpZxw.mjs} +5 -4
  193. package/lib/{evm-AmBHj3pD.js → evm-G8FJAICS.js} +3 -3
  194. package/lib/{exclamation-triangle-CqvJcLBM.mjs → exclamation-triangle-D_u6lS5N.mjs} +1 -1
  195. package/lib/{exclamation-triangle-CW2RfEyP.js → exclamation-triangle-zkHXR2rM.js} +1 -1
  196. package/lib/{extension-DXI0EvM-.mjs → extension-ClXThzlK.mjs} +1 -1
  197. package/lib/{extension-DJMyrtMq.js → extension-DG4qfZ6E.js} +1 -1
  198. package/lib/{external-link-BWqola9w.mjs → external-link-DMigdm5_.mjs} +1 -1
  199. package/lib/{external-link-BwuF5S4F.js → external-link-DzFTOSFi.js} +1 -1
  200. package/lib/{facebook-CL4jfLuQ.mjs → facebook-CXPHu-CF.mjs} +1 -1
  201. package/lib/{facebook-C_UUBb6g.js → facebook-DZcyCqTR.js} +1 -1
  202. package/lib/{farcaster-CzKUflnu.mjs → farcaster-3fnaNorD.mjs} +1 -1
  203. package/lib/{farcaster-BIoquIGI.js → farcaster-DGzbpSpo.js} +1 -1
  204. package/lib/{filters-olRHEzRz.mjs → filters-DOCA08Tb.mjs} +1 -1
  205. package/lib/{filters-BW7K6cO8.js → filters-GdndcLvS.js} +1 -1
  206. package/lib/{github-BYG4fdMZ.mjs → github-Bt6o8gEP.mjs} +1 -1
  207. package/lib/{github-Cdb2MSS8.js → github-CS10Dwev.js} +1 -1
  208. package/lib/{google-DyaGudk1.js → google-C3HmxVw4.js} +1 -1
  209. package/lib/{google-Cj5iFHjT.mjs → google-oL8KgGKh.mjs} +1 -1
  210. package/lib/{help-circle-Y9FUcqDe.mjs → help-circle-Bwas4fUE.mjs} +1 -1
  211. package/lib/{help-circle-C3cz2mhr.js → help-circle-vyJ6xZHu.js} +1 -1
  212. package/lib/hosted.js +1 -1
  213. package/lib/hosted.mjs +1 -1
  214. package/lib/{id-k-6XX-i3.mjs → id-BMthpDYz.mjs} +1 -1
  215. package/lib/{id-WMVfV2eA.js → id-Cn7OOd5x.js} +1 -1
  216. package/lib/{image-Dq1CEatm.js → image-CgBZH2xZ.js} +1 -1
  217. package/lib/{image-Cv9d6W9m.mjs → image-Ci9ZM4mR.mjs} +1 -1
  218. package/lib/{index-B3BPxQII.js → index-B5zOthpC.js} +2 -2
  219. package/lib/{index-CSme-v_P.mjs → index-BI7ozQB8.mjs} +19202 -19189
  220. package/lib/{index-dPmy3HXi.mjs → index-BvNzRolu.mjs} +78 -78
  221. package/lib/index-Drek_-UI.js +304 -0
  222. package/lib/{index.es-Baasatwd.mjs → index.es-B0qJRcfn.mjs} +3 -3
  223. package/lib/{index.es-CEy-pF4C.mjs → index.es-BT9MvJ7o.mjs} +1 -1
  224. package/lib/{index.es-DkYlA3ur.js → index.es-C1D-rKkY.js} +1 -1
  225. package/lib/{index.es-BPWrzgLw.js → index.es-CUXwE1pM.js} +1 -1
  226. package/lib/index.js +1 -1
  227. package/lib/index.mjs +1 -1
  228. package/lib/{info-DKtbpKFe.js → info-D85fqVFL.js} +1 -1
  229. package/lib/{info-C-APj01Z.mjs → info-ELzT7QIr.mjs} +1 -1
  230. package/lib/{info-circle-D-VQKTUY.mjs → info-circle-DK-6CdS6.mjs} +1 -1
  231. package/lib/{info-circle-CrAp5FW5.js → info-circle-NpvKzNp7.js} +1 -1
  232. package/lib/{lightbulb-Bch6Bif3.js → lightbulb-CiJVLtFu.js} +1 -1
  233. package/lib/{lightbulb-D6OnARen.mjs → lightbulb-Dy_NOzox.mjs} +1 -1
  234. package/lib/{mail-9in0xpOQ.js → mail-DMR6frsv.js} +1 -1
  235. package/lib/{mail-CGX6Ebtq.mjs → mail-X76s8rfB.mjs} +1 -1
  236. package/lib/{mobile-NmA6wrO4.mjs → mobile-CTWZtoa-.mjs} +1 -1
  237. package/lib/{mobile-CyagzH3-.js → mobile-Dz75gLYD.js} +1 -1
  238. package/lib/{more-CFca7uI_.mjs → more-BGUpPogP.mjs} +1 -1
  239. package/lib/{more-DcJPJGe5.js → more-BwPnu0VI.js} +1 -1
  240. package/lib/{network-placeholder-BYXUJOeS.js → network-placeholder-CF8oh182.js} +1 -1
  241. package/lib/{network-placeholder-Cd1Q08rr.mjs → network-placeholder-DU2R8jQ2.mjs} +1 -1
  242. package/lib/{nftPlaceholder-Dzx7XKJd.mjs → nftPlaceholder-CoKZUHau.mjs} +1 -1
  243. package/lib/{nftPlaceholder-DdfFTwua.js → nftPlaceholder-buAZxl05.js} +1 -1
  244. package/lib/{off-8JP1Gy_j.mjs → off-D0Z3jgVT.mjs} +1 -1
  245. package/lib/{off-NE8r79uo.js → off-qyRQY4Vl.js} +1 -1
  246. package/lib/{play-store-BtkXn6Qi.mjs → play-store-CYMg-nje.mjs} +1 -1
  247. package/lib/{play-store-CjR8Ye5i.js → play-store-jvvEP4Tn.js} +1 -1
  248. package/lib/{plus-BcelSf8P.mjs → plus-B1VhqUcA.mjs} +1 -1
  249. package/lib/{plus-DYoXeuFJ.js → plus-Bu2X2bwl.js} +1 -1
  250. package/lib/{qr-code-BH5tvrnq.mjs → qr-code-BAYTKQF7.mjs} +1 -1
  251. package/lib/{qr-code-CvM_r_h_.js → qr-code-CbgdCuGb.js} +1 -1
  252. package/lib/{recycle-horizontal-DF-bpqgQ.mjs → recycle-horizontal-DEJL9OlS.mjs} +1 -1
  253. package/lib/{recycle-horizontal-CtsSBIRS.js → recycle-horizontal-DRYNZsFE.js} +1 -1
  254. package/lib/{refresh-CQOZ2mAu.mjs → refresh-KOIfdwUh.mjs} +1 -1
  255. package/lib/{refresh-NdMm4wug.js → refresh-oE_ngLqp.js} +1 -1
  256. package/lib/{reown-logo-Dvzu-NrE.js → reown-logo-C3Mide1i.js} +1 -1
  257. package/lib/{reown-logo-nJjEHWXo.mjs → reown-logo-Dmpg2FAv.mjs} +1 -1
  258. package/lib/{search-BJolJxEl.mjs → search-CuC3rSF2.mjs} +1 -1
  259. package/lib/{search-Deat4EBf.js → search-mOkjsGJ1.js} +1 -1
  260. package/lib/{secp256k1-C56YnRUb.mjs → secp256k1-Bja14kVd.mjs} +1 -1
  261. package/lib/{secp256k1-BFBj5yVh.mjs → secp256k1-C0qkk-vR.mjs} +1 -1
  262. package/lib/{secp256k1-BNlpZRIz.js → secp256k1-D4Srooit.js} +1 -1
  263. package/lib/{secp256k1-D72Q3VYt.js → secp256k1-rd_mphQA.js} +1 -1
  264. package/lib/{send-BAAbPeec.js → send-BB0_nSIX.js} +1 -1
  265. package/lib/{send-Cg8O9lHI.mjs → send-yzjpu02e.mjs} +1 -1
  266. package/lib/{solana-CIjJKPC4.mjs → solana-BiosgjxK.mjs} +6 -6
  267. package/lib/{solana-CgmPqyOk.js → solana-Dr0ynR-F.js} +4 -4
  268. package/lib/{solanaEmbed.esm-a7S5N_pS.mjs → solanaEmbed.esm-0jQKzy4d.mjs} +1 -1
  269. package/lib/{solanaEmbed.esm-Ci_SmLQ5.js → solanaEmbed.esm-r6Bac8PP.js} +1 -1
  270. package/lib/src/utils/index.d.ts +1 -1
  271. package/lib/src/utils/index.d.ts.map +1 -1
  272. package/lib/src/views/v2/Bridge/Routes/index.d.ts.map +1 -1
  273. package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  274. package/lib/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
  275. package/lib/{sui-DreWttXF.mjs → sui-CfRHIkOa.mjs} +1 -1
  276. package/lib/{sui-BwPdGPGy.js → sui-ggIMQCwd.js} +1 -1
  277. package/lib/{swapHorizontal-DWeRan0H.js → swapHorizontal-C6KHRSpK.js} +1 -1
  278. package/lib/{swapHorizontal-BNQcyra_.mjs → swapHorizontal-zZeZYYWF.mjs} +1 -1
  279. package/lib/{swapHorizontalBold-CMU4Ln4I.mjs → swapHorizontalBold-1MC8ZOxh.mjs} +1 -1
  280. package/lib/{swapHorizontalBold-DiLlPFUH.js → swapHorizontalBold-DoVEdayo.js} +1 -1
  281. package/lib/{swapHorizontalMedium-CZFnTcX4.mjs → swapHorizontalMedium-BOHZ9Dg5.mjs} +1 -1
  282. package/lib/{swapHorizontalMedium-B93wR42U.js → swapHorizontalMedium-DcR2VrrT.js} +1 -1
  283. package/lib/{swapHorizontalRoundedBold-TWMTV7dt.mjs → swapHorizontalRoundedBold-JEVvyOfQ.mjs} +1 -1
  284. package/lib/{swapHorizontalRoundedBold-wlGfwhPM.js → swapHorizontalRoundedBold-N6P7ZpxL.js} +1 -1
  285. package/lib/{swapVertical-hcNqr9L_.mjs → swapVertical-BULwQAah.mjs} +1 -1
  286. package/lib/{swapVertical-dLQL4U_l.js → swapVertical-CS2a-XY6.js} +1 -1
  287. package/lib/{telegram-C39Le0iS.mjs → telegram-DSzKqVhj.mjs} +1 -1
  288. package/lib/{telegram-D-ZDOgyu.js → telegram-DuIkJcxV.js} +1 -1
  289. package/lib/{three-dots-BbsgFUd9.mjs → three-dots-DgHvZG77.mjs} +1 -1
  290. package/lib/{three-dots-xVml4oxI.js → three-dots-sLfFBOoe.js} +1 -1
  291. package/lib/{tokens-Biwt_Vlp.mjs → tokens-CA42f7sB.mjs} +1 -1
  292. package/lib/{tokens-sw1ixfEi.js → tokens-Dl_W_iHS.js} +1 -1
  293. package/lib/{twitch-C5rtlsn8.mjs → twitch-BhO_1W8r.mjs} +1 -1
  294. package/lib/{twitch-9p6JjObE.js → twitch-m9JiCf-P.js} +1 -1
  295. package/lib/{twitterIcon-CLEf6yY1.js → twitterIcon--GnF9nvE.js} +1 -1
  296. package/lib/{twitterIcon-CvHEure8.mjs → twitterIcon-fsFN1hu7.mjs} +1 -1
  297. package/lib/{verify-Dws0cvKw.js → verify-Bjs90N4f.js} +1 -1
  298. package/lib/{verify-DKZ0iyjc.mjs → verify-Db3SLGRB.mjs} +1 -1
  299. package/lib/{verify-filled-CtJGAYrO.mjs → verify-filled-LLxJtqw8.mjs} +1 -1
  300. package/lib/{verify-filled-BbZK0pKJ.js → verify-filled-Q7X_30fP.js} +1 -1
  301. package/lib/{w3m-modal-DksS6aIT.mjs → w3m-modal-By8X9uSa.mjs} +2 -2
  302. package/lib/{w3m-modal-DdtDvE03.js → w3m-modal-bNYiLd7-.js} +1 -1
  303. package/lib/{wallet-CyH12dYP.js → wallet-C6wn2W37.js} +1 -1
  304. package/lib/{wallet-DXVeRjbu.mjs → wallet-DyFpD6Ri.mjs} +1 -1
  305. package/lib/{wallet-placeholder-BMnT070m.mjs → wallet-placeholder-C0U4gPUC.mjs} +1 -1
  306. package/lib/{wallet-placeholder-x6zsaldG.js → wallet-placeholder-CX66BGYj.js} +1 -1
  307. package/lib/{walletconnect-BaiHrAQU.mjs → walletconnect-BaXoBzrQ.mjs} +1 -1
  308. package/lib/{walletconnect-DWLSx2RY.js → walletconnect-C0zt_mNA.js} +1 -1
  309. package/lib/{warning-circle-Dv8U36XN.mjs → warning-circle-DqwHoo9u.mjs} +1 -1
  310. package/lib/{warning-circle-D-Cxtafm.js → warning-circle-Dy3ZubCh.js} +1 -1
  311. package/lib/{x-CDag6DSG.js → x-C4e8AToN.js} +1 -1
  312. package/lib/{x-iPGjMI8Y.mjs → x-OReg0vUC.mjs} +1 -1
  313. package/package.json +2 -2
  314. package/dist/assets/index-BZFyhaji.js +0 -1
  315. package/dist/assets/index.es-FdLcv4RX.js +0 -47
  316. package/dist/assets/index.es-g5_0R3zE.js +0 -15
  317. package/dist/assets/signer-7-tpWjBV.js +0 -2
  318. package/dist/assets/solana-C6mHMmQi.js +0 -2
  319. package/dist/assets/solanaEmbed.esm-DhAz8SOB.js +0 -10
  320. package/lib/constants-DdwxK2TX.js +0 -1
  321. package/lib/index-DuCVZm5q.js +0 -304
@@ -1 +1 @@
1
- var wa=Object.defineProperty;var Ci=r=>{throw TypeError(r)};var ma=(r,t,e)=>t in r?wa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var W=(r,t,e)=>ma(r,typeof t!="symbol"?t+"":t,e),Bs=(r,t,e)=>t.has(r)||Ci("Cannot "+e);var l=(r,t,e)=>(Bs(r,t,"read from private field"),e?e.call(r):t.get(r)),A=(r,t,e)=>t.has(r)?Ci("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),h=(r,t,e,n)=>(Bs(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e),I=(r,t,e)=>(Bs(r,t,"access private method"),e);var Tr=(r,t,e,n)=>({set _(s){h(r,t,s,e)},get _(){return l(r,t,n)}});import{t as j,p as b,q as S,ay as rt,a6 as D,o as Ut,az as po,aA as Ao,aB as qr,aC as Wr,aD as ya,aE as Hr,a9 as ba,aa as xs,aF as Ea,a7 as wo,aG as Qt,aH as F,f as Pi,aI as Ba,aJ as xa,aK as gn,ad as ut,n as Ca,z as ct,aL as Xn,ai as cr,ag as q,ak as at,ac as kt,al as Pa,aM as Ft,af as Kt,aN as Ia,ae as Bt}from"../main.js";import{t as Na,c as _e,j as Ls,g as J,a as R,h as yt,b as _n,k as ir,i as mo,m as ka,l as va,n as hn,C as dr,o as Sa,L as Ra,T as Oa,p as Da,e as Us,F as Ii,E as Ta,A as Fa}from"./contract-bGGxC9_m.js";const Xr="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let Fr=null;function La(r){if(Fr==null){Fr={};for(let e=0;e<Xr.length;e++)Fr[Xr[e]]=BigInt(e)}const t=Fr[r];return b(t!=null,"invalid base58 value","letter",r),t}const Ua=BigInt(0),Ms=BigInt(58);function Ma(r){const t=j(r);let e=Na(t),n="";for(;e;)n=Xr[Number(e%Ms)]+n,e/=Ms;for(let s=0;s<t.length&&!t[s];s++)n=Xr[0]+n;return n}function Ru(r){let t=Ua;for(let e=0;e<r.length;e++)t*=Ms,t+=La(r[e]);return t}function Qa(r){r=atob(r);const t=new Uint8Array(r.length);for(let e=0;e<r.length;e++)t[e]=r.charCodeAt(e);return j(t)}function Ga(r){const t=j(r);let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function yo(r){async function t(e,n){S(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=e.url.split(":")[0].toLowerCase();S(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),S(s==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=rt("request timeout","TIMEOUT"),o.abort()},e.timeout);n&&n.addListener(()=>{i=rt("request cancelled","CANCELLED"),o.abort()});const c={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:o.signal};let u;try{u=await fetch(e.url,c)}catch(w){throw clearTimeout(a),i||w}clearTimeout(a);const d={};u.headers.forEach((w,m)=>{d[m.toLowerCase()]=w});const f=await u.arrayBuffer(),p=f==null?null:new Uint8Array(f);return{statusCode:u.status,statusMessage:u.statusText,headers:d,body:p}}return t}const Ha=12,Ja=250;let Ni=yo();const Va=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),za=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let Cs=!1;async function bo(r,t){try{const e=r.match(Va);if(!e)throw new Error("invalid data");return new ke(200,"OK",{"content-type":e[1]||"text/plain"},e[2]?Qa(e[3]):ja(e[3]))}catch{return new ke(599,"BAD REQUEST (invalid data: URI)",{},null,new ie(r))}}function Eo(r){async function t(e,n){try{const s=e.match(za);if(!s)throw new Error("invalid link");return new ie(`${r}${s[2]}`)}catch{return new ke(599,"BAD REQUEST (invalid IPFS URI)",{},null,new ie(e))}}return t}const Lr={data:bo,ipfs:Eo("https://gateway.ipfs.io/ipfs/")},Bo=new WeakMap;var Le,ge;class Ka{constructor(t){A(this,Le);A(this,ge);h(this,Le,[]),h(this,ge,!1),Bo.set(t,()=>{if(!l(this,ge)){h(this,ge,!0);for(const e of l(this,Le))setTimeout(()=>{e()},0);h(this,Le,[])}})}addListener(t){S(!l(this,ge),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),l(this,Le).push(t)}get cancelled(){return l(this,ge)}checkSignal(){S(!this.cancelled,"cancelled","CANCELLED",{})}}Le=new WeakMap,ge=new WeakMap;function Ur(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}var An,wn,Ot,Yt,mn,yn,$,At,qt,Ue,Me,Qe,Gt,Dt,pe,Ge,lr;const os=class os{constructor(t){A(this,Ge);A(this,An);A(this,wn);A(this,Ot);A(this,Yt);A(this,mn);A(this,yn);A(this,$);A(this,At);A(this,qt);A(this,Ue);A(this,Me);A(this,Qe);A(this,Gt);A(this,Dt);A(this,pe);h(this,yn,String(t)),h(this,An,!1),h(this,wn,!0),h(this,Ot,{}),h(this,Yt,""),h(this,mn,3e5),h(this,Dt,{slotInterval:Ja,maxAttempts:Ha}),h(this,pe,null)}get url(){return l(this,yn)}set url(t){h(this,yn,String(t))}get body(){return l(this,$)==null?null:new Uint8Array(l(this,$))}set body(t){if(t==null)h(this,$,void 0),h(this,At,void 0);else if(typeof t=="string")h(this,$,_e(t)),h(this,At,"text/plain");else if(t instanceof Uint8Array)h(this,$,t),h(this,At,"application/octet-stream");else if(typeof t=="object")h(this,$,_e(JSON.stringify(t))),h(this,At,"application/json");else throw new Error("invalid body")}hasBody(){return l(this,$)!=null}get method(){return l(this,Yt)?l(this,Yt):this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),h(this,Yt,String(t).toUpperCase())}get headers(){const t=Object.assign({},l(this,Ot));return l(this,qt)&&(t.authorization=`Basic ${Ga(_e(l(this,qt)))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&l(this,At)&&(t["content-type"]=l(this,At)),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){l(this,Ot)[String(t).toLowerCase()]=String(e)}clearHeaders(){h(this,Ot,{})}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let n=0;return{next:()=>{if(n<e.length){const s=e[n++];return{value:[s,t[s]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return l(this,qt)||null}setCredentials(t,e){b(!t.match(/:/),"invalid basic authentication username","username","[REDACTED]"),h(this,qt,`${t}:${e}`)}get allowGzip(){return l(this,wn)}set allowGzip(t){h(this,wn,!!t)}get allowInsecureAuthentication(){return!!l(this,An)}set allowInsecureAuthentication(t){h(this,An,!!t)}get timeout(){return l(this,mn)}set timeout(t){b(t>=0,"timeout must be non-zero","timeout",t),h(this,mn,t)}get preflightFunc(){return l(this,Ue)||null}set preflightFunc(t){h(this,Ue,t)}get processFunc(){return l(this,Me)||null}set processFunc(t){h(this,Me,t)}get retryFunc(){return l(this,Qe)||null}set retryFunc(t){h(this,Qe,t)}get getUrlFunc(){return l(this,pe)||Ni}set getUrlFunc(t){h(this,pe,t)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${l(this,$)?D(l(this,$)):"null"}>`}setThrottleParams(t){t.slotInterval!=null&&(l(this,Dt).slotInterval=t.slotInterval),t.maxAttempts!=null&&(l(this,Dt).maxAttempts=t.maxAttempts)}send(){return S(l(this,Gt)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),h(this,Gt,new Ka(this)),I(this,Ge,lr).call(this,0,ki()+this.timeout,0,this,new ke(0,"",{},null,this))}cancel(){S(l(this,Gt)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=Bo.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const e=this.url.split(":")[0].toLowerCase(),n=t.split(":")[0].toLowerCase();S(this.method==="GET"&&(e!=="https"||n!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const s=new os(t);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,h(s,Ot,Object.assign({},l(this,Ot))),l(this,$)&&h(s,$,new Uint8Array(l(this,$))),h(s,At,l(this,At)),s}clone(){const t=new os(this.url);return h(t,Yt,l(this,Yt)),l(this,$)&&h(t,$,l(this,$)),h(t,At,l(this,At)),h(t,Ot,Object.assign({},l(this,Ot))),h(t,qt,l(this,qt)),this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),h(t,Ue,l(this,Ue)),h(t,Me,l(this,Me)),h(t,Qe,l(this,Qe)),h(t,Dt,Object.assign({},l(this,Dt))),h(t,pe,l(this,pe)),t}static lockConfig(){Cs=!0}static getGateway(t){return Lr[t.toLowerCase()]||null}static registerGateway(t,e){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(Cs)throw new Error("gateways locked");Lr[t]=e}static registerGetUrl(t){if(Cs)throw new Error("gateways locked");Ni=t}static createGetUrlFunc(t){return yo()}static createDataGateway(){return bo}static createIpfsGatewayFunc(t){return Eo(t)}};An=new WeakMap,wn=new WeakMap,Ot=new WeakMap,Yt=new WeakMap,mn=new WeakMap,yn=new WeakMap,$=new WeakMap,At=new WeakMap,qt=new WeakMap,Ue=new WeakMap,Me=new WeakMap,Qe=new WeakMap,Gt=new WeakMap,Dt=new WeakMap,pe=new WeakMap,Ge=new WeakSet,lr=async function(t,e,n,s,i){var d,f,p;if(t>=l(this,Dt).maxAttempts)return i.makeServerError("exceeded maximum retry limit");S(ki()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await Za(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in Lr){const w=await Lr[a](o.url,Ur(l(s,Gt)));if(w instanceof ke){let m=w;if(this.processFunc){Ur(l(s,Gt));try{m=await this.processFunc(o,m)}catch(g){(g.throttle==null||typeof g.stall!="number")&&m.makeServerError("error in post-processing function",g).assertOk()}}return m}o=w}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,Ur(l(s,Gt)));let u=new ke(c.statusCode,c.statusMessage,c.headers,c.body,s);if(u.statusCode===301||u.statusCode===302){try{const w=u.headers.location||"";return I(d=o.redirect(w),Ge,lr).call(d,t+1,e,0,s,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,u,t))){const w=u.headers["retry-after"];let m=l(this,Dt).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof w=="string"&&w.match(/^[1-9][0-9]*$/)&&(m=parseInt(w)),I(f=o.clone(),Ge,lr).call(f,t+1,e,m,s,u)}if(this.processFunc){Ur(l(s,Gt));try{u=await this.processFunc(o,u)}catch(w){(w.throttle==null||typeof w.stall!="number")&&u.makeServerError("error in post-processing function",w).assertOk();let m=l(this,Dt).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return w.stall>=0&&(m=w.stall),I(p=o.clone(),Ge,lr).call(p,t+1,e,m,s,u)}}return u};let ie=os;var Br,xr,Cr,wt,bn,He;const yi=class yi{constructor(t,e,n,s,i){A(this,Br);A(this,xr);A(this,Cr);A(this,wt);A(this,bn);A(this,He);h(this,Br,t),h(this,xr,e),h(this,Cr,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),h(this,wt,s==null?null:new Uint8Array(s)),h(this,bn,i||null),h(this,He,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${l(this,wt)?D(l(this,wt)):"null"}>`}get statusCode(){return l(this,Br)}get statusMessage(){return l(this,xr)}get headers(){return Object.assign({},l(this,Cr))}get body(){return l(this,wt)==null?null:new Uint8Array(l(this,wt))}get bodyText(){try{return l(this,wt)==null?"":Ls(l(this,wt))}catch{S(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{S(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let n=0;return{next:()=>{if(n<e.length){const s=e[n++];return{value:[s,t[s]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(t,e){let n;t?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:(t=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${t})`);const s=new yi(599,n,this.headers,this.body,l(this,bn)||void 0);return h(s,He,{message:t,error:e}),s}throwThrottleError(t,e){e==null?e=-1:b(Number.isInteger(e)&&e>=0,"invalid stall timeout","stall",e);const n=new Error(t||"throttling requests");throw Ut(n,{stall:e,throttle:!0}),n}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return l(this,wt)!=null}get request(){return l(this,bn)}ok(){return l(this,He).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:e}=l(this,He);t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{l(this,wt)&&(s=Ls(l(this,wt)))}catch{}S(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:e,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Br=new WeakMap,xr=new WeakMap,Cr=new WeakMap,wt=new WeakMap,bn=new WeakMap,He=new WeakMap;let ke=yi;function ki(){return new Date().getTime()}function ja(r){return _e(r.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))}function Za(r){return new Promise(t=>setTimeout(t,r))}function Ya(r){let t=r.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function vi(r,t,e){let n=0;for(let s=0;s<e;s++)n=n*256+r[t+s];return n}function Si(r,t,e,n){const s=[];for(;e<t+1+n;){const i=xo(r,e);s.push(i.result),e+=i.consumed,S(e<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:r,length:n,offset:t})}return{consumed:1+n,result:s}}function xo(r,t){S(r.length!==0,"data too short","BUFFER_OVERRUN",{buffer:r,length:0,offset:1});const e=n=>{S(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[t]>=248){const n=r[t]-247;e(t+1+n);const s=vi(r,t+1,n);return e(t+1+n+s),Si(r,t,t+1+n,n+s)}else if(r[t]>=192){const n=r[t]-192;return e(t+1+n),Si(r,t,t+1,n)}else if(r[t]>=184){const n=r[t]-183;e(t+1+n);const s=vi(r,t+1,n);e(t+1+n+s);const i=D(r.slice(t+1+n,t+1+n+s));return{consumed:1+n+s,result:i}}else if(r[t]>=128){const n=r[t]-128;e(t+1+n);const s=D(r.slice(t+1,t+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:Ya(r[t])}}function hs(r){const t=j(r,"data"),e=xo(t,0);return b(e.consumed===t.length,"unexpected junk after rlp payload","data",r),e.result}function Ri(r){const t=[];for(;r;)t.unshift(r&255),r>>=8;return t}function Co(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(i){n=n.concat(Co(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=Ri(n.length);return s.unshift(247+s.length),s.concat(n)}const t=Array.prototype.slice.call(j(r,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const e=Ri(t.length);return e.unshift(183+e.length),e.concat(t)}const Oi="0123456789abcdef";function tn(r){let t="0x";for(const e of Co(r))t+=Oi[e>>4],t+=Oi[e&15];return t}class Po extends po{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,Ao(t);const n=qr(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?t.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=t.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),i.fill(0)}update(t){return Wr(this),this.iHash.update(t),this}digestInto(t){Wr(this),ya(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:n,finished:s,destroyed:i,blockLen:o,outputLen:a}=this;return t=t,t.finished=s,t.destroyed=i,t.blockLen=o,t.outputLen=a,t.oHash=e._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const fs=(r,t,e)=>new Po(r,t).update(e).digest();fs.create=(r,t)=>new Po(r,t);function qa(r,t,e,n){Ao(r);const s=ba({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(xs(i),xs(o),xs(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=qr(t),u=qr(e),d=new Uint8Array(o),f=fs.create(r,c),p=f._cloneInto().update(u);return{c:i,dkLen:o,asyncTick:a,DK:d,PRF:f,PRFSalt:p}}function Wa(r,t,e,n,s){return r.destroy(),t.destroy(),n&&n.destroy(),s.fill(0),e}function Xa(r,t,e,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=qa(r,t,e,n);let u;const d=new Uint8Array(4),f=Hr(d),p=new Uint8Array(a.outputLen);for(let w=1,m=0;m<i;w++,m+=a.outputLen){const g=o.subarray(m,m+a.outputLen);f.setInt32(0,w,!1),(u=c._cloneInto(u)).update(d).digestInto(p),g.set(p.subarray(0,g.length));for(let y=1;y<s;y++){a._cloneInto(u).update(p).digestInto(p);for(let E=0;E<g.length;E++)g[E]^=p[E]}}return Wa(a,c,o,u,p)}function _a(r,t,e,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(t,e,n);const s=BigInt(32),i=BigInt(4294967295),o=Number(e>>s&i),a=Number(e&i),c=n?4:0,u=n?0:4;r.setUint32(t+c,o,n),r.setUint32(t+u,a,n)}class Io extends po{constructor(t,e,n,s){super(),this.blockLen=t,this.outputLen=e,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Hr(this.buffer)}update(t){Wr(this);const{view:e,buffer:n,blockLen:s}=this;t=qr(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=Hr(t);for(;s<=i-o;o+=s)this.process(c,o);continue}n.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Wr(this),Ea(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:s,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>s-o&&(this.process(n,0),o=0);for(let f=o;f<s;f++)e[f]=0;_a(n,s-8,BigInt(this.length*8),i),this.process(n,0);const a=Hr(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)a.setUint32(4*f,d[f],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:n,length:s,finished:i,destroyed:o,pos:a}=this;return t.length=s,t.pos=a,t.finished=i,t.destroyed=o,s%e&&t.buffer.set(n),t}}const $a=(r,t,e)=>r&t^~r&e,tc=(r,t,e)=>r&t^r&e^t&e,ec=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),le=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ue=new Uint32Array(64);class nc extends Io{constructor(){super(64,32,8,!1),this.A=le[0]|0,this.B=le[1]|0,this.C=le[2]|0,this.D=le[3]|0,this.E=le[4]|0,this.F=le[5]|0,this.G=le[6]|0,this.H=le[7]|0}get(){const{A:t,B:e,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[t,e,n,s,i,o,a,c]}set(t,e,n,s,i,o,a,c){this.A=t|0,this.B=e|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,e){for(let f=0;f<16;f++,e+=4)ue[f]=t.getUint32(e,!1);for(let f=16;f<64;f++){const p=ue[f-15],w=ue[f-2],m=Qt(p,7)^Qt(p,18)^p>>>3,g=Qt(w,17)^Qt(w,19)^w>>>10;ue[f]=g+ue[f-7]+m+ue[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:u,H:d}=this;for(let f=0;f<64;f++){const p=Qt(a,6)^Qt(a,11)^Qt(a,25),w=d+p+$a(a,c,u)+ec[f]+ue[f]|0,g=(Qt(n,2)^Qt(n,13)^Qt(n,22))+tc(n,s,i)|0;d=u,u=c,c=a,a=o+w|0,o=i,i=s,s=n,n=w+g|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(n,s,i,o,a,c,u,d)}roundClean(){ue.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ds=wo(()=>new nc),[rc,sc]=F.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),he=new Uint32Array(80),fe=new Uint32Array(80);class ic extends Io{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:u,El:d,Fh:f,Fl:p,Gh:w,Gl:m,Hh:g,Hl:y}=this;return[t,e,n,s,i,o,a,c,u,d,f,p,w,m,g,y]}set(t,e,n,s,i,o,a,c,u,d,f,p,w,m,g,y){this.Ah=t|0,this.Al=e|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=d|0,this.Fh=f|0,this.Fl=p|0,this.Gh=w|0,this.Gl=m|0,this.Hh=g|0,this.Hl=y|0}process(t,e){for(let x=0;x<16;x++,e+=4)he[x]=t.getUint32(e),fe[x]=t.getUint32(e+=4);for(let x=16;x<80;x++){const T=he[x-15]|0,v=fe[x-15]|0,C=F.rotrSH(T,v,1)^F.rotrSH(T,v,8)^F.shrSH(T,v,7),O=F.rotrSL(T,v,1)^F.rotrSL(T,v,8)^F.shrSL(T,v,7),k=he[x-2]|0,H=fe[x-2]|0,Q=F.rotrSH(k,H,19)^F.rotrBH(k,H,61)^F.shrSH(k,H,6),G=F.rotrSL(k,H,19)^F.rotrBL(k,H,61)^F.shrSL(k,H,6),X=F.add4L(O,G,fe[x-7],fe[x-16]),nt=F.add4H(X,C,Q,he[x-7],he[x-16]);he[x]=nt|0,fe[x]=X|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:u,Dl:d,Eh:f,El:p,Fh:w,Fl:m,Gh:g,Gl:y,Hh:E,Hl:N}=this;for(let x=0;x<80;x++){const T=F.rotrSH(f,p,14)^F.rotrSH(f,p,18)^F.rotrBH(f,p,41),v=F.rotrSL(f,p,14)^F.rotrSL(f,p,18)^F.rotrBL(f,p,41),C=f&w^~f&g,O=p&m^~p&y,k=F.add5L(N,v,O,sc[x],fe[x]),H=F.add5H(k,E,T,C,rc[x],he[x]),Q=k|0,G=F.rotrSH(n,s,28)^F.rotrBH(n,s,34)^F.rotrBH(n,s,39),X=F.rotrSL(n,s,28)^F.rotrBL(n,s,34)^F.rotrBL(n,s,39),nt=n&i^n&a^i&a,Mt=s&o^s&c^o&c;E=g|0,N=y|0,g=w|0,y=m|0,w=f|0,m=p|0,{h:f,l:p}=F.add(u|0,d|0,H|0,Q|0),u=a|0,d=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const B=F.add3L(Q,X,Mt);n=F.add3H(B,H,G,nt),s=B|0}({h:n,l:s}=F.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=F.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=F.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:d}=F.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:f,l:p}=F.add(this.Eh|0,this.El|0,f|0,p|0),{h:w,l:m}=F.add(this.Fh|0,this.Fl|0,w|0,m|0),{h:g,l:y}=F.add(this.Gh|0,this.Gl|0,g|0,y|0),{h:E,l:N}=F.add(this.Hh|0,this.Hl|0,E|0,N|0),this.set(n,s,i,o,a,c,u,d,f,p,w,m,g,y,E,N)}roundClean(){he.fill(0),fe.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const oi=wo(()=>new ic);function oc(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Pi.global<"u")return Pi.global;throw new Error("unable to locate global object")}const Di=oc(),Ti=Di.crypto||Di.msCrypto;function ac(r){switch(r){case"sha256":return ds.create();case"sha512":return oi.create()}b(!1,"invalid hashing algorithm name","algorithm",r)}function Ou(r,t){const e={sha256:ds,sha512:oi}[r];return b(e!=null,"invalid hmac algorithm","algorithm",r),fs.create(e,t)}function Du(r,t,e,n,s){const i={sha256:ds,sha512:oi}[s];return b(i!=null,"invalid pbkdf2 algorithm","algorithm",s),Xa(i,r,t,{c:e,dkLen:n})}function Tu(r){S(Ti!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),b(Number.isInteger(r)&&r>0&&r<=1024,"invalid length","length",r);const t=new Uint8Array(r);return Ti.getRandomValues(t),t}const No=function(r){return ac("sha256").update(r).digest()};let ko=No,vo=!1;function or(r){const t=j(r,"data");return D(ko(t))}or._=No;or.lock=function(){vo=!0};or.register=function(r){if(vo)throw new Error("sha256 is locked");ko=r};Object.freeze(or);Object.freeze(or);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const So=BigInt(0),gs=BigInt(1),cc=BigInt(2),ps=r=>r instanceof Uint8Array,lc=Array.from({length:256},(r,t)=>t.toString(16).padStart(2,"0"));function $n(r){if(!ps(r))throw new Error("Uint8Array expected");let t="";for(let e=0;e<r.length;e++)t+=lc[r[e]];return t}function Ro(r){const t=r.toString(16);return t.length&1?`0${t}`:t}function ai(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);return BigInt(r===""?"0":`0x${r}`)}function tr(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);const t=r.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const e=new Uint8Array(t/2);for(let n=0;n<e.length;n++){const s=n*2,i=r.slice(s,s+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");e[n]=o}return e}function $e(r){return ai($n(r))}function ci(r){if(!ps(r))throw new Error("Uint8Array expected");return ai($n(Uint8Array.from(r).reverse()))}function er(r,t){return tr(r.toString(16).padStart(t*2,"0"))}function li(r,t){return er(r,t).reverse()}function uc(r){return tr(Ro(r))}function Rt(r,t,e){let n;if(typeof t=="string")try{n=tr(t)}catch(i){throw new Error(`${r} must be valid hex string, got "${t}". Cause: ${i}`)}else if(ps(t))n=Uint8Array.from(t);else throw new Error(`${r} must be hex string or Uint8Array`);const s=n.length;if(typeof e=="number"&&s!==e)throw new Error(`${r} expected ${e} bytes, got ${s}`);return n}function pr(...r){const t=new Uint8Array(r.reduce((n,s)=>n+s.length,0));let e=0;return r.forEach(n=>{if(!ps(n))throw new Error("Uint8Array expected");t.set(n,e),e+=n.length}),t}function hc(r,t){if(r.length!==t.length)return!1;for(let e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}function fc(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function dc(r){let t;for(t=0;r>So;r>>=gs,t+=1);return t}function gc(r,t){return r>>BigInt(t)&gs}const pc=(r,t,e)=>r|(e?gs:So)<<BigInt(t),ui=r=>(cc<<BigInt(r-1))-gs,Ps=r=>new Uint8Array(r),Fi=r=>Uint8Array.from(r);function Oo(r,t,e){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let n=Ps(r),s=Ps(r),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>e(s,n,...f),c=(f=Ps())=>{s=a(Fi([0]),f),n=a(),f.length!==0&&(s=a(Fi([1]),f),n=a())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const p=[];for(;f<t;){n=a();const w=n.slice();p.push(w),f+=n.length}return pr(...p)};return(f,p)=>{o(),c(f);let w;for(;!(w=p(u()));)c();return o(),w}}const Ac={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,t)=>t.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function Sr(r,t,e={}){const n=(s,i,o)=>{const a=Ac[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=r[s];if(!(o&&c===void 0)&&!a(c,r))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(t))n(s,i,!1);for(const[s,i]of Object.entries(e))n(s,i,!0);return r}const wc=Object.freeze(Object.defineProperty({__proto__:null,bitGet:gc,bitLen:dc,bitMask:ui,bitSet:pc,bytesToHex:$n,bytesToNumberBE:$e,bytesToNumberLE:ci,concatBytes:pr,createHmacDrbg:Oo,ensureBytes:Rt,equalBytes:hc,hexToBytes:tr,hexToNumber:ai,numberToBytesBE:er,numberToBytesLE:li,numberToHexUnpadded:Ro,numberToVarBytesBE:uc,utf8ToBytes:fc,validateObject:Sr},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const et=BigInt(0),Z=BigInt(1),Oe=BigInt(2),mc=BigInt(3),Qs=BigInt(4),Li=BigInt(5),Ui=BigInt(8);BigInt(9);BigInt(16);function ft(r,t){const e=r%t;return e>=et?e:t+e}function yc(r,t,e){if(e<=et||t<et)throw new Error("Expected power/modulo > 0");if(e===Z)return et;let n=Z;for(;t>et;)t&Z&&(n=n*r%e),r=r*r%e,t>>=Z;return n}function bt(r,t,e){let n=r;for(;t-- >et;)n*=n,n%=e;return n}function Gs(r,t){if(r===et||t<=et)throw new Error(`invert: expected positive integers, got n=${r} mod=${t}`);let e=ft(r,t),n=t,s=et,i=Z;for(;e!==et;){const a=n/e,c=n%e,u=s-i*a;n=e,e=c,s=i,i=u}if(n!==Z)throw new Error("invert: does not exist");return ft(s,t)}function bc(r){const t=(r-Z)/Oe;let e,n,s;for(e=r-Z,n=0;e%Oe===et;e/=Oe,n++);for(s=Oe;s<r&&yc(s,t,r)!==r-Z;s++);if(n===1){const o=(r+Z)/Qs;return function(c,u){const d=c.pow(u,o);if(!c.eql(c.sqr(d),u))throw new Error("Cannot find square root");return d}}const i=(e+Z)/Oe;return function(a,c){if(a.pow(c,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,d=a.pow(a.mul(a.ONE,s),e),f=a.pow(c,i),p=a.pow(c,e);for(;!a.eql(p,a.ONE);){if(a.eql(p,a.ZERO))return a.ZERO;let w=1;for(let g=a.sqr(p);w<u&&!a.eql(g,a.ONE);w++)g=a.sqr(g);const m=a.pow(d,Z<<BigInt(u-w-1));d=a.sqr(m),f=a.mul(f,m),p=a.mul(p,d),u=w}return f}}function Ec(r){if(r%Qs===mc){const t=(r+Z)/Qs;return function(n,s){const i=n.pow(s,t);if(!n.eql(n.sqr(i),s))throw new Error("Cannot find square root");return i}}if(r%Ui===Li){const t=(r-Li)/Ui;return function(n,s){const i=n.mul(s,Oe),o=n.pow(i,t),a=n.mul(s,o),c=n.mul(n.mul(a,Oe),o),u=n.mul(a,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),s))throw new Error("Cannot find square root");return u}}return bc(r)}const Bc=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function xc(r){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=Bc.reduce((n,s)=>(n[s]="function",n),t);return Sr(r,e)}function Cc(r,t,e){if(e<et)throw new Error("Expected power > 0");if(e===et)return r.ONE;if(e===Z)return t;let n=r.ONE,s=t;for(;e>et;)e&Z&&(n=r.mul(n,s)),s=r.sqr(s),e>>=Z;return n}function Pc(r,t){const e=new Array(t.length),n=t.reduce((i,o,a)=>r.is0(o)?i:(e[a]=i,r.mul(i,o)),r.ONE),s=r.inv(n);return t.reduceRight((i,o,a)=>r.is0(o)?i:(e[a]=r.mul(i,e[a]),r.mul(i,o)),s),e}function Do(r,t){const e=t!==void 0?t:r.toString(2).length,n=Math.ceil(e/8);return{nBitLength:e,nByteLength:n}}function Ic(r,t,e=!1,n={}){if(r<=et)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:s,nByteLength:i}=Do(r,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=Ec(r),a=Object.freeze({ORDER:r,BITS:s,BYTES:i,MASK:ui(s),ZERO:et,ONE:Z,create:c=>ft(c,r),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return et<=c&&c<r},is0:c=>c===et,isOdd:c=>(c&Z)===Z,neg:c=>ft(-c,r),eql:(c,u)=>c===u,sqr:c=>ft(c*c,r),add:(c,u)=>ft(c+u,r),sub:(c,u)=>ft(c-u,r),mul:(c,u)=>ft(c*u,r),pow:(c,u)=>Cc(a,c,u),div:(c,u)=>ft(c*Gs(u,r),r),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>Gs(c,r),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Pc(a,c),cmov:(c,u,d)=>d?u:c,toBytes:c=>e?li(c,i):er(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return e?ci(c):$e(c)}});return Object.freeze(a)}function To(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const t=r.toString(2).length;return Math.ceil(t/8)}function Fo(r){const t=To(r);return t+Math.ceil(t/2)}function Nc(r,t,e=!1){const n=r.length,s=To(t),i=Fo(t);if(n<16||n<i||n>1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=e?$e(r):ci(r),a=ft(o,t-Z)+Z;return e?li(a,s):er(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const kc=BigInt(0),Is=BigInt(1);function vc(r,t){const e=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(t/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:e,unsafeLadder(s,i){let o=r.ZERO,a=s;for(;i>kc;)i&Is&&(o=o.add(a)),a=a.double(),i>>=Is;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let u=s,d=u;for(let f=0;f<o;f++){d=u,c.push(d);for(let p=1;p<a;p++)d=d.add(u),c.push(d);u=d.double()}return c},wNAF(s,i,o){const{windows:a,windowSize:c}=n(s);let u=r.ZERO,d=r.BASE;const f=BigInt(2**s-1),p=2**s,w=BigInt(s);for(let m=0;m<a;m++){const g=m*c;let y=Number(o&f);o>>=w,y>c&&(y-=p,o+=Is);const E=g,N=g+Math.abs(y)-1,x=m%2!==0,T=y<0;y===0?d=d.add(e(x,i[E])):u=u.add(e(T,i[N]))}return{p:u,f:d}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let u=i.get(s);return u||(u=this.precomputeWindow(s,c),c!==1&&i.set(s,a(u))),this.wNAF(c,u,o)}}}function Lo(r){return xc(r.Fp),Sr(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Do(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Sc(r){const t=Lo(r);Sr(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:n,a:s}=t;if(e){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:Rc,hexToBytes:Oc}=wc,Te={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(r){const{Err:t}=Te;if(r.length<2||r[0]!==2)throw new t("Invalid signature integer tag");const e=r[1],n=r.subarray(2,e+2);if(!e||n.length!==e)throw new t("Invalid signature integer: wrong length");if(n[0]&128)throw new t("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Rc(n),l:r.subarray(e+2)}},toSig(r){const{Err:t}=Te,e=typeof r=="string"?Oc(r):r;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let n=e.length;if(n<2||e[0]!=48)throw new t("Invalid signature tag");if(e[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:s,l:i}=Te._parseInt(e.subarray(2)),{d:o,l:a}=Te._parseInt(i);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(r){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,e=u=>{const d=u.toString(16);return d.length&1?`0${d}`:d},n=t(e(r.s)),s=t(e(r.r)),i=n.length/2,o=s.length/2,a=e(i),c=e(o);return`30${e(o+i+4)}02${c}${s}02${a}${n}`}},se=BigInt(0),Nt=BigInt(1);BigInt(2);const Mi=BigInt(3);BigInt(4);function Dc(r){const t=Sc(r),{Fp:e}=t,n=t.toBytes||((m,g,y)=>{const E=g.toAffine();return pr(Uint8Array.from([4]),e.toBytes(E.x),e.toBytes(E.y))}),s=t.fromBytes||(m=>{const g=m.subarray(1),y=e.fromBytes(g.subarray(0,e.BYTES)),E=e.fromBytes(g.subarray(e.BYTES,2*e.BYTES));return{x:y,y:E}});function i(m){const{a:g,b:y}=t,E=e.sqr(m),N=e.mul(E,m);return e.add(e.add(N,e.mul(m,g)),y)}if(!e.eql(e.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function o(m){return typeof m=="bigint"&&se<m&&m<t.n}function a(m){if(!o(m))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(m){const{allowedPrivateKeyLengths:g,nByteLength:y,wrapPrivateKey:E,n:N}=t;if(g&&typeof m!="bigint"){if(m instanceof Uint8Array&&(m=$n(m)),typeof m!="string"||!g.includes(m.length))throw new Error("Invalid key");m=m.padStart(y*2,"0")}let x;try{x=typeof m=="bigint"?m:$e(Rt("private key",m,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof m}`)}return E&&(x=ft(x,N)),a(x),x}const u=new Map;function d(m){if(!(m instanceof f))throw new Error("ProjectivePoint expected")}class f{constructor(g,y,E){if(this.px=g,this.py=y,this.pz=E,g==null||!e.isValid(g))throw new Error("x required");if(y==null||!e.isValid(y))throw new Error("y required");if(E==null||!e.isValid(E))throw new Error("z required")}static fromAffine(g){const{x:y,y:E}=g||{};if(!g||!e.isValid(y)||!e.isValid(E))throw new Error("invalid affine point");if(g instanceof f)throw new Error("projective point not allowed");const N=x=>e.eql(x,e.ZERO);return N(y)&&N(E)?f.ZERO:new f(y,E,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(g){const y=e.invertBatch(g.map(E=>E.pz));return g.map((E,N)=>E.toAffine(y[N])).map(f.fromAffine)}static fromHex(g){const y=f.fromAffine(s(Rt("pointHex",g)));return y.assertValidity(),y}static fromPrivateKey(g){return f.BASE.multiply(c(g))}_setWindowSize(g){this._WINDOW_SIZE=g,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:g,y}=this.toAffine();if(!e.isValid(g)||!e.isValid(y))throw new Error("bad point: x or y not FE");const E=e.sqr(y),N=i(g);if(!e.eql(E,N))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:g}=this.toAffine();if(e.isOdd)return!e.isOdd(g);throw new Error("Field doesn't support isOdd")}equals(g){d(g);const{px:y,py:E,pz:N}=this,{px:x,py:T,pz:v}=g,C=e.eql(e.mul(y,v),e.mul(x,N)),O=e.eql(e.mul(E,v),e.mul(T,N));return C&&O}negate(){return new f(this.px,e.neg(this.py),this.pz)}double(){const{a:g,b:y}=t,E=e.mul(y,Mi),{px:N,py:x,pz:T}=this;let v=e.ZERO,C=e.ZERO,O=e.ZERO,k=e.mul(N,N),H=e.mul(x,x),Q=e.mul(T,T),G=e.mul(N,x);return G=e.add(G,G),O=e.mul(N,T),O=e.add(O,O),v=e.mul(g,O),C=e.mul(E,Q),C=e.add(v,C),v=e.sub(H,C),C=e.add(H,C),C=e.mul(v,C),v=e.mul(G,v),O=e.mul(E,O),Q=e.mul(g,Q),G=e.sub(k,Q),G=e.mul(g,G),G=e.add(G,O),O=e.add(k,k),k=e.add(O,k),k=e.add(k,Q),k=e.mul(k,G),C=e.add(C,k),Q=e.mul(x,T),Q=e.add(Q,Q),k=e.mul(Q,G),v=e.sub(v,k),O=e.mul(Q,H),O=e.add(O,O),O=e.add(O,O),new f(v,C,O)}add(g){d(g);const{px:y,py:E,pz:N}=this,{px:x,py:T,pz:v}=g;let C=e.ZERO,O=e.ZERO,k=e.ZERO;const H=t.a,Q=e.mul(t.b,Mi);let G=e.mul(y,x),X=e.mul(E,T),nt=e.mul(N,v),Mt=e.add(y,E),B=e.add(x,T);Mt=e.mul(Mt,B),B=e.add(G,X),Mt=e.sub(Mt,B),B=e.add(y,N);let P=e.add(x,v);return B=e.mul(B,P),P=e.add(G,nt),B=e.sub(B,P),P=e.add(E,N),C=e.add(T,v),P=e.mul(P,C),C=e.add(X,nt),P=e.sub(P,C),k=e.mul(H,B),C=e.mul(Q,nt),k=e.add(C,k),C=e.sub(X,k),k=e.add(X,k),O=e.mul(C,k),X=e.add(G,G),X=e.add(X,G),nt=e.mul(H,nt),B=e.mul(Q,B),X=e.add(X,nt),nt=e.sub(G,nt),nt=e.mul(H,nt),B=e.add(B,nt),G=e.mul(X,B),O=e.add(O,G),G=e.mul(P,B),C=e.mul(Mt,C),C=e.sub(C,G),G=e.mul(Mt,X),k=e.mul(P,k),k=e.add(k,G),new f(C,O,k)}subtract(g){return this.add(g.negate())}is0(){return this.equals(f.ZERO)}wNAF(g){return w.wNAFCached(this,u,g,y=>{const E=e.invertBatch(y.map(N=>N.pz));return y.map((N,x)=>N.toAffine(E[x])).map(f.fromAffine)})}multiplyUnsafe(g){const y=f.ZERO;if(g===se)return y;if(a(g),g===Nt)return this;const{endo:E}=t;if(!E)return w.unsafeLadder(this,g);let{k1neg:N,k1:x,k2neg:T,k2:v}=E.splitScalar(g),C=y,O=y,k=this;for(;x>se||v>se;)x&Nt&&(C=C.add(k)),v&Nt&&(O=O.add(k)),k=k.double(),x>>=Nt,v>>=Nt;return N&&(C=C.negate()),T&&(O=O.negate()),O=new f(e.mul(O.px,E.beta),O.py,O.pz),C.add(O)}multiply(g){a(g);let y=g,E,N;const{endo:x}=t;if(x){const{k1neg:T,k1:v,k2neg:C,k2:O}=x.splitScalar(y);let{p:k,f:H}=this.wNAF(v),{p:Q,f:G}=this.wNAF(O);k=w.constTimeNegate(T,k),Q=w.constTimeNegate(C,Q),Q=new f(e.mul(Q.px,x.beta),Q.py,Q.pz),E=k.add(Q),N=H.add(G)}else{const{p:T,f:v}=this.wNAF(y);E=T,N=v}return f.normalizeZ([E,N])[0]}multiplyAndAddUnsafe(g,y,E){const N=f.BASE,x=(v,C)=>C===se||C===Nt||!v.equals(N)?v.multiplyUnsafe(C):v.multiply(C),T=x(this,y).add(x(g,E));return T.is0()?void 0:T}toAffine(g){const{px:y,py:E,pz:N}=this,x=this.is0();g==null&&(g=x?e.ONE:e.inv(N));const T=e.mul(y,g),v=e.mul(E,g),C=e.mul(N,g);if(x)return{x:e.ZERO,y:e.ZERO};if(!e.eql(C,e.ONE))throw new Error("invZ was invalid");return{x:T,y:v}}isTorsionFree(){const{h:g,isTorsionFree:y}=t;if(g===Nt)return!0;if(y)return y(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:g,clearCofactor:y}=t;return g===Nt?this:y?y(f,this):this.multiplyUnsafe(t.h)}toRawBytes(g=!0){return this.assertValidity(),n(f,this,g)}toHex(g=!0){return $n(this.toRawBytes(g))}}f.BASE=new f(t.Gx,t.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);const p=t.nBitLength,w=vc(f,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function Tc(r){const t=Lo(r);return Sr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Fc(r){const t=Tc(r),{Fp:e,n}=t,s=e.BYTES+1,i=2*e.BYTES+1;function o(B){return se<B&&B<e.ORDER}function a(B){return ft(B,n)}function c(B){return Gs(B,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:p}=Dc({...t,toBytes(B,P,U){const z=P.toAffine(),V=e.toBytes(z.x),_=pr;return U?_(Uint8Array.from([P.hasEvenY()?2:3]),V):_(Uint8Array.from([4]),V,e.toBytes(z.y))},fromBytes(B){const P=B.length,U=B[0],z=B.subarray(1);if(P===s&&(U===2||U===3)){const V=$e(z);if(!o(V))throw new Error("Point is not on curve");const _=f(V);let dt=e.sqrt(_);const gt=(dt&Nt)===Nt;return(U&1)===1!==gt&&(dt=e.neg(dt)),{x:V,y:dt}}else if(P===i&&U===4){const V=e.fromBytes(z.subarray(0,e.BYTES)),_=e.fromBytes(z.subarray(e.BYTES,2*e.BYTES));return{x:V,y:_}}else throw new Error(`Point of length ${P} was invalid. Expected ${s} compressed bytes or ${i} uncompressed bytes`)}}),w=B=>$n(er(B,t.nByteLength));function m(B){const P=n>>Nt;return B>P}function g(B){return m(B)?a(-B):B}const y=(B,P,U)=>$e(B.slice(P,U));class E{constructor(P,U,z){this.r=P,this.s=U,this.recovery=z,this.assertValidity()}static fromCompact(P){const U=t.nByteLength;return P=Rt("compactSignature",P,U*2),new E(y(P,0,U),y(P,U,2*U))}static fromDER(P){const{r:U,s:z}=Te.toSig(Rt("DER",P));return new E(U,z)}assertValidity(){if(!p(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!p(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(P){return new E(this.r,this.s,P)}recoverPublicKey(P){const{r:U,s:z,recovery:V}=this,_=O(Rt("msgHash",P));if(V==null||![0,1,2,3].includes(V))throw new Error("recovery id invalid");const dt=V===2||V===3?U+t.n:U;if(dt>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const gt=V&1?"03":"02",oe=u.fromHex(gt+w(dt)),ae=c(dt),en=a(-_*ae),ar=a(z*ae),ce=u.BASE.multiplyAndAddUnsafe(oe,en,ar);if(!ce)throw new Error("point at infinify");return ce.assertValidity(),ce}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return tr(this.toDERHex())}toDERHex(){return Te.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return tr(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const N={isValidPrivateKey(B){try{return d(B),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const B=Fo(t.n);return Nc(t.randomBytes(B),t.n)},precompute(B=8,P=u.BASE){return P._setWindowSize(B),P.multiply(BigInt(3)),P}};function x(B,P=!0){return u.fromPrivateKey(B).toRawBytes(P)}function T(B){const P=B instanceof Uint8Array,U=typeof B=="string",z=(P||U)&&B.length;return P?z===s||z===i:U?z===2*s||z===2*i:B instanceof u}function v(B,P,U=!0){if(T(B))throw new Error("first arg must be private key");if(!T(P))throw new Error("second arg must be public key");return u.fromHex(P).multiply(d(B)).toRawBytes(U)}const C=t.bits2int||function(B){const P=$e(B),U=B.length*8-t.nBitLength;return U>0?P>>BigInt(U):P},O=t.bits2int_modN||function(B){return a(C(B))},k=ui(t.nBitLength);function H(B){if(typeof B!="bigint")throw new Error("bigint expected");if(!(se<=B&&B<k))throw new Error(`bigint expected < 2^${t.nBitLength}`);return er(B,t.nByteLength)}function Q(B,P,U=G){if(["recovered","canonical"].some(Se=>Se in U))throw new Error("sign() legacy options not supported");const{hash:z,randomBytes:V}=t;let{lowS:_,prehash:dt,extraEntropy:gt}=U;_==null&&(_=!0),B=Rt("msgHash",B),dt&&(B=Rt("prehashed msgHash",z(B)));const oe=O(B),ae=d(P),en=[H(ae),H(oe)];if(gt!=null){const Se=gt===!0?V(e.BYTES):gt;en.push(Rt("extraEntropy",Se))}const ar=pr(...en),ce=oe;function Es(Se){const nn=C(Se);if(!p(nn))return;const Ei=c(nn),rn=u.BASE.multiply(nn).toAffine(),vt=a(rn.x);if(vt===se)return;const sn=a(Ei*a(ce+vt*ae));if(sn===se)return;let Bi=(rn.x===vt?0:2)|Number(rn.y&Nt),xi=sn;return _&&m(sn)&&(xi=g(sn),Bi^=1),new E(vt,xi,Bi)}return{seed:ar,k2sig:Es}}const G={lowS:t.lowS,prehash:!1},X={lowS:t.lowS,prehash:!1};function nt(B,P,U=G){const{seed:z,k2sig:V}=Q(B,P,U),_=t;return Oo(_.hash.outputLen,_.nByteLength,_.hmac)(z,V)}u.BASE._setWindowSize(8);function Mt(B,P,U,z=X){var rn;const V=B;if(P=Rt("msgHash",P),U=Rt("publicKey",U),"strict"in z)throw new Error("options.strict was renamed to lowS");const{lowS:_,prehash:dt}=z;let gt,oe;try{if(typeof V=="string"||V instanceof Uint8Array)try{gt=E.fromDER(V)}catch(vt){if(!(vt instanceof Te.Err))throw vt;gt=E.fromCompact(V)}else if(typeof V=="object"&&typeof V.r=="bigint"&&typeof V.s=="bigint"){const{r:vt,s:sn}=V;gt=new E(vt,sn)}else throw new Error("PARSE");oe=u.fromHex(U)}catch(vt){if(vt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(_&&gt.hasHighS())return!1;dt&&(P=t.hash(P));const{r:ae,s:en}=gt,ar=O(P),ce=c(en),Es=a(ar*ce),Se=a(ae*ce),nn=(rn=u.BASE.multiplyAndAddUnsafe(oe,Es,Se))==null?void 0:rn.toAffine();return nn?a(nn.x)===ae:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:v,sign:nt,verify:Mt,ProjectivePoint:u,Signature:E,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Lc(r){return{hash:r,hmac:(t,...e)=>fs(r,t,xa(...e)),randomBytes:Ba}}function Uc(r,t){const e=n=>Fc({...r,...Lc(n)});return Object.freeze({...e(t),create:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Uo=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Qi=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Mc=BigInt(1),Hs=BigInt(2),Gi=(r,t)=>(r+t/Hs)/t;function Qc(r){const t=Uo,e=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),u=r*r*r%t,d=u*u*r%t,f=bt(d,e,t)*d%t,p=bt(f,e,t)*d%t,w=bt(p,Hs,t)*u%t,m=bt(w,s,t)*w%t,g=bt(m,i,t)*m%t,y=bt(g,a,t)*g%t,E=bt(y,c,t)*y%t,N=bt(E,a,t)*g%t,x=bt(N,e,t)*d%t,T=bt(x,o,t)*m%t,v=bt(T,n,t)*u%t,C=bt(v,Hs,t);if(!Js.eql(Js.sqr(C),r))throw new Error("Cannot find square root");return C}const Js=Ic(Uo,void 0,void 0,{sqrt:Qc}),de=Uc({a:BigInt(0),b:BigInt(7),Fp:Js,n:Qi,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const t=Qi,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Mc*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=e,o=BigInt("0x100000000000000000000000000000000"),a=Gi(i*r,t),c=Gi(-n*r,t);let u=ft(r-a*e-c*s,t),d=ft(-a*n-c*i,t);const f=u>o,p=d>o;if(f&&(u=t-u),p&&(d=t-d),u>o||d>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:f,k1:u,k2neg:p,k2:d}}}},ds);BigInt(0);de.ProjectivePoint;const Ar="0x0000000000000000000000000000000000000000",Hi="0x0000000000000000000000000000000000000000000000000000000000000000",Ji=BigInt(0),Vi=BigInt(1),zi=BigInt(2),Ki=BigInt(27),ji=BigInt(28),Mr=BigInt(35),on={};function Zi(r){return Xn(yt(r),32)}var En,Bn,xn,Je;const St=class St{constructor(t,e,n,s){A(this,En);A(this,Bn);A(this,xn);A(this,Je);Ca(t,on,"Signature"),h(this,En,e),h(this,Bn,n),h(this,xn,s),h(this,Je,null)}get r(){return l(this,En)}set r(t){b(gn(t)===32,"invalid r","value",t),h(this,En,D(t))}get s(){return l(this,Bn)}set s(t){b(gn(t)===32,"invalid s","value",t);const e=D(t);b(parseInt(e.substring(0,3))<8,"non-canonical s","value",e),h(this,Bn,e)}get v(){return l(this,xn)}set v(t){const e=J(t,"value");b(e===27||e===28,"invalid v","v",t),h(this,xn,e)}get networkV(){return l(this,Je)}get legacyChainId(){const t=this.networkV;return t==null?null:St.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=j(this.s);return this.yParity&&(t[0]|=128),D(t)}get compactSerialized(){return ut([this.r,this.yParityAndS])}get serialized(){return ut([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new St(on,this.r,this.s,this.v);return this.networkV&&h(t,Je,this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(t){const e=R(t,"v");return e==Ki||e==ji?Ji:(b(e>=Mr,"invalid EIP-155 v","v",t),(e-Mr)/zi)}static getChainIdV(t,e){return R(t)*zi+BigInt(35+e-27)}static getNormalizedV(t){const e=R(t);return e===Ji||e===Ki?27:e===Vi||e===ji?28:(b(e>=Mr,"invalid v","v",t),e&Vi?27:28)}static from(t){function e(u,d){b(u,d,"signature",t)}if(t==null)return new St(on,Hi,Hi,27);if(typeof t=="string"){const u=j(t,"signature");if(u.length===64){const d=D(u.slice(0,32)),f=u.slice(32,64),p=f[0]&128?28:27;return f[0]&=127,new St(on,d,D(f),p)}if(u.length===65){const d=D(u.slice(0,32)),f=u.slice(32,64);e((f[0]&128)===0,"non-canonical s");const p=St.getNormalizedV(u[64]);return new St(on,d,D(f),p)}e(!1,"invalid raw signature length")}if(t instanceof St)return t.clone();const n=t.r;e(n!=null,"missing r");const s=Zi(n),i=function(u,d){if(u!=null)return Zi(u);if(d!=null){e(ct(d,32),"invalid yParityAndS");const f=j(d);return f[0]&=127,D(f)}e(!1,"missing s")}(t.s,t.yParityAndS);e((j(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(u,d,f){if(u!=null){const p=R(u);return{networkV:p>=Mr?p:void 0,v:St.getNormalizedV(p)}}if(d!=null)return e(ct(d,32),"invalid yParityAndS"),{v:j(d)[0]&128?28:27};if(f!=null){switch(J(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}e(!1,"invalid yParity")}e(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),c=new St(on,s,i,a);return o&&h(c,Je,o),e(t.yParity==null||J(t.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),e(t.yParityAndS==null||t.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};En=new WeakMap,Bn=new WeakMap,xn=new WeakMap,Je=new WeakMap;let Lt=St;var Wt;const De=class De{constructor(t){A(this,Wt);b(gn(t)===32,"invalid private key","privateKey","[REDACTED]"),h(this,Wt,D(t))}get privateKey(){return l(this,Wt)}get publicKey(){return De.computePublicKey(l(this,Wt))}get compressedPublicKey(){return De.computePublicKey(l(this,Wt),!0)}sign(t){b(gn(t)===32,"invalid digest length","digest",t);const e=de.sign(cr(t),cr(l(this,Wt)),{lowS:!0});return Lt.from({r:_n(e.r,32),s:_n(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=De.computePublicKey(t);return D(de.getSharedSecret(cr(l(this,Wt)),j(e),!1))}static computePublicKey(t,e){let n=j(t,"key");if(n.length===32){const i=de.getPublicKey(n,!!e);return D(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=de.ProjectivePoint.fromHex(n);return D(s.toRawBytes(e))}static recoverPublicKey(t,e){b(gn(t)===32,"invalid digest length","digest",t);const n=Lt.from(e);let s=de.Signature.fromCompact(cr(ut([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(cr(t));return b(i!=null,"invalid signautre for digest","signature",e),"0x"+i.toHex(!1)}static addPoints(t,e,n){const s=de.ProjectivePoint.fromHex(De.computePublicKey(t).substring(2)),i=de.ProjectivePoint.fromHex(De.computePublicKey(e).substring(2));return"0x"+s.add(i).toHex(!!n)}};Wt=new WeakMap;let wr=De;function Gc(r){const t=q(r.from);let n=R(r.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,q(at(kt(tn([t,n])),12))}var Hc="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJ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gzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const Yi=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),qi=4;function Jc(r){let t=0;function e(){return r[t++]<<8|r[t++]}let n=e(),s=1,i=[0,1];for(let v=1;v<n;v++)i.push(s+=e());let o=e(),a=t;t+=o;let c=0,u=0;function d(){return c==0&&(u=u<<8|r[t++],c=8),u>>--c&1}const f=31,p=2**f,w=p>>>1,m=w>>1,g=p-1;let y=0;for(let v=0;v<f;v++)y=y<<1|d();let E=[],N=0,x=p;for(;;){let v=Math.floor(((y-N+1)*s-1)/x),C=0,O=n;for(;O-C>1;){let Q=C+O>>>1;v<i[Q]?O=Q:C=Q}if(C==0)break;E.push(C);let k=N+Math.floor(x*i[C]/s),H=N+Math.floor(x*i[C+1]/s)-1;for(;!((k^H)&w);)y=y<<1&g|d(),k=k<<1&g,H=H<<1&g|1;for(;k&~H&m;)y=y&w|y<<1&g>>>1|d(),k=k<<1^w,H=(H^w)<<1|w|1;N=k,x=1+H-k}let T=n-4;return E.map(v=>{switch(v-T){case 3:return T+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return T+256+(r[a++]<<8|r[a++]);case 1:return T+r[a++];default:return v-1}})}function Vc(r){let t=0;return()=>r[t++]}function Mo(r){return Vc(Jc(zc(r)))}function zc(r){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>t[s.charCodeAt(0)]=i);let e=r.length,n=new Uint8Array(6*e>>3);for(let s=0,i=0,o=0,a=0;s<e;s++)a=a<<6|t[r.charCodeAt(s)],o+=6,o>=8&&(n[i++]=a>>(o-=8));return n}function Kc(r){return r&1?~r>>1:r>>1}function jc(r,t){let e=Array(r);for(let n=0,s=0;n<r;n++)e[n]=s+=Kc(t());return e}function mr(r,t=0){let e=[];for(;;){let n=r(),s=r();if(!s)break;t+=n;for(let i=0;i<s;i++)e.push(t+i);t+=s+1}return e}function Qo(r){return yr(()=>{let t=mr(r);if(t.length)return t})}function Go(r){let t=[];for(;;){let e=r();if(e==0)break;t.push(Zc(e,r))}for(;;){let e=r()-1;if(e<0)break;t.push(Yc(e,r))}return t.flat()}function yr(r){let t=[];for(;;){let e=r(t.length);if(!e)break;t.push(e)}return t}function Ho(r,t,e){let n=Array(r).fill().map(()=>[]);for(let s=0;s<t;s++)jc(r,e).forEach((i,o)=>n[o].push(i));return n}function Zc(r,t){let e=1+t(),n=t(),s=yr(t);return Ho(s.length,1+r,t).flatMap((o,a)=>{let[c,...u]=o;return Array(s[a]).fill().map((d,f)=>{let p=f*n;return[c+f*e,u.map(w=>w+p)]})})}function Yc(r,t){let e=1+t();return Ho(e,1+r,t).map(s=>[s[0],s.slice(1)])}function qc(r){let t=[],e=mr(r);return s(n([]),[]),t;function n(i){let o=r(),a=yr(()=>{let c=mr(r).map(u=>e[u]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&t.push(a);for(let u of o)for(let d of u.Q)s(u,[...a,d],c)}}}function Wc(r){return r.toString(16).toUpperCase().padStart(2,"0")}function Jo(r){return`{${Wc(r)}}`}function Xc(r){let t=[];for(let e=0,n=r.length;e<n;){let s=r.codePointAt(e);e+=s<65536?1:2,t.push(s)}return t}function nr(r){let e=r.length;if(e<4096)return String.fromCodePoint(...r);let n=[];for(let s=0;s<e;)n.push(String.fromCodePoint(...r.slice(s,s+=4096)));return n.join("")}function _c(r,t){let e=r.length,n=e-t.length;for(let s=0;n==0&&s<e;s++)n=r[s]-t[s];return n}var $c="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26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6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const br=44032,_r=4352,$r=4449,ts=4519,Vo=19,zo=21,rr=28,es=zo*rr,tl=Vo*es,el=br+tl,nl=_r+Vo,rl=$r+zo,sl=ts+rr;function ur(r){return r>>24&255}function Ko(r){return r&16777215}let Vs,Wi,zs,Jr;function il(){let r=Mo($c);Vs=new Map(Qo(r).flatMap((t,e)=>t.map(n=>[n,e+1<<24]))),Wi=new Set(mr(r)),zs=new Map,Jr=new Map;for(let[t,e]of Go(r)){if(!Wi.has(t)&&e.length==2){let[n,s]=e,i=Jr.get(n);i||(i=new Map,Jr.set(n,i)),i.set(s,t)}zs.set(t,e.reverse())}}function jo(r){return r>=br&&r<el}function ol(r,t){if(r>=_r&&r<nl&&t>=$r&&t<rl)return br+(r-_r)*es+(t-$r)*rr;if(jo(r)&&t>ts&&t<sl&&(r-br)%rr==0)return r+(t-ts);{let e=Jr.get(r);return e&&(e=e.get(t),e)?e:-1}}function Zo(r){Vs||il();let t=[],e=[],n=!1;function s(i){let o=Vs.get(i);o&&(n=!0,i|=o),t.push(i)}for(let i of r)for(;;){if(i<128)t.push(i);else if(jo(i)){let o=i-br,a=o/es|0,c=o%es/rr|0,u=o%rr;s(_r+a),s($r+c),u>0&&s(ts+u)}else{let o=zs.get(i);o?e.push(...o):s(i)}if(!e.length)break;i=e.pop()}if(n&&t.length>1){let i=ur(t[0]);for(let o=1;o<t.length;o++){let a=ur(t[o]);if(a==0||i<=a){i=a;continue}let c=o-1;for(;;){let u=t[c+1];if(t[c+1]=t[c],t[c]=u,!c||(i=ur(t[--c]),i<=a))break}i=ur(t[o])}}return t}function al(r){let t=[],e=[],n=-1,s=0;for(let i of r){let o=ur(i),a=Ko(i);if(n==-1)o==0?n=a:t.push(a);else if(s>0&&s>=o)o==0?(t.push(n,...e),e.length=0,n=a):e.push(a),s=o;else{let c=ol(n,a);c>=0?n=c:s==0&&o==0?(t.push(n),n=a):(e.push(a),s=o)}}return n>=0&&t.push(n,...e),t}function Yo(r){return Zo(r).map(Ko)}function cl(r){return al(Zo(r))}const Xi=45,qo=".",Wo=65039,Xo=1,ns=r=>Array.from(r);function Er(r,t){return r.P.has(t)||r.Q.has(t)}class ll extends Array{get is_emoji(){return!0}}let Ks,_o,Fe,js,$o,pn,Ns,ln,Re,_i,Zs;function hi(){if(Ks)return;let r=Mo(Hc);const t=()=>mr(r),e=()=>new Set(t()),n=(d,f)=>f.forEach(p=>d.add(p));Ks=new Map(Go(r)),_o=e(),Fe=t(),js=new Set(t().map(d=>Fe[d])),Fe=new Set(Fe),$o=e(),e();let s=Qo(r),i=r();const o=()=>{let d=new Set;return t().forEach(f=>n(d,s[f])),n(d,t()),d};pn=yr(d=>{let f=yr(r).map(p=>p+96);if(f.length){let p=d>=i;f[0]-=32,f=nr(f),p&&(f=`Restricted[${f}]`);let w=o(),m=o(),g=!r();return{N:f,P:w,Q:m,M:g,R:p}}}),Ns=e(),ln=new Map;let a=t().concat(ns(Ns)).sort((d,f)=>d-f);a.forEach((d,f)=>{let p=r(),w=a[f]=p?a[f-p]:{V:[],M:new Map};w.V.push(d),Ns.has(d)||ln.set(d,w)});for(let{V:d,M:f}of new Set(ln.values())){let p=[];for(let m of d){let g=pn.filter(E=>Er(E,m)),y=p.find(({G:E})=>g.some(N=>E.has(N)));y||(y={G:new Set,V:[]},p.push(y)),y.V.push(m),n(y.G,g)}let w=p.flatMap(m=>ns(m.G));for(let{G:m,V:g}of p){let y=new Set(w.filter(E=>!m.has(E)));for(let E of g)f.set(E,y)}}Re=new Set;let c=new Set;const u=d=>Re.has(d)?c.add(d):Re.add(d);for(let d of pn){for(let f of d.P)u(f);for(let f of d.Q)u(f)}for(let d of Re)!ln.has(d)&&!c.has(d)&&ln.set(d,Xo);n(Re,Yo(Re)),_i=qc(r).map(d=>ll.from(d)).sort(_c),Zs=new Map;for(let d of _i){let f=[Zs];for(let p of d){let w=f.map(m=>{let g=m.get(p);return g||(g=new Map,m.set(p,g)),g});p===Wo?f.push(...w):f=w}for(let p of f)p.V=d}}function fi(r){return(ta(r)?"":`${di(As([r]))} `)+Jo(r)}function di(r){return`"${r}"‎`}function ul(r){if(r.length>=4&&r[2]==Xi&&r[3]==Xi)throw new Error(`invalid label extension: "${nr(r.slice(0,4))}"`)}function hl(r){for(let e=r.lastIndexOf(95);e>0;)if(r[--e]!==95)throw new Error("underscore allowed only at start")}function fl(r){let t=r[0],e=Yi.get(t);if(e)throw gr(`leading ${e}`);let n=r.length,s=-1;for(let i=1;i<n;i++){t=r[i];let o=Yi.get(t);if(o){if(s==i)throw gr(`${e} + ${o}`);s=i+1,e=o}}if(s==n)throw gr(`trailing ${e}`)}function As(r,t=1/0,e=Jo){let n=[];dl(r[0])&&n.push("◌"),r.length>t&&(t>>=1,r=[...r.slice(0,t),8230,...r.slice(-t)]);let s=0,i=r.length;for(let o=0;o<i;o++){let a=r[o];ta(a)&&(n.push(nr(r.slice(s,o))),n.push(e(a)),s=o+1)}return n.push(nr(r.slice(s,i))),n.join("")}function dl(r){return hi(),Fe.has(r)}function ta(r){return hi(),$o.has(r)}function gl(r){return ml(pl(r,cl,El))}function pl(r,t,e){if(!r)return[];hi();let n=0;return r.split(qo).map(s=>{let i=Xc(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=bl(i,t,e),c=a.length,u;if(!c)throw new Error("empty label");let d=o.output=a.flat();if(hl(d),!(o.emoji=c>1||a[0].is_emoji)&&d.every(p=>p<128))ul(d),u="ASCII";else{let p=a.flatMap(w=>w.is_emoji?[]:w);if(!p.length)u="Emoji";else{if(Fe.has(d[0]))throw gr("leading combining mark");for(let g=1;g<c;g++){let y=a[g];if(!y.is_emoji&&Fe.has(y[0]))throw gr(`emoji + combining mark: "${nr(a[g-1])} + ${As([y[0]])}"`)}fl(d);let w=ns(new Set(p)),[m]=wl(w);yl(m,p),Al(m,w),u=m.N}}o.type=u}catch(a){o.error=a}return o})}function Al(r,t){let e,n=[];for(let s of t){let i=ln.get(s);if(i===Xo)return;if(i){let o=i.M.get(s);if(e=e?e.filter(a=>o.has(a)):ns(o),!e.length)return}else n.push(s)}if(e){for(let s of e)if(n.every(i=>Er(s,i)))throw new Error(`whole-script confusable: ${r.N}/${s.N}`)}}function wl(r){let t=pn;for(let e of r){let n=t.filter(s=>Er(s,e));if(!n.length)throw pn.some(s=>Er(s,e))?na(t[0],e):ea(e);if(t=n,n.length==1)break}return t}function ml(r){return r.map(({input:t,error:e,output:n})=>{if(e){let s=e.message;throw new Error(r.length==1?s:`Invalid label ${di(As(t,63))}: ${s}`)}return nr(n)}).join(qo)}function ea(r){return new Error(`disallowed character: ${fi(r)}`)}function na(r,t){let e=fi(t),n=pn.find(s=>s.P.has(t));return n&&(e=`${n.N} ${e}`),new Error(`illegal mixture: ${r.N} + ${e}`)}function gr(r){return new Error(`illegal placement: ${r}`)}function yl(r,t){for(let e of t)if(!Er(r,e))throw na(r,e);if(r.M){let e=Yo(t);for(let n=1,s=e.length;n<s;n++)if(js.has(e[n])){let i=n+1;for(let o;i<s&&js.has(o=e[i]);i++)for(let a=n;a<i;a++)if(e[a]==o)throw new Error(`duplicate non-spacing marks: ${fi(o)}`);if(i-n>qi)throw new Error(`excessive non-spacing marks: ${di(As(e.slice(n-1,i)))} (${i-n}/${qi})`);n=i}}}function bl(r,t,e){let n=[],s=[];for(r=r.slice().reverse();r.length;){let i=Bl(r);if(i)s.length&&(n.push(t(s)),s=[]),n.push(e(i));else{let o=r.pop();if(Re.has(o))s.push(o);else{let a=Ks.get(o);if(a)s.push(...a);else if(!_o.has(o))throw ea(o)}}}return s.length&&n.push(t(s)),n}function El(r){return r.filter(t=>t!=Wo)}function Bl(r,t){let e=Zs,n,s=r.length;for(;s&&(e=e.get(r[--s]),!!e);){let{V:i}=e;i&&(n=i,r.length=s)}return n}const ra=new Uint8Array(32);ra.fill(0);function $i(r){return b(r.length!==0,"invalid ENS name; empty component","comp",r),r}function sa(r){const t=_e(xl(r)),e=[];if(r.length===0)return e;let n=0;for(let s=0;s<t.length;s++)t[s]===46&&(e.push($i(t.slice(n,s))),n=s+1);return b(n<t.length,"invalid ENS name; empty component","name",r),e.push($i(t.slice(n))),e}function xl(r){try{if(r.length===0)throw new Error("empty label");return gl(r)}catch(t){b(!1,`invalid ENS name (${t.message})`,"name",r)}}function Ys(r){b(typeof r=="string","invalid ENS name; not a string","name",r),b(r.length,"invalid ENS name (empty label)","name",r);let t=ra;const e=sa(r);for(;e.length;)t=kt(ut([t,kt(e.pop())]));return D(t)}function Cl(r,t){const e=t;return b(e<=255,"DNS encoded label cannot exceed 255","length",e),D(ut(sa(r).map(n=>{b(n.length<=e,`label ${JSON.stringify(r)} exceeds ${e} bytes`,"name",r);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Pl(r){let t;return typeof r=="string"?t=wr.computePublicKey(r,!1):t=r.publicKey,q(kt("0x"+t.substring(4)).substring(26))}function Il(r,t){return Pl(wr.recoverPublicKey(r,t))}const tt=BigInt(0),Nl=BigInt(2),kl=BigInt(27),vl=BigInt(28),Sl=BigInt(35),Rl=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ks=4096*32;function to(r,t){let e=r.toString(16);for(;e.length<2;)e="0"+e;return e+=or(t).substring(4),"0x"+e}function ws(r){return r==="0x"?null:q(r)}function gi(r,t){try{return ir(r)}catch(e){b(!1,e.message,t,r)}}function Rr(r,t){return r==="0x"?0:J(r,t)}function Y(r,t){if(r==="0x")return tt;const e=R(r,t);return b(e<=Rl,"value exceeds uint size",t,e),e}function K(r,t){const e=R(r,"value"),n=yt(e);return b(n.length<=32,"value too large",`tx.${t}`,e),n}function pi(r){return ir(r).map(t=>[t.address,t.storageKeys])}function Ol(r,t){b(Array.isArray(r),`invalid ${t}`,"value",r);for(let e=0;e<r.length;e++)b(ct(r[e],32),"invalid ${ param } hash",`value[${e}]`,r[e]);return r}function Dl(r){const t=hs(r);b(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",r);const e={type:0,nonce:Rr(t[0],"nonce"),gasPrice:Y(t[1],"gasPrice"),gasLimit:Y(t[2],"gasLimit"),to:ws(t[3]),value:Y(t[4],"value"),data:D(t[5]),chainId:tt};if(t.length===6)return e;const n=Y(t[6],"v"),s=Y(t[7],"r"),i=Y(t[8],"s");if(s===tt&&i===tt)e.chainId=n;else{let o=(n-Sl)/Nl;o<tt&&(o=tt),e.chainId=o,b(o!==tt||n===kl||n===vl,"non-canonical legacy v","v",t[6]),e.signature=Lt.from({r:Xn(t[7],32),s:Xn(t[8],32),v:n})}return e}function Tl(r,t){const e=[K(r.nonce,"nonce"),K(r.gasPrice||0,"gasPrice"),K(r.gasLimit,"gasLimit"),r.to||"0x",K(r.value,"value"),r.data];let n=tt;if(r.chainId!=tt)n=R(r.chainId,"tx.chainId"),b(!t||t.networkV==null||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(r.signature){const i=r.signature.legacyChainId;i!=null&&(n=i)}if(!t)return n!==tt&&(e.push(yt(n)),e.push("0x"),e.push("0x")),tn(e);let s=BigInt(27+t.yParity);return n!==tt?s=Lt.getChainIdV(n,t.v):BigInt(t.v)!==s&&b(!1,"tx.chainId/sig.v mismatch","sig",t),e.push(yt(s)),e.push(yt(t.r)),e.push(yt(t.s)),tn(e)}function Ai(r,t){let e;try{if(e=Rr(t[0],"yParity"),e!==0&&e!==1)throw new Error("bad yParity")}catch{b(!1,"invalid yParity","yParity",t[0])}const n=Xn(t[1],32),s=Xn(t[2],32),i=Lt.from({r:n,s,yParity:e});r.signature=i}function Fl(r){const t=hs(j(r).slice(1));b(Array.isArray(t)&&(t.length===9||t.length===12),"invalid field count for transaction type: 2","data",D(r));const e={type:2,chainId:Y(t[0],"chainId"),nonce:Rr(t[1],"nonce"),maxPriorityFeePerGas:Y(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Y(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Y(t[4],"gasLimit"),to:ws(t[5]),value:Y(t[6],"value"),data:D(t[7]),accessList:gi(t[8],"accessList")};return t.length===9||Ai(e,t.slice(9)),e}function Ll(r,t){const e=[K(r.chainId,"chainId"),K(r.nonce,"nonce"),K(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),K(r.maxFeePerGas||0,"maxFeePerGas"),K(r.gasLimit,"gasLimit"),r.to||"0x",K(r.value,"value"),r.data,pi(r.accessList||[])];return t&&(e.push(K(t.yParity,"yParity")),e.push(yt(t.r)),e.push(yt(t.s))),ut(["0x02",tn(e)])}function Ul(r){const t=hs(j(r).slice(1));b(Array.isArray(t)&&(t.length===8||t.length===11),"invalid field count for transaction type: 1","data",D(r));const e={type:1,chainId:Y(t[0],"chainId"),nonce:Rr(t[1],"nonce"),gasPrice:Y(t[2],"gasPrice"),gasLimit:Y(t[3],"gasLimit"),to:ws(t[4]),value:Y(t[5],"value"),data:D(t[6]),accessList:gi(t[7],"accessList")};return t.length===8||Ai(e,t.slice(8)),e}function Ml(r,t){const e=[K(r.chainId,"chainId"),K(r.nonce,"nonce"),K(r.gasPrice||0,"gasPrice"),K(r.gasLimit,"gasLimit"),r.to||"0x",K(r.value,"value"),r.data,pi(r.accessList||[])];return t&&(e.push(K(t.yParity,"recoveryParam")),e.push(yt(t.r)),e.push(yt(t.s))),ut(["0x01",tn(e)])}function Ql(r){let t=hs(j(r).slice(1)),e="3",n=null;if(t.length===4&&Array.isArray(t[0])){e="3 (network format)";const i=t[1],o=t[2],a=t[3];b(Array.isArray(i),"invalid network format: blobs not an array","fields[1]",i),b(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),b(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),b(i.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",t),b(i.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let c=0;c<t[1].length;c++)n.push({data:i[c],commitment:o[c],proof:a[c]});t=t[0]}b(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${e}`,"data",D(r));const s={type:3,chainId:Y(t[0],"chainId"),nonce:Rr(t[1],"nonce"),maxPriorityFeePerGas:Y(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Y(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Y(t[4],"gasLimit"),to:ws(t[5]),value:Y(t[6],"value"),data:D(t[7]),accessList:gi(t[8],"accessList"),maxFeePerBlobGas:Y(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(s.blobs=n),b(s.to!=null,`invalid address for transaction type: ${e}`,"data",r),b(Array.isArray(s.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",r);for(let i=0;i<s.blobVersionedHashes.length;i++)b(ct(s.blobVersionedHashes[i],32),`invalid blobVersionedHash at index ${i}: must be length 32`,"data",r);return t.length===11||Ai(s,t.slice(11)),s}function Gl(r,t,e){const n=[K(r.chainId,"chainId"),K(r.nonce,"nonce"),K(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),K(r.maxFeePerGas||0,"maxFeePerGas"),K(r.gasLimit,"gasLimit"),r.to||Ar,K(r.value,"value"),r.data,pi(r.accessList||[]),K(r.maxFeePerBlobGas||0,"maxFeePerBlobGas"),Ol(r.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(K(t.yParity,"yParity")),n.push(yt(t.r)),n.push(yt(t.s)),e)?ut(["0x03",tn([n,e.map(s=>s.data),e.map(s=>s.commitment),e.map(s=>s.proof)])]):ut(["0x03",tn(n)])}var Ht,Cn,Pn,In,Nn,kn,vn,Sn,Rn,On,Dn,Tn,Ve,Ae,Xt,we,Fn,Vr;const Zt=class Zt{constructor(){A(this,Fn);A(this,Ht);A(this,Cn);A(this,Pn);A(this,In);A(this,Nn);A(this,kn);A(this,vn);A(this,Sn);A(this,Rn);A(this,On);A(this,Dn);A(this,Tn);A(this,Ve);A(this,Ae);A(this,Xt);A(this,we);h(this,Ht,null),h(this,Cn,null),h(this,In,0),h(this,Nn,tt),h(this,kn,null),h(this,vn,null),h(this,Sn,null),h(this,Pn,"0x"),h(this,Rn,tt),h(this,On,tt),h(this,Dn,null),h(this,Tn,null),h(this,Ve,null),h(this,Ae,null),h(this,we,null),h(this,Xt,null)}get type(){return l(this,Ht)}set type(t){switch(t){case null:h(this,Ht,null);break;case 0:case"legacy":h(this,Ht,0);break;case 1:case"berlin":case"eip-2930":h(this,Ht,1);break;case 2:case"london":case"eip-1559":h(this,Ht,2);break;case 3:case"cancun":case"eip-4844":h(this,Ht,3);break;default:b(!1,"unsupported transaction type","type",t)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const t=l(this,Cn);return t==null&&this.type===3?Ar:t}set to(t){h(this,Cn,t==null?null:q(t))}get nonce(){return l(this,In)}set nonce(t){h(this,In,J(t,"value"))}get gasLimit(){return l(this,Nn)}set gasLimit(t){h(this,Nn,R(t))}get gasPrice(){const t=l(this,kn);return t==null&&(this.type===0||this.type===1)?tt:t}set gasPrice(t){h(this,kn,t==null?null:R(t,"gasPrice"))}get maxPriorityFeePerGas(){const t=l(this,vn);return t??(this.type===2||this.type===3?tt:null)}set maxPriorityFeePerGas(t){h(this,vn,t==null?null:R(t,"maxPriorityFeePerGas"))}get maxFeePerGas(){const t=l(this,Sn);return t??(this.type===2||this.type===3?tt:null)}set maxFeePerGas(t){h(this,Sn,t==null?null:R(t,"maxFeePerGas"))}get data(){return l(this,Pn)}set data(t){h(this,Pn,D(t))}get value(){return l(this,Rn)}set value(t){h(this,Rn,R(t,"value"))}get chainId(){return l(this,On)}set chainId(t){h(this,On,R(t))}get signature(){return l(this,Dn)||null}set signature(t){h(this,Dn,t==null?null:Lt.from(t))}get accessList(){const t=l(this,Tn)||null;return t??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(t){h(this,Tn,t==null?null:ir(t))}get maxFeePerBlobGas(){const t=l(this,Ve);return t==null&&this.type===3?tt:t}set maxFeePerBlobGas(t){h(this,Ve,t==null?null:R(t,"maxFeePerBlobGas"))}get blobVersionedHashes(){let t=l(this,Ae);return t==null&&this.type===3?[]:t}set blobVersionedHashes(t){if(t!=null){b(Array.isArray(t),"blobVersionedHashes must be an Array","value",t),t=t.slice();for(let e=0;e<t.length;e++)b(ct(t[e],32),"invalid blobVersionedHash",`value[${e}]`,t[e])}h(this,Ae,t)}get blobs(){return l(this,we)==null?null:l(this,we).map(t=>Object.assign({},t))}set blobs(t){if(t==null){h(this,we,null);return}const e=[],n=[];for(let s=0;s<t.length;s++){const i=t[s];if(Pa(i)){S(l(this,Xt),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let o=j(i);if(b(o.length<=ks,"blob is too large",`blobs[${s}]`,i),o.length!==ks){const u=new Uint8Array(ks);u.set(o),o=u}const a=l(this,Xt).blobToKzgCommitment(o),c=D(l(this,Xt).computeBlobKzgProof(o,a));e.push({data:D(o),commitment:D(a),proof:c}),n.push(to(1,a))}else{const o=D(i.commitment);e.push({data:D(i.data),commitment:o,proof:D(i.proof)}),n.push(to(1,o))}}h(this,we,e),h(this,Ae,n)}get kzg(){return l(this,Xt)}set kzg(t){h(this,Xt,t)}get hash(){return this.signature==null?null:kt(I(this,Fn,Vr).call(this,!0,!1))}get unsignedHash(){return kt(this.unsignedSerialized)}get from(){return this.signature==null?null:Il(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:wr.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return I(this,Fn,Vr).call(this,!0,!0)}get unsignedSerialized(){return I(this,Fn,Vr).call(this,!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=this.gasPrice!=null,e=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=l(this,Ve)!=null||l(this,Ae);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&S(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),S(!e||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),S(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):e?i.push(2):t?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Zt.from(this)}toJSON(){const t=e=>e==null?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new Zt;if(typeof t=="string"){const n=j(t);if(n[0]>=127)return Zt.from(Dl(n));switch(n[0]){case 1:return Zt.from(Ul(n));case 2:return Zt.from(Fl(n));case 3:return Zt.from(Ql(n))}S(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const e=new Zt;return t.type!=null&&(e.type=t.type),t.to!=null&&(e.to=t.to),t.nonce!=null&&(e.nonce=t.nonce),t.gasLimit!=null&&(e.gasLimit=t.gasLimit),t.gasPrice!=null&&(e.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(e.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(e.data=t.data),t.value!=null&&(e.value=t.value),t.chainId!=null&&(e.chainId=t.chainId),t.signature!=null&&(e.signature=Lt.from(t.signature)),t.accessList!=null&&(e.accessList=t.accessList),t.blobVersionedHashes!=null&&(e.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(e.kzg=t.kzg),t.blobs!=null&&(e.blobs=t.blobs),t.hash!=null&&(b(e.isSigned(),"unsigned transaction cannot define '.hash'","tx",t),b(e.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(b(e.isSigned(),"unsigned transaction cannot define '.from'","tx",t),b(e.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),e}};Ht=new WeakMap,Cn=new WeakMap,Pn=new WeakMap,In=new WeakMap,Nn=new WeakMap,kn=new WeakMap,vn=new WeakMap,Sn=new WeakMap,Rn=new WeakMap,On=new WeakMap,Dn=new WeakMap,Tn=new WeakMap,Ve=new WeakMap,Ae=new WeakMap,Xt=new WeakMap,we=new WeakMap,Fn=new WeakSet,Vr=function(t,e){S(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=t?this.signature:null;switch(this.inferType()){case 0:return Tl(this,n);case 1:return Ml(this,n);case 2:return Ll(this,n);case 3:return Gl(this,n,e?this.blobs:null)}S(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let rs=Zt;const ia=new Uint8Array(32);ia.fill(0);const Hl=BigInt(-1),oa=BigInt(0),aa=BigInt(1),Jl=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Vl(r){const t=j(r),e=t.length%32;return e?ut([t,ia.slice(e)]):D(t)}const zl=_n(aa,32),Kl=_n(oa,32),eo={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},vs=["name","version","chainId","verifyingContract","salt"];function no(r){return function(t){return b(typeof t=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,t),t}}const jl={name:no("name"),version:no("version"),chainId:function(r){const t=R(r,"domain.chainId");return b(t>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(t)?Number(t):hn(t)},verifyingContract:function(r){try{return q(r).toLowerCase()}catch{}b(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){const t=j(r,"domain.salt");return b(t.length===32,'invalid domain value "salt"',"domain.salt",r),D(t)}};function Ss(r){{const t=r.match(/^(u?)int(\d+)$/);if(t){const e=t[1]==="",n=parseInt(t[2]);b(n%8===0&&n!==0&&n<=256&&t[2]===String(n),"invalid numeric width","type",r);const s=ka(Jl,e?n-1:n),i=e?(s+aa)*Hl:oa;return function(o){const a=R(o,"value");return b(a>=i&&a<=s,`value out-of-bounds for ${r}`,"value",a),_n(e?va(a,256):a,32)}}}{const t=r.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return b(e!==0&&e<=32&&t[1]===String(e),"invalid bytes width","type",r),function(n){const s=j(n);return b(s.length===e,`invalid length for ${r}`,"value",n),Vl(n)}}}switch(r){case"address":return function(t){return Xn(q(t),32)};case"bool":return function(t){return t?zl:Kl};case"bytes":return function(t){return kt(t)};case"string":return function(t){return mo(t)}}return null}function ro(r,t){return`${r}(${t.map(({name:e,type:n})=>n+" "+e).join(",")})`}function Qr(r){const t=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:r}}var Pr,_t,Ln,as,ca;const Et=class Et{constructor(t){A(this,as);W(this,"primaryType");A(this,Pr);A(this,_t);A(this,Ln);h(this,_t,new Map),h(this,Ln,new Map);const e=new Map,n=new Map,s=new Map,i={};Object.keys(t).forEach(c=>{i[c]=t[c].map(({name:u,type:d})=>{let{base:f,index:p}=Qr(d);return f==="int"&&!t.int&&(f="int256"),f==="uint"&&!t.uint&&(f="uint256"),{name:u,type:f+(p||"")}}),e.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),h(this,Pr,JSON.stringify(i));for(const c in i){const u=new Set;for(const d of i[c]){b(!u.has(d.name),`duplicate variable name ${JSON.stringify(d.name)} in ${JSON.stringify(c)}`,"types",t),u.add(d.name);const f=Qr(d.type).base;b(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",t),!Ss(f)&&(b(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",t),n.get(f).push(c),e.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);b(o.length!==0,"missing primary type","types",t),b(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",t),Ut(this,{primaryType:o[0]});function a(c,u){b(!u.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",t),u.add(c);for(const d of e.get(c))if(n.has(d)){a(d,u);for(const f of u)s.get(f).add(d)}u.delete(c)}a(this.primaryType,new Set);for(const[c,u]of s){const d=Array.from(u);d.sort(),l(this,_t).set(c,ro(c,i[c])+d.map(f=>ro(f,i[f])).join(""))}}get types(){return JSON.parse(l(this,Pr))}getEncoder(t){let e=l(this,Ln).get(t);return e||(e=I(this,as,ca).call(this,t),l(this,Ln).set(t,e)),e}encodeType(t){const e=l(this,_t).get(t);return b(e,`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return kt(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,n){if(Ss(t))return n(t,e);const s=Qr(t).array;if(s)return b(s.count===-1||s.count===e.length,`array length mismatch; expected length ${s.count}`,"value",e),e.map(o=>this._visit(s.prefix,o,n));const i=this.types[t];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,e[a],n),o),{});b(!1,`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new Et(t)}static getPrimaryType(t){return Et.from(t).primaryType}static hashStruct(t,e,n){return Et.from(e).hashStruct(t,n)}static hashDomain(t){const e=[];for(const n in t){if(t[n]==null)continue;const s=eo[n];b(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",t),e.push({name:n,type:s})}return e.sort((n,s)=>vs.indexOf(n.name)-vs.indexOf(s.name)),Et.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,n){return ut(["0x1901",Et.hashDomain(t),Et.from(e).hash(n)])}static hash(t,e,n){return kt(Et.encode(t,e,n))}static async resolveNames(t,e,n,s){t=Object.assign({},t);for(const a in t)t[a]==null&&delete t[a];const i={};t.verifyingContract&&!ct(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const o=Et.from(e);o.visit(n,(a,c)=>(a==="address"&&!ct(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:t,value:n}}static getPayload(t,e,n){Et.hashDomain(t);const s={},i=[];vs.forEach(c=>{const u=t[c];u!=null&&(s[c]=jl[c](u),i.push({name:c,type:eo[c]}))});const o=Et.from(e);e=o.types;const a=Object.assign({},e);return b(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",e),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,u)=>{if(c.match(/^bytes(\d*)/))return D(j(u));if(c.match(/^u?int/))return R(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return b(typeof u=="string","invalid string","value",u),u}b(!1,"unsupported type","type",c)})}}};Pr=new WeakMap,_t=new WeakMap,Ln=new WeakMap,as=new WeakSet,ca=function(t){{const s=Ss(t);if(s)return s}const e=Qr(t).array;if(e){const s=e.prefix,i=this.getEncoder(s);return o=>{b(e.count===-1||e.count===o.length,`array length mismatch; expected length ${e.count}`,"value",o);let a=o.map(i);return l(this,_t).has(s)&&(a=a.map(kt)),kt(ut(a))}}const n=this.types[t];if(n){const s=mo(l(this,_t).get(t));return i=>{const o=n.map(({name:a,type:c})=>{const u=this.getEncoder(c)(i[a]);return l(this,_t).has(c)?kt(u):u});return o.unshift(s),ut(o)}}b(!1,`unknown type: ${t}`,"type",t)};let ss=Et;function Rs(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):b(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}class Zl{constructor(t){W(this,"name");Ut(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error("unsupported coin")}async decodeAddress(t,e){throw new Error("unsupported coin")}}const la=new RegExp("^(ipfs)://(.*)$","i"),so=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),la,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var me,ze,ye,un,cs,ua;const fn=class fn{constructor(t,e,n){A(this,ye);W(this,"provider");W(this,"address");W(this,"name");A(this,me);A(this,ze);Ut(this,{provider:t,address:e,name:n}),h(this,me,null),h(this,ze,new dr(e,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t))}async supportsWildcard(){return l(this,me)==null&&h(this,me,(async()=>{try{return await l(this,ze).supportsInterface("0x9061b923")}catch(t){if(Ft(t,"CALL_EXCEPTION"))return!1;throw h(this,me,null),t}})()),await l(this,me)}async getAddress(t){if(t==null&&(t=60),t===60)try{const i=await I(this,ye,un).call(this,"addr(bytes32)");return i==null||i===Ar?null:i}catch(i){if(Ft(i,"CALL_EXCEPTION"))return null;throw i}if(t>=0&&t<2147483648){let i=t+2147483648;const o=await I(this,ye,un).call(this,"addr(bytes32,uint)",[i]);if(ct(o,20))return q(o)}let e=null;for(const i of this.provider.plugins)if(i instanceof Zl&&i.supportsCoinType(t)){e=i;break}if(e==null)return null;const n=await I(this,ye,un).call(this,"addr(bytes32,uint)",[t]);if(n==null||n==="0x")return null;const s=await e.decodeAddress(t,n);if(s!=null)return s;S(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:n}})}async getText(t){const e=await I(this,ye,un).call(this,"text(bytes32,string)",[t]);return e==null||e==="0x"?null:e}async getContentHash(){const t=await I(this,ye,un).call(this,"contenthash(bytes32)");if(t==null||t==="0x")return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const s=e[1]==="e3010170"?"ipfs":"ipns",i=parseInt(e[4],16);if(e[5].length===i*2)return`${s}://${Ma("0x"+e[2])}`}const n=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;S(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const e=await this.getText("avatar");if(e==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:e});for(let n=0;n<so.length;n++){const s=e.match(so[n]);if(s==null)continue;const i=s[1].toLowerCase();switch(i){case"https":case"data":return t.push({type:"url",value:e}),{linkage:t,url:e};case"ipfs":{const o=Rs(e);return t.push({type:"ipfs",value:e}),t.push({type:"url",value:o}),{linkage:t,url:o}}case"erc721":case"erc1155":{const o=i==="erc721"?"tokenURI(uint256)":"uri(uint256)";t.push({type:i,value:e});const a=await this.getAddress();if(a==null)return t.push({type:"!owner",value:""}),{url:null,linkage:t};const c=(s[2]||"").split("/");if(c.length!==2)return t.push({type:`!${i}caip`,value:s[2]||""}),{url:null,linkage:t};const u=c[1],d=new dr(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(i==="erc721"){const g=await d.ownerOf(u);if(a!==g)return t.push({type:"!owner",value:g}),{url:null,linkage:t};t.push({type:"owner",value:g})}else if(i==="erc1155"){const g=await d.balanceOf(a,u);if(!g)return t.push({type:"!balance",value:"0"}),{url:null,linkage:t};t.push({type:"balance",value:g.toString()})}let f=await d[o](u);if(f==null||f==="0x")return t.push({type:"!metadata-url",value:""}),{url:null,linkage:t};t.push({type:"metadata-url-base",value:f}),i==="erc1155"&&(f=f.replace("{id}",_n(u,32).substring(2)),t.push({type:"metadata-url-expanded",value:f})),f.match(/^ipfs:/i)&&(f=Rs(f)),t.push({type:"metadata-url",value:f});let p={};const w=await new ie(f).send();w.assertOk();try{p=w.bodyJson}catch{try{t.push({type:"!metadata",value:w.bodyText})}catch{const E=w.body;return E&&t.push({type:"!metadata",value:D(E)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!p)return t.push({type:"!metadata",value:""}),{url:null,linkage:t};t.push({type:"metadata",value:JSON.stringify(p)});let m=p.image;if(typeof m!="string")return t.push({type:"!imageUrl",value:""}),{url:null,linkage:t};if(!m.match(/^(https:\/\/|data:)/i)){if(m.match(la)==null)return t.push({type:"!imageUrl-ipfs",value:m}),{url:null,linkage:t};t.push({type:"imageUrl-ipfs",value:m}),m=Rs(m)}return t.push({type:"url",value:m}),{linkage:t,url:m}}}}}catch{}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),n=e.getPlugin("org.ethers.plugins.network.Ens");return S(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:e}}),n.address}static async fromName(t,e){var s;let n=e;for(;;){if(n===""||n==="."||e!=="eth"&&n==="eth")return null;const i=await I(s=fn,cs,ua).call(s,t,n);if(i!=null){const o=new fn(t,i,e);return n!==e&&!await o.supportsWildcard()?null:o}n=n.split(".").slice(1).join(".")}}};me=new WeakMap,ze=new WeakMap,ye=new WeakSet,un=async function(t,e){e=(e||[]).slice();const n=l(this,ze).interface;e.unshift(Ys(this.name));let s=null;await this.supportsWildcard()&&(s=n.getFunction(t),S(s,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[Cl(this.name,255),n.encodeFunctionData(s,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const i=await l(this,ze)[t](...e);return s?n.decodeFunctionResult(s,i)[0]:i}catch(i){if(!Ft(i,"CALL_EXCEPTION"))throw i}return null},cs=new WeakSet,ua=async function(t,e){const n=await fn.getEnsAddress(t);try{const i=await new dr(n,["function resolver(bytes32) view returns (address)"],t).resolver(Ys(e),{enableCcipRead:!0});return i===Ar?null:i}catch(s){throw s}return null},A(fn,cs);let is=fn;const io=BigInt(0);function M(r,t){return function(e){return e==null?t:r(e)}}function ms(r,t){return e=>{if(t&&e==null)return null;if(!Array.isArray(e))throw new Error("not an array");return e.map(n=>r(n))}}function Or(r,t){return e=>{const n={};for(const s in r){let i=s;if(t&&s in t&&!(i in e)){for(const o of t[s])if(o in e){i=o;break}}try{const o=r[s](e[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";S(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:e})}}return n}}function Yl(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}b(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function sr(r){return b(ct(r,!0),"invalid data","value",r),r}function st(r){return b(ct(r,32),"invalid hash","value",r),r}const ql=Or({address:q,blockHash:st,blockNumber:J,data:sr,index:J,removed:M(Yl,!1),topics:ms(st),transactionHash:st,transactionIndex:J},{index:["logIndex"]});function Wl(r){return ql(r)}const Xl=Or({hash:M(st),parentHash:st,parentBeaconBlockRoot:M(st,null),number:J,timestamp:J,nonce:M(sr),difficulty:R,gasLimit:R,gasUsed:R,stateRoot:M(st,null),receiptsRoot:M(st,null),blobGasUsed:M(R,null),excessBlobGas:M(R,null),miner:M(q),prevRandao:M(st,null),extraData:sr,baseFeePerGas:M(R)},{prevRandao:["mixHash"]});function _l(r){const t=Xl(r);return t.transactions=r.transactions.map(e=>typeof e=="string"?e:ha(e)),t}const $l=Or({transactionIndex:J,blockNumber:J,transactionHash:st,address:q,topics:ms(st),data:sr,index:J,blockHash:st},{index:["logIndex"]});function tu(r){return $l(r)}const eu=Or({to:M(q,null),from:M(q,null),contractAddress:M(q,null),index:J,root:M(D),gasUsed:R,blobGasUsed:M(R,null),logsBloom:M(sr),blockHash:st,hash:st,logs:ms(tu),blockNumber:J,cumulativeGasUsed:R,effectiveGasPrice:M(R),blobGasPrice:M(R,null),status:M(J),type:M(J,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function nu(r){return eu(r)}function ha(r){r.to&&R(r.to)===io&&(r.to="0x0000000000000000000000000000000000000000");const t=Or({hash:st,index:M(J,void 0),type:e=>e==="0x"||e==null?0:J(e),accessList:M(ir,null),blobVersionedHashes:M(ms(st,!0),null),blockHash:M(st,null),blockNumber:M(J,null),transactionIndex:M(J,null),from:q,gasPrice:M(R),maxPriorityFeePerGas:M(R),maxFeePerGas:M(R),maxFeePerBlobGas:M(R,null),gasLimit:R,to:M(q,null),value:R,nonce:J,data:sr,creates:M(q,null),chainId:M(R,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(t.to==null&&t.creates==null&&(t.creates=Gc(t)),(r.type===1||r.type===2)&&r.accessList==null&&(t.accessList=[]),r.signature?t.signature=Lt.from(r.signature):t.signature=Lt.from(r),t.chainId==null){const e=t.signature.legacyChainId;e!=null&&(t.chainId=e)}return t.blockHash&&R(t.blockHash)===io&&(t.blockHash=null),t}const ru="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Dr{constructor(t){W(this,"name");Ut(this,{name:t})}clone(){return new Dr(this.name)}}class ys extends Dr{constructor(e,n){e==null&&(e=0);super(`org.ethers.network.plugins.GasCost#${e||0}`);W(this,"effectiveBlock");W(this,"txBase");W(this,"txCreate");W(this,"txDataZero");W(this,"txDataNonzero");W(this,"txAccessListStorageKey");W(this,"txAccessListAddress");const s={effectiveBlock:e};function i(o,a){let c=(n||{})[o];c==null&&(c=a),b(typeof c=="number",`invalud value for ${o}`,"costs",n),s[o]=c}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),Ut(this,s)}clone(){return new ys(this.effectiveBlock,this)}}class bs extends Dr{constructor(e,n){super("org.ethers.plugins.network.Ens");W(this,"address");W(this,"targetNetwork");Ut(this,{address:e||ru,targetNetwork:n??1})}clone(){return new bs(this.address,this.targetNetwork)}}var Ir,Nr;class su extends Dr{constructor(e,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");A(this,Ir);A(this,Nr);h(this,Ir,e),h(this,Nr,n)}get url(){return l(this,Ir)}get processFunc(){return l(this,Nr)}clone(){return this}}Ir=new WeakMap,Nr=new WeakMap;const Os=new Map;var Un,Mn,be;const dn=class dn{constructor(t,e){A(this,Un);A(this,Mn);A(this,be);h(this,Un,t),h(this,Mn,R(e)),h(this,be,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return l(this,Un)}set name(t){h(this,Un,t)}get chainId(){return l(this,Mn)}set chainId(t){h(this,Mn,R(t,"chainId"))}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===R(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===R(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===R(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(l(this,be).values())}attachPlugin(t){if(l(this,be).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return l(this,be).set(t.name,t.clone()),this}getPlugin(t){return l(this,be).get(t)||null}getPlugins(t){return this.plugins.filter(e=>e.name.split("#")[0]===t)}clone(){const t=new dn(this.name,this.chainId);return this.plugins.forEach(e=>{t.attachPlugin(e.clone())}),t}computeIntrinsicGas(t){const e=this.getPlugin("org.ethers.plugins.network.GasCost")||new ys;let n=e.txBase;if(t.to==null&&(n+=e.txCreate),t.data)for(let s=2;s<t.data.length;s+=2)t.data.substring(s,s+2)==="00"?n+=e.txDataZero:n+=e.txDataNonzero;if(t.accessList){const s=ir(t.accessList);for(const i in s)n+=e.txAccessListAddress+e.txAccessListStorageKey*s[i].storageKeys.length}return n}static from(t){if(iu(),t==null)return dn.from("mainnet");if(typeof t=="number"&&(t=BigInt(t)),typeof t=="string"||typeof t=="bigint"){const e=Os.get(t);if(e)return e();if(typeof t=="bigint")return new dn("unknown",t);b(!1,"unknown network","network",t)}if(typeof t.clone=="function")return t.clone();if(typeof t=="object"){b(typeof t.name=="string"&&typeof t.chainId=="number","invalid network object name or chainId","network",t);const e=new dn(t.name,t.chainId);return(t.ensAddress||t.ensNetwork!=null)&&e.attachPlugin(new bs(t.ensAddress,t.ensNetwork)),e}b(!1,"invalid network","network",t)}static register(t,e){typeof t=="number"&&(t=BigInt(t));const n=Os.get(t);n&&b(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",t),Os.set(t,e)}};Un=new WeakMap,Mn=new WeakMap,be=new WeakMap;let jt=dn;function oo(r,t){const e=String(r);if(!e.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${r}`);const n=e.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${r}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function ao(r){return new su(r,async(t,e,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),t()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:oo(a.maxFee,9),maxPriorityFeePerGas:oo(a.maxPriorityFee,9)}}catch(i){S(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let co=!1;function iu(){if(co)return;co=!0;function r(t,e,n){const s=function(){const i=new jt(t,e);return n.ensNetwork!=null&&i.attachPlugin(new bs(null,n.ensNetwork)),i.attachPlugin(new ys),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};jt.register(t,s),jt.register(e,s),n.altNames&&n.altNames.forEach(i=>{jt.register(i,s)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("linea-sepolia",59141,{}),r("matic",137,{ensNetwork:1,plugins:[ao("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[ao("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function qs(r){return JSON.parse(JSON.stringify(r))}var $t,xt,Ee,Jt,Qn,zr;class ou{constructor(t){A(this,Qn);A(this,$t);A(this,xt);A(this,Ee);A(this,Jt);h(this,$t,t),h(this,xt,null),h(this,Ee,4e3),h(this,Jt,-2)}get pollingInterval(){return l(this,Ee)}set pollingInterval(t){h(this,Ee,t)}start(){l(this,xt)||(h(this,xt,l(this,$t)._setTimeout(I(this,Qn,zr).bind(this),l(this,Ee))),I(this,Qn,zr).call(this))}stop(){l(this,xt)&&(l(this,$t)._clearTimeout(l(this,xt)),h(this,xt,null))}pause(t){this.stop(),t&&h(this,Jt,-2)}resume(){this.start()}}$t=new WeakMap,xt=new WeakMap,Ee=new WeakMap,Jt=new WeakMap,Qn=new WeakSet,zr=async function(){try{const t=await l(this,$t).getBlockNumber();if(l(this,Jt)===-2){h(this,Jt,t);return}if(t!==l(this,Jt)){for(let e=l(this,Jt)+1;e<=t;e++){if(l(this,xt)==null)return;await l(this,$t).emit("block",e)}h(this,Jt,t)}}catch{}l(this,xt)!=null&&h(this,xt,l(this,$t)._setTimeout(I(this,Qn,zr).bind(this),l(this,Ee)))};var Ke,je,Be;class wi{constructor(t){A(this,Ke);A(this,je);A(this,Be);h(this,Ke,t),h(this,Be,!1),h(this,je,e=>{this._poll(e,l(this,Ke))})}async _poll(t,e){throw new Error("sub-classes must override this")}start(){l(this,Be)||(h(this,Be,!0),l(this,je).call(this,-2),l(this,Ke).on("block",l(this,je)))}stop(){l(this,Be)&&(h(this,Be,!1),l(this,Ke).off("block",l(this,je)))}pause(t){this.stop()}resume(){this.start()}}Ke=new WeakMap,je=new WeakMap,Be=new WeakMap;var Gn,te;class au extends wi{constructor(e,n){super(e);A(this,Gn);A(this,te);h(this,Gn,n),h(this,te,-2)}pause(e){e&&h(this,te,-2),super.pause(e)}async _poll(e,n){const s=await n.getBlock(l(this,Gn));s!=null&&(l(this,te)===-2?h(this,te,s.number):s.number>l(this,te)&&(n.emit(l(this,Gn),s.number),h(this,te,s.number)))}}Gn=new WeakMap,te=new WeakMap;var ls;class cu extends wi{constructor(e,n){super(e);A(this,ls);h(this,ls,qs(n))}async _poll(e,n){throw new Error("@TODO")}}ls=new WeakMap;var Hn;class lu extends wi{constructor(e,n){super(e);A(this,Hn);h(this,Hn,n)}async _poll(e,n){const s=await n.getTransactionReceipt(l(this,Hn));s&&n.emit(l(this,Hn),s)}}Hn=new WeakMap;var ee,Jn,Vn,xe,Ct,us,fa;class mi{constructor(t,e){A(this,us);A(this,ee);A(this,Jn);A(this,Vn);A(this,xe);A(this,Ct);h(this,ee,t),h(this,Jn,qs(e)),h(this,Vn,I(this,us,fa).bind(this)),h(this,xe,!1),h(this,Ct,-2)}start(){l(this,xe)||(h(this,xe,!0),l(this,Ct)===-2&&l(this,ee).getBlockNumber().then(t=>{h(this,Ct,t)}),l(this,ee).on("block",l(this,Vn)))}stop(){l(this,xe)&&(h(this,xe,!1),l(this,ee).off("block",l(this,Vn)))}pause(t){this.stop(),t&&h(this,Ct,-2)}resume(){this.start()}}ee=new WeakMap,Jn=new WeakMap,Vn=new WeakMap,xe=new WeakMap,Ct=new WeakMap,us=new WeakSet,fa=async function(t){if(l(this,Ct)===-2)return;const e=qs(l(this,Jn));e.fromBlock=l(this,Ct)+1,e.toBlock=t;const n=await l(this,ee).getLogs(e);if(n.length===0){l(this,Ct)<t-60&&h(this,Ct,t-60);return}for(const s of n)l(this,ee).emit(l(this,Jn),s),h(this,Ct,s.blockNumber)};const uu=BigInt(2),hu=10;function Gr(r){return r&&typeof r.then=="function"}function Kr(r,t){return r+":"+JSON.stringify(t,(e,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class da{constructor(t){W(this,"name");Ut(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function fu(r){return JSON.parse(JSON.stringify(r))}function Ws(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function Ds(r,t){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(ct(r,32)){const e=r.toLowerCase();return{type:"transaction",tag:Kr("tx",{hash:e}),hash:e}}if(r.orphan){const e=r;return{type:"orphan",tag:Kr("orphan",e),filter:fu(e)}}if(r.address||r.topics){const e=r,n={topics:(e.topics||[]).map(s=>s==null?null:Array.isArray(s)?Ws(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(e.address){const s=[],i=[],o=a=>{ct(a)?s.push(a):i.push((async()=>{s.push(await Kt(a,t))})())};Array.isArray(e.address)?e.address.forEach(o):o(e.address),i.length&&await Promise.all(i),n.address=Ws(s.map(a=>a.toLowerCase()))}return{filter:n,tag:Kr("event",n),type:"event"}}b(!1,"unknown ProviderEvent","event",r)}function Ts(){return new Date().getTime()}const du={cacheTimeout:250,pollingInterval:4e3};var it,Ce,ot,zn,mt,Ze,Pe,ne,kr,Pt,Kn,jn,L,pt,Xs,_s,hr,$s,fr,jr;class gu{constructor(t,e){A(this,L);A(this,it);A(this,Ce);A(this,ot);A(this,zn);A(this,mt);A(this,Ze);A(this,Pe);A(this,ne);A(this,kr);A(this,Pt);A(this,Kn);A(this,jn);if(h(this,jn,Object.assign({},du,e||{})),t==="any")h(this,Ze,!0),h(this,mt,null);else if(t){const n=jt.from(t);h(this,Ze,!1),h(this,mt,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else h(this,Ze,!1),h(this,mt,null);h(this,ne,-1),h(this,Pe,new Map),h(this,it,new Map),h(this,Ce,new Map),h(this,ot,null),h(this,zn,!1),h(this,kr,1),h(this,Pt,new Map),h(this,Kn,!1)}get pollingInterval(){return l(this,jn).pollingInterval}get provider(){return this}get plugins(){return Array.from(l(this,Ce).values())}attachPlugin(t){if(l(this,Ce).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return l(this,Ce).set(t.name,t.connect(this)),this}getPlugin(t){return l(this,Ce).get(t)||null}get disableCcipRead(){return l(this,Kn)}set disableCcipRead(t){h(this,Kn,!!t)}async ccipReadFetch(t,e,n){if(this.disableCcipRead||n.length===0||t.to==null)return null;const s=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const c=n[a],u=c.replace("{sender}",s).replace("{data}",i),d=new ie(u);c.indexOf("{data}")===-1&&(d.body={data:i,sender:s}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:d,index:a,urls:n});let f="unknown error",p;try{p=await d.send()}catch(w){o.push(w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:d,result:{error:w}});continue}try{const w=p.bodyJson;if(w.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:d,result:w}),w.data;w.message&&(f=w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:d,result:w})}catch{}S(p.statusCode<400||p.statusCode>=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:c,errorMessage:f}}),o.push(f)}S(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:n,errorMessages:o}})}_wrapBlock(t,e){return new Sa(_l(t),this)}_wrapLog(t,e){return new Ra(Wl(t),this)}_wrapTransactionReceipt(t,e){return new Oa(nu(t),this)}_wrapTransactionResponse(t,e){return new Da(ha(t),this)}_detectNetwork(){S(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){S(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=J(await I(this,L,pt).call(this,{method:"getBlockNumber"}),"%response");return l(this,ne)>=0&&h(this,ne,t),t}_getAddress(t){return Kt(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return t}if(ct(t))return ct(t,32)?t:hn(t);if(typeof t=="bigint"&&(t=J(t,"blockTag")),typeof t=="number")return t>=0?hn(t):l(this,ne)>=0?hn(l(this,ne)+t):this.getBlockNumber().then(e=>hn(e+t));b(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const e=(t.topics||[]).map(c=>c==null?null:Array.isArray(c)?Ws(c.map(u=>u.toLowerCase())):c.toLowerCase()),n="blockHash"in t?t.blockHash:void 0,s=(c,u,d)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(u!=null||d!=null))throw new Error("invalid filter");const p={};return f&&(p.address=f),e.length&&(p.topics=e),u&&(p.fromBlock=u),d&&(p.toBlock=d),n&&(p.blockHash=n),p};let i=[];if(t.address)if(Array.isArray(t.address))for(const c of t.address)i.push(this._getAddress(c));else i.push(this._getAddress(t.address));let o;"fromBlock"in t&&(o=this._getBlockTag(t.fromBlock));let a;return"toBlock"in t&&(a=this._getBlockTag(t.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(t){const e=Us(t),n=[];if(["to","from"].forEach(s=>{if(e[s]==null)return;const i=Kt(e[s],this);Gr(i)?n.push(async function(){e[s]=await i}()):e[s]=i}),e.blockTag!=null){const s=this._getBlockTag(e.blockTag);Gr(s)?n.push(async function(){e.blockTag=await s}()):e.blockTag=s}return n.length?async function(){return await Promise.all(n),e}():e}async getNetwork(){if(l(this,mt)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw l(this,mt)===s&&h(this,mt,null),i}})();return h(this,mt,s),(await s).clone()}const t=l(this,mt),[e,n]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==n.chainId&&(l(this,Ze)?(this.emit("network",n,e),l(this,mt)===t&&h(this,mt,Promise.resolve(n))):S(!1,`network changed: ${e.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await Bt({_block:I(this,L,$s).call(this,"latest",!1),gasPrice:(async()=>{try{const d=await I(this,L,pt).call(this,{method:"getGasPrice"});return R(d,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const d=await I(this,L,pt).call(this,{method:"getPriorityFee"});return R(d,"%response")}catch{}return null})()});let a=null,c=null;const u=this._wrapBlock(s,t);return u&&u.baseFeePerGas&&(c=o??BigInt("1000000000"),a=u.baseFeePerGas*uu+c),new Ii(i,a,c)},n=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new ie(n.url),i=await n.processFunc(e,this,s);return new Ii(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return Gr(e)&&(e=await e),R(await I(this,L,pt).call(this,{method:"estimateGas",transaction:e}),"%response")}async call(t){const{tx:e,blockTag:n}=await Bt({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await I(this,L,_s).call(this,I(this,L,Xs).call(this,e,n,t.enableCcipRead?0:-1))}async getBalance(t,e){return R(await I(this,L,hr).call(this,{method:"getBalance"},t,e),"%response")}async getTransactionCount(t,e){return J(await I(this,L,hr).call(this,{method:"getTransactionCount"},t,e),"%response")}async getCode(t,e){return D(await I(this,L,hr).call(this,{method:"getCode"},t,e))}async getStorage(t,e,n){const s=R(e,"position");return D(await I(this,L,hr).call(this,{method:"getStorage",position:s},t,n))}async broadcastTransaction(t){const{blockNumber:e,hash:n,network:s}=await Bt({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),i=rs.from(t);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(e)}async getBlock(t,e){const{network:n,params:s}=await Bt({network:this.getNetwork(),params:I(this,L,$s).call(this,t,!!e)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(t){const{network:e,params:n}=await Bt({network:this.getNetwork(),params:I(this,L,pt).call(this,{method:"getTransaction",hash:t})});return n==null?null:this._wrapTransactionResponse(n,e)}async getTransactionReceipt(t){const{network:e,params:n}=await Bt({network:this.getNetwork(),params:I(this,L,pt).call(this,{method:"getTransactionReceipt",hash:t})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await I(this,L,pt).call(this,{method:"getTransaction",hash:t});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,e)}async getTransactionResult(t){const{result:e}=await Bt({network:this.getNetwork(),result:I(this,L,pt).call(this,{method:"getTransactionResult",hash:t})});return e==null?null:D(e)}async getLogs(t){let e=this._getFilter(t);Gr(e)&&(e=await e);const{network:n,params:s}=await Bt({network:this.getNetwork(),params:I(this,L,pt).call(this,{method:"getLogs",filter:e})});return s.map(i=>this._wrapLog(i,n))}_getProvider(t){S(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await is.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){t=q(t);const e=Ys(t.substring(2).toLowerCase()+".addr.reverse");try{const n=await is.getEnsAddress(this),i=await new dr(n,["function resolver(bytes32) view returns (address)"],this).resolver(e);if(i==null||i===Ar)return null;const a=await new dr(i,["function name(bytes32) view returns (string)"],this).name(e);return await this.resolveName(a)!==t?null:a}catch(n){if(Ft(n,"BAD_DATA")&&n.value==="0x"||Ft(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(t,e,n){const s=e??1;return s===0?this.getTransactionReceipt(t):new Promise(async(i,o)=>{let a=null;const c=async u=>{try{const d=await this.getTransactionReceipt(t);if(d!=null&&u-d.blockNumber+1>=s){i(d),a&&(clearTimeout(a),a=null);return}}catch(d){console.log("EEE",d)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(rt("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(t){S(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const e=l(this,Pt).get(t);e&&(e.timer&&clearTimeout(e.timer),l(this,Pt).delete(t))}_setTimeout(t,e){e==null&&(e=0);const n=Tr(this,kr)._++,s=()=>{l(this,Pt).delete(n),t()};if(this.paused)l(this,Pt).set(n,{timer:null,func:s,time:e});else{const i=setTimeout(s,e);l(this,Pt).set(n,{timer:i,func:s,time:Ts()})}return n}_forEachSubscriber(t){for(const e of l(this,it).values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new da(t.type);case"block":{const e=new ou(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new au(this,t.type);case"event":return new mi(this,t.filter);case"transaction":return new lu(this,t.hash);case"orphan":return new cu(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const n of l(this,it).values())if(n.subscriber===t){n.started&&n.subscriber.stop(),n.subscriber=e,n.started&&e.start(),l(this,ot)!=null&&e.pause(l(this,ot));break}}async on(t,e){const n=await I(this,L,jr).call(this,t);return n.listeners.push({listener:e,once:!1}),n.started||(n.subscriber.start(),n.started=!0,l(this,ot)!=null&&n.subscriber.pause(l(this,ot))),this}async once(t,e){const n=await I(this,L,jr).call(this,t);return n.listeners.push({listener:e,once:!0}),n.started||(n.subscriber.start(),n.started=!0,l(this,ot)!=null&&n.subscriber.pause(l(this,ot))),this}async emit(t,...e){const n=await I(this,L,fr).call(this,t,e);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new Ta(this,o?null:i,t);try{i.call(this,...e,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),l(this,it).delete(n.tag)),s>0}async listenerCount(t){if(t){const n=await I(this,L,fr).call(this,t);return n?n.listeners.length:0}let e=0;for(const{listeners:n}of l(this,it).values())e+=n.length;return e}async listeners(t){if(t){const n=await I(this,L,fr).call(this,t);return n?n.listeners.map(({listener:s})=>s):[]}let e=[];for(const{listeners:n}of l(this,it).values())e=e.concat(n.map(({listener:s})=>s));return e}async off(t,e){const n=await I(this,L,fr).call(this,t);if(!n)return this;if(e){const s=n.listeners.map(({listener:i})=>i).indexOf(e);s>=0&&n.listeners.splice(s,1)}return(!e||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),l(this,it).delete(n.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:n,subscriber:s}=await I(this,L,jr).call(this,t);n&&s.stop(),l(this,it).delete(e)}else for(const[e,{started:n,subscriber:s}]of l(this,it))n&&s.stop(),l(this,it).delete(e);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return l(this,zn)}destroy(){this.removeAllListeners();for(const t of l(this,Pt).keys())this._clearTimeout(t);h(this,zn,!0)}get paused(){return l(this,ot)!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(h(this,ne,-1),l(this,ot)!=null){if(l(this,ot)==!!t)return;S(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(e=>e.pause(t)),h(this,ot,!!t);for(const e of l(this,Pt).values())e.timer&&clearTimeout(e.timer),e.time=Ts()-e.time}resume(){if(l(this,ot)!=null){this._forEachSubscriber(t=>t.resume()),h(this,ot,null);for(const t of l(this,Pt).values()){let e=t.time;e<0&&(e=0),t.time=Ts(),setTimeout(t.func,e)}}}}it=new WeakMap,Ce=new WeakMap,ot=new WeakMap,zn=new WeakMap,mt=new WeakMap,Ze=new WeakMap,Pe=new WeakMap,ne=new WeakMap,kr=new WeakMap,Pt=new WeakMap,Kn=new WeakMap,jn=new WeakMap,L=new WeakSet,pt=async function(t){const e=l(this,jn).cacheTimeout;if(e<0)return await this._perform(t);const n=Kr(t.method,t);let s=l(this,Pe).get(n);return s||(s=this._perform(t),l(this,Pe).set(n,s),setTimeout(()=>{l(this,Pe).get(n)===s&&l(this,Pe).delete(n)},e)),await s},Xs=async function(t,e,n){S(n<hu,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const s=Us(t);try{return D(await this._perform({method:"call",transaction:s,blockTag:e}))}catch(i){if(!this.disableCcipRead&&Ia(i)&&i.data&&n>=0&&e==="latest"&&s.to!=null&&at(i.data,0,4)==="0x556f1830"){const o=i.data,a=await Kt(s.to,this);let c;try{c=yu(at(i.data,4))}catch(f){S(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}S(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:s,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const u=await this.ccipReadFetch(s,c.calldata,c.urls);S(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:s,info:{data:i.data,errorArgs:c.errorArgs}});const d={to:a,data:ut([c.selector,mu([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:d});try{const f=await I(this,L,Xs).call(this,d,e,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},d),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},d),error:f}),f}}throw i}},_s=async function(t){const{value:e}=await Bt({network:this.getNetwork(),value:t});return e},hr=async function(t,e,n){let s=this._getAddress(e),i=this._getBlockTag(n);return(typeof s!="string"||typeof i!="string")&&([s,i]=await Promise.all([s,i])),await I(this,L,_s).call(this,I(this,L,pt).call(this,Object.assign(t,{address:s,blockTag:i})))},$s=async function(t,e){if(ct(t,32))return await I(this,L,pt).call(this,{method:"getBlock",blockHash:t,includeTransactions:e});let n=this._getBlockTag(t);return typeof n!="string"&&(n=await n),await I(this,L,pt).call(this,{method:"getBlock",blockTag:n,includeTransactions:e})},fr=async function(t,e){let n=await Ds(t,this);return n.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(n=await Ds({orphan:"drop-log",log:e[0]},this)),l(this,it).get(n.tag)||null},jr=async function(t){const e=await Ds(t,this),n=e.tag;let s=l(this,it).get(n);return s||(s={subscriber:this._getSubscriber(e),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},l(this,it).set(n,s)),s};function pu(r,t){try{const e=ti(r,t);if(e)return Ls(e)}catch{}return null}function ti(r,t){if(r==="0x")return null;try{const e=J(at(r,t,t+32)),n=J(at(r,e,e+32));return at(r,e+32,e+32+n)}catch{}return null}function lo(r){const t=yt(r);if(t.length>32)throw new Error("internal; should not happen");const e=new Uint8Array(32);return e.set(t,32-t.length),e}function Au(r){if(r.length%32===0)return r;const t=new Uint8Array(Math.ceil(r.length/32)*32);return t.set(r),t}const wu=new Uint8Array([]);function mu(r){const t=[];let e=0;for(let n=0;n<r.length;n++)t.push(wu),e+=32;for(let n=0;n<r.length;n++){const s=j(r[n]);t[n]=lo(e),t.push(lo(s.length)),t.push(Au(s)),e+=32+Math.ceil(s.length/32)*32}return ut(t)}const uo="0x0000000000000000000000000000000000000000000000000000000000000000";function yu(r){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};S(gn(r)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const e=at(r,0,32);S(at(e,0,12)===at(uo,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=at(e,12);try{const n=[],s=J(at(r,32,64)),i=J(at(r,s,s+32)),o=at(r,s+32);for(let a=0;a<i;a++){const c=pu(o,a*32);if(c==null)throw new Error("abort");n.push(c)}t.urls=n}catch{S(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=ti(r,64);if(n==null)throw new Error("abort");t.calldata=n}catch{S(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}S(at(r,100,128)===at(uo,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=at(r,96,100);try{const n=ti(r,128);if(n==null)throw new Error("abort");t.extraData=n}catch{S(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>t[n]),t}function an(r,t){if(r.provider)return r.provider;S(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function ho(r,t){let e=Us(t);if(e.to!=null&&(e.to=Kt(e.to,r)),e.from!=null){const n=e.from;e.from=Promise.all([r.getAddress(),Kt(n,r)]).then(([s,i])=>(b(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else e.from=r.getAddress();return await Bt(e)}class ga{constructor(t){W(this,"provider");Ut(this,{provider:t||null})}async getNonce(t){return an(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await ho(this,t)}async populateTransaction(t){const e=an(this,"populateTransaction"),n=await ho(this,t);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=R(n.chainId);b(o===s.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?b(!1,"eip-1559 transaction do not support gasPrice","tx",t):(n.type===0||n.type===1)&&i&&b(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await e.getFeeData();S(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await e.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(S(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):S(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Bt(n)}async estimateGas(t){return an(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return an(this,"call").call(await this.populateCall(t))}async resolveName(t){return await an(this,"resolveName").resolveName(t)}async sendTransaction(t){const e=an(this,"sendTransaction"),n=await this.populateTransaction(t);delete n.from;const s=rs.from(n);return await e.broadcastTransaction(await this.signTransaction(s))}}var Zn,Zr;const bi=class bi extends ga{constructor(e,n){super(n);A(this,Zn);W(this,"address");Ut(this,{address:e})}async getAddress(){return this.address}connect(e){return new bi(this.address,e)}async signTransaction(e){I(this,Zn,Zr).call(this,"transactions","signTransaction")}async signMessage(e){I(this,Zn,Zr).call(this,"messages","signMessage")}async signTypedData(e,n,s){I(this,Zn,Zr).call(this,"typed-data","signTypedData")}};Zn=new WeakSet,Zr=function(e,n){S(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:n})};let fo=bi;function bu(r){return JSON.parse(JSON.stringify(r))}var lt,Vt,Ye,Ie,qe,Yn,ve,ei,ni;class pa{constructor(t){A(this,ve);A(this,lt);A(this,Vt);A(this,Ye);A(this,Ie);A(this,qe);A(this,Yn);h(this,lt,t),h(this,Vt,null),h(this,Ye,I(this,ve,ei).bind(this)),h(this,Ie,!1),h(this,qe,null),h(this,Yn,!1)}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,e){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}start(){l(this,Ie)||(h(this,Ie,!0),I(this,ve,ei).call(this,-2))}stop(){l(this,Ie)&&(h(this,Ie,!1),h(this,Yn,!0),I(this,ve,ni).call(this),l(this,lt).off("block",l(this,Ye)))}pause(t){t&&I(this,ve,ni).call(this),l(this,lt).off("block",l(this,Ye))}resume(){this.start()}}lt=new WeakMap,Vt=new WeakMap,Ye=new WeakMap,Ie=new WeakMap,qe=new WeakMap,Yn=new WeakMap,ve=new WeakSet,ei=async function(t){try{l(this,Vt)==null&&h(this,Vt,this._subscribe(l(this,lt)));let e=null;try{e=await l(this,Vt)}catch(i){if(!Ft(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(e==null){h(this,Vt,null),l(this,lt)._recoverSubscriber(this,this._recover(l(this,lt)));return}const n=await l(this,lt).getNetwork();if(l(this,qe)||h(this,qe,n),l(this,qe).chainId!==n.chainId)throw new Error("chaid changed");if(l(this,Yn))return;const s=await l(this,lt).send("eth_getFilterChanges",[e]);await this._emitResults(l(this,lt),s)}catch(e){console.log("@TODO",e)}l(this,lt).once("block",l(this,Ye))},ni=function(){const t=l(this,Vt);t&&(h(this,Vt,null),t.then(e=>{l(this,lt).destroyed||l(this,lt).send("eth_uninstallFilter",[e])}))};var We;class Eu extends pa{constructor(e,n){super(e);A(this,We);h(this,We,bu(n))}_recover(e){return new mi(e,l(this,We))}async _subscribe(e){return await e.send("eth_newFilter",[l(this,We)])}async _emitResults(e,n){for(const s of n)e.emit(l(this,We),e._wrapLog(s,e._network))}}We=new WeakMap;class Bu extends pa{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,e){for(const n of e)t.emit("pending",n)}}const xu="bigint,boolean,function,number,string,symbol".split(/,/g);function Yr(r){if(r==null||xu.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(Yr);if(typeof r=="object")return Object.keys(r).reduce((t,e)=>(t[e]=r[e],t),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function Cu(r){return new Promise(t=>{setTimeout(t,r)})}function cn(r){return r&&r.toLowerCase()}function go(r){return r&&typeof r.pollingInterval=="number"}const Aa={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Fs extends ga{constructor(e,n){super(e);W(this,"address");n=q(n),Ut(this,{address:n})}connect(e){S(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const n=Yr(e),s=[];if(n.from){const o=n.from;s.push((async()=>{const a=await Kt(o,this.provider);b(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&s.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;s.push((async()=>{n.to=await Kt(o,this.provider)})())}s.length&&await Promise.all(s);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(e){const n=await this.provider.getBlockNumber(),s=await this.sendUncheckedTransaction(e);return await new Promise((i,o)=>{const a=[1e3,100];let c=0;const u=async()=>{try{const d=await this.provider.getTransaction(s);if(d!=null){i(d.replaceableTransaction(n));return}}catch(d){if(Ft(d,"CANCELLED")||Ft(d,"BAD_DATA")||Ft(d,"NETWORK_ERROR")||Ft(d,"UNSUPPORTED_OPERATION")){d.info==null&&(d.info={}),d.info.sendTransactionHash=s,o(d);return}if(Ft(d,"INVALID_ARGUMENT")&&(c++,d.info==null&&(d.info={}),d.info.sendTransactionHash=s,c>10)){o(d);return}this.provider.emit("error",rt("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:d}))}this.provider._setTimeout(()=>{u()},a.pop()||4e3)};u()})}async signTransaction(e){const n=Yr(e);if(n.from){const i=await Kt(n.from,this.provider);b(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),n.from=i}else n.from=this.address;const s=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[s])}async signMessage(e){const n=typeof e=="string"?_e(e):e;return await this.provider.send("personal_sign",[D(n),this.address.toLowerCase()])}async signTypedData(e,n,s){const i=Yr(s),o=await ss.resolveNames(e,n,i,async a=>{const c=await Kt(a);return b(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ss.getPayload(o.domain,n,o.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const n=typeof e=="string"?_e(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),D(n)])}}var Xe,qn,re,zt,Tt,It,ht,vr,ri;class Pu extends gu{constructor(e,n){super(e,n);A(this,vr);A(this,Xe);A(this,qn);A(this,re);A(this,zt);A(this,Tt);A(this,It);A(this,ht);h(this,qn,1),h(this,Xe,Object.assign({},Aa,n||{})),h(this,re,[]),h(this,zt,null),h(this,It,null),h(this,ht,null);{let i=null;const o=new Promise(a=>{i=a});h(this,Tt,{promise:o,resolve:i})}const s=this._getOption("staticNetwork");typeof s=="boolean"?(b(!s||e!=="any","staticNetwork cannot be used on special network 'any'","options",n),s&&e!=null&&h(this,It,jt.from(e))):s&&(b(e==null||s.matches(e),"staticNetwork MUST match network object","options",n),h(this,It,s))}_getOption(e){return l(this,Xe)[e]}get _network(){return S(l(this,It),"network is not available yet","NETWORK_ERROR"),l(this,It)}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let s=e.transaction;if(s&&s.type!=null&&R(s.type)&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},s,{type:void 0})}))}}const n=this.getRpcRequest(e);return n!=null?await this.send(n.method,n.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e)if(e===!0){if(l(this,It))return l(this,It)}else return e;return l(this,ht)?await l(this,ht):this.ready?(h(this,ht,(async()=>{try{const n=jt.from(R(await this.send("eth_chainId",[])));return h(this,ht,null),n}catch(n){throw h(this,ht,null),n}})()),await l(this,ht)):(h(this,ht,(async()=>{const n={id:Tr(this,qn)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let s;try{s=(await this._send(n))[0],h(this,ht,null)}catch(i){throw h(this,ht,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:s}),"result"in s)return jt.from(R(s.result));throw this.getRpcError(n,s)})()),await l(this,ht))}_start(){l(this,Tt)==null||l(this,Tt).resolve==null||(l(this,Tt).resolve(),h(this,Tt,null),(async()=>{for(;l(this,It)==null&&!this.destroyed;)try{h(this,It,await this._detectNetwork())}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",rt("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await Cu(1e3)}I(this,vr,ri).call(this)})())}async _waitUntilReady(){if(l(this,Tt)!=null)return await l(this,Tt).promise}_getSubscriber(e){return e.type==="pending"?new Bu(this):e.type==="event"?this._getOption("polling")?new mi(this,e.filter):new Eu(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new da("orphan"):super._getSubscriber(e)}get ready(){return l(this,Tt)==null}getRpcTransaction(e){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(s=>{if(e[s]==null)return;let i=s;s==="gasLimit"&&(i="gas"),n[i]=hn(R(e[s],`tx.${s}`))}),["from","to","data"].forEach(s=>{e[s]!=null&&(n[s]=D(e[s]))}),e.accessList&&(n.accessList=ir(e.accessList)),e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes.map(s=>s.toLowerCase())),n}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[cn(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[cn(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[cn(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[cn(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(cn):e.filter.address=cn(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,n){const{method:s}=e,{error:i}=n;if(s==="eth_estimateGas"&&i.message){const c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return rt("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if(s==="eth_call"||s==="eth_estimateGas"){const c=si(i),u=Fa.getBuiltinCallException(s==="eth_call"?"call":"estimateGas",e.params[0],c?c.data:null);return u.info={error:i,payload:e},u}const o=JSON.stringify(Nu(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return rt("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[s]||"unknown",reason:"rejected",info:{payload:e,error:i}});if(s==="eth_sendRawTransaction"||s==="eth_sendTransaction"){const c=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return rt("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return rt("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return rt("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return rt("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:s,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?rt("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):rt("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,n){if(this.destroyed)return Promise.reject(rt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const s=Tr(this,qn)._++,i=new Promise((o,a)=>{l(this,re).push({resolve:o,reject:a,payload:{method:e,params:n,id:s,jsonrpc:"2.0"}})});return I(this,vr,ri).call(this),i}async getSigner(e){e==null&&(e=0);const n=this.send("eth_accounts",[]);if(typeof e=="number"){const i=await n;if(e>=i.length)throw new Error("no such account");return new Fs(this,i[e])}const{accounts:s}=await Bt({network:this.getNetwork(),accounts:n});e=q(e);for(const i of s)if(q(i)===e)return new Fs(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new Fs(this,n))}destroy(){l(this,zt)&&(clearTimeout(l(this,zt)),h(this,zt,null));for(const{payload:e,reject:n}of l(this,re))n(rt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));h(this,re,[]),super.destroy()}}Xe=new WeakMap,qn=new WeakMap,re=new WeakMap,zt=new WeakMap,Tt=new WeakMap,It=new WeakMap,ht=new WeakMap,vr=new WeakSet,ri=function(){if(l(this,zt))return;const e=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");h(this,zt,setTimeout(()=>{h(this,zt,null);const n=l(this,re);for(h(this,re,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==l(this,Xe).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>l(this,Xe).batchMaxSize){n.unshift(s.pop());break}(async()=>{const i=s.length===1?s[0].payload:s.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:u}of s){if(this.destroyed){c(rt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const d=o.filter(f=>f.id===u.id)[0];if(d==null){const f=rt("missing response for request","BAD_DATA",{value:o,info:{payload:u}});this.emit("error",f),c(f);continue}if("error"in d){c(this.getRpcError(u,d));continue}a(d.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of s)a(o)}})()}},e))};var Ne;class Iu extends Pu{constructor(e,n){super(e,n);A(this,Ne);let s=this._getOption("pollingInterval");s==null&&(s=Aa.pollingInterval),h(this,Ne,s)}_getSubscriber(e){const n=super._getSubscriber(e);return go(n)&&(n.pollingInterval=l(this,Ne)),n}get pollingInterval(){return l(this,Ne)}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");h(this,Ne,e),this._forEachSubscriber(n=>{go(n)&&(n.pollingInterval=l(this,Ne))})}}Ne=new WeakMap;var Wn;class Lu extends Iu{constructor(e,n,s){e==null&&(e="http://localhost:8545");super(n,s);A(this,Wn);typeof e=="string"?h(this,Wn,new ie(e)):h(this,Wn,e.clone())}_getConnection(){return l(this,Wn).clone()}async send(e,n){return await this._start(),await super.send(e,n)}async _send(e){const n=this._getConnection();n.body=JSON.stringify(e),n.setHeader("content-type","application/json");const s=await n.send();s.assertOk();let i=s.bodyJson;return Array.isArray(i)||(i=[i]),i}}Wn=new WeakMap;function si(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&ct(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(const t in r){const e=si(r[t]);if(e)return e}return null}if(typeof r=="string")try{return si(JSON.parse(r))}catch{}return null}function ii(r,t){if(r!=null){if(typeof r.message=="string"&&t.push(r.message),typeof r=="object")for(const e in r)ii(r[e],t);if(typeof r=="string")try{return ii(JSON.parse(r),t)}catch{}}}function Nu(r){const t=[];return ii(r,t),t}export{ga as A,Iu as J,Io as S,rs as T,fo as V,Xa as a,Pl as b,Ou as c,ss as d,or as e,wr as f,Gc as g,Ru as h,Ma as i,Lu as j,Du as p,Tu as r,ds as s};
1
+ var wa=Object.defineProperty;var Ci=r=>{throw TypeError(r)};var ma=(r,t,e)=>t in r?wa(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var W=(r,t,e)=>ma(r,typeof t!="symbol"?t+"":t,e),Bs=(r,t,e)=>t.has(r)||Ci("Cannot "+e);var l=(r,t,e)=>(Bs(r,t,"read from private field"),e?e.call(r):t.get(r)),A=(r,t,e)=>t.has(r)?Ci("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),h=(r,t,e,n)=>(Bs(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e),I=(r,t,e)=>(Bs(r,t,"access private method"),e);var Tr=(r,t,e,n)=>({set _(s){h(r,t,s,e)},get _(){return l(r,t,n)}});import{t as j,p as b,q as S,ax as rt,a5 as D,o as Ut,ay as po,az as Ao,aA as qr,aB as Wr,aC as ya,aD as Hr,a8 as ba,a9 as xs,aE as Ea,a6 as wo,aF as Qt,aG as F,f as Pi,aH as Ba,aI as xa,aJ as gn,ac as ut,n as Ca,z as ct,aK as Xn,ah as cr,af as q,aj as at,ab as kt,ak as Pa,aL as Ft,ae as Kt,aM as Ia,ad as Bt}from"../main.js";import{t as Na,c as _e,j as Ls,g as J,a as R,h as yt,b as _n,k as ir,i as mo,m as ka,l as va,n as hn,C as dr,o as Sa,L as Ra,T as Oa,p as Da,e as Us,F as Ii,E as Ta,A as Fa}from"./contract-BhySpM-Z.js";const Xr="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let Fr=null;function La(r){if(Fr==null){Fr={};for(let e=0;e<Xr.length;e++)Fr[Xr[e]]=BigInt(e)}const t=Fr[r];return b(t!=null,"invalid base58 value","letter",r),t}const Ua=BigInt(0),Ms=BigInt(58);function Ma(r){const t=j(r);let e=Na(t),n="";for(;e;)n=Xr[Number(e%Ms)]+n,e/=Ms;for(let s=0;s<t.length&&!t[s];s++)n=Xr[0]+n;return n}function Ru(r){let t=Ua;for(let e=0;e<r.length;e++)t*=Ms,t+=La(r[e]);return t}function Qa(r){r=atob(r);const t=new Uint8Array(r.length);for(let e=0;e<r.length;e++)t[e]=r.charCodeAt(e);return j(t)}function Ga(r){const t=j(r);let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function yo(r){async function t(e,n){S(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=e.url.split(":")[0].toLowerCase();S(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),S(s==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=rt("request timeout","TIMEOUT"),o.abort()},e.timeout);n&&n.addListener(()=>{i=rt("request cancelled","CANCELLED"),o.abort()});const c={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:o.signal};let u;try{u=await fetch(e.url,c)}catch(w){throw clearTimeout(a),i||w}clearTimeout(a);const d={};u.headers.forEach((w,m)=>{d[m.toLowerCase()]=w});const f=await u.arrayBuffer(),p=f==null?null:new Uint8Array(f);return{statusCode:u.status,statusMessage:u.statusText,headers:d,body:p}}return t}const Ha=12,Ja=250;let Ni=yo();const Va=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),za=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let Cs=!1;async function bo(r,t){try{const e=r.match(Va);if(!e)throw new Error("invalid data");return new ke(200,"OK",{"content-type":e[1]||"text/plain"},e[2]?Qa(e[3]):ja(e[3]))}catch{return new ke(599,"BAD REQUEST (invalid data: URI)",{},null,new ie(r))}}function Eo(r){async function t(e,n){try{const s=e.match(za);if(!s)throw new Error("invalid link");return new ie(`${r}${s[2]}`)}catch{return new ke(599,"BAD REQUEST (invalid IPFS URI)",{},null,new ie(e))}}return t}const Lr={data:bo,ipfs:Eo("https://gateway.ipfs.io/ipfs/")},Bo=new WeakMap;var Le,ge;class Ka{constructor(t){A(this,Le);A(this,ge);h(this,Le,[]),h(this,ge,!1),Bo.set(t,()=>{if(!l(this,ge)){h(this,ge,!0);for(const e of l(this,Le))setTimeout(()=>{e()},0);h(this,Le,[])}})}addListener(t){S(!l(this,ge),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),l(this,Le).push(t)}get cancelled(){return l(this,ge)}checkSignal(){S(!this.cancelled,"cancelled","CANCELLED",{})}}Le=new WeakMap,ge=new WeakMap;function Ur(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}var An,wn,Ot,Yt,mn,yn,$,At,qt,Ue,Me,Qe,Gt,Dt,pe,Ge,lr;const os=class os{constructor(t){A(this,Ge);A(this,An);A(this,wn);A(this,Ot);A(this,Yt);A(this,mn);A(this,yn);A(this,$);A(this,At);A(this,qt);A(this,Ue);A(this,Me);A(this,Qe);A(this,Gt);A(this,Dt);A(this,pe);h(this,yn,String(t)),h(this,An,!1),h(this,wn,!0),h(this,Ot,{}),h(this,Yt,""),h(this,mn,3e5),h(this,Dt,{slotInterval:Ja,maxAttempts:Ha}),h(this,pe,null)}get url(){return l(this,yn)}set url(t){h(this,yn,String(t))}get body(){return l(this,$)==null?null:new Uint8Array(l(this,$))}set body(t){if(t==null)h(this,$,void 0),h(this,At,void 0);else if(typeof t=="string")h(this,$,_e(t)),h(this,At,"text/plain");else if(t instanceof Uint8Array)h(this,$,t),h(this,At,"application/octet-stream");else if(typeof t=="object")h(this,$,_e(JSON.stringify(t))),h(this,At,"application/json");else throw new Error("invalid body")}hasBody(){return l(this,$)!=null}get method(){return l(this,Yt)?l(this,Yt):this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),h(this,Yt,String(t).toUpperCase())}get headers(){const t=Object.assign({},l(this,Ot));return l(this,qt)&&(t.authorization=`Basic ${Ga(_e(l(this,qt)))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&l(this,At)&&(t["content-type"]=l(this,At)),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){l(this,Ot)[String(t).toLowerCase()]=String(e)}clearHeaders(){h(this,Ot,{})}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let n=0;return{next:()=>{if(n<e.length){const s=e[n++];return{value:[s,t[s]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return l(this,qt)||null}setCredentials(t,e){b(!t.match(/:/),"invalid basic authentication username","username","[REDACTED]"),h(this,qt,`${t}:${e}`)}get allowGzip(){return l(this,wn)}set allowGzip(t){h(this,wn,!!t)}get allowInsecureAuthentication(){return!!l(this,An)}set allowInsecureAuthentication(t){h(this,An,!!t)}get timeout(){return l(this,mn)}set timeout(t){b(t>=0,"timeout must be non-zero","timeout",t),h(this,mn,t)}get preflightFunc(){return l(this,Ue)||null}set preflightFunc(t){h(this,Ue,t)}get processFunc(){return l(this,Me)||null}set processFunc(t){h(this,Me,t)}get retryFunc(){return l(this,Qe)||null}set retryFunc(t){h(this,Qe,t)}get getUrlFunc(){return l(this,pe)||Ni}set getUrlFunc(t){h(this,pe,t)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${l(this,$)?D(l(this,$)):"null"}>`}setThrottleParams(t){t.slotInterval!=null&&(l(this,Dt).slotInterval=t.slotInterval),t.maxAttempts!=null&&(l(this,Dt).maxAttempts=t.maxAttempts)}send(){return S(l(this,Gt)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),h(this,Gt,new Ka(this)),I(this,Ge,lr).call(this,0,ki()+this.timeout,0,this,new ke(0,"",{},null,this))}cancel(){S(l(this,Gt)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=Bo.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const e=this.url.split(":")[0].toLowerCase(),n=t.split(":")[0].toLowerCase();S(this.method==="GET"&&(e!=="https"||n!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const s=new os(t);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,h(s,Ot,Object.assign({},l(this,Ot))),l(this,$)&&h(s,$,new Uint8Array(l(this,$))),h(s,At,l(this,At)),s}clone(){const t=new os(this.url);return h(t,Yt,l(this,Yt)),l(this,$)&&h(t,$,l(this,$)),h(t,At,l(this,At)),h(t,Ot,Object.assign({},l(this,Ot))),h(t,qt,l(this,qt)),this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),h(t,Ue,l(this,Ue)),h(t,Me,l(this,Me)),h(t,Qe,l(this,Qe)),h(t,Dt,Object.assign({},l(this,Dt))),h(t,pe,l(this,pe)),t}static lockConfig(){Cs=!0}static getGateway(t){return Lr[t.toLowerCase()]||null}static registerGateway(t,e){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(Cs)throw new Error("gateways locked");Lr[t]=e}static registerGetUrl(t){if(Cs)throw new Error("gateways locked");Ni=t}static createGetUrlFunc(t){return yo()}static createDataGateway(){return bo}static createIpfsGatewayFunc(t){return Eo(t)}};An=new WeakMap,wn=new WeakMap,Ot=new WeakMap,Yt=new WeakMap,mn=new WeakMap,yn=new WeakMap,$=new WeakMap,At=new WeakMap,qt=new WeakMap,Ue=new WeakMap,Me=new WeakMap,Qe=new WeakMap,Gt=new WeakMap,Dt=new WeakMap,pe=new WeakMap,Ge=new WeakSet,lr=async function(t,e,n,s,i){var d,f,p;if(t>=l(this,Dt).maxAttempts)return i.makeServerError("exceeded maximum retry limit");S(ki()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await Za(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in Lr){const w=await Lr[a](o.url,Ur(l(s,Gt)));if(w instanceof ke){let m=w;if(this.processFunc){Ur(l(s,Gt));try{m=await this.processFunc(o,m)}catch(g){(g.throttle==null||typeof g.stall!="number")&&m.makeServerError("error in post-processing function",g).assertOk()}}return m}o=w}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,Ur(l(s,Gt)));let u=new ke(c.statusCode,c.statusMessage,c.headers,c.body,s);if(u.statusCode===301||u.statusCode===302){try{const w=u.headers.location||"";return I(d=o.redirect(w),Ge,lr).call(d,t+1,e,0,s,u)}catch{}return u}else if(u.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,u,t))){const w=u.headers["retry-after"];let m=l(this,Dt).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof w=="string"&&w.match(/^[1-9][0-9]*$/)&&(m=parseInt(w)),I(f=o.clone(),Ge,lr).call(f,t+1,e,m,s,u)}if(this.processFunc){Ur(l(s,Gt));try{u=await this.processFunc(o,u)}catch(w){(w.throttle==null||typeof w.stall!="number")&&u.makeServerError("error in post-processing function",w).assertOk();let m=l(this,Dt).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return w.stall>=0&&(m=w.stall),I(p=o.clone(),Ge,lr).call(p,t+1,e,m,s,u)}}return u};let ie=os;var Br,xr,Cr,wt,bn,He;const yi=class yi{constructor(t,e,n,s,i){A(this,Br);A(this,xr);A(this,Cr);A(this,wt);A(this,bn);A(this,He);h(this,Br,t),h(this,xr,e),h(this,Cr,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),h(this,wt,s==null?null:new Uint8Array(s)),h(this,bn,i||null),h(this,He,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${l(this,wt)?D(l(this,wt)):"null"}>`}get statusCode(){return l(this,Br)}get statusMessage(){return l(this,xr)}get headers(){return Object.assign({},l(this,Cr))}get body(){return l(this,wt)==null?null:new Uint8Array(l(this,wt))}get bodyText(){try{return l(this,wt)==null?"":Ls(l(this,wt))}catch{S(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{S(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let n=0;return{next:()=>{if(n<e.length){const s=e[n++];return{value:[s,t[s]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(t,e){let n;t?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:(t=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${t})`);const s=new yi(599,n,this.headers,this.body,l(this,bn)||void 0);return h(s,He,{message:t,error:e}),s}throwThrottleError(t,e){e==null?e=-1:b(Number.isInteger(e)&&e>=0,"invalid stall timeout","stall",e);const n=new Error(t||"throttling requests");throw Ut(n,{stall:e,throttle:!0}),n}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return l(this,wt)!=null}get request(){return l(this,bn)}ok(){return l(this,He).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:e}=l(this,He);t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{l(this,wt)&&(s=Ls(l(this,wt)))}catch{}S(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:e,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Br=new WeakMap,xr=new WeakMap,Cr=new WeakMap,wt=new WeakMap,bn=new WeakMap,He=new WeakMap;let ke=yi;function ki(){return new Date().getTime()}function ja(r){return _e(r.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))}function Za(r){return new Promise(t=>setTimeout(t,r))}function Ya(r){let t=r.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function vi(r,t,e){let n=0;for(let s=0;s<e;s++)n=n*256+r[t+s];return n}function Si(r,t,e,n){const s=[];for(;e<t+1+n;){const i=xo(r,e);s.push(i.result),e+=i.consumed,S(e<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:r,length:n,offset:t})}return{consumed:1+n,result:s}}function xo(r,t){S(r.length!==0,"data too short","BUFFER_OVERRUN",{buffer:r,length:0,offset:1});const e=n=>{S(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[t]>=248){const n=r[t]-247;e(t+1+n);const s=vi(r,t+1,n);return e(t+1+n+s),Si(r,t,t+1+n,n+s)}else if(r[t]>=192){const n=r[t]-192;return e(t+1+n),Si(r,t,t+1,n)}else if(r[t]>=184){const n=r[t]-183;e(t+1+n);const s=vi(r,t+1,n);e(t+1+n+s);const i=D(r.slice(t+1+n,t+1+n+s));return{consumed:1+n+s,result:i}}else if(r[t]>=128){const n=r[t]-128;e(t+1+n);const s=D(r.slice(t+1,t+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:Ya(r[t])}}function hs(r){const t=j(r,"data"),e=xo(t,0);return b(e.consumed===t.length,"unexpected junk after rlp payload","data",r),e.result}function Ri(r){const t=[];for(;r;)t.unshift(r&255),r>>=8;return t}function Co(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(i){n=n.concat(Co(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=Ri(n.length);return s.unshift(247+s.length),s.concat(n)}const t=Array.prototype.slice.call(j(r,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const e=Ri(t.length);return e.unshift(183+e.length),e.concat(t)}const Oi="0123456789abcdef";function tn(r){let t="0x";for(const e of Co(r))t+=Oi[e>>4],t+=Oi[e&15];return t}class Po extends po{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,Ao(t);const n=qr(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?t.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=t.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),i.fill(0)}update(t){return Wr(this),this.iHash.update(t),this}digestInto(t){Wr(this),ya(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:n,finished:s,destroyed:i,blockLen:o,outputLen:a}=this;return t=t,t.finished=s,t.destroyed=i,t.blockLen=o,t.outputLen=a,t.oHash=e._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const fs=(r,t,e)=>new Po(r,t).update(e).digest();fs.create=(r,t)=>new Po(r,t);function qa(r,t,e,n){Ao(r);const s=ba({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(xs(i),xs(o),xs(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=qr(t),u=qr(e),d=new Uint8Array(o),f=fs.create(r,c),p=f._cloneInto().update(u);return{c:i,dkLen:o,asyncTick:a,DK:d,PRF:f,PRFSalt:p}}function Wa(r,t,e,n,s){return r.destroy(),t.destroy(),n&&n.destroy(),s.fill(0),e}function Xa(r,t,e,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=qa(r,t,e,n);let u;const d=new Uint8Array(4),f=Hr(d),p=new Uint8Array(a.outputLen);for(let w=1,m=0;m<i;w++,m+=a.outputLen){const g=o.subarray(m,m+a.outputLen);f.setInt32(0,w,!1),(u=c._cloneInto(u)).update(d).digestInto(p),g.set(p.subarray(0,g.length));for(let y=1;y<s;y++){a._cloneInto(u).update(p).digestInto(p);for(let E=0;E<g.length;E++)g[E]^=p[E]}}return Wa(a,c,o,u,p)}function _a(r,t,e,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(t,e,n);const s=BigInt(32),i=BigInt(4294967295),o=Number(e>>s&i),a=Number(e&i),c=n?4:0,u=n?0:4;r.setUint32(t+c,o,n),r.setUint32(t+u,a,n)}class Io extends po{constructor(t,e,n,s){super(),this.blockLen=t,this.outputLen=e,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Hr(this.buffer)}update(t){Wr(this);const{view:e,buffer:n,blockLen:s}=this;t=qr(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=Hr(t);for(;s<=i-o;o+=s)this.process(c,o);continue}n.set(t.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Wr(this),Ea(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:s,isLE:i}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>s-o&&(this.process(n,0),o=0);for(let f=o;f<s;f++)e[f]=0;_a(n,s-8,BigInt(this.length*8),i),this.process(n,0);const a=Hr(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,d=this.get();if(u>d.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)a.setUint32(4*f,d[f],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:n,length:s,finished:i,destroyed:o,pos:a}=this;return t.length=s,t.pos=a,t.finished=i,t.destroyed=o,s%e&&t.buffer.set(n),t}}const $a=(r,t,e)=>r&t^~r&e,tc=(r,t,e)=>r&t^r&e^t&e,ec=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),le=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ue=new Uint32Array(64);class nc extends Io{constructor(){super(64,32,8,!1),this.A=le[0]|0,this.B=le[1]|0,this.C=le[2]|0,this.D=le[3]|0,this.E=le[4]|0,this.F=le[5]|0,this.G=le[6]|0,this.H=le[7]|0}get(){const{A:t,B:e,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[t,e,n,s,i,o,a,c]}set(t,e,n,s,i,o,a,c){this.A=t|0,this.B=e|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(t,e){for(let f=0;f<16;f++,e+=4)ue[f]=t.getUint32(e,!1);for(let f=16;f<64;f++){const p=ue[f-15],w=ue[f-2],m=Qt(p,7)^Qt(p,18)^p>>>3,g=Qt(w,17)^Qt(w,19)^w>>>10;ue[f]=g+ue[f-7]+m+ue[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:u,H:d}=this;for(let f=0;f<64;f++){const p=Qt(a,6)^Qt(a,11)^Qt(a,25),w=d+p+$a(a,c,u)+ec[f]+ue[f]|0,g=(Qt(n,2)^Qt(n,13)^Qt(n,22))+tc(n,s,i)|0;d=u,u=c,c=a,a=o+w|0,o=i,i=s,s=n,n=w+g|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,d=d+this.H|0,this.set(n,s,i,o,a,c,u,d)}roundClean(){ue.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ds=wo(()=>new nc),[rc,sc]=F.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),he=new Uint32Array(80),fe=new Uint32Array(80);class ic extends Io{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:u,El:d,Fh:f,Fl:p,Gh:w,Gl:m,Hh:g,Hl:y}=this;return[t,e,n,s,i,o,a,c,u,d,f,p,w,m,g,y]}set(t,e,n,s,i,o,a,c,u,d,f,p,w,m,g,y){this.Ah=t|0,this.Al=e|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=d|0,this.Fh=f|0,this.Fl=p|0,this.Gh=w|0,this.Gl=m|0,this.Hh=g|0,this.Hl=y|0}process(t,e){for(let x=0;x<16;x++,e+=4)he[x]=t.getUint32(e),fe[x]=t.getUint32(e+=4);for(let x=16;x<80;x++){const T=he[x-15]|0,v=fe[x-15]|0,C=F.rotrSH(T,v,1)^F.rotrSH(T,v,8)^F.shrSH(T,v,7),O=F.rotrSL(T,v,1)^F.rotrSL(T,v,8)^F.shrSL(T,v,7),k=he[x-2]|0,H=fe[x-2]|0,Q=F.rotrSH(k,H,19)^F.rotrBH(k,H,61)^F.shrSH(k,H,6),G=F.rotrSL(k,H,19)^F.rotrBL(k,H,61)^F.shrSL(k,H,6),X=F.add4L(O,G,fe[x-7],fe[x-16]),nt=F.add4H(X,C,Q,he[x-7],he[x-16]);he[x]=nt|0,fe[x]=X|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:u,Dl:d,Eh:f,El:p,Fh:w,Fl:m,Gh:g,Gl:y,Hh:E,Hl:N}=this;for(let x=0;x<80;x++){const T=F.rotrSH(f,p,14)^F.rotrSH(f,p,18)^F.rotrBH(f,p,41),v=F.rotrSL(f,p,14)^F.rotrSL(f,p,18)^F.rotrBL(f,p,41),C=f&w^~f&g,O=p&m^~p&y,k=F.add5L(N,v,O,sc[x],fe[x]),H=F.add5H(k,E,T,C,rc[x],he[x]),Q=k|0,G=F.rotrSH(n,s,28)^F.rotrBH(n,s,34)^F.rotrBH(n,s,39),X=F.rotrSL(n,s,28)^F.rotrBL(n,s,34)^F.rotrBL(n,s,39),nt=n&i^n&a^i&a,Mt=s&o^s&c^o&c;E=g|0,N=y|0,g=w|0,y=m|0,w=f|0,m=p|0,{h:f,l:p}=F.add(u|0,d|0,H|0,Q|0),u=a|0,d=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const B=F.add3L(Q,X,Mt);n=F.add3H(B,H,G,nt),s=B|0}({h:n,l:s}=F.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=F.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=F.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:d}=F.add(this.Dh|0,this.Dl|0,u|0,d|0),{h:f,l:p}=F.add(this.Eh|0,this.El|0,f|0,p|0),{h:w,l:m}=F.add(this.Fh|0,this.Fl|0,w|0,m|0),{h:g,l:y}=F.add(this.Gh|0,this.Gl|0,g|0,y|0),{h:E,l:N}=F.add(this.Hh|0,this.Hl|0,E|0,N|0),this.set(n,s,i,o,a,c,u,d,f,p,w,m,g,y,E,N)}roundClean(){he.fill(0),fe.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const oi=wo(()=>new ic);function oc(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Pi.global<"u")return Pi.global;throw new Error("unable to locate global object")}const Di=oc(),Ti=Di.crypto||Di.msCrypto;function ac(r){switch(r){case"sha256":return ds.create();case"sha512":return oi.create()}b(!1,"invalid hashing algorithm name","algorithm",r)}function Ou(r,t){const e={sha256:ds,sha512:oi}[r];return b(e!=null,"invalid hmac algorithm","algorithm",r),fs.create(e,t)}function Du(r,t,e,n,s){const i={sha256:ds,sha512:oi}[s];return b(i!=null,"invalid pbkdf2 algorithm","algorithm",s),Xa(i,r,t,{c:e,dkLen:n})}function Tu(r){S(Ti!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),b(Number.isInteger(r)&&r>0&&r<=1024,"invalid length","length",r);const t=new Uint8Array(r);return Ti.getRandomValues(t),t}const No=function(r){return ac("sha256").update(r).digest()};let ko=No,vo=!1;function or(r){const t=j(r,"data");return D(ko(t))}or._=No;or.lock=function(){vo=!0};or.register=function(r){if(vo)throw new Error("sha256 is locked");ko=r};Object.freeze(or);Object.freeze(or);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const So=BigInt(0),gs=BigInt(1),cc=BigInt(2),ps=r=>r instanceof Uint8Array,lc=Array.from({length:256},(r,t)=>t.toString(16).padStart(2,"0"));function $n(r){if(!ps(r))throw new Error("Uint8Array expected");let t="";for(let e=0;e<r.length;e++)t+=lc[r[e]];return t}function Ro(r){const t=r.toString(16);return t.length&1?`0${t}`:t}function ai(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);return BigInt(r===""?"0":`0x${r}`)}function tr(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);const t=r.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const e=new Uint8Array(t/2);for(let n=0;n<e.length;n++){const s=n*2,i=r.slice(s,s+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");e[n]=o}return e}function $e(r){return ai($n(r))}function ci(r){if(!ps(r))throw new Error("Uint8Array expected");return ai($n(Uint8Array.from(r).reverse()))}function er(r,t){return tr(r.toString(16).padStart(t*2,"0"))}function li(r,t){return er(r,t).reverse()}function uc(r){return tr(Ro(r))}function Rt(r,t,e){let n;if(typeof t=="string")try{n=tr(t)}catch(i){throw new Error(`${r} must be valid hex string, got "${t}". Cause: ${i}`)}else if(ps(t))n=Uint8Array.from(t);else throw new Error(`${r} must be hex string or Uint8Array`);const s=n.length;if(typeof e=="number"&&s!==e)throw new Error(`${r} expected ${e} bytes, got ${s}`);return n}function pr(...r){const t=new Uint8Array(r.reduce((n,s)=>n+s.length,0));let e=0;return r.forEach(n=>{if(!ps(n))throw new Error("Uint8Array expected");t.set(n,e),e+=n.length}),t}function hc(r,t){if(r.length!==t.length)return!1;for(let e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}function fc(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function dc(r){let t;for(t=0;r>So;r>>=gs,t+=1);return t}function gc(r,t){return r>>BigInt(t)&gs}const pc=(r,t,e)=>r|(e?gs:So)<<BigInt(t),ui=r=>(cc<<BigInt(r-1))-gs,Ps=r=>new Uint8Array(r),Fi=r=>Uint8Array.from(r);function Oo(r,t,e){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let n=Ps(r),s=Ps(r),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>e(s,n,...f),c=(f=Ps())=>{s=a(Fi([0]),f),n=a(),f.length!==0&&(s=a(Fi([1]),f),n=a())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const p=[];for(;f<t;){n=a();const w=n.slice();p.push(w),f+=n.length}return pr(...p)};return(f,p)=>{o(),c(f);let w;for(;!(w=p(u()));)c();return o(),w}}const Ac={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,t)=>t.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function Sr(r,t,e={}){const n=(s,i,o)=>{const a=Ac[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=r[s];if(!(o&&c===void 0)&&!a(c,r))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(t))n(s,i,!1);for(const[s,i]of Object.entries(e))n(s,i,!0);return r}const wc=Object.freeze(Object.defineProperty({__proto__:null,bitGet:gc,bitLen:dc,bitMask:ui,bitSet:pc,bytesToHex:$n,bytesToNumberBE:$e,bytesToNumberLE:ci,concatBytes:pr,createHmacDrbg:Oo,ensureBytes:Rt,equalBytes:hc,hexToBytes:tr,hexToNumber:ai,numberToBytesBE:er,numberToBytesLE:li,numberToHexUnpadded:Ro,numberToVarBytesBE:uc,utf8ToBytes:fc,validateObject:Sr},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const et=BigInt(0),Z=BigInt(1),Oe=BigInt(2),mc=BigInt(3),Qs=BigInt(4),Li=BigInt(5),Ui=BigInt(8);BigInt(9);BigInt(16);function ft(r,t){const e=r%t;return e>=et?e:t+e}function yc(r,t,e){if(e<=et||t<et)throw new Error("Expected power/modulo > 0");if(e===Z)return et;let n=Z;for(;t>et;)t&Z&&(n=n*r%e),r=r*r%e,t>>=Z;return n}function bt(r,t,e){let n=r;for(;t-- >et;)n*=n,n%=e;return n}function Gs(r,t){if(r===et||t<=et)throw new Error(`invert: expected positive integers, got n=${r} mod=${t}`);let e=ft(r,t),n=t,s=et,i=Z;for(;e!==et;){const a=n/e,c=n%e,u=s-i*a;n=e,e=c,s=i,i=u}if(n!==Z)throw new Error("invert: does not exist");return ft(s,t)}function bc(r){const t=(r-Z)/Oe;let e,n,s;for(e=r-Z,n=0;e%Oe===et;e/=Oe,n++);for(s=Oe;s<r&&yc(s,t,r)!==r-Z;s++);if(n===1){const o=(r+Z)/Qs;return function(c,u){const d=c.pow(u,o);if(!c.eql(c.sqr(d),u))throw new Error("Cannot find square root");return d}}const i=(e+Z)/Oe;return function(a,c){if(a.pow(c,t)===a.neg(a.ONE))throw new Error("Cannot find square root");let u=n,d=a.pow(a.mul(a.ONE,s),e),f=a.pow(c,i),p=a.pow(c,e);for(;!a.eql(p,a.ONE);){if(a.eql(p,a.ZERO))return a.ZERO;let w=1;for(let g=a.sqr(p);w<u&&!a.eql(g,a.ONE);w++)g=a.sqr(g);const m=a.pow(d,Z<<BigInt(u-w-1));d=a.sqr(m),f=a.mul(f,m),p=a.mul(p,d),u=w}return f}}function Ec(r){if(r%Qs===mc){const t=(r+Z)/Qs;return function(n,s){const i=n.pow(s,t);if(!n.eql(n.sqr(i),s))throw new Error("Cannot find square root");return i}}if(r%Ui===Li){const t=(r-Li)/Ui;return function(n,s){const i=n.mul(s,Oe),o=n.pow(i,t),a=n.mul(s,o),c=n.mul(n.mul(a,Oe),o),u=n.mul(a,n.sub(c,n.ONE));if(!n.eql(n.sqr(u),s))throw new Error("Cannot find square root");return u}}return bc(r)}const Bc=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function xc(r){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=Bc.reduce((n,s)=>(n[s]="function",n),t);return Sr(r,e)}function Cc(r,t,e){if(e<et)throw new Error("Expected power > 0");if(e===et)return r.ONE;if(e===Z)return t;let n=r.ONE,s=t;for(;e>et;)e&Z&&(n=r.mul(n,s)),s=r.sqr(s),e>>=Z;return n}function Pc(r,t){const e=new Array(t.length),n=t.reduce((i,o,a)=>r.is0(o)?i:(e[a]=i,r.mul(i,o)),r.ONE),s=r.inv(n);return t.reduceRight((i,o,a)=>r.is0(o)?i:(e[a]=r.mul(i,e[a]),r.mul(i,o)),s),e}function Do(r,t){const e=t!==void 0?t:r.toString(2).length,n=Math.ceil(e/8);return{nBitLength:e,nByteLength:n}}function Ic(r,t,e=!1,n={}){if(r<=et)throw new Error(`Expected Field ORDER > 0, got ${r}`);const{nBitLength:s,nByteLength:i}=Do(r,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=Ec(r),a=Object.freeze({ORDER:r,BITS:s,BYTES:i,MASK:ui(s),ZERO:et,ONE:Z,create:c=>ft(c,r),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return et<=c&&c<r},is0:c=>c===et,isOdd:c=>(c&Z)===Z,neg:c=>ft(-c,r),eql:(c,u)=>c===u,sqr:c=>ft(c*c,r),add:(c,u)=>ft(c+u,r),sub:(c,u)=>ft(c-u,r),mul:(c,u)=>ft(c*u,r),pow:(c,u)=>Cc(a,c,u),div:(c,u)=>ft(c*Gs(u,r),r),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>Gs(c,r),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Pc(a,c),cmov:(c,u,d)=>d?u:c,toBytes:c=>e?li(c,i):er(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return e?ci(c):$e(c)}});return Object.freeze(a)}function To(r){if(typeof r!="bigint")throw new Error("field order must be bigint");const t=r.toString(2).length;return Math.ceil(t/8)}function Fo(r){const t=To(r);return t+Math.ceil(t/2)}function Nc(r,t,e=!1){const n=r.length,s=To(t),i=Fo(t);if(n<16||n<i||n>1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=e?$e(r):ci(r),a=ft(o,t-Z)+Z;return e?li(a,s):er(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const kc=BigInt(0),Is=BigInt(1);function vc(r,t){const e=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(t/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:e,unsafeLadder(s,i){let o=r.ZERO,a=s;for(;i>kc;)i&Is&&(o=o.add(a)),a=a.double(),i>>=Is;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let u=s,d=u;for(let f=0;f<o;f++){d=u,c.push(d);for(let p=1;p<a;p++)d=d.add(u),c.push(d);u=d.double()}return c},wNAF(s,i,o){const{windows:a,windowSize:c}=n(s);let u=r.ZERO,d=r.BASE;const f=BigInt(2**s-1),p=2**s,w=BigInt(s);for(let m=0;m<a;m++){const g=m*c;let y=Number(o&f);o>>=w,y>c&&(y-=p,o+=Is);const E=g,N=g+Math.abs(y)-1,x=m%2!==0,T=y<0;y===0?d=d.add(e(x,i[E])):u=u.add(e(T,i[N]))}return{p:u,f:d}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let u=i.get(s);return u||(u=this.precomputeWindow(s,c),c!==1&&i.set(s,a(u))),this.wNAF(c,u,o)}}}function Lo(r){return xc(r.Fp),Sr(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Do(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Sc(r){const t=Lo(r);Sr(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:n,a:s}=t;if(e){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:Rc,hexToBytes:Oc}=wc,Te={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(r){const{Err:t}=Te;if(r.length<2||r[0]!==2)throw new t("Invalid signature integer tag");const e=r[1],n=r.subarray(2,e+2);if(!e||n.length!==e)throw new t("Invalid signature integer: wrong length");if(n[0]&128)throw new t("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Rc(n),l:r.subarray(e+2)}},toSig(r){const{Err:t}=Te,e=typeof r=="string"?Oc(r):r;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let n=e.length;if(n<2||e[0]!=48)throw new t("Invalid signature tag");if(e[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:s,l:i}=Te._parseInt(e.subarray(2)),{d:o,l:a}=Te._parseInt(i);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(r){const t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,e=u=>{const d=u.toString(16);return d.length&1?`0${d}`:d},n=t(e(r.s)),s=t(e(r.r)),i=n.length/2,o=s.length/2,a=e(i),c=e(o);return`30${e(o+i+4)}02${c}${s}02${a}${n}`}},se=BigInt(0),Nt=BigInt(1);BigInt(2);const Mi=BigInt(3);BigInt(4);function Dc(r){const t=Sc(r),{Fp:e}=t,n=t.toBytes||((m,g,y)=>{const E=g.toAffine();return pr(Uint8Array.from([4]),e.toBytes(E.x),e.toBytes(E.y))}),s=t.fromBytes||(m=>{const g=m.subarray(1),y=e.fromBytes(g.subarray(0,e.BYTES)),E=e.fromBytes(g.subarray(e.BYTES,2*e.BYTES));return{x:y,y:E}});function i(m){const{a:g,b:y}=t,E=e.sqr(m),N=e.mul(E,m);return e.add(e.add(N,e.mul(m,g)),y)}if(!e.eql(e.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function o(m){return typeof m=="bigint"&&se<m&&m<t.n}function a(m){if(!o(m))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(m){const{allowedPrivateKeyLengths:g,nByteLength:y,wrapPrivateKey:E,n:N}=t;if(g&&typeof m!="bigint"){if(m instanceof Uint8Array&&(m=$n(m)),typeof m!="string"||!g.includes(m.length))throw new Error("Invalid key");m=m.padStart(y*2,"0")}let x;try{x=typeof m=="bigint"?m:$e(Rt("private key",m,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof m}`)}return E&&(x=ft(x,N)),a(x),x}const u=new Map;function d(m){if(!(m instanceof f))throw new Error("ProjectivePoint expected")}class f{constructor(g,y,E){if(this.px=g,this.py=y,this.pz=E,g==null||!e.isValid(g))throw new Error("x required");if(y==null||!e.isValid(y))throw new Error("y required");if(E==null||!e.isValid(E))throw new Error("z required")}static fromAffine(g){const{x:y,y:E}=g||{};if(!g||!e.isValid(y)||!e.isValid(E))throw new Error("invalid affine point");if(g instanceof f)throw new Error("projective point not allowed");const N=x=>e.eql(x,e.ZERO);return N(y)&&N(E)?f.ZERO:new f(y,E,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(g){const y=e.invertBatch(g.map(E=>E.pz));return g.map((E,N)=>E.toAffine(y[N])).map(f.fromAffine)}static fromHex(g){const y=f.fromAffine(s(Rt("pointHex",g)));return y.assertValidity(),y}static fromPrivateKey(g){return f.BASE.multiply(c(g))}_setWindowSize(g){this._WINDOW_SIZE=g,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:g,y}=this.toAffine();if(!e.isValid(g)||!e.isValid(y))throw new Error("bad point: x or y not FE");const E=e.sqr(y),N=i(g);if(!e.eql(E,N))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:g}=this.toAffine();if(e.isOdd)return!e.isOdd(g);throw new Error("Field doesn't support isOdd")}equals(g){d(g);const{px:y,py:E,pz:N}=this,{px:x,py:T,pz:v}=g,C=e.eql(e.mul(y,v),e.mul(x,N)),O=e.eql(e.mul(E,v),e.mul(T,N));return C&&O}negate(){return new f(this.px,e.neg(this.py),this.pz)}double(){const{a:g,b:y}=t,E=e.mul(y,Mi),{px:N,py:x,pz:T}=this;let v=e.ZERO,C=e.ZERO,O=e.ZERO,k=e.mul(N,N),H=e.mul(x,x),Q=e.mul(T,T),G=e.mul(N,x);return G=e.add(G,G),O=e.mul(N,T),O=e.add(O,O),v=e.mul(g,O),C=e.mul(E,Q),C=e.add(v,C),v=e.sub(H,C),C=e.add(H,C),C=e.mul(v,C),v=e.mul(G,v),O=e.mul(E,O),Q=e.mul(g,Q),G=e.sub(k,Q),G=e.mul(g,G),G=e.add(G,O),O=e.add(k,k),k=e.add(O,k),k=e.add(k,Q),k=e.mul(k,G),C=e.add(C,k),Q=e.mul(x,T),Q=e.add(Q,Q),k=e.mul(Q,G),v=e.sub(v,k),O=e.mul(Q,H),O=e.add(O,O),O=e.add(O,O),new f(v,C,O)}add(g){d(g);const{px:y,py:E,pz:N}=this,{px:x,py:T,pz:v}=g;let C=e.ZERO,O=e.ZERO,k=e.ZERO;const H=t.a,Q=e.mul(t.b,Mi);let G=e.mul(y,x),X=e.mul(E,T),nt=e.mul(N,v),Mt=e.add(y,E),B=e.add(x,T);Mt=e.mul(Mt,B),B=e.add(G,X),Mt=e.sub(Mt,B),B=e.add(y,N);let P=e.add(x,v);return B=e.mul(B,P),P=e.add(G,nt),B=e.sub(B,P),P=e.add(E,N),C=e.add(T,v),P=e.mul(P,C),C=e.add(X,nt),P=e.sub(P,C),k=e.mul(H,B),C=e.mul(Q,nt),k=e.add(C,k),C=e.sub(X,k),k=e.add(X,k),O=e.mul(C,k),X=e.add(G,G),X=e.add(X,G),nt=e.mul(H,nt),B=e.mul(Q,B),X=e.add(X,nt),nt=e.sub(G,nt),nt=e.mul(H,nt),B=e.add(B,nt),G=e.mul(X,B),O=e.add(O,G),G=e.mul(P,B),C=e.mul(Mt,C),C=e.sub(C,G),G=e.mul(Mt,X),k=e.mul(P,k),k=e.add(k,G),new f(C,O,k)}subtract(g){return this.add(g.negate())}is0(){return this.equals(f.ZERO)}wNAF(g){return w.wNAFCached(this,u,g,y=>{const E=e.invertBatch(y.map(N=>N.pz));return y.map((N,x)=>N.toAffine(E[x])).map(f.fromAffine)})}multiplyUnsafe(g){const y=f.ZERO;if(g===se)return y;if(a(g),g===Nt)return this;const{endo:E}=t;if(!E)return w.unsafeLadder(this,g);let{k1neg:N,k1:x,k2neg:T,k2:v}=E.splitScalar(g),C=y,O=y,k=this;for(;x>se||v>se;)x&Nt&&(C=C.add(k)),v&Nt&&(O=O.add(k)),k=k.double(),x>>=Nt,v>>=Nt;return N&&(C=C.negate()),T&&(O=O.negate()),O=new f(e.mul(O.px,E.beta),O.py,O.pz),C.add(O)}multiply(g){a(g);let y=g,E,N;const{endo:x}=t;if(x){const{k1neg:T,k1:v,k2neg:C,k2:O}=x.splitScalar(y);let{p:k,f:H}=this.wNAF(v),{p:Q,f:G}=this.wNAF(O);k=w.constTimeNegate(T,k),Q=w.constTimeNegate(C,Q),Q=new f(e.mul(Q.px,x.beta),Q.py,Q.pz),E=k.add(Q),N=H.add(G)}else{const{p:T,f:v}=this.wNAF(y);E=T,N=v}return f.normalizeZ([E,N])[0]}multiplyAndAddUnsafe(g,y,E){const N=f.BASE,x=(v,C)=>C===se||C===Nt||!v.equals(N)?v.multiplyUnsafe(C):v.multiply(C),T=x(this,y).add(x(g,E));return T.is0()?void 0:T}toAffine(g){const{px:y,py:E,pz:N}=this,x=this.is0();g==null&&(g=x?e.ONE:e.inv(N));const T=e.mul(y,g),v=e.mul(E,g),C=e.mul(N,g);if(x)return{x:e.ZERO,y:e.ZERO};if(!e.eql(C,e.ONE))throw new Error("invZ was invalid");return{x:T,y:v}}isTorsionFree(){const{h:g,isTorsionFree:y}=t;if(g===Nt)return!0;if(y)return y(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:g,clearCofactor:y}=t;return g===Nt?this:y?y(f,this):this.multiplyUnsafe(t.h)}toRawBytes(g=!0){return this.assertValidity(),n(f,this,g)}toHex(g=!0){return $n(this.toRawBytes(g))}}f.BASE=new f(t.Gx,t.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);const p=t.nBitLength,w=vc(f,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function Tc(r){const t=Lo(r);return Sr(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function Fc(r){const t=Tc(r),{Fp:e,n}=t,s=e.BYTES+1,i=2*e.BYTES+1;function o(B){return se<B&&B<e.ORDER}function a(B){return ft(B,n)}function c(B){return Gs(B,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:f,isWithinCurveOrder:p}=Dc({...t,toBytes(B,P,U){const z=P.toAffine(),V=e.toBytes(z.x),_=pr;return U?_(Uint8Array.from([P.hasEvenY()?2:3]),V):_(Uint8Array.from([4]),V,e.toBytes(z.y))},fromBytes(B){const P=B.length,U=B[0],z=B.subarray(1);if(P===s&&(U===2||U===3)){const V=$e(z);if(!o(V))throw new Error("Point is not on curve");const _=f(V);let dt=e.sqrt(_);const gt=(dt&Nt)===Nt;return(U&1)===1!==gt&&(dt=e.neg(dt)),{x:V,y:dt}}else if(P===i&&U===4){const V=e.fromBytes(z.subarray(0,e.BYTES)),_=e.fromBytes(z.subarray(e.BYTES,2*e.BYTES));return{x:V,y:_}}else throw new Error(`Point of length ${P} was invalid. Expected ${s} compressed bytes or ${i} uncompressed bytes`)}}),w=B=>$n(er(B,t.nByteLength));function m(B){const P=n>>Nt;return B>P}function g(B){return m(B)?a(-B):B}const y=(B,P,U)=>$e(B.slice(P,U));class E{constructor(P,U,z){this.r=P,this.s=U,this.recovery=z,this.assertValidity()}static fromCompact(P){const U=t.nByteLength;return P=Rt("compactSignature",P,U*2),new E(y(P,0,U),y(P,U,2*U))}static fromDER(P){const{r:U,s:z}=Te.toSig(Rt("DER",P));return new E(U,z)}assertValidity(){if(!p(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!p(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(P){return new E(this.r,this.s,P)}recoverPublicKey(P){const{r:U,s:z,recovery:V}=this,_=O(Rt("msgHash",P));if(V==null||![0,1,2,3].includes(V))throw new Error("recovery id invalid");const dt=V===2||V===3?U+t.n:U;if(dt>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const gt=V&1?"03":"02",oe=u.fromHex(gt+w(dt)),ae=c(dt),en=a(-_*ae),ar=a(z*ae),ce=u.BASE.multiplyAndAddUnsafe(oe,en,ar);if(!ce)throw new Error("point at infinify");return ce.assertValidity(),ce}hasHighS(){return m(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return tr(this.toDERHex())}toDERHex(){return Te.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return tr(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const N={isValidPrivateKey(B){try{return d(B),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{const B=Fo(t.n);return Nc(t.randomBytes(B),t.n)},precompute(B=8,P=u.BASE){return P._setWindowSize(B),P.multiply(BigInt(3)),P}};function x(B,P=!0){return u.fromPrivateKey(B).toRawBytes(P)}function T(B){const P=B instanceof Uint8Array,U=typeof B=="string",z=(P||U)&&B.length;return P?z===s||z===i:U?z===2*s||z===2*i:B instanceof u}function v(B,P,U=!0){if(T(B))throw new Error("first arg must be private key");if(!T(P))throw new Error("second arg must be public key");return u.fromHex(P).multiply(d(B)).toRawBytes(U)}const C=t.bits2int||function(B){const P=$e(B),U=B.length*8-t.nBitLength;return U>0?P>>BigInt(U):P},O=t.bits2int_modN||function(B){return a(C(B))},k=ui(t.nBitLength);function H(B){if(typeof B!="bigint")throw new Error("bigint expected");if(!(se<=B&&B<k))throw new Error(`bigint expected < 2^${t.nBitLength}`);return er(B,t.nByteLength)}function Q(B,P,U=G){if(["recovered","canonical"].some(Se=>Se in U))throw new Error("sign() legacy options not supported");const{hash:z,randomBytes:V}=t;let{lowS:_,prehash:dt,extraEntropy:gt}=U;_==null&&(_=!0),B=Rt("msgHash",B),dt&&(B=Rt("prehashed msgHash",z(B)));const oe=O(B),ae=d(P),en=[H(ae),H(oe)];if(gt!=null){const Se=gt===!0?V(e.BYTES):gt;en.push(Rt("extraEntropy",Se))}const ar=pr(...en),ce=oe;function Es(Se){const nn=C(Se);if(!p(nn))return;const Ei=c(nn),rn=u.BASE.multiply(nn).toAffine(),vt=a(rn.x);if(vt===se)return;const sn=a(Ei*a(ce+vt*ae));if(sn===se)return;let Bi=(rn.x===vt?0:2)|Number(rn.y&Nt),xi=sn;return _&&m(sn)&&(xi=g(sn),Bi^=1),new E(vt,xi,Bi)}return{seed:ar,k2sig:Es}}const G={lowS:t.lowS,prehash:!1},X={lowS:t.lowS,prehash:!1};function nt(B,P,U=G){const{seed:z,k2sig:V}=Q(B,P,U),_=t;return Oo(_.hash.outputLen,_.nByteLength,_.hmac)(z,V)}u.BASE._setWindowSize(8);function Mt(B,P,U,z=X){var rn;const V=B;if(P=Rt("msgHash",P),U=Rt("publicKey",U),"strict"in z)throw new Error("options.strict was renamed to lowS");const{lowS:_,prehash:dt}=z;let gt,oe;try{if(typeof V=="string"||V instanceof Uint8Array)try{gt=E.fromDER(V)}catch(vt){if(!(vt instanceof Te.Err))throw vt;gt=E.fromCompact(V)}else if(typeof V=="object"&&typeof V.r=="bigint"&&typeof V.s=="bigint"){const{r:vt,s:sn}=V;gt=new E(vt,sn)}else throw new Error("PARSE");oe=u.fromHex(U)}catch(vt){if(vt.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(_&&gt.hasHighS())return!1;dt&&(P=t.hash(P));const{r:ae,s:en}=gt,ar=O(P),ce=c(en),Es=a(ar*ce),Se=a(ae*ce),nn=(rn=u.BASE.multiplyAndAddUnsafe(oe,Es,Se))==null?void 0:rn.toAffine();return nn?a(nn.x)===ae:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:v,sign:nt,verify:Mt,ProjectivePoint:u,Signature:E,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Lc(r){return{hash:r,hmac:(t,...e)=>fs(r,t,xa(...e)),randomBytes:Ba}}function Uc(r,t){const e=n=>Fc({...r,...Lc(n)});return Object.freeze({...e(t),create:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Uo=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Qi=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Mc=BigInt(1),Hs=BigInt(2),Gi=(r,t)=>(r+t/Hs)/t;function Qc(r){const t=Uo,e=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),u=r*r*r%t,d=u*u*r%t,f=bt(d,e,t)*d%t,p=bt(f,e,t)*d%t,w=bt(p,Hs,t)*u%t,m=bt(w,s,t)*w%t,g=bt(m,i,t)*m%t,y=bt(g,a,t)*g%t,E=bt(y,c,t)*y%t,N=bt(E,a,t)*g%t,x=bt(N,e,t)*d%t,T=bt(x,o,t)*m%t,v=bt(T,n,t)*u%t,C=bt(v,Hs,t);if(!Js.eql(Js.sqr(C),r))throw new Error("Cannot find square root");return C}const Js=Ic(Uo,void 0,void 0,{sqrt:Qc}),de=Uc({a:BigInt(0),b:BigInt(7),Fp:Js,n:Qi,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{const t=Qi,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Mc*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=e,o=BigInt("0x100000000000000000000000000000000"),a=Gi(i*r,t),c=Gi(-n*r,t);let u=ft(r-a*e-c*s,t),d=ft(-a*n-c*i,t);const f=u>o,p=d>o;if(f&&(u=t-u),p&&(d=t-d),u>o||d>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:f,k1:u,k2neg:p,k2:d}}}},ds);BigInt(0);de.ProjectivePoint;const Ar="0x0000000000000000000000000000000000000000",Hi="0x0000000000000000000000000000000000000000000000000000000000000000",Ji=BigInt(0),Vi=BigInt(1),zi=BigInt(2),Ki=BigInt(27),ji=BigInt(28),Mr=BigInt(35),on={};function Zi(r){return Xn(yt(r),32)}var En,Bn,xn,Je;const St=class St{constructor(t,e,n,s){A(this,En);A(this,Bn);A(this,xn);A(this,Je);Ca(t,on,"Signature"),h(this,En,e),h(this,Bn,n),h(this,xn,s),h(this,Je,null)}get r(){return l(this,En)}set r(t){b(gn(t)===32,"invalid r","value",t),h(this,En,D(t))}get s(){return l(this,Bn)}set s(t){b(gn(t)===32,"invalid s","value",t);const e=D(t);b(parseInt(e.substring(0,3))<8,"non-canonical s","value",e),h(this,Bn,e)}get v(){return l(this,xn)}set v(t){const e=J(t,"value");b(e===27||e===28,"invalid v","v",t),h(this,xn,e)}get networkV(){return l(this,Je)}get legacyChainId(){const t=this.networkV;return t==null?null:St.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=j(this.s);return this.yParity&&(t[0]|=128),D(t)}get compactSerialized(){return ut([this.r,this.yParityAndS])}get serialized(){return ut([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new St(on,this.r,this.s,this.v);return this.networkV&&h(t,Je,this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(t){const e=R(t,"v");return e==Ki||e==ji?Ji:(b(e>=Mr,"invalid EIP-155 v","v",t),(e-Mr)/zi)}static getChainIdV(t,e){return R(t)*zi+BigInt(35+e-27)}static getNormalizedV(t){const e=R(t);return e===Ji||e===Ki?27:e===Vi||e===ji?28:(b(e>=Mr,"invalid v","v",t),e&Vi?27:28)}static from(t){function e(u,d){b(u,d,"signature",t)}if(t==null)return new St(on,Hi,Hi,27);if(typeof t=="string"){const u=j(t,"signature");if(u.length===64){const d=D(u.slice(0,32)),f=u.slice(32,64),p=f[0]&128?28:27;return f[0]&=127,new St(on,d,D(f),p)}if(u.length===65){const d=D(u.slice(0,32)),f=u.slice(32,64);e((f[0]&128)===0,"non-canonical s");const p=St.getNormalizedV(u[64]);return new St(on,d,D(f),p)}e(!1,"invalid raw signature length")}if(t instanceof St)return t.clone();const n=t.r;e(n!=null,"missing r");const s=Zi(n),i=function(u,d){if(u!=null)return Zi(u);if(d!=null){e(ct(d,32),"invalid yParityAndS");const f=j(d);return f[0]&=127,D(f)}e(!1,"missing s")}(t.s,t.yParityAndS);e((j(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(u,d,f){if(u!=null){const p=R(u);return{networkV:p>=Mr?p:void 0,v:St.getNormalizedV(p)}}if(d!=null)return e(ct(d,32),"invalid yParityAndS"),{v:j(d)[0]&128?28:27};if(f!=null){switch(J(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}e(!1,"invalid yParity")}e(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),c=new St(on,s,i,a);return o&&h(c,Je,o),e(t.yParity==null||J(t.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),e(t.yParityAndS==null||t.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};En=new WeakMap,Bn=new WeakMap,xn=new WeakMap,Je=new WeakMap;let Lt=St;var Wt;const De=class De{constructor(t){A(this,Wt);b(gn(t)===32,"invalid private key","privateKey","[REDACTED]"),h(this,Wt,D(t))}get privateKey(){return l(this,Wt)}get publicKey(){return De.computePublicKey(l(this,Wt))}get compressedPublicKey(){return De.computePublicKey(l(this,Wt),!0)}sign(t){b(gn(t)===32,"invalid digest length","digest",t);const e=de.sign(cr(t),cr(l(this,Wt)),{lowS:!0});return Lt.from({r:_n(e.r,32),s:_n(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=De.computePublicKey(t);return D(de.getSharedSecret(cr(l(this,Wt)),j(e),!1))}static computePublicKey(t,e){let n=j(t,"key");if(n.length===32){const i=de.getPublicKey(n,!!e);return D(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=de.ProjectivePoint.fromHex(n);return D(s.toRawBytes(e))}static recoverPublicKey(t,e){b(gn(t)===32,"invalid digest length","digest",t);const n=Lt.from(e);let s=de.Signature.fromCompact(cr(ut([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(cr(t));return b(i!=null,"invalid signautre for digest","signature",e),"0x"+i.toHex(!1)}static addPoints(t,e,n){const s=de.ProjectivePoint.fromHex(De.computePublicKey(t).substring(2)),i=de.ProjectivePoint.fromHex(De.computePublicKey(e).substring(2));return"0x"+s.add(i).toHex(!!n)}};Wt=new WeakMap;let wr=De;function Gc(r){const t=q(r.from);let n=R(r.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,q(at(kt(tn([t,n])),12))}var Hc="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAc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wMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const Yi=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),qi=4;function Jc(r){let t=0;function e(){return r[t++]<<8|r[t++]}let n=e(),s=1,i=[0,1];for(let v=1;v<n;v++)i.push(s+=e());let o=e(),a=t;t+=o;let c=0,u=0;function d(){return c==0&&(u=u<<8|r[t++],c=8),u>>--c&1}const f=31,p=2**f,w=p>>>1,m=w>>1,g=p-1;let y=0;for(let v=0;v<f;v++)y=y<<1|d();let E=[],N=0,x=p;for(;;){let v=Math.floor(((y-N+1)*s-1)/x),C=0,O=n;for(;O-C>1;){let Q=C+O>>>1;v<i[Q]?O=Q:C=Q}if(C==0)break;E.push(C);let k=N+Math.floor(x*i[C]/s),H=N+Math.floor(x*i[C+1]/s)-1;for(;!((k^H)&w);)y=y<<1&g|d(),k=k<<1&g,H=H<<1&g|1;for(;k&~H&m;)y=y&w|y<<1&g>>>1|d(),k=k<<1^w,H=(H^w)<<1|w|1;N=k,x=1+H-k}let T=n-4;return E.map(v=>{switch(v-T){case 3:return T+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return T+256+(r[a++]<<8|r[a++]);case 1:return T+r[a++];default:return v-1}})}function Vc(r){let t=0;return()=>r[t++]}function Mo(r){return Vc(Jc(zc(r)))}function zc(r){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>t[s.charCodeAt(0)]=i);let e=r.length,n=new Uint8Array(6*e>>3);for(let s=0,i=0,o=0,a=0;s<e;s++)a=a<<6|t[r.charCodeAt(s)],o+=6,o>=8&&(n[i++]=a>>(o-=8));return n}function Kc(r){return r&1?~r>>1:r>>1}function jc(r,t){let e=Array(r);for(let n=0,s=0;n<r;n++)e[n]=s+=Kc(t());return e}function mr(r,t=0){let e=[];for(;;){let n=r(),s=r();if(!s)break;t+=n;for(let i=0;i<s;i++)e.push(t+i);t+=s+1}return e}function Qo(r){return yr(()=>{let t=mr(r);if(t.length)return t})}function Go(r){let t=[];for(;;){let e=r();if(e==0)break;t.push(Zc(e,r))}for(;;){let e=r()-1;if(e<0)break;t.push(Yc(e,r))}return t.flat()}function yr(r){let t=[];for(;;){let e=r(t.length);if(!e)break;t.push(e)}return t}function Ho(r,t,e){let n=Array(r).fill().map(()=>[]);for(let s=0;s<t;s++)jc(r,e).forEach((i,o)=>n[o].push(i));return n}function Zc(r,t){let e=1+t(),n=t(),s=yr(t);return Ho(s.length,1+r,t).flatMap((o,a)=>{let[c,...u]=o;return Array(s[a]).fill().map((d,f)=>{let p=f*n;return[c+f*e,u.map(w=>w+p)]})})}function Yc(r,t){let e=1+t();return Ho(e,1+r,t).map(s=>[s[0],s.slice(1)])}function qc(r){let t=[],e=mr(r);return s(n([]),[]),t;function n(i){let o=r(),a=yr(()=>{let c=mr(r).map(u=>e[u]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&t.push(a);for(let u of o)for(let d of u.Q)s(u,[...a,d],c)}}}function Wc(r){return r.toString(16).toUpperCase().padStart(2,"0")}function Jo(r){return`{${Wc(r)}}`}function Xc(r){let t=[];for(let e=0,n=r.length;e<n;){let s=r.codePointAt(e);e+=s<65536?1:2,t.push(s)}return t}function nr(r){let e=r.length;if(e<4096)return String.fromCodePoint(...r);let n=[];for(let s=0;s<e;)n.push(String.fromCodePoint(...r.slice(s,s+=4096)));return n.join("")}function _c(r,t){let e=r.length,n=e-t.length;for(let s=0;n==0&&s<e;s++)n=r[s]-t[s];return n}var $c="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolC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5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const br=44032,_r=4352,$r=4449,ts=4519,Vo=19,zo=21,rr=28,es=zo*rr,tl=Vo*es,el=br+tl,nl=_r+Vo,rl=$r+zo,sl=ts+rr;function ur(r){return r>>24&255}function Ko(r){return r&16777215}let Vs,Wi,zs,Jr;function il(){let r=Mo($c);Vs=new Map(Qo(r).flatMap((t,e)=>t.map(n=>[n,e+1<<24]))),Wi=new Set(mr(r)),zs=new Map,Jr=new Map;for(let[t,e]of Go(r)){if(!Wi.has(t)&&e.length==2){let[n,s]=e,i=Jr.get(n);i||(i=new Map,Jr.set(n,i)),i.set(s,t)}zs.set(t,e.reverse())}}function jo(r){return r>=br&&r<el}function ol(r,t){if(r>=_r&&r<nl&&t>=$r&&t<rl)return br+(r-_r)*es+(t-$r)*rr;if(jo(r)&&t>ts&&t<sl&&(r-br)%rr==0)return r+(t-ts);{let e=Jr.get(r);return e&&(e=e.get(t),e)?e:-1}}function Zo(r){Vs||il();let t=[],e=[],n=!1;function s(i){let o=Vs.get(i);o&&(n=!0,i|=o),t.push(i)}for(let i of r)for(;;){if(i<128)t.push(i);else if(jo(i)){let o=i-br,a=o/es|0,c=o%es/rr|0,u=o%rr;s(_r+a),s($r+c),u>0&&s(ts+u)}else{let o=zs.get(i);o?e.push(...o):s(i)}if(!e.length)break;i=e.pop()}if(n&&t.length>1){let i=ur(t[0]);for(let o=1;o<t.length;o++){let a=ur(t[o]);if(a==0||i<=a){i=a;continue}let c=o-1;for(;;){let u=t[c+1];if(t[c+1]=t[c],t[c]=u,!c||(i=ur(t[--c]),i<=a))break}i=ur(t[o])}}return t}function al(r){let t=[],e=[],n=-1,s=0;for(let i of r){let o=ur(i),a=Ko(i);if(n==-1)o==0?n=a:t.push(a);else if(s>0&&s>=o)o==0?(t.push(n,...e),e.length=0,n=a):e.push(a),s=o;else{let c=ol(n,a);c>=0?n=c:s==0&&o==0?(t.push(n),n=a):(e.push(a),s=o)}}return n>=0&&t.push(n,...e),t}function Yo(r){return Zo(r).map(Ko)}function cl(r){return al(Zo(r))}const Xi=45,qo=".",Wo=65039,Xo=1,ns=r=>Array.from(r);function Er(r,t){return r.P.has(t)||r.Q.has(t)}class ll extends Array{get is_emoji(){return!0}}let Ks,_o,Fe,js,$o,pn,Ns,ln,Re,_i,Zs;function hi(){if(Ks)return;let r=Mo(Hc);const t=()=>mr(r),e=()=>new Set(t()),n=(d,f)=>f.forEach(p=>d.add(p));Ks=new Map(Go(r)),_o=e(),Fe=t(),js=new Set(t().map(d=>Fe[d])),Fe=new Set(Fe),$o=e(),e();let s=Qo(r),i=r();const o=()=>{let d=new Set;return t().forEach(f=>n(d,s[f])),n(d,t()),d};pn=yr(d=>{let f=yr(r).map(p=>p+96);if(f.length){let p=d>=i;f[0]-=32,f=nr(f),p&&(f=`Restricted[${f}]`);let w=o(),m=o(),g=!r();return{N:f,P:w,Q:m,M:g,R:p}}}),Ns=e(),ln=new Map;let a=t().concat(ns(Ns)).sort((d,f)=>d-f);a.forEach((d,f)=>{let p=r(),w=a[f]=p?a[f-p]:{V:[],M:new Map};w.V.push(d),Ns.has(d)||ln.set(d,w)});for(let{V:d,M:f}of new Set(ln.values())){let p=[];for(let m of d){let g=pn.filter(E=>Er(E,m)),y=p.find(({G:E})=>g.some(N=>E.has(N)));y||(y={G:new Set,V:[]},p.push(y)),y.V.push(m),n(y.G,g)}let w=p.flatMap(m=>ns(m.G));for(let{G:m,V:g}of p){let y=new Set(w.filter(E=>!m.has(E)));for(let E of g)f.set(E,y)}}Re=new Set;let c=new Set;const u=d=>Re.has(d)?c.add(d):Re.add(d);for(let d of pn){for(let f of d.P)u(f);for(let f of d.Q)u(f)}for(let d of Re)!ln.has(d)&&!c.has(d)&&ln.set(d,Xo);n(Re,Yo(Re)),_i=qc(r).map(d=>ll.from(d)).sort(_c),Zs=new Map;for(let d of _i){let f=[Zs];for(let p of d){let w=f.map(m=>{let g=m.get(p);return g||(g=new Map,m.set(p,g)),g});p===Wo?f.push(...w):f=w}for(let p of f)p.V=d}}function fi(r){return(ta(r)?"":`${di(As([r]))} `)+Jo(r)}function di(r){return`"${r}"‎`}function ul(r){if(r.length>=4&&r[2]==Xi&&r[3]==Xi)throw new Error(`invalid label extension: "${nr(r.slice(0,4))}"`)}function hl(r){for(let e=r.lastIndexOf(95);e>0;)if(r[--e]!==95)throw new Error("underscore allowed only at start")}function fl(r){let t=r[0],e=Yi.get(t);if(e)throw gr(`leading ${e}`);let n=r.length,s=-1;for(let i=1;i<n;i++){t=r[i];let o=Yi.get(t);if(o){if(s==i)throw gr(`${e} + ${o}`);s=i+1,e=o}}if(s==n)throw gr(`trailing ${e}`)}function As(r,t=1/0,e=Jo){let n=[];dl(r[0])&&n.push("◌"),r.length>t&&(t>>=1,r=[...r.slice(0,t),8230,...r.slice(-t)]);let s=0,i=r.length;for(let o=0;o<i;o++){let a=r[o];ta(a)&&(n.push(nr(r.slice(s,o))),n.push(e(a)),s=o+1)}return n.push(nr(r.slice(s,i))),n.join("")}function dl(r){return hi(),Fe.has(r)}function ta(r){return hi(),$o.has(r)}function gl(r){return ml(pl(r,cl,El))}function pl(r,t,e){if(!r)return[];hi();let n=0;return r.split(qo).map(s=>{let i=Xc(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=bl(i,t,e),c=a.length,u;if(!c)throw new Error("empty label");let d=o.output=a.flat();if(hl(d),!(o.emoji=c>1||a[0].is_emoji)&&d.every(p=>p<128))ul(d),u="ASCII";else{let p=a.flatMap(w=>w.is_emoji?[]:w);if(!p.length)u="Emoji";else{if(Fe.has(d[0]))throw gr("leading combining mark");for(let g=1;g<c;g++){let y=a[g];if(!y.is_emoji&&Fe.has(y[0]))throw gr(`emoji + combining mark: "${nr(a[g-1])} + ${As([y[0]])}"`)}fl(d);let w=ns(new Set(p)),[m]=wl(w);yl(m,p),Al(m,w),u=m.N}}o.type=u}catch(a){o.error=a}return o})}function Al(r,t){let e,n=[];for(let s of t){let i=ln.get(s);if(i===Xo)return;if(i){let o=i.M.get(s);if(e=e?e.filter(a=>o.has(a)):ns(o),!e.length)return}else n.push(s)}if(e){for(let s of e)if(n.every(i=>Er(s,i)))throw new Error(`whole-script confusable: ${r.N}/${s.N}`)}}function wl(r){let t=pn;for(let e of r){let n=t.filter(s=>Er(s,e));if(!n.length)throw pn.some(s=>Er(s,e))?na(t[0],e):ea(e);if(t=n,n.length==1)break}return t}function ml(r){return r.map(({input:t,error:e,output:n})=>{if(e){let s=e.message;throw new Error(r.length==1?s:`Invalid label ${di(As(t,63))}: ${s}`)}return nr(n)}).join(qo)}function ea(r){return new Error(`disallowed character: ${fi(r)}`)}function na(r,t){let e=fi(t),n=pn.find(s=>s.P.has(t));return n&&(e=`${n.N} ${e}`),new Error(`illegal mixture: ${r.N} + ${e}`)}function gr(r){return new Error(`illegal placement: ${r}`)}function yl(r,t){for(let e of t)if(!Er(r,e))throw na(r,e);if(r.M){let e=Yo(t);for(let n=1,s=e.length;n<s;n++)if(js.has(e[n])){let i=n+1;for(let o;i<s&&js.has(o=e[i]);i++)for(let a=n;a<i;a++)if(e[a]==o)throw new Error(`duplicate non-spacing marks: ${fi(o)}`);if(i-n>qi)throw new Error(`excessive non-spacing marks: ${di(As(e.slice(n-1,i)))} (${i-n}/${qi})`);n=i}}}function bl(r,t,e){let n=[],s=[];for(r=r.slice().reverse();r.length;){let i=Bl(r);if(i)s.length&&(n.push(t(s)),s=[]),n.push(e(i));else{let o=r.pop();if(Re.has(o))s.push(o);else{let a=Ks.get(o);if(a)s.push(...a);else if(!_o.has(o))throw ea(o)}}}return s.length&&n.push(t(s)),n}function El(r){return r.filter(t=>t!=Wo)}function Bl(r,t){let e=Zs,n,s=r.length;for(;s&&(e=e.get(r[--s]),!!e);){let{V:i}=e;i&&(n=i,r.length=s)}return n}const ra=new Uint8Array(32);ra.fill(0);function $i(r){return b(r.length!==0,"invalid ENS name; empty component","comp",r),r}function sa(r){const t=_e(xl(r)),e=[];if(r.length===0)return e;let n=0;for(let s=0;s<t.length;s++)t[s]===46&&(e.push($i(t.slice(n,s))),n=s+1);return b(n<t.length,"invalid ENS name; empty component","name",r),e.push($i(t.slice(n))),e}function xl(r){try{if(r.length===0)throw new Error("empty label");return gl(r)}catch(t){b(!1,`invalid ENS name (${t.message})`,"name",r)}}function Ys(r){b(typeof r=="string","invalid ENS name; not a string","name",r),b(r.length,"invalid ENS name (empty label)","name",r);let t=ra;const e=sa(r);for(;e.length;)t=kt(ut([t,kt(e.pop())]));return D(t)}function Cl(r,t){const e=t;return b(e<=255,"DNS encoded label cannot exceed 255","length",e),D(ut(sa(r).map(n=>{b(n.length<=e,`label ${JSON.stringify(r)} exceeds ${e} bytes`,"name",r);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Pl(r){let t;return typeof r=="string"?t=wr.computePublicKey(r,!1):t=r.publicKey,q(kt("0x"+t.substring(4)).substring(26))}function Il(r,t){return Pl(wr.recoverPublicKey(r,t))}const tt=BigInt(0),Nl=BigInt(2),kl=BigInt(27),vl=BigInt(28),Sl=BigInt(35),Rl=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ks=4096*32;function to(r,t){let e=r.toString(16);for(;e.length<2;)e="0"+e;return e+=or(t).substring(4),"0x"+e}function ws(r){return r==="0x"?null:q(r)}function gi(r,t){try{return ir(r)}catch(e){b(!1,e.message,t,r)}}function Rr(r,t){return r==="0x"?0:J(r,t)}function Y(r,t){if(r==="0x")return tt;const e=R(r,t);return b(e<=Rl,"value exceeds uint size",t,e),e}function K(r,t){const e=R(r,"value"),n=yt(e);return b(n.length<=32,"value too large",`tx.${t}`,e),n}function pi(r){return ir(r).map(t=>[t.address,t.storageKeys])}function Ol(r,t){b(Array.isArray(r),`invalid ${t}`,"value",r);for(let e=0;e<r.length;e++)b(ct(r[e],32),"invalid ${ param } hash",`value[${e}]`,r[e]);return r}function Dl(r){const t=hs(r);b(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",r);const e={type:0,nonce:Rr(t[0],"nonce"),gasPrice:Y(t[1],"gasPrice"),gasLimit:Y(t[2],"gasLimit"),to:ws(t[3]),value:Y(t[4],"value"),data:D(t[5]),chainId:tt};if(t.length===6)return e;const n=Y(t[6],"v"),s=Y(t[7],"r"),i=Y(t[8],"s");if(s===tt&&i===tt)e.chainId=n;else{let o=(n-Sl)/Nl;o<tt&&(o=tt),e.chainId=o,b(o!==tt||n===kl||n===vl,"non-canonical legacy v","v",t[6]),e.signature=Lt.from({r:Xn(t[7],32),s:Xn(t[8],32),v:n})}return e}function Tl(r,t){const e=[K(r.nonce,"nonce"),K(r.gasPrice||0,"gasPrice"),K(r.gasLimit,"gasLimit"),r.to||"0x",K(r.value,"value"),r.data];let n=tt;if(r.chainId!=tt)n=R(r.chainId,"tx.chainId"),b(!t||t.networkV==null||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(r.signature){const i=r.signature.legacyChainId;i!=null&&(n=i)}if(!t)return n!==tt&&(e.push(yt(n)),e.push("0x"),e.push("0x")),tn(e);let s=BigInt(27+t.yParity);return n!==tt?s=Lt.getChainIdV(n,t.v):BigInt(t.v)!==s&&b(!1,"tx.chainId/sig.v mismatch","sig",t),e.push(yt(s)),e.push(yt(t.r)),e.push(yt(t.s)),tn(e)}function Ai(r,t){let e;try{if(e=Rr(t[0],"yParity"),e!==0&&e!==1)throw new Error("bad yParity")}catch{b(!1,"invalid yParity","yParity",t[0])}const n=Xn(t[1],32),s=Xn(t[2],32),i=Lt.from({r:n,s,yParity:e});r.signature=i}function Fl(r){const t=hs(j(r).slice(1));b(Array.isArray(t)&&(t.length===9||t.length===12),"invalid field count for transaction type: 2","data",D(r));const e={type:2,chainId:Y(t[0],"chainId"),nonce:Rr(t[1],"nonce"),maxPriorityFeePerGas:Y(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Y(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Y(t[4],"gasLimit"),to:ws(t[5]),value:Y(t[6],"value"),data:D(t[7]),accessList:gi(t[8],"accessList")};return t.length===9||Ai(e,t.slice(9)),e}function Ll(r,t){const e=[K(r.chainId,"chainId"),K(r.nonce,"nonce"),K(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),K(r.maxFeePerGas||0,"maxFeePerGas"),K(r.gasLimit,"gasLimit"),r.to||"0x",K(r.value,"value"),r.data,pi(r.accessList||[])];return t&&(e.push(K(t.yParity,"yParity")),e.push(yt(t.r)),e.push(yt(t.s))),ut(["0x02",tn(e)])}function Ul(r){const t=hs(j(r).slice(1));b(Array.isArray(t)&&(t.length===8||t.length===11),"invalid field count for transaction type: 1","data",D(r));const e={type:1,chainId:Y(t[0],"chainId"),nonce:Rr(t[1],"nonce"),gasPrice:Y(t[2],"gasPrice"),gasLimit:Y(t[3],"gasLimit"),to:ws(t[4]),value:Y(t[5],"value"),data:D(t[6]),accessList:gi(t[7],"accessList")};return t.length===8||Ai(e,t.slice(8)),e}function Ml(r,t){const e=[K(r.chainId,"chainId"),K(r.nonce,"nonce"),K(r.gasPrice||0,"gasPrice"),K(r.gasLimit,"gasLimit"),r.to||"0x",K(r.value,"value"),r.data,pi(r.accessList||[])];return t&&(e.push(K(t.yParity,"recoveryParam")),e.push(yt(t.r)),e.push(yt(t.s))),ut(["0x01",tn(e)])}function Ql(r){let t=hs(j(r).slice(1)),e="3",n=null;if(t.length===4&&Array.isArray(t[0])){e="3 (network format)";const i=t[1],o=t[2],a=t[3];b(Array.isArray(i),"invalid network format: blobs not an array","fields[1]",i),b(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),b(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),b(i.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",t),b(i.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let c=0;c<t[1].length;c++)n.push({data:i[c],commitment:o[c],proof:a[c]});t=t[0]}b(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${e}`,"data",D(r));const s={type:3,chainId:Y(t[0],"chainId"),nonce:Rr(t[1],"nonce"),maxPriorityFeePerGas:Y(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Y(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Y(t[4],"gasLimit"),to:ws(t[5]),value:Y(t[6],"value"),data:D(t[7]),accessList:gi(t[8],"accessList"),maxFeePerBlobGas:Y(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(s.blobs=n),b(s.to!=null,`invalid address for transaction type: ${e}`,"data",r),b(Array.isArray(s.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",r);for(let i=0;i<s.blobVersionedHashes.length;i++)b(ct(s.blobVersionedHashes[i],32),`invalid blobVersionedHash at index ${i}: must be length 32`,"data",r);return t.length===11||Ai(s,t.slice(11)),s}function Gl(r,t,e){const n=[K(r.chainId,"chainId"),K(r.nonce,"nonce"),K(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),K(r.maxFeePerGas||0,"maxFeePerGas"),K(r.gasLimit,"gasLimit"),r.to||Ar,K(r.value,"value"),r.data,pi(r.accessList||[]),K(r.maxFeePerBlobGas||0,"maxFeePerBlobGas"),Ol(r.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(K(t.yParity,"yParity")),n.push(yt(t.r)),n.push(yt(t.s)),e)?ut(["0x03",tn([n,e.map(s=>s.data),e.map(s=>s.commitment),e.map(s=>s.proof)])]):ut(["0x03",tn(n)])}var Ht,Cn,Pn,In,Nn,kn,vn,Sn,Rn,On,Dn,Tn,Ve,Ae,Xt,we,Fn,Vr;const Zt=class Zt{constructor(){A(this,Fn);A(this,Ht);A(this,Cn);A(this,Pn);A(this,In);A(this,Nn);A(this,kn);A(this,vn);A(this,Sn);A(this,Rn);A(this,On);A(this,Dn);A(this,Tn);A(this,Ve);A(this,Ae);A(this,Xt);A(this,we);h(this,Ht,null),h(this,Cn,null),h(this,In,0),h(this,Nn,tt),h(this,kn,null),h(this,vn,null),h(this,Sn,null),h(this,Pn,"0x"),h(this,Rn,tt),h(this,On,tt),h(this,Dn,null),h(this,Tn,null),h(this,Ve,null),h(this,Ae,null),h(this,we,null),h(this,Xt,null)}get type(){return l(this,Ht)}set type(t){switch(t){case null:h(this,Ht,null);break;case 0:case"legacy":h(this,Ht,0);break;case 1:case"berlin":case"eip-2930":h(this,Ht,1);break;case 2:case"london":case"eip-1559":h(this,Ht,2);break;case 3:case"cancun":case"eip-4844":h(this,Ht,3);break;default:b(!1,"unsupported transaction type","type",t)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const t=l(this,Cn);return t==null&&this.type===3?Ar:t}set to(t){h(this,Cn,t==null?null:q(t))}get nonce(){return l(this,In)}set nonce(t){h(this,In,J(t,"value"))}get gasLimit(){return l(this,Nn)}set gasLimit(t){h(this,Nn,R(t))}get gasPrice(){const t=l(this,kn);return t==null&&(this.type===0||this.type===1)?tt:t}set gasPrice(t){h(this,kn,t==null?null:R(t,"gasPrice"))}get maxPriorityFeePerGas(){const t=l(this,vn);return t??(this.type===2||this.type===3?tt:null)}set maxPriorityFeePerGas(t){h(this,vn,t==null?null:R(t,"maxPriorityFeePerGas"))}get maxFeePerGas(){const t=l(this,Sn);return t??(this.type===2||this.type===3?tt:null)}set maxFeePerGas(t){h(this,Sn,t==null?null:R(t,"maxFeePerGas"))}get data(){return l(this,Pn)}set data(t){h(this,Pn,D(t))}get value(){return l(this,Rn)}set value(t){h(this,Rn,R(t,"value"))}get chainId(){return l(this,On)}set chainId(t){h(this,On,R(t))}get signature(){return l(this,Dn)||null}set signature(t){h(this,Dn,t==null?null:Lt.from(t))}get accessList(){const t=l(this,Tn)||null;return t??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(t){h(this,Tn,t==null?null:ir(t))}get maxFeePerBlobGas(){const t=l(this,Ve);return t==null&&this.type===3?tt:t}set maxFeePerBlobGas(t){h(this,Ve,t==null?null:R(t,"maxFeePerBlobGas"))}get blobVersionedHashes(){let t=l(this,Ae);return t==null&&this.type===3?[]:t}set blobVersionedHashes(t){if(t!=null){b(Array.isArray(t),"blobVersionedHashes must be an Array","value",t),t=t.slice();for(let e=0;e<t.length;e++)b(ct(t[e],32),"invalid blobVersionedHash",`value[${e}]`,t[e])}h(this,Ae,t)}get blobs(){return l(this,we)==null?null:l(this,we).map(t=>Object.assign({},t))}set blobs(t){if(t==null){h(this,we,null);return}const e=[],n=[];for(let s=0;s<t.length;s++){const i=t[s];if(Pa(i)){S(l(this,Xt),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let o=j(i);if(b(o.length<=ks,"blob is too large",`blobs[${s}]`,i),o.length!==ks){const u=new Uint8Array(ks);u.set(o),o=u}const a=l(this,Xt).blobToKzgCommitment(o),c=D(l(this,Xt).computeBlobKzgProof(o,a));e.push({data:D(o),commitment:D(a),proof:c}),n.push(to(1,a))}else{const o=D(i.commitment);e.push({data:D(i.data),commitment:o,proof:D(i.proof)}),n.push(to(1,o))}}h(this,we,e),h(this,Ae,n)}get kzg(){return l(this,Xt)}set kzg(t){h(this,Xt,t)}get hash(){return this.signature==null?null:kt(I(this,Fn,Vr).call(this,!0,!1))}get unsignedHash(){return kt(this.unsignedSerialized)}get from(){return this.signature==null?null:Il(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:wr.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return I(this,Fn,Vr).call(this,!0,!0)}get unsignedSerialized(){return I(this,Fn,Vr).call(this,!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=this.gasPrice!=null,e=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=l(this,Ve)!=null||l(this,Ae);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&S(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),S(!e||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),S(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):e?i.push(2):t?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Zt.from(this)}toJSON(){const t=e=>e==null?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new Zt;if(typeof t=="string"){const n=j(t);if(n[0]>=127)return Zt.from(Dl(n));switch(n[0]){case 1:return Zt.from(Ul(n));case 2:return Zt.from(Fl(n));case 3:return Zt.from(Ql(n))}S(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const e=new Zt;return t.type!=null&&(e.type=t.type),t.to!=null&&(e.to=t.to),t.nonce!=null&&(e.nonce=t.nonce),t.gasLimit!=null&&(e.gasLimit=t.gasLimit),t.gasPrice!=null&&(e.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(e.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(e.data=t.data),t.value!=null&&(e.value=t.value),t.chainId!=null&&(e.chainId=t.chainId),t.signature!=null&&(e.signature=Lt.from(t.signature)),t.accessList!=null&&(e.accessList=t.accessList),t.blobVersionedHashes!=null&&(e.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(e.kzg=t.kzg),t.blobs!=null&&(e.blobs=t.blobs),t.hash!=null&&(b(e.isSigned(),"unsigned transaction cannot define '.hash'","tx",t),b(e.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(b(e.isSigned(),"unsigned transaction cannot define '.from'","tx",t),b(e.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),e}};Ht=new WeakMap,Cn=new WeakMap,Pn=new WeakMap,In=new WeakMap,Nn=new WeakMap,kn=new WeakMap,vn=new WeakMap,Sn=new WeakMap,Rn=new WeakMap,On=new WeakMap,Dn=new WeakMap,Tn=new WeakMap,Ve=new WeakMap,Ae=new WeakMap,Xt=new WeakMap,we=new WeakMap,Fn=new WeakSet,Vr=function(t,e){S(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=t?this.signature:null;switch(this.inferType()){case 0:return Tl(this,n);case 1:return Ml(this,n);case 2:return Ll(this,n);case 3:return Gl(this,n,e?this.blobs:null)}S(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let rs=Zt;const ia=new Uint8Array(32);ia.fill(0);const Hl=BigInt(-1),oa=BigInt(0),aa=BigInt(1),Jl=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Vl(r){const t=j(r),e=t.length%32;return e?ut([t,ia.slice(e)]):D(t)}const zl=_n(aa,32),Kl=_n(oa,32),eo={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},vs=["name","version","chainId","verifyingContract","salt"];function no(r){return function(t){return b(typeof t=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,t),t}}const jl={name:no("name"),version:no("version"),chainId:function(r){const t=R(r,"domain.chainId");return b(t>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(t)?Number(t):hn(t)},verifyingContract:function(r){try{return q(r).toLowerCase()}catch{}b(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){const t=j(r,"domain.salt");return b(t.length===32,'invalid domain value "salt"',"domain.salt",r),D(t)}};function Ss(r){{const t=r.match(/^(u?)int(\d+)$/);if(t){const e=t[1]==="",n=parseInt(t[2]);b(n%8===0&&n!==0&&n<=256&&t[2]===String(n),"invalid numeric width","type",r);const s=ka(Jl,e?n-1:n),i=e?(s+aa)*Hl:oa;return function(o){const a=R(o,"value");return b(a>=i&&a<=s,`value out-of-bounds for ${r}`,"value",a),_n(e?va(a,256):a,32)}}}{const t=r.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return b(e!==0&&e<=32&&t[1]===String(e),"invalid bytes width","type",r),function(n){const s=j(n);return b(s.length===e,`invalid length for ${r}`,"value",n),Vl(n)}}}switch(r){case"address":return function(t){return Xn(q(t),32)};case"bool":return function(t){return t?zl:Kl};case"bytes":return function(t){return kt(t)};case"string":return function(t){return mo(t)}}return null}function ro(r,t){return`${r}(${t.map(({name:e,type:n})=>n+" "+e).join(",")})`}function Qr(r){const t=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:r}}var Pr,_t,Ln,as,ca;const Et=class Et{constructor(t){A(this,as);W(this,"primaryType");A(this,Pr);A(this,_t);A(this,Ln);h(this,_t,new Map),h(this,Ln,new Map);const e=new Map,n=new Map,s=new Map,i={};Object.keys(t).forEach(c=>{i[c]=t[c].map(({name:u,type:d})=>{let{base:f,index:p}=Qr(d);return f==="int"&&!t.int&&(f="int256"),f==="uint"&&!t.uint&&(f="uint256"),{name:u,type:f+(p||"")}}),e.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),h(this,Pr,JSON.stringify(i));for(const c in i){const u=new Set;for(const d of i[c]){b(!u.has(d.name),`duplicate variable name ${JSON.stringify(d.name)} in ${JSON.stringify(c)}`,"types",t),u.add(d.name);const f=Qr(d.type).base;b(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",t),!Ss(f)&&(b(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",t),n.get(f).push(c),e.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);b(o.length!==0,"missing primary type","types",t),b(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",t),Ut(this,{primaryType:o[0]});function a(c,u){b(!u.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",t),u.add(c);for(const d of e.get(c))if(n.has(d)){a(d,u);for(const f of u)s.get(f).add(d)}u.delete(c)}a(this.primaryType,new Set);for(const[c,u]of s){const d=Array.from(u);d.sort(),l(this,_t).set(c,ro(c,i[c])+d.map(f=>ro(f,i[f])).join(""))}}get types(){return JSON.parse(l(this,Pr))}getEncoder(t){let e=l(this,Ln).get(t);return e||(e=I(this,as,ca).call(this,t),l(this,Ln).set(t,e)),e}encodeType(t){const e=l(this,_t).get(t);return b(e,`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return kt(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,n){if(Ss(t))return n(t,e);const s=Qr(t).array;if(s)return b(s.count===-1||s.count===e.length,`array length mismatch; expected length ${s.count}`,"value",e),e.map(o=>this._visit(s.prefix,o,n));const i=this.types[t];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,e[a],n),o),{});b(!1,`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new Et(t)}static getPrimaryType(t){return Et.from(t).primaryType}static hashStruct(t,e,n){return Et.from(e).hashStruct(t,n)}static hashDomain(t){const e=[];for(const n in t){if(t[n]==null)continue;const s=eo[n];b(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",t),e.push({name:n,type:s})}return e.sort((n,s)=>vs.indexOf(n.name)-vs.indexOf(s.name)),Et.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,n){return ut(["0x1901",Et.hashDomain(t),Et.from(e).hash(n)])}static hash(t,e,n){return kt(Et.encode(t,e,n))}static async resolveNames(t,e,n,s){t=Object.assign({},t);for(const a in t)t[a]==null&&delete t[a];const i={};t.verifyingContract&&!ct(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const o=Et.from(e);o.visit(n,(a,c)=>(a==="address"&&!ct(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:t,value:n}}static getPayload(t,e,n){Et.hashDomain(t);const s={},i=[];vs.forEach(c=>{const u=t[c];u!=null&&(s[c]=jl[c](u),i.push({name:c,type:eo[c]}))});const o=Et.from(e);e=o.types;const a=Object.assign({},e);return b(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",e),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,u)=>{if(c.match(/^bytes(\d*)/))return D(j(u));if(c.match(/^u?int/))return R(u).toString();switch(c){case"address":return u.toLowerCase();case"bool":return!!u;case"string":return b(typeof u=="string","invalid string","value",u),u}b(!1,"unsupported type","type",c)})}}};Pr=new WeakMap,_t=new WeakMap,Ln=new WeakMap,as=new WeakSet,ca=function(t){{const s=Ss(t);if(s)return s}const e=Qr(t).array;if(e){const s=e.prefix,i=this.getEncoder(s);return o=>{b(e.count===-1||e.count===o.length,`array length mismatch; expected length ${e.count}`,"value",o);let a=o.map(i);return l(this,_t).has(s)&&(a=a.map(kt)),kt(ut(a))}}const n=this.types[t];if(n){const s=mo(l(this,_t).get(t));return i=>{const o=n.map(({name:a,type:c})=>{const u=this.getEncoder(c)(i[a]);return l(this,_t).has(c)?kt(u):u});return o.unshift(s),ut(o)}}b(!1,`unknown type: ${t}`,"type",t)};let ss=Et;function Rs(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):b(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}class Zl{constructor(t){W(this,"name");Ut(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error("unsupported coin")}async decodeAddress(t,e){throw new Error("unsupported coin")}}const la=new RegExp("^(ipfs)://(.*)$","i"),so=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),la,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var me,ze,ye,un,cs,ua;const fn=class fn{constructor(t,e,n){A(this,ye);W(this,"provider");W(this,"address");W(this,"name");A(this,me);A(this,ze);Ut(this,{provider:t,address:e,name:n}),h(this,me,null),h(this,ze,new dr(e,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t))}async supportsWildcard(){return l(this,me)==null&&h(this,me,(async()=>{try{return await l(this,ze).supportsInterface("0x9061b923")}catch(t){if(Ft(t,"CALL_EXCEPTION"))return!1;throw h(this,me,null),t}})()),await l(this,me)}async getAddress(t){if(t==null&&(t=60),t===60)try{const i=await I(this,ye,un).call(this,"addr(bytes32)");return i==null||i===Ar?null:i}catch(i){if(Ft(i,"CALL_EXCEPTION"))return null;throw i}if(t>=0&&t<2147483648){let i=t+2147483648;const o=await I(this,ye,un).call(this,"addr(bytes32,uint)",[i]);if(ct(o,20))return q(o)}let e=null;for(const i of this.provider.plugins)if(i instanceof Zl&&i.supportsCoinType(t)){e=i;break}if(e==null)return null;const n=await I(this,ye,un).call(this,"addr(bytes32,uint)",[t]);if(n==null||n==="0x")return null;const s=await e.decodeAddress(t,n);if(s!=null)return s;S(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:n}})}async getText(t){const e=await I(this,ye,un).call(this,"text(bytes32,string)",[t]);return e==null||e==="0x"?null:e}async getContentHash(){const t=await I(this,ye,un).call(this,"contenthash(bytes32)");if(t==null||t==="0x")return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const s=e[1]==="e3010170"?"ipfs":"ipns",i=parseInt(e[4],16);if(e[5].length===i*2)return`${s}://${Ma("0x"+e[2])}`}const n=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;S(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const e=await this.getText("avatar");if(e==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:e});for(let n=0;n<so.length;n++){const s=e.match(so[n]);if(s==null)continue;const i=s[1].toLowerCase();switch(i){case"https":case"data":return t.push({type:"url",value:e}),{linkage:t,url:e};case"ipfs":{const o=Rs(e);return t.push({type:"ipfs",value:e}),t.push({type:"url",value:o}),{linkage:t,url:o}}case"erc721":case"erc1155":{const o=i==="erc721"?"tokenURI(uint256)":"uri(uint256)";t.push({type:i,value:e});const a=await this.getAddress();if(a==null)return t.push({type:"!owner",value:""}),{url:null,linkage:t};const c=(s[2]||"").split("/");if(c.length!==2)return t.push({type:`!${i}caip`,value:s[2]||""}),{url:null,linkage:t};const u=c[1],d=new dr(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(i==="erc721"){const g=await d.ownerOf(u);if(a!==g)return t.push({type:"!owner",value:g}),{url:null,linkage:t};t.push({type:"owner",value:g})}else if(i==="erc1155"){const g=await d.balanceOf(a,u);if(!g)return t.push({type:"!balance",value:"0"}),{url:null,linkage:t};t.push({type:"balance",value:g.toString()})}let f=await d[o](u);if(f==null||f==="0x")return t.push({type:"!metadata-url",value:""}),{url:null,linkage:t};t.push({type:"metadata-url-base",value:f}),i==="erc1155"&&(f=f.replace("{id}",_n(u,32).substring(2)),t.push({type:"metadata-url-expanded",value:f})),f.match(/^ipfs:/i)&&(f=Rs(f)),t.push({type:"metadata-url",value:f});let p={};const w=await new ie(f).send();w.assertOk();try{p=w.bodyJson}catch{try{t.push({type:"!metadata",value:w.bodyText})}catch{const E=w.body;return E&&t.push({type:"!metadata",value:D(E)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!p)return t.push({type:"!metadata",value:""}),{url:null,linkage:t};t.push({type:"metadata",value:JSON.stringify(p)});let m=p.image;if(typeof m!="string")return t.push({type:"!imageUrl",value:""}),{url:null,linkage:t};if(!m.match(/^(https:\/\/|data:)/i)){if(m.match(la)==null)return t.push({type:"!imageUrl-ipfs",value:m}),{url:null,linkage:t};t.push({type:"imageUrl-ipfs",value:m}),m=Rs(m)}return t.push({type:"url",value:m}),{linkage:t,url:m}}}}}catch{}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),n=e.getPlugin("org.ethers.plugins.network.Ens");return S(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:e}}),n.address}static async fromName(t,e){var s;let n=e;for(;;){if(n===""||n==="."||e!=="eth"&&n==="eth")return null;const i=await I(s=fn,cs,ua).call(s,t,n);if(i!=null){const o=new fn(t,i,e);return n!==e&&!await o.supportsWildcard()?null:o}n=n.split(".").slice(1).join(".")}}};me=new WeakMap,ze=new WeakMap,ye=new WeakSet,un=async function(t,e){e=(e||[]).slice();const n=l(this,ze).interface;e.unshift(Ys(this.name));let s=null;await this.supportsWildcard()&&(s=n.getFunction(t),S(s,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[Cl(this.name,255),n.encodeFunctionData(s,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const i=await l(this,ze)[t](...e);return s?n.decodeFunctionResult(s,i)[0]:i}catch(i){if(!Ft(i,"CALL_EXCEPTION"))throw i}return null},cs=new WeakSet,ua=async function(t,e){const n=await fn.getEnsAddress(t);try{const i=await new dr(n,["function resolver(bytes32) view returns (address)"],t).resolver(Ys(e),{enableCcipRead:!0});return i===Ar?null:i}catch(s){throw s}return null},A(fn,cs);let is=fn;const io=BigInt(0);function M(r,t){return function(e){return e==null?t:r(e)}}function ms(r,t){return e=>{if(t&&e==null)return null;if(!Array.isArray(e))throw new Error("not an array");return e.map(n=>r(n))}}function Or(r,t){return e=>{const n={};for(const s in r){let i=s;if(t&&s in t&&!(i in e)){for(const o of t[s])if(o in e){i=o;break}}try{const o=r[s](e[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";S(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:e})}}return n}}function Yl(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}b(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function sr(r){return b(ct(r,!0),"invalid data","value",r),r}function st(r){return b(ct(r,32),"invalid hash","value",r),r}const ql=Or({address:q,blockHash:st,blockNumber:J,data:sr,index:J,removed:M(Yl,!1),topics:ms(st),transactionHash:st,transactionIndex:J},{index:["logIndex"]});function Wl(r){return ql(r)}const Xl=Or({hash:M(st),parentHash:st,parentBeaconBlockRoot:M(st,null),number:J,timestamp:J,nonce:M(sr),difficulty:R,gasLimit:R,gasUsed:R,stateRoot:M(st,null),receiptsRoot:M(st,null),blobGasUsed:M(R,null),excessBlobGas:M(R,null),miner:M(q),prevRandao:M(st,null),extraData:sr,baseFeePerGas:M(R)},{prevRandao:["mixHash"]});function _l(r){const t=Xl(r);return t.transactions=r.transactions.map(e=>typeof e=="string"?e:ha(e)),t}const $l=Or({transactionIndex:J,blockNumber:J,transactionHash:st,address:q,topics:ms(st),data:sr,index:J,blockHash:st},{index:["logIndex"]});function tu(r){return $l(r)}const eu=Or({to:M(q,null),from:M(q,null),contractAddress:M(q,null),index:J,root:M(D),gasUsed:R,blobGasUsed:M(R,null),logsBloom:M(sr),blockHash:st,hash:st,logs:ms(tu),blockNumber:J,cumulativeGasUsed:R,effectiveGasPrice:M(R),blobGasPrice:M(R,null),status:M(J),type:M(J,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function nu(r){return eu(r)}function ha(r){r.to&&R(r.to)===io&&(r.to="0x0000000000000000000000000000000000000000");const t=Or({hash:st,index:M(J,void 0),type:e=>e==="0x"||e==null?0:J(e),accessList:M(ir,null),blobVersionedHashes:M(ms(st,!0),null),blockHash:M(st,null),blockNumber:M(J,null),transactionIndex:M(J,null),from:q,gasPrice:M(R),maxPriorityFeePerGas:M(R),maxFeePerGas:M(R),maxFeePerBlobGas:M(R,null),gasLimit:R,to:M(q,null),value:R,nonce:J,data:sr,creates:M(q,null),chainId:M(R,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(t.to==null&&t.creates==null&&(t.creates=Gc(t)),(r.type===1||r.type===2)&&r.accessList==null&&(t.accessList=[]),r.signature?t.signature=Lt.from(r.signature):t.signature=Lt.from(r),t.chainId==null){const e=t.signature.legacyChainId;e!=null&&(t.chainId=e)}return t.blockHash&&R(t.blockHash)===io&&(t.blockHash=null),t}const ru="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Dr{constructor(t){W(this,"name");Ut(this,{name:t})}clone(){return new Dr(this.name)}}class ys extends Dr{constructor(e,n){e==null&&(e=0);super(`org.ethers.network.plugins.GasCost#${e||0}`);W(this,"effectiveBlock");W(this,"txBase");W(this,"txCreate");W(this,"txDataZero");W(this,"txDataNonzero");W(this,"txAccessListStorageKey");W(this,"txAccessListAddress");const s={effectiveBlock:e};function i(o,a){let c=(n||{})[o];c==null&&(c=a),b(typeof c=="number",`invalud value for ${o}`,"costs",n),s[o]=c}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),Ut(this,s)}clone(){return new ys(this.effectiveBlock,this)}}class bs extends Dr{constructor(e,n){super("org.ethers.plugins.network.Ens");W(this,"address");W(this,"targetNetwork");Ut(this,{address:e||ru,targetNetwork:n??1})}clone(){return new bs(this.address,this.targetNetwork)}}var Ir,Nr;class su extends Dr{constructor(e,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");A(this,Ir);A(this,Nr);h(this,Ir,e),h(this,Nr,n)}get url(){return l(this,Ir)}get processFunc(){return l(this,Nr)}clone(){return this}}Ir=new WeakMap,Nr=new WeakMap;const Os=new Map;var Un,Mn,be;const dn=class dn{constructor(t,e){A(this,Un);A(this,Mn);A(this,be);h(this,Un,t),h(this,Mn,R(e)),h(this,be,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return l(this,Un)}set name(t){h(this,Un,t)}get chainId(){return l(this,Mn)}set chainId(t){h(this,Mn,R(t,"chainId"))}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===R(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===R(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===R(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(l(this,be).values())}attachPlugin(t){if(l(this,be).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return l(this,be).set(t.name,t.clone()),this}getPlugin(t){return l(this,be).get(t)||null}getPlugins(t){return this.plugins.filter(e=>e.name.split("#")[0]===t)}clone(){const t=new dn(this.name,this.chainId);return this.plugins.forEach(e=>{t.attachPlugin(e.clone())}),t}computeIntrinsicGas(t){const e=this.getPlugin("org.ethers.plugins.network.GasCost")||new ys;let n=e.txBase;if(t.to==null&&(n+=e.txCreate),t.data)for(let s=2;s<t.data.length;s+=2)t.data.substring(s,s+2)==="00"?n+=e.txDataZero:n+=e.txDataNonzero;if(t.accessList){const s=ir(t.accessList);for(const i in s)n+=e.txAccessListAddress+e.txAccessListStorageKey*s[i].storageKeys.length}return n}static from(t){if(iu(),t==null)return dn.from("mainnet");if(typeof t=="number"&&(t=BigInt(t)),typeof t=="string"||typeof t=="bigint"){const e=Os.get(t);if(e)return e();if(typeof t=="bigint")return new dn("unknown",t);b(!1,"unknown network","network",t)}if(typeof t.clone=="function")return t.clone();if(typeof t=="object"){b(typeof t.name=="string"&&typeof t.chainId=="number","invalid network object name or chainId","network",t);const e=new dn(t.name,t.chainId);return(t.ensAddress||t.ensNetwork!=null)&&e.attachPlugin(new bs(t.ensAddress,t.ensNetwork)),e}b(!1,"invalid network","network",t)}static register(t,e){typeof t=="number"&&(t=BigInt(t));const n=Os.get(t);n&&b(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",t),Os.set(t,e)}};Un=new WeakMap,Mn=new WeakMap,be=new WeakMap;let jt=dn;function oo(r,t){const e=String(r);if(!e.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${r}`);const n=e.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${r}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function ao(r){return new su(r,async(t,e,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),t()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:oo(a.maxFee,9),maxPriorityFeePerGas:oo(a.maxPriorityFee,9)}}catch(i){S(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let co=!1;function iu(){if(co)return;co=!0;function r(t,e,n){const s=function(){const i=new jt(t,e);return n.ensNetwork!=null&&i.attachPlugin(new bs(null,n.ensNetwork)),i.attachPlugin(new ys),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};jt.register(t,s),jt.register(e,s),n.altNames&&n.altNames.forEach(i=>{jt.register(i,s)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("linea-sepolia",59141,{}),r("matic",137,{ensNetwork:1,plugins:[ao("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[ao("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function qs(r){return JSON.parse(JSON.stringify(r))}var $t,xt,Ee,Jt,Qn,zr;class ou{constructor(t){A(this,Qn);A(this,$t);A(this,xt);A(this,Ee);A(this,Jt);h(this,$t,t),h(this,xt,null),h(this,Ee,4e3),h(this,Jt,-2)}get pollingInterval(){return l(this,Ee)}set pollingInterval(t){h(this,Ee,t)}start(){l(this,xt)||(h(this,xt,l(this,$t)._setTimeout(I(this,Qn,zr).bind(this),l(this,Ee))),I(this,Qn,zr).call(this))}stop(){l(this,xt)&&(l(this,$t)._clearTimeout(l(this,xt)),h(this,xt,null))}pause(t){this.stop(),t&&h(this,Jt,-2)}resume(){this.start()}}$t=new WeakMap,xt=new WeakMap,Ee=new WeakMap,Jt=new WeakMap,Qn=new WeakSet,zr=async function(){try{const t=await l(this,$t).getBlockNumber();if(l(this,Jt)===-2){h(this,Jt,t);return}if(t!==l(this,Jt)){for(let e=l(this,Jt)+1;e<=t;e++){if(l(this,xt)==null)return;await l(this,$t).emit("block",e)}h(this,Jt,t)}}catch{}l(this,xt)!=null&&h(this,xt,l(this,$t)._setTimeout(I(this,Qn,zr).bind(this),l(this,Ee)))};var Ke,je,Be;class wi{constructor(t){A(this,Ke);A(this,je);A(this,Be);h(this,Ke,t),h(this,Be,!1),h(this,je,e=>{this._poll(e,l(this,Ke))})}async _poll(t,e){throw new Error("sub-classes must override this")}start(){l(this,Be)||(h(this,Be,!0),l(this,je).call(this,-2),l(this,Ke).on("block",l(this,je)))}stop(){l(this,Be)&&(h(this,Be,!1),l(this,Ke).off("block",l(this,je)))}pause(t){this.stop()}resume(){this.start()}}Ke=new WeakMap,je=new WeakMap,Be=new WeakMap;var Gn,te;class au extends wi{constructor(e,n){super(e);A(this,Gn);A(this,te);h(this,Gn,n),h(this,te,-2)}pause(e){e&&h(this,te,-2),super.pause(e)}async _poll(e,n){const s=await n.getBlock(l(this,Gn));s!=null&&(l(this,te)===-2?h(this,te,s.number):s.number>l(this,te)&&(n.emit(l(this,Gn),s.number),h(this,te,s.number)))}}Gn=new WeakMap,te=new WeakMap;var ls;class cu extends wi{constructor(e,n){super(e);A(this,ls);h(this,ls,qs(n))}async _poll(e,n){throw new Error("@TODO")}}ls=new WeakMap;var Hn;class lu extends wi{constructor(e,n){super(e);A(this,Hn);h(this,Hn,n)}async _poll(e,n){const s=await n.getTransactionReceipt(l(this,Hn));s&&n.emit(l(this,Hn),s)}}Hn=new WeakMap;var ee,Jn,Vn,xe,Ct,us,fa;class mi{constructor(t,e){A(this,us);A(this,ee);A(this,Jn);A(this,Vn);A(this,xe);A(this,Ct);h(this,ee,t),h(this,Jn,qs(e)),h(this,Vn,I(this,us,fa).bind(this)),h(this,xe,!1),h(this,Ct,-2)}start(){l(this,xe)||(h(this,xe,!0),l(this,Ct)===-2&&l(this,ee).getBlockNumber().then(t=>{h(this,Ct,t)}),l(this,ee).on("block",l(this,Vn)))}stop(){l(this,xe)&&(h(this,xe,!1),l(this,ee).off("block",l(this,Vn)))}pause(t){this.stop(),t&&h(this,Ct,-2)}resume(){this.start()}}ee=new WeakMap,Jn=new WeakMap,Vn=new WeakMap,xe=new WeakMap,Ct=new WeakMap,us=new WeakSet,fa=async function(t){if(l(this,Ct)===-2)return;const e=qs(l(this,Jn));e.fromBlock=l(this,Ct)+1,e.toBlock=t;const n=await l(this,ee).getLogs(e);if(n.length===0){l(this,Ct)<t-60&&h(this,Ct,t-60);return}for(const s of n)l(this,ee).emit(l(this,Jn),s),h(this,Ct,s.blockNumber)};const uu=BigInt(2),hu=10;function Gr(r){return r&&typeof r.then=="function"}function Kr(r,t){return r+":"+JSON.stringify(t,(e,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class da{constructor(t){W(this,"name");Ut(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function fu(r){return JSON.parse(JSON.stringify(r))}function Ws(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function Ds(r,t){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(ct(r,32)){const e=r.toLowerCase();return{type:"transaction",tag:Kr("tx",{hash:e}),hash:e}}if(r.orphan){const e=r;return{type:"orphan",tag:Kr("orphan",e),filter:fu(e)}}if(r.address||r.topics){const e=r,n={topics:(e.topics||[]).map(s=>s==null?null:Array.isArray(s)?Ws(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(e.address){const s=[],i=[],o=a=>{ct(a)?s.push(a):i.push((async()=>{s.push(await Kt(a,t))})())};Array.isArray(e.address)?e.address.forEach(o):o(e.address),i.length&&await Promise.all(i),n.address=Ws(s.map(a=>a.toLowerCase()))}return{filter:n,tag:Kr("event",n),type:"event"}}b(!1,"unknown ProviderEvent","event",r)}function Ts(){return new Date().getTime()}const du={cacheTimeout:250,pollingInterval:4e3};var it,Ce,ot,zn,mt,Ze,Pe,ne,kr,Pt,Kn,jn,L,pt,Xs,_s,hr,$s,fr,jr;class gu{constructor(t,e){A(this,L);A(this,it);A(this,Ce);A(this,ot);A(this,zn);A(this,mt);A(this,Ze);A(this,Pe);A(this,ne);A(this,kr);A(this,Pt);A(this,Kn);A(this,jn);if(h(this,jn,Object.assign({},du,e||{})),t==="any")h(this,Ze,!0),h(this,mt,null);else if(t){const n=jt.from(t);h(this,Ze,!1),h(this,mt,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else h(this,Ze,!1),h(this,mt,null);h(this,ne,-1),h(this,Pe,new Map),h(this,it,new Map),h(this,Ce,new Map),h(this,ot,null),h(this,zn,!1),h(this,kr,1),h(this,Pt,new Map),h(this,Kn,!1)}get pollingInterval(){return l(this,jn).pollingInterval}get provider(){return this}get plugins(){return Array.from(l(this,Ce).values())}attachPlugin(t){if(l(this,Ce).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return l(this,Ce).set(t.name,t.connect(this)),this}getPlugin(t){return l(this,Ce).get(t)||null}get disableCcipRead(){return l(this,Kn)}set disableCcipRead(t){h(this,Kn,!!t)}async ccipReadFetch(t,e,n){if(this.disableCcipRead||n.length===0||t.to==null)return null;const s=t.to.toLowerCase(),i=e.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const c=n[a],u=c.replace("{sender}",s).replace("{data}",i),d=new ie(u);c.indexOf("{data}")===-1&&(d.body={data:i,sender:s}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:d,index:a,urls:n});let f="unknown error",p;try{p=await d.send()}catch(w){o.push(w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:d,result:{error:w}});continue}try{const w=p.bodyJson;if(w.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:d,result:w}),w.data;w.message&&(f=w.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:d,result:w})}catch{}S(p.statusCode<400||p.statusCode>=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:c,errorMessage:f}}),o.push(f)}S(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:n,errorMessages:o}})}_wrapBlock(t,e){return new Sa(_l(t),this)}_wrapLog(t,e){return new Ra(Wl(t),this)}_wrapTransactionReceipt(t,e){return new Oa(nu(t),this)}_wrapTransactionResponse(t,e){return new Da(ha(t),this)}_detectNetwork(){S(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){S(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=J(await I(this,L,pt).call(this,{method:"getBlockNumber"}),"%response");return l(this,ne)>=0&&h(this,ne,t),t}_getAddress(t){return Kt(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return t}if(ct(t))return ct(t,32)?t:hn(t);if(typeof t=="bigint"&&(t=J(t,"blockTag")),typeof t=="number")return t>=0?hn(t):l(this,ne)>=0?hn(l(this,ne)+t):this.getBlockNumber().then(e=>hn(e+t));b(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const e=(t.topics||[]).map(c=>c==null?null:Array.isArray(c)?Ws(c.map(u=>u.toLowerCase())):c.toLowerCase()),n="blockHash"in t?t.blockHash:void 0,s=(c,u,d)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(u!=null||d!=null))throw new Error("invalid filter");const p={};return f&&(p.address=f),e.length&&(p.topics=e),u&&(p.fromBlock=u),d&&(p.toBlock=d),n&&(p.blockHash=n),p};let i=[];if(t.address)if(Array.isArray(t.address))for(const c of t.address)i.push(this._getAddress(c));else i.push(this._getAddress(t.address));let o;"fromBlock"in t&&(o=this._getBlockTag(t.fromBlock));let a;return"toBlock"in t&&(a=this._getBlockTag(t.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(t){const e=Us(t),n=[];if(["to","from"].forEach(s=>{if(e[s]==null)return;const i=Kt(e[s],this);Gr(i)?n.push(async function(){e[s]=await i}()):e[s]=i}),e.blockTag!=null){const s=this._getBlockTag(e.blockTag);Gr(s)?n.push(async function(){e.blockTag=await s}()):e.blockTag=s}return n.length?async function(){return await Promise.all(n),e}():e}async getNetwork(){if(l(this,mt)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw l(this,mt)===s&&h(this,mt,null),i}})();return h(this,mt,s),(await s).clone()}const t=l(this,mt),[e,n]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==n.chainId&&(l(this,Ze)?(this.emit("network",n,e),l(this,mt)===t&&h(this,mt,Promise.resolve(n))):S(!1,`network changed: ${e.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await Bt({_block:I(this,L,$s).call(this,"latest",!1),gasPrice:(async()=>{try{const d=await I(this,L,pt).call(this,{method:"getGasPrice"});return R(d,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const d=await I(this,L,pt).call(this,{method:"getPriorityFee"});return R(d,"%response")}catch{}return null})()});let a=null,c=null;const u=this._wrapBlock(s,t);return u&&u.baseFeePerGas&&(c=o??BigInt("1000000000"),a=u.baseFeePerGas*uu+c),new Ii(i,a,c)},n=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new ie(n.url),i=await n.processFunc(e,this,s);return new Ii(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return Gr(e)&&(e=await e),R(await I(this,L,pt).call(this,{method:"estimateGas",transaction:e}),"%response")}async call(t){const{tx:e,blockTag:n}=await Bt({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await I(this,L,_s).call(this,I(this,L,Xs).call(this,e,n,t.enableCcipRead?0:-1))}async getBalance(t,e){return R(await I(this,L,hr).call(this,{method:"getBalance"},t,e),"%response")}async getTransactionCount(t,e){return J(await I(this,L,hr).call(this,{method:"getTransactionCount"},t,e),"%response")}async getCode(t,e){return D(await I(this,L,hr).call(this,{method:"getCode"},t,e))}async getStorage(t,e,n){const s=R(e,"position");return D(await I(this,L,hr).call(this,{method:"getStorage",position:s},t,n))}async broadcastTransaction(t){const{blockNumber:e,hash:n,network:s}=await Bt({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),i=rs.from(t);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(e)}async getBlock(t,e){const{network:n,params:s}=await Bt({network:this.getNetwork(),params:I(this,L,$s).call(this,t,!!e)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(t){const{network:e,params:n}=await Bt({network:this.getNetwork(),params:I(this,L,pt).call(this,{method:"getTransaction",hash:t})});return n==null?null:this._wrapTransactionResponse(n,e)}async getTransactionReceipt(t){const{network:e,params:n}=await Bt({network:this.getNetwork(),params:I(this,L,pt).call(this,{method:"getTransactionReceipt",hash:t})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await I(this,L,pt).call(this,{method:"getTransaction",hash:t});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,e)}async getTransactionResult(t){const{result:e}=await Bt({network:this.getNetwork(),result:I(this,L,pt).call(this,{method:"getTransactionResult",hash:t})});return e==null?null:D(e)}async getLogs(t){let e=this._getFilter(t);Gr(e)&&(e=await e);const{network:n,params:s}=await Bt({network:this.getNetwork(),params:I(this,L,pt).call(this,{method:"getLogs",filter:e})});return s.map(i=>this._wrapLog(i,n))}_getProvider(t){S(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await is.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){t=q(t);const e=Ys(t.substring(2).toLowerCase()+".addr.reverse");try{const n=await is.getEnsAddress(this),i=await new dr(n,["function resolver(bytes32) view returns (address)"],this).resolver(e);if(i==null||i===Ar)return null;const a=await new dr(i,["function name(bytes32) view returns (string)"],this).name(e);return await this.resolveName(a)!==t?null:a}catch(n){if(Ft(n,"BAD_DATA")&&n.value==="0x"||Ft(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(t,e,n){const s=e??1;return s===0?this.getTransactionReceipt(t):new Promise(async(i,o)=>{let a=null;const c=async u=>{try{const d=await this.getTransactionReceipt(t);if(d!=null&&u-d.blockNumber+1>=s){i(d),a&&(clearTimeout(a),a=null);return}}catch(d){console.log("EEE",d)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(rt("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(t){S(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const e=l(this,Pt).get(t);e&&(e.timer&&clearTimeout(e.timer),l(this,Pt).delete(t))}_setTimeout(t,e){e==null&&(e=0);const n=Tr(this,kr)._++,s=()=>{l(this,Pt).delete(n),t()};if(this.paused)l(this,Pt).set(n,{timer:null,func:s,time:e});else{const i=setTimeout(s,e);l(this,Pt).set(n,{timer:i,func:s,time:Ts()})}return n}_forEachSubscriber(t){for(const e of l(this,it).values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new da(t.type);case"block":{const e=new ou(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new au(this,t.type);case"event":return new mi(this,t.filter);case"transaction":return new lu(this,t.hash);case"orphan":return new cu(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const n of l(this,it).values())if(n.subscriber===t){n.started&&n.subscriber.stop(),n.subscriber=e,n.started&&e.start(),l(this,ot)!=null&&e.pause(l(this,ot));break}}async on(t,e){const n=await I(this,L,jr).call(this,t);return n.listeners.push({listener:e,once:!1}),n.started||(n.subscriber.start(),n.started=!0,l(this,ot)!=null&&n.subscriber.pause(l(this,ot))),this}async once(t,e){const n=await I(this,L,jr).call(this,t);return n.listeners.push({listener:e,once:!0}),n.started||(n.subscriber.start(),n.started=!0,l(this,ot)!=null&&n.subscriber.pause(l(this,ot))),this}async emit(t,...e){const n=await I(this,L,fr).call(this,t,e);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new Ta(this,o?null:i,t);try{i.call(this,...e,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),l(this,it).delete(n.tag)),s>0}async listenerCount(t){if(t){const n=await I(this,L,fr).call(this,t);return n?n.listeners.length:0}let e=0;for(const{listeners:n}of l(this,it).values())e+=n.length;return e}async listeners(t){if(t){const n=await I(this,L,fr).call(this,t);return n?n.listeners.map(({listener:s})=>s):[]}let e=[];for(const{listeners:n}of l(this,it).values())e=e.concat(n.map(({listener:s})=>s));return e}async off(t,e){const n=await I(this,L,fr).call(this,t);if(!n)return this;if(e){const s=n.listeners.map(({listener:i})=>i).indexOf(e);s>=0&&n.listeners.splice(s,1)}return(!e||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),l(this,it).delete(n.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:n,subscriber:s}=await I(this,L,jr).call(this,t);n&&s.stop(),l(this,it).delete(e)}else for(const[e,{started:n,subscriber:s}]of l(this,it))n&&s.stop(),l(this,it).delete(e);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return l(this,zn)}destroy(){this.removeAllListeners();for(const t of l(this,Pt).keys())this._clearTimeout(t);h(this,zn,!0)}get paused(){return l(this,ot)!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(h(this,ne,-1),l(this,ot)!=null){if(l(this,ot)==!!t)return;S(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(e=>e.pause(t)),h(this,ot,!!t);for(const e of l(this,Pt).values())e.timer&&clearTimeout(e.timer),e.time=Ts()-e.time}resume(){if(l(this,ot)!=null){this._forEachSubscriber(t=>t.resume()),h(this,ot,null);for(const t of l(this,Pt).values()){let e=t.time;e<0&&(e=0),t.time=Ts(),setTimeout(t.func,e)}}}}it=new WeakMap,Ce=new WeakMap,ot=new WeakMap,zn=new WeakMap,mt=new WeakMap,Ze=new WeakMap,Pe=new WeakMap,ne=new WeakMap,kr=new WeakMap,Pt=new WeakMap,Kn=new WeakMap,jn=new WeakMap,L=new WeakSet,pt=async function(t){const e=l(this,jn).cacheTimeout;if(e<0)return await this._perform(t);const n=Kr(t.method,t);let s=l(this,Pe).get(n);return s||(s=this._perform(t),l(this,Pe).set(n,s),setTimeout(()=>{l(this,Pe).get(n)===s&&l(this,Pe).delete(n)},e)),await s},Xs=async function(t,e,n){S(n<hu,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const s=Us(t);try{return D(await this._perform({method:"call",transaction:s,blockTag:e}))}catch(i){if(!this.disableCcipRead&&Ia(i)&&i.data&&n>=0&&e==="latest"&&s.to!=null&&at(i.data,0,4)==="0x556f1830"){const o=i.data,a=await Kt(s.to,this);let c;try{c=yu(at(i.data,4))}catch(f){S(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}S(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:s,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const u=await this.ccipReadFetch(s,c.calldata,c.urls);S(u!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:s,info:{data:i.data,errorArgs:c.errorArgs}});const d={to:a,data:ut([c.selector,mu([u,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:d});try{const f=await I(this,L,Xs).call(this,d,e,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},d),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},d),error:f}),f}}throw i}},_s=async function(t){const{value:e}=await Bt({network:this.getNetwork(),value:t});return e},hr=async function(t,e,n){let s=this._getAddress(e),i=this._getBlockTag(n);return(typeof s!="string"||typeof i!="string")&&([s,i]=await Promise.all([s,i])),await I(this,L,_s).call(this,I(this,L,pt).call(this,Object.assign(t,{address:s,blockTag:i})))},$s=async function(t,e){if(ct(t,32))return await I(this,L,pt).call(this,{method:"getBlock",blockHash:t,includeTransactions:e});let n=this._getBlockTag(t);return typeof n!="string"&&(n=await n),await I(this,L,pt).call(this,{method:"getBlock",blockTag:n,includeTransactions:e})},fr=async function(t,e){let n=await Ds(t,this);return n.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(n=await Ds({orphan:"drop-log",log:e[0]},this)),l(this,it).get(n.tag)||null},jr=async function(t){const e=await Ds(t,this),n=e.tag;let s=l(this,it).get(n);return s||(s={subscriber:this._getSubscriber(e),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},l(this,it).set(n,s)),s};function pu(r,t){try{const e=ti(r,t);if(e)return Ls(e)}catch{}return null}function ti(r,t){if(r==="0x")return null;try{const e=J(at(r,t,t+32)),n=J(at(r,e,e+32));return at(r,e+32,e+32+n)}catch{}return null}function lo(r){const t=yt(r);if(t.length>32)throw new Error("internal; should not happen");const e=new Uint8Array(32);return e.set(t,32-t.length),e}function Au(r){if(r.length%32===0)return r;const t=new Uint8Array(Math.ceil(r.length/32)*32);return t.set(r),t}const wu=new Uint8Array([]);function mu(r){const t=[];let e=0;for(let n=0;n<r.length;n++)t.push(wu),e+=32;for(let n=0;n<r.length;n++){const s=j(r[n]);t[n]=lo(e),t.push(lo(s.length)),t.push(Au(s)),e+=32+Math.ceil(s.length/32)*32}return ut(t)}const uo="0x0000000000000000000000000000000000000000000000000000000000000000";function yu(r){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};S(gn(r)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const e=at(r,0,32);S(at(e,0,12)===at(uo,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=at(e,12);try{const n=[],s=J(at(r,32,64)),i=J(at(r,s,s+32)),o=at(r,s+32);for(let a=0;a<i;a++){const c=pu(o,a*32);if(c==null)throw new Error("abort");n.push(c)}t.urls=n}catch{S(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=ti(r,64);if(n==null)throw new Error("abort");t.calldata=n}catch{S(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}S(at(r,100,128)===at(uo,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=at(r,96,100);try{const n=ti(r,128);if(n==null)throw new Error("abort");t.extraData=n}catch{S(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>t[n]),t}function an(r,t){if(r.provider)return r.provider;S(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function ho(r,t){let e=Us(t);if(e.to!=null&&(e.to=Kt(e.to,r)),e.from!=null){const n=e.from;e.from=Promise.all([r.getAddress(),Kt(n,r)]).then(([s,i])=>(b(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else e.from=r.getAddress();return await Bt(e)}class ga{constructor(t){W(this,"provider");Ut(this,{provider:t||null})}async getNonce(t){return an(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await ho(this,t)}async populateTransaction(t){const e=an(this,"populateTransaction"),n=await ho(this,t);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=R(n.chainId);b(o===s.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?b(!1,"eip-1559 transaction do not support gasPrice","tx",t):(n.type===0||n.type===1)&&i&&b(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await e.getFeeData();S(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await e.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(S(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):S(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Bt(n)}async estimateGas(t){return an(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return an(this,"call").call(await this.populateCall(t))}async resolveName(t){return await an(this,"resolveName").resolveName(t)}async sendTransaction(t){const e=an(this,"sendTransaction"),n=await this.populateTransaction(t);delete n.from;const s=rs.from(n);return await e.broadcastTransaction(await this.signTransaction(s))}}var Zn,Zr;const bi=class bi extends ga{constructor(e,n){super(n);A(this,Zn);W(this,"address");Ut(this,{address:e})}async getAddress(){return this.address}connect(e){return new bi(this.address,e)}async signTransaction(e){I(this,Zn,Zr).call(this,"transactions","signTransaction")}async signMessage(e){I(this,Zn,Zr).call(this,"messages","signMessage")}async signTypedData(e,n,s){I(this,Zn,Zr).call(this,"typed-data","signTypedData")}};Zn=new WeakSet,Zr=function(e,n){S(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:n})};let fo=bi;function bu(r){return JSON.parse(JSON.stringify(r))}var lt,Vt,Ye,Ie,qe,Yn,ve,ei,ni;class pa{constructor(t){A(this,ve);A(this,lt);A(this,Vt);A(this,Ye);A(this,Ie);A(this,qe);A(this,Yn);h(this,lt,t),h(this,Vt,null),h(this,Ye,I(this,ve,ei).bind(this)),h(this,Ie,!1),h(this,qe,null),h(this,Yn,!1)}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,e){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}start(){l(this,Ie)||(h(this,Ie,!0),I(this,ve,ei).call(this,-2))}stop(){l(this,Ie)&&(h(this,Ie,!1),h(this,Yn,!0),I(this,ve,ni).call(this),l(this,lt).off("block",l(this,Ye)))}pause(t){t&&I(this,ve,ni).call(this),l(this,lt).off("block",l(this,Ye))}resume(){this.start()}}lt=new WeakMap,Vt=new WeakMap,Ye=new WeakMap,Ie=new WeakMap,qe=new WeakMap,Yn=new WeakMap,ve=new WeakSet,ei=async function(t){try{l(this,Vt)==null&&h(this,Vt,this._subscribe(l(this,lt)));let e=null;try{e=await l(this,Vt)}catch(i){if(!Ft(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(e==null){h(this,Vt,null),l(this,lt)._recoverSubscriber(this,this._recover(l(this,lt)));return}const n=await l(this,lt).getNetwork();if(l(this,qe)||h(this,qe,n),l(this,qe).chainId!==n.chainId)throw new Error("chaid changed");if(l(this,Yn))return;const s=await l(this,lt).send("eth_getFilterChanges",[e]);await this._emitResults(l(this,lt),s)}catch(e){console.log("@TODO",e)}l(this,lt).once("block",l(this,Ye))},ni=function(){const t=l(this,Vt);t&&(h(this,Vt,null),t.then(e=>{l(this,lt).destroyed||l(this,lt).send("eth_uninstallFilter",[e])}))};var We;class Eu extends pa{constructor(e,n){super(e);A(this,We);h(this,We,bu(n))}_recover(e){return new mi(e,l(this,We))}async _subscribe(e){return await e.send("eth_newFilter",[l(this,We)])}async _emitResults(e,n){for(const s of n)e.emit(l(this,We),e._wrapLog(s,e._network))}}We=new WeakMap;class Bu extends pa{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,e){for(const n of e)t.emit("pending",n)}}const xu="bigint,boolean,function,number,string,symbol".split(/,/g);function Yr(r){if(r==null||xu.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(Yr);if(typeof r=="object")return Object.keys(r).reduce((t,e)=>(t[e]=r[e],t),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function Cu(r){return new Promise(t=>{setTimeout(t,r)})}function cn(r){return r&&r.toLowerCase()}function go(r){return r&&typeof r.pollingInterval=="number"}const Aa={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class Fs extends ga{constructor(e,n){super(e);W(this,"address");n=q(n),Ut(this,{address:n})}connect(e){S(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const n=Yr(e),s=[];if(n.from){const o=n.from;s.push((async()=>{const a=await Kt(o,this.provider);b(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&s.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;s.push((async()=>{n.to=await Kt(o,this.provider)})())}s.length&&await Promise.all(s);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(e){const n=await this.provider.getBlockNumber(),s=await this.sendUncheckedTransaction(e);return await new Promise((i,o)=>{const a=[1e3,100];let c=0;const u=async()=>{try{const d=await this.provider.getTransaction(s);if(d!=null){i(d.replaceableTransaction(n));return}}catch(d){if(Ft(d,"CANCELLED")||Ft(d,"BAD_DATA")||Ft(d,"NETWORK_ERROR")||Ft(d,"UNSUPPORTED_OPERATION")){d.info==null&&(d.info={}),d.info.sendTransactionHash=s,o(d);return}if(Ft(d,"INVALID_ARGUMENT")&&(c++,d.info==null&&(d.info={}),d.info.sendTransactionHash=s,c>10)){o(d);return}this.provider.emit("error",rt("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:d}))}this.provider._setTimeout(()=>{u()},a.pop()||4e3)};u()})}async signTransaction(e){const n=Yr(e);if(n.from){const i=await Kt(n.from,this.provider);b(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),n.from=i}else n.from=this.address;const s=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[s])}async signMessage(e){const n=typeof e=="string"?_e(e):e;return await this.provider.send("personal_sign",[D(n),this.address.toLowerCase()])}async signTypedData(e,n,s){const i=Yr(s),o=await ss.resolveNames(e,n,i,async a=>{const c=await Kt(a);return b(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ss.getPayload(o.domain,n,o.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const n=typeof e=="string"?_e(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),D(n)])}}var Xe,qn,re,zt,Tt,It,ht,vr,ri;class Pu extends gu{constructor(e,n){super(e,n);A(this,vr);A(this,Xe);A(this,qn);A(this,re);A(this,zt);A(this,Tt);A(this,It);A(this,ht);h(this,qn,1),h(this,Xe,Object.assign({},Aa,n||{})),h(this,re,[]),h(this,zt,null),h(this,It,null),h(this,ht,null);{let i=null;const o=new Promise(a=>{i=a});h(this,Tt,{promise:o,resolve:i})}const s=this._getOption("staticNetwork");typeof s=="boolean"?(b(!s||e!=="any","staticNetwork cannot be used on special network 'any'","options",n),s&&e!=null&&h(this,It,jt.from(e))):s&&(b(e==null||s.matches(e),"staticNetwork MUST match network object","options",n),h(this,It,s))}_getOption(e){return l(this,Xe)[e]}get _network(){return S(l(this,It),"network is not available yet","NETWORK_ERROR"),l(this,It)}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let s=e.transaction;if(s&&s.type!=null&&R(s.type)&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},s,{type:void 0})}))}}const n=this.getRpcRequest(e);return n!=null?await this.send(n.method,n.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e)if(e===!0){if(l(this,It))return l(this,It)}else return e;return l(this,ht)?await l(this,ht):this.ready?(h(this,ht,(async()=>{try{const n=jt.from(R(await this.send("eth_chainId",[])));return h(this,ht,null),n}catch(n){throw h(this,ht,null),n}})()),await l(this,ht)):(h(this,ht,(async()=>{const n={id:Tr(this,qn)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let s;try{s=(await this._send(n))[0],h(this,ht,null)}catch(i){throw h(this,ht,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:s}),"result"in s)return jt.from(R(s.result));throw this.getRpcError(n,s)})()),await l(this,ht))}_start(){l(this,Tt)==null||l(this,Tt).resolve==null||(l(this,Tt).resolve(),h(this,Tt,null),(async()=>{for(;l(this,It)==null&&!this.destroyed;)try{h(this,It,await this._detectNetwork())}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",rt("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await Cu(1e3)}I(this,vr,ri).call(this)})())}async _waitUntilReady(){if(l(this,Tt)!=null)return await l(this,Tt).promise}_getSubscriber(e){return e.type==="pending"?new Bu(this):e.type==="event"?this._getOption("polling")?new mi(this,e.filter):new Eu(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new da("orphan"):super._getSubscriber(e)}get ready(){return l(this,Tt)==null}getRpcTransaction(e){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(s=>{if(e[s]==null)return;let i=s;s==="gasLimit"&&(i="gas"),n[i]=hn(R(e[s],`tx.${s}`))}),["from","to","data"].forEach(s=>{e[s]!=null&&(n[s]=D(e[s]))}),e.accessList&&(n.accessList=ir(e.accessList)),e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes.map(s=>s.toLowerCase())),n}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[cn(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[cn(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[cn(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[cn(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(cn):e.filter.address=cn(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,n){const{method:s}=e,{error:i}=n;if(s==="eth_estimateGas"&&i.message){const c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return rt("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if(s==="eth_call"||s==="eth_estimateGas"){const c=si(i),u=Fa.getBuiltinCallException(s==="eth_call"?"call":"estimateGas",e.params[0],c?c.data:null);return u.info={error:i,payload:e},u}const o=JSON.stringify(Nu(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return rt("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[s]||"unknown",reason:"rejected",info:{payload:e,error:i}});if(s==="eth_sendRawTransaction"||s==="eth_sendTransaction"){const c=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return rt("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return rt("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return rt("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return rt("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:s,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?rt("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):rt("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,n){if(this.destroyed)return Promise.reject(rt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const s=Tr(this,qn)._++,i=new Promise((o,a)=>{l(this,re).push({resolve:o,reject:a,payload:{method:e,params:n,id:s,jsonrpc:"2.0"}})});return I(this,vr,ri).call(this),i}async getSigner(e){e==null&&(e=0);const n=this.send("eth_accounts",[]);if(typeof e=="number"){const i=await n;if(e>=i.length)throw new Error("no such account");return new Fs(this,i[e])}const{accounts:s}=await Bt({network:this.getNetwork(),accounts:n});e=q(e);for(const i of s)if(q(i)===e)return new Fs(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new Fs(this,n))}destroy(){l(this,zt)&&(clearTimeout(l(this,zt)),h(this,zt,null));for(const{payload:e,reject:n}of l(this,re))n(rt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));h(this,re,[]),super.destroy()}}Xe=new WeakMap,qn=new WeakMap,re=new WeakMap,zt=new WeakMap,Tt=new WeakMap,It=new WeakMap,ht=new WeakMap,vr=new WeakSet,ri=function(){if(l(this,zt))return;const e=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");h(this,zt,setTimeout(()=>{h(this,zt,null);const n=l(this,re);for(h(this,re,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==l(this,Xe).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>l(this,Xe).batchMaxSize){n.unshift(s.pop());break}(async()=>{const i=s.length===1?s[0].payload:s.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:u}of s){if(this.destroyed){c(rt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:u.method}));continue}const d=o.filter(f=>f.id===u.id)[0];if(d==null){const f=rt("missing response for request","BAD_DATA",{value:o,info:{payload:u}});this.emit("error",f),c(f);continue}if("error"in d){c(this.getRpcError(u,d));continue}a(d.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of s)a(o)}})()}},e))};var Ne;class Iu extends Pu{constructor(e,n){super(e,n);A(this,Ne);let s=this._getOption("pollingInterval");s==null&&(s=Aa.pollingInterval),h(this,Ne,s)}_getSubscriber(e){const n=super._getSubscriber(e);return go(n)&&(n.pollingInterval=l(this,Ne)),n}get pollingInterval(){return l(this,Ne)}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");h(this,Ne,e),this._forEachSubscriber(n=>{go(n)&&(n.pollingInterval=l(this,Ne))})}}Ne=new WeakMap;var Wn;class Lu extends Iu{constructor(e,n,s){e==null&&(e="http://localhost:8545");super(n,s);A(this,Wn);typeof e=="string"?h(this,Wn,new ie(e)):h(this,Wn,e.clone())}_getConnection(){return l(this,Wn).clone()}async send(e,n){return await this._start(),await super.send(e,n)}async _send(e){const n=this._getConnection();n.body=JSON.stringify(e),n.setHeader("content-type","application/json");const s=await n.send();s.assertOk();let i=s.bodyJson;return Array.isArray(i)||(i=[i]),i}}Wn=new WeakMap;function si(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&ct(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(const t in r){const e=si(r[t]);if(e)return e}return null}if(typeof r=="string")try{return si(JSON.parse(r))}catch{}return null}function ii(r,t){if(r!=null){if(typeof r.message=="string"&&t.push(r.message),typeof r=="object")for(const e in r)ii(r[e],t);if(typeof r=="string")try{return ii(JSON.parse(r),t)}catch{}}}function Nu(r){const t=[];return ii(r,t),t}export{ga as A,Iu as J,Io as S,rs as T,fo as V,Xa as a,Pl as b,Ou as c,ss as d,or as e,wr as f,Gc as g,Ru as h,Ma as i,Lu as j,Du as p,Tu as r,ds as s};