@dcl/shop 1.10.0 → 1.10.1

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 (227) hide show
  1. package/_assets/{Activity-BICiX_hy.js → Activity-sYTAvfnp.js} +6 -6
  2. package/_assets/{AnimatedBackground-C-wwvO2r.js → AnimatedBackground-CKjW4vYY.js} +3 -3
  3. package/_assets/{Assets-BsdvrTNx.js → Assets-C2OZaacH.js} +3 -3
  4. package/_assets/{Authorizations-D2flTp4x.js → Authorizations-D3I8R8l-.js} +2 -2
  5. package/_assets/{Cart-C3DizVtU.js → Cart-Dd__h3ZW.js} +2 -2
  6. package/_assets/{Collection-BKSgVKJb.js → Collection-VmwPgiKW.js} +2 -2
  7. package/_assets/{CollectionCarousel-Cd2cxTqr.js → CollectionCarousel-D-6IGcNf.js} +3 -3
  8. package/_assets/{Confetti-qRAe3sEm.js → Confetti-VUkdDyEI.js} +4 -4
  9. package/_assets/{ConstantsUtil-CSNaVzH3.js → ConstantsUtil-De72a0_7.js} +2 -2
  10. package/_assets/{ContentClient-IvOavf-H.js → ContentClient-Dw5xMMU7.js} +2 -2
  11. package/_assets/{Creator-B39voF2X.js → Creator-DgsxlzIN.js} +2 -2
  12. package/_assets/{DeploymentBuilder-RK2SVoAz.js → DeploymentBuilder-Dgljr4BY.js} +2 -2
  13. package/_assets/{EmotePlaybackBar-DBorKQ-7.js → EmotePlaybackBar-Bu8aGycE.js} +3 -3
  14. package/_assets/{ErrorNotice-5pa_F5sz.js → ErrorNotice-Dz--zyW0.js} +2 -2
  15. package/_assets/{ExchangeController-Dz_UYYR2.js → ExchangeController-C7J-B8rd.js} +2 -2
  16. package/_assets/{Faq-CNnBIEfE.js → Faq-BDIc5eQF.js} +2 -2
  17. package/_assets/{GetCredits-zQOMVKAQ.js → GetCredits-B8U79i26.js} +2 -2
  18. package/_assets/{Grow-Cp6MOXYH.js → Grow-C_1n6x3_.js} +2 -2
  19. package/_assets/{HelpersUtil-BEwPK78z.js → HelpersUtil-CnDZcTQ9.js} +2 -2
  20. package/_assets/{ItemDetail-CUt75T50.js → ItemDetail-CrDU0tZN.js} +2 -2
  21. package/_assets/{LoadMore-CTFjioUv.js → LoadMore-9WSbZ_q9.js} +2 -2
  22. package/_assets/{ManaPricingBanner.styles-BTa9K2RR.js → ManaPricingBanner.styles-DsPQG5XW.js} +2 -2
  23. package/_assets/{MyAssets-DFovNm57.js → MyAssets-DI7ScSLP.js} +2 -2
  24. package/_assets/{MyFavorites-Cqm7xauU.js → MyFavorites-BWzbSRSx.js} +2 -2
  25. package/_assets/{NetworkUtil-BclgfaOh.js → NetworkUtil-DMDTqqRR.js} +2 -2
  26. package/_assets/{NotFound-DAmVzYXY.js → NotFound-Bbp6NfBp.js} +2 -2
  27. package/_assets/{NotificationsBell-BVRv35rb.js → NotificationsBell-BT4L2P9D.js} +2 -2
  28. package/_assets/{OutfitDetail-BGiWMRR7.js → OutfitDetail-DvH4nEsl.js} +2 -2
  29. package/_assets/{OutfitPreview-CFubFMxC.js → OutfitPreview-B65gZoPB.js} +2 -2
  30. package/_assets/{OutfitStudio-dqbYm6LX.js → OutfitStudio-YlglasDx.js} +2 -2
  31. package/_assets/{StoreSettings-9grVc6lN.js → StoreSettings-CIuiu9OI.js} +2 -2
  32. package/_assets/{Success-HKNsnB1Y.js → Success-CxhEu-7S.js} +2 -2
  33. package/_assets/{SwapController-BsLXz2qh.js → SwapController-DK9lfsBD.js} +2 -2
  34. package/_assets/{TradeService-dcBKxJ12.js → TradeService-D22j0-9F.js} +2 -2
  35. package/_assets/{W3MFrameProviderSingleton-Coji1m5x.js → W3MFrameProviderSingleton-CESQTQqF.js} +4 -4
  36. package/_assets/{WebCryptoP256-BsPX1fES.js → WebCryptoP256-BLxuWQFm.js} +2 -2
  37. package/_assets/{authorizations-BnWB-XGW.js → authorizations-DFBrUXOS.js} +2 -2
  38. package/_assets/{basic-CnVxFbpY.js → basic-fYfTYC_d.js} +2 -2
  39. package/_assets/{biconomy-h5mxqFn0.js → biconomy-BIt5-5mE.js} +2 -2
  40. package/_assets/{browseLayout.styles-CfRRd5jq.js → browseLayout.styles-Bc-hk1bi.js} +2 -2
  41. package/_assets/{browser-CRuQIWFp.js → browser-D-rgIuh4.js} +2 -2
  42. package/_assets/{browser-ponyfill-DuOHNKSs.js → browser-ponyfill-BcpqOoPZ.js} +2 -2
  43. package/_assets/{builder-Dx8iDFgg.js → builder-DhbmrqGU.js} +2 -2
  44. package/_assets/{buy-Cnme_X5d.js → buy-CnHi7Iym.js} +2 -2
  45. package/_assets/{buy-gasless-DhSQJMNQ.js → buy-gasless-DHhei4fH.js} +2 -2
  46. package/_assets/{categories-Dk_NiD5O.js → categories-DVcKGwG_.js} +2 -2
  47. package/_assets/{ccip-x67JK5_7.js → ccip-D2QhBII5.js} +2 -2
  48. package/_assets/{ccip-DvzlGkST.js → ccip-DVOLH90X.js} +2 -2
  49. package/_assets/{chains-Bamqxcmr.js → chains-BOsD_otP.js} +2 -2
  50. package/_assets/collectionPage.styles-BXaO8TjT.js +40 -0
  51. package/_assets/{common-D1XANjz0.js → common-XWhiQMBZ.js} +2 -2
  52. package/_assets/{controller-DTk6Havj.js → controller-Cuj0FpQk.js} +3 -3
  53. package/_assets/{core-B19c2rnF.js → core-DkDb2Mfj.js} +5 -5
  54. package/_assets/{createSvgIcon-CT3Gwjcy.js → createSvgIcon-BQ9lxpFw.js} +2 -2
  55. package/_assets/{custom-fmgA8lkC.js → custom-C292lMjR.js} +2 -2
  56. package/_assets/{data-capture-DDe22HY7.js → data-capture-Cy4pUTqT.js} +2 -2
  57. package/_assets/{dcl-schemas-CfMjyfZx.js → dcl-schemas-B-WFxXOZ.js} +2 -2
  58. package/_assets/{decimals-DwpYjDat.js → decimals-BV1E2kFL.js} +2 -2
  59. package/_assets/{decimals-kDkfNEul.js → decimals-DCiHcGcZ.js} +2 -2
  60. package/_assets/{detectExtension-DDD8D4gU.js → detectExtension-Dc9AAVXw.js} +2 -2
  61. package/_assets/{disposePreview-xjGjtRoP.js → disposePreview-MU4_1jLO.js} +2 -2
  62. package/_assets/{email-CxWcNkcR.js → email-CgMO12XY.js} +2 -2
  63. package/_assets/{embedded-wallet-Bq17gZ2o.js → embedded-wallet-C3jLKCzb.js} +2 -2
  64. package/_assets/{emotion-styled.browser.esm-D4jxZZdu.js → emotion-styled.browser.esm-AmbZRQDT.js} +2 -2
  65. package/_assets/{engine-CstRCS0P.js → engine-DV4TQcJS.js} +2 -2
  66. package/_assets/{errors-C2O8i7S8.js → errors-C5MB6AYb.js} +2 -2
  67. package/_assets/{estimate-l1-fee-D6wU0bu9.js → estimate-l1-fee-BETuaNxP.js} +2 -2
  68. package/_assets/{eth_estimateGas-Bwq_fGM7.js → eth_estimateGas-DJeu0SCF.js} +2 -2
  69. package/_assets/{eth_getStorageAt-CSG0CFbd.js → eth_getStorageAt-Cs1VTqTk.js} +2 -2
  70. package/_assets/{eth_getTransactionCount-CRyqNDQC.js → eth_getTransactionCount-kfQJQwHZ.js} +2 -2
  71. package/_assets/{ethereum-BrsO-PtF.js → ethereum-uXvYhQ1U.js} +2 -2
  72. package/_assets/{ethers-Dv96XuWO.js → ethers-BJ46oYk8.js} +2 -2
  73. package/_assets/{events-BI-hNCIc.js → events-TC-OlUEN.js} +2 -2
  74. package/_assets/{execute-DBY_k70_.js → execute-BKnIkwKP.js} +3 -3
  75. package/_assets/{extractIPFS-BKCaGHg0.js → extractIPFS-5zCrambD.js} +2 -2
  76. package/_assets/{features-B-lWKxpl.js → features-D6_H5Eg-.js} +2 -2
  77. package/_assets/{fetchTokenMetadata-4TPAW-0J.js → fetchTokenMetadata-Dv3t7lWt.js} +3 -3
  78. package/_assets/{field.styles-DkP4EUDp.js → field.styles-CvPi7xT7.js} +2 -2
  79. package/_assets/{fortmatic-Byi5UiOW.js → fortmatic-vFLXReLi.js} +2 -2
  80. package/_assets/{get-bytecode-Cu090exg.js → get-bytecode-CNSsYU7v.js} +2 -2
  81. package/_assets/{get-ecosystem-wallet-info-BtF8AVTy.js → get-ecosystem-wallet-info-DNg7unD2.js} +2 -2
  82. package/_assets/{getBalance-CLerx9db.js → getBalance-B7xeoxhf.js} +3 -3
  83. package/_assets/{getInstalledModules-JS9WynYq.js → getInstalledModules-CCoMH5Lj.js} +2 -2
  84. package/_assets/{getNFT-DDa0Gtz6.js → getNFT-B9pHp8Uz.js} +2 -2
  85. package/_assets/{getNFT-FIIFTAk5.js → getNFT-BHGGFy7Q.js} +3 -3
  86. package/_assets/{grid.styles--7kuSBOW.js → grid.styles-C26EVK27.js} +2 -2
  87. package/_assets/{hashTypedData-CxsyK_ey.js → hashTypedData-lRLTmg0n.js} +2 -2
  88. package/_assets/{hashTypedData-BAid2zcm.js → hashTypedData-nAbGWpsl.js} +2 -2
  89. package/_assets/{in-app-Bdlyj-VE.js → in-app-B9y5kJyR.js} +2 -2
  90. package/_assets/{in-app-wallet-calls-CbJr8ixd.js → in-app-wallet-calls-C716-BWM.js} +2 -2
  91. package/_assets/{index-DEMKJ56b.js → index-6KahUnUn.js} +2 -2
  92. package/_assets/{index-C7kKm9Pu.js → index-B4b9QcWr.js} +2 -2
  93. package/_assets/{index-BA0ecyfk.js → index-BEOx-MkQ.js} +2 -2
  94. package/_assets/{index-DRCOJh6s.js → index-BH79ktLP.js} +2 -2
  95. package/_assets/{index-DIxEiVFV.js → index-BHdEDlzJ.js} +2 -2
  96. package/_assets/{index-BYc2EMXr.js → index-BQDksEkr.js} +2 -2
  97. package/_assets/{index-De_zfcOO.js → index-BQHirLzH.js} +4 -4
  98. package/_assets/{index-DTaaHeVQ.js → index-BTQvqbCD.js} +2 -2
  99. package/_assets/{index-X2m4MLDN.js → index-BUhtMj3g.js} +3 -3
  100. package/_assets/{index-B8DDvD5C.js → index-BYlPLyvC.js} +2 -2
  101. package/_assets/{index-N7hPewar.js → index-B_3VWPzU.js} +2 -2
  102. package/_assets/{index-RC5VhbLR.js → index-BbyQswd9.js} +2 -2
  103. package/_assets/{index-DGWb-703.js → index-BgKNEsQM.js} +2 -2
  104. package/_assets/{index-66a3-eV4.js → index-BkrcYvM1.js} +2 -2
  105. package/_assets/{index-BU7bOvUQ.js → index-BrSvdzgK.js} +2 -2
  106. package/_assets/{index-Bhox8ufA.js → index-Bvfny1b1.js} +2 -2
  107. package/_assets/{index-D0ZGbOcV.js → index-C0ujtDM4.js} +2 -2
  108. package/_assets/{index-DipEvVT9.js → index-C1eSVPh4.js} +2 -2
  109. package/_assets/{index-BzKehLq1.js → index-C8U-_ocQ.js} +2 -2
  110. package/_assets/{index--IK1Sft8.js → index-CBxpfVHL.js} +2 -2
  111. package/_assets/{index-D8aZQi2T.js → index-CC2q8Own.js} +2 -2
  112. package/_assets/{index-DTPYPqJU.js → index-CGFciMjS.js} +3 -3
  113. package/_assets/{index-DhQbUPpF.js → index-CHj8Jay2.js} +2 -2
  114. package/_assets/{index-BjWQloYQ.js → index-CJV1rvrt.js} +2 -2
  115. package/_assets/{index-C-_gSOF6.js → index-CMjakdHj.js} +3 -3
  116. package/_assets/{index-sPgW1Gyb.js → index-COcnomhy.js} +2 -2
  117. package/_assets/{index-C4q1d-Fd.js → index-CQxq8vBQ.js} +2 -2
  118. package/_assets/{index-C7Y7jomx.js → index-CRKkmqcY.js} +2 -2
  119. package/_assets/{index-qzzwKbJI.js → index-CTuqkErq.js} +2 -2
  120. package/_assets/{index-DUzStg09.js → index-CUcmsm9q.js} +2 -2
  121. package/_assets/{index-Dl4hrRT2.js → index-CUn1_Jx_.js} +13 -13
  122. package/_assets/{index-5T7h8H5X.js → index-CX3nsPjs.js} +2 -2
  123. package/_assets/{index-C6CdXJkm.js → index-CZ7LuSob.js} +2 -2
  124. package/_assets/{index-y8riFEF7.js → index-CcvxyAkd.js} +2 -2
  125. package/_assets/{index-Cj153qSg.js → index-CnXW5rWU.js} +4 -4
  126. package/_assets/{index-CoF-9wxy.js → index-Cntf9ZDS.js} +2 -2
  127. package/_assets/{index-CXukCjj1.js → index-Cpb9-IOd.js} +2 -2
  128. package/_assets/{index-CMnmh3jz.js → index-Cu_2CevS.js} +2 -2
  129. package/_assets/{index-CQP1mPeG.js → index-Cx9L-LFW.js} +2 -2
  130. package/_assets/{index-B1OQapSe.js → index-D4Hsr0PA.js} +2 -2
  131. package/_assets/{index-DpYNYuLQ.js → index-D5k9KHxl.js} +2 -2
  132. package/_assets/{index-CV5pItZG.js → index-D7HaNPcS.js} +2 -2
  133. package/_assets/{index-BMnKJ7um.js → index-DD4626BH.js} +2 -2
  134. package/_assets/{index-ChJw9kFE.js → index-DHDgM3HR.js} +2 -2
  135. package/_assets/{index-JahQM-0d.js → index-DQxLb4VX.js} +2 -2
  136. package/_assets/{index-Dy2SxTsa.js → index-DVW70KlG.js} +2 -2
  137. package/_assets/{index-BAFd5X5s.js → index-DXfxffdW.js} +2 -2
  138. package/_assets/{index-DpKuFVdi.js → index-DZF2Mqmj.js} +2 -2
  139. package/_assets/{index-CJxYNhjz.js → index-DcGUq2q8.js} +2 -2
  140. package/_assets/{index-DT71XGP-.js → index-DfSh-hk8.js} +2 -2
  141. package/_assets/{index-N3qNnxTo.js → index-Dgb7bK23.js} +2 -2
  142. package/_assets/{index-CHHUeGtc.js → index-DkbueSpv.js} +3 -3
  143. package/_assets/{index-WyhU4TBa.js → index-Dlcd7g3E.js} +2 -2
  144. package/_assets/{index-CtAQFnxk.js → index-Dr5PslPg.js} +2 -2
  145. package/_assets/{index-BO3CZL7c.js → index-DsiBINCC.js} +2 -2
  146. package/_assets/{index-Dn8xuNDB.js → index-Du1ffPDP.js} +2 -2
  147. package/_assets/{index-DGyZchp-.js → index-DxGC0jjd.js} +2 -2
  148. package/_assets/{index-hwQ3WWoP.js → index-DxQVs5qk.js} +2 -2
  149. package/_assets/{index-C94H9_tC.js → index-Ud-5kGUt.js} +2 -2
  150. package/_assets/{index-BSaDYTxt.js → index-WP1SnqN8.js} +2 -2
  151. package/_assets/{index-OvuTK60o.js → index-WsHUh7DI.js} +2 -2
  152. package/_assets/{index-C6o6IpUT.js → index-d5wxrhAy.js} +2 -2
  153. package/_assets/{index-DgXBPAm_.js → index-fVZPvJm4.js} +2 -2
  154. package/_assets/{index-DYooaWId.js → index-feacctl2.js} +2 -2
  155. package/_assets/{index-ClzkdB8z.js → index-jJhmkgZI.js} +2 -2
  156. package/_assets/{index-DjkvHGdg.js → index-lCvkbdl9.js} +4 -4
  157. package/_assets/{index-BIdoUXuM.js → index-mc6ExTro.js} +2 -2
  158. package/_assets/{index.es-Bas2yfUy.js → index.es-Bh3Cz7Uz.js} +2 -2
  159. package/_assets/{index.es-DAQ2POad.js → index.es-Bj7P4x_P.js} +5 -5
  160. package/_assets/{index.es-5ighfc2K.js → index.es-Cj6yjCSo.js} +2 -2
  161. package/_assets/{index.es-BN_feL1z.js → index.es-D6pEehq0.js} +2 -2
  162. package/_assets/{items-empty-D3FNNYeD.js → items-empty-CrDR1I8-.js} +2 -2
  163. package/_assets/{jump-Dr035GHt.js → jump-cMU7i7Yp.js} +2 -2
  164. package/_assets/{linkAccount-DDcAG0nl.js → linkAccount-vh55n5MO.js} +2 -2
  165. package/_assets/{localBatchGatewayRequest-C6osHWxc.js → localBatchGatewayRequest-D4hFYJZz.js} +2 -2
  166. package/_assets/{native-C52Z8TfX.js → native-CFNaphPE.js} +2 -2
  167. package/_assets/{networks-CkG0QClb.js → networks-CxV8-SX3.js} +2 -2
  168. package/_assets/{onramp-DIygeWPQ.js → onramp-4DIcOAI7.js} +2 -2
  169. package/_assets/{openzeppelin-gox-REHN.js → openzeppelin-B_XsaDrr.js} +2 -2
  170. package/_assets/{ownerOf-DGnXfk0_.js → ownerOf-f0kUifsZ.js} +2 -2
  171. package/_assets/{parseNft-BcJ4-C71.js → parseNft-A7Bfi1I_.js} +3 -3
  172. package/_assets/{parseSignature-nraJiLlg.js → parseSignature-B671IJ9t.js} +2 -2
  173. package/_assets/{parseSignature-gm5DxN9A.js → parseSignature-B8wLewQB.js} +4 -4
  174. package/_assets/{passkeys-C5HPgqf5.js → passkeys-niNiWiM7.js} +2 -2
  175. package/_assets/{pay-with-exchange-Ba7yTfPB.js → pay-with-exchange-Cg70bQZa.js} +2 -2
  176. package/_assets/{prepare-contract-call-BIfjyTYu.js → prepare-contract-call-D-8DArpz.js} +2 -2
  177. package/_assets/{qr-overlay-CxWKfrGr.js → qr-overlay-DMFlset5.js} +4 -4
  178. package/_assets/{react-D7nfuWd6.js → react-BAO_TUIJ.js} +2 -2
  179. package/_assets/{receive-CNs-u97l.js → receive-CTtpMoco.js} +2 -2
  180. package/_assets/{resolveImplementation-_7q3dOKp.js → resolveImplementation-DF5drpuE.js} +2 -2
  181. package/_assets/{resume-buy-BQxam5dL.js → resume-buy-DJYhgVd-.js} +2 -2
  182. package/_assets/{rpc-WOvA0Ped.js → rpc-B3U1udLU.js} +2 -2
  183. package/_assets/{sales-empty-CCTVsons.js → sales-empty-Bt-vq6r8.js} +2 -2
  184. package/_assets/{search-empty-B4_pLY-K.js → search-empty-CsDzgGQD.js} +2 -2
  185. package/_assets/{secp256k1-NiwVfMiW.js → secp256k1-BmdgJuRA.js} +2 -2
  186. package/_assets/{secp256k1-nmicBOFq.js → secp256k1-DCHmI0Wk.js} +2 -2
  187. package/_assets/{secp256k1-DTLAfMHI.js → secp256k1-DR9Rp0tc.js} +2 -2
  188. package/_assets/{send-DMVF8o0c.js → send-C8vls9oA.js} +2 -2
  189. package/_assets/{send-batch-transaction-DSUMPrdj.js → send-batch-transaction-LHa5_TPd.js} +2 -2
  190. package/_assets/{send-eip712-transaction-IUeUwhLU.js → send-eip712-transaction-ZlSenyFv.js} +3 -3
  191. package/_assets/{send-gasless-transaction-DPOrkR-S.js → send-gasless-transaction-B9Wd9Wbb.js} +3 -3
  192. package/_assets/{send-transaction-cYAHoDgz.js → send-transaction-B4hngXws.js} +3 -3
  193. package/_assets/{sendMetaTransaction-DmChWu2Q.js → sendMetaTransaction-BeF2aB_y.js} +2 -2
  194. package/_assets/{sendRawTransaction-Cnquj3L1.js → sendRawTransaction-DTeS6t1F.js} +4 -4
  195. package/_assets/{sentry-CoTjVJfh.js → sentry-BoIhDhui.js} +3 -3
  196. package/_assets/{serializeTransaction-Bp_Y4Oqz.js → serializeTransaction-BB-N5Krg.js} +2 -2
  197. package/_assets/{session-proposal-COdN5hib.js → session-proposal-DWbXgpDt.js} +2 -2
  198. package/_assets/{session-request-bFy7aBRa.js → session-request-y8lLoUu6.js} +3 -3
  199. package/_assets/{sha256-XcxD-HDJ.js → sha256-DXK6LXQg.js} +2 -2
  200. package/_assets/{signing-CcTSfbp4.js → signing-CuWWYUCP.js} +4 -4
  201. package/_assets/{skeleton.styles-DBZfxDFe.js → skeleton.styles-CGVEZY-7.js} +2 -2
  202. package/_assets/{socials-CSee1341.js → socials-Da7e8hFc.js} +2 -2
  203. package/_assets/{styled-EO0aCK0k.js → styled-NtEkqz45.js} +2 -2
  204. package/_assets/{swaps-y_VHcKeY.js → swaps-UA1juyFG.js} +2 -2
  205. package/_assets/{thirdweb-CL9aFDQn.js → thirdweb-BjQz496b.js} +4 -4
  206. package/_assets/{to-serializable-transaction-68n-Uy9K.js → to-serializable-transaction-BlrbTyPZ.js} +3 -3
  207. package/_assets/{totalSupply-BWWtuqmY.js → totalSupply-BqYWR5LO.js} +2 -2
  208. package/_assets/{transaction-xKWAbiZz.js → transaction-rcvNLU7z.js} +2 -2
  209. package/_assets/{transactionReceipt-VPc5kVRc.js → transactionReceipt-lqPbaLrZ.js} +2 -2
  210. package/_assets/{transactions-CQO9InHD.js → transactions-DuOhcbb6.js} +2 -2
  211. package/_assets/{useCreditPacks-CAXhYC8D.js → useCreditPacks-CcW707qX.js} +2 -2
  212. package/_assets/{useInfiniteGrid-B88HDzOV.js → useInfiniteGrid-O5Wvm7pV.js} +2 -2
  213. package/_assets/{useStore-EuJEkDB4.js → useStore-B3fQdYA0.js} +3 -3
  214. package/_assets/{useTheme-Df-Vsg8U.js → useTheme-eJgWxV4j.js} +2 -2
  215. package/_assets/{utils-esa8OSIj.js → utils-TQPakHe1.js} +2 -2
  216. package/_assets/{verifyHash-PbJswfF6.js → verifyHash-D95QvQtB.js} +2 -2
  217. package/_assets/{w3m-modal-Ctr3krI_.js → w3m-modal-BRMAeRQM.js} +2 -2
  218. package/_assets/{w3m-modal-X3ZNcEkC.js → w3m-modal-Se3-B1HF.js} +2 -2
  219. package/_assets/{wait-for-tx-receipt-CrqjqK2x.js → wait-for-tx-receipt-11ct1VLo.js} +2 -2
  220. package/_assets/{wallets-ChmX60CP.js → wallets-B0tPgzoA.js} +6 -6
  221. package/_assets/{web-connector-Bk-wpPaT.js → web-connector-Btytr_xK.js} +4 -4
  222. package/_assets/{writeContract-DP5yj6TY.js → writeContract-cdPhiEo2.js} +2 -2
  223. package/_assets/{zora-sepolia-CZVN75mJ.js → zora-sepolia-BoGr_anx.js} +2 -2
  224. package/_assets/{zoraTestnet-C0i-JsRg.js → zoraTestnet-Cuxc7Xr4.js} +2 -2
  225. package/index.html +11 -11
  226. package/package.json +2 -2
  227. package/_assets/collectionPage.styles-C8SZeNNm.js +0 -40
@@ -1,4 +1,4 @@
1
- import{g as Zr,c as fa}from"./react-D7nfuWd6.js";import{p as yi,g as Gn}from"./sentry-CoTjVJfh.js";(function(){try{var n=typeof window<"u"?window:typeof Gn<"u"?Gn:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="03a4ef94-8290-4ea2-998f-3f7ca5d53195",n._sentryDebugIdIdentifier="sentry-dbid-03a4ef94-8290-4ea2-998f-3f7ca5d53195")}catch{}})();var Nn={exports:{}},vi={},E0;function ca(){return E0||(E0=1,(function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e={},t={};t.byteLength=w,t.toByteArray=C,t.fromByteArray=k;for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,x=s.length;c<x;++c)r[c]=s[c],i[s.charCodeAt(c)]=c;i[45]=62,i[95]=63;function g(D){var U=D.length;if(U%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var q=D.indexOf("=");q===-1&&(q=U);var z=q===U?0:4-q%4;return[q,z]}function w(D){var U=g(D),q=U[0],z=U[1];return(q+z)*3/4-z}function M(D,U,q){return(U+q)*3/4-q}function C(D){var U,q=g(D),z=q[0],j=q[1],Y=new o(M(D,z,j)),X=0,ie=j>0?z-4:z,se;for(se=0;se<ie;se+=4)U=i[D.charCodeAt(se)]<<18|i[D.charCodeAt(se+1)]<<12|i[D.charCodeAt(se+2)]<<6|i[D.charCodeAt(se+3)],Y[X++]=U>>16&255,Y[X++]=U>>8&255,Y[X++]=U&255;return j===2&&(U=i[D.charCodeAt(se)]<<2|i[D.charCodeAt(se+1)]>>4,Y[X++]=U&255),j===1&&(U=i[D.charCodeAt(se)]<<10|i[D.charCodeAt(se+1)]<<4|i[D.charCodeAt(se+2)]>>2,Y[X++]=U>>8&255,Y[X++]=U&255),Y}function G(D){return r[D>>18&63]+r[D>>12&63]+r[D>>6&63]+r[D&63]}function H(D,U,q){for(var z,j=[],Y=U;Y<q;Y+=3)z=(D[Y]<<16&16711680)+(D[Y+1]<<8&65280)+(D[Y+2]&255),j.push(G(z));return j.join("")}function k(D){for(var U,q=D.length,z=q%3,j=[],Y=16383,X=0,ie=q-z;X<ie;X+=Y)j.push(H(D,X,X+Y>ie?ie:X+Y));return z===1?(U=D[q-1],j.push(r[U>>2]+r[U<<4&63]+"==")):z===2&&(U=(D[q-2]<<8)+D[q-1],j.push(r[U>>10]+r[U>>4&63]+r[U<<2&63]+"=")),j.join("")}var S={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */S.read=function(D,U,q,z,j){var Y,X,ie=j*8-z-1,se=(1<<ie)-1,ne=se>>1,P=-7,m=q?j-1:0,a=q?-1:1,d=D[U+m];for(m+=a,Y=d&(1<<-P)-1,d>>=-P,P+=ie;P>0;Y=Y*256+D[U+m],m+=a,P-=8);for(X=Y&(1<<-P)-1,Y>>=-P,P+=z;P>0;X=X*256+D[U+m],m+=a,P-=8);if(Y===0)Y=1-ne;else{if(Y===se)return X?NaN:(d?-1:1)*(1/0);X=X+Math.pow(2,z),Y=Y-ne}return(d?-1:1)*X*Math.pow(2,Y-z)},S.write=function(D,U,q,z,j,Y){var X,ie,se,ne=Y*8-j-1,P=(1<<ne)-1,m=P>>1,a=j===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=z?0:Y-1,b=z?1:-1,y=U<0||U===0&&1/U<0?1:0;for(U=Math.abs(U),isNaN(U)||U===1/0?(ie=isNaN(U)?1:0,X=P):(X=Math.floor(Math.log(U)/Math.LN2),U*(se=Math.pow(2,-X))<1&&(X--,se*=2),X+m>=1?U+=a/se:U+=a*Math.pow(2,1-m),U*se>=2&&(X++,se/=2),X+m>=P?(ie=0,X=P):X+m>=1?(ie=(U*se-1)*Math.pow(2,j),X=X+m):(ie=U*Math.pow(2,m-1)*Math.pow(2,j),X=0));j>=8;D[q+d]=ie&255,d+=b,ie/=256,j-=8);for(X=X<<j|ie,ne+=j;ne>0;D[q+d]=X&255,d+=b,X/=256,ne-=8);D[q+d-b]|=y*128};/*!
1
+ import{g as Zr,c as fa}from"./react-BAO_TUIJ.js";import{p as yi,g as Gn}from"./sentry-BoIhDhui.js";(function(){try{var n=typeof window<"u"?window:typeof Gn<"u"?Gn:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="03a4ef94-8290-4ea2-998f-3f7ca5d53195",n._sentryDebugIdIdentifier="sentry-dbid-03a4ef94-8290-4ea2-998f-3f7ca5d53195")}catch{}})();var Nn={exports:{}},vi={},E0;function ca(){return E0||(E0=1,(function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e={},t={};t.byteLength=w,t.toByteArray=C,t.fromByteArray=k;for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,x=s.length;c<x;++c)r[c]=s[c],i[s.charCodeAt(c)]=c;i[45]=62,i[95]=63;function g(D){var U=D.length;if(U%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var q=D.indexOf("=");q===-1&&(q=U);var z=q===U?0:4-q%4;return[q,z]}function w(D){var U=g(D),q=U[0],z=U[1];return(q+z)*3/4-z}function M(D,U,q){return(U+q)*3/4-q}function C(D){var U,q=g(D),z=q[0],j=q[1],Y=new o(M(D,z,j)),X=0,ie=j>0?z-4:z,se;for(se=0;se<ie;se+=4)U=i[D.charCodeAt(se)]<<18|i[D.charCodeAt(se+1)]<<12|i[D.charCodeAt(se+2)]<<6|i[D.charCodeAt(se+3)],Y[X++]=U>>16&255,Y[X++]=U>>8&255,Y[X++]=U&255;return j===2&&(U=i[D.charCodeAt(se)]<<2|i[D.charCodeAt(se+1)]>>4,Y[X++]=U&255),j===1&&(U=i[D.charCodeAt(se)]<<10|i[D.charCodeAt(se+1)]<<4|i[D.charCodeAt(se+2)]>>2,Y[X++]=U>>8&255,Y[X++]=U&255),Y}function G(D){return r[D>>18&63]+r[D>>12&63]+r[D>>6&63]+r[D&63]}function H(D,U,q){for(var z,j=[],Y=U;Y<q;Y+=3)z=(D[Y]<<16&16711680)+(D[Y+1]<<8&65280)+(D[Y+2]&255),j.push(G(z));return j.join("")}function k(D){for(var U,q=D.length,z=q%3,j=[],Y=16383,X=0,ie=q-z;X<ie;X+=Y)j.push(H(D,X,X+Y>ie?ie:X+Y));return z===1?(U=D[q-1],j.push(r[U>>2]+r[U<<4&63]+"==")):z===2&&(U=(D[q-2]<<8)+D[q-1],j.push(r[U>>10]+r[U>>4&63]+r[U<<2&63]+"=")),j.join("")}var S={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */S.read=function(D,U,q,z,j){var Y,X,ie=j*8-z-1,se=(1<<ie)-1,ne=se>>1,P=-7,m=q?j-1:0,a=q?-1:1,d=D[U+m];for(m+=a,Y=d&(1<<-P)-1,d>>=-P,P+=ie;P>0;Y=Y*256+D[U+m],m+=a,P-=8);for(X=Y&(1<<-P)-1,Y>>=-P,P+=z;P>0;X=X*256+D[U+m],m+=a,P-=8);if(Y===0)Y=1-ne;else{if(Y===se)return X?NaN:(d?-1:1)*(1/0);X=X+Math.pow(2,z),Y=Y-ne}return(d?-1:1)*X*Math.pow(2,Y-z)},S.write=function(D,U,q,z,j,Y){var X,ie,se,ne=Y*8-j-1,P=(1<<ne)-1,m=P>>1,a=j===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=z?0:Y-1,b=z?1:-1,y=U<0||U===0&&1/U<0?1:0;for(U=Math.abs(U),isNaN(U)||U===1/0?(ie=isNaN(U)?1:0,X=P):(X=Math.floor(Math.log(U)/Math.LN2),U*(se=Math.pow(2,-X))<1&&(X--,se*=2),X+m>=1?U+=a/se:U+=a*Math.pow(2,1-m),U*se>=2&&(X++,se/=2),X+m>=P?(ie=0,X=P):X+m>=1?(ie=(U*se-1)*Math.pow(2,j),X=X+m):(ie=U*Math.pow(2,m-1)*Math.pow(2,j),X=0));j>=8;D[q+d]=ie&255,d+=b,ie/=256,j-=8);for(X=X<<j|ie,ne+=j;ne>0;D[q+d]=X&255,d+=b,X/=256,ne-=8);D[q+d-b]|=y*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -7,4 +7,4 @@ import{g as Zr,c as fa}from"./react-D7nfuWd6.js";import{p as yi,g as Gn}from"./s
7
7
  `;function ws(n){return typeof n=="string"&&(n=ct(n)),je(rt([ct(Pf),ct(String(n.length)),n]))}var Mf=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const $e=new O(hs),As=new Uint8Array(32);As.fill(0);const If=ee.from(-1),Es=ee.from(0),_s=ee.from(1),kf=ee.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Cf(n){const e=Z(n),t=e.length%32;return t?wt([e,As.slice(t)]):re(e)}const Nf=We(_s.toHexString(),32),Rf=We(Es.toHexString(),32),V0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Si=["name","version","chainId","verifyingContract","salt"];function W0(n){return function(e){return typeof e!="string"&&$e.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}const Bf={name:W0("name"),version:W0("version"),chainId:function(n){try{return ee.from(n).toString()}catch{}return $e.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return et(n).toLowerCase()}catch{}return $e.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{const e=Z(n);if(e.length!==32)throw new Error("bad length");return re(e)}catch{}return $e.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Pi(n){{const e=n.match(/^(u?)int(\d*)$/);if(e){const t=e[1]==="",r=parseInt(e[2]||"256");(r%8!==0||r>256||e[2]&&e[2]!==String(r))&&$e.throwArgumentError("invalid numeric width","type",n);const i=kf.mask(t?r-1:r),o=t?i.add(_s).mul(If):Es;return function(s){const c=ee.from(s);return(c.lt(o)||c.gt(i))&&$e.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),We(c.toTwos(256).toHexString(),32)}}}{const e=n.match(/^bytes(\d+)$/);if(e){const t=parseInt(e[1]);return(t===0||t>32||e[1]!==String(t))&&$e.throwArgumentError("invalid bytes width","type",n),function(r){return Z(r).length!==t&&$e.throwArgumentError(`invalid length for ${n}`,"value",r),Cf(r)}}}switch(n){case"address":return function(e){return We(et(e),32)};case"bool":return function(e){return e?Nf:Rf};case"bytes":return function(e){return je(e)};case"string":return function(e){return yr(e)}}return null}function j0(n,e){return`${n}(${e.map(({name:t,type:r})=>r+" "+t).join(",")})`}class bt{constructor(e){Q(this,"types",Object.freeze(nr(e))),Q(this,"_encoderCache",{}),Q(this,"_types",{});const t={},r={},i={};Object.keys(e).forEach(c=>{t[c]={},r[c]=[],i[c]={}});for(const c in e){const x={};e[c].forEach(g=>{x[g.name]&&$e.throwArgumentError(`duplicate variable name ${JSON.stringify(g.name)} in ${JSON.stringify(c)}`,"types",e),x[g.name]=!0;const w=g.type.match(/^([^\x5b]*)(\x5b|$)/)[1];w===c&&$e.throwArgumentError(`circular type reference to ${JSON.stringify(w)}`,"types",e),!Pi(w)&&(r[w]||$e.throwArgumentError(`unknown type ${JSON.stringify(w)}`,"types",e),r[w].push(c),t[c][w]=!0)})}const o=Object.keys(r).filter(c=>r[c].length===0);o.length===0?$e.throwArgumentError("missing primary type","types",e):o.length>1&&$e.throwArgumentError(`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),Q(this,"primaryType",o[0]);function s(c,x){x[c]&&$e.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),x[c]=!0,Object.keys(t[c]).forEach(g=>{r[g]&&(s(g,x),Object.keys(x).forEach(w=>{i[w][g]=!0}))}),delete x[c]}s(this.primaryType,{});for(const c in i){const x=Object.keys(i[c]);x.sort(),this._types[c]=j0(c,e[c])+x.map(g=>j0(g,e[g])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const i=Pi(e);if(i)return i}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const i=t[1],o=this.getEncoder(i),s=parseInt(t[3]);return c=>{s>=0&&c.length!==s&&$e.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",c);let x=c.map(o);return this._types[i]&&(x=x.map(je)),je(wt(x))}}const r=this.types[e];if(r){const i=yr(this._types[e]);return o=>{const s=r.map(({name:c,type:x})=>{const g=this.getEncoder(x)(o[c]);return this._types[x]?je(g):g});return s.unshift(i),wt(s)}}return $e.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||$e.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return je(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Pi(e))return r(e,t);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const s=i[1],c=parseInt(i[3]);return c>=0&&t.length!==c&&$e.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(x=>this._visit(s,x,r))}const o=this.types[e];return o?o.reduce((s,{name:c,type:x})=>(s[c]=this._visit(x,t[c],r),s),{}):$e.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new bt(e)}static getPrimaryType(e){return bt.from(e).primaryType}static hashStruct(e,t,r){return bt.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const i=V0[r];i||$e.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:i})}return t.sort((r,i)=>Si.indexOf(r.name)-Si.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return wt(["0x1901",bt.hashDomain(e),bt.from(t).hash(r)])}static hash(e,t,r){return je(bt.encode(e,t,r))}static resolveNames(e,t,r,i){return Mf(this,void 0,void 0,function*(){e=nt(e);const o={};e.verifyingContract&&!ve(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=bt.from(t);s.visit(r,(c,x)=>(c==="address"&&!ve(x,20)&&(o[x]="0x"),x));for(const c in o)o[c]=yield i(c);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=s.visit(r,(c,x)=>c==="address"&&o[x]?o[x]:x),{domain:e,value:r}})}static getPayload(e,t,r){bt.hashDomain(e);const i={},o=[];Si.forEach(x=>{const g=e[x];g!=null&&(i[x]=Bf[x](g),o.push({name:x,type:V0[x]}))});const s=bt.from(t),c=nt(t);return c.EIP712Domain?$e.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):c.EIP712Domain=o,s.encode(r),{types:c,domain:i,primaryType:s.primaryType,message:s.visit(r,(x,g)=>{if(x.match(/^bytes(\d*)/))return re(Z(g));if(x.match(/^u?int/))return ee.from(g).toString();switch(x){case"address":return g.toLowerCase();case"bool":return!!g;case"string":return typeof g!="string"&&$e.throwArgumentError("invalid string","value",g),g}return $e.throwArgumentError("unsupported type","type",x)})}}}const Ze=new O(vn);class Ss extends Tr{}class Ps extends Tr{}class Tf extends Tr{}class Jn extends Tr{static isIndexed(e){return!!(e&&e._isIndexed)}}const Ff={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Q0(n,e){const t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}class Yi{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,Q(this,"fragments",t.map(r=>er.from(r)).filter(r=>r!=null)),Q(this,"_abiCoder",Vt(new.target,"getAbiCoder")()),Q(this,"functions",{}),Q(this,"errors",{}),Q(this,"events",{}),Q(this,"structs",{}),this.fragments.forEach(r=>{let i=null;switch(r.type){case"constructor":if(this.deploy){Ze.warn("duplicate definition - constructor");return}Q(this,"deploy",r);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let o=r.format();if(i[o]){Ze.warn("duplicate definition - "+o);return}i[o]=r}),this.deploy||Q(this,"deploy",Kt.from({payable:!1,type:"constructor"})),Q(this,"_isInterface",!0)}format(e){e||(e=Ee.full),e===Ee.sighash&&Ze.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(r=>r.format(e));return e===Ee.json?JSON.stringify(t.map(r=>JSON.parse(r))):t}static getAbiCoder(){return us}static getAddress(e){return et(e)}static getSighash(e){return at(yr(e.format()),0,4)}static getEventTopic(e){return yr(e.format())}getFunction(e){if(ve(e)){for(const r in this.functions)if(e===this.getSighash(r))return this.functions[r];Ze.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const r=e.trim(),i=Object.keys(this.functions).filter(o=>o.split("(")[0]===r);return i.length===0?Ze.throwArgumentError("no matching function","name",r):i.length>1&&Ze.throwArgumentError("multiple matching functions","name",r),this.functions[i[0]]}const t=this.functions[Jt.fromString(e).format()];return t||Ze.throwArgumentError("no matching function","signature",e),t}getEvent(e){if(ve(e)){const r=e.toLowerCase();for(const i in this.events)if(r===this.getEventTopic(i))return this.events[i];Ze.throwArgumentError("no matching event","topichash",r)}if(e.indexOf("(")===-1){const r=e.trim(),i=Object.keys(this.events).filter(o=>o.split("(")[0]===r);return i.length===0?Ze.throwArgumentError("no matching event","name",r):i.length>1&&Ze.throwArgumentError("multiple matching events","name",r),this.events[i[0]]}const t=this.events[$t.fromString(e).format()];return t||Ze.throwArgumentError("no matching event","signature",e),t}getError(e){if(ve(e)){const r=Vt(this.constructor,"getSighash");for(const i in this.errors){const o=this.errors[i];if(e===r(o))return this.errors[i]}Ze.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const r=e.trim(),i=Object.keys(this.errors).filter(o=>o.split("(")[0]===r);return i.length===0?Ze.throwArgumentError("no matching error","name",r):i.length>1&&Ze.throwArgumentError("multiple matching errors","name",r),this.errors[i[0]]}const t=this.errors[Jt.fromString(e).format()];return t||Ze.throwArgumentError("no matching error","signature",e),t}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch{throw t}}return Vt(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Vt(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){typeof e=="string"&&(e=this.getError(e));const r=Z(t);return re(r.slice(0,4))!==this.getSighash(e)&&Ze.throwArgumentError(`data signature does not match error ${e.name}.`,"data",re(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return typeof e=="string"&&(e=this.getError(e)),re(rt([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){typeof e=="string"&&(e=this.getFunction(e));const r=Z(t);return re(r.slice(0,4))!==this.getSighash(e)&&Ze.throwArgumentError(`data signature does not match function ${e.name}.`,"data",re(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return typeof e=="string"&&(e=this.getFunction(e)),re(rt([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){typeof e=="string"&&(e=this.getFunction(e));let r=Z(t),i=null,o="",s=null,c=null,x=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch{}break;case 4:{const g=re(r.slice(0,4)),w=Ff[g];if(w)s=this._abiCoder.decode(w.inputs,r.slice(4)),c=w.name,x=w.signature,w.reason&&(i=s[0]),c==="Error"?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:c==="Panic"&&(o=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const M=this.getError(g);s=this._abiCoder.decode(M.inputs,r.slice(4)),c=M.name,x=M.format()}catch{}break}}return Ze.throwError("call revert exception"+o,O.errors.CALL_EXCEPTION,{method:e.format(),data:re(t),errorArgs:s,errorName:c,errorSignature:x,reason:i})}encodeFunctionResult(e,t){return typeof e=="string"&&(e=this.getFunction(e)),re(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){typeof e=="string"&&(e=this.getEvent(e)),t.length>e.inputs.length&&Ze.throwError("too many arguments for "+e.format(),O.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const i=(o,s)=>o.type==="string"?yr(s):o.type==="bytes"?je(re(s)):(o.type==="bool"&&typeof s=="boolean"&&(s=s?"0x01":"0x00"),o.type.match(/^u?int/)&&(s=ee.from(s).toHexString()),o.type==="address"&&this._abiCoder.encode(["address"],[s]),We(re(s),32));for(t.forEach((o,s)=>{let c=e.inputs[s];if(!c.indexed){o!=null&&Ze.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+c.name,o);return}o==null?r.push(null):c.baseType==="array"||c.baseType==="tuple"?Ze.throwArgumentError("filtering with tuples or arrays not supported","contract."+c.name,o):Array.isArray(o)?r.push(o.map(x=>i(c,x))):r.push(i(c,o))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(e,t){typeof e=="string"&&(e=this.getEvent(e));const r=[],i=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Ze.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((s,c)=>{const x=t[c];if(s.indexed)if(s.type==="string")r.push(yr(x));else if(s.type==="bytes")r.push(je(x));else{if(s.baseType==="tuple"||s.baseType==="array")throw new Error("not implemented");r.push(this._abiCoder.encode([s.type],[x]))}else i.push(s),o.push(x)}),{data:this._abiCoder.encode(i,o),topics:r}}decodeEventLog(e,t,r){if(typeof e=="string"&&(e=this.getEvent(e)),r!=null&&!e.anonymous){let C=this.getEventTopic(e);(!ve(r[0],32)||r[0].toLowerCase()!==C)&&Ze.throwError("fragment/topic mismatch",O.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:C,value:r[0]}),r=r.slice(1)}let i=[],o=[],s=[];e.inputs.forEach((C,G)=>{C.indexed?C.type==="string"||C.type==="bytes"||C.baseType==="tuple"||C.baseType==="array"?(i.push(ft.fromObject({type:"bytes32",name:C.name})),s.push(!0)):(i.push(C),s.push(!1)):(o.push(C),s.push(!1))});let c=r!=null?this._abiCoder.decode(i,rt(r)):null,x=this._abiCoder.decode(o,t,!0),g=[],w=0,M=0;e.inputs.forEach((C,G)=>{if(C.indexed)if(c==null)g[G]=new Jn({_isIndexed:!0,hash:null});else if(s[G])g[G]=new Jn({_isIndexed:!0,hash:c[M++]});else try{g[G]=c[M++]}catch(H){g[G]=H}else try{g[G]=x[w++]}catch(H){g[G]=H}if(C.name&&g[C.name]==null){const H=g[G];H instanceof Error?Object.defineProperty(g,C.name,{enumerable:!0,get:()=>{throw Q0(`property ${JSON.stringify(C.name)}`,H)}}):g[C.name]=H}});for(let C=0;C<g.length;C++){const G=g[C];G instanceof Error&&Object.defineProperty(g,C,{enumerable:!0,get:()=>{throw Q0(`index ${C}`,G)}})}return Object.freeze(g)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Ps({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:ee.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Ss({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=re(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new Tf({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Of="abstract-provider/5.8.0";var Df=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const Uf=new O(Of);class Lf extends Tr{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class wn{constructor(){Uf.checkAbstract(new.target,wn),Q(this,"_isProvider",!0)}getFeeData(){return Df(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield Te({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)});let r=null,i=null,o=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,o=ee.from("1500000000"),i=e.baseFeePerGas.mul(2).add(o)),{lastBaseFeePerGas:r,maxFeePerGas:i,maxPriorityFeePerGas:o,gasPrice:t}})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}const Gf="abstract-signer/5.8.0";var Ot=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const Rt=new O(Gf),qf=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],zf=[O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED];let Ms=class Is{constructor(){Rt.checkAbstract(new.target,Is),Q(this,"_isSigner",!0)}getBalance(e){return Ot(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Ot(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Ot(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Te(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Ot(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Te(this.checkTransaction(e));return yield this.provider.call(r,t)})}sendTransaction(e){return Ot(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)})}getChainId(){return Ot(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Ot(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Ot(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Ot(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const r in e)qf.indexOf(r)===-1&&Rt.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=nt(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(r=>(r[0].toLowerCase()!==r[1].toLowerCase()&&Rt.throwArgumentError("from address mismatch","transaction",e),r[0])),t}populateTransaction(e){return Ot(this,void 0,void 0,function*(){const t=yield Te(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Ot(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&Rt.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const r=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||r)?Rt.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&r&&Rt.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(r&&Rt.throwError("network does not support EIP-1559",O.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):Rt.throwError("failed to get consistent fee data",O.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(zf.indexOf(i.code)>=0)throw i;return Rt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Rt.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Te(t)})}_checkProvider(e){this.provider||Rt.throwError("missing provider",O.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class u0 extends Ms{constructor(e,t){super(),Q(this,"address",e),Q(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{Rt.throwError(e,O.errors.UNSUPPORTED_OPERATION,{operation:t})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new u0(this.address,e)}}var Mi={},qe={},Ii,Y0;function An(){if(Y0)return Ii;Y0=1,Ii=n;function n(e,t){if(!e)throw new Error(t||"Assertion failed")}return n.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)},Ii}var In={exports:{}},X0;function Hf(){return X0||(X0=1,typeof Object.create=="function"?In.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:In.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}),In.exports}var Z0;function ir(){if(Z0)return qe;Z0=1;var n=An(),e=Hf();qe.inherits=e;function t(P,m){return(P.charCodeAt(m)&64512)!==55296||m<0||m+1>=P.length?!1:(P.charCodeAt(m+1)&64512)===56320}function r(P,m){if(Array.isArray(P))return P.slice();if(!P)return[];var a=[];if(typeof P=="string")if(m){if(m==="hex")for(P=P.replace(/[^a-z0-9]+/ig,""),P.length%2!==0&&(P="0"+P),b=0;b<P.length;b+=2)a.push(parseInt(P[b]+P[b+1],16))}else for(var d=0,b=0;b<P.length;b++){var y=P.charCodeAt(b);y<128?a[d++]=y:y<2048?(a[d++]=y>>6|192,a[d++]=y&63|128):t(P,b)?(y=65536+((y&1023)<<10)+(P.charCodeAt(++b)&1023),a[d++]=y>>18|240,a[d++]=y>>12&63|128,a[d++]=y>>6&63|128,a[d++]=y&63|128):(a[d++]=y>>12|224,a[d++]=y>>6&63|128,a[d++]=y&63|128)}else for(b=0;b<P.length;b++)a[b]=P[b]|0;return a}qe.toArray=r;function i(P){for(var m="",a=0;a<P.length;a++)m+=c(P[a].toString(16));return m}qe.toHex=i;function o(P){var m=P>>>24|P>>>8&65280|P<<8&16711680|(P&255)<<24;return m>>>0}qe.htonl=o;function s(P,m){for(var a="",d=0;d<P.length;d++){var b=P[d];m==="little"&&(b=o(b)),a+=x(b.toString(16))}return a}qe.toHex32=s;function c(P){return P.length===1?"0"+P:P}qe.zero2=c;function x(P){return P.length===7?"0"+P:P.length===6?"00"+P:P.length===5?"000"+P:P.length===4?"0000"+P:P.length===3?"00000"+P:P.length===2?"000000"+P:P.length===1?"0000000"+P:P}qe.zero8=x;function g(P,m,a,d){var b=a-m;n(b%4===0);for(var y=new Array(b/4),E=0,I=m;E<y.length;E++,I+=4){var R;d==="big"?R=P[I]<<24|P[I+1]<<16|P[I+2]<<8|P[I+3]:R=P[I+3]<<24|P[I+2]<<16|P[I+1]<<8|P[I],y[E]=R>>>0}return y}qe.join32=g;function w(P,m){for(var a=new Array(P.length*4),d=0,b=0;d<P.length;d++,b+=4){var y=P[d];m==="big"?(a[b]=y>>>24,a[b+1]=y>>>16&255,a[b+2]=y>>>8&255,a[b+3]=y&255):(a[b+3]=y>>>24,a[b+2]=y>>>16&255,a[b+1]=y>>>8&255,a[b]=y&255)}return a}qe.split32=w;function M(P,m){return P>>>m|P<<32-m}qe.rotr32=M;function C(P,m){return P<<m|P>>>32-m}qe.rotl32=C;function G(P,m){return P+m>>>0}qe.sum32=G;function H(P,m,a){return P+m+a>>>0}qe.sum32_3=H;function k(P,m,a,d){return P+m+a+d>>>0}qe.sum32_4=k;function S(P,m,a,d,b){return P+m+a+d+b>>>0}qe.sum32_5=S;function T(P,m,a,d){var b=P[m],y=P[m+1],E=d+y>>>0,I=(E<d?1:0)+a+b;P[m]=I>>>0,P[m+1]=E}qe.sum64=T;function D(P,m,a,d){var b=m+d>>>0,y=(b<m?1:0)+P+a;return y>>>0}qe.sum64_hi=D;function U(P,m,a,d){var b=m+d;return b>>>0}qe.sum64_lo=U;function q(P,m,a,d,b,y,E,I){var R=0,p=m;p=p+d>>>0,R+=p<m?1:0,p=p+y>>>0,R+=p<y?1:0,p=p+I>>>0,R+=p<I?1:0;var f=P+a+b+E+R;return f>>>0}qe.sum64_4_hi=q;function z(P,m,a,d,b,y,E,I){var R=m+d+y+I;return R>>>0}qe.sum64_4_lo=z;function j(P,m,a,d,b,y,E,I,R,p){var f=0,A=m;A=A+d>>>0,f+=A<m?1:0,A=A+y>>>0,f+=A<y?1:0,A=A+I>>>0,f+=A<I?1:0,A=A+p>>>0,f+=A<p?1:0;var B=P+a+b+E+R+f;return B>>>0}qe.sum64_5_hi=j;function Y(P,m,a,d,b,y,E,I,R,p){var f=m+d+y+I+p;return f>>>0}qe.sum64_5_lo=Y;function X(P,m,a){var d=m<<32-a|P>>>a;return d>>>0}qe.rotr64_hi=X;function ie(P,m,a){var d=P<<32-a|m>>>a;return d>>>0}qe.rotr64_lo=ie;function se(P,m,a){return P>>>a}qe.shr64_hi=se;function ne(P,m,a){var d=P<<32-a|m>>>a;return d>>>0}return qe.shr64_lo=ne,qe}var ki={},$0;function En(){if($0)return ki;$0=1;var n=ir(),e=An();function t(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return ki.BlockHash=t,t.prototype.update=function(i,o){if(i=n.toArray(i,o),this.pending?this.pending=this.pending.concat(i):this.pending=i,this.pendingTotal+=i.length,this.pending.length>=this._delta8){i=this.pending;var s=i.length%this._delta8;this.pending=i.slice(i.length-s,i.length),this.pending.length===0&&(this.pending=null),i=n.join32(i,0,i.length-s,this.endian);for(var c=0;c<i.length;c+=this._delta32)this._update(i,c,c+this._delta32)}return this},t.prototype.digest=function(i){return this.update(this._pad()),e(this.pending===null),this._digest(i)},t.prototype._pad=function(){var i=this.pendingTotal,o=this._delta8,s=o-(i+this.padLength)%o,c=new Array(s+this.padLength);c[0]=128;for(var x=1;x<s;x++)c[x]=0;if(i<<=3,this.endian==="big"){for(var g=8;g<this.padLength;g++)c[x++]=0;c[x++]=0,c[x++]=0,c[x++]=0,c[x++]=0,c[x++]=i>>>24&255,c[x++]=i>>>16&255,c[x++]=i>>>8&255,c[x++]=i&255}else for(c[x++]=i&255,c[x++]=i>>>8&255,c[x++]=i>>>16&255,c[x++]=i>>>24&255,c[x++]=0,c[x++]=0,c[x++]=0,c[x++]=0,g=8;g<this.padLength;g++)c[x++]=0;return c},ki}var Pr={},Yt={},eo;function ks(){if(eo)return Yt;eo=1;var n=ir(),e=n.rotr32;function t(w,M,C,G){if(w===0)return r(M,C,G);if(w===1||w===3)return o(M,C,G);if(w===2)return i(M,C,G)}Yt.ft_1=t;function r(w,M,C){return w&M^~w&C}Yt.ch32=r;function i(w,M,C){return w&M^w&C^M&C}Yt.maj32=i;function o(w,M,C){return w^M^C}Yt.p32=o;function s(w){return e(w,2)^e(w,13)^e(w,22)}Yt.s0_256=s;function c(w){return e(w,6)^e(w,11)^e(w,25)}Yt.s1_256=c;function x(w){return e(w,7)^e(w,18)^w>>>3}Yt.g0_256=x;function g(w){return e(w,17)^e(w,19)^w>>>10}return Yt.g1_256=g,Yt}var Ci,to;function Kf(){if(to)return Ci;to=1;var n=ir(),e=En(),t=ks(),r=n.rotl32,i=n.sum32,o=n.sum32_5,s=t.ft_1,c=e.BlockHash,x=[1518500249,1859775393,2400959708,3395469782];function g(){if(!(this instanceof g))return new g;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return n.inherits(g,c),Ci=g,g.blockSize=512,g.outSize=160,g.hmacStrength=80,g.padLength=64,g.prototype._update=function(M,C){for(var G=this.W,H=0;H<16;H++)G[H]=M[C+H];for(;H<G.length;H++)G[H]=r(G[H-3]^G[H-8]^G[H-14]^G[H-16],1);var k=this.h[0],S=this.h[1],T=this.h[2],D=this.h[3],U=this.h[4];for(H=0;H<G.length;H++){var q=~~(H/20),z=o(r(k,5),s(q,S,T,D),U,G[H],x[q]);U=D,D=T,T=r(S,30),S=k,k=z}this.h[0]=i(this.h[0],k),this.h[1]=i(this.h[1],S),this.h[2]=i(this.h[2],T),this.h[3]=i(this.h[3],D),this.h[4]=i(this.h[4],U)},g.prototype._digest=function(M){return M==="hex"?n.toHex32(this.h,"big"):n.split32(this.h,"big")},Ci}var Ni,ro;function Cs(){if(ro)return Ni;ro=1;var n=ir(),e=En(),t=ks(),r=An(),i=n.sum32,o=n.sum32_4,s=n.sum32_5,c=t.ch32,x=t.maj32,g=t.s0_256,w=t.s1_256,M=t.g0_256,C=t.g1_256,G=e.BlockHash,H=[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];function k(){if(!(this instanceof k))return new k;G.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=H,this.W=new Array(64)}return n.inherits(k,G),Ni=k,k.blockSize=512,k.outSize=256,k.hmacStrength=192,k.padLength=64,k.prototype._update=function(T,D){for(var U=this.W,q=0;q<16;q++)U[q]=T[D+q];for(;q<U.length;q++)U[q]=o(C(U[q-2]),U[q-7],M(U[q-15]),U[q-16]);var z=this.h[0],j=this.h[1],Y=this.h[2],X=this.h[3],ie=this.h[4],se=this.h[5],ne=this.h[6],P=this.h[7];for(r(this.k.length===U.length),q=0;q<U.length;q++){var m=s(P,w(ie),c(ie,se,ne),this.k[q],U[q]),a=i(g(z),x(z,j,Y));P=ne,ne=se,se=ie,ie=i(X,m),X=Y,Y=j,j=z,z=i(m,a)}this.h[0]=i(this.h[0],z),this.h[1]=i(this.h[1],j),this.h[2]=i(this.h[2],Y),this.h[3]=i(this.h[3],X),this.h[4]=i(this.h[4],ie),this.h[5]=i(this.h[5],se),this.h[6]=i(this.h[6],ne),this.h[7]=i(this.h[7],P)},k.prototype._digest=function(T){return T==="hex"?n.toHex32(this.h,"big"):n.split32(this.h,"big")},Ni}var Ri,no;function Jf(){if(no)return Ri;no=1;var n=ir(),e=Cs();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return n.inherits(t,e),Ri=t,t.blockSize=512,t.outSize=224,t.hmacStrength=192,t.padLength=64,t.prototype._digest=function(i){return i==="hex"?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")},Ri}var Bi,io;function Ns(){if(io)return Bi;io=1;var n=ir(),e=En(),t=An(),r=n.rotr64_hi,i=n.rotr64_lo,o=n.shr64_hi,s=n.shr64_lo,c=n.sum64,x=n.sum64_hi,g=n.sum64_lo,w=n.sum64_4_hi,M=n.sum64_4_lo,C=n.sum64_5_hi,G=n.sum64_5_lo,H=e.BlockHash,k=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function S(){if(!(this instanceof S))return new S;H.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=k,this.W=new Array(160)}n.inherits(S,H),Bi=S,S.blockSize=1024,S.outSize=512,S.hmacStrength=192,S.padLength=128,S.prototype._prepareBlock=function(a,d){for(var b=this.W,y=0;y<32;y++)b[y]=a[d+y];for(;y<b.length;y+=2){var E=ne(b[y-4],b[y-3]),I=P(b[y-4],b[y-3]),R=b[y-14],p=b[y-13],f=ie(b[y-30],b[y-29]),A=se(b[y-30],b[y-29]),B=b[y-32],l=b[y-31];b[y]=w(E,I,R,p,f,A,B,l),b[y+1]=M(E,I,R,p,f,A,B,l)}},S.prototype._update=function(a,d){this._prepareBlock(a,d);var b=this.W,y=this.h[0],E=this.h[1],I=this.h[2],R=this.h[3],p=this.h[4],f=this.h[5],A=this.h[6],B=this.h[7],l=this.h[8],N=this.h[9],J=this.h[10],K=this.h[11],W=this.h[12],oe=this.h[13],$=this.h[14],te=this.h[15];t(this.k.length===b.length);for(var _e=0;_e<b.length;_e+=2){var ae=$,ue=te,xt=Y(l,N),we=X(l,N),ke=T(l,N,J,K,W),Ct=D(l,N,J,K,W,oe),Ce=this.k[_e],Ne=this.k[_e+1],Fe=b[_e],be=b[_e+1],Ae=C(ae,ue,xt,we,ke,Ct,Ce,Ne,Fe,be),vt=G(ae,ue,xt,we,ke,Ct,Ce,Ne,Fe,be);ae=z(y,E),ue=j(y,E),xt=U(y,E,I,R,p),we=q(y,E,I,R,p,f);var Pe=x(ae,ue,xt,we),Me=g(ae,ue,xt,we);$=W,te=oe,W=J,oe=K,J=l,K=N,l=x(A,B,Ae,vt),N=g(B,B,Ae,vt),A=p,B=f,p=I,f=R,I=y,R=E,y=x(Ae,vt,Pe,Me),E=g(Ae,vt,Pe,Me)}c(this.h,0,y,E),c(this.h,2,I,R),c(this.h,4,p,f),c(this.h,6,A,B),c(this.h,8,l,N),c(this.h,10,J,K),c(this.h,12,W,oe),c(this.h,14,$,te)},S.prototype._digest=function(a){return a==="hex"?n.toHex32(this.h,"big"):n.split32(this.h,"big")};function T(m,a,d,b,y){var E=m&d^~m&y;return E<0&&(E+=4294967296),E}function D(m,a,d,b,y,E){var I=a&b^~a&E;return I<0&&(I+=4294967296),I}function U(m,a,d,b,y){var E=m&d^m&y^d&y;return E<0&&(E+=4294967296),E}function q(m,a,d,b,y,E){var I=a&b^a&E^b&E;return I<0&&(I+=4294967296),I}function z(m,a){var d=r(m,a,28),b=r(a,m,2),y=r(a,m,7),E=d^b^y;return E<0&&(E+=4294967296),E}function j(m,a){var d=i(m,a,28),b=i(a,m,2),y=i(a,m,7),E=d^b^y;return E<0&&(E+=4294967296),E}function Y(m,a){var d=r(m,a,14),b=r(m,a,18),y=r(a,m,9),E=d^b^y;return E<0&&(E+=4294967296),E}function X(m,a){var d=i(m,a,14),b=i(m,a,18),y=i(a,m,9),E=d^b^y;return E<0&&(E+=4294967296),E}function ie(m,a){var d=r(m,a,1),b=r(m,a,8),y=o(m,a,7),E=d^b^y;return E<0&&(E+=4294967296),E}function se(m,a){var d=i(m,a,1),b=i(m,a,8),y=s(m,a,7),E=d^b^y;return E<0&&(E+=4294967296),E}function ne(m,a){var d=r(m,a,19),b=r(a,m,29),y=o(m,a,6),E=d^b^y;return E<0&&(E+=4294967296),E}function P(m,a){var d=i(m,a,19),b=i(a,m,29),y=s(m,a,6),E=d^b^y;return E<0&&(E+=4294967296),E}return Bi}var Ti,oo;function Vf(){if(oo)return Ti;oo=1;var n=ir(),e=Ns();function t(){if(!(this instanceof t))return new t;e.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return n.inherits(t,e),Ti=t,t.blockSize=1024,t.outSize=384,t.hmacStrength=192,t.padLength=128,t.prototype._digest=function(i){return i==="hex"?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")},Ti}var so;function Wf(){return so||(so=1,Pr.sha1=Kf(),Pr.sha224=Jf(),Pr.sha256=Cs(),Pr.sha384=Vf(),Pr.sha512=Ns()),Pr}var Fi={},ao;function jf(){if(ao)return Fi;ao=1;var n=ir(),e=En(),t=n.rotl32,r=n.sum32,i=n.sum32_3,o=n.sum32_4,s=e.BlockHash;function c(){if(!(this instanceof c))return new c;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}n.inherits(c,s),Fi.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(S,T){for(var D=this.h[0],U=this.h[1],q=this.h[2],z=this.h[3],j=this.h[4],Y=D,X=U,ie=q,se=z,ne=j,P=0;P<80;P++){var m=r(t(o(D,x(P,U,q,z),S[M[P]+T],g(P)),G[P]),j);D=j,j=z,z=t(q,10),q=U,U=m,m=r(t(o(Y,x(79-P,X,ie,se),S[C[P]+T],w(P)),H[P]),ne),Y=ne,ne=se,se=t(ie,10),ie=X,X=m}m=i(this.h[1],q,se),this.h[1]=i(this.h[2],z,ne),this.h[2]=i(this.h[3],j,Y),this.h[3]=i(this.h[4],D,X),this.h[4]=i(this.h[0],U,ie),this.h[0]=m},c.prototype._digest=function(S){return S==="hex"?n.toHex32(this.h,"little"):n.split32(this.h,"little")};function x(k,S,T,D){return k<=15?S^T^D:k<=31?S&T|~S&D:k<=47?(S|~T)^D:k<=63?S&D|T&~D:S^(T|~D)}function g(k){return k<=15?0:k<=31?1518500249:k<=47?1859775393:k<=63?2400959708:2840853838}function w(k){return k<=15?1352829926:k<=31?1548603684:k<=47?1836072691:k<=63?2053994217:0}var M=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],C=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],G=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],H=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return Fi}var Oi,fo;function Qf(){if(fo)return Oi;fo=1;var n=ir(),e=An();function t(r,i,o){if(!(this instanceof t))return new t(r,i,o);this.Hash=r,this.blockSize=r.blockSize/8,this.outSize=r.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(i,o))}return Oi=t,t.prototype._init=function(i){i.length>this.blockSize&&(i=new this.Hash().update(i).digest()),e(i.length<=this.blockSize);for(var o=i.length;o<this.blockSize;o++)i.push(0);for(o=0;o<i.length;o++)i[o]^=54;for(this.inner=new this.Hash().update(i),o=0;o<i.length;o++)i[o]^=106;this.outer=new this.Hash().update(i)},t.prototype.update=function(i,o){return this.inner.update(i,o),this},t.prototype.digest=function(i){return this.outer.update(this.inner.digest()),this.outer.digest(i)},Oi}var co;function Yf(){return co||(co=1,(function(n){var e=n;e.utils=ir(),e.common=En(),e.sha=Wf(),e.ripemd=jf(),e.hmac=Qf(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(Mi)),Mi}var Xf=Yf();const Pt=Zr(Xf);function en(n,e,t){return t={path:e,exports:{},require:function(r,i){return Zf(r,i??t.path)}},n(t,t.exports),t.exports}function Zf(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var h0=Rs;function Rs(n,e){if(!n)throw new Error(e||"Assertion failed")}Rs.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Wt=en(function(n,e){var t=e;function r(s,c){if(Array.isArray(s))return s.slice();if(!s)return[];var x=[];if(typeof s!="string"){for(var g=0;g<s.length;g++)x[g]=s[g]|0;return x}if(c==="hex"){s=s.replace(/[^a-z0-9]+/ig,""),s.length%2!==0&&(s="0"+s);for(var g=0;g<s.length;g+=2)x.push(parseInt(s[g]+s[g+1],16))}else for(var g=0;g<s.length;g++){var w=s.charCodeAt(g),M=w>>8,C=w&255;M?x.push(M,C):x.push(C)}return x}t.toArray=r;function i(s){return s.length===1?"0"+s:s}t.zero2=i;function o(s){for(var c="",x=0;x<s.length;x++)c+=i(s[x].toString(16));return c}t.toHex=o,t.encode=function(c,x){return x==="hex"?o(c):c}}),kt=en(function(n,e){var t=e;t.assert=h0,t.toArray=Wt.toArray,t.zero2=Wt.zero2,t.toHex=Wt.toHex,t.encode=Wt.encode;function r(x,g,w){var M=new Array(Math.max(x.bitLength(),w)+1),C;for(C=0;C<M.length;C+=1)M[C]=0;var G=1<<g+1,H=x.clone();for(C=0;C<M.length;C++){var k,S=H.andln(G-1);H.isOdd()?(S>(G>>1)-1?k=(G>>1)-S:k=S,H.isubn(k)):k=0,M[C]=k,H.iushrn(1)}return M}t.getNAF=r;function i(x,g){var w=[[],[]];x=x.clone(),g=g.clone();for(var M=0,C=0,G;x.cmpn(-M)>0||g.cmpn(-C)>0;){var H=x.andln(3)+M&3,k=g.andln(3)+C&3;H===3&&(H=-1),k===3&&(k=-1);var S;(H&1)===0?S=0:(G=x.andln(7)+M&7,(G===3||G===5)&&k===2?S=-H:S=H),w[0].push(S);var T;(k&1)===0?T=0:(G=g.andln(7)+C&7,(G===3||G===5)&&H===2?T=-k:T=k),w[1].push(T),2*M===S+1&&(M=1-M),2*C===T+1&&(C=1-C),x.iushrn(1),g.iushrn(1)}return w}t.getJSF=i;function o(x,g,w){var M="_"+g;x.prototype[g]=function(){return this[M]!==void 0?this[M]:this[M]=w.call(this)}}t.cachedProperty=o;function s(x){return typeof x=="string"?t.toArray(x,"hex"):x}t.parseBytes=s;function c(x){return new de(x,"hex","le")}t.intFromLE=c}),Vn=kt.getNAF,$f=kt.getJSF,Wn=kt.assert;function _r(n,e){this.type=n,this.p=new de(e.p,16),this.red=e.prime?de.red(e.prime):de.mont(this.p),this.zero=new de(0).toRed(this.red),this.one=new de(1).toRed(this.red),this.two=new de(2).toRed(this.red),this.n=e.n&&new de(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Fr=_r;_r.prototype.point=function(){throw new Error("Not implemented")};_r.prototype.validate=function(){throw new Error("Not implemented")};_r.prototype._fixedNafMul=function(e,t){Wn(e.precomputed);var r=e._getDoubles(),i=Vn(t,1,this._bitLength),o=(1<<r.step+1)-(r.step%2===0?2:1);o/=3;var s=[],c,x;for(c=0;c<i.length;c+=r.step){x=0;for(var g=c+r.step-1;g>=c;g--)x=(x<<1)+i[g];s.push(x)}for(var w=this.jpoint(null,null,null),M=this.jpoint(null,null,null),C=o;C>0;C--){for(c=0;c<s.length;c++)x=s[c],x===C?M=M.mixedAdd(r.points[c]):x===-C&&(M=M.mixedAdd(r.points[c].neg()));w=w.add(M)}return w.toP()};_r.prototype._wnafMul=function(e,t){var r=4,i=e._getNAFPoints(r);r=i.wnd;for(var o=i.points,s=Vn(t,r,this._bitLength),c=this.jpoint(null,null,null),x=s.length-1;x>=0;x--){for(var g=0;x>=0&&s[x]===0;x--)g++;if(x>=0&&g++,c=c.dblp(g),x<0)break;var w=s[x];Wn(w!==0),e.type==="affine"?w>0?c=c.mixedAdd(o[w-1>>1]):c=c.mixedAdd(o[-w-1>>1].neg()):w>0?c=c.add(o[w-1>>1]):c=c.add(o[-w-1>>1].neg())}return e.type==="affine"?c.toP():c};_r.prototype._wnafMulAdd=function(e,t,r,i,o){var s=this._wnafT1,c=this._wnafT2,x=this._wnafT3,g=0,w,M,C;for(w=0;w<i;w++){C=t[w];var G=C._getNAFPoints(e);s[w]=G.wnd,c[w]=G.points}for(w=i-1;w>=1;w-=2){var H=w-1,k=w;if(s[H]!==1||s[k]!==1){x[H]=Vn(r[H],s[H],this._bitLength),x[k]=Vn(r[k],s[k],this._bitLength),g=Math.max(x[H].length,g),g=Math.max(x[k].length,g);continue}var S=[t[H],null,null,t[k]];t[H].y.cmp(t[k].y)===0?(S[1]=t[H].add(t[k]),S[2]=t[H].toJ().mixedAdd(t[k].neg())):t[H].y.cmp(t[k].y.redNeg())===0?(S[1]=t[H].toJ().mixedAdd(t[k]),S[2]=t[H].add(t[k].neg())):(S[1]=t[H].toJ().mixedAdd(t[k]),S[2]=t[H].toJ().mixedAdd(t[k].neg()));var T=[-3,-1,-5,-7,0,7,5,1,3],D=$f(r[H],r[k]);for(g=Math.max(D[0].length,g),x[H]=new Array(g),x[k]=new Array(g),M=0;M<g;M++){var U=D[0][M]|0,q=D[1][M]|0;x[H][M]=T[(U+1)*3+(q+1)],x[k][M]=0,c[H]=S}}var z=this.jpoint(null,null,null),j=this._wnafT4;for(w=g;w>=0;w--){for(var Y=0;w>=0;){var X=!0;for(M=0;M<i;M++)j[M]=x[M][w]|0,j[M]!==0&&(X=!1);if(!X)break;Y++,w--}if(w>=0&&Y++,z=z.dblp(Y),w<0)break;for(M=0;M<i;M++){var ie=j[M];ie!==0&&(ie>0?C=c[M][ie-1>>1]:ie<0&&(C=c[M][-ie-1>>1].neg()),C.type==="affine"?z=z.mixedAdd(C):z=z.add(C))}}for(w=0;w<i;w++)c[w]=null;return o?z:z.toP()};function Tt(n,e){this.curve=n,this.type=e,this.precomputed=null}_r.BasePoint=Tt;Tt.prototype.eq=function(){throw new Error("Not implemented")};Tt.prototype.validate=function(){return this.curve.validate(this)};_r.prototype.decodePoint=function(e,t){e=kt.toArray(e,t);var r=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*r){e[0]===6?Wn(e[e.length-1]%2===0):e[0]===7&&Wn(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return i}else if((e[0]===2||e[0]===3)&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),e[0]===3);throw new Error("Unknown point format")};Tt.prototype.encodeCompressed=function(e){return this.encode(e,!0)};Tt.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))};Tt.prototype.encode=function(e,t){return kt.encode(this._encode(t),e)};Tt.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this};Tt.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return t?t.points.length>=Math.ceil((e.bitLength()+1)/t.step):!1};Tt.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,o=0;o<t;o+=e){for(var s=0;s<e;s++)i=i.dbl();r.push(i)}return{step:e,points:r}};Tt.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,i=r===1?null:this.dbl(),o=1;o<r;o++)t[o]=t[o-1].add(i);return{wnd:e,points:t}};Tt.prototype._getBeta=function(){return null};Tt.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var l0=en(function(n){typeof Object.create=="function"?n.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}}),ec=kt.assert;function Ft(n){Fr.call(this,"short",n),this.a=new de(n.a,16).toRed(this.red),this.b=new de(n.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(n),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}l0(Ft,Fr);var tc=Ft;Ft.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var t,r;if(e.beta)t=new de(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1],t=t.toRed(this.red)}if(e.lambda)r=new de(e.lambda,16);else{var o=this._getEndoRoots(this.n);this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))===0?r=o[0]:(r=o[1],ec(this.g.mul(r).x.cmp(this.g.x.redMul(t))===0))}var s;return e.basis?s=e.basis.map(function(c){return{a:new de(c.a,16),b:new de(c.b,16)}}):s=this._getEndoBasis(r),{beta:t,lambda:r,basis:s}}};Ft.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:de.mont(e),r=new de(2).toRed(t).redInvm(),i=r.redNeg(),o=new de(3).toRed(t).redNeg().redSqrt().redMul(r),s=i.redAdd(o).fromRed(),c=i.redSub(o).fromRed();return[s,c]};Ft.prototype._getEndoBasis=function(e){for(var t=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=e,i=this.n.clone(),o=new de(1),s=new de(0),c=new de(0),x=new de(1),g,w,M,C,G,H,k,S=0,T,D;r.cmpn(0)!==0;){var U=i.div(r);T=i.sub(U.mul(r)),D=c.sub(U.mul(o));var q=x.sub(U.mul(s));if(!M&&T.cmp(t)<0)g=k.neg(),w=o,M=T.neg(),C=D;else if(M&&++S===2)break;k=T,i=r,r=T,c=o,o=D,x=s,s=q}G=T.neg(),H=D;var z=M.sqr().add(C.sqr()),j=G.sqr().add(H.sqr());return j.cmp(z)>=0&&(G=g,H=w),M.negative&&(M=M.neg(),C=C.neg()),G.negative&&(G=G.neg(),H=H.neg()),[{a:M,b:C},{a:G,b:H}]};Ft.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],o=i.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),c=o.mul(r.a),x=s.mul(i.a),g=o.mul(r.b),w=s.mul(i.b),M=e.sub(c).sub(x),C=g.add(w).neg();return{k1:M,k2:C}};Ft.prototype.pointFromX=function(e,t){e=new de(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(i.redSqr().redSub(r).cmp(this.zero)!==0)throw new Error("invalid point");var o=i.fromRed().isOdd();return(t&&!o||!t&&o)&&(i=i.redNeg()),this.point(e,i)};Ft.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,i=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return r.redSqr().redISub(o).cmpn(0)===0};Ft.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,o=this._endoWnafT2,s=0;s<e.length;s++){var c=this._endoSplit(t[s]),x=e[s],g=x._getBeta();c.k1.negative&&(c.k1.ineg(),x=x.neg(!0)),c.k2.negative&&(c.k2.ineg(),g=g.neg(!0)),i[s*2]=x,i[s*2+1]=g,o[s*2]=c.k1,o[s*2+1]=c.k2}for(var w=this._wnafMulAdd(1,i,o,s*2,r),M=0;M<s*2;M++)i[M]=null,o[M]=null;return w};function ht(n,e,t,r){Fr.BasePoint.call(this,n,"affine"),e===null&&t===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new de(e,16),this.y=new de(t,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}l0(ht,Fr.BasePoint);Ft.prototype.point=function(e,t,r){return new ht(this,e,t,r)};Ft.prototype.pointFromJSON=function(e,t){return ht.fromJSON(this,e,t)};ht.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,i=function(o){return r.point(o.x.redMul(r.endo.beta),o.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return t}};ht.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};ht.fromJSON=function(e,t,r){typeof t=="string"&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;function o(c){return e.point(c[0],c[1],r)}var s=t[2];return i.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[i].concat(s.doubles.points.map(o))},naf:s.naf&&{wnd:s.naf.wnd,points:[i].concat(s.naf.points.map(o))}},i};ht.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};ht.prototype.isInfinity=function(){return this.inf};ht.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var t=this.y.redSub(e.y);t.cmpn(0)!==0&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)};ht.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),i=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(i),s=o.redSqr().redISub(this.x.redAdd(this.x)),c=o.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,c)};ht.prototype.getX=function(){return this.x.fromRed()};ht.prototype.getY=function(){return this.y.fromRed()};ht.prototype.mul=function(e){return e=new de(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};ht.prototype.mulAdd=function(e,t,r){var i=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o):this.curve._wnafMulAdd(1,i,o,2)};ht.prototype.jmulAdd=function(e,t,r){var i=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,o,!0):this.curve._wnafMulAdd(1,i,o,2,!0)};ht.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};ht.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,i=function(o){return o.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return t};ht.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function dt(n,e,t,r){Fr.BasePoint.call(this,n,"jacobian"),e===null&&t===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new de(0)):(this.x=new de(e,16),this.y=new de(t,16),this.z=new de(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}l0(dt,Fr.BasePoint);Ft.prototype.jpoint=function(e,t,r){return new dt(this,e,t,r)};dt.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(r,i)};dt.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};dt.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),o=e.x.redMul(r),s=this.y.redMul(t.redMul(e.z)),c=e.y.redMul(r.redMul(this.z)),x=i.redSub(o),g=s.redSub(c);if(x.cmpn(0)===0)return g.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=x.redSqr(),M=w.redMul(x),C=i.redMul(w),G=g.redSqr().redIAdd(M).redISub(C).redISub(C),H=g.redMul(C.redISub(G)).redISub(s.redMul(M)),k=this.z.redMul(e.z).redMul(x);return this.curve.jpoint(G,H,k)};dt.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),o=this.y,s=e.y.redMul(t).redMul(this.z),c=r.redSub(i),x=o.redSub(s);if(c.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=c.redSqr(),w=g.redMul(c),M=r.redMul(g),C=x.redSqr().redIAdd(w).redISub(M).redISub(M),G=x.redMul(M.redISub(C)).redISub(o.redMul(w)),H=this.z.redMul(c);return this.curve.jpoint(C,G,H)};dt.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var i=this.curve.a,o=this.curve.tinv,s=this.x,c=this.y,x=this.z,g=x.redSqr().redSqr(),w=c.redAdd(c);for(t=0;t<e;t++){var M=s.redSqr(),C=w.redSqr(),G=C.redSqr(),H=M.redAdd(M).redIAdd(M).redIAdd(i.redMul(g)),k=s.redMul(C),S=H.redSqr().redISub(k.redAdd(k)),T=k.redISub(S),D=H.redMul(T);D=D.redIAdd(D).redISub(G);var U=w.redMul(x);t+1<e&&(g=g.redMul(G)),s=S,x=U,w=D}return this.curve.jpoint(s,w.redMul(o),x)};dt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};dt.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),c=this.x.redAdd(o).redSqr().redISub(i).redISub(s);c=c.redIAdd(c);var x=i.redAdd(i).redIAdd(i),g=x.redSqr().redISub(c).redISub(c),w=s.redIAdd(s);w=w.redIAdd(w),w=w.redIAdd(w),e=g,t=x.redMul(c.redISub(g)).redISub(w),r=this.y.redAdd(this.y)}else{var M=this.x.redSqr(),C=this.y.redSqr(),G=C.redSqr(),H=this.x.redAdd(C).redSqr().redISub(M).redISub(G);H=H.redIAdd(H);var k=M.redAdd(M).redIAdd(M),S=k.redSqr(),T=G.redIAdd(G);T=T.redIAdd(T),T=T.redIAdd(T),e=S.redISub(H).redISub(H),t=k.redMul(H.redISub(e)).redISub(T),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)};dt.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var i=this.x.redSqr(),o=this.y.redSqr(),s=o.redSqr(),c=this.x.redAdd(o).redSqr().redISub(i).redISub(s);c=c.redIAdd(c);var x=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),g=x.redSqr().redISub(c).redISub(c);e=g;var w=s.redIAdd(s);w=w.redIAdd(w),w=w.redIAdd(w),t=x.redMul(c.redISub(g)).redISub(w),r=this.y.redAdd(this.y)}else{var M=this.z.redSqr(),C=this.y.redSqr(),G=this.x.redMul(C),H=this.x.redSub(M).redMul(this.x.redAdd(M));H=H.redAdd(H).redIAdd(H);var k=G.redIAdd(G);k=k.redIAdd(k);var S=k.redAdd(k);e=H.redSqr().redISub(S),r=this.y.redAdd(this.z).redSqr().redISub(C).redISub(M);var T=C.redSqr();T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T),t=H.redMul(k.redISub(e)).redISub(T)}return this.curve.jpoint(e,t,r)};dt.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,i=this.z,o=i.redSqr().redSqr(),s=t.redSqr(),c=r.redSqr(),x=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(o)),g=t.redAdd(t);g=g.redIAdd(g);var w=g.redMul(c),M=x.redSqr().redISub(w.redAdd(w)),C=w.redISub(M),G=c.redSqr();G=G.redIAdd(G),G=G.redIAdd(G),G=G.redIAdd(G);var H=x.redMul(C).redISub(G),k=r.redAdd(r).redMul(i);return this.curve.jpoint(M,H,k)};dt.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),i=t.redSqr(),o=e.redAdd(e).redIAdd(e),s=o.redSqr(),c=this.x.redAdd(t).redSqr().redISub(e).redISub(i);c=c.redIAdd(c),c=c.redAdd(c).redIAdd(c),c=c.redISub(s);var x=c.redSqr(),g=i.redIAdd(i);g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g);var w=o.redIAdd(c).redSqr().redISub(s).redISub(x).redISub(g),M=t.redMul(w);M=M.redIAdd(M),M=M.redIAdd(M);var C=this.x.redMul(x).redISub(M);C=C.redIAdd(C),C=C.redIAdd(C);var G=this.y.redMul(w.redMul(g.redISub(w)).redISub(c.redMul(x)));G=G.redIAdd(G),G=G.redIAdd(G),G=G.redIAdd(G);var H=this.z.redAdd(c).redSqr().redISub(r).redISub(x);return this.curve.jpoint(C,G,H)};dt.prototype.mul=function(e,t){return e=new de(e,t),this.curve._wnafMul(this,e)};dt.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0)!==0)return!1;var i=t.redMul(this.z),o=r.redMul(e.z);return this.y.redMul(o).redISub(e.y.redMul(i)).cmpn(0)===0};dt.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(this.x.cmp(r)===0)return!0;for(var i=e.clone(),o=this.curve.redN.redMul(t);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};dt.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};dt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Fn=en(function(n,e){var t=e;t.base=Fr,t.short=tc,t.mont=null,t.edwards=null}),On=en(function(n,e){var t=e,r=kt.assert;function i(c){c.type==="short"?this.curve=new Fn.short(c):c.type==="edwards"?this.curve=new Fn.edwards(c):this.curve=new Fn.mont(c),this.g=this.curve.g,this.n=this.curve.n,this.hash=c.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}t.PresetCurve=i;function o(c,x){Object.defineProperty(t,c,{configurable:!0,enumerable:!0,get:function(){var g=new i(x);return Object.defineProperty(t,c,{configurable:!0,enumerable:!0,value:g}),g}})}o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Pt.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Pt.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Pt.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Pt.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Pt.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Pt.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Pt.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var s;try{s=null.crash()}catch{s=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Pt.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ar(n){if(!(this instanceof Ar))return new Ar(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Wt.toArray(n.entropy,n.entropyEnc||"hex"),t=Wt.toArray(n.nonce,n.nonceEnc||"hex"),r=Wt.toArray(n.pers,n.persEnc||"hex");h0(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}var Bs=Ar;Ar.prototype._init=function(e,t,r){var i=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656};Ar.prototype._hmac=function(){return new Pt.hmac(this.hash,this.K)};Ar.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Ar.prototype.reseed=function(e,t,r,i){typeof t!="string"&&(i=r,r=t,t=null),e=Wt.toArray(e,t),r=Wt.toArray(r,i),h0(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1};Ar.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof t!="string"&&(i=r,r=t,t=null),r&&(r=Wt.toArray(r,i||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,Wt.encode(s,t)};var Xi=kt.assert;function yt(n,e){this.ec=n,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var d0=yt;yt.fromPublic=function(e,t,r){return t instanceof yt?t:new yt(e,{pub:t,pubEnc:r})};yt.fromPrivate=function(e,t,r){return t instanceof yt?t:new yt(e,{priv:t,privEnc:r})};yt.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};yt.prototype.getPublic=function(e,t){return typeof e=="string"&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub};yt.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};yt.prototype._importPrivate=function(e,t){this.priv=new de(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)};yt.prototype._importPublic=function(e,t){if(e.x||e.y){this.ec.curve.type==="mont"?Xi(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Xi(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)};yt.prototype.derive=function(e){return e.validate()||Xi(e.validate(),"public point not validated"),e.mul(this.priv).getX()};yt.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)};yt.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)};yt.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var rc=kt.assert;function $n(n,e){if(n instanceof $n)return n;this._importDER(n,e)||(rc(n.r&&n.s,"Signature without r or s"),this.r=new de(n.r,16),this.s=new de(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var ei=$n;function nc(){this.place=0}function Di(n,e){var t=n[e.place++];if(!(t&128))return t;var r=t&15;if(r===0||r>4||n[e.place]===0)return!1;for(var i=0,o=0,s=e.place;o<r;o++,s++)i<<=8,i|=n[s],i>>>=0;return i<=127?!1:(e.place=s,i)}function uo(n){for(var e=0,t=n.length-1;!n[e]&&!(n[e+1]&128)&&e<t;)e++;return e===0?n:n.slice(e)}$n.prototype._importDER=function(e,t){e=kt.toArray(e,t);var r=new nc;if(e[r.place++]!==48)return!1;var i=Di(e,r);if(i===!1||i+r.place!==e.length||e[r.place++]!==2)return!1;var o=Di(e,r);if(o===!1||(e[r.place]&128)!==0)return!1;var s=e.slice(r.place,o+r.place);if(r.place+=o,e[r.place++]!==2)return!1;var c=Di(e,r);if(c===!1||e.length!==c+r.place||(e[r.place]&128)!==0)return!1;var x=e.slice(r.place,c+r.place);if(s[0]===0)if(s[1]&128)s=s.slice(1);else return!1;if(x[0]===0)if(x[1]&128)x=x.slice(1);else return!1;return this.r=new de(s),this.s=new de(x),this.recoveryParam=null,!0};function Ui(n,e){if(e<128){n.push(e);return}var t=1+(Math.log(e)/Math.LN2>>>3);for(n.push(t|128);--t;)n.push(e>>>(t<<3)&255);n.push(e)}$n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(t[0]&128&&(t=[0].concat(t)),r[0]&128&&(r=[0].concat(r)),t=uo(t),r=uo(r);!r[0]&&!(r[1]&128);)r=r.slice(1);var i=[2];Ui(i,t.length),i=i.concat(t),i.push(2),Ui(i,r.length);var o=i.concat(r),s=[48];return Ui(s,o.length),s=s.concat(o),kt.encode(s,e)};var ic=(function(){throw new Error("unsupported")}),Mr=kt.assert;function Bt(n){if(!(this instanceof Bt))return new Bt(n);typeof n=="string"&&(Mr(Object.prototype.hasOwnProperty.call(On,n),"Unknown curve "+n),n=On[n]),n instanceof On.PresetCurve&&(n={curve:n}),this.curve=n.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=n.curve.g,this.g.precompute(n.curve.n.bitLength()+1),this.hash=n.hash||n.curve.hash}var oc=Bt;Bt.prototype.keyPair=function(e){return new d0(this,e)};Bt.prototype.keyFromPrivate=function(e,t){return d0.fromPrivate(this,e,t)};Bt.prototype.keyFromPublic=function(e,t){return d0.fromPublic(this,e,t)};Bt.prototype.genKeyPair=function(e){e||(e={});for(var t=new Bs({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ic(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new de(2));;){var o=new de(t.generate(r));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}};Bt.prototype._truncateToN=function(e,t,r){var i;if(de.isBN(e)||typeof e=="number")e=new de(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new de(e,16);else{var o=e.toString();i=o.length+1>>>1,e=new de(o,16)}typeof r!="number"&&(r=i*8);var s=r-this.n.bitLength();return s>0&&(e=e.ushrn(s)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e};Bt.prototype.sign=function(e,t,r,i){if(typeof r=="object"&&(i=r,r=null),i||(i={}),typeof e!="string"&&typeof e!="number"&&!de.isBN(e)){Mr(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),Mr(e.length>>>0===e.length);for(var o=0;o<e.length;o++)Mr((e[o]&255)===e[o])}t=this.keyFromPrivate(t,r),e=this._truncateToN(e,!1,i.msgBitLength),Mr(!e.isNeg(),"Can not sign a negative message");var s=this.n.byteLength(),c=t.getPrivate().toArray("be",s),x=e.toArray("be",s);Mr(new de(x).eq(e),"Can not sign message");for(var g=new Bs({hash:this.hash,entropy:c,nonce:x,pers:i.pers,persEnc:i.persEnc||"utf8"}),w=this.n.sub(new de(1)),M=0;;M++){var C=i.k?i.k(M):new de(g.generate(this.n.byteLength()));if(C=this._truncateToN(C,!0),!(C.cmpn(1)<=0||C.cmp(w)>=0)){var G=this.g.mul(C);if(!G.isInfinity()){var H=G.getX(),k=H.umod(this.n);if(k.cmpn(0)!==0){var S=C.invm(this.n).mul(k.mul(t.getPrivate()).iadd(e));if(S=S.umod(this.n),S.cmpn(0)!==0){var T=(G.getY().isOdd()?1:0)|(H.cmp(k)!==0?2:0);return i.canonical&&S.cmp(this.nh)>0&&(S=this.n.sub(S),T^=1),new ei({r:k,s:S,recoveryParam:T})}}}}}};Bt.prototype.verify=function(e,t,r,i,o){o||(o={}),e=this._truncateToN(e,!1,o.msgBitLength),r=this.keyFromPublic(r,i),t=new ei(t,"hex");var s=t.r,c=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;var x=c.invm(this.n),g=x.mul(e).umod(this.n),w=x.mul(s).umod(this.n),M;return this.curve._maxwellTrick?(M=this.g.jmulAdd(g,r.getPublic(),w),M.isInfinity()?!1:M.eqXToP(s)):(M=this.g.mulAdd(g,r.getPublic(),w),M.isInfinity()?!1:M.getX().umod(this.n).cmp(s)===0)};Bt.prototype.recoverPubKey=function(n,e,t,r){Mr((3&t)===t,"The recovery param is more than two bits"),e=new ei(e,r);var i=this.n,o=new de(n),s=e.r,c=e.s,x=t&1,g=t>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&g)throw new Error("Unable to find sencond key candinate");g?s=this.curve.pointFromX(s.add(this.curve.n),x):s=this.curve.pointFromX(s,x);var w=e.r.invm(i),M=i.sub(o).mul(w).umod(i),C=c.mul(w).umod(i);return this.g.mulAdd(M,s,C)};Bt.prototype.getKeyRecoveryParam=function(n,e,t,r){if(e=new ei(e,r),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(n,e,i)}catch{continue}if(o.eq(t))return i}throw new Error("Unable to find valid recovery factor")};var sc=en(function(n,e){var t=e;t.version="6.6.1",t.utils=kt,t.rand=(function(){throw new Error("unsupported")}),t.curve=Fn,t.curves=On,t.ec=oc,t.eddsa=null}),ac=sc.ec;const fc="signing-key/5.8.0",Zi=new O(fc);let Li=null;function mr(){return Li||(Li=new ac("secp256k1")),Li}class Ir{constructor(e){Q(this,"curve","secp256k1"),Q(this,"privateKey",re(e)),wr(this.privateKey)!==32&&Zi.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=mr().keyFromPrivate(Z(this.privateKey));Q(this,"publicKey","0x"+t.getPublic(!1,"hex")),Q(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Q(this,"_isSigningKey",!0)}_addPoint(e){const t=mr().keyFromPublic(Z(this.publicKey)),r=mr().keyFromPublic(Z(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=mr().keyFromPrivate(Z(this.privateKey)),r=Z(e);r.length!==32&&Zi.throwArgumentError("bad digest length","digest",e);const i=t.sign(r,{canonical:!0});return Br({recoveryParam:i.recoveryParam,r:We("0x"+i.r.toString(16),32),s:We("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const t=mr().keyFromPrivate(Z(this.privateKey)),r=mr().keyFromPublic(Z(x0(e)));return We("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function Ts(n,e){const t=Br(e),r={r:Z(t.r),s:Z(t.s)};return"0x"+mr().recoverPubKey(Z(n),r,t.recoveryParam).encode("hex",!1)}function x0(n,e){const t=Z(n);return t.length===32?new Ir(t).publicKey:t.length===33?"0x"+mr().keyFromPublic(t).getPublic(!1,"hex"):t.length===65?re(t):Zi.throwArgumentError("invalid public or private key","key","[REDACTED]")}const cc="transactions/5.8.0",mt=new O(cc);var $i;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})($i||($i={}));function p0(n){return n==="0x"?null:et(n)}function gt(n){return n==="0x"?ns:ee.from(n)}const uc=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],hc={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function vr(n){const e=x0(n);return et(at(je(at(e,1)),12))}function b0(n,e){return vr(Ts(Z(n),e))}function Mt(n,e){const t=rr(ee.from(n).toHexString());return t.length>32&&mt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Gi(n,e){return{address:et(n),storageKeys:(e||[]).map((t,r)=>(wr(t)!==32&&mt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${r}]`,t),t.toLowerCase()))}}function Or(n){if(Array.isArray(n))return n.map((t,r)=>Array.isArray(t)?(t.length>2&&mt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${r}]`,t),Gi(t[0],t[1])):Gi(t.address,t.storageKeys));const e=Object.keys(n).map(t=>{const r=n[t].reduce((i,o)=>(i[o]=!0,i),{});return Gi(t,Object.keys(r).sort())});return e.sort((t,r)=>t.address.localeCompare(r.address)),e}function Fs(n){return Or(n).map(e=>[e.address,e.storageKeys])}function Os(n,e){if(n.gasPrice!=null){const r=ee.from(n.gasPrice),i=ee.from(n.maxFeePerGas||0);r.eq(i)||mt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:i})}const t=[Mt(n.chainId||0,"chainId"),Mt(n.nonce||0,"nonce"),Mt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Mt(n.maxFeePerGas||0,"maxFeePerGas"),Mt(n.gasLimit||0,"gasLimit"),n.to!=null?et(n.to):"0x",Mt(n.value||0,"value"),n.data||"0x",Fs(n.accessList||[])];if(e){const r=Br(e);t.push(Mt(r.recoveryParam,"recoveryParam")),t.push(rr(r.r)),t.push(rr(r.s))}return wt(["0x02",jr(t)])}function Ds(n,e){const t=[Mt(n.chainId||0,"chainId"),Mt(n.nonce||0,"nonce"),Mt(n.gasPrice||0,"gasPrice"),Mt(n.gasLimit||0,"gasLimit"),n.to!=null?et(n.to):"0x",Mt(n.value||0,"value"),n.data||"0x",Fs(n.accessList||[])];if(e){const r=Br(e);t.push(Mt(r.recoveryParam,"recoveryParam")),t.push(rr(r.r)),t.push(rr(r.s))}return wt(["0x01",jr(t)])}function lc(n,e){o0(n,hc);const t=[];uc.forEach(function(s){let c=n[s.name]||[];const x={};s.numeric&&(x.hexPad="left"),c=Z(re(c,x)),s.length&&c.length!==s.length&&c.length>0&&mt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,c),s.maxLength&&(c=rr(c),c.length>s.maxLength&&mt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,c)),t.push(re(c))});let r=0;if(n.chainId!=null?(r=n.chainId,typeof r!="number"&&mt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!yn(e)&&e.v>28&&(r=Math.floor((e.v-35)/2)),r!==0&&(t.push(re(r)),t.push("0x"),t.push("0x")),!e)return jr(t);const i=Br(e);let o=27+i.recoveryParam;return r!==0?(t.pop(),t.pop(),t.pop(),o+=r*2+8,i.v>28&&i.v!==o&&mt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==o&&mt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(re(o)),t.push(rr(Z(i.r))),t.push(rr(Z(i.s))),jr(t)}function e0(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&mt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),lc(n,e);switch(n.type){case 1:return Ds(n,e);case 2:return Os(n,e)}return mt.throwError(`unsupported transaction type: ${n.type}`,O.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Us(n,e,t){try{const r=gt(e[0]).toNumber();if(r!==0&&r!==1)throw new Error("bad recid");n.v=r}catch{mt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=We(e[1],32),n.s=We(e[2],32);try{const r=je(t(n));n.from=b0(r,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function dc(n){const e=a0(n.slice(1));e.length!==9&&e.length!==12&&mt.throwArgumentError("invalid component count for transaction type: 2","payload",re(n));const t=gt(e[2]),r=gt(e[3]),i={type:2,chainId:gt(e[0]).toNumber(),nonce:gt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:r,gasPrice:null,gasLimit:gt(e[4]),to:p0(e[5]),value:gt(e[6]),data:e[7],accessList:Or(e[8])};return e.length===9||(i.hash=je(n),Us(i,e.slice(9),Os)),i}function xc(n){const e=a0(n.slice(1));e.length!==8&&e.length!==11&&mt.throwArgumentError("invalid component count for transaction type: 1","payload",re(n));const t={type:1,chainId:gt(e[0]).toNumber(),nonce:gt(e[1]).toNumber(),gasPrice:gt(e[2]),gasLimit:gt(e[3]),to:p0(e[4]),value:gt(e[5]),data:e[6],accessList:Or(e[7])};return e.length===8||(t.hash=je(n),Us(t,e.slice(8),Ds)),t}function pc(n){const e=a0(n);e.length!==9&&e.length!==6&&mt.throwArgumentError("invalid raw transaction","rawTransaction",n);const t={nonce:gt(e[0]).toNumber(),gasPrice:gt(e[1]),gasLimit:gt(e[2]),to:p0(e[3]),value:gt(e[4]),data:e[5],chainId:0};if(e.length===6)return t;try{t.v=ee.from(e[6]).toNumber()}catch{return t}if(t.r=We(e[7],32),t.s=We(e[8],32),ee.from(t.r).isZero()&&ee.from(t.s).isZero())t.chainId=t.v,t.v=0;else{t.chainId=Math.floor((t.v-35)/2),t.chainId<0&&(t.chainId=0);let r=t.v-27;const i=e.slice(0,6);t.chainId!==0&&(i.push(re(t.chainId)),i.push("0x"),i.push("0x"),r-=t.chainId*2+8);const o=je(jr(i));try{t.from=b0(o,{r:re(t.r),s:re(t.s),recoveryParam:r})}catch{}t.hash=je(n)}return t.type=null,t}function Ls(n){const e=Z(n);if(e[0]>127)return pc(e);switch(e[0]){case 1:return xc(e);case 2:return dc(e)}return mt.throwError(`unsupported transaction type: ${e[0]}`,O.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const bc="contracts/5.8.0";var Nr=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const it=new O(bc);function jn(n,e){return Nr(this,void 0,void 0,function*(){const t=yield e;typeof t!="string"&&it.throwArgumentError("invalid address or ENS name","name",t);try{return et(t)}catch{}n||it.throwError("a provider or signer is needed to resolve ENS names",O.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const r=yield n.resolveName(t);return r==null&&it.throwArgumentError("resolver or addr is not configured for ENS name","name",t),r})}function Dn(n,e,t){return Nr(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((r,i)=>Dn(n,Array.isArray(e)?e[i]:e[r.name],r))):t.type==="address"?yield jn(n,e):t.type==="tuple"?yield Dn(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(r=>Dn(n,r,t.arrayChildren))):Promise.reject(it.makeError("invalid value for array",O.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function ti(n,e,t){return Nr(this,void 0,void 0,function*(){let r={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(r=nt(t.pop())),it.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?r.from?r.from=Te({override:jn(n.signer,r.from),signer:n.signer.getAddress()}).then(g=>Nr(this,void 0,void 0,function*(){return et(g.signer)!==g.override&&it.throwError("Contract with a Signer cannot override from",O.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),g.override})):r.from=n.signer.getAddress():r.from&&(r.from=jn(n.provider,r.from));const i=yield Te({args:Dn(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Te(r)||{}}),o=n.interface.encodeFunctionData(e,i.args),s={data:o,to:i.address},c=i.overrides;if(c.nonce!=null&&(s.nonce=ee.from(c.nonce).toNumber()),c.gasLimit!=null&&(s.gasLimit=ee.from(c.gasLimit)),c.gasPrice!=null&&(s.gasPrice=ee.from(c.gasPrice)),c.maxFeePerGas!=null&&(s.maxFeePerGas=ee.from(c.maxFeePerGas)),c.maxPriorityFeePerGas!=null&&(s.maxPriorityFeePerGas=ee.from(c.maxPriorityFeePerGas)),c.from!=null&&(s.from=c.from),c.type!=null&&(s.type=c.type),c.accessList!=null&&(s.accessList=Or(c.accessList)),s.gasLimit==null&&e.gas!=null){let g=21e3;const w=Z(o);for(let M=0;M<w.length;M++)g+=4,w[M]&&(g+=64);s.gasLimit=ee.from(e.gas).add(g)}if(c.value){const g=ee.from(c.value);!g.isZero()&&!e.payable&&it.throwError("non-payable method cannot override value",O.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:r.value}),s.value=g}c.customData&&(s.customData=nt(c.customData)),c.ccipReadEnabled&&(s.ccipReadEnabled=!!c.ccipReadEnabled),delete r.nonce,delete r.gasLimit,delete r.gasPrice,delete r.from,delete r.value,delete r.type,delete r.accessList,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.customData,delete r.ccipReadEnabled;const x=Object.keys(r).filter(g=>r[g]!=null);return x.length&&it.throwError(`cannot override ${x.map(g=>JSON.stringify(g)).join(",")}`,O.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:x}),s})}function gc(n,e){return function(...t){return ti(n,e,t)}}function mc(n,e){const t=n.signer||n.provider;return function(...r){return Nr(this,void 0,void 0,function*(){t||it.throwError("estimate require a provider or signer",O.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield ti(n,e,r);return yield t.estimateGas(i)})}}function yc(n,e){const t=e.wait.bind(e);e.wait=r=>t(r).then(i=>(i.events=i.logs.map(o=>{let s=nr(o),c=null;try{c=n.interface.parseLog(o)}catch{}return c&&(s.args=c.args,s.decode=(x,g)=>n.interface.decodeEventLog(c.eventFragment,x,g),s.event=c.name,s.eventSignature=c.signature),s.removeListener=()=>n.provider,s.getBlock=()=>n.provider.getBlock(i.blockHash),s.getTransaction=()=>n.provider.getTransaction(i.transactionHash),s.getTransactionReceipt=()=>Promise.resolve(i),s}),i))}function Gs(n,e,t){const r=n.signer||n.provider;return function(...i){return Nr(this,void 0,void 0,function*(){let o;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const x=nt(i.pop());x.blockTag!=null&&(o=yield x.blockTag),delete x.blockTag,i.push(x)}n.deployTransaction!=null&&(yield n._deployed(o));const s=yield ti(n,e,i),c=yield r.call(s,o);try{let x=n.interface.decodeFunctionResult(e,c);return t&&e.outputs.length===1&&(x=x[0]),x}catch(x){throw x.code===O.errors.CALL_EXCEPTION&&(x.address=n.address,x.args=i,x.transaction=s),x}})}}function vc(n,e){return function(...t){return Nr(this,void 0,void 0,function*(){n.signer||it.throwError("sending a transaction requires a signer",O.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());const r=yield ti(n,e,t),i=yield n.signer.sendTransaction(r);return yc(n,i),i})}}function ho(n,e,t){return e.constant?Gs(n,e,t):vc(n,e)}function qs(n){return n.address&&(n.topics==null||n.topics.length===0)?"*":(n.address||"*")+"@"+(n.topics?n.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class bn{constructor(e,t){Q(this,"tag",e),Q(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter(r=>t||r.listener!==e?!0:(t=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter(r=>{const i=e.slice();return setTimeout(()=>{r.listener.apply(this,i)},0),!r.once}),t}prepareEvent(e){}getEmit(e){return[e]}}class wc extends bn{constructor(){super("error",null)}}class lo extends bn{constructor(e,t,r,i){const o={address:e};let s=t.getEventTopic(r);i?(s!==i[0]&&it.throwArgumentError("topic mismatch","topics",i),o.topics=i.slice()):o.topics=[s],super(qs(o),o),Q(this,"address",e),Q(this,"interface",t),Q(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(t,r)=>this.interface.decodeEventLog(this.fragment,t,r);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=Xo(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class xo extends bn{constructor(e,t){super("*",{address:e}),Q(this,"address",e),Q(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(r,i)=>this.interface.decodeEventLog(t.eventFragment,r,i),e.args=t.args}catch{}}}class Ac{constructor(e,t,r){Q(this,"interface",Vt(new.target,"getInterface")(t)),r==null?(Q(this,"provider",null),Q(this,"signer",null)):Ms.isSigner(r)?(Q(this,"provider",r.provider||null),Q(this,"signer",r)):wn.isProvider(r)?(Q(this,"provider",r),Q(this,"signer",null)):it.throwArgumentError("invalid signer or provider","signerOrProvider",r),Q(this,"callStatic",{}),Q(this,"estimateGas",{}),Q(this,"functions",{}),Q(this,"populateTransaction",{}),Q(this,"filters",{});{const s={};Object.keys(this.interface.events).forEach(c=>{const x=this.interface.events[c];Q(this.filters,c,(...g)=>({address:this.address,topics:this.interface.encodeFilterTopics(x,g)})),s[x.name]||(s[x.name]=[]),s[x.name].push(c)}),Object.keys(s).forEach(c=>{const x=s[c];x.length===1?Q(this.filters,c,this.filters[x[0]]):it.warn(`Duplicate definition of ${c} (${x.join(", ")})`)})}if(Q(this,"_runningEvents",{}),Q(this,"_wrappedEmits",{}),e==null&&it.throwArgumentError("invalid contract address or ENS name","addressOrName",e),Q(this,"address",e),this.provider)Q(this,"resolvedAddress",jn(this.provider,e));else try{Q(this,"resolvedAddress",Promise.resolve(et(e)))}catch{it.throwError("provider is required to use ENS name as contract address",O.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(s=>{});const i={},o={};Object.keys(this.interface.functions).forEach(s=>{const c=this.interface.functions[s];if(o[s]){it.warn(`Duplicate ABI entry for ${JSON.stringify(s)}`);return}o[s]=!0;{const x=c.name;i[`%${x}`]||(i[`%${x}`]=[]),i[`%${x}`].push(s)}this[s]==null&&Q(this,s,ho(this,c,!0)),this.functions[s]==null&&Q(this.functions,s,ho(this,c,!1)),this.callStatic[s]==null&&Q(this.callStatic,s,Gs(this,c,!0)),this.populateTransaction[s]==null&&Q(this.populateTransaction,s,gc(this,c)),this.estimateGas[s]==null&&Q(this.estimateGas,s,mc(this,c))}),Object.keys(i).forEach(s=>{const c=i[s];if(c.length>1)return;s=s.substring(1);const x=c[0];try{this[s]==null&&Q(this,s,this[x])}catch{}this.functions[s]==null&&Q(this.functions,s,this.functions[x]),this.callStatic[s]==null&&Q(this.callStatic,s,this.callStatic[x]),this.populateTransaction[s]==null&&Q(this.populateTransaction,s,this.populateTransaction[x]),this.estimateGas[s]==null&&Q(this.estimateGas,s,this.estimateGas[x])})}static getContractAddress(e){return c0(e)}static getInterface(e){return Yi.isInterface(e)?e:new Yi(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(t=>(t==="0x"&&it.throwError("contract not deployed",O.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||it.throwError("sending a transactions require a signer",O.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=nt(e||{});return["from","to"].forEach(function(r){t[r]!=null&&it.throwError("cannot override "+r,O.errors.UNSUPPORTED_OPERATION,{operation:r})}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t))}connect(e){typeof e=="string"&&(e=new u0(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Q(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Jn.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new wc);if(e==="event")return this._normalizeRunningEvent(new bn("event",null));if(e==="*")return this._normalizeRunningEvent(new xo(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new lo(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const r=e.topics[0];if(typeof r!="string")throw new Error("invalid topic");const i=this.interface.getEvent(r);return this._normalizeRunningEvent(new lo(this.address,this.interface,i,e.topics))}catch{}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new bn(qs(t),t))}return this._normalizeRunningEvent(new xo(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const i=nr(t);return i.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(t.blockHash),i.getTransaction=()=>this.provider.getTransaction(t.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(i),i}_addEventListener(e,t,r){if(this.provider||it.throwError("events require a provider or a signer with a provider",O.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=o=>{let s=this._wrapEvent(e,o,t);if(s.decodeError==null)try{const c=e.getEmit(s);this.emit(e.filter,...c)}catch(c){s.decodeError=c.error}e.filter!=null&&this.emit("event",s),s.decodeError!=null&&this.emit("error",s.decodeError,s)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,t,r){const i=this._getRunningEvent(e),o=nt(i.filter);return typeof t=="string"&&ve(t,32)?(r!=null&&it.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=t??0,o.toBlock=r??"latest"),this.provider.getLogs(o).then(s=>s.map(c=>this._wrapEvent(i,c,null)))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),i=r.run(t)>0;return this._checkRunningEvents(r),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((t,r)=>t+this._runningEvents[r].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const t=[];for(let r in this._runningEvents)this._runningEvents[r].listeners().forEach(i=>{t.push(i)});return t}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const r in this._runningEvents){const i=this._runningEvents[r];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class Gu extends Ac{}const Ec="abstract-signer/5.8.0";var Dt=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const Ut=new O(Ec),_c=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Sc=[O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED];let Pc=class zs{constructor(){Ut.checkAbstract(new.target,zs),Q(this,"_isSigner",!0)}getBalance(e){return Dt(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Dt(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Dt(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Te(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Dt(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Te(this.checkTransaction(e));return yield this.provider.call(r,t)})}sendTransaction(e){return Dt(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)})}getChainId(){return Dt(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Dt(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Dt(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Dt(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const r in e)_c.indexOf(r)===-1&&Ut.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=nt(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(r=>(r[0].toLowerCase()!==r[1].toLowerCase()&&Ut.throwArgumentError("from address mismatch","transaction",e),r[0])),t}populateTransaction(e){return Dt(this,void 0,void 0,function*(){const t=yield Te(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Dt(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&Ut.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const r=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||r)?Ut.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&r&&Ut.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(r&&Ut.throwError("network does not support EIP-1559",O.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):Ut.throwError("failed to get consistent fee data",O.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(Sc.indexOf(i.code)>=0)throw i;return Ut.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Ut.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Te(t)})}_checkProvider(e){this.provider||Ut.throwError("missing provider",O.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class Hs{constructor(e){Q(this,"alphabet",e),Q(this,"base",e.length),Q(this,"_alphabetMap",{}),Q(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=Z(e);if(t.length===0)return"";let r=[0];for(let o=0;o<t.length;++o){let s=t[o];for(let c=0;c<r.length;++c)s+=r[c]<<8,r[c]=s%this.base,s=s/this.base|0;for(;s>0;)r.push(s%this.base),s=s/this.base|0}let i="";for(let o=0;t[o]===0&&o<t.length-1;++o)i+=this._leader;for(let o=r.length-1;o>=0;--o)i+=this.alphabet[r[o]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let t=[];if(e.length===0)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let i=this._alphabetMap[e[r]];if(i===void 0)throw new Error("Non-base"+this.base+" character");let o=i;for(let s=0;s<t.length;++s)o+=t[s]*this.base,t[s]=o&255,o>>=8;for(;o>0;)t.push(o&255),o>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return Z(new Uint8Array(t.reverse()))}}new Hs("abcdefghijklmnopqrstuvwxyz234567");const Qr=new Hs("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var Yr;(function(n){n.sha256="sha256",n.sha512="sha512"})(Yr||(Yr={}));const Mc="sha2/5.8.0",Ic=new O(Mc);function Ks(n){return"0x"+Pt.ripemd160().update(Z(n)).digest("hex")}function Er(n){return"0x"+Pt.sha256().update(Z(n)).digest("hex")}function gn(n,e,t){return Yr[n]||Ic.throwError("unsupported algorithm "+n,O.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:n}),"0x"+Pt.hmac(Pt[n],Z(e)).update(Z(t)).digest("hex")}function g0(n,e,t,r,i){n=Z(n),e=Z(e);let o,s=1;const c=new Uint8Array(r),x=new Uint8Array(e.length+4);x.set(e);let g,w;for(let M=1;M<=s;M++){x[e.length]=M>>24&255,x[e.length+1]=M>>16&255,x[e.length+2]=M>>8&255,x[e.length+3]=M&255;let C=Z(gn(i,n,x));o||(o=C.length,w=new Uint8Array(o),s=Math.ceil(r/o),g=r-(s-1)*o),w.set(C);for(let k=1;k<t;k++){C=Z(gn(i,n,C));for(let S=0;S<o;S++)w[S]^=C[S]}const G=(M-1)*o,H=M===s?g:o;c.set(Z(w).slice(0,H),G)}return re(c)}const kc="wordlists/5.8.0",Cc=new O(kc);class _n{constructor(e){Cc.checkAbstract(new.target,_n),Q(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const i=e.getWord(r);if(r!==e.getWordIndex(i))return"0x";t.push(i)}return yr(t.join(`
8
8
  `)+`
9
9
  `)}static register(e,t){t||(t=e.locale)}}const Nc="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let un=null;function po(n){if(un==null&&(un=Nc.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),_n.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw un=null,new Error("BIP39 Wordlist for en (English) FAILED")}class Rc extends _n{constructor(){super("en")}getWord(e){return po(this),un[e]}getWordIndex(e){return po(this),un.indexOf(e)}}const Js=new Rc;_n.register(Js);const bo={en:Js},Bc="hdnode/5.8.0",Qn=new O(Bc),Tc=ee.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Fc=ct("Bitcoin seed"),tn=2147483648;function Vs(n){return(1<<n)-1<<8-n}function Oc(n){return(1<<n)-1}function kn(n){return We(re(n),32)}function go(n){return Qr.encode(rt([n,at(Er(Er(n)),0,4)]))}function m0(n){if(n==null)return bo.en;if(typeof n=="string"){const e=bo[n];return e==null&&Qn.throwArgumentError("unknown locale","wordlist",n),e}return n}const Dr={},Xr="m/44'/60'/0'/0/0";class It{constructor(e,t,r,i,o,s,c,x){if(e!==Dr)throw new Error("HDNode constructor cannot be called directly");if(t){const g=new Ir(t);Q(this,"privateKey",g.privateKey),Q(this,"publicKey",g.compressedPublicKey)}else Q(this,"privateKey",null),Q(this,"publicKey",re(r));Q(this,"parentFingerprint",i),Q(this,"fingerprint",at(Ks(Er(this.publicKey)),0,4)),Q(this,"address",vr(this.publicKey)),Q(this,"chainCode",o),Q(this,"index",s),Q(this,"depth",c),x==null?(Q(this,"mnemonic",null),Q(this,"path",null)):typeof x=="string"?(Q(this,"mnemonic",null),Q(this,"path",x)):(Q(this,"mnemonic",x),Q(this,"path",x.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return go(rt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",re(this.depth),this.parentFingerprint,We(re(this.index),4),this.chainCode,this.privateKey!=null?rt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new It(Dr,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~tn));const r=new Uint8Array(37);if(e&tn){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(Z(this.privateKey),1),t&&(t+="'")}else r.set(Z(this.publicKey));for(let M=24;M>=0;M-=8)r[33+(M>>3)]=e>>24-M&255;const i=Z(gn(Yr.sha512,this.chainCode,r)),o=i.slice(0,32),s=i.slice(32);let c=null,x=null;this.privateKey?c=kn(ee.from(o).add(this.privateKey).mod(Tc)):x=new Ir(re(o))._addPoint(this.publicKey);let g=t;const w=this.mnemonic;return w&&(g=Object.freeze({phrase:w.phrase,path:t,locale:w.locale||"en"})),new It(Dr,c,x,this.fingerprint,kn(s),e,this.depth+1,g)}derivePath(e){const t=e.split("/");if(t.length===0||t[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);t[0]==="m"&&t.shift();let r=this;for(let i=0;i<t.length;i++){const o=t[i];if(o.match(/^[0-9]+'$/)){const s=parseInt(o.substring(0,o.length-1));if(s>=tn)throw new Error("invalid path index - "+o);r=r._derive(tn+s)}else if(o.match(/^[0-9]+$/)){const s=parseInt(o);if(s>=tn)throw new Error("invalid path index - "+o);r=r._derive(s)}else throw new Error("invalid path component - "+o)}return r}static _fromSeed(e,t){const r=Z(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const i=Z(gn(Yr.sha512,Fc,r));return new It(Dr,kn(i.slice(0,32)),null,"0x00000000",kn(i.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return r=m0(r),e=ri(y0(e,r),r),It._fromSeed(Ws(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){const t=Qr.decode(e);(t.length!==82||go(t.slice(0,78))!==e)&&Qn.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],i=re(t.slice(5,9)),o=parseInt(re(t.slice(9,13)).substring(2),16),s=re(t.slice(13,45)),c=t.slice(45,78);switch(re(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new It(Dr,null,re(c),i,s,o,r,null);case"0x0488ade4":case"0x04358394 ":if(c[0]!==0)break;return new It(Dr,re(c.slice(1)),null,i,s,o,r,null)}return Qn.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Ws(n,e){e||(e="");const t=ct("mnemonic"+e,ur.NFKD);return g0(ct(n,ur.NFKD),t,2048,64,"sha512")}function y0(n,e){e=m0(e),Qn.checkNormalize();const t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");const r=Z(new Uint8Array(Math.ceil(11*t.length/8)));let i=0;for(let g=0;g<t.length;g++){let w=e.getWordIndex(t[g].normalize("NFKD"));if(w===-1)throw new Error("invalid mnemonic");for(let M=0;M<11;M++)w&1<<10-M&&(r[i>>3]|=1<<7-i%8),i++}const o=32*t.length/3,s=t.length/3,c=Vs(s);if((Z(Er(r.slice(0,o/8)))[0]&c)!==(r[r.length-1]&c))throw new Error("invalid checksum");return re(r.slice(0,o/8))}function ri(n,e){if(e=m0(e),n=Z(n),n.length%4!==0||n.length<16||n.length>32)throw new Error("invalid entropy");const t=[0];let r=11;for(let s=0;s<n.length;s++)r>8?(t[t.length-1]<<=8,t[t.length-1]|=n[s],r-=8):(t[t.length-1]<<=r,t[t.length-1]|=n[s]>>8-r,t.push(n[s]&Oc(8-r)),r+=3);const i=n.length/4,o=Z(Er(n))[0]&Vs(i);return t[t.length-1]<<=i,t[t.length-1]|=o>>8-i,e.join(t.map(s=>e.getWord(s)))}const Dc="random/5.8.0",t0=new O(Dc);function Uc(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Gn<"u")return Gn;throw new Error("unable to locate global object")}const mo=Uc();let Un=mo.crypto||mo.msCrypto;(!Un||!Un.getRandomValues)&&(t0.warn("WARNING: Missing strong random number source"),Un={getRandomValues:function(n){return t0.throwError("no secure random source avaialble",O.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Kr(n){(n<=0||n>1024||n%1||n!=n)&&t0.throwArgumentError("invalid length","length",n);const e=new Uint8Array(n);return Un.getRandomValues(e),Z(e)}var qi={exports:{}},yo;function Lc(){return yo||(yo=1,(function(n,e){(function(t){function r(p){return parseInt(p)===p}function i(p){if(!r(p.length))return!1;for(var f=0;f<p.length;f++)if(!r(p[f])||p[f]<0||p[f]>255)return!1;return!0}function o(p,f){if(p.buffer&&ArrayBuffer.isView(p)&&p.name==="Uint8Array")return f&&(p.slice?p=p.slice():p=Array.prototype.slice.call(p)),p;if(Array.isArray(p)){if(!i(p))throw new Error("Array contains invalid value: "+p);return new Uint8Array(p)}if(r(p.length)&&i(p))return new Uint8Array(p);throw new Error("unsupported array-like object")}function s(p){return new Uint8Array(p)}function c(p,f,A,B,l){(B!=null||l!=null)&&(p.slice?p=p.slice(B,l):p=Array.prototype.slice.call(p,B,l)),f.set(p,A)}var x=(function(){function p(A){var B=[],l=0;for(A=encodeURI(A);l<A.length;){var N=A.charCodeAt(l++);N===37?(B.push(parseInt(A.substr(l,2),16)),l+=2):B.push(N)}return o(B)}function f(A){for(var B=[],l=0;l<A.length;){var N=A[l];N<128?(B.push(String.fromCharCode(N)),l++):N>191&&N<224?(B.push(String.fromCharCode((N&31)<<6|A[l+1]&63)),l+=2):(B.push(String.fromCharCode((N&15)<<12|(A[l+1]&63)<<6|A[l+2]&63)),l+=3)}return B.join("")}return{toBytes:p,fromBytes:f}})(),g=(function(){function p(B){for(var l=[],N=0;N<B.length;N+=2)l.push(parseInt(B.substr(N,2),16));return l}var f="0123456789abcdef";function A(B){for(var l=[],N=0;N<B.length;N++){var J=B[N];l.push(f[(J&240)>>4]+f[J&15])}return l.join("")}return{toBytes:p,fromBytes:A}})(),w={16:10,24:12,32:14},M=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],C=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],G=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],H=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],k=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],S=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],T=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],D=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],U=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],q=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],z=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],j=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Y=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],X=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ie=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function se(p){for(var f=[],A=0;A<p.length;A+=4)f.push(p[A]<<24|p[A+1]<<16|p[A+2]<<8|p[A+3]);return f}var ne=function(p){if(!(this instanceof ne))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(p,!0)}),this._prepare()};ne.prototype._prepare=function(){var p=w[this.key.length];if(p==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var f=0;f<=p;f++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var A=(p+1)*4,B=this.key.length/4,l=se(this.key),N,f=0;f<B;f++)N=f>>2,this._Ke[N][f%4]=l[f],this._Kd[p-N][f%4]=l[f];for(var J=0,K=B,W;K<A;){if(W=l[B-1],l[0]^=C[W>>16&255]<<24^C[W>>8&255]<<16^C[W&255]<<8^C[W>>24&255]^M[J]<<24,J+=1,B!=8)for(var f=1;f<B;f++)l[f]^=l[f-1];else{for(var f=1;f<B/2;f++)l[f]^=l[f-1];W=l[B/2-1],l[B/2]^=C[W&255]^C[W>>8&255]<<8^C[W>>16&255]<<16^C[W>>24&255]<<24;for(var f=B/2+1;f<B;f++)l[f]^=l[f-1]}for(var f=0,oe,$;f<B&&K<A;)oe=K>>2,$=K%4,this._Ke[oe][$]=l[f],this._Kd[p-oe][$]=l[f++],K++}for(var oe=1;oe<p;oe++)for(var $=0;$<4;$++)W=this._Kd[oe][$],this._Kd[oe][$]=j[W>>24&255]^Y[W>>16&255]^X[W>>8&255]^ie[W&255]},ne.prototype.encrypt=function(p){if(p.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var f=this._Ke.length-1,A=[0,0,0,0],B=se(p),l=0;l<4;l++)B[l]^=this._Ke[0][l];for(var N=1;N<f;N++){for(var l=0;l<4;l++)A[l]=H[B[l]>>24&255]^k[B[(l+1)%4]>>16&255]^S[B[(l+2)%4]>>8&255]^T[B[(l+3)%4]&255]^this._Ke[N][l];B=A.slice()}for(var J=s(16),K,l=0;l<4;l++)K=this._Ke[f][l],J[4*l]=(C[B[l]>>24&255]^K>>24)&255,J[4*l+1]=(C[B[(l+1)%4]>>16&255]^K>>16)&255,J[4*l+2]=(C[B[(l+2)%4]>>8&255]^K>>8)&255,J[4*l+3]=(C[B[(l+3)%4]&255]^K)&255;return J},ne.prototype.decrypt=function(p){if(p.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var f=this._Kd.length-1,A=[0,0,0,0],B=se(p),l=0;l<4;l++)B[l]^=this._Kd[0][l];for(var N=1;N<f;N++){for(var l=0;l<4;l++)A[l]=D[B[l]>>24&255]^U[B[(l+3)%4]>>16&255]^q[B[(l+2)%4]>>8&255]^z[B[(l+1)%4]&255]^this._Kd[N][l];B=A.slice()}for(var J=s(16),K,l=0;l<4;l++)K=this._Kd[f][l],J[4*l]=(G[B[l]>>24&255]^K>>24)&255,J[4*l+1]=(G[B[(l+3)%4]>>16&255]^K>>16)&255,J[4*l+2]=(G[B[(l+2)%4]>>8&255]^K>>8)&255,J[4*l+3]=(G[B[(l+1)%4]&255]^K)&255;return J};var P=function(p){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new ne(p)};P.prototype.encrypt=function(p){if(p=o(p),p.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var f=s(p.length),A=s(16),B=0;B<p.length;B+=16)c(p,A,0,B,B+16),A=this._aes.encrypt(A),c(A,f,B);return f},P.prototype.decrypt=function(p){if(p=o(p),p.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var f=s(p.length),A=s(16),B=0;B<p.length;B+=16)c(p,A,0,B,B+16),A=this._aes.decrypt(A),c(A,f,B);return f};var m=function(p,f){if(!(this instanceof m))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!f)f=s(16);else if(f.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=o(f,!0),this._aes=new ne(p)};m.prototype.encrypt=function(p){if(p=o(p),p.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var f=s(p.length),A=s(16),B=0;B<p.length;B+=16){c(p,A,0,B,B+16);for(var l=0;l<16;l++)A[l]^=this._lastCipherblock[l];this._lastCipherblock=this._aes.encrypt(A),c(this._lastCipherblock,f,B)}return f},m.prototype.decrypt=function(p){if(p=o(p),p.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var f=s(p.length),A=s(16),B=0;B<p.length;B+=16){c(p,A,0,B,B+16),A=this._aes.decrypt(A);for(var l=0;l<16;l++)f[B+l]=A[l]^this._lastCipherblock[l];c(p,this._lastCipherblock,0,B,B+16)}return f};var a=function(p,f,A){if(!(this instanceof a))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!f)f=s(16);else if(f.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");A||(A=1),this.segmentSize=A,this._shiftRegister=o(f,!0),this._aes=new ne(p)};a.prototype.encrypt=function(p){if(p.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var f=o(p,!0),A,B=0;B<f.length;B+=this.segmentSize){A=this._aes.encrypt(this._shiftRegister);for(var l=0;l<this.segmentSize;l++)f[B+l]^=A[l];c(this._shiftRegister,this._shiftRegister,0,this.segmentSize),c(f,this._shiftRegister,16-this.segmentSize,B,B+this.segmentSize)}return f},a.prototype.decrypt=function(p){if(p.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var f=o(p,!0),A,B=0;B<f.length;B+=this.segmentSize){A=this._aes.encrypt(this._shiftRegister);for(var l=0;l<this.segmentSize;l++)f[B+l]^=A[l];c(this._shiftRegister,this._shiftRegister,0,this.segmentSize),c(p,this._shiftRegister,16-this.segmentSize,B,B+this.segmentSize)}return f};var d=function(p,f){if(!(this instanceof d))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!f)f=s(16);else if(f.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=o(f,!0),this._lastPrecipherIndex=16,this._aes=new ne(p)};d.prototype.encrypt=function(p){for(var f=o(p,!0),A=0;A<f.length;A++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),f[A]^=this._lastPrecipher[this._lastPrecipherIndex++];return f},d.prototype.decrypt=d.prototype.encrypt;var b=function(p){if(!(this instanceof b))throw Error("Counter must be instanitated with `new`");p!==0&&!p&&(p=1),typeof p=="number"?(this._counter=s(16),this.setValue(p)):this.setBytes(p)};b.prototype.setValue=function(p){if(typeof p!="number"||parseInt(p)!=p)throw new Error("invalid counter value (must be an integer)");for(var f=15;f>=0;--f)this._counter[f]=p%256,p=p>>8},b.prototype.setBytes=function(p){if(p=o(p,!0),p.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=p},b.prototype.increment=function(){for(var p=15;p>=0;p--)if(this._counter[p]===255)this._counter[p]=0;else{this._counter[p]++;break}};var y=function(p,f){if(!(this instanceof y))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",f instanceof b||(f=new b(f)),this._counter=f,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new ne(p)};y.prototype.encrypt=function(p){for(var f=o(p,!0),A=0;A<f.length;A++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),f[A]^=this._remainingCounter[this._remainingCounterIndex++];return f},y.prototype.decrypt=y.prototype.encrypt;function E(p){p=o(p,!0);var f=16-p.length%16,A=s(p.length+f);c(p,A);for(var B=p.length;B<A.length;B++)A[B]=f;return A}function I(p){if(p=o(p,!0),p.length<16)throw new Error("PKCS#7 invalid length");var f=p[p.length-1];if(f>16)throw new Error("PKCS#7 padding byte out of range");for(var A=p.length-f,B=0;B<f;B++)if(p[A+B]!==f)throw new Error("PKCS#7 invalid padding byte");var l=s(A);return c(p,l,0,0,A),l}var R={AES:ne,Counter:b,ModeOfOperation:{ecb:P,cbc:m,cfb:a,ofb:d,ctr:y},utils:{hex:g,utf8:x},padding:{pkcs7:{pad:E,strip:I}},_arrayTest:{coerceArray:o,createArray:s,copyArray:c}};n.exports=R})()})(qi)),qi.exports}var Gc=Lc();const tr=Zr(Gc),js="json-wallets/5.8.0";function kr(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Z(n)}function rn(n,e){for(n=String(n);n.length<e;)n="0"+n;return n}function v0(n){return typeof n=="string"?ct(n,ur.NFKC):Z(n)}function ot(n,e){let t=n;const r=e.toLowerCase().split("/");for(let i=0;i<r.length;i++){let o=null;for(const s in t)if(s.toLowerCase()===r[i]){o=t[s];break}if(o===null)return null;t=o}return t}function qc(n){const e=Z(n);e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=re(e);return[t.substring(2,10),t.substring(10,14),t.substring(14,18),t.substring(18,22),t.substring(22,34)].join("-")}const zc=new O(js);class Hc extends Tr{isCrowdsaleAccount(e){return!!(e&&e._isCrowdsaleAccount)}}function Qs(n,e){const t=JSON.parse(n);e=v0(e);const r=et(ot(t,"ethaddr")),i=kr(ot(t,"encseed"));(!i||i.length%16!==0)&&zc.throwArgumentError("invalid encseed","json",n);const o=Z(g0(e,e,2e3,32,"sha256")).slice(0,16),s=i.slice(0,16),c=i.slice(16),x=new tr.ModeOfOperation.cbc(o,s),g=tr.padding.pkcs7.strip(Z(x.decrypt(c)));let w="";for(let G=0;G<g.length;G++)w+=String.fromCharCode(g[G]);const M=ct(w),C=je(M);return new Hc({_isCrowdsaleAccount:!0,address:r,privateKey:C})}function Ys(n){let e=null;try{e=JSON.parse(n)}catch{return!1}return e.encseed&&e.ethaddr}function Xs(n){let e=null;try{e=JSON.parse(n)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}var zi={exports:{}},vo;function Kc(){return vo||(vo=1,(function(n,e){(function(t){function i(k){const S=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]);let T=1779033703,D=3144134277,U=1013904242,q=2773480762,z=1359893119,j=2600822924,Y=528734635,X=1541459225;const ie=new Uint32Array(64);function se(y){let E=0,I=y.length;for(;I>=64;){let R=T,p=D,f=U,A=q,B=z,l=j,N=Y,J=X,K,W,oe,$,te;for(W=0;W<16;W++)oe=E+W*4,ie[W]=(y[oe]&255)<<24|(y[oe+1]&255)<<16|(y[oe+2]&255)<<8|y[oe+3]&255;for(W=16;W<64;W++)K=ie[W-2],$=(K>>>17|K<<15)^(K>>>19|K<<13)^K>>>10,K=ie[W-15],te=(K>>>7|K<<25)^(K>>>18|K<<14)^K>>>3,ie[W]=($+ie[W-7]|0)+(te+ie[W-16]|0)|0;for(W=0;W<64;W++)$=(((B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7))+(B&l^~B&N)|0)+(J+(S[W]+ie[W]|0)|0)|0,te=((R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10))+(R&p^R&f^p&f)|0,J=N,N=l,l=B,B=A+$|0,A=f,f=p,p=R,R=$+te|0;T=T+R|0,D=D+p|0,U=U+f|0,q=q+A|0,z=z+B|0,j=j+l|0,Y=Y+N|0,X=X+J|0,E+=64,I-=64}}se(k);let ne,P=k.length%64,m=k.length/536870912|0,a=k.length<<3,d=P<56?56:120,b=k.slice(k.length-P,k.length);for(b.push(128),ne=P+1;ne<d;ne++)b.push(0);return b.push(m>>>24&255),b.push(m>>>16&255),b.push(m>>>8&255),b.push(m>>>0&255),b.push(a>>>24&255),b.push(a>>>16&255),b.push(a>>>8&255),b.push(a>>>0&255),se(b),[T>>>24&255,T>>>16&255,T>>>8&255,T>>>0&255,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,q>>>24&255,q>>>16&255,q>>>8&255,q>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255,Y>>>24&255,Y>>>16&255,Y>>>8&255,Y>>>0&255,X>>>24&255,X>>>16&255,X>>>8&255,X>>>0&255]}function o(k,S,T){k=k.length<=64?k:i(k);const D=64+S.length+4,U=new Array(D),q=new Array(64);let z,j=[];for(z=0;z<64;z++)U[z]=54;for(z=0;z<k.length;z++)U[z]^=k[z];for(z=0;z<S.length;z++)U[64+z]=S[z];for(z=D-4;z<D;z++)U[z]=0;for(z=0;z<64;z++)q[z]=92;for(z=0;z<k.length;z++)q[z]^=k[z];function Y(){for(let X=D-1;X>=D-4;X--){if(U[X]++,U[X]<=255)return;U[X]=0}}for(;T>=32;)Y(),j=j.concat(i(q.concat(i(U)))),T-=32;return T>0&&(Y(),j=j.concat(i(q.concat(i(U))).slice(0,T))),j}function s(k,S,T,D,U){let q;for(w(k,(2*T-1)*16,U,0,16),q=0;q<2*T;q++)g(k,q*16,U,16),x(U,D),w(U,0,k,S+q*16,16);for(q=0;q<T;q++)w(k,S+q*2*16,k,q*16,16);for(q=0;q<T;q++)w(k,S+(q*2+1)*16,k,(q+T)*16,16)}function c(k,S){return k<<S|k>>>32-S}function x(k,S){w(k,0,S,0,16);for(let T=8;T>0;T-=2)S[4]^=c(S[0]+S[12],7),S[8]^=c(S[4]+S[0],9),S[12]^=c(S[8]+S[4],13),S[0]^=c(S[12]+S[8],18),S[9]^=c(S[5]+S[1],7),S[13]^=c(S[9]+S[5],9),S[1]^=c(S[13]+S[9],13),S[5]^=c(S[1]+S[13],18),S[14]^=c(S[10]+S[6],7),S[2]^=c(S[14]+S[10],9),S[6]^=c(S[2]+S[14],13),S[10]^=c(S[6]+S[2],18),S[3]^=c(S[15]+S[11],7),S[7]^=c(S[3]+S[15],9),S[11]^=c(S[7]+S[3],13),S[15]^=c(S[11]+S[7],18),S[1]^=c(S[0]+S[3],7),S[2]^=c(S[1]+S[0],9),S[3]^=c(S[2]+S[1],13),S[0]^=c(S[3]+S[2],18),S[6]^=c(S[5]+S[4],7),S[7]^=c(S[6]+S[5],9),S[4]^=c(S[7]+S[6],13),S[5]^=c(S[4]+S[7],18),S[11]^=c(S[10]+S[9],7),S[8]^=c(S[11]+S[10],9),S[9]^=c(S[8]+S[11],13),S[10]^=c(S[9]+S[8],18),S[12]^=c(S[15]+S[14],7),S[13]^=c(S[12]+S[15],9),S[14]^=c(S[13]+S[12],13),S[15]^=c(S[14]+S[13],18);for(let T=0;T<16;++T)k[T]+=S[T]}function g(k,S,T,D){for(let U=0;U<D;U++)T[U]^=k[S+U]}function w(k,S,T,D,U){for(;U--;)T[D++]=k[S++]}function M(k){if(!k||typeof k.length!="number")return!1;for(let S=0;S<k.length;S++){const T=k[S];if(typeof T!="number"||T%1||T<0||T>=256)return!1}return!0}function C(k,S){if(typeof k!="number"||k%1)throw new Error("invalid "+S);return k}function G(k,S,T,D,U,q,z){if(T=C(T,"N"),D=C(D,"r"),U=C(U,"p"),q=C(q,"dkLen"),T===0||(T&T-1)!==0)throw new Error("N must be power of 2");if(T>2147483647/128/D)throw new Error("N too large");if(D>2147483647/128/U)throw new Error("r too large");if(!M(k))throw new Error("password must be an array or buffer");if(k=Array.prototype.slice.call(k),!M(S))throw new Error("salt must be an array or buffer");S=Array.prototype.slice.call(S);let j=o(k,S,U*128*D);const Y=new Uint32Array(U*32*D);for(let B=0;B<Y.length;B++){const l=B*4;Y[B]=(j[l+3]&255)<<24|(j[l+2]&255)<<16|(j[l+1]&255)<<8|(j[l+0]&255)<<0}const X=new Uint32Array(64*D),ie=new Uint32Array(32*D*T),se=32*D,ne=new Uint32Array(16),P=new Uint32Array(16),m=U*T*2;let a=0,d=null,b=!1,y=0,E=0,I,R;const p=z?parseInt(1e3/D):4294967295,f=typeof setImmediate<"u"?setImmediate:setTimeout,A=function(){if(b)return z(new Error("cancelled"),a/m);let B;switch(y){case 0:R=E*32*D,w(Y,R,X,0,se),y=1,I=0;case 1:B=T-I,B>p&&(B=p);for(let N=0;N<B;N++)w(X,0,ie,(I+N)*se,se),s(X,se,D,ne,P);if(I+=B,a+=B,z){const N=parseInt(1e3*a/m);if(N!==d){if(b=z(null,a/m),b)break;d=N}}if(I<T)break;I=0,y=2;case 2:B=T-I,B>p&&(B=p);for(let N=0;N<B;N++){const J=(2*D-1)*16,K=X[J]&T-1;g(ie,K*se,X,se),s(X,se,D,ne,P)}if(I+=B,a+=B,z){const N=parseInt(1e3*a/m);if(N!==d){if(b=z(null,a/m),b)break;d=N}}if(I<T)break;if(w(X,0,Y,R,se),E++,E<U){y=0;break}j=[];for(let N=0;N<Y.length;N++)j.push(Y[N]>>0&255),j.push(Y[N]>>8&255),j.push(Y[N]>>16&255),j.push(Y[N]>>24&255);const l=o(k,j,q);return z&&z(null,1,l),l}z&&f(A)};if(!z)for(;;){const B=A();if(B!=null)return B}A()}const H={scrypt:function(k,S,T,D,U,q,z){return new Promise(function(j,Y){let X=0;z&&z(0),G(k,S,T,D,U,q,function(ie,se,ne){if(ie)Y(ie);else if(ne)z&&X!==1&&z(1),j(new Uint8Array(ne));else if(z&&se!==X)return X=se,z(se)})})},syncScrypt:function(k,S,T,D,U,q){return new Uint8Array(G(k,S,T,D,U,q))}};n.exports=H})()})(zi)),zi.exports}var Jc=Kc();const w0=Zr(Jc);var Vc=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const r0=new O(js);function wo(n){return n!=null&&n.mnemonic&&n.mnemonic.phrase}class Wc extends Tr{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function jc(n,e,t){if(ot(n,"crypto/cipher")==="aes-128-ctr"){const i=kr(ot(n,"crypto/cipherparams/iv")),o=new tr.Counter(i),s=new tr.ModeOfOperation.ctr(e,o);return Z(s.decrypt(t))}return null}function Zs(n,e){const t=kr(ot(n,"crypto/ciphertext"));if(re(je(rt([e.slice(16,32),t]))).substring(2)!==ot(n,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=jc(n,e.slice(0,16),t);i||r0.throwError("unsupported cipher",O.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=e.slice(32,64),s=vr(i);if(n.address){let x=n.address.toLowerCase();if(x.substring(0,2)!=="0x"&&(x="0x"+x),et(x)!==s)throw new Error("address mismatch")}const c={_isKeystoreAccount:!0,address:s,privateKey:re(i)};if(ot(n,"x-ethers/version")==="0.1"){const x=kr(ot(n,"x-ethers/mnemonicCiphertext")),g=kr(ot(n,"x-ethers/mnemonicCounter")),w=new tr.Counter(g),M=new tr.ModeOfOperation.ctr(o,w),C=ot(n,"x-ethers/path")||Xr,G=ot(n,"x-ethers/locale")||"en",H=Z(M.decrypt(x));try{const k=ri(H,G),S=It.fromMnemonic(k,null,G).derivePath(C);if(S.privateKey!=c.privateKey)throw new Error("mnemonic mismatch");c.mnemonic=S.mnemonic}catch(k){if(k.code!==O.errors.INVALID_ARGUMENT||k.argument!=="wordlist")throw k}}return new Wc(c)}function $s(n,e,t,r,i){return Z(g0(n,e,t,r,i))}function Qc(n,e,t,r,i){return Promise.resolve($s(n,e,t,r,i))}function ea(n,e,t,r,i){const o=v0(e),s=ot(n,"crypto/kdf");if(s&&typeof s=="string"){const c=function(x,g){return r0.throwArgumentError("invalid key-derivation function parameters",x,g)};if(s.toLowerCase()==="scrypt"){const x=kr(ot(n,"crypto/kdfparams/salt")),g=parseInt(ot(n,"crypto/kdfparams/n")),w=parseInt(ot(n,"crypto/kdfparams/r")),M=parseInt(ot(n,"crypto/kdfparams/p"));(!g||!w||!M)&&c("kdf",s),(g&g-1)!==0&&c("N",g);const C=parseInt(ot(n,"crypto/kdfparams/dklen"));return C!==32&&c("dklen",C),r(o,x,g,w,M,64,i)}else if(s.toLowerCase()==="pbkdf2"){const x=kr(ot(n,"crypto/kdfparams/salt"));let g=null;const w=ot(n,"crypto/kdfparams/prf");w==="hmac-sha256"?g="sha256":w==="hmac-sha512"?g="sha512":c("prf",w);const M=parseInt(ot(n,"crypto/kdfparams/c")),C=parseInt(ot(n,"crypto/kdfparams/dklen"));return C!==32&&c("dklen",C),t(o,x,M,C,g)}}return r0.throwArgumentError("unsupported key-derivation function","kdf",s)}function Yc(n,e){const t=JSON.parse(n),r=ea(t,e,$s,w0.syncScrypt);return Zs(t,r)}function Xc(n,e,t){return Vc(this,void 0,void 0,function*(){const r=JSON.parse(n),i=yield ea(r,e,Qc,w0.scrypt,t);return Zs(r,i)})}function Zc(n,e,t,r){try{if(et(n.address)!==vr(n.privateKey))throw new Error("address/privateKey mismatch");if(wo(n)){const S=n.mnemonic;if(It.fromMnemonic(S.phrase,null,S.locale).derivePath(S.path||Xr).privateKey!=n.privateKey)throw new Error("mnemonic mismatch")}}catch(S){return Promise.reject(S)}typeof t=="function"&&!r&&(r=t,t={}),t||(t={});const i=Z(n.privateKey),o=v0(e);let s=null,c=null,x=null;if(wo(n)){const S=n.mnemonic;s=Z(y0(S.phrase,S.locale||"en")),c=S.path||Xr,x=S.locale||"en"}let g=t.client;g||(g="ethers.js");let w=null;t.salt?w=Z(t.salt):w=Kr(32);let M=null;if(t.iv){if(M=Z(t.iv),M.length!==16)throw new Error("invalid iv")}else M=Kr(16);let C=null;if(t.uuid){if(C=Z(t.uuid),C.length!==16)throw new Error("invalid uuid")}else C=Kr(16);let G=1<<17,H=8,k=1;return t.scrypt&&(t.scrypt.N&&(G=t.scrypt.N),t.scrypt.r&&(H=t.scrypt.r),t.scrypt.p&&(k=t.scrypt.p)),w0.scrypt(o,w,G,H,k,64,r).then(S=>{S=Z(S);const T=S.slice(0,16),D=S.slice(16,32),U=S.slice(32,64),q=new tr.Counter(M),z=new tr.ModeOfOperation.ctr(T,q),j=Z(z.encrypt(i)),Y=je(rt([D,j])),X={address:n.address.substring(2).toLowerCase(),id:qc(C),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:re(M).substring(2)},ciphertext:re(j).substring(2),kdf:"scrypt",kdfparams:{salt:re(w).substring(2),n:G,dklen:32,p:k,r:H},mac:Y.substring(2)}};if(s){const ie=Kr(16),se=new tr.Counter(ie),ne=new tr.ModeOfOperation.ctr(U,se),P=Z(ne.encrypt(s)),m=new Date,a=m.getUTCFullYear()+"-"+rn(m.getUTCMonth()+1,2)+"-"+rn(m.getUTCDate(),2)+"T"+rn(m.getUTCHours(),2)+"-"+rn(m.getUTCMinutes(),2)+"-"+rn(m.getUTCSeconds(),2)+".0Z";X["x-ethers"]={client:g,gethFilename:"UTC--"+a+"--"+X.address,mnemonicCounter:re(ie).substring(2),mnemonicCiphertext:re(P).substring(2),path:c,locale:x,version:"0.1"}}return JSON.stringify(X)})}function $c(n,e,t){if(Ys(n)){t&&t(0);const r=Qs(n,e);return t&&t(1),Promise.resolve(r)}return Xs(n)?Xc(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function eu(n,e){if(Ys(n))return Qs(n,e);if(Xs(n))return Yc(n,e);throw new Error("invalid JSON wallet")}const tu="wallet/5.8.0";var Ao=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const Ur=new O(tu);function ru(n){return n!=null&&ve(n.privateKey,32)&&n.address!=null}function nu(n){const e=n.mnemonic;return e&&e.phrase}class qr extends Pc{constructor(e,t){if(super(),ru(e)){const r=new Ir(e.privateKey);if(Q(this,"_signingKey",()=>r),Q(this,"address",vr(this.publicKey)),this.address!==et(e.address)&&Ur.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),nu(e)){const i=e.mnemonic;Q(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Xr,locale:i.locale||"en"}));const o=this.mnemonic,s=It.fromMnemonic(o.phrase,null,o.locale).derivePath(o.path);vr(s.privateKey)!==this.address&&Ur.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else Q(this,"_mnemonic",()=>null)}else{if(Ir.isSigningKey(e))e.curve!=="secp256k1"&&Ur.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),Q(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const r=new Ir(e);Q(this,"_signingKey",()=>r)}Q(this,"_mnemonic",()=>null),Q(this,"address",vr(this.publicKey))}t&&!wn.isProvider(t)&&Ur.throwArgumentError("invalid provider","provider",t),Q(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new qr(this,e)}signTransaction(e){return Te(e).then(t=>{t.from!=null&&(et(t.from)!==this.address&&Ur.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest(je(e0(t)));return e0(t,r)})}signMessage(e){return Ao(this,void 0,void 0,function*(){return ji(this._signingKey().signDigest(ws(e)))})}_signTypedData(e,t,r){return Ao(this,void 0,void 0,function*(){const i=yield bt.resolveNames(e,t,r,o=>(this.provider==null&&Ur.throwError("cannot resolve ENS names without a provider",O.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:o}),this.provider.resolveName(o)));return ji(this._signingKey().signDigest(bt.hash(i.domain,t,i.value)))})}encrypt(e,t,r){if(typeof t=="function"&&!r&&(r=t,t={}),r&&typeof r!="function")throw new Error("invalid callback");return t||(t={}),Zc(this,e,t,r)}static createRandom(e){let t=Kr(16);e||(e={}),e.extraEntropy&&(t=Z(at(je(rt([t,e.extraEntropy])),0,16)));const r=ri(t,e.locale);return qr.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return $c(e,t,r).then(i=>new qr(i))}static fromEncryptedJsonSync(e,t){return new qr(eu(e,t))}static fromMnemonic(e,t,r){return t||(t=Xr),new qr(It.fromMnemonic(e,null,r).derivePath(t))}}const iu="networks/5.8.0",Eo=new O(iu);function ou(n){return n&&typeof n.renetwork=="function"}function Ht(n){const e=function(t,r){r==null&&(r={});const i=[];if(t.InfuraProvider&&r.infura!=="-")try{i.push(new t.InfuraProvider(n,r.infura))}catch{}if(t.EtherscanProvider&&r.etherscan!=="-")try{i.push(new t.EtherscanProvider(n,r.etherscan))}catch{}if(t.AlchemyProvider&&r.alchemy!=="-")try{i.push(new t.AlchemyProvider(n,r.alchemy))}catch{}if(t.PocketProvider&&r.pocket!=="-"){const o=["goerli","ropsten","rinkeby","sepolia"];try{const s=new t.PocketProvider(n,r.pocket);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}}if(t.CloudflareProvider&&r.cloudflare!=="-")try{i.push(new t.CloudflareProvider(n))}catch{}if(t.AnkrProvider&&r.ankr!=="-")try{const o=["ropsten"],s=new t.AnkrProvider(n,r.ankr);s.network&&o.indexOf(s.network.name)===-1&&i.push(s)}catch{}if(t.QuickNodeProvider&&r.quicknode!=="-")try{i.push(new t.QuickNodeProvider(n,r.quicknode))}catch{}if(i.length===0)return null;if(t.FallbackProvider){let o=1;return r.quorum!=null?o=r.quorum:n==="homestead"&&(o=2),new t.FallbackProvider(i,o)}return i[0]};return e.renetwork=function(t){return Ht(t)},e}function Yn(n,e){const t=function(r,i){return r.JsonRpcProvider?new r.JsonRpcProvider(n,e):null};return t.renetwork=function(r){return Yn(n,r)},t}const _o={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ht("homestead")},So={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ht("ropsten")},Po={chainId:63,name:"classicMordor",_defaultProvider:Yn("https://www.ethercluster.com/mordor","classicMordor")},Cn={unspecified:{chainId:0,name:"unspecified"},homestead:_o,mainnet:_o,morden:{chainId:2,name:"morden"},ropsten:So,testnet:So,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ht("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ht("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ht("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"sepolia",_defaultProvider:Ht("sepolia")},holesky:{chainId:17e3,name:"holesky",_defaultProvider:Ht("holesky")},classic:{chainId:61,name:"classic",_defaultProvider:Yn("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Po,classicTestnet:Po,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Yn("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Ht("matic")},maticmum:{chainId:80001,name:"maticmum",_defaultProvider:Ht("maticmum")},optimism:{chainId:10,name:"optimism",_defaultProvider:Ht("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},"optimism-sepolia":{chainId:11155420,name:"optimism-sepolia"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},"arbitrum-sepolia":{chainId:421614,name:"arbitrum-sepolia"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function su(n){if(n==null)return null;if(typeof n=="number"){for(const r in Cn){const i=Cn[r];if(i.chainId===n)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:n,name:"unknown"}}if(typeof n=="string"){const r=Cn[n];return r==null?null:{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress,_defaultProvider:r._defaultProvider||null}}const e=Cn[n.name];if(!e)return typeof n.chainId!="number"&&Eo.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Eo.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(ou(e._defaultProvider)?t=e._defaultProvider.renetwork(n):t=e._defaultProvider),{name:n.name,chainId:e.chainId,ensAddress:n.ensAddress||e.ensAddress||null,_defaultProvider:t}}const au="web/5.8.0";var fu=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};function cu(n,e){return fu(this,void 0,void 0,function*(){e==null&&(e={});const t={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(t.mode="cors",t.cache="no-cache",t.credentials="same-origin",t.redirect="follow",t.referrer="client"),e.fetchOptions!=null){const s=e.fetchOptions;s.mode&&(t.mode=s.mode),s.cache&&(t.cache=s.cache),s.credentials&&(t.credentials=s.credentials),s.redirect&&(t.redirect=s.redirect),s.referrer&&(t.referrer=s.referrer)}const r=yield fetch(n,t),i=yield r.arrayBuffer(),o={};return r.headers.forEach?r.headers.forEach((s,c)=>{o[c.toLowerCase()]=s}):r.headers.keys().forEach(s=>{o[s.toLowerCase()]=r.headers.get(s)}),{headers:o,statusCode:r.status,statusMessage:r.statusText,body:Z(new Uint8Array(i))}})}var uu=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const qt=new O(au);function Mo(n){return new Promise(e=>{setTimeout(e,n)})}function gr(n,e){if(n==null)return null;if(typeof n=="string")return n;if(yn(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return $r(n)}catch{}return re(n)}return n}function hu(n){return ct(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ta(n,e,t){const r=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;qt.assertArgument(r>0&&r%1===0,"invalid connection throttle limit","connection.throttleLimit",r);const i=typeof n=="object"?n.throttleCallback:null,o=typeof n=="object"&&typeof n.throttleSlotInterval=="number"?n.throttleSlotInterval:100;qt.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s=typeof n=="object"?!!n.errorPassThrough:!1,c={};let x=null;const g={method:"GET"};let w=!1,M=120*1e3;if(typeof n=="string")x=n;else if(typeof n=="object"){if((n==null||n.url==null)&&qt.throwArgumentError("missing URL","connection.url",n),x=n.url,typeof n.timeout=="number"&&n.timeout>0&&(M=n.timeout),n.headers)for(const T in n.headers)c[T.toLowerCase()]={key:T,value:String(n.headers[T])},["if-none-match","if-modified-since"].indexOf(T.toLowerCase())>=0&&(w=!0);if(g.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){x.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&qt.throwError("basic authentication requires a secure https url",O.errors.INVALID_ARGUMENT,{argument:"url",url:x,user:n.user,password:"[REDACTED]"});const T=n.user+":"+n.password;c.authorization={key:"Authorization",value:"Basic "+ds(ct(T))}}n.skipFetchSetup!=null&&(g.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(g.fetchOptions=nt(n.fetchOptions))}const C=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),G=x?x.match(C):null;if(G)try{const T={statusCode:200,statusMessage:"OK",headers:{"content-type":G[1]||"text/plain"},body:G[2]?ls(G[3]):hu(G[3])};let D=T.body;return t&&(D=t(T.body,T)),Promise.resolve(D)}catch(T){qt.throwError("processing response error",O.errors.SERVER_ERROR,{body:gr(G[1],G[2]),error:T,requestBody:null,requestMethod:"GET",url:x})}e&&(g.method="POST",g.body=e,c["content-type"]==null&&(c["content-type"]={key:"Content-Type",value:"application/octet-stream"}),c["content-length"]==null&&(c["content-length"]={key:"Content-Length",value:String(e.length)}));const H={};Object.keys(c).forEach(T=>{const D=c[T];H[D.key]=D.value}),g.headers=H;const k=(function(){let T=null;return{promise:new Promise(function(q,z){M&&(T=setTimeout(()=>{T!=null&&(T=null,z(qt.makeError("timeout",O.errors.TIMEOUT,{requestBody:gr(g.body,H["content-type"]),requestMethod:g.method,timeout:M,url:x})))},M))}),cancel:function(){T!=null&&(clearTimeout(T),T=null)}}})(),S=(function(){return uu(this,void 0,void 0,function*(){for(let T=0;T<r;T++){let D=null;try{if(D=yield cu(x,g),T<r){if(D.statusCode===301||D.statusCode===302){const q=D.headers.location||"";if(g.method==="GET"&&q.match(/^https:/)){x=D.headers.location;continue}}else if(D.statusCode===429){let q=!0;if(i&&(q=yield i(T,x)),q){let z=0;const j=D.headers["retry-after"];typeof j=="string"&&j.match(/^[1-9][0-9]*$/)?z=parseInt(j)*1e3:z=o*parseInt(String(Math.random()*Math.pow(2,T))),yield Mo(z);continue}}}}catch(q){D=q.response,D==null&&(k.cancel(),qt.throwError("missing response",O.errors.SERVER_ERROR,{requestBody:gr(g.body,H["content-type"]),requestMethod:g.method,serverError:q,url:x}))}let U=D.body;if(w&&D.statusCode===304?U=null:!s&&(D.statusCode<200||D.statusCode>=300)&&(k.cancel(),qt.throwError("bad response",O.errors.SERVER_ERROR,{status:D.statusCode,headers:D.headers,body:gr(U,D.headers?D.headers["content-type"]:null),requestBody:gr(g.body,H["content-type"]),requestMethod:g.method,url:x})),t)try{const q=yield t(U,D);return k.cancel(),q}catch(q){if(q.throttleRetry&&T<r){let z=!0;if(i&&(z=yield i(T,x)),z){const j=o*parseInt(String(Math.random()*Math.pow(2,T)));yield Mo(j);continue}}k.cancel(),qt.throwError("processing response error",O.errors.SERVER_ERROR,{body:gr(U,D.headers?D.headers["content-type"]:null),error:q,requestBody:gr(g.body,H["content-type"]),requestMethod:g.method,url:x})}return k.cancel(),U}return qt.throwError("failed response",O.errors.SERVER_ERROR,{requestBody:gr(g.body,H["content-type"]),requestMethod:g.method,url:x})})})();return Promise.race([k.promise,S])}function ni(n,e,t){let r=(o,s)=>{let c=null;if(o!=null)try{c=JSON.parse($r(o))}catch(x){qt.throwError("invalid JSON",O.errors.SERVER_ERROR,{body:o,error:x})}return t&&(c=t(c,s)),c},i=null;if(e!=null){i=ct(e);const o=typeof n=="string"?{url:n}:nt(n);o.headers?Object.keys(o.headers).filter(c=>c.toLowerCase()==="content-type").length!==0||(o.headers=nt(o.headers),o.headers["content-type"]="application/json"):o.headers={"content-type":"application/json"},n=o}return ta(n,i,r)}function Jr(n,e){return e||(e={}),e=nt(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(t,r){let i=null,o=!1;const s=()=>o?!1:(o=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{s()&&r(new Error("timeout"))},e.timeout));const c=e.retryLimit;let x=0;function g(){return n().then(function(w){if(w!==void 0)s()&&t(w);else if(e.oncePoll)e.oncePoll.once("poll",g);else if(e.onceBlock)e.onceBlock.once("block",g);else if(!o){if(x++,x>c){s()&&r(new Error("retry limit reached"));return}let M=e.interval*parseInt(String(Math.random()*Math.pow(2,x)));M<e.floor&&(M=e.floor),M>e.ceiling&&(M=e.ceiling),setTimeout(g,M)}return null},function(w){s()&&r(w)})}g()})}var Hi,Io;function lu(){if(Io)return Hi;Io=1;for(var n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",e={},t=0;t<n.length;t++){var r=n.charAt(t);if(e[r]!==void 0)throw new TypeError(r+" is ambiguous");e[r]=t}function i(k){var S=k>>25;return(k&33554431)<<5^-(S>>0&1)&996825010^-(S>>1&1)&642813549^-(S>>2&1)&513874426^-(S>>3&1)&1027748829^-(S>>4&1)&705979059}function o(k){for(var S=1,T=0;T<k.length;++T){var D=k.charCodeAt(T);if(D<33||D>126)return"Invalid prefix ("+k+")";S=i(S)^D>>5}for(S=i(S),T=0;T<k.length;++T){var U=k.charCodeAt(T);S=i(S)^U&31}return S}function s(k,S,T){if(T=T||90,k.length+7+S.length>T)throw new TypeError("Exceeds length limit");k=k.toLowerCase();var D=o(k);if(typeof D=="string")throw new Error(D);for(var U=k+"1",q=0;q<S.length;++q){var z=S[q];if(z>>5!==0)throw new Error("Non 5-bit word");D=i(D)^z,U+=n.charAt(z)}for(q=0;q<6;++q)D=i(D);for(D^=1,q=0;q<6;++q){var j=D>>(5-q)*5&31;U+=n.charAt(j)}return U}function c(k,S){if(S=S||90,k.length<8)return k+" too short";if(k.length>S)return"Exceeds length limit";var T=k.toLowerCase(),D=k.toUpperCase();if(k!==T&&k!==D)return"Mixed-case string "+k;k=T;var U=k.lastIndexOf("1");if(U===-1)return"No separator character for "+k;if(U===0)return"Missing prefix for "+k;var q=k.slice(0,U),z=k.slice(U+1);if(z.length<6)return"Data too short";var j=o(q);if(typeof j=="string")return j;for(var Y=[],X=0;X<z.length;++X){var ie=z.charAt(X),se=e[ie];if(se===void 0)return"Unknown character "+ie;j=i(j)^se,!(X+6>=z.length)&&Y.push(se)}return j!==1?"Invalid checksum for "+k:{prefix:q,words:Y}}function x(){var k=c.apply(null,arguments);if(typeof k=="object")return k}function g(k){var S=c.apply(null,arguments);if(typeof S=="object")return S;throw new Error(S)}function w(k,S,T,D){for(var U=0,q=0,z=(1<<T)-1,j=[],Y=0;Y<k.length;++Y)for(U=U<<S|k[Y],q+=S;q>=T;)q-=T,j.push(U>>q&z);if(D)q>0&&j.push(U<<T-q&z);else{if(q>=S)return"Excess padding";if(U<<T-q&z)return"Non-zero padding"}return j}function M(k){var S=w(k,8,5,!0);if(Array.isArray(S))return S}function C(k){var S=w(k,8,5,!0);if(Array.isArray(S))return S;throw new Error(S)}function G(k){var S=w(k,5,8,!1);if(Array.isArray(S))return S}function H(k){var S=w(k,5,8,!1);if(Array.isArray(S))return S;throw new Error(S)}return Hi={decodeUnsafe:x,decode:g,encode:s,toWordsUnsafe:M,toWords:C,fromWordsUnsafe:G,fromWords:H},Hi}var du=lu();const ko=Zr(du),ii="providers/5.8.0",nn=new O(ii);class fe{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),i=this.blockTag.bind(this),o=this.data.bind(this),s=this.hash.bind(this),c=this.hex.bind(this),x=this.number.bind(this),g=this.type.bind(this),w=M=>this.data(M,!0);return e.transaction={hash:s,type:g,accessList:fe.allowNull(this.accessList.bind(this),null),blockHash:fe.allowNull(s,null),blockNumber:fe.allowNull(x,null),transactionIndex:fe.allowNull(x,null),confirmations:fe.allowNull(x,null),from:t,gasPrice:fe.allowNull(r),maxPriorityFeePerGas:fe.allowNull(r),maxFeePerGas:fe.allowNull(r),gasLimit:r,to:fe.allowNull(t,null),value:r,nonce:x,data:o,r:fe.allowNull(this.uint256),s:fe.allowNull(this.uint256),v:fe.allowNull(x),creates:fe.allowNull(t,null),raw:fe.allowNull(o)},e.transactionRequest={from:fe.allowNull(t),nonce:fe.allowNull(x),gasLimit:fe.allowNull(r),gasPrice:fe.allowNull(r),maxPriorityFeePerGas:fe.allowNull(r),maxFeePerGas:fe.allowNull(r),to:fe.allowNull(t),value:fe.allowNull(r),data:fe.allowNull(w),type:fe.allowNull(x),accessList:fe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:x,blockNumber:x,transactionHash:s,address:t,topics:fe.arrayOf(s),data:o,logIndex:x,blockHash:s},e.receipt={to:fe.allowNull(this.address,null),from:fe.allowNull(this.address,null),contractAddress:fe.allowNull(t,null),transactionIndex:x,root:fe.allowNull(c),gasUsed:r,logsBloom:fe.allowNull(o),blockHash:s,transactionHash:s,logs:fe.arrayOf(this.receiptLog.bind(this)),blockNumber:x,confirmations:fe.allowNull(x,null),cumulativeGasUsed:r,effectiveGasPrice:fe.allowNull(r),status:fe.allowNull(x),type:g},e.block={hash:fe.allowNull(s),parentHash:s,number:x,timestamp:x,nonce:fe.allowNull(c),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:fe.allowNull(t),extraData:o,transactions:fe.allowNull(fe.arrayOf(s)),baseFeePerGas:fe.allowNull(r)},e.blockWithTransactions=nt(e.block),e.blockWithTransactions.transactions=fe.allowNull(fe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:fe.allowNull(i,void 0),toBlock:fe.allowNull(i,void 0),blockHash:fe.allowNull(s,void 0),address:fe.allowNull(t,void 0),topics:fe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:fe.allowNull(x),blockHash:fe.allowNull(s),transactionIndex:x,removed:fe.allowNull(this.boolean.bind(this)),address:t,data:fe.allowFalsish(o,"0x"),topics:fe.arrayOf(s),transactionHash:s,logIndex:x},e}accessList(e){return Or(e||[])}number(e){return e==="0x"?0:ee.from(e).toNumber()}type(e){return e==="0x"||e==null?0:ee.from(e).toNumber()}bigNumber(e){return ee.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return typeof e=="string"&&(!t&&e.substring(0,2)!=="0x"&&(e="0x"+e),ve(e))?e.toLowerCase():nn.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return et(e)}callAddress(e){if(!ve(e,32))return null;const t=et(at(e,12));return t===Ha?null:t}contractAddress(e){return c0(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||ve(e))return Xn(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return wr(r)!==32?nn.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(e==null)return null;const t=ee.from(e);try{return t.toNumber()}catch{}return null}uint256(e){if(!ve(e))throw new Error("invalid uint256");return We(e,32)}_block(e,t){e.author!=null&&e.miner==null&&(e.miner=e.author);const r=e._difficulty!=null?e._difficulty:e.difficulty,i=fe.check(t,e);return i._difficulty=r==null?null:ee.from(r),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return fe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&ee.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const t=fe.check(this.formats.transaction,e);if(e.chainId!=null){let r=e.chainId;ve(r)&&(r=ee.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;r==null&&t.v==null&&(r=e.chainId),ve(r)&&(r=ee.from(r).toNumber()),typeof r!="number"&&t.v!=null&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),typeof r!="number"&&(r=0),t.chainId=r}return t.blockHash&&t.blockHash.replace(/0/g,"")==="x"&&(t.blockHash=null),t}transaction(e){return Ls(e)}receiptLog(e){return fe.check(this.formats.receiptLog,e)}receipt(e){const t=fe.check(this.formats.receipt,e);if(t.root!=null)if(t.root.length<=4){const r=ee.from(t.root).toNumber();r===0||r===1?(t.status!=null&&t.status!==r&&nn.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=r,delete t.root):nn.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&nn.throwArgumentError("invalid root hash","value.root",t.root);return t.status!=null&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map(t=>this.topics(t)):e!=null?this.hash(e,!0):null}filter(e){return fe.check(this.formats.filter,e)}filterLog(e){return fe.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const i in e)try{const o=e[i](t[i]);o!==void 0&&(r[i]=o)}catch(o){throw o.checkKey=i,o.checkValue=t[i],o}return r}static allowNull(e,t){return(function(r){return r==null?t:e(r)})}static allowFalsish(e,t){return(function(r){return r?e(r):t})}static arrayOf(e){return(function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach(function(i){r.push(e(i))}),r})}}var pe=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const ge=new O(ii),xu=10;function Co(n){return n==null?"null":(wr(n)!==32&&ge.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function No(n){for(n=n.slice();n.length>0&&n[n.length-1]==null;)n.pop();return n.map(e=>{if(Array.isArray(e)){const t={};e.forEach(i=>{t[Co(i)]=!0});const r=Object.keys(t);return r.sort(),r.join("|")}else return Co(e)}).join("&")}function pu(n){return n===""?[]:n.split(/&/g).map(e=>{if(e==="")return[];const t=e.split("|").map(r=>r==="null"?null:r);return t.length===1?t[0]:t})}function Lr(n){if(typeof n=="string"){if(n=n.toLowerCase(),wr(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+No(n);if(Lf.isForkEvent(n))throw ge.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+No(n.topics||[])}throw new Error("invalid event - "+n)}function on(){return new Date().getTime()}function Ro(n){return new Promise(e=>{setTimeout(e,n)})}const bu=["block","network","pending","poll"];class gu{constructor(e,t,r){Q(this,"tag",e),Q(this,"listener",t),Q(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const t=e[1],r=pu(e[2]),i={};return r.length>0&&(i.topics=r),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||bu.indexOf(this.tag)>=0}}const mu={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Ki(n){return We(ee.from(n).toHexString(),32)}function Bo(n){return Qr.encode(rt([n,at(Er(Er(n)),0,4)]))}const ra=new RegExp("^(ipfs)://(.*)$","i"),To=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ra,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ln(n,e){try{return $r(mn(n,e))}catch{}return null}function mn(n,e){if(n==="0x")return null;const t=ee.from(at(n,e,e+32)).toNumber(),r=ee.from(at(n,t,t+32)).toNumber();return at(n,t+32,t+32+r)}function Ji(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):ge.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Fo(n){const e=Z(n);if(e.length>32)throw new Error("internal; should not happen");const t=new Uint8Array(32);return t.set(e,32-e.length),t}function yu(n){if(n.length%32===0)return n;const e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function na(n){const e=[];let t=0;for(let r=0;r<n.length;r++)e.push(null),t+=32;for(let r=0;r<n.length;r++){const i=Z(n[r]);e[r]=Fo(t),e.push(Fo(i.length)),e.push(yu(i)),t+=32+Math.ceil(i.length/32)*32}return wt(e)}class Oo{constructor(e,t,r,i){Q(this,"provider",e),Q(this,"name",r),Q(this,"address",e.formatter.address(t)),Q(this,"_resolvedAddress",i)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(e=>ee.from(e).eq(1)).catch(e=>{if(e.code===O.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return pe(this,void 0,void 0,function*(){const r={to:this.address,ccipReadEnabled:!0,data:wt([e,cn(this.name),t||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,r.data=wt(["0x9061b923",na([vs(this.name),r.data])]));try{let o=yield this.provider.call(r);return Z(o).length%32===4&&ge.throwError("resolver threw error",O.errors.CALL_EXCEPTION,{transaction:r,data:o}),i&&(o=mn(o,0)),o}catch(o){if(o.code===O.errors.CALL_EXCEPTION)return null;throw o}})}_fetchBytes(e,t){return pe(this,void 0,void 0,function*(){const r=yield this._fetch(e,t);return r!=null?mn(r,0):null})}_getAddress(e,t){const r=mu[String(e)];if(r==null&&ge.throwError(`unsupported coin type: ${e}`,O.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),r.ilk==="eth")return this.provider.formatter.address(t);const i=Z(t);if(r.p2pkh!=null){const o=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return Bo(rt([[r.p2pkh],"0x"+o[2]]))}}if(r.p2sh!=null){const o=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(o){const s=parseInt(o[1],16);if(o[2].length===s*2&&s>=1&&s<=75)return Bo(rt([[r.p2sh],"0x"+o[2]]))}}if(r.prefix!=null){const o=i[1];let s=i[0];if(s===0?o!==20&&o!==32&&(s=-1):s=-1,s>=0&&i.length===2+o&&o>=1&&o<=75){const c=ko.toWords(i.slice(2));return c.unshift(s),ko.encode(r.prefix,c)}}return null}getAddress(e){return pe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Wa?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===O.errors.CALL_EXCEPTION)return null;throw i}const t=yield this._fetchBytes("0xf1cb7e06",Ki(e));if(t==null||t==="0x")return null;const r=this._getAddress(e,t);return r==null&&ge.throwError("invalid or unsupported coin data",O.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r})}getAvatar(){return pe(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(t==null)return null;for(let r=0;r<To.length;r++){const i=t.match(To[r]);if(i==null)continue;const o=i[1].toLowerCase();switch(o){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:Ji(t)};case"erc721":case"erc1155":{const s=o==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:o,content:t});const c=this._resolvedAddress||(yield this.getAddress()),x=(i[2]||"").split("/");if(x.length!==2)return null;const g=yield this.provider.formatter.address(x[0]),w=We(ee.from(x[1]).toHexString(),32);if(o==="erc721"){const k=this.provider.formatter.callAddress(yield this.provider.call({to:g,data:wt(["0x6352211e",w])}));if(c!==k)return null;e.push({type:"owner",content:k})}else if(o==="erc1155"){const k=ee.from(yield this.provider.call({to:g,data:wt(["0x00fdd58e",We(c,32),w])}));if(k.isZero())return null;e.push({type:"balance",content:k.toString()})}const M={to:this.provider.formatter.address(x[0]),data:wt([s,w])};let C=Ln(yield this.provider.call(M),0);if(C==null)return null;e.push({type:"metadata-url-base",content:C}),o==="erc1155"&&(C=C.replace("{id}",w.substring(2)),e.push({type:"metadata-url-expanded",content:C})),C.match(/^ipfs:/i)&&(C=Ji(C)),e.push({type:"metadata-url",content:C});const G=yield ni(C);if(!G)return null;e.push({type:"metadata",content:JSON.stringify(G)});let H=G.image;if(typeof H!="string")return null;if(!H.match(/^(https:\/\/|data:)/i)){if(H.match(ra)==null)return null;e.push({type:"url-ipfs",content:H}),H=Ji(H)}return e.push({type:"url",content:H}),{linkage:e,url:H}}}}}catch{}return null})}getContentHash(){return pe(this,void 0,void 0,function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(e==null||e==="0x")return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const s=parseInt(t[3],16);if(t[4].length===s*2)return"ipfs://"+Qr.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const s=parseInt(r[3],16);if(r[4].length===s*2)return"ipns://"+Qr.encode("0x"+r[1])}const i=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(i&&i[1].length===64)return"bzz://"+i[1];const o=e.match(/^0x90b2c605([0-9a-f]*)$/);if(o&&o[1].length===68){const s={"=":"","+":"-","/":"_"};return"sia://"+ds("0x"+o[1]).replace(/[=+\/]/g,x=>s[x])}return ge.throwError("invalid or unsupported content hash data",O.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return pe(this,void 0,void 0,function*(){let t=ct(e);t=rt([Ki(64),Ki(t.length),t]),t.length%32!==0&&(t=rt([t,We("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",re(t));return r==null||r==="0x"?null:$r(r)})}}let Vi=null,vu=1;class wu extends wn{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),Q(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(t=>{}),this._ready().catch(t=>{});else{const t=Vt(new.target,"getNetwork")(e);t?(Q(this,"_network",t),this.emit("network",t,null)):ge.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return pe(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ge.throwError("no network detected",O.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:Q(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Jr(()=>this._ready().then(e=>e,e=>{if(!(e.code===O.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Vi==null&&(Vi=new fe),Vi}static getNetwork(e){return su(e??"homestead")}ccipReadFetch(e,t,r){return pe(this,void 0,void 0,function*(){if(this.disableCcipRead||r.length===0)return null;const i=e.to.toLowerCase(),o=t.toLowerCase(),s=[];for(let c=0;c<r.length;c++){const x=r[c],g=x.replace("{sender}",i).replace("{data}",o),w=x.indexOf("{data}")>=0?null:JSON.stringify({data:o,sender:i}),M=yield ni({url:g,errorPassThrough:!0},w,(G,H)=>(G.status=H.statusCode,G));if(M.data)return M.data;const C=M.message||"unknown error";if(M.status>=400&&M.status<500)return ge.throwError(`response not found during CCIP fetch: ${C}`,O.errors.SERVER_ERROR,{url:x,errorMessage:C});s.push(C)}return ge.throwError(`error encountered during CCIP fetch: ${s.map(c=>JSON.stringify(c)).join(", ")}`,O.errors.SERVER_ERROR,{urls:r,errorMessages:s})})}_getInternalBlockNumber(e){return pe(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const o=yield i;if(on()-o.respTime<=e)return o.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const t=on(),r=Te({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:o})=>{if(o)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),o;const s=on();return i=ee.from(i).toNumber(),i<this._maxInternalBlockNumber&&(i=this._maxInternalBlockNumber),this._maxInternalBlockNumber=i,this._setFastBlockNumber(i),{blockNumber:i,reqTime:t,respTime:s}});return this._internalBlockNumber=r,r.catch(i=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)}),(yield r).blockNumber})}poll(){return pe(this,void 0,void 0,function*(){const e=vu++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)ge.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",ge.makeError("network block skew detected",O.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let i=this._emitted.block+1;i<=r;i++)this.emit("block",i);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const o=this._emitted[i];o!=="pending"&&r-o>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=r-1),this._events.forEach(i=>{switch(i.type){case"tx":{const o=i.hash;let s=this.getTransactionReceipt(o).then(c=>(!c||c.blockNumber==null||(this._emitted["t:"+o]=c.blockNumber,this.emit(o,c)),null)).catch(c=>{this.emit("error",c)});t.push(s);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=r-1);const o=i.filter;o.fromBlock=i._lastBlockNumber+1,o.toBlock=r;const s=o.toBlock-this._maxFilterBlockRange;s>o.fromBlock&&(o.fromBlock=s),o.fromBlock<0&&(o.fromBlock=0);const c=this.getLogs(o).then(x=>{i._inflight=!1,x.length!==0&&x.forEach(g=>{g.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=g.blockNumber),this._emitted["b:"+g.blockHash]=g.blockNumber,this._emitted["t:"+g.transactionHash]=g.blockNumber,this.emit(o,g)})}).catch(x=>{this.emit("error",x),i._inflight=!1});t.push(c)}break}}}),this._lastBlockNumber=r,Promise.all(t).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return pe(this,void 0,void 0,function*(){return ge.throwError("provider does not support network detection",O.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return pe(this,void 0,void 0,function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Ro(0),this._network;const r=ge.makeError("underlying network changed",O.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=on();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(t=>((this._fastBlockNumber==null||t>this._fastBlockNumber)&&(this._fastBlockNumber=t),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&e<this._fastBlockNumber||(this._fastQueryDate=on(),(this._fastBlockNumber==null||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return pe(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,r||0,null)})}_waitForTransaction(e,t,r,i){return pe(this,void 0,void 0,function*(){const o=yield this.getTransactionReceipt(e);return(o?o.confirmations:0)>=t?o:new Promise((s,c)=>{const x=[];let g=!1;const w=function(){return g?!0:(g=!0,x.forEach(C=>{C()}),!1)},M=C=>{C.confirmations<t||w()||s(C)};if(this.on(e,M),x.push(()=>{this.removeListener(e,M)}),i){let C=i.startBlock,G=null;const H=k=>pe(this,void 0,void 0,function*(){g||(yield Ro(1e3),this.getTransactionCount(i.from).then(S=>pe(this,void 0,void 0,function*(){if(!g){if(S<=i.nonce)C=k;else{{const T=yield this.getTransaction(e);if(T&&T.blockNumber!=null)return}for(G==null&&(G=C-3,G<i.startBlock&&(G=i.startBlock));G<=k;){if(g)return;const T=yield this.getBlockWithTransactions(G);for(let D=0;D<T.transactions.length;D++){const U=T.transactions[D];if(U.hash===e)return;if(U.from===i.from&&U.nonce===i.nonce){if(g)return;const q=yield this.waitForTransaction(U.hash,t);if(w())return;let z="replaced";U.data===i.data&&U.to===i.to&&U.value.eq(i.value)?z="repriced":U.data==="0x"&&U.from===U.to&&U.value.isZero()&&(z="cancelled"),c(ge.makeError("transaction was replaced",O.errors.TRANSACTION_REPLACED,{cancelled:z==="replaced"||z==="cancelled",reason:z,replacement:this._wrapTransaction(U),hash:e,receipt:q}));return}}G++}}g||this.once("block",H)}}),S=>{g||this.once("block",H)}))});if(g)return;this.once("block",H),x.push(()=>{this.removeListener("block",H)})}if(typeof r=="number"&&r>0){const C=setTimeout(()=>{w()||c(ge.makeError("timeout exceeded",O.errors.TIMEOUT,{timeout:r}))},r);C.unref&&C.unref(),x.push(()=>{clearTimeout(C)})}})})}getBlockNumber(){return pe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return ee.from(e)}catch(t){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Te({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",r);try{return ee.from(i)}catch(o){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getBalance",params:r,result:i,error:o})}})}getTransactionCount(e,t){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Te({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",r);try{return ee.from(i).toNumber()}catch(o){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:i,error:o})}})}getCode(e,t){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Te({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",r);try{return re(i)}catch(o){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getCode",params:r,result:i,error:o})}})}getStorageAt(e,t,r){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Te({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then(s=>Xn(s))}),o=yield this.perform("getStorageAt",i);try{return re(o)}catch(s){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:s})}})}_wrapTransaction(e,t,r){if(t!=null&&wr(t)!==32)throw new Error("invalid response - sendTransaction");const i=e;return t!=null&&e.hash!==t&&ge.throwError("Transaction hash mismatch from Provider.sendTransaction.",O.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=(o,s)=>pe(this,void 0,void 0,function*(){o==null&&(o=1),s==null&&(s=0);let c;o!==0&&r!=null&&(c={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const x=yield this._waitForTransaction(e.hash,o,s,c);return x==null&&o===0?null:(this._emitted["t:"+e.hash]=x.blockNumber,x.status===0&&ge.throwError("transaction failed",O.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:x}),x)}),i}sendTransaction(e){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then(o=>re(o)),r=this.formatter.transaction(e);r.confirmations==null&&(r.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const o=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,o,i)}catch(o){throw o.transaction=r,o.transactionHash=r.hash,o}})}_getTransactionRequest(e){return pe(this,void 0,void 0,function*(){const t=yield e,r={};return["from","to"].forEach(i=>{t[i]!=null&&(r[i]=Promise.resolve(t[i]).then(o=>o?this._getAddress(o):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{t[i]!=null&&(r[i]=Promise.resolve(t[i]).then(o=>o?ee.from(o):null))}),["type"].forEach(i=>{t[i]!=null&&(r[i]=Promise.resolve(t[i]).then(o=>o??null))}),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(i=>{t[i]!=null&&(r[i]=Promise.resolve(t[i]).then(o=>o?re(o):null))}),this.formatter.transactionRequest(yield Te(r))})}_getFilter(e){return pe(this,void 0,void 0,function*(){e=yield e;const t={};return e.address!=null&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach(r=>{e[r]!=null&&(t[r]=e[r])}),["fromBlock","toBlock"].forEach(r=>{e[r]!=null&&(t[r]=this._getBlockTag(e[r]))}),this.formatter.filter(yield Te(t))})}_call(e,t,r){return pe(this,void 0,void 0,function*(){r>=xu&&ge.throwError("CCIP read exceeded maximum redirections",O.errors.SERVER_ERROR,{redirects:r,transaction:e});const i=e.to,o=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&t==="latest"&&i!=null&&o.substring(0,10)==="0x556f1830"&&wr(o)%32===4)try{const s=at(o,4),c=at(s,0,32);ee.from(c).eq(i)||ge.throwError("CCIP Read sender did not match",O.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const x=[],g=ee.from(at(s,32,64)).toNumber(),w=ee.from(at(s,g,g+32)).toNumber(),M=at(s,g+32);for(let T=0;T<w;T++){const D=Ln(M,T*32);D==null&&ge.throwError("CCIP Read contained corrupt URL string",O.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),x.push(D)}const C=mn(s,64);ee.from(at(s,100,128)).isZero()||ge.throwError("CCIP Read callback selector included junk",O.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const G=at(s,96,100),H=mn(s,128),k=yield this.ccipReadFetch(e,C,x);k==null&&ge.throwError("CCIP Read disabled or provided no URLs",O.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o});const S={to:i,data:wt([G,na([k,H])])};return this._call(S,t,r+1)}catch(s){if(s.code===O.errors.SERVER_ERROR)throw s}try{return re(o)}catch(s){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:o,error:s})}})}call(e,t){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Te({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)})}estimateGas(e){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Te({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return ee.from(r)}catch(i){return ge.throwError("bad result from backend",O.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:i})}})}_getAddress(e){return pe(this,void 0,void 0,function*(){e=yield e,typeof e!="string"&&ge.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return t==null&&ge.throwError("ENS name not configured",O.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t})}_getBlock(e,t){return pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let r=-128;const i={includeTransactions:!!t};if(ve(e,32))i.blockHash=e;else try{i.blockTag=yield this._getBlockTag(e),ve(i.blockTag)&&(r=parseInt(i.blockTag.substring(2),16))}catch{ge.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return Jr(()=>pe(this,void 0,void 0,function*(){const o=yield this.perform("getBlock",i);if(o==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&r>this._emitted.block?null:void 0;if(t){let s=null;for(let x=0;x<o.transactions.length;x++){const g=o.transactions[x];if(g.blockNumber==null)g.confirmations=0;else if(g.confirmations==null){s==null&&(s=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let w=s-g.blockNumber+1;w<=0&&(w=1),g.confirmations=w}}const c=this.formatter.blockWithTransactions(o);return c.transactions=c.transactions.map(x=>this._wrapTransaction(x)),c}return this.formatter.block(o)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Jr(()=>pe(this,void 0,void 0,function*(){const r=yield this.perform("getTransaction",t);if(r==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(r);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Jr(()=>pe(this,void 0,void 0,function*(){const r=yield this.perform("getTransactionReceipt",t);if(r==null)return this._emitted["t:"+e]==null?null:void 0;if(r.blockHash==null)return;const i=this.formatter.receipt(r);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let s=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;s<=0&&(s=1),i.confirmations=s}return i}),{oncePoll:this})})}getLogs(e){return pe(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Te({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach(i=>{i.removed==null&&(i.removed=!1)}),fe.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return pe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return pe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ge.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return pe(this,void 0,void 0,function*(){let t=e;for(;;){if(t===""||t==="."||e!=="eth"&&t==="eth")return null;const r=yield this._getResolver(t,"getResolver");if(r!=null){const i=new Oo(this,r,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return pe(this,void 0,void 0,function*(){t==null&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||ge.throwError("network does not support ENS",O.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const i=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+cn(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return pe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(r){if(ve(e))throw r}typeof e!="string"&&ge.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return pe(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const t=e.substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(r==null)return null;const i=Ln(yield this.call({to:r,data:"0x691f3431"+cn(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return pe(this,void 0,void 0,function*(){let t=null;if(ve(e)){const o=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(o,"getAvatar");if(!s)return null;t=new Oo(this,s,o);try{const c=yield t.getAvatar();if(c)return c.url}catch(c){if(c.code!==O.errors.CALL_EXCEPTION)throw c}try{const c=Ln(yield this.call({to:s,data:"0x691f3431"+cn(o).substring(2)}),0);t=yield this.getResolver(c)}catch(c){if(c.code!==O.errors.CALL_EXCEPTION)throw c;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return r==null?null:r.url})}perform(e,t){return ge.throwError(e+" not implemented",O.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(t=>t.pollable()).length>0}_addEventListener(e,t,r){const i=new gu(Lr(e),t,r);return this._events.push(i),this._startEvent(i),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,i=[],o=Lr(e);return this._events=this._events.filter(s=>s.tag!==o?!0:(setTimeout(()=>{s.listener.apply(this,t)},0),r=!0,s.once?(i.push(s),!1):!0)),i.forEach(s=>{this._stopEvent(s)}),r}listenerCount(e){if(!e)return this._events.length;let t=Lr(e);return this._events.filter(r=>r.tag===t).length}listeners(e){if(e==null)return this._events.map(r=>r.listener);let t=Lr(e);return this._events.filter(r=>r.tag===t).map(r=>r.listener)}off(e,t){if(t==null)return this.removeAllListeners(e);const r=[];let i=!1,o=Lr(e);return this._events=this._events.filter(s=>s.tag!==o||s.listener!=t||i?!0:(i=!0,r.push(s),!1)),r.forEach(s=>{this._stopEvent(s)}),this}removeAllListeners(e){let t=[];if(e==null)t=this._events,this._events=[];else{const r=Lr(e);this._events=this._events.filter(i=>i.tag!==r?!0:(t.push(i),!1))}return t.forEach(r=>{this._stopEvent(r)}),this}}const Au="abstract-signer/5.8.0";var Lt=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const Gt=new O(Au),Eu=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],_u=[O.errors.INSUFFICIENT_FUNDS,O.errors.NONCE_EXPIRED,O.errors.REPLACEMENT_UNDERPRICED];class A0{constructor(){Gt.checkAbstract(new.target,A0),Q(this,"_isSigner",!0)}getBalance(e){return Lt(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Lt(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Lt(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Te(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return Lt(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Te(this.checkTransaction(e));return yield this.provider.call(r,t)})}sendTransaction(e){return Lt(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)})}getChainId(){return Lt(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Lt(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Lt(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Lt(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const r in e)Eu.indexOf(r)===-1&&Gt.throwArgumentError("invalid transaction key: "+r,"transaction",e);const t=nt(e);return t.from==null?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(r=>(r[0].toLowerCase()!==r[1].toLowerCase()&&Gt.throwArgumentError("from address mismatch","transaction",e),r[0])),t}populateTransaction(e){return Lt(this,void 0,void 0,function*(){const t=yield Te(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Lt(this,void 0,void 0,function*(){if(i==null)return null;const o=yield this.resolveName(i);return o==null&&Gt.throwArgumentError("provided ENS name resolves to null","tx.to",i),o})),t.to.catch(i=>{}));const r=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||r)?Gt.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&r&&Gt.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(t.type===2||t.type==null)&&t.maxFeePerGas!=null&&t.maxPriorityFeePerGas!=null)t.type=2;else if(t.type===0||t.type===1)t.gasPrice==null&&(t.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(t.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(t.type=2,t.gasPrice!=null){const o=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=o,t.maxPriorityFeePerGas=o}else t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(r&&Gt.throwError("network does not support EIP-1559",O.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):Gt.throwError("failed to get consistent fee data",O.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else t.type===2&&(t.maxFeePerGas==null&&(t.maxFeePerGas=i.maxFeePerGas),t.maxPriorityFeePerGas==null&&(t.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return t.nonce==null&&(t.nonce=this.getTransactionCount("pending")),t.gasLimit==null&&(t.gasLimit=this.estimateGas(t).catch(i=>{if(_u.indexOf(i.code)>=0)throw i;return Gt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:t})})),t.chainId==null?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Gt.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Te(t)})}_checkProvider(e){this.provider||Gt.throwError("missing provider",O.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}var fr=function(n,e,t,r){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function c(w){try{g(r.next(w))}catch(M){s(M)}}function x(w){try{g(r.throw(w))}catch(M){s(M)}}function g(w){w.done?o(w.value):i(w.value).then(c,x)}g((r=r.apply(n,e||[])).next())})};const st=new O(ii),Su=["call","estimateGas"];function hn(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){const t=ve(n.data)?n.data:null;if(!e||t)return{message:n.message,data:t}}if(typeof n=="object"){for(const t in n){const r=hn(n[t],e);if(r)return r}return null}if(typeof n=="string")try{return hn(JSON.parse(n),e)}catch{}return null}function ia(n,e,t){const r=t.transaction||t.signedTransaction;if(n==="call"){const o=hn(e,!0);if(o)return o.data;st.throwError("missing revert data in call exception; Transaction reverted without a reason string",O.errors.CALL_EXCEPTION,{data:"0x",transaction:r,error:e})}if(n==="estimateGas"){let o=hn(e.body,!1);o==null&&(o=hn(e,!1)),o&&st.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:n,transaction:r,error:e})}let i=e.message;throw e.code===O.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&st.throwError("insufficient funds for intrinsic transaction cost",O.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:r}),i.match(/nonce (is )?too low/i)&&st.throwError("nonce has already been used",O.errors.NONCE_EXPIRED,{error:e,method:n,transaction:r}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&st.throwError("replacement fee too low",O.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:r}),i.match(/only replay-protected/i)&&st.throwError("legacy pre-eip-155 transactions not supported",O.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:r}),Su.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&st.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",O.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:r}),e}function Do(n){return new Promise(function(e){setTimeout(e,n)})}function Pu(n){if(n.error){const e=new Error(n.error.message);throw e.code=n.error.code,e.data=n.error.data,e}return n.result}function sn(n){return n&&n.toLowerCase()}const n0={};class oa extends A0{constructor(e,t,r){if(super(),e!==n0)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Q(this,"provider",t),r==null&&(r=0),typeof r=="string"?(Q(this,"_address",this.provider.formatter.address(r)),Q(this,"_index",null)):typeof r=="number"?(Q(this,"_index",r),Q(this,"_address",null)):st.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return st.throwError("cannot alter JSON-RPC Signer connection",O.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Mu(n0,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&st.throwError("unknown account #"+this._index,O.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=nt(e);const t=this.getAddress().then(r=>(r&&(r=r.toLowerCase()),r));if(e.gasLimit==null){const r=nt(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(r=>fr(this,void 0,void 0,function*(){if(r==null)return null;const i=yield this.provider.resolveName(r);return i==null&&st.throwArgumentError("provided ENS name resolves to null","tx.to",r),i}))),Te({tx:Te(e),sender:t}).then(({tx:r,sender:i})=>{r.from!=null?r.from.toLowerCase()!==i&&st.throwArgumentError("from address mismatch","transaction",e):r.from=i;const o=this.provider.constructor.hexlifyTransaction(r,{from:!0});return this.provider.send("eth_sendTransaction",[o]).then(s=>s,s=>(typeof s.message=="string"&&s.message.match(/user denied/i)&&st.throwError("user rejected transaction",O.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),ia("sendTransaction",s,o)))})}signTransaction(e){return st.throwError("signing transactions is unsupported",O.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return fr(this,void 0,void 0,function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Jr(()=>fr(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(r);if(i!==null)return this.provider._wrapTransaction(i,r,t)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=r,i}})}signMessage(e){return fr(this,void 0,void 0,function*(){const t=typeof e=="string"?ct(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[re(t),r.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&st.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),i}})}_legacySignMessage(e){return fr(this,void 0,void 0,function*(){const t=typeof e=="string"?ct(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),re(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&st.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),i}})}_signTypedData(e,t,r){return fr(this,void 0,void 0,function*(){const i=yield bt.resolveNames(e,t,r,s=>this.provider.resolveName(s)),o=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&st.throwError("user rejected signing",O.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:i.domain,types:t,value:i.value}}),s}})}unlock(e){return fr(this,void 0,void 0,function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}}class Mu extends oa{sendTransaction(e){return this.sendUncheckedTransaction(e).then(t=>({hash:t,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:r=>this.provider.waitForTransaction(t,r)}))}}const Iu={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ku extends wu{constructor(e,t){let r=t;r==null&&(r=new Promise((i,o)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{o(s)})},0)})),super(r),e||(e=Vt(this.constructor,"defaultUrl")()),typeof e=="string"?Q(this,"connection",Object.freeze({url:e})):Q(this,"connection",Object.freeze(nt(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return fr(this,void 0,void 0,function*(){yield Do(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const t=Vt(this.constructor,"getNetwork");try{return t(ee.from(e).toNumber())}catch(r){return st.throwError("could not detect network",O.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:r})}}return st.throwError("could not detect network",O.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new oa(n0,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(t=>this.formatter.address(t)))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:nr(r),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const o=ni(this.connection,JSON.stringify(r),Pu).then(s=>(this.emit("debug",{action:"response",request:r,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",error:s,request:r,provider:this}),s});return i&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null},0)),o}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[sn(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[sn(t.address),t.blockTag]];case"getCode":return["eth_getCode",[sn(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[sn(t.address),We(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Vt(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Vt(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=sn(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return fr(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=t.transaction;if(i&&i.type!=null&&ee.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const o=yield this.getFeeData();o.maxFeePerGas==null&&o.maxPriorityFeePerGas==null&&(t=nt(t),t.transaction=nt(i),delete t.transaction.type)}}const r=this.prepareRequest(e,t);r==null&&st.throwError(e+" not implemented",O.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(i){return ia(e,i,t)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(r){function i(){e.send("eth_getFilterChanges",[r]).then(function(o){if(e._pendingFilter!=t)return null;let s=Promise.resolve();return o.forEach(function(c){e._emitted["t:"+c.toLowerCase()]="pending",s=s.then(function(){return e.getTransaction(c).then(function(x){return e.emit("pending",x),null})})}),s.then(function(){return Do(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[r]);return}return setTimeout(function(){i()},0),null}).catch(o=>{})}return i(),r}).catch(r=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=nt(Iu);if(t)for(const o in t)t[o]&&(r[o]=!0);o0(e,r);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(o){if(e[o]==null)return;const s=Xn(ee.from(e[o]));o==="gasLimit"&&(o="gas"),i[o]=s}),["from","to","data"].forEach(function(o){e[o]!=null&&(i[o]=re(e[o]))}),e.accessList&&(i.accessList=Or(e.accessList)),i}}const Uo=new O(ii);let Cu=1;function Lo(n,e){const t="Web3LegacyFetcher";return function(r,i){const o={method:r,params:i,id:Cu++,jsonrpc:"2.0"};return new Promise((s,c)=>{this.emit("debug",{action:"request",fetcher:t,request:nr(o),provider:this}),e(o,(x,g)=>{if(x)return this.emit("debug",{action:"response",fetcher:t,error:x,request:o,provider:this}),c(x);if(this.emit("debug",{action:"response",fetcher:t,request:o,response:g,provider:this}),g.error){const w=new Error(g.error.message);return w.code=g.error.code,w.data=g.error.data,c(w)}s(g.result)})})}}function Nu(n){return function(e,t){t==null&&(t=[]);const r={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:nr(r),provider:this}),n.request(r).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:r,error:i,provider:this}),i})}}class qu extends ku{constructor(e,t){e==null&&Uo.throwArgumentError("missing provider","provider",e);let r=null,i=null,o=null;typeof e=="function"?(r="unknown:",i=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),o=e,e.request?(r===""&&(r="eip-1193:"),i=Nu(e)):e.sendAsync?i=Lo(e,e.sendAsync.bind(e)):e.send?i=Lo(e,e.send.bind(e)):Uo.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),Q(this,"jsonRpcFetchFunc",i),Q(this,"provider",o)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const Ru="units/5.8.0",Bu=new O(Ru),Tu=["wei","kwei","mwei","gwei","szabo","finney","ether"];function sa(n,e){return Bn(n,e)}function aa(n,e){if(typeof n!="string"&&Bu.throwArgumentError("value must be a string","value",n),typeof e=="string"){const t=Tu.indexOf(e);t!==-1&&(e=3*t)}return Xt(n,e??18)}function Fu(n){return sa(n,18)}function Ou(n){return aa(n,18)}const zu=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:cs,ConstructorFragment:Kt,ErrorFragment:cr,EventFragment:$t,FormatTypes:Ee,Fragment:er,FunctionFragment:Jt,HDNode:It,Indexed:Jn,Interface:Yi,LogDescription:Ss,Logger:O,ParamType:ft,SigningKey:Ir,get SupportedAlgorithm(){return Yr},TransactionDescription:Ps,get TransactionTypes(){return $i},get UnicodeNormalizationForm(){return ur},Utf8ErrorFuncs:ss,get Utf8ErrorReason(){return St},_TypedDataEncoder:bt,_fetchData:ta,accessListify:Or,arrayify:Z,base58:Qr,checkProperties:o0,checkResultErrors:Xo,computeAddress:vr,computeHmac:gn,computePublicKey:x0,concat:rt,deepCopy:nr,defaultAbiCoder:us,defaultPath:Xr,defineReadOnly:Q,dnsEncode:vs,entropyToMnemonic:ri,fetchJson:ni,formatEther:Fu,formatUnits:sa,getAddress:et,getContractAddress:c0,getStatic:Vt,hashMessage:ws,hexConcat:wt,hexDataLength:wr,hexDataSlice:at,hexStripZeros:zo,hexValue:Xn,hexZeroPad:We,hexlify:re,id:yr,isBytes:Rr,isBytesLike:yn,isHexString:ve,joinSignature:ji,keccak256:je,mnemonicToEntropy:y0,mnemonicToSeed:Ws,namehash:cn,parseEther:Ou,parseTransaction:Ls,parseUnits:aa,poll:Jr,randomBytes:Kr,recoverAddress:b0,recoverPublicKey:Ts,resolveProperties:Te,ripemd160:Ks,serializeTransaction:e0,sha256:Er,shallowCopy:nt,splitSignature:Br,stripZeros:rr,toUtf8Bytes:ct,toUtf8CodePoints:fs,toUtf8String:$r,zeroPad:qo},Symbol.toStringTag,{value:"Module"}));export{ee as B,Gu as C,Yi as I,ku as J,Va as M,qu as W,ns as Z,We as a,aa as b,ca as c,Hf as d,An as e,Fu as f,ha as g,re as h,Yf as i,ji as j,qr as k,Xn as l,Ou as p,Kr as r,Br as s,zu as u};
10
- //# sourceMappingURL=ethers-Dv96XuWO.js.map
10
+ //# sourceMappingURL=ethers-BJ46oYk8.js.map