@dcl/shop 0.1.0-29736515487.commit-b64bf82 → 0.1.0-29792819793.commit-bcbfeac

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 (207) hide show
  1. package/assets/{AnimatedBackground-BJBUqhHZ.js → AnimatedBackground-D56igB0H.js} +1 -1
  2. package/assets/Assets-DvxF_g1B.js +1 -0
  3. package/assets/Cart-C75800mc.css +1 -0
  4. package/assets/Cart-Ccc7hMA3.js +3 -0
  5. package/assets/{CircularProgress-C9g4a9bc.js → CircularProgress-B5065SQc.js} +4 -4
  6. package/assets/Collection-CegF4Bg6.js +45 -0
  7. package/assets/Collection-Dpog3TvS.css +1 -0
  8. package/assets/CollectionCarousel-CI_xuvlL.js +1 -0
  9. package/assets/Creator-Cpx_caba.css +1 -0
  10. package/assets/Creator-DMEgGcPH.js +1 -0
  11. package/assets/{CssVarsProvider-Bc8wQjEb.js → CssVarsProvider-Dk1aMrkN.js} +3 -3
  12. package/assets/ErrorNotice-CKeOu_Oi.js +1 -0
  13. package/assets/{ExchangeController-B6lNqmFK.js → ExchangeController-C-7GeeUG.js} +1 -1
  14. package/assets/GetCredits-DkdN8Bhp.js +1 -0
  15. package/assets/{HelpersUtil-zS6eOrPz.js → HelpersUtil-BSdS6suS.js} +1 -1
  16. package/assets/ImportListings-AQXg48hx.js +5 -0
  17. package/assets/{ImportListings-Cdx3om4x.css → ImportListings-Dx8BzO4r.css} +1 -1
  18. package/assets/ItemDetail-5q6iNQ7f.js +29 -0
  19. package/assets/ItemDetail-CV-0-ZkB.css +1 -0
  20. package/assets/LoadMore-CpjVWxfC.js +7 -0
  21. package/assets/MarketCheckout-DOjNy7WS.js +3 -0
  22. package/assets/MyAssets-DyNGSmlq.js +7 -0
  23. package/assets/MyAssets-FkZXy017.css +1 -0
  24. package/assets/MyFavorites-DyIDy1bn.js +3 -0
  25. package/assets/MyPurchases-DvllAazp.js +3 -0
  26. package/assets/NotFound-pLaOVJZH.js +1 -0
  27. package/assets/StoreSettings-Bk5IXwNu.css +1 -0
  28. package/assets/StoreSettings-CGJVKy8y.js +53 -0
  29. package/assets/Success-QRszHOfo.js +98 -0
  30. package/assets/{SwapController-BHBv5Fp0.js → SwapController-NM8NLhBK.js} +1 -1
  31. package/assets/{TradeService-CNoDt48E.js → TradeService-tfJ3u36y.js} +1 -1
  32. package/assets/{W3MFrameProviderSingleton-Bndo_4Rg.js → W3MFrameProviderSingleton-Cw2a6UVb.js} +3 -3
  33. package/assets/{WebCryptoP256-Bt50-H1K.js → WebCryptoP256-DPkQuUHZ.js} +1 -1
  34. package/assets/{basic-Bub5O4ZI.js → basic-Dw_SNPcl.js} +1 -1
  35. package/assets/{biconomy-DuIIEXUB.js → biconomy-CRzlpcf3.js} +1 -1
  36. package/assets/{buy--wjHgZbY.js → buy-BhSXg06e.js} +1 -1
  37. package/assets/{buy-gasless-DaSij0O9.js → buy-gasless-7ufZIH4V.js} +1 -1
  38. package/assets/{cart-checkout-RV2JhHc0.js → cart-checkout-mDO-sH0L.js} +1 -1
  39. package/assets/categories-TbcSl5d3.js +7 -0
  40. package/assets/categories-_8oO8Yih.css +1 -0
  41. package/assets/{ccip-Cbub1KDX.js → ccip-CivR7OIS.js} +1 -1
  42. package/assets/{ccip-C1ke5tRS.js → ccip-DFqwb91R.js} +1 -1
  43. package/assets/collection-C6WmEOVc.js +1 -0
  44. package/assets/{controller-Cn9mR-pN.js → controller-BHb75Qgx.js} +2 -2
  45. package/assets/{core-Z6gT3FaJ.js → core-CbJ-Ervx.js} +4 -4
  46. package/assets/{custom-Djk6BRDC.js → custom-Ccs_ccnL.js} +1 -1
  47. package/assets/{data-capture-CaF6YYAr.js → data-capture-l63W8j3T.js} +1 -1
  48. package/assets/{decimals-BW2hoshz.js → decimals-DuIIGtOu.js} +1 -1
  49. package/assets/{decimals-_kiKzbOr.js → decimals-DzfF7TyV.js} +1 -1
  50. package/assets/{detectExtension-BkZ-FjJy.js → detectExtension-DFGJRiKZ.js} +1 -1
  51. package/assets/{email-1Van4lx1.js → email-dBQjbinH.js} +1 -1
  52. package/assets/{embedded-wallet-_TVgs7Qd.js → embedded-wallet-DUae_P_k.js} +1 -1
  53. package/assets/emotion-styled.browser.esm-CG5P7VGz.js +1 -0
  54. package/assets/{engine-D9uS1iWH.js → engine-oRVYxur7.js} +1 -1
  55. package/assets/{errors-BFbUxXdM.js → errors-DyHnPgpr.js} +1 -1
  56. package/assets/{estimate-l1-fee-DFpjQWvm.js → estimate-l1-fee-ARqdcX-t.js} +1 -1
  57. package/assets/{eth_estimateGas-XGJ1z-TU.js → eth_estimateGas-BSIKlyPh.js} +1 -1
  58. package/assets/{eth_getStorageAt-4_YV1iAo.js → eth_getStorageAt-CVgsobsA.js} +1 -1
  59. package/assets/{eth_getTransactionCount-DO_4-OAP.js → eth_getTransactionCount-SZqnB2Fd.js} +1 -1
  60. package/assets/{extractIPFS-CMkI68ZH.js → extractIPFS-BZfGMcbR.js} +1 -1
  61. package/assets/{features-Dzd7PGBD.js → features-Bd_x9PgJ.js} +1 -1
  62. package/assets/{fetchTokenMetadata-BJILnwgp.js → fetchTokenMetadata-ClzNbKM3.js} +2 -2
  63. package/assets/{get-ecosystem-wallet-info-BD5YDDMh.js → get-ecosystem-wallet-info-4G7NxEId.js} +1 -1
  64. package/assets/{getBalance-SRetmB3S.js → getBalance-NpSJnYq2.js} +1 -1
  65. package/assets/{getInstalledModules-DFh2dv3C.js → getInstalledModules-DP_6RMgU.js} +1 -1
  66. package/assets/{getNFT-CJ8nxXzA.js → getNFT-BejxGTxr.js} +1 -1
  67. package/assets/{getNFT-CtODGGom.js → getNFT-DhE_Sqp0.js} +2 -2
  68. package/assets/{getOverlayAlpha-DqVbiGQa.js → getOverlayAlpha-Cv_6_sjJ.js} +1 -1
  69. package/assets/{hashTypedData-B9EX4kQr.js → hashTypedData-COhFmPMp.js} +1 -1
  70. package/assets/{hashTypedData-DF-5orkI.js → hashTypedData-DUGnhSaC.js} +1 -1
  71. package/assets/{import-DjSObRBl.js → import-C6NVzCbS.js} +1 -1
  72. package/assets/{in-app-wallet-calls-BIFm_f4e.js → in-app-wallet-calls-BriVf0Xa.js} +1 -1
  73. package/assets/{index-_PfBd9GI.js → index-1v_Y3jeY.js} +2 -2
  74. package/assets/{index-Dp3LaHz2.js → index-6WmBd2xZ.js} +1 -1
  75. package/assets/{index-rjGwBRLW.js → index-9L9gLdlq.js} +1 -1
  76. package/assets/{index-BMvjtMcC.js → index-B85akwvZ.js} +1 -1
  77. package/assets/index-BEsdviTk.js +231 -0
  78. package/assets/{index-B8oIDYaY.js → index-BKefR4TN.js} +1 -1
  79. package/assets/{index-Baz_xGcG.js → index-BLKX3221.js} +1 -1
  80. package/assets/{index-CB1b6TrQ.js → index-BbuvKqv1.js} +1 -1
  81. package/assets/{index-RUxrTr_p.js → index-Bdey45s-.js} +1 -1
  82. package/assets/{index-4FVRm8A1.js → index-BjJPa7Dq.js} +1 -1
  83. package/assets/{index-CnO86Xf-.js → index-BjyH5s2H.js} +2 -2
  84. package/assets/{index-C6_L5Mw_.js → index-BkRZls_1.js} +1 -1
  85. package/assets/{index-icCmSJB-.js → index-BnIFiC-c.js} +1 -1
  86. package/assets/{index-CI-M1Arz.js → index-C3pTUvlm.js} +1 -1
  87. package/assets/{index-kwYOhJAZ.js → index-CCM3z3QM.js} +1 -1
  88. package/assets/{index-BIm4mg7q.js → index-CJ8L34lL.js} +1 -1
  89. package/assets/{index-C7dwOEd4.js → index-CLf8EeAx.js} +1 -1
  90. package/assets/{index-mj00iiOs.js → index-COBFSj0w.js} +1 -1
  91. package/assets/{index-CXx3fqSb.js → index-CS5T2jHs.js} +1 -1
  92. package/assets/{index-B0vpo1ZT.js → index-CYh10Tb-.js} +1 -1
  93. package/assets/{index-COxhR5RZ.js → index-CaS_3bHx.js} +1 -1
  94. package/assets/{index-wua-qNwF.js → index-CbZ9myKX.js} +1 -1
  95. package/assets/index-Cc7yK5VV.css +1 -0
  96. package/assets/{index-D9ieJGKB.js → index-Cg3K-M7Q.js} +3 -3
  97. package/assets/{index-DZXCznoC.js → index-Cqgv99mD.js} +1 -1
  98. package/assets/{index-Cxc0o5xP.js → index-Cv6v4Xzm.js} +3 -3
  99. package/assets/{index-5DUAhgPD.js → index-CvXWh3Uv.js} +1 -1
  100. package/assets/{index-D1WSRIS2.js → index-CyoVz-o4.js} +4 -4
  101. package/assets/{index-BuMqkfRn.js → index-DAfpkBU7.js} +1 -1
  102. package/assets/{index-lt9H89-j.js → index-DR2hgxdz.js} +1 -1
  103. package/assets/{index-z0NRAVC7.js → index-DWi7HxDb.js} +1 -1
  104. package/assets/{index-B84aCWu7.js → index-DXygeL6X.js} +1 -1
  105. package/assets/{index-435lMBSs.js → index-DjqWnfd7.js} +1 -1
  106. package/assets/{index-Cq05ek6k.js → index-Dl9zwaYA.js} +1 -1
  107. package/assets/{index-D-g3I2lj.js → index-DsshJ_lX.js} +1 -1
  108. package/assets/{index-C4u9N2Kl.js → index-DuzgHfIP.js} +1 -1
  109. package/assets/{index-B-R-UWD3.js → index-DyTWdHYC.js} +1 -1
  110. package/assets/{index-D-OL6_Yb.js → index-HBR0FANJ.js} +1 -1
  111. package/assets/{index-C7FmrxuL.js → index-HHpkG_47.js} +2 -2
  112. package/assets/{index-BJhyH2t3.js → index-IY4O0BLz.js} +1 -1
  113. package/assets/{index-D6gXM0CC.js → index-QQPs4pW8.js} +1 -1
  114. package/assets/{index-Ca1AwnnV.js → index-Sq6XS4iZ.js} +1 -1
  115. package/assets/{index-BDpvYYDT.js → index-UCJJplAh.js} +2 -2
  116. package/assets/{index-C1ZfYzAF.js → index-WwPC62mN.js} +1 -1
  117. package/assets/{index-CuuFwMsN.js → index-Z3oZVFq1.js} +1 -1
  118. package/assets/{index-DxHhM-lc.js → index-akCK_e-v.js} +1 -1
  119. package/assets/{index-D4I9bYC2.js → index-i8wZZpV8.js} +1 -1
  120. package/assets/{index-CPEmMCeJ.js → index-n0FG0lrX.js} +1 -1
  121. package/assets/{index-BTBCIBCb.js → index-nPzHYZwD.js} +1 -1
  122. package/assets/{index-C2Nkwj4Q.js → index-uqiMGPI_.js} +1 -1
  123. package/assets/{index-ChsZA2LJ.js → index-w7PaUg3E.js} +1 -1
  124. package/assets/{index-BP93EahD.js → index-w8OYRXEi.js} +1 -1
  125. package/assets/{index.es-BzNqI7gq.js → index.es-BU5Zdnp2.js} +1 -1
  126. package/assets/{index.es-1OmAzkct.js → index.es-C8ZiAv5V.js} +4 -4
  127. package/assets/{index.es-CwZSb0ol.js → index.es-D4cTyBEt.js} +1 -1
  128. package/assets/{localBatchGatewayRequest-yoTBhn0Z.js → localBatchGatewayRequest-CYqIYIeA.js} +1 -1
  129. package/assets/{mana-rate-Db4BQ-_Q.js → mana-rate-9Jo_gX3p.js} +1 -1
  130. package/assets/{networks-DK4RaMPB.js → networks-BXnLLN9G.js} +1 -1
  131. package/assets/{onramp-D9q0W6xC.js → onramp-C_RYTyg_.js} +1 -1
  132. package/assets/{openzeppelin-BquKm-KX.js → openzeppelin-DUG0JmL6.js} +1 -1
  133. package/assets/{ownerOf-DuMQ2Sl6.js → ownerOf-BQnZeard.js} +1 -1
  134. package/assets/{parseNft-ufNn3-SE.js → parseNft-CeWFWM7R.js} +2 -2
  135. package/assets/{parseSignature-DMb3jl_X.js → parseSignature-B4493K6W.js} +1 -1
  136. package/assets/{parseSignature-BwqWTE77.js → parseSignature-DYe1pTGB.js} +3 -3
  137. package/assets/{pay-with-exchange-CTQ9umub.js → pay-with-exchange-DYgWKjra.js} +1 -1
  138. package/assets/{payments-tEVDRx3d.js → payments-CFwDz2Wq.js} +1 -1
  139. package/assets/{qr-overlay-dEspWwjk.js → qr-overlay-Di6CWZOn.js} +1 -1
  140. package/assets/{receive-D0GHoQxU.js → receive-C0o1V-RP.js} +1 -1
  141. package/assets/{resolveImplementation-C8pfiiFc.js → resolveImplementation-BA0XFre0.js} +1 -1
  142. package/assets/{rpc-DmLUQYS0.js → rpc-Cggo7ec6.js} +1 -1
  143. package/assets/{secp256k1-Dr9eLw2v.js → secp256k1-BI9qggp6.js} +1 -1
  144. package/assets/{secp256k1-Dfs57S6d.js → secp256k1-BIMo8RCk.js} +1 -1
  145. package/assets/{secp256k1-Nx-YHmXH.js → secp256k1-Q4_NkfIK.js} +1 -1
  146. package/assets/{send-BwQAcpw3.js → send-DI70Bi5S.js} +1 -1
  147. package/assets/{send-batch-transaction-DzTkK7I2.js → send-batch-transaction-DyhjjWlE.js} +1 -1
  148. package/assets/{send-eip712-transaction-Cwec8TpW.js → send-eip712-transaction-1hRMqxdz.js} +2 -2
  149. package/assets/{send-gasless-transaction-CM25TtQp.js → send-gasless-transaction-C0Nsj1nC.js} +2 -2
  150. package/assets/{sendRawTransaction-D4a6ft8m.js → sendRawTransaction-DxHQqxHr.js} +3 -3
  151. package/assets/{serializeTransaction-2sq4x0kU.js → serializeTransaction-riX5VAFo.js} +1 -1
  152. package/assets/{session-proposal-BdXqD0a8.js → session-proposal-D83uxPCI.js} +1 -1
  153. package/assets/{session-request-DK4XwmDL.js → session-request-C93Wve_c.js} +2 -2
  154. package/assets/{sha256-D-WKRl2Q.js → sha256-BMoxeY3y.js} +1 -1
  155. package/assets/{signing-BT7JgIF_.js → signing-CHiAS07A.js} +4 -4
  156. package/assets/{socials-BOqU6AoU.js → socials-EqcQO_zT.js} +1 -1
  157. package/assets/{swaps-CG6VNxsT.js → swaps-COT97xIs.js} +1 -1
  158. package/assets/{thirdweb-CAdiquMi.js → thirdweb-liZ1mqED.js} +3 -3
  159. package/assets/{totalSupply-DjhdgKBK.js → totalSupply-DnZRn5dr.js} +1 -1
  160. package/assets/{trade-encoding-6ejU5fQD.js → trade-encoding-BT4RgSDL.js} +1 -1
  161. package/assets/{transactionReceipt-DWMHa3N1.js → transactionReceipt-BeRjRPBL.js} +1 -1
  162. package/assets/{transactions-BgR8COf-.js → transactions-C9vRrGPO.js} +1 -1
  163. package/assets/{useInfiniteGrid-gL0KJ-yb.js → useInfiniteGrid-Cw9zdPUx.js} +1 -1
  164. package/assets/{useStore-BXbR3Zt_.js → useStore-Cd9Nfgb3.js} +1 -1
  165. package/assets/useTheme-BudDZzP5.js +1 -0
  166. package/assets/useTheme-iplrvBaa.js +1 -0
  167. package/assets/{verifyHash-0bNfbKAs.js → verifyHash-BXYMx_5q.js} +1 -1
  168. package/assets/{w3m-modal-L-SoXhRP.js → w3m-modal-B0jKCWZl.js} +1 -1
  169. package/assets/{w3m-modal-Cb8f-N8c.js → w3m-modal-CQvfr1TI.js} +1 -1
  170. package/assets/{wait-for-tx-receipt-DHi00k13.js → wait-for-tx-receipt-k4rIDXu0.js} +1 -1
  171. package/assets/{wallets-DQmx7SO4.js → wallets-Bn-94ZFz.js} +6 -6
  172. package/assets/{web-connector-DZjwkeRe.js → web-connector-DxHdU9RY.js} +3 -3
  173. package/assets/{writeContract-DzbrR3T0.js → writeContract-D55yCJIp.js} +1 -1
  174. package/assets/{zoraTestnet-CiD1Xv8j.js → zoraTestnet-7NHmqxTI.js} +1 -1
  175. package/index.html +11 -11
  176. package/package.json +2 -2
  177. package/assets/Assets-BLEE2McM.js +0 -1
  178. package/assets/Cart-BBaYBkcV.css +0 -1
  179. package/assets/Cart-CNsRhX_R.js +0 -1
  180. package/assets/Collection-CEmVbx8y.js +0 -1
  181. package/assets/Collection-CxRRuAdy.css +0 -1
  182. package/assets/CollectionCarousel-CiKValmX.js +0 -1
  183. package/assets/Creator-CSW1SPi9.js +0 -1
  184. package/assets/Creator-DJqbQ8AX.css +0 -1
  185. package/assets/ErrorNotice-Rze9rgc9.js +0 -1
  186. package/assets/GetCredits-CovHo4LD.js +0 -1
  187. package/assets/ImportListings-B_GYydG3.js +0 -1
  188. package/assets/ItemDetail-Dkstj3oi.css +0 -1
  189. package/assets/ItemDetail-DmBWsg8l.js +0 -2
  190. package/assets/LoadMore-BIjeTH4T.js +0 -1
  191. package/assets/MarketCheckout-DoRZsMk0.js +0 -1
  192. package/assets/MyAssets-7sMdrGBa.js +0 -1
  193. package/assets/MyAssets-BqJHbQOZ.css +0 -1
  194. package/assets/MyFavorites-CRqCDkA2.js +0 -1
  195. package/assets/MyPurchases-BsTMOXYC.js +0 -1
  196. package/assets/NotFound-COraILzW.js +0 -1
  197. package/assets/StoreSettings-BsV7iEJX.css +0 -1
  198. package/assets/StoreSettings-C_SlMQ79.js +0 -1
  199. package/assets/Success-3OL55SvR.js +0 -1
  200. package/assets/categories-BwgdoXaT.js +0 -1
  201. package/assets/categories-CBvVTfQE.css +0 -1
  202. package/assets/collection-CtZ-NDco.js +0 -1
  203. package/assets/emotion-styled.browser.esm-B2VU5Fdx.js +0 -1
  204. package/assets/index-CDzDnyJW.js +0 -38
  205. package/assets/index-DvbMYtAp.css +0 -1
  206. package/assets/useTheme-CmaVa_eU.js +0 -1
  207. package/assets/useTheme-bLwsL2uj.js +0 -1
@@ -1,38 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-RUxrTr_p.js","assets/react-yytiy0wi.js","assets/dcl-schemas-BICTSpB5.js","assets/index-D6gXM0CC.js","assets/emotion-styled.browser.esm-B2VU5Fdx.js","assets/colors-LINLm1ux.js","assets/sentry-BPJvc5GU.js","assets/ethers-w2AslR0v.js","assets/intl-CBcMB1D2.js","assets/index-CnO86Xf-.js","assets/events-DQ172AOg.js","assets/TradeService-CNoDt48E.js","assets/index-HN6Rk25C.js","assets/index-CXx3fqSb.js","assets/index-sFssfP96.js","assets/index-D1WSRIS2.js","assets/useTheme-CmaVa_eU.js","assets/CircularProgress-C9g4a9bc.js","assets/useTheme-bLwsL2uj.js","assets/getOverlayAlpha-DqVbiGQa.js","assets/AnimatedBackground-BJBUqhHZ.js","assets/AnimatedBackground-CiurwFBv.css","assets/Assets-BLEE2McM.js","assets/mana-rate-Db4BQ-_Q.js","assets/MarketCheckout-DoRZsMk0.js","assets/buy--wjHgZbY.js","assets/trade-encoding-6ejU5fQD.js","assets/buy-gasless-DaSij0O9.js","assets/errors-BFbUxXdM.js","assets/ErrorNotice-Rze9rgc9.js","assets/categories-BwgdoXaT.js","assets/categories-CBvVTfQE.css","assets/LoadMore-BIjeTH4T.js","assets/useInfiniteGrid-gL0KJ-yb.js","assets/ItemDetail-DmBWsg8l.js","assets/payments-tEVDRx3d.js","assets/resume-buy-Bf0zIH7y.js","assets/address-DrURAr9O.js","assets/CollectionCarousel-CiKValmX.js","assets/CollectionCarousel-FF2VKnCi.css","assets/ItemDetail-Dkstj3oi.css","assets/Collection-CEmVbx8y.js","assets/collection-CtZ-NDco.js","assets/collection-CrgnzsVL.css","assets/useStore-BXbR3Zt_.js","assets/Collection-CxRRuAdy.css","assets/Creator-CSW1SPi9.js","assets/Creator-DJqbQ8AX.css","assets/StoreSettings-C_SlMQ79.js","assets/StoreSettings-BsV7iEJX.css","assets/MyAssets-7sMdrGBa.js","assets/import-DjSObRBl.js","assets/wallet-kind-B9P1TeIH.js","assets/MyAssets-BqJHbQOZ.css","assets/MyFavorites-CRqCDkA2.js","assets/MyPurchases-BsTMOXYC.js","assets/ImportListings-B_GYydG3.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-CNsRhX_R.js","assets/cart-checkout-RV2JhHc0.js","assets/Cart-BBaYBkcV.css","assets/GetCredits-CovHo4LD.js","assets/Success-3OL55SvR.js","assets/NotFound-COraILzW.js"])))=>i.map(i=>d[i]);
2
- var Im=Object.defineProperty;var Xl=e=>{throw TypeError(e)};var Rm=(e,t,r)=>t in e?Im(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qr=(e,t,r)=>Rm(e,typeof t!="symbol"?t+"":t,r),ei=(e,t,r)=>t.has(e)||Xl("Cannot "+r);var z=(e,t,r)=>(ei(e,t,"read from private field"),r?r.call(e):t.get(e)),Oe=(e,t,r)=>t.has(e)?Xl("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),be=(e,t,r,n)=>(ei(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Me=(e,t,r)=>(ei(e,t,"access private method"),r);var Ks=(e,t,r,n)=>({set _(o){be(e,t,o,r)},get _(){return z(e,t,n)}});import{r as oe,j as f,i as Ch,g as _a,R as Th,c as _c,a as tl,h as Pm,L as bn,l as Ec,e as Gr,k as Nm,u as km,b as Ah,m as $n,n as Om,o as Nt,N as eu,p as jm,B as Bm}from"./react-yytiy0wi.js";import{b as Fm,d as er,a as tu}from"./dcl-schemas-BICTSpB5.js";import{p as ua,i as Lm,B as Mm,s as $m,a as Dm,E as ru}from"./sentry-BPJvc5GU.js";import{W as qm,k as Um,h as nu,f as Ih}from"./ethers-w2AslR0v.js";import{_ as vn,D as Hm,i as Vm,a as rl,c as Gm,b as zm,f as Wm,d as Km,e as Ym}from"./intl-CBcMB1D2.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();var Jo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_n,en,Zn,mh,Qm=(mh=class extends Jo{constructor(){super();Oe(this,_n);Oe(this,en);Oe(this,Zn);be(this,Zn,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,en)||this.setEventListener(z(this,Zn))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,en))==null||t.call(this),be(this,en,void 0))}setEventListener(t){var r;be(this,Zn,t),(r=z(this,en))==null||r.call(this),be(this,en,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,_n)!==t&&(be(this,_n,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,_n)=="boolean"?z(this,_n):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},_n=new WeakMap,en=new WeakMap,Zn=new WeakMap,mh),nl=new Qm,Zm={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},tn,el,gh,Jm=(gh=class{constructor(){Oe(this,tn,Zm);Oe(this,el,!1)}setTimeoutProvider(e){be(this,tn,e)}setTimeout(e,t){return z(this,tn).setTimeout(e,t)}clearTimeout(e){z(this,tn).clearTimeout(e)}setInterval(e,t){return z(this,tn).setInterval(e,t)}clearInterval(e){z(this,tn).clearInterval(e)}},tn=new WeakMap,el=new WeakMap,gh),wn=new Jm;function Xm(e){setTimeout(e,0)}var eg=typeof window>"u"||"Deno"in globalThis;function Gt(){}function tg(e,t){return typeof e=="function"?e(t):e}function Sc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Rh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ln(e,t){return typeof e=="function"?e(t):e}function Qt(e,t){return typeof e=="function"?e(t):e}function ou(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:s,queryKey:i,stale:u}=e;if(i){if(n){if(t.queryHash!==ol(i,t.options))return!1}else if(!Mo(t.queryKey,i))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||s&&!s(t))}function su(e,t){const{exact:r,status:n,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(Lo(t.options.mutationKey)!==Lo(s))return!1}else if(!Mo(t.options.mutationKey,s))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function ol(e,t){return((t==null?void 0:t.queryKeyHashFn)||Lo)(e)}function Lo(e){return JSON.stringify(e,(t,r)=>Cc(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Mo(e[r],t[r])):!1}var rg=Object.prototype.hasOwnProperty;function Ph(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=au(e)&&au(t);if(!n&&!(Cc(e)&&Cc(t)))return t;const s=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),u=i.length,d=n?new Array(u):{};let h=0;for(let m=0;m<u;m++){const p=n?m:i[m],b=e[p],E=t[p];if(b===E){d[p]=b,(n?m<s:rg.call(e,p))&&h++;continue}if(b===null||E===null||typeof b!="object"||typeof E!="object"){d[p]=E;continue}const A=Ph(b,E,r+1);d[p]=A,A===b&&h++}return s===u&&h===s?e:d}function xc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function au(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Cc(e){if(!iu(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!iu(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function iu(e){return Object.prototype.toString.call(e)==="[object Object]"}function ng(e){return new Promise(t=>{wn.setTimeout(t,e)})}function Tc(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Ph(e,t):t}function ti(e){return e}function og(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function sg(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var sl=Symbol();function Nh(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===sl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function kh(e,t){return typeof e=="function"?e(...t):!!e}function ag(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var $o=(()=>{let e=()=>eg;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ac(){let e,t;const r=new Promise((o,s)=>{e=o,t=s});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}var ig=Xm;function cg(){let e=[],t=0,r=u=>{u()},n=u=>{u()},o=ig;const s=u=>{t?e.push(u):o(()=>{r(u)})},i=()=>{const u=e;e=[],u.length&&o(()=>{n(()=>{u.forEach(d=>{r(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||i()}return d},batchCalls:u=>(...d)=>{s(()=>{u(...d)})},schedule:s,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u},setScheduler:u=>{o=u}}}var Tt=cg(),Jn,rn,Xn,yh,lg=(yh=class extends Jo{constructor(){super();Oe(this,Jn,!0);Oe(this,rn);Oe(this,Xn);be(this,Xn,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,rn)||this.setEventListener(z(this,Xn))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,rn))==null||t.call(this),be(this,rn,void 0))}setEventListener(t){var r;be(this,Xn,t),(r=z(this,rn))==null||r.call(this),be(this,rn,t(this.setOnline.bind(this)))}setOnline(t){z(this,Jn)!==t&&(be(this,Jn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,Jn)}},Jn=new WeakMap,rn=new WeakMap,Xn=new WeakMap,yh),ga=new lg;function ug(e){return Math.min(1e3*2**e,3e4)}function Oh(e){return(e??"online")==="online"?ga.isOnline():!0}var Ic=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jh(e){let t=!1,r=0,n;const o=Ac(),s=()=>o.status!=="pending",i=g=>{var T;if(!s()){const V=new Ic(g);b(V),(T=e.onCancel)==null||T.call(e,V)}},u=()=>{t=!0},d=()=>{t=!1},h=()=>nl.isFocused()&&(e.networkMode==="always"||ga.isOnline())&&e.canRun(),m=()=>Oh(e.networkMode)&&e.canRun(),p=g=>{s()||(n==null||n(),o.resolve(g))},b=g=>{s()||(n==null||n(),o.reject(g))},E=()=>new Promise(g=>{var T;n=V=>{(s()||h())&&g(V)},(T=e.onPause)==null||T.call(e)}).then(()=>{var g;n=void 0,s()||(g=e.onContinue)==null||g.call(e)}),A=()=>{if(s())return;let g;const T=r===0?e.initialPromise:void 0;try{g=T??e.fn()}catch(V){g=Promise.reject(V)}Promise.resolve(g).then(p).catch(V=>{var U;if(s())return;const v=e.retry??($o.isServer()?0:3),R=e.retryDelay??ug,w=typeof R=="function"?R(r,V):R,Q=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,V);if(t||!Q){b(V);return}r++,(U=e.onFail)==null||U.call(e,r,V),ng(w).then(()=>h()?void 0:E()).then(()=>{t?b(V):A()})})};return{promise:o,status:()=>o.status,cancel:i,continue:()=>(n==null||n(),o),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?A():E().then(A),o)}}var En,vh,Bh=(vh=class{constructor(){Oe(this,En)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sc(this.gcTime)&&be(this,En,wn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($o.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,En)!==void 0&&(wn.clearTimeout(z(this,En)),be(this,En,void 0))}},En=new WeakMap,vh);function dg(e){return{onFetch:(t,r)=>{var m,p,b,E,A;const n=t.options,o=(b=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:b.direction,s=((E=t.state.data)==null?void 0:E.pages)||[],i=((A=t.state.data)==null?void 0:A.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const h=async()=>{let g=!1;const T=R=>{ag(R,()=>t.signal,()=>g=!0)},V=Nh(t.options,t.fetchOptions),v=async(R,w,Q)=>{if(g)return Promise.reject(t.signal.reason);if(w==null&&R.pages.length)return Promise.resolve(R);const x=(()=>{const ne={client:t.client,queryKey:t.queryKey,pageParam:w,direction:Q?"backward":"forward",meta:t.options.meta};return T(ne),ne})(),$=await V(x),{maxPages:J}=t.options,W=Q?sg:og;return{pages:W(R.pages,$,J),pageParams:W(R.pageParams,w,J)}};if(o&&s.length){const R=o==="backward",w=R?Fh:Rc,Q={pages:s,pageParams:i},U=w(n,Q);u=await v(Q,U,R)}else{const R=e??s.length;do{const w=d===0?i[0]??n.initialPageParam:Rc(n,u);if(d>0&&w==null)break;u=await v(u,w),d++}while(d<R)}return u};t.options.persister?t.fetchFn=()=>{var g,T;return(T=(g=t.options).persister)==null?void 0:T.call(g,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function Rc(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Fh(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function yx(e,t){return t?Rc(e,t)!=null:!1}function vx(e,t){return!t||!e.getPreviousPageParam?!1:Fh(e,t)!=null}var eo,Sn,to,nr,xn,bt,Wo,Cn,Yt,Lh,Dr,bh,fg=(bh=class extends Bh{constructor(t){super();Oe(this,Yt);Oe(this,eo);Oe(this,Sn);Oe(this,to);Oe(this,nr);Oe(this,xn);Oe(this,bt);Oe(this,Wo);Oe(this,Cn);be(this,Cn,!1),be(this,Wo,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,xn,t.client),be(this,nr,z(this,xn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,Sn,lu(this.options)),this.state=t.state??z(this,Sn),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,eo)}get promise(){var t;return(t=z(this,bt))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,Wo),...t},t!=null&&t._type&&be(this,eo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=lu(this.options);r.data!==void 0&&(this.setState(cu(r.data,r.dataUpdatedAt)),be(this,Sn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,nr).remove(this)}setData(t,r){const n=Tc(this.state.data,t,this.options);return Me(this,Yt,Dr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){Me(this,Yt,Dr).call(this,{type:"setState",state:t})}cancel(t){var n,o;const r=(n=z(this,bt))==null?void 0:n.promise;return(o=z(this,bt))==null||o.cancel(t),r?r.then(Gt).catch(Gt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,Sn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sl||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ln(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Rh(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,bt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,bt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,nr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,bt)&&(z(this,Cn)||Me(this,Yt,Lh).call(this)?z(this,bt).cancel({revert:!0}):z(this,bt).cancelRetry()),this.scheduleGc()),z(this,nr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,Yt,Dr).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,p,b,E,A,g,T,V,v,R;if(this.state.fetchStatus!=="idle"&&((h=z(this,bt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,bt))return z(this,bt).continueRetry(),z(this,bt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(Q=>Q.options.queryFn);w&&this.setOptions(w.options)}const n=new AbortController,o=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(be(this,Cn,!0),n.signal)})},s=()=>{const w=Nh(this.options,r),U=(()=>{const x={client:z(this,xn),queryKey:this.queryKey,meta:this.meta};return o(x),x})();return be(this,Cn,!1),this.options.persister?this.options.persister(w,U,this):w(U)},u=(()=>{const w={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,xn),state:this.state,fetchFn:s};return o(w),w})(),d=z(this,eo)==="infinite"?dg(this.options.pages):this.options.behavior;d==null||d.onFetch(u,this),be(this,to,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&Me(this,Yt,Dr).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),be(this,bt,jh({initialPromise:r==null?void 0:r.initialPromise,fn:u.fetchFn,onCancel:w=>{w instanceof Ic&&w.revert&&this.setState({...z(this,to),fetchStatus:"idle"}),n.abort()},onFail:(w,Q)=>{Me(this,Yt,Dr).call(this,{type:"failed",failureCount:w,error:Q})},onPause:()=>{Me(this,Yt,Dr).call(this,{type:"pause"})},onContinue:()=>{Me(this,Yt,Dr).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const w=await z(this,bt).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(E=(b=z(this,nr).config).onSuccess)==null||E.call(b,w,this),(g=(A=z(this,nr).config).onSettled)==null||g.call(A,w,this.state.error,this),w}catch(w){if(w instanceof Ic){if(w.silent)return z(this,bt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Me(this,Yt,Dr).call(this,{type:"error",error:w}),(V=(T=z(this,nr).config).onError)==null||V.call(T,w,this),(R=(v=z(this,nr).config).onSettled)==null||R.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},eo=new WeakMap,Sn=new WeakMap,to=new WeakMap,nr=new WeakMap,xn=new WeakMap,bt=new WeakMap,Wo=new WeakMap,Cn=new WeakMap,Yt=new WeakSet,Lh=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Dr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Mh(n.data,this.options),fetchMeta:t.meta??null};case"success":const o={...n,...cu(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return be(this,to,t.manual?o:void 0),o;case"error":const s=t.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,nr).notify({query:this,type:"updated",action:t})})},bh);function Mh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oh(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cu(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Vt,De,Ko,Ft,Tn,ro,qr,nn,Yo,no,oo,An,In,on,so,We,No,Pc,Nc,kc,Oc,jc,Bc,Fc,$h,wh,hg=(wh=class extends Jo{constructor(t,r){super();Oe(this,We);Oe(this,Vt);Oe(this,De);Oe(this,Ko);Oe(this,Ft);Oe(this,Tn);Oe(this,ro);Oe(this,qr);Oe(this,nn);Oe(this,Yo);Oe(this,no);Oe(this,oo);Oe(this,An);Oe(this,In);Oe(this,on);Oe(this,so,new Set);this.options=r,be(this,Vt,t),be(this,nn,null),be(this,qr,Ac()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,De).addObserver(this),uu(z(this,De),this.options)?Me(this,We,No).call(this):this.updateResult(),Me(this,We,Oc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lc(z(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lc(z(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,We,jc).call(this),Me(this,We,Bc).call(this),z(this,De).removeObserver(this)}setOptions(t){const r=this.options,n=z(this,De);if(this.options=z(this,Vt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,z(this,De))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,We,Fc).call(this),z(this,De).setOptions(this.options),r._defaulted&&!xc(this.options,r)&&z(this,Vt).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,De),observer:this});const o=this.hasListeners();o&&du(z(this,De),n,this.options,r)&&Me(this,We,No).call(this),this.updateResult(),o&&(z(this,De)!==n||Qt(this.options.enabled,z(this,De))!==Qt(r.enabled,z(this,De))||ln(this.options.staleTime,z(this,De))!==ln(r.staleTime,z(this,De)))&&Me(this,We,Pc).call(this);const s=Me(this,We,Nc).call(this);o&&(z(this,De)!==n||Qt(this.options.enabled,z(this,De))!==Qt(r.enabled,z(this,De))||s!==z(this,on))&&Me(this,We,kc).call(this,s)}getOptimisticResult(t){const r=z(this,Vt).getQueryCache().build(z(this,Vt),t),n=this.createResult(r,t);return mg(this,n)&&(be(this,Ft,n),be(this,ro,this.options),be(this,Tn,z(this,De).state)),n}getCurrentResult(){return z(this,Ft)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,qr).status==="pending"&&z(this,qr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,o))})}trackProp(t){z(this,so).add(t)}getCurrentQuery(){return z(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,Vt).defaultQueryOptions(t),n=z(this,Vt).getQueryCache().build(z(this,Vt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Me(this,We,No).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,Ft)))}createResult(t,r){var J;const n=z(this,De),o=this.options,s=z(this,Ft),i=z(this,Tn),u=z(this,ro),h=t!==n?t.state:z(this,Ko),{state:m}=t;let p={...m},b=!1,E;if(r._optimisticResults){const W=this.hasListeners(),ne=!W&&uu(t,r),X=W&&du(t,n,r,o);(ne||X)&&(p={...p,...Mh(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:A,errorUpdatedAt:g,status:T}=p;E=p.data;let V=!1;if(r.placeholderData!==void 0&&E===void 0&&T==="pending"){let W;s!=null&&s.isPlaceholderData&&r.placeholderData===(u==null?void 0:u.placeholderData)?(W=s.data,V=!0):W=typeof r.placeholderData=="function"?r.placeholderData((J=z(this,oo))==null?void 0:J.state.data,z(this,oo)):r.placeholderData,W!==void 0&&(T="success",E=Tc(s==null?void 0:s.data,W,r),b=!0)}if(r.select&&E!==void 0&&!V)if(s&&E===(i==null?void 0:i.data)&&r.select===z(this,Yo))E=z(this,no);else try{be(this,Yo,r.select),E=r.select(E),E=Tc(s==null?void 0:s.data,E,r),be(this,no,E),be(this,nn,null)}catch(W){be(this,nn,W)}z(this,nn)&&(A=z(this,nn),E=z(this,no),g=Date.now(),T="error");const v=p.fetchStatus==="fetching",R=T==="pending",w=T==="error",Q=R&&v,U=E!==void 0,$={status:T,fetchStatus:p.fetchStatus,isPending:R,isSuccess:T==="success",isError:w,isInitialLoading:Q,isLoading:Q,data:E,dataUpdatedAt:p.dataUpdatedAt,error:A,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:v,isRefetching:v&&!R,isLoadingError:w&&!U,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:w&&U,isStale:al(t,r),refetch:this.refetch,promise:z(this,qr),isEnabled:Qt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const W=$.data!==void 0,ne=$.status==="error"&&!W,X=Y=>{ne?Y.reject($.error):W&&Y.resolve($.data)},F=()=>{const Y=be(this,qr,$.promise=Ac());X(Y)},N=z(this,qr);switch(N.status){case"pending":t.queryHash===n.queryHash&&X(N);break;case"fulfilled":(ne||$.data!==N.value)&&F();break;case"rejected":(!ne||$.error!==N.reason)&&F();break}}return $}updateResult(){const t=z(this,Ft),r=this.createResult(z(this,De),this.options);if(be(this,Tn,z(this,De).state),be(this,ro,this.options),z(this,Tn).data!==void 0&&be(this,oo,z(this,De)),xc(r,t))return;be(this,Ft,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!z(this,so).size)return!0;const i=new Set(s??z(this,so));return this.options.throwOnError&&i.add("error"),Object.keys(z(this,Ft)).some(u=>{const d=u;return z(this,Ft)[d]!==t[d]&&i.has(d)})};Me(this,We,$h).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,We,Oc).call(this)}},Vt=new WeakMap,De=new WeakMap,Ko=new WeakMap,Ft=new WeakMap,Tn=new WeakMap,ro=new WeakMap,qr=new WeakMap,nn=new WeakMap,Yo=new WeakMap,no=new WeakMap,oo=new WeakMap,An=new WeakMap,In=new WeakMap,on=new WeakMap,so=new WeakMap,We=new WeakSet,No=function(t){Me(this,We,Fc).call(this);let r=z(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Gt)),r},Pc=function(){Me(this,We,jc).call(this);const t=ln(this.options.staleTime,z(this,De));if($o.isServer()||z(this,Ft).isStale||!Sc(t))return;const n=Rh(z(this,Ft).dataUpdatedAt,t)+1;be(this,An,wn.setTimeout(()=>{z(this,Ft).isStale||this.updateResult()},n))},Nc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,De)):this.options.refetchInterval)??!1},kc=function(t){Me(this,We,Bc).call(this),be(this,on,t),!($o.isServer()||Qt(this.options.enabled,z(this,De))===!1||!Sc(z(this,on))||z(this,on)===0)&&be(this,In,wn.setInterval(()=>{(this.options.refetchIntervalInBackground||nl.isFocused())&&Me(this,We,No).call(this)},z(this,on)))},Oc=function(){Me(this,We,Pc).call(this),Me(this,We,kc).call(this,Me(this,We,Nc).call(this))},jc=function(){z(this,An)!==void 0&&(wn.clearTimeout(z(this,An)),be(this,An,void 0))},Bc=function(){z(this,In)!==void 0&&(wn.clearInterval(z(this,In)),be(this,In,void 0))},Fc=function(){const t=z(this,Vt).getQueryCache().build(z(this,Vt),this.options);if(t===z(this,De))return;const r=z(this,De);be(this,De,t),be(this,Ko,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},$h=function(t){Tt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,Ft))}),z(this,Vt).getQueryCache().notify({query:z(this,De),type:"observerResultsUpdated"})})},wh);function pg(e,t){return Qt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Qt(t.retryOnMount,e)===!1)}function uu(e,t){return pg(e,t)||e.state.data!==void 0&&Lc(e,t,t.refetchOnMount)}function Lc(e,t,r){if(Qt(t.enabled,e)!==!1&&ln(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&al(e,t)}return!1}function du(e,t,r,n){return(e!==t||Qt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&al(e,r)}function al(e,t){return Qt(t.enabled,e)!==!1&&e.isStaleByTime(ln(t.staleTime,e))}function mg(e,t){return!xc(e.getCurrentResult(),t)}var Qo,Er,Ot,Rn,Sr,Jr,_h,gg=(_h=class extends Bh{constructor(t){super();Oe(this,Sr);Oe(this,Qo);Oe(this,Er);Oe(this,Ot);Oe(this,Rn);be(this,Qo,t.client),this.mutationId=t.mutationId,be(this,Ot,t.mutationCache),be(this,Er,[]),this.state=t.state||yg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Er).includes(t)||(z(this,Er).push(t),this.clearGcTimeout(),z(this,Ot).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,Er,z(this,Er).filter(r=>r!==t)),this.scheduleGc(),z(this,Ot).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Er).length||(this.state.status==="pending"?this.scheduleGc():z(this,Ot).remove(this))}continue(){var t;return((t=z(this,Rn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,u,d,h,m,p,b,E,A,g,T,V,v,R,w,Q,U,x;const r=()=>{Me(this,Sr,Jr).call(this,{type:"continue"})},n={client:z(this,Qo),meta:this.options.meta,mutationKey:this.options.mutationKey};be(this,Rn,jh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:($,J)=>{Me(this,Sr,Jr).call(this,{type:"failed",failureCount:$,error:J})},onPause:()=>{Me(this,Sr,Jr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,Ot).canRun(this)}));const o=this.state.status==="pending",s=!z(this,Rn).canStart();try{if(o)r();else{Me(this,Sr,Jr).call(this,{type:"pending",variables:t,isPaused:s}),z(this,Ot).config.onMutate&&await z(this,Ot).config.onMutate(t,this,n);const J=await((u=(i=this.options).onMutate)==null?void 0:u.call(i,t,n));J!==this.state.context&&Me(this,Sr,Jr).call(this,{type:"pending",context:J,variables:t,isPaused:s})}const $=await z(this,Rn).start();return await((h=(d=z(this,Ot).config).onSuccess)==null?void 0:h.call(d,$,t,this.state.context,this,n)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,$,t,this.state.context,n)),await((E=(b=z(this,Ot).config).onSettled)==null?void 0:E.call(b,$,null,this.state.variables,this.state.context,this,n)),await((g=(A=this.options).onSettled)==null?void 0:g.call(A,$,null,t,this.state.context,n)),Me(this,Sr,Jr).call(this,{type:"success",data:$}),$}catch($){try{await((V=(T=z(this,Ot).config).onError)==null?void 0:V.call(T,$,t,this.state.context,this,n))}catch(J){Promise.reject(J)}try{await((R=(v=this.options).onError)==null?void 0:R.call(v,$,t,this.state.context,n))}catch(J){Promise.reject(J)}try{await((Q=(w=z(this,Ot).config).onSettled)==null?void 0:Q.call(w,void 0,$,this.state.variables,this.state.context,this,n))}catch(J){Promise.reject(J)}try{await((x=(U=this.options).onSettled)==null?void 0:x.call(U,void 0,$,t,this.state.context,n))}catch(J){Promise.reject(J)}throw Me(this,Sr,Jr).call(this,{type:"error",error:$}),$}finally{z(this,Ot).runNext(this)}}},Qo=new WeakMap,Er=new WeakMap,Ot=new WeakMap,Rn=new WeakMap,Sr=new WeakSet,Jr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Tt.batch(()=>{z(this,Er).forEach(n=>{n.onMutationUpdate(t)}),z(this,Ot).notify({mutation:this,type:"updated",action:t})})},_h);function yg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ur,lr,Zo,Eh,vg=(Eh=class extends Jo{constructor(t={}){super();Oe(this,Ur);Oe(this,lr);Oe(this,Zo);this.config=t,be(this,Ur,new Set),be(this,lr,new Map),be(this,Zo,0)}build(t,r,n){const o=new gg({client:t,mutationCache:this,mutationId:++Ks(this,Zo)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){z(this,Ur).add(t);const r=Ys(t);if(typeof r=="string"){const n=z(this,lr).get(r);n?n.push(t):z(this,lr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Ur).delete(t)){const r=Ys(t);if(typeof r=="string"){const n=z(this,lr).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&z(this,lr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Ys(t);if(typeof r=="string"){const n=z(this,lr).get(r),o=n==null?void 0:n.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=Ys(t);if(typeof r=="string"){const o=(n=z(this,lr).get(r))==null?void 0:n.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Tt.batch(()=>{z(this,Ur).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Ur).clear(),z(this,lr).clear()})}getAll(){return Array.from(z(this,Ur))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>su(r,n))}findAll(t={}){return this.getAll().filter(r=>su(t,r))}notify(t){Tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Tt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Gt))))}},Ur=new WeakMap,lr=new WeakMap,Zo=new WeakMap,Eh);function Ys(e){var t;return(t=e.options.scope)==null?void 0:t.id}var xr,Sh,bg=(Sh=class extends Jo{constructor(t={}){super();Oe(this,xr);this.config=t,be(this,xr,new Map)}build(t,r,n){const o=r.queryKey,s=r.queryHash??ol(o,r);let i=this.get(s);return i||(i=new fg({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){z(this,xr).has(t.queryHash)||(z(this,xr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,xr).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,xr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,xr).get(t)}getAll(){return[...z(this,xr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ou(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>ou(t,n)):r}notify(t){Tt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xr=new WeakMap,Sh),ut,sn,an,ao,io,cn,co,lo,xh,wg=(xh=class{constructor(e={}){Oe(this,ut);Oe(this,sn);Oe(this,an);Oe(this,ao);Oe(this,io);Oe(this,cn);Oe(this,co);Oe(this,lo);be(this,ut,e.queryCache||new bg),be(this,sn,e.mutationCache||new vg),be(this,an,e.defaultOptions||{}),be(this,ao,new Map),be(this,io,new Map),be(this,cn,0)}mount(){Ks(this,cn)._++,z(this,cn)===1&&(be(this,co,nl.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,ut).onFocus())})),be(this,lo,ga.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,ut).onOnline())})))}unmount(){var e,t;Ks(this,cn)._--,z(this,cn)===0&&((e=z(this,co))==null||e.call(this),be(this,co,void 0),(t=z(this,lo))==null||t.call(this),be(this,lo,void 0))}isFetching(e){return z(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,sn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,ut).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,ut).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ln(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,ut).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=z(this,ut).get(n.queryHash),s=o==null?void 0:o.state.data,i=tg(t,s);if(i!==void 0)return z(this,ut).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Tt.batch(()=>z(this,ut).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,ut).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,ut);Tt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,ut);return Tt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Tt.batch(()=>z(this,ut).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Gt).catch(Gt)}invalidateQueries(e,t={}){return Tt.batch(()=>(z(this,ut).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Tt.batch(()=>z(this,ut).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,r);return r.throwOnError||(s=s.catch(Gt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(Gt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,ut).build(this,t);return r.isStaleByTime(ln(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gt).catch(Gt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gt).catch(Gt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ga.isOnline()?z(this,sn).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,ut)}getMutationCache(){return z(this,sn)}getDefaultOptions(){return z(this,an)}setDefaultOptions(e){be(this,an,e)}setQueryDefaults(e,t){z(this,ao).set(Lo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,ao).values()],r={};return t.forEach(n=>{Mo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,io).set(Lo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,io).values()],r={};return t.forEach(n=>{Mo(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,an).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ol(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===sl&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,an).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,ut).clear(),z(this,sn).clear()}},ut=new WeakMap,sn=new WeakMap,an=new WeakMap,ao=new WeakMap,io=new WeakMap,cn=new WeakMap,co=new WeakMap,lo=new WeakMap,xh),Dh=oe.createContext(void 0),_g=e=>{const t=oe.useContext(Dh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Eg=({client:e,children:t})=>(oe.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(Dh.Provider,{value:e,children:t})),qh=oe.createContext(!1),Sg=()=>oe.useContext(qh);qh.Provider;function xg(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cg=oe.createContext(xg()),Tg=()=>oe.useContext(Cg),Ag=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?kh(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Ig=e=>{oe.useEffect(()=>{e.clearReset()},[e])},Rg=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||kh(r,[e.error,n])),Pg=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ng=(e,t)=>e.isLoading&&e.isFetching&&!t,kg=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Og(e,t,r){var E,A,g,T;const n=Sg(),o=Tg(),s=_g(),i=s.defaultQueryOptions(e);(A=(E=s.getDefaultOptions().queries)==null?void 0:E._experimental_beforeQuery)==null||A.call(E,i);const u=s.getQueryCache().get(i.queryHash),d=e.subscribed!==!1;i._optimisticResults=n?"isRestoring":d?"optimistic":void 0,Pg(i),Ag(i,o,u),Ig(o);const h=!s.getQueryCache().get(i.queryHash),[m]=oe.useState(()=>new t(s,i)),p=m.getOptimisticResult(i),b=!n&&d;if(oe.useSyncExternalStore(oe.useCallback(V=>{const v=b?m.subscribe(Tt.batchCalls(V)):Gt;return m.updateResult(),v},[m,b]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),oe.useEffect(()=>{m.setOptions(i)},[i,m]),kg(i,p))throw fu(i,m,o);if(Rg({result:p,errorResetBoundary:o,throwOnError:i.throwOnError,query:u,suspense:i.suspense}))throw p.error;if((T=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||T.call(g,i,p),i.experimental_prefetchInRender&&!$o.isServer()&&Ng(p,n)){const V=h?fu(i,m,o):u==null?void 0:u.promise;V==null||V.catch(Gt).finally(()=>{m.updateResult()})}return i.notifyOnChangeProps?p:m.trackResult(p)}function Hr(e,t){return Og(e,hg)}const jg="modulepreload",Bg=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/"+e},hu={},wt=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let i=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));o=i(r.map(h=>{if(h=Bg(h),h in hu)return;hu[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":jg,m||(b.as="script"),b.crossOrigin="",b.href=h,d&&b.setAttribute("nonce",d),document.head.appendChild(b),m)return new Promise((E,A)=>{b.addEventListener("load",E),b.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(i){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=i,window.dispatchEvent(u),!u.defaultPrevented)throw i}return o.then(i=>{for(const u of i||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})},Fg=oe.lazy(()=>wt(()=>import("./index-RUxrTr_p.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.Navbar})));function Lg(e){return f.jsx(oe.Suspense,{fallback:f.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:f.jsx(Fg,{...e})})}const Mg={},pu=e=>{let t;const r=new Set,n=(m,p)=>{const b=typeof m=="function"?m(t):m;if(!Object.is(b,t)){const E=t;t=p??(typeof b!="object"||b===null)?b:Object.assign({},t,b),r.forEach(A=>A(t,E))}},o=()=>t,d={setState:n,getState:o,getInitialState:()=>h,subscribe:m=>(r.add(m),()=>r.delete(m)),destroy:()=>{(Mg?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},h=t=e(n,o,d);return d},$g=e=>e?pu(e):pu;var ri={exports:{}},ni={},oi={exports:{}},si={};/**
3
- * @license React
4
- * use-sync-external-store-shim.production.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var mu;function Dg(){if(mu)return si;mu=1;var e=Ch();function t(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function u(p,b){var E=b(),A=n({inst:{value:E,getSnapshot:b}}),g=A[0].inst,T=A[1];return s(function(){g.value=E,g.getSnapshot=b,d(g)&&T({inst:g})},[p,E,b]),o(function(){return d(g)&&T({inst:g}),p(function(){d(g)&&T({inst:g})})},[p]),i(E),E}function d(p){var b=p.getSnapshot;p=p.value;try{var E=b();return!r(p,E)}catch{return!0}}function h(p,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return si.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,si}var gu;function qg(){return gu||(gu=1,oi.exports=Dg()),oi.exports}/**
11
- * @license React
12
- * use-sync-external-store-shim/with-selector.production.js
13
- *
14
- * Copyright (c) Meta Platforms, Inc. and affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var yu;function Ug(){if(yu)return ni;yu=1;var e=Ch(),t=qg();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,u=e.useMemo,d=e.useDebugValue;return ni.useSyncExternalStoreWithSelector=function(h,m,p,b,E){var A=s(null);if(A.current===null){var g={hasValue:!1,value:null};A.current=g}else g=A.current;A=u(function(){function V(U){if(!v){if(v=!0,R=U,U=b(U),E!==void 0&&g.hasValue){var x=g.value;if(E(x,U))return w=x}return w=U}if(x=w,n(R,U))return x;var $=b(U);return E!==void 0&&E(x,$)?(R=U,x):(R=U,w=$)}var v=!1,R,w,Q=p===void 0?null:p;return[function(){return V(m())},Q===null?void 0:function(){return V(Q())}]},[m,p,b,E]);var T=o(h,A[0],A[1]);return i(function(){g.hasValue=!0,g.value=T},[T]),d(T),T},ni}var vu;function Hg(){return vu||(vu=1,ri.exports=Ug()),ri.exports}var Vg=Hg();const Gg=_a(Vg),Uh={},{useDebugValue:zg}=Th,{useSyncExternalStoreWithSelector:Wg}=Gg;let bu=!1;const Kg=e=>e;function Yg(e,t=Kg,r){(Uh?"production":void 0)!=="production"&&r&&!bu&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),bu=!0);const n=Wg(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return zg(n),n}const wu=e=>{(Uh?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?$g(e):e,r=(n,o)=>Yg(t,n,o);return Object.assign(r,t),r},Nn=e=>e?wu(e):wu;var hn={},ir={},ko={exports:{}},Qg=ko.exports,_u;function Ea(){return _u||(_u=1,(function(e,t){(function(r,n){n(t)})(Qg,(function(r){function n(a){if(a.jsonrpc="2.0",!a.id||typeof a.id!="number"||Math.floor(a.id)!==a.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(a)}`);if(!a.method||typeof a.method!="string"||a.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(a)}`);if(!a.params||typeof a.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(a)}`);return a}var o={};function s(){let a,l;const y=new Promise(((I,j)=>{a=H=>{I(H),y.isPending=!1},l=H=>{j(H),y.isPending=!1}})).catch((I=>Promise.reject(I)));return y.resolve=a,y.reject=l,"finally"in y||(y.finally=I=>{y.then(I),y.catch(I)}),y.isPending=!0,y}Object.defineProperty(o,"__esModule",{value:!0});var i=o.future=s;o.default=s;var u={exports:{}};/**
19
- * [js-sha3]{@link https://github.com/emn178/js-sha3}
20
- *
21
- * @version 0.8.0
22
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
23
- * @copyright Chen, Yi-Cyuan 2015-2018
24
- * @license MIT
25
- */(function(a){(function(){var l="input is invalid type",y=typeof window=="object",I=y?window:{};I.JS_SHA3_NO_WINDOW&&(y=!1);var j=!y&&typeof self=="object";!I.JS_SHA3_NO_NODE_JS&&typeof ua=="object"&&ua.versions&&ua.versions.node?I=_c:j&&(I=self);var H=!I.JS_SHA3_NO_COMMON_JS&&a.exports,se=!I.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",pe="0123456789abcdef".split(""),Ie=[4,1024,262144,67108864],Ne=[0,8,16,24],jt=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],at=[224,256,384,512],ge=[128,256],_t=["hex","buffer","arrayBuffer","array","digest"],Je={128:168,256:136};!I.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),!se||!I.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(c){return typeof c=="object"&&c.buffer&&c.buffer.constructor===ArrayBuffer});for(var Xe=function(c,_,k){return function(C){return new Ue(c,_,c).update(C)[k]()}},It=function(c,_,k){return function(C,B){return new Ue(c,_,B).update(C)[k]()}},kr=function(c,_,k){return function(C,B,L,M){return Et["cshake"+c].update(C,B,L,M)[k]()}},mr=function(c,_,k){return function(C,B,L,M){return Et["kmac"+c].update(C,B,L,M)[k]()}},Rt=function(c,_,k,C){for(var B=0;B<_t.length;++B){var L=_t[B];c[L]=_(k,C,L)}return c},gr=function(c,_){var k=Xe(c,_,"hex");return k.create=function(){return new Ue(c,_,c)},k.update=function(C){return k.create().update(C)},Rt(k,Xe,c,_)},Wr=[{name:"keccak",padding:[1,256,65536,16777216],bits:at,createMethod:gr},{name:"sha3",padding:[6,1536,393216,100663296],bits:at,createMethod:gr},{name:"shake",padding:[31,7936,2031616,520093696],bits:ge,createMethod:function(c,_){var k=It(c,_,"hex");return k.create=function(C){return new Ue(c,_,C)},k.update=function(C,B){return k.create(B).update(C)},Rt(k,It,c,_)}},{name:"cshake",padding:Ie,bits:ge,createMethod:function(c,_){var k=Je[c],C=kr(c,0,"hex");return C.create=function(B,L,M){return L||M?new Ue(c,_,B).bytepad([L,M],k):Et["shake"+c].create(B)},C.update=function(B,L,M,ee){return C.create(L,M,ee).update(B)},Rt(C,kr,c,_)}},{name:"kmac",padding:Ie,bits:ge,createMethod:function(c,_){var k=Je[c],C=mr(c,0,"hex");return C.create=function(B,L,M){return new Kt(c,_,L).bytepad(["KMAC",M],k).bytepad([B],k)},C.update=function(B,L,M,ee){return C.create(B,M,ee).update(L)},Rt(C,mr,c,_)}}],Et={},Or=[],Pt=0;Pt<Wr.length;++Pt)for(var yr=Wr[Pt],ue=yr.bits,jr=0;jr<ue.length;++jr){var Ln=yr.name+"_"+ue[jr];if(Or.push(Ln),Et[Ln]=yr.createMethod(ue[jr],yr.padding),yr.name!=="sha3"){var Mn=yr.name+ue[jr];Or.push(Mn),Et[Mn]=Et[Ln]}}function Ue(c,_,k){this.blocks=[],this.s=[],this.padding=_,this.outputBits=k,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(c<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=k>>5,this.extraBytes=(31&k)>>3;for(var C=0;C<50;++C)this.s[C]=0}function Kt(c,_,k){Ue.call(this,c,_,k)}Ue.prototype.update=function(c){if(this.finalized)throw new Error("finalize already called");var _,k=typeof c;if(k!=="string"){if(k!=="object")throw new Error(l);if(c===null)throw new Error(l);if(se&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!(Array.isArray(c)||se&&ArrayBuffer.isView(c)))throw new Error(l);_=!0}for(var C,B,L=this.blocks,M=this.byteCount,ee=c.length,re=this.blockCount,te=0,me=this.s;te<ee;){if(this.reset)for(this.reset=!1,L[0]=this.block,C=1;C<re+1;++C)L[C]=0;if(_)for(C=this.start;te<ee&&C<M;++te)L[C>>2]|=c[te]<<Ne[3&C++];else for(C=this.start;te<ee&&C<M;++te)(B=c.charCodeAt(te))<128?L[C>>2]|=B<<Ne[3&C++]:B<2048?(L[C>>2]|=(192|B>>6)<<Ne[3&C++],L[C>>2]|=(128|63&B)<<Ne[3&C++]):B<55296||B>=57344?(L[C>>2]|=(224|B>>12)<<Ne[3&C++],L[C>>2]|=(128|B>>6&63)<<Ne[3&C++],L[C>>2]|=(128|63&B)<<Ne[3&C++]):(B=65536+((1023&B)<<10|1023&c.charCodeAt(++te)),L[C>>2]|=(240|B>>18)<<Ne[3&C++],L[C>>2]|=(128|B>>12&63)<<Ne[3&C++],L[C>>2]|=(128|B>>6&63)<<Ne[3&C++],L[C>>2]|=(128|63&B)<<Ne[3&C++]);if(this.lastByteIndex=C,C>=M){for(this.start=C-M,this.block=L[re],C=0;C<re;++C)me[C]^=L[C];S(me),this.reset=!0}else this.start=C}return this},Ue.prototype.encode=function(c,_){var k=255&c,C=1,B=[k];for(k=255&(c>>=8);k>0;)B.unshift(k),k=255&(c>>=8),++C;return _?B.push(C):B.unshift(C),this.update(B),B.length},Ue.prototype.encodeString=function(c){var _,k=typeof c;if(k!=="string"){if(k!=="object")throw new Error(l);if(c===null)throw new Error(l);if(se&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!(Array.isArray(c)||se&&ArrayBuffer.isView(c)))throw new Error(l);_=!0}var C=0,B=c.length;if(_)C=B;else for(var L=0;L<c.length;++L){var M=c.charCodeAt(L);M<128?C+=1:M<2048?C+=2:M<55296||M>=57344?C+=3:(M=65536+((1023&M)<<10|1023&c.charCodeAt(++L)),C+=4)}return C+=this.encode(8*C),this.update(c),C},Ue.prototype.bytepad=function(c,_){for(var k=this.encode(_),C=0;C<c.length;++C)k+=this.encodeString(c[C]);var B=_-k%_,L=[];return L.length=B,this.update(L),this},Ue.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var c=this.blocks,_=this.lastByteIndex,k=this.blockCount,C=this.s;if(c[_>>2]|=this.padding[3&_],this.lastByteIndex===this.byteCount)for(c[0]=c[k],_=1;_<k+1;++_)c[_]=0;for(c[k-1]|=2147483648,_=0;_<k;++_)C[_]^=c[_];S(C)}},Ue.prototype.toString=Ue.prototype.hex=function(){this.finalize();for(var c,_=this.blockCount,k=this.s,C=this.outputBlocks,B=this.extraBytes,L=0,M=0,ee="";M<C;){for(L=0;L<_&&M<C;++L,++M)c=k[L],ee+=pe[c>>4&15]+pe[15&c]+pe[c>>12&15]+pe[c>>8&15]+pe[c>>20&15]+pe[c>>16&15]+pe[c>>28&15]+pe[c>>24&15];M%_==0&&(S(k),L=0)}return B&&(c=k[L],ee+=pe[c>>4&15]+pe[15&c],B>1&&(ee+=pe[c>>12&15]+pe[c>>8&15]),B>2&&(ee+=pe[c>>20&15]+pe[c>>16&15])),ee},Ue.prototype.arrayBuffer=function(){this.finalize();var c,_=this.blockCount,k=this.s,C=this.outputBlocks,B=this.extraBytes,L=0,M=0,ee=this.outputBits>>3;c=B?new ArrayBuffer(C+1<<2):new ArrayBuffer(ee);for(var re=new Uint32Array(c);M<C;){for(L=0;L<_&&M<C;++L,++M)re[M]=k[L];M%_==0&&S(k)}return B&&(re[L]=k[L],c=c.slice(0,ee)),c},Ue.prototype.buffer=Ue.prototype.arrayBuffer,Ue.prototype.digest=Ue.prototype.array=function(){this.finalize();for(var c,_,k=this.blockCount,C=this.s,B=this.outputBlocks,L=this.extraBytes,M=0,ee=0,re=[];ee<B;){for(M=0;M<k&&ee<B;++M,++ee)c=ee<<2,_=C[M],re[c]=255&_,re[c+1]=_>>8&255,re[c+2]=_>>16&255,re[c+3]=_>>24&255;ee%k==0&&S(C)}return L&&(c=ee<<2,_=C[M],re[c]=255&_,L>1&&(re[c+1]=_>>8&255),L>2&&(re[c+2]=_>>16&255)),re},Kt.prototype=new Ue,Kt.prototype.finalize=function(){return this.encode(this.outputBits,!0),Ue.prototype.finalize.call(this)};var S=function(c){var _,k,C,B,L,M,ee,re,te,me,Re,je,$e,et,nt,Le,He,ft,Br,Kr,Yr,Bt,vr,St,pt,Ze,ds,fs,hs,ps,ms,gs,ys,vs,bs,ws,_s,Es,Ss,xs,Cs,Ts,As,Is,Rs,Ps,Ns,ks,Os,js,Bs,Fs,Ls,Ms,$s,Ds,qs,Us,Hs,Vs,Gs,zs,Ws;for(C=0;C<48;C+=2)B=c[0]^c[10]^c[20]^c[30]^c[40],L=c[1]^c[11]^c[21]^c[31]^c[41],M=c[2]^c[12]^c[22]^c[32]^c[42],ee=c[3]^c[13]^c[23]^c[33]^c[43],re=c[4]^c[14]^c[24]^c[34]^c[44],te=c[5]^c[15]^c[25]^c[35]^c[45],me=c[6]^c[16]^c[26]^c[36]^c[46],Re=c[7]^c[17]^c[27]^c[37]^c[47],_=(je=c[8]^c[18]^c[28]^c[38]^c[48])^(M<<1|ee>>>31),k=($e=c[9]^c[19]^c[29]^c[39]^c[49])^(ee<<1|M>>>31),c[0]^=_,c[1]^=k,c[10]^=_,c[11]^=k,c[20]^=_,c[21]^=k,c[30]^=_,c[31]^=k,c[40]^=_,c[41]^=k,_=B^(re<<1|te>>>31),k=L^(te<<1|re>>>31),c[2]^=_,c[3]^=k,c[12]^=_,c[13]^=k,c[22]^=_,c[23]^=k,c[32]^=_,c[33]^=k,c[42]^=_,c[43]^=k,_=M^(me<<1|Re>>>31),k=ee^(Re<<1|me>>>31),c[4]^=_,c[5]^=k,c[14]^=_,c[15]^=k,c[24]^=_,c[25]^=k,c[34]^=_,c[35]^=k,c[44]^=_,c[45]^=k,_=re^(je<<1|$e>>>31),k=te^($e<<1|je>>>31),c[6]^=_,c[7]^=k,c[16]^=_,c[17]^=k,c[26]^=_,c[27]^=k,c[36]^=_,c[37]^=k,c[46]^=_,c[47]^=k,_=me^(B<<1|L>>>31),k=Re^(L<<1|B>>>31),c[8]^=_,c[9]^=k,c[18]^=_,c[19]^=k,c[28]^=_,c[29]^=k,c[38]^=_,c[39]^=k,c[48]^=_,c[49]^=k,et=c[0],nt=c[1],Ps=c[11]<<4|c[10]>>>28,Ns=c[10]<<4|c[11]>>>28,fs=c[20]<<3|c[21]>>>29,hs=c[21]<<3|c[20]>>>29,Vs=c[31]<<9|c[30]>>>23,Gs=c[30]<<9|c[31]>>>23,Ts=c[40]<<18|c[41]>>>14,As=c[41]<<18|c[40]>>>14,vs=c[2]<<1|c[3]>>>31,bs=c[3]<<1|c[2]>>>31,Le=c[13]<<12|c[12]>>>20,He=c[12]<<12|c[13]>>>20,ks=c[22]<<10|c[23]>>>22,Os=c[23]<<10|c[22]>>>22,ps=c[33]<<13|c[32]>>>19,ms=c[32]<<13|c[33]>>>19,zs=c[42]<<2|c[43]>>>30,Ws=c[43]<<2|c[42]>>>30,Ms=c[5]<<30|c[4]>>>2,$s=c[4]<<30|c[5]>>>2,ws=c[14]<<6|c[15]>>>26,_s=c[15]<<6|c[14]>>>26,ft=c[25]<<11|c[24]>>>21,Br=c[24]<<11|c[25]>>>21,js=c[34]<<15|c[35]>>>17,Bs=c[35]<<15|c[34]>>>17,gs=c[45]<<29|c[44]>>>3,ys=c[44]<<29|c[45]>>>3,St=c[6]<<28|c[7]>>>4,pt=c[7]<<28|c[6]>>>4,Ds=c[17]<<23|c[16]>>>9,qs=c[16]<<23|c[17]>>>9,Es=c[26]<<25|c[27]>>>7,Ss=c[27]<<25|c[26]>>>7,Kr=c[36]<<21|c[37]>>>11,Yr=c[37]<<21|c[36]>>>11,Fs=c[47]<<24|c[46]>>>8,Ls=c[46]<<24|c[47]>>>8,Is=c[8]<<27|c[9]>>>5,Rs=c[9]<<27|c[8]>>>5,Ze=c[18]<<20|c[19]>>>12,ds=c[19]<<20|c[18]>>>12,Us=c[29]<<7|c[28]>>>25,Hs=c[28]<<7|c[29]>>>25,xs=c[38]<<8|c[39]>>>24,Cs=c[39]<<8|c[38]>>>24,Bt=c[48]<<14|c[49]>>>18,vr=c[49]<<14|c[48]>>>18,c[0]=et^~Le&ft,c[1]=nt^~He&Br,c[10]=St^~Ze&fs,c[11]=pt^~ds&hs,c[20]=vs^~ws&Es,c[21]=bs^~_s&Ss,c[30]=Is^~Ps&ks,c[31]=Rs^~Ns&Os,c[40]=Ms^~Ds&Us,c[41]=$s^~qs&Hs,c[2]=Le^~ft&Kr,c[3]=He^~Br&Yr,c[12]=Ze^~fs&ps,c[13]=ds^~hs&ms,c[22]=ws^~Es&xs,c[23]=_s^~Ss&Cs,c[32]=Ps^~ks&js,c[33]=Ns^~Os&Bs,c[42]=Ds^~Us&Vs,c[43]=qs^~Hs&Gs,c[4]=ft^~Kr&Bt,c[5]=Br^~Yr&vr,c[14]=fs^~ps&gs,c[15]=hs^~ms&ys,c[24]=Es^~xs&Ts,c[25]=Ss^~Cs&As,c[34]=ks^~js&Fs,c[35]=Os^~Bs&Ls,c[44]=Us^~Vs&zs,c[45]=Hs^~Gs&Ws,c[6]=Kr^~Bt&et,c[7]=Yr^~vr&nt,c[16]=ps^~gs&St,c[17]=ms^~ys&pt,c[26]=xs^~Ts&vs,c[27]=Cs^~As&bs,c[36]=js^~Fs&Is,c[37]=Bs^~Ls&Rs,c[46]=Vs^~zs&Ms,c[47]=Gs^~Ws&$s,c[8]=Bt^~et&Le,c[9]=vr^~nt&He,c[18]=gs^~St&Ze,c[19]=ys^~pt&ds,c[28]=Ts^~vs&ws,c[29]=As^~bs&_s,c[38]=Fs^~Is&Ps,c[39]=Ls^~Rs&Ns,c[48]=zs^~Ms&Ds,c[49]=Ws^~$s&qs,c[0]^=jt[C],c[1]^=jt[C+1]};if(H)a.exports=Et;else for(Pt=0;Pt<Or.length;++Pt)I[Or[Pt]]=Et[Or[Pt]]})()})(u);var d=u.exports,h=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,m=Math.ceil,p=Math.floor,b="[BigNumber Error] ",E=b+"Number primitive has more than 15 significant digits: ",A=1e14,g=14,T=9007199254740991,V=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],v=1e7,R=1e9;function w(a){var l=0|a;return a>0||a===l?l:l-1}function Q(a){for(var l,y,I=1,j=a.length,H=a[0]+"";I<j;){for(l=a[I++]+"",y=g-l.length;y--;l="0"+l);H+=l}for(j=H.length;H.charCodeAt(--j)===48;);return H.slice(0,j+1||1)}function U(a,l){var y,I,j=a.c,H=l.c,se=a.s,pe=l.s,Ie=a.e,Ne=l.e;if(!se||!pe)return null;if(y=j&&!j[0],I=H&&!H[0],y||I)return y?I?0:-pe:se;if(se!=pe)return se;if(y=se<0,I=Ie==Ne,!j||!H)return I?0:!j^y?1:-1;if(!I)return Ie>Ne^y?1:-1;for(pe=(Ie=j.length)<(Ne=H.length)?Ie:Ne,se=0;se<pe;se++)if(j[se]!=H[se])return j[se]>H[se]^y?1:-1;return Ie==Ne?0:Ie>Ne^y?1:-1}function x(a,l,y,I){if(a<l||a>y||a!==p(a))throw Error(b+(I||"Argument")+(typeof a=="number"?a<l||a>y?" out of range: ":" not an integer: ":" not a primitive number: ")+String(a))}function $(a){var l=a.c.length-1;return w(a.e/g)==l&&a.c[l]%2!=0}function J(a,l){return(a.length>1?a.charAt(0)+"."+a.slice(1):a)+(l<0?"e":"e+")+l}function W(a,l,y){var I,j;if(l<0){for(j=y+".";++l;j+=y);a=j+a}else if(++l>(I=a.length)){for(j=y,l-=I;--l;j+=y);a+=j}else l<I&&(a=a.slice(0,l)+"."+a.slice(l));return a}var ne=(function a(l){var y,I,j,H,se,pe,Ie,Ne,jt,at,ge=ue.prototype={constructor:ue,toString:null,valueOf:null},_t=new ue(1),Je=20,Xe=4,It=-7,kr=21,mr=-1e7,Rt=1e7,gr=!1,Wr=1,Et=0,Or={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Pt="0123456789abcdefghijklmnopqrstuvwxyz",yr=!0;function ue(S,c){var _,k,C,B,L,M,ee,re,te=this;if(!(te instanceof ue))return new ue(S,c);if(c==null){if(S&&S._isBigNumber===!0)return te.s=S.s,void(!S.c||S.e>Rt?te.c=te.e=null:S.e<mr?te.c=[te.e=0]:(te.e=S.e,te.c=S.c.slice()));if((M=typeof S=="number")&&0*S==0){if(te.s=1/S<0?(S=-S,-1):1,S===~~S){for(B=0,L=S;L>=10;L/=10,B++);return void(B>Rt?te.c=te.e=null:(te.e=B,te.c=[S]))}re=String(S)}else{if(!h.test(re=String(S)))return j(te,re,M);te.s=re.charCodeAt(0)==45?(re=re.slice(1),-1):1}(B=re.indexOf("."))>-1&&(re=re.replace(".","")),(L=re.search(/e/i))>0?(B<0&&(B=L),B+=+re.slice(L+1),re=re.substring(0,L)):B<0&&(B=re.length)}else{if(x(c,2,Pt.length,"Base"),c==10&&yr)return Ue(te=new ue(S),Je+te.e+1,Xe);if(re=String(S),M=typeof S=="number"){if(0*S!=0)return j(te,re,M,c);if(te.s=1/S<0?(re=re.slice(1),-1):1,ue.DEBUG&&re.replace(/^0\.0*|\./,"").length>15)throw Error(E+S)}else te.s=re.charCodeAt(0)===45?(re=re.slice(1),-1):1;for(_=Pt.slice(0,c),B=L=0,ee=re.length;L<ee;L++)if(_.indexOf(k=re.charAt(L))<0){if(k=="."){if(L>B){B=ee;continue}}else if(!C&&(re==re.toUpperCase()&&(re=re.toLowerCase())||re==re.toLowerCase()&&(re=re.toUpperCase()))){C=!0,L=-1,B=0;continue}return j(te,String(S),M,c)}M=!1,(B=(re=I(re,c,10,te.s)).indexOf("."))>-1?re=re.replace(".",""):B=re.length}for(L=0;re.charCodeAt(L)===48;L++);for(ee=re.length;re.charCodeAt(--ee)===48;);if(re=re.slice(L,++ee)){if(ee-=L,M&&ue.DEBUG&&ee>15&&(S>T||S!==p(S)))throw Error(E+te.s*S);if((B=B-L-1)>Rt)te.c=te.e=null;else if(B<mr)te.c=[te.e=0];else{if(te.e=B,te.c=[],L=(B+1)%g,B<0&&(L+=g),L<ee){for(L&&te.c.push(+re.slice(0,L)),ee-=g;L<ee;)te.c.push(+re.slice(L,L+=g));L=g-(re=re.slice(L)).length}else L-=ee;for(;L--;re+="0");te.c.push(+re)}}else te.c=[te.e=0]}function jr(S,c,_,k){var C,B,L,M,ee;if(_==null?_=Xe:x(_,0,8),!S.c)return S.toString();if(C=S.c[0],L=S.e,c==null)ee=Q(S.c),ee=k==1||k==2&&(L<=It||L>=kr)?J(ee,L):W(ee,L,"0");else if(B=(S=Ue(new ue(S),c,_)).e,M=(ee=Q(S.c)).length,k==1||k==2&&(c<=B||B<=It)){for(;M<c;ee+="0",M++);ee=J(ee,B)}else if(c-=L,ee=W(ee,B,"0"),B+1>M){if(--c>0)for(ee+=".";c--;ee+="0");}else if((c+=B-M)>0)for(B+1==M&&(ee+=".");c--;ee+="0");return S.s<0&&C?"-"+ee:ee}function Ln(S,c){for(var _,k=1,C=new ue(S[0]);k<S.length;k++){if(!(_=new ue(S[k])).s){C=_;break}c.call(C,_)&&(C=_)}return C}function Mn(S,c,_){for(var k=1,C=c.length;!c[--C];c.pop());for(C=c[0];C>=10;C/=10,k++);return(_=k+_*g-1)>Rt?S.c=S.e=null:_<mr?S.c=[S.e=0]:(S.e=_,S.c=c),S}function Ue(S,c,_,k){var C,B,L,M,ee,re,te,me=S.c,Re=V;if(me){e:{for(C=1,M=me[0];M>=10;M/=10,C++);if((B=c-C)<0)B+=g,L=c,te=(ee=me[re=0])/Re[C-L-1]%10|0;else if((re=m((B+1)/g))>=me.length){if(!k)break e;for(;me.length<=re;me.push(0));ee=te=0,C=1,L=(B%=g)-g+1}else{for(ee=M=me[re],C=1;M>=10;M/=10,C++);te=(L=(B%=g)-g+C)<0?0:ee/Re[C-L-1]%10|0}if(k=k||c<0||me[re+1]!=null||(L<0?ee:ee%Re[C-L-1]),k=_<4?(te||k)&&(_==0||_==(S.s<0?3:2)):te>5||te==5&&(_==4||k||_==6&&(B>0?L>0?ee/Re[C-L]:0:me[re-1])%10&1||_==(S.s<0?8:7)),c<1||!me[0])return me.length=0,k?(c-=S.e+1,me[0]=Re[(g-c%g)%g],S.e=-c||0):me[0]=S.e=0,S;if(B==0?(me.length=re,M=1,re--):(me.length=re+1,M=Re[g-B],me[re]=L>0?p(ee/Re[C-L]%Re[L])*M:0),k)for(;;){if(re==0){for(B=1,L=me[0];L>=10;L/=10,B++);for(L=me[0]+=M,M=1;L>=10;L/=10,M++);B!=M&&(S.e++,me[0]==A&&(me[0]=1));break}if(me[re]+=M,me[re]!=A)break;me[re--]=0,M=1}for(B=me.length;me[--B]===0;me.pop());}S.e>Rt?S.c=S.e=null:S.e<mr&&(S.c=[S.e=0])}return S}function Kt(S){var c,_=S.e;return _===null?S.toString():(c=Q(S.c),c=_<=It||_>=kr?J(c,_):W(c,_,"0"),S.s<0?"-"+c:c)}return ue.clone=a,ue.ROUND_UP=0,ue.ROUND_DOWN=1,ue.ROUND_CEIL=2,ue.ROUND_FLOOR=3,ue.ROUND_HALF_UP=4,ue.ROUND_HALF_DOWN=5,ue.ROUND_HALF_EVEN=6,ue.ROUND_HALF_CEIL=7,ue.ROUND_HALF_FLOOR=8,ue.EUCLID=9,ue.config=ue.set=function(S){var c,_;if(S!=null){if(typeof S!="object")throw Error(b+"Object expected: "+S);if(S.hasOwnProperty(c="DECIMAL_PLACES")&&(x(_=S[c],0,R,c),Je=_),S.hasOwnProperty(c="ROUNDING_MODE")&&(x(_=S[c],0,8,c),Xe=_),S.hasOwnProperty(c="EXPONENTIAL_AT")&&((_=S[c])&&_.pop?(x(_[0],-R,0,c),x(_[1],0,R,c),It=_[0],kr=_[1]):(x(_,-R,R,c),It=-(kr=_<0?-_:_))),S.hasOwnProperty(c="RANGE"))if((_=S[c])&&_.pop)x(_[0],-R,-1,c),x(_[1],1,R,c),mr=_[0],Rt=_[1];else{if(x(_,-R,R,c),!_)throw Error(b+c+" cannot be zero: "+_);mr=-(Rt=_<0?-_:_)}if(S.hasOwnProperty(c="CRYPTO")){if((_=S[c])!==!!_)throw Error(b+c+" not true or false: "+_);if(_){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw gr=!_,Error(b+"crypto unavailable");gr=_}else gr=_}if(S.hasOwnProperty(c="MODULO_MODE")&&(x(_=S[c],0,9,c),Wr=_),S.hasOwnProperty(c="POW_PRECISION")&&(x(_=S[c],0,R,c),Et=_),S.hasOwnProperty(c="FORMAT")){if(typeof(_=S[c])!="object")throw Error(b+c+" not an object: "+_);Or=_}if(S.hasOwnProperty(c="ALPHABET")){if(typeof(_=S[c])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(_))throw Error(b+c+" invalid: "+_);yr=_.slice(0,10)=="0123456789",Pt=_}}return{DECIMAL_PLACES:Je,ROUNDING_MODE:Xe,EXPONENTIAL_AT:[It,kr],RANGE:[mr,Rt],CRYPTO:gr,MODULO_MODE:Wr,POW_PRECISION:Et,FORMAT:Or,ALPHABET:Pt}},ue.isBigNumber=function(S){if(!S||S._isBigNumber!==!0)return!1;if(!ue.DEBUG)return!0;var c,_,k=S.c,C=S.e,B=S.s;e:if({}.toString.call(k)=="[object Array]"){if((B===1||B===-1)&&C>=-R&&C<=R&&C===p(C)){if(k[0]===0){if(C===0&&k.length===1)return!0;break e}if((c=(C+1)%g)<1&&(c+=g),String(k[0]).length==c){for(c=0;c<k.length;c++)if((_=k[c])<0||_>=A||_!==p(_))break e;if(_!==0)return!0}}}else if(k===null&&C===null&&(B===null||B===1||B===-1))return!0;throw Error(b+"Invalid BigNumber: "+S)},ue.maximum=ue.max=function(){return Ln(arguments,ge.lt)},ue.minimum=ue.min=function(){return Ln(arguments,ge.gt)},ue.random=(H=9007199254740992,se=Math.random()*H&2097151?function(){return p(Math.random()*H)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(S){var c,_,k,C,B,L=0,M=[],ee=new ue(_t);if(S==null?S=Je:x(S,0,R),C=m(S/g),gr)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(C*=2));L<C;)(B=131072*c[L]+(c[L+1]>>>11))>=9e15?(_=crypto.getRandomValues(new Uint32Array(2)),c[L]=_[0],c[L+1]=_[1]):(M.push(B%1e14),L+=2);L=C/2}else{if(!crypto.randomBytes)throw gr=!1,Error(b+"crypto unavailable");for(c=crypto.randomBytes(C*=7);L<C;)(B=281474976710656*(31&c[L])+1099511627776*c[L+1]+4294967296*c[L+2]+16777216*c[L+3]+(c[L+4]<<16)+(c[L+5]<<8)+c[L+6])>=9e15?crypto.randomBytes(7).copy(c,L):(M.push(B%1e14),L+=7);L=C/7}if(!gr)for(;L<C;)(B=se())<9e15&&(M[L++]=B%1e14);for(C=M[--L],S%=g,C&&S&&(B=V[g-S],M[L]=p(C/B)*B);M[L]===0;M.pop(),L--);if(L<0)M=[k=0];else{for(k=-1;M[0]===0;M.splice(0,1),k-=g);for(L=1,B=M[0];B>=10;B/=10,L++);L<g&&(k-=g-L)}return ee.e=k,ee.c=M,ee}),ue.sum=function(){for(var S=1,c=arguments,_=new ue(c[0]);S<c.length;)_=_.plus(c[S++]);return _},I=(function(){var S="0123456789";function c(_,k,C,B){for(var L,M,ee=[0],re=0,te=_.length;re<te;){for(M=ee.length;M--;ee[M]*=k);for(ee[0]+=B.indexOf(_.charAt(re++)),L=0;L<ee.length;L++)ee[L]>C-1&&(ee[L+1]==null&&(ee[L+1]=0),ee[L+1]+=ee[L]/C|0,ee[L]%=C)}return ee.reverse()}return function(_,k,C,B,L){var M,ee,re,te,me,Re,je,$e,et=_.indexOf("."),nt=Je,Le=Xe;for(et>=0&&(te=Et,Et=0,_=_.replace(".",""),Re=($e=new ue(k)).pow(_.length-et),Et=te,$e.c=c(W(Q(Re.c),Re.e,"0"),10,C,S),$e.e=$e.c.length),re=te=(je=c(_,k,C,L?(M=Pt,S):(M=S,Pt))).length;je[--te]==0;je.pop());if(!je[0])return M.charAt(0);if(et<0?--re:(Re.c=je,Re.e=re,Re.s=B,je=(Re=y(Re,$e,nt,Le,C)).c,me=Re.r,re=Re.e),et=je[ee=re+nt+1],te=C/2,me=me||ee<0||je[ee+1]!=null,me=Le<4?(et!=null||me)&&(Le==0||Le==(Re.s<0?3:2)):et>te||et==te&&(Le==4||me||Le==6&&1&je[ee-1]||Le==(Re.s<0?8:7)),ee<1||!je[0])_=me?W(M.charAt(1),-nt,M.charAt(0)):M.charAt(0);else{if(je.length=ee,me)for(--C;++je[--ee]>C;)je[ee]=0,ee||(++re,je=[1].concat(je));for(te=je.length;!je[--te];);for(et=0,_="";et<=te;_+=M.charAt(je[et++]));_=W(_,re,M.charAt(0))}return _}})(),y=(function(){function S(k,C,B){var L,M,ee,re,te=0,me=k.length,Re=C%v,je=C/v|0;for(k=k.slice();me--;)te=((M=Re*(ee=k[me]%v)+(L=je*ee+(re=k[me]/v|0)*Re)%v*v+te)/B|0)+(L/v|0)+je*re,k[me]=M%B;return te&&(k=[te].concat(k)),k}function c(k,C,B,L){var M,ee;if(B!=L)ee=B>L?1:-1;else for(M=ee=0;M<B;M++)if(k[M]!=C[M]){ee=k[M]>C[M]?1:-1;break}return ee}function _(k,C,B,L){for(var M=0;B--;)k[B]-=M,M=k[B]<C[B]?1:0,k[B]=M*L+k[B]-C[B];for(;!k[0]&&k.length>1;k.splice(0,1));}return function(k,C,B,L,M){var ee,re,te,me,Re,je,$e,et,nt,Le,He,ft,Br,Kr,Yr,Bt,vr,St=k.s==C.s?1:-1,pt=k.c,Ze=C.c;if(!(pt&&pt[0]&&Ze&&Ze[0]))return new ue(k.s&&C.s&&(pt?!Ze||pt[0]!=Ze[0]:Ze)?pt&&pt[0]==0||!Ze?0*St:St/0:NaN);for(nt=(et=new ue(St)).c=[],St=B+(re=k.e-C.e)+1,M||(M=A,re=w(k.e/g)-w(C.e/g),St=St/g|0),te=0;Ze[te]==(pt[te]||0);te++);if(Ze[te]>(pt[te]||0)&&re--,St<0)nt.push(1),me=!0;else{for(Kr=pt.length,Bt=Ze.length,te=0,St+=2,(Re=p(M/(Ze[0]+1)))>1&&(Ze=S(Ze,Re,M),pt=S(pt,Re,M),Bt=Ze.length,Kr=pt.length),Br=Bt,He=(Le=pt.slice(0,Bt)).length;He<Bt;Le[He++]=0);vr=Ze.slice(),vr=[0].concat(vr),Yr=Ze[0],Ze[1]>=M/2&&Yr++;do{if(Re=0,(ee=c(Ze,Le,Bt,He))<0){if(ft=Le[0],Bt!=He&&(ft=ft*M+(Le[1]||0)),(Re=p(ft/Yr))>1)for(Re>=M&&(Re=M-1),$e=(je=S(Ze,Re,M)).length,He=Le.length;c(je,Le,$e,He)==1;)Re--,_(je,Bt<$e?vr:Ze,$e,M),$e=je.length,ee=1;else Re==0&&(ee=Re=1),$e=(je=Ze.slice()).length;if($e<He&&(je=[0].concat(je)),_(Le,je,He,M),He=Le.length,ee==-1)for(;c(Ze,Le,Bt,He)<1;)Re++,_(Le,Bt<He?vr:Ze,He,M),He=Le.length}else ee===0&&(Re++,Le=[0]);nt[te++]=Re,Le[0]?Le[He++]=pt[Br]||0:(Le=[pt[Br]],He=1)}while((Br++<Kr||Le[0]!=null)&&St--);me=Le[0]!=null,nt[0]||nt.splice(0,1)}if(M==A){for(te=1,St=nt[0];St>=10;St/=10,te++);Ue(et,B+(et.e=te+re*g-1)+1,L,me)}else et.e=re,et.r=+me;return et}})(),pe=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Ie=/^([^.]+)\.$/,Ne=/^\.([^.]+)$/,jt=/^-?(Infinity|NaN)$/,at=/^\s*\+(?=[\w.])|^\s+|\s+$/g,j=function(S,c,_,k){var C,B=_?c:c.replace(at,"");if(jt.test(B))S.s=isNaN(B)?null:B<0?-1:1;else{if(!_&&(B=B.replace(pe,(function(L,M,ee){return C=(ee=ee.toLowerCase())=="x"?16:ee=="b"?2:8,k&&k!=C?L:M})),k&&(C=k,B=B.replace(Ie,"$1").replace(Ne,"0.$1")),c!=B))return new ue(B,C);if(ue.DEBUG)throw Error(b+"Not a"+(k?" base "+k:"")+" number: "+c);S.s=null}S.c=S.e=null},ge.absoluteValue=ge.abs=function(){var S=new ue(this);return S.s<0&&(S.s=1),S},ge.comparedTo=function(S,c){return U(this,new ue(S,c))},ge.decimalPlaces=ge.dp=function(S,c){var _,k,C,B=this;if(S!=null)return x(S,0,R),c==null?c=Xe:x(c,0,8),Ue(new ue(B),S+B.e+1,c);if(!(_=B.c))return null;if(k=((C=_.length-1)-w(this.e/g))*g,C=_[C])for(;C%10==0;C/=10,k--);return k<0&&(k=0),k},ge.dividedBy=ge.div=function(S,c){return y(this,new ue(S,c),Je,Xe)},ge.dividedToIntegerBy=ge.idiv=function(S,c){return y(this,new ue(S,c),0,1)},ge.exponentiatedBy=ge.pow=function(S,c){var _,k,C,B,L,M,ee,re,te=this;if((S=new ue(S)).c&&!S.isInteger())throw Error(b+"Exponent not an integer: "+Kt(S));if(c!=null&&(c=new ue(c)),L=S.e>14,!te.c||!te.c[0]||te.c[0]==1&&!te.e&&te.c.length==1||!S.c||!S.c[0])return re=new ue(Math.pow(+Kt(te),L?S.s*(2-$(S)):+Kt(S))),c?re.mod(c):re;if(M=S.s<0,c){if(c.c?!c.c[0]:!c.s)return new ue(NaN);(k=!M&&te.isInteger()&&c.isInteger())&&(te=te.mod(c))}else{if(S.e>9&&(te.e>0||te.e<-1||(te.e==0?te.c[0]>1||L&&te.c[1]>=24e7:te.c[0]<8e13||L&&te.c[0]<=9999975e7)))return B=te.s<0&&$(S)?-0:0,te.e>-1&&(B=1/B),new ue(M?1/B:B);Et&&(B=m(Et/g+2))}for(L?(_=new ue(.5),M&&(S.s=1),ee=$(S)):ee=(C=Math.abs(+Kt(S)))%2,re=new ue(_t);;){if(ee){if(!(re=re.times(te)).c)break;B?re.c.length>B&&(re.c.length=B):k&&(re=re.mod(c))}if(C){if((C=p(C/2))===0)break;ee=C%2}else if(Ue(S=S.times(_),S.e+1,1),S.e>14)ee=$(S);else{if((C=+Kt(S))==0)break;ee=C%2}te=te.times(te),B?te.c&&te.c.length>B&&(te.c.length=B):k&&(te=te.mod(c))}return k?re:(M&&(re=_t.div(re)),c?re.mod(c):B?Ue(re,Et,Xe,void 0):re)},ge.integerValue=function(S){var c=new ue(this);return S==null?S=Xe:x(S,0,8),Ue(c,c.e+1,S)},ge.isEqualTo=ge.eq=function(S,c){return U(this,new ue(S,c))===0},ge.isFinite=function(){return!!this.c},ge.isGreaterThan=ge.gt=function(S,c){return U(this,new ue(S,c))>0},ge.isGreaterThanOrEqualTo=ge.gte=function(S,c){return(c=U(this,new ue(S,c)))===1||c===0},ge.isInteger=function(){return!!this.c&&w(this.e/g)>this.c.length-2},ge.isLessThan=ge.lt=function(S,c){return U(this,new ue(S,c))<0},ge.isLessThanOrEqualTo=ge.lte=function(S,c){return(c=U(this,new ue(S,c)))===-1||c===0},ge.isNaN=function(){return!this.s},ge.isNegative=function(){return this.s<0},ge.isPositive=function(){return this.s>0},ge.isZero=function(){return!!this.c&&this.c[0]==0},ge.minus=function(S,c){var _,k,C,B,L=this,M=L.s;if(c=(S=new ue(S,c)).s,!M||!c)return new ue(NaN);if(M!=c)return S.s=-c,L.plus(S);var ee=L.e/g,re=S.e/g,te=L.c,me=S.c;if(!ee||!re){if(!te||!me)return te?(S.s=-c,S):new ue(me?L:NaN);if(!te[0]||!me[0])return me[0]?(S.s=-c,S):new ue(te[0]?L:Xe==3?-0:0)}if(ee=w(ee),re=w(re),te=te.slice(),M=ee-re){for((B=M<0)?(M=-M,C=te):(re=ee,C=me),C.reverse(),c=M;c--;C.push(0));C.reverse()}else for(k=(B=(M=te.length)<(c=me.length))?M:c,M=c=0;c<k;c++)if(te[c]!=me[c]){B=te[c]<me[c];break}if(B&&(C=te,te=me,me=C,S.s=-S.s),(c=(k=me.length)-(_=te.length))>0)for(;c--;te[_++]=0);for(c=A-1;k>M;){if(te[--k]<me[k]){for(_=k;_&&!te[--_];te[_]=c);--te[_],te[k]+=A}te[k]-=me[k]}for(;te[0]==0;te.splice(0,1),--re);return te[0]?Mn(S,te,re):(S.s=Xe==3?-1:1,S.c=[S.e=0],S)},ge.modulo=ge.mod=function(S,c){var _,k,C=this;return S=new ue(S,c),!C.c||!S.s||S.c&&!S.c[0]?new ue(NaN):!S.c||C.c&&!C.c[0]?new ue(C):(Wr==9?(k=S.s,S.s=1,_=y(C,S,0,3),S.s=k,_.s*=k):_=y(C,S,0,Wr),(S=C.minus(_.times(S))).c[0]||Wr!=1||(S.s=C.s),S)},ge.multipliedBy=ge.times=function(S,c){var _,k,C,B,L,M,ee,re,te,me,Re,je,$e,et,nt,Le=this,He=Le.c,ft=(S=new ue(S,c)).c;if(!(He&&ft&&He[0]&&ft[0]))return!Le.s||!S.s||He&&!He[0]&&!ft||ft&&!ft[0]&&!He?S.c=S.e=S.s=null:(S.s*=Le.s,He&&ft?(S.c=[0],S.e=0):S.c=S.e=null),S;for(k=w(Le.e/g)+w(S.e/g),S.s*=Le.s,(ee=He.length)<(me=ft.length)&&($e=He,He=ft,ft=$e,C=ee,ee=me,me=C),C=ee+me,$e=[];C--;$e.push(0));for(et=A,nt=v,C=me;--C>=0;){for(_=0,Re=ft[C]%nt,je=ft[C]/nt|0,B=C+(L=ee);B>C;)_=((re=Re*(re=He[--L]%nt)+(M=je*re+(te=He[L]/nt|0)*Re)%nt*nt+$e[B]+_)/et|0)+(M/nt|0)+je*te,$e[B--]=re%et;$e[B]=_}return _?++k:$e.splice(0,1),Mn(S,$e,k)},ge.negated=function(){var S=new ue(this);return S.s=-S.s||null,S},ge.plus=function(S,c){var _,k=this,C=k.s;if(c=(S=new ue(S,c)).s,!C||!c)return new ue(NaN);if(C!=c)return S.s=-c,k.minus(S);var B=k.e/g,L=S.e/g,M=k.c,ee=S.c;if(!B||!L){if(!M||!ee)return new ue(C/0);if(!M[0]||!ee[0])return ee[0]?S:new ue(M[0]?k:0*C)}if(B=w(B),L=w(L),M=M.slice(),C=B-L){for(C>0?(L=B,_=ee):(C=-C,_=M),_.reverse();C--;_.push(0));_.reverse()}for((C=M.length)-(c=ee.length)<0&&(_=ee,ee=M,M=_,c=C),C=0;c;)C=(M[--c]=M[c]+ee[c]+C)/A|0,M[c]=A===M[c]?0:M[c]%A;return C&&(M=[C].concat(M),++L),Mn(S,M,L)},ge.precision=ge.sd=function(S,c){var _,k,C,B=this;if(S!=null&&S!==!!S)return x(S,1,R),c==null?c=Xe:x(c,0,8),Ue(new ue(B),S,c);if(!(_=B.c))return null;if(k=(C=_.length-1)*g+1,C=_[C]){for(;C%10==0;C/=10,k--);for(C=_[0];C>=10;C/=10,k++);}return S&&B.e+1>k&&(k=B.e+1),k},ge.shiftedBy=function(S){return x(S,-9007199254740991,T),this.times("1e"+S)},ge.squareRoot=ge.sqrt=function(){var S,c,_,k,C,B=this,L=B.c,M=B.s,ee=B.e,re=Je+4,te=new ue("0.5");if(M!==1||!L||!L[0])return new ue(!M||M<0&&(!L||L[0])?NaN:L?B:1/0);if((M=Math.sqrt(+Kt(B)))==0||M==1/0?(((c=Q(L)).length+ee)%2==0&&(c+="0"),M=Math.sqrt(+c),ee=w((ee+1)/2)-(ee<0||ee%2),_=new ue(c=M==1/0?"5e"+ee:(c=M.toExponential()).slice(0,c.indexOf("e")+1)+ee)):_=new ue(M+""),_.c[0]){for((M=(ee=_.e)+re)<3&&(M=0);;)if(C=_,_=te.times(C.plus(y(B,C,re,1))),Q(C.c).slice(0,M)===(c=Q(_.c)).slice(0,M)){if(_.e<ee&&--M,(c=c.slice(M-3,M+1))!="9999"&&(k||c!="4999")){+c&&(+c.slice(1)||c.charAt(0)!="5")||(Ue(_,_.e+Je+2,1),S=!_.times(_).eq(B));break}if(!k&&(Ue(C,C.e+Je+2,0),C.times(C).eq(B))){_=C;break}re+=4,M+=4,k=1}}return Ue(_,_.e+Je+1,Xe,S)},ge.toExponential=function(S,c){return S!=null&&(x(S,0,R),S++),jr(this,S,c,1)},ge.toFixed=function(S,c){return S!=null&&(x(S,0,R),S=S+this.e+1),jr(this,S,c)},ge.toFormat=function(S,c,_){var k,C=this;if(_==null)S!=null&&c&&typeof c=="object"?(_=c,c=null):S&&typeof S=="object"?(_=S,S=c=null):_=Or;else if(typeof _!="object")throw Error(b+"Argument not an object: "+_);if(k=C.toFixed(S,c),C.c){var B,L=k.split("."),M=+_.groupSize,ee=+_.secondaryGroupSize,re=_.groupSeparator||"",te=L[0],me=L[1],Re=C.s<0,je=Re?te.slice(1):te,$e=je.length;if(ee&&(B=M,M=ee,ee=B,$e-=B),M>0&&$e>0){for(B=$e%M||M,te=je.substr(0,B);B<$e;B+=M)te+=re+je.substr(B,M);ee>0&&(te+=re+je.slice(B)),Re&&(te="-"+te)}k=me?te+(_.decimalSeparator||"")+((ee=+_.fractionGroupSize)?me.replace(new RegExp("\\d{"+ee+"}\\B","g"),"$&"+(_.fractionGroupSeparator||"")):me):te}return(_.prefix||"")+k+(_.suffix||"")},ge.toFraction=function(S){var c,_,k,C,B,L,M,ee,re,te,me,Re,je=this,$e=je.c;if(S!=null&&(!(M=new ue(S)).isInteger()&&(M.c||M.s!==1)||M.lt(_t)))throw Error(b+"Argument "+(M.isInteger()?"out of range: ":"not an integer: ")+Kt(M));if(!$e)return new ue(je);for(c=new ue(_t),re=_=new ue(_t),k=ee=new ue(_t),Re=Q($e),B=c.e=Re.length-je.e-1,c.c[0]=V[(L=B%g)<0?g+L:L],S=!S||M.comparedTo(c)>0?B>0?c:re:M,L=Rt,Rt=1/0,M=new ue(Re),ee.c[0]=0;te=y(M,c,0,1),(C=_.plus(te.times(k))).comparedTo(S)!=1;)_=k,k=C,re=ee.plus(te.times(C=re)),ee=C,c=M.minus(te.times(C=c)),M=C;return C=y(S.minus(_),k,0,1),ee=ee.plus(C.times(re)),_=_.plus(C.times(k)),ee.s=re.s=je.s,me=y(re,k,B*=2,Xe).minus(je).abs().comparedTo(y(ee,_,B,Xe).minus(je).abs())<1?[re,k]:[ee,_],Rt=L,me},ge.toNumber=function(){return+Kt(this)},ge.toPrecision=function(S,c){return S!=null&&x(S,1,R),jr(this,S,c,2)},ge.toString=function(S){var c,_=this,k=_.s,C=_.e;return C===null?k?(c="Infinity",k<0&&(c="-"+c)):c="NaN":(S==null?c=C<=It||C>=kr?J(Q(_.c),C):W(Q(_.c),C,"0"):S===10&&yr?c=W(Q((_=Ue(new ue(_),Je+C+1,Xe)).c),_.e,"0"):(x(S,2,Pt.length,"Base"),c=I(W(Q(_.c),C,"0"),10,S,k,!0)),k<0&&_.c[0]&&(c="-"+c)),c},ge.valueOf=ge.toJSON=function(){return Kt(this)},ge._isBigNumber=!0,ge[Symbol.toStringTag]="BigNumber",ge[Symbol.for("nodejs.util.inspect.custom")]=ge.valueOf,l!=null&&ue.set(l),ue})();const X={ROUNDING_MODE:ne.ROUND_DOWN};function F(a){return new TextEncoder().encode(a)}function N(a){return typeof a=="string"?N(q(a)):new TextDecoder().decode(a)}ne.config(X);const Y="UNKNOWN_ERROR",K="INVALID_ARGUMENT";function D(a,l=Y,y={}){const I=[];Object.keys(y).forEach((se=>{try{I.push(se+"="+JSON.stringify(y[se]))}catch{I.push(se+"="+JSON.stringify(y[se].toString()))}}));const j=a;I.length&&(a+=" ("+I.join(", ")+")");const H=new Error(a);return H.reason=j,H.code=l,Object.keys(y).forEach((function(se){H[se]=y[se]})),H}function q(a){if(typeof a!="string")throw new Error("hexToBytes only accept strings, got: "+typeof a);if(a.substr(0,2)==="0x")return q(a.substr(2));const l=new Uint8Array(Math.ceil(a.length/2));let y=0;for(let I=0;I<a.length;I+=2){const j=parseInt(a.substr(I,2),16);if(isNaN(j))throw new Error("Cannot read hex string:"+JSON.stringify(a));l[y]=j,y++}return l}function P(a){return Array.from(a).map((l=>l.toString(16).padStart(2,"0"))).join("")}function O(a,l){if(typeof a=="string"){if(l&&l.encoding==="hex"&&typeof a=="string"){let y=a;y.length>2&&y.substr(0,2)==="0x"&&(y=y.substr(2));const I=q(y);return d.keccak256(I)}return d.keccak256(F(a))}return d.keccak256(a)}const G={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function Z(a,l,y){return new Array(l-a.length+1).join(y||"0")+a}function le(a){let l="",y=0;const I=a.length;for(a.substring(0,2)==="0x"&&(y=2);y<I;y+=2){const j=parseInt(a.substr(y,2),16);l+=String.fromCharCode(j)}return l}function ce(a){return Dt(a)&&a.name&&a.name.indexOf("(")!==-1?a.name:a.name+"("+de(!1,a.inputs||[]).join(",")+")"}function ie(...a){const l=a.reduce(((j,H)=>j+H.length),0),y=new Uint8Array(l);let I=0;for(const j of a)y.set(j,I),I+=j.length;return y}function de(a,l){const y=[];return l.forEach((function(I){if(typeof I.components=="object"){if(I.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let j="";const H=I.type.indexOf("[");H>=0&&(j=I.type.substring(H));const se=de(a,I.components);y.push("("+se.join(",")+")"+j)}else y.push(I.type)})),y}function Pe(a){const l=a.indexOf("("),y=a.indexOf(")");return l!==-1&&y!==-1?a.substr(0,l):a}function we(a){const l=a.indexOf("("),y=a.indexOf(")");return l!==-1&&y!==-1?a.substr(l+1,y-l-1).replace(" ",""):""}function Se(a){return a==null?a:Fe(a).toNumber()}function ye(a){return Fe(a).toNumber()}function Ve(a){return $t(a)?a.toString(10):""+a}function qe(a){return typeof a=="string"&&!a.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(a)?"0x"+a:Ae(a)}function he(a){if(typeof a=="string")return a.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(a)?Ae(a):"0x"+P(F(a));if(a instanceof Uint8Array)return"0x"+P(a);throw new Error(`toStringData: Error trying to convert ${a} (${typeof a}) to a hex string.`)}function fe(a){return typeof a=="boolean"?a:Fe(a).toNumber()!==0}function ve(a){const l=Fe(a),y=l.toString(16);return l.isLessThan(0)?"-0x"+y.substr(1):"0x"+y}function Ae(a){if(vo(a))return ve(+a);if($t(a))return ve(a);if(At(a)){const l=a;if(l.indexOf("-0x")===0)return ve(l);if(l.indexOf("0x")===0)return l;if(!isFinite(l))return P(F(l))}if(a instanceof Uint8Array)return"0x"+P(a);if(rr(a)||Dt(a))throw new Error("toHex can only be called with scalar values, not objects or arrays");return ve(a)}function Be(a){const l=a?a.toLowerCase():"ether",y=G[l];if(y===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(G,null,2));return new ne(y,10)}function Fe(a){let l=a||0;return $t(l)?l:(typeof l=="string"&&(l=l.trim()),typeof l!="string"||l.indexOf("0x")!==0&&l.indexOf("-0x")!==0?l instanceof Uint8Array?new ne(P(l),16):new ne(l,10):new ne(l.replace("0x","").toLowerCase(),16))}function dt(a){return new ne(new Array(a).fill("1").join(""),2)}function rt(a,l=256){const y=Fe(a).integerValue();return y.isLessThan(0)?dt(l).plus(y).plus(1):y}function Lt(a,l){return Z(a.toString(2),l,"0")[0]==="1"}function Mt(a){if(typeof a!="string")throw D("invalid address",K,{arg:"address",value:a});if(a.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return a.trim().substring(0,2)!=="0x"&&(a="0x"+a),hr(a);throw D("invalid address",K,{arg:"address",value:a})}function tr(a,l=256){if(Lt(a,l)){const y=dt(l);return a.minus(y).minus(1)}return a}function Pr(a){return/^0x[0-9a-f]{40}$/i.test(a)}function Wt(a){return!!/^(0x)?[0-9a-f]{40}$/i.test(a)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(a)&&!/^(0x)?[0-9A-F]{40}$/.test(a))||jn(a))}function jn(a){const l=a.replace("0x",""),y=O(l.toLowerCase());for(let I=0;I<40;I++)if(parseInt(y[I],16)>7&&l[I].toUpperCase()!==l[I]||parseInt(y[I],16)<=7&&l[I].toLowerCase()!==l[I])return!1;return!0}function hr(a){if(a===void 0)return"";const l=a.toLowerCase().replace("0x",""),y=O(l);let I="0x";for(let j=0;j<l.length;j++)parseInt(y[j],16)>7?I+=l[j].toUpperCase():I+=l[j];return I}function gt(a){if(!Array.isArray(a))throw new Error(`Value was not an array: ${JSON.stringify(a)}`);return a}function zr(a){return Pr(a)?a:/^[0-9a-f]{40}$/.test(a)?"0x"+a:"0x"+Z(Ae(a).substr(2),40)}function $t(a){return a instanceof ne}function At(a){return typeof a=="string"||a&&a.constructor&&a.constructor.name==="String"}function Dt(a){return a!==null&&!Array.isArray(a)&&typeof a=="object"}function vo(a){return typeof a=="boolean"}function rr(a){return Array.isArray(a)}var Va,Bn;function Ga(a,l){if(!a)throw new Error("jsonrpc method should be specified!");if(typeof a!="string")throw new Error(`jsonrpc must be a string, got ${typeof a}!`);return r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:a,params:l||[]}}function Ol(a){return Array.isArray(a)?a.every(l):l(a);function l(y){return!!y&&(y.error===void 0||y.error===null)&&y.jsonrpc==="2.0"&&y.id!==null&&"result"in y&&y.result!==void 0}}r.TransactionStatus=void 0,(Va=r.TransactionStatus||(r.TransactionStatus={})).pending="pending",Va.confirmed="confirmed",Va.failed="failed",r.TransactionType=void 0,(Bn=r.TransactionType||(r.TransactionType={})).queued="queued",Bn.dropped="dropped",Bn.replaced="replaced",Bn.pending="pending",Bn.reverted="reverted",Bn.confirmed="confirmed",r.messageId=0;function za(a){return Fe(a)}function jl(a){return a==="latest"||a==="pending"||a==="earliest"}function fn(a){return a===void 0?"latest":yt(a)}function yt(a){return a==null?null:jl(a)?a:Ae(a)}function Wa(a){return a.from&&(a.from=qt(a.from)),a.to&&(a.to=qt(a.to)),a.gasPrice!==void 0&&(a.gasPrice=ve(a.gasPrice)),a.gas!==void 0&&(a.gas=ve(a.gas)),a.value!==void 0&&(a.value=ve(a.value)),a.nonce!==void 0&&(a.nonce=ve(a.nonce)),a.data&&!a.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(a.data)&&(a.data="0x"+a.data),a}function Fn(a){if(typeof a!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(a));if(a.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(a));if(a.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(a));return a}function Ka(a){if(typeof a!="object")throw new Error("Did not provide transaction options");if(!a.from)throw new Error('Missing "from" in transaction options');return a.from=qt(a.from),a.to&&(a.to=qt(a.to)),a.gasPrice!==void 0&&(a.gasPrice=ve(a.gasPrice)),a.gas!==void 0&&(a.gas=ve(a.gas)),a.value!==void 0&&(a.value=ve(a.value)),a.nonce!==void 0&&(a.nonce=ve(a.nonce)),a.data&&!a.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(a.data)&&(a.data="0x"+a.data),a}function bo(a){return a?(a.blockNumber!==null&&(a.blockNumber=ye(a.blockNumber)),a.transactionIndex!==null&&(a.transactionIndex=ye(a.transactionIndex)),a.nonce=ye(a.nonce),a.gas=ye(a.gas),a.gasPrice=Fe(a.gasPrice),a.value=Fe(a.value),a):null}function Bl(a){return a?(a.blockNumber!==null&&(a.blockNumber=ye(a.blockNumber)),a.transactionIndex!==null&&(a.transactionIndex=ye(a.transactionIndex)),a.cumulativeGasUsed=ye(a.cumulativeGasUsed),a.gasUsed=ye(a.gasUsed),a.effectiveGasPrice!==void 0&&a.effectiveGasPrice!==null&&(a.effectiveGasPrice=ye(a.effectiveGasPrice)),a.logs&&rr(a.logs)&&(a.logs=a.logs.map((function(l){return is(l)}))),a.status=ye(a.status||""),a):null}function wo(a){return a?(a.gasLimit=ye(a.gasLimit),a.gasUsed=ye(a.gasUsed),a.size=ye(a.size),a.timestamp=ye(a.timestamp),a.number!==null&&(a.number=ye(a.number)),a.difficulty=Fe(a.difficulty),a.totalDifficulty=Fe(a.totalDifficulty),rr(a.transactions)&&a.transactions.forEach((function(l,y){At(l)||(a.transactions[y]=bo(l)||a.transactions[y])})),a):null}function is(a){return a&&(a.blockNumber&&(a.blockNumber=ye(a.blockNumber)),a.transactionIndex&&(a.transactionIndex=ye(a.transactionIndex)),a.logIndex&&(a.logIndex=ye(a.logIndex)),a)}function qt(a){if(Pr(a))return a;if(Wt(a))return"0x"+a;throw new Error(`Invalid address: ${JSON.stringify(a)}`)}function Fl(a){return a}function Ll(a){return a&&(a.startingBlock=ye(a.startingBlock),a.currentBlock=ye(a.currentBlock),a.highestBlock=ye(a.highestBlock),a.knownStates&&(a.knownStates=ye(a.knownStates),a.pulledStates=ye(a.pulledStates)),a)}function Ya(a){if(a===null)throw D("cannot convert null value to array",K,{arg:"value",value:a});if(a instanceof Uint8Array)return new Uint8Array(a);if(typeof a=="string"){const l=a.match(/^(0x)?[0-9a-fA-F]*$/);if(!l)throw D("invalid hexidecimal string",K,{arg:"value",value:a});if(l[1]!=="0x")throw D("hex string must have 0x prefix",K,{arg:"value",value:a});(a=a.substring(2)).length%2&&(a="0"+a);const y=[];for(let I=0;I<a.length;I+=2)y.push(parseInt(a.substr(I,2),16));return new Uint8Array(y)}if((function(l){if(!l||parseInt(String(l.length))!==l.length||typeof l=="string")return!1;for(let y=0;y<l.length;y++){const I=l[y];if(I<0||I>=256||parseInt(String(I))!==I)return!1}return!0})(a))return new Uint8Array(a);throw D("invalid arrayify value",void 0,{arg:"value",value:a,type:typeof a})}function Ml(a,l,y){Object.defineProperty(a,l,{enumerable:!0,value:y,writable:!1})}const gm=new ne(-1),ym=new ne(0),vm=new ne(1),$l=new ne("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Dl(a){return(function(l,y){function I(se){return new Error('unexpected character "'+l[se]+'" at position '+se+' in "'+l+'"')}const j={type:"",name:"",state:{allowType:!0}};let H=j;for(let se=0;se<l.length;se++){const pe=l[se];switch(pe){case"(":if(!H.state.allowParams)throw I(se);H.state.allowType=!1,H.type=_o(H.type),H.components=[{type:"",name:"",parent:H,state:{allowType:!0}}],H=H.components[0];break;case")":delete H.state,H.name==="indexed"&&(H.indexed=!0,H.name=""),H.type=_o(H.type);const Ie=H;if(H=H.parent,!H)throw I(se);delete Ie.parent,H.state.allowParams=!1,H.state.allowName=!0,H.state.allowArray=!0;break;case",":delete H.state,H.name==="indexed"&&(H.indexed=!0,H.name=""),H.type=_o(H.type);const Ne={type:"",name:"",parent:H.parent,state:{allowType:!0}};H.parent.components.push(Ne),delete H.parent,H=Ne;break;case" ":H.state.allowType&&H.type!==""&&(H.type=_o(H.type),delete H.state.allowType,H.state.allowName=!0,H.state.allowParams=!0),H.state.allowName&&H.name!==""&&(H.name==="indexed"?(H.indexed=!0,H.name=""):H.state.allowName=!1);break;case"[":if(!H.state.allowArray)throw I(se);H.type+=pe,H.state.allowArray=!1,H.state.allowName=!1,H.state.readArray=!0;break;case"]":if(!H.state.readArray)throw I(se);H.type+=pe,H.state.readArray=!1,H.state.allowArray=!0,H.state.allowName=!0;break;default:if(H.state.allowType)H.type+=pe,H.state.allowParams=!0,H.state.allowArray=!0;else if(H.state.allowName)H.name+=pe,delete H.state.allowArray;else{if(!H.state.readArray)throw I(se);H.type+=pe}}}if(H.parent)throw new Error("unexpected eof");return delete j.state,H.name==="indexed"&&(H.indexed=!0,H.name=""),j.type=_o(j.type),j})(a)}function _o(a){return a.match(/^uint($|[^1-9])/)?a="uint256"+a.substring(4):a.match(/^int($|[^1-9])/)&&(a="int256"+a.substring(3)),a}const bm=new RegExp(/^bytes([0-9]*)$/),ql=new RegExp(/^(u?int)([0-9]*)$/),wm=new RegExp(/^(.*)\[([0-9]*)\]$/),_m=function(a,l){const y=a.match(ql);return y&&parseInt(y[2])<=48?l.toNumber():l};class pr{constructor(l,y,I,j="",H){this.coerceFunc=l,this.name=y,this.type=I,this.localName=j,this.dynamic=H}}class Em extends pr{constructor(l){super(l.coerceFunc,l.name,l.type,void 0,l.dynamic),Ml(this,"coder",l)}encode(l){return this.coder.encode(l)}decode(l,y){return this.coder.decode(l,y)}}class Sm extends pr{constructor(l,y){super(l,"null","",y,!1)}encode(l){return Ya([])}decode(l,y){if(y>l.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function cs(a,l){return new ne(a.toString(2).substr(-l),2)}class Ul extends pr{constructor(l,y,I,j){const H=(I?"int":"uint")+8*y;super(l,H,H,j,!1),this.size=y,this.signed=I}encode(l){try{let y=Fe(l);if(this.signed){let j=cs($l,8*this.size-1);if(y.gt(j))throw new Error("out-of-bounds");if(j=j.plus(vm).multipliedBy(gm),y.lt(j))throw new Error("out-of-bounds")}else if(y.lt(ym)||y.gt(cs($l,8*this.size)))throw new Error("out-of-bounds");y=cs(rt(y,8*this.size),8*this.size),this.signed&&(y=rt(tr(y,8*this.size),256));const I=Z(rt(y).toString(16),64);if(I.indexOf("NaN")!==-1)throw D("invalid number value, NaN",K,{arg:this.localName,coderType:this.name,value:l,v:y,twosComplement:rt(y),twosComplement16:rt(y).toString(16),pad:Z(rt(y).toString(16),64),size:this.size});return q(I)}catch(y){throw D("invalid number value",K,{arg:this.localName,coderType:this.name,value:l,message:y.toString()})}}decode(l,y){if(l.length<y+32)throw D("insufficient data for "+this.name+" type",K,{arg:this.localName,coderType:this.name,value:Ae(l.slice(y,y+32))});const I=32-this.size;let j=new ne(P(l.slice(y+I,y+32)),16);return j=this.signed?tr(j,8*this.size):cs(j,8*this.size),{consumed:32,value:this.coerceFunc(this.name,j)}}}const Nr=new Ul((function(a,l){return l}),32,!1,"none");class Hl extends pr{constructor(l,y,I){const j="bytes"+y;super(l,j,j,I,!1),this.length=y}encode(l){const y=new Uint8Array(32);try{if(typeof l=="string"&&l.length%2!=0)throw new Error("hex string cannot be odd-length");const I=Ya(l);if(I.length>this.length)throw new Error("incorrect data length");y.set(I)}catch(I){throw D("invalid "+this.name+" value. Use hex strings or Uint8Array",K,{arg:this.localName,coderType:this.name,value:I.value||l,details:I.message})}return y}decode(l,y){if(l.length<y+32)throw D("insufficient data for "+this.name+" type",K,{arg:this.localName,coderType:this.name,value:Ae(l.slice(y,y+32))});return{consumed:32,value:this.coerceFunc(this.name,l.slice(y,y+this.length))}}}function Vl(a){const l=32*Math.ceil(a.length/32),y=new Uint8Array(l-a.length);return ie(Nr.encode(a.length),a,y)}function Gl(a,l,y){if(a.length<l+32)throw D("insufficient data for dynamicBytes length",K,{arg:y,coderType:"dynamicBytes",value:Ae(a.slice(l,l+32))});let I=Nr.decode(a,l).value;try{I=I.toNumber()}catch(j){throw j("dynamic bytes count too large",K,{arg:y,coderType:"dynamicBytes",value:I.toString()})}if(a.length<l+32+I)throw D("insufficient data for dynamicBytes type",K,{arg:y,coderType:"dynamicBytes",value:Ae(a.slice(l,l+32+I))});return{consumed:32+32*Math.ceil(I/32),value:a.slice(l+32,l+32+I)}}function ls(a){return 32*Math.ceil(a/32)}function zl(a,l){if(!Array.isArray(l)){if(!l||typeof l!="object")throw D("invalid tuple value",K,{coderType:"tuple",value:l});{const Ie=[];a.forEach((function(Ne){Ie.push(l[Ne.localName])})),l=Ie}}if(a.length!==l.length)throw D("types/value length mismatch",K,{coderType:"tuple",value:l});const y=[];a.forEach((function(Ie,Ne){y.push({dynamic:Ie.dynamic,value:Ie.encode(l[Ne])})}));let I=0,j=0;y.forEach((function(Ie){Ie.dynamic?(I+=32,j+=ls(Ie.value.length)):I+=ls(Ie.value.length)}));let H=0,se=I;const pe=new Uint8Array(I+j);return y.forEach((function(Ie){Ie.dynamic?(pe.set(Nr.encode(se),H),H+=32,pe.set(Ie.value,se),se+=ls(Ie.value.length)):(pe.set(Ie.value,H),H+=ls(Ie.value.length))})),pe}class xm extends Array{}class Cm extends pr{constructor(l,y,I,j){super(l,"array",y.type+"["+(I>=0?I:"")+"]",j,I===-1||y.dynamic),this.coder=y,this.length=I}encode(l){if(!Array.isArray(l))throw D("expected array value",K,{arg:this.localName,coderType:"array",value:l});let y=this.length,I=new Uint8Array(0);y===-1&&(y=l.length,I=Nr.encode(y)),(function(H,se,pe){if(pe||(pe=""),H<se)throw D("missing argument"+pe,"MISSING_ARGUMENT",{count:H,expectedCount:se});if(H>se)throw D("too many arguments"+pe,"UNEXPECTED_ARGUMENT",{count:H,expectedCount:se})})(y,l.length,"in coder array"+(this.localName?" "+this.localName:""));const j=[];for(let H=0;H<l.length;H++)j.push(this.coder);return ie(I,zl(j,l))}decode(l,y){let I=0,j=this.length;if(j===-1){let pe;try{pe=Nr.decode(l,y)}catch(Ie){throw D("insufficient data for dynamic array length",K,{arg:this.localName,coderType:"array",value:Ie.value})}try{j=pe.value.toNumber()}catch{throw D("array count too large",K,{arg:this.localName,coderType:"array",value:pe.value.toString()})}I+=pe.consumed,y+=pe.consumed}const H=[];for(let pe=0;pe<j;pe++)H.push(new Em(this.coder));const se=(function(pe,Ie,Ne){const jt=Ne;let at=0;const ge=[];return pe.forEach((function(_t){let Je;if(_t.dynamic){const Xe=Nr.decode(Ie,Ne);Je=_t.decode(Ie,jt+Xe.value.toNumber()),Je.consumed=Xe.consumed}else Je=_t.decode(Ie,Ne);Je.value!==void 0&&ge.push(Je.value),Ne+=Je.consumed,at+=Je.consumed})),{value:ge,consumed:at}})(H,l,y);return se.consumed+=I,se.value=this.coerceFunc(this.type,se.value),se}}class Qa extends pr{constructor(l,y,I){let j=!1;const H=[];y.forEach((function(se){se.dynamic&&(j=!0),H.push(se.type)})),super(l,"tuple","tuple("+H.join(",")+")",I,j),this.coders=y}encode(l){return zl(this.coders,l)}decode(l,y){const I=(function(j,H,se){const pe=se;let Ie=0;const Ne=new xm;return j.forEach((function(jt){let at;if(jt.dynamic){const ge=Nr.decode(H,se);at=jt.decode(H,pe+ge.value.toNumber()),at.consumed=ge.consumed}else at=jt.decode(H,se);at.value!==void 0&&Ne.push(at.value),se+=at.consumed,Ie+=at.consumed})),j.forEach((function(jt,at){let ge=jt.localName;ge&&(ge==="length"&&(ge="_length"),Ne[ge]!==null&&Ne[ge]!==void 0||(Ne[ge]=Ne[at]))})),{value:Ne,consumed:Ie}})(this.coders,l,y);return I.value=this.coerceFunc(this.type,I.value),I}}const Tm={address:class extends pr{constructor(a,l){super(a,"address","address",l,!1)}encode(a){const l=new Uint8Array(32),y=a.trim();if(!Wt(y))throw D("invalid address format",K,{arg:this.localName,coderType:"address",value:a});try{l.set(q(qt(y)),12)}catch(I){throw D(`invalid address (${I.message})`,K,{arg:this.localName,coderType:"address",value:a})}return l}decode(a,l){if(a.length<l+32)throw D("insufficuent data for address type",K,{arg:this.localName,coderType:"address",value:Ae(a.slice(l,l+32)),missingBytes:l+32-a.length});return{consumed:32,value:this.coerceFunc("address",Mt(Ae(a.slice(l+12,l+32))))}}},bool:class extends pr{constructor(a,l){super(a,"bool","bool",l,!1)}encode(a){return Nr.encode(a?1:0)}decode(a,l){try{const y=Nr.decode(a,l);return{consumed:y.consumed,value:this.coerceFunc("bool",!y.value.isZero())}}catch(y){throw y.reason==="insufficient data for uint256 type"?D("insufficient data for boolean type",K,{arg:this.localName,coderType:"boolean",value:y.value}):y}}},string:class extends pr{constructor(a,l){super(a,"string","string",l,!0)}encode(a){if(typeof a!="string")throw D("invalid string value",K,{arg:this.localName,coderType:"string",value:a});return Vl(F(a))}decode(a,l){const y=Gl(a,l,this.localName);return y.value=this.coerceFunc("string",N(y.value)),y}},bytes:class extends pr{constructor(a,l){super(a,"bytes","bytes",l,!0)}encode(a){try{return Vl(Ya(a))}catch(l){throw l("invalid bytes value",K,{arg:this.localName,coderType:"bytes",value:l.value})}}decode(a,l){const y=Gl(a,l,this.localName);return y.value=this.coerceFunc("bytes",y.value),y}},function:class extends Hl{constructor(a,l){super(a,24,l)}}};function us(a,l){const y=Tm[l.type];if(y)return new y(a,l.name);let I=l.type.match(ql);if(I){const j=parseInt(I[2]||"256");if(j===0||j>256||j%8!=0)throw D("invalid "+I[1]+" bit length",K,{arg:"param",value:l});return new Ul(a,j/8,I[1]==="int",l.name)}if(I=l.type.match(bm),I){const j=parseInt(I[1]);if(j===0||j>32)throw D("invalid bytes length",K,{arg:"param",value:l});return new Hl(a,j,l.name)}if(I=l.type.match(wm),I){const j=Object.assign({},l),H=parseInt(I[2]||"-1");return j.type=I[1],new Cm(a,us(a,j),H,l.name)}if(l.type.substring(0,5)==="tuple")return(function(j,H,se){H||(H=[]);const pe=H.map((Ie=>us(j,Ie)));return new Qa(j,pe,se)})(a,l.components,l.name);if(l.type==="")return new Sm(a,l.name);throw D("invalid type",K,{arg:"type",value:l.type,fullType:l})}class Za{constructor(l){(function(y,I){if(!(y instanceof I))throw D("missing new","MISSING_NEW",{name:I.name})})(this,Za),l||(l=_m),Ml(this,"coerceFunc",l)}encode(l,y){if(l.length!==y.length)throw D("types/values length mismatch",K,{count:{types:l.length,values:y.length},value:{types:l,values:y}});const I=l.map((j=>typeof j=="string"?Dl(j):j)).map((j=>us(this.coerceFunc,j)));return new Qa(this.coerceFunc,I,"_").encode(y)}decode(l,y){const I=l.map((j=>typeof j=="string"?Dl(j):j)).map((j=>us(this.coerceFunc,j)));return new Qa(this.coerceFunc,I,"_").decode(y,0).value}}const Wl=new Za;var Kl,Ee;function xe(a,l,y,I){var j,H=arguments.length,se=H<3?l:I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(a,l,y,I);else for(var pe=a.length-1;pe>=0;pe--)(j=a[pe])&&(se=(H<3?j(se):H>3?j(l,y,se):j(l,y))||se);return H>3&&se&&Object.defineProperty(l,y,se),se}function Ce(a,l){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,l)}r.coder=void 0,(Kl=r.coder||(r.coder={})).encodeParams=function(a,l){return P(Wl.encode(a,l))},Kl.decodeParams=function(a,l){if(a.length>0&&(!l||l==="0x"||l==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Wl.decode(a,q("0x"+l.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class ke{constructor(l){this.callName=l.callName,this.params=l.params||0,this.inputFormatter=l.inputFormatter||null,this.outputFormatter=l.outputFormatter}validateArgs(l){if(l.length!==this.params)throw y=this.callName,I=l.length,j=this.params,new Error(`Invalid number of input parameters to RPC method "${y}" given: ${I}, expected: ${j}`);var y,I,j}formatInput(l){return this.inputFormatter?this.inputFormatter.map((function(y,I){return y?y(l[I]):l[I]})):l}formatOutput(l){return l!==null?this.outputFormatter(l):null}toPayload(l){const y=this.formatInput(l);return this.validateArgs(y),{method:this.callName,params:y}}async execute(l,...y){const I=this.toPayload(y);if(!l)throw new Error("Missing RequestManager in method#exec");const j=await l.sendAsync(I);return this.formatOutput(j)}}class Ut{constructor(l){this.getter=l.getter,this.outputFormatter=l.outputFormatter}formatOutput(l){return this.outputFormatter(l)}async execute(l,...y){const I=await l.sendAsync({method:this.getter,params:[]});return this.formatOutput(I)}}function Yl(a){return new Promise((l=>setTimeout(l,a)))}r.eth=void 0,(Ee=r.eth||(r.eth={})).eth_getBalance=new ke({callName:"eth_getBalance",params:2,inputFormatter:[qt,fn],outputFormatter:za}),Ee.eth_getStorageAt=new ke({callName:"eth_getStorageAt",params:3,inputFormatter:[qt,Ae,fn],outputFormatter:qe}),Ee.eth_getCode=new ke({callName:"eth_getCode",params:2,inputFormatter:[qt,fn],outputFormatter:qe}),Ee.eth_getBlockByHash=new ke({callName:"eth_getBlockByHash",params:2,inputFormatter:[yt,function(a){return!!a}],outputFormatter:wo}),Ee.eth_getBlockByNumber=new ke({callName:"eth_getBlockByNumber",params:2,inputFormatter:[yt,function(a){return!!a}],outputFormatter:wo}),Ee.eth_getUncleByBlockHashAndIndex=new ke({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[yt,Ae],outputFormatter:wo}),Ee.eth_getUncleByBlockNumberAndIndex=new ke({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[yt,Ae],outputFormatter:wo}),Ee.eth_getBlockTransactionCountByHash=new ke({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[yt],outputFormatter:ye}),Ee.eth_getBlockTransactionCountByNumber=new ke({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[yt],outputFormatter:ye}),Ee.eth_getUncleCountByBlockHash=new ke({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[yt],outputFormatter:ye}),Ee.eth_getUncleCountByBlockNumber=new ke({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[yt],outputFormatter:ye}),Ee.eth_getTransactionByHash=new ke({callName:"eth_getTransactionByHash",params:1,inputFormatter:[Fn],outputFormatter:bo}),Ee.eth_getTransactionByBlockHashAndIndex=new ke({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[yt,Ae],outputFormatter:bo}),Ee.eth_getTransactionByBlockNumberAndIndex=new ke({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[yt,Ae],outputFormatter:bo}),Ee.eth_getTransactionReceipt=new ke({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[Fn],outputFormatter:Bl}),Ee.eth_getTransactionCount=new ke({callName:"eth_getTransactionCount",params:2,inputFormatter:[qt,fn],outputFormatter:ye}),Ee.eth_sendRawTransaction=new ke({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:qe}),Ee.web3_sha3=new ke({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:qe}),Ee.eth_sendTransaction=new ke({callName:"eth_sendTransaction",params:1,inputFormatter:[Ka],outputFormatter:qe}),Ee.eth_sign=new ke({callName:"eth_sign",params:2,inputFormatter:[qt,null],outputFormatter:qe}),Ee.eth_call=new ke({callName:"eth_call",params:2,inputFormatter:[Wa,fn],outputFormatter:qe}),Ee.eth_estimateGas=new ke({callName:"eth_estimateGas",params:1,inputFormatter:[Wa],outputFormatter:ye}),Ee.eth_submitWork=new ke({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:fe}),Ee.eth_getWork=new ke({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:gt}),Ee.eth_coinbase=new Ut({getter:"eth_coinbase",outputFormatter:zr}),Ee.eth_mining=new Ut({getter:"eth_mining",outputFormatter:fe}),Ee.eth_hashrate=new Ut({getter:"eth_hashrate",outputFormatter:ye}),Ee.eth_syncing=new Ut({getter:"eth_syncing",outputFormatter:Ll}),Ee.eth_gasPrice=new Ut({getter:"eth_gasPrice",outputFormatter:za}),Ee.eth_accounts=new Ut({getter:"eth_accounts",outputFormatter:gt}),Ee.eth_blockNumber=new Ut({getter:"eth_blockNumber",outputFormatter:ye}),Ee.eth_protocolVersion=new Ut({getter:"eth_protocolVersion",outputFormatter:ye}),Ee.web3_clientVersion=new Ut({getter:"web3_clientVersion",outputFormatter:Ve}),Ee.net_version=new Ut({getter:"net_version",outputFormatter:Ve}),Ee.shh_version=new ke({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:ye}),Ee.shh_post=new ke({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:fe}),Ee.personal_newAccount=new ke({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:zr}),Ee.personal_importRawKey=new ke({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:zr}),Ee.personal_sign=new ke({callName:"personal_sign",params:3,inputFormatter:[he,qt,null],outputFormatter:qe}),Ee.personal_ecRecover=new ke({callName:"personal_ecRecover",params:2,inputFormatter:[he,null],outputFormatter:zr}),Ee.personal_unlockAccount=new ke({callName:"personal_unlockAccount",params:3,inputFormatter:[qt,null,Se],outputFormatter:fe}),Ee.personal_sendTransaction=new ke({callName:"personal_sendTransaction",params:2,inputFormatter:[Ka,null],outputFormatter:qe}),Ee.personal_lockAccount=new ke({callName:"personal_lockAccount",params:1,inputFormatter:[qt],outputFormatter:fe}),Ee.personal_listAccounts=new Ut({getter:"personal_listAccounts",outputFormatter:gt}),Ee.net_listening=new Ut({getter:"net_listening",outputFormatter:fe}),Ee.net_peerCount=new Ut({getter:"net_peerCount",outputFormatter:ye}),Ee.eth_newFilter=new ke({callName:"eth_newFilter",params:1,inputFormatter:[Fl],outputFormatter:Ae}),Ee.eth_getLogs=new ke({callName:"eth_getLogs",params:1,inputFormatter:[gt],outputFormatter:gt}),Ee.eth_newBlockFilter=new ke({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Ae}),Ee.eth_newPendingTransactionFilter=new ke({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Ae}),Ee.eth_uninstallFilter=new ke({callName:"eth_uninstallFilter",params:1,inputFormatter:[Ae],outputFormatter:fe}),Ee.eth_getFilterLogs=new ke({callName:"eth_getFilterLogs",params:1,inputFormatter:[Ae],outputFormatter:gt}),Ee.eth_getFilterChanges=new ke({callName:"eth_getFilterChanges",params:1,inputFormatter:[Ae],outputFormatter:gt}),Ee.eth_submitHashrate=new ke({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:fe}),Ee.shh_newIdentity=new ke({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:qe}),Ee.shh_hasIdentity=new ke({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:fe}),Ee.shh_newGroup=new ke({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:qe}),Ee.shh_addToGroup=new ke({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:fe}),Ee.shh_newFilter=new ke({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Ae}),Ee.shh_uninstallFilter=new ke({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:fe}),Ee.shh_getLogs=new ke({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:gt}),Ee.shh_getFilterMessages=new ke({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:gt}),Ee.shh_getFilterChanges=new ke({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:gt}),Ee.shh_getMessages=new ke({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:gt});function Te(a,l){const y=r.eth[l];if(!y)throw new Error(`Could not find the method/property named ${l.toString()}`);Object.defineProperty(a,l,{value:function(...I){return y.execute(this,...I)}})}class _e{constructor(l){this.provider=l,this.requests=new Map}async sendAsync(l){const y=await this.provider;if(!y)throw new Error("Provider not set or invalid");const I=Ga(l.method,l.params),j=i();return this.requests.set(I.id,j),y.sendAsync(I,((H,se)=>{this.requests.delete(I.id),H?j.reject(H):Ol(se)?j.resolve(se.result):j.reject((function(pe){const Ie=pe&&pe.error&&pe.error.message?pe.error.message:"Invalid JSON RPC response: "+JSON.stringify(pe);return new Error(Ie)})(se))})),j}setProvider(l){this.provider=l}async getConfirmedTransaction(l){const y=await this.waitForCompletion(l);if(this.isFailure(y))throw new Error(`Transaction "${l}" failed`);return y}async waitForCompletion(l,y){const I=Fn(l);if(await this.isTxDropped(I,y)){const j=await this.getTransactionAndReceipt(I);return Object.assign(Object.assign({},j),{status:r.TransactionStatus.failed})}for(;;){const j=await this.getTransactionAndReceipt(I);if(!this.isPending(j)&&j.receipt)return Object.assign(Object.assign({},j),{status:this.isFailure(j)?r.TransactionStatus.failed:r.TransactionStatus.confirmed});await Yl(2e3)}}async getTransaction(l){let y,I=null;const j=Fn(l);try{const se=(await this.eth_accounts())[0];se&&(I=await this.eth_getTransactionCount(se,"latest"))}catch{I=null}try{if(y=await this.eth_getTransactionByHash(j),y===null)return null}catch{return null}if(y.blockNumber===null){if(I!==null){if(y.nonce<I)return{hash:j,type:r.TransactionType.replaced,nonce:y.nonce};if(y.nonce>I)return{hash:j,type:r.TransactionType.queued,nonce:y.nonce}}return Object.assign({type:r.TransactionType.pending},y)}let H;try{if(H=await this.eth_getTransactionReceipt(j),H===null||H.status===0)return Object.assign({type:r.TransactionType.reverted},y)}catch{return null}return Object.assign(Object.assign({type:r.TransactionType.confirmed},y),{receipt:H})}async isTxDropped(l,y=15){let I=y;for(;I>0;){if(await this.getTransactionAndReceipt(l)!==null)return!1;I-=1,await Yl(2e3)}return!0}async getTransactionAndReceipt(l){l=Fn(l);const[y,I]=await Promise.all([this.eth_getTransactionByHash(l),this.eth_getTransactionReceipt(l)]);return Object.assign(Object.assign({},y),{receipt:I})}isPending(l){return l&&l.blockNumber===null}isFailure(l){return l&&(!l.receipt||l.receipt.status===0)}}xe([Te,Ce("design:type",Function)],_e.prototype,"web3_clientVersion",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"web3_sha3",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"net_version",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"net_peerCount",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"net_listening",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_protocolVersion",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_syncing",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_coinbase",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_mining",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_hashrate",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_gasPrice",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_accounts",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_blockNumber",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getBalance",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getStorageAt",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getTransactionCount",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getBlockTransactionCountByHash",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getBlockTransactionCountByNumber",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getUncleCountByBlockHash",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getUncleCountByBlockNumber",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getCode",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_sign",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_sendTransaction",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_sendRawTransaction",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_call",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_estimateGas",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getBlockByHash",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getBlockByNumber",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getTransactionByHash",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getTransactionReceipt",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getUncleByBlockHashAndIndex",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_newFilter",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_newBlockFilter",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_newPendingTransactionFilter",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_uninstallFilter",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getFilterChanges",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getFilterLogs",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getLogs",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_getWork",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_submitWork",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"eth_submitHashrate",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_post",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_version",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_newIdentity",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_hasIdentity",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_newGroup",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_addToGroup",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_newFilter",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_uninstallFilter",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_getFilterChanges",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"shh_getMessages",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_unlockAccount",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_newAccount",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_listAccounts",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_lockAccount",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_importRawKey",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_sendTransaction",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_sign",void 0),xe([Te,Ce("design:type",Function)],_e.prototype,"personal_ecRecover",void 0);class Ql{constructor(l){this.json=l,this._inputTypes=l.inputs||[],this._outputTypes=l.outputs||[],this._constant=!!l.constant,this._payable=!!l.payable||l.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in l&&!l.constant||l.stateMutability==="nonpayable",this._name=ce(l)}extractDefaultBlock(l){return l.length>this._inputTypes.length&&!Dt(l[l.length-1])&&fn(l.pop())||"latest"}validateArgs(l){if(l.some((H=>H===void 0)))throw new Error("Invalid call, some arguments are undefined");const y=l.filter((function(H){return!(Dt(H)===!0&&rr(H)===!1&&$t(H)===!1&&!(H instanceof Uint8Array))}));if(y.length!==this._inputTypes.length)throw I=y.length,j=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${I}, expected: ${j}`);var I,j}toPayload(l){let y={to:void 0,data:void 0,value:void 0,from:void 0};l.length>this._inputTypes.length&&Dt(l[l.length-1])&&(y=l.pop()),this.validateArgs(l);const I=this.signature();let j=r.coder.encodeParams(this._inputTypes,l);return j.indexOf("0x")===0&&(j=j.substr(2)),y.data="0x"+I+j,y}signature(){return O(this._name).slice(0,8)}unpackOutput(l){if(!l)return;const y=l.length>=2?l.slice(2):l,I=r.coder.decodeParams(this._outputTypes,y);return I.length===1?I[0]:I}async execute(l,y,...I){if(!l)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const j=this.toPayload(I);if(j.to=y,j.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!j.from)throw new Error('Missing "from" in transaction options');return await l.eth_sendTransaction(j)}{const j=this.extractDefaultBlock(I),H=this.toPayload(I);H.to=y;const se=await l.eth_call(H,j);return this.unpackOutput(se)}}estimateGas(l,y,...I){if(!(l instanceof _e))throw new Error("estimateGas needs to receive a RequestManager as first argument");const j=this.toPayload(I);return j.to=y,l.eth_estimateGas(j)}displayName(){return Pe(this._name)}typeName(){return we(this._name)||"void"}attachToContract(l){const y=this.displayName(),I=Object.assign(((...j)=>this.execute(l.requestManager,l.address,...j)),{estimateGas:this.estimateGas.bind(this,l.requestManager,l.address),toPayload:(...j)=>this.toPayload(j),toRPCMessage:(...j)=>{const H=this.extractDefaultBlock(j),se=this.toPayload(j);return se.to=l.address,{method:"eth_call",params:[se,H]}},unpackOutput:j=>this.unpackOutput(j)});l[y]||(l[y]=I),l[y][this.typeName()]=I}}function Zl(a){if(a==null)return null;const l=String(a).toString();return l.indexOf("0x")===0?l:P(F(l))}class Ja{constructor(l){this.requestManager=l,this.isStarted=!1,this.isDisposed=!1,this.formatter=y=>y,this.filterId=i(),this.callbacks=[],this.stopSemaphore=i()}async watch(l){if(this.isDisposed)throw new Error("The filter was disposed");l&&(this.callbacks.push(l),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const l=await this.getNewFilter();if(!l)throw new Error("Could not create a filter, response: "+JSON.stringify(l));this.filterId.resolve(l)}catch(l){throw l}this.stopSemaphore=i(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const l=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${l}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const y=await this.getChanges();y&&this.callbacks.forEach((I=>{this.formatter?y.forEach((j=>{I(this.formatter(j))})):y.forEach((j=>I(j)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=i(),setTimeout((l=()=>this.poll(),function(){l().catch((y=>console.error(y)))}),500))}else this.stopSemaphore.resolve(1);var l}}class Eo extends Ja{constructor(l,y,I=(j=>j)){super(l),this.requestManager=l,this.options=y,this.formatter=I,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(j){return Zl(j)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?yt(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?yt(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const l=await this.filterId;return this.requestManager.eth_getFilterLogs(l)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const l=await this.filterId;return this.requestManager.eth_getFilterChanges(l)}async uninstall(){const l=await this.filterId;return this.requestManager.eth_uninstallFilter(l)}}class Xa{constructor(l,y,I){this.requestManager=l,this.address=I,this._anonymous=!1,this._params=y.inputs||[],this._name=ce(y),this._anonymous=y.anonymous||!1}types(l){return this._params.filter((function(y){return y.indexed===l}))}displayName(){return Pe(this._name)}typeName(){return we(this._name)||"void"}signature(){return O(this._name)}encode(l={},y={}){const I={topics:[],address:this.address};y.fromBlock!==void 0&&(I.fromBlock=yt(y.fromBlock)||void 0),y.toBlock!==void 0&&(I.toBlock=yt(y.toBlock)||void 0),I.topics=I.topics||[],this._anonymous||I.topics.push("0x"+this.signature());const j=this._params.filter((function(H){return H.indexed===!0})).map((function(H){const se=l[H.name];return se==null?null:rr(se)?se.map((function(pe){return"0x"+r.coder.encodeParams([H],[pe])})):"0x"+r.coder.encodeParams([H],[se])}));return I.topics=I.topics.concat(j),I}decode(l){l.data=l.data||"",l.topics=l.topics||[];const y=(this._anonymous?l.topics:l.topics.slice(1)).map((function(pe){return pe.slice(2)})).join(""),I=r.coder.decodeParams(this.types(!0),y),j=l.data.slice(2),H=r.coder.decodeParams(this.types(!1),j),se=this._params.reduce((function(pe,Ie){return pe[Ie.name]=Ie.indexed?I.shift():H.shift(),pe}),{});return Object.assign(Object.assign({},is(l)),{event:this.displayName(),address:l.address,args:se})}async execute(l,y){const I=this.encode(l,y),j=this.decode.bind(this);return new Eo(this.requestManager,I,j)}attachToContract(l){const y=this.execute.bind(this),I=this.displayName();l.events[I]||(l.events[I]=y),l.events[I][this.typeName()]=this.execute.bind(this,l)}}class Am{constructor(l,y,I){this._requestManager=l,this._json=y,this._address=I}encode(l={}){const y={address:this._address};return l.fromBlock!==void 0&&(y.fromBlock=yt(l.fromBlock)||void 0),l.toBlock!==void 0&&(y.toBlock=yt(l.toBlock)||void 0),y}decode(l){l.data=l.data||"";const y=rr(l.topics)&&At(l.topics[0])?l.topics[0].slice(2):"",I=this._json.filter((function(j){return y===O(ce(j))}))[0];return I?new Xa(this._requestManager,I,this._address).decode(l):is(l)}async execute(l){const y=this.encode(l),I=this.decode.bind(this);return new Eo(this._requestManager,y,I)}getAllEventsFunction(){return this.execute.bind(this)}}class Jl{constructor(l,y,I){var j;this.requestManager=l,this.abi=y,this.address=I,this.events={},this.transactionHash=null,this.address=I,this.abi=y,(j=this).abi.filter((function(H){return H.type==="function"})).map((function(H){return new Ql(H)})).forEach((function(H){H.attachToContract(j)})),this.allEvents=(function(H){const se=H.abi.filter((function(Ie){return Ie.type==="event"})),pe=new Am(H.requestManager,se,H.address);return se.map((function(Ie){return new Xa(H.requestManager,Ie,H.address)})).forEach((function(Ie){Ie.attachToContract(H)})),pe.getAllEventsFunction()})(this)}}r.AbstractFilter=Ja,r.BigNumber=ne,r.Contract=Jl,r.ContractFactory=class{constructor(a,l){this.requestManager=a,this.abi=l}async deploy(...a){let l;const y=a[a.length-1];if(Dt(y)&&!rr(y)&&(l=a.pop()),!l)throw new Error("Missing options object");if(!l.data||typeof l.data!="string")throw new Error("Invalid options.data");if(ye(l.value)>0&&!(this.abi.filter((function(Ne){return Ne.type==="constructor"&&Ne.inputs.length===a.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const I=(j=this.abi,H=a,j.filter((function(Ne){return Ne.type==="constructor"&&Ne.inputs&&Ne.inputs.length===H.length})).map((function(Ne){return Ne.inputs||[]})).map((function(Ne){return r.coder.encodeParams(Ne,H)}))[0]||"");var j,H;l.data+=I,l.gas||(l.gas=await this.requestManager.eth_estimateGas(l));const se=await this.requestManager.eth_sendTransaction(l);if(!se)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const pe=await(async function(Ne,jt){const at=i();let ge=0;const _t=()=>{ge++,ge>50?at.reject(new Error("Contract transaction couldn't be found after 50 blocks")):Ne.eth_getTransactionReceipt(jt).then((It=>{It&&It.blockHash?at.resolve(It):setTimeout(_t,1e3)}),(It=>at.reject(It)))};_t();const Je=await at,Xe=await Ne.eth_getCode(Je.contractAddress,"latest");if(Xe&&Xe.length>3)return Je.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Xe,receipt:Je})})(this.requestManager,se),Ie=await this.at(pe);return Ie.transactionHash=se,Ie}async at(a){if(!Wt(a))throw new TypeError(`Invalid address ${JSON.stringify(a)}`);return new Jl(this.requestManager,this.abi,a)}},r.EthBlockFilter=class extends Eo{constructor(a){super(a,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},r.EthFilter=Eo,r.EthPendingTransactionFilter=class extends Eo{constructor(a){super(a,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},r.HTTPProvider=class{constructor(a,l={}){this.host=a,this.options=l,this.debug=!1,this.host=a||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(a,l){try{let y=null;y=a instanceof Array?a.map((H=>n(H))):n(a);const I=this.options.fetch||globalThis.fetch;if(I===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const j={body:JSON.stringify(y),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+j.body),I(this.host,j).then((async H=>{if(H.ok){const se=await H.json();this.debug&&console.log("RECV << "+JSON.stringify(se)),se.error?l(Object.assign(new Error(se.error.json||se.error),se.error)):l(null,se)}else{const se=(typeof H.text=="function"?await H.text().catch((()=>"")):"").trim().slice(0,512),pe="External error. response code: "+H.status+(se?" — "+se:"");this.debug&&console.log("ERR << "+pe),l(new Error(pe))}}),(H=>{this.debug&&console.log("ERR << "+JSON.stringify(H)),l(H)}))}catch(y){this.debug&&console.log("ERR << "+JSON.stringify(y)),l(y)}}},r.Method=ke,r.Property=Ut,r.RequestManager=_e,r.SHHFilter=class extends Ja{constructor(a,l){super(a),this.requestManager=a,this.options=l,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(y){return Zl(y)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const a=await this.filterId;return this.requestManager.shh_getMessages(a)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const a=await this.filterId;return this.requestManager.shh_getFilterChanges(a)}async uninstall(){const a=await this.filterId;return this.requestManager.shh_uninstallFilter(a)}},r.SolidityEvent=Xa,r.SolidityFunction=Ql,r.WebSocketProvider=class{constructor(a,l={}){this.url=a,this.options=l,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const a=this.connection;this.timeout(new Error("Provider disposed.")),a.then((l=>l.close())).catch((l=>{this.debug&&console.error(l)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(a,l){const y=[];let I;if(a instanceof Array)I=Promise.all(a.map((j=>{const H=i();try{const se=n(j);y.push(se),this.responseCallbacks.set(se.id,H)}catch(se){H.reject(se)}return H})));else{const j=i();try{const H=n(a);y.push(H),this.responseCallbacks.set(H.id,j)}catch(H){j.reject(H)}I=j}I.then((j=>l(null,j)),(j=>l(j))),this.connection.then((j=>{y.forEach((H=>{const se=JSON.stringify(H);this.debug&&console.log("SEND >> "+se),j.send(se)}))}),(j=>{l(j)}))}parseResponse(a){const l=[];return a.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((y=>{let I=y;this.lastChunk&&(I=this.lastChunk+I);let j=null;try{j=JSON.parse(I)}catch{return this.lastChunk=I,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",j&&l.push(j)})),l}processMessage(a){if("id"in a){const l=a.id,y=this.responseCallbacks.get(l);if(!y)return void console.error("Error: Received a response for an unknown request",a);this.responseCallbacks.delete(l),a.error!==void 0&&a.error!==null?y.reject(Object.assign(new Error(a.error.message||a.error),a.error)):"result"in a&&y.resolve(a)}else this.notificationCallbacks.forEach((l=>l(null,a)))}timeout(a){this.connection&&this.connection.isPending||(this.connection=i());const l=a||new Error("Connection timeout");this.responseCallbacks.forEach((y=>y.reject(l))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((y=>y.close())).catch((y=>{this.debug&&console.error(y)})),this.connection&&this.connection.isPending||(this.connection=i()),this.lastChunk="";const a=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!a)throw new Error("Please provide a WebSocketConstructor");const l=new a(this.url,this.options.protocol);l.onopen=()=>{this.connection.resolve(l)},l.onerror=y=>{const I=new Error("Error in web socket");I.data=y,this.timeout(I)},l.onclose=y=>{this.timeout(new Error(`Connection closed (${y&&y.reason||"Unknown reason"})`))},l.onmessage=y=>{const I=typeof y.data=="string"?y.data:"";this.debug&&console.log("RECV << "+y.data),this.parseResponse(I).forEach((j=>{j instanceof Array?j.forEach((H=>this.processMessage(H))):this.processMessage(j)}))}}},r.bytesToHex=P,r.bytesToUtf8String=N,r.concatBytes=ie,r.default=_e,r.extractDisplayName=Pe,r.extractTypeName=we,r.fromAscii=function(a,l=0){let y="";for(let I=0;I<a.length;I++){const j=a.charCodeAt(I).toString(16);y+=j.length<2?"0"+j:j}return"0x"+y.padEnd(l,"0")},r.fromDecimal=ve,r.fromTwosComplement=tr,r.fromWei=function(a,l){const y=Fe(a).dividedBy(Be(l));return $t(a)?y:y.toString(10)},r.getAddress=Mt,r.getValueOfUnit=Be,r.hexToBytes=q,r.inputAddressFormatter=qt,r.inputBlockNumberFormatter=yt,r.inputCallFormatter=Wa,r.inputDefaultBlockNumberFormatter=fn,r.inputFilterOptions=Fl,r.inputPostFormatter=function(a){return a?(a.ttl=ve(a.ttl),a.workToProve=ve(a.workToProve),a.priority=ve(a.priority),rr(a.topics)||(a.topics=a.topics?[a.topics]:[]),a.topics=a.topics.map((function(l){return l.indexOf("0x")===0?l:"0x"+P(F(l))})),a):null},r.inputTransactionFormatter=Ka,r.inputTransactionId=Fn,r.isAddress=Wt,r.isArray=rr,r.isBigNumber=$t,r.isBloom=function(a){return!!/^(0x)?[0-9a-f]{512}$/i.test(a)&&!!/^(0x)?[0-9a-f]{512}$/i.test(a)},r.isBoolean=vo,r.isChecksumAddress=jn,r.isFunction=function(a){return typeof a=="function"},r.isHex=function(a){return typeof a=="string"&&/^0x[0-9a-fA-F]+$/.test(a)},r.isJson=function(a){try{return!!JSON.parse(a)}catch{return!1}},r.isObject=Dt,r.isPredefinedBlockNumber=jl,r.isStrictAddress=Pr,r.isString=At,r.isTopic=function(a){return!!/^(0x)?[0-9a-f]{64}$/i.test(a)&&!!/^(0x)?[0-9a-f]{64}$/i.test(a)},r.isValidResponse=Ol,r.outputBigNumberFormatter=za,r.outputBlockFormatter=wo,r.outputLogFormatter=is,r.outputPostFormatter=function(a){return a?(a.expiry=ye(a.expiry),a.sent=ye(a.sent),a.ttl=ye(a.ttl),a.workProved=ye(a.workProved),a.topics||(a.topics=[]),a.topics=a.topics.map((function(l){return le(l)})),a):null},r.outputSyncingFormatter=Ll,r.outputTransactionFormatter=bo,r.outputTransactionReceiptFormatter=Bl,r.padLeft=Z,r.padRight=function(a,l,y){return a+new Array(l-a.length+1).join(y||"0")},r.sha3=O,r.signedIsNegative=Lt,r.stringToUtf8Bytes=F,r.toAddress=zr,r.toArray=gt,r.toAscii=le,r.toBatchPayload=function(a){return a.map((function(l){return Ga(l.method,l.params)}))},r.toBigNumber=Fe,r.toBoolean=fe,r.toChecksumAddress=hr,r.toData=qe,r.toDecimal=ye,r.toHex=Ae,r.toJsonRpcRequest=Ga,r.toNullDecimal=Se,r.toString=Ve,r.toStringData=he,r.toTwosComplement=rt,r.toWei=function(a,l){const y=Fe(a).times(Be(l));return $t(a)?y:y.toString(10)},r.transformToFullName=ce,Object.defineProperty(r,"__esModule",{value:!0})}))})(ko,ko.exports)),ko.exports}var Qs={},Eu;function Zg(){if(Eu)return Qs;Eu=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.SignatureValidator=t;const e=Ea();async function t(r,n){const o=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(r,o).at(n)}return Qs}var br={},ai={},ii={},pn={},Fr={},vt={},Su;function il(){if(Su)return vt;Su=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.output=vt.exists=vt.hash=vt.bytes=vt.bool=vt.number=vt.isBytes=void 0;function e(d){if(!Number.isSafeInteger(d)||d<0)throw new Error(`positive integer expected, not ${d}`)}vt.number=e;function t(d){if(typeof d!="boolean")throw new Error(`boolean expected, not ${d}`)}vt.bool=t;function r(d){return d instanceof Uint8Array||d!=null&&typeof d=="object"&&d.constructor.name==="Uint8Array"}vt.isBytes=r;function n(d,...h){if(!r(d))throw new Error("Uint8Array expected");if(h.length>0&&!h.includes(d.length))throw new Error(`Uint8Array expected of length ${h}, not of length=${d.length}`)}vt.bytes=n;function o(d){if(typeof d!="function"||typeof d.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(d.outputLen),e(d.blockLen)}vt.hash=o;function s(d,h=!0){if(d.destroyed)throw new Error("Hash instance has been destroyed");if(h&&d.finished)throw new Error("Hash#digest() has already been called")}vt.exists=s;function i(d,h){n(d);const m=h.outputLen;if(d.length<m)throw new Error(`digestInto() expects output buffer of length at least ${m}`)}vt.output=i;const u={number:e,bool:t,bytes:n,hash:o,exists:s,output:i};return vt.default=u,vt}var ci={},So={},xu;function Jg(){return xu||(xu=1,Object.defineProperty(So,"__esModule",{value:!0}),So.crypto=void 0,So.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0),So}var Cu;function Xo(){return Cu||(Cu=1,(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const t=Jg(),r=il();function n(X){return X instanceof Uint8Array||X!=null&&typeof X=="object"&&X.constructor.name==="Uint8Array"}e.isBytes=n;const o=X=>new Uint8Array(X.buffer,X.byteOffset,X.byteLength);e.u8=o;const s=X=>new Uint32Array(X.buffer,X.byteOffset,Math.floor(X.byteLength/4));e.u32=s;const i=X=>new DataView(X.buffer,X.byteOffset,X.byteLength);e.createView=i;const u=(X,F)=>X<<32-F|X>>>F;e.rotr=u;const d=(X,F)=>X<<F|X>>>32-F>>>0;e.rotl=d,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const h=X=>X<<24&4278190080|X<<8&16711680|X>>>8&65280|X>>>24&255;e.byteSwap=h,e.byteSwapIfBE=e.isLE?X=>X:X=>(0,e.byteSwap)(X);function m(X){for(let F=0;F<X.length;F++)X[F]=(0,e.byteSwap)(X[F])}e.byteSwap32=m;const p=Array.from({length:256},(X,F)=>F.toString(16).padStart(2,"0"));function b(X){(0,r.bytes)(X);let F="";for(let N=0;N<X.length;N++)F+=p[X[N]];return F}e.bytesToHex=b;const E={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function A(X){if(X>=E._0&&X<=E._9)return X-E._0;if(X>=E._A&&X<=E._F)return X-(E._A-10);if(X>=E._a&&X<=E._f)return X-(E._a-10)}function g(X){if(typeof X!="string")throw new Error("hex string expected, got "+typeof X);const F=X.length,N=F/2;if(F%2)throw new Error("padded hex string expected, got unpadded hex of length "+F);const Y=new Uint8Array(N);for(let K=0,D=0;K<N;K++,D+=2){const q=A(X.charCodeAt(D)),P=A(X.charCodeAt(D+1));if(q===void 0||P===void 0){const O=X[D]+X[D+1];throw new Error('hex string expected, got non-hex character "'+O+'" at index '+D)}Y[K]=q*16+P}return Y}e.hexToBytes=g;const T=async()=>{};e.nextTick=T;async function V(X,F,N){let Y=Date.now();for(let K=0;K<X;K++){N(K);const D=Date.now()-Y;D>=0&&D<F||(await(0,e.nextTick)(),Y+=D)}}e.asyncLoop=V;function v(X){if(typeof X!="string")throw new Error(`utf8ToBytes expected string, got ${typeof X}`);return new Uint8Array(new TextEncoder().encode(X))}e.utf8ToBytes=v;function R(X){return typeof X=="string"&&(X=v(X)),(0,r.bytes)(X),X}e.toBytes=R;function w(...X){let F=0;for(let Y=0;Y<X.length;Y++){const K=X[Y];(0,r.bytes)(K),F+=K.length}const N=new Uint8Array(F);for(let Y=0,K=0;Y<X.length;Y++){const D=X[Y];N.set(D,K),K+=D.length}return N}e.concatBytes=w;class Q{clone(){return this._cloneInto()}}e.Hash=Q;const U={}.toString;function x(X,F){if(F!==void 0&&U.call(F)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(X,F)}e.checkOpts=x;function $(X){const F=Y=>X().update(R(Y)).digest(),N=X();return F.outputLen=N.outputLen,F.blockLen=N.blockLen,F.create=()=>X(),F}e.wrapConstructor=$;function J(X){const F=(Y,K)=>X(K).update(R(Y)).digest(),N=X({});return F.outputLen=N.outputLen,F.blockLen=N.blockLen,F.create=Y=>X(Y),F}e.wrapConstructorWithOpts=J;function W(X){const F=(Y,K)=>X(K).update(R(Y)).digest(),N=X({});return F.outputLen=N.outputLen,F.blockLen=N.blockLen,F.create=Y=>X(Y),F}e.wrapXOFConstructorWithOpts=W;function ne(X=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(X));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=ne})(ci)),ci}var Tu;function Xg(){if(Tu)return Fr;Tu=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.HashMD=Fr.Maj=Fr.Chi=void 0;const e=il(),t=Xo();function r(i,u,d,h){if(typeof i.setBigUint64=="function")return i.setBigUint64(u,d,h);const m=BigInt(32),p=BigInt(4294967295),b=Number(d>>m&p),E=Number(d&p),A=h?4:0,g=h?0:4;i.setUint32(u+A,b,h),i.setUint32(u+g,E,h)}const n=(i,u,d)=>i&u^~i&d;Fr.Chi=n;const o=(i,u,d)=>i&u^i&d^u&d;Fr.Maj=o;class s extends t.Hash{constructor(u,d,h,m){super(),this.blockLen=u,this.outputLen=d,this.padOffset=h,this.isLE=m,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(u),this.view=(0,t.createView)(this.buffer)}update(u){(0,e.exists)(this);const{view:d,buffer:h,blockLen:m}=this;u=(0,t.toBytes)(u);const p=u.length;for(let b=0;b<p;){const E=Math.min(m-this.pos,p-b);if(E===m){const A=(0,t.createView)(u);for(;m<=p-b;b+=m)this.process(A,b);continue}h.set(u.subarray(b,b+E),this.pos),this.pos+=E,b+=E,this.pos===m&&(this.process(d,0),this.pos=0)}return this.length+=u.length,this.roundClean(),this}digestInto(u){(0,e.exists)(this),(0,e.output)(u,this),this.finished=!0;const{buffer:d,view:h,blockLen:m,isLE:p}=this;let{pos:b}=this;d[b++]=128,this.buffer.subarray(b).fill(0),this.padOffset>m-b&&(this.process(h,0),b=0);for(let V=b;V<m;V++)d[V]=0;r(h,m-8,BigInt(this.length*8),p),this.process(h,0);const E=(0,t.createView)(u),A=this.outputLen;if(A%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=A/4,T=this.get();if(g>T.length)throw new Error("_sha2: outputLen bigger than state");for(let V=0;V<g;V++)E.setUint32(4*V,T[V],p)}digest(){const{buffer:u,outputLen:d}=this;this.digestInto(u);const h=u.slice(0,d);return this.destroy(),h}_cloneInto(u){u||(u=new this.constructor),u.set(...this.get());const{blockLen:d,buffer:h,length:m,finished:p,destroyed:b,pos:E}=this;return u.length=m,u.pos=E,u.finished=p,u.destroyed=b,m%d&&u.buffer.set(h),u}}return Fr.HashMD=s,Fr}var Au;function ey(){if(Au)return pn;Au=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.sha224=pn.sha256=void 0;const e=Xg(),t=Xo(),r=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]),n=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),o=new Uint32Array(64);class s extends e.HashMD{constructor(){super(64,32,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){const{A:d,B:h,C:m,D:p,E:b,F:E,G:A,H:g}=this;return[d,h,m,p,b,E,A,g]}set(d,h,m,p,b,E,A,g){this.A=d|0,this.B=h|0,this.C=m|0,this.D=p|0,this.E=b|0,this.F=E|0,this.G=A|0,this.H=g|0}process(d,h){for(let v=0;v<16;v++,h+=4)o[v]=d.getUint32(h,!1);for(let v=16;v<64;v++){const R=o[v-15],w=o[v-2],Q=(0,t.rotr)(R,7)^(0,t.rotr)(R,18)^R>>>3,U=(0,t.rotr)(w,17)^(0,t.rotr)(w,19)^w>>>10;o[v]=U+o[v-7]+Q+o[v-16]|0}let{A:m,B:p,C:b,D:E,E:A,F:g,G:T,H:V}=this;for(let v=0;v<64;v++){const R=(0,t.rotr)(A,6)^(0,t.rotr)(A,11)^(0,t.rotr)(A,25),w=V+R+(0,e.Chi)(A,g,T)+r[v]+o[v]|0,U=((0,t.rotr)(m,2)^(0,t.rotr)(m,13)^(0,t.rotr)(m,22))+(0,e.Maj)(m,p,b)|0;V=T,T=g,g=A,A=E+w|0,E=b,b=p,p=m,m=w+U|0}m=m+this.A|0,p=p+this.B|0,b=b+this.C|0,E=E+this.D|0,A=A+this.E|0,g=g+this.F|0,T=T+this.G|0,V=V+this.H|0,this.set(m,p,b,E,A,g,T,V)}roundClean(){o.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class i extends s{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return pn.sha256=(0,t.wrapConstructor)(()=>new s),pn.sha224=(0,t.wrapConstructor)(()=>new i),pn}var xo={},li={},Iu;function ty(){return Iu||(Iu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=il(),r=Xo();class n extends r.Hash{constructor(i,u){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(i);const d=(0,r.toBytes)(u);if(this.iHash=i.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const h=this.blockLen,m=new Uint8Array(h);m.set(d.length>h?i.create().update(d).digest():d);for(let p=0;p<m.length;p++)m[p]^=54;this.iHash.update(m),this.oHash=i.create();for(let p=0;p<m.length;p++)m[p]^=106;this.oHash.update(m),m.fill(0)}update(i){return(0,t.exists)(this),this.iHash.update(i),this}digestInto(i){(0,t.exists)(this),(0,t.bytes)(i,this.outputLen),this.finished=!0,this.iHash.digestInto(i),this.oHash.update(i),this.oHash.digestInto(i),this.destroy()}digest(){const i=new Uint8Array(this.oHash.outputLen);return this.digestInto(i),i}_cloneInto(i){i||(i=Object.create(Object.getPrototypeOf(this),{}));const{oHash:u,iHash:d,finished:h,destroyed:m,blockLen:p,outputLen:b}=this;return i=i,i.finished=h,i.destroyed=m,i.blockLen=p,i.outputLen=b,i.oHash=u._cloneInto(i.oHash),i.iHash=d._cloneInto(i.iHash),i}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=n;const o=(s,i,u)=>new n(s,i).update(u).digest();e.hmac=o,e.hmac.create=(s,i)=>new n(s,i)})(li)),li}var ui={},Co={},ot={},tt={},Ru;function uo(){if(Ru)return tt;Ru=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.bitMask=void 0,tt.isBytes=n,tt.abytes=o,tt.bytesToHex=i,tt.numberToHexUnpadded=u,tt.hexToNumber=d,tt.hexToBytes=p,tt.bytesToNumberBE=b,tt.bytesToNumberLE=E,tt.numberToBytesBE=A,tt.numberToBytesLE=g,tt.numberToVarBytesBE=T,tt.ensureBytes=V,tt.concatBytes=v,tt.equalBytes=R,tt.utf8ToBytes=w,tt.bitLen=Q,tt.bitGet=U,tt.bitSet=x,tt.createHmacDrbg=ne,tt.validateObject=F;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=BigInt(0),t=BigInt(1),r=BigInt(2);function n(N){return N instanceof Uint8Array||N!=null&&typeof N=="object"&&N.constructor.name==="Uint8Array"}function o(N){if(!n(N))throw new Error("Uint8Array expected")}const s=Array.from({length:256},(N,Y)=>Y.toString(16).padStart(2,"0"));function i(N){o(N);let Y="";for(let K=0;K<N.length;K++)Y+=s[N[K]];return Y}function u(N){const Y=N.toString(16);return Y.length&1?`0${Y}`:Y}function d(N){if(typeof N!="string")throw new Error("hex string expected, got "+typeof N);return BigInt(N===""?"0":`0x${N}`)}const h={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function m(N){if(N>=h._0&&N<=h._9)return N-h._0;if(N>=h._A&&N<=h._F)return N-(h._A-10);if(N>=h._a&&N<=h._f)return N-(h._a-10)}function p(N){if(typeof N!="string")throw new Error("hex string expected, got "+typeof N);const Y=N.length,K=Y/2;if(Y%2)throw new Error("padded hex string expected, got unpadded hex of length "+Y);const D=new Uint8Array(K);for(let q=0,P=0;q<K;q++,P+=2){const O=m(N.charCodeAt(P)),G=m(N.charCodeAt(P+1));if(O===void 0||G===void 0){const Z=N[P]+N[P+1];throw new Error('hex string expected, got non-hex character "'+Z+'" at index '+P)}D[q]=O*16+G}return D}function b(N){return d(i(N))}function E(N){return o(N),d(i(Uint8Array.from(N).reverse()))}function A(N,Y){return p(N.toString(16).padStart(Y*2,"0"))}function g(N,Y){return A(N,Y).reverse()}function T(N){return p(u(N))}function V(N,Y,K){let D;if(typeof Y=="string")try{D=p(Y)}catch(P){throw new Error(`${N} must be valid hex string, got "${Y}". Cause: ${P}`)}else if(n(Y))D=Uint8Array.from(Y);else throw new Error(`${N} must be hex string or Uint8Array`);const q=D.length;if(typeof K=="number"&&q!==K)throw new Error(`${N} expected ${K} bytes, got ${q}`);return D}function v(...N){let Y=0;for(let D=0;D<N.length;D++){const q=N[D];o(q),Y+=q.length}const K=new Uint8Array(Y);for(let D=0,q=0;D<N.length;D++){const P=N[D];K.set(P,q),q+=P.length}return K}function R(N,Y){if(N.length!==Y.length)return!1;let K=0;for(let D=0;D<N.length;D++)K|=N[D]^Y[D];return K===0}function w(N){if(typeof N!="string")throw new Error(`utf8ToBytes expected string, got ${typeof N}`);return new Uint8Array(new TextEncoder().encode(N))}function Q(N){let Y;for(Y=0;N>e;N>>=t,Y+=1);return Y}function U(N,Y){return N>>BigInt(Y)&t}function x(N,Y,K){return N|(K?t:e)<<BigInt(Y)}const $=N=>(r<<BigInt(N-1))-t;tt.bitMask=$;const J=N=>new Uint8Array(N),W=N=>Uint8Array.from(N);function ne(N,Y,K){if(typeof N!="number"||N<2)throw new Error("hashLen must be a number");if(typeof Y!="number"||Y<2)throw new Error("qByteLen must be a number");if(typeof K!="function")throw new Error("hmacFn must be a function");let D=J(N),q=J(N),P=0;const O=()=>{D.fill(1),q.fill(0),P=0},G=(...ie)=>K(q,D,...ie),Z=(ie=J())=>{q=G(W([0]),ie),D=G(),ie.length!==0&&(q=G(W([1]),ie),D=G())},le=()=>{if(P++>=1e3)throw new Error("drbg: tried 1000 values");let ie=0;const de=[];for(;ie<Y;){D=G();const Pe=D.slice();de.push(Pe),ie+=D.length}return v(...de)};return(ie,de)=>{O(),Z(ie);let Pe;for(;!(Pe=de(le()));)Z();return O(),Pe}}const X={bigint:N=>typeof N=="bigint",function:N=>typeof N=="function",boolean:N=>typeof N=="boolean",string:N=>typeof N=="string",stringOrUint8Array:N=>typeof N=="string"||n(N),isSafeInteger:N=>Number.isSafeInteger(N),array:N=>Array.isArray(N),field:(N,Y)=>Y.Fp.isValid(N),hash:N=>typeof N=="function"&&Number.isSafeInteger(N.outputLen)};function F(N,Y,K={}){const D=(q,P,O)=>{const G=X[P];if(typeof G!="function")throw new Error(`Invalid validator "${P}", expected function`);const Z=N[q];if(!(O&&Z===void 0)&&!G(Z,N))throw new Error(`Invalid param ${String(q)}=${Z} (${typeof Z}), expected ${P}`)};for(const[q,P]of Object.entries(Y))D(q,P,!1);for(const[q,P]of Object.entries(K))D(q,P,!0);return N}return tt}var Pu;function Sa(){if(Pu)return ot;Pu=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.isNegativeLE=void 0,ot.mod=d,ot.pow=h,ot.pow2=m,ot.invert=p,ot.tonelliShanks=b,ot.FpSqrt=E,ot.validateField=T,ot.FpPow=V,ot.FpInvertBatch=v,ot.FpDiv=R,ot.FpIsSquare=w,ot.nLength=Q,ot.Field=U,ot.FpSqrtOdd=x,ot.FpSqrtEven=$,ot.hashToPrivateScalar=J,ot.getFieldBytesLength=W,ot.getMinHashLength=ne,ot.mapHashToField=X;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=uo(),t=BigInt(0),r=BigInt(1),n=BigInt(2),o=BigInt(3),s=BigInt(4),i=BigInt(5),u=BigInt(8);BigInt(9),BigInt(16);function d(F,N){const Y=F%N;return Y>=t?Y:N+Y}function h(F,N,Y){if(Y<=t||N<t)throw new Error("Expected power/modulo > 0");if(Y===r)return t;let K=r;for(;N>t;)N&r&&(K=K*F%Y),F=F*F%Y,N>>=r;return K}function m(F,N,Y){let K=F;for(;N-- >t;)K*=K,K%=Y;return K}function p(F,N){if(F===t||N<=t)throw new Error(`invert: expected positive integers, got n=${F} mod=${N}`);let Y=d(F,N),K=N,D=t,q=r;for(;Y!==t;){const O=K/Y,G=K%Y,Z=D-q*O;K=Y,Y=G,D=q,q=Z}if(K!==r)throw new Error("invert: does not exist");return d(D,N)}function b(F){const N=(F-r)/n;let Y,K,D;for(Y=F-r,K=0;Y%n===t;Y/=n,K++);for(D=n;D<F&&h(D,N,F)!==F-r;D++);if(K===1){const P=(F+r)/s;return function(G,Z){const le=G.pow(Z,P);if(!G.eql(G.sqr(le),Z))throw new Error("Cannot find square root");return le}}const q=(Y+r)/n;return function(O,G){if(O.pow(G,N)===O.neg(O.ONE))throw new Error("Cannot find square root");let Z=K,le=O.pow(O.mul(O.ONE,D),Y),ce=O.pow(G,q),ie=O.pow(G,Y);for(;!O.eql(ie,O.ONE);){if(O.eql(ie,O.ZERO))return O.ZERO;let de=1;for(let we=O.sqr(ie);de<Z&&!O.eql(we,O.ONE);de++)we=O.sqr(we);const Pe=O.pow(le,r<<BigInt(Z-de-1));le=O.sqr(Pe),ce=O.mul(ce,Pe),ie=O.mul(ie,le),Z=de}return ce}}function E(F){if(F%s===o){const N=(F+r)/s;return function(K,D){const q=K.pow(D,N);if(!K.eql(K.sqr(q),D))throw new Error("Cannot find square root");return q}}if(F%u===i){const N=(F-i)/u;return function(K,D){const q=K.mul(D,n),P=K.pow(q,N),O=K.mul(D,P),G=K.mul(K.mul(O,n),P),Z=K.mul(O,K.sub(G,K.ONE));if(!K.eql(K.sqr(Z),D))throw new Error("Cannot find square root");return Z}}return b(F)}const A=(F,N)=>(d(F,N)&r)===r;ot.isNegativeLE=A;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function T(F){const N={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},Y=g.reduce((K,D)=>(K[D]="function",K),N);return(0,e.validateObject)(F,Y)}function V(F,N,Y){if(Y<t)throw new Error("Expected power > 0");if(Y===t)return F.ONE;if(Y===r)return N;let K=F.ONE,D=N;for(;Y>t;)Y&r&&(K=F.mul(K,D)),D=F.sqr(D),Y>>=r;return K}function v(F,N){const Y=new Array(N.length),K=N.reduce((q,P,O)=>F.is0(P)?q:(Y[O]=q,F.mul(q,P)),F.ONE),D=F.inv(K);return N.reduceRight((q,P,O)=>F.is0(P)?q:(Y[O]=F.mul(q,Y[O]),F.mul(q,P)),D),Y}function R(F,N,Y){return F.mul(N,typeof Y=="bigint"?p(Y,F.ORDER):F.inv(Y))}function w(F){const N=(F.ORDER-r)/n;return Y=>{const K=F.pow(Y,N);return F.eql(K,F.ZERO)||F.eql(K,F.ONE)}}function Q(F,N){const Y=N!==void 0?N:F.toString(2).length,K=Math.ceil(Y/8);return{nBitLength:Y,nByteLength:K}}function U(F,N,Y=!1,K={}){if(F<=t)throw new Error(`Expected Field ORDER > 0, got ${F}`);const{nBitLength:D,nByteLength:q}=Q(F,N);if(q>2048)throw new Error("Field lengths over 2048 bytes are not supported");const P=E(F),O=Object.freeze({ORDER:F,BITS:D,BYTES:q,MASK:(0,e.bitMask)(D),ZERO:t,ONE:r,create:G=>d(G,F),isValid:G=>{if(typeof G!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof G}`);return t<=G&&G<F},is0:G=>G===t,isOdd:G=>(G&r)===r,neg:G=>d(-G,F),eql:(G,Z)=>G===Z,sqr:G=>d(G*G,F),add:(G,Z)=>d(G+Z,F),sub:(G,Z)=>d(G-Z,F),mul:(G,Z)=>d(G*Z,F),pow:(G,Z)=>V(O,G,Z),div:(G,Z)=>d(G*p(Z,F),F),sqrN:G=>G*G,addN:(G,Z)=>G+Z,subN:(G,Z)=>G-Z,mulN:(G,Z)=>G*Z,inv:G=>p(G,F),sqrt:K.sqrt||(G=>P(O,G)),invertBatch:G=>v(O,G),cmov:(G,Z,le)=>le?Z:G,toBytes:G=>Y?(0,e.numberToBytesLE)(G,q):(0,e.numberToBytesBE)(G,q),fromBytes:G=>{if(G.length!==q)throw new Error(`Fp.fromBytes: expected ${q}, got ${G.length}`);return Y?(0,e.bytesToNumberLE)(G):(0,e.bytesToNumberBE)(G)}});return Object.freeze(O)}function x(F,N){if(!F.isOdd)throw new Error("Field doesn't have isOdd");const Y=F.sqrt(N);return F.isOdd(Y)?Y:F.neg(Y)}function $(F,N){if(!F.isOdd)throw new Error("Field doesn't have isOdd");const Y=F.sqrt(N);return F.isOdd(Y)?F.neg(Y):Y}function J(F,N,Y=!1){F=(0,e.ensureBytes)("privateHash",F);const K=F.length,D=Q(N).nByteLength+8;if(D<24||K<D||K>1024)throw new Error(`hashToPrivateScalar: expected ${D}-1024 bytes of input, got ${K}`);const q=Y?(0,e.bytesToNumberLE)(F):(0,e.bytesToNumberBE)(F);return d(q,N-r)+r}function W(F){if(typeof F!="bigint")throw new Error("field order must be bigint");const N=F.toString(2).length;return Math.ceil(N/8)}function ne(F){const N=W(F);return N+Math.ceil(N/2)}function X(F,N,Y=!1){const K=F.length,D=W(N),q=ne(N);if(K<16||K<q||K>1024)throw new Error(`expected ${q}-1024 bytes of input, got ${K}`);const P=Y?(0,e.bytesToNumberBE)(F):(0,e.bytesToNumberLE)(F),O=d(P,N-r)+r;return Y?(0,e.numberToBytesLE)(O,D):(0,e.numberToBytesBE)(O,D)}return ot}var Nu;function ry(){if(Nu)return Co;Nu=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.wNAF=o,Co.validateBasic=s;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=Sa(),t=uo(),r=BigInt(0),n=BigInt(1);function o(i,u){const d=(m,p)=>{const b=p.negate();return m?b:p},h=m=>{const p=Math.ceil(u/m)+1,b=2**(m-1);return{windows:p,windowSize:b}};return{constTimeNegate:d,unsafeLadder(m,p){let b=i.ZERO,E=m;for(;p>r;)p&n&&(b=b.add(E)),E=E.double(),p>>=n;return b},precomputeWindow(m,p){const{windows:b,windowSize:E}=h(p),A=[];let g=m,T=g;for(let V=0;V<b;V++){T=g,A.push(T);for(let v=1;v<E;v++)T=T.add(g),A.push(T);g=T.double()}return A},wNAF(m,p,b){const{windows:E,windowSize:A}=h(m);let g=i.ZERO,T=i.BASE;const V=BigInt(2**m-1),v=2**m,R=BigInt(m);for(let w=0;w<E;w++){const Q=w*A;let U=Number(b&V);b>>=R,U>A&&(U-=v,b+=n);const x=Q,$=Q+Math.abs(U)-1,J=w%2!==0,W=U<0;U===0?T=T.add(d(J,p[x])):g=g.add(d(W,p[$]))}return{p:g,f:T}},wNAFCached(m,p,b,E){const A=m._WINDOW_SIZE||1;let g=p.get(m);return g||(g=this.precomputeWindow(m,A),A!==1&&p.set(m,E(g))),this.wNAF(A,g,b)}}}function s(i){return(0,e.validateField)(i.Fp),(0,t.validateObject)(i,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,e.nLength)(i.n,i.nBitLength),...i,p:i.Fp.ORDER})}return Co}var ku;function Hh(){return ku||(ku=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=E,e.weierstrass=g,e.SWUFpSqrtRatio=T,e.mapToCurveSimpleSWU=V;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=ry(),r=Sa(),n=uo(),o=uo();function s(v){const R=(0,t.validateBasic)(v);n.validateObject(R,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:w,Fp:Q,a:U}=R;if(w){if(!Q.eql(U,Q.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof w!="object"||typeof w.beta!="bigint"||typeof w.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...R})}const{bytesToNumberBE:i,hexToBytes:u}=n;e.DER={Err:class extends Error{constructor(R=""){super(R)}},_parseInt(v){const{Err:R}=e.DER;if(v.length<2||v[0]!==2)throw new R("Invalid signature integer tag");const w=v[1],Q=v.subarray(2,w+2);if(!w||Q.length!==w)throw new R("Invalid signature integer: wrong length");if(Q[0]&128)throw new R("Invalid signature integer: negative");if(Q[0]===0&&!(Q[1]&128))throw new R("Invalid signature integer: unnecessary leading zero");return{d:i(Q),l:v.subarray(w+2)}},toSig(v){const{Err:R}=e.DER,w=typeof v=="string"?u(v):v;n.abytes(w);let Q=w.length;if(Q<2||w[0]!=48)throw new R("Invalid signature tag");if(w[1]!==Q-2)throw new R("Invalid signature: incorrect length");const{d:U,l:x}=e.DER._parseInt(w.subarray(2)),{d:$,l:J}=e.DER._parseInt(x);if(J.length)throw new R("Invalid signature: left bytes after parsing");return{r:U,s:$}},hexFromSig(v){const R=ne=>Number.parseInt(ne[0],16)&8?"00"+ne:ne,w=ne=>{const X=ne.toString(16);return X.length&1?`0${X}`:X},Q=R(w(v.s)),U=R(w(v.r)),x=Q.length/2,$=U.length/2,J=w(x),W=w($);return`30${w($+x+4)}02${W}${U}02${J}${Q}`}};const d=BigInt(0),h=BigInt(1),m=BigInt(2),p=BigInt(3),b=BigInt(4);function E(v){const R=s(v),{Fp:w}=R,Q=R.toBytes||((K,D,q)=>{const P=D.toAffine();return n.concatBytes(Uint8Array.from([4]),w.toBytes(P.x),w.toBytes(P.y))}),U=R.fromBytes||(K=>{const D=K.subarray(1),q=w.fromBytes(D.subarray(0,w.BYTES)),P=w.fromBytes(D.subarray(w.BYTES,2*w.BYTES));return{x:q,y:P}});function x(K){const{a:D,b:q}=R,P=w.sqr(K),O=w.mul(P,K);return w.add(w.add(O,w.mul(K,D)),q)}if(!w.eql(w.sqr(R.Gy),x(R.Gx)))throw new Error("bad generator point: equation left != right");function $(K){return typeof K=="bigint"&&d<K&&K<R.n}function J(K){if(!$(K))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function W(K){const{allowedPrivateKeyLengths:D,nByteLength:q,wrapPrivateKey:P,n:O}=R;if(D&&typeof K!="bigint"){if(n.isBytes(K)&&(K=n.bytesToHex(K)),typeof K!="string"||!D.includes(K.length))throw new Error("Invalid key");K=K.padStart(q*2,"0")}let G;try{G=typeof K=="bigint"?K:n.bytesToNumberBE((0,o.ensureBytes)("private key",K,q))}catch{throw new Error(`private key must be ${q} bytes, hex or bigint, not ${typeof K}`)}return P&&(G=r.mod(G,O)),J(G),G}const ne=new Map;function X(K){if(!(K instanceof F))throw new Error("ProjectivePoint expected")}class F{constructor(D,q,P){if(this.px=D,this.py=q,this.pz=P,D==null||!w.isValid(D))throw new Error("x required");if(q==null||!w.isValid(q))throw new Error("y required");if(P==null||!w.isValid(P))throw new Error("z required")}static fromAffine(D){const{x:q,y:P}=D||{};if(!D||!w.isValid(q)||!w.isValid(P))throw new Error("invalid affine point");if(D instanceof F)throw new Error("projective point not allowed");const O=G=>w.eql(G,w.ZERO);return O(q)&&O(P)?F.ZERO:new F(q,P,w.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(D){const q=w.invertBatch(D.map(P=>P.pz));return D.map((P,O)=>P.toAffine(q[O])).map(F.fromAffine)}static fromHex(D){const q=F.fromAffine(U((0,o.ensureBytes)("pointHex",D)));return q.assertValidity(),q}static fromPrivateKey(D){return F.BASE.multiply(W(D))}_setWindowSize(D){this._WINDOW_SIZE=D,ne.delete(this)}assertValidity(){if(this.is0()){if(R.allowInfinityPoint&&!w.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:D,y:q}=this.toAffine();if(!w.isValid(D)||!w.isValid(q))throw new Error("bad point: x or y not FE");const P=w.sqr(q),O=x(D);if(!w.eql(P,O))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:D}=this.toAffine();if(w.isOdd)return!w.isOdd(D);throw new Error("Field doesn't support isOdd")}equals(D){X(D);const{px:q,py:P,pz:O}=this,{px:G,py:Z,pz:le}=D,ce=w.eql(w.mul(q,le),w.mul(G,O)),ie=w.eql(w.mul(P,le),w.mul(Z,O));return ce&&ie}negate(){return new F(this.px,w.neg(this.py),this.pz)}double(){const{a:D,b:q}=R,P=w.mul(q,p),{px:O,py:G,pz:Z}=this;let le=w.ZERO,ce=w.ZERO,ie=w.ZERO,de=w.mul(O,O),Pe=w.mul(G,G),we=w.mul(Z,Z),Se=w.mul(O,G);return Se=w.add(Se,Se),ie=w.mul(O,Z),ie=w.add(ie,ie),le=w.mul(D,ie),ce=w.mul(P,we),ce=w.add(le,ce),le=w.sub(Pe,ce),ce=w.add(Pe,ce),ce=w.mul(le,ce),le=w.mul(Se,le),ie=w.mul(P,ie),we=w.mul(D,we),Se=w.sub(de,we),Se=w.mul(D,Se),Se=w.add(Se,ie),ie=w.add(de,de),de=w.add(ie,de),de=w.add(de,we),de=w.mul(de,Se),ce=w.add(ce,de),we=w.mul(G,Z),we=w.add(we,we),de=w.mul(we,Se),le=w.sub(le,de),ie=w.mul(we,Pe),ie=w.add(ie,ie),ie=w.add(ie,ie),new F(le,ce,ie)}add(D){X(D);const{px:q,py:P,pz:O}=this,{px:G,py:Z,pz:le}=D;let ce=w.ZERO,ie=w.ZERO,de=w.ZERO;const Pe=R.a,we=w.mul(R.b,p);let Se=w.mul(q,G),ye=w.mul(P,Z),Ve=w.mul(O,le),qe=w.add(q,P),he=w.add(G,Z);qe=w.mul(qe,he),he=w.add(Se,ye),qe=w.sub(qe,he),he=w.add(q,O);let fe=w.add(G,le);return he=w.mul(he,fe),fe=w.add(Se,Ve),he=w.sub(he,fe),fe=w.add(P,O),ce=w.add(Z,le),fe=w.mul(fe,ce),ce=w.add(ye,Ve),fe=w.sub(fe,ce),de=w.mul(Pe,he),ce=w.mul(we,Ve),de=w.add(ce,de),ce=w.sub(ye,de),de=w.add(ye,de),ie=w.mul(ce,de),ye=w.add(Se,Se),ye=w.add(ye,Se),Ve=w.mul(Pe,Ve),he=w.mul(we,he),ye=w.add(ye,Ve),Ve=w.sub(Se,Ve),Ve=w.mul(Pe,Ve),he=w.add(he,Ve),Se=w.mul(ye,he),ie=w.add(ie,Se),Se=w.mul(fe,he),ce=w.mul(qe,ce),ce=w.sub(ce,Se),Se=w.mul(qe,ye),de=w.mul(fe,de),de=w.add(de,Se),new F(ce,ie,de)}subtract(D){return this.add(D.negate())}is0(){return this.equals(F.ZERO)}wNAF(D){return Y.wNAFCached(this,ne,D,q=>{const P=w.invertBatch(q.map(O=>O.pz));return q.map((O,G)=>O.toAffine(P[G])).map(F.fromAffine)})}multiplyUnsafe(D){const q=F.ZERO;if(D===d)return q;if(J(D),D===h)return this;const{endo:P}=R;if(!P)return Y.unsafeLadder(this,D);let{k1neg:O,k1:G,k2neg:Z,k2:le}=P.splitScalar(D),ce=q,ie=q,de=this;for(;G>d||le>d;)G&h&&(ce=ce.add(de)),le&h&&(ie=ie.add(de)),de=de.double(),G>>=h,le>>=h;return O&&(ce=ce.negate()),Z&&(ie=ie.negate()),ie=new F(w.mul(ie.px,P.beta),ie.py,ie.pz),ce.add(ie)}multiply(D){J(D);let q=D,P,O;const{endo:G}=R;if(G){const{k1neg:Z,k1:le,k2neg:ce,k2:ie}=G.splitScalar(q);let{p:de,f:Pe}=this.wNAF(le),{p:we,f:Se}=this.wNAF(ie);de=Y.constTimeNegate(Z,de),we=Y.constTimeNegate(ce,we),we=new F(w.mul(we.px,G.beta),we.py,we.pz),P=de.add(we),O=Pe.add(Se)}else{const{p:Z,f:le}=this.wNAF(q);P=Z,O=le}return F.normalizeZ([P,O])[0]}multiplyAndAddUnsafe(D,q,P){const O=F.BASE,G=(le,ce)=>ce===d||ce===h||!le.equals(O)?le.multiplyUnsafe(ce):le.multiply(ce),Z=G(this,q).add(G(D,P));return Z.is0()?void 0:Z}toAffine(D){const{px:q,py:P,pz:O}=this,G=this.is0();D==null&&(D=G?w.ONE:w.inv(O));const Z=w.mul(q,D),le=w.mul(P,D),ce=w.mul(O,D);if(G)return{x:w.ZERO,y:w.ZERO};if(!w.eql(ce,w.ONE))throw new Error("invZ was invalid");return{x:Z,y:le}}isTorsionFree(){const{h:D,isTorsionFree:q}=R;if(D===h)return!0;if(q)return q(F,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:D,clearCofactor:q}=R;return D===h?this:q?q(F,this):this.multiplyUnsafe(R.h)}toRawBytes(D=!0){return this.assertValidity(),Q(F,this,D)}toHex(D=!0){return n.bytesToHex(this.toRawBytes(D))}}F.BASE=new F(R.Gx,R.Gy,w.ONE),F.ZERO=new F(w.ZERO,w.ONE,w.ZERO);const N=R.nBitLength,Y=(0,t.wNAF)(F,R.endo?Math.ceil(N/2):N);return{CURVE:R,ProjectivePoint:F,normPrivateKeyToScalar:W,weierstrassEquation:x,isWithinCurveOrder:$}}function A(v){const R=(0,t.validateBasic)(v);return n.validateObject(R,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...R})}function g(v){const R=A(v),{Fp:w,n:Q}=R,U=w.BYTES+1,x=2*w.BYTES+1;function $(he){return d<he&&he<w.ORDER}function J(he){return r.mod(he,Q)}function W(he){return r.invert(he,Q)}const{ProjectivePoint:ne,normPrivateKeyToScalar:X,weierstrassEquation:F,isWithinCurveOrder:N}=E({...R,toBytes(he,fe,ve){const Ae=fe.toAffine(),Be=w.toBytes(Ae.x),Fe=n.concatBytes;return ve?Fe(Uint8Array.from([fe.hasEvenY()?2:3]),Be):Fe(Uint8Array.from([4]),Be,w.toBytes(Ae.y))},fromBytes(he){const fe=he.length,ve=he[0],Ae=he.subarray(1);if(fe===U&&(ve===2||ve===3)){const Be=n.bytesToNumberBE(Ae);if(!$(Be))throw new Error("Point is not on curve");const Fe=F(Be);let dt;try{dt=w.sqrt(Fe)}catch(Mt){const tr=Mt instanceof Error?": "+Mt.message:"";throw new Error("Point is not on curve"+tr)}const rt=(dt&h)===h;return(ve&1)===1!==rt&&(dt=w.neg(dt)),{x:Be,y:dt}}else if(fe===x&&ve===4){const Be=w.fromBytes(Ae.subarray(0,w.BYTES)),Fe=w.fromBytes(Ae.subarray(w.BYTES,2*w.BYTES));return{x:Be,y:Fe}}else throw new Error(`Point of length ${fe} was invalid. Expected ${U} compressed bytes or ${x} uncompressed bytes`)}}),Y=he=>n.bytesToHex(n.numberToBytesBE(he,R.nByteLength));function K(he){const fe=Q>>h;return he>fe}function D(he){return K(he)?J(-he):he}const q=(he,fe,ve)=>n.bytesToNumberBE(he.slice(fe,ve));class P{constructor(fe,ve,Ae){this.r=fe,this.s=ve,this.recovery=Ae,this.assertValidity()}static fromCompact(fe){const ve=R.nByteLength;return fe=(0,o.ensureBytes)("compactSignature",fe,ve*2),new P(q(fe,0,ve),q(fe,ve,2*ve))}static fromDER(fe){const{r:ve,s:Ae}=e.DER.toSig((0,o.ensureBytes)("DER",fe));return new P(ve,Ae)}assertValidity(){if(!N(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!N(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(fe){return new P(this.r,this.s,fe)}recoverPublicKey(fe){const{r:ve,s:Ae,recovery:Be}=this,Fe=ie((0,o.ensureBytes)("msgHash",fe));if(Be==null||![0,1,2,3].includes(Be))throw new Error("recovery id invalid");const dt=Be===2||Be===3?ve+R.n:ve;if(dt>=w.ORDER)throw new Error("recovery id 2 or 3 invalid");const rt=(Be&1)===0?"02":"03",Lt=ne.fromHex(rt+Y(dt)),Mt=W(dt),tr=J(-Fe*Mt),Pr=J(Ae*Mt),Wt=ne.BASE.multiplyAndAddUnsafe(Lt,tr,Pr);if(!Wt)throw new Error("point at infinify");return Wt.assertValidity(),Wt}hasHighS(){return K(this.s)}normalizeS(){return this.hasHighS()?new P(this.r,J(-this.s),this.recovery):this}toDERRawBytes(){return n.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return n.hexToBytes(this.toCompactHex())}toCompactHex(){return Y(this.r)+Y(this.s)}}const O={isValidPrivateKey(he){try{return X(he),!0}catch{return!1}},normPrivateKeyToScalar:X,randomPrivateKey:()=>{const he=r.getMinHashLength(R.n);return r.mapHashToField(R.randomBytes(he),R.n)},precompute(he=8,fe=ne.BASE){return fe._setWindowSize(he),fe.multiply(BigInt(3)),fe}};function G(he,fe=!0){return ne.fromPrivateKey(he).toRawBytes(fe)}function Z(he){const fe=n.isBytes(he),ve=typeof he=="string",Ae=(fe||ve)&&he.length;return fe?Ae===U||Ae===x:ve?Ae===2*U||Ae===2*x:he instanceof ne}function le(he,fe,ve=!0){if(Z(he))throw new Error("first arg must be private key");if(!Z(fe))throw new Error("second arg must be public key");return ne.fromHex(fe).multiply(X(he)).toRawBytes(ve)}const ce=R.bits2int||function(he){const fe=n.bytesToNumberBE(he),ve=he.length*8-R.nBitLength;return ve>0?fe>>BigInt(ve):fe},ie=R.bits2int_modN||function(he){return J(ce(he))},de=n.bitMask(R.nBitLength);function Pe(he){if(typeof he!="bigint")throw new Error("bigint expected");if(!(d<=he&&he<de))throw new Error(`bigint expected < 2^${R.nBitLength}`);return n.numberToBytesBE(he,R.nByteLength)}function we(he,fe,ve=Se){if(["recovered","canonical"].some(hr=>hr in ve))throw new Error("sign() legacy options not supported");const{hash:Ae,randomBytes:Be}=R;let{lowS:Fe,prehash:dt,extraEntropy:rt}=ve;Fe==null&&(Fe=!0),he=(0,o.ensureBytes)("msgHash",he),dt&&(he=(0,o.ensureBytes)("prehashed msgHash",Ae(he)));const Lt=ie(he),Mt=X(fe),tr=[Pe(Mt),Pe(Lt)];if(rt!=null&&rt!==!1){const hr=rt===!0?Be(w.BYTES):rt;tr.push((0,o.ensureBytes)("extraEntropy",hr))}const Pr=n.concatBytes(...tr),Wt=Lt;function jn(hr){const gt=ce(hr);if(!N(gt))return;const zr=W(gt),$t=ne.BASE.multiply(gt).toAffine(),At=J($t.x);if(At===d)return;const Dt=J(zr*J(Wt+At*Mt));if(Dt===d)return;let vo=($t.x===At?0:2)|Number($t.y&h),rr=Dt;return Fe&&K(Dt)&&(rr=D(Dt),vo^=1),new P(At,rr,vo)}return{seed:Pr,k2sig:jn}}const Se={lowS:R.lowS,prehash:!1},ye={lowS:R.lowS,prehash:!1};function Ve(he,fe,ve=Se){const{seed:Ae,k2sig:Be}=we(he,fe,ve),Fe=R;return n.createHmacDrbg(Fe.hash.outputLen,Fe.nByteLength,Fe.hmac)(Ae,Be)}ne.BASE._setWindowSize(8);function qe(he,fe,ve,Ae=ye){var $t;const Be=he;if(fe=(0,o.ensureBytes)("msgHash",fe),ve=(0,o.ensureBytes)("publicKey",ve),"strict"in Ae)throw new Error("options.strict was renamed to lowS");const{lowS:Fe,prehash:dt}=Ae;let rt,Lt;try{if(typeof Be=="string"||n.isBytes(Be))try{rt=P.fromDER(Be)}catch(At){if(!(At instanceof e.DER.Err))throw At;rt=P.fromCompact(Be)}else if(typeof Be=="object"&&typeof Be.r=="bigint"&&typeof Be.s=="bigint"){const{r:At,s:Dt}=Be;rt=new P(At,Dt)}else throw new Error("PARSE");Lt=ne.fromHex(ve)}catch(At){if(At.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Fe&&rt.hasHighS())return!1;dt&&(fe=R.hash(fe));const{r:Mt,s:tr}=rt,Pr=ie(fe),Wt=W(tr),jn=J(Pr*Wt),hr=J(Mt*Wt),gt=($t=ne.BASE.multiplyAndAddUnsafe(Lt,jn,hr))==null?void 0:$t.toAffine();return gt?J(gt.x)===Mt:!1}return{CURVE:R,getPublicKey:G,getSharedSecret:le,sign:Ve,verify:qe,ProjectivePoint:ne,Signature:P,utils:O}}function T(v,R){const w=v.ORDER;let Q=d;for(let K=w-h;K%m===d;K/=m)Q+=h;const U=Q,x=m<<U-h-h,$=x*m,J=(w-h)/$,W=(J-h)/m,ne=$-h,X=x,F=v.pow(R,J),N=v.pow(R,(J+h)/m);let Y=(K,D)=>{let q=F,P=v.pow(D,ne),O=v.sqr(P);O=v.mul(O,D);let G=v.mul(K,O);G=v.pow(G,W),G=v.mul(G,P),P=v.mul(G,D),O=v.mul(G,K);let Z=v.mul(O,P);G=v.pow(Z,X);let le=v.eql(G,v.ONE);P=v.mul(O,N),G=v.mul(Z,q),O=v.cmov(P,O,le),Z=v.cmov(G,Z,le);for(let ce=U;ce>h;ce--){let ie=ce-m;ie=m<<ie-h;let de=v.pow(Z,ie);const Pe=v.eql(de,v.ONE);P=v.mul(O,q),q=v.mul(q,q),de=v.mul(Z,q),O=v.cmov(P,O,Pe),Z=v.cmov(de,Z,Pe)}return{isValid:le,value:O}};if(v.ORDER%b===p){const K=(v.ORDER-p)/b,D=v.sqrt(v.neg(R));Y=(q,P)=>{let O=v.sqr(P);const G=v.mul(q,P);O=v.mul(O,G);let Z=v.pow(O,K);Z=v.mul(Z,G);const le=v.mul(Z,D),ce=v.mul(v.sqr(Z),P),ie=v.eql(ce,q);let de=v.cmov(le,Z,ie);return{isValid:ie,value:de}}}return Y}function V(v,R){if(r.validateField(v),!v.isValid(R.A)||!v.isValid(R.B)||!v.isValid(R.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const w=T(v,R.Z);if(!v.isOdd)throw new Error("Fp.isOdd is not implemented!");return Q=>{let U,x,$,J,W,ne,X,F;U=v.sqr(Q),U=v.mul(U,R.Z),x=v.sqr(U),x=v.add(x,U),$=v.add(x,v.ONE),$=v.mul($,R.B),J=v.cmov(R.Z,v.neg(x),!v.eql(x,v.ZERO)),J=v.mul(J,R.A),x=v.sqr($),ne=v.sqr(J),W=v.mul(ne,R.A),x=v.add(x,W),x=v.mul(x,$),ne=v.mul(ne,J),W=v.mul(ne,R.B),x=v.add(x,W),X=v.mul(U,$);const{isValid:N,value:Y}=w(x,ne);F=v.mul(U,Q),F=v.mul(F,Y),X=v.cmov(X,$,N),F=v.cmov(F,Y,N);const K=v.isOdd(Q)===v.isOdd(F);return F=v.cmov(v.neg(F),F,K),X=v.div(X,J),{x:X,y:F}}}})(ui)),ui}var Ou;function ny(){if(Ou)return xo;Ou=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.getHash=n,xo.createCurve=o;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const e=ty(),t=Xo(),r=Hh();function n(s){return{hash:s,hmac:(i,...u)=>(0,e.hmac)(s,i,(0,t.concatBytes)(...u)),randomBytes:t.randomBytes}}function o(s,i){const u=d=>(0,r.weierstrass)({...s,...n(d)});return Object.freeze({...u(i),create:u})}return xo}var Zr={},ju;function oy(){if(ju)return Zr;ju=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.expand_message_xmd=i,Zr.expand_message_xof=u,Zr.hash_to_field=d,Zr.isogenyMap=h,Zr.createHasher=m;const e=Sa(),t=uo(),r=t.bytesToNumberBE;function n(p,b){if(p<0||p>=1<<8*b)throw new Error(`bad I2OSP call: value=${p} length=${b}`);const E=Array.from({length:b}).fill(0);for(let A=b-1;A>=0;A--)E[A]=p&255,p>>>=8;return new Uint8Array(E)}function o(p,b){const E=new Uint8Array(p.length);for(let A=0;A<p.length;A++)E[A]=p[A]^b[A];return E}function s(p){if(!Number.isSafeInteger(p))throw new Error("number expected")}function i(p,b,E,A){(0,t.abytes)(p),(0,t.abytes)(b),s(E),b.length>255&&(b=A((0,t.concatBytes)((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-"),b)));const{outputLen:g,blockLen:T}=A,V=Math.ceil(E/g);if(V>255)throw new Error("Invalid xmd length");const v=(0,t.concatBytes)(b,n(b.length,1)),R=n(0,T),w=n(E,2),Q=new Array(V),U=A((0,t.concatBytes)(R,p,w,n(0,1),v));Q[0]=A((0,t.concatBytes)(U,n(1,1),v));for(let $=1;$<=V;$++){const J=[o(U,Q[$-1]),n($+1,1),v];Q[$]=A((0,t.concatBytes)(...J))}return(0,t.concatBytes)(...Q).slice(0,E)}function u(p,b,E,A,g){if((0,t.abytes)(p),(0,t.abytes)(b),s(E),b.length>255){const T=Math.ceil(2*A/8);b=g.create({dkLen:T}).update((0,t.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(b).digest()}if(E>65535||b.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return g.create({dkLen:E}).update(p).update(n(E,2)).update(b).update(n(b.length,1)).digest()}function d(p,b,E){(0,t.validateObject)(E,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:A,k:g,m:T,hash:V,expand:v,DST:R}=E;(0,t.abytes)(p),s(b);const w=typeof R=="string"?(0,t.utf8ToBytes)(R):R,Q=A.toString(2).length,U=Math.ceil((Q+g)/8),x=b*T*U;let $;if(v==="xmd")$=i(p,w,x,V);else if(v==="xof")$=u(p,w,x,g,V);else if(v==="_internal_pass")$=p;else throw new Error('expand must be "xmd" or "xof"');const J=new Array(b);for(let W=0;W<b;W++){const ne=new Array(T);for(let X=0;X<T;X++){const F=U*(X+W*T),N=$.subarray(F,F+U);ne[X]=(0,e.mod)(r(N),A)}J[W]=ne}return J}function h(p,b){const E=b.map(A=>Array.from(A).reverse());return(A,g)=>{const[T,V,v,R]=E.map(w=>w.reduce((Q,U)=>p.add(p.mul(Q,A),U)));return A=p.div(T,V),g=p.mul(g,p.div(v,R)),{x:A,y:g}}}function m(p,b,E){if(typeof b!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(A,g){const T=d(A,2,{...E,DST:E.DST,...g}),V=p.fromAffine(b(T[0])),v=p.fromAffine(b(T[1])),R=V.add(v).clearCofactor();return R.assertValidity(),R},encodeToCurve(A,g){const T=d(A,1,{...E,DST:E.encodeDST,...g}),V=p.fromAffine(b(T[0])).clearCofactor();return V.assertValidity(),V},mapToCurve(A){if(!Array.isArray(A))throw new Error("mapToCurve: expected array of bigints");for(const T of A)if(typeof T!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${T} in array`);const g=p.fromAffine(b(A)).clearCofactor();return g.assertValidity(),g}}}return Zr}var Bu;function sy(){return Bu||(Bu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=ey(),r=Xo(),n=ny(),o=oy(),s=Sa(),i=uo(),u=Hh(),d=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),m=BigInt(1),p=BigInt(2),b=(P,O)=>(P+O/p)/O;function E(P){const O=d,G=BigInt(3),Z=BigInt(6),le=BigInt(11),ce=BigInt(22),ie=BigInt(23),de=BigInt(44),Pe=BigInt(88),we=P*P*P%O,Se=we*we*P%O,ye=(0,s.pow2)(Se,G,O)*Se%O,Ve=(0,s.pow2)(ye,G,O)*Se%O,qe=(0,s.pow2)(Ve,p,O)*we%O,he=(0,s.pow2)(qe,le,O)*qe%O,fe=(0,s.pow2)(he,ce,O)*he%O,ve=(0,s.pow2)(fe,de,O)*fe%O,Ae=(0,s.pow2)(ve,Pe,O)*ve%O,Be=(0,s.pow2)(Ae,de,O)*fe%O,Fe=(0,s.pow2)(Be,G,O)*Se%O,dt=(0,s.pow2)(Fe,ie,O)*he%O,rt=(0,s.pow2)(dt,Z,O)*we%O,Lt=(0,s.pow2)(rt,p,O);if(!A.eql(A.sqr(Lt),P))throw new Error("Cannot find square root");return Lt}const A=(0,s.Field)(d,void 0,void 0,{sqrt:E});e.secp256k1=(0,n.createCurve)({a:BigInt(0),b:BigInt(7),Fp:A,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:P=>{const O=h,G=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),Z=-m*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),le=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),ce=G,ie=BigInt("0x100000000000000000000000000000000"),de=b(ce*P,O),Pe=b(-Z*P,O);let we=(0,s.mod)(P-de*G-Pe*le,O),Se=(0,s.mod)(-de*Z-Pe*ce,O);const ye=we>ie,Ve=Se>ie;if(ye&&(we=O-we),Ve&&(Se=O-Se),we>ie||Se>ie)throw new Error("splitScalar: Endomorphism failed, k="+P);return{k1neg:ye,k1:we,k2neg:Ve,k2:Se}}}},t.sha256);const g=BigInt(0),T=P=>typeof P=="bigint"&&g<P&&P<d,V=P=>typeof P=="bigint"&&g<P&&P<h,v={};function R(P,...O){let G=v[P];if(G===void 0){const Z=(0,t.sha256)(Uint8Array.from(P,le=>le.charCodeAt(0)));G=(0,i.concatBytes)(Z,Z),v[P]=G}return(0,t.sha256)((0,i.concatBytes)(G,...O))}const w=P=>P.toRawBytes(!0).slice(1),Q=P=>(0,i.numberToBytesBE)(P,32),U=P=>(0,s.mod)(P,d),x=P=>(0,s.mod)(P,h),$=e.secp256k1.ProjectivePoint,J=(P,O,G)=>$.BASE.multiplyAndAddUnsafe(P,O,G);function W(P){let O=e.secp256k1.utils.normPrivateKeyToScalar(P),G=$.fromPrivateKey(O);return{scalar:G.hasEvenY()?O:x(-O),bytes:w(G)}}function ne(P){if(!T(P))throw new Error("bad x: need 0 < x < p");const O=U(P*P),G=U(O*P+BigInt(7));let Z=E(G);Z%p!==g&&(Z=U(-Z));const le=new $(P,Z,m);return le.assertValidity(),le}function X(...P){return x((0,i.bytesToNumberBE)(R("BIP0340/challenge",...P)))}function F(P){return W(P).bytes}function N(P,O,G=(0,r.randomBytes)(32)){const Z=(0,i.ensureBytes)("message",P),{bytes:le,scalar:ce}=W(O),ie=(0,i.ensureBytes)("auxRand",G,32),de=Q(ce^(0,i.bytesToNumberBE)(R("BIP0340/aux",ie))),Pe=R("BIP0340/nonce",de,le,Z),we=x((0,i.bytesToNumberBE)(Pe));if(we===g)throw new Error("sign failed: k is zero");const{bytes:Se,scalar:ye}=W(we),Ve=X(Se,le,Z),qe=new Uint8Array(64);if(qe.set(Se,0),qe.set(Q(x(ye+Ve*ce)),32),!Y(qe,Z,le))throw new Error("sign: Invalid signature produced");return qe}function Y(P,O,G){const Z=(0,i.ensureBytes)("signature",P,64),le=(0,i.ensureBytes)("message",O),ce=(0,i.ensureBytes)("publicKey",G,32);try{const ie=ne((0,i.bytesToNumberBE)(ce)),de=(0,i.bytesToNumberBE)(Z.subarray(0,32));if(!T(de))return!1;const Pe=(0,i.bytesToNumberBE)(Z.subarray(32,64));if(!V(Pe))return!1;const we=X(Q(de),w(ie),le),Se=J(ie,Pe,x(-we));return!(!Se||!Se.hasEvenY()||Se.toAffine().x!==de)}catch{return!1}}e.schnorr={getPublicKey:F,sign:N,verify:Y,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:ne,pointToBytes:w,numberToBytesBE:i.numberToBytesBE,bytesToNumberBE:i.bytesToNumberBE,taggedHash:R,mod:s.mod}};const K=(0,o.isogenyMap)(A,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(P=>P.map(O=>BigInt(O)))),D=(0,u.mapToCurveSimpleSWU)(A,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:A.create(BigInt("-11"))}),q=(0,o.createHasher)(e.secp256k1.ProjectivePoint,P=>{const{x:O,y:G}=D(A.create(P[0]));return K(O,G)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:A.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=q.hashToCurve,e.encodeToCurve=q.encodeToCurve})(ii)),ii}var Fu;function ay(){return Fu||(Fu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=sy();Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(ai)),ai}var Lu;function iy(){if(Lu)return br;Lu=1,Object.defineProperty(br,"__esModule",{value:!0}),br.recoverPublicKey=r,br.recoverAddressFromEthSignature=o,br.sign=s,br.createEthereumMessageHash=i,br.ethSign=u,br.computeAddress=d,br.createUnsafeIdentity=h;const e=Ea(),t=ay();function r(m,p){if(m.length!==65)throw new Error("Invalid signature length "+m.length);const b=m[64];if(b!==27&&b!==28)throw new Error(`Invalid signature recovery value: ${b}. Expected 27 or 28.`);const E=m.slice(0,m.length-1),A=b===28?1:0;return t.secp256k1.Signature.fromCompact(E).addRecoveryBit(A).recoverPublicKey(p).toRawBytes(!1).slice(1)}function n(m){if(m.length!==65)throw new Error("Invalid ethereum signature");const p=m[64];if(p===0||p===1){const b=new Uint8Array(m);return b[64]=p+27,b}return m}function o(m,p){if(typeof m=="string"){if((0,e.isHex)(m))return o((0,e.hexToBytes)(m),p);throw new Error("String signatures must be encoded in hex")}return d(r(n(m),i(p)))}function s(m,p){const b=t.secp256k1.sign(p,m),E=b.recovery===1?"1c":"1b";return"0x"+b.toCompactHex()+E}function i(m){const p=typeof m=="string"?(0,e.stringToUtf8Bytes)(m):m,b=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
26
- `),(0,e.stringToUtf8Bytes)(String(p.length)),p);return(0,e.hexToBytes)((0,e.sha3)(b))}function u(m,p){return s(m,i(p))}function d(m){let p;if(m.length===65&&m[0]===4)p=m.slice(1);else if(m.length===64)p=m;else throw new Error(`Invalid public key length: ${m.length}. Expected 64 bytes, or 65 bytes with a leading 0x04 uncompressed prefix.`);return(0,e.getAddress)((0,e.sha3)(p).substring(24))}function h(){const m=t.secp256k1.utils.randomPrivateKey(),p=t.secp256k1.getPublicKey(m,!1).slice(1),b=d(p);return{privateKey:(0,e.bytesToHex)(m),publicKey:(0,e.bytesToHex)(p),address:b}}return br}var Zs={},Mu;function cy(){if(Mu)return Zs;Mu=1,Object.defineProperty(Zs,"__esModule",{value:!0});const e=Ea();class t{constructor(n,o=!0){Qr(this,"requestManager");Qr(this,"checkedBlocks");Qr(this,"saveBlocks");Qr(this,"savedBlocks");Qr(this,"requests");Qr(this,"blockTime");Qr(this,"firstTimestamp");this.requestManager=n,this.checkedBlocks={},this.saveBlocks=o,this.savedBlocks={},this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),o=await this.getBlockWrapper(1);return this.blockTime=(n.timestamp-o.timestamp)/(Number(n.number)-1),this.firstTimestamp=o.timestamp,{blockTime:this.blockTime,firstTimestamp:this.firstTimestamp}}async getDate(n,o=!0){const s=n/1e3,i=Date.now()/1e3;let u=this.firstTimestamp,d=this.blockTime;if((u===void 0||d===void 0)&&({firstTimestamp:u,blockTime:d}=await this.fillBlockTime()),s<u)return{block:1,timestamp:s};const h=this.savedBlocks.latest;if(s>=i||h&&s>h.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:s};this.checkedBlocks[s]=[];const m=await this.getBlockWrapper(Math.ceil((s-u)/d));return{block:await this.findBetter(s,m,o,d),timestamp:s}}async findBetter(n,o,s,i){let u=i??this.blockTime??(await this.fillBlockTime()).blockTime;if(await this.isBetterBlock(n,o,s))return o.number;const d=n-o.timestamp;let h=Math.ceil(d/u);h===0&&(h=d<0?-1:1);const m=await this.getBlockWrapper(this.getNextBlock(n,o.number,h));return u=Math.abs((o.timestamp-m.timestamp)/(o.number-m.number)),this.findBetter(n,m,s,u)}async isBetterBlock(n,o,s){const i=o.timestamp;if(s){if(i<n)return!1;const u=await this.getBlockWrapper(o.number-1);if(i>=n&&u.timestamp<n)return!0}else{if(i>=n)return!1;const u=await this.getBlockWrapper(o.number+1);if(i<n&&u.timestamp>=n)return!0}return!1}getNextBlock(n,o,s){const i=o+s;if(this.checkedBlocks[n].includes(i)){const u=s<0?s+1:s-1;if(u===0)throw new Error(`Could not find an unchecked block for timestamp ${n}`);return this.getNextBlock(n,o,u)}return this.checkedBlocks[n].push(i),i}async getBlockWrapper(n){if(!this.saveBlocks){const i=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(i.number).toNumber(),timestamp:(0,e.toBigNumber)(i.timestamp).toNumber()}}const o=n.toString();if(this.savedBlocks[o])return this.savedBlocks[o];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:s}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[o]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(s).toNumber()},this.requests++,this.savedBlocks[o]}}return Zs.default=t,Zs}var Js={},$u;function ly(){if($u)return Js;$u=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.moveMinutes=e;function e(t){const r=new Date;return r.setMinutes(r.getMinutes()+t),r}return Js}var di={},Du;function Vh(){return Du||(Du=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const t=Fm();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return t.AuthChain}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return t.AuthLink}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return t.AuthLinkType}})})(di)),di}var qu;function Gh(){return qu||(qu=1,(function(e){var t=ir&&ir.__createBinding||(Object.create?(function(q,P,O,G){G===void 0&&(G=O);var Z=Object.getOwnPropertyDescriptor(P,O);(!Z||("get"in Z?!P.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return P[O]}}),Object.defineProperty(q,G,Z)}):(function(q,P,O,G){G===void 0&&(G=O),q[G]=P[O]})),r=ir&&ir.__setModuleDefault||(Object.create?(function(q,P){Object.defineProperty(q,"default",{enumerable:!0,value:P})}):function(q,P){q.default=P}),n=ir&&ir.__importStar||(function(){var q=function(P){return q=Object.getOwnPropertyNames||function(O){var G=[];for(var Z in O)Object.prototype.hasOwnProperty.call(O,Z)&&(G[G.length]=Z);return G},q(P)};return function(P){if(P&&P.__esModule)return P;var O={};if(P!=null)for(var G=q(P),Z=0;Z<G.length;Z++)G[Z]!=="default"&&t(O,P,G[Z]);return r(O,P),O}})(),o=ir&&ir.__importDefault||function(q){return q&&q.__esModule?q:{default:q}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseEmphemeralPayload=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.createEthereumMessageHash=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0,e.validateSignature=b,e.isValidAuthChain=E,e.createEIP1271MessageHash=A,e.createSimpleAuthChain=g,e.createAuthChain=T,e.initializeAuthChain=V,e.signPayload=v,e.createSignature=R,e.ownerAddress=w,e.getEphemeralMessage=Q,e.getEphemeralSignatureType=X,e.getSignedIdentitySignatureType=F,e.parseEphemeralPayload=N,e.isValidEIP1271Signature=Y;const s=n(Ea()),i=Zg(),u=iy(),d=o(cy()),h=ly(),m=Vh();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const p=132;async function b(q,P,O,G=Date.now()){let Z="";if(!E(P))return{ok:!1,message:"ERROR: Malformed authChain"};for(const ce of P){const ie=D(ce.type);try{const{nextAuthority:de}=await ie(Z,ce,{provider:O,dateToValidateExpirationInMillis:G});Z=de||""}catch(de){const Pe=de instanceof Error?de.message:String(de);return{ok:!1,message:`ERROR. Link type: ${ce.type}. ${Pe}.`}}}const le=Z===q;return{ok:le,message:le?void 0:`ERROR: Invalid final authority. Expected: ${q}. Current ${Z}.`}}function E(q){for(const[P,O]of q.entries())if(P===0&&O.type!==m.AuthLinkType.SIGNER||O.type===m.AuthLinkType.SIGNER&&P!==0)return!1;return!0}function A(q){return(0,s.hexToBytes)((0,s.sha3)((0,s.stringToUtf8Bytes)(q)))}function g(q,P,O){return[{type:m.AuthLinkType.SIGNER,payload:P,signature:""},{type:F(O),payload:q,signature:O}]}function T(q,P,O,G){const Z=(0,h.moveMinutes)(O),le=Q(P.address,Z),ce=R(q,le),ie=R(P,G);return[{type:m.AuthLinkType.SIGNER,payload:q.address,signature:""},{type:m.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:le,signature:ce},{type:m.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:G,signature:ie}]}async function V(q,P,O,G){const Z=(0,h.moveMinutes)(O),le=Q(P.address,Z),ce=await G(le),ie=[{type:m.AuthLinkType.SIGNER,payload:q,signature:""},{type:X(ce),payload:le,signature:ce}];return{ephemeralIdentity:P,expiration:Z,authChain:ie}}function v(q,P){const O=R(q.ephemeralIdentity,P);return[...q.authChain,{type:m.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:P,signature:O}]}e.createEthereumMessageHash=u.createEthereumMessageHash;function R(q,P){return(0,u.ethSign)((0,s.hexToBytes)(q.privateKey),P)}function w(q){return q.length>0&&q[0].type===m.AuthLinkType.SIGNER?q[0].payload:"Invalid-Owner-Address"}function Q(q,P){return`Decentraland Login
27
- Ephemeral address: ${q}
28
- Expiration: ${P.toISOString()}`}e.Authenticator={validateSignature:b,isValidAuthChain:E,createEIP1271MessageHash:A,createSimpleAuthChain:g,createAuthChain:T,initializeAuthChain:V,signPayload:v,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:R,ownerAddress:w,getEphemeralMessage:Q};const U=async(q,P)=>({nextAuthority:P.payload});e.SIGNER_VALIDATOR=U;const x=async(q,P)=>{if(!P.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const O=(0,u.recoverAddressFromEthSignature)(P.signature,P.payload),G=q.toLocaleLowerCase(),Z=O.toLocaleLowerCase();if(G===Z)return{nextAuthority:P.payload};throw new Error(`Invalid signer address. Expected: ${G}. Actual: ${Z}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=x;const $=async(q,P,O)=>{if(!P.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:G,ephemeralAddress:Z,expiration:le}=N(P.payload),ce=(O==null?void 0:O.dateToValidateExpirationInMillis)||Date.now();if(le>ce){const ie=(0,u.recoverAddressFromEthSignature)(P.signature,G),de=q.toLocaleLowerCase(),Pe=ie.toLocaleLowerCase();if(de===Pe)return{nextAuthority:Z};throw new Error(`Invalid signer address. Expected: ${de}. Actual: ${Pe}`)}throw new Error(`Ephemeral key expired. Expiration: ${le}. Test: ${ce}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=$;const J=async(q,P,O)=>{if(!P.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:G,ephemeralAddress:Z,expiration:le}=N(P.payload),ce=(O==null?void 0:O.dateToValidateExpirationInMillis)||Date.now();if(le>ce&&await K(O==null?void 0:O.provider,q,G,P.signature,ce))return{nextAuthority:Z};throw new Error(`Ephemeral key expired. Expiration: ${le}. Test: ${ce}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=J;const W=async(q,P,O)=>{if(!P.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!O)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await K(O.provider,q,P.payload,P.signature,O.dateToValidateExpirationInMillis))return{nextAuthority:P.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=W;const ne=async(q,P)=>({error:"Error Validator."});function X(q){return q.length===p?m.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:m.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function F(q){return q.length===p?m.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:m.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function N(q){const P=q.replace(/\r/g,""),O=P.split(`
29
- `),G="Ephemeral address: ",Z="Expiration: ";if(O.length<3||!O[1].startsWith(G)||!O[2].startsWith(Z))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${G}" on line 2 and "${Z}" on line 3.`);const le=O[1].substring(G.length),ce=O[2].substring(Z.length),ie=Date.parse(ce);if(Number.isNaN(ie))throw new Error(`Invalid expiration date in ephemeral payload: "${ce}"`);return{message:P,ephemeralAddress:le,expiration:ie}}e.parseEmphemeralPayload=N;async function Y(q,P,O,G){const Z=A(P),le=(0,s.hexToBytes)(O);let ce;try{ce=(0,s.bytesToHex)(await q.isValidSignature(Z,le,G))}catch{}if(ce===e.ERC1654_MAGIC_VALUE)return!0;const ie=(0,u.createEthereumMessageHash)(P);try{ce=(0,s.bytesToHex)(await q.isValidSignature(ie,le,G))}catch{}return ce===e.ERC1654_MAGIC_VALUE}async function K(q,P,O,G,Z){if(!q)throw new Error("Missing provider");const le=new s.default(q),ce=await(0,i.SignatureValidator)(le,P);let ie=await Y(ce,O,G);if(ie)return!0;const de=new d.default(le);try{const{block:Pe}=await de.getDate(Z,!1);if(ie=await Y(ce,O,G,Pe),ie)return!0}catch(Pe){const we=Pe instanceof Error?Pe.message:String(Pe);throw new Error(`Invalid validation. Error: ${we}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${ie}`)}function D(q){switch(q){case m.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case m.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case m.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case m.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case m.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return ne}}})(ir)),ir}var Lr={},Uu;function uy(){return Uu||(Uu=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.AUTH_METADATA_HEADER=Lr.AUTH_TIMESTAMP_HEADER=Lr.AUTH_CHAIN_HEADER_PREFIX=void 0,Lr.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",Lr.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",Lr.AUTH_METADATA_HEADER="x-identity-metadata"),Lr}var Hu;function dy(){return Hu||(Hu=1,(function(e){var t=hn&&hn.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,u)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),r=hn&&hn.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Gh(),e),r(uy(),e),r(Vh(),e)})(hn)),hn}var fy=dy(),mn={},cr={},Xs={exports:{}},ea={exports:{}},Vu;function cl(){return Vu||(Vu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=t.default,e.exports.default=t.default})(ea,ea.exports)),ea.exports}var ta={exports:{}},Gu;function hy(){return Gu||(Gu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(o){return Object.prototype.toString.call(o)==="[object RegExp]"}function n(o,s){for(var i=0;i<s.length;i++){var u=s[i];if(o===u||r(u)&&u.test(o))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(ta,ta.exports)),ta.exports}var ra={exports:{}},zu;function py(){return zu||(zu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(o,s){return o.indexOf(s)!==-1};t.default=r,e.exports=t.default,e.exports.default=t.default})(ra,ra.exports)),ra.exports}var na={exports:{}},oa={exports:{}},Wu;function zh(){return Wu||(Wu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(o){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(o)}function n(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;(r(o)!=="object"||o===null)&&(o={});for(var i in s)typeof o[i]>"u"&&(o[i]=s[i]);return o}e.exports=t.default,e.exports.default=t.default})(oa,oa.exports)),oa.exports}var Ku;function my(){return Ku||(Ku=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var r=o(cl()),n=o(zh());function o(u){return u&&u.__esModule?u:{default:u}}var s={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function i(u,d){(0,r.default)(u),d=(0,n.default)(d,s),d.allow_trailing_dot&&u[u.length-1]==="."&&(u=u.substring(0,u.length-1)),d.allow_wildcard===!0&&u.indexOf("*.")===0&&(u=u.substring(2));var h=u.split("."),m=h[h.length-1];return d.require_tld&&(h.length<2||!d.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(m)||/\s/.test(m))||!d.allow_numeric_tld&&/^\d+$/.test(m)?!1:h.every(function(p){return!(p.length>63&&!d.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(p)||/[\uff01-\uff5e]/.test(p)||/^-|-$/.test(p)||!d.allow_underscores&&/_/.test(p))})}e.exports=t.default,e.exports.default=t.default})(na,na.exports)),na.exports}var sa={exports:{}},Yu;function gy(){return Yu||(Yu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=n(cl());function n(p){return p&&p.__esModule?p:{default:p}}function o(p){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},o(p)}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",i="(".concat(s,"[.]){3}").concat(s),u=new RegExp("^".concat(i,"$")),d="(?:[0-9a-fA-F]{1,4})",h=new RegExp("^("+"(?:".concat(d,":){7}(?:").concat(d,"|:)|")+"(?:".concat(d,":){6}(?:").concat(i,"|:").concat(d,"|:)|")+"(?:".concat(d,":){5}(?::").concat(i,"|(:").concat(d,"){1,2}|:)|")+"(?:".concat(d,":){4}(?:(:").concat(d,"){0,1}:").concat(i,"|(:").concat(d,"){1,3}|:)|")+"(?:".concat(d,":){3}(?:(:").concat(d,"){0,2}:").concat(i,"|(:").concat(d,"){1,4}|:)|")+"(?:".concat(d,":){2}(?:(:").concat(d,"){0,3}:").concat(i,"|(:").concat(d,"){1,5}|:)|")+"(?:".concat(d,":){1}(?:(:").concat(d,"){0,4}:").concat(i,"|(:").concat(d,"){1,6}|:)|")+"(?::((?::".concat(d,"){0,5}:").concat(i,"|(?::").concat(d,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function m(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(p);var E=(o(b)==="object"?b.version:arguments[1])||"";return E?E.toString()==="4"?u.test(p):E.toString()==="6"?h.test(p):!1:m(p,{version:4})||m(p,{version:6})}e.exports=t.default,e.exports.default=t.default})(sa,sa.exports)),sa.exports}var Qu;function yy(){return Qu||(Qu=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=V;var r=d(cl()),n=d(hy()),o=d(py()),s=d(my()),i=d(gy()),u=d(zh());function d(v){return v&&v.__esModule?v:{default:v}}function h(v,R){return A(v)||E(v,R)||p(v,R)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p(v,R){if(v){if(typeof v=="string")return b(v,R);var w={}.toString.call(v).slice(8,-1);return w==="Object"&&v.constructor&&(w=v.constructor.name),w==="Map"||w==="Set"?Array.from(v):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?b(v,R):void 0}}function b(v,R){(R==null||R>v.length)&&(R=v.length);for(var w=0,Q=Array(R);w<R;w++)Q[w]=v[w];return Q}function E(v,R){var w=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(w!=null){var Q,U,x,$,J=[],W=!0,ne=!1;try{if(x=(w=w.call(v)).next,R!==0)for(;!(W=(Q=x.call(w)).done)&&(J.push(Q.value),J.length!==R);W=!0);}catch(X){ne=!0,U=X}finally{try{if(!W&&w.return!=null&&($=w.return(),Object($)!==$))return}finally{if(ne)throw U}}return J}}function A(v){if(Array.isArray(v))return v}var g={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function V(v,R){if((0,r.default)(v),!v||/[\s<>]/.test(v)||v.indexOf("mailto:")===0||(R=(0,u.default)(R,g),R.validate_length&&v.length>R.max_allowed_length)||!R.allow_fragments&&(0,o.default)(v,"#")||!R.allow_query_components&&((0,o.default)(v,"?")||(0,o.default)(v,"&")))return!1;var w,Q,U,x,$,J,W,ne;W=v.split("#"),v=W.shift(),W=v.split("?"),v=W.shift();var X=v.match(/^([a-z][a-z0-9+\-.]*):/i),F=!1,N=function(qe){return F=!0,w=qe.toLowerCase(),R.require_valid_protocol&&R.protocols.indexOf(w)===-1?!1:v.substring(X[0].length)};if(X){var Y=X[1],K=v.substring(X[0].length),D=K.slice(0,2)==="//";if(D){if(v=N(Y),v===!1)return!1}else{var q=K.indexOf("/"),P=q===-1?K:K.substring(0,q),O=P.indexOf("@");if(O!==-1){var G=P.substring(0,O),Z=/^[a-zA-Z0-9\-_.%:]*$/,le=Z.test(G),ce=/%[0-9a-fA-F]{2}/.test(G);if(le&&!ce){if(R.require_protocol)return!1}else if(v=N(Y),v===!1)return!1}else{var ie=/^[0-9]/.test(K);if(ie){if(R.require_protocol)return!1}else if(v=N(Y),v===!1)return!1}}}else if(R.require_protocol)return!1;if(v.slice(0,2)==="//"){if(!F&&!R.allow_protocol_relative_urls)return!1;v=v.slice(2)}if(v==="")return!1;if(W=v.split("/"),v=W.shift(),v===""&&!R.require_host)return!0;if(W=v.split("@"),W.length>1){if(R.disallow_auth||W[0]===""||(Q=W.shift(),Q.indexOf(":")>=0&&Q.split(":").length>2))return!1;var de=Q.split(":"),Pe=h(de,2),we=Pe[0],Se=Pe[1];if(we===""&&Se==="")return!1}x=W.join("@"),J=null,ne=null;var ye=x.match(T);if(ye?(U="",ne=ye[1],J=ye[2]||null):(W=x.split(":"),U=W.shift(),W.length&&(J=W.join(":"))),J!==null&&J.length>0){if($=parseInt(J,10),!/^[0-9]+$/.test(J)||$<=0||$>65535)return!1}else if(R.require_port)return!1;return R.host_whitelist?(0,n.default)(U,R.host_whitelist):U===""&&!R.require_host?!0:!(!(0,i.default)(U)&&!(0,s.default)(U,R)&&(!ne||!(0,i.default)(ne,6))||(U=U||ne,R.host_blacklist&&(0,n.default)(U,R.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(Xs,Xs.exports)),Xs.exports}var fi={},Zu;function Wh(){return Zu||(Zu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(u){u.GET="get",u.STORE="store",u.CLEAR="clear",u.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(u){return{target:e.SINGLE_SIGN_ON_TARGET,...u}}e.createMessage=r;function n(u){const d=localStorage.getItem(i(u));if(!d)return null;let h;try{h=JSON.parse(d)}catch{return s(u),null}return h.expiration=new Date(h.expiration),h.expiration.getTime()<=Date.now()?(s(u),null):h}e.localStorageGetIdentity=n;function o(u,d){new Date(d.expiration).getTime()>Date.now()&&localStorage.setItem(i(u),JSON.stringify(d))}e.localStorageStoreIdentity=o;function s(u){localStorage.removeItem(i(u))}e.localStorageClearIdentity=s;function i(u){if(!/^0x[a-fA-F0-9]{40}$/.test(u))throw new Error("User must be a valid ethereum address");return`single-sign-on-${u.toLowerCase()}`}})(fi)),fi}var Ju;function vy(){if(Ju)return cr;Ju=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.clearIdentity=cr.storeIdentity=cr.getIdentity=cr.init=void 0;const e=yy(),t=Wh(),r=t.SINGLE_SIGN_ON_TARGET,n=500,o=5;let s=0,i="";const u={protocols:["https"],require_protocol:!0};function d(T,V={}){if(!(0,e.default)(T,{...u,...V}))throw new Error(`Invalid url: ${T}`);if(i)throw new Error("Already initialized");const v=document.createElement("iframe");v.id=r,v.src=T,v.style.width="0",v.style.height="0",v.style.border="none",v.style.position="absolute",document.body.appendChild(v),i=T}cr.init=d;async function h(T){let V;try{V=(await E(await b(),t.Action.GET,{user:T})).identity??null}catch(v){g(v),V=(0,t.localStorageGetIdentity)(T)}return V}cr.getIdentity=h;async function m(T,V){try{await E(await b(),t.Action.STORE,{user:T,identity:V})}catch(v){g(v),(0,t.localStorageStoreIdentity)(T,V)}}cr.storeIdentity=m;async function p(T){try{await E(await b(),t.Action.CLEAR,{user:T})}catch(V){g(V),(0,t.localStorageClearIdentity)(T)}}cr.clearIdentity=p;async function b(){if(!i)throw new Error("Not initialized");for(let T=0;T<o;T++){const V=document.getElementById(r),v=V==null?void 0:V.contentWindow;if(!v){await A(n);continue}try{await E(v,t.Action.PING,{},n)}catch{continue}return v}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function E(T,V,v,R=0){s++;const w=s;let Q=null;const U=new Promise((x,$)=>{Q=({data:J})=>{!J||J.target!==t.SINGLE_SIGN_ON_TARGET||J.id!==w||(J.error?$(new Error(J.error)):x(J))},window.addEventListener("message",Q)});T.postMessage((0,t.createMessage)({id:w,action:V,...v}),i);try{return await(R?Promise.race([U,new Promise((x,$)=>setTimeout(()=>$(new Error("Did not receive a response in time")),R))]):U)}catch(x){throw x}finally{Q&&window.removeEventListener("message",Q)}}function A(T){return new Promise(V=>setTimeout(V,T))}function g(T){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",T.message)}return cr}var Xu;function by(){return Xu||(Xu=1,(function(e){var t=mn&&mn.__createBinding||(Object.create?(function(n,o,s,i){i===void 0&&(i=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,i,u)}):(function(n,o,s,i){i===void 0&&(i=s),n[i]=o[s]})),r=mn&&mn.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(vy(),e),r(Wh(),e)})(mn)),mn}var Mc=by();function wy(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?Ar.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?Ar.STAGING:t.endsWith(".io")||t.endsWith(".zone")?Ar.DEVELOPMENT:null}function _y(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(Yh(n))return n}return null}var ed={},Ar;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(Ar||(Ar={}));function Kh(){return Object.values(Ar)}function Yh(e){return Kh().includes(e)}function aa(e){if(Yh(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${Kh().map(t=>`"${t}"`).join(", ")}.`)}function Ey(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:o}=e;if(t&&r&&t!==r)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&o&&t!==o)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&o&&r!==o)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?aa(t):r?aa(r):n?aa(n):o?aa(o):Ar.PRODUCTION}function Sy(e){if(typeof window<"u"){const r=_y(window.location);if(r)return r;const n=wy(window.location);if(n)return n}return Ey(typeof e>"u"&&typeof ua=="object"&&typeof ed=="object"?ed:e)}function xy(e,t){const r=Sy(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(o,s="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return o in n?n[o]:s},is:o=>r===o,getEnv:()=>r}}const Cy="development",Ty="80002",Ay="https://marketplace-api.decentraland.zone",Iy="https://marketplace-api.decentraland.zone",Ry="/auth",Py="https://rpc.decentraland.org/amoy",Ny="https://credits.decentraland.zone",ky="https://builder-api.decentraland.zone",Oy="https://peer.decentraland.zone",jy="https://decentraland.zone/profile",By="",Fy="pk_test_51TtW4PBS62I2c52AfO6XxarHwrACg9Zbacgeai73klSZbUleKajNN9gkSwRSlwCZHfWrdKZQyVhH0komsYEDB5ub00j4pzRj4c",Ly="",My="",$y={ENVIRONMENT:Cy,CHAIN_ID:Ty,MARKETPLACE_SERVER_URL:Ay,NFT_API_URL:Iy,AUTH_URL:Ry,RPC_URL:Py,CREDITS_SERVER_URL:Ny,BUILDER_SERVER_URL:ky,PEER_URL:Oy,PROFILE_URL:jy,SHOP_SERVER_URL:By,STRIPE_PUBLISHABLE_KEY:Fy,SEGMENT_WRITE_KEY:Ly,SENTRY_DSN:My},Dy="staging",qy="80002",Uy="https://marketplace-api.decentraland.zone",Hy="https://marketplace-api.decentraland.zone",Vy="/auth",Gy="https://rpc.decentraland.org/amoy",zy="https://credits.decentraland.zone",Wy="https://builder-api.decentraland.zone",Ky="https://peer.decentraland.zone",Yy="https://decentraland.zone/profile",Qy="",Zy="pk_test_51TtW4PBS62I2c52AfO6XxarHwrACg9Zbacgeai73klSZbUleKajNN9gkSwRSlwCZHfWrdKZQyVhH0komsYEDB5ub00j4pzRj4c",Jy="",Xy="",e0={ENVIRONMENT:Dy,CHAIN_ID:qy,MARKETPLACE_SERVER_URL:Uy,NFT_API_URL:Hy,AUTH_URL:Vy,RPC_URL:Gy,CREDITS_SERVER_URL:zy,BUILDER_SERVER_URL:Wy,PEER_URL:Ky,PROFILE_URL:Yy,SHOP_SERVER_URL:Qy,STRIPE_PUBLISHABLE_KEY:Zy,SEGMENT_WRITE_KEY:Jy,SENTRY_DSN:Xy},t0="production",r0="137",n0="https://marketplace-api.decentraland.org",o0="https://marketplace-api.decentraland.org",s0="/auth",a0="https://rpc.decentraland.org/polygon",i0="https://credits.decentraland.org",c0="https://builder-api.decentraland.org",l0="https://peer.decentraland.org",u0="https://decentraland.org/profile",d0="",f0="",h0="",p0="",m0={ENVIRONMENT:t0,CHAIN_ID:r0,MARKETPLACE_SERVER_URL:n0,NFT_API_URL:o0,AUTH_URL:s0,RPC_URL:a0,CREDITS_SERVER_URL:i0,BUILDER_SERVER_URL:c0,PEER_URL:l0,PROFILE_URL:u0,SHOP_SERVER_URL:d0,STRIPE_PUBLISHABLE_KEY:f0,SEGMENT_WRITE_KEY:h0,SENTRY_DSN:p0},g0={},Ht=xy({[Ar.DEVELOPMENT]:$y,[Ar.STAGING]:e0,[Ar.PRODUCTION]:m0},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),xt=g0,Ke={marketplaceServerUrl:xt.VITE_MARKETPLACE_SERVER_URL??Ht.get("MARKETPLACE_SERVER_URL"),nftApiUrl:xt.VITE_NFT_API_URL??Ht.get("NFT_API_URL"),chainId:Number(xt.VITE_CHAIN_ID??Ht.get("CHAIN_ID")),authUrl:xt.VITE_AUTH_URL??Ht.get("AUTH_URL"),rpcUrl:xt.VITE_RPC_URL??Ht.get("RPC_URL"),creditsServerUrl:xt.VITE_CREDITS_SERVER_URL??Ht.get("CREDITS_SERVER_URL"),builderServerUrl:xt.VITE_BUILDER_SERVER_URL??Ht.get("BUILDER_SERVER_URL"),peerUrl:xt.VITE_PEER_URL??Ht.get("PEER_URL"),profileUrl:xt.VITE_PROFILE_URL??Ht.get("PROFILE_URL"),shopServerUrl:xt.VITE_SHOP_SERVER_URL??Ht.get("SHOP_SERVER_URL"),stripePublishableKey:xt.VITE_STRIPE_PK??Ht.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:xt.VITE_SEGMENT_WRITE_KEY??Ht.get("SEGMENT_WRITE_KEY"),sentryDsn:xt.VITE_SENTRY_DSN??Ht.get("SENTRY_DSN"),sentryEnvironment:xt.VITE_SENTRY_ENVIRONMENT??(Number(xt.VITE_CHAIN_ID??Ht.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:xt.VITE_SENTRY_RELEASE??`shop@${xt.VITE_APP_VERSION??"0.0.0-dev"}`},y0=744*60;async function Qh(){return(await wt(async()=>{const{connection:e}=await import("./index-CnO86Xf-.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([9,2,1,10]))).connection}async function v0(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new qm(e.provider),n=r.getSigner();let o=Mc.localStorageGetIdentity(t);if(!o){const s=Um.createRandom();o=await fy.Authenticator.initializeAuthChain(t,{address:s.address,publicKey:nu(s.publicKey),privateKey:nu(s.privateKey)},y0,i=>n.signMessage(i)),Mc.localStorageStoreIdentity(t,o)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:o,providerType:e.providerType}}function b0(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Ke.authUrl}/login?redirectTo=${e}`)}async function w0(){try{const t=await(await Qh()).tryPreviousConnection();return!t.account||!Mc.localStorageGetIdentity(t.account.toLowerCase())?null:await v0(t)}catch{return null}}async function _0(){try{await(await Qh()).disconnect()}catch{}}const E0=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,S0=Ke.chainId===80002?"amoy":"polygon",x0=Ke.chainId===80002?"dev":"prod";function ll(){return window.analytics}function C0(){let e;try{e=mo.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:E0,network:S0,app_env:x0}}function dr(e,t={}){const r={...C0(),...t},n=ll();n&&n.track(e,r)}function T0(e,t={}){const r=ll();r&&r.identify(e.toLowerCase(),t)}function A0(){const e=ll();e!=null&&e.reset&&e.reset()}function I0(e){dr("Shop Viewed Page",{page:e})}function td(e){return e===er.ProviderType.MAGIC||e===er.ProviderType.MAGIC_TEST?"magic":"wallet"}function R0(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function Do(e){return Math.round(e*10)/100}function ul(e){return!e.tokenId}function wx(e){return{item_id:e.itemId??null,contract_address:e.contractAddress,token_id:e.tokenId??null,trade_id:e.tradeId??null,price_credits:e.priceCredits,price_usd:Do(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:ul(e)}}function _x(e){const t=e.reduce((n,o)=>n+o.priceCredits,0),r=e.some(ul);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:Do(n.priceCredits)})),value_credits:t,value_usd:Do(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function P0(e){const t=e;if((t==null?void 0:t.code)===4001)return"user_rejected";const r=((t==null?void 0:t.message)??"").toLowerCase();return r.includes("reject")||r.includes("denied")||r.includes("cancel")?"user_rejected":r.includes("insufficient")?"insufficient_credits":r.includes("not for sale")||r.includes("no active listing")||r.includes("sold")?"not_for_sale":"unknown"}function Ex(e){return P0(e)==="user_rejected"}function N0(e){const t=window;if(t.analytics&&t.analytics.invoked)return;const r=t.analytics||[];r.invoked=!0,r.methods=["track","identify","page","group","alias","ready","on","once","off","reset","setAnonymousId"],r.factory=n=>(...o)=>(r.push([n,...o]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const o=document.createElement("script");o.async=!0,o.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(o)},t.analytics=r,r.load(e),r.page()}let rd=!1;function k0(){if(rd)return;rd=!0;const e=Ke.segmentWriteKey;e&&N0(e)}let $c=null;function O0(e){$c=e}function nd(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),$c)try{$c(e,t)}catch{}}const j0=/0x[a-fA-F0-9]{130}\b/g,B0=/0x[a-fA-F0-9]{64}\b/g,F0=/(sk_[a-z]+_[A-Za-z0-9]+|pi_[A-Za-z0-9]+_secret_[A-Za-z0-9]+|[A-Za-z0-9-]*secret[A-Za-z0-9-]*)/gi,L0=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function To(e){return e.replace(j0,"<signature>").replace(F0,"<secret>").replace(B0,"<hex32>")}function M0(e){var r;e.message&&(e.message=To(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=To(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=To(n.message));e.request&&(e.request.url&&(e.request.url=To(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const o of Object.keys(n)){if(L0.test(o)){delete n[o];continue}typeof n[o]=="string"&&(n[o]=To(n[o]))}};return t(e.tags),t(e.extra),e}let od=!1;function $0(){if(od)return;const e=Ke.sentryDsn;if(!e)return;od=!0,Lm({dsn:e,environment:Ke.sentryEnvironment,release:Ke.sentryRelease,integrations:[new Mm],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:M0});const t=D0();t&&$m({id:t}),O0((r,n)=>Dm(r,{extra:n}))}function D0(){var e;try{return((e=mo.getState().session)==null?void 0:e.address)??null}catch{return null}}const sd="shop-favorites";let da=null;const Zh=e=>e?`${sd}:${e.toLowerCase()}`:sd;function ad(e){var t;try{const r=localStorage.getItem(Zh(e));if(!r)return{};const n=JSON.parse(r);if(!n||typeof n!="object")return{};const o=n,s="state"in n&&((t=o.state)!=null&&t.items)?o.state.items:n;return s&&typeof s=="object"?s:{}}catch{return{}}}function id(e){try{localStorage.setItem(Zh(da),JSON.stringify(e))}catch{}}const ya=Nn(e=>({items:ad(da),toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,id(n),{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],id(n),{items:n}}),reloadFor:t=>{da=t?t.toLowerCase():null,e({items:ad(da)})}})),cd="shop:followed-creators:v1",q0=200;let dl=null;const Jh=e=>e?`${cd}:${e.toLowerCase()}`:cd;function ld(){try{const e=localStorage.getItem(Jh(dl));if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function ud(e){try{localStorage.setItem(Jh(dl),JSON.stringify(e))}catch{}}const Dc=Nn((e,t)=>({followed:ld(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const o=[n,...t().followed].slice(0,q0);ud(o),e({followed:o}),dr("Shop Followed Creator",{creator_address:n,following_count:o.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const o=t().followed.filter(s=>s!==n);ud(o),e({followed:o}),dr("Shop Unfollowed Creator",{creator_address:n,following_count:o.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r),reloadFor:r=>{dl=r?r.toLowerCase():null,e({followed:ld()})}})),hi="shop:signing_in",mo=Nn(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(hi,"1")}catch{}b0()},disconnect:async()=>{dr("Shop Signed Out");try{await _0()}catch(t){nd(t,{flow:"wallet",step:"disconnect"})}A0(),ya.getState().reloadFor(null),Dc.getState().reloadFor(null),e({session:null})},restore:async()=>{let t;try{t=await w0()}catch(n){nd(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),ya.getState().reloadFor(t.address),Dc.getState().reloadFor(t.address),T0(t.address,{sign_in_method:td(t.providerType)});let r=!1;try{r=sessionStorage.getItem(hi)==="1",r&&sessionStorage.removeItem(hi)}catch{}r&&dr("Shop Signed In",{method:td(t.providerType),is_new_user:R0(t.address)})}}));async function Xh(e){var n;const t=await fetch(`${Ke.peerUrl}/lambdas/profiles/${e.toLowerCase()}`);if(!t.ok)return;const r=await t.json();return(n=r==null?void 0:r.avatars)==null?void 0:n[0]}function xa(e){return Hr({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:()=>Xh(e)})}var Mr={},pi={},dd;function ep(){return dd||(dd=1,Object.defineProperty(pi,"__esModule",{value:!0})),pi}var $r={},wr={},Dn={},gn={},fd={},Ao,hd;function fr(){if(hd)return Ao;hd=1;var e=function(t){return t&&t.Math===Math&&t};return Ao=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof _c=="object"&&_c)||e(typeof Ao=="object"&&Ao)||(function(){return this})()||Function("return this")(),Ao}var mi,pd;function kn(){return pd||(pd=1,mi=function(e){try{return!!e()}catch{return!0}}),mi}var gi,md;function Ca(){if(md)return gi;md=1;var e=kn();return gi=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),gi}var yi,gd;function U0(){if(gd)return yi;gd=1;var e=Ca(),t=Function.prototype,r=t.apply,n=t.call;return yi=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),yi}var vi,yd;function go(){if(yd)return vi;yd=1;var e=Ca(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return vi=e?n:function(o){return function(){return r.apply(o,arguments)}},vi}var bi,vd;function tp(){if(vd)return bi;vd=1;var e=go(),t=e({}.toString),r=e("".slice);return bi=function(n){return r(t(n),8,-1)},bi}var wi,bd;function rp(){if(bd)return wi;bd=1;var e=tp(),t=go();return wi=function(r){if(e(r)==="Function")return t(r)},wi}var _i,wd;function On(){if(wd)return _i;wd=1;var e=typeof document=="object"&&document.all;return _i=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},_i}var Ei={},Si,_d;function es(){if(_d)return Si;_d=1;var e=kn();return Si=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Si}var xi,Ed;function fl(){if(Ed)return xi;Ed=1;var e=Ca(),t=Function.prototype.call;return xi=e?t.bind(t):function(){return t.apply(t,arguments)},xi}var Ci={},Sd;function H0(){if(Sd)return Ci;Sd=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Ci.f=r?function(o){var s=t(this,o);return!!s&&s.enumerable}:e,Ci}var Ti,xd;function np(){return xd||(xd=1,Ti=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Ti}var Ai,Cd;function V0(){if(Cd)return Ai;Cd=1;var e=go(),t=kn(),r=tp(),n=Object,o=e("".split);return Ai=t(function(){return!n("z").propertyIsEnumerable(0)})?function(s){return r(s)==="String"?o(s,""):n(s)}:n,Ai}var Ii,Td;function op(){return Td||(Td=1,Ii=function(e){return e==null}),Ii}var Ri,Ad;function sp(){if(Ad)return Ri;Ad=1;var e=op(),t=TypeError;return Ri=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Ri}var Pi,Id;function G0(){if(Id)return Pi;Id=1;var e=V0(),t=sp();return Pi=function(r){return e(t(r))},Pi}var Ni,Rd;function Ta(){if(Rd)return Ni;Rd=1;var e=On();return Ni=function(t){return typeof t=="object"?t!==null:e(t)},Ni}var ki,Pd;function ap(){return Pd||(Pd=1,ki={}),ki}var Oi,Nd;function z0(){if(Nd)return Oi;Nd=1;var e=ap(),t=fr(),r=On(),n=function(o){return r(o)?o:void 0};return Oi=function(o,s){return arguments.length<2?n(e[o])||n(t[o]):e[o]&&e[o][s]||t[o]&&t[o][s]},Oi}var ji,kd;function W0(){if(kd)return ji;kd=1;var e=go();return ji=e({}.isPrototypeOf),ji}var Bi,Od;function K0(){if(Od)return Bi;Od=1;var e=fr(),t=e.navigator,r=t&&t.userAgent;return Bi=r?String(r):"",Bi}var Fi,jd;function Y0(){if(jd)return Fi;jd=1;var e=fr(),t=K0(),r=e.process,n=e.Deno,o=r&&r.versions||n&&n.version,s=o&&o.v8,i,u;return s&&(i=s.split("."),u=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!u&&t&&(i=t.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=t.match(/Chrome\/(\d+)/),i&&(u=+i[1]))),Fi=u,Fi}var Li,Bd;function ip(){if(Bd)return Li;Bd=1;var e=Y0(),t=kn(),r=fr(),n=r.String;return Li=!!Object.getOwnPropertySymbols&&!t(function(){var o=Symbol("symbol detection");return!n(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Li}var Mi,Fd;function cp(){if(Fd)return Mi;Fd=1;var e=ip();return Mi=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Mi}var $i,Ld;function lp(){if(Ld)return $i;Ld=1;var e=z0(),t=On(),r=W0(),n=cp(),o=Object;return $i=n?function(s){return typeof s=="symbol"}:function(s){var i=e("Symbol");return t(i)&&r(i.prototype,o(s))},$i}var Di,Md;function Q0(){if(Md)return Di;Md=1;var e=String;return Di=function(t){try{return e(t)}catch{return"Object"}},Di}var qi,$d;function up(){if($d)return qi;$d=1;var e=On(),t=Q0(),r=TypeError;return qi=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},qi}var Ui,Dd;function Z0(){if(Dd)return Ui;Dd=1;var e=up(),t=op();return Ui=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Ui}var Hi,qd;function J0(){if(qd)return Hi;qd=1;var e=fl(),t=On(),r=Ta(),n=TypeError;return Hi=function(o,s){var i,u;if(s==="string"&&t(i=o.toString)&&!r(u=e(i,o))||t(i=o.valueOf)&&!r(u=e(i,o))||s!=="string"&&t(i=o.toString)&&!r(u=e(i,o)))return u;throw new n("Can't convert object to primitive value")},Hi}var Vi={exports:{}},Gi,Ud;function X0(){return Ud||(Ud=1,Gi=!0),Gi}var zi,Hd;function ev(){if(Hd)return zi;Hd=1;var e=fr(),t=Object.defineProperty;return zi=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},zi}var Vd;function tv(){if(Vd)return Vi.exports;Vd=1;var e=X0(),t=fr(),r=ev(),n="__core-js_shared__",o=Vi.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Vi.exports}var Wi,Gd;function rv(){if(Gd)return Wi;Gd=1;var e=tv();return Wi=function(t,r){return e[t]||(e[t]=r||{})},Wi}var Ki,zd;function nv(){if(zd)return Ki;zd=1;var e=sp(),t=Object;return Ki=function(r){return t(e(r))},Ki}var Yi,Wd;function hl(){if(Wd)return Yi;Wd=1;var e=go(),t=nv(),r=e({}.hasOwnProperty);return Yi=Object.hasOwn||function(o,s){return r(t(o),s)},Yi}var Qi,Kd;function ov(){if(Kd)return Qi;Kd=1;var e=go(),t=0,r=Math.random(),n=e(1.1.toString);return Qi=function(o){return"Symbol("+(o===void 0?"":o)+")_"+n(++t+r,36)},Qi}var Zi,Yd;function sv(){if(Yd)return Zi;Yd=1;var e=fr(),t=rv(),r=hl(),n=ov(),o=ip(),s=cp(),i=e.Symbol,u=t("wks"),d=s?i.for||i:i&&i.withoutSetter||n;return Zi=function(h){return r(u,h)||(u[h]=o&&r(i,h)?i[h]:d("Symbol."+h)),u[h]},Zi}var Ji,Qd;function av(){if(Qd)return Ji;Qd=1;var e=fl(),t=Ta(),r=lp(),n=Z0(),o=J0(),s=sv(),i=TypeError,u=s("toPrimitive");return Ji=function(d,h){if(!t(d)||r(d))return d;var m=n(d,u),p;if(m){if(h===void 0&&(h="default"),p=e(m,d,h),!t(p)||r(p))return p;throw new i("Can't convert object to primitive value")}return h===void 0&&(h="number"),o(d,h)},Ji}var Xi,Zd;function dp(){if(Zd)return Xi;Zd=1;var e=av(),t=lp();return Xi=function(r){var n=e(r,"string");return t(n)?n:n+""},Xi}var ec,Jd;function iv(){if(Jd)return ec;Jd=1;var e=fr(),t=Ta(),r=e.document,n=t(r)&&t(r.createElement);return ec=function(o){return n?r.createElement(o):{}},ec}var tc,Xd;function fp(){if(Xd)return tc;Xd=1;var e=es(),t=kn(),r=iv();return tc=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),tc}var ef;function cv(){if(ef)return Ei;ef=1;var e=es(),t=fl(),r=H0(),n=np(),o=G0(),s=dp(),i=hl(),u=fp(),d=Object.getOwnPropertyDescriptor;return Ei.f=e?d:function(m,p){if(m=o(m),p=s(p),u)try{return d(m,p)}catch{}if(i(m,p))return n(!t(r.f,m,p),m[p])},Ei}var rc,tf;function lv(){if(tf)return rc;tf=1;var e=kn(),t=On(),r=/#|\.prototype\./,n=function(d,h){var m=s[o(d)];return m===u?!0:m===i?!1:t(h)?e(h):!!h},o=n.normalize=function(d){return String(d).replace(r,".").toLowerCase()},s=n.data={},i=n.NATIVE="N",u=n.POLYFILL="P";return rc=n,rc}var nc,rf;function uv(){if(rf)return nc;rf=1;var e=rp(),t=up(),r=Ca(),n=e(e.bind);return nc=function(o,s){return t(o),s===void 0?o:r?n(o,s):function(){return o.apply(s,arguments)}},nc}var oc={},sc,nf;function dv(){if(nf)return sc;nf=1;var e=es(),t=kn();return sc=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sc}var ac,of;function fv(){if(of)return ac;of=1;var e=Ta(),t=String,r=TypeError;return ac=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},ac}var sf;function hv(){if(sf)return oc;sf=1;var e=es(),t=fp(),r=dv(),n=fv(),o=dp(),s=TypeError,i=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",h="configurable",m="writable";return oc.f=e?r?function(b,E,A){if(n(b),E=o(E),n(A),typeof b=="function"&&E==="prototype"&&"value"in A&&m in A&&!A[m]){var g=u(b,E);g&&g[m]&&(b[E]=A.value,A={configurable:h in A?A[h]:g[h],enumerable:d in A?A[d]:g[d],writable:!1})}return i(b,E,A)}:i:function(b,E,A){if(n(b),E=o(E),n(A),t)try{return i(b,E,A)}catch{}if("get"in A||"set"in A)throw new s("Accessors not supported");return"value"in A&&(b[E]=A.value),b},oc}var ic,af;function pv(){if(af)return ic;af=1;var e=es(),t=hv(),r=np();return ic=e?function(n,o,s){return t.f(n,o,r(1,s))}:function(n,o,s){return n[o]=s,n},ic}var cc,cf;function mv(){if(cf)return cc;cf=1;var e=fr(),t=U0(),r=rp(),n=On(),o=cv().f,s=lv(),i=ap(),u=uv(),d=pv(),h=hl(),m=function(p){var b=function(E,A,g){if(this instanceof b){switch(arguments.length){case 0:return new p;case 1:return new p(E);case 2:return new p(E,A)}return new p(E,A,g)}return t(p,this,arguments)};return b.prototype=p.prototype,b};return cc=function(p,b){var E=p.target,A=p.global,g=p.stat,T=p.proto,V=A?e:g?e[E]:e[E]&&e[E].prototype,v=A?i:i[E]||d(i,E,{})[E],R=v.prototype,w,Q,U,x,$,J,W,ne,X;for(x in b)w=s(A?x:E+(g?".":"#")+x,p.forced),Q=!w&&V&&h(V,x),J=v[x],Q&&(p.dontCallGetSet?(X=o(V,x),W=X&&X.value):W=V[x]),$=Q&&W?W:b[x],!(!w&&!T&&typeof J==typeof $)&&(p.bind&&Q?ne=u($,e):p.wrap&&Q?ne=m($):T&&n($)?ne=r($):ne=$,(p.sham||$&&$.sham||J&&J.sham)&&d(ne,"sham",!0),d(v,x,ne),T&&(U=E+"Prototype",h(i,U)||d(i,U,{}),d(i[U],x,$),p.real&&R&&(w||!R[x])&&d(R,x,$)))},cc}var lf;function gv(){if(lf)return fd;lf=1;var e=mv(),t=fr();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),fd}var lc,uf;function yv(){return uf||(uf=1,gv(),lc=fr()),lc}var uc,df;function vv(){if(df)return uc;df=1;var e=yv();return uc=e,uc}var ff;function hp(){if(ff)return gn;ff=1;var e=gn&&gn.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gn,"__esModule",{value:!0}),gn.getImplementation=void 0;var t=e(vv());function r(n,o){var s,i=(s=n[o])!==null&&s!==void 0?s:t.default[o];if(!i)throw new ReferenceError('"'+o+'" is not defined');return i}return gn.getImplementation=r,gn}var hf;function pp(){if(hf)return Dn;hf=1;var e=Dn&&Dn.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&u[d],m=0;if(h)return h.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Dn,"__esModule",{value:!0});var t=Gh(),r=hp(),n="x-identity-auth-chain-",o="x-identity-timestamp",s="x-identity-metadata";function i(u){u===void 0&&(u={});var d=(0,r.getImplementation)(u,"Headers");return function(m,p,b,E,A){var g,T,V=new d(A),v=String(Date.now()),R=JSON.stringify(E),w=[p,b,v,R].join(":").toLowerCase(),Q=0,U=t.Authenticator.signPayload(m,w);try{for(var x=e(U),$=x.next();!$.done;$=x.next()){var J=$.value;V.set(n+Q,JSON.stringify(J)),Q++}}catch(W){g={error:W}}finally{try{$&&!$.done&&(T=x.return)&&T.call(x)}finally{if(g)throw g.error}}return V.set(o,v),V.set(s,R),V}}return Dn.default=i,Dn}var pf;function mp(){if(pf)return wr;pf=1;var e=wr&&wr.__assign||function(){return e=Object.assign||function(i){for(var u,d=1,h=arguments.length;d<h;d++){u=arguments[d];for(var m in u)Object.prototype.hasOwnProperty.call(u,m)&&(i[m]=u[m])}return i},e.apply(this,arguments)},t=wr&&wr.__rest||function(i,u){var d={};for(var h in i)Object.prototype.hasOwnProperty.call(i,h)&&u.indexOf(h)<0&&(d[h]=i[h]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,h=Object.getOwnPropertySymbols(i);m<h.length;m++)u.indexOf(h[m])<0&&Object.prototype.propertyIsEnumerable.call(i,h[m])&&(d[h[m]]=i[h[m]]);return d},r=wr&&wr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(wr,"__esModule",{value:!0});var n=r(pp()),o=hp();function s(i){i===void 0&&(i={});var u=(0,n.default)(i),d=(0,o.getImplementation)(i,"URL"),h=(0,o.getImplementation)(i,"Request"),m=(0,o.getImplementation)(i,"fetch");return function(b,E){if(E&&E.identity){var A=E.identity,g=E.metadata,T=t(E,["identity","metadata"]);if(typeof b=="string"||b instanceof d||globalThis.URL&&b instanceof globalThis.URL){var V=typeof b=="string"?new d(b):b,v=new h(V.toString(),e(e({},T),{headers:u(A,E.method||"GET",V.pathname,g||{},T==null?void 0:T.headers)}));return m(v)}var R=new d(b.url),w=new h(b),Q=u(A,b.method||"GET",R.pathname,g||{});return Q.forEach(function(U,x){w.headers.set(x,U)}),m(w)}return m(b,E)}}return wr.default=s,wr}var mf;function bv(){return mf||(mf=1,(function(e){var t=$r&&$r.__createBinding||(Object.create?(function(i,u,d,h){h===void 0&&(h=d),Object.defineProperty(i,h,{enumerable:!0,get:function(){return u[d]}})}):(function(i,u,d,h){h===void 0&&(h=d),i[h]=u[d]})),r=$r&&$r.__exportStar||function(i,u){for(var d in i)d!=="default"&&!Object.prototype.hasOwnProperty.call(u,d)&&t(u,i,d)},n=$r&&$r.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(ep(),e);var o=mp();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(o).default}});var s=pp();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(s).default}})})($r)),$r}var gf;function wv(){return gf||(gf=1,(function(e){var t=Mr&&Mr.__createBinding||(Object.create?(function(s,i,u,d){d===void 0&&(d=u),Object.defineProperty(s,d,{enumerable:!0,get:function(){return i[u]}})}):(function(s,i,u,d){d===void 0&&(d=u),s[d]=i[u]})),r=Mr&&Mr.__exportStar||function(s,i){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(i,u)&&t(i,s,u)},n=Mr&&Mr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),r(ep(),e),r(bv(),e);var o=n(mp());e.default=(0,o.default)()})(Mr)),Mr}var _v=wv();const Aa=_a(_v);async function Ev(e,t){const r=`${Ke.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await Aa(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function Sv(e,t){const{usd:r}=await Ev(e,t);return r??{balanceCents:0,credits:0}}async function Sx(e,t,r){const n=`${Ke.creditsServerUrl}/credits/authorize`,o=await Aa(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!o.ok)throw new Error(`authorizeUsdCredit ${o.status}: ${await o.text()}`);return o.json()}async function xx(e,t,r){const n=new URLSearchParams;n.set("status","all"),n.set("limit",String(r.first)),(r==null?void 0:r.skip)!=null&&n.set("offset",String(r.skip));const o=n.toString(),s=`${Ke.creditsServerUrl}/users/${e.toLowerCase()}/purchases${o?`?${o}`:""}`,i=await Aa(s,{method:"GET",identity:t,metadata:{}});if(!i.ok)throw new Error(`fetchUserPurchases ${i.status}: ${await i.text()}`);const u=await i.json(),d=u.purchases??[],h=(r==null?void 0:r.skip)??0,m=r==null?void 0:r.first,p=typeof u.total=="number"?u.total:h+d.length+(d.length>=m?1:0);return{items:d,total:p}}async function Cx(e,t){if(t.length===0)return 0;const r=`${Ke.creditsServerUrl}/credits/authorize/cancel`,n=await Aa(r,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({salts:t})});if(!n.ok)throw new Error(`cancelUsdIntents ${n.status}: ${await n.text()}`);return(await n.json()).released??0}async function Tx(e,t=1e3){const r=await fetch(`${Ke.creditsServerUrl}/dev/mint-usd`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:e.toLowerCase(),usdCents:t})});if(!r.ok)throw new Error(`devMintUsd ${r.status}: ${await r.text()}`);return r.json()}function xv(e){return Hr({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>Sv(e.address,e.identity)})}function Cv(e,t){return t?"—":(e==null?void 0:e.credits)??0}const Tv={};function gp(e,t){let r;try{r=e()}catch{return}return{getItem:o=>{var s;const i=d=>d===null?null:JSON.parse(d,void 0),u=(s=r.getItem(o))!=null?s:null;return u instanceof Promise?u.then(i):i(u)},setItem:(o,s)=>r.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>r.removeItem(o)}}const qo=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return qo(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return qo(n)(r)}}}},Av=(e,t)=>(r,n,o)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:T=>T,version:0,merge:(T,V)=>({...V,...T}),...t},i=!1;const u=new Set,d=new Set;let h;try{h=s.getStorage()}catch{}if(!h)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...T)},n,o);const m=qo(s.serialize),p=()=>{const T=s.partialize({...n()});let V;const v=m({state:T,version:s.version}).then(R=>h.setItem(s.name,R)).catch(R=>{V=R});if(V)throw V;return v},b=o.setState;o.setState=(T,V)=>{b(T,V),p()};const E=e((...T)=>{r(...T),p()},n,o);let A;const g=()=>{var T;if(!h)return;i=!1,u.forEach(v=>v(n()));const V=((T=s.onRehydrateStorage)==null?void 0:T.call(s,n()))||void 0;return qo(h.getItem.bind(h))(s.name).then(v=>{if(v)return s.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return s.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var R;return A=s.merge(v,(R=n())!=null?R:E),r(A,!0),p()}).then(()=>{V==null||V(A,void 0),i=!0,d.forEach(v=>v(A))}).catch(v=>{V==null||V(void 0,v)})};return o.persist={setOptions:T=>{s={...s,...T},T.getStorage&&(h=T.getStorage())},clearStorage:()=>{h==null||h.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:T=>(u.add(T),()=>{u.delete(T)}),onFinishHydration:T=>(d.add(T),()=>{d.delete(T)})},g(),A||E},Iv=(e,t)=>(r,n,o)=>{let s={storage:gp(()=>localStorage),partialize:g=>g,version:0,merge:(g,T)=>({...T,...g}),...t},i=!1;const u=new Set,d=new Set;let h=s.storage;if(!h)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...g)},n,o);const m=()=>{const g=s.partialize({...n()});return h.setItem(s.name,{state:g,version:s.version})},p=o.setState;o.setState=(g,T)=>{p(g,T),m()};const b=e((...g)=>{r(...g),m()},n,o);o.getInitialState=()=>b;let E;const A=()=>{var g,T;if(!h)return;i=!1,u.forEach(v=>{var R;return v((R=n())!=null?R:b)});const V=((T=s.onRehydrateStorage)==null?void 0:T.call(s,(g=n())!=null?g:b))||void 0;return qo(h.getItem.bind(h))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return[!0,s.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var R;const[w,Q]=v;if(E=s.merge(Q,(R=n())!=null?R:b),r(E,!0),w)return m()}).then(()=>{V==null||V(E,void 0),E=n(),i=!0,d.forEach(v=>v(E))}).catch(v=>{V==null||V(void 0,v)})};return o.persist={setOptions:g=>{s={...s,...g},g.storage&&(h=g.storage)},clearStorage:()=>{h==null||h.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>A(),hasHydrated:()=>i,onHydrate:g=>(u.add(g),()=>{u.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},s.skipHydration||A(),E||b},Rv=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Tv?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Av(e,t)):Iv(e,t),Pv=Rv,Nv=e=>Do(e.reduce((t,r)=>t+r.priceCredits,0)),Zt=Nn()(Pv((e,t)=>({items:[],open:!1,justAddedCount:0,fittingOpen:!1,add:(r,n="grid")=>{const o=t().items.some(i=>i.id===r.id);if(e(i=>o?{open:!0}:{items:[...i.items,r],open:!0,justAddedCount:(i.open?i.justAddedCount:0)+1}),o)return;const s=t().items;dr("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:Do(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:s.length,cart_value_usd:Nv(s)})},remove:r=>{const n=t().items.find(o=>o.id===r);e(o=>({items:o.items.filter(s=>s.id!==r)})),n&&dr("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),restore:r=>e(n=>n.items.length?{}:{items:r}),setOpen:r=>e({open:r,justAddedCount:0}),setFittingOpen:r=>e(r?{fittingOpen:r,open:!1}:{fittingOpen:r})}),{name:"dcl_shop_cart",version:1,storage:gp(()=>localStorage),partialize:e=>({items:e.items})})),fo={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function Ax(e){return`${e} ${e===1?fo.nameSingular:fo.name}`}const kv=Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:2});function zn(e){return kv.format(e)}function jo(e){return e.toLocaleString("en")}function ur({className:e}){return f.jsx("span",{className:`ico ${fo.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function yp(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Ov(e){Vm(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var jv=vn(vn({},Hm),{textComponent:oe.Fragment});function Bv(e){return function(t){return e(oe.Children.toArray(t))}}var pl=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=oe.createContext(null)):oe.createContext(null);pl.Consumer;var Fv=pl.Provider,Lv=Fv,Mv=pl;function vp(){var e=oe.useContext(Mv);return Ov(e),e}var qc;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(qc||(qc={}));var Uc;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Uc||(Uc={}));function bp(e){var t=function(r){var n=vp(),o=r.value,s=r.children,i=rl(r,["value","children"]),u=typeof o=="string"?new Date(o||0):o,d=e==="formatDate"?n.formatDateToParts(u,i):n.formatTimeToParts(u,i);return s(d)};return t.displayName=Uc[e],t}function ts(e){var t=function(r){var n=vp(),o=r.value,s=r.children,i=rl(r,["value","children"]),u=n[e](o,i);if(typeof s=="function")return s(u);var d=n.textComponent||oe.Fragment;return oe.createElement(d,null,u)};return t.displayName=qc[e],t}function wp(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=zm(n)?Bv(n):n,t},{})}var yf=function(e,t,r,n){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var i=wp(n),u=Wm.apply(void 0,Km([e,t,r,i],o,!1));return Array.isArray(u)?oe.Children.toArray(u):u},$v=function(e,t){var r=e.defaultRichTextElements,n=rl(e,["defaultRichTextElements"]),o=wp(r),s=Gm(vn(vn(vn({},jv),n),{defaultRichTextElements:o}),t),i={locale:s.locale,timeZone:s.timeZone,fallbackOnEmptyString:s.fallbackOnEmptyString,formats:s.formats,defaultLocale:s.defaultLocale,defaultFormats:s.defaultFormats,messages:s.messages,onError:s.onError,defaultRichTextElements:o};return vn(vn({},s),{formatMessage:yf.bind(null,i,s.formatters),$t:yf.bind(null,i,s.formatters)})};ts("formatDate");ts("formatTime");ts("formatNumber");ts("formatList");ts("formatDisplayName");bp("formatDate");bp("formatTime");const Dv={rejected:"You cancelled the request.",insufficient:"You don't have enough {currency} — get more first.",soldOrRemoved:"This item was just sold or removed.",cantBuyOwn:"You can't buy your own listing."},qv={overview:"Overview",collectibles:"Collectibles",myAssets:"My Assets",myFavorites:"My Favorites",myPurchases:"My Purchases",searchPlaceholder:"Search items…",searchAria:"Search the shop",yourBalance:"Your {currency}",getCredits:"Get {currency}",cart:"Cart"},Uv={suggestions:"Search suggestions",recent:"Recent searches",clearRecent:"Clear",removeRecent:"Remove “{query}” from recent searches",searching:"Searching…",noResults:"No results match “{query}”",seeAll:"See all {count} results",clear:"Clear search",creators:"Creators",collections:"Collections",items:"Items",byCreator:"By {name}"},Hv={breadcrumb:"Collectibles",fallbackTitle:"Collection",category:"Category",viewProfile:"View profile",copyAddress:"Copy account",copied:"Copied",empty:"This collection has no items to show.",error:"Couldn’t load this collection — please try again.",breadcrumbAria:"Breadcrumb",priceMin:"Minimum price",priceMax:"Maximum price",priceMinPlaceholder:"Min",priceMaxPlaceholder:"Max",priceHint:"Price in {currency}"},Vv={viewCollection:"View collection",itemCount:"{count, plural, one {# Item} other {# Items}}"},Gv={shopAll:"Shop All",wearables:"Wearables",emotes:"Emotes",collections:"Collections",head:"Head",upperBody:"Upper Body",handwear:"Handwear",lowerBody:"Lower Body",feet:"Feet",accessories:"Accessories",skins:"Skins",dance:"Dance",stunt:"Stunt",greetings:"Greetings",fun:"Fun",poses:"Poses",reactions:"Reactions",horror:"Horror",miscellaneous:"Miscellaneous"},zv={breadcrumb:"Assets",category:"Category",fallbackName:"Creator",viewProfile:"View profile",editStore:"Edit store",link:{website:"Website",twitter:"Twitter",discord:"Discord",facebook:"Facebook"},follow:"Follow",following:"Following",followTitle:"Follow creator",unfollowTitle:"Unfollow creator",empty:"This creator has no items to show yet.",collectionsCount:"{count, plural, one {# collection} other {# collections}}",collectionsEmpty:"This creator hasn’t published any collections yet.",error:"Couldn’t load this creator — please try again.",breadcrumbAria:"Breadcrumb",priceMin:"Minimum price",priceMax:"Maximum price",priceMinPlaceholder:"Min",priceMaxPlaceholder:"Max",priceHint:"Price in {currency}"},Wv={title:"Store settings",back:"Back to your store",signInPrompt:"Sign in to set up your store.",signIn:"Sign in",seeAsGuest:"See store as guest",loading:"Loading your store…",cover:"Store cover",upload:"Upload your own",description:"Description",website:"Website",twitter:"Twitter handle",discord:"Discord invite ID",facebook:"Facebook handle",save:"Save",saving:"Saving…",saved:"Store saved.",saveError:"Couldn’t save your store — please try again.",sizeError:"Maximum cover size is {max}; the image you chose is {current}.",linkError:"Link should start with {value}"},Kv={title:"Page not found",body:"The page you’re looking for isn’t here. Let’s get you back to the shop.",cta:"Browse Collectibles"},Yv={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"},panelTitle:"Cart: {count, plural, one {# Item} other {# Items}}",goBack:"Go back",fittingRoom:"Fitting Room",removeFromCart:"Remove {name} from cart",increaseQuantity:"Increase quantity",removeFromFavorites:"Remove {name} from favorites",addToFavorites:"Add {name} to favorites",remove:"Remove {name}",removeTitle:"Remove",clearCart:"Clear cart",purchaseSummary:"Purchase Summary",totalItems:"Total: {count, plural, one {# item} other {# items}}",working:"Working…",priceChanged:"Prices or availability changed since you added these — review the updated total and confirm to buy.",youMightAlsoLike:"You might also like",status:{reviewing:"Reviewing your cart…"},error:{insufficient:"You don't have enough {currency} — get more first.",noneAvailable:"None of these items are available to buy right now.",listingChanged:"One or more items changed — please review your cart and try again."},drop:{unavailable:"{count} no longer available",own:"{count} you can't buy (your own listing)",and:"and",removed:"Removed {items} from your cart."}},Qv={title:"Purchase {currency}",subtitle:"Get {currency} and start shopping in the Marketplace!",learnMore:"Learn more",canceledNote:"Payment canceled — no charge was made. Pick a pack whenever you’re ready.",packBadge:"Recommended",packAria:"Get {amount} for ${usd}",creditsAmount:"{credits} {currency}",redirecting:"Redirecting to secure checkout…",processing:"Completing purchase",successTitle:"Your purchase was successful!",successBody:"Your {currency} are ready to spend in the Marketplace.",creditsAdded:"Added to your account",buyMore:"Buy more {currency}",startShopping:"Start shopping",pendingTitle:"Your {currency} are on the way",pendingBody:"Your payment went through. It’s taking a little longer than usual to confirm — your balance will update automatically as soon as it lands, no need to pay again.",done:"Done",errorTitle:"Something went wrong",tryAgain:"Try again",errorCanceled:"You cancelled the request.",errorSignIn:"Sign in to get {currency}.",errorTimeout:"This is taking longer than usual — your {currency} will appear shortly.",errorGeneric:"Couldn’t complete your purchase — please try again.",errorGrant:"Couldn’t add your {currency} — please try again."},Zv={price:"Price"},Jv={sale:"SALE",saleWithDiscount:"SALE -{pct}%",smart:"Smart",addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites",marketPrice:"Market price",unavailable:"Unavailable",buyNow:"Buy now",yourItem:"Your item",inCart:"In cart",addToCart:"Add to cart"},Xv={titleBuy:"Buy Asset",titleNoFunds:"Buy Credits and Item",titleComplete:"Purchase complete!",dialogAria:"Buy {name}",close:"Close",dclBalance:"DCL Balance:",myCreditsBalance:"My Credits Balance:",signInToCheckout:"Sign in to check out.",insufficientFunds:"Insufficient Funds.",warningNeedToBuy:"You will need to buy",warningCreditsAmount:"{count} Credits",warningToPurchase:"to purchase {count, plural, one {this item.} other {these items.}}",cancel:"Cancel",buy:"Buy",completingPurchase:"Completing Purchase…",completingTransaction:"Completing transaction…",successBody:"You can find your item in the My Assets tab.",myAssets:"My assets",tryInWorld:"Try in world",itemFallback:"Item",error:{generic:"Couldn't complete the purchase — please try again.",creditsCheckout:"Couldn't start the credits checkout — please try again."}},eb={titleBuy:"Buy Assets",titleNoFunds:"Buy Credits and Items",dialogAria:"Check out your cart"},tb={finalPrice:"Final price",lockedForPurchase:"Locked for this purchase",todaysPrice:"Today’s price",lockingPrice:"Locking today’s price…",yourBalance:"Your balance:",needMore:"You’ll need a few more {currency} to buy this.",confirming:"Confirming your purchase…",buying:"Buying…",confirmPurchase:"Confirm purchase",error:{insufficient:"Not enough {currency} — get more first.",soldOrRemoved:"This item was just sold or removed. Refreshing the market…",generic:"Couldn't complete checkout — please try again."}},rb={genderMale:"Male",genderFemale:"Female",genderUnisex:"Unisex",categoryEmote:"Emote",categoryWearable:"Wearable",moreFromCollection:"More from this collection",notForSale:"Not for sale",checking:"Checking…",notAvailableTitle:"This item isn’t available",notAvailableBody:"It may have been delisted or moved. Browse Collectibles for something else.",breadcrumbAria:"Breadcrumb",itemFallback:"Item",description:"Description",showLess:"Show less",readMore:"Read more",creator:"Creator",collection:"Collection",price:"Price",stock:"Stock",ownItemPrefix:"This is your item — manage it in",ownItemSuffix:"."},nb={finalizing:"Finalizing your purchase…",processing:"Processing your purchase…",indexingBefore:"Payment confirmed — adding",indexingAfter:"to your wardrobe. Almost there.",confirmingBefore:"Confirming",confirmingAfter:"on-chain. This usually takes a few seconds — keep this tab open.",itemCount:"{count, plural, one {# item} other {# items}}",viewTransaction:"View transaction ↗",stillProcessingTitle:"Still processing…",timedOutBefore:"This is taking longer than usual to confirm. Your purchase may still complete — check",timedOutAfter:"in a few minutes to see the final status. No need to buy again.",viewMyPurchases:"View my purchases",keepShopping:"Keep shopping",failedTitle:"Your purchase didn’t go through",failedBody:"The transaction failed on-chain, so nothing was delivered. Your credits weren’t spent (any hold is released shortly) — you can try again.",backToShop:"Back to shop",title:"It’s yours!",heroInWardrobe:"is now in your wardrobe.",itemsInWardrobe:"{count, plural, one {# item is now in your wardrobe.} other {# items are now in your wardrobe.}}",viewOrder:"View order",useItInWorld:"Use it in-world"},ob={loading:"Loading preview",shownOnBody:"Shown on a {shape} body — this item isn’t made for your avatar’s shape.",previewMode:"Preview mode",onAvatar:"On avatar",item:"Item"},sb={filters:"Filters",closeFilters:"Close filters",category:"Category",min:"Min",max:"Max",priceTo:"to",minPriceAria:"Minimum price",maxPriceAria:"Maximum price",minPriceSliderAria:"Minimum price slider",maxPriceSliderAria:"Maximum price slider",rarity:"Rarity",clearFilters:"Clear Filters",apply:"Apply",marketUnavailable:"Some market prices are temporarily unavailable — buying those items is paused for a moment. Please try again shortly.",loadError:"Couldn’t load items — please try again.",noItems:"No items match your filters."},ab={signInPrompt:"Sign in to sell your items.",removedFromSale:"“{name}” is no longer for sale.",removeListingError:"Couldn’t remove the listing — please try again.",importTitle:"Import your listings",importSub:"You have {count, plural, one {# item} other {# items}} for sale elsewhere — bring them into the Shop.",import:"Import",ownedTitle:"Items you own",ownedSub:"Wearables & emotes you’ve bought — resell them in the Shop.",ownedError:"Couldn’t load your items — please try again.",viewItem:"View {name}",onSale:"On sale",removing:"Removing…",removeListing:"Remove listing",putOnSale:"Put on sale",ownedEmpty:"No items in your wardrobe yet.",creationsTitle:"Your creations",creationsSub:"Items you made. Put them on sale in the Shop — set a price in {currency} and buyers pay with {currency}.",collectionsError:"We couldn’t load your collections right now. Please try again in a moment.",nothingToPublish:"You don’t have any items to publish yet.",available:"{count, number} available"},ib={processing:"Processing",completed:"Completed",itemFallback:"Item",signInTitle:"Sign in to see your purchases",signInBody:"Your order history shows up here once you sign in.",emptyTitle:"No purchases yet",emptyBody:"When you buy something it’ll appear here.",orderCount:"{count, plural, one {# order} other {# orders}}"},cb={emptyTitle:"No favorites yet",emptyBody:"Tap the heart on any item to save it here.",itemCount:"{count, plural, one {# item} other {# items}}"},lb={viewAll:"View all",previous:"Previous",next:"Next",carouselPages:"{title} pages",goToPage:"Go to page {page}",heroTitle:"Fashion week outfits",exploreCollection:"Explore collection",featuredProducts:"Featured Products",newCreations:"New Creations",promoEmotesAria:"Best rated emotes — explore collection",promoEmotesAlt:"Best rated emotes",promoOutfitsAria:"Week selected outfits — explore collection",promoOutfitsAlt:"Week selected outfits",emptyTitle:"New drops are on the way",emptyBody:"There are no items on sale right now — check back soon."},ub={crash:{title:"Something went wrong",body:"This page hit an unexpected error. Try reloading.",reload:"Reload"}},db={removeFromCart:"Remove {name} from cart",increaseQuantity:"Increase quantity",removeItem:"Remove {name}",remove:"Remove",dialogLabel:"Shopping cart",title:"Shopping Cart ({count})",close:"Close",bannerCount:"{count, plural, one {# Item} other {# Items}}",bannerAdded:"successfully added to cart!",total:"Total: {count, plural, one {# item} other {# items}}",goToCart:"Go to cart",continueShopping:"Continue shopping"},fb={sortNewest:"Newest",sortCheapest:"Cheapest",sortMostExpensive:"Most Expensive",sortName:"Name (A–Z)",count:"{count, plural, one {# Item} other {# Items}}",forQuery:"for “{query}”",rarity:"Rarity",clearAll:"Clear all",filters:"Filters",sortBy:"Sort by"},hb={added:"Added {count, plural, one {# item} other {# items}} to your cart.",forSale:"{count} for sale",allInCart:"All in cart",addAll:"Add all ({count}) to cart"},pb={newsletterTitle:"Get the weekly highlights in your inbox",newsletterFrameTitle:"Newsletter signup",connect:"Connect",gettingStarted:"Getting Started",resources:"Resources",menu:"Menu",linkWhatIs:"What is Decentraland",linkDownload:"Download",linkSystemRequirements:"System Requirements",linkFaqs:"FAQs",linkContactSupport:"Contact Support",linkMarketplace:"Marketplace",linkCreatorHub:"Creator Hub",linkDocs:"Docs",linkBlog:"Blog",linkVote:"Vote",linkPrivacy:"Privacy Policy",linkTerms:"Terms of Use",linkContentPolicy:"Content Policy",linkEthics:"Code of Ethics"},mb={viewAll:"View all",scrollLeft:"Scroll left",scrollRight:"Scroll right",pages:"Carousel pages",goToPage:"Go to page {page}"},gb={title:"Week Top Creators",thisWeek:"This Week",rank:"Rank",creator:"Creator",collections:"Collections",sales:"Sales",volume:"Volume"},yb={loading:"Loading…",loadMore:"Load more"},vb={title:"Recently viewed"},bb={title:"From creators you follow"},wb={loading:"Loading"},_b={label:"Purchase successful"},Eb={creations:{title:"Your creations",sub:"Items you made. Put them on sale in the Shop."},owned:{title:"Items you own",sub:"Things you've bought elsewhere — resell them in the Shop."},toastUpdated:"Your Shop is updated.",signInTitle:"Import your listings",signInBody:"Sign in to bring the items you already sell into the Shop.",emptyTitle:"You're all caught up",emptyBody:"Everything you sell is already in the Shop — nothing to import.",goToMyAssets:"Go to My Assets",eyebrow:"Import to the Shop",titleLead:"Bring your listings",titleAccent:"into the Shop",lede:"These items are already for sale elsewhere. We suggested a price in {currency} for each — matched to today's rate and rounded up. Adjust anything, then list them.",rate:"1 {currency} = $0.10 · prices rounded up",includeItem:"Include {name}",itemFallback:"Item",priceAria:"Price in {currency} for {name}",resetTo:"Reset to",list:"List",selectedSummary:"{count, plural, one {# item} other {# items}} selected · ${usd}",listAll:"List all ({count})"},Sb={errorGeneric:"Couldn't list your item — please try again.",errorWholeNumber:"Enter a whole number of credits",statusPreparing:"Getting your item ready…",statusListing:"Listing your item…",statusPublishing:"Publishing…",toastOnSale:"“{name}” is now on sale!",successTitle:"It’s on sale! 🎉",listedFor:"Listed for",viewInShop:"View in Shop",listTitle:"List “{name}”",priceLabel:"Price ({currency})",pricedInWhole:"Priced in whole {currency} (1 {currencySingular} = $0.10).",cancel:"Cancel",listing:"Listing…",putOnSale:"Put on sale"},xb={errorGeneric:"Couldn't publish your item — please try again.",errorWholeNumber:"Enter a whole number of credits",statusEnabling:"Enabling sales for this collection…",statusPublishing:"Publishing your item…",statusFinishing:"Finishing up…",toastOnSale:"“{name}” is now on sale!",listing:"Listing…",enableAndPutOnSale:"Enable & put on sale",putOnSale:"Put on sale",successTitle:"It’s on sale! 🎉",listedFor:"Listed for",dotAvailable:"· {count, plural, one {# available} other {# available}}",viewInShop:"View in Shop",publishTitle:"Publish “{name}”",fromCollection:"From your collection “{collectionName}” · {count, plural, one {# available} other {# available}}",priceLabel:"Price ({currency})",pricedInWhole:"Priced in whole {currency} (1 {currencySingular} = $0.10).",firstTimeConfirm:"First time selling from “{collectionName}”? It needs a one-time approval, then you’ll confirm the listing — two quick confirmations. After this, listing more items from this collection is a single step.",firstTimeManaged:"First time selling from “{collectionName}”? Setting it up takes a moment — after that, listing more items from this collection is instant.",readyConfirm:"This collection is ready — publishing is a single confirmation.",readyManaged:"This collection is ready — publishing is instant.",cancel:"Cancel",checking:"Checking…"},Cb={successTitle:"You're in the Shop! 🎉",nothingTitle:"Nothing listed",listedSummary:"{count, plural, one {# item is} other {# items are}} now for sale with {currency}.",noneListed:"No items were listed.",skippedSummary:"{count, plural, one {# skipped} other {# skipped}} — you can try those again anytime.",unlistedSummary:"{count, plural, one {# item was taken off the old marketplace but couldn't be re-listed — re-list it from My Assets.} other {# items were taken off the old marketplace but couldn't be re-listed — re-list them from My Assets.}}",goToMyAssets:"Go to My Assets",viewInShop:"View in Shop",listingTitle:"Listing your items",subConfirm:"We take down each old listing and re-list it for credits — confirm each step.",subManaged:"Moving your items to the Shop.",progressCount:"{current} of {total}",itemFallback:"Item",statusConfirm:"Confirm…",statusAdding:"Adding…",statusSkipped:"Skipped",statusFailed:"Failed",unlistedTooltip:"Removed from the old marketplace but not re-listed — re-list it from My Assets.",statusUnlisted:"Not listed",hintConfirm:"A couple of quick confirmations pop up per item (take down + re-list). Keep this open.",hintManaged:"This only takes a moment — keep this open.",statusWaiting:"Waiting"},Tb={title:"Fitting room",close:"Close",wearable:"Wearable",emptyStageTitle:"Nothing on right now.",emptyStageBody:"Turn on an item from the list to try it.",sub:"Mix and match your cart. Turn items on and off to see the look.",emote:"Emote",conflictTooltip:"Only one item per slot can be worn",onePerSlot:"1 per slot",madeForShape:"This item is made for the {shape} body shape",shapeOnly:"{shape} only",removeFromCart:"Remove {name} from cart",remove:"Remove",itemCount:"{count, plural, one {# item} other {# items}}",checkout:"Checkout"},Ab={male:"Male",female:"Female"},Ib={collectibles:{title:"Browse Collectibles",searchTitle:"Search results for “{query}”",description:"Browse thousands of wearables and emotes for your Decentraland avatar. Filter by category, rarity, and price to find your next look."},item:{notFoundTitle:"Item not available",fallbackDescription:"{name} — {rarity} {category} by {creator} on the Decentraland Shop."},collection:{description:"Explore every wearable and emote in the {name} collection on the Decentraland Shop."},creator:{description:"Discover wearables and emotes by {name} on the Decentraland Shop."},import:{title:"Import Listings"},storeSettings:{title:"Store Settings"},success:{title:"Purchase Complete"},notFound:{title:"Page Not Found"}},Rb={errors:Dv,nav:qv,search:Uv,collection:Hv,collectionCard:Vv,categories:Gv,creator:zv,storeSettings:Wv,notFound:Kv,cart:Yv,getCredits:Qv,filter:Zv,assetCard:Jv,buyModal:Xv,cartCheckout:eb,marketCheckout:tb,itemDetail:rb,success:nb,itemPreview:ob,assets:sb,myAssets:ab,myPurchases:ib,myFavorites:cb,overview:lb,app:ub,cartPopover:db,filterBar:fb,addAll:hb,footer:pb,collectionCarousel:mb,weekTopCreators:gb,loadMore:yb,recentlyViewed:vb,followedCreators:bb,spinner:wb,successAnimation:_b,importListings:Eb,sellModal:Sb,primaryList:xb,migrate:Cb,fittingRoom:Tb,bodyShape:Ab,seo:Ib},Pb={rejected:"Cancelaste la solicitud.",insufficient:"No tienes suficientes {currency}. Consigue más primero.",soldOrRemoved:"Este artículo acaba de venderse o eliminarse.",cantBuyOwn:"No puedes comprar tu propia publicación."},Nb={overview:"Inicio",collectibles:"Coleccionables",myAssets:"Mis artículos",myFavorites:"Mis favoritos",myPurchases:"Mis compras",searchPlaceholder:"Busca artículos…",searchAria:"Buscar en la tienda",yourBalance:"Tus {currency}",getCredits:"Conseguir {currency}",cart:"Carrito"},kb={suggestions:"Sugerencias de búsqueda",recent:"Búsquedas recientes",clearRecent:"Limpiar",removeRecent:"Quitar «{query}» de las búsquedas recientes",searching:"Buscando…",noResults:"Ningún resultado coincide con «{query}»",seeAll:"Ver los {count} resultados",clear:"Limpiar búsqueda",creators:"Creadores",collections:"Colecciones",items:"Artículos",byCreator:"Por {name}"},Ob={breadcrumb:"Coleccionables",fallbackTitle:"Colección",category:"Categoría",viewProfile:"Ver perfil",copyAddress:"Copiar cuenta",copied:"Copiado",empty:"Esta colección no tiene artículos para mostrar.",error:"No pudimos cargar esta colección. Inténtalo de nuevo.",breadcrumbAria:"Ruta de navegación",priceMin:"Precio mínimo",priceMax:"Precio máximo",priceMinPlaceholder:"Mín",priceMaxPlaceholder:"Máx",priceHint:"Precio en {currency}"},jb={viewCollection:"Ver colección",itemCount:"{count, plural, one {# Artículo} other {# Artículos}}"},Bb={shopAll:"Ver todo",wearables:"Wearables",emotes:"Emotes",collections:"Colecciones",head:"Cabeza",upperBody:"Torso",handwear:"Manos",lowerBody:"Piernas",feet:"Pies",accessories:"Accesorios",skins:"Skins",dance:"Baile",stunt:"Truco",greetings:"Saludos",fun:"Divertido",poses:"Poses",reactions:"Reacciones",horror:"Horror",miscellaneous:"Misceláneos"},Fb={breadcrumb:"Artículos",category:"Categoría",fallbackName:"Creador",viewProfile:"Ver perfil",editStore:"Editar tienda",link:{website:"Sitio web",twitter:"Twitter",discord:"Discord",facebook:"Facebook"},follow:"Seguir",following:"Siguiendo",followTitle:"Seguir al creador",unfollowTitle:"Dejar de seguir al creador",empty:"Este creador todavía no tiene artículos para mostrar.",collectionsCount:"{count, plural, one {# colección} other {# colecciones}}",collectionsEmpty:"Este creador todavía no ha publicado colecciones.",error:"No pudimos cargar este creador. Prueba de nuevo.",breadcrumbAria:"Ruta de navegación",priceMin:"Precio mínimo",priceMax:"Precio máximo",priceMinPlaceholder:"Mín",priceMaxPlaceholder:"Máx",priceHint:"Precio en {currency}"},Lb={title:"Configuración de la tienda",back:"Volver a tu tienda",signInPrompt:"Inicia sesión para configurar tu tienda.",signIn:"Iniciar sesión",seeAsGuest:"Ver tienda como visitante",loading:"Cargando tu tienda…",cover:"Portada de la tienda",upload:"Sube tu portada",description:"Descripción",website:"Sitio web",twitter:"Usuario de Twitter",discord:"ID de invitación de Discord",facebook:"Usuario de Facebook",save:"Guardar",saving:"Guardando…",saved:"Tienda guardada.",saveError:"No pudimos guardar tu tienda. Prueba de nuevo.",sizeError:"El tamaño máximo de la portada es {max}; la imagen que elegiste pesa {current}.",linkError:"El enlace debe comenzar con {value}"},Mb={title:"Página no encontrada",body:"La página que buscas no está aquí. Volvamos a la tienda.",cta:"Ver coleccionables"},$b={empty:{title:"Tu carrito está vacío",body:"Encuentra algo que te guste y aparecerá aquí.",cta:"Ver coleccionables"},panelTitle:"Carrito: {count, plural, one {# artículo} other {# artículos}}",goBack:"Volver",fittingRoom:"Probador",removeFromCart:"Quitar {name} del carrito",increaseQuantity:"Aumentar cantidad",removeFromFavorites:"Quitar {name} de favoritos",addToFavorites:"Agregar {name} a favoritos",remove:"Quitar {name}",removeTitle:"Quitar",clearCart:"Vaciar carrito",purchaseSummary:"Resumen de compra",totalItems:"Total: {count, plural, one {# artículo} other {# artículos}}",working:"Procesando…",priceChanged:"Los precios o la disponibilidad cambiaron desde que los agregaste. Revisa el total actualizado y confirma para comprar.",youMightAlsoLike:"También te puede gustar",status:{reviewing:"Revisando tu carrito…"},error:{insufficient:"No tienes suficientes {currency}. Consigue más primero.",noneAvailable:"Ninguno de estos artículos está disponible para comprar en este momento.",listingChanged:"Uno o más artículos cambiaron. Revisa tu carrito e inténtalo de nuevo."},drop:{unavailable:"{count, plural, one {# que ya no está disponible} other {# que ya no están disponibles}}",own:"{count} que no puedes comprar (tu propia publicación)",and:"y",removed:"Eliminamos {items} de tu carrito."}},Db={title:"Comprar {currency}",subtitle:"¡Consigue {currency} y empieza a comprar en el Marketplace!",learnMore:"Más información",canceledNote:"Pago cancelado: no se realizó ningún cargo. Elige un paquete cuando quieras.",packBadge:"Recomendado",packAria:"Consigue {amount} por ${usd}",creditsAmount:"{credits} {currency}",redirecting:"Redirigiendo al pago seguro…",processing:"Completando la compra",successTitle:"¡Tu compra se realizó con éxito!",successBody:"Tus {currency} están listos para gastar en el Marketplace.",creditsAdded:"Añadidos a tu cuenta",buyMore:"Comprar más {currency}",startShopping:"Empezar a comprar",pendingTitle:"Tus {currency} están en camino",pendingBody:"Tu pago se procesó correctamente. Está tardando un poco más de lo habitual en confirmarse; tu saldo se actualizará automáticamente en cuanto llegue, no necesitas pagar de nuevo.",done:"Listo",errorTitle:"Algo salió mal",tryAgain:"Intentar de nuevo",errorCanceled:"Cancelaste la solicitud.",errorSignIn:"Inicia sesión para conseguir {currency}.",errorTimeout:"Esto está tardando más de lo habitual; tus {currency} aparecerán en breve.",errorGeneric:"No pudimos completar tu compra. Inténtalo de nuevo.",errorGrant:"No pudimos añadir tus {currency}. Inténtalo de nuevo."},qb={price:"Precio"},Ub={sale:"OFERTA",saleWithDiscount:"OFERTA -{pct}%",smart:"Smart",addToFavorites:"Agregar a favoritos",removeFromFavorites:"Quitar de favoritos",marketPrice:"Precio de mercado",unavailable:"No disponible",buyNow:"Comprar ahora",yourItem:"Tu artículo",inCart:"En el carrito",addToCart:"Agregar al carrito"},Hb={titleBuy:"Comprar artículo",titleNoFunds:"Comprar créditos y artículo",titleComplete:"¡Compra completada!",dialogAria:"Comprar {name}",close:"Cerrar",dclBalance:"Saldo de DCL:",myCreditsBalance:"Saldo de mis créditos:",signInToCheckout:"Inicia sesión para finalizar la compra.",insufficientFunds:"Fondos insuficientes.",warningNeedToBuy:"Necesitarás comprar",warningCreditsAmount:"{count} créditos",warningToPurchase:"para comprar {count, plural, one {este artículo.} other {estos artículos.}}",cancel:"Cancelar",buy:"Comprar",completingPurchase:"Completando la compra…",completingTransaction:"Completando la transacción…",successBody:"Puedes encontrar tu artículo en la pestaña Mis artículos.",myAssets:"Mis artículos",tryInWorld:"Probar en el mundo",itemFallback:"Artículo",error:{generic:"No pudimos completar la compra. Inténtalo de nuevo.",creditsCheckout:"No pudimos iniciar el pago de créditos. Inténtalo de nuevo."}},Vb={titleBuy:"Comprar artículos",titleNoFunds:"Comprar créditos y artículos",dialogAria:"Finaliza la compra de tu carrito"},Gb={finalPrice:"Precio final",lockedForPurchase:"Fijado para esta compra",todaysPrice:"Precio de hoy",lockingPrice:"Fijando el precio de hoy…",yourBalance:"Tu saldo:",needMore:"Necesitarás algunos {currency} más para comprar esto.",confirming:"Confirmando tu compra…",buying:"Comprando…",confirmPurchase:"Confirmar compra",error:{insufficient:"No tienes suficientes {currency}. Consigue más primero.",soldOrRemoved:"Este artículo acaba de venderse o eliminarse. Actualizando el mercado…",generic:"No pudimos completar la compra. Inténtalo de nuevo."}},zb={genderMale:"Masculino",genderFemale:"Femenino",genderUnisex:"Unisex",categoryEmote:"Emote",categoryWearable:"Wearable",moreFromCollection:"Más de esta colección",notForSale:"No está a la venta",checking:"Comprobando…",notAvailableTitle:"Este artículo no está disponible",notAvailableBody:"Puede que se haya retirado o movido. Explora los coleccionables para encontrar otra cosa.",breadcrumbAria:"Ruta de navegación",itemFallback:"Artículo",description:"Descripción",showLess:"Ver menos",readMore:"Leer más",creator:"Creador",collection:"Colección",price:"Precio",stock:"Stock",ownItemPrefix:"Este es tu artículo: gestiónalo en",ownItemSuffix:"."},Wb={finalizing:"Finalizando tu compra…",processing:"Procesando tu compra…",indexingBefore:"Pago confirmado: añadiendo",indexingAfter:"a tu guardarropa. Ya casi está.",confirmingBefore:"Confirmando",confirmingAfter:"en la cadena. Esto suele tardar unos segundos; mantén esta pestaña abierta.",itemCount:"{count, plural, one {# artículo} other {# artículos}}",viewTransaction:"Ver transacción ↗",stillProcessingTitle:"Sigue procesándose…",timedOutBefore:"Esto está tardando más de lo habitual en confirmarse. Puede que tu compra aún se complete: revisa",timedOutAfter:"en unos minutos para ver el estado final. No necesitas comprar de nuevo.",viewMyPurchases:"Ver mis compras",keepShopping:"Seguir comprando",failedTitle:"Tu compra no se completó",failedBody:"La transacción falló en la cadena, así que no se entregó nada. No se gastaron tus créditos (cualquier retención se libera en breve); puedes intentarlo de nuevo.",backToShop:"Volver a la tienda",title:"¡Ya es tuyo!",heroInWardrobe:"ya está en tu guardarropa.",itemsInWardrobe:"{count, plural, one {# artículo ya está en tu guardarropa.} other {# artículos ya están en tu guardarropa.}}",viewOrder:"Ver pedido",useItInWorld:"Úsalo en el mundo"},Kb={loading:"Cargando vista previa",shownOnBody:"Se muestra en un cuerpo {shape}: este artículo no está hecho para la forma de tu avatar.",previewMode:"Modo de vista previa",onAvatar:"En el avatar",item:"Artículo"},Yb={filters:"Filtros",closeFilters:"Cerrar filtros",category:"Categoría",min:"Mín",max:"Máx",priceTo:"a",minPriceAria:"Precio mínimo",maxPriceAria:"Precio máximo",minPriceSliderAria:"Control deslizante de precio mínimo",maxPriceSliderAria:"Control deslizante de precio máximo",rarity:"Rareza",clearFilters:"Borrar filtros",apply:"Aplicar",marketUnavailable:"Algunos precios de mercado no están disponibles temporalmente; la compra de esos artículos está pausada por un momento. Inténtalo de nuevo en breve.",loadError:"No pudimos cargar los artículos. Inténtalo de nuevo.",noItems:"Ningún artículo coincide con tus filtros."},Qb={signInPrompt:"Inicia sesión para vender tus artículos.",removedFromSale:"«{name}» ya no está a la venta.",removeListingError:"No pudimos quitar la publicación. Inténtalo de nuevo.",importTitle:"Importa tus publicaciones",importSub:"Tienes {count, plural, one {# artículo} other {# artículos}} a la venta en otro lugar; tráelos a la tienda.",import:"Importar",ownedTitle:"Artículos que tienes",ownedSub:"Wearables y emotes que compraste: revéndelos en la tienda.",ownedError:"No pudimos cargar tus artículos. Inténtalo de nuevo.",viewItem:"Ver {name}",onSale:"A la venta",removing:"Quitando…",removeListing:"Quitar publicación",putOnSale:"Poner a la venta",ownedEmpty:"Todavía no tienes artículos en tu armario.",creationsTitle:"Tus creaciones",creationsSub:"Artículos que creaste. Ponlos a la venta en la tienda: fija un precio en {currency} y los compradores pagan con {currency}.",collectionsError:"No pudimos cargar tus colecciones en este momento. Inténtalo de nuevo en un momento.",nothingToPublish:"Todavía no tienes artículos para publicar.",available:"{count, plural, one {# disponible} other {# disponibles}}"},Zb={processing:"Procesando",completed:"Completada",itemFallback:"Artículo",signInTitle:"Inicia sesión para ver tus compras",signInBody:"Tu historial de pedidos aparecerá aquí cuando inicies sesión.",emptyTitle:"Aún no tienes compras",emptyBody:"Cuando compres algo, aparecerá aquí.",orderCount:"{count, plural, one {# pedido} other {# pedidos}}"},Jb={emptyTitle:"Aún no tienes favoritos",emptyBody:"Toca el corazón en cualquier artículo para guardarlo aquí.",itemCount:"{count, plural, one {# artículo} other {# artículos}}"},Xb={viewAll:"Ver todo",previous:"Anterior",next:"Siguiente",carouselPages:"Páginas de {title}",goToPage:"Ir a la página {page}",heroTitle:"Outfits de la semana de la moda",exploreCollection:"Explorar colección",featuredProducts:"Productos destacados",newCreations:"Nuevas creaciones",promoEmotesAria:"Emotes mejor valorados: explorar colección",promoEmotesAlt:"Emotes mejor valorados",promoOutfitsAria:"Outfits seleccionados de la semana: explorar colección",promoOutfitsAlt:"Outfits seleccionados de la semana",emptyTitle:"Se avecinan nuevos lanzamientos",emptyBody:"No hay artículos a la venta en este momento; vuelve pronto."},e1={crash:{title:"Algo salió mal",body:"Esta página tuvo un error inesperado. Prueba a recargar.",reload:"Recargar"}},t1={removeFromCart:"Quitar {name} del carrito",increaseQuantity:"Aumentar cantidad",removeItem:"Quitar {name}",remove:"Quitar",dialogLabel:"Carrito de compras",title:"Carrito de compras ({count})",close:"Cerrar",bannerCount:"{count, plural, one {# artículo} other {# artículos}}",bannerAdded:"añadido al carrito correctamente.",total:"Total: {count, plural, one {# artículo} other {# artículos}}",goToCart:"Ir al carrito",continueShopping:"Seguir comprando"},r1={sortNewest:"Más recientes",sortCheapest:"Más baratos",sortMostExpensive:"Más caros",sortName:"Nombre (A–Z)",count:"{count, plural, one {# artículo} other {# artículos}}",forQuery:"para “{query}”",rarity:"Rareza",clearAll:"Borrar todo",filters:"Filtros",sortBy:"Ordenar por"},n1={added:"{count, plural, one {Se añadió # artículo a tu carrito.} other {Se añadieron # artículos a tu carrito.}}",forSale:"{count} en venta",allInCart:"Todo en el carrito",addAll:"Añadir todo ({count}) al carrito"},o1={newsletterTitle:"Recibe lo más destacado de la semana en tu correo",newsletterFrameTitle:"Suscripción al boletín",connect:"Conecta",gettingStarted:"Primeros pasos",resources:"Recursos",menu:"Menú",linkWhatIs:"Qué es Decentraland",linkDownload:"Descargar",linkSystemRequirements:"Requisitos del sistema",linkFaqs:"Preguntas frecuentes",linkContactSupport:"Contactar con soporte",linkMarketplace:"Marketplace",linkCreatorHub:"Creator Hub",linkDocs:"Documentación",linkBlog:"Blog",linkVote:"Votar",linkPrivacy:"Política de privacidad",linkTerms:"Términos de uso",linkContentPolicy:"Política de contenido",linkEthics:"Código de ética"},s1={viewAll:"Ver todo",scrollLeft:"Desplazar a la izquierda",scrollRight:"Desplazar a la derecha",pages:"Páginas del carrusel",goToPage:"Ir a la página {page}"},a1={title:"Mejores creadores de la semana",thisWeek:"Esta semana",rank:"Posición",creator:"Creador",collections:"Colecciones",sales:"Ventas",volume:"Volumen"},i1={loading:"Cargando…",loadMore:"Cargar más"},c1={title:"Vistos recientemente"},l1={title:"De creadores que sigues"},u1={loading:"Cargando"},d1={label:"Compra exitosa"},f1={creations:{title:"Tus creaciones",sub:"Artículos que creaste. Ponlos a la venta en la Tienda."},owned:{title:"Artículos que posees",sub:"Cosas que compraste en otro lugar — revéndelas en la Tienda."},toastUpdated:"Tu Tienda está actualizada.",signInTitle:"Importa tus publicaciones",signInBody:"Inicia sesión para traer a la Tienda los artículos que ya vendes.",emptyTitle:"Estás al día",emptyBody:"Todo lo que vendes ya está en la Tienda — no hay nada que importar.",goToMyAssets:"Ir a Mis artículos",eyebrow:"Importar a la Tienda",titleLead:"Trae tus publicaciones",titleAccent:"a la Tienda",lede:"Estos artículos ya están a la venta en otro lugar. Sugerimos un precio en {currency} para cada uno, ajustado a la tasa de hoy y redondeado hacia arriba. Ajusta lo que quieras y publícalos.",rate:"1 {currency} = $0.10 · precios redondeados hacia arriba",includeItem:"Incluir {name}",itemFallback:"Artículo",priceAria:"Precio en {currency} para {name}",resetTo:"Restablecer a",list:"Publicar",selectedSummary:"{count, plural, one {# artículo seleccionado} other {# artículos seleccionados}} · ${usd}",listAll:"Publicar todo ({count})"},h1={errorGeneric:"No pudimos publicar tu artículo. Inténtalo de nuevo.",errorWholeNumber:"Introduce un número entero de credits",statusPreparing:"Preparando tu artículo…",statusListing:"Publicando tu artículo…",statusPublishing:"Publicando…",toastOnSale:"¡«{name}» ya está a la venta!",successTitle:"¡Ya está a la venta! 🎉",listedFor:"Publicado por",viewInShop:"Ver en la Tienda",listTitle:"Publicar «{name}»",priceLabel:"Precio ({currency})",pricedInWhole:"Con precio en {currency} enteros (1 {currencySingular} = $0.10).",cancel:"Cancelar",listing:"Publicando…",putOnSale:"Poner a la venta"},p1={errorGeneric:"No pudimos publicar tu artículo. Inténtalo de nuevo.",errorWholeNumber:"Introduce un número entero de credits",statusEnabling:"Activando las ventas de esta colección…",statusPublishing:"Publicando tu artículo…",statusFinishing:"Finalizando…",toastOnSale:"¡«{name}» ya está a la venta!",listing:"Publicando…",enableAndPutOnSale:"Activar y poner a la venta",putOnSale:"Poner a la venta",successTitle:"¡Ya está a la venta! 🎉",listedFor:"Publicado por",dotAvailable:"· {count, plural, one {# disponible} other {# disponibles}}",viewInShop:"Ver en la Tienda",publishTitle:"Publicar «{name}»",fromCollection:"De tu colección «{collectionName}» · {count, plural, one {# disponible} other {# disponibles}}",priceLabel:"Precio ({currency})",pricedInWhole:"Con precio en {currency} enteros (1 {currencySingular} = $0.10).",firstTimeConfirm:"¿Es la primera vez que vendes de «{collectionName}»? Necesita una aprobación única y luego confirmarás la publicación — dos confirmaciones rápidas. Después de esto, publicar más artículos de esta colección es un solo paso.",firstTimeManaged:"¿Es la primera vez que vendes de «{collectionName}»? Configurarlo lleva un momento — después, publicar más artículos de esta colección es instantáneo.",readyConfirm:"Esta colección está lista — publicar es una sola confirmación.",readyManaged:"Esta colección está lista — publicar es instantáneo.",cancel:"Cancelar",checking:"Comprobando…"},m1={successTitle:"¡Estás en la Tienda! 🎉",nothingTitle:"No se publicó nada",listedSummary:"{count, plural, one {# artículo está} other {# artículos están}} ahora a la venta con {currency}.",noneListed:"No se publicó ningún artículo.",skippedSummary:"{count, plural, one {# omitido} other {# omitidos}} — puedes volver a intentarlo cuando quieras.",unlistedSummary:"{count, plural, one {# artículo se retiró del marketplace anterior pero no se pudo volver a publicar — vuelve a publicarlo desde Mis artículos.} other {# artículos se retiraron del marketplace anterior pero no se pudieron volver a publicar — vuelve a publicarlos desde Mis artículos.}}",goToMyAssets:"Ir a Mis artículos",viewInShop:"Ver en la Tienda",listingTitle:"Publicando tus artículos",subConfirm:"Retiramos cada publicación anterior y la volvemos a publicar por credits — confirma cada paso.",subManaged:"Moviendo tus artículos a la Tienda.",progressCount:"{current} de {total}",itemFallback:"Artículo",statusConfirm:"Confirma…",statusAdding:"Añadiendo…",statusSkipped:"Omitido",statusFailed:"Falló",unlistedTooltip:"Se retiró del marketplace anterior pero no se volvió a publicar — vuelve a publicarlo desde Mis artículos.",statusUnlisted:"No publicado",hintConfirm:"Aparecerán un par de confirmaciones rápidas por artículo (retirar + volver a publicar). Mantén esto abierto.",hintManaged:"Esto solo lleva un momento — mantén esto abierto.",statusWaiting:"Esperando"},g1={title:"Probador",close:"Cerrar",wearable:"Wearable",emptyStageTitle:"No hay nada puesto ahora mismo.",emptyStageBody:"Activa un artículo de la lista para probarlo.",sub:"Combina los artículos de tu carrito. Activa y desactiva artículos para ver el look.",emote:"Emote",conflictTooltip:"Solo se puede llevar un artículo por espacio",onePerSlot:"1 por espacio",madeForShape:"Este artículo está hecho para el cuerpo {shape}",shapeOnly:"Solo {shape}",removeFromCart:"Quitar {name} del carrito",remove:"Quitar",itemCount:"{count, plural, one {# artículo} other {# artículos}}",checkout:"Finalizar compra"},y1={male:"Masculino",female:"Femenino"},v1={collectibles:{title:"Explorar coleccionables",searchTitle:"Resultados para «{query}»",description:"Explora miles de wearables y emotes para tu avatar de Decentraland. Filtra por categoría, rareza y precio para encontrar tu próximo look."},item:{notFoundTitle:"Artículo no disponible",fallbackDescription:"{name}: {rarity} {category} de {creator} en la Decentraland Shop."},collection:{description:"Explora todos los wearables y emotes de la colección {name} en la Decentraland Shop."},creator:{description:"Descubre wearables y emotes de {name} en la Decentraland Shop."},import:{title:"Importar artículos"},storeSettings:{title:"Configuración de la tienda"},success:{title:"Compra completada"},notFound:{title:"Página no encontrada"}},b1={errors:Pb,nav:Nb,search:kb,collection:Ob,collectionCard:jb,categories:Bb,creator:Fb,storeSettings:Lb,notFound:Mb,cart:$b,getCredits:Db,filter:qb,assetCard:Ub,buyModal:Hb,cartCheckout:Vb,marketCheckout:Gb,itemDetail:zb,success:Wb,itemPreview:Kb,assets:Yb,myAssets:Qb,myPurchases:Zb,myFavorites:Jb,overview:Xb,app:e1,cartPopover:t1,filterBar:r1,addAll:n1,footer:o1,collectionCarousel:s1,weekTopCreators:a1,loadMore:i1,recentlyViewed:c1,followedCreators:l1,spinner:u1,successAnimation:d1,importListings:f1,sellModal:h1,primaryList:p1,migrate:m1,fittingRoom:g1,bodyShape:y1,seo:v1},fa=["en","es"];function Hc(e,t="",r={}){for(const[n,o]of Object.entries(e)){const s=t?`${t}.${n}`:n;o&&typeof o=="object"&&!Array.isArray(o)?Hc(o,s,r):r[s]=String(o)}return r}const w1={en:Hc(Rb),es:Hc(b1)},_1=Ym(),dc={};function ml(e){return dc[e]||(dc[e]=$v({locale:e,defaultLocale:"en",messages:w1[e],onError:()=>{}},_1)),dc[e]}let _p=ml("en");function E1(e){_p=ml(e)}function ae(e,t){return _p.formatMessage({id:e},t)}function S1(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function x1(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)>>>0;return`hsl(${t%360}, 52%, 45%)`}function C1(e,t){var r;return(((r=e==null?void 0:e.trim())==null?void 0:r[0])||t.replace(/^0x/i,"")[0]||"?").toUpperCase()}function gl({address:e,className:t,linkToProfile:r,hidePrefix:n}){var E,A;const o=tl(),{data:s}=xa(e),i=(A=(E=s==null?void 0:s.avatar)==null?void 0:E.snapshots)==null?void 0:A.face256,[u,d]=oe.useState(!1);if(oe.useEffect(()=>d(!1),[i]),!e)return null;const h=s!=null&&s.name?yp(s.name):S1(e),p=!!i&&!u?f.jsx("img",{className:"creator__ava",src:i,alt:"",loading:"lazy",onError:()=>d(!0)}):f.jsx("span",{className:"creator__ava creator__ava--letter",style:{backgroundColor:x1(e)},"aria-hidden":!0,children:C1(s==null?void 0:s.name,e)}),b=f.jsxs(f.Fragment,{children:[p,f.jsxs("span",{className:"creator__name",children:[n?null:ae("search.byCreator",{name:""}),f.jsx("span",{className:"creator__display",children:h})]})]});return r?f.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,onClick:g=>{g.stopPropagation(),o(`/assets/creator/${e}`)},children:b}):f.jsx("span",{className:`creator${t?` ${t}`:""}`,children:b})}function Ep(){return f.jsxs("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,focusable:"false",children:[f.jsx("circle",{cx:"10",cy:"10",r:"10",fill:"#1ea672"}),f.jsx("path",{d:"M5.8 10.3l2.7 2.7 5.7-6",stroke:"#fff",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function T1({item:e,onRemove:t}){return f.jsxs("li",{className:"cartd__card",children:[f.jsxs("div",{className:"cartd__thumb",children:[e.thumbnail?f.jsx("img",{src:e.thumbnail,alt:e.name}):null,f.jsx("span",{className:"cartd__thumb-check",children:f.jsx(Ep,{})})]}),f.jsxs("div",{className:"cartd__info",children:[f.jsxs("div",{children:[f.jsx("div",{className:"cartd__name",title:e.name,children:e.name}),e.creator?f.jsx(gl,{address:e.creator,className:"cartd__by"}):null]}),f.jsxs("div",{className:"cartd__rowbottom",children:[f.jsxs("div",{className:"cartd__stepper",children:[f.jsx("button",{className:"cartd__step",onClick:()=>t(e.id),"aria-label":ae("cartPopover.removeFromCart",{name:e.name}),children:f.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:f.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),f.jsx("span",{className:"cartd__qty",children:"1"}),f.jsx("button",{className:"cartd__step",disabled:!0,"aria-label":ae("cartPopover.increaseQuantity"),children:f.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:f.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),f.jsxs("div",{className:"cartd__price",title:jo(e.priceCredits),children:[f.jsx(ur,{className:"cartd__diamond"}),zn(e.priceCredits)]})]})]}),f.jsx("button",{className:"cartd__del",onClick:()=>t(e.id),"aria-label":ae("cartPopover.removeItem",{name:e.name}),title:ae("cartPopover.remove"),children:f.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]})}function A1(){const e=Zt(d=>d.items),t=Zt(d=>d.open),r=Zt(d=>d.justAddedCount),n=Zt(d=>d.setOpen),o=Zt(d=>d.remove),s=oe.useRef(null),i=e.reduce((d,h)=>d+h.priceCredits,0),u=e.length;return oe.useEffect(()=>{if(!t)return;const d=h=>{h.key==="Escape"&&n(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[t,n]),!t||u===0?null:Pm.createPortal(f.jsxs("div",{className:"cartd",role:"dialog","aria-modal":"true","aria-label":ae("cartPopover.dialogLabel"),children:[f.jsx("div",{className:"cartd__scrim",onClick:()=>n(!1)}),f.jsxs("aside",{className:"cartd__panel",ref:s,children:[f.jsxs("header",{className:"cartd__head",children:[f.jsx("h2",{className:"cartd__title",children:ae("cartPopover.title",{count:u})}),f.jsx("button",{className:"cartd__close",onClick:()=>n(!1),"aria-label":ae("cartPopover.close"),children:f.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,focusable:"false",children:f.jsx("path",{d:"M5 5l14 14M19 5L5 19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),f.jsxs("div",{className:"cartd__body",children:[r>0?f.jsxs("div",{className:"cartd__banner",children:[f.jsx("span",{className:"cartd__banner-check",children:f.jsx(Ep,{})}),f.jsxs("p",{children:[f.jsx("strong",{children:ae("cartPopover.bannerCount",{count:r})})," ",ae("cartPopover.bannerAdded")]})]}):null,f.jsx("ul",{className:"cartd__list",children:e.map(d=>f.jsx(T1,{item:d,onRemove:o},d.id))})]}),f.jsxs("footer",{className:"cartd__foot",children:[f.jsxs("div",{className:"cartd__totalrow",children:[f.jsx("span",{className:"cartd__total-label",children:ae("cartPopover.total",{count:u})}),f.jsxs("span",{className:"cartd__total-val",title:jo(i),children:[f.jsx(ur,{className:"cartd__total-diamond"}),zn(i)]})]}),f.jsxs("div",{className:"cartd__ctas",children:[f.jsx(bn,{className:"cartd__cta cartd__cta--primary",to:"/cart",onClick:()=>n(!1),children:ae("cartPopover.goToCart")}),f.jsx("button",{className:"cartd__cta cartd__cta--secondary",onClick:()=>n(!1),children:ae("cartPopover.continueShopping")})]})]})]})]}),document.body)}var Io={},fc={exports:{}},vf;function yl(){return vf||(vf=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(fc)),fc.exports}var hc={};function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ye.apply(null,arguments)}function Xr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Sp(e){if(oe.isValidElement(e)||!Xr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Sp(e[r])}),t}function Ir(e,t,r={clone:!0}){const n=r.clone?Ye({},e):e;return Xr(e)&&Xr(t)&&Object.keys(t).forEach(o=>{oe.isValidElement(t[o])?n[o]=t[o]:Xr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Xr(e[o])?n[o]=Ir(e[o],t[o],r):r.clone?n[o]=Xr(t[o])?Sp(t[o]):t[o]:n[o]=t[o]}),n}const I1=Object.freeze(Object.defineProperty({__proto__:null,default:Ir,isPlainObject:Xr},Symbol.toStringTag,{value:"Module"}));function Uo(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const R1=Object.freeze(Object.defineProperty({__proto__:null,default:Uo},Symbol.toStringTag,{value:"Module"}));var pc={exports:{}},Qe={};/**
31
- * @license React
32
- * react-is.production.js
33
- *
34
- * Copyright (c) Meta Platforms, Inc. and affiliates.
35
- *
36
- * This source code is licensed under the MIT license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- */var bf;function P1(){if(bf)return Qe;bf=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");function A(g){if(typeof g=="object"&&g!==null){var T=g.$$typeof;switch(T){case e:switch(g=g.type,g){case r:case o:case n:case d:case h:case b:return g;default:switch(g=g&&g.$$typeof,g){case i:case u:case p:case m:return g;case s:return g;default:return T}}case t:return T}}}return Qe.ContextConsumer=s,Qe.ContextProvider=i,Qe.Element=e,Qe.ForwardRef=u,Qe.Fragment=r,Qe.Lazy=p,Qe.Memo=m,Qe.Portal=t,Qe.Profiler=o,Qe.StrictMode=n,Qe.Suspense=d,Qe.SuspenseList=h,Qe.isContextConsumer=function(g){return A(g)===s},Qe.isContextProvider=function(g){return A(g)===i},Qe.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Qe.isForwardRef=function(g){return A(g)===u},Qe.isFragment=function(g){return A(g)===r},Qe.isLazy=function(g){return A(g)===p},Qe.isMemo=function(g){return A(g)===m},Qe.isPortal=function(g){return A(g)===t},Qe.isProfiler=function(g){return A(g)===o},Qe.isStrictMode=function(g){return A(g)===n},Qe.isSuspense=function(g){return A(g)===d},Qe.isSuspenseList=function(g){return A(g)===h},Qe.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===o||g===n||g===d||g===h||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===m||g.$$typeof===i||g.$$typeof===s||g.$$typeof===u||g.$$typeof===E||g.getModuleId!==void 0)},Qe.typeOf=A,Qe}var wf;function N1(){return wf||(wf=1,pc.exports=P1()),pc.exports}var _f=N1();const k1=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function xp(e){const t=`${e}`.match(k1);return t&&t[1]||""}function Cp(e,t=""){return e.displayName||e.name||xp(e)||t}function Ef(e,t,r){const n=Cp(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function O1(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Cp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case _f.ForwardRef:return Ef(e,e.render,"ForwardRef");case _f.Memo:return Ef(e,e.type,"memo");default:return}}}const j1=Object.freeze(Object.defineProperty({__proto__:null,default:O1,getFunctionName:xp},Symbol.toStringTag,{value:"Module"}));function un(e){if(typeof e!="string")throw new Error(Uo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const B1=Object.freeze(Object.defineProperty({__proto__:null,default:un},Symbol.toStringTag,{value:"Module"}));function F1(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function L1(e,t=166){let r;function n(...o){const s=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(s,t)}return n.clear=()=>{clearTimeout(r)},n}function M1(e,t){return()=>null}function $1(e,t){var r,n;return oe.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function Tp(e){return e&&e.ownerDocument||document}function D1(e){return Tp(e).defaultView||window}function q1(e,t){return()=>null}function Ap(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Ip=typeof window<"u"?oe.useLayoutEffect:oe.useEffect;let Sf=0;function U1(e){const[t,r]=oe.useState(e),n=e||t;return oe.useEffect(()=>{t==null&&(Sf+=1,r(`mui-${Sf}`))},[t]),n}const xf=Ec.useId;function H1(e){if(xf!==void 0){const t=xf();return e??t}return U1(e)}function V1(e,t,r,n,o){return null}function G1({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=oe.useRef(e!==void 0),[s,i]=oe.useState(t),u=o?e:s,d=oe.useCallback(h=>{o||i(h)},[]);return[u,d]}function z1(e){const t=oe.useRef(e);return Ip(()=>{t.current=e}),oe.useRef((...r)=>(0,t.current)(...r)).current}function W1(...e){return oe.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Ap(r,t)})},e)}const Cf={};function K1(e,t){const r=oe.useRef(Cf);return r.current===Cf&&(r.current=e(t)),r}const Y1=[];function Q1(e){oe.useEffect(e,Y1)}class Ia{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Ia}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function Ix(){const e=K1(Ia.create).current;return Q1(e.disposeEffect),e}let Ra=!0,Vc=!1;const Z1=new Ia,J1={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function X1(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&J1[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function ew(e){e.metaKey||e.altKey||e.ctrlKey||(Ra=!0)}function mc(){Ra=!1}function tw(){this.visibilityState==="hidden"&&Vc&&(Ra=!0)}function rw(e){e.addEventListener("keydown",ew,!0),e.addEventListener("mousedown",mc,!0),e.addEventListener("pointerdown",mc,!0),e.addEventListener("touchstart",mc,!0),e.addEventListener("visibilitychange",tw,!0)}function nw(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Ra||X1(t)}function ow(){const e=oe.useCallback(o=>{o!=null&&rw(o.ownerDocument)},[]),t=oe.useRef(!1);function r(){return t.current?(Vc=!0,Z1.start(100,()=>{Vc=!1}),t.current=!1,!0):!1}function n(o){return nw(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function Gc(e,t){const r=Ye({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=Ye({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},s=t[n];r[n]={},!s||!Object.keys(s)?r[n]=o:!o||!Object.keys(o)?r[n]=s:(r[n]=Ye({},s),Object.keys(o).forEach(i=>{r[n][i]=Gc(o[i],s[i])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function sw(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((s,i)=>{if(i){const u=t(i);u!==""&&s.push(u),r&&r[i]&&s.push(r[i])}return s},[]).join(" ")}),n}const Tf=e=>e,aw=()=>{let e=Tf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Tf}}},Rp=aw(),iw={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Pp(e,t,r="Mui"){const n=iw[t];return n?`${r}-${n}`:`${Rp.generate(e)}-${t}`}function cw(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Pp(e,o,r)}),n}function lw(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const uw=Object.freeze(Object.defineProperty({__proto__:null,default:lw},Symbol.toStringTag,{value:"Module"}));function dn(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Np(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Np(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function dw(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Np(e))&&(n&&(n+=" "),n+=t);return n}const kp=oe.createContext(void 0);function Rx({value:e,children:t}){return f.jsx(kp.Provider,{value:e,children:t})}function fw(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Gc(o.defaultProps,n):!o.styleOverrides&&!o.variants?Gc(o,n):n}function hw({props:e,name:t}){const r=oe.useContext(kp);return fw({props:e,name:t,theme:{components:r}})}function pw(e){return hw(e)}var yn={},gc={exports:{}},Af;function mw(){return Af||(Af=1,(function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(gc)),gc.exports}var yc={exports:{}},If;function gw(){return If||(If=1,(function(e){function t(r,n){if(r==null)return{};var o={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(n.indexOf(s)!==-1)continue;o[s]=r[s]}return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(yc)),yc.exports}function yw(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function vw(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var bw=(function(){function e(r){var n=this;this._insertTag=function(o){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,s),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(vw(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=yw(o);try{s.insertRule(n,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e})(),kt="-ms-",va="-moz-",Ge="-webkit-",Op="comm",vl="rule",bl="decl",ww="@import",jp="@keyframes",_w="@layer",Ew=Math.abs,Pa=String.fromCharCode,Sw=Object.assign;function xw(e,t){return Ct(e,0)^45?(((t<<2^Ct(e,0))<<2^Ct(e,1))<<2^Ct(e,2))<<2^Ct(e,3):0}function Bp(e){return e.trim()}function Cw(e,t){return(e=t.exec(e))?e[0]:e}function ze(e,t,r){return e.replace(t,r)}function zc(e,t){return e.indexOf(t)}function Ct(e,t){return e.charCodeAt(t)|0}function Ho(e,t,r){return e.slice(t,r)}function Cr(e){return e.length}function wl(e){return e.length}function ia(e,t){return t.push(e),e}function Tw(e,t){return e.map(t).join("")}var Na=1,ho=1,Fp=0,zt=0,mt=0,yo="";function ka(e,t,r,n,o,s,i){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:Na,column:ho,length:i,return:""}}function Ro(e,t){return Sw(ka("",null,null,"",null,null,0),e,{length:-e.length},t)}function Aw(){return mt}function Iw(){return mt=zt>0?Ct(yo,--zt):0,ho--,mt===10&&(ho=1,Na--),mt}function Xt(){return mt=zt<Fp?Ct(yo,zt++):0,ho++,mt===10&&(ho=1,Na++),mt}function Rr(){return Ct(yo,zt)}function ha(){return zt}function rs(e,t){return Ho(yo,e,t)}function Vo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Lp(e){return Na=ho=1,Fp=Cr(yo=e),zt=0,[]}function Mp(e){return yo="",e}function pa(e){return Bp(rs(zt-1,Wc(e===91?e+2:e===40?e+1:e)))}function Rw(e){for(;(mt=Rr())&&mt<33;)Xt();return Vo(e)>2||Vo(mt)>3?"":" "}function Pw(e,t){for(;--t&&Xt()&&!(mt<48||mt>102||mt>57&&mt<65||mt>70&&mt<97););return rs(e,ha()+(t<6&&Rr()==32&&Xt()==32))}function Wc(e){for(;Xt();)switch(mt){case e:return zt;case 34:case 39:e!==34&&e!==39&&Wc(mt);break;case 40:e===41&&Wc(e);break;case 92:Xt();break}return zt}function Nw(e,t){for(;Xt()&&e+mt!==57;)if(e+mt===84&&Rr()===47)break;return"/*"+rs(t,zt-1)+"*"+Pa(e===47?e:Xt())}function kw(e){for(;!Vo(Rr());)Xt();return rs(e,zt)}function Ow(e){return Mp(ma("",null,null,null,[""],e=Lp(e),0,[0],e))}function ma(e,t,r,n,o,s,i,u,d){for(var h=0,m=0,p=i,b=0,E=0,A=0,g=1,T=1,V=1,v=0,R="",w=o,Q=s,U=n,x=R;T;)switch(A=v,v=Xt()){case 40:if(A!=108&&Ct(x,p-1)==58){zc(x+=ze(pa(v),"&","&\f"),"&\f")!=-1&&(V=-1);break}case 34:case 39:case 91:x+=pa(v);break;case 9:case 10:case 13:case 32:x+=Rw(A);break;case 92:x+=Pw(ha()-1,7);continue;case 47:switch(Rr()){case 42:case 47:ia(jw(Nw(Xt(),ha()),t,r),d);break;default:x+="/"}break;case 123*g:u[h++]=Cr(x)*V;case 125*g:case 59:case 0:switch(v){case 0:case 125:T=0;case 59+m:V==-1&&(x=ze(x,/\f/g,"")),E>0&&Cr(x)-p&&ia(E>32?Pf(x+";",n,r,p-1):Pf(ze(x," ","")+";",n,r,p-2),d);break;case 59:x+=";";default:if(ia(U=Rf(x,t,r,h,m,o,u,R,w=[],Q=[],p),s),v===123)if(m===0)ma(x,t,U,U,w,s,p,u,Q);else switch(b===99&&Ct(x,3)===110?100:b){case 100:case 108:case 109:case 115:ma(e,U,U,n&&ia(Rf(e,U,U,0,0,o,u,R,o,w=[],p),Q),o,Q,p,u,n?w:Q);break;default:ma(x,U,U,U,[""],Q,0,u,Q)}}h=m=E=0,g=V=1,R=x="",p=i;break;case 58:p=1+Cr(x),E=A;default:if(g<1){if(v==123)--g;else if(v==125&&g++==0&&Iw()==125)continue}switch(x+=Pa(v),v*g){case 38:V=m>0?1:(x+="\f",-1);break;case 44:u[h++]=(Cr(x)-1)*V,V=1;break;case 64:Rr()===45&&(x+=pa(Xt())),b=Rr(),m=p=Cr(R=x+=kw(ha())),v++;break;case 45:A===45&&Cr(x)==2&&(g=0)}}return s}function Rf(e,t,r,n,o,s,i,u,d,h,m){for(var p=o-1,b=o===0?s:[""],E=wl(b),A=0,g=0,T=0;A<n;++A)for(var V=0,v=Ho(e,p+1,p=Ew(g=i[A])),R=e;V<E;++V)(R=Bp(g>0?b[V]+" "+v:ze(v,/&\f/g,b[V])))&&(d[T++]=R);return ka(e,t,r,o===0?vl:u,d,h,m)}function jw(e,t,r){return ka(e,t,r,Op,Pa(Aw()),Ho(e,2,-2),0)}function Pf(e,t,r,n){return ka(e,t,r,bl,Ho(e,0,n),Ho(e,n+1,-1),n)}function Wn(e,t){for(var r="",n=wl(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Bw(e,t,r,n){switch(e.type){case _w:if(e.children.length)break;case ww:case bl:return e.return=e.return||e.value;case Op:return"";case jp:return e.return=e.value+"{"+Wn(e.children,n)+"}";case vl:e.value=e.props.join(",")}return Cr(r=Wn(e.children,n))?e.return=e.value+"{"+r+"}":""}function Fw(e){var t=wl(e);return function(r,n,o,s){for(var i="",u=0;u<t;u++)i+=e[u](r,n,o,s)||"";return i}}function Lw(e){return function(t){t.root||(t=t.return)&&e(t)}}function $p(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Mw=function(t,r,n){for(var o=0,s=0;o=s,s=Rr(),o===38&&s===12&&(r[n]=1),!Vo(s);)Xt();return rs(t,zt)},$w=function(t,r){var n=-1,o=44;do switch(Vo(o)){case 0:o===38&&Rr()===12&&(r[n]=1),t[n]+=Mw(zt-1,r,n);break;case 2:t[n]+=pa(o);break;case 4:if(o===44){t[++n]=Rr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Pa(o)}while(o=Xt());return t},Dw=function(t,r){return Mp($w(Lp(t),r))},Nf=new WeakMap,qw=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Nf.get(n))&&!o){Nf.set(t,!0);for(var s=[],i=Dw(r,s),u=n.props,d=0,h=0;d<i.length;d++)for(var m=0;m<u.length;m++,h++)t.props[h]=s[d]?i[d].replace(/&\f/g,u[m]):u[m]+" "+i[d]}}},Uw=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Dp(e,t){switch(xw(e,t)){case 5103:return Ge+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ge+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ge+e+va+e+kt+e+e;case 6828:case 4268:return Ge+e+kt+e+e;case 6165:return Ge+e+kt+"flex-"+e+e;case 5187:return Ge+e+ze(e,/(\w+).+(:[^]+)/,Ge+"box-$1$2"+kt+"flex-$1$2")+e;case 5443:return Ge+e+kt+"flex-item-"+ze(e,/flex-|-self/,"")+e;case 4675:return Ge+e+kt+"flex-line-pack"+ze(e,/align-content|flex-|-self/,"")+e;case 5548:return Ge+e+kt+ze(e,"shrink","negative")+e;case 5292:return Ge+e+kt+ze(e,"basis","preferred-size")+e;case 6060:return Ge+"box-"+ze(e,"-grow","")+Ge+e+kt+ze(e,"grow","positive")+e;case 4554:return Ge+ze(e,/([^-])(transform)/g,"$1"+Ge+"$2")+e;case 6187:return ze(ze(ze(e,/(zoom-|grab)/,Ge+"$1"),/(image-set)/,Ge+"$1"),e,"")+e;case 5495:case 3959:return ze(e,/(image-set\([^]*)/,Ge+"$1$`$1");case 4968:return ze(ze(e,/(.+:)(flex-)?(.*)/,Ge+"box-pack:$3"+kt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ge+e+e;case 4095:case 3583:case 4068:case 2532:return ze(e,/(.+)-inline(.+)/,Ge+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Cr(e)-1-t>6)switch(Ct(e,t+1)){case 109:if(Ct(e,t+4)!==45)break;case 102:return ze(e,/(.+:)(.+)-([^]+)/,"$1"+Ge+"$2-$3$1"+va+(Ct(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zc(e,"stretch")?Dp(ze(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ct(e,t+1)!==115)break;case 6444:switch(Ct(e,Cr(e)-3-(~zc(e,"!important")&&10))){case 107:return ze(e,":",":"+Ge)+e;case 101:return ze(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ge+(Ct(e,14)===45?"inline-":"")+"box$3$1"+Ge+"$2$3$1"+kt+"$2box$3")+e}break;case 5936:switch(Ct(e,t+11)){case 114:return Ge+e+kt+ze(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ge+e+kt+ze(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ge+e+kt+ze(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ge+e+kt+e+e}return e}var Hw=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case bl:t.return=Dp(t.value,t.length);break;case jp:return Wn([Ro(t,{value:ze(t.value,"@","@"+Ge)})],o);case vl:if(t.length)return Tw(t.props,function(s){switch(Cw(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wn([Ro(t,{props:[ze(s,/:(read-\w+)/,":"+va+"$1")]})],o);case"::placeholder":return Wn([Ro(t,{props:[ze(s,/:(plac\w+)/,":"+Ge+"input-$1")]}),Ro(t,{props:[ze(s,/:(plac\w+)/,":"+va+"$1")]}),Ro(t,{props:[ze(s,/:(plac\w+)/,kt+"input-$1")]})],o)}return""})}},Vw=[Hw],qp=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var T=g.getAttribute("data-emotion");T.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||Vw,s={},i,u=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var T=g.getAttribute("data-emotion").split(" "),V=1;V<T.length;V++)s[T[V]]=!0;u.push(g)});var d,h=[qw,Uw];{var m,p=[Bw,Lw(function(g){m.insert(g)})],b=Fw(h.concat(o,p)),E=function(T){return Wn(Ow(T),b)};d=function(T,V,v,R){m=v,E(T?T+"{"+V.styles+"}":V.styles),R&&(A.inserted[V.name]=!0)}}var A={key:r,sheet:new bw({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:d};return A.sheet.hydrate(u),A},Gw=!0;function Up(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(n+=o+" ")}),n}var _l=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Gw===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},El=function(t,r,n){_l(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function zw(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ww={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kw=/[A-Z]|^ms/g,Yw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hp=function(t){return t.charCodeAt(1)===45},kf=function(t){return t!=null&&typeof t!="boolean"},vc=$p(function(e){return Hp(e)?e:e.replace(Kw,"-$&").toLowerCase()}),Of=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Yw,function(n,o,s){return Tr={name:o,styles:s,next:Tr},o})}return Ww[t]!==1&&!Hp(t)&&typeof r=="number"&&r!==0?r+"px":r};function Go(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Tr={name:o.name,styles:o.styles,next:Tr},o.name;var s=r;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Tr={name:i.name,styles:i.styles,next:Tr},i=i.next;var u=s.styles+";";return u}return Qw(e,t,r)}case"function":{if(e!==void 0){var d=Tr,h=r(e);return Tr=d,Go(e,t,h)}break}}var m=r;if(t==null)return m;var p=t[m];return p!==void 0?p:m}function Qw(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Go(e,t,r[o])+";";else for(var s in r){var i=r[s];if(typeof i!="object"){var u=i;t!=null&&t[u]!==void 0?n+=s+"{"+t[u]+"}":kf(u)&&(n+=vc(s)+":"+Of(s,u)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var d=0;d<i.length;d++)kf(i[d])&&(n+=vc(s)+":"+Of(s,i[d])+";");else{var h=Go(e,t,i);switch(s){case"animation":case"animationName":{n+=vc(s)+":"+h+";";break}default:n+=s+"{"+h+"}"}}}return n}var jf=/label:\s*([^\s;{]+)\s*(;|$)/g,Tr;function ns(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Tr=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,o+=Go(r,t,s);else{var i=s;o+=i[0]}for(var u=1;u<e.length;u++)if(o+=Go(r,t,e[u]),n){var d=s;o+=d[u]}jf.lastIndex=0;for(var h="",m;(m=jf.exec(o))!==null;)h+="-"+m[1];var p=zw(o)+h;return{name:p,styles:o,next:Tr}}var Zw=function(t){return t()},Vp=Ec.useInsertionEffect?Ec.useInsertionEffect:!1,Gp=Vp||Zw,Bf=Vp||oe.useLayoutEffect,zp=oe.createContext(typeof HTMLElement<"u"?qp({key:"css"}):null),Jw=zp.Provider,Sl=function(t){return oe.forwardRef(function(r,n){var o=oe.useContext(zp);return t(r,o,n)})},Oa=oe.createContext({}),xl={}.hasOwnProperty,Kc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Xw=function(t,r){var n={};for(var o in r)xl.call(r,o)&&(n[o]=r[o]);return n[Kc]=t,n},e_=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return _l(r,n,o),Gp(function(){return El(r,n,o)}),null},t_=Sl(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[Kc],s=[n],i="";typeof e.className=="string"?i=Up(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var u=ns(s,void 0,oe.useContext(Oa));i+=t.key+"-"+u.name;var d={};for(var h in e)xl.call(e,h)&&h!=="css"&&h!==Kc&&(d[h]=e[h]);return d.className=i,r&&(d.ref=r),oe.createElement(oe.Fragment,null,oe.createElement(e_,{cache:t,serialized:u,isStringTag:typeof o=="string"}),oe.createElement(o,d))}),r_=t_,Ff=function(t,r){var n=arguments;if(r==null||!xl.call(r,"css"))return oe.createElement.apply(void 0,n);var o=n.length,s=new Array(o);s[0]=r_,s[1]=Xw(t,r);for(var i=2;i<o;i++)s[i]=n[i];return oe.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Ff||(Ff={}));var n_=Sl(function(e,t){var r=e.styles,n=ns([r],void 0,oe.useContext(Oa)),o=oe.useRef();return Bf(function(){var s=t.key+"-global",i=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),u=!1,d=document.querySelector('style[data-emotion="'+s+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),d!==null&&(u=!0,d.setAttribute("data-emotion",s),i.hydrate([d])),o.current=[i,u],function(){i.flush()}},[t]),Bf(function(){var s=o.current,i=s[0],u=s[1];if(u){s[1]=!1;return}if(n.next!==void 0&&El(t,n.next,!0),i.tags.length){var d=i.tags[i.tags.length-1].nextElementSibling;i.before=d,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function Wp(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ns(t)}function o_(){var e=Wp.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var s_=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,a_=$p(function(e){return s_.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),i_=a_,c_=function(t){return t!=="theme"},Lf=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?i_:c_},Mf=function(t,r,n){var o;if(r){var s=r.shouldForwardProp;o=t.__emotion_forwardProp&&s?function(i){return t.__emotion_forwardProp(i)&&s(i)}:s}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},l_=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return _l(r,n,o),Gp(function(){return El(r,n,o)}),null},u_=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,s,i;r!==void 0&&(s=r.label,i=r.target);var u=Mf(t,r,n),d=u||Lf(o),h=!d("as");return function(){var m=arguments,p=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&p.push("label:"+s+";"),m[0]==null||m[0].raw===void 0)p.push.apply(p,m);else{var b=m[0];p.push(b[0]);for(var E=m.length,A=1;A<E;A++)p.push(m[A],b[A])}var g=Sl(function(T,V,v){var R=h&&T.as||o,w="",Q=[],U=T;if(T.theme==null){U={};for(var x in T)U[x]=T[x];U.theme=oe.useContext(Oa)}typeof T.className=="string"?w=Up(V.registered,Q,T.className):T.className!=null&&(w=T.className+" ");var $=ns(p.concat(Q),V.registered,U);w+=V.key+"-"+$.name,i!==void 0&&(w+=" "+i);var J=h&&u===void 0?Lf(R):d,W={};for(var ne in T)h&&ne==="as"||J(ne)&&(W[ne]=T[ne]);return W.className=w,v&&(W.ref=v),oe.createElement(oe.Fragment,null,oe.createElement(l_,{cache:V,serialized:$,isStringTag:typeof R=="string"}),oe.createElement(R,W))});return g.displayName=s!==void 0?s:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=o,g.__emotion_styles=p,g.__emotion_forwardProp=u,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(T,V){var v=e(T,Ye({},r,V,{shouldForwardProp:Mf(g,V,!0)}));return v.apply(void 0,p)},g}},d_=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Yc=u_.bind(null);d_.forEach(function(e){Yc[e]=Yc(e)});function f_(e,t){const r=qp({key:"css",prepend:e});if(t){const n=r.insert;r.insert=(...o)=>(o[1].styles.match(/^@layer\s+[^{]*$/)||(o[1].styles=`@layer mui {${o[1].styles}}`),n(...o))}return r}const bc=new Map;function h_(e){const{injectFirst:t,enableCssLayer:r,children:n}=e,o=oe.useMemo(()=>{const s=`${t}-${r}`;if(typeof document=="object"&&bc.has(s))return bc.get(s);const i=f_(t,r);return bc.set(s,i),i},[t,r]);return t||r?f.jsx(Jw,{value:o,children:n}):n}function p_(e){return e==null||Object.keys(e).length===0}function m_(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?o=>t(p_(o)?r:o):t;return f.jsx(n_,{styles:n})}function g_(e,t){return Yc(e,t)}const y_=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},$f=[];function v_(e){return $f[0]=e,ns($f)}const b_=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:m_,StyledEngineProvider:h_,ThemeContext:Oa,css:Wp,default:g_,internal_processStyles:y_,internal_serializeStyles:v_,keyframes:o_},Symbol.toStringTag,{value:"Module"})),w_=Gr(b_),__=Gr(I1),E_=Gr(B1),S_=Gr(j1),x_=["values","unit","step"],C_=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>Ye({},r,{[n.key]:n.val}),{})};function Kp(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=dn(e,x_),s=C_(t),i=Object.keys(s);function u(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${r})`}function d(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-n/100}${r})`}function h(b,E){const A=i.indexOf(E);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${r}) and (max-width:${(A!==-1&&typeof t[i[A]]=="number"?t[i[A]]:E)-n/100}${r})`}function m(b){return i.indexOf(b)+1<i.length?h(b,i[i.indexOf(b)+1]):u(b)}function p(b){const E=i.indexOf(b);return E===0?u(i[1]):E===i.length-1?d(i[E]):h(b,i[i.indexOf(b)+1]).replace("@media","@media not all and")}return Ye({keys:i,values:s,up:u,down:d,between:h,only:m,not:p,unit:r},o)}const T_={borderRadius:4};function Bo(e,t){return t?Ir(e,t,{clone:!1}):e}const Cl={xs:0,sm:600,md:900,lg:1200,xl:1536},Df={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Cl[e]}px)`};function Vr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Df;return t.reduce((i,u,d)=>(i[s.up(s.keys[d])]=r(t[d]),i),{})}if(typeof t=="object"){const s=n.breakpoints||Df;return Object.keys(t).reduce((i,u)=>{if(Object.keys(s.values||Cl).indexOf(u)!==-1){const d=s.up(u);i[d]=r(t[u],u)}else{const d=u;i[d]=t[d]}return i},{})}return r(t)}function A_(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const s=e.up(o);return n[s]={},n},{}))||{}}function qf(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function ja(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,s)=>o&&o[s]?o[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function ba(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=ja(e,r)||n,t&&(o=t(o,n,e)),o}function ht(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,s=i=>{if(i[t]==null)return null;const u=i[t],d=i.theme,h=ja(d,n)||{};return Vr(i,u,p=>{let b=ba(h,o,p);return p===b&&typeof p=="string"&&(b=ba(h,o,`${t}${p==="default"?"":un(p)}`,p)),r===!1?b:{[r]:b}})};return s.propTypes={},s.filterProps=[t],s}function I_(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const R_={m:"margin",p:"padding"},P_={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Uf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},N_=I_(e=>{if(e.length>2)if(Uf[e])e=Uf[e];else return[e];const[t,r]=e.split(""),n=R_[t],o=P_[r]||"";return Array.isArray(o)?o.map(s=>n+s):[n+o]}),Tl=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Al=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Tl,...Al];function os(e,t,r,n){var o;const s=(o=ja(e,t,!1))!=null?o:r;return typeof s=="number"?i=>typeof i=="string"?i:s*i:Array.isArray(s)?i=>typeof i=="string"?i:s[i]:typeof s=="function"?s:()=>{}}function Yp(e){return os(e,"spacing",8)}function ss(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function k_(e,t){return r=>e.reduce((n,o)=>(n[o]=ss(t,r),n),{})}function O_(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=N_(r),s=k_(o,n),i=e[r];return Vr(e,i,s)}function Qp(e,t){const r=Yp(e.theme);return Object.keys(e).map(n=>O_(e,t,n,r)).reduce(Bo,{})}function ct(e){return Qp(e,Tl)}ct.propTypes={};ct.filterProps=Tl;function lt(e){return Qp(e,Al)}lt.propTypes={};lt.filterProps=Al;function j_(e=8){if(e.mui)return e;const t=Yp({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(s=>{const i=t(s);return typeof i=="number"?`${i}px`:i}).join(" ");return r.mui=!0,r}function Ba(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(s=>{n[s]=o}),n),{}),r=n=>Object.keys(n).reduce((o,s)=>t[s]?Bo(o,t[s](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function or(e){return typeof e!="number"?e:`${e}px solid`}function ar(e,t){return ht({prop:e,themeKey:"borders",transform:t})}const B_=ar("border",or),F_=ar("borderTop",or),L_=ar("borderRight",or),M_=ar("borderBottom",or),$_=ar("borderLeft",or),D_=ar("borderColor"),q_=ar("borderTopColor"),U_=ar("borderRightColor"),H_=ar("borderBottomColor"),V_=ar("borderLeftColor"),G_=ar("outline",or),z_=ar("outlineColor"),Fa=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=os(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:ss(t,n)});return Vr(e,e.borderRadius,r)}return null};Fa.propTypes={};Fa.filterProps=["borderRadius"];Ba(B_,F_,L_,M_,$_,D_,q_,U_,H_,V_,Fa,G_,z_);const La=e=>{if(e.gap!==void 0&&e.gap!==null){const t=os(e.theme,"spacing",8),r=n=>({gap:ss(t,n)});return Vr(e,e.gap,r)}return null};La.propTypes={};La.filterProps=["gap"];const Ma=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=os(e.theme,"spacing",8),r=n=>({columnGap:ss(t,n)});return Vr(e,e.columnGap,r)}return null};Ma.propTypes={};Ma.filterProps=["columnGap"];const $a=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=os(e.theme,"spacing",8),r=n=>({rowGap:ss(t,n)});return Vr(e,e.rowGap,r)}return null};$a.propTypes={};$a.filterProps=["rowGap"];const W_=ht({prop:"gridColumn"}),K_=ht({prop:"gridRow"}),Y_=ht({prop:"gridAutoFlow"}),Q_=ht({prop:"gridAutoColumns"}),Z_=ht({prop:"gridAutoRows"}),J_=ht({prop:"gridTemplateColumns"}),X_=ht({prop:"gridTemplateRows"}),eE=ht({prop:"gridTemplateAreas"}),tE=ht({prop:"gridArea"});Ba(La,Ma,$a,W_,K_,Y_,Q_,Z_,J_,X_,eE,tE);function Kn(e,t){return t==="grey"?t:e}const rE=ht({prop:"color",themeKey:"palette",transform:Kn}),nE=ht({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kn}),oE=ht({prop:"backgroundColor",themeKey:"palette",transform:Kn});Ba(rE,nE,oE);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const sE=ht({prop:"width",transform:Jt}),Il=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const s=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||Cl[r];return s?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Jt(r)}};return Vr(e,e.maxWidth,t)}return null};Il.filterProps=["maxWidth"];const aE=ht({prop:"minWidth",transform:Jt}),iE=ht({prop:"height",transform:Jt}),cE=ht({prop:"maxHeight",transform:Jt}),lE=ht({prop:"minHeight",transform:Jt});ht({prop:"size",cssProperty:"width",transform:Jt});ht({prop:"size",cssProperty:"height",transform:Jt});const uE=ht({prop:"boxSizing"});Ba(sE,Il,aE,iE,cE,lE,uE);const as={border:{themeKey:"borders",transform:or},borderTop:{themeKey:"borders",transform:or},borderRight:{themeKey:"borders",transform:or},borderBottom:{themeKey:"borders",transform:or},borderLeft:{themeKey:"borders",transform:or},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:or},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Fa},color:{themeKey:"palette",transform:Kn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kn},backgroundColor:{themeKey:"palette",transform:Kn},p:{style:lt},pt:{style:lt},pr:{style:lt},pb:{style:lt},pl:{style:lt},px:{style:lt},py:{style:lt},padding:{style:lt},paddingTop:{style:lt},paddingRight:{style:lt},paddingBottom:{style:lt},paddingLeft:{style:lt},paddingX:{style:lt},paddingY:{style:lt},paddingInline:{style:lt},paddingInlineStart:{style:lt},paddingInlineEnd:{style:lt},paddingBlock:{style:lt},paddingBlockStart:{style:lt},paddingBlockEnd:{style:lt},m:{style:ct},mt:{style:ct},mr:{style:ct},mb:{style:ct},ml:{style:ct},mx:{style:ct},my:{style:ct},margin:{style:ct},marginTop:{style:ct},marginRight:{style:ct},marginBottom:{style:ct},marginLeft:{style:ct},marginX:{style:ct},marginY:{style:ct},marginInline:{style:ct},marginInlineStart:{style:ct},marginInlineEnd:{style:ct},marginBlock:{style:ct},marginBlockStart:{style:ct},marginBlockEnd:{style:ct},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:La},rowGap:{style:$a},columnGap:{style:Ma},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:Il},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function dE(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function fE(e,t){return typeof e=="function"?e(t):e}function Zp(){function e(r,n,o,s){const i={[r]:n,theme:o},u=s[r];if(!u)return{[r]:n};const{cssProperty:d=r,themeKey:h,transform:m,style:p}=u;if(n==null)return null;if(h==="typography"&&n==="inherit")return{[r]:n};const b=ja(o,h)||{};return p?p(i):Vr(i,n,A=>{let g=ba(b,m,A);return A===g&&typeof A=="string"&&(g=ba(b,m,`${r}${A==="default"?"":un(A)}`,A)),d===!1?g:{[d]:g}})}function t(r){var n;const{sx:o,theme:s={},nested:i}=r||{};if(!o)return null;const u=(n=s.unstable_sxConfig)!=null?n:as;function d(h){let m=h;if(typeof h=="function")m=h(s);else if(typeof h!="object")return h;if(!m)return null;const p=A_(s.breakpoints),b=Object.keys(p);let E=p;return Object.keys(m).forEach(A=>{const g=fE(m[A],s);if(g!=null)if(typeof g=="object")if(u[A])E=Bo(E,e(A,g,s,u));else{const T=Vr({theme:s},g,V=>({[A]:V}));dE(T,g)?E[A]=t({sx:g,theme:s,nested:!0}):E=Bo(E,T)}else E=Bo(E,e(A,g,s,u))}),!i&&s.modularCssLayers?{"@layer sx":qf(b,E)}:qf(b,E)}return Array.isArray(o)?o.map(d):d(o)}return t}const Da=Zp();Da.filterProps=["sx"];function Jp(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const hE=["breakpoints","palette","spacing","shape"];function Xp(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:s={}}=e,i=dn(e,hE),u=Kp(r),d=j_(o);let h=Ir({breakpoints:u,direction:"ltr",components:{},palette:Ye({mode:"light"},n),spacing:d,shape:Ye({},T_,s)},i);return h.applyStyles=Jp,h=t.reduce((m,p)=>Ir(m,p),h),h.unstable_sxConfig=Ye({},as,i==null?void 0:i.unstable_sxConfig),h.unstable_sx=function(p){return Da({sx:p,theme:this})},h}const pE=Object.freeze(Object.defineProperty({__proto__:null,default:Xp,private_createBreakpoints:Kp,unstable_applyStyles:Jp},Symbol.toStringTag,{value:"Module"})),mE=Gr(pE),gE=["sx"],yE=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:as;return Object.keys(e).forEach(s=>{o[s]?n.systemProps[s]=e[s]:n.otherProps[s]=e[s]}),n};function vE(e){const{sx:t}=e,r=dn(e,gE),{systemProps:n,otherProps:o}=yE(r);let s;return Array.isArray(t)?s=[n,...t]:typeof t=="function"?s=(...i)=>{const u=t(...i);return Xr(u)?Ye({},n,u):n}:s=Ye({},n,t),Ye({},o,{sx:s})}const bE=Object.freeze(Object.defineProperty({__proto__:null,default:Da,extendSxProp:vE,unstable_createStyleFunctionSx:Zp,unstable_defaultSxConfig:as},Symbol.toStringTag,{value:"Module"})),wE=Gr(bE);var Hf;function _E(){if(Hf)return yn;Hf=1;var e=yl();Object.defineProperty(yn,"__esModule",{value:!0}),yn.default=Q,yn.shouldForwardProp=A,yn.systemDefaultTheme=void 0;var t=e(mw()),r=e(gw()),n=p(w_),o=__;e(E_),e(S_);var s=e(mE),i=e(wE);const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function m(U){if(typeof WeakMap!="function")return null;var x=new WeakMap,$=new WeakMap;return(m=function(J){return J?$:x})(U)}function p(U,x){if(U&&U.__esModule)return U;if(U===null||typeof U!="object"&&typeof U!="function")return{default:U};var $=m(x);if($&&$.has(U))return $.get(U);var J={__proto__:null},W=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ne in U)if(ne!=="default"&&Object.prototype.hasOwnProperty.call(U,ne)){var X=W?Object.getOwnPropertyDescriptor(U,ne):null;X&&(X.get||X.set)?Object.defineProperty(J,ne,X):J[ne]=U[ne]}return J.default=U,$&&$.set(U,J),J}function b(U){return Object.keys(U).length===0}function E(U){return typeof U=="string"&&U.charCodeAt(0)>96}function A(U){return U!=="ownerState"&&U!=="theme"&&U!=="sx"&&U!=="as"}function g(U,x){return x&&U&&typeof U=="object"&&U.styles&&!U.styles.startsWith("@layer")&&(U.styles=`@layer ${x}{${String(U.styles)}}`),U}const T=yn.systemDefaultTheme=(0,s.default)(),V=U=>U&&U.charAt(0).toLowerCase()+U.slice(1);function v({defaultTheme:U,theme:x,themeId:$}){return b(x)?U:x[$]||x}function R(U){return U?(x,$)=>$[U]:null}function w(U,x,$){let{ownerState:J}=x,W=(0,r.default)(x,u);const ne=typeof U=="function"?U((0,t.default)({ownerState:J},W)):U;if(Array.isArray(ne))return ne.flatMap(X=>w(X,(0,t.default)({ownerState:J},W),$));if(ne&&typeof ne=="object"&&Array.isArray(ne.variants)){const{variants:X=[]}=ne;let N=(0,r.default)(ne,d);return X.forEach(Y=>{let K=!0;if(typeof Y.props=="function"?K=Y.props((0,t.default)({ownerState:J},W,J)):Object.keys(Y.props).forEach(D=>{(J==null?void 0:J[D])!==Y.props[D]&&W[D]!==Y.props[D]&&(K=!1)}),K){Array.isArray(N)||(N=[N]);const D=typeof Y.style=="function"?Y.style((0,t.default)({ownerState:J},W,J)):Y.style;N.push($?g((0,n.internal_serializeStyles)(D),$):D)}}),N}return $?g((0,n.internal_serializeStyles)(ne),$):ne}function Q(U={}){const{themeId:x,defaultTheme:$=T,rootShouldForwardProp:J=A,slotShouldForwardProp:W=A}=U,ne=X=>(0,i.default)((0,t.default)({},X,{theme:v((0,t.default)({},X,{defaultTheme:$,themeId:x}))}));return ne.__mui_systemSx=!0,(X,F={})=>{(0,n.internal_processStyles)(X,we=>we.filter(Se=>!(Se!=null&&Se.__mui_systemSx)));const{name:N,slot:Y,skipVariantsResolver:K,skipSx:D,overridesResolver:q=R(V(Y))}=F,P=(0,r.default)(F,h),O=N&&N.startsWith("Mui")||Y?"components":"custom",G=K!==void 0?K:Y&&Y!=="Root"&&Y!=="root"||!1,Z=D||!1;let le,ce=A;Y==="Root"||Y==="root"?ce=J:Y?ce=W:E(X)&&(ce=void 0);const ie=(0,n.default)(X,(0,t.default)({shouldForwardProp:ce,label:le},P)),de=we=>typeof we=="function"&&we.__emotion_real!==we||(0,o.isPlainObject)(we)?Se=>{const ye=v({theme:Se.theme,defaultTheme:$,themeId:x});return w(we,(0,t.default)({},Se,{theme:ye}),ye.modularCssLayers?O:void 0)}:we,Pe=(we,...Se)=>{let ye=de(we);const Ve=Se?Se.map(de):[];N&&q&&Ve.push(fe=>{const ve=v((0,t.default)({},fe,{defaultTheme:$,themeId:x}));if(!ve.components||!ve.components[N]||!ve.components[N].styleOverrides)return null;const Ae=ve.components[N].styleOverrides,Be={};return Object.entries(Ae).forEach(([Fe,dt])=>{Be[Fe]=w(dt,(0,t.default)({},fe,{theme:ve}),ve.modularCssLayers?"theme":void 0)}),q(fe,Be)}),N&&!G&&Ve.push(fe=>{var ve;const Ae=v((0,t.default)({},fe,{defaultTheme:$,themeId:x})),Be=Ae==null||(ve=Ae.components)==null||(ve=ve[N])==null?void 0:ve.variants;return w({variants:Be},(0,t.default)({},fe,{theme:Ae}),Ae.modularCssLayers?"theme":void 0)}),Z||Ve.push(ne);const qe=Ve.length-Se.length;if(Array.isArray(we)&&qe>0){const fe=new Array(qe).fill("");ye=[...we,...fe],ye.raw=[...we.raw,...fe]}const he=ie(ye,...Ve);return X.muiName&&(he.muiName=X.muiName),he};return ie.withConfig&&(Pe.withConfig=ie.withConfig),Pe}}return yn}var EE=_E();const SE=_a(EE);function xE(e,t){return Ye({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var it={};const CE=Gr(R1),TE=Gr(uw);var Vf;function AE(){if(Vf)return it;Vf=1;var e=yl();Object.defineProperty(it,"__esModule",{value:!0}),it.alpha=A,it.blend=U,it.colorChannel=void 0,it.darken=T,it.decomposeColor=i,it.emphasize=w,it.getContrastRatio=E,it.getLuminance=b,it.hexToRgb=o,it.hslToRgb=p,it.lighten=v,it.private_safeAlpha=g,it.private_safeColorChannel=void 0,it.private_safeDarken=V,it.private_safeEmphasize=Q,it.private_safeLighten=R,it.recomposeColor=h,it.rgbToHex=m;var t=e(CE),r=e(TE);function n(x,$=0,J=1){return(0,r.default)(x,$,J)}function o(x){x=x.slice(1);const $=new RegExp(`.{1,${x.length>=6?2:1}}`,"g");let J=x.match($);return J&&J[0].length===1&&(J=J.map(W=>W+W)),J?`rgb${J.length===4?"a":""}(${J.map((W,ne)=>ne<3?parseInt(W,16):Math.round(parseInt(W,16)/255*1e3)/1e3).join(", ")})`:""}function s(x){const $=x.toString(16);return $.length===1?`0${$}`:$}function i(x){if(x.type)return x;if(x.charAt(0)==="#")return i(o(x));const $=x.indexOf("("),J=x.substring(0,$);if(["rgb","rgba","hsl","hsla","color"].indexOf(J)===-1)throw new Error((0,t.default)(9,x));let W=x.substring($+1,x.length-1),ne;if(J==="color"){if(W=W.split(" "),ne=W.shift(),W.length===4&&W[3].charAt(0)==="/"&&(W[3]=W[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(ne)===-1)throw new Error((0,t.default)(10,ne))}else W=W.split(",");return W=W.map(X=>parseFloat(X)),{type:J,values:W,colorSpace:ne}}const u=x=>{const $=i(x);return $.values.slice(0,3).map((J,W)=>$.type.indexOf("hsl")!==-1&&W!==0?`${J}%`:J).join(" ")};it.colorChannel=u;const d=(x,$)=>{try{return u(x)}catch{return x}};it.private_safeColorChannel=d;function h(x){const{type:$,colorSpace:J}=x;let{values:W}=x;return $.indexOf("rgb")!==-1?W=W.map((ne,X)=>X<3?parseInt(ne,10):ne):$.indexOf("hsl")!==-1&&(W[1]=`${W[1]}%`,W[2]=`${W[2]}%`),$.indexOf("color")!==-1?W=`${J} ${W.join(" ")}`:W=`${W.join(", ")}`,`${$}(${W})`}function m(x){if(x.indexOf("#")===0)return x;const{values:$}=i(x);return`#${$.map((J,W)=>s(W===3?Math.round(255*J):J)).join("")}`}function p(x){x=i(x);const{values:$}=x,J=$[0],W=$[1]/100,ne=$[2]/100,X=W*Math.min(ne,1-ne),F=(K,D=(K+J/30)%12)=>ne-X*Math.max(Math.min(D-3,9-D,1),-1);let N="rgb";const Y=[Math.round(F(0)*255),Math.round(F(8)*255),Math.round(F(4)*255)];return x.type==="hsla"&&(N+="a",Y.push($[3])),h({type:N,values:Y})}function b(x){x=i(x);let $=x.type==="hsl"||x.type==="hsla"?i(p(x)).values:x.values;return $=$.map(J=>(x.type!=="color"&&(J/=255),J<=.03928?J/12.92:((J+.055)/1.055)**2.4)),Number((.2126*$[0]+.7152*$[1]+.0722*$[2]).toFixed(3))}function E(x,$){const J=b(x),W=b($);return(Math.max(J,W)+.05)/(Math.min(J,W)+.05)}function A(x,$){return x=i(x),$=n($),(x.type==="rgb"||x.type==="hsl")&&(x.type+="a"),x.type==="color"?x.values[3]=`/${$}`:x.values[3]=$,h(x)}function g(x,$,J){try{return A(x,$)}catch{return x}}function T(x,$){if(x=i(x),$=n($),x.type.indexOf("hsl")!==-1)x.values[2]*=1-$;else if(x.type.indexOf("rgb")!==-1||x.type.indexOf("color")!==-1)for(let J=0;J<3;J+=1)x.values[J]*=1-$;return h(x)}function V(x,$,J){try{return T(x,$)}catch{return x}}function v(x,$){if(x=i(x),$=n($),x.type.indexOf("hsl")!==-1)x.values[2]+=(100-x.values[2])*$;else if(x.type.indexOf("rgb")!==-1)for(let J=0;J<3;J+=1)x.values[J]+=(255-x.values[J])*$;else if(x.type.indexOf("color")!==-1)for(let J=0;J<3;J+=1)x.values[J]+=(1-x.values[J])*$;return h(x)}function R(x,$,J){try{return v(x,$)}catch{return x}}function w(x,$=.15){return b(x)>.5?T(x,$):v(x,$)}function Q(x,$,J){try{return w(x,$)}catch{return x}}function U(x,$,J,W=1){const ne=(Y,K)=>Math.round((Y**(1/W)*(1-J)+K**(1/W)*J)**W),X=i(x),F=i($),N=[ne(X.values[0],F.values[0]),ne(X.values[1],F.values[1]),ne(X.values[2],F.values[2])];return h({type:"rgb",values:N})}return it}var Qc=AE();const zo={black:"#000",white:"#fff"},IE={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},qn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Un={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Po={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Hn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Vn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Gn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},RE=["mode","contrastThreshold","tonalOffset"],Gf={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:zo.white,default:zo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},wc={text:{primary:zo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:zo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function zf(e,t,r,n){const o=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Qc.lighten(e.main,o):t==="dark"&&(e.dark=Qc.darken(e.main,s)))}function PE(e="light"){return e==="dark"?{main:Hn[200],light:Hn[50],dark:Hn[400]}:{main:Hn[700],light:Hn[400],dark:Hn[800]}}function NE(e="light"){return e==="dark"?{main:qn[200],light:qn[50],dark:qn[400]}:{main:qn[500],light:qn[300],dark:qn[700]}}function kE(e="light"){return e==="dark"?{main:Un[500],light:Un[300],dark:Un[700]}:{main:Un[700],light:Un[400],dark:Un[800]}}function OE(e="light"){return e==="dark"?{main:Vn[400],light:Vn[300],dark:Vn[700]}:{main:Vn[700],light:Vn[500],dark:Vn[900]}}function jE(e="light"){return e==="dark"?{main:Gn[400],light:Gn[300],dark:Gn[700]}:{main:Gn[800],light:Gn[500],dark:Gn[900]}}function BE(e="light"){return e==="dark"?{main:Po[400],light:Po[300],dark:Po[700]}:{main:"#ed6c02",light:Po[500],dark:Po[900]}}function FE(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=dn(e,RE),s=e.primary||PE(t),i=e.secondary||NE(t),u=e.error||kE(t),d=e.info||OE(t),h=e.success||jE(t),m=e.warning||BE(t);function p(g){return Qc.getContrastRatio(g,wc.text.primary)>=r?wc.text.primary:Gf.text.primary}const b=({color:g,name:T,mainShade:V=500,lightShade:v=300,darkShade:R=700})=>{if(g=Ye({},g),!g.main&&g[V]&&(g.main=g[V]),!g.hasOwnProperty("main"))throw new Error(Uo(11,T?` (${T})`:"",V));if(typeof g.main!="string")throw new Error(Uo(12,T?` (${T})`:"",JSON.stringify(g.main)));return zf(g,"light",v,n),zf(g,"dark",R,n),g.contrastText||(g.contrastText=p(g.main)),g},E={dark:wc,light:Gf};return Ir(Ye({common:Ye({},zo),mode:t,primary:b({color:s,name:"primary"}),secondary:b({color:i,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:u,name:"error"}),warning:b({color:m,name:"warning"}),info:b({color:d,name:"info"}),success:b({color:h,name:"success"}),grey:IE,contrastThreshold:r,getContrastText:p,augmentColor:b,tonalOffset:n},E[t]),o)}const LE=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function ME(e){return Math.round(e*1e5)/1e5}const Wf={textTransform:"uppercase"},Kf='"Roboto", "Helvetica", "Arial", sans-serif';function $E(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Kf,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:i=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:m,pxToRem:p}=r,b=dn(r,LE),E=o/14,A=p||(V=>`${V/h*E}rem`),g=(V,v,R,w,Q)=>Ye({fontFamily:n,fontWeight:V,fontSize:A(v),lineHeight:R},n===Kf?{letterSpacing:`${ME(w/v)}em`}:{},Q,m),T={h1:g(s,96,1.167,-1.5),h2:g(s,60,1.2,-.5),h3:g(i,48,1.167,0),h4:g(i,34,1.235,.25),h5:g(i,24,1.334,0),h6:g(u,20,1.6,.15),subtitle1:g(i,16,1.75,.15),subtitle2:g(u,14,1.57,.1),body1:g(i,16,1.5,.15),body2:g(i,14,1.43,.15),button:g(u,14,1.75,.4,Wf),caption:g(i,12,1.66,.4),overline:g(i,12,2.66,1,Wf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ir(Ye({htmlFontSize:h,pxToRem:A,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:i,fontWeightMedium:u,fontWeightBold:d},T),b,{clone:!1})}const DE=.2,qE=.14,UE=.12;function st(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${DE})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${qE})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${UE})`].join(",")}const HE=["none",st(0,2,1,-1,0,1,1,0,0,1,3,0),st(0,3,1,-2,0,2,2,0,0,1,5,0),st(0,3,3,-2,0,3,4,0,0,1,8,0),st(0,2,4,-1,0,4,5,0,0,1,10,0),st(0,3,5,-1,0,5,8,0,0,1,14,0),st(0,3,5,-1,0,6,10,0,0,1,18,0),st(0,4,5,-2,0,7,10,1,0,2,16,1),st(0,5,5,-3,0,8,10,1,0,3,14,2),st(0,5,6,-3,0,9,12,1,0,3,16,2),st(0,6,6,-3,0,10,14,1,0,4,18,3),st(0,6,7,-4,0,11,15,1,0,4,20,3),st(0,7,8,-4,0,12,17,2,0,5,22,4),st(0,7,8,-4,0,13,19,2,0,5,24,4),st(0,7,9,-4,0,14,21,2,0,5,26,4),st(0,8,9,-5,0,15,22,2,0,6,28,5),st(0,8,10,-5,0,16,24,2,0,6,30,5),st(0,8,11,-5,0,17,26,2,0,6,32,5),st(0,9,11,-5,0,18,28,2,0,7,34,6),st(0,9,12,-6,0,19,29,2,0,7,36,6),st(0,10,13,-6,0,20,31,3,0,8,38,7),st(0,10,13,-6,0,21,33,3,0,8,40,7),st(0,10,14,-6,0,22,35,3,0,8,42,7),st(0,11,14,-7,0,23,36,3,0,9,44,8),st(0,11,15,-7,0,24,38,3,0,9,46,8)],VE=["duration","easing","delay"],GE={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},zE={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Yf(e){return`${Math.round(e)}ms`}function WE(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function KE(e){const t=Ye({},GE,e.easing),r=Ye({},zE,e.duration);return Ye({getAutoHeightDuration:WE,create:(o=["all"],s={})=>{const{duration:i=r.standard,easing:u=t.easeInOut,delay:d=0}=s;return dn(s,VE),(Array.isArray(o)?o:[o]).map(h=>`${h} ${typeof i=="string"?i:Yf(i)} ${u} ${typeof d=="string"?d:Yf(d)}`).join(",")}},e,{easing:t,duration:r})}const YE={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},QE=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function em(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:s={}}=e,i=dn(e,QE);if(e.vars)throw new Error(Uo(18));const u=FE(n),d=Xp(e);let h=Ir(d,{mixins:xE(d.breakpoints,r),palette:u,shadows:HE.slice(),typography:$E(u,s),transitions:KE(o),zIndex:Ye({},YE)});return h=Ir(h,i),h=t.reduce((m,p)=>Ir(m,p),h),h.unstable_sxConfig=Ye({},as,i==null?void 0:i.unstable_sxConfig),h.unstable_sx=function(p){return Da({sx:p,theme:this})},h}function Px(...e){return em(...e)}const ZE=em(),JE="$$material";function XE(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const eS=e=>XE(e)&&e!=="classes",tS=SE({themeId:JE,defaultTheme:ZE,rootShouldForwardProp:eS});function rS(e){return Pp("MuiSvgIcon",e)}cw("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nS=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],oS=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${un(t)}`,`fontSize${un(r)}`]};return sw(o,rS,n)},sS=tS("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${un(r.color)}`],t[`fontSize${un(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,s,i,u,d,h,m,p,b,E,A;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(i=s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem",medium:((u=e.typography)==null||(d=u.pxToRem)==null?void 0:d.call(u,24))||"1.5rem",large:((h=e.typography)==null||(m=h.pxToRem)==null?void 0:m.call(h,35))||"2.1875rem"}[t.fontSize],color:(p=(b=(e.vars||e).palette)==null||(b=b[t.color])==null?void 0:b.main)!=null?p:{action:(E=(e.vars||e).palette)==null||(E=E.action)==null?void 0:E.active,disabled:(A=(e.vars||e).palette)==null||(A=A.action)==null?void 0:A.disabled,inherit:void 0}[t.color]}}),Zc=oe.forwardRef(function(t,r){const n=pw({props:t,name:"MuiSvgIcon"}),{children:o,className:s,color:i="inherit",component:u="svg",fontSize:d="medium",htmlColor:h,inheritViewBox:m=!1,titleAccess:p,viewBox:b="0 0 24 24"}=n,E=dn(n,nS),A=oe.isValidElement(o)&&o.type==="svg",g=Ye({},n,{color:i,component:u,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:b,hasSvgAsChild:A}),T={};m||(T.viewBox=b);const V=oS(g);return f.jsxs(sS,Ye({as:u,className:dw(V.root,s),focusable:"false",color:h,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r},T,E,A&&o.props,{ownerState:g,children:[A?o.props.children:o,p?f.jsx("title",{children:p}):null]}))});Zc.muiName="SvgIcon";function aS(e,t){function r(n,o){return f.jsx(Zc,Ye({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return r.muiName=Zc.muiName,oe.memo(oe.forwardRef(r))}const iS={configure:e=>{Rp.configure(e)}},cS=Object.freeze(Object.defineProperty({__proto__:null,capitalize:un,createChainedFunction:F1,createSvgIcon:aS,debounce:L1,deprecatedPropType:M1,isMuiElement:$1,ownerDocument:Tp,ownerWindow:D1,requirePropFactory:q1,setRef:Ap,unstable_ClassNameGenerator:iS,unstable_useEnhancedEffect:Ip,unstable_useId:H1,unsupportedProp:V1,useControlled:G1,useEventCallback:z1,useForkRef:W1,useIsFocusVisible:ow},Symbol.toStringTag,{value:"Module"})),lS=Gr(cS);var Qf;function uS(){return Qf||(Qf=1,(function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=lS})(hc)),hc}var Zf;function dS(){if(Zf)return Io;Zf=1;var e=yl();Object.defineProperty(Io,"__esModule",{value:!0}),Io.default=void 0;var t=e(uS()),r=Nm();return Io.default=(0,t.default)((0,r.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),Io}var fS=dS();const tm=_a(fS),qa=`${Ke.nftApiUrl}/v1`;function rm(e){if(!e)return 0;try{return Math.ceil(Number(Ih(e))*10)}catch{return 0}}function Nx(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function kx(e,t){var n,o,s;const r=new URLSearchParams({contractAddresses:e,itemId:t,first:"1"});try{const i=await fetch(`${Ke.nftApiUrl}/v2/catalog?${r.toString()}`);if(!i.ok)return"";const{data:u}=await i.json(),d=(n=u==null?void 0:u[0])==null?void 0:n.data;return(((o=d==null?void 0:d.wearable)==null?void 0:o.description)??((s=d==null?void 0:d.emote)==null?void 0:s.description)??"").trim()}catch{return""}}async function Ox(e){const{listings:t}=await Ua({contractAddress:e,first:200}),r={};for(const n of t)n.listingType!=="primary"||n.itemId==null||(r[String(n.itemId)]={isOnSale:!0,priceCredits:n.priceCredits,tradeId:n.tradeId});return r}async function hS(e,t){var s;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${qa}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:o}=await n.json();return((s=o==null?void 0:o[0])==null?void 0:s.nft)??null}function Rl(e){return{id:e.tradeId,tradeId:e.tradeId,name:e.name,creator:e.creator,contractAddress:e.contractAddress,itemId:e.itemId,tokenId:e.tokenId??void 0,category:e.category,wearableCategory:e.wearableCategory??void 0,rarity:e.rarity,network:e.network,chainId:e.chainId,thumbnail:e.thumbnail,priceCredits:e.priceCredits,gender:e.gender??null,isSmart:e.isSmart??!1,available:e.listingType==="primary"?e.available:void 0,compareAtCredits:e.compareAtCredits!=null&&e.compareAtCredits>e.priceCredits?e.compareAtCredits:void 0,saleEndsAt:e.saleEndsAt!=null?e.saleEndsAt*1e3:void 0}}async function Ua(e){var o,s;const t=new URLSearchParams;(e.category==="wearable"||e.category==="emote")&&t.set("category",e.category),e.first!=null&&t.set("first",String(e.first)),e.skip!=null&&t.set("skip",String(e.skip)),e.contractAddress&&t.set("contractAddress",e.contractAddress),e.itemId!=null&&t.set("itemId",e.itemId),e.creator&&t.set("creator",e.creator),(o=e.rarities)!=null&&o.length&&t.set("rarity",e.rarities.join(",")),(s=e.wearableCategories)!=null&&s.length&&t.set("wearableCategory",e.wearableCategories.join(",")),e.minPriceCredits!=null&&t.set("minPriceCredits",String(e.minPriceCredits)),e.maxPriceCredits!=null&&t.set("maxPriceCredits",String(e.maxPriceCredits)),e.search&&t.set("search",e.search),e.sortBy&&t.set("sortBy",e.sortBy);const r=await fetch(`${Ke.marketplaceServerUrl}/v3/catalog/shop?${t.toString()}`);if(!r.ok)throw new Error(`fetchShopListings ${r.status}`);const n=await r.json();return{listings:n.data??[],total:n.total??0}}async function jx(e,t){const{listings:r}=await Ua({contractAddress:e,itemId:t,first:1});return r[0]?Rl(r[0]):null}async function nm({first:e=100,...t}={}){const{listings:r,total:n}=await Ua({...t,first:e});return{items:r.map(Rl),total:n}}function pS(e){return{...Rl(e),source:e.source,manaWei:e.manaWei??null}}async function Bx({first:e=100,...t}={}){var i,u;const r=new URLSearchParams;(t.category==="wearable"||t.category==="emote")&&r.set("category",t.category),r.set("first",String(e)),t.skip!=null&&r.set("skip",String(t.skip)),t.contractAddress&&r.set("contractAddress",t.contractAddress),t.itemId!=null&&r.set("itemId",t.itemId),t.creator&&r.set("creator",t.creator),(i=t.rarities)!=null&&i.length&&r.set("rarity",t.rarities.join(",")),(u=t.wearableCategories)!=null&&u.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.minPriceCredits!=null&&r.set("minPriceCredits",String(t.minPriceCredits)),t.maxPriceCredits!=null&&r.set("maxPriceCredits",String(t.maxPriceCredits)),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Ke.marketplaceServerUrl}/v3/catalog/unified?${r.toString()}`);if(!n.ok)throw new Error(`fetchUnified ${n.status}`);const o=await n.json(),s=o.data??[];return{items:s.map(pS),total:o.total??s.length}}async function Fx(e,t,r){try{const n=new URLSearchParams({owner:e.toLowerCase(),contractAddress:t,itemId:r,first:"1"}),o=await fetch(`${qa}/nfts?${n.toString()}`);if(!o.ok)return!1;const{total:s}=await o.json();return(s??0)>0}catch{return!1}}async function Lx(e,{category:t="wearable",first:r=48,skip:n=0}={}){const o=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),s=await fetch(`${qa}/nfts?${o.toString()}`);if(!s.ok)throw new Error(`Failed to fetch assets (${s.status})`);const{data:i,total:u}=await s.json();return{assets:i.map(h=>{var m,p,b,E,A;return{id:h.nft.id,contractAddress:h.nft.contractAddress,tokenId:h.nft.tokenId,itemId:h.nft.itemId??null,name:h.nft.name,category:h.nft.category,image:h.nft.image,rarity:((p=(m=h.nft.data)==null?void 0:m.wearable)==null?void 0:p.rarity)??((E=(b=h.nft.data)==null?void 0:b.emote)==null?void 0:E.rarity),network:h.nft.network,chainId:h.nft.chainId,isOnSale:h.order!=null,listingPrice:h.order?rm(h.order.price):void 0,tradeId:(A=h.order)==null?void 0:A.tradeId}}),total:u}}const mS="dcl:marketplace";async function Mx(e,t){const{TradeService:r}=await wt(async()=>{const{TradeService:o}=await import("./TradeService-CNoDt48E.js");return{TradeService:o}},__vite__mapDeps([11,7,1,6,2,12,9,10,8]));return new r(mS,Ke.marketplaceServerUrl,()=>t).addTrade(e)}class om extends Error{constructor(t){super("fetchTrade 404"),this.tradeId=t,this.name="TradeNotFoundError"}}async function Pl(e){var n;const t=await fetch(`${Ke.marketplaceServerUrl}/v1/trades/${e}`);if(t.status===404)throw(n=t.body)==null||n.cancel(),new om(e);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function $x(e){if(e.tradeId)try{return await Pl(e.tradeId)}catch(t){if(!(t instanceof om)||!e.itemId)throw t}return e.itemId?yS(e.contractAddress,e.itemId):null}async function gS(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${qa}/items?${r.toString()}`);if(!n.ok)return null;const{data:o}=await n.json();return(o==null?void 0:o[0])??null}async function Dx(e){var d,h;let t;try{t=await Pl(e)}catch{return null}const r=(d=t.sent)==null?void 0:d[0],n=(h=t.received)==null?void 0:h[0],o=rm(n==null?void 0:n.amount),s=(r==null?void 0:r.contractAddress)??"",i=(r==null?void 0:r.value)??"";if(!s)return{name:"Item",thumbnail:"",credits:o,contractAddress:""};if((r==null?void 0:r.assetType)===er.TradeAssetType.COLLECTION_ITEM){const m=await gS(s,i);return{name:(m==null?void 0:m.name)??"Item",thumbnail:(m==null?void 0:m.thumbnail)??"",credits:o,contractAddress:s,itemId:i}}const u=await hS(s,i);return{name:(u==null?void 0:u.name)??`#${i}`,thumbnail:(u==null?void 0:u.image)??"",credits:o,contractAddress:s,tokenId:i}}async function yS(e,t){var o;const{listings:r}=await Ua({contractAddress:e,itemId:t,first:1}),n=(o=r[0])==null?void 0:o.tradeId;return n?Pl(n):null}async function vS(e,t=4){const r=new URLSearchParams({search:e,first:String(t)}),n=await fetch(`${Ke.nftApiUrl}/v1/collections?${r.toString()}`);if(!n.ok)throw new Error(`fetchCollectionSuggestions ${n.status}`);const{data:o}=await n.json();return(o??[]).filter(s=>s.contractAddress&&s.name).map(s=>({contractAddress:s.contractAddress,name:s.name,creator:s.creator??""}))}async function bS(e,t){var i,u,d;const r=new URLSearchParams({category:"ens",search:e,first:String(t)}),n=await fetch(`${Ke.nftApiUrl}/v1/nfts?${r.toString()}`);if(!n.ok)throw new Error(`fetchNameOwners ${n.status}`);const{data:o}=await n.json(),s=new Map;for(const h of o??[]){const m=(u=(i=h.nft)==null?void 0:i.owner)==null?void 0:u.toLowerCase(),p=(d=h.nft)==null?void 0:d.name;m&&p&&!s.has(m)&&s.set(m,p)}return s}async function wS(e){if(e.length===0)return new Map;const t=new URLSearchParams({sortBy:"most_collections"});for(const s of e)t.append("address",s);const r=await fetch(`${Ke.nftApiUrl}/v1/accounts?${t.toString()}`);if(!r.ok)throw new Error(`fetchSellerCounts ${r.status}`);const{data:n}=await r.json(),o=new Map;for(const s of n??[])(s.collections??0)>0&&o.set(s.address.toLowerCase(),s.collections??0);return o}async function _S(e,t=4,r=20){const n=e.trim();if(!n)return[];const o=await bS(n,r);if(o.size===0)return[];const s=await wS([...o.keys()]),i=[...o.keys()].filter(u=>s.has(u)).slice(0,t);return i.length===0?[]:Promise.all(i.map(async u=>{var h,m;const d=await Xh(u);return{address:u,name:(d==null?void 0:d.name)||(o.get(u)??u),face:(m=(h=d==null?void 0:d.avatar)==null?void 0:h.snapshots)==null?void 0:m.face256}}))}function ES(e){if(!e||e.length===0)return null;const t=e.some(n=>n.includes("Male")),r=e.some(n=>n.includes("Female"));return t&&r?"unisex":t?"male":r?"female":null}function sm(e){var t,r,n,o,s,i,u,d;return{id:e.id,name:e.name,creator:e.creator??"",contractAddress:e.contractAddress,itemId:e.itemId??null,category:e.category,wearableCategory:((r=(t=e.data)==null?void 0:t.wearable)==null?void 0:r.category)??((o=(n=e.data)==null?void 0:n.emote)==null?void 0:o.category),rarity:e.rarity??"common",isSmart:!!((i=(s=e.data)==null?void 0:s.wearable)!=null&&i.isSmart),network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:e.priceCredits??0,gender:ES((d=(u=e.data)==null?void 0:u.wearable)==null?void 0:d.bodyShapes)}}async function SS(e,{first:t=20,skip:r=0,category:n,rarities:o,wearableCategories:s,minPriceCredits:i,maxPriceCredits:u,sortBy:d}={}){const h=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"});n&&n!=="all"&&h.set("category",n),o==null||o.forEach(A=>h.append("rarity",A)),s==null||s.forEach(A=>h.append("wearableCategory",A)),i!=null&&h.set("minPrice",String(i)),u!=null&&h.set("maxPrice",String(u)),d&&h.set("sortBy",d);const m=await fetch(`${Ke.marketplaceServerUrl}/v3/catalog/items?${h.toString()}`);if(!m.ok)throw new Error(`fetchCollectionItems ${m.status}`);const{data:p,total:b}=await m.json(),E=(p??[]).map(sm);return{items:E,total:b??r+E.length}}async function xS(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),o=await fetch(`${Ke.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!o.ok)throw new Error(`fetchCreatorItems ${o.status}`);const{data:s,total:i}=await o.json(),u=(s??[]).map(sm);return{items:u,total:i??r+u.length}}async function qx(e,{first:t=24,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),sortBy:"newest"}),o=await fetch(`${Ke.nftApiUrl}/v1/collections?${n.toString()}`);if(!o.ok)throw new Error(`fetchCreatorCollections ${o.status}`);const{data:s,total:i}=await o.json(),u=(s??[]).map(d=>({contractAddress:d.contractAddress,name:d.name??"",creator:d.creator??"",itemCount:d.size??0}));return{collections:u,total:i??r+u.length}}async function Ux(e){const t=new URLSearchParams({contractAddress:e,first:"1"}),r=await fetch(`${Ke.nftApiUrl}/v1/collections?${t.toString()}`);if(!r.ok)throw new Error(`fetchCollection ${r.status}`);const{data:n}=await r.json(),o=n==null?void 0:n[0];return o&&o.contractAddress?{contractAddress:o.contractAddress,name:o.name??"",creator:o.creator??""}:null}const Jf="radial-gradient(#c0bdc6, #a09ba8)",Xf="#E6E6E6";function am(e){const t=typeof e=="string"?e.replace("#",""):"";return t.length<6?null:[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function CS([e,t,r]){return .299*e+.587*t+.114*r}function im(e){return e&&er.Rarity.getColor(e.toLowerCase())||Xf}function TS(e,t=.3){const r=am(im(e));return r?`rgba(${r[0]}, ${r[1]}, ${r[2]}, ${t})`:`rgba(160, 155, 168, ${t})`}function AS(e,t=120){const r=im(e),n=am(r);if(!n)return"#161518";const o=CS(n);if(o<=t)return r;const s=t/o,i=u=>Math.round(u*s).toString(16).padStart(2,"0");return`#${i(n[0])}${i(n[1])}${i(n[2])}`}function IS(e){const t=yp(e??"Common");try{const r=er.Rarity.getMaxSupply((e??"common").toLowerCase());if(r>0)return`${t} rarity — only ${r.toLocaleString()} can ever be minted`}catch{}return`${t} rarity`}function RS(e){try{const[t,r]=er.Rarity.getGradient((e??"common").toLowerCase());return!t||!r?Jf:`radial-gradient(${t}, ${r})`}catch{return Jf}}const cm=4;function PS(e,t=!0){return Hr({queryKey:["collection-preview",e],queryFn:()=>SS(e,{first:cm}),enabled:t,staleTime:5*6e4})}function NS({items:e,className:t}){const r=e.slice(0,cm);return f.jsx("span",{className:`coll-thumb${t?` ${t}`:""}`,"data-count":r.length,"aria-hidden":!0,children:r.map(n=>f.jsx("span",{className:"coll-thumb__cell",style:{backgroundImage:RS(n.rarity)},children:n.thumbnail?f.jsx("img",{src:n.thumbnail,alt:"",loading:"lazy"}):null},n.id))})}function kS({contractAddress:e,className:t,fallback:r=null}){const{data:n}=PS(e),o=(n==null?void 0:n.items)??[];return o.length===0?f.jsx(f.Fragment,{children:r}):f.jsx(NS,{items:o,className:t})}function OS(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function eh({address:e,className:t}){const{data:r}=xa(e),n=(r==null?void 0:r.name)||OS(e);return f.jsx("span",{className:t,children:ae("search.byCreator",{name:n})})}function jS({contractAddress:e}){return f.jsx(kS,{contractAddress:e,className:"search-pop__collthumb",fallback:f.jsx("span",{className:"search-pop__thumb search-pop__thumb--icon",children:f.jsx("span",{className:"ico ico-search","aria-hidden":!0})})})}const BS=5,FS=2;function LS({query:e,recent:t,onSelectItem:r,onSelectCollection:n,onSelectCreator:o,onRunSearch:s,onRemoveRecent:i,onClearRecent:u}){const d=e.length>=FS,{data:h,isFetching:m}=Hr({queryKey:["search-suggest",e],queryFn:()=>nm({search:e,first:BS}),enabled:d,placeholderData:ti,staleTime:3e4}),{data:p=[]}=Hr({queryKey:["search-suggest-collections",e],queryFn:()=>vS(e),enabled:d,placeholderData:ti,staleTime:3e4}),{data:b=[]}=Hr({queryKey:["search-suggest-creators",e],queryFn:()=>_S(e),enabled:d,placeholderData:ti,staleTime:3e4}),E=d?(h==null?void 0:h.items)??[]:[],A=(h==null?void 0:h.total)??0;if(!d)return t.length===0?null:f.jsxs("div",{className:"search-pop",role:"listbox","aria-label":ae("search.suggestions"),children:[f.jsxs("div",{className:"search-pop__section-head",children:[f.jsx("span",{children:ae("search.recent")}),f.jsx("button",{type:"button",className:"search-pop__clear",onClick:u,children:ae("search.clearRecent")})]}),f.jsx("ul",{className:"search-pop__list",children:t.map(T=>f.jsxs("li",{className:"search-pop__recent",children:[f.jsxs("button",{type:"button",className:"search-pop__recent-btn",onClick:()=>s(T),children:[f.jsx("span",{className:"ico ico-search search-pop__recent-ico","aria-hidden":!0}),f.jsx("span",{className:"search-pop__recent-text",children:T})]}),f.jsx("button",{type:"button",className:"search-pop__recent-remove","aria-label":ae("search.removeRecent",{query:T}),onClick:()=>i(T),children:f.jsx(tm,{})})]},T))})]});const g=E.length===0&&p.length===0&&b.length===0;return f.jsx("div",{className:"search-pop",role:"listbox","aria-label":ae("search.suggestions"),children:g?f.jsx("p",{className:"search-pop__empty",children:m?ae("search.searching"):ae("search.noResults",{query:e})}):f.jsxs(f.Fragment,{children:[E.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"search-pop__section-head",children:f.jsx("span",{children:ae("search.items")})}),f.jsx("ul",{className:"search-pop__list",children:E.map(T=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:"search-pop__row",onClick:()=>r(T),children:[f.jsx("span",{className:"search-pop__thumb",children:T.thumbnail?f.jsx("img",{src:T.thumbnail,alt:""}):null}),f.jsxs("span",{className:"search-pop__text",children:[f.jsx("span",{className:"search-pop__name",title:T.name,children:T.name}),T.creator?f.jsx(eh,{address:T.creator,className:"search-pop__sub"}):null]}),f.jsxs("span",{className:"search-pop__price",children:[f.jsx(ur,{className:"ccy-mark"})," ",T.priceCredits]})]})},T.id))})]}):null,p.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"search-pop__section-head",children:f.jsx("span",{children:ae("search.collections")})}),f.jsx("ul",{className:"search-pop__list",children:p.map(T=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:"search-pop__row search-pop__row--collection",onClick:()=>n(T),children:[f.jsx(jS,{contractAddress:T.contractAddress}),f.jsxs("span",{className:"search-pop__text",children:[f.jsx("span",{className:"search-pop__name",title:T.name,children:T.name}),T.creator?f.jsx(eh,{address:T.creator,className:"search-pop__sub"}):null]})]})},T.contractAddress))})]}):null,b.length>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"search-pop__section-head",children:f.jsx("span",{children:ae("search.creators")})}),f.jsx("ul",{className:"search-pop__list",children:b.map(T=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:"search-pop__row search-pop__row--creator",onClick:()=>o(T),children:[f.jsx("span",{className:"search-pop__thumb search-pop__thumb--round",children:T.face?f.jsx("img",{src:T.face,alt:""}):null}),f.jsx("span",{className:"search-pop__text",children:f.jsx("span",{className:"search-pop__name",title:T.name,children:T.name})})]})},T.address))})]}):null,A>0?f.jsx("button",{type:"button",className:"search-pop__seeall",onClick:()=>s(e),children:ae("search.seeAll",{count:A.toLocaleString()})}):null]})})}const Ha="shop:recent-searches",lm=8;function wa(){try{const e=localStorage.getItem(Ha);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"&&r.length>0).slice(0,lm):[]}catch{return[]}}function ca(e){const t=e.trim();if(t)try{const r=[t,...wa().filter(n=>n.toLowerCase()!==t.toLowerCase())].slice(0,lm);localStorage.setItem(Ha,JSON.stringify(r))}catch{}}function MS(e){try{const t=wa().filter(r=>r.toLowerCase()!==e.trim().toLowerCase());localStorage.setItem(Ha,JSON.stringify(t))}catch{}}function $S(){try{localStorage.removeItem(Ha)}catch{}}function DS(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:o}=mo(),s=e==null?void 0:e.address,{data:i,isLoading:u}=xa(s),{data:d,isError:h,isLoading:m}=xv(e),p=Zt(Z=>Z.items.length),b=Zt(Z=>Z.setOpen),E=tl(),[A]=km(),{pathname:g}=Ah(),T=/^\/(assets|item|collection|creator)(\/|$)/.test(g),V=A.get("q")??"",[v,R]=oe.useState(V),[w,Q]=oe.useState(V),[U,x]=oe.useState(!1),[$,J]=oe.useState([]),W=oe.useRef(),ne=oe.useRef(null);oe.useEffect(()=>{o()},[o]),oe.useEffect(()=>{R(V),Q(V)},[V]),oe.useEffect(()=>{if(!U)return;const Z=le=>{ne.current&&!ne.current.contains(le.target)&&x(!1)};return document.addEventListener("mousedown",Z),()=>document.removeEventListener("mousedown",Z)},[U]);function X(){J(wa()),x(!0)}function F(Z){const le=Z.trim();x(!1),le&&ca(le),E(le?`/assets?q=${encodeURIComponent(le)}`:"/assets",{replace:!0})}function N(Z){x(!1),v.trim()&&ca(v.trim()),dr("Shop Search Suggestion Clicked",{query:v.trim(),type:"item",item_id:Z.id});const le=Z.tokenId??Z.itemId;Z.contractAddress&&le?E(`/item/${Z.contractAddress}/${le}`,{state:{item:Z,tradeId:Z.tradeId}}):F(v)}function Y(Z){x(!1),v.trim()&&ca(v.trim()),dr("Shop Search Suggestion Clicked",{query:v.trim(),type:"collection",contract_address:Z.contractAddress}),E(`/collection/${Z.contractAddress}`)}function K(Z){x(!1),v.trim()&&ca(v.trim()),dr("Shop Search Suggestion Clicked",{query:v.trim(),type:"creator",creator_address:Z.address}),E(`/assets/creator/${Z.address}`)}function D(Z){R(Z),x(!0),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>Q(Z.trim()),300)}function q(){R(""),Q(""),x(!1),E("/assets",{replace:!0})}function P(Z){MS(Z),J(wa())}function O(){$S(),J([])}function G(Z){if(Z.key==="Escape"){x(!1);return}Z.key==="Enter"&&(W.current&&clearTimeout(W.current),F(v))}return f.jsxs(f.Fragment,{children:[f.jsx(Lg,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&u,address:s,avatar:i,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),f.jsxs("div",{className:"subnav",children:[f.jsxs("nav",{className:"subnav__tabs",children:[f.jsx($n,{to:"/overview",children:ae("nav.overview")}),f.jsx($n,{to:"/assets",className:()=>T?"active":"",children:ae("nav.collectibles")}),f.jsx($n,{to:"/my-assets",children:ae("nav.myAssets")}),e?f.jsx($n,{to:"/my-purchases",children:ae("nav.myPurchases")}):null]}),f.jsxs("div",{className:"subnav__search",ref:ne,children:[f.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),f.jsx("input",{value:v,"aria-label":ae("nav.searchAria"),placeholder:ae("nav.searchPlaceholder"),onChange:Z=>D(Z.target.value),onFocus:X,onKeyDown:G}),v?f.jsx("button",{type:"button",className:"subnav__search-clear","aria-label":ae("search.clear"),onClick:q,children:f.jsx(tm,{})}):null,U?f.jsx(LS,{query:w,recent:$,onSelectItem:N,onSelectCollection:Y,onSelectCreator:K,onRunSearch:F,onRemoveRecent:P,onClearRecent:O}):null]}),e?f.jsxs("span",{className:"subnav__balance",title:ae("nav.yourBalance",{currency:fo.name}),children:[f.jsx(ur,{className:"subnav__balance-ico"}),m?f.jsx("span",{className:"skeleton subnav__balance-skel","aria-hidden":!0}):Cv(d,h)]}):null,f.jsxs($n,{to:"/credits",className:"subnav__credits",children:[f.jsx(ur,{className:"subnav__credits-ico"}),ae("nav.getCredits",{currency:fo.name})]}),f.jsx($n,{to:"/my-favorites",className:"subnav__fav","aria-label":ae("nav.myFavorites"),children:f.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),f.jsxs("div",{className:"subnav__cart-wrap",children:[f.jsxs("button",{type:"button",className:"subnav__cart","aria-label":ae("nav.cart"),onClick:()=>p>0?b(!0):E("/cart"),children:[f.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),p>0?f.jsx("span",{className:"subnav__cart-badge",children:p}):null]}),f.jsx(A1,{})]})]})]})}let qS=0;const Fo=Nn(e=>({toasts:[],push:t=>{const r=++qS;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),Hx={success:e=>Fo.getState().push({message:e,kind:"success"}),error:e=>Fo.getState().push({message:e,kind:"error"}),info:e=>Fo.getState().push({message:e,kind:"info"})},US={success:"✓",error:"!",info:"i"};function HS({t:e}){const t=Fo(r=>r.dismiss);return oe.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),f.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[f.jsx("span",{className:"toast__icon","aria-hidden":!0,children:US[e.kind]}),f.jsx("span",{className:"toast__msg",children:e.message})]})}function VS(){const e=Fo(t=>t.toasts);return e.length===0?null:f.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>f.jsx(HS,{t},t.id))})}const GS=oe.lazy(()=>wt(()=>import("./index-CXx3fqSb.js"),__vite__mapDeps([13,1,2,14,6,15,4,16,17,3,18,19,7,8])).then(e=>({default:e.WearablePreview})));function um(e){return f.jsx(oe.Suspense,{fallback:null,children:f.jsx(GS,{...e})})}function zS(e){return e.itemId?`urn:decentraland:${Ke.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}const Yn=er.BodyShape.MALE,Qn=er.BodyShape.FEMALE;function Jc(e){if(e.category==="emote")return[Yn,Qn];switch(e.gender){case"male":return[Yn];case"female":return[Qn];default:return[Yn,Qn]}}function WS(e){var r;const t=(r=e==null?void 0:e.avatar)==null?void 0:r.bodyShape;return t?t.includes("BaseFemale")?Qn:Yn:null}function Nl(e,t){return t==null||Jc(e).includes(t)}function th(e){return ae(e===Qn?"bodyShape.female":"bodyShape.male")}function KS(e){let t=0,r=0;for(const n of e)n.category!=="emote"&&(n.gender==="male"?t++:n.gender==="female"&&r++);return t===0&&r===0?null:r>t?Qn:Yn}function Pn(e){return e.category!=="emote"}function po(e){return Pn(e)?e.wearableCategory??`unknown:${e.id}`:null}const YS=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function QS(e){if(!Pn(e))return"item";const t=e.wearableCategory;return t?YS.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function rh(e,t=null){const r=new Set,n=new Set;for(const o of e){const s=po(o);s==null||n.has(s)||Nl(o,t)&&(n.add(s),r.add(o.id))}return r}function ZS(e,t,r){if(!Pn(t))return e;const n=new Set(e);if(n.has(t.id))return n.delete(t.id),n;const o=po(t);if(o!=null)for(const s of r)s.id!==t.id&&n.has(s.id)&&po(s)===o&&n.delete(s.id);return n.add(t.id),n}function JS(e){const t=new Map;for(const n of e){const o=po(n);if(o==null)continue;const s=t.get(o)??[];s.push(n.id),t.set(o,s)}const r=new Set;for(const n of t.values())n.length>1&&n.forEach(o=>r.add(o));return r}function XS(e,t,r=null){const n=[];for(const o of e){if(!t.has(o.id)||!Pn(o)||!Nl(o,r))continue;const s=zS(o);s&&n.push(s)}return n}const e2=oe.lazy(()=>wt(()=>import("./AnimatedBackground-BJBUqhHZ.js"),__vite__mapDeps([20,1,21])));function nh(e){return!e||e.startsWith("unknown:")?ae("fittingRoom.wearable"):e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function t2(){const e=Zt(Q=>Q.fittingOpen),t=Zt(Q=>Q.setFittingOpen),r=Zt(Q=>Q.items),n=Zt(Q=>Q.remove),o=tl(),s=mo(Q=>{var U;return(U=Q.session)==null?void 0:U.address}),{data:i,isFetched:u}=xa(s),d=!s||u,h=!!s&&!!i,m=h?s:"default",p=WS(i)??KS(r)??Yn,[b,E]=oe.useState(()=>rh(r,p)),[A,g]=oe.useState(!1);oe.useEffect(()=>{e&&E(rh(r,p))},[e,p]),oe.useEffect(()=>{const Q=new Set(r.map(U=>U.id));E(U=>{const x=new Set([...U].filter($=>Q.has($)));return x.size===U.size?U:x})},[r]);const T=oe.useMemo(()=>JS(r),[r]),V=oe.useMemo(()=>XS(r,b,p),[r,b,p]),v=r.reduce((Q,U)=>Q+U.priceCredits,0),R=V.join(",");oe.useEffect(()=>{g(!1)},[R,m]);const w=oe.useRef(!1);return oe.useEffect(()=>{if(!e){w.current=!1;return}w.current||(w.current=!0,dr("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(Pn).length,emotes:r.filter(Q=>!Pn(Q)).length,cart_value_credits:v}))},[e,r,v]),oe.useEffect(()=>{if(!e)return;const Q=U=>{U.key==="Escape"&&t(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[e,t]),!e||r.length===0?null:f.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":ae("fittingRoom.title"),children:[f.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),f.jsxs("div",{className:"fitting__panel",children:[f.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":ae("fittingRoom.close"),children:"×"}),f.jsxs("div",{className:"fitting__stage",children:[f.jsx(oe.Suspense,{fallback:null,children:f.jsx(e2,{})}),d?V.length>0?f.jsxs(f.Fragment,{children:[f.jsx(um,{profile:m,bodyShape:h?void 0:p,urns:V,type:er.PreviewType.AVATAR,emote:er.PreviewEmote.FASHION,disableBackground:!0,disableFadeEffect:!0,dev:Ke.chainId===80002,onLoad:()=>g(!0)},m),A?null:f.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:f.jsx("span",{className:"fitting__spinner"})})]}):f.jsxs("div",{className:"fitting__empty-stage",children:[f.jsx("p",{children:ae("fittingRoom.emptyStageTitle")}),f.jsx("p",{className:"muted",children:ae("fittingRoom.emptyStageBody")})]}):f.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:f.jsx("span",{className:"fitting__spinner"})})]}),f.jsxs("div",{className:"fitting__side",children:[f.jsxs("div",{className:"fitting__head",children:[f.jsx("h2",{className:"fitting__title",children:ae("fittingRoom.title")}),f.jsx("p",{className:"fitting__sub muted",children:ae("fittingRoom.sub")})]}),f.jsx("div",{className:"fitting__items",children:r.map(Q=>{const U=Pn(Q),x=U&&!Nl(Q,p),$=b.has(Q.id),J=T.has(Q.id);return f.jsxs("div",{className:`fitting-row${$?" is-on":""}${x?" is-incompatible":""}`,children:[f.jsxs("label",{className:"fitting-row__toggle",children:[f.jsx("input",{type:"checkbox",checked:$,disabled:!U||x,onChange:()=>E(W=>ZS(W,Q,r))}),f.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),f.jsx("div",{className:"fitting-row__thumb",children:Q.thumbnail?f.jsx("img",{src:Q.thumbnail,alt:Q.name}):null}),f.jsxs("div",{className:"fitting-row__info",children:[f.jsx("div",{className:"fitting-row__name",title:Q.name,children:Q.name}),f.jsxs("div",{className:"fitting-row__meta",children:[f.jsx("span",{className:`ico ico-slot-${U?QS(Q):"item"} fitting-row__slot-ico`,title:U?nh(po(Q)):ae("fittingRoom.emote"),role:"img","aria-label":U?nh(po(Q)):ae("fittingRoom.emote")}),J&&!x?f.jsx("span",{className:"fitting-row__conflict",title:ae("fittingRoom.conflictTooltip"),children:ae("fittingRoom.onePerSlot")}):null,x?f.jsx("span",{className:"fitting-row__incompat",title:ae("fittingRoom.madeForShape",{shape:th(Jc(Q)[0])}),children:ae("fittingRoom.shapeOnly",{shape:th(Jc(Q)[0])})}):null]})]}),f.jsxs("div",{className:"fitting-row__price",children:[f.jsx(ur,{className:"fitting-row__diamond"}),Q.priceCredits]}),f.jsx("button",{className:"fitting-row__remove",onClick:()=>n(Q.id),"aria-label":ae("fittingRoom.removeFromCart",{name:Q.name}),title:ae("fittingRoom.remove"),children:f.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},Q.id)})}),f.jsxs("div",{className:"fitting__foot",children:[f.jsxs("div",{className:"fitting__total",children:[ae("fittingRoom.itemCount",{count:r.length})," ·"," ",f.jsxs("strong",{children:[fo.symbol," ",v]})]}),f.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),o("/cart")},children:ae("fittingRoom.checkout")})]})]})]})]})}const dm="shop:locale";function r2(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&fa.includes(t))return t;const r=localStorage.getItem(dm);if(r&&fa.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&fa.includes(n))return n}catch{}return"en"}const Xc=Nn(e=>({locale:r2(),setLocale:t=>{try{localStorage.setItem(dm,t)}catch{}e({locale:t})}})),n2="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",oh=[{label:"footer.linkWhatIs",url:"https://docs.decentraland.org/introduction/about-decentraland"},{label:"footer.linkDownload",url:"https://decentraland.org/download"},{label:"footer.linkSystemRequirements",url:"https://docs.decentraland.org/in-world/settings-and-performance"},{label:"footer.linkFaqs",url:"https://docs.decentraland.org/faqs/decentraland-101"},{label:"footer.linkContactSupport",url:"https://decentraland.org/help/"}],sh=[{label:"footer.linkMarketplace",url:"https://decentraland.org/marketplace"},{label:"footer.linkCreatorHub",url:"https://decentraland.org/create/"},{label:"footer.linkDocs",url:"https://docs.decentraland.org"},{label:"footer.linkBlog",url:"https://decentraland.org/blog/"},{label:"footer.linkVote",url:"https://decentraland.org/dao"}],o2=[{name:"Discord",url:"https://dcl.gg/discord",icon:i2},{name:"GitHub",url:"https://github.com/decentraland",icon:c2},{name:"X",url:"https://x.com/decentraland",icon:l2},{name:"Instagram",url:"https://instagram.com/decentraland_foundation/",icon:u2},{name:"YouTube",url:"https://youtube.com/@decentraland_foundation",icon:d2},{name:"TikTok",url:"https://tiktok.com/@decentraland_fdn",icon:f2},{name:"LinkedIn",url:"https://linkedin.com/company/decentralandorg",icon:h2}],s2=[{label:"footer.linkPrivacy",url:"https://decentraland.org/privacy/"},{label:"footer.linkTerms",url:"https://decentraland.org/terms/"},{label:"footer.linkContentPolicy",url:"https://decentraland.org/content/"},{label:"footer.linkEthics",url:"https://decentraland.org/ethics/"}],la={en:{label:"English",flag:"🇺🇸"},es:{label:"Español",flag:"🇪🇸"}};function ah(){return f.jsx("div",{className:"dcl-footer__social",children:o2.map(({name:e,url:t,icon:r})=>f.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":e,children:f.jsx(r,{})},e))})}function a2(){const e=Xc(h=>h.locale),t=Xc(h=>h.setLocale),[r,n]=oe.useState(null),[o,s]=oe.useState(!1),i=oe.useRef(null),u=la[e]??la.en;oe.useEffect(()=>{if(!o)return;const h=m=>{i.current&&!i.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[o]);const d=h=>n(m=>m===h?null:h);return f.jsxs("footer",{className:"dcl-footer",children:[f.jsxs("div",{className:"dcl-footer__main",children:[f.jsxs("div",{className:"dcl-footer__left",children:[f.jsx("span",{className:"dcl-footer__wordmark",children:"Decentraland"}),f.jsxs("div",{className:"dcl-footer__news",children:[f.jsx("p",{className:"dcl-footer__news-title",children:ae("footer.newsletterTitle")}),f.jsx("iframe",{className:"dcl-footer__news-frame",src:n2,height:"65",frameBorder:"0",scrolling:"no",title:ae("footer.newsletterFrameTitle")})]}),f.jsxs("div",{className:"dcl-footer__connect dcl-footer__connect--desktop",children:[f.jsx("p",{className:"dcl-footer__label",children:ae("footer.connect")}),f.jsx(ah,{})]})]}),f.jsxs("div",{className:"dcl-footer__right",children:[f.jsxs("div",{className:"dcl-footer__col",children:[f.jsx("p",{className:"dcl-footer__label",children:ae("footer.gettingStarted")}),oh.map(h=>f.jsx("a",{className:"dcl-footer__link",href:h.url,target:"_blank",rel:"noopener noreferrer",children:ae(h.label)},h.label))]}),f.jsxs("div",{className:"dcl-footer__col",children:[f.jsx("p",{className:"dcl-footer__label",children:ae("footer.resources")}),sh.map(h=>f.jsx("a",{className:"dcl-footer__link",href:h.url,target:"_blank",rel:"noopener noreferrer",children:ae(h.label)},h.label))]})]}),f.jsxs("div",{className:"dcl-footer__mobile-menu",children:[f.jsx("p",{className:"dcl-footer__menu-label",children:ae("footer.menu")}),[{key:"getting-started",label:ae("footer.gettingStarted"),links:oh},{key:"resources",label:ae("footer.resources"),links:sh}].map(h=>f.jsxs("div",{children:[f.jsxs("button",{type:"button",className:"dcl-footer__dropdown","aria-expanded":r===h.key,onClick:()=>d(h.key),children:[h.label,f.jsx("span",{className:`dcl-footer__chev${r===h.key?" is-open":""}`,children:f.jsx(ih,{})})]}),f.jsx("div",{className:`dcl-footer__dropdown-content${r===h.key?" is-open":""}`,children:h.links.map(m=>f.jsx("a",{className:"dcl-footer__mlink",href:m.url,target:"_blank",rel:"noopener noreferrer",children:ae(m.label)},m.label))})]},h.key))]}),f.jsxs("div",{className:"dcl-footer__connect dcl-footer__connect--mobile",children:[f.jsx("p",{className:"dcl-footer__label",children:ae("footer.connect")}),f.jsx(ah,{})]})]}),f.jsxs("div",{className:"dcl-footer__bottom",children:[f.jsxs("div",{className:"dcl-footer__bottom-left",children:[f.jsxs("div",{className:"dcl-footer__lang",ref:i,children:[f.jsxs("button",{type:"button",className:"dcl-footer__lang-btn",onClick:()=>s(h=>!h),children:[f.jsx("span",{"aria-hidden":!0,children:u.flag}),u.label,f.jsx("span",{className:`dcl-footer__chev${o?" is-open":""}`,children:f.jsx(ih,{})})]}),o?f.jsx("div",{className:"dcl-footer__lang-menu",children:fa.map(h=>f.jsxs("button",{className:h===e?"is-active":"",onClick:()=>{t(h),s(!1)},children:[f.jsx("span",{"aria-hidden":!0,children:la[h].flag}),la[h].label]},h))}):null]}),f.jsx("div",{className:"dcl-footer__legal",children:s2.map(h=>f.jsx("a",{className:"dcl-footer__legal-link",href:h.url,target:"_blank",rel:"noopener noreferrer",children:ae(h.label)},h.label))})]}),f.jsxs("span",{className:"dcl-footer__copy",children:["© ",new Date().getFullYear()," Decentraland"]})]})]})}function i2(){return f.jsx("svg",{viewBox:"0 0 28 22",fill:"currentColor",width:"26",height:"20","aria-hidden":!0,children:f.jsx("path",{d:"M23.7 1.84A23.25 23.25 0 0 0 17.96 0c-.25.45-.54 1.05-.74 1.53a21.5 21.5 0 0 0-6.45 0C10.57 1.05 10.27.45 10.02 0A23.2 23.2 0 0 0 4.27 1.85C.62 7.34-.38 12.7.12 18a23.37 23.37 0 0 0 7.13 3.6 17.4 17.4 0 0 0 1.53-2.49 15.17 15.17 0 0 1-2.41-1.16c.2-.15.4-.3.59-.46a16.63 16.63 0 0 0 14.1 0c.19.16.39.31.58.46-.77.45-1.57.84-2.41 1.16.44.87.96 1.7 1.53 2.49a23.3 23.3 0 0 0 7.14-3.61c.58-6.15-1-11.47-4.1-16.15ZM9.35 14.74c-1.4 0-2.54-1.28-2.54-2.85s1.12-2.86 2.54-2.86 2.56 1.29 2.54 2.86c0 1.57-1.12 2.85-2.54 2.85Zm9.38 0c-1.4 0-2.54-1.28-2.54-2.85s1.12-2.86 2.54-2.86 2.56 1.29 2.54 2.86c0 1.57-1.12 2.85-2.54 2.85Z"})})}function c2(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"24",height:"24","aria-hidden":!0,children:f.jsx("path",{d:"M12 .3a12 12 0 0 0-3.8 23.38c.6.12.82-.26.82-.58v-2.02c-3.34.73-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.08-.73.08-.73 1.2.09 1.84 1.24 1.84 1.24 1.07 1.83 2.8 1.3 3.49 1 .1-.78.42-1.3.76-1.6-2.67-.31-5.47-1.34-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.13-.3-.54-1.52.12-3.18 0 0 1-.33 3.3 1.23a11.5 11.5 0 0 1 6.02 0c2.28-1.56 3.29-1.23 3.29-1.23.66 1.66.25 2.88.12 3.18a4.65 4.65 0 0 1 1.24 3.22c0 4.61-2.81 5.62-5.48 5.92.43.37.81 1.1.81 2.22v3.29c0 .32.22.7.82.58A12 12 0 0 0 12 .3Z"})})}function l2(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"22",height:"22","aria-hidden":!0,children:f.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231Zm-1.161 17.52h1.833L7.084 4.126H5.117L17.083 19.77Z"})})}function u2(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"24",height:"24","aria-hidden":!0,children:f.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069ZM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0Zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881Z"})})}function d2(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"24",height:"24","aria-hidden":!0,children:f.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.546 12 3.546 12 3.546s-7.505 0-9.377.504A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.504 9.376.504 9.376.504s7.505 0 9.377-.504a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814ZM9.545 15.568V8.432L15.818 12l-6.273 3.568Z"})})}function f2(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"22",height:"22","aria-hidden":!0,children:f.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07Z"})})}function h2(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"24",height:"24","aria-hidden":!0,children:f.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286ZM5.337 7.433a2.062 2.062 0 1 1 0-4.123 2.062 2.062 0 0 1 0 4.123ZM6.863 20.452H3.804V9h3.059v11.452ZM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003Z"})})}function ih(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"18",height:"18","aria-hidden":!0,children:f.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41Z"})})}const sr=Nn((e,t)=>({item:null,anchor:null,ready:!1,token:0,show:(r,n)=>{var s;const o=t();((s=o.item)==null?void 0:s.id)===r.id&&o.anchor===n||e(i=>({item:r,anchor:n,ready:!1,token:i.token+1}))},hide:()=>e({item:null,anchor:null,ready:!1}),setReady:()=>e({ready:!0})})),ch="hover-preview";function p2(){const e=sr(T=>T.item),t=sr(T=>T.anchor),r=sr(T=>T.token),n=sr(T=>T.ready),o=sr(T=>T.setReady),[s,i]=oe.useState(!1),[u,d]=oe.useState(!1),h=oe.useRef(!1),m=oe.useRef(-1),[p,b]=oe.useState(null);oe.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const V=window.requestIdleCallback(()=>i(!0),{timeout:3e3});return()=>window.cancelIdleCallback(V)}const T=window.setTimeout(()=>i(!0),1500);return()=>window.clearTimeout(T)},[]),oe.useEffect(()=>{if(!t){b(null);return}let T=0;const V=()=>b(t.getBoundingClientRect());V();const v=()=>{cancelAnimationFrame(T),T=requestAnimationFrame(V)};return window.addEventListener("scroll",v,!0),window.addEventListener("resize",v),()=>{cancelAnimationFrame(T),window.removeEventListener("scroll",v,!0),window.removeEventListener("resize",v)}},[t]),oe.useEffect(()=>{if(!e)return;const T=document.getElementById(ch);if(!(T!=null&&T.contentWindow)||!h.current)return;m.current=r;const V=e.category==="emote";tu.sendMessage(T.contentWindow,tu.PreviewMessageType.UPDATE,{options:{contractAddress:e.contractAddress,itemId:e.itemId??void 0,profile:"default",type:V?void 0:er.PreviewType.AVATAR,emote:V?void 0:er.PreviewEmote.FASHION,disableBackground:!0,disableFadeEffect:!0}})},[e,r,u]);function E(){if(!h.current){h.current=!0,d(!0);return}const T=sr.getState();T.item&&T.token===m.current&&o()}if(!s)return null;const g=!!e&&!!p?{position:"fixed",left:p.left,top:p.top,width:p.width,height:p.height,zIndex:5,pointerEvents:"none",opacity:n?1:0,transition:"opacity .25s ease"}:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,pointerEvents:"none",overflow:"hidden"};return f.jsx("div",{className:"hover-preview","aria-hidden":!0,style:g,children:f.jsx(um,{id:ch,profile:"default",disableBackground:!0,disableFadeEffect:!0,dev:Ke.chainId===80002,onLoad:E})})}function m2(){const e=mo(t=>t.session);oe.useEffect(()=>{if(!e||e.providerType!==er.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...o)=>{var u;((u=(o[0]??[])[0])==null?void 0:u.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var o;return(o=t.removeListener)==null?void 0:o.call(t,"accountsChanged",n)}},[e])}function g2(e,t){return!t||!e.creator?!1:ul(e)&&e.creator.toLowerCase()===t.toLowerCase()}function Vx(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}const lh={head:"cat-head",hat:"cat-head",hair:"cat-head",facial_hair:"cat-head",eyes:"cat-head",eyebrows:"cat-head",mouth:"cat-head",mask:"cat-head",helmet:"cat-head",tiara:"cat-head",top_head:"cat-head",upper_body:"cat-upper",hands_wear:"cat-handwear",lower_body:"cat-lower",feet:"cat-feet",earring:"cat-accessories",eyewear:"cat-accessories",skin:"cat-skins",dance:"emote-dance",stunt:"emote-stunt",greetings:"emote-greetings",fun:"emote-fun",poses:"emote-poses",reactions:"emote-reactions",horror:"emote-horror"};function y2(e){var r;const t=(r=e.wearableCategory)==null?void 0:r.toLowerCase();return t&&lh[t]?lh[t]:e.category==="emote"?"emote-misc":null}function v2(e){return e==="male"?"gender-male":e==="female"?"gender-female":e==="unisex"?"gender-unisex":null}function b2(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:o}=e;return!(n==null||!(n>r)||o!=null&&o<=t)}function w2(e,t){if(!(e>0)||!(t>=0)||t>=e)return 0;const r=Math.round((1-t/e)*100);return Math.min(99,Math.max(1,r))}function Oo(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function _2(e){if(!isFinite(e)||e<=0)return"";const t=Math.floor(e/1e3),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),o=Math.floor(t%3600/60),s=t%60;return r>0?n>0?`${r}d ${n}h`:`${r}d`:n>0?`${n}h ${o}m`:o>0?`${o}m ${s}s`:`${s}s`}function uh(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function E2({endsAt:e,className:t}){const[r,n]=oe.useState(()=>Oo(e));oe.useEffect(()=>{if(n(Oo(e)),e==null)return;let s;const i=()=>{const d=Oo(e);n(d);const h=uh(d);h>0&&(s=setTimeout(i,h))},u=uh(Oo(e));return u>0&&(s=setTimeout(i,u)),()=>clearTimeout(s)},[e]);const o=_2(r);return o?f.jsxs("span",{className:t??"sale-countdown",children:[f.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),o]}):null}function S2(e){const[,t]=oe.useState(0);return oe.useEffect(()=>{const r=Oo(e.saleEndsAt);if(!isFinite(r)||r<=0||r>2147483647)return;const n=setTimeout(()=>t(o=>o+1),r+1);return()=>clearTimeout(n)},[e.saleEndsAt]),b2(e)}const x2=120;function kl(e){const{item:t}=e,r=e.mode==="market",n=oe.useRef(),o=oe.useRef(null),s=Zt(W=>W.add),i=Zt(W=>W.items.some(ne=>ne.id===t.id)),u=mo(W=>{var ne;return(ne=W.session)==null?void 0:ne.address}),d=g2(t,u),h=ya(W=>W.toggle),m=ya(W=>!!W.items[t.id]),p=sr(W=>W.show),b=sr(W=>W.hide),E=sr(W=>{var ne;return((ne=W.item)==null?void 0:ne.id)===t.id}),A=sr(W=>{var ne;return((ne=W.item)==null?void 0:ne.id)===t.id?W.ready:!1}),g=!!t.contractAddress&&!!t.itemId,T=t.tokenId??t.itemId,V=!!t.contractAddress&&!!T,v=`/item/${t.contractAddress}/${T}`;function R(){typeof window<"u"&&window.matchMedia&&!window.matchMedia("(hover: hover)").matches||(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{g&&o.current&&p(t,o.current)},x2))}function w(){var W;n.current&&clearTimeout(n.current),((W=sr.getState().item)==null?void 0:W.id)===t.id&&b()}oe.useEffect(()=>()=>{var W;n.current&&clearTimeout(n.current),((W=sr.getState().item)==null?void 0:W.id)===t.id&&b()},[t.id,b]);const Q=y2(t),U=v2(t.gender),x=S2({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),$=!r&&x,J=$?w2(t.compareAtCredits,t.priceCredits):0;return f.jsxs("article",{className:"card",style:V?{cursor:"pointer"}:void 0,onMouseEnter:R,onMouseLeave:w,children:[V?f.jsx(bn,{className:"card__link",to:v,state:e.mode==="market"?{item:t,market:!0,marketPriceCredits:e.marketPriceCredits}:{item:t,tradeId:t.tradeId},"aria-label":t.name}):null,f.jsx("button",{className:`card__fav${m?" is-on":""}`,onClick:W=>{W.stopPropagation(),h(t)},"aria-label":ae(m?"assetCard.removeFromFavorites":"assetCard.addToFavorites"),children:f.jsx("span",{className:`ico ${m?"ico-heart-solid":"ico-heart"}`,"aria-hidden":!0})}),f.jsxs("div",{className:"card__media",ref:o,children:[$?f.jsx("span",{className:"card__sale-badge",children:J>0?ae("assetCard.saleWithDiscount",{pct:J}):ae("assetCard.sale")}):null,t.thumbnail?f.jsx("img",{className:`card__img${E&&A?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null]}),f.jsxs("div",{className:"card__body",children:[f.jsxs("div",{className:"card__top",children:[f.jsxs("div",{className:"card__desc",children:[f.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?f.jsx(gl,{address:t.creator,className:"card__creator",linkToProfile:!0}):f.jsx("div",{className:"card__creator",children:" "})]}),r&&e.mode==="market"?f.jsxs("div",{className:"card__price card__price--market",children:[f.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),f.jsx(ur,{className:"card__diamond"}),e.marketPriceCredits==null?"—":zn(e.marketPriceCredits)]}):$?f.jsxs("div",{className:"card__price card__price--sale",children:[f.jsxs("span",{className:"card__price-now",title:jo(t.priceCredits),children:[f.jsx(ur,{className:"card__diamond"}),zn(t.priceCredits)]}),f.jsxs("span",{className:"card__price-was",title:jo(t.compareAtCredits),children:[f.jsx(ur,{className:"card__diamond card__diamond--was"}),zn(t.compareAtCredits)]}),f.jsx(E2,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):f.jsxs("div",{className:"card__price",title:jo(t.priceCredits),children:[f.jsx(ur,{className:"card__diamond"}),zn(t.priceCredits)]})]}),f.jsxs("div",{className:"card__action",children:[f.jsxs("div",{className:"card__chips",children:[r?f.jsx("span",{className:"chip chip--market",children:ae("assetCard.marketPrice")}):null,f.jsx("span",{className:"chip chip--rarity",style:{background:TS(t.rarity),color:AS(t.rarity)},title:IS(t.rarity),children:t.rarity}),t.isSmart?f.jsxs("span",{className:"chip chip--smart",children:[f.jsx("span",{className:"ico ico-smart","aria-hidden":!0}),ae("assetCard.smart")]}):null,Q?f.jsx("span",{className:"chip chip--icon",children:f.jsx("span",{className:`ico ico-${Q}`,"aria-hidden":!0})}):null,U?f.jsx("span",{className:"chip chip--icon",children:f.jsx("span",{className:`ico ico-${U}`,"aria-hidden":!0})}):null]}),r&&e.mode==="market"?f.jsx("button",{className:"card__add-round",onClick:W=>{W.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,"aria-label":e.marketPriceCredits==null?ae("assetCard.unavailable"):ae("assetCard.buyNow"),children:f.jsx("span",{className:"ico ico-plus","aria-hidden":!0})}):f.jsx("button",{className:`card__add-round${i?" is-in":""}`,onClick:W=>{W.stopPropagation(),d||s(t,"grid")},disabled:i||d,"aria-label":ae(d?"assetCard.yourItem":i?"assetCard.inCart":"assetCard.addToCart"),children:f.jsx("span",{className:"ico ico-plus","aria-hidden":!0})}),r&&e.mode==="market"?f.jsx("button",{className:"card__cart",onClick:W=>{W.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?ae("assetCard.unavailable"):ae("assetCard.buyNow")}):f.jsxs("button",{className:`card__cart${i?" is-in":""}`,onClick:W=>{W.stopPropagation(),d||s(t,"grid")},disabled:i||d,children:[d?null:f.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),ae(d?"assetCard.yourItem":i?"assetCard.inCart":"assetCard.addToCart")]})]})]})]})}const C2=8,T2=8,A2=12;function I2(){const t=Dc(o=>o.followed).slice(0,C2),{data:r=[],isLoading:n}=Hr({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const o=await Promise.all(t.map(s=>xS(s,{first:T2}).then(i=>i.items).catch(()=>[])));return R2(o).filter(s=>s.priceCredits>0).slice(0,A2)}});return t.length===0||!n&&r.length===0?null:f.jsxs("section",{className:"row",children:[f.jsx("div",{className:"row__head",children:f.jsx("h2",{className:"row__title",children:ae("followedCreators.title")})}),f.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((o,s)=>f.jsx("div",{className:"card card--skeleton"},s)):r.map(o=>f.jsx(kl,{item:o},o.id))})]})}function R2(e){const t=[],r=new Set,n=e.reduce((o,s)=>Math.max(o,s.length),0);for(let o=0;o<n;o++)for(const s of e){const i=s[o];i&&!r.has(i.id)&&(r.add(i.id),t.push(i))}return t}const fm="shop:recently-viewed",hm=12;function pm(){try{const e=localStorage.getItem(fm);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,hm):[]}catch{return[]}}function Gx(e){if(e!=null&&e.id)try{const t=[e,...pm().filter(r=>r.id!==e.id)].slice(0,hm);localStorage.setItem(fm,JSON.stringify(t))}catch{}}function P2({excludeId:e}){const t=oe.useMemo(()=>pm().filter(r=>r.id!==e),[e]);return t.length===0?null:f.jsxs("section",{className:"row",children:[f.jsx("div",{className:"row__head",children:f.jsx("h2",{className:"row__title",children:ae("recentlyViewed.title")})}),f.jsx("div",{className:"row__track",children:t.map(r=>f.jsx(kl,{item:r},r.id))})]})}async function N2(e="week",t=10,r="most_volume"){const n=new URLSearchParams({sortBy:r,first:String(t)}),o=await fetch(`${Ke.marketplaceServerUrl}/v1/rankings/creators/${e}?${n.toString()}`);if(!o.ok)throw new Error(`fetchTopCreators ${o.status}`);return(await o.json()).data??[]}const dh=10;function k2(e){try{return Math.floor(Number(Ih(e))).toLocaleString("en-US")}catch{return"0"}}function O2({rank:e,creator:t}){return f.jsxs("tr",{className:"ov-creators__row",children:[f.jsx("td",{className:"ov-creators__rank-cell",children:f.jsx("span",{className:"ov-creators__rank",children:e})}),f.jsx("td",{className:"ov-creators__creator-cell",children:f.jsx(gl,{address:t.id,className:"ov-creators__creator",linkToProfile:!0})}),f.jsx("td",{className:"ov-creators__num",children:t.collections.toLocaleString("en-US")}),f.jsx("td",{className:"ov-creators__num",children:t.sales.toLocaleString("en-US")}),f.jsxs("td",{className:"ov-creators__num ov-creators__volume",children:[f.jsx(ur,{className:"ov-creators__coin"}),k2(t.earned)]})]})}function j2(){return f.jsxs("tr",{className:"ov-creators__row",children:[f.jsx("td",{className:"ov-creators__rank-cell",children:f.jsx("span",{className:"ov-creators__rank ov-creators__rank--skeleton"})}),f.jsx("td",{className:"ov-creators__creator-cell",children:f.jsx("span",{className:"ov-creators__skeleton ov-creators__skeleton--creator"})}),f.jsx("td",{className:"ov-creators__num",children:f.jsx("span",{className:"ov-creators__skeleton"})}),f.jsx("td",{className:"ov-creators__num",children:f.jsx("span",{className:"ov-creators__skeleton"})}),f.jsx("td",{className:"ov-creators__num",children:f.jsx("span",{className:"ov-creators__skeleton"})})]})}function B2(){const{data:e,isLoading:t,isError:r}=Hr({queryKey:["rankings","creators","week"],queryFn:()=>N2("week",dh)}),n=e??[];return r||!t&&n.length===0?null:f.jsxs("section",{className:"ov-creators",children:[f.jsxs("div",{className:"ov-creators__head",children:[f.jsx("h2",{className:"ov-creators__title",children:ae("weekTopCreators.title")}),f.jsx("span",{className:"ov-creators__period",children:ae("weekTopCreators.thisWeek")})]}),f.jsx("div",{className:"ov-creators__scroll",children:f.jsxs("table",{className:"ov-creators__table",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"ov-creators__header",children:[f.jsx("th",{className:"ov-creators__th ov-creators__th--rank",scope:"col",children:ae("weekTopCreators.rank")}),f.jsx("th",{className:"ov-creators__th",scope:"col",children:ae("weekTopCreators.creator")}),f.jsx("th",{className:"ov-creators__th ov-creators__th--num",scope:"col",children:ae("weekTopCreators.collections")}),f.jsx("th",{className:"ov-creators__th ov-creators__th--num",scope:"col",children:ae("weekTopCreators.sales")}),f.jsx("th",{className:"ov-creators__th ov-creators__th--num",scope:"col",children:ae("weekTopCreators.volume")})]})}),f.jsx("tbody",{children:t?Array.from({length:dh}).map((o,s)=>f.jsx(j2,{},s)):n.map((o,s)=>f.jsx(O2,{rank:s+1,creator:o},o.id))})]})})]})}const mm="Decentraland Shop",F2=`${mm} | Wearables & Emotes for Your Avatar`,L2="Discover wearables and emotes to make your Decentraland avatar your own. Explore thousands of unique looks and find your style in seconds.";function _r(e,t,r){let n=document.head.querySelector(`meta[${e}="${t}"]`);n||(n=document.createElement("meta"),n.setAttribute(e,t),document.head.appendChild(n)),n.setAttribute("content",r)}function M2(e,t){let r=document.head.querySelector(`link[rel="${e}"]`);r||(r=document.createElement("link"),r.setAttribute("rel",e),document.head.appendChild(r)),r.setAttribute("href",t)}function $2(e={}){const{title:t,description:r=L2,image:n,type:o="website",noindex:s=!1,canonicalPath:i}=e;oe.useEffect(()=>{if(typeof window>"u")return;const u=window.location.origin,d=u+(i??window.location.pathname),h=n??`${u}https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/og-image.png`,m=t?`${t} | ${mm}`:F2;document.title=m,_r("name","description",r),_r("name","robots",s?"noindex,nofollow":"index,follow"),M2("canonical",d),_r("property","og:title",m),_r("property","og:description",r),_r("property","og:url",d),_r("property","og:image",h),_r("property","og:type",o),_r("name","twitter:title",m),_r("name","twitter:description",r),_r("name","twitter:image",h)},[t,r,n,o,s,i])}const fh="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20width='100%25'%20height='100%25'%20overflow='visible'%20style='display:%20block;'%20viewBox='0%200%2059.7045%2058.9085'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Slider%20Arrows'%3e%3cpath%20id='Oval'%20opacity='0.8'%20d='M29.8522%201.59244C45.437%201.59244%2058.1117%2014.0437%2058.112%2029.4538C58.112%2044.8641%2045.4372%2057.3161%2029.8522%2057.3161C14.2672%2057.3161%201.59244%2044.8641%201.59244%2029.4538C1.5927%2014.0437%2014.2674%201.59247%2029.8522%201.59244Z'%20fill='var(--fill-0,%20white)'%20stroke='var(--stroke-0,%20white)'%20stroke-width='3.18424'/%3e%3cg%20id='bounds'%3e%3c/g%3e%3cpath%20id='icon'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.2842%2029.0164L25.652%2043.0901C24.8014%2043.9083%2023.4222%2043.9083%2022.5716%2043.0901C21.721%2042.2719%2021.721%2040.9454%2022.5716%2040.1272L34.1233%2029.0164L22.5716%2017.9056C21.721%2017.0874%2021.721%2015.7609%2022.5716%2014.9427C23.4222%2014.1245%2024.8014%2014.1245%2025.652%2014.9427L40.2842%2029.0164Z'%20fill='var(--fill-0,%20black)'/%3e%3c/g%3e%3c/svg%3e",D2="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/hero-fashion-week-B9LOzkde.png",q2="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/promo-best-rated-emotes-C6kNvB-a.png",U2="https://cdn.decentraland.org/@dcl/shop/0.1.0-29736515487.commit-b64bf82/assets/promo-week-selected-outfits-BBmkZYZx.png",hh=6;function ph({title:e,items:t,loading:r}){const n=oe.useRef(null),[o,s]=oe.useState(1),[i,u]=oe.useState(0),d=r?hh:t.length,h=oe.useCallback(()=>{const b=n.current;if(!b)return;const E=b.clientWidth;if(E<=0)return;const A=Math.max(1,Math.ceil((b.scrollWidth-E)/E)+1);s(A),u(Math.min(A-1,Math.round(b.scrollLeft/E)));const g=b.querySelector(".card__media"),T=b.parentElement;T&&T.style.setProperty("--ov-arrow-top",`${12+(g?g.offsetHeight:150)/2}px`)},[]);oe.useEffect(()=>{h();const b=n.current;if(!b)return;const E=()=>u(Math.round(b.scrollLeft/Math.max(1,b.clientWidth)));return b.addEventListener("scroll",E,{passive:!0}),window.addEventListener("resize",h),()=>{b.removeEventListener("scroll",E),window.removeEventListener("resize",h)}},[h,d]);const m=oe.useCallback(b=>{const E=n.current;if(!E)return;const A=Math.max(0,Math.min(o-1,b));E.scrollTo({left:A*E.clientWidth,behavior:"smooth"})},[o]),p=!r&&o>1;return f.jsxs("section",{className:"row ov-carousel",children:[f.jsxs("div",{className:"row__head",children:[f.jsx("h2",{className:"row__title",children:e}),f.jsxs(bn,{className:"row__viewall",to:"/assets",children:[ae("overview.viewAll")," ",f.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),f.jsxs("div",{className:"ov-carousel__viewport",children:[p?f.jsx("button",{className:"ov-arrow ov-arrow--left",onClick:()=>m(i-1),disabled:i<=0,"aria-label":ae("overview.previous"),children:f.jsx("img",{src:fh,alt:"","aria-hidden":!0})}):null,f.jsx("div",{className:"ov-carousel__track",ref:n,children:r?Array.from({length:hh}).map((b,E)=>f.jsx("div",{className:"card card--skeleton"},E)):t.map(b=>f.jsx(kl,{item:b},b.id))}),p?f.jsx("button",{className:"ov-arrow ov-arrow--right",onClick:()=>m(i+1),disabled:i>=o-1,"aria-label":ae("overview.next"),children:f.jsx("img",{src:fh,alt:"","aria-hidden":!0})}):null]}),p?f.jsx("div",{className:"ov-carousel__dots","aria-label":ae("overview.carouselPages",{title:e}),children:Array.from({length:o}).map((b,E)=>f.jsx("button",{className:`ov-dot${E===i?" is-active":""}`,onClick:()=>m(E),"aria-label":ae("overview.goToPage",{page:E+1}),"aria-current":E===i?"true":void 0},E))}):null]})}function H2(){$2({});const{data:e,isLoading:t}=Hr({queryKey:["overview-listings"],queryFn:()=>nm({first:24})}),r=(e==null?void 0:e.items)??[];return f.jsxs("div",{className:"overview",children:[f.jsxs("section",{className:"ov-hero",children:[f.jsx("img",{className:"ov-hero__bg",src:D2,alt:"","aria-hidden":!0}),f.jsx("div",{className:"ov-hero__scrim","aria-hidden":!0}),f.jsxs("div",{className:"ov-hero__inner",children:[f.jsx("h1",{className:"ov-hero__title",children:ae("overview.heroTitle")}),f.jsx(bn,{className:"btn btn--purple ov-hero__cta",to:"/assets",children:ae("overview.exploreCollection")})]})]}),t||r.length>0?f.jsxs(f.Fragment,{children:[f.jsx(ph,{title:ae("overview.featuredProducts"),items:r.slice(0,12),loading:t}),f.jsxs("section",{className:"ov-promos",children:[f.jsx(bn,{className:"ov-promo",to:"/assets","aria-label":ae("overview.promoEmotesAria"),children:f.jsx("img",{src:q2,alt:ae("overview.promoEmotesAlt")})}),f.jsx(bn,{className:"ov-promo",to:"/assets","aria-label":ae("overview.promoOutfitsAria"),children:f.jsx("img",{src:U2,alt:ae("overview.promoOutfitsAlt")})})]}),r.length>12?f.jsx(ph,{title:ae("overview.newCreations"),items:r.slice(12,24),loading:!1}):null]}):f.jsxs("div",{className:"overview__empty",children:[f.jsx("p",{className:"overview__empty-title",children:ae("overview.emptyTitle")}),f.jsx("p",{className:"muted",children:ae("overview.emptyBody")}),f.jsx(bn,{className:"btn btn--purple",to:"/assets",children:ae("notFound.cta")})]}),f.jsx(P2,{}),f.jsx(I2,{}),f.jsx(B2,{})]})}const V2={"/overview":"overview","/assets":"assets","/my-assets":"my_assets","/my-favorites":"favorites","/my-purchases":"my_purchases","/import":"import","/store-settings":"store_settings","/cart":"cart","/credits":"credits","/success":"success"},G2=oe.lazy(()=>wt(()=>import("./Assets-BLEE2McM.js"),__vite__mapDeps([22,1,23,12,2,7,6,24,25,26,27,28,29,30,31,32,33,8])).then(e=>({default:e.Assets}))),z2=oe.lazy(()=>wt(()=>import("./ItemDetail-DmBWsg8l.js"),__vite__mapDeps([34,1,2,25,26,12,7,6,27,35,36,28,29,17,24,23,37,38,39,8,40])).then(e=>({default:e.ItemDetail}))),W2=oe.lazy(()=>wt(()=>import("./Collection-CEmVbx8y.js"),__vite__mapDeps([41,1,29,42,43,44,2,37,30,31,32,33,6,7,8,45])).then(e=>({default:e.Collection}))),K2=oe.lazy(()=>wt(()=>import("./Creator-CSW1SPi9.js"),__vite__mapDeps([46,1,42,43,44,2,37,30,31,32,33,29,6,7,8,47])).then(e=>({default:e.Creator}))),Y2=oe.lazy(()=>wt(()=>import("./StoreSettings-C_SlMQ79.js"),__vite__mapDeps([48,1,44,2,29,6,7,8,49])).then(e=>({default:e.StoreSettings}))),Q2=oe.lazy(()=>wt(()=>import("./MyAssets-7sMdrGBa.js"),__vite__mapDeps([50,1,51,25,2,26,12,7,6,23,28,29,52,32,33,8,53])).then(e=>({default:e.MyAssets}))),Z2=oe.lazy(()=>wt(()=>import("./MyFavorites-CRqCDkA2.js"),__vite__mapDeps([54,1,32,2,6,7,8])).then(e=>({default:e.MyFavorites}))),J2=oe.lazy(()=>wt(()=>import("./MyPurchases-BsTMOXYC.js"),__vite__mapDeps([55,1,32,33,2,6,7,8])).then(e=>({default:e.MyPurchases}))),X2=oe.lazy(()=>wt(()=>import("./ImportListings-B_GYydG3.js"),__vite__mapDeps([56,1,51,25,2,26,12,7,6,23,52,8,57])).then(e=>({default:e.ImportListings}))),ex=oe.lazy(()=>wt(()=>import("./Cart-CNsRhX_R.js"),__vite__mapDeps([58,1,25,2,26,12,7,6,27,59,35,29,28,38,39,8,60])).then(e=>({default:e.Cart}))),tx=oe.lazy(()=>wt(()=>import("./GetCredits-CovHo4LD.js"),__vite__mapDeps([61,1,36,59,35,17,2,6,7,8])).then(e=>({default:e.GetCredits}))),rx=oe.lazy(()=>wt(()=>import("./Success-3OL55SvR.js"),__vite__mapDeps([62,1,2,52,27,26,12,7,6,8])).then(e=>({default:e.Success}))),nx=oe.lazy(()=>wt(()=>import("./NotFound-COraILzW.js"),__vite__mapDeps([63,1,2,6,7,8])).then(e=>({default:e.NotFound})));function ox(){return f.jsx("div",{className:"page-loading","aria-busy":"true",children:f.jsx("span",{className:"spinner","aria-hidden":!0})})}function sx(){return f.jsxs("div",{className:"overview__empty",children:[f.jsx("p",{className:"overview__empty-title",children:ae("app.crash.title")}),f.jsx("p",{className:"muted",children:ae("app.crash.body")}),f.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:ae("app.crash.reload")})]})}function ax(){m2();const e=Ah();return oe.useEffect(()=>{k0()},[]),oe.useEffect(()=>{const t=e.pathname,r=V2[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/assets/creator/")?"creator":"other");I0(r)},[e.pathname]),f.jsxs(f.Fragment,{children:[f.jsx(VS,{}),f.jsx(p2,{}),f.jsx(t2,{}),f.jsx(DS,{}),f.jsx("main",{className:"page",children:f.jsx(ru,{fallback:f.jsx(sx,{}),children:f.jsx(oe.Suspense,{fallback:f.jsx(ox,{}),children:f.jsxs(Om,{children:[f.jsx(Nt,{path:"/",element:f.jsx(eu,{to:"/overview",replace:!0})}),f.jsx(Nt,{path:"/overview",element:f.jsx(H2,{})}),f.jsx(Nt,{path:"/assets",element:f.jsx(G2,{})}),f.jsx(Nt,{path:"/market",element:f.jsx(eu,{to:"/assets",replace:!0})}),f.jsx(Nt,{path:"/item/:contractAddress/:tokenId",element:f.jsx(z2,{})}),f.jsx(Nt,{path:"/collection/:contractAddress",element:f.jsx(W2,{})}),f.jsx(Nt,{path:"/assets/creator/:address",element:f.jsx(K2,{})}),f.jsx(Nt,{path:"/store-settings",element:f.jsx(Y2,{})}),f.jsx(Nt,{path:"/my-assets",element:f.jsx(Q2,{})}),f.jsx(Nt,{path:"/my-favorites",element:f.jsx(Z2,{})}),f.jsx(Nt,{path:"/my-purchases",element:f.jsx(J2,{})}),f.jsx(Nt,{path:"/import",element:f.jsx(X2,{})}),f.jsx(Nt,{path:"/cart",element:f.jsx(ex,{})}),f.jsx(Nt,{path:"/credits",element:f.jsx(tx,{})}),f.jsx(Nt,{path:"/success",element:f.jsx(rx,{})}),f.jsx(Nt,{path:"*",element:f.jsx(nx,{})})]})})})}),f.jsx(ru,{fallback:f.jsx(f.Fragment,{}),children:f.jsx(a2,{})})]})}function ix({children:e}){const t=Xc(r=>r.locale);return E1(t),f.jsx(Lv,{value:ml(t),children:e},t)}$0();const cx=new wg({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),lx=["localhost","127.0.0.1"].includes(window.location.hostname),ux=lx?void 0:"/shop";jm.createRoot(document.getElementById("root")).render(f.jsx(Th.StrictMode,{children:f.jsx(Eg,{client:cx,children:f.jsx(ix,{children:f.jsx(Bm,{basename:ux,children:f.jsx(ax,{})})})})}));export{Sl as $,kl as A,fh as B,ur as C,Aa as D,Tx as E,xa as F,zS as G,WS as H,Nl as I,KS as J,Yn as K,Fx as L,Pp as M,cw as N,pw as O,dn as P,Ye as Q,dw as R,un as S,JE as T,sw as U,tS as V,um as W,Wp as X,o_ as Y,a_ as Z,wt as _,$2 as a,m_ as a$,Oa as a0,Up as a1,ns as a2,_l as a3,Gp as a4,El as a5,Xp as a6,hg as a7,vx as a8,yx as a9,AS as aA,TS as aB,w2 as aC,E2 as aD,jx as aE,kx as aF,yS as aG,PS as aH,NS as aI,Dc as aJ,qx as aK,FE as aL,Zc as aM,Gc as aN,Uo as aO,lw as aP,j_ as aQ,Kp as aR,em as aS,Ir as aT,h_ as aU,Px as aV,zE as aW,GE as aX,xE as aY,$E as aZ,_v as a_,Og as aa,ti as ab,Hx as ac,zn as ad,Zt as ae,gl as af,Do as ag,$x as ah,_x as ai,nm as aj,g2 as ak,xy as al,Ar as am,SS as an,Ux as ao,Lx as ap,Ox as aq,Jc as ar,th as as,yp as at,S2 as au,wx as av,Gx as aw,y2 as ax,v2 as ay,IS as az,dr as b,v_ as b0,H1 as b1,Ip as b2,Rx as b3,Qc as b4,as as b5,Da as b6,Xo as b7,il as b8,W1 as b9,iw as ba,z1 as bb,Tp as bc,Ap as bd,G1 as be,ow as bf,w_ as bg,Ix as bh,eS as bi,XE as bj,yl as bk,uS as bl,g_ as bm,vE as bn,Rp as bo,ya as c,mo as d,xx as e,Bx as f,Hr as g,Dx as h,Pl as i,Ke as j,fo as k,Vx as l,Nx as m,ZE as n,xv as o,Mx as p,Cx as q,Ax as r,Cv as s,ae as t,_g as u,Sx as v,P0 as w,Ex as x,fy as y,nd as z};