@dcl/shop 0.1.0-29320583932.commit-82ec046 → 0.1.0-29330702360.commit-0d089c2

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 (165) hide show
  1. package/assets/{AnimatedBackground-Dd9xdcNr.js → AnimatedBackground-Cjl8m9yV.js} +1 -1
  2. package/assets/{Assets-CiliORHD.js → Assets-CH2UvOLD.js} +1 -1
  3. package/assets/{Button-DoTOdwVU.js → Button-D3AtkSL-.js} +1 -1
  4. package/assets/{Cart-Dsd18EG4.js → Cart-iIojIDOE.js} +1 -1
  5. package/assets/{CircularProgress-DiUADcYb.js → CircularProgress-Dwf5ihwF.js} +1 -1
  6. package/assets/{Collection-CLqyQ4IW.js → Collection-BEjVhftZ.js} +1 -1
  7. package/assets/{Creator-CTk-ONpp.js → Creator-BOAE6sSq.js} +1 -1
  8. package/assets/{ExchangeController-D46TwViz.js → ExchangeController-D7NuEvzc.js} +1 -1
  9. package/assets/{GetCredits-C7Y8uBQl.js → GetCredits-DJQvGn18.js} +2 -2
  10. package/assets/{HelpersUtil-CI0VNRsd.js → HelpersUtil-Bv85o64D.js} +1 -1
  11. package/assets/{ImportListings-Bz87d_7q.js → ImportListings-CLIZeHnq.js} +1 -1
  12. package/assets/{ItemDetail-AUtVrqo2.js → ItemDetail-vU7MusPD.js} +2 -2
  13. package/assets/{Market-DukToX_a.js → Market-BPnAdEd3.js} +1 -1
  14. package/assets/{MenuItem-DThMuJaN.js → MenuItem-C83l4cI7.js} +1 -1
  15. package/assets/{MyAssets-DMCwa8LT.js → MyAssets-CYCc3Lhx.js} +1 -1
  16. package/assets/{MyFavorites-BC03Z8wP.js → MyFavorites-DGSkZP9t.js} +1 -1
  17. package/assets/{MyPurchases-qPRFc9_j.js → MyPurchases-JReebPX3.js} +1 -1
  18. package/assets/{NotFound-sJkXCHr2.js → NotFound-CIEXRpoy.js} +1 -1
  19. package/assets/{RealCheckout-DKgEexIp.js → RealCheckout-nJizLqjT.js} +1 -1
  20. package/assets/{ShopFooterInner-8RoKpFAa.js → ShopFooterInner-C1NvVNG3.js} +2 -2
  21. package/assets/{Success-GfAGChY9.js → Success-CK_Vcw04.js} +1 -1
  22. package/assets/{SvgIcon-DrVazIf8.js → SvgIcon-CjKRGMBC.js} +1 -1
  23. package/assets/{SwapController-DPSekpFW.js → SwapController-ux84ytr5.js} +1 -1
  24. package/assets/{TradeService-DEgOrBpN.js → TradeService-BoqqCerU.js} +1 -1
  25. package/assets/{W3MFrameProviderSingleton-jP2SEBQb.js → W3MFrameProviderSingleton-DOS4510x.js} +3 -3
  26. package/assets/{WebCryptoP256-BxEcAqDA.js → WebCryptoP256-DAmb-2Em.js} +1 -1
  27. package/assets/{basic-DOJUjehg.js → basic-C3Th2FNU.js} +1 -1
  28. package/assets/{biconomy-B8yBzz_Z.js → biconomy-BWbJHSOW.js} +1 -1
  29. package/assets/{buy-V0D9mcyf.js → buy-CsLUNZO_.js} +1 -1
  30. package/assets/buy-gasless-7HSovA0-.js +1 -0
  31. package/assets/{ccip-DaMZIrdM.js → ccip-COF2T1Ib.js} +1 -1
  32. package/assets/{ccip-mr3gQYh6.js → ccip-pN92swEl.js} +1 -1
  33. package/assets/{collection-DvPz5k5f.js → collection-v-v_Nl8a.js} +1 -1
  34. package/assets/{controller-BjxhiY6Z.js → controller-RRBpGKF8.js} +2 -2
  35. package/assets/{core-QEBXS2L3.js → core-C6vlkTlo.js} +4 -4
  36. package/assets/{custom-Cs3JEiUU.js → custom-CY2ltPPd.js} +1 -1
  37. package/assets/{data-capture-BG9zOjzV.js → data-capture-Dg-3egaj.js} +1 -1
  38. package/assets/decimals-B8duagWz.js +1 -0
  39. package/assets/{decimals-B1zqLgqj.js → decimals-Chd6RszM.js} +1 -1
  40. package/assets/{detectExtension-DHSVaM7K.js → detectExtension-B0a7MglY.js} +1 -1
  41. package/assets/{email-Di3y604t.js → email-ClZummtk.js} +1 -1
  42. package/assets/{embedded-wallet-GpZGZGEu.js → embedded-wallet-DEopUqkL.js} +1 -1
  43. package/assets/{engine-CDDvBrpm.js → engine-D9rt-MAn.js} +1 -1
  44. package/assets/{estimate-l1-fee-B8OrABeU.js → estimate-l1-fee-imOha2M9.js} +1 -1
  45. package/assets/{eth_estimateGas-BVvlG_9f.js → eth_estimateGas-Da6g7nxI.js} +1 -1
  46. package/assets/{eth_getStorageAt-CeVZna8e.js → eth_getStorageAt-DKuDU8Ni.js} +1 -1
  47. package/assets/{eth_getTransactionCount-BS2IbHOK.js → eth_getTransactionCount-DVIgpPCJ.js} +1 -1
  48. package/assets/{extractIPFS-BJOU3Puj.js → extractIPFS-BTztmHWv.js} +1 -1
  49. package/assets/{features-nzVui0CB.js → features-CdtdhkTL.js} +1 -1
  50. package/assets/{fetchTokenMetadata-Dhip-ELk.js → fetchTokenMetadata-CmgflCeq.js} +2 -2
  51. package/assets/{generateUtilityClasses-CDm8uhpG.js → generateUtilityClasses-BGHsAVVg.js} +1 -1
  52. package/assets/{get-ecosystem-wallet-info-BugG9KiY.js → get-ecosystem-wallet-info-By3QiPyl.js} +1 -1
  53. package/assets/{getBalance-CCK4et_o.js → getBalance-CZWAahed.js} +1 -1
  54. package/assets/{getInstalledModules-X1YQpQWS.js → getInstalledModules-CEWawuS-.js} +1 -1
  55. package/assets/{getNFT-B6r7KQNZ.js → getNFT-CR4KcQmQ.js} +1 -1
  56. package/assets/{getNFT-DhRJxAei.js → getNFT-D1cs3iBl.js} +2 -2
  57. package/assets/{hashTypedData-BRoTleDf.js → hashTypedData-BAX4R2DY.js} +1 -1
  58. package/assets/{hashTypedData-D3vq637U.js → hashTypedData-DrkY-TEF.js} +1 -1
  59. package/assets/{import-C8hJC2vx.js → import-DZ2KCb9V.js} +1 -1
  60. package/assets/{in-app-wallet-calls-BoTe4QNC.js → in-app-wallet-calls-D-AtLmwC.js} +1 -1
  61. package/assets/{index-DlQbNMYE.js → index-2JcLr6iQ.js} +1 -1
  62. package/assets/{index-CYkpNnxn.js → index-3OJXSMmr.js} +1 -1
  63. package/assets/{index-CYVVB7Td.js → index-3jp_d5kG.js} +2 -2
  64. package/assets/{index-DoLpTTHn.js → index-B0BYuywg.js} +1 -1
  65. package/assets/{index-649pneDM.js → index-B6L4OXge.js} +1 -1
  66. package/assets/{index-DcNwL68G.js → index-B6dQCTVX.js} +1 -1
  67. package/assets/{index-D6BNDDhy.js → index-B8lSRyNG.js} +1 -1
  68. package/assets/{index-iuQfFsrG.js → index-BFZF6WWf.js} +1 -1
  69. package/assets/{index-WhavDQV5.js → index-BHQEH_12.js} +2 -2
  70. package/assets/{index-c74jjyMW.js → index-BHce3r2x.js} +1 -1
  71. package/assets/{index-DAGpt8OB.js → index-BKFbcYVd.js} +3 -3
  72. package/assets/{index-BEhVu7o_.js → index-BKSDHYQD.js} +1 -1
  73. package/assets/{index-CId5iQsW.js → index-BMqKKCr-.js} +1 -1
  74. package/assets/{index-CBzkmySt.js → index-B_5zdr9Z.js} +1 -1
  75. package/assets/{index-B-55yC3a.js → index-Bon2lvA0.js} +1 -1
  76. package/assets/{index-M7EpWPgf.js → index-Br71EGgw.js} +1 -1
  77. package/assets/{index-D7f8O2PG.js → index-Btx6Nhfc.js} +1 -1
  78. package/assets/{index-Bzg2l0Un.js → index-C5GM9Ip2.js} +1 -1
  79. package/assets/{index-D1pErJ6O.js → index-C5tNn6Sj.js} +1 -1
  80. package/assets/{index-Dk9W0x9Y.js → index-C7N7hETQ.js} +1 -1
  81. package/assets/{index-DnpICGwa.js → index-C8fVhmDx.js} +1 -1
  82. package/assets/{index-CnYMOFoS.js → index-CAbL4ft4.js} +1 -1
  83. package/assets/{index-CToPwMxl.js → index-CGXg_EM9.js} +1 -1
  84. package/assets/{index-CDbdhcqv.js → index-CMGTUvxy.js} +5 -5
  85. package/assets/{index-DPgjDvMf.js → index-CP71O51m.js} +1 -1
  86. package/assets/{index-B0Ao9kYR.js → index-CUMwJIXW.js} +2 -2
  87. package/assets/{index-DLjLSleR.js → index-CVmxsTrR.js} +1 -1
  88. package/assets/{index-DGNUm1Vh.js → index-Cat6hGXG.js} +1 -1
  89. package/assets/{index-DpZf77rS.js → index-Cb3sg7_L.js} +1 -1
  90. package/assets/{index-CgQT-7mY.js → index-CbMRJVXQ.js} +1 -1
  91. package/assets/{index-CR9XZgAH.js → index-CsHvmA0A.js} +1 -1
  92. package/assets/{index-Dn5I08Nb.js → index-D1cYKn9R.js} +1 -1
  93. package/assets/{index-YS69XAdL.js → index-D41AIxSG.js} +1 -1
  94. package/assets/{index-BuiAkeTD.js → index-D55hPHnV.js} +1 -1
  95. package/assets/{index-DXFrN-73.js → index-D8ylAHlw.js} +1 -1
  96. package/assets/{index-Cq-l4WwO.js → index-DBUoOr84.js} +1 -1
  97. package/assets/{index-Bc6WE_pe.js → index-DFPBqsDV.js} +3 -3
  98. package/assets/{index-D6xelJyZ.js → index-DHJZpBre.js} +1 -1
  99. package/assets/{index-oI3fW6Rj.js → index-DQ_rifhp.js} +1 -1
  100. package/assets/{index-B9OK_kXM.js → index-DXWuFCgK.js} +1 -1
  101. package/assets/{index-C29bHRll.js → index-D_YEolFF.js} +1 -1
  102. package/assets/{index-DIPi61f3.js → index-DlEhwtiz.js} +1 -1
  103. package/assets/{index-DieZJbOB.js → index-DlqMH58i.js} +1 -1
  104. package/assets/{index-CuemaKBC.js → index-DniopxMv.js} +1 -1
  105. package/assets/{index-BfurG2f7.js → index-Dq9WdxpX.js} +1 -1
  106. package/assets/{index-DrpQ42xE.js → index-Dx1GZbTR.js} +1 -1
  107. package/assets/{index-ChSg5K2B.js → index-Dy8fJKIh.js} +1 -1
  108. package/assets/{index-BUGcKKnb.js → index-Htk8eGLE.js} +1 -1
  109. package/assets/{index-BZRwOIKI.js → index-NKx9gPR1.js} +1 -1
  110. package/assets/{index-DKhanryU.js → index-OCnqAqKv.js} +1 -1
  111. package/assets/{index-J8GLxaq1.js → index-dNeC4XVF.js} +1 -1
  112. package/assets/{index-CHwUG_1V.js → index-rSC-8Ubo.js} +1 -1
  113. package/assets/{index-BiEm9ZoE.js → index-xW0RoH3-.js} +1 -1
  114. package/assets/{index.es-BNLauRoX.js → index.es-BwkLmJ3k.js} +4 -4
  115. package/assets/{index.es-LqHpDcdZ.js → index.es-DoQSqgF7.js} +1 -1
  116. package/assets/{index.es-Cl2sjaG0.js → index.es-a1vlTA5I.js} +1 -1
  117. package/assets/{localBatchGatewayRequest-C-w8oU3U.js → localBatchGatewayRequest-CI1lWSsQ.js} +1 -1
  118. package/assets/{mana-rate-BMVF8typ.js → mana-rate-BySaIkbs.js} +1 -1
  119. package/assets/network-dDcJdQOQ.js +1 -0
  120. package/assets/{networks-DblzAQYH.js → networks-buLFWtl_.js} +1 -1
  121. package/assets/{onramp-8q2--TVh.js → onramp-Dv5gjkia.js} +1 -1
  122. package/assets/{openzeppelin-_zQqv1bU.js → openzeppelin-CS6twUC4.js} +1 -1
  123. package/assets/{ownerOf-DmjPUAg9.js → ownerOf-B31uIFul.js} +1 -1
  124. package/assets/{parseNft-DKCt5afz.js → parseNft-1GNvJ8yW.js} +2 -2
  125. package/assets/{parseSignature-i9mTt4d5.js → parseSignature-C2LBr0kz.js} +1 -1
  126. package/assets/{parseSignature-BKVOixC1.js → parseSignature-DTtQg04R.js} +3 -3
  127. package/assets/{pay-with-exchange-CK8HxrXI.js → pay-with-exchange-DIgh7ywL.js} +1 -1
  128. package/assets/{qr-overlay-B2RuntKp.js → qr-overlay-DHKqDKWQ.js} +1 -1
  129. package/assets/{receive-CB6y9SAy.js → receive-BhvPpdV9.js} +1 -1
  130. package/assets/{resolveImplementation-BwNDSmNA.js → resolveImplementation-BfhB1Qee.js} +1 -1
  131. package/assets/{rpc-YHpipnhR.js → rpc-B-pfbr4M.js} +1 -1
  132. package/assets/{secp256k1-CMnIpug3.js → secp256k1-CRPmmOoA.js} +1 -1
  133. package/assets/{secp256k1-Dczi4kYV.js → secp256k1-Ctv6lI2e.js} +1 -1
  134. package/assets/{secp256k1-DXY68zwJ.js → secp256k1-CwVIRbP0.js} +1 -1
  135. package/assets/{send-Bw9Fo-sU.js → send-CMvPKSgZ.js} +1 -1
  136. package/assets/{send-batch-transaction-3fbP4ils.js → send-batch-transaction-DWxAqsBk.js} +1 -1
  137. package/assets/{send-eip712-transaction-eM8udhV2.js → send-eip712-transaction-B2VaaMTe.js} +2 -2
  138. package/assets/{send-gasless-transaction-CQQuynM8.js → send-gasless-transaction-CTg0xtdJ.js} +2 -2
  139. package/assets/{sendRawTransaction-DElTbUB5.js → sendRawTransaction-CsI-1dvK.js} +3 -3
  140. package/assets/{serializeTransaction-CC26aHFS.js → serializeTransaction-D6we2AVi.js} +1 -1
  141. package/assets/{session-proposal-DbPD1zWW.js → session-proposal-x6BmzwlF.js} +1 -1
  142. package/assets/{session-request-k9eh1x9T.js → session-request-DpJJOyKL.js} +2 -2
  143. package/assets/{sha256-DWAzPY6C.js → sha256-C88uAxsJ.js} +1 -1
  144. package/assets/{signing-PuchpNRh.js → signing-B2qIRPvY.js} +4 -4
  145. package/assets/{socials-GpCXSQBp.js → socials-ByRNrtni.js} +1 -1
  146. package/assets/{swaps-BAp0cMxR.js → swaps-DQU4MzZQ.js} +1 -1
  147. package/assets/{thirdweb-CoWzqr2T.js → thirdweb-CNlfuYdS.js} +3 -3
  148. package/assets/{totalSupply-1xHzbvZ3.js → totalSupply-CTGTutOw.js} +1 -1
  149. package/assets/{transactionReceipt-DcQeYV1R.js → transactionReceipt-BlO435FD.js} +1 -1
  150. package/assets/{transactions-BRQsnEk2.js → transactions-uQyr50KQ.js} +1 -1
  151. package/assets/{useInfiniteGrid-D3hdcGcO.js → useInfiniteGrid-CcvAkiyB.js} +1 -1
  152. package/assets/{verifyHash-3-3N8ULj.js → verifyHash-BxVtCiNG.js} +1 -1
  153. package/assets/{w3m-modal-Ch2IbUzH.js → w3m-modal-Co_TmNBS.js} +1 -1
  154. package/assets/{w3m-modal-DAua5HBD.js → w3m-modal-DV4es5bp.js} +1 -1
  155. package/assets/{wait-for-tx-receipt-CtVzmL_A.js → wait-for-tx-receipt-Oua6kcjt.js} +1 -1
  156. package/assets/{wallet-kind-nOx7JLKG.js → wallet-kind-BR9EEO7E.js} +1 -1
  157. package/assets/{wallets-Dm1lEDA0.js → wallets-BBLt7Gp1.js} +6 -6
  158. package/assets/{web-connector-D-HGLz_B.js → web-connector-C4qcVYdF.js} +3 -3
  159. package/assets/{writeContract-B9pa5-Yx.js → writeContract-B7gGmX2o.js} +1 -1
  160. package/assets/{zoraTestnet-DK1jZSDZ.js → zoraTestnet-BOqp_z4N.js} +1 -1
  161. package/index.html +8 -8
  162. package/package.json +2 -2
  163. package/assets/buy-gasless-Cm88fUEy.js +0 -1
  164. package/assets/decimals-7TypV4wW.js +0 -1
  165. package/assets/network-CixOkli1.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CR9XZgAH.js","assets/react-Vu6nbGi5.js","assets/network-CixOkli1.js","assets/index-BiEm9ZoE.js","assets/SvgIcon-DrVazIf8.js","assets/generateUtilityClasses-CDm8uhpG.js","assets/colors-LINLm1ux.js","assets/ethers-JeCAM1sd.js","assets/index-B0Ao9kYR.js","assets/index-C29bHRll.js","assets/index-BUGcKKnb.js","assets/Button-DoTOdwVU.js","assets/CircularProgress-DiUADcYb.js","assets/index-CLIR3TTD.js","assets/MenuItem-DThMuJaN.js","assets/AnimatedBackground-Dd9xdcNr.js","assets/AnimatedBackground-CiurwFBv.css","assets/ShopFooterInner-8RoKpFAa.js","assets/TradeService-DEgOrBpN.js","assets/index-DXFrN-73.js","assets/Assets-CiliORHD.js","assets/FilterBar-CdU8B66A.js","assets/SkeletonCards-BysJEVmg.js","assets/LoadMore-BOCtgPLI.js","assets/useInfiniteGrid-D3hdcGcO.js","assets/Market-DukToX_a.js","assets/mana-rate-BMVF8typ.js","assets/buy-V0D9mcyf.js","assets/buy-gasless-Cm88fUEy.js","assets/ItemDetail-AUtVrqo2.js","assets/ItemDetail-Casltmsg.css","assets/Collection-CLqyQ4IW.js","assets/collection-DvPz5k5f.js","assets/collection-Ds5shVfK.css","assets/Creator-CTk-ONpp.js","assets/MyAssets-DMCwa8LT.js","assets/import-C8hJC2vx.js","assets/wallet-kind-nOx7JLKG.js","assets/MyAssets-BqJHbQOZ.css","assets/MyFavorites-BC03Z8wP.js","assets/MyPurchases-qPRFc9_j.js","assets/ImportListings-Bz87d_7q.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-Dsd18EG4.js","assets/GetCredits-C7Y8uBQl.js","assets/Success-GfAGChY9.js","assets/NotFound-sJkXCHr2.js"])))=>i.map(i=>d[i]);
2
- var BD=Object.defineProperty;var HE=e=>{throw TypeError(e)};var kD=(e,t,r)=>t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>kD(e,typeof t!="symbol"?t+"":t,r),Ed=(e,t,r)=>t.has(e)||HE("Cannot "+r);var ue=(e,t,r)=>(Ed(e,t,"read from private field"),r?r.call(e):t.get(e)),We=(e,t,r)=>t.has(e)?HE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(Ed(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(Ed(e,t,"access private method"),r);var Yu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as Me,j as J,l as zO,g as WO,R as YO,c as sg,L as Oo,a as c_,m as xn,d as UD,n as FD,o as dr,N as HD,p as VD,B as GD}from"./react-Vu6nbGi5.js";import{g as Sl,p as yl,W as zD,m as WD,h as VE,f as YD}from"./ethers-JeCAM1sd.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Vo=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(){}},Qi,ei,Wa,LO,xD=(LO=class extends Vo{constructor(){super();We(this,Qi);We(this,ei);We(this,Wa);je(this,Wa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ue(this,ei)||this.setEventListener(ue(this,Wa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ei))==null||t.call(this),je(this,ei,void 0))}setEventListener(t){var r;je(this,Wa,t),(r=ue(this,ei))==null||r.call(this),je(this,ei,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ue(this,Qi)!==t&&(je(this,Qi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ue(this,Qi)=="boolean"?ue(this,Qi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qi=new WeakMap,ei=new WeakMap,Wa=new WeakMap,LO),l_=new xD,KD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,u_,$O,XD=($O=class{constructor(){We(this,ti,KD);We(this,u_,!1)}setTimeoutProvider(e){je(this,ti,e)}setTimeout(e,t){return ue(this,ti).setTimeout(e,t)}clearTimeout(e){ue(this,ti).clearTimeout(e)}setInterval(e,t){return ue(this,ti).setInterval(e,t)}clearInterval(e){ue(this,ti).clearInterval(e)}},ti=new WeakMap,u_=new WeakMap,$O),Ji=new XD;function JD(e){setTimeout(e,0)}var QD=typeof window>"u"||"Deno"in globalThis;function Sr(){}function ZD(e,t){return typeof e=="function"?e(t):e}function og(e){return typeof e=="number"&&e>=0&&e!==1/0}function xO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ui(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function GE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==d_(s,t.options))return!1}else if(!Po(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function zE(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(No(t.options.mutationKey)!==No(a))return!1}else if(!Po(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function d_(e,t){return((t==null?void 0:t.queryKeyHashFn)||No)(e)}function No(e){return JSON.stringify(e,(t,r)=>cg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Po(e[r],t[r])):!1}var ej=Object.prototype.hasOwnProperty;function KO(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=WE(e)&&WE(t);if(!n&&!(cg(e)&&cg(t)))return t;const a=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,u=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c],p=e[d],f=t[d];if(p===f){u[d]=p,(n?c<a:ej.call(e,d))&&l++;continue}if(p===null||f===null||typeof p!="object"||typeof f!="object"){u[d]=f;continue}const _=KO(p,f,r+1);u[d]=_,_===p&&l++}return a===o&&l===a?e:u}function ug(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 WE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cg(e){if(!YE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!YE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function YE(e){return Object.prototype.toString.call(e)==="[object Object]"}function tj(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function lg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?KO(e,t):t}function i6(e){return e}function rj(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function nj(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var f_=Symbol();function XO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===f_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function JO(e,t){return typeof e=="function"?e(...t):!!e}function ij(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Co=(()=>{let e=()=>QD;return{isServer(){return e()},setIsServer(t){e=t}}})();function dg(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var aj=JD;function sj(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=aj;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||s()}return u},batchCalls:o=>(...u)=>{a(()=>{o(...u)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Zt=sj(),Ya,ri,xa,qO,oj=(qO=class extends Vo{constructor(){super();We(this,Ya,!0);We(this,ri);We(this,xa);je(this,xa,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(){ue(this,ri)||this.setEventListener(ue(this,xa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ri))==null||t.call(this),je(this,ri,void 0))}setEventListener(t){var r;je(this,xa,t),(r=ue(this,ri))==null||r.call(this),je(this,ri,t(this.setOnline.bind(this)))}setOnline(t){ue(this,Ya)!==t&&(je(this,Ya,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,Ya)}},Ya=new WeakMap,ri=new WeakMap,xa=new WeakMap,qO),Il=new oj;function uj(e){return Math.min(1e3*2**e,3e4)}function QO(e){return(e??"online")==="online"?Il.isOnline():!0}var fg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ZO(e){let t=!1,r=0,n;const i=dg(),a=()=>i.status!=="pending",s=R=>{var w;if(!a()){const O=new fg(R);p(O),(w=e.onCancel)==null||w.call(e,O)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>l_.isFocused()&&(e.networkMode==="always"||Il.isOnline())&&e.canRun(),c=()=>QO(e.networkMode)&&e.canRun(),d=R=>{a()||(n==null||n(),i.resolve(R))},p=R=>{a()||(n==null||n(),i.reject(R))},f=()=>new Promise(R=>{var w;n=O=>{(a()||l())&&R(O)},(w=e.onPause)==null||w.call(e)}).then(()=>{var R;n=void 0,a()||(R=e.onContinue)==null||R.call(e)}),_=()=>{if(a())return;let R;const w=r===0?e.initialPromise:void 0;try{R=w??e.fn()}catch(O){R=Promise.reject(O)}Promise.resolve(R).then(d).catch(O=>{var v;if(a())return;const h=e.retry??(Co.isServer()?0:3),T=e.retryDelay??uj,b=typeof T=="function"?T(r,O):T,m=h===!0||typeof h=="number"&&r<h||typeof h=="function"&&h(r,O);if(t||!m){p(O);return}r++,(v=e.onFail)==null||v.call(e,r,O),tj(b).then(()=>l()?void 0:f()).then(()=>{t?p(O):_()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?_():f().then(_),i)}}var Zi,BO,eN=(BO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),og(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Co.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Zi)!==void 0&&(Ji.clearTimeout(ue(this,Zi)),je(this,Zi,void 0))}},Zi=new WeakMap,BO);function cj(e){return{onFetch:(t,r)=>{var c,d,p,f,_;const n=t.options,i=(p=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],s=((_=t.state.data)==null?void 0:_.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let R=!1;const w=T=>{ij(T,()=>t.signal,()=>R=!0)},O=XO(t.options,t.fetchOptions),h=async(T,b,m)=>{if(R)return Promise.reject(t.signal.reason);if(b==null&&T.pages.length)return Promise.resolve(T);const A=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:m?"backward":"forward",meta:t.options.meta};return w(Y),Y})(),P=await O(A),{maxPages:q}=t.options,z=m?nj:rj;return{pages:z(T.pages,P,q),pageParams:z(T.pageParams,b,q)}};if(i&&a.length){const T=i==="backward",b=T?tN:pg,m={pages:a,pageParams:s},v=b(n,m);o=await h(m,v,T)}else{const T=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:pg(n,o);if(u>0&&b==null)break;o=await h(o,b),u++}while(u<T)}return o};t.options.persister?t.fetchFn=()=>{var R,w;return(w=(R=t.options).persister)==null?void 0:w.call(R,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function pg(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 tN(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 a6(e,t){return t?pg(e,t)!=null:!1}function s6(e,t){return!t||!e.getPreviousPageParam?!1:tN(e,t)!=null}var Ka,ea,Xa,jr,ta,xt,Bo,ra,Pr,rN,Ln,kO,lj=(kO=class extends eN{constructor(t){super();We(this,Pr);We(this,Ka);We(this,ea);We(this,Xa);We(this,jr);We(this,ta);We(this,xt);We(this,Bo);We(this,ra);je(this,ra,!1),je(this,Bo,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,ta,t.client),je(this,jr,ue(this,ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,ea,KE(this.options)),this.state=t.state??ue(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ka)}get promise(){var t;return(t=ue(this,xt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Bo),...t},t!=null&&t._type&&je(this,Ka,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=KE(this.options);r.data!==void 0&&(this.setState(xE(r.data,r.dataUpdatedAt)),je(this,ea,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,jr).remove(this)}setData(t,r){const n=lg(this.state.data,t,this.options);return rt(this,Pr,Ln).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){rt(this,Pr,Ln).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,xt))==null?void 0:n.promise;return(i=ue(this,xt))==null||i.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,ea)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===f_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ui(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:!xO(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,xt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,xt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,jr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ue(this,xt)&&(ue(this,ra)||rt(this,Pr,rN).call(this)?ue(this,xt).cancel({revert:!0}):ue(this,xt).cancelRetry()),this.scheduleGc()),ue(this,jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Pr,Ln).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,p,f,_,R,w,O,h,T;if(this.state.fetchStatus!=="idle"&&((l=ue(this,xt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,xt))return ue(this,xt).continueRetry(),ue(this,xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(m=>m.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const b=XO(this.options,r),v=(()=>{const A={client:ue(this,ta),queryKey:this.queryKey,meta:this.meta};return i(A),A})();return je(this,ra,!1),this.options.persister?this.options.persister(b,v,this):b(v)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(b),b})(),u=ue(this,Ka)==="infinite"?cj(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),je(this,Xa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&rt(this,Pr,Ln).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,xt,ZO({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof fg&&b.revert&&this.setState({...ue(this,Xa),fetchStatus:"idle"}),n.abort()},onFail:(b,m)=>{rt(this,Pr,Ln).call(this,{type:"failed",failureCount:b,error:m})},onPause:()=>{rt(this,Pr,Ln).call(this,{type:"pause"})},onContinue:()=>{rt(this,Pr,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,xt).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(f=(p=ue(this,jr).config).onSuccess)==null||f.call(p,b,this),(R=(_=ue(this,jr).config).onSettled)==null||R.call(_,b,this.state.error,this),b}catch(b){if(b instanceof fg){if(b.silent)return ue(this,xt).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw rt(this,Pr,Ln).call(this,{type:"error",error:b}),(O=(w=ue(this,jr).config).onError)==null||O.call(w,b,this),(T=(h=ue(this,jr).config).onSettled)==null||T.call(h,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ka=new WeakMap,ea=new WeakMap,Xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,xt=new WeakMap,Bo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,rN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ln=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,...nN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...xE(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,Xa,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Zt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ue(this,jr).notify({query:this,type:"updated",action:t})})},kO);function nN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:QO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function KE(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 Tr,st,ko,pr,na,Ja,Bn,ni,Uo,Qa,Za,ia,aa,ii,es,_t,Qs,mg,hg,yg,gg,_g,Eg,vg,iN,UO,dj=(UO=class extends Vo{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,ko);We(this,pr);We(this,na);We(this,Ja);We(this,Bn);We(this,ni);We(this,Uo);We(this,Qa);We(this,Za);We(this,ia);We(this,aa);We(this,ii);We(this,es,new Set);this.options=r,je(this,Tr,t),je(this,ni,null),je(this,Bn,dg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,st).addObserver(this),XE(ue(this,st),this.options)?rt(this,_t,Qs).call(this):this.updateResult(),rt(this,_t,gg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bg(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bg(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,_g).call(this),rt(this,_t,Eg).call(this),ue(this,st).removeObserver(this)}setOptions(t){const r=this.options,n=ue(this,st);if(this.options=ue(this,Tr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,ue(this,st))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,_t,vg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!ug(this.options,r)&&ue(this,Tr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,st),observer:this});const i=this.hasListeners();i&&JE(ue(this,st),n,this.options,r)&&rt(this,_t,Qs).call(this),this.updateResult(),i&&(ue(this,st)!==n||Cr(this.options.enabled,ue(this,st))!==Cr(r.enabled,ue(this,st))||ui(this.options.staleTime,ue(this,st))!==ui(r.staleTime,ue(this,st)))&&rt(this,_t,mg).call(this);const a=rt(this,_t,hg).call(this);i&&(ue(this,st)!==n||Cr(this.options.enabled,ue(this,st))!==Cr(r.enabled,ue(this,st))||a!==ue(this,ii))&&rt(this,_t,yg).call(this,a)}getOptimisticResult(t){const r=ue(this,Tr).getQueryCache().build(ue(this,Tr),t),n=this.createResult(r,t);return pj(this,n)&&(je(this,pr,n),je(this,Ja,this.options),je(this,na,ue(this,st).state)),n}getCurrentResult(){return ue(this,pr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&ue(this,Bn).status==="pending"&&ue(this,Bn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,es).add(t)}getCurrentQuery(){return ue(this,st)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ue(this,Tr).defaultQueryOptions(t),n=ue(this,Tr).getQueryCache().build(ue(this,Tr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return rt(this,_t,Qs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,pr)))}createResult(t,r){var q;const n=ue(this,st),i=this.options,a=ue(this,pr),s=ue(this,na),o=ue(this,Ja),l=t!==n?t.state:ue(this,ko),{state:c}=t;let d={...c},p=!1,f;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&XE(t,r),W=z&&JE(t,n,r,i);(Y||W)&&(d={...d,...nN(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:_,errorUpdatedAt:R,status:w}=d;f=d.data;let O=!1;if(r.placeholderData!==void 0&&f===void 0&&w==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,O=!0):z=typeof r.placeholderData=="function"?r.placeholderData((q=ue(this,Za))==null?void 0:q.state.data,ue(this,Za)):r.placeholderData,z!==void 0&&(w="success",f=lg(a==null?void 0:a.data,z,r),p=!0)}if(r.select&&f!==void 0&&!O)if(a&&f===(s==null?void 0:s.data)&&r.select===ue(this,Uo))f=ue(this,Qa);else try{je(this,Uo,r.select),f=r.select(f),f=lg(a==null?void 0:a.data,f,r),je(this,Qa,f),je(this,ni,null)}catch(z){je(this,ni,z)}ue(this,ni)&&(_=ue(this,ni),f=ue(this,Qa),R=Date.now(),w="error");const h=d.fetchStatus==="fetching",T=w==="pending",b=w==="error",m=T&&h,v=f!==void 0,P={status:w,fetchStatus:d.fetchStatus,isPending:T,isSuccess:w==="success",isError:b,isInitialLoading:m,isLoading:m,data:f,dataUpdatedAt:d.dataUpdatedAt,error:_,errorUpdatedAt:R,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:h,isRefetching:h&&!T,isLoadingError:b&&!v,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&v,isStale:p_(t,r),refetch:this.refetch,promise:ue(this,Bn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,Y=P.status==="error"&&!z,W=ce=>{Y?ce.reject(P.error):z&&ce.resolve(P.data)},U=()=>{const ce=je(this,Bn,P.promise=dg());W(ce)},F=ue(this,Bn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(Y||P.data!==F.value)&&U();break;case"rejected":(!Y||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=ue(this,pr),r=this.createResult(ue(this,st),this.options);if(je(this,na,ue(this,st).state),je(this,Ja,this.options),ue(this,na).data!==void 0&&je(this,Za,ue(this,st)),ug(r,t))return;je(this,pr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,es).size)return!0;const s=new Set(a??ue(this,es));return this.options.throwOnError&&s.add("error"),Object.keys(ue(this,pr)).some(o=>{const u=o;return ue(this,pr)[u]!==t[u]&&s.has(u)})};rt(this,_t,iN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,gg).call(this)}},Tr=new WeakMap,st=new WeakMap,ko=new WeakMap,pr=new WeakMap,na=new WeakMap,Ja=new WeakMap,Bn=new WeakMap,ni=new WeakMap,Uo=new WeakMap,Qa=new WeakMap,Za=new WeakMap,ia=new WeakMap,aa=new WeakMap,ii=new WeakMap,es=new WeakMap,_t=new WeakSet,Qs=function(t){rt(this,_t,vg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},mg=function(){rt(this,_t,_g).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Co.isServer()||ue(this,pr).isStale||!og(t))return;const n=xO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},hg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},yg=function(t){rt(this,_t,Eg).call(this),je(this,ii,t),!(Co.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!og(ue(this,ii))||ue(this,ii)===0)&&je(this,aa,Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||l_.isFocused())&&rt(this,_t,Qs).call(this)},ue(this,ii)))},gg=function(){rt(this,_t,mg).call(this),rt(this,_t,yg).call(this,rt(this,_t,hg).call(this))},_g=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},Eg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},vg=function(){const t=ue(this,Tr).getQueryCache().build(ue(this,Tr),this.options);if(t===ue(this,st))return;const r=ue(this,st);je(this,st,t),je(this,ko,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},iN=function(t){Zt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ue(this,pr))}),ue(this,Tr).getQueryCache().notify({query:ue(this,st),type:"observerResultsUpdated"})})},UO);function fj(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function XE(e,t){return fj(e,t)||e.state.data!==void 0&&bg(e,t,t.refetchOnMount)}function bg(e,t,r){if(Cr(t.enabled,e)!==!1&&ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&p_(e,t)}return!1}function JE(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&p_(e,r)}function p_(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function pj(e,t){return!ug(e.getCurrentResult(),t)}var Fo,hn,ur,sa,yn,Jn,FO,mj=(FO=class extends eN{constructor(t){super();We(this,yn);We(this,Fo);We(this,hn);We(this,ur);We(this,sa);je(this,Fo,t.client),this.mutationId=t.mutationId,je(this,ur,t.mutationCache),je(this,hn,[]),this.state=t.state||hj(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,hn).includes(t)||(ue(this,hn).push(t),this.clearGcTimeout(),ue(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,hn,ue(this,hn).filter(r=>r!==t)),this.scheduleGc(),ue(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,hn).length||(this.state.status==="pending"?this.scheduleGc():ue(this,ur).remove(this))}continue(){var t;return((t=ue(this,sa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,p,f,_,R,w,O,h,T,b,m,v,A;const r=()=>{rt(this,yn,Jn).call(this,{type:"continue"})},n={client:ue(this,Fo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,ZO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,q)=>{rt(this,yn,Jn).call(this,{type:"failed",failureCount:P,error:q})},onPause:()=>{rt(this,yn,Jn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,ur).canRun(this)}));const i=this.state.status==="pending",a=!ue(this,sa).canStart();try{if(i)r();else{rt(this,yn,Jn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,ur).config.onMutate&&await ue(this,ur).config.onMutate(t,this,n);const q=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));q!==this.state.context&&rt(this,yn,Jn).call(this,{type:"pending",context:q,variables:t,isPaused:a})}const P=await ue(this,sa).start();return await((l=(u=ue(this,ur).config).onSuccess)==null?void 0:l.call(u,P,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,n)),await((f=(p=ue(this,ur).config).onSettled)==null?void 0:f.call(p,P,null,this.state.variables,this.state.context,this,n)),await((R=(_=this.options).onSettled)==null?void 0:R.call(_,P,null,t,this.state.context,n)),rt(this,yn,Jn).call(this,{type:"success",data:P}),P}catch(P){try{await((O=(w=ue(this,ur).config).onError)==null?void 0:O.call(w,P,t,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((T=(h=this.options).onError)==null?void 0:T.call(h,P,t,this.state.context,n))}catch(q){Promise.reject(q)}try{await((m=(b=ue(this,ur).config).onSettled)==null?void 0:m.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((A=(v=this.options).onSettled)==null?void 0:A.call(v,void 0,P,t,this.state.context,n))}catch(q){Promise.reject(q)}throw rt(this,yn,Jn).call(this,{type:"error",error:P}),P}finally{ue(this,ur).runNext(this)}}},Fo=new WeakMap,hn=new WeakMap,ur=new WeakMap,sa=new WeakMap,yn=new WeakSet,Jn=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),Zt.batch(()=>{ue(this,hn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,ur).notify({mutation:this,type:"updated",action:t})})},FO);function hj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,xr,Ho,HO,yj=(HO=class extends Vo{constructor(t={}){super();We(this,kn);We(this,xr);We(this,Ho);this.config=t,je(this,kn,new Set),je(this,xr,new Map),je(this,Ho,0)}build(t,r,n){const i=new mj({client:t,mutationCache:this,mutationId:++Yu(this,Ho)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,kn).add(t);const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r);n?n.push(t):ue(this,xr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,kn).delete(t)){const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&ue(this,xr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=xu(t);if(typeof r=="string"){const i=(n=ue(this,xr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Zt.batch(()=>{ue(this,kn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,kn).clear(),ue(this,xr).clear()})}getAll(){return Array.from(ue(this,kn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>zE(r,n))}findAll(t={}){return this.getAll().filter(r=>zE(t,r))}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Zt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},kn=new WeakMap,xr=new WeakMap,Ho=new WeakMap,HO);function xu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gn,VO,gj=(VO=class extends Vo{constructor(t={}){super();We(this,gn);this.config=t,je(this,gn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??d_(i,r);let s=this.get(a);return s||(s=new lj({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,gn).has(t.queryHash)||(ue(this,gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,gn).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,gn).get(t)}getAll(){return[...ue(this,gn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>GE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>GE(t,n)):r}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gn=new WeakMap,VO),Bt,ai,si,ts,rs,oi,ns,is,GO,_j=(GO=class{constructor(e={}){We(this,Bt);We(this,ai);We(this,si);We(this,ts);We(this,rs);We(this,oi);We(this,ns);We(this,is);je(this,Bt,e.queryCache||new gj),je(this,ai,e.mutationCache||new yj),je(this,si,e.defaultOptions||{}),je(this,ts,new Map),je(this,rs,new Map),je(this,oi,0)}mount(){Yu(this,oi)._++,ue(this,oi)===1&&(je(this,ns,l_.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onFocus())})),je(this,is,Il.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onOnline())})))}unmount(){var e,t;Yu(this,oi)._--,ue(this,oi)===0&&((e=ue(this,ns))==null||e.call(this),je(this,ns,void 0),(t=ue(this,is))==null||t.call(this),je(this,is,void 0))}isFetching(e){return ue(this,Bt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,ai).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Bt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ue(this,Bt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ue(this,Bt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=ue(this,Bt).get(n.queryHash),a=i==null?void 0:i.state.data,s=ZD(t,a);if(s!==void 0)return ue(this,Bt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Zt.batch(()=>ue(this,Bt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Bt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ue(this,Bt);Zt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ue(this,Bt);return Zt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Zt.batch(()=>ue(this,Bt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Zt.batch(()=>(ue(this,Bt).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=Zt.batch(()=>ue(this,Bt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ue(this,Bt).build(this,t);return r.isStaleByTime(ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Il.isOnline()?ue(this,ai).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Bt)}getMutationCache(){return ue(this,ai)}getDefaultOptions(){return ue(this,si)}setDefaultOptions(e){je(this,si,e)}setQueryDefaults(e,t){ue(this,ts).set(No(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,ts).values()],r={};return t.forEach(n=>{Po(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,rs).set(No(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,rs).values()],r={};return t.forEach(n=>{Po(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,si).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=d_(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===f_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,si).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Bt).clear(),ue(this,ai).clear()}},Bt=new WeakMap,ai=new WeakMap,si=new WeakMap,ts=new WeakMap,rs=new WeakMap,oi=new WeakMap,ns=new WeakMap,is=new WeakMap,GO),aN=Me.createContext(void 0),Ej=e=>{const t=Me.useContext(aN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vj=({client:e,children:t})=>(Me.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),J.jsx(aN.Provider,{value:e,children:t})),sN=Me.createContext(!1),bj=()=>Me.useContext(sN);sN.Provider;function Tj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sj=Me.createContext(Tj()),Ij=()=>Me.useContext(Sj),Rj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?JO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},wj=e=>{Me.useEffect(()=>{e.clearReset()},[e])},Aj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||JO(r,[e.error,n])),Oj=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Nj=(e,t)=>e.isLoading&&e.isFetching&&!t,Pj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,QE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Cj(e,t,r){var f,_,R,w;const n=bj(),i=Ij(),a=Ej(),s=a.defaultQueryOptions(e);(_=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||_.call(f,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,Oj(s),Rj(s,i,o),wj(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Me.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),p=!n&&u;if(Me.useSyncExternalStore(Me.useCallback(O=>{const h=p?c.subscribe(Zt.batchCalls(O)):Sr;return c.updateResult(),h},[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Me.useEffect(()=>{c.setOptions(s)},[s,c]),Pj(s,d))throw QE(s,c,i);if(Aj({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((w=(R=a.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||w.call(R,s,d),s.experimental_prefetchInRender&&!Co.isServer()&&Nj(d,n)){const O=l?QE(s,c,i):o==null?void 0:o.promise;O==null||O.catch(Sr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Ll(e,t){return Cj(e,dj)}const Mj="modulepreload",Dj=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29320583932.commit-82ec046/"+e},ZE={},Gt=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(r.map(l=>{if(l=Dj(l),l in ZE)return;ZE[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":Mj,c||(p.as="script"),p.crossOrigin="",p.href=l,u&&p.setAttribute("nonce",u),document.head.appendChild(p),c)return new Promise((f,_)=>{p.addEventListener("load",f),p.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},oN=Object.prototype.toString;function m_(e){switch(oN.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Fn(e,Error)}}function hs(e,t){return oN.call(e)===`[object ${t}]`}function h_(e){return hs(e,"ErrorEvent")}function ev(e){return hs(e,"DOMError")}function jj(e){return hs(e,"DOMException")}function vn(e){return hs(e,"String")}function y_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function g_(e){return e===null||y_(e)||typeof e!="object"&&typeof e!="function"}function ca(e){return hs(e,"Object")}function $l(e){return typeof Event<"u"&&Fn(e,Event)}function Lj(e){return typeof Element<"u"&&Fn(e,Element)}function $j(e){return hs(e,"RegExp")}function ys(e){return!!(e&&e.then&&typeof e.then=="function")}function qj(e){return ca(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function uN(e){return typeof e=="number"&&e!==e}function Fn(e,t){try{return e instanceof t}catch{return!1}}function cN(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ua(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function tv(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{cN(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Bj(e,t,r=!1){return vn(e)?$j(t)?t.test(e):vn(t)?r?e===t:e.includes(t):!1:!1}function Go(e,t=[],r=!1){return t.some(n=>Bj(e,n,r))}function kj(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!Fn(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=Uj(Tg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Tg(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(Fn(n[i],Error)){rv(s,o);const l=e(t,n[i]),c=u.length;nv(l,i,c,o),u=Tg(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Fn(l,Error)){rv(s,o);const d=e(t,l),p=u.length;nv(d,`errors[${c}]`,p,o),u=Tg(e,t,r,l,i,[d,...u],d,p)}}),u}function rv(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function nv(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function Uj(e,t){return e.map(r=>(r.value&&(r.value=Ua(r.value,t)),r))}function Ku(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&Ku(globalThis)||typeof window=="object"&&Ku(window)||typeof self=="object"&&Ku(self)||typeof Sl=="object"&&Ku(Sl)||(function(){return this})()||{};function __(){return ot}function ql(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Fa=__(),Fj=80;function as(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,s=0;const o=" > ",u=o.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Fj;for(;r&&a++<n&&(l=Hj(r,c),!(l==="html"||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function Hj(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(Fa.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const l=t&&t.length?t.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&vn(i))for(a=i.split(/\s+/),u=0;u<a.length;u++)n.push(`.${a[u]}`);const c=["aria-label","type","name","title","alt"];for(u=0;u<c.length;u++)s=c[u],o=r.getAttribute(s),o&&n.push(`[${s}="${o}"]`);return n.join("")}function Vj(){try{return Fa.document.location.href}catch{return""}}function Gj(e){return Fa.document&&Fa.document.querySelector?Fa.document.querySelector(e):null}function lN(e){if(!Fa.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const gs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zj="Sentry Logger ",Sg=["debug","info","warn","error","log","assert","trace"],Rl={};function zo(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Rl);n.forEach(i=>{const a=Rl[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Wj(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return gs?Sg.forEach(r=>{t[r]=(...n)=>{e&&zo(()=>{ot.console[r](`${zj}[${r}]:`,...n)})}}):Sg.forEach(r=>{t[r]=()=>{}}),t}const Re=Wj(),Yj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xj(e){return e==="http"||e==="https"}function ha(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${s}`}function Kj(e){const t=Yj.exec(e);if(!t){zo(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a,s="",o]=t.slice(1);let u="",l=o;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return dN({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function dN(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xj(e){if(!gs)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Re.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?xj(n)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function fN(e){const t=typeof e=="string"?Kj(e):dN(e);if(!(!t||!Xj(t)))return t}class _n extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function tr(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&pN(i,n),e[t]=i}function la(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{gs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pN(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,la(e,"__sentry_original__",t)}catch{}}function E_(e){return e.__sentry_original__}function Jj(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function mN(e){if(m_(e))return{message:e.message,name:e.name,stack:e.stack,...av(e)};if($l(e)){const t={type:e.type,target:iv(e.target),currentTarget:iv(e.currentTarget),...av(e)};return typeof CustomEvent<"u"&&Fn(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function iv(e){try{return Lj(e)?as(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function av(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Qj(e,t=40){const r=Object.keys(mN(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return Ua(r[0],t);for(let n=r.length;n>0;n--){const i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:Ua(i,t)}return""}function Ht(e){return Ig(e,new Map)}function Ig(e,t){if(Zj(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=Ig(e[i],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(i=>{n.push(Ig(i,t))}),n}return e}function Zj(e){if(!ca(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const hN=50,sv=/\(error: (.*)\)/,ov=/captureMessage|captureException/;function yN(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const i=[],a=r.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CsHvmA0A.js","assets/react-Vu6nbGi5.js","assets/network-dDcJdQOQ.js","assets/index-xW0RoH3-.js","assets/SvgIcon-CjKRGMBC.js","assets/generateUtilityClasses-BGHsAVVg.js","assets/colors-LINLm1ux.js","assets/ethers-JeCAM1sd.js","assets/index-CUMwJIXW.js","assets/index-D_YEolFF.js","assets/index-Htk8eGLE.js","assets/Button-D3AtkSL-.js","assets/CircularProgress-Dwf5ihwF.js","assets/index-CLIR3TTD.js","assets/MenuItem-C83l4cI7.js","assets/AnimatedBackground-Cjl8m9yV.js","assets/AnimatedBackground-CiurwFBv.css","assets/ShopFooterInner-C1NvVNG3.js","assets/TradeService-BoqqCerU.js","assets/index-D8ylAHlw.js","assets/Assets-CH2UvOLD.js","assets/FilterBar-CdU8B66A.js","assets/SkeletonCards-BysJEVmg.js","assets/LoadMore-BOCtgPLI.js","assets/useInfiniteGrid-CcvAkiyB.js","assets/Market-BPnAdEd3.js","assets/mana-rate-BySaIkbs.js","assets/buy-CsLUNZO_.js","assets/buy-gasless-7HSovA0-.js","assets/ItemDetail-vU7MusPD.js","assets/ItemDetail-Casltmsg.css","assets/Collection-BEjVhftZ.js","assets/collection-v-v_Nl8a.js","assets/collection-Ds5shVfK.css","assets/Creator-BOAE6sSq.js","assets/MyAssets-CYCc3Lhx.js","assets/import-DZ2KCb9V.js","assets/wallet-kind-BR9EEO7E.js","assets/MyAssets-BqJHbQOZ.css","assets/MyFavorites-DGSkZP9t.js","assets/MyPurchases-JReebPX3.js","assets/ImportListings-CLIZeHnq.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-iIojIDOE.js","assets/GetCredits-DJQvGn18.js","assets/Success-CK_Vcw04.js","assets/NotFound-CIEXRpoy.js"])))=>i.map(i=>d[i]);
2
+ var BD=Object.defineProperty;var HE=e=>{throw TypeError(e)};var kD=(e,t,r)=>t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>kD(e,typeof t!="symbol"?t+"":t,r),Ed=(e,t,r)=>t.has(e)||HE("Cannot "+r);var ue=(e,t,r)=>(Ed(e,t,"read from private field"),r?r.call(e):t.get(e)),We=(e,t,r)=>t.has(e)?HE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(Ed(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(Ed(e,t,"access private method"),r);var Yu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as Me,j as J,l as zO,g as WO,R as YO,c as sg,L as Oo,a as c_,m as xn,d as UD,n as FD,o as dr,N as HD,p as VD,B as GD}from"./react-Vu6nbGi5.js";import{g as Sl,p as yl,W as zD,m as WD,h as VE,f as YD}from"./ethers-JeCAM1sd.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Vo=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(){}},Qi,ei,Wa,LO,xD=(LO=class extends Vo{constructor(){super();We(this,Qi);We(this,ei);We(this,Wa);je(this,Wa,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){ue(this,ei)||this.setEventListener(ue(this,Wa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ei))==null||t.call(this),je(this,ei,void 0))}setEventListener(t){var r;je(this,Wa,t),(r=ue(this,ei))==null||r.call(this),je(this,ei,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){ue(this,Qi)!==t&&(je(this,Qi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof ue(this,Qi)=="boolean"?ue(this,Qi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qi=new WeakMap,ei=new WeakMap,Wa=new WeakMap,LO),l_=new xD,KD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,u_,$O,XD=($O=class{constructor(){We(this,ti,KD);We(this,u_,!1)}setTimeoutProvider(e){je(this,ti,e)}setTimeout(e,t){return ue(this,ti).setTimeout(e,t)}clearTimeout(e){ue(this,ti).clearTimeout(e)}setInterval(e,t){return ue(this,ti).setInterval(e,t)}clearInterval(e){ue(this,ti).clearInterval(e)}},ti=new WeakMap,u_=new WeakMap,$O),Ji=new XD;function JD(e){setTimeout(e,0)}var QD=typeof window>"u"||"Deno"in globalThis;function Sr(){}function ZD(e,t){return typeof e=="function"?e(t):e}function og(e){return typeof e=="number"&&e>=0&&e!==1/0}function xO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ui(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function GE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==d_(s,t.options))return!1}else if(!Po(t.queryKey,s))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function zE(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(No(t.options.mutationKey)!==No(a))return!1}else if(!Po(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function d_(e,t){return((t==null?void 0:t.queryKeyHashFn)||No)(e)}function No(e){return JSON.stringify(e,(t,r)=>cg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Po(e[r],t[r])):!1}var ej=Object.prototype.hasOwnProperty;function KO(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=WE(e)&&WE(t);if(!n&&!(cg(e)&&cg(t)))return t;const a=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,u=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const d=n?c:s[c],p=e[d],f=t[d];if(p===f){u[d]=p,(n?c<a:ej.call(e,d))&&l++;continue}if(p===null||f===null||typeof p!="object"||typeof f!="object"){u[d]=f;continue}const _=KO(p,f,r+1);u[d]=_,_===p&&l++}return a===o&&l===a?e:u}function ug(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 WE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cg(e){if(!YE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!YE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function YE(e){return Object.prototype.toString.call(e)==="[object Object]"}function tj(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function lg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?KO(e,t):t}function i6(e){return e}function rj(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function nj(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var f_=Symbol();function XO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===f_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function JO(e,t){return typeof e=="function"?e(...t):!!e}function ij(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Co=(()=>{let e=()=>QD;return{isServer(){return e()},setIsServer(t){e=t}}})();function dg(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var aj=JD;function sj(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=aj;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||s()}return u},batchCalls:o=>(...u)=>{a(()=>{o(...u)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Zt=sj(),Ya,ri,xa,qO,oj=(qO=class extends Vo{constructor(){super();We(this,Ya,!0);We(this,ri);We(this,xa);je(this,xa,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(){ue(this,ri)||this.setEventListener(ue(this,xa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ri))==null||t.call(this),je(this,ri,void 0))}setEventListener(t){var r;je(this,xa,t),(r=ue(this,ri))==null||r.call(this),je(this,ri,t(this.setOnline.bind(this)))}setOnline(t){ue(this,Ya)!==t&&(je(this,Ya,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,Ya)}},Ya=new WeakMap,ri=new WeakMap,xa=new WeakMap,qO),Il=new oj;function uj(e){return Math.min(1e3*2**e,3e4)}function QO(e){return(e??"online")==="online"?Il.isOnline():!0}var fg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ZO(e){let t=!1,r=0,n;const i=dg(),a=()=>i.status!=="pending",s=R=>{var w;if(!a()){const O=new fg(R);p(O),(w=e.onCancel)==null||w.call(e,O)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>l_.isFocused()&&(e.networkMode==="always"||Il.isOnline())&&e.canRun(),c=()=>QO(e.networkMode)&&e.canRun(),d=R=>{a()||(n==null||n(),i.resolve(R))},p=R=>{a()||(n==null||n(),i.reject(R))},f=()=>new Promise(R=>{var w;n=O=>{(a()||l())&&R(O)},(w=e.onPause)==null||w.call(e)}).then(()=>{var R;n=void 0,a()||(R=e.onContinue)==null||R.call(e)}),_=()=>{if(a())return;let R;const w=r===0?e.initialPromise:void 0;try{R=w??e.fn()}catch(O){R=Promise.reject(O)}Promise.resolve(R).then(d).catch(O=>{var v;if(a())return;const h=e.retry??(Co.isServer()?0:3),T=e.retryDelay??uj,b=typeof T=="function"?T(r,O):T,m=h===!0||typeof h=="number"&&r<h||typeof h=="function"&&h(r,O);if(t||!m){p(O);return}r++,(v=e.onFail)==null||v.call(e,r,O),tj(b).then(()=>l()?void 0:f()).then(()=>{t?p(O):_()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?_():f().then(_),i)}}var Zi,BO,eN=(BO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),og(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Co.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Zi)!==void 0&&(Ji.clearTimeout(ue(this,Zi)),je(this,Zi,void 0))}},Zi=new WeakMap,BO);function cj(e){return{onFetch:(t,r)=>{var c,d,p,f,_;const n=t.options,i=(p=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((f=t.state.data)==null?void 0:f.pages)||[],s=((_=t.state.data)==null?void 0:_.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let R=!1;const w=T=>{ij(T,()=>t.signal,()=>R=!0)},O=XO(t.options,t.fetchOptions),h=async(T,b,m)=>{if(R)return Promise.reject(t.signal.reason);if(b==null&&T.pages.length)return Promise.resolve(T);const A=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:m?"backward":"forward",meta:t.options.meta};return w(Y),Y})(),P=await O(A),{maxPages:q}=t.options,z=m?nj:rj;return{pages:z(T.pages,P,q),pageParams:z(T.pageParams,b,q)}};if(i&&a.length){const T=i==="backward",b=T?tN:pg,m={pages:a,pageParams:s},v=b(n,m);o=await h(m,v,T)}else{const T=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:pg(n,o);if(u>0&&b==null)break;o=await h(o,b),u++}while(u<T)}return o};t.options.persister?t.fetchFn=()=>{var R,w;return(w=(R=t.options).persister)==null?void 0:w.call(R,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function pg(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 tN(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 a6(e,t){return t?pg(e,t)!=null:!1}function s6(e,t){return!t||!e.getPreviousPageParam?!1:tN(e,t)!=null}var Ka,ea,Xa,jr,ta,xt,Bo,ra,Pr,rN,Ln,kO,lj=(kO=class extends eN{constructor(t){super();We(this,Pr);We(this,Ka);We(this,ea);We(this,Xa);We(this,jr);We(this,ta);We(this,xt);We(this,Bo);We(this,ra);je(this,ra,!1),je(this,Bo,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,ta,t.client),je(this,jr,ue(this,ta).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,ea,KE(this.options)),this.state=t.state??ue(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ka)}get promise(){var t;return(t=ue(this,xt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Bo),...t},t!=null&&t._type&&je(this,Ka,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=KE(this.options);r.data!==void 0&&(this.setState(xE(r.data,r.dataUpdatedAt)),je(this,ea,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,jr).remove(this)}setData(t,r){const n=lg(this.state.data,t,this.options);return rt(this,Pr,Ln).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t){rt(this,Pr,Ln).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,xt))==null?void 0:n.promise;return(i=ue(this,xt))==null||i.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,ea)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===f_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ui(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:!xO(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,xt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,xt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,jr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(ue(this,xt)&&(ue(this,ra)||rt(this,Pr,rN).call(this)?ue(this,xt).cancel({revert:!0}):ue(this,xt).cancelRetry()),this.scheduleGc()),ue(this,jr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Pr,Ln).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,p,f,_,R,w,O,h,T;if(this.state.fetchStatus!=="idle"&&((l=ue(this,xt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,xt))return ue(this,xt).continueRetry(),ue(this,xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(m=>m.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const b=XO(this.options,r),v=(()=>{const A={client:ue(this,ta),queryKey:this.queryKey,meta:this.meta};return i(A),A})();return je(this,ra,!1),this.options.persister?this.options.persister(b,v,this):b(v)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(b),b})(),u=ue(this,Ka)==="infinite"?cj(this.options.pages):this.options.behavior;u==null||u.onFetch(o,this),je(this,Xa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&rt(this,Pr,Ln).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,xt,ZO({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof fg&&b.revert&&this.setState({...ue(this,Xa),fetchStatus:"idle"}),n.abort()},onFail:(b,m)=>{rt(this,Pr,Ln).call(this,{type:"failed",failureCount:b,error:m})},onPause:()=>{rt(this,Pr,Ln).call(this,{type:"pause"})},onContinue:()=>{rt(this,Pr,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,xt).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(f=(p=ue(this,jr).config).onSuccess)==null||f.call(p,b,this),(R=(_=ue(this,jr).config).onSettled)==null||R.call(_,b,this.state.error,this),b}catch(b){if(b instanceof fg){if(b.silent)return ue(this,xt).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw rt(this,Pr,Ln).call(this,{type:"error",error:b}),(O=(w=ue(this,jr).config).onError)==null||O.call(w,b,this),(T=(h=ue(this,jr).config).onSettled)==null||T.call(h,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ka=new WeakMap,ea=new WeakMap,Xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,xt=new WeakMap,Bo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,rN=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ln=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,...nN(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...xE(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,Xa,t.manual?i:void 0),i;case"error":const a=t.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Zt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),ue(this,jr).notify({query:this,type:"updated",action:t})})},kO);function nN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:QO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function KE(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 Tr,st,ko,pr,na,Ja,Bn,ni,Uo,Qa,Za,ia,aa,ii,es,_t,Qs,mg,hg,yg,gg,_g,Eg,vg,iN,UO,dj=(UO=class extends Vo{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,ko);We(this,pr);We(this,na);We(this,Ja);We(this,Bn);We(this,ni);We(this,Uo);We(this,Qa);We(this,Za);We(this,ia);We(this,aa);We(this,ii);We(this,es,new Set);this.options=r,je(this,Tr,t),je(this,ni,null),je(this,Bn,dg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,st).addObserver(this),XE(ue(this,st),this.options)?rt(this,_t,Qs).call(this):this.updateResult(),rt(this,_t,gg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bg(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bg(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,_g).call(this),rt(this,_t,Eg).call(this),ue(this,st).removeObserver(this)}setOptions(t){const r=this.options,n=ue(this,st);if(this.options=ue(this,Tr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,ue(this,st))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,_t,vg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!ug(this.options,r)&&ue(this,Tr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,st),observer:this});const i=this.hasListeners();i&&JE(ue(this,st),n,this.options,r)&&rt(this,_t,Qs).call(this),this.updateResult(),i&&(ue(this,st)!==n||Cr(this.options.enabled,ue(this,st))!==Cr(r.enabled,ue(this,st))||ui(this.options.staleTime,ue(this,st))!==ui(r.staleTime,ue(this,st)))&&rt(this,_t,mg).call(this);const a=rt(this,_t,hg).call(this);i&&(ue(this,st)!==n||Cr(this.options.enabled,ue(this,st))!==Cr(r.enabled,ue(this,st))||a!==ue(this,ii))&&rt(this,_t,yg).call(this,a)}getOptimisticResult(t){const r=ue(this,Tr).getQueryCache().build(ue(this,Tr),t),n=this.createResult(r,t);return pj(this,n)&&(je(this,pr,n),je(this,Ja,this.options),je(this,na,ue(this,st).state)),n}getCurrentResult(){return ue(this,pr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&ue(this,Bn).status==="pending"&&ue(this,Bn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,es).add(t)}getCurrentQuery(){return ue(this,st)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=ue(this,Tr).defaultQueryOptions(t),n=ue(this,Tr).getQueryCache().build(ue(this,Tr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return rt(this,_t,Qs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,pr)))}createResult(t,r){var q;const n=ue(this,st),i=this.options,a=ue(this,pr),s=ue(this,na),o=ue(this,Ja),l=t!==n?t.state:ue(this,ko),{state:c}=t;let d={...c},p=!1,f;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&XE(t,r),W=z&&JE(t,n,r,i);(Y||W)&&(d={...d,...nN(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:_,errorUpdatedAt:R,status:w}=d;f=d.data;let O=!1;if(r.placeholderData!==void 0&&f===void 0&&w==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,O=!0):z=typeof r.placeholderData=="function"?r.placeholderData((q=ue(this,Za))==null?void 0:q.state.data,ue(this,Za)):r.placeholderData,z!==void 0&&(w="success",f=lg(a==null?void 0:a.data,z,r),p=!0)}if(r.select&&f!==void 0&&!O)if(a&&f===(s==null?void 0:s.data)&&r.select===ue(this,Uo))f=ue(this,Qa);else try{je(this,Uo,r.select),f=r.select(f),f=lg(a==null?void 0:a.data,f,r),je(this,Qa,f),je(this,ni,null)}catch(z){je(this,ni,z)}ue(this,ni)&&(_=ue(this,ni),f=ue(this,Qa),R=Date.now(),w="error");const h=d.fetchStatus==="fetching",T=w==="pending",b=w==="error",m=T&&h,v=f!==void 0,P={status:w,fetchStatus:d.fetchStatus,isPending:T,isSuccess:w==="success",isError:b,isInitialLoading:m,isLoading:m,data:f,dataUpdatedAt:d.dataUpdatedAt,error:_,errorUpdatedAt:R,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:h,isRefetching:h&&!T,isLoadingError:b&&!v,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:b&&v,isStale:p_(t,r),refetch:this.refetch,promise:ue(this,Bn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,Y=P.status==="error"&&!z,W=ce=>{Y?ce.reject(P.error):z&&ce.resolve(P.data)},U=()=>{const ce=je(this,Bn,P.promise=dg());W(ce)},F=ue(this,Bn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(Y||P.data!==F.value)&&U();break;case"rejected":(!Y||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=ue(this,pr),r=this.createResult(ue(this,st),this.options);if(je(this,na,ue(this,st).state),je(this,Ja,this.options),ue(this,na).data!==void 0&&je(this,Za,ue(this,st)),ug(r,t))return;je(this,pr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,es).size)return!0;const s=new Set(a??ue(this,es));return this.options.throwOnError&&s.add("error"),Object.keys(ue(this,pr)).some(o=>{const u=o;return ue(this,pr)[u]!==t[u]&&s.has(u)})};rt(this,_t,iN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,gg).call(this)}},Tr=new WeakMap,st=new WeakMap,ko=new WeakMap,pr=new WeakMap,na=new WeakMap,Ja=new WeakMap,Bn=new WeakMap,ni=new WeakMap,Uo=new WeakMap,Qa=new WeakMap,Za=new WeakMap,ia=new WeakMap,aa=new WeakMap,ii=new WeakMap,es=new WeakMap,_t=new WeakSet,Qs=function(t){rt(this,_t,vg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},mg=function(){rt(this,_t,_g).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Co.isServer()||ue(this,pr).isStale||!og(t))return;const n=xO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},hg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},yg=function(t){rt(this,_t,Eg).call(this),je(this,ii,t),!(Co.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!og(ue(this,ii))||ue(this,ii)===0)&&je(this,aa,Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||l_.isFocused())&&rt(this,_t,Qs).call(this)},ue(this,ii)))},gg=function(){rt(this,_t,mg).call(this),rt(this,_t,yg).call(this,rt(this,_t,hg).call(this))},_g=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},Eg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},vg=function(){const t=ue(this,Tr).getQueryCache().build(ue(this,Tr),this.options);if(t===ue(this,st))return;const r=ue(this,st);je(this,st,t),je(this,ko,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},iN=function(t){Zt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(ue(this,pr))}),ue(this,Tr).getQueryCache().notify({query:ue(this,st),type:"observerResultsUpdated"})})},UO);function fj(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function XE(e,t){return fj(e,t)||e.state.data!==void 0&&bg(e,t,t.refetchOnMount)}function bg(e,t,r){if(Cr(t.enabled,e)!==!1&&ui(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&p_(e,t)}return!1}function JE(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&p_(e,r)}function p_(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function pj(e,t){return!ug(e.getCurrentResult(),t)}var Fo,hn,ur,sa,yn,Jn,FO,mj=(FO=class extends eN{constructor(t){super();We(this,yn);We(this,Fo);We(this,hn);We(this,ur);We(this,sa);je(this,Fo,t.client),this.mutationId=t.mutationId,je(this,ur,t.mutationCache),je(this,hn,[]),this.state=t.state||hj(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,hn).includes(t)||(ue(this,hn).push(t),this.clearGcTimeout(),ue(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,hn,ue(this,hn).filter(r=>r!==t)),this.scheduleGc(),ue(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,hn).length||(this.state.status==="pending"?this.scheduleGc():ue(this,ur).remove(this))}continue(){var t;return((t=ue(this,sa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,o,u,l,c,d,p,f,_,R,w,O,h,T,b,m,v,A;const r=()=>{rt(this,yn,Jn).call(this,{type:"continue"})},n={client:ue(this,Fo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,ZO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,q)=>{rt(this,yn,Jn).call(this,{type:"failed",failureCount:P,error:q})},onPause:()=>{rt(this,yn,Jn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,ur).canRun(this)}));const i=this.state.status==="pending",a=!ue(this,sa).canStart();try{if(i)r();else{rt(this,yn,Jn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,ur).config.onMutate&&await ue(this,ur).config.onMutate(t,this,n);const q=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));q!==this.state.context&&rt(this,yn,Jn).call(this,{type:"pending",context:q,variables:t,isPaused:a})}const P=await ue(this,sa).start();return await((l=(u=ue(this,ur).config).onSuccess)==null?void 0:l.call(u,P,t,this.state.context,this,n)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,n)),await((f=(p=ue(this,ur).config).onSettled)==null?void 0:f.call(p,P,null,this.state.variables,this.state.context,this,n)),await((R=(_=this.options).onSettled)==null?void 0:R.call(_,P,null,t,this.state.context,n)),rt(this,yn,Jn).call(this,{type:"success",data:P}),P}catch(P){try{await((O=(w=ue(this,ur).config).onError)==null?void 0:O.call(w,P,t,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((T=(h=this.options).onError)==null?void 0:T.call(h,P,t,this.state.context,n))}catch(q){Promise.reject(q)}try{await((m=(b=ue(this,ur).config).onSettled)==null?void 0:m.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((A=(v=this.options).onSettled)==null?void 0:A.call(v,void 0,P,t,this.state.context,n))}catch(q){Promise.reject(q)}throw rt(this,yn,Jn).call(this,{type:"error",error:P}),P}finally{ue(this,ur).runNext(this)}}},Fo=new WeakMap,hn=new WeakMap,ur=new WeakMap,sa=new WeakMap,yn=new WeakSet,Jn=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),Zt.batch(()=>{ue(this,hn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,ur).notify({mutation:this,type:"updated",action:t})})},FO);function hj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,xr,Ho,HO,yj=(HO=class extends Vo{constructor(t={}){super();We(this,kn);We(this,xr);We(this,Ho);this.config=t,je(this,kn,new Set),je(this,xr,new Map),je(this,Ho,0)}build(t,r,n){const i=new mj({client:t,mutationCache:this,mutationId:++Yu(this,Ho)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,kn).add(t);const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r);n?n.push(t):ue(this,xr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,kn).delete(t)){const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&ue(this,xr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=xu(t);if(typeof r=="string"){const n=ue(this,xr).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=xu(t);if(typeof r=="string"){const i=(n=ue(this,xr).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Zt.batch(()=>{ue(this,kn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,kn).clear(),ue(this,xr).clear()})}getAll(){return Array.from(ue(this,kn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>zE(r,n))}findAll(t={}){return this.getAll().filter(r=>zE(t,r))}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Zt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},kn=new WeakMap,xr=new WeakMap,Ho=new WeakMap,HO);function xu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gn,VO,gj=(VO=class extends Vo{constructor(t={}){super();We(this,gn);this.config=t,je(this,gn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??d_(i,r);let s=this.get(a);return s||(s=new lj({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,gn).has(t.queryHash)||(ue(this,gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,gn).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,gn).get(t)}getAll(){return[...ue(this,gn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>GE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>GE(t,n)):r}notify(t){Zt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gn=new WeakMap,VO),Bt,ai,si,ts,rs,oi,ns,is,GO,_j=(GO=class{constructor(e={}){We(this,Bt);We(this,ai);We(this,si);We(this,ts);We(this,rs);We(this,oi);We(this,ns);We(this,is);je(this,Bt,e.queryCache||new gj),je(this,ai,e.mutationCache||new yj),je(this,si,e.defaultOptions||{}),je(this,ts,new Map),je(this,rs,new Map),je(this,oi,0)}mount(){Yu(this,oi)._++,ue(this,oi)===1&&(je(this,ns,l_.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onFocus())})),je(this,is,Il.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onOnline())})))}unmount(){var e,t;Yu(this,oi)._--,ue(this,oi)===0&&((e=ue(this,ns))==null||e.call(this),je(this,ns,void 0),(t=ue(this,is))==null||t.call(this),je(this,is,void 0))}isFetching(e){return ue(this,Bt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,ai).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Bt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=ue(this,Bt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ui(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return ue(this,Bt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=ue(this,Bt).get(n.queryHash),a=i==null?void 0:i.state.data,s=ZD(t,a);if(s!==void 0)return ue(this,Bt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Zt.batch(()=>ue(this,Bt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=ue(this,Bt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=ue(this,Bt);Zt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=ue(this,Bt);return Zt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Zt.batch(()=>ue(this,Bt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Zt.batch(()=>(ue(this,Bt).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=Zt.batch(()=>ue(this,Bt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=ue(this,Bt).build(this,t);return r.isStaleByTime(ui(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Il.isOnline()?ue(this,ai).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Bt)}getMutationCache(){return ue(this,ai)}getDefaultOptions(){return ue(this,si)}setDefaultOptions(e){je(this,si,e)}setQueryDefaults(e,t){ue(this,ts).set(No(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,ts).values()],r={};return t.forEach(n=>{Po(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,rs).set(No(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,rs).values()],r={};return t.forEach(n=>{Po(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,si).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=d_(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===f_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,si).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Bt).clear(),ue(this,ai).clear()}},Bt=new WeakMap,ai=new WeakMap,si=new WeakMap,ts=new WeakMap,rs=new WeakMap,oi=new WeakMap,ns=new WeakMap,is=new WeakMap,GO),aN=Me.createContext(void 0),Ej=e=>{const t=Me.useContext(aN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vj=({client:e,children:t})=>(Me.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),J.jsx(aN.Provider,{value:e,children:t})),sN=Me.createContext(!1),bj=()=>Me.useContext(sN);sN.Provider;function Tj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sj=Me.createContext(Tj()),Ij=()=>Me.useContext(Sj),Rj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?JO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},wj=e=>{Me.useEffect(()=>{e.clearReset()},[e])},Aj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||JO(r,[e.error,n])),Oj=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Nj=(e,t)=>e.isLoading&&e.isFetching&&!t,Pj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,QE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Cj(e,t,r){var f,_,R,w;const n=bj(),i=Ij(),a=Ej(),s=a.defaultQueryOptions(e);(_=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||_.call(f,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,Oj(s),Rj(s,i,o),wj(i);const l=!a.getQueryCache().get(s.queryHash),[c]=Me.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),p=!n&&u;if(Me.useSyncExternalStore(Me.useCallback(O=>{const h=p?c.subscribe(Zt.batchCalls(O)):Sr;return c.updateResult(),h},[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Me.useEffect(()=>{c.setOptions(s)},[s,c]),Pj(s,d))throw QE(s,c,i);if(Aj({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((w=(R=a.getDefaultOptions().queries)==null?void 0:R._experimental_afterQuery)==null||w.call(R,s,d),s.experimental_prefetchInRender&&!Co.isServer()&&Nj(d,n)){const O=l?QE(s,c,i):o==null?void 0:o.promise;O==null||O.catch(Sr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Ll(e,t){return Cj(e,dj)}const Mj="modulepreload",Dj=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29330702360.commit-0d089c2/"+e},ZE={},Gt=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(l){return Promise.all(l.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),u=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=s(r.map(l=>{if(l=Dj(l),l in ZE)return;ZE[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":Mj,c||(p.as="script"),p.crossOrigin="",p.href=l,u&&p.setAttribute("nonce",u),document.head.appendChild(p),c)return new Promise((f,_)=>{p.addEventListener("load",f),p.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},oN=Object.prototype.toString;function m_(e){switch(oN.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Fn(e,Error)}}function hs(e,t){return oN.call(e)===`[object ${t}]`}function h_(e){return hs(e,"ErrorEvent")}function ev(e){return hs(e,"DOMError")}function jj(e){return hs(e,"DOMException")}function vn(e){return hs(e,"String")}function y_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function g_(e){return e===null||y_(e)||typeof e!="object"&&typeof e!="function"}function ca(e){return hs(e,"Object")}function $l(e){return typeof Event<"u"&&Fn(e,Event)}function Lj(e){return typeof Element<"u"&&Fn(e,Element)}function $j(e){return hs(e,"RegExp")}function ys(e){return!!(e&&e.then&&typeof e.then=="function")}function qj(e){return ca(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function uN(e){return typeof e=="number"&&e!==e}function Fn(e,t){try{return e instanceof t}catch{return!1}}function cN(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ua(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function tv(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{cN(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Bj(e,t,r=!1){return vn(e)?$j(t)?t.test(e):vn(t)?r?e===t:e.includes(t):!1:!1}function Go(e,t=[],r=!1){return t.some(n=>Bj(e,n,r))}function kj(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!Fn(s.originalException,Error))return;const o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=Uj(Tg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Tg(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(Fn(n[i],Error)){rv(s,o);const l=e(t,n[i]),c=u.length;nv(l,i,c,o),u=Tg(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Fn(l,Error)){rv(s,o);const d=e(t,l),p=u.length;nv(d,`errors[${c}]`,p,o),u=Tg(e,t,r,l,i,[d,...u],d,p)}}),u}function rv(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function nv(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function Uj(e,t){return e.map(r=>(r.value&&(r.value=Ua(r.value,t)),r))}function Ku(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&Ku(globalThis)||typeof window=="object"&&Ku(window)||typeof self=="object"&&Ku(self)||typeof Sl=="object"&&Ku(Sl)||(function(){return this})()||{};function __(){return ot}function ql(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Fa=__(),Fj=80;function as(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,i=[];let a=0,s=0;const o=" > ",u=o.length;let l;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Fj;for(;r&&a++<n&&(l=Hj(r,c),!(l==="html"||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(o)}catch{return"<unknown>"}}function Hj(e,t){const r=e,n=[];let i,a,s,o,u;if(!r||!r.tagName)return"";if(Fa.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const l=t&&t.length?t.filter(d=>r.getAttribute(d)).map(d=>[d,r.getAttribute(d)]):null;if(l&&l.length)l.forEach(d=>{n.push(`[${d[0]}="${d[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),i=r.className,i&&vn(i))for(a=i.split(/\s+/),u=0;u<a.length;u++)n.push(`.${a[u]}`);const c=["aria-label","type","name","title","alt"];for(u=0;u<c.length;u++)s=c[u],o=r.getAttribute(s),o&&n.push(`[${s}="${o}"]`);return n.join("")}function Vj(){try{return Fa.document.location.href}catch{return""}}function Gj(e){return Fa.document&&Fa.document.querySelector?Fa.document.querySelector(e):null}function lN(e){if(!Fa.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const gs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,zj="Sentry Logger ",Sg=["debug","info","warn","error","log","assert","trace"],Rl={};function zo(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Rl);n.forEach(i=>{const a=Rl[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Wj(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return gs?Sg.forEach(r=>{t[r]=(...n)=>{e&&zo(()=>{ot.console[r](`${zj}[${r}]:`,...n)})}}):Sg.forEach(r=>{t[r]=()=>{}}),t}const Re=Wj(),Yj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function xj(e){return e==="http"||e==="https"}function ha(e,t=!1){const{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:u}=e;return`${o}://${u}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n&&`${n}/`}${s}`}function Kj(e){const t=Yj.exec(e);if(!t){zo(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,i="",a,s="",o]=t.slice(1);let u="",l=o;const c=l.split("/");if(c.length>1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return dN({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function dN(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Xj(e){if(!gs)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(Re.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?xj(n)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function fN(e){const t=typeof e=="string"?Kj(e):dN(e);if(!(!t||!Xj(t)))return t}class _n extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function tr(e,t,r){if(!(t in e))return;const n=e[t],i=r(n);typeof i=="function"&&pN(i,n),e[t]=i}function la(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{gs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pN(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,la(e,"__sentry_original__",t)}catch{}}function E_(e){return e.__sentry_original__}function Jj(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function mN(e){if(m_(e))return{message:e.message,name:e.name,stack:e.stack,...av(e)};if($l(e)){const t={type:e.type,target:iv(e.target),currentTarget:iv(e.currentTarget),...av(e)};return typeof CustomEvent<"u"&&Fn(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function iv(e){try{return Lj(e)?as(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function av(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Qj(e,t=40){const r=Object.keys(mN(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return Ua(r[0],t);for(let n=r.length;n>0;n--){const i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:Ua(i,t)}return""}function Ht(e){return Ig(e,new Map)}function Ig(e,t){if(Zj(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const i of Object.keys(e))typeof e[i]<"u"&&(n[i]=Ig(e[i],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(i=>{n.push(Ig(i,t))}),n}return e}function Zj(e){if(!ca(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const hN=50,sv=/\(error: (.*)\)/,ov=/captureMessage|captureException/;function yN(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const i=[],a=r.split(`
3
3
  `);for(let s=n;s<a.length;s++){const o=a[s];if(o.length>1024)continue;const u=sv.test(o)?o.replace(sv,"$1"):o;if(!u.match(/\S*Error: /)){for(const l of t){const c=l(u);if(c){i.push(c);break}}if(i.length>=hN)break}}return tL(i)}}function eL(e){return Array.isArray(e)?yN(...e):e}function tL(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),ov.test(t[t.length-1].function||"")&&(t.pop(),ov.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,hN).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const vd="<anonymous>";function Hn(e){try{return!e||typeof e!="function"?vd:e.name||vd}catch{return vd}}const gl={},uv={};function ya(e,t){gl[e]=gl[e]||[],gl[e].push(t)}function ga(e,t){uv[e]||(t(),uv[e]=!0)}function Xr(e,t){const r=e&&gl[e];if(r)for(const n of r)try{n(t)}catch(i){gs&&Re.error(`Error while triggering instrumentation handler.
4
4
  Type: ${e}
5
5
  Name: ${Hn(n)}
@@ -31,7 +31,7 @@ Error:`,i)}}function iB(){return Hq(e=>{Ss("cls",{metric:e}),lP=e},{reportAllCha
31
31
  *
32
32
  * This source code is licensed under the MIT license found in the
33
33
  * LICENSE file in the root directory of this source tree.
34
- */var Yv;function nU(){if(Yv)return gt;Yv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,R=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function T(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case t:switch(m=m.type,m){case u:case l:case n:case a:case i:case d:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case _:case f:case s:return m;default:return v}}case r:return v}}}function b(m){return T(m)===l}return gt.AsyncMode=u,gt.ConcurrentMode=l,gt.ContextConsumer=o,gt.ContextProvider=s,gt.Element=t,gt.ForwardRef=c,gt.Fragment=n,gt.Lazy=_,gt.Memo=f,gt.Portal=r,gt.Profiler=a,gt.StrictMode=i,gt.Suspense=d,gt.isAsyncMode=function(m){return b(m)||T(m)===u},gt.isConcurrentMode=b,gt.isContextConsumer=function(m){return T(m)===o},gt.isContextProvider=function(m){return T(m)===s},gt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},gt.isForwardRef=function(m){return T(m)===c},gt.isFragment=function(m){return T(m)===n},gt.isLazy=function(m){return T(m)===_},gt.isMemo=function(m){return T(m)===f},gt.isPortal=function(m){return T(m)===r},gt.isProfiler=function(m){return T(m)===a},gt.isStrictMode=function(m){return T(m)===i},gt.isSuspense=function(m){return T(m)===d},gt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===l||m===a||m===i||m===d||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===_||m.$$typeof===f||m.$$typeof===s||m.$$typeof===o||m.$$typeof===c||m.$$typeof===w||m.$$typeof===O||m.$$typeof===h||m.$$typeof===R)},gt.typeOf=T,gt}var xv;function iU(){return xv||(xv=1,Ad.exports=nU()),Ad.exports}var Od,Kv;function aU(){if(Kv)return Od;Kv=1;var e=iU(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function s(_){return e.isMemo(_)?i:a[_.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;function f(_,R,w){if(typeof R!="string"){if(p){var O=d(R);O&&O!==p&&f(_,O,w)}var h=u(R);l&&(h=h.concat(l(R)));for(var T=s(_),b=s(R),m=0;m<h.length;++m){var v=h[m];if(!r[v]&&!(w&&w[v])&&!(b&&b[v])&&!(T&&T[v])){var A=c(R,v);try{o(_,v,A)}catch{}}}}return _}return Od=f,Od}aU();const sU=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function oU(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Xv={componentStack:null,error:null,eventId:null};function uU(e,t){const r=new WeakMap;function n(i,a){if(!r.has(i)){if(i.cause)return r.set(i,!0),n(i.cause,a);i.cause=a}}n(e,t)}class Cl extends Me.Component{constructor(t){super(t),Cl.prototype.__init.call(this),this.state=Xv,this._openFallbackReportDialog=!0;const r=gr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&Wv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;CN(o=>{if(oU(Me.version)&&m_(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,uU(t,l)}n&&n(o,t,r);const u=R_(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&Wv({...s,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&i(t,r,n)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(Xv)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let i;return typeof t=="function"?i=t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):i=t,Me.isValidElement(i)?i:(t&&sU&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const cU=Me.lazy(()=>Gt(()=>import("./index-CR9XZgAH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.Navbar})));function lU(e){return J.jsx(Me.Suspense,{fallback:J.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:J.jsx(cU,{...e})})}const dU={},Jv=e=>{let t;const r=new Set,n=(c,d)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const f=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(_=>_(t,f))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(dU?"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()}},l=t=e(n,i,u);return u},fU=e=>e?Jv(e):Jv;var Nd={exports:{}},Pd={},Cd={exports:{}},Md={};/**
34
+ */var Yv;function nU(){if(Yv)return gt;Yv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,R=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function T(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case t:switch(m=m.type,m){case u:case l:case n:case a:case i:case d:return m;default:switch(m=m&&m.$$typeof,m){case o:case c:case _:case f:case s:return m;default:return v}}case r:return v}}}function b(m){return T(m)===l}return gt.AsyncMode=u,gt.ConcurrentMode=l,gt.ContextConsumer=o,gt.ContextProvider=s,gt.Element=t,gt.ForwardRef=c,gt.Fragment=n,gt.Lazy=_,gt.Memo=f,gt.Portal=r,gt.Profiler=a,gt.StrictMode=i,gt.Suspense=d,gt.isAsyncMode=function(m){return b(m)||T(m)===u},gt.isConcurrentMode=b,gt.isContextConsumer=function(m){return T(m)===o},gt.isContextProvider=function(m){return T(m)===s},gt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},gt.isForwardRef=function(m){return T(m)===c},gt.isFragment=function(m){return T(m)===n},gt.isLazy=function(m){return T(m)===_},gt.isMemo=function(m){return T(m)===f},gt.isPortal=function(m){return T(m)===r},gt.isProfiler=function(m){return T(m)===a},gt.isStrictMode=function(m){return T(m)===i},gt.isSuspense=function(m){return T(m)===d},gt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===l||m===a||m===i||m===d||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===_||m.$$typeof===f||m.$$typeof===s||m.$$typeof===o||m.$$typeof===c||m.$$typeof===w||m.$$typeof===O||m.$$typeof===h||m.$$typeof===R)},gt.typeOf=T,gt}var xv;function iU(){return xv||(xv=1,Ad.exports=nU()),Ad.exports}var Od,Kv;function aU(){if(Kv)return Od;Kv=1;var e=iU(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=n,a[e.Memo]=i;function s(_){return e.isMemo(_)?i:a[_.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;function f(_,R,w){if(typeof R!="string"){if(p){var O=d(R);O&&O!==p&&f(_,O,w)}var h=u(R);l&&(h=h.concat(l(R)));for(var T=s(_),b=s(R),m=0;m<h.length;++m){var v=h[m];if(!r[v]&&!(w&&w[v])&&!(b&&b[v])&&!(T&&T[v])){var A=c(R,v);try{o(_,v,A)}catch{}}}}return _}return Od=f,Od}aU();const sU=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function oU(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Xv={componentStack:null,error:null,eventId:null};function uU(e,t){const r=new WeakMap;function n(i,a){if(!r.has(i)){if(i.cause)return r.set(i,!0),n(i.cause,a);i.cause=a}}n(e,t)}class Cl extends Me.Component{constructor(t){super(t),Cl.prototype.__init.call(this),this.state=Xv,this._openFallbackReportDialog=!0;const r=gr();r&&r.on&&t.showDialog&&(this._openFallbackReportDialog=!1,r.on("afterSendEvent",n=>{!n.type&&n.event_id===this._lastEventId&&Wv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;CN(o=>{if(oU(Me.version)&&m_(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,uU(t,l)}n&&n(o,t,r);const u=R_(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&Wv({...s,eventId:u})),this.setState({error:t,componentStack:r,eventId:u})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:i}=this.props;i&&i(t,r,n)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:i}=this.state;t&&t(r,n,i),this.setState(Xv)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let i;return typeof t=="function"?i=t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):i=t,Me.isValidElement(i)?i:(t&&sU&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const cU=Me.lazy(()=>Gt(()=>import("./index-CsHvmA0A.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.Navbar})));function lU(e){return J.jsx(Me.Suspense,{fallback:J.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:J.jsx(cU,{...e})})}const dU={},Jv=e=>{let t;const r=new Set,n=(c,d)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const f=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(_=>_(t,f))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(dU?"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()}},l=t=e(n,i,u);return u},fU=e=>e?Jv(e):Jv;var Nd={exports:{}},Pd={},Cd={exports:{}},Md={};/**
35
35
  * @license React
36
36
  * use-sync-external-store-shim.production.js
37
37
  *
@@ -71,7 +71,7 @@ Error:`,i)}}function iB(){return Hq(e=>{Ss("cls",{metric:e}),lP=e},{reportAllCha
71
71
  Ephemeral address: ${X}
72
72
  Expiration: ${x.toISOString()}`}e.Authenticator={validateSignature:p,isValidAuthChain:f,createEIP1271MessageHash:_,createSimpleAuthChain:R,createAuthChain:w,initializeAuthChain:O,signPayload:h,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:T,ownerAddress:b,getEphemeralMessage:m};const v=async(X,x)=>({nextAuthority:x.payload});e.SIGNER_VALIDATOR=v;const A=async(X,x)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const L=(0,o.recoverAddressFromEthSignature)(x.signature,x.payload),D=X.toLocaleLowerCase(),$=L.toLocaleLowerCase();if(D===$)return{nextAuthority:x.payload};throw new Error(`Invalid signer address. Expected: ${D}. Actual: ${$}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=A;const P=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:V}=F(x.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(V>N){const j=(0,o.recoverAddressFromEthSignature)(x.signature,D),Z=X.toLocaleLowerCase(),Ee=j.toLocaleLowerCase();if(Z===Ee)return{nextAuthority:$};throw new Error(`Invalid signer address. Expected: ${Z}. Actual: ${Ee}`)}throw new Error(`Ephemeral key expired. Expiration: ${V}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=P;const q=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:V}=F(x.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(V>N&&await se(L==null?void 0:L.provider,X,D,x.signature,N))return{nextAuthority:$};throw new Error(`Ephemeral key expired. Expiration: ${V}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=q;const z=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!L)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await se(L.provider,X,x.payload,x.signature,L.dateToValidateExpirationInMillis))return{nextAuthority:x.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=z;const Y=async(X,x)=>({error:"Error Validator."});function W(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function U(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function F(X){const x=X.replace(/\r/g,""),L=x.split(`
73
73
  `),D="Ephemeral address: ",$="Expiration: ";if(L.length<3||!L[1].startsWith(D)||!L[2].startsWith($))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${D}" on line 2 and "${$}" on line 3.`);const V=L[1].substring(D.length),N=L[2].substring($.length),j=Date.parse(N);if(Number.isNaN(j))throw new Error(`Invalid expiration date in ephemeral payload: "${N}"`);return{message:x,ephemeralAddress:V,expiration:j}}e.parseEmphemeralPayload=F;async function ce(X,x,L,D){const $=_(x),V=(0,a.hexToBytes)(L);let N;try{N=(0,a.bytesToHex)(await X.isValidSignature($,V,D))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const j=(0,o.createEthereumMessageHash)(x);try{N=(0,a.bytesToHex)(await X.isValidSignature(j,V,D))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function se(X,x,L,D,$){if(!X)throw new Error("Missing provider");const V=new a.default(X),N=await(0,s.SignatureValidator)(V,x);let j=await ce(N,L,D);if(j)return!0;const Z=new u.default(V);try{const{block:Ee}=await Z.getDate($,!1);if(j=await ce(N,L,D,Ee),j)return!0}catch(Ee){const _e=Ee instanceof Error?Ee.message:String(Ee);throw new Error(`Invalid validation. Error: ${_e}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${j}`)}function ne(X){switch(X){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return Y}}})(Hr)),Hr}var Mn={},Hw;function HG(){return Hw||(Hw=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.AUTH_METADATA_HEADER=Mn.AUTH_TIMESTAMP_HEADER=Mn.AUTH_CHAIN_HEADER_PREFIX=void 0,Mn.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",Mn.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",Mn.AUTH_METADATA_HEADER="x-identity-metadata"),Mn}var Vw;function VG(){return Vw||(Vw=1,(function(e){var t=Ci&&Ci.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=Ci&&Ci.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(XC(),e),r(HG(),e),r(KC(),e)})(Ci)),Ci}var GG=VG(),xi={},Wr={},sl={exports:{}},ol={exports:{}},Gw;function uE(){return Gw||(Gw=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})(ol,ol.exports)),ol.exports}var ul={exports:{}},zw;function zG(){return zw||(zw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function n(i,a){for(var s=0;s<a.length;s++){var o=a[s];if(i===o||r(o)&&o.test(i))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(ul,ul.exports)),ul.exports}var cl={exports:{}},Ww;function WG(){return Ww||(Ww=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(i,a){return i.indexOf(a)!==-1};t.default=r,e.exports=t.default,e.exports.default=t.default})(cl,cl.exports)),cl.exports}var ll={exports:{}},dl={exports:{}},Yw;function JC(){return Yw||(Yw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function r(i){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},r(i)}function n(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;(r(i)!=="object"||i===null)&&(i={});for(var s in a)typeof i[s]>"u"&&(i[s]=a[s]);return i}e.exports=t.default,e.exports.default=t.default})(dl,dl.exports)),dl.exports}var xw;function YG(){return xw||(xw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(uE()),n=i(JC());function i(o){return o&&o.__esModule?o:{default:o}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function s(o,u){(0,r.default)(o),u=(0,n.default)(u,a),u.allow_trailing_dot&&o[o.length-1]==="."&&(o=o.substring(0,o.length-1)),u.allow_wildcard===!0&&o.indexOf("*.")===0&&(o=o.substring(2));var l=o.split("."),c=l[l.length-1];return u.require_tld&&(l.length<2||!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(c)||/\s/.test(c))||!u.allow_numeric_tld&&/^\d+$/.test(c)?!1:l.every(function(d){return!(d.length>63&&!u.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(d)||/[\uff01-\uff5e]/.test(d)||/^-|-$/.test(d)||!u.allow_underscores&&/_/.test(d))})}e.exports=t.default,e.exports.default=t.default})(ll,ll.exports)),ll.exports}var fl={exports:{}},Kw;function xG(){return Kw||(Kw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(uE());function n(d){return d&&d.__esModule?d:{default:d}}function i(d){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},i(d)}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",s="(".concat(a,"[.]){3}").concat(a),o=new RegExp("^".concat(s,"$")),u="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(s,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(s,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(s,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(s,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(s,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(s,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(s,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function c(d){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var f=(i(p)==="object"?p.version:arguments[1])||"";return f?f.toString()==="4"?o.test(d):f.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(fl,fl.exports)),fl.exports}var Xw;function KG(){return Xw||(Xw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=O;var r=u(uE()),n=u(zG()),i=u(WG()),a=u(YG()),s=u(xG()),o=u(JC());function u(h){return h&&h.__esModule?h:{default:h}}function l(h,T){return _(h)||f(h,T)||d(h,T)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(h,T){if(h){if(typeof h=="string")return p(h,T);var b={}.toString.call(h).slice(8,-1);return b==="Object"&&h.constructor&&(b=h.constructor.name),b==="Map"||b==="Set"?Array.from(h):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?p(h,T):void 0}}function p(h,T){(T==null||T>h.length)&&(T=h.length);for(var b=0,m=Array(T);b<T;b++)m[b]=h[b];return m}function f(h,T){var b=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(b!=null){var m,v,A,P,q=[],z=!0,Y=!1;try{if(A=(b=b.call(h)).next,T!==0)for(;!(z=(m=A.call(b)).done)&&(q.push(m.value),q.length!==T);z=!0);}catch(W){Y=!0,v=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw v}}return q}}function _(h){if(Array.isArray(h))return h}var R={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},w=/^\[([^\]]+)\](?::([0-9]+))?$/;function O(h,T){if((0,r.default)(h),!h||/[\s<>]/.test(h)||h.indexOf("mailto:")===0||(T=(0,o.default)(T,R),T.validate_length&&h.length>T.max_allowed_length)||!T.allow_fragments&&(0,i.default)(h,"#")||!T.allow_query_components&&((0,i.default)(h,"?")||(0,i.default)(h,"&")))return!1;var b,m,v,A,P,q,z,Y;z=h.split("#"),h=z.shift(),z=h.split("?"),h=z.shift();var W=h.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),T.require_valid_protocol&&T.protocols.indexOf(b)===-1?!1:h.substring(W[0].length)};if(W){var ce=W[1],se=h.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(h=F(ce),h===!1)return!1}else{var X=se.indexOf("/"),x=X===-1?se:se.substring(0,X),L=x.indexOf("@");if(L!==-1){var D=x.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,V=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(V&&!N){if(T.require_protocol)return!1}else if(h=F(ce),h===!1)return!1}else{var j=/^[0-9]/.test(se);if(j){if(T.require_protocol)return!1}else if(h=F(ce),h===!1)return!1}}}else if(T.require_protocol)return!1;if(h.slice(0,2)==="//"){if(!U&&!T.allow_protocol_relative_urls)return!1;h=h.slice(2)}if(h==="")return!1;if(z=h.split("/"),h=z.shift(),h===""&&!T.require_host)return!0;if(z=h.split("@"),z.length>1){if(T.disallow_auth||z[0]===""||(m=z.shift(),m.indexOf(":")>=0&&m.split(":").length>2))return!1;var Z=m.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}A=z.join("@"),q=null,Y=null;var Ie=A.match(w);if(Ie?(v="",Y=Ie[1],q=Ie[2]||null):(z=A.split(":"),v=z.shift(),z.length&&(q=z.join(":"))),q!==null&&q.length>0){if(P=parseInt(q,10),!/^[0-9]+$/.test(q)||P<=0||P>65535)return!1}else if(T.require_port)return!1;return T.host_whitelist?(0,n.default)(v,T.host_whitelist):v===""&&!T.require_host?!0:!(!(0,s.default)(v)&&!(0,a.default)(v,T)&&(!Y||!(0,s.default)(Y,6))||(v=v||Y,T.host_blacklist&&(0,n.default)(v,T.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(sl,sl.exports)),sl.exports}var ry={},Jw;function QC(){return Jw||(Jw=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(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=r;function n(o){const u=localStorage.getItem(s(o));if(!u)return null;let l;try{l=JSON.parse(u)}catch{return a(o),null}return l.expiration=new Date(l.expiration),l.expiration.getTime()<=Date.now()?(a(o),null):l}e.localStorageGetIdentity=n;function i(o,u){new Date(u.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(u))}e.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}e.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(ry)),ry}var Qw;function XG(){if(Qw)return Wr;Qw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.clearIdentity=Wr.storeIdentity=Wr.getIdentity=Wr.init=void 0;const e=KG(),t=QC(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(w,O={}){if(!(0,e.default)(w,{...o,...O}))throw new Error(`Invalid url: ${w}`);if(s)throw new Error("Already initialized");const h=document.createElement("iframe");h.id=r,h.src=w,h.style.width="0",h.style.height="0",h.style.border="none",h.style.position="absolute",document.body.appendChild(h),s=w}Wr.init=u;async function l(w){let O;try{O=(await f(await p(),t.Action.GET,{user:w})).identity??null}catch(h){R(h),O=(0,t.localStorageGetIdentity)(w)}return O}Wr.getIdentity=l;async function c(w,O){try{await f(await p(),t.Action.STORE,{user:w,identity:O})}catch(h){R(h),(0,t.localStorageStoreIdentity)(w,O)}}Wr.storeIdentity=c;async function d(w){try{await f(await p(),t.Action.CLEAR,{user:w})}catch(O){R(O),(0,t.localStorageClearIdentity)(w)}}Wr.clearIdentity=d;async function p(){if(!s)throw new Error("Not initialized");for(let w=0;w<i;w++){const O=document.getElementById(r),h=O==null?void 0:O.contentWindow;if(!h){await _(n);continue}try{await f(h,t.Action.PING,{},n)}catch{continue}return h}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function f(w,O,h,T=0){a++;const b=a;let m=null;const v=new Promise((A,P)=>{m=({data:q})=>{!q||q.target!==t.SINGLE_SIGN_ON_TARGET||q.id!==b||(q.error?P(new Error(q.error)):A(q))},window.addEventListener("message",m)});w.postMessage((0,t.createMessage)({id:b,action:O,...h}),s);try{return await(T?Promise.race([v,new Promise((A,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),T))]):v)}catch(A){throw A}finally{m&&window.removeEventListener("message",m)}}function _(w){return new Promise(O=>setTimeout(O,w))}function R(w){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",w.message)}return Wr}var Zw;function JG(){return Zw||(Zw=1,(function(e){var t=xi&&xi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=xi&&xi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(XG(),e),r(QC(),e)})(xi)),xi}var zg=JG();function QG(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?bn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?bn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?bn.DEVELOPMENT:null}function ZG(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(eM(n))return n}return null}var eA={},bn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(bn||(bn={}));function ZC(){return Object.values(bn)}function eM(e){return ZC().includes(e)}function pl(e){if(eM(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${ZC().map(t=>`"${t}"`).join(", ")}.`)}function e3(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=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&&i&&t!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?pl(t):r?pl(r):n?pl(n):i?pl(i):bn.PRODUCTION}function t3(e){if(typeof window<"u"){const r=ZG(window.location);if(r)return r;const n=QG(window.location);if(n)return n}return e3(typeof e>"u"&&typeof yl=="object"&&typeof eA=="object"?eA:e)}function r3(e,t){const r=t3(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}const n3="development",i3="80002",a3="https://marketplace-api.decentraland.zone",s3="https://marketplace-api.decentraland.zone",o3="/auth",u3="https://rpc.decentraland.org/amoy",c3="https://credits.decentraland.zone",l3="https://builder-api.decentraland.zone",d3="https://peer.decentraland.zone",f3="",p3="",m3="",h3="",y3={ENVIRONMENT:n3,CHAIN_ID:i3,MARKETPLACE_SERVER_URL:a3,NFT_API_URL:s3,AUTH_URL:o3,RPC_URL:u3,CREDITS_SERVER_URL:c3,BUILDER_SERVER_URL:l3,PEER_URL:d3,SHOP_SERVER_URL:f3,STRIPE_PUBLISHABLE_KEY:p3,SEGMENT_WRITE_KEY:m3,SENTRY_DSN:h3},g3="staging",_3="80002",E3="https://marketplace-api.decentraland.zone",v3="https://marketplace-api.decentraland.zone",b3="/auth",T3="https://rpc.decentraland.org/amoy",S3="https://credits.decentraland.zone",I3="https://builder-api.decentraland.zone",R3="https://peer.decentraland.zone",w3="",A3="",O3="",N3="",P3={ENVIRONMENT:g3,CHAIN_ID:_3,MARKETPLACE_SERVER_URL:E3,NFT_API_URL:v3,AUTH_URL:b3,RPC_URL:T3,CREDITS_SERVER_URL:S3,BUILDER_SERVER_URL:I3,PEER_URL:R3,SHOP_SERVER_URL:w3,STRIPE_PUBLISHABLE_KEY:A3,SEGMENT_WRITE_KEY:O3,SENTRY_DSN:N3},C3="production",M3="137",D3="https://marketplace-api.decentraland.org",j3="https://marketplace-api.decentraland.org",L3="/auth",$3="https://rpc.decentraland.org/polygon",q3="https://credits.decentraland.org",B3="https://builder-api.decentraland.org",k3="https://peer.decentraland.org",U3="",F3="",H3="",V3="",G3={ENVIRONMENT:C3,CHAIN_ID:M3,MARKETPLACE_SERVER_URL:D3,NFT_API_URL:j3,AUTH_URL:L3,RPC_URL:$3,CREDITS_SERVER_URL:q3,BUILDER_SERVER_URL:B3,PEER_URL:k3,SHOP_SERVER_URL:U3,STRIPE_PUBLISHABLE_KEY:F3,SEGMENT_WRITE_KEY:H3,SENTRY_DSN:V3},z3={},Nr=r3({[bn.DEVELOPMENT]:y3,[bn.STAGING]:P3,[bn.PRODUCTION]:G3},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),or=z3,Nt={marketplaceServerUrl:or.VITE_MARKETPLACE_SERVER_URL??Nr.get("MARKETPLACE_SERVER_URL"),nftApiUrl:or.VITE_NFT_API_URL??Nr.get("NFT_API_URL"),chainId:Number(or.VITE_CHAIN_ID??Nr.get("CHAIN_ID")),authUrl:or.VITE_AUTH_URL??Nr.get("AUTH_URL"),rpcUrl:or.VITE_RPC_URL??Nr.get("RPC_URL"),creditsServerUrl:or.VITE_CREDITS_SERVER_URL??Nr.get("CREDITS_SERVER_URL"),builderServerUrl:or.VITE_BUILDER_SERVER_URL??Nr.get("BUILDER_SERVER_URL"),peerUrl:or.VITE_PEER_URL??Nr.get("PEER_URL"),shopServerUrl:or.VITE_SHOP_SERVER_URL??Nr.get("SHOP_SERVER_URL"),stripePublishableKey:or.VITE_STRIPE_PK??Nr.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:or.VITE_SEGMENT_WRITE_KEY??Nr.get("SEGMENT_WRITE_KEY"),sentryDsn:or.VITE_SENTRY_DSN??Nr.get("SENTRY_DSN"),sentryEnvironment:or.VITE_SENTRY_ENVIRONMENT??(Number(or.VITE_CHAIN_ID??Nr.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:or.VITE_SENTRY_RELEASE??`shop@${or.VITE_APP_VERSION??"0.0.0-dev"}`},W3=744*60;async function tM(){return(await Gt(async()=>{const{connection:e}=await import("./index-B0Ao9kYR.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([8,1]))).connection}async function Y3(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new zD(e.provider),n=r.getSigner();let i=zg.localStorageGetIdentity(t);if(!i){const a=WD.createRandom();i=await GG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:VE(a.publicKey),privateKey:VE(a.privateKey)},W3,s=>n.signMessage(s)),zg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function x3(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Nt.authUrl}/login?redirectTo=${e}`)}async function K3(){try{const t=await(await tM()).tryPreviousConnection();return!t.account||!zg.localStorageGetIdentity(t.account.toLowerCase())?null:await Y3(t)}catch{return null}}async function X3(){try{await(await tM()).disconnect()}catch{}}const J3=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,Q3=Nt.chainId===80002?"amoy":"polygon",Z3=Nt.chainId===80002?"dev":"prod";function cE(){return window.analytics}function e4(){let e=null;try{e=Rs.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:J3,network:Q3,app_env:Z3}}function ci(e,t={}){const r={...e4(),...t},n=cE();n&&n.track(e,r)}function t4(e,t={}){const r=cE();r&&r.identify(e.toLowerCase(),t)}function r4(){const e=cE();e!=null&&e.reset&&e.reset()}function n4(e){ci("Shop Viewed Page",{page:e})}function tA(e){return e===Jr.ProviderType.MAGIC||e===Jr.ProviderType.MAGIC_TEST?"magic":"wallet"}function i4(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function qo(e){return Math.round(e*10)/100}function lE(e){return!e.tokenId}function l6(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:qo(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:lE(e)}}function d6(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(lE);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:qo(n.priceCredits)})),value_credits:t,value_usd:qo(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function a4(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 f6(e){return a4(e)==="user_rejected"}function s4(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=>(...i)=>(r.push([n,...i]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const i=document.createElement("script");i.async=!0,i.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(i)},t.analytics=r,r.load(e),r.page()}let rA=!1;function o4(){if(rA)return;rA=!0;const e=Nt.segmentWriteKey;e&&s4(e)}let Wg=null;function u4(e){Wg=e}function nA(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Wg)try{Wg(e,t)}catch{}}const c4=/0x[a-fA-F0-9]{130}\b/g,l4=/0x[a-fA-F0-9]{64}\b/g,d4=/(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,f4=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Xs(e){return e.replace(c4,"<signature>").replace(d4,"<secret>").replace(l4,"<hex32>")}function p4(e){var r;e.message&&(e.message=Xs(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Xs(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Xs(n.message));e.request&&(e.request.url&&(e.request.url=Xs(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(f4.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Xs(n[i]))}};return t(e.tags),t(e.extra),e}let iA=!1;function m4(){if(iA)return;const e=Nt.sentryDsn;if(!e)return;iA=!0,rU({dsn:e,environment:Nt.sentryEnvironment,release:Nt.sentryRelease,integrations:[new VB],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:p4});const t=h4();t&&f$({id:t}),u4((r,n)=>R_(r,{extra:n}))}function h4(){var e;try{return((e=Rs.getState().session)==null?void 0:e.address)??null}catch{return null}}const aA="shop-favorites";let vl=null;const rM=e=>e?`${aA}:${e.toLowerCase()}`:aA;function sA(e){var t;try{const r=localStorage.getItem(rM(e));if(!r)return{};const n=JSON.parse(r);if(!n||typeof n!="object")return{};const i="state"in n&&((t=n.state)!=null&&t.items)?n.state.items:n;return i&&typeof i=="object"?i:{}}catch{return{}}}function oA(e){try{localStorage.setItem(rM(vl),JSON.stringify(e))}catch{}}const Dl=Is(e=>({items:sA(vl),toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,oA(n),{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],oA(n),{items:n}}),reloadFor:t=>{vl=t?t.toLowerCase():null,e({items:sA(vl)})}})),uA="shop:followed-creators:v1",y4=200;let dE=null;const nM=e=>e?`${uA}:${e.toLowerCase()}`:uA;function cA(){try{const e=localStorage.getItem(nM(dE));if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function lA(e){try{localStorage.setItem(nM(dE),JSON.stringify(e))}catch{}}const Yg=Is((e,t)=>({followed:cA(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const i=[n,...t().followed].slice(0,y4);lA(i),e({followed:i}),ci("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const i=t().followed.filter(a=>a!==n);lA(i),e({followed:i}),ci("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r),reloadFor:r=>{dE=r?r.toLowerCase():null,e({followed:cA()})}})),ny="shop:signing_in",Rs=Is(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(ny,"1")}catch{}x3()},disconnect:async()=>{ci("Shop Signed Out");try{await X3()}catch(t){nA(t,{flow:"wallet",step:"disconnect"})}r4(),Dl.getState().reloadFor(null),Yg.getState().reloadFor(null),e({session:null})},restore:async()=>{let t;try{t=await K3()}catch(n){nA(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),Dl.getState().reloadFor(t.address),Yg.getState().reloadFor(t.address),t4(t.address,{sign_in_method:tA(t.providerType)});let r=!1;try{r=sessionStorage.getItem(ny)==="1",r&&sessionStorage.removeItem(ny)}catch{}r&&ci("Shop Signed In",{method:tA(t.providerType),is_new_user:i4(t.address)})}})),g4=Nt.peerUrl;function fE(e){return Ll({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${g4}/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]}})}var Dn={},iy={},dA;function iM(){return dA||(dA=1,Object.defineProperty(iy,"__esModule",{value:!0})),iy}var jn={},pn={},La={},Ki={},fA={},Js,pA;function an(){if(pA)return Js;pA=1;var e=function(t){return t&&t.Math===Math&&t};return Js=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof sg=="object"&&sg)||e(typeof Js=="object"&&Js)||(function(){return this})()||Function("return this")(),Js}var ay,mA;function Ra(){return mA||(mA=1,ay=function(e){try{return!!e()}catch{return!0}}),ay}var sy,hA;function sd(){if(hA)return sy;hA=1;var e=Ra();return sy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),sy}var oy,yA;function _4(){if(yA)return oy;yA=1;var e=sd(),t=Function.prototype,r=t.apply,n=t.call;return oy=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),oy}var uy,gA;function ws(){if(gA)return uy;gA=1;var e=sd(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return uy=e?n:function(i){return function(){return r.apply(i,arguments)}},uy}var cy,_A;function aM(){if(_A)return cy;_A=1;var e=ws(),t=e({}.toString),r=e("".slice);return cy=function(n){return r(t(n),8,-1)},cy}var ly,EA;function sM(){if(EA)return ly;EA=1;var e=aM(),t=ws();return ly=function(r){if(e(r)==="Function")return t(r)},ly}var dy,vA;function wa(){if(vA)return dy;vA=1;var e=typeof document=="object"&&document.all;return dy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},dy}var fy={},py,bA;function nu(){if(bA)return py;bA=1;var e=Ra();return py=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),py}var my,TA;function pE(){if(TA)return my;TA=1;var e=sd(),t=Function.prototype.call;return my=e?t.bind(t):function(){return t.apply(t,arguments)},my}var hy={},SA;function E4(){if(SA)return hy;SA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return hy.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,hy}var yy,IA;function oM(){return IA||(IA=1,yy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),yy}var gy,RA;function v4(){if(RA)return gy;RA=1;var e=ws(),t=Ra(),r=aM(),n=Object,i=e("".split);return gy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,gy}var _y,wA;function uM(){return wA||(wA=1,_y=function(e){return e==null}),_y}var Ey,AA;function cM(){if(AA)return Ey;AA=1;var e=uM(),t=TypeError;return Ey=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Ey}var vy,OA;function b4(){if(OA)return vy;OA=1;var e=v4(),t=cM();return vy=function(r){return e(t(r))},vy}var by,NA;function od(){if(NA)return by;NA=1;var e=wa();return by=function(t){return typeof t=="object"?t!==null:e(t)},by}var Ty,PA;function lM(){return PA||(PA=1,Ty={}),Ty}var Sy,CA;function T4(){if(CA)return Sy;CA=1;var e=lM(),t=an(),r=wa(),n=function(i){return r(i)?i:void 0};return Sy=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Sy}var Iy,MA;function S4(){if(MA)return Iy;MA=1;var e=ws();return Iy=e({}.isPrototypeOf),Iy}var Ry,DA;function I4(){if(DA)return Ry;DA=1;var e=an(),t=e.navigator,r=t&&t.userAgent;return Ry=r?String(r):"",Ry}var wy,jA;function R4(){if(jA)return wy;jA=1;var e=an(),t=I4(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),wy=o,wy}var Ay,LA;function dM(){if(LA)return Ay;LA=1;var e=R4(),t=Ra(),r=an(),n=r.String;return Ay=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ay}var Oy,$A;function fM(){if($A)return Oy;$A=1;var e=dM();return Oy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Oy}var Ny,qA;function pM(){if(qA)return Ny;qA=1;var e=T4(),t=wa(),r=S4(),n=fM(),i=Object;return Ny=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Ny}var Py,BA;function w4(){if(BA)return Py;BA=1;var e=String;return Py=function(t){try{return e(t)}catch{return"Object"}},Py}var Cy,kA;function mM(){if(kA)return Cy;kA=1;var e=wa(),t=w4(),r=TypeError;return Cy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Cy}var My,UA;function A4(){if(UA)return My;UA=1;var e=mM(),t=uM();return My=function(r,n){var i=r[n];return t(i)?void 0:e(i)},My}var Dy,FA;function O4(){if(FA)return Dy;FA=1;var e=pE(),t=wa(),r=od(),n=TypeError;return Dy=function(i,a){var s,o;if(a==="string"&&t(s=i.toString)&&!r(o=e(s,i))||t(s=i.valueOf)&&!r(o=e(s,i))||a!=="string"&&t(s=i.toString)&&!r(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},Dy}var jy={exports:{}},Ly,HA;function N4(){return HA||(HA=1,Ly=!0),Ly}var $y,VA;function P4(){if(VA)return $y;VA=1;var e=an(),t=Object.defineProperty;return $y=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},$y}var GA;function C4(){if(GA)return jy.exports;GA=1;var e=N4(),t=an(),r=P4(),n="__core-js_shared__",i=jy.exports=t[n]||r(n,{});return(i.versions||(i.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"}),jy.exports}var qy,zA;function M4(){if(zA)return qy;zA=1;var e=C4();return qy=function(t,r){return e[t]||(e[t]=r||{})},qy}var By,WA;function D4(){if(WA)return By;WA=1;var e=cM(),t=Object;return By=function(r){return t(e(r))},By}var ky,YA;function mE(){if(YA)return ky;YA=1;var e=ws(),t=D4(),r=e({}.hasOwnProperty);return ky=Object.hasOwn||function(i,a){return r(t(i),a)},ky}var Uy,xA;function j4(){if(xA)return Uy;xA=1;var e=ws(),t=0,r=Math.random(),n=e(1.1.toString);return Uy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Uy}var Fy,KA;function L4(){if(KA)return Fy;KA=1;var e=an(),t=M4(),r=mE(),n=j4(),i=dM(),a=fM(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return Fy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Fy}var Hy,XA;function $4(){if(XA)return Hy;XA=1;var e=pE(),t=od(),r=pM(),n=A4(),i=O4(),a=L4(),s=TypeError,o=a("toPrimitive");return Hy=function(u,l){if(!t(u)||r(u))return u;var c=n(u,o),d;if(c){if(l===void 0&&(l="default"),d=e(c,u,l),!t(d)||r(d))return d;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},Hy}var Vy,JA;function hM(){if(JA)return Vy;JA=1;var e=$4(),t=pM();return Vy=function(r){var n=e(r,"string");return t(n)?n:n+""},Vy}var Gy,QA;function q4(){if(QA)return Gy;QA=1;var e=an(),t=od(),r=e.document,n=t(r)&&t(r.createElement);return Gy=function(i){return n?r.createElement(i):{}},Gy}var zy,ZA;function yM(){if(ZA)return zy;ZA=1;var e=nu(),t=Ra(),r=q4();return zy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),zy}var eO;function B4(){if(eO)return fy;eO=1;var e=nu(),t=pE(),r=E4(),n=oM(),i=b4(),a=hM(),s=mE(),o=yM(),u=Object.getOwnPropertyDescriptor;return fy.f=e?u:function(c,d){if(c=i(c),d=a(d),o)try{return u(c,d)}catch{}if(s(c,d))return n(!t(r.f,c,d),c[d])},fy}var Wy,tO;function k4(){if(tO)return Wy;tO=1;var e=Ra(),t=wa(),r=/#|\.prototype\./,n=function(u,l){var c=a[i(u)];return c===o?!0:c===s?!1:t(l)?e(l):!!l},i=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return Wy=n,Wy}var Yy,rO;function U4(){if(rO)return Yy;rO=1;var e=sM(),t=mM(),r=sd(),n=e(e.bind);return Yy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},Yy}var xy={},Ky,nO;function F4(){if(nO)return Ky;nO=1;var e=nu(),t=Ra();return Ky=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ky}var Xy,iO;function H4(){if(iO)return Xy;iO=1;var e=od(),t=String,r=TypeError;return Xy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Xy}var aO;function V4(){if(aO)return xy;aO=1;var e=nu(),t=yM(),r=F4(),n=H4(),i=hM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return xy.f=e?r?function(p,f,_){if(n(p),f=i(f),n(_),typeof p=="function"&&f==="prototype"&&"value"in _&&c in _&&!_[c]){var R=o(p,f);R&&R[c]&&(p[f]=_.value,_={configurable:l in _?_[l]:R[l],enumerable:u in _?_[u]:R[u],writable:!1})}return s(p,f,_)}:s:function(p,f,_){if(n(p),f=i(f),n(_),t)try{return s(p,f,_)}catch{}if("get"in _||"set"in _)throw new a("Accessors not supported");return"value"in _&&(p[f]=_.value),p},xy}var Jy,sO;function G4(){if(sO)return Jy;sO=1;var e=nu(),t=V4(),r=oM();return Jy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Jy}var Qy,oO;function z4(){if(oO)return Qy;oO=1;var e=an(),t=_4(),r=sM(),n=wa(),i=B4().f,a=k4(),s=lM(),o=U4(),u=G4(),l=mE(),c=function(d){var p=function(f,_,R){if(this instanceof p){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,_)}return new d(f,_,R)}return t(d,this,arguments)};return p.prototype=d.prototype,p};return Qy=function(d,p){var f=d.target,_=d.global,R=d.stat,w=d.proto,O=_?e:R?e[f]:e[f]&&e[f].prototype,h=_?s:s[f]||u(s,f,{})[f],T=h.prototype,b,m,v,A,P,q,z,Y,W;for(A in p)b=a(_?A:f+(R?".":"#")+A,d.forced),m=!b&&O&&l(O,A),q=h[A],m&&(d.dontCallGetSet?(W=i(O,A),z=W&&W.value):z=O[A]),P=m&&z?z:p[A],!(!b&&!w&&typeof q==typeof P)&&(d.bind&&m?Y=o(P,e):d.wrap&&m?Y=c(P):w&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||q&&q.sham)&&u(Y,"sham",!0),u(h,A,Y),w&&(v=f+"Prototype",l(s,v)||u(s,v,{}),u(s[v],A,P),d.real&&T&&(b||!T[A])&&u(T,A,P)))},Qy}var uO;function W4(){if(uO)return fA;uO=1;var e=z4(),t=an();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),fA}var Zy,cO;function Y4(){return cO||(cO=1,W4(),Zy=an()),Zy}var eg,lO;function x4(){if(lO)return eg;lO=1;var e=Y4();return eg=e,eg}var dO;function gM(){if(dO)return Ki;dO=1;var e=Ki&&Ki.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.getImplementation=void 0;var t=e(x4());function r(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:t.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return Ki.getImplementation=r,Ki}var fO;function _M(){if(fO)return La;fO=1;var e=La&&La.__values||function(o){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&o[u],c=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&c>=o.length&&(o=void 0),{value:o&&o[c++],done:!o}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(La,"__esModule",{value:!0});var t=XC(),r=gM(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var u=(0,r.getImplementation)(o,"Headers");return function(c,d,p,f,_){var R,w,O=new u(_),h=String(Date.now()),T=JSON.stringify(f),b=[d,p,h,T].join(":").toLowerCase(),m=0,v=t.Authenticator.signPayload(c,b);try{for(var A=e(v),P=A.next();!P.done;P=A.next()){var q=P.value;O.set(n+m,JSON.stringify(q)),m++}}catch(z){R={error:z}}finally{try{P&&!P.done&&(w=A.return)&&w.call(A)}finally{if(R)throw R.error}}return O.set(i,h),O.set(a,T),O}}return La.default=s,La}var pO;function EM(){if(pO)return pn;pO=1;var e=pn&&pn.__assign||function(){return e=Object.assign||function(s){for(var o,u=1,l=arguments.length;u<l;u++){o=arguments[u];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])}return s},e.apply(this,arguments)},t=pn&&pn.__rest||function(s,o){var u={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(u[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(s);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(s,l[c])&&(u[l[c]]=s[l[c]]);return u},r=pn&&pn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(pn,"__esModule",{value:!0});var n=r(_M()),i=gM();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),u=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),c=(0,i.getImplementation)(s,"fetch");return function(p,f){if(f&&f.identity){var _=f.identity,R=f.metadata,w=t(f,["identity","metadata"]);if(typeof p=="string"||p instanceof u||globalThis.URL&&p instanceof globalThis.URL){var O=typeof p=="string"?new u(p):p,h=new l(O.toString(),e(e({},w),{headers:o(_,f.method||"GET",O.pathname,R||{},w==null?void 0:w.headers)}));return c(h)}var T=new u(p.url),b=new l(p),m=o(_,p.method||"GET",T.pathname,R||{});return m.forEach(function(v,A){b.headers.set(A,v)}),c(b)}return c(p,f)}}return pn.default=a,pn}var mO;function K4(){return mO||(mO=1,(function(e){var t=jn&&jn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[u]}})}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=jn&&jn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=jn&&jn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(iM(),e);var i=EM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=_M();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(jn)),jn}var hO;function X4(){return hO||(hO=1,(function(e){var t=Dn&&Dn.__createBinding||(Object.create?(function(a,s,o,u){u===void 0&&(u=o),Object.defineProperty(a,u,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]})),r=Dn&&Dn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=Dn&&Dn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(iM(),e),r(K4(),e);var i=n(EM());e.default=(0,i.default)()})(Dn)),Dn}var J4=X4();const ud=WO(J4);async function Q4(e,t){const r=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await ud(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function Z4(e,t){const{usd:r}=await Q4(e,t);return r??{balanceCents:0,credits:0}}async function p6(e,t,r){const n=`${Nt.creditsServerUrl}/credits/authorize`,i=await ud(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function m6(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 i=n.toString(),a=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await ud(a,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),u=o.purchases??[],l=(r==null?void 0:r.skip)??0,c=r==null?void 0:r.first,d=typeof o.total=="number"?o.total:l+u.length+(u.length>=c?1:0);return{items:u,total:d}}async function h6(e,t){if(t.length===0)return 0;const r=`${Nt.creditsServerUrl}/credits/authorize/cancel`,n=await ud(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 y6(e,t=1e3){const r=await fetch(`${Nt.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 ez(e){return Ll({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>Z4(e.address,e.identity)})}const tz=e=>qo(e.reduce((t,r)=>t+r.priceCredits,0)),Kr=Is((e,t)=>({items:[],open:!1,fittingOpen:!1,add:(r,n="grid")=>{const i=t().items.some(s=>s.id===r.id);if(e(s=>i?{open:!0}:{items:[...s.items,r],open:!0}),i)return;const a=t().items;ci("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:qo(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:tz(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&ci("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),setOpen:r=>e({open:r}),setFittingOpen:r=>e(r?{fittingOpen:r,open:!1}:{fittingOpen:r})})),ds={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function g6(e){return`${e} ${e===1?ds.nameSingular:ds.name}`}function Un({className:e}){return J.jsx("span",{className:`ico ${ds.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function rz(){const e=Kr(s=>s.items),t=Kr(s=>s.open),r=Kr(s=>s.setOpen),n=Kr(s=>s.setFittingOpen),i=Me.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return Me.useEffect(()=>{if(!t)return;const s=setTimeout(()=>r(!1),4500),o=u=>{i.current&&!i.current.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",o),()=>{clearTimeout(s),document.removeEventListener("mousedown",o)}},[t,e.length,r]),!t||e.length===0?null:J.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[J.jsxs("div",{className:"cart-pop__head",children:[J.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),J.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>J.jsxs("div",{className:"cart-pop__row",children:[J.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?J.jsx("img",{src:s.thumbnail,alt:s.name}):null}),J.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),J.jsxs("div",{className:"cart-pop__price",children:[J.jsx(Un,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),J.jsxs("div",{className:"cart-pop__foot",children:[J.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",J.jsxs("strong",{children:[J.jsx(Un,{className:"ccy-mark"})," ",a]})]}),J.jsxs("div",{className:"cart-pop__actions",children:[J.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),J.jsx(Oo,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var xg=function(e,t){return xg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},xg(e,t)};function Mr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xg(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var qe=function(){return qe=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(this,arguments)};function As(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function vM(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function bM(e,t){return function(r,n){t(r,n,e)}}function TM(e,t,r,n,i,a){function s(O){if(O!==void 0&&typeof O!="function")throw new TypeError("Function expected");return O}for(var o=n.kind,u=o==="getter"?"get":o==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,p=!1,f=r.length-1;f>=0;f--){var _={};for(var R in n)_[R]=R==="access"?{}:n[R];for(var R in n.access)_.access[R]=n.access[R];_.addInitializer=function(O){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(O||null))};var w=(0,r[f])(o==="accessor"?{get:c.get,set:c.set}:c[u],_);if(o==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(d=s(w.get))&&(c.get=d),(d=s(w.set))&&(c.set=d),(d=s(w.init))&&i.unshift(d)}else(d=s(w))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),p=!0}function SM(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function IM(e){return typeof e=="symbol"?e:"".concat(e)}function RM(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function wM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function AM(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(d){s(d)}}function u(c){try{l(n.throw(c))}catch(d){s(d)}}function l(c){c.done?a(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})}function OM(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var cd=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});function NM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&cd(t,e,r)}function jl(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function hE(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function PM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hE(arguments[t]));return e}function CM(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function er(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function fs(e){return this instanceof fs?(this.v=e,this):new fs(e)}function MM(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(f){return function(_){return Promise.resolve(_).then(f,d)}}function o(f,_){n[f]&&(i[f]=function(R){return new Promise(function(w,O){a.push([f,R,w,O])>1||u(f,R)})},_&&(i[f]=_(i[f])))}function u(f,_){try{l(n[f](_))}catch(R){p(a[0][3],R)}}function l(f){f.value instanceof fs?Promise.resolve(f.value.v).then(c,d):p(a[0][2],f)}function c(f){u("next",f)}function d(f){u("throw",f)}function p(f,_){f(_),a.shift(),a.length&&u(a[0][0],a[0][1])}}function DM(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,a){t[i]=e[i]?function(s){return(r=!r)?{value:fs(e[i](s)),done:!1}:a?a(s):s}:a}}function jM(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof jl=="function"?jl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,u){s=e[a](s),i(o,u,s.done,s.value)})}}function i(a,s,o,u){Promise.resolve(u).then(function(l){a({value:l,done:o})},s)}}function LM(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var nz=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Kg=function(e){return Kg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Kg(e)};function $M(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Kg(e),n=0;n<r.length;n++)r[n]!=="default"&&cd(t,e,r[n]);return nz(t,e),t}function qM(e){return e&&e.__esModule?e:{default:e}}function BM(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function kM(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function UM(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function FM(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var iz=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function HM(e){function t(a){e.error=e.hasError?new iz(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var r,n=0;function i(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(s){return t(s),i()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function VM(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,a,s){return n?t?".jsx":".js":i&&(!a||!s)?r:i+a+"."+s.toLowerCase()+"js"}):e}const az={__extends:Mr,__assign:qe,__rest:As,__decorate:vM,__param:bM,__esDecorate:TM,__runInitializers:SM,__propKey:IM,__setFunctionName:RM,__metadata:wM,__awaiter:AM,__generator:OM,__createBinding:cd,__exportStar:NM,__values:jl,__read:hE,__spread:PM,__spreadArrays:CM,__spreadArray:er,__await:fs,__asyncGenerator:MM,__asyncDelegator:DM,__asyncValues:jM,__makeTemplateObject:LM,__importStar:$M,__importDefault:qM,__classPrivateFieldGet:BM,__classPrivateFieldSet:kM,__classPrivateFieldIn:UM,__addDisposableResource:FM,__disposeResources:HM,__rewriteRelativeImportExtension:VM},_6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:FM,get __assign(){return qe},__asyncDelegator:DM,__asyncGenerator:MM,__asyncValues:jM,__await:fs,__awaiter:AM,__classPrivateFieldGet:BM,__classPrivateFieldIn:UM,__classPrivateFieldSet:kM,__createBinding:cd,__decorate:vM,__disposeResources:HM,__esDecorate:TM,__exportStar:NM,__extends:Mr,__generator:OM,__importDefault:qM,__importStar:$M,__makeTemplateObject:LM,__metadata:wM,__param:bM,__propKey:IM,__read:hE,__rest:As,__rewriteRelativeImportExtension:VM,__runInitializers:SM,__setFunctionName:RM,__spread:PM,__spreadArray:er,__spreadArrays:CM,__values:jl,default:az},Symbol.toStringTag,{value:"Module"}));function hr(e,t){var r=t&&t.cache?t.cache:dz,n=t&&t.serializer?t.serializer:lz,i=t&&t.strategy?t.strategy:uz;return i(e,{cache:r,serializer:n})}function sz(e){return e==null||typeof e=="number"||typeof e=="boolean"}function oz(e,t,r,n){var i=sz(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function GM(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,n),t.set(i,a)),a}function zM(e,t,r,n,i){return r.bind(t,e,n,i)}function uz(e,t){var r=e.length===1?oz:GM;return zM(e,this,r,t.cache.create(),t.serializer)}function cz(e,t){return zM(e,this,GM,t.cache.create(),t.serializer)}var lz=function(){return JSON.stringify(arguments)};function yE(){this.cache=Object.create(null)}yE.prototype.get=function(e){return this.cache[e]};yE.prototype.set=function(e,t){this.cache[e]=t};var dz={create:function(){return new yE}},yr={variadic:cz};function WM(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.Locale).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.ListFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});var at;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(at||(at={}));var Dt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Dt||(Dt={}));var ps;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ps||(ps={}));function yO(e){return e.type===Dt.literal}function fz(e){return e.type===Dt.argument}function YM(e){return e.type===Dt.number}function xM(e){return e.type===Dt.date}function KM(e){return e.type===Dt.time}function XM(e){return e.type===Dt.select}function JM(e){return e.type===Dt.plural}function pz(e){return e.type===Dt.pound}function QM(e){return e.type===Dt.tag}function ZM(e){return!!(e&&typeof e=="object"&&e.type===ps.number)}function Xg(e){return!!(e&&typeof e=="object"&&e.type===ps.dateTime)}var eD=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mz=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function hz(e){var t={};return e.replace(mz,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var yz=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function gz(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(yz).filter(function(p){return p.length>0}),r=[],n=0,i=t;n<i.length;n++){var a=i[n],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),l=0,c=u;l<c.length;l++){var d=c[l];if(d.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:u})}return r}function _z(e){return e.replace(/^(.*?)-/,"")}var gO=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,tD=/^(@+)?(\+|#+)?[rs]?$/g,Ez=/(\*)(0+)|(#+)(0+)|(0+)/g,rD=/^(0+)$/;function _O(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(tD,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function nD(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function vz(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!rD.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function EO(e){var t={},r=nD(e);return r||t}function bz(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=_z(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=qe(qe(qe({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return qe(qe({},u),EO(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),EO(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ez,function(u,l,c,d,p,f){if(l)t.minimumIntegerDigits=c.length;else{if(d&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(rD.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(gO.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(gO,function(u,l,c,d,p,f){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var a=i.options[0];a==="w"?t=qe(qe({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=qe(qe({},t),_O(a)));continue}if(tD.test(i.stem)){t=qe(qe({},t),_O(i.stem));continue}var s=nD(i.stem);s&&(t=qe(qe({},t),s));var o=vz(i.stem);o&&(t=qe(qe({},t),o))}return t}var ml={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Tz(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var a=0;n+1<e.length&&e.charAt(n+1)===i;)a++,n++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",l=Sz(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)r+=u;for(;s-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function Sz(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=ml[n||""]||ml[r||""]||ml["".concat(r,"-001")]||ml["001"];return i[0]}var tg,Iz=new RegExp("^".concat(eD.source,"*")),Rz=new RegExp("".concat(eD.source,"*$"));function ct(e,t){return{start:e,end:t}}var wz=!!String.prototype.startsWith&&"_a".startsWith("a",1),Az=!!String.fromCodePoint,Oz=!!Object.fromEntries,Nz=!!String.prototype.codePointAt,Pz=!!String.prototype.trimStart,Cz=!!String.prototype.trimEnd,Mz=!!Number.isSafeInteger,Dz=Mz?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Jg=!0;try{var jz=aD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jg=((tg=jz.exec("a"))===null||tg===void 0?void 0:tg[0])==="a"}catch{Jg=!1}var vO=wz?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Qg=Az?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},bO=Oz?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var a=i[n],s=a[0],o=a[1];r[s]=o}return r},iD=Nz?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),a;return i<55296||i>56319||r+1===n||(a=t.charCodeAt(r+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Lz=Pz?function(t){return t.trimStart()}:function(t){return t.replace(Iz,"")},$z=Cz?function(t){return t.trimEnd()}:function(t){return t.replace(Rz,"")};function aD(e,t){return new RegExp(e,t)}var Zg;if(Jg){var TO=aD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zg=function(t,r){var n;TO.lastIndex=r;var i=TO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Zg=function(t,r){for(var n=[];;){var i=iD(t,r);if(i===void 0||sD(i)||Uz(i))break;n.push(i),r+=i>=65536?2:1}return Qg.apply(void 0,n)};var qz=(function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Dt.pound,location:ct(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(at.UNMATCHED_CLOSING_TAG,ct(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&e_(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Dt.literal,value:"<".concat(i,"/>"),location:ct(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,r,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!e_(this.char()))return this.error(at.INVALID_TAG,ct(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(at.UNMATCHED_CLOSING_TAG,ct(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Dt.tag,value:i,children:s,location:ct(n,this.clonePosition())},err:null}:this.error(at.INVALID_TAG,ct(o,this.clonePosition())))}else return this.error(at.UNCLOSED_TAG,ct(n,this.clonePosition()))}else return this.error(at.INVALID_TAG,ct(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&kz(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var a=this.tryParseQuote(r);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=ct(n,this.clonePosition());return{val:{type:Dt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Bz(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Qg.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Qg(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(at.EMPTY_ARGUMENT,ct(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(at.MALFORMED_ARGUMENT,ct(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Dt.argument,value:i,location:ct(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(at.MALFORMED_ARGUMENT,ct(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Zg(this.message,r),i=r+n.length;this.bumpTo(i);var a=this.clonePosition(),s=ct(t,a);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(at.EXPECT_ARGUMENT_TYPE,ct(s,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var p=$z(d.val);if(p.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var f=ct(c,this.clonePosition());l={style:p,styleLocation:f}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var R=ct(i,this.clonePosition());if(l&&vO(l==null?void 0:l.style,"::",0)){var w=Lz(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(w,l.styleLocation);return d.err?d:{val:{type:Dt.number,value:n,location:R,style:d.val},err:null}}else{if(w.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,R);var O=w;this.locale&&(O=Tz(w,this.locale));var p={type:ps.dateTime,pattern:O,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?hz(O):{}},h=o==="date"?Dt.date:Dt.time;return{val:{type:h,value:n,location:R,style:p},err:null}}}return{val:{type:o==="number"?Dt.number:o==="date"?Dt.date:Dt.time,value:n,location:R,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var T=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(T,qe({},T)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),m=0;if(o!=="select"&&b.value==="offset"){if(!this.bumpIf(":"))return this.error(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,at.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),b=this.parseIdentifierIfPossible(),m=d.val}var v=this.tryParsePluralOrSelectOptions(t,o,r,b);if(v.err)return v;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=ct(i,this.clonePosition());return o==="select"?{val:{type:Dt.select,value:n,options:bO(v.val),location:A},err:null}:{val:{type:Dt.plural,value:n,options:bO(v.val),offset:m,pluralType:o==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(at.INVALID_ARGUMENT_TYPE,ct(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(at.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ct(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=gz(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:ps.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?bz(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var a,s=!1,o=[],u=new Set,l=i.value,c=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=ct(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?at.DUPLICATE_SELECT_ARGUMENT_SELECTOR:at.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);l==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:at.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ct(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,r,n);if(_.err)return _;var R=this.tryParseArgumentClose(f);if(R.err)return R;o.push([l,{value:_.val,location:ct(f,this.clonePosition())}]),u.add(l),this.bumpSpace(),a=this.parseIdentifierIfPossible(),l=a.value,c=a.location}return o.length===0?this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR:at.EXPECT_PLURAL_ARGUMENT_SELECTOR,ct(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(at.MISSING_OTHER_CLAUSE,ct(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ct(i,this.clonePosition());return a?(s*=n,Dz(s)?{val:s,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=iD(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(vO(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&sD(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e})();function e_(e){return e>=97&&e<=122||e>=65&&e<=90}function Bz(e){return e_(e)||e===47}function kz(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function sD(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Uz(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function t_(e){e.forEach(function(t){if(delete t.location,XM(t)||JM(t))for(var r in t.options)delete t.options[r].location,t_(t.options[r].value);else YM(t)&&ZM(t.style)||(xM(t)||KM(t))&&Xg(t.style)?delete t.style.location:QM(t)&&t_(t.children)})}function Fz(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new qz(e,t).parse();if(r.err){var n=SyntaxError(at[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||t_(r.val),r.val}var Tn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Tn||(Tn={}));var di=(function(e){Mr(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.code=n,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),SO=(function(e){Mr(t,e);function t(r,n,i,a){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Tn.INVALID_VALUE,a)||this}return t})(di),Hz=(function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Tn.INVALID_VALUE,i)||this}return t})(di),Vz=(function(e){Mr(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Tn.MISSING_VALUE,n)||this}return t})(di),mr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(mr||(mr={}));function Gz(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==mr.literal||r.type!==mr.literal?t.push(r):n.value+=r.value,t},[])}function oD(e){return typeof e=="function"}function bl(e,t,r,n,i,a,s){if(e.length===1&&yO(e[0]))return[{type:mr.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var c=l[u];if(yO(c)){o.push({type:mr.literal,value:c.value});continue}if(pz(c)){typeof a=="number"&&o.push({type:mr.literal,value:r.getNumberFormat(t).format(a)});continue}var d=c.value;if(!(i&&d in i))throw new Vz(d,s);var p=i[d];if(fz(c)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?mr.literal:mr.object,value:p});continue}if(xM(c)){var f=typeof c.style=="string"?n.date[c.style]:Xg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(KM(c)){var f=typeof c.style=="string"?n.time[c.style]:Xg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(YM(c)){var f=typeof c.style=="string"?n.number[c.style]:ZM(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(p=p*(f.scale||1)),o.push({type:mr.literal,value:r.getNumberFormat(t,f).format(p)});continue}if(QM(c)){var _=c.children,R=c.value,w=i[R];if(!oD(w))throw new Hz(R,"function",s);var O=bl(_,t,r,n,i,a),h=w(O.map(function(m){return m.value}));Array.isArray(h)||(h=[h]),o.push.apply(o,h.map(function(m){return{type:typeof m=="string"?mr.literal:mr.object,value:m}}))}if(XM(c)){var T=c.options[p]||c.options.other;if(!T)throw new SO(c.value,p,Object.keys(c.options),s);o.push.apply(o,bl(T.value,t,r,n,i));continue}if(JM(c)){var T=c.options["=".concat(p)];if(!T){if(!Intl.PluralRules)throw new di(`Intl.PluralRules is not available in this environment.
74
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(h,T){if(h){if(typeof h=="string")return p(h,T);var b={}.toString.call(h).slice(8,-1);return b==="Object"&&h.constructor&&(b=h.constructor.name),b==="Map"||b==="Set"?Array.from(h):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?p(h,T):void 0}}function p(h,T){(T==null||T>h.length)&&(T=h.length);for(var b=0,m=Array(T);b<T;b++)m[b]=h[b];return m}function f(h,T){var b=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(b!=null){var m,v,A,P,q=[],z=!0,Y=!1;try{if(A=(b=b.call(h)).next,T!==0)for(;!(z=(m=A.call(b)).done)&&(q.push(m.value),q.length!==T);z=!0);}catch(W){Y=!0,v=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw v}}return q}}function _(h){if(Array.isArray(h))return h}var R={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},w=/^\[([^\]]+)\](?::([0-9]+))?$/;function O(h,T){if((0,r.default)(h),!h||/[\s<>]/.test(h)||h.indexOf("mailto:")===0||(T=(0,o.default)(T,R),T.validate_length&&h.length>T.max_allowed_length)||!T.allow_fragments&&(0,i.default)(h,"#")||!T.allow_query_components&&((0,i.default)(h,"?")||(0,i.default)(h,"&")))return!1;var b,m,v,A,P,q,z,Y;z=h.split("#"),h=z.shift(),z=h.split("?"),h=z.shift();var W=h.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),T.require_valid_protocol&&T.protocols.indexOf(b)===-1?!1:h.substring(W[0].length)};if(W){var ce=W[1],se=h.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(h=F(ce),h===!1)return!1}else{var X=se.indexOf("/"),x=X===-1?se:se.substring(0,X),L=x.indexOf("@");if(L!==-1){var D=x.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,V=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(V&&!N){if(T.require_protocol)return!1}else if(h=F(ce),h===!1)return!1}else{var j=/^[0-9]/.test(se);if(j){if(T.require_protocol)return!1}else if(h=F(ce),h===!1)return!1}}}else if(T.require_protocol)return!1;if(h.slice(0,2)==="//"){if(!U&&!T.allow_protocol_relative_urls)return!1;h=h.slice(2)}if(h==="")return!1;if(z=h.split("/"),h=z.shift(),h===""&&!T.require_host)return!0;if(z=h.split("@"),z.length>1){if(T.disallow_auth||z[0]===""||(m=z.shift(),m.indexOf(":")>=0&&m.split(":").length>2))return!1;var Z=m.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}A=z.join("@"),q=null,Y=null;var Ie=A.match(w);if(Ie?(v="",Y=Ie[1],q=Ie[2]||null):(z=A.split(":"),v=z.shift(),z.length&&(q=z.join(":"))),q!==null&&q.length>0){if(P=parseInt(q,10),!/^[0-9]+$/.test(q)||P<=0||P>65535)return!1}else if(T.require_port)return!1;return T.host_whitelist?(0,n.default)(v,T.host_whitelist):v===""&&!T.require_host?!0:!(!(0,s.default)(v)&&!(0,a.default)(v,T)&&(!Y||!(0,s.default)(Y,6))||(v=v||Y,T.host_blacklist&&(0,n.default)(v,T.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(sl,sl.exports)),sl.exports}var ry={},Jw;function QC(){return Jw||(Jw=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(o){o.GET="get",o.STORE="store",o.CLEAR="clear",o.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function r(o){return{target:e.SINGLE_SIGN_ON_TARGET,...o}}e.createMessage=r;function n(o){const u=localStorage.getItem(s(o));if(!u)return null;let l;try{l=JSON.parse(u)}catch{return a(o),null}return l.expiration=new Date(l.expiration),l.expiration.getTime()<=Date.now()?(a(o),null):l}e.localStorageGetIdentity=n;function i(o,u){new Date(u.expiration).getTime()>Date.now()&&localStorage.setItem(s(o),JSON.stringify(u))}e.localStorageStoreIdentity=i;function a(o){localStorage.removeItem(s(o))}e.localStorageClearIdentity=a;function s(o){if(!/^0x[a-fA-F0-9]{40}$/.test(o))throw new Error("User must be a valid ethereum address");return`single-sign-on-${o.toLowerCase()}`}})(ry)),ry}var Qw;function XG(){if(Qw)return Wr;Qw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.clearIdentity=Wr.storeIdentity=Wr.getIdentity=Wr.init=void 0;const e=KG(),t=QC(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(w,O={}){if(!(0,e.default)(w,{...o,...O}))throw new Error(`Invalid url: ${w}`);if(s)throw new Error("Already initialized");const h=document.createElement("iframe");h.id=r,h.src=w,h.style.width="0",h.style.height="0",h.style.border="none",h.style.position="absolute",document.body.appendChild(h),s=w}Wr.init=u;async function l(w){let O;try{O=(await f(await p(),t.Action.GET,{user:w})).identity??null}catch(h){R(h),O=(0,t.localStorageGetIdentity)(w)}return O}Wr.getIdentity=l;async function c(w,O){try{await f(await p(),t.Action.STORE,{user:w,identity:O})}catch(h){R(h),(0,t.localStorageStoreIdentity)(w,O)}}Wr.storeIdentity=c;async function d(w){try{await f(await p(),t.Action.CLEAR,{user:w})}catch(O){R(O),(0,t.localStorageClearIdentity)(w)}}Wr.clearIdentity=d;async function p(){if(!s)throw new Error("Not initialized");for(let w=0;w<i;w++){const O=document.getElementById(r),h=O==null?void 0:O.contentWindow;if(!h){await _(n);continue}try{await f(h,t.Action.PING,{},n)}catch{continue}return h}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function f(w,O,h,T=0){a++;const b=a;let m=null;const v=new Promise((A,P)=>{m=({data:q})=>{!q||q.target!==t.SINGLE_SIGN_ON_TARGET||q.id!==b||(q.error?P(new Error(q.error)):A(q))},window.addEventListener("message",m)});w.postMessage((0,t.createMessage)({id:b,action:O,...h}),s);try{return await(T?Promise.race([v,new Promise((A,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),T))]):v)}catch(A){throw A}finally{m&&window.removeEventListener("message",m)}}function _(w){return new Promise(O=>setTimeout(O,w))}function R(w){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",w.message)}return Wr}var Zw;function JG(){return Zw||(Zw=1,(function(e){var t=xi&&xi.__createBinding||(Object.create?(function(n,i,a,s){s===void 0&&(s=a);var o=Object.getOwnPropertyDescriptor(i,a);(!o||("get"in o?!i.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(n,s,o)}):(function(n,i,a,s){s===void 0&&(s=a),n[s]=i[a]})),r=xi&&xi.__exportStar||function(n,i){for(var a in n)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,n,a)};Object.defineProperty(e,"__esModule",{value:!0}),r(XG(),e),r(QC(),e)})(xi)),xi}var zg=JG();function QG(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?bn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?bn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?bn.DEVELOPMENT:null}function ZG(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(eM(n))return n}return null}var eA={},bn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(bn||(bn={}));function ZC(){return Object.values(bn)}function eM(e){return ZC().includes(e)}function pl(e){if(eM(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${ZC().map(t=>`"${t}"`).join(", ")}.`)}function e3(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:i}=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&&i&&t!==i)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&i&&r!==i)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?pl(t):r?pl(r):n?pl(n):i?pl(i):bn.PRODUCTION}function t3(e){if(typeof window<"u"){const r=ZG(window.location);if(r)return r;const n=QG(window.location);if(n)return n}return e3(typeof e>"u"&&typeof yl=="object"&&typeof eA=="object"?eA:e)}function r3(e,t){const r=t3(t==null?void 0:t.systemEnvVariables),n=e[r];return{get:(i,a="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return i in n?n[i]:a},is:i=>r===i,getEnv:()=>r}}const n3="development",i3="80002",a3="https://marketplace-api.decentraland.zone",s3="https://marketplace-api.decentraland.zone",o3="/auth",u3="https://rpc.decentraland.org/amoy",c3="https://credits.decentraland.zone",l3="https://builder-api.decentraland.zone",d3="https://peer.decentraland.zone",f3="",p3="",m3="",h3="",y3={ENVIRONMENT:n3,CHAIN_ID:i3,MARKETPLACE_SERVER_URL:a3,NFT_API_URL:s3,AUTH_URL:o3,RPC_URL:u3,CREDITS_SERVER_URL:c3,BUILDER_SERVER_URL:l3,PEER_URL:d3,SHOP_SERVER_URL:f3,STRIPE_PUBLISHABLE_KEY:p3,SEGMENT_WRITE_KEY:m3,SENTRY_DSN:h3},g3="staging",_3="80002",E3="https://marketplace-api.decentraland.zone",v3="https://marketplace-api.decentraland.zone",b3="/auth",T3="https://rpc.decentraland.org/amoy",S3="https://credits.decentraland.zone",I3="https://builder-api.decentraland.zone",R3="https://peer.decentraland.zone",w3="",A3="",O3="",N3="",P3={ENVIRONMENT:g3,CHAIN_ID:_3,MARKETPLACE_SERVER_URL:E3,NFT_API_URL:v3,AUTH_URL:b3,RPC_URL:T3,CREDITS_SERVER_URL:S3,BUILDER_SERVER_URL:I3,PEER_URL:R3,SHOP_SERVER_URL:w3,STRIPE_PUBLISHABLE_KEY:A3,SEGMENT_WRITE_KEY:O3,SENTRY_DSN:N3},C3="production",M3="137",D3="https://marketplace-api.decentraland.org",j3="https://marketplace-api.decentraland.org",L3="/auth",$3="https://rpc.decentraland.org/polygon",q3="https://credits.decentraland.org",B3="https://builder-api.decentraland.org",k3="https://peer.decentraland.org",U3="",F3="",H3="",V3="",G3={ENVIRONMENT:C3,CHAIN_ID:M3,MARKETPLACE_SERVER_URL:D3,NFT_API_URL:j3,AUTH_URL:L3,RPC_URL:$3,CREDITS_SERVER_URL:q3,BUILDER_SERVER_URL:B3,PEER_URL:k3,SHOP_SERVER_URL:U3,STRIPE_PUBLISHABLE_KEY:F3,SEGMENT_WRITE_KEY:H3,SENTRY_DSN:V3},z3={},Nr=r3({[bn.DEVELOPMENT]:y3,[bn.STAGING]:P3,[bn.PRODUCTION]:G3},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),or=z3,Nt={marketplaceServerUrl:or.VITE_MARKETPLACE_SERVER_URL??Nr.get("MARKETPLACE_SERVER_URL"),nftApiUrl:or.VITE_NFT_API_URL??Nr.get("NFT_API_URL"),chainId:Number(or.VITE_CHAIN_ID??Nr.get("CHAIN_ID")),authUrl:or.VITE_AUTH_URL??Nr.get("AUTH_URL"),rpcUrl:or.VITE_RPC_URL??Nr.get("RPC_URL"),creditsServerUrl:or.VITE_CREDITS_SERVER_URL??Nr.get("CREDITS_SERVER_URL"),builderServerUrl:or.VITE_BUILDER_SERVER_URL??Nr.get("BUILDER_SERVER_URL"),peerUrl:or.VITE_PEER_URL??Nr.get("PEER_URL"),shopServerUrl:or.VITE_SHOP_SERVER_URL??Nr.get("SHOP_SERVER_URL"),stripePublishableKey:or.VITE_STRIPE_PK??Nr.get("STRIPE_PUBLISHABLE_KEY"),segmentWriteKey:or.VITE_SEGMENT_WRITE_KEY??Nr.get("SEGMENT_WRITE_KEY"),sentryDsn:or.VITE_SENTRY_DSN??Nr.get("SENTRY_DSN"),sentryEnvironment:or.VITE_SENTRY_ENVIRONMENT??(Number(or.VITE_CHAIN_ID??Nr.get("CHAIN_ID"))===80002?"dev":"prod"),sentryRelease:or.VITE_SENTRY_RELEASE??`shop@${or.VITE_APP_VERSION??"0.0.0-dev"}`},W3=744*60;async function tM(){return(await Gt(async()=>{const{connection:e}=await import("./index-CUMwJIXW.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([8,1]))).connection}async function Y3(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new zD(e.provider),n=r.getSigner();let i=zg.localStorageGetIdentity(t);if(!i){const a=WD.createRandom();i=await GG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:VE(a.publicKey),privateKey:VE(a.privateKey)},W3,s=>n.signMessage(s)),zg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function x3(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Nt.authUrl}/login?redirectTo=${e}`)}async function K3(){try{const t=await(await tM()).tryPreviousConnection();return!t.account||!zg.localStorageGetIdentity(t.account.toLowerCase())?null:await Y3(t)}catch{return null}}async function X3(){try{await(await tM()).disconnect()}catch{}}const J3=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,Q3=Nt.chainId===80002?"amoy":"polygon",Z3=Nt.chainId===80002?"dev":"prod";function cE(){return window.analytics}function e4(){let e=null;try{e=Rs.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:J3,network:Q3,app_env:Z3}}function ci(e,t={}){const r={...e4(),...t},n=cE();n&&n.track(e,r)}function t4(e,t={}){const r=cE();r&&r.identify(e.toLowerCase(),t)}function r4(){const e=cE();e!=null&&e.reset&&e.reset()}function n4(e){ci("Shop Viewed Page",{page:e})}function tA(e){return e===Jr.ProviderType.MAGIC||e===Jr.ProviderType.MAGIC_TEST?"magic":"wallet"}function i4(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function qo(e){return Math.round(e*10)/100}function lE(e){return!e.tokenId}function l6(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:qo(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:lE(e)}}function d6(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(lE);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:qo(n.priceCredits)})),value_credits:t,value_usd:qo(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function a4(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 f6(e){return a4(e)==="user_rejected"}function s4(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=>(...i)=>(r.push([n,...i]),r);for(const n of r.methods)r[n]=r.factory(n);r.load=n=>{const i=document.createElement("script");i.async=!0,i.src=`https://cdn.segment.com/analytics.js/v1/${encodeURIComponent(n)}/analytics.min.js`,document.head.appendChild(i)},t.analytics=r,r.load(e),r.page()}let rA=!1;function o4(){if(rA)return;rA=!0;const e=Nt.segmentWriteKey;e&&s4(e)}let Wg=null;function u4(e){Wg=e}function nA(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Wg)try{Wg(e,t)}catch{}}const c4=/0x[a-fA-F0-9]{130}\b/g,l4=/0x[a-fA-F0-9]{64}\b/g,d4=/(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,f4=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function Xs(e){return e.replace(c4,"<signature>").replace(d4,"<secret>").replace(l4,"<hex32>")}function p4(e){var r;e.message&&(e.message=Xs(e.message));for(const n of((r=e.exception)==null?void 0:r.values)??[])n.value&&(n.value=Xs(n.value));for(const n of e.breadcrumbs??[])n.message&&(n.message=Xs(n.message));e.request&&(e.request.url&&(e.request.url=Xs(e.request.url)),delete e.request.cookies,delete e.request.headers);const t=n=>{if(n)for(const i of Object.keys(n)){if(f4.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=Xs(n[i]))}};return t(e.tags),t(e.extra),e}let iA=!1;function m4(){if(iA)return;const e=Nt.sentryDsn;if(!e)return;iA=!0,rU({dsn:e,environment:Nt.sentryEnvironment,release:Nt.sentryRelease,integrations:[new VB],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:p4});const t=h4();t&&f$({id:t}),u4((r,n)=>R_(r,{extra:n}))}function h4(){var e;try{return((e=Rs.getState().session)==null?void 0:e.address)??null}catch{return null}}const aA="shop-favorites";let vl=null;const rM=e=>e?`${aA}:${e.toLowerCase()}`:aA;function sA(e){var t;try{const r=localStorage.getItem(rM(e));if(!r)return{};const n=JSON.parse(r);if(!n||typeof n!="object")return{};const i="state"in n&&((t=n.state)!=null&&t.items)?n.state.items:n;return i&&typeof i=="object"?i:{}}catch{return{}}}function oA(e){try{localStorage.setItem(rM(vl),JSON.stringify(e))}catch{}}const Dl=Is(e=>({items:sA(vl),toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,oA(n),{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],oA(n),{items:n}}),reloadFor:t=>{vl=t?t.toLowerCase():null,e({items:sA(vl)})}})),uA="shop:followed-creators:v1",y4=200;let dE=null;const nM=e=>e?`${uA}:${e.toLowerCase()}`:uA;function cA(){try{const e=localStorage.getItem(nM(dE));if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function lA(e){try{localStorage.setItem(nM(dE),JSON.stringify(e))}catch{}}const Yg=Is((e,t)=>({followed:cA(),isFollowing:r=>t().followed.includes(r.toLowerCase()),follow:r=>{const n=r.toLowerCase();if(!n||t().followed.includes(n))return;const i=[n,...t().followed].slice(0,y4);lA(i),e({followed:i}),ci("Shop Followed Creator",{creator_address:n,following_count:i.length})},unfollow:r=>{const n=r.toLowerCase();if(!t().followed.includes(n))return;const i=t().followed.filter(a=>a!==n);lA(i),e({followed:i}),ci("Shop Unfollowed Creator",{creator_address:n,following_count:i.length})},toggle:r=>t().isFollowing(r)?t().unfollow(r):t().follow(r),reloadFor:r=>{dE=r?r.toLowerCase():null,e({followed:cA()})}})),ny="shop:signing_in",Rs=Is(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(ny,"1")}catch{}x3()},disconnect:async()=>{ci("Shop Signed Out");try{await X3()}catch(t){nA(t,{flow:"wallet",step:"disconnect"})}r4(),Dl.getState().reloadFor(null),Yg.getState().reloadFor(null),e({session:null})},restore:async()=>{let t;try{t=await K3()}catch(n){nA(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),Dl.getState().reloadFor(t.address),Yg.getState().reloadFor(t.address),t4(t.address,{sign_in_method:tA(t.providerType)});let r=!1;try{r=sessionStorage.getItem(ny)==="1",r&&sessionStorage.removeItem(ny)}catch{}r&&ci("Shop Signed In",{method:tA(t.providerType),is_new_user:i4(t.address)})}})),g4=Nt.peerUrl;function fE(e){return Ll({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${g4}/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]}})}var Dn={},iy={},dA;function iM(){return dA||(dA=1,Object.defineProperty(iy,"__esModule",{value:!0})),iy}var jn={},pn={},La={},Ki={},fA={},Js,pA;function an(){if(pA)return Js;pA=1;var e=function(t){return t&&t.Math===Math&&t};return Js=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof sg=="object"&&sg)||e(typeof Js=="object"&&Js)||(function(){return this})()||Function("return this")(),Js}var ay,mA;function Ra(){return mA||(mA=1,ay=function(e){try{return!!e()}catch{return!0}}),ay}var sy,hA;function sd(){if(hA)return sy;hA=1;var e=Ra();return sy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),sy}var oy,yA;function _4(){if(yA)return oy;yA=1;var e=sd(),t=Function.prototype,r=t.apply,n=t.call;return oy=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),oy}var uy,gA;function ws(){if(gA)return uy;gA=1;var e=sd(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return uy=e?n:function(i){return function(){return r.apply(i,arguments)}},uy}var cy,_A;function aM(){if(_A)return cy;_A=1;var e=ws(),t=e({}.toString),r=e("".slice);return cy=function(n){return r(t(n),8,-1)},cy}var ly,EA;function sM(){if(EA)return ly;EA=1;var e=aM(),t=ws();return ly=function(r){if(e(r)==="Function")return t(r)},ly}var dy,vA;function wa(){if(vA)return dy;vA=1;var e=typeof document=="object"&&document.all;return dy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},dy}var fy={},py,bA;function nu(){if(bA)return py;bA=1;var e=Ra();return py=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),py}var my,TA;function pE(){if(TA)return my;TA=1;var e=sd(),t=Function.prototype.call;return my=e?t.bind(t):function(){return t.apply(t,arguments)},my}var hy={},SA;function E4(){if(SA)return hy;SA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return hy.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,hy}var yy,IA;function oM(){return IA||(IA=1,yy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),yy}var gy,RA;function v4(){if(RA)return gy;RA=1;var e=ws(),t=Ra(),r=aM(),n=Object,i=e("".split);return gy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,gy}var _y,wA;function uM(){return wA||(wA=1,_y=function(e){return e==null}),_y}var Ey,AA;function cM(){if(AA)return Ey;AA=1;var e=uM(),t=TypeError;return Ey=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Ey}var vy,OA;function b4(){if(OA)return vy;OA=1;var e=v4(),t=cM();return vy=function(r){return e(t(r))},vy}var by,NA;function od(){if(NA)return by;NA=1;var e=wa();return by=function(t){return typeof t=="object"?t!==null:e(t)},by}var Ty,PA;function lM(){return PA||(PA=1,Ty={}),Ty}var Sy,CA;function T4(){if(CA)return Sy;CA=1;var e=lM(),t=an(),r=wa(),n=function(i){return r(i)?i:void 0};return Sy=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Sy}var Iy,MA;function S4(){if(MA)return Iy;MA=1;var e=ws();return Iy=e({}.isPrototypeOf),Iy}var Ry,DA;function I4(){if(DA)return Ry;DA=1;var e=an(),t=e.navigator,r=t&&t.userAgent;return Ry=r?String(r):"",Ry}var wy,jA;function R4(){if(jA)return wy;jA=1;var e=an(),t=I4(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,a=i&&i.v8,s,o;return a&&(s=a.split("."),o=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!o&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(o=+s[1]))),wy=o,wy}var Ay,LA;function dM(){if(LA)return Ay;LA=1;var e=R4(),t=Ra(),r=an(),n=r.String;return Ay=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ay}var Oy,$A;function fM(){if($A)return Oy;$A=1;var e=dM();return Oy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Oy}var Ny,qA;function pM(){if(qA)return Ny;qA=1;var e=T4(),t=wa(),r=S4(),n=fM(),i=Object;return Ny=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Ny}var Py,BA;function w4(){if(BA)return Py;BA=1;var e=String;return Py=function(t){try{return e(t)}catch{return"Object"}},Py}var Cy,kA;function mM(){if(kA)return Cy;kA=1;var e=wa(),t=w4(),r=TypeError;return Cy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Cy}var My,UA;function A4(){if(UA)return My;UA=1;var e=mM(),t=uM();return My=function(r,n){var i=r[n];return t(i)?void 0:e(i)},My}var Dy,FA;function O4(){if(FA)return Dy;FA=1;var e=pE(),t=wa(),r=od(),n=TypeError;return Dy=function(i,a){var s,o;if(a==="string"&&t(s=i.toString)&&!r(o=e(s,i))||t(s=i.valueOf)&&!r(o=e(s,i))||a!=="string"&&t(s=i.toString)&&!r(o=e(s,i)))return o;throw new n("Can't convert object to primitive value")},Dy}var jy={exports:{}},Ly,HA;function N4(){return HA||(HA=1,Ly=!0),Ly}var $y,VA;function P4(){if(VA)return $y;VA=1;var e=an(),t=Object.defineProperty;return $y=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},$y}var GA;function C4(){if(GA)return jy.exports;GA=1;var e=N4(),t=an(),r=P4(),n="__core-js_shared__",i=jy.exports=t[n]||r(n,{});return(i.versions||(i.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"}),jy.exports}var qy,zA;function M4(){if(zA)return qy;zA=1;var e=C4();return qy=function(t,r){return e[t]||(e[t]=r||{})},qy}var By,WA;function D4(){if(WA)return By;WA=1;var e=cM(),t=Object;return By=function(r){return t(e(r))},By}var ky,YA;function mE(){if(YA)return ky;YA=1;var e=ws(),t=D4(),r=e({}.hasOwnProperty);return ky=Object.hasOwn||function(i,a){return r(t(i),a)},ky}var Uy,xA;function j4(){if(xA)return Uy;xA=1;var e=ws(),t=0,r=Math.random(),n=e(1.1.toString);return Uy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Uy}var Fy,KA;function L4(){if(KA)return Fy;KA=1;var e=an(),t=M4(),r=mE(),n=j4(),i=dM(),a=fM(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return Fy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Fy}var Hy,XA;function $4(){if(XA)return Hy;XA=1;var e=pE(),t=od(),r=pM(),n=A4(),i=O4(),a=L4(),s=TypeError,o=a("toPrimitive");return Hy=function(u,l){if(!t(u)||r(u))return u;var c=n(u,o),d;if(c){if(l===void 0&&(l="default"),d=e(c,u,l),!t(d)||r(d))return d;throw new s("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},Hy}var Vy,JA;function hM(){if(JA)return Vy;JA=1;var e=$4(),t=pM();return Vy=function(r){var n=e(r,"string");return t(n)?n:n+""},Vy}var Gy,QA;function q4(){if(QA)return Gy;QA=1;var e=an(),t=od(),r=e.document,n=t(r)&&t(r.createElement);return Gy=function(i){return n?r.createElement(i):{}},Gy}var zy,ZA;function yM(){if(ZA)return zy;ZA=1;var e=nu(),t=Ra(),r=q4();return zy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),zy}var eO;function B4(){if(eO)return fy;eO=1;var e=nu(),t=pE(),r=E4(),n=oM(),i=b4(),a=hM(),s=mE(),o=yM(),u=Object.getOwnPropertyDescriptor;return fy.f=e?u:function(c,d){if(c=i(c),d=a(d),o)try{return u(c,d)}catch{}if(s(c,d))return n(!t(r.f,c,d),c[d])},fy}var Wy,tO;function k4(){if(tO)return Wy;tO=1;var e=Ra(),t=wa(),r=/#|\.prototype\./,n=function(u,l){var c=a[i(u)];return c===o?!0:c===s?!1:t(l)?e(l):!!l},i=n.normalize=function(u){return String(u).replace(r,".").toLowerCase()},a=n.data={},s=n.NATIVE="N",o=n.POLYFILL="P";return Wy=n,Wy}var Yy,rO;function U4(){if(rO)return Yy;rO=1;var e=sM(),t=mM(),r=sd(),n=e(e.bind);return Yy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},Yy}var xy={},Ky,nO;function F4(){if(nO)return Ky;nO=1;var e=nu(),t=Ra();return Ky=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ky}var Xy,iO;function H4(){if(iO)return Xy;iO=1;var e=od(),t=String,r=TypeError;return Xy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Xy}var aO;function V4(){if(aO)return xy;aO=1;var e=nu(),t=yM(),r=F4(),n=H4(),i=hM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return xy.f=e?r?function(p,f,_){if(n(p),f=i(f),n(_),typeof p=="function"&&f==="prototype"&&"value"in _&&c in _&&!_[c]){var R=o(p,f);R&&R[c]&&(p[f]=_.value,_={configurable:l in _?_[l]:R[l],enumerable:u in _?_[u]:R[u],writable:!1})}return s(p,f,_)}:s:function(p,f,_){if(n(p),f=i(f),n(_),t)try{return s(p,f,_)}catch{}if("get"in _||"set"in _)throw new a("Accessors not supported");return"value"in _&&(p[f]=_.value),p},xy}var Jy,sO;function G4(){if(sO)return Jy;sO=1;var e=nu(),t=V4(),r=oM();return Jy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Jy}var Qy,oO;function z4(){if(oO)return Qy;oO=1;var e=an(),t=_4(),r=sM(),n=wa(),i=B4().f,a=k4(),s=lM(),o=U4(),u=G4(),l=mE(),c=function(d){var p=function(f,_,R){if(this instanceof p){switch(arguments.length){case 0:return new d;case 1:return new d(f);case 2:return new d(f,_)}return new d(f,_,R)}return t(d,this,arguments)};return p.prototype=d.prototype,p};return Qy=function(d,p){var f=d.target,_=d.global,R=d.stat,w=d.proto,O=_?e:R?e[f]:e[f]&&e[f].prototype,h=_?s:s[f]||u(s,f,{})[f],T=h.prototype,b,m,v,A,P,q,z,Y,W;for(A in p)b=a(_?A:f+(R?".":"#")+A,d.forced),m=!b&&O&&l(O,A),q=h[A],m&&(d.dontCallGetSet?(W=i(O,A),z=W&&W.value):z=O[A]),P=m&&z?z:p[A],!(!b&&!w&&typeof q==typeof P)&&(d.bind&&m?Y=o(P,e):d.wrap&&m?Y=c(P):w&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||q&&q.sham)&&u(Y,"sham",!0),u(h,A,Y),w&&(v=f+"Prototype",l(s,v)||u(s,v,{}),u(s[v],A,P),d.real&&T&&(b||!T[A])&&u(T,A,P)))},Qy}var uO;function W4(){if(uO)return fA;uO=1;var e=z4(),t=an();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),fA}var Zy,cO;function Y4(){return cO||(cO=1,W4(),Zy=an()),Zy}var eg,lO;function x4(){if(lO)return eg;lO=1;var e=Y4();return eg=e,eg}var dO;function gM(){if(dO)return Ki;dO=1;var e=Ki&&Ki.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.getImplementation=void 0;var t=e(x4());function r(n,i){var a,s=(a=n[i])!==null&&a!==void 0?a:t.default[i];if(!s)throw new ReferenceError('"'+i+'" is not defined');return s}return Ki.getImplementation=r,Ki}var fO;function _M(){if(fO)return La;fO=1;var e=La&&La.__values||function(o){var u=typeof Symbol=="function"&&Symbol.iterator,l=u&&o[u],c=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&c>=o.length&&(o=void 0),{value:o&&o[c++],done:!o}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(La,"__esModule",{value:!0});var t=XC(),r=gM(),n="x-identity-auth-chain-",i="x-identity-timestamp",a="x-identity-metadata";function s(o){o===void 0&&(o={});var u=(0,r.getImplementation)(o,"Headers");return function(c,d,p,f,_){var R,w,O=new u(_),h=String(Date.now()),T=JSON.stringify(f),b=[d,p,h,T].join(":").toLowerCase(),m=0,v=t.Authenticator.signPayload(c,b);try{for(var A=e(v),P=A.next();!P.done;P=A.next()){var q=P.value;O.set(n+m,JSON.stringify(q)),m++}}catch(z){R={error:z}}finally{try{P&&!P.done&&(w=A.return)&&w.call(A)}finally{if(R)throw R.error}}return O.set(i,h),O.set(a,T),O}}return La.default=s,La}var pO;function EM(){if(pO)return pn;pO=1;var e=pn&&pn.__assign||function(){return e=Object.assign||function(s){for(var o,u=1,l=arguments.length;u<l;u++){o=arguments[u];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])}return s},e.apply(this,arguments)},t=pn&&pn.__rest||function(s,o){var u={};for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.indexOf(l)<0&&(u[l]=s[l]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(s);c<l.length;c++)o.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(s,l[c])&&(u[l[c]]=s[l[c]]);return u},r=pn&&pn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(pn,"__esModule",{value:!0});var n=r(_M()),i=gM();function a(s){s===void 0&&(s={});var o=(0,n.default)(s),u=(0,i.getImplementation)(s,"URL"),l=(0,i.getImplementation)(s,"Request"),c=(0,i.getImplementation)(s,"fetch");return function(p,f){if(f&&f.identity){var _=f.identity,R=f.metadata,w=t(f,["identity","metadata"]);if(typeof p=="string"||p instanceof u||globalThis.URL&&p instanceof globalThis.URL){var O=typeof p=="string"?new u(p):p,h=new l(O.toString(),e(e({},w),{headers:o(_,f.method||"GET",O.pathname,R||{},w==null?void 0:w.headers)}));return c(h)}var T=new u(p.url),b=new l(p),m=o(_,p.method||"GET",T.pathname,R||{});return m.forEach(function(v,A){b.headers.set(A,v)}),c(b)}return c(p,f)}}return pn.default=a,pn}var mO;function K4(){return mO||(mO=1,(function(e){var t=jn&&jn.__createBinding||(Object.create?(function(s,o,u,l){l===void 0&&(l=u),Object.defineProperty(s,l,{enumerable:!0,get:function(){return o[u]}})}):(function(s,o,u,l){l===void 0&&(l=u),s[l]=o[u]})),r=jn&&jn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=jn&&jn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(iM(),e);var i=EM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=_M();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(jn)),jn}var hO;function X4(){return hO||(hO=1,(function(e){var t=Dn&&Dn.__createBinding||(Object.create?(function(a,s,o,u){u===void 0&&(u=o),Object.defineProperty(a,u,{enumerable:!0,get:function(){return s[o]}})}):(function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]})),r=Dn&&Dn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=Dn&&Dn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(iM(),e),r(K4(),e);var i=n(EM());e.default=(0,i.default)()})(Dn)),Dn}var J4=X4();const ud=WO(J4);async function Q4(e,t){const r=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await ud(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function Z4(e,t){const{usd:r}=await Q4(e,t);return r??{balanceCents:0,credits:0}}async function p6(e,t,r){const n=`${Nt.creditsServerUrl}/credits/authorize`,i=await ud(n,{method:"POST",identity:e,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({usdPriceCents:t,tradeId:r})});if(!i.ok)throw new Error(`authorizeUsdCredit ${i.status}: ${await i.text()}`);return i.json()}async function m6(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 i=n.toString(),a=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await ud(a,{method:"GET",identity:t,metadata:{}});if(!s.ok)throw new Error(`fetchUserPurchases ${s.status}: ${await s.text()}`);const o=await s.json(),u=o.purchases??[],l=(r==null?void 0:r.skip)??0,c=r==null?void 0:r.first,d=typeof o.total=="number"?o.total:l+u.length+(u.length>=c?1:0);return{items:u,total:d}}async function h6(e,t){if(t.length===0)return 0;const r=`${Nt.creditsServerUrl}/credits/authorize/cancel`,n=await ud(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 y6(e,t=1e3){const r=await fetch(`${Nt.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 ez(e){return Ll({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>Z4(e.address,e.identity)})}const tz=e=>qo(e.reduce((t,r)=>t+r.priceCredits,0)),Kr=Is((e,t)=>({items:[],open:!1,fittingOpen:!1,add:(r,n="grid")=>{const i=t().items.some(s=>s.id===r.id);if(e(s=>i?{open:!0}:{items:[...s.items,r],open:!0}),i)return;const a=t().items;ci("Shop Added To Cart",{item_id:r.itemId??null,contract_address:r.contractAddress,price_credits:r.priceCredits,price_usd:qo(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:tz(a)})},remove:r=>{const n=t().items.find(i=>i.id===r);e(i=>({items:i.items.filter(a=>a.id!==r)})),n&&ci("Shop Removed From Cart",{item_id:n.itemId??null,cart_size:t().items.length})},clear:()=>e({items:[]}),setOpen:r=>e({open:r}),setFittingOpen:r=>e(r?{fittingOpen:r,open:!1}:{fittingOpen:r})})),ds={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function g6(e){return`${e} ${e===1?ds.nameSingular:ds.name}`}function Un({className:e}){return J.jsx("span",{className:`ico ${ds.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function rz(){const e=Kr(s=>s.items),t=Kr(s=>s.open),r=Kr(s=>s.setOpen),n=Kr(s=>s.setFittingOpen),i=Me.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return Me.useEffect(()=>{if(!t)return;const s=setTimeout(()=>r(!1),4500),o=u=>{i.current&&!i.current.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",o),()=>{clearTimeout(s),document.removeEventListener("mousedown",o)}},[t,e.length,r]),!t||e.length===0?null:J.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[J.jsxs("div",{className:"cart-pop__head",children:[J.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),J.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>J.jsxs("div",{className:"cart-pop__row",children:[J.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?J.jsx("img",{src:s.thumbnail,alt:s.name}):null}),J.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),J.jsxs("div",{className:"cart-pop__price",children:[J.jsx(Un,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),J.jsxs("div",{className:"cart-pop__foot",children:[J.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",J.jsxs("strong",{children:[J.jsx(Un,{className:"ccy-mark"})," ",a]})]}),J.jsxs("div",{className:"cart-pop__actions",children:[J.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),J.jsx(Oo,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var xg=function(e,t){return xg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},xg(e,t)};function Mr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xg(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var qe=function(){return qe=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},qe.apply(this,arguments)};function As(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function vM(e,t,r,n){var i=arguments.length,a=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,r,a):s(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function bM(e,t){return function(r,n){t(r,n,e)}}function TM(e,t,r,n,i,a){function s(O){if(O!==void 0&&typeof O!="function")throw new TypeError("Function expected");return O}for(var o=n.kind,u=o==="getter"?"get":o==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,c=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,p=!1,f=r.length-1;f>=0;f--){var _={};for(var R in n)_[R]=R==="access"?{}:n[R];for(var R in n.access)_.access[R]=n.access[R];_.addInitializer=function(O){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(O||null))};var w=(0,r[f])(o==="accessor"?{get:c.get,set:c.set}:c[u],_);if(o==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(d=s(w.get))&&(c.get=d),(d=s(w.set))&&(c.set=d),(d=s(w.init))&&i.unshift(d)}else(d=s(w))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),p=!0}function SM(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function IM(e){return typeof e=="symbol"?e:"".concat(e)}function RM(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function wM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function AM(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(d){s(d)}}function u(c){try{l(n.throw(c))}catch(d){s(d)}}function l(c){c.done?a(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})}function OM(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){r.label=l[1];break}if(l[0]===6&&r.label<a[1]){r.label=a[1],a=l;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(l);break}a[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var cd=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});function NM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&cd(t,e,r)}function jl(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function hE(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function PM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hE(arguments[t]));return e}function CM(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)n[i]=a[s];return n}function er(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function fs(e){return this instanceof fs?(this.v=e,this):new fs(e)}function MM(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(f){return function(_){return Promise.resolve(_).then(f,d)}}function o(f,_){n[f]&&(i[f]=function(R){return new Promise(function(w,O){a.push([f,R,w,O])>1||u(f,R)})},_&&(i[f]=_(i[f])))}function u(f,_){try{l(n[f](_))}catch(R){p(a[0][3],R)}}function l(f){f.value instanceof fs?Promise.resolve(f.value.v).then(c,d):p(a[0][2],f)}function c(f){u("next",f)}function d(f){u("throw",f)}function p(f,_){f(_),a.shift(),a.length&&u(a[0][0],a[0][1])}}function DM(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,a){t[i]=e[i]?function(s){return(r=!r)?{value:fs(e[i](s)),done:!1}:a?a(s):s}:a}}function jM(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof jl=="function"?jl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(o,u){s=e[a](s),i(o,u,s.done,s.value)})}}function i(a,s,o,u){Promise.resolve(u).then(function(l){a({value:l,done:o})},s)}}function LM(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var nz=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Kg=function(e){return Kg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Kg(e)};function $M(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Kg(e),n=0;n<r.length;n++)r[n]!=="default"&&cd(t,e,r[n]);return nz(t,e),t}function qM(e){return e&&e.__esModule?e:{default:e}}function BM(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function kM(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function UM(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function FM(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(a){return Promise.reject(a)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var iz=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function HM(e){function t(a){e.error=e.hasError?new iz(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var r,n=0;function i(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(i,function(s){return t(s),i()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i()}function VM(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,i,a,s){return n?t?".jsx":".js":i&&(!a||!s)?r:i+a+"."+s.toLowerCase()+"js"}):e}const az={__extends:Mr,__assign:qe,__rest:As,__decorate:vM,__param:bM,__esDecorate:TM,__runInitializers:SM,__propKey:IM,__setFunctionName:RM,__metadata:wM,__awaiter:AM,__generator:OM,__createBinding:cd,__exportStar:NM,__values:jl,__read:hE,__spread:PM,__spreadArrays:CM,__spreadArray:er,__await:fs,__asyncGenerator:MM,__asyncDelegator:DM,__asyncValues:jM,__makeTemplateObject:LM,__importStar:$M,__importDefault:qM,__classPrivateFieldGet:BM,__classPrivateFieldSet:kM,__classPrivateFieldIn:UM,__addDisposableResource:FM,__disposeResources:HM,__rewriteRelativeImportExtension:VM},_6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:FM,get __assign(){return qe},__asyncDelegator:DM,__asyncGenerator:MM,__asyncValues:jM,__await:fs,__awaiter:AM,__classPrivateFieldGet:BM,__classPrivateFieldIn:UM,__classPrivateFieldSet:kM,__createBinding:cd,__decorate:vM,__disposeResources:HM,__esDecorate:TM,__exportStar:NM,__extends:Mr,__generator:OM,__importDefault:qM,__importStar:$M,__makeTemplateObject:LM,__metadata:wM,__param:bM,__propKey:IM,__read:hE,__rest:As,__rewriteRelativeImportExtension:VM,__runInitializers:SM,__setFunctionName:RM,__spread:PM,__spreadArray:er,__spreadArrays:CM,__values:jl,default:az},Symbol.toStringTag,{value:"Module"}));function hr(e,t){var r=t&&t.cache?t.cache:dz,n=t&&t.serializer?t.serializer:lz,i=t&&t.strategy?t.strategy:uz;return i(e,{cache:r,serializer:n})}function sz(e){return e==null||typeof e=="number"||typeof e=="boolean"}function oz(e,t,r,n){var i=sz(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function GM(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,n),t.set(i,a)),a}function zM(e,t,r,n,i){return r.bind(t,e,n,i)}function uz(e,t){var r=e.length===1?oz:GM;return zM(e,this,r,t.cache.create(),t.serializer)}function cz(e,t){return zM(e,this,GM,t.cache.create(),t.serializer)}var lz=function(){return JSON.stringify(arguments)};function yE(){this.cache=Object.create(null)}yE.prototype.get=function(e){return this.cache[e]};yE.prototype.set=function(e,t){this.cache[e]=t};var dz={create:function(){return new yE}},yr={variadic:cz};function WM(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.NumberFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.DateTimeFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.PluralRules).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.Locale).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});hr(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new((e=Intl.ListFormat).bind.apply(e,er([void 0],t,!1)))},{strategy:yr.variadic});var at;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(at||(at={}));var Dt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Dt||(Dt={}));var ps;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ps||(ps={}));function yO(e){return e.type===Dt.literal}function fz(e){return e.type===Dt.argument}function YM(e){return e.type===Dt.number}function xM(e){return e.type===Dt.date}function KM(e){return e.type===Dt.time}function XM(e){return e.type===Dt.select}function JM(e){return e.type===Dt.plural}function pz(e){return e.type===Dt.pound}function QM(e){return e.type===Dt.tag}function ZM(e){return!!(e&&typeof e=="object"&&e.type===ps.number)}function Xg(e){return!!(e&&typeof e=="object"&&e.type===ps.dateTime)}var eD=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mz=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function hz(e){var t={};return e.replace(mz,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var yz=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function gz(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(yz).filter(function(p){return p.length>0}),r=[],n=0,i=t;n<i.length;n++){var a=i[n],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],u=s.slice(1),l=0,c=u;l<c.length;l++){var d=c[l];if(d.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:u})}return r}function _z(e){return e.replace(/^(.*?)-/,"")}var gO=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,tD=/^(@+)?(\+|#+)?[rs]?$/g,Ez=/(\*)(0+)|(#+)(0+)|(0+)/g,rD=/^(0+)$/;function _O(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(tD,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function nD(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function vz(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!rD.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function EO(e){var t={},r=nD(e);return r||t}function bz(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=_z(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=qe(qe(qe({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return qe(qe({},u),EO(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),EO(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Ez,function(u,l,c,d,p,f){if(l)t.minimumIntegerDigits=c.length;else{if(d&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(rD.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(gO.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(gO,function(u,l,c,d,p,f){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var a=i.options[0];a==="w"?t=qe(qe({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=qe(qe({},t),_O(a)));continue}if(tD.test(i.stem)){t=qe(qe({},t),_O(i.stem));continue}var s=nD(i.stem);s&&(t=qe(qe({},t),s));var o=vz(i.stem);o&&(t=qe(qe({},t),o))}return t}var ml={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Tz(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var a=0;n+1<e.length&&e.charAt(n+1)===i;)a++,n++;var s=1+(a&1),o=a<2?1:3+(a>>1),u="a",l=Sz(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)r+=u;for(;s-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function Sz(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=ml[n||""]||ml[r||""]||ml["".concat(r,"-001")]||ml["001"];return i[0]}var tg,Iz=new RegExp("^".concat(eD.source,"*")),Rz=new RegExp("".concat(eD.source,"*$"));function ct(e,t){return{start:e,end:t}}var wz=!!String.prototype.startsWith&&"_a".startsWith("a",1),Az=!!String.fromCodePoint,Oz=!!Object.fromEntries,Nz=!!String.prototype.codePointAt,Pz=!!String.prototype.trimStart,Cz=!!String.prototype.trimEnd,Mz=!!Number.isSafeInteger,Dz=Mz?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Jg=!0;try{var jz=aD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Jg=((tg=jz.exec("a"))===null||tg===void 0?void 0:tg[0])==="a"}catch{Jg=!1}var vO=wz?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Qg=Az?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},bO=Oz?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var a=i[n],s=a[0],o=a[1];r[s]=o}return r},iD=Nz?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),a;return i<55296||i>56319||r+1===n||(a=t.charCodeAt(r+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Lz=Pz?function(t){return t.trimStart()}:function(t){return t.replace(Iz,"")},$z=Cz?function(t){return t.trimEnd()}:function(t){return t.replace(Rz,"")};function aD(e,t){return new RegExp(e,t)}var Zg;if(Jg){var TO=aD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zg=function(t,r){var n;TO.lastIndex=r;var i=TO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Zg=function(t,r){for(var n=[];;){var i=iD(t,r);if(i===void 0||sD(i)||Uz(i))break;n.push(i),r+=i>=65536?2:1}return Qg.apply(void 0,n)};var qz=(function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:Dt.pound,location:ct(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(at.UNMATCHED_CLOSING_TAG,ct(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&e_(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Dt.literal,value:"<".concat(i,"/>"),location:ct(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,r,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!e_(this.char()))return this.error(at.INVALID_TAG,ct(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(at.UNMATCHED_CLOSING_TAG,ct(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Dt.tag,value:i,children:s,location:ct(n,this.clonePosition())},err:null}:this.error(at.INVALID_TAG,ct(o,this.clonePosition())))}else return this.error(at.UNCLOSED_TAG,ct(n,this.clonePosition()))}else return this.error(at.INVALID_TAG,ct(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&kz(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var a=this.tryParseQuote(r);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=ct(n,this.clonePosition());return{val:{type:Dt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Bz(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return Qg.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),Qg(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(at.EMPTY_ARGUMENT,ct(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(at.MALFORMED_ARGUMENT,ct(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Dt.argument,value:i,location:ct(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(at.MALFORMED_ARGUMENT,ct(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Zg(this.message,r),i=r+n.length;this.bumpTo(i);var a=this.clonePosition(),s=ct(t,a);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(at.EXPECT_ARGUMENT_TYPE,ct(s,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var p=$z(d.val);if(p.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var f=ct(c,this.clonePosition());l={style:p,styleLocation:f}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var R=ct(i,this.clonePosition());if(l&&vO(l==null?void 0:l.style,"::",0)){var w=Lz(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(w,l.styleLocation);return d.err?d:{val:{type:Dt.number,value:n,location:R,style:d.val},err:null}}else{if(w.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,R);var O=w;this.locale&&(O=Tz(w,this.locale));var p={type:ps.dateTime,pattern:O,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?hz(O):{}},h=o==="date"?Dt.date:Dt.time;return{val:{type:h,value:n,location:R,style:p},err:null}}}return{val:{type:o==="number"?Dt.number:o==="date"?Dt.date:Dt.time,value:n,location:R,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var T=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(T,qe({},T)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),m=0;if(o!=="select"&&b.value==="offset"){if(!this.bumpIf(":"))return this.error(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,at.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),b=this.parseIdentifierIfPossible(),m=d.val}var v=this.tryParsePluralOrSelectOptions(t,o,r,b);if(v.err)return v;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=ct(i,this.clonePosition());return o==="select"?{val:{type:Dt.select,value:n,options:bO(v.val),location:A},err:null}:{val:{type:Dt.plural,value:n,options:bO(v.val),offset:m,pluralType:o==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(at.INVALID_ARGUMENT_TYPE,ct(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(at.EXPECT_ARGUMENT_CLOSING_BRACE,ct(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(at.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ct(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=gz(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:ps.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?bz(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var a,s=!1,o=[],u=new Set,l=i.value,c=i.location;;){if(l.length===0){var d=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;c=ct(d,this.clonePosition()),l=this.message.slice(d.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?at.DUPLICATE_SELECT_ARGUMENT_SELECTOR:at.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);l==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:at.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ct(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,r,n);if(_.err)return _;var R=this.tryParseArgumentClose(f);if(R.err)return R;o.push([l,{value:_.val,location:ct(f,this.clonePosition())}]),u.add(l),this.bumpSpace(),a=this.parseIdentifierIfPossible(),l=a.value,c=a.location}return o.length===0?this.error(r==="select"?at.EXPECT_SELECT_ARGUMENT_SELECTOR:at.EXPECT_PLURAL_ARGUMENT_SELECTOR,ct(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(at.MISSING_OTHER_CLAUSE,ct(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var u=ct(i,this.clonePosition());return a?(s*=n,Dz(s)?{val:s,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=iD(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(vO(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&sD(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e})();function e_(e){return e>=97&&e<=122||e>=65&&e<=90}function Bz(e){return e_(e)||e===47}function kz(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function sD(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Uz(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function t_(e){e.forEach(function(t){if(delete t.location,XM(t)||JM(t))for(var r in t.options)delete t.options[r].location,t_(t.options[r].value);else YM(t)&&ZM(t.style)||(xM(t)||KM(t))&&Xg(t.style)?delete t.style.location:QM(t)&&t_(t.children)})}function Fz(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new qz(e,t).parse();if(r.err){var n=SyntaxError(at[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||t_(r.val),r.val}var Tn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Tn||(Tn={}));var di=(function(e){Mr(t,e);function t(r,n,i){var a=e.call(this,r)||this;return a.code=n,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),SO=(function(e){Mr(t,e);function t(r,n,i,a){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Tn.INVALID_VALUE,a)||this}return t})(di),Hz=(function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Tn.INVALID_VALUE,i)||this}return t})(di),Vz=(function(e){Mr(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Tn.MISSING_VALUE,n)||this}return t})(di),mr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(mr||(mr={}));function Gz(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==mr.literal||r.type!==mr.literal?t.push(r):n.value+=r.value,t},[])}function oD(e){return typeof e=="function"}function bl(e,t,r,n,i,a,s){if(e.length===1&&yO(e[0]))return[{type:mr.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var c=l[u];if(yO(c)){o.push({type:mr.literal,value:c.value});continue}if(pz(c)){typeof a=="number"&&o.push({type:mr.literal,value:r.getNumberFormat(t).format(a)});continue}var d=c.value;if(!(i&&d in i))throw new Vz(d,s);var p=i[d];if(fz(c)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),o.push({type:typeof p=="string"?mr.literal:mr.object,value:p});continue}if(xM(c)){var f=typeof c.style=="string"?n.date[c.style]:Xg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(KM(c)){var f=typeof c.style=="string"?n.time[c.style]:Xg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(YM(c)){var f=typeof c.style=="string"?n.number[c.style]:ZM(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(p=p*(f.scale||1)),o.push({type:mr.literal,value:r.getNumberFormat(t,f).format(p)});continue}if(QM(c)){var _=c.children,R=c.value,w=i[R];if(!oD(w))throw new Hz(R,"function",s);var O=bl(_,t,r,n,i,a),h=w(O.map(function(m){return m.value}));Array.isArray(h)||(h=[h]),o.push.apply(o,h.map(function(m){return{type:typeof m=="string"?mr.literal:mr.object,value:m}}))}if(XM(c)){var T=c.options[p]||c.options.other;if(!T)throw new SO(c.value,p,Object.keys(c.options),s);o.push.apply(o,bl(T.value,t,r,n,i));continue}if(JM(c)){var T=c.options["=".concat(p)];if(!T){if(!Intl.PluralRules)throw new di(`Intl.PluralRules is not available in this environment.
75
75
  Try polyfilling it using "@formatjs/intl-pluralrules"
76
76
  `,Tn.MISSING_INTL_API,s);var b=r.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));T=c.options[b]||c.options.other}if(!T)throw new SO(c.value,p,Object.keys(c.options),s);o.push.apply(o,bl(T.value,t,r,n,i,p-(c.offset||0)));continue}}return Gz(o)}function zz(e,t){return t?qe(qe(qe({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=qe(qe({},e[n]),t[n]||{}),r},{})):e}function Wz(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=zz(e[n],t[n]),r},qe({},e)):e}function rg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Yz(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:hr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,er([void 0],r,!1)))},{cache:rg(e.number),strategy:yr.variadic}),getDateTimeFormat:hr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,er([void 0],r,!1)))},{cache:rg(e.dateTime),strategy:yr.variadic}),getPluralRules:hr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,er([void 0],r,!1)))},{cache:rg(e.pluralRules),strategy:yr.variadic})}}var uD=(function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=a.formatToParts(u);if(l.length===1)return l[0].value;var c=l.reduce(function(d,p){return!d.length||p.type!==mr.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return bl(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=As(s,["formatters"]);this.ast=e.__parse(t,qe(qe({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Wz(e.formats,n),this.formatters=i&&i.formatters||Yz(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Fz,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})(),ma;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(ma||(ma={}));var iu=(function(e){Mr(t,e);function t(r,n,i){var a=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
77
77
  `).concat(s?`
@@ -92,4 +92,4 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
92
92
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
93
93
  `,Tn.MISSING_INTL_API));try{return p8(e,t,i).format(r,n)}catch(s){e.onError(new qr("Error formatting relative time.",e.locale,s))}return String(r)}var h8=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function pD(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=s&&gE(i,"number",s,a)||{},u=Aa(r,h8,o);return t(n,u)}function y8(e,t,r,n){n===void 0&&(n={});try{return pD(e,t,n).format(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return String(r)}function g8(e,t,r,n){n===void 0&&(n={});try{return pD(e,t,n).formatToParts(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return[]}function _8(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function E8(e){e.onWarn&&e.defaultRichTextElements&&_8(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
94
94
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
95
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function v8(e,t){var r=Zz(t),n=qe(qe({},cD),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new IO('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new IO('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Kz('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),E8(n),qe(qe({},n),{formatters:r,formatNumber:y8.bind(null,n,r.getNumberFormat),formatNumberToParts:g8.bind(null,n,r.getNumberFormat),formatRelativeTime:m8.bind(null,n,r.getRelativeTimeFormat),formatDate:e8.bind(null,n,r.getDateTimeFormat),formatDateToParts:n8.bind(null,n,r.getDateTimeFormat),formatTime:t8.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:r8.bind(null,n,r.getDateTimeFormat),formatTimeToParts:i8.bind(null,n,r.getDateTimeFormat),formatPlural:d8.bind(null,n,r.getPluralRules),formatMessage:r_.bind(null,n,r),$t:r_.bind(null,n,r),formatList:c8.bind(null,n,r.getListFormat),formatListToParts:fD.bind(null,n,r.getListFormat),formatDisplayName:s8.bind(null,n,r.getDisplayNames)})}function b8(e){WM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var T8=qe(qe({},cD),{textComponent:Me.Fragment});function S8(e){return function(t){return e(Me.Children.toArray(t))}}var _E=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Me.createContext(null)):Me.createContext(null);_E.Consumer;var I8=_E.Provider,R8=I8,w8=_E;function mD(){var e=Me.useContext(w8);return b8(e),e}var n_;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(n_||(n_={}));var i_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(i_||(i_={}));function hD(e){var t=function(r){var n=mD(),i=r.value,a=r.children,s=As(r,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?n.formatDateToParts(o,s):n.formatTimeToParts(o,s);return a(u)};return t.displayName=i_[e],t}function au(e){var t=function(r){var n=mD(),i=r.value,a=r.children,s=As(r,["value","children"]),o=n[e](i,s);if(typeof a=="function")return a(o);var u=n.textComponent||Me.Fragment;return Me.createElement(u,null,o)};return t.displayName=n_[e],t}function yD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=oD(n)?S8(n):n,t},{})}var OO=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=yD(n),o=r_.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?Me.Children.toArray(o):o},A8=function(e,t){var r=e.defaultRichTextElements,n=As(e,["defaultRichTextElements"]),i=yD(r),a=v8(qe(qe(qe({},T8),n),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return qe(qe({},a),{formatMessage:OO.bind(null,s,a.formatters),$t:OO.bind(null,s,a.formatters)})};au("formatDate");au("formatTime");au("formatNumber");au("formatList");au("formatDisplayName");hD("formatDate");hD("formatTime");const O8={overview:"Overview",collectibles:"Collectibles",market:"Market",myAssets:"My Assets",myFavorites:"My Favorites",myPurchases:"My Purchases",searchPlaceholder:"Search items, creators, collections…",searchAria:"Search the shop",yourBalance:"Your {currency}",getCredits:"Get {currency}",cart:"Cart"},N8={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"},P8={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},C8={nav:O8,notFound:N8,cart:P8},M8={overview:"Inicio",collectibles:"Coleccionables",market:"Mercado",myAssets:"Mis artículos",myFavorites:"Mis favoritos",myPurchases:"Mis compras",searchPlaceholder:"Buscá artículos, creadores, colecciones…",searchAria:"Buscar en la tienda",yourBalance:"Tus {currency}",getCredits:"Conseguir {currency}",cart:"Carrito"},D8={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},j8={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},L8={nav:M8,notFound:D8,cart:j8},Tl=["en","es"];function a_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?a_(i,a,r):r[a]=String(i)}return r}const $8={en:a_(C8),es:a_(L8)},q8=lD(),ig={};function EE(e){return ig[e]||(ig[e]=A8({locale:e,defaultLocale:"en",messages:$8[e],onError:()=>{}},q8)),ig[e]}let gD=EE("en");function B8(e){gD=EE(e)}function Yr(e,t){return gD.formatMessage({id:e},t)}function k8(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Rs(),a=e==null?void 0:e.address,{data:s,isLoading:o}=fE(a),{data:u}=ez(e),l=Kr(w=>w.items.length),c=c_(),[d,p]=Me.useState(""),f=Me.useRef();Me.useEffect(()=>{i()},[i]);function _(w){c(w.trim()?`/assets?q=${encodeURIComponent(w.trim())}`:"/assets",{replace:!0})}function R(w){p(w),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>_(w),300)}return J.jsxs(J.Fragment,{children:[J.jsx(lU,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),J.jsxs("div",{className:"subnav",children:[J.jsxs("nav",{className:"subnav__tabs",children:[J.jsx(xn,{to:"/overview",children:Yr("nav.overview")}),J.jsx(xn,{to:"/assets",children:Yr("nav.collectibles")}),J.jsx(xn,{to:"/market",children:Yr("nav.market")}),J.jsx(xn,{to:"/my-assets",children:Yr("nav.myAssets")}),J.jsx(xn,{to:"/my-favorites",children:Yr("nav.myFavorites")}),e?J.jsx(xn,{to:"/my-purchases",children:Yr("nav.myPurchases")}):null]}),J.jsxs("div",{className:"subnav__search",children:[J.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),J.jsx("input",{value:d,"aria-label":Yr("nav.searchAria"),placeholder:Yr("nav.searchPlaceholder"),onChange:w=>R(w.target.value),onKeyDown:w=>{w.key==="Enter"&&(f.current&&clearTimeout(f.current),_(d))}})]}),e?J.jsxs("span",{className:"subnav__balance",title:Yr("nav.yourBalance",{currency:ds.name}),children:[J.jsx(Un,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,J.jsxs(xn,{to:"/credits",className:"subnav__credits",children:[J.jsx(Un,{className:"subnav__credits-ico"}),Yr("nav.getCredits",{currency:ds.name})]}),J.jsxs("div",{className:"subnav__cart-wrap",children:[J.jsxs(xn,{to:"/cart",className:"subnav__cart","aria-label":Yr("nav.cart"),children:[J.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?J.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),J.jsx(rz,{})]})]})]})}let U8=0;const Ao=Is(e=>({toasts:[],push:t=>{const r=++U8;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),E6={success:e=>Ao.getState().push({message:e,kind:"success"}),error:e=>Ao.getState().push({message:e,kind:"error"}),info:e=>Ao.getState().push({message:e,kind:"info"})},F8={success:"✓",error:"!",info:"i"};function H8({t:e}){const t=Ao(r=>r.dismiss);return Me.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),J.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[J.jsx("span",{className:"toast__icon","aria-hidden":!0,children:F8[e.kind]}),J.jsx("span",{className:"toast__msg",children:e.message})]})}function V8(){const e=Ao(t=>t.toasts);return e.length===0?null:J.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>J.jsx(H8,{t},t.id))})}const G8=Me.lazy(()=>Gt(()=>import("./index-C29bHRll.js"),__vite__mapDeps([9,1,10,5,11,4,12,13,7,3,14])).then(e=>({default:e.WearablePreview})));function vE(e){return J.jsx(Me.Suspense,{fallback:null,children:J.jsx(G8,{...e})})}function z8(e){return e.itemId?`urn:decentraland:${Nt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}const Ga=Jr.BodyShape.MALE,za=Jr.BodyShape.FEMALE;function s_(e){if(e.category==="emote")return[Ga,za];switch(e.gender){case"male":return[Ga];case"female":return[za];default:return[Ga,za]}}function W8(e){var r;const t=(r=e==null?void 0:e.avatar)==null?void 0:r.bodyShape;return t?t.includes("BaseFemale")?za:Ga:null}function bE(e,t){return t==null||s_(e).includes(t)}function NO(e){return e===za?"Female":"Male"}function Y8(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?za:Ga}function ua(e){return e.category!=="emote"}function ms(e){return ua(e)?e.wearableCategory??`unknown:${e.id}`:null}const x8=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function K8(e){if(!ua(e))return"item";const t=e.wearableCategory;return t?x8.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function PO(e,t=null){const r=new Set,n=new Set;for(const i of e){const a=ms(i);a==null||n.has(a)||bE(i,t)&&(n.add(a),r.add(i.id))}return r}function X8(e,t,r){if(!ua(t))return e;const n=new Set(e);if(n.has(t.id))return n.delete(t.id),n;const i=ms(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&ms(a)===i&&n.delete(a.id);return n.add(t.id),n}function J8(e){const t=new Map;for(const n of e){const i=ms(n);if(i==null)continue;const a=t.get(i)??[];a.push(n.id),t.set(i,a)}const r=new Set;for(const n of t.values())n.length>1&&n.forEach(i=>r.add(i));return r}function Q8(e,t,r=null){const n=[];for(const i of e){if(!t.has(i.id)||!ua(i)||!bE(i,r))continue;const a=z8(i);a&&n.push(a)}return n}const Z8=Me.lazy(()=>Gt(()=>import("./AnimatedBackground-Dd9xdcNr.js"),__vite__mapDeps([15,1,16])));function CO(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function eW(){const e=Kr(m=>m.fittingOpen),t=Kr(m=>m.setFittingOpen),r=Kr(m=>m.items),n=Kr(m=>m.remove),i=c_(),a=Rs(m=>{var v;return(v=m.session)==null?void 0:v.address}),{data:s,isFetched:o}=fE(a),u=!a||o,l=!!a&&!!s,c=l?a:"default",d=W8(s)??Y8(r)??Ga,[p,f]=Me.useState(()=>PO(r,d)),[_,R]=Me.useState(!1);Me.useEffect(()=>{e&&f(PO(r,d))},[e,d]),Me.useEffect(()=>{const m=new Set(r.map(v=>v.id));f(v=>{const A=new Set([...v].filter(P=>m.has(P)));return A.size===v.size?v:A})},[r]);const w=Me.useMemo(()=>J8(r),[r]),O=Me.useMemo(()=>Q8(r,p,d),[r,p,d]),h=r.reduce((m,v)=>m+v.priceCredits,0),T=O.join(",");Me.useEffect(()=>{R(!1)},[T,c]);const b=Me.useRef(!1);return Me.useEffect(()=>{if(!e){b.current=!1;return}b.current||(b.current=!0,ci("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(ua).length,emotes:r.filter(m=>!ua(m)).length,cart_value_credits:h}))},[e,r,h]),Me.useEffect(()=>{if(!e)return;const m=v=>{v.key==="Escape"&&t(!1)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),!e||r.length===0?null:J.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[J.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),J.jsxs("div",{className:"fitting__panel",children:[J.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),J.jsxs("div",{className:"fitting__stage",children:[J.jsx(Me.Suspense,{fallback:null,children:J.jsx(Z8,{})}),u?O.length>0?J.jsxs(J.Fragment,{children:[J.jsx(vE,{profile:c,bodyShape:l?void 0:d,urns:O,type:Jr.PreviewType.AVATAR,emote:Jr.PreviewEmote.FASHION,disableBackground:!0,disableFadeEffect:!0,dev:Nt.chainId===80002,onLoad:()=>R(!0)},c),_?null:J.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:J.jsx("span",{className:"fitting__spinner"})})]}):J.jsxs("div",{className:"fitting__empty-stage",children:[J.jsx("p",{children:"Nothing on right now."}),J.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):J.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:J.jsx("span",{className:"fitting__spinner"})})]}),J.jsxs("div",{className:"fitting__side",children:[J.jsxs("div",{className:"fitting__head",children:[J.jsx("h2",{className:"fitting__title",children:"Fitting room"}),J.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),J.jsx("div",{className:"fitting__items",children:r.map(m=>{const v=ua(m),A=v&&!bE(m,d),P=p.has(m.id),q=w.has(m.id);return J.jsxs("div",{className:`fitting-row${P?" is-on":""}${A?" is-incompatible":""}`,children:[J.jsxs("label",{className:"fitting-row__toggle",children:[J.jsx("input",{type:"checkbox",checked:P,disabled:!v||A,onChange:()=>f(z=>X8(z,m,r))}),J.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),J.jsx("div",{className:"fitting-row__thumb",children:m.thumbnail?J.jsx("img",{src:m.thumbnail,alt:m.name}):null}),J.jsxs("div",{className:"fitting-row__info",children:[J.jsx("div",{className:"fitting-row__name",title:m.name,children:m.name}),J.jsxs("div",{className:"fitting-row__meta",children:[J.jsx("span",{className:`ico ico-slot-${v?K8(m):"item"} fitting-row__slot-ico`,title:v?CO(ms(m)):"Emote",role:"img","aria-label":v?CO(ms(m)):"Emote"}),q&&!A?J.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null,A?J.jsxs("span",{className:"fitting-row__incompat",title:`This item is made for the ${NO(s_(m)[0])} body shape`,children:[NO(s_(m)[0])," only"]}):null]})]}),J.jsxs("div",{className:"fitting-row__price",children:[J.jsx(Un,{className:"fitting-row__diamond"}),m.priceCredits]}),J.jsx("button",{className:"fitting-row__remove",onClick:()=>n(m.id),"aria-label":`Remove ${m.name} from cart`,title:"Remove",children:J.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},m.id)})}),J.jsxs("div",{className:"fitting__foot",children:[J.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",J.jsxs("strong",{children:[ds.symbol," ",h]})]}),J.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const _D="shop:locale";function tW(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&Tl.includes(t))return t;const r=localStorage.getItem(_D);if(r&&Tl.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&Tl.includes(n))return n}catch{}return"en"}const o_=Is(e=>({locale:tW(),setLocale:t=>{try{localStorage.setItem(_D,t)}catch{}e({locale:t})}})),rW=Me.lazy(()=>Gt(()=>import("./ShopFooterInner-8RoKpFAa.js"),__vite__mapDeps([17,1,5,6,14,11,4,3,7])));function nW(){const e=o_(r=>r.locale),t=o_(r=>r.setLocale);return J.jsx("div",{className:"shop-footer",children:J.jsx(Me.Suspense,{fallback:null,children:J.jsx(rW,{locale:e,onChange:r=>{Tl.includes(r)&&t(r)}})})})}function iW(){const[e,t]=Me.useState(!1);return Me.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>t(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const r=window.setTimeout(()=>t(!0),1500);return()=>window.clearTimeout(r)},[]),e?J.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:J.jsx(vE,{id:"preview-warmer",profile:"default",dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function aW(){const e=Rs(t=>t.session);Me.useEffect(()=>{if(!e||e.providerType!==Jr.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var i;return(i=t.removeListener)==null?void 0:i.call(t,"accountsChanged",n)}},[e])}const TE=`${Nt.nftApiUrl}/v1`;function ED(e){if(!e)return 0;try{return Math.ceil(Number(YD(e))*10)}catch{return 0}}function v6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function b6(e,t){var n,i,a;const r=new URLSearchParams({contractAddresses:e,itemId:t,first:"1"});try{const s=await fetch(`${Nt.nftApiUrl}/v2/catalog?${r.toString()}`);if(!s.ok)return"";const{data:o}=await s.json(),u=(n=o==null?void 0:o[0])==null?void 0:n.data;return(((i=u==null?void 0:u.wearable)==null?void 0:i.description)??((a=u==null?void 0:u.emote)==null?void 0:a.description)??"").trim()}catch{return""}}async function T6(e){const{listings:t}=await dd({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 sW(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${TE}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return((a=i==null?void 0:i[0])==null?void 0:a.nft)??null}function vD(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:null,compareAtCredits:e.compareAtCredits!=null&&e.compareAtCredits>e.priceCredits?e.compareAtCredits:void 0,saleEndsAt:e.saleEndsAt!=null?e.saleEndsAt*1e3:void 0}}async function dd(e){var i,a;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),(i=e.rarities)!=null&&i.length&&t.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.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(`${Nt.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 S6(e,t){const{listings:r}=await dd({contractAddress:e,itemId:t,first:1});return r[0]?vD(r[0]):null}async function oW({first:e=100,...t}={}){const{listings:r,total:n}=await dd({...t,first:e});return{items:r.map(vD),total:n}}function uW(e){return{tradeId:e.tradeId,listingType:"primary",contractAddress:e.contractAddress,itemId:e.itemId??"",name:e.name??"",thumbnail:e.thumbnail??"",rarity:e.rarity??"common",category:e.category??"wearable",wearableCategory:e.wearableCategory??null,creator:e.creator??"",manaWei:e.manaWei,available:e.available??0,network:e.network??"MATIC",chainId:e.chainId??Nt.chainId,createdAt:e.createdAt??0}}async function I6({first:e=100,...t}={}){var s,o;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)),(s=t.rarities)!=null&&s.length&&r.set("rarity",t.rarities.join(",")),(o=t.wearableCategories)!=null&&o.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/legacy?${r.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(uW),total:i.total??a.length}}async function R6(e,{category:t="wearable",first:r=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${TE}/nfts?${i.toString()}`);if(!a.ok)throw new Error(`Failed to fetch assets (${a.status})`);const{data:s,total:o}=await a.json();return{assets:s.map(l=>{var c,d,p,f,_;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((f=(p=l.nft.data)==null?void 0:p.emote)==null?void 0:f.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?ED(l.order.price):void 0,tradeId:(_=l.order)==null?void 0:_.tradeId}}),total:o}}const cW="dcl:marketplace";async function w6(e,t){const{TradeService:r}=await Gt(async()=>{const{TradeService:i}=await import("./TradeService-DEgOrBpN.js");return{TradeService:i}},__vite__mapDeps([18,7,1,19,2,8]));return new r(cW,Nt.marketplaceServerUrl,()=>t).addTrade(e)}async function bD(e){const t=await fetch(`${Nt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function lW(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${TE}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function A6(e){var u,l;let t;try{t=await bD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=ED(n==null?void 0:n.amount),a=(r==null?void 0:r.contractAddress)??"",s=(r==null?void 0:r.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((r==null?void 0:r.assetType)===Jr.TradeAssetType.COLLECTION_ITEM){const c=await lW(a,s);return{name:(c==null?void 0:c.name)??"Item",thumbnail:(c==null?void 0:c.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await sW(a,s);return{name:(o==null?void 0:o.name)??`#${s}`,thumbnail:(o==null?void 0:o.image)??"",credits:i,contractAddress:a,tokenId:s}}async function O6(e,t){var i;const{listings:r}=await dd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?bD(n):null}function dW(e,t){return!t||!e.creator?!1:lE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function N6(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function fW(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function pW(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 mW(e,t){var r;return(((r=e==null?void 0:e.trim())==null?void 0:r[0])||t.replace(/^0x/i,"")[0]||"?").toUpperCase()}function hW({address:e,className:t,linkToProfile:r}){var p,f;const n=c_(),{data:i}=fE(e),a=(f=(p=i==null?void 0:i.avatar)==null?void 0:p.snapshots)==null?void 0:f.face256,[s,o]=Me.useState(!1);if(Me.useEffect(()=>o(!1),[a]),!e)return null;const u=(i==null?void 0:i.name)||fW(e),c=!!a&&!s?J.jsx("img",{className:"creator__ava",src:a,alt:"",loading:"lazy",onError:()=>o(!0)}):J.jsx("span",{className:"creator__ava creator__ava--letter",style:{backgroundColor:pW(e)},"aria-hidden":!0,children:mW(i==null?void 0:i.name,e)}),d=J.jsxs(J.Fragment,{children:[c,J.jsxs("span",{className:"creator__name",children:["By ",u]})]});return r?J.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${u}`,onClick:_=>{_.stopPropagation(),n(`/creator/${e}`)},children:d}):J.jsx("span",{className:`creator${t?` ${t}`:""}`,children:d})}const ag="#a09ba8";function MO(e){if(!e)return ag;try{return Jr.Rarity.getColor(e.toLowerCase())||ag}catch{return ag}}function yW(e){const t=typeof e=="string"?e.replace("#",""):"";if(t.length<6)return"#161518";const r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*r+.587*n+.114*i>150?"#161518":"#ffffff"}function gW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function _W(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 Io(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function EW(e){if(!isFinite(e)||e<=0)return"";const t=Math.floor(e/1e3),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return r>0?n>0?`${r}d ${n}h`:`${r}d`:n>0?`${n}h ${i}m`:i>0?`${i}m ${a}s`:`${a}s`}function DO(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function vW({endsAt:e,className:t}){const[r,n]=Me.useState(()=>Io(e));Me.useEffect(()=>{if(n(Io(e)),e==null)return;let a;const s=()=>{const u=Io(e);n(u);const l=DO(u);l>0&&(a=setTimeout(s,l))},o=DO(Io(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=EW(r);return i?J.jsxs("span",{className:t??"sale-countdown",children:[J.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}function bW(e){const[,t]=Me.useState(0);return Me.useEffect(()=>{const r=Io(e.saleEndsAt);if(!isFinite(r)||r<=0||r>2147483647)return;const n=setTimeout(()=>t(i=>i+1),r+1);return()=>clearTimeout(n)},[e.saleEndsAt]),gW(e)}const TW=120,SW=250;function IW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function SE(e){const{item:t}=e,r=e.mode==="market",[n,i]=Me.useState(!1),[a,s]=Me.useState(!1),o=Me.useRef(),u=Me.useRef(),l=Kr(z=>z.add),c=Kr(z=>z.items.some(Y=>Y.id===t.id)),d=Rs(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),p=dW(t,d),f=Dl(z=>z.toggle),_=Dl(z=>!!z.items[t.id]),R=!!t.contractAddress&&!!t.itemId,w=t.tokenId??t.itemId,O=!r&&!!t.contractAddress&&!!w,h=`/item/${t.contractAddress}/${w}`;function T(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),TW)}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function m(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),SW)}const v=IW(t.gender),A=bW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),P=!r&&A,q=P?_W(t.compareAtCredits,t.priceCredits):0;return J.jsxs("article",{className:`card${n?" card--hover":""}`,style:O?{cursor:"pointer"}:void 0,onMouseEnter:T,onMouseLeave:b,children:[O?J.jsx(Oo,{className:"card__link",to:h,state:{item:t,tradeId:t.tradeId},"aria-label":t.name}):null,J.jsxs("div",{className:"card__media",children:[P?J.jsxs("span",{className:"card__sale-badge",children:["SALE",q>0?` -${q}%`:""]}):null,J.jsx("button",{className:`card__fav${_?" is-on":""}`,onClick:z=>{z.stopPropagation(),f(t)},"aria-label":_?"Remove from favorites":"Add to favorites",children:J.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?J.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&R?J.jsxs(J.Fragment,{children:[J.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:J.jsx(vE,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:Jr.PreviewType.AVATAR,emote:t.category==="emote"?void 0:Jr.PreviewEmote.FASHION,dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:m})}),J.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:J.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),J.jsxs("div",{className:"card__body",children:[J.jsxs("div",{className:"card__desc",children:[J.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?J.jsx(hW,{address:t.creator,className:"card__creator",linkToProfile:!0}):J.jsx("div",{className:"card__creator",children:" "})]}),J.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?J.jsxs("div",{className:"card__price card__price--market",children:[J.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),J.jsx(Un,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,J.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?J.jsxs("div",{className:"card__price card__price--sale",children:[J.jsxs("span",{className:"card__price-now",children:[J.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),J.jsxs("span",{className:"card__price-was",children:[J.jsx(Un,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),J.jsx(vW,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):J.jsxs("div",{className:"card__price",children:[J.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),J.jsxs("div",{className:"card__chips",children:[J.jsx("span",{className:"chip chip--rarity",style:{background:MO(t.rarity),color:yW(MO(t.rarity))},children:t.rarity}),t.category==="wearable"?J.jsx("span",{className:"chip chip--icon",children:J.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,v?J.jsx("span",{className:"chip chip--icon",children:v}):null]})]}),r&&e.mode==="market"?J.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):J.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),p||l(t,"grid")},disabled:c||p,children:[p?null:J.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),p?"Your item":c?"In cart":"Add to cart"]})]})]})}function RW(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 TD(e){var t,r,n,i,a,s;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)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category),rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:e.priceCredits??0,gender:RW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function P6(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(TD);return{items:o,total:s??r+o.length}}async function wW(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(TD);return{items:o,total:s??r+o.length}}const AW=8,OW=8,NW=12;function PW(){const t=Yg(i=>i.followed).slice(0,AW),{data:r=[],isLoading:n}=Ll({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>wW(a,{first:OW}).then(s=>s.items).catch(()=>[])));return CW(i).filter(a=>a.priceCredits>0).slice(0,NW)}});return t.length===0||!n&&r.length===0?null:J.jsxs("section",{className:"row",children:[J.jsx("div",{className:"row__head",children:J.jsx("h2",{className:"row__title",children:"From creators you follow"})}),J.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>J.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>J.jsx(SE,{item:i},i.id))})]})}function CW(e){const t=[],r=new Set,n=e.reduce((i,a)=>Math.max(i,a.length),0);for(let i=0;i<n;i++)for(const a of e){const s=a[i];s&&!r.has(s.id)&&(r.add(s.id),t.push(s))}return t}const SD="shop:recently-viewed",ID=12;function RD(){try{const e=localStorage.getItem(SD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,ID):[]}catch{return[]}}function C6(e){if(e!=null&&e.id)try{const t=[e,...RD().filter(r=>r.id!==e.id)].slice(0,ID);localStorage.setItem(SD,JSON.stringify(t))}catch{}}function MW({excludeId:e}){const t=Me.useMemo(()=>RD().filter(r=>r.id!==e),[e]);return t.length===0?null:J.jsxs("section",{className:"row",children:[J.jsx("div",{className:"row__head",children:J.jsx("h2",{className:"row__title",children:"Recently viewed"})}),J.jsx("div",{className:"row__track",children:t.map(r=>J.jsx(SE,{item:r},r.id))})]})}function jO({title:e,items:t,loading:r}){return J.jsxs("section",{className:"row",children:[J.jsxs("div",{className:"row__head",children:[J.jsx("h2",{className:"row__title",children:e}),J.jsxs(Oo,{className:"row__viewall",to:"/assets",children:["View all ",J.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),J.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>J.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>J.jsx(SE,{item:n},n.id))})]})}function DW(){const{data:e,isLoading:t}=Ll({queryKey:["overview-listings"],queryFn:()=>oW({first:24})}),r=(e==null?void 0:e.items)??[];return J.jsxs("div",{className:"overview",children:[J.jsx("section",{className:"hero",children:J.jsxs("div",{className:"hero__inner",children:[J.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),J.jsx(Oo,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),J.jsx(PW,{}),J.jsx(MW,{}),t||r.length>0?J.jsxs(J.Fragment,{children:[J.jsx(jO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>12?J.jsx(jO,{title:"New Creations",items:r.slice(12,24),loading:!1}):null]}):J.jsxs("div",{className:"overview__empty",children:[J.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),J.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),J.jsx(Oo,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const jW={"/overview":"overview","/assets":"assets","/market":"market","/my-assets":"my_assets","/my-favorites":"favorites","/my-purchases":"my_purchases","/import":"import","/cart":"cart","/credits":"credits","/success":"success"},LW=Me.lazy(()=>Gt(()=>import("./Assets-CiliORHD.js"),__vite__mapDeps([20,1,21,22,23,24,7])).then(e=>({default:e.Assets}))),$W=Me.lazy(()=>Gt(()=>import("./Market-DukToX_a.js"),__vite__mapDeps([25,1,26,19,7,21,22,23,27,28,24])).then(e=>({default:e.Market}))),qW=Me.lazy(()=>Gt(()=>import("./ItemDetail-AUtVrqo2.js"),__vite__mapDeps([29,1,27,19,7,28,30])).then(e=>({default:e.ItemDetail}))),BW=Me.lazy(()=>Gt(()=>import("./Collection-CLqyQ4IW.js"),__vite__mapDeps([31,1,32,33,22,23,24,7])).then(e=>({default:e.Collection}))),kW=Me.lazy(()=>Gt(()=>import("./Creator-CTk-ONpp.js"),__vite__mapDeps([34,1,32,33,22,23,24,7])).then(e=>({default:e.Creator}))),UW=Me.lazy(()=>Gt(()=>import("./MyAssets-DMCwa8LT.js"),__vite__mapDeps([35,1,36,27,19,7,26,37,23,24,38])).then(e=>({default:e.MyAssets}))),FW=Me.lazy(()=>Gt(()=>import("./MyFavorites-BC03Z8wP.js"),__vite__mapDeps([39,1,23,7])).then(e=>({default:e.MyFavorites}))),HW=Me.lazy(()=>Gt(()=>import("./MyPurchases-qPRFc9_j.js"),__vite__mapDeps([40,1,23,24,7])).then(e=>({default:e.MyPurchases}))),VW=Me.lazy(()=>Gt(()=>import("./ImportListings-Bz87d_7q.js"),__vite__mapDeps([41,1,36,27,19,7,26,37,42])).then(e=>({default:e.ImportListings}))),GW=Me.lazy(()=>Gt(()=>import("./Cart-Dsd18EG4.js"),__vite__mapDeps([43,1,27,19,7,28])).then(e=>({default:e.Cart}))),zW=Me.lazy(()=>Gt(()=>import("./GetCredits-C7Y8uBQl.js"),__vite__mapDeps([44,1,12,5,7])).then(e=>({default:e.GetCredits}))),WW=Me.lazy(()=>Gt(()=>import("./Success-GfAGChY9.js"),__vite__mapDeps([45,1,37,7])).then(e=>({default:e.Success}))),YW=Me.lazy(()=>Gt(()=>import("./NotFound-sJkXCHr2.js"),__vite__mapDeps([46,1,7])).then(e=>({default:e.NotFound})));function xW(){return J.jsx("div",{className:"page-loading","aria-busy":"true",children:J.jsx("span",{className:"spinner","aria-hidden":!0})})}function KW(){return J.jsxs("div",{className:"overview__empty",children:[J.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),J.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),J.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function XW(){aW();const e=UD();return Me.useEffect(()=>{o4()},[]),Me.useEffect(()=>{const t=e.pathname,r=jW[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");n4(r)},[e.pathname]),J.jsxs(J.Fragment,{children:[J.jsx(V8,{}),J.jsx(iW,{}),J.jsx(eW,{}),J.jsx(k8,{}),J.jsx("main",{className:"page",children:J.jsx(Cl,{fallback:J.jsx(KW,{}),children:J.jsx(Me.Suspense,{fallback:J.jsx(xW,{}),children:J.jsxs(FD,{children:[J.jsx(dr,{path:"/",element:J.jsx(HD,{to:"/overview",replace:!0})}),J.jsx(dr,{path:"/overview",element:J.jsx(DW,{})}),J.jsx(dr,{path:"/assets",element:J.jsx(LW,{})}),J.jsx(dr,{path:"/market",element:J.jsx($W,{})}),J.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:J.jsx(qW,{})}),J.jsx(dr,{path:"/collection/:contractAddress",element:J.jsx(BW,{})}),J.jsx(dr,{path:"/creator/:address",element:J.jsx(kW,{})}),J.jsx(dr,{path:"/my-assets",element:J.jsx(UW,{})}),J.jsx(dr,{path:"/my-favorites",element:J.jsx(FW,{})}),J.jsx(dr,{path:"/my-purchases",element:J.jsx(HW,{})}),J.jsx(dr,{path:"/import",element:J.jsx(VW,{})}),J.jsx(dr,{path:"/cart",element:J.jsx(GW,{})}),J.jsx(dr,{path:"/credits",element:J.jsx(zW,{})}),J.jsx(dr,{path:"/success",element:J.jsx(WW,{})}),J.jsx(dr,{path:"*",element:J.jsx(YW,{})})]})})})}),J.jsx(Cl,{fallback:J.jsx(J.Fragment,{}),children:J.jsx(nW,{})})]})}function JW({children:e}){const t=o_(r=>r.locale);return B8(t),J.jsx(R8,{value:EE(t),children:e},t)}m4();const QW=new _j({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),ZW=["localhost","127.0.0.1"].includes(window.location.hostname),e6=ZW?void 0:"/shop";VD.createRoot(document.getElementById("root")).render(J.jsx(YO.StrictMode,{children:J.jsx(vj,{client:QW,children:J.jsx(JW,{children:J.jsx(GD,{basename:e6,children:J.jsx(XW,{})})})})}));export{r3 as $,SE as A,v0 as B,hW as C,nA as D,p6 as E,d6 as F,f6 as G,a4 as H,h6 as I,O6 as J,fE as K,z8 as L,W8 as M,bE as N,Y8 as O,Ga as P,g6 as Q,I6 as R,dj as S,s6 as T,a6 as U,Cj as V,vE as W,i6 as X,ud as Y,y6 as Z,Gt as _,Rs as a,bn as a0,s_ as a1,NO as a2,bW as a3,l6 as a4,C6 as a5,_W as a6,vW as a7,S6 as a8,b6 as a9,R6 as aa,T6 as ab,tn as ac,cH as ad,J4 as ae,tu as af,Q_ as ag,_6 as ah,F_ as ai,xP as aj,KP as ak,qH as al,TH as am,m6 as b,Ll as c,Un as d,A6 as e,P6 as f,bD as g,Nt as h,Jr as i,ci as j,ds as k,oW as l,Yg as m,wW as n,Kr as o,w6 as p,dW as q,en as r,E6 as s,Yr as t,Dl as u,N6 as v,v6 as w,ez as x,Ej as y,qo as z};
95
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function v8(e,t){var r=Zz(t),n=qe(qe({},cD),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new IO('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new IO('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Kz('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),E8(n),qe(qe({},n),{formatters:r,formatNumber:y8.bind(null,n,r.getNumberFormat),formatNumberToParts:g8.bind(null,n,r.getNumberFormat),formatRelativeTime:m8.bind(null,n,r.getRelativeTimeFormat),formatDate:e8.bind(null,n,r.getDateTimeFormat),formatDateToParts:n8.bind(null,n,r.getDateTimeFormat),formatTime:t8.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:r8.bind(null,n,r.getDateTimeFormat),formatTimeToParts:i8.bind(null,n,r.getDateTimeFormat),formatPlural:d8.bind(null,n,r.getPluralRules),formatMessage:r_.bind(null,n,r),$t:r_.bind(null,n,r),formatList:c8.bind(null,n,r.getListFormat),formatListToParts:fD.bind(null,n,r.getListFormat),formatDisplayName:s8.bind(null,n,r.getDisplayNames)})}function b8(e){WM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var T8=qe(qe({},cD),{textComponent:Me.Fragment});function S8(e){return function(t){return e(Me.Children.toArray(t))}}var _E=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Me.createContext(null)):Me.createContext(null);_E.Consumer;var I8=_E.Provider,R8=I8,w8=_E;function mD(){var e=Me.useContext(w8);return b8(e),e}var n_;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(n_||(n_={}));var i_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(i_||(i_={}));function hD(e){var t=function(r){var n=mD(),i=r.value,a=r.children,s=As(r,["value","children"]),o=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?n.formatDateToParts(o,s):n.formatTimeToParts(o,s);return a(u)};return t.displayName=i_[e],t}function au(e){var t=function(r){var n=mD(),i=r.value,a=r.children,s=As(r,["value","children"]),o=n[e](i,s);if(typeof a=="function")return a(o);var u=n.textComponent||Me.Fragment;return Me.createElement(u,null,o)};return t.displayName=n_[e],t}function yD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=oD(n)?S8(n):n,t},{})}var OO=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=yD(n),o=r_.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?Me.Children.toArray(o):o},A8=function(e,t){var r=e.defaultRichTextElements,n=As(e,["defaultRichTextElements"]),i=yD(r),a=v8(qe(qe(qe({},T8),n),{defaultRichTextElements:i}),t),s={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:i};return qe(qe({},a),{formatMessage:OO.bind(null,s,a.formatters),$t:OO.bind(null,s,a.formatters)})};au("formatDate");au("formatTime");au("formatNumber");au("formatList");au("formatDisplayName");hD("formatDate");hD("formatTime");const O8={overview:"Overview",collectibles:"Collectibles",market:"Market",myAssets:"My Assets",myFavorites:"My Favorites",myPurchases:"My Purchases",searchPlaceholder:"Search items, creators, collections…",searchAria:"Search the shop",yourBalance:"Your {currency}",getCredits:"Get {currency}",cart:"Cart"},N8={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"},P8={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},C8={nav:O8,notFound:N8,cart:P8},M8={overview:"Inicio",collectibles:"Coleccionables",market:"Mercado",myAssets:"Mis artículos",myFavorites:"Mis favoritos",myPurchases:"Mis compras",searchPlaceholder:"Buscá artículos, creadores, colecciones…",searchAria:"Buscar en la tienda",yourBalance:"Tus {currency}",getCredits:"Conseguir {currency}",cart:"Carrito"},D8={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},j8={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},L8={nav:M8,notFound:D8,cart:j8},Tl=["en","es"];function a_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?a_(i,a,r):r[a]=String(i)}return r}const $8={en:a_(C8),es:a_(L8)},q8=lD(),ig={};function EE(e){return ig[e]||(ig[e]=A8({locale:e,defaultLocale:"en",messages:$8[e],onError:()=>{}},q8)),ig[e]}let gD=EE("en");function B8(e){gD=EE(e)}function Yr(e,t){return gD.formatMessage({id:e},t)}function k8(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Rs(),a=e==null?void 0:e.address,{data:s,isLoading:o}=fE(a),{data:u}=ez(e),l=Kr(w=>w.items.length),c=c_(),[d,p]=Me.useState(""),f=Me.useRef();Me.useEffect(()=>{i()},[i]);function _(w){c(w.trim()?`/assets?q=${encodeURIComponent(w.trim())}`:"/assets",{replace:!0})}function R(w){p(w),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>_(w),300)}return J.jsxs(J.Fragment,{children:[J.jsx(lU,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),J.jsxs("div",{className:"subnav",children:[J.jsxs("nav",{className:"subnav__tabs",children:[J.jsx(xn,{to:"/overview",children:Yr("nav.overview")}),J.jsx(xn,{to:"/assets",children:Yr("nav.collectibles")}),J.jsx(xn,{to:"/market",children:Yr("nav.market")}),J.jsx(xn,{to:"/my-assets",children:Yr("nav.myAssets")}),J.jsx(xn,{to:"/my-favorites",children:Yr("nav.myFavorites")}),e?J.jsx(xn,{to:"/my-purchases",children:Yr("nav.myPurchases")}):null]}),J.jsxs("div",{className:"subnav__search",children:[J.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),J.jsx("input",{value:d,"aria-label":Yr("nav.searchAria"),placeholder:Yr("nav.searchPlaceholder"),onChange:w=>R(w.target.value),onKeyDown:w=>{w.key==="Enter"&&(f.current&&clearTimeout(f.current),_(d))}})]}),e?J.jsxs("span",{className:"subnav__balance",title:Yr("nav.yourBalance",{currency:ds.name}),children:[J.jsx(Un,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,J.jsxs(xn,{to:"/credits",className:"subnav__credits",children:[J.jsx(Un,{className:"subnav__credits-ico"}),Yr("nav.getCredits",{currency:ds.name})]}),J.jsxs("div",{className:"subnav__cart-wrap",children:[J.jsxs(xn,{to:"/cart",className:"subnav__cart","aria-label":Yr("nav.cart"),children:[J.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?J.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),J.jsx(rz,{})]})]})]})}let U8=0;const Ao=Is(e=>({toasts:[],push:t=>{const r=++U8;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),E6={success:e=>Ao.getState().push({message:e,kind:"success"}),error:e=>Ao.getState().push({message:e,kind:"error"}),info:e=>Ao.getState().push({message:e,kind:"info"})},F8={success:"✓",error:"!",info:"i"};function H8({t:e}){const t=Ao(r=>r.dismiss);return Me.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),J.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[J.jsx("span",{className:"toast__icon","aria-hidden":!0,children:F8[e.kind]}),J.jsx("span",{className:"toast__msg",children:e.message})]})}function V8(){const e=Ao(t=>t.toasts);return e.length===0?null:J.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>J.jsx(H8,{t},t.id))})}const G8=Me.lazy(()=>Gt(()=>import("./index-D_YEolFF.js"),__vite__mapDeps([9,1,10,5,11,4,12,13,7,3,14])).then(e=>({default:e.WearablePreview})));function vE(e){return J.jsx(Me.Suspense,{fallback:null,children:J.jsx(G8,{...e})})}function z8(e){return e.itemId?`urn:decentraland:${Nt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}const Ga=Jr.BodyShape.MALE,za=Jr.BodyShape.FEMALE;function s_(e){if(e.category==="emote")return[Ga,za];switch(e.gender){case"male":return[Ga];case"female":return[za];default:return[Ga,za]}}function W8(e){var r;const t=(r=e==null?void 0:e.avatar)==null?void 0:r.bodyShape;return t?t.includes("BaseFemale")?za:Ga:null}function bE(e,t){return t==null||s_(e).includes(t)}function NO(e){return e===za?"Female":"Male"}function Y8(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?za:Ga}function ua(e){return e.category!=="emote"}function ms(e){return ua(e)?e.wearableCategory??`unknown:${e.id}`:null}const x8=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function K8(e){if(!ua(e))return"item";const t=e.wearableCategory;return t?x8.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function PO(e,t=null){const r=new Set,n=new Set;for(const i of e){const a=ms(i);a==null||n.has(a)||bE(i,t)&&(n.add(a),r.add(i.id))}return r}function X8(e,t,r){if(!ua(t))return e;const n=new Set(e);if(n.has(t.id))return n.delete(t.id),n;const i=ms(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&ms(a)===i&&n.delete(a.id);return n.add(t.id),n}function J8(e){const t=new Map;for(const n of e){const i=ms(n);if(i==null)continue;const a=t.get(i)??[];a.push(n.id),t.set(i,a)}const r=new Set;for(const n of t.values())n.length>1&&n.forEach(i=>r.add(i));return r}function Q8(e,t,r=null){const n=[];for(const i of e){if(!t.has(i.id)||!ua(i)||!bE(i,r))continue;const a=z8(i);a&&n.push(a)}return n}const Z8=Me.lazy(()=>Gt(()=>import("./AnimatedBackground-Cjl8m9yV.js"),__vite__mapDeps([15,1,16])));function CO(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function eW(){const e=Kr(m=>m.fittingOpen),t=Kr(m=>m.setFittingOpen),r=Kr(m=>m.items),n=Kr(m=>m.remove),i=c_(),a=Rs(m=>{var v;return(v=m.session)==null?void 0:v.address}),{data:s,isFetched:o}=fE(a),u=!a||o,l=!!a&&!!s,c=l?a:"default",d=W8(s)??Y8(r)??Ga,[p,f]=Me.useState(()=>PO(r,d)),[_,R]=Me.useState(!1);Me.useEffect(()=>{e&&f(PO(r,d))},[e,d]),Me.useEffect(()=>{const m=new Set(r.map(v=>v.id));f(v=>{const A=new Set([...v].filter(P=>m.has(P)));return A.size===v.size?v:A})},[r]);const w=Me.useMemo(()=>J8(r),[r]),O=Me.useMemo(()=>Q8(r,p,d),[r,p,d]),h=r.reduce((m,v)=>m+v.priceCredits,0),T=O.join(",");Me.useEffect(()=>{R(!1)},[T,c]);const b=Me.useRef(!1);return Me.useEffect(()=>{if(!e){b.current=!1;return}b.current||(b.current=!0,ci("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(ua).length,emotes:r.filter(m=>!ua(m)).length,cart_value_credits:h}))},[e,r,h]),Me.useEffect(()=>{if(!e)return;const m=v=>{v.key==="Escape"&&t(!1)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t]),!e||r.length===0?null:J.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[J.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),J.jsxs("div",{className:"fitting__panel",children:[J.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),J.jsxs("div",{className:"fitting__stage",children:[J.jsx(Me.Suspense,{fallback:null,children:J.jsx(Z8,{})}),u?O.length>0?J.jsxs(J.Fragment,{children:[J.jsx(vE,{profile:c,bodyShape:l?void 0:d,urns:O,type:Jr.PreviewType.AVATAR,emote:Jr.PreviewEmote.FASHION,disableBackground:!0,disableFadeEffect:!0,dev:Nt.chainId===80002,onLoad:()=>R(!0)},c),_?null:J.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:J.jsx("span",{className:"fitting__spinner"})})]}):J.jsxs("div",{className:"fitting__empty-stage",children:[J.jsx("p",{children:"Nothing on right now."}),J.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):J.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:J.jsx("span",{className:"fitting__spinner"})})]}),J.jsxs("div",{className:"fitting__side",children:[J.jsxs("div",{className:"fitting__head",children:[J.jsx("h2",{className:"fitting__title",children:"Fitting room"}),J.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),J.jsx("div",{className:"fitting__items",children:r.map(m=>{const v=ua(m),A=v&&!bE(m,d),P=p.has(m.id),q=w.has(m.id);return J.jsxs("div",{className:`fitting-row${P?" is-on":""}${A?" is-incompatible":""}`,children:[J.jsxs("label",{className:"fitting-row__toggle",children:[J.jsx("input",{type:"checkbox",checked:P,disabled:!v||A,onChange:()=>f(z=>X8(z,m,r))}),J.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),J.jsx("div",{className:"fitting-row__thumb",children:m.thumbnail?J.jsx("img",{src:m.thumbnail,alt:m.name}):null}),J.jsxs("div",{className:"fitting-row__info",children:[J.jsx("div",{className:"fitting-row__name",title:m.name,children:m.name}),J.jsxs("div",{className:"fitting-row__meta",children:[J.jsx("span",{className:`ico ico-slot-${v?K8(m):"item"} fitting-row__slot-ico`,title:v?CO(ms(m)):"Emote",role:"img","aria-label":v?CO(ms(m)):"Emote"}),q&&!A?J.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null,A?J.jsxs("span",{className:"fitting-row__incompat",title:`This item is made for the ${NO(s_(m)[0])} body shape`,children:[NO(s_(m)[0])," only"]}):null]})]}),J.jsxs("div",{className:"fitting-row__price",children:[J.jsx(Un,{className:"fitting-row__diamond"}),m.priceCredits]}),J.jsx("button",{className:"fitting-row__remove",onClick:()=>n(m.id),"aria-label":`Remove ${m.name} from cart`,title:"Remove",children:J.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},m.id)})}),J.jsxs("div",{className:"fitting__foot",children:[J.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",J.jsxs("strong",{children:[ds.symbol," ",h]})]}),J.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const _D="shop:locale";function tW(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&Tl.includes(t))return t;const r=localStorage.getItem(_D);if(r&&Tl.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&Tl.includes(n))return n}catch{}return"en"}const o_=Is(e=>({locale:tW(),setLocale:t=>{try{localStorage.setItem(_D,t)}catch{}e({locale:t})}})),rW=Me.lazy(()=>Gt(()=>import("./ShopFooterInner-C1NvVNG3.js"),__vite__mapDeps([17,1,5,6,14,11,4,3,7])));function nW(){const e=o_(r=>r.locale),t=o_(r=>r.setLocale);return J.jsx("div",{className:"shop-footer",children:J.jsx(Me.Suspense,{fallback:null,children:J.jsx(rW,{locale:e,onChange:r=>{Tl.includes(r)&&t(r)}})})})}function iW(){const[e,t]=Me.useState(!1);return Me.useEffect(()=>{if(typeof window.requestIdleCallback=="function"){const n=window.requestIdleCallback(()=>t(!0),{timeout:3e3});return()=>window.cancelIdleCallback(n)}const r=window.setTimeout(()=>t(!0),1500);return()=>window.clearTimeout(r)},[]),e?J.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:J.jsx(vE,{id:"preview-warmer",profile:"default",dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function aW(){const e=Rs(t=>t.session);Me.useEffect(()=>{if(!e||e.providerType!==Jr.ProviderType.INJECTED)return;const t=e.web3Provider.provider;if(!(t!=null&&t.on)||!t.removeListener)return;const r=e.address.toLowerCase(),n=(...i)=>{var o;((o=(i[0]??[])[0])==null?void 0:o.toLowerCase())!==r&&window.location.reload()};return t.on("accountsChanged",n),()=>{var i;return(i=t.removeListener)==null?void 0:i.call(t,"accountsChanged",n)}},[e])}const TE=`${Nt.nftApiUrl}/v1`;function ED(e){if(!e)return 0;try{return Math.ceil(Number(YD(e))*10)}catch{return 0}}function v6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function b6(e,t){var n,i,a;const r=new URLSearchParams({contractAddresses:e,itemId:t,first:"1"});try{const s=await fetch(`${Nt.nftApiUrl}/v2/catalog?${r.toString()}`);if(!s.ok)return"";const{data:o}=await s.json(),u=(n=o==null?void 0:o[0])==null?void 0:n.data;return(((i=u==null?void 0:u.wearable)==null?void 0:i.description)??((a=u==null?void 0:u.emote)==null?void 0:a.description)??"").trim()}catch{return""}}async function T6(e){const{listings:t}=await dd({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 sW(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${TE}/nfts?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return((a=i==null?void 0:i[0])==null?void 0:a.nft)??null}function vD(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:null,compareAtCredits:e.compareAtCredits!=null&&e.compareAtCredits>e.priceCredits?e.compareAtCredits:void 0,saleEndsAt:e.saleEndsAt!=null?e.saleEndsAt*1e3:void 0}}async function dd(e){var i,a;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),(i=e.rarities)!=null&&i.length&&t.set("rarity",e.rarities.join(",")),(a=e.wearableCategories)!=null&&a.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(`${Nt.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 S6(e,t){const{listings:r}=await dd({contractAddress:e,itemId:t,first:1});return r[0]?vD(r[0]):null}async function oW({first:e=100,...t}={}){const{listings:r,total:n}=await dd({...t,first:e});return{items:r.map(vD),total:n}}function uW(e){return{tradeId:e.tradeId,listingType:"primary",contractAddress:e.contractAddress,itemId:e.itemId??"",name:e.name??"",thumbnail:e.thumbnail??"",rarity:e.rarity??"common",category:e.category??"wearable",wearableCategory:e.wearableCategory??null,creator:e.creator??"",manaWei:e.manaWei,available:e.available??0,network:e.network??"MATIC",chainId:e.chainId??Nt.chainId,createdAt:e.createdAt??0}}async function I6({first:e=100,...t}={}){var s,o;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)),(s=t.rarities)!=null&&s.length&&r.set("rarity",t.rarities.join(",")),(o=t.wearableCategories)!=null&&o.length&&r.set("wearableCategory",t.wearableCategories.join(",")),t.search&&r.set("search",t.search),t.sortBy&&r.set("sortBy",t.sortBy);const n=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/legacy?${r.toString()}`);if(!n.ok)throw new Error(`fetchLegacyListings ${n.status}`);const i=await n.json(),a=i.data??[];return{items:a.map(uW),total:i.total??a.length}}async function R6(e,{category:t="wearable",first:r=48,skip:n=0}={}){const i=new URLSearchParams({owner:e.toLowerCase(),category:t,first:String(r),skip:String(n),sortBy:"newest",orderDirection:"desc"}),a=await fetch(`${TE}/nfts?${i.toString()}`);if(!a.ok)throw new Error(`Failed to fetch assets (${a.status})`);const{data:s,total:o}=await a.json();return{assets:s.map(l=>{var c,d,p,f,_;return{id:l.nft.id,contractAddress:l.nft.contractAddress,tokenId:l.nft.tokenId,itemId:l.nft.itemId??null,name:l.nft.name,category:l.nft.category,image:l.nft.image,rarity:((d=(c=l.nft.data)==null?void 0:c.wearable)==null?void 0:d.rarity)??((f=(p=l.nft.data)==null?void 0:p.emote)==null?void 0:f.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?ED(l.order.price):void 0,tradeId:(_=l.order)==null?void 0:_.tradeId}}),total:o}}const cW="dcl:marketplace";async function w6(e,t){const{TradeService:r}=await Gt(async()=>{const{TradeService:i}=await import("./TradeService-BoqqCerU.js");return{TradeService:i}},__vite__mapDeps([18,7,1,19,2,8]));return new r(cW,Nt.marketplaceServerUrl,()=>t).addTrade(e)}async function bD(e){const t=await fetch(`${Nt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function lW(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${TE}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function A6(e){var u,l;let t;try{t=await bD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=ED(n==null?void 0:n.amount),a=(r==null?void 0:r.contractAddress)??"",s=(r==null?void 0:r.value)??"";if(!a)return{name:"Item",thumbnail:"",credits:i,contractAddress:""};if((r==null?void 0:r.assetType)===Jr.TradeAssetType.COLLECTION_ITEM){const c=await lW(a,s);return{name:(c==null?void 0:c.name)??"Item",thumbnail:(c==null?void 0:c.thumbnail)??"",credits:i,contractAddress:a,itemId:s}}const o=await sW(a,s);return{name:(o==null?void 0:o.name)??`#${s}`,thumbnail:(o==null?void 0:o.image)??"",credits:i,contractAddress:a,tokenId:s}}async function O6(e,t){var i;const{listings:r}=await dd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?bD(n):null}function dW(e,t){return!t||!e.creator?!1:lE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function N6(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function fW(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function pW(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 mW(e,t){var r;return(((r=e==null?void 0:e.trim())==null?void 0:r[0])||t.replace(/^0x/i,"")[0]||"?").toUpperCase()}function hW({address:e,className:t,linkToProfile:r}){var p,f;const n=c_(),{data:i}=fE(e),a=(f=(p=i==null?void 0:i.avatar)==null?void 0:p.snapshots)==null?void 0:f.face256,[s,o]=Me.useState(!1);if(Me.useEffect(()=>o(!1),[a]),!e)return null;const u=(i==null?void 0:i.name)||fW(e),c=!!a&&!s?J.jsx("img",{className:"creator__ava",src:a,alt:"",loading:"lazy",onError:()=>o(!0)}):J.jsx("span",{className:"creator__ava creator__ava--letter",style:{backgroundColor:pW(e)},"aria-hidden":!0,children:mW(i==null?void 0:i.name,e)}),d=J.jsxs(J.Fragment,{children:[c,J.jsxs("span",{className:"creator__name",children:["By ",u]})]});return r?J.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${u}`,onClick:_=>{_.stopPropagation(),n(`/creator/${e}`)},children:d}):J.jsx("span",{className:`creator${t?` ${t}`:""}`,children:d})}const ag="#a09ba8";function MO(e){if(!e)return ag;try{return Jr.Rarity.getColor(e.toLowerCase())||ag}catch{return ag}}function yW(e){const t=typeof e=="string"?e.replace("#",""):"";if(t.length<6)return"#161518";const r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return .299*r+.587*n+.114*i>150?"#161518":"#ffffff"}function gW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function _W(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 Io(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function EW(e){if(!isFinite(e)||e<=0)return"";const t=Math.floor(e/1e3),r=Math.floor(t/86400),n=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return r>0?n>0?`${r}d ${n}h`:`${r}d`:n>0?`${n}h ${i}m`:i>0?`${i}m ${a}s`:`${a}s`}function DO(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function vW({endsAt:e,className:t}){const[r,n]=Me.useState(()=>Io(e));Me.useEffect(()=>{if(n(Io(e)),e==null)return;let a;const s=()=>{const u=Io(e);n(u);const l=DO(u);l>0&&(a=setTimeout(s,l))},o=DO(Io(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=EW(r);return i?J.jsxs("span",{className:t??"sale-countdown",children:[J.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}function bW(e){const[,t]=Me.useState(0);return Me.useEffect(()=>{const r=Io(e.saleEndsAt);if(!isFinite(r)||r<=0||r>2147483647)return;const n=setTimeout(()=>t(i=>i+1),r+1);return()=>clearTimeout(n)},[e.saleEndsAt]),gW(e)}const TW=120,SW=250;function IW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function SE(e){const{item:t}=e,r=e.mode==="market",[n,i]=Me.useState(!1),[a,s]=Me.useState(!1),o=Me.useRef(),u=Me.useRef(),l=Kr(z=>z.add),c=Kr(z=>z.items.some(Y=>Y.id===t.id)),d=Rs(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),p=dW(t,d),f=Dl(z=>z.toggle),_=Dl(z=>!!z.items[t.id]),R=!!t.contractAddress&&!!t.itemId,w=t.tokenId??t.itemId,O=!r&&!!t.contractAddress&&!!w,h=`/item/${t.contractAddress}/${w}`;function T(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),TW)}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function m(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),SW)}const v=IW(t.gender),A=bW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),P=!r&&A,q=P?_W(t.compareAtCredits,t.priceCredits):0;return J.jsxs("article",{className:`card${n?" card--hover":""}`,style:O?{cursor:"pointer"}:void 0,onMouseEnter:T,onMouseLeave:b,children:[O?J.jsx(Oo,{className:"card__link",to:h,state:{item:t,tradeId:t.tradeId},"aria-label":t.name}):null,J.jsxs("div",{className:"card__media",children:[P?J.jsxs("span",{className:"card__sale-badge",children:["SALE",q>0?` -${q}%`:""]}):null,J.jsx("button",{className:`card__fav${_?" is-on":""}`,onClick:z=>{z.stopPropagation(),f(t)},"aria-label":_?"Remove from favorites":"Add to favorites",children:J.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?J.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&R?J.jsxs(J.Fragment,{children:[J.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:J.jsx(vE,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:Jr.PreviewType.AVATAR,emote:t.category==="emote"?void 0:Jr.PreviewEmote.FASHION,dev:Nt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:m})}),J.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:J.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),J.jsxs("div",{className:"card__body",children:[J.jsxs("div",{className:"card__desc",children:[J.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?J.jsx(hW,{address:t.creator,className:"card__creator",linkToProfile:!0}):J.jsx("div",{className:"card__creator",children:" "})]}),J.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?J.jsxs("div",{className:"card__price card__price--market",children:[J.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),J.jsx(Un,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,J.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?J.jsxs("div",{className:"card__price card__price--sale",children:[J.jsxs("span",{className:"card__price-now",children:[J.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),J.jsxs("span",{className:"card__price-was",children:[J.jsx(Un,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),J.jsx(vW,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):J.jsxs("div",{className:"card__price",children:[J.jsx(Un,{className:"card__diamond"}),t.priceCredits]}),J.jsxs("div",{className:"card__chips",children:[J.jsx("span",{className:"chip chip--rarity",style:{background:MO(t.rarity),color:yW(MO(t.rarity))},children:t.rarity}),t.category==="wearable"?J.jsx("span",{className:"chip chip--icon",children:J.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,v?J.jsx("span",{className:"chip chip--icon",children:v}):null]})]}),r&&e.mode==="market"?J.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):J.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),p||l(t,"grid")},disabled:c||p,children:[p?null:J.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),p?"Your item":c?"In cart":"Add to cart"]})]})]})}function RW(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 TD(e){var t,r,n,i,a,s;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)??((i=(n=e.data)==null?void 0:n.emote)==null?void 0:i.category),rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.thumbnail??"",priceCredits:e.priceCredits??0,gender:RW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function P6(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(TD);return{items:o,total:s??r+o.length}}async function wW(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Nt.marketplaceServerUrl}/v3/catalog/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(TD);return{items:o,total:s??r+o.length}}const AW=8,OW=8,NW=12;function PW(){const t=Yg(i=>i.followed).slice(0,AW),{data:r=[],isLoading:n}=Ll({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>wW(a,{first:OW}).then(s=>s.items).catch(()=>[])));return CW(i).filter(a=>a.priceCredits>0).slice(0,NW)}});return t.length===0||!n&&r.length===0?null:J.jsxs("section",{className:"row",children:[J.jsx("div",{className:"row__head",children:J.jsx("h2",{className:"row__title",children:"From creators you follow"})}),J.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>J.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>J.jsx(SE,{item:i},i.id))})]})}function CW(e){const t=[],r=new Set,n=e.reduce((i,a)=>Math.max(i,a.length),0);for(let i=0;i<n;i++)for(const a of e){const s=a[i];s&&!r.has(s.id)&&(r.add(s.id),t.push(s))}return t}const SD="shop:recently-viewed",ID=12;function RD(){try{const e=localStorage.getItem(SD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,ID):[]}catch{return[]}}function C6(e){if(e!=null&&e.id)try{const t=[e,...RD().filter(r=>r.id!==e.id)].slice(0,ID);localStorage.setItem(SD,JSON.stringify(t))}catch{}}function MW({excludeId:e}){const t=Me.useMemo(()=>RD().filter(r=>r.id!==e),[e]);return t.length===0?null:J.jsxs("section",{className:"row",children:[J.jsx("div",{className:"row__head",children:J.jsx("h2",{className:"row__title",children:"Recently viewed"})}),J.jsx("div",{className:"row__track",children:t.map(r=>J.jsx(SE,{item:r},r.id))})]})}function jO({title:e,items:t,loading:r}){return J.jsxs("section",{className:"row",children:[J.jsxs("div",{className:"row__head",children:[J.jsx("h2",{className:"row__title",children:e}),J.jsxs(Oo,{className:"row__viewall",to:"/assets",children:["View all ",J.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),J.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>J.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>J.jsx(SE,{item:n},n.id))})]})}function DW(){const{data:e,isLoading:t}=Ll({queryKey:["overview-listings"],queryFn:()=>oW({first:24})}),r=(e==null?void 0:e.items)??[];return J.jsxs("div",{className:"overview",children:[J.jsx("section",{className:"hero",children:J.jsxs("div",{className:"hero__inner",children:[J.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),J.jsx(Oo,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),J.jsx(PW,{}),J.jsx(MW,{}),t||r.length>0?J.jsxs(J.Fragment,{children:[J.jsx(jO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>12?J.jsx(jO,{title:"New Creations",items:r.slice(12,24),loading:!1}):null]}):J.jsxs("div",{className:"overview__empty",children:[J.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),J.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),J.jsx(Oo,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const jW={"/overview":"overview","/assets":"assets","/market":"market","/my-assets":"my_assets","/my-favorites":"favorites","/my-purchases":"my_purchases","/import":"import","/cart":"cart","/credits":"credits","/success":"success"},LW=Me.lazy(()=>Gt(()=>import("./Assets-CH2UvOLD.js"),__vite__mapDeps([20,1,21,22,23,24,7])).then(e=>({default:e.Assets}))),$W=Me.lazy(()=>Gt(()=>import("./Market-BPnAdEd3.js"),__vite__mapDeps([25,1,26,19,7,21,22,23,27,28,24])).then(e=>({default:e.Market}))),qW=Me.lazy(()=>Gt(()=>import("./ItemDetail-vU7MusPD.js"),__vite__mapDeps([29,1,27,19,7,28,30])).then(e=>({default:e.ItemDetail}))),BW=Me.lazy(()=>Gt(()=>import("./Collection-BEjVhftZ.js"),__vite__mapDeps([31,1,32,33,22,23,24,7])).then(e=>({default:e.Collection}))),kW=Me.lazy(()=>Gt(()=>import("./Creator-BOAE6sSq.js"),__vite__mapDeps([34,1,32,33,22,23,24,7])).then(e=>({default:e.Creator}))),UW=Me.lazy(()=>Gt(()=>import("./MyAssets-CYCc3Lhx.js"),__vite__mapDeps([35,1,36,27,19,7,26,37,23,24,38])).then(e=>({default:e.MyAssets}))),FW=Me.lazy(()=>Gt(()=>import("./MyFavorites-DGSkZP9t.js"),__vite__mapDeps([39,1,23,7])).then(e=>({default:e.MyFavorites}))),HW=Me.lazy(()=>Gt(()=>import("./MyPurchases-JReebPX3.js"),__vite__mapDeps([40,1,23,24,7])).then(e=>({default:e.MyPurchases}))),VW=Me.lazy(()=>Gt(()=>import("./ImportListings-CLIZeHnq.js"),__vite__mapDeps([41,1,36,27,19,7,26,37,42])).then(e=>({default:e.ImportListings}))),GW=Me.lazy(()=>Gt(()=>import("./Cart-iIojIDOE.js"),__vite__mapDeps([43,1,27,19,7,28])).then(e=>({default:e.Cart}))),zW=Me.lazy(()=>Gt(()=>import("./GetCredits-DJQvGn18.js"),__vite__mapDeps([44,1,12,5,7])).then(e=>({default:e.GetCredits}))),WW=Me.lazy(()=>Gt(()=>import("./Success-CK_Vcw04.js"),__vite__mapDeps([45,1,37,7])).then(e=>({default:e.Success}))),YW=Me.lazy(()=>Gt(()=>import("./NotFound-CIEXRpoy.js"),__vite__mapDeps([46,1,7])).then(e=>({default:e.NotFound})));function xW(){return J.jsx("div",{className:"page-loading","aria-busy":"true",children:J.jsx("span",{className:"spinner","aria-hidden":!0})})}function KW(){return J.jsxs("div",{className:"overview__empty",children:[J.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),J.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),J.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function XW(){aW();const e=UD();return Me.useEffect(()=>{o4()},[]),Me.useEffect(()=>{const t=e.pathname,r=jW[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");n4(r)},[e.pathname]),J.jsxs(J.Fragment,{children:[J.jsx(V8,{}),J.jsx(iW,{}),J.jsx(eW,{}),J.jsx(k8,{}),J.jsx("main",{className:"page",children:J.jsx(Cl,{fallback:J.jsx(KW,{}),children:J.jsx(Me.Suspense,{fallback:J.jsx(xW,{}),children:J.jsxs(FD,{children:[J.jsx(dr,{path:"/",element:J.jsx(HD,{to:"/overview",replace:!0})}),J.jsx(dr,{path:"/overview",element:J.jsx(DW,{})}),J.jsx(dr,{path:"/assets",element:J.jsx(LW,{})}),J.jsx(dr,{path:"/market",element:J.jsx($W,{})}),J.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:J.jsx(qW,{})}),J.jsx(dr,{path:"/collection/:contractAddress",element:J.jsx(BW,{})}),J.jsx(dr,{path:"/creator/:address",element:J.jsx(kW,{})}),J.jsx(dr,{path:"/my-assets",element:J.jsx(UW,{})}),J.jsx(dr,{path:"/my-favorites",element:J.jsx(FW,{})}),J.jsx(dr,{path:"/my-purchases",element:J.jsx(HW,{})}),J.jsx(dr,{path:"/import",element:J.jsx(VW,{})}),J.jsx(dr,{path:"/cart",element:J.jsx(GW,{})}),J.jsx(dr,{path:"/credits",element:J.jsx(zW,{})}),J.jsx(dr,{path:"/success",element:J.jsx(WW,{})}),J.jsx(dr,{path:"*",element:J.jsx(YW,{})})]})})})}),J.jsx(Cl,{fallback:J.jsx(J.Fragment,{}),children:J.jsx(nW,{})})]})}function JW({children:e}){const t=o_(r=>r.locale);return B8(t),J.jsx(R8,{value:EE(t),children:e},t)}m4();const QW=new _j({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),ZW=["localhost","127.0.0.1"].includes(window.location.hostname),e6=ZW?void 0:"/shop";VD.createRoot(document.getElementById("root")).render(J.jsx(YO.StrictMode,{children:J.jsx(vj,{client:QW,children:J.jsx(JW,{children:J.jsx(GD,{basename:e6,children:J.jsx(XW,{})})})})}));export{r3 as $,SE as A,v0 as B,hW as C,nA as D,p6 as E,d6 as F,f6 as G,a4 as H,h6 as I,O6 as J,fE as K,z8 as L,W8 as M,bE as N,Y8 as O,Ga as P,g6 as Q,I6 as R,dj as S,s6 as T,a6 as U,Cj as V,vE as W,i6 as X,ud as Y,y6 as Z,Gt as _,Rs as a,bn as a0,s_ as a1,NO as a2,bW as a3,l6 as a4,C6 as a5,_W as a6,vW as a7,S6 as a8,b6 as a9,R6 as aa,T6 as ab,tn as ac,cH as ad,J4 as ae,tu as af,Q_ as ag,_6 as ah,F_ as ai,xP as aj,KP as ak,qH as al,TH as am,m6 as b,Ll as c,Un as d,A6 as e,P6 as f,bD as g,Nt as h,Jr as i,ci as j,ds as k,oW as l,Yg as m,wW as n,Kr as o,w6 as p,dW as q,en as r,E6 as s,Yr as t,Dl as u,N6 as v,v6 as w,ez as x,Ej as y,qo as z};