@dcl/shop 0.1.0-29193701117.commit-eaf0288 → 0.1.0-29194630263.commit-8d11188

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 (167) hide show
  1. package/assets/{AnimatedBackground-Cc5-QGDb.js → AnimatedBackground-B12_GM9W.js} +1 -1
  2. package/assets/{Assets-CaQZ2Wzw.js → Assets-CCKhZb2a.js} +1 -1
  3. package/assets/{Button-CdPVixLp.js → Button-BAwwkqzI.js} +1 -1
  4. package/assets/Cart-DR3eUWPC.js +1 -0
  5. package/assets/{CircularProgress-DV1YNn1L.js → CircularProgress-C4P-fp7h.js} +1 -1
  6. package/assets/{Collection-DhQJ9kbP.js → Collection-BZICa7Eq.js} +1 -1
  7. package/assets/{Creator-ErezNZns.js → Creator-BGMo0uyK.js} +1 -1
  8. package/assets/{ExchangeController-Cigt4Eva.js → ExchangeController-DkTAIgOy.js} +1 -1
  9. package/assets/{GetCredits-BVbgdWpD.js → GetCredits-DO1TGEVH.js} +2 -2
  10. package/assets/{HelpersUtil-CUa2Ipqq.js → HelpersUtil-BKzmX1VE.js} +1 -1
  11. package/assets/{ImportListings-D3UgVsA8.js → ImportListings-XTaxybSV.js} +1 -1
  12. package/assets/{ItemDetail-CsBI2dF7.js → ItemDetail-B5T_k-aM.js} +2 -2
  13. package/assets/Market-B-qXN4gx.js +1 -0
  14. package/assets/{MenuItem-DBGCoPwo.js → MenuItem-LWWk8UGA.js} +1 -1
  15. package/assets/{MyAssets-McXf6f5G.js → MyAssets-CWuC-vC9.js} +1 -1
  16. package/assets/{MyFavorites-YQFL7DHi.js → MyFavorites-Bzl5lDGX.js} +1 -1
  17. package/assets/{MyPurchases-CDvEv1SQ.js → MyPurchases-DnT7iu9Z.js} +1 -1
  18. package/assets/{NotFound-DD_EZO3L.js → NotFound-sMh1ahg9.js} +1 -1
  19. package/assets/{RealCheckout-B4ZpMlk2.js → RealCheckout-CgJeI4jX.js} +1 -1
  20. package/assets/{ShopFooterInner-3pUyqjin.js → ShopFooterInner-Br1cblK6.js} +2 -2
  21. package/assets/Success-DGD-8CMf.js +1 -0
  22. package/assets/{SvgIcon-ZIDQoKd7.js → SvgIcon-Dq3pUyZA.js} +1 -1
  23. package/assets/{SwapController-DZyV51_z.js → SwapController-COIC9Uim.js} +1 -1
  24. package/assets/{TradeService-BCo0uCl4.js → TradeService-BXL498ZX.js} +1 -1
  25. package/assets/{W3MFrameProviderSingleton-BCS2NA9V.js → W3MFrameProviderSingleton-DhvJ91cF.js} +3 -3
  26. package/assets/{WebCryptoP256-BBBITUJb.js → WebCryptoP256-ByRCu1hS.js} +1 -1
  27. package/assets/{basic-BBbCuRxl.js → basic-CuyoiSaV.js} +1 -1
  28. package/assets/{biconomy-CgkfwoYU.js → biconomy-D_2ap8Pe.js} +1 -1
  29. package/assets/{buy-7Vjt9I9k.js → buy-DnmiZS49.js} +1 -1
  30. package/assets/{buy-gasless-DBOSmWHY.js → buy-gasless-CBJucGK7.js} +1 -1
  31. package/assets/{ccip-DUECbLjX.js → ccip-BP1hR6Ot.js} +1 -1
  32. package/assets/{ccip-COi_4f45.js → ccip-CWD-4MX7.js} +1 -1
  33. package/assets/{collection-EWdG97tJ.js → collection-B4pewt6i.js} +1 -1
  34. package/assets/{controller-B68nWBMQ.js → controller-DLS1E-jI.js} +2 -2
  35. package/assets/{core-BjEG8klq.js → core-DPnU5XZM.js} +4 -4
  36. package/assets/{custom-CDOWuA5U.js → custom-6snJlTvl.js} +1 -1
  37. package/assets/{data-capture-D77j4JUF.js → data-capture-q_rpl683.js} +1 -1
  38. package/assets/{decimals-Bx3xBEkX.js → decimals-ajrahski.js} +1 -1
  39. package/assets/decimals-xxxZ6jGD.js +1 -0
  40. package/assets/{detectExtension-j4qvUPWe.js → detectExtension-CYxFHvVz.js} +1 -1
  41. package/assets/{email-BhhvJJjS.js → email-CVxl7tnf.js} +1 -1
  42. package/assets/{embedded-wallet-DpakeTSP.js → embedded-wallet-DkPDEnZp.js} +1 -1
  43. package/assets/{engine-DyziSJoo.js → engine-C4wMSp6k.js} +1 -1
  44. package/assets/{estimate-l1-fee-DQMsv8WB.js → estimate-l1-fee-WZUMVbrz.js} +1 -1
  45. package/assets/{eth_estimateGas-DHFmwGrG.js → eth_estimateGas-1IBFtlr4.js} +1 -1
  46. package/assets/{eth_getStorageAt-BoU6GZDt.js → eth_getStorageAt-g-wqaF-z.js} +1 -1
  47. package/assets/{eth_getTransactionCount-C1Sf4RIz.js → eth_getTransactionCount-CEjGX-IY.js} +1 -1
  48. package/assets/{extractIPFS-hHO-nYqe.js → extractIPFS-CZDeg3d2.js} +1 -1
  49. package/assets/{features-DsUNTPHP.js → features-nnXdtCvn.js} +1 -1
  50. package/assets/{fetchTokenMetadata-DSPitJoV.js → fetchTokenMetadata-C9ms2h7c.js} +2 -2
  51. package/assets/{generateUtilityClasses-CBMtJCWU.js → generateUtilityClasses-DwKifUxI.js} +1 -1
  52. package/assets/{get-ecosystem-wallet-info-rSX5VCr7.js → get-ecosystem-wallet-info-DHeN4-Xj.js} +1 -1
  53. package/assets/{getBalance-DYxqiIGN.js → getBalance-CJffDdBH.js} +1 -1
  54. package/assets/{getInstalledModules-B46Au9H0.js → getInstalledModules-B3Rz1UXJ.js} +1 -1
  55. package/assets/{getNFT-3SNdXw0b.js → getNFT-BHAj0qVb.js} +1 -1
  56. package/assets/{getNFT-BcrqmPmb.js → getNFT-DBcuklj-.js} +2 -2
  57. package/assets/{hashTypedData-CNkJKMYs.js → hashTypedData-BPLPyIeY.js} +1 -1
  58. package/assets/{hashTypedData-Djara8SY.js → hashTypedData-DuYIoFzE.js} +1 -1
  59. package/assets/{import-BG37JFzz.js → import-D910LKG_.js} +1 -1
  60. package/assets/{in-app-wallet-calls-1DlJCR2X.js → in-app-wallet-calls-DKg5GjFM.js} +1 -1
  61. package/assets/{index-CTek7au7.js → index-17ZHeSSH.js} +2 -2
  62. package/assets/{index-CQj_s_rb.js → index-5iJEvc66.js} +1 -1
  63. package/assets/{index-amjFaSYF.js → index-B0Zk5mdQ.js} +1 -1
  64. package/assets/{index-BE4noiNM.js → index-B6XFAke8.js} +1 -1
  65. package/assets/{index-Dlbp48_0.js → index-BDBCj2B4.js} +1 -1
  66. package/assets/{index-CnEL-vdG.js → index-BMHcRKDc.js} +1 -1
  67. package/assets/{index-Dnc1Z6mG.js → index-BUqr-Pzt.js} +1 -1
  68. package/assets/{index-BDXwhtay.js → index-BavVjUGV.js} +1 -1
  69. package/assets/{index-Cz3iDBRG.js → index-BoCNakiC.js} +1 -1
  70. package/assets/{index-B7AOLVUA.js → index-BqhocmT7.js} +1 -1
  71. package/assets/{index-BRHf4nI0.js → index-BtKpKBee.js} +1 -1
  72. package/assets/{index-CzB6pMBt.js → index-BvzER9rV.js} +1 -1
  73. package/assets/{index-BZr9FgRx.js → index-C5uB6Ye8.js} +1 -1
  74. package/assets/{index-Dn9TiIUb.js → index-CAAxAnez.js} +1 -1
  75. package/assets/{index-TTOEeliq.js → index-CAPt6fvp.js} +1 -1
  76. package/assets/{index-CAs57S2L.js → index-CFEDJHpl.js} +1 -1
  77. package/assets/{index-Auc2-vXr.js → index-CPpxyK1H.js} +5 -5
  78. package/assets/{index-Bc7j9Zo_.js → index-CQ0l-Hya.js} +1 -1
  79. package/assets/{index-DNi32yMk.js → index-CYb-2BJ0.js} +1 -1
  80. package/assets/{index-C8p2NZyJ.js → index-CdjEmX0M.js} +1 -1
  81. package/assets/{index-DDq3lUz-.js → index-CeScnNJY.js} +1 -1
  82. package/assets/{index-6ifw5O-l.js → index-CfPtTzwg.js} +1 -1
  83. package/assets/{index-BRjoj3U8.js → index-ChewALPE.js} +1 -1
  84. package/assets/{index-CUWlthIA.js → index-Co-bCxMa.js} +1 -1
  85. package/assets/{index-DsDqVCEM.js → index-Cr2snJme.js} +1 -1
  86. package/assets/{index-zmNCl0ki.js → index-Cthd2c1l.js} +1 -1
  87. package/assets/{index-ClawciY5.js → index-D4W5vjMc.js} +1 -1
  88. package/assets/{index-BVRmflvl.js → index-D86fizE5.js} +1 -1
  89. package/assets/{index-BD17v2lO.js → index-DDnLYqZ2.js} +1 -1
  90. package/assets/{index-BPYsmNYx.js → index-DKbG72yj.js} +1 -1
  91. package/assets/{index-cBPypv8q.js → index-DNN-yO7U.js} +1 -1
  92. package/assets/{index-dGqhU9eb.js → index-DOgOM2m7.js} +1 -1
  93. package/assets/{index-CNxJ9Oyi.js → index-DRoN_sa5.js} +1 -1
  94. package/assets/{index-CPHhdev0.js → index-DUbH5tBd.js} +1 -1
  95. package/assets/{index-BRFvBFS9.js → index-DVup3j13.js} +1 -1
  96. package/assets/{index-C70h_Qnm.js → index-DZF_WhaL.js} +1 -1
  97. package/assets/{index-DgZ-rD_A.js → index-DdaX-aRa.js} +1 -1
  98. package/assets/{index-bdoSUpWJ.js → index-Ddupgvvh.js} +1 -1
  99. package/assets/{index-ByV68lm4.js → index-DmGr1b-6.js} +1 -1
  100. package/assets/{index-Do7V3VQ1.js → index-DouncCq_.js} +1 -1
  101. package/assets/{index-BOh--8gO.js → index-DuEggWVN.js} +2 -2
  102. package/assets/{index-BM58oJtP.js → index-Dy6sQQiJ.js} +1 -1
  103. package/assets/{index-BJoZlAiJ.js → index-DzU33gqX.js} +3 -3
  104. package/assets/{index-jftYoVDx.js → index-I3FJbZ75.js} +2 -2
  105. package/assets/{index-W7n1O--j.js → index-IsHNXTne.js} +1 -1
  106. package/assets/{index-BFmwJrBq.js → index-KO1ZFg5L.js} +1 -1
  107. package/assets/{index-DCZhzRQP.js → index-UqGm0Whf.js} +1 -1
  108. package/assets/{index-Dgaco8nw.js → index-Vkeb1T0Z.js} +1 -1
  109. package/assets/{index-CWqC-NRU.js → index-YQZLRVeZ.js} +1 -1
  110. package/assets/{index-CuNOnjXx.js → index-boNdT5ea.js} +3 -3
  111. package/assets/{index-BFSADNP4.js → index-cAYLU9lu.js} +1 -1
  112. package/assets/{index-DMwCtbNf.js → index-sWuPRDyC.js} +1 -1
  113. package/assets/{index-Dydzqsen.js → index-teL2XvQL.js} +1 -1
  114. package/assets/{index.es-CB3Ey6Zy.js → index.es-BRxLRvjO.js} +1 -1
  115. package/assets/{index.es-PMZMpbNc.js → index.es-BcAmHND2.js} +1 -1
  116. package/assets/{index.es-CRE9Pvhz.js → index.es-EmeAtu9Y.js} +4 -4
  117. package/assets/{localBatchGatewayRequest-CaGbWVw9.js → localBatchGatewayRequest-BB0oQimh.js} +1 -1
  118. package/assets/{mana-rate-Ds7x2W3j.js → mana-rate-DUB2qMGq.js} +1 -1
  119. package/assets/network-C3MZ7kAP.js +1 -0
  120. package/assets/{networks-DkAB9pej.js → networks-0QGuQ561.js} +1 -1
  121. package/assets/{onramp-BqdjEI9f.js → onramp-DUbzuqwp.js} +1 -1
  122. package/assets/{openzeppelin-BHE1h9Ie.js → openzeppelin-BgjeSv47.js} +1 -1
  123. package/assets/{ownerOf-DbsX2ir_.js → ownerOf-B24RwBGh.js} +1 -1
  124. package/assets/{parseNft-DPjHtqKO.js → parseNft-3kI8Tnp4.js} +2 -2
  125. package/assets/{parseSignature-BRce69nM.js → parseSignature-Cpxf1TK9.js} +3 -3
  126. package/assets/{parseSignature-BAa9gTfq.js → parseSignature-u1tVmuRI.js} +1 -1
  127. package/assets/{pay-with-exchange-DriBN7rW.js → pay-with-exchange-CTzrnINH.js} +1 -1
  128. package/assets/{qr-overlay-CY6Zbem7.js → qr-overlay-CWTLWyvC.js} +1 -1
  129. package/assets/{receive-CRmzbvzz.js → receive-dW7HfKO8.js} +1 -1
  130. package/assets/{resolveImplementation-67SRw2p-.js → resolveImplementation-BP__zELT.js} +1 -1
  131. package/assets/{rpc-JR--m31h.js → rpc-C3Osoxen.js} +1 -1
  132. package/assets/{secp256k1-DOsmXamG.js → secp256k1-C9YDDWS3.js} +1 -1
  133. package/assets/{secp256k1-DT1Evlme.js → secp256k1-DMNEg-jQ.js} +1 -1
  134. package/assets/{secp256k1-BM4NcKYk.js → secp256k1-DpTnWEP_.js} +1 -1
  135. package/assets/{send-BCpNUJ3b.js → send-M0dGhP5M.js} +1 -1
  136. package/assets/{send-batch-transaction-BgouuUgd.js → send-batch-transaction-ENJHnua3.js} +1 -1
  137. package/assets/{send-eip712-transaction-CLuKdAK8.js → send-eip712-transaction-efU6WK2D.js} +2 -2
  138. package/assets/{send-gasless-transaction-JuEdtqnq.js → send-gasless-transaction-Cabe0wXJ.js} +2 -2
  139. package/assets/{sendRawTransaction-rl_EoONc.js → sendRawTransaction-n6fWHhAC.js} +3 -3
  140. package/assets/{serializeTransaction-CUKh9yJZ.js → serializeTransaction-C7oeuWLE.js} +1 -1
  141. package/assets/{session-proposal-Bb4DY5ml.js → session-proposal-iAW7RQCk.js} +1 -1
  142. package/assets/{session-request-DhLHJZdN.js → session-request-B9la34v8.js} +2 -2
  143. package/assets/{sha256-CZmp6cuR.js → sha256-BTDB1ilS.js} +1 -1
  144. package/assets/{signing-B9gtRdWQ.js → signing-chv30sG3.js} +4 -4
  145. package/assets/{socials-dj8vzmGP.js → socials-DxViQgLE.js} +1 -1
  146. package/assets/{swaps-BI3mQDMc.js → swaps-BsPoTPbz.js} +1 -1
  147. package/assets/{thirdweb-D9JMhtyA.js → thirdweb-xeQ2F7EU.js} +3 -3
  148. package/assets/{totalSupply-BoWywgst.js → totalSupply-BakkyMSb.js} +1 -1
  149. package/assets/{transactionReceipt-PkQ5ABZX.js → transactionReceipt-B2-IsjV_.js} +1 -1
  150. package/assets/{transactions-C1SNhyc4.js → transactions-Y2r_Pwfb.js} +1 -1
  151. package/assets/{useInfiniteGrid-DH8mcPPt.js → useInfiniteGrid-B_lo4_wP.js} +1 -1
  152. package/assets/{verifyHash-Bn8s8V4c.js → verifyHash-2xvZDOwr.js} +1 -1
  153. package/assets/{w3m-modal-BXBF8rKF.js → w3m-modal-CaTlK3j8.js} +1 -1
  154. package/assets/{w3m-modal-C-LZTlVR.js → w3m-modal-DNeej76a.js} +1 -1
  155. package/assets/{wait-for-tx-receipt-CAj3qF2s.js → wait-for-tx-receipt-85vEkA1W.js} +1 -1
  156. package/assets/{wallet-kind-y3zG_JSg.js → wallet-kind-CFG7KVhm.js} +1 -1
  157. package/assets/{wallets-FzKwmBC5.js → wallets-DwuMYtfJ.js} +6 -6
  158. package/assets/{web-connector-CJHLwS_L.js → web-connector-BDOn9xdp.js} +3 -3
  159. package/assets/{writeContract-CdP6W2Zx.js → writeContract-BhOTFSoX.js} +1 -1
  160. package/assets/{zoraTestnet-C1lXJofd.js → zoraTestnet-DK6Q0vvd.js} +1 -1
  161. package/index.html +8 -8
  162. package/package.json +2 -2
  163. package/assets/Cart-BmW__EQ9.js +0 -1
  164. package/assets/Market-B1kIKAmZ.js +0 -1
  165. package/assets/Success-Jv6s2J-D.js +0 -1
  166. package/assets/decimals-Cv-kS5h7.js +0 -1
  167. package/assets/network-0ggGeCXj.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BFSADNP4.js","assets/react-Vu6nbGi5.js","assets/network-0ggGeCXj.js","assets/index-BE4noiNM.js","assets/SvgIcon-ZIDQoKd7.js","assets/generateUtilityClasses-CBMtJCWU.js","assets/colors-LINLm1ux.js","assets/ethers-JeCAM1sd.js","assets/index-BOh--8gO.js","assets/index-ByV68lm4.js","assets/index-W7n1O--j.js","assets/Button-CdPVixLp.js","assets/CircularProgress-DV1YNn1L.js","assets/index-CLIR3TTD.js","assets/MenuItem-DBGCoPwo.js","assets/AnimatedBackground-Cc5-QGDb.js","assets/AnimatedBackground-CiurwFBv.css","assets/ShopFooterInner-3pUyqjin.js","assets/TradeService-BCo0uCl4.js","assets/index-BFmwJrBq.js","assets/Assets-CaQZ2Wzw.js","assets/FilterBar-CdU8B66A.js","assets/SkeletonCards-BysJEVmg.js","assets/LoadMore-BOCtgPLI.js","assets/useInfiniteGrid-DH8mcPPt.js","assets/Market-B1kIKAmZ.js","assets/mana-rate-Ds7x2W3j.js","assets/buy-7Vjt9I9k.js","assets/buy-gasless-DBOSmWHY.js","assets/ItemDetail-CsBI2dF7.js","assets/ItemDetail-eaGx2XMJ.css","assets/Collection-DhQJ9kbP.js","assets/collection-EWdG97tJ.js","assets/collection-Ds5shVfK.css","assets/Creator-ErezNZns.js","assets/MyAssets-McXf6f5G.js","assets/import-BG37JFzz.js","assets/wallet-kind-y3zG_JSg.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-YQFL7DHi.js","assets/MyPurchases-CDvEv1SQ.js","assets/ImportListings-D3UgVsA8.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-BmW__EQ9.js","assets/GetCredits-BVbgdWpD.js","assets/Success-Jv6s2J-D.js","assets/NotFound-DD_EZO3L.js"])))=>i.map(i=>d[i]);
2
- var kD=Object.defineProperty;var HE=e=>{throw TypeError(e)};var UD=(e,t,r)=>t in e?kD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>UD(e,typeof t!="symbol"?t+"":t,r),vd=(e,t,r)=>t.has(e)||HE("Cannot "+r);var ue=(e,t,r)=>(vd(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)=>(vd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(vd(e,t,"access private method"),r);var Wu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as De,j as J,l as zO,g as WO,R as YO,c as og,L as Tl,a as Ll,m as xn,d as FD,n as HD,o as dr,N as VD,p as GD,B as zD}from"./react-Vu6nbGi5.js";import{g as Sl,p as hl,W as WD,m as YD,h as VE,f as xO}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 Ho=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 Ho{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,c_,$O,XD=($O=class{constructor(){We(this,ti,KD);We(this,c_,!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,c_=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 ug(e){return typeof e=="number"&&e>=0&&e!==1/0}function KO(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(!No(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(Oo(t.options.mutationKey)!==Oo(a))return!1}else if(!No(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)||Oo)(e)}function Oo(e){return JSON.stringify(e,(t,r)=>lg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function No(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>No(e[r],t[r])):!1}var ej=Object.prototype.hasOwnProperty;function XO(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=WE(e)&&WE(t);if(!n&&!(lg(e)&&lg(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 _=XO(p,f,r+1);u[d]=_,_===p&&l++}return a===o&&l===a?e:u}function cg(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 lg(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 dg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?XO(e,t):t}function n6(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 JO(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 QO(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 Po=(()=>{let e=()=>QD;return{isServer(){return e()},setIsServer(t){e=t}}})();function fg(){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 Ho{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 ZO(e){return(e??"online")==="online"?Il.isOnline():!0}var pg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eN(e){let t=!1,r=0,n;const i=fg(),a=()=>i.status!=="pending",s=R=>{var w;if(!a()){const O=new pg(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=()=>ZO(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 b;if(a())return;const h=e.retry??(Po.isServer()?0:3),T=e.retryDelay??uj,v=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++,(b=e.onFail)==null||b.call(e,r,O),tj(v).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,tN=(BO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ug(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Po.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=JO(t.options,t.fetchOptions),h=async(T,v,m)=>{if(R)return Promise.reject(t.signal.reason);if(v==null&&T.pages.length)return Promise.resolve(T);const A=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:v,direction:m?"backward":"forward",meta:t.options.meta};return w(V),V})(),P=await O(A),{maxPages:q}=t.options,K=m?nj:rj;return{pages:K(T.pages,P,q),pageParams:K(T.pageParams,v,q)}};if(i&&a.length){const T=i==="backward",v=T?rN:mg,m={pages:a,pageParams:s},b=v(n,m);o=await h(m,b,T)}else{const T=e??a.length;do{const v=u===0?s[0]??n.initialPageParam:mg(n,o);if(u>0&&v==null)break;o=await h(o,v),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 mg(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 rN(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 i6(e,t){return t?mg(e,t)!=null:!1}function a6(e,t){return!t||!e.getPreviousPageParam?!1:rN(e,t)!=null}var Ka,ea,Xa,jr,ta,xt,qo,ra,Pr,nN,Ln,kO,lj=(kO=class extends tN{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,qo);We(this,ra);je(this,ra,!1),je(this,qo,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,qo),...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=dg(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:!KO(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,nN).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 v=this.observers.find(m=>m.options.queryFn);v&&this.setOptions(v.options)}const n=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const v=JO(this.options,r),b=(()=>{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(v,b,this):v(b)},o=(()=>{const v={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(v),v})(),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,eN({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:v=>{v instanceof pg&&v.revert&&this.setState({...ue(this,Xa),fetchStatus:"idle"}),n.abort()},onFail:(v,m)=>{rt(this,Pr,Ln).call(this,{type:"failed",failureCount:v,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 v=await ue(this,xt).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(f=(p=ue(this,jr).config).onSuccess)==null||f.call(p,v,this),(R=(_=ue(this,jr).config).onSettled)==null||R.call(_,v,this.state.error,this),v}catch(v){if(v instanceof pg){if(v.silent)return ue(this,xt).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw rt(this,Pr,Ln).call(this,{type:"error",error:v}),(O=(w=ue(this,jr).config).onError)==null||O.call(w,v,this),(T=(h=ue(this,jr).config).onSettled)==null||T.call(h,this.state.data,v,this),v}finally{this.scheduleGc()}}},Ka=new WeakMap,ea=new WeakMap,Xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,xt=new WeakMap,qo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,nN=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,...iN(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 iN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ZO(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,Bo,pr,na,Ja,Bn,ni,ko,Qa,Za,ia,aa,ii,es,_t,Qs,hg,yg,gg,_g,Eg,vg,bg,aN,UO,dj=(UO=class extends Ho{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,Bo);We(this,pr);We(this,na);We(this,Ja);We(this,Bn);We(this,ni);We(this,ko);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,fg()),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,_g).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tg(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tg(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,Eg).call(this),rt(this,_t,vg).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,bg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!cg(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,hg).call(this);const a=rt(this,_t,yg).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,gg).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,Bo),{state:c}=t;let d={...c},p=!1,f;if(r._optimisticResults){const K=this.hasListeners(),V=!K&&XE(t,r),W=K&&JE(t,n,r,i);(V||W)&&(d={...d,...iN(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 K;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(K=a.data,O=!0):K=typeof r.placeholderData=="function"?r.placeholderData((q=ue(this,Za))==null?void 0:q.state.data,ue(this,Za)):r.placeholderData,K!==void 0&&(w="success",f=dg(a==null?void 0:a.data,K,r),p=!0)}if(r.select&&f!==void 0&&!O)if(a&&f===(s==null?void 0:s.data)&&r.select===ue(this,ko))f=ue(this,Qa);else try{je(this,ko,r.select),f=r.select(f),f=dg(a==null?void 0:a.data,f,r),je(this,Qa,f),je(this,ni,null)}catch(K){je(this,ni,K)}ue(this,ni)&&(_=ue(this,ni),f=ue(this,Qa),R=Date.now(),w="error");const h=d.fetchStatus==="fetching",T=w==="pending",v=w==="error",m=T&&h,b=f!==void 0,P={status:w,fetchStatus:d.fetchStatus,isPending:T,isSuccess:w==="success",isError:v,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:v&&!b,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:v&&b,isStale:p_(t,r),refetch:this.refetch,promise:ue(this,Bn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=P.data!==void 0,V=P.status==="error"&&!K,W=ce=>{V?ce.reject(P.error):K&&ce.resolve(P.data)},U=()=>{const ce=je(this,Bn,P.promise=fg());W(ce)},F=ue(this,Bn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(V||P.data!==F.value)&&U();break;case"rejected":(!V||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)),cg(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,aN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,_g).call(this)}},Tr=new WeakMap,st=new WeakMap,Bo=new WeakMap,pr=new WeakMap,na=new WeakMap,Ja=new WeakMap,Bn=new WeakMap,ni=new WeakMap,ko=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,bg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},hg=function(){rt(this,_t,Eg).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Po.isServer()||ue(this,pr).isStale||!ug(t))return;const n=KO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},yg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},gg=function(t){rt(this,_t,vg).call(this),je(this,ii,t),!(Po.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!ug(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)))},_g=function(){rt(this,_t,hg).call(this),rt(this,_t,gg).call(this,rt(this,_t,yg).call(this))},Eg=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},vg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},bg=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,Bo,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},aN=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&&Tg(e,t,t.refetchOnMount)}function Tg(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!cg(e.getCurrentResult(),t)}var Uo,hn,ur,sa,yn,Jn,FO,mj=(FO=class extends tN{constructor(t){super();We(this,yn);We(this,Uo);We(this,hn);We(this,ur);We(this,sa);je(this,Uo,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,v,m,b,A;const r=()=>{rt(this,yn,Jn).call(this,{type:"continue"})},n={client:ue(this,Uo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,eN({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=(v=ue(this,ur).config).onSettled)==null?void 0:m.call(v,void 0,P,this.state.variables,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((A=(b=this.options).onSettled)==null?void 0:A.call(b,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)}}},Uo=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,Fo,HO,yj=(HO=class extends Ho{constructor(t={}){super();We(this,kn);We(this,xr);We(this,Fo);this.config=t,je(this,kn,new Set),je(this,xr,new Map),je(this,Fo,0)}build(t,r,n){const i=new mj({client:t,mutationCache:this,mutationId:++Wu(this,Fo)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,kn).add(t);const r=Yu(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=Yu(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=Yu(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=Yu(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,Fo=new WeakMap,HO);function Yu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gn,VO,gj=(VO=class extends Ho{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(){Wu(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;Wu(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(Oo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,ts).values()],r={};return t.forEach(n=>{No(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,rs).set(Oo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,rs).values()],r={};return t.forEach(n=>{No(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),sN=De.createContext(void 0),Ej=e=>{const t=De.useContext(sN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vj=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),J.jsx(sN.Provider,{value:e,children:t})),oN=De.createContext(!1),bj=()=>De.useContext(oN);oN.Provider;function Tj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sj=De.createContext(Tj()),Ij=()=>De.useContext(Sj),Rj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?QO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},wj=e=>{De.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||QO(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]=De.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),p=!n&&u;if(De.useSyncExternalStore(De.useCallback(O=>{const h=p?c.subscribe(Zt.batchCalls(O)):Sr;return c.updateResult(),h},[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),De.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&&!Po.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 $l(e,t){return Cj(e,dj)}const Mj="modulepreload",Dj=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29193701117.commit-eaf0288/"+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)})},uN=Object.prototype.toString;function m_(e){switch(uN.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Fn(e,Error)}}function hs(e,t){return uN.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 ql(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 cN(e){return typeof e=="number"&&e!==e}function Fn(e,t){try{return e instanceof t}catch{return!1}}function lN(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{lN(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 Vo(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(Sg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Sg(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=Sg(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=Sg(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 xu(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&xu(globalThis)||typeof window=="object"&&xu(window)||typeof self=="object"&&xu(self)||typeof Sl=="object"&&xu(Sl)||(function(){return this})()||{};function __(){return ot}function Bl(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 dN(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 ",Ig=["debug","info","warn","error","log","assert","trace"],Rl={};function Go(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?Ig.forEach(r=>{t[r]=(...n)=>{e&&Go(()=>{ot.console[r](`${zj}[${r}]:`,...n)})}}):Ig.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){Go(()=>{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 fN({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function fN(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 pN(e){const t=typeof e=="string"?Kj(e):fN(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"&&mN(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 mN(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 hN(e){if(m_(e))return{message:e.message,name:e.name,stack:e.stack,...av(e)};if(ql(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(hN(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 Rg(e,new Map)}function Rg(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]=Rg(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(Rg(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 yN=50,sv=/\(error: (.*)\)/,ov=/captureMessage|captureException/;function gN(...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-cAYLU9lu.js","assets/react-Vu6nbGi5.js","assets/network-C3MZ7kAP.js","assets/index-B6XFAke8.js","assets/SvgIcon-Dq3pUyZA.js","assets/generateUtilityClasses-DwKifUxI.js","assets/colors-LINLm1ux.js","assets/ethers-JeCAM1sd.js","assets/index-DuEggWVN.js","assets/index-DmGr1b-6.js","assets/index-IsHNXTne.js","assets/Button-BAwwkqzI.js","assets/CircularProgress-C4P-fp7h.js","assets/index-CLIR3TTD.js","assets/MenuItem-LWWk8UGA.js","assets/AnimatedBackground-B12_GM9W.js","assets/AnimatedBackground-CiurwFBv.css","assets/ShopFooterInner-Br1cblK6.js","assets/TradeService-BXL498ZX.js","assets/index-KO1ZFg5L.js","assets/Assets-CCKhZb2a.js","assets/FilterBar-CdU8B66A.js","assets/SkeletonCards-BysJEVmg.js","assets/LoadMore-BOCtgPLI.js","assets/useInfiniteGrid-B_lo4_wP.js","assets/Market-B-qXN4gx.js","assets/mana-rate-DUB2qMGq.js","assets/buy-DnmiZS49.js","assets/buy-gasless-CBJucGK7.js","assets/ItemDetail-B5T_k-aM.js","assets/ItemDetail-eaGx2XMJ.css","assets/Collection-BZICa7Eq.js","assets/collection-B4pewt6i.js","assets/collection-Ds5shVfK.css","assets/Creator-BGMo0uyK.js","assets/MyAssets-CWuC-vC9.js","assets/import-D910LKG_.js","assets/wallet-kind-CFG7KVhm.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-Bzl5lDGX.js","assets/MyPurchases-DnT7iu9Z.js","assets/ImportListings-XTaxybSV.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-DR3eUWPC.js","assets/GetCredits-DO1TGEVH.js","assets/Success-DGD-8CMf.js","assets/NotFound-sMh1ahg9.js"])))=>i.map(i=>d[i]);
2
+ var kD=Object.defineProperty;var HE=e=>{throw TypeError(e)};var UD=(e,t,r)=>t in e?kD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>UD(e,typeof t!="symbol"?t+"":t,r),vd=(e,t,r)=>t.has(e)||HE("Cannot "+r);var ue=(e,t,r)=>(vd(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)=>(vd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(vd(e,t,"access private method"),r);var Wu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as De,j as J,l as zO,g as WO,R as YO,c as og,L as Tl,a as Ll,m as xn,d as FD,n as HD,o as dr,N as VD,p as GD,B as zD}from"./react-Vu6nbGi5.js";import{g as Sl,p as hl,W as WD,m as YD,h as VE,f as xO}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 Ho=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 Ho{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,c_,$O,XD=($O=class{constructor(){We(this,ti,KD);We(this,c_,!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,c_=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 ug(e){return typeof e=="number"&&e>=0&&e!==1/0}function KO(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(!No(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(Oo(t.options.mutationKey)!==Oo(a))return!1}else if(!No(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)||Oo)(e)}function Oo(e){return JSON.stringify(e,(t,r)=>lg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function No(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>No(e[r],t[r])):!1}var ej=Object.prototype.hasOwnProperty;function XO(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=WE(e)&&WE(t);if(!n&&!(lg(e)&&lg(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 _=XO(p,f,r+1);u[d]=_,_===p&&l++}return a===o&&l===a?e:u}function cg(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 lg(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 dg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?XO(e,t):t}function n6(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 JO(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 QO(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 Po=(()=>{let e=()=>QD;return{isServer(){return e()},setIsServer(t){e=t}}})();function fg(){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 Ho{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 ZO(e){return(e??"online")==="online"?Il.isOnline():!0}var pg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eN(e){let t=!1,r=0,n;const i=fg(),a=()=>i.status!=="pending",s=R=>{var w;if(!a()){const O=new pg(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=()=>ZO(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 b;if(a())return;const h=e.retry??(Po.isServer()?0:3),T=e.retryDelay??uj,v=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++,(b=e.onFail)==null||b.call(e,r,O),tj(v).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,tN=(BO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ug(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Po.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=JO(t.options,t.fetchOptions),h=async(T,v,m)=>{if(R)return Promise.reject(t.signal.reason);if(v==null&&T.pages.length)return Promise.resolve(T);const A=(()=>{const V={client:t.client,queryKey:t.queryKey,pageParam:v,direction:m?"backward":"forward",meta:t.options.meta};return w(V),V})(),P=await O(A),{maxPages:q}=t.options,K=m?nj:rj;return{pages:K(T.pages,P,q),pageParams:K(T.pageParams,v,q)}};if(i&&a.length){const T=i==="backward",v=T?rN:mg,m={pages:a,pageParams:s},b=v(n,m);o=await h(m,b,T)}else{const T=e??a.length;do{const v=u===0?s[0]??n.initialPageParam:mg(n,o);if(u>0&&v==null)break;o=await h(o,v),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 mg(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 rN(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 i6(e,t){return t?mg(e,t)!=null:!1}function a6(e,t){return!t||!e.getPreviousPageParam?!1:rN(e,t)!=null}var Ka,ea,Xa,jr,ta,xt,qo,ra,Pr,nN,Ln,kO,lj=(kO=class extends tN{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,qo);We(this,ra);je(this,ra,!1),je(this,qo,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,qo),...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=dg(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:!KO(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,nN).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 v=this.observers.find(m=>m.options.queryFn);v&&this.setOptions(v.options)}const n=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const v=JO(this.options,r),b=(()=>{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(v,b,this):v(b)},o=(()=>{const v={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(v),v})(),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,eN({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:v=>{v instanceof pg&&v.revert&&this.setState({...ue(this,Xa),fetchStatus:"idle"}),n.abort()},onFail:(v,m)=>{rt(this,Pr,Ln).call(this,{type:"failed",failureCount:v,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 v=await ue(this,xt).start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(f=(p=ue(this,jr).config).onSuccess)==null||f.call(p,v,this),(R=(_=ue(this,jr).config).onSettled)==null||R.call(_,v,this.state.error,this),v}catch(v){if(v instanceof pg){if(v.silent)return ue(this,xt).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw rt(this,Pr,Ln).call(this,{type:"error",error:v}),(O=(w=ue(this,jr).config).onError)==null||O.call(w,v,this),(T=(h=ue(this,jr).config).onSettled)==null||T.call(h,this.state.data,v,this),v}finally{this.scheduleGc()}}},Ka=new WeakMap,ea=new WeakMap,Xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,xt=new WeakMap,qo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,nN=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,...iN(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 iN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ZO(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,Bo,pr,na,Ja,Bn,ni,ko,Qa,Za,ia,aa,ii,es,_t,Qs,hg,yg,gg,_g,Eg,vg,bg,aN,UO,dj=(UO=class extends Ho{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,Bo);We(this,pr);We(this,na);We(this,Ja);We(this,Bn);We(this,ni);We(this,ko);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,fg()),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,_g).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tg(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tg(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,Eg).call(this),rt(this,_t,vg).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,bg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!cg(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,hg).call(this);const a=rt(this,_t,yg).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,gg).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,Bo),{state:c}=t;let d={...c},p=!1,f;if(r._optimisticResults){const K=this.hasListeners(),V=!K&&XE(t,r),W=K&&JE(t,n,r,i);(V||W)&&(d={...d,...iN(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 K;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(K=a.data,O=!0):K=typeof r.placeholderData=="function"?r.placeholderData((q=ue(this,Za))==null?void 0:q.state.data,ue(this,Za)):r.placeholderData,K!==void 0&&(w="success",f=dg(a==null?void 0:a.data,K,r),p=!0)}if(r.select&&f!==void 0&&!O)if(a&&f===(s==null?void 0:s.data)&&r.select===ue(this,ko))f=ue(this,Qa);else try{je(this,ko,r.select),f=r.select(f),f=dg(a==null?void 0:a.data,f,r),je(this,Qa,f),je(this,ni,null)}catch(K){je(this,ni,K)}ue(this,ni)&&(_=ue(this,ni),f=ue(this,Qa),R=Date.now(),w="error");const h=d.fetchStatus==="fetching",T=w==="pending",v=w==="error",m=T&&h,b=f!==void 0,P={status:w,fetchStatus:d.fetchStatus,isPending:T,isSuccess:w==="success",isError:v,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:v&&!b,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:v&&b,isStale:p_(t,r),refetch:this.refetch,promise:ue(this,Bn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=P.data!==void 0,V=P.status==="error"&&!K,W=ce=>{V?ce.reject(P.error):K&&ce.resolve(P.data)},U=()=>{const ce=je(this,Bn,P.promise=fg());W(ce)},F=ue(this,Bn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(V||P.data!==F.value)&&U();break;case"rejected":(!V||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)),cg(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,aN).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,_g).call(this)}},Tr=new WeakMap,st=new WeakMap,Bo=new WeakMap,pr=new WeakMap,na=new WeakMap,Ja=new WeakMap,Bn=new WeakMap,ni=new WeakMap,ko=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,bg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},hg=function(){rt(this,_t,Eg).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Po.isServer()||ue(this,pr).isStale||!ug(t))return;const n=KO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},yg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},gg=function(t){rt(this,_t,vg).call(this),je(this,ii,t),!(Po.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!ug(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)))},_g=function(){rt(this,_t,hg).call(this),rt(this,_t,gg).call(this,rt(this,_t,yg).call(this))},Eg=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},vg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},bg=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,Bo,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},aN=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&&Tg(e,t,t.refetchOnMount)}function Tg(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!cg(e.getCurrentResult(),t)}var Uo,hn,ur,sa,yn,Jn,FO,mj=(FO=class extends tN{constructor(t){super();We(this,yn);We(this,Uo);We(this,hn);We(this,ur);We(this,sa);je(this,Uo,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,v,m,b,A;const r=()=>{rt(this,yn,Jn).call(this,{type:"continue"})},n={client:ue(this,Uo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,eN({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=(v=ue(this,ur).config).onSettled)==null?void 0:m.call(v,void 0,P,this.state.variables,this.state.context,this,n))}catch(q){Promise.reject(q)}try{await((A=(b=this.options).onSettled)==null?void 0:A.call(b,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)}}},Uo=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,Fo,HO,yj=(HO=class extends Ho{constructor(t={}){super();We(this,kn);We(this,xr);We(this,Fo);this.config=t,je(this,kn,new Set),je(this,xr,new Map),je(this,Fo,0)}build(t,r,n){const i=new mj({client:t,mutationCache:this,mutationId:++Wu(this,Fo)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,kn).add(t);const r=Yu(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=Yu(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=Yu(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=Yu(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,Fo=new WeakMap,HO);function Yu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gn,VO,gj=(VO=class extends Ho{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(){Wu(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;Wu(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(Oo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,ts).values()],r={};return t.forEach(n=>{No(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,rs).set(Oo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,rs).values()],r={};return t.forEach(n=>{No(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),sN=De.createContext(void 0),Ej=e=>{const t=De.useContext(sN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vj=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),J.jsx(sN.Provider,{value:e,children:t})),oN=De.createContext(!1),bj=()=>De.useContext(oN);oN.Provider;function Tj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Sj=De.createContext(Tj()),Ij=()=>De.useContext(Sj),Rj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?QO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},wj=e=>{De.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||QO(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]=De.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),p=!n&&u;if(De.useSyncExternalStore(De.useCallback(O=>{const h=p?c.subscribe(Zt.batchCalls(O)):Sr;return c.updateResult(),h},[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),De.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&&!Po.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 $l(e,t){return Cj(e,dj)}const Mj="modulepreload",Dj=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-29194630263.commit-8d11188/"+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)})},uN=Object.prototype.toString;function m_(e){switch(uN.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Fn(e,Error)}}function hs(e,t){return uN.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 ql(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 cN(e){return typeof e=="number"&&e!==e}function Fn(e,t){try{return e instanceof t}catch{return!1}}function lN(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{lN(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 Vo(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(Sg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Sg(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=Sg(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=Sg(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 xu(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&xu(globalThis)||typeof window=="object"&&xu(window)||typeof self=="object"&&xu(self)||typeof Sl=="object"&&xu(Sl)||(function(){return this})()||{};function __(){return ot}function Bl(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 dN(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 ",Ig=["debug","info","warn","error","log","assert","trace"],Rl={};function Go(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?Ig.forEach(r=>{t[r]=(...n)=>{e&&Go(()=>{ot.console[r](`${zj}[${r}]:`,...n)})}}):Ig.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){Go(()=>{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 fN({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function fN(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 pN(e){const t=typeof e=="string"?Kj(e):fN(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"&&mN(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 mN(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 hN(e){if(m_(e))return{message:e.message,name:e.name,stack:e.stack,...av(e)};if(ql(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(hN(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 Rg(e,new Map)}function Rg(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]=Rg(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(Rg(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 yN=50,sv=/\(error: (.*)\)/,ov=/captureMessage|captureException/;function gN(...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>=yN)break}}return tL(i)}}function eL(e){return Array.isArray(e)?gN(...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,yN).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const bd="<anonymous>";function Hn(e){try{return!e||typeof e!="function"?bd:e.name||bd}catch{return bd}}const yl={},uv={};function ya(e,t){yl[e]=yl[e]||[],yl[e].push(t)}function ga(e,t){uv[e]||(t(),uv[e]=!0)}function Xr(e,t){const r=e&&yl[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}),dP=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 b=m.$$typeof;switch(b){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 b}}case r:return b}}}function v(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 v(m)||T(m)===u},gt.isConcurrentMode=v,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,Od.exports=nU()),Od.exports}var Nd,Kv;function aU(){if(Kv)return Nd;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(_),v=s(R),m=0;m<h.length;++m){var b=h[m];if(!r[b]&&!(w&&w[b])&&!(v&&v[b])&&!(T&&T[b])){var A=c(R,b);try{o(_,b,A)}catch{}}}}return _}return Nd=f,Nd}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 De.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;MN(o=>{if(oU(De.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,De.isValidElement(i)?i:(t&&sU&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const cU=De.lazy(()=>Gt(()=>import("./index-BFSADNP4.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.Navbar})));function lU(e){return J.jsx(De.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 Pd={exports:{}},Cd={},Md={exports:{}},Dd={};/**
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 b=m.$$typeof;switch(b){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 b}}case r:return b}}}function v(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 v(m)||T(m)===u},gt.isConcurrentMode=v,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,Od.exports=nU()),Od.exports}var Nd,Kv;function aU(){if(Kv)return Nd;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(_),v=s(R),m=0;m<h.length;++m){var b=h[m];if(!r[b]&&!(w&&w[b])&&!(v&&v[b])&&!(T&&T[b])){var A=c(R,b);try{o(_,b,A)}catch{}}}}return _}return Nd=f,Nd}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 De.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;MN(o=>{if(oU(De.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,De.isValidElement(i)?i:(t&&sU&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const cU=De.lazy(()=>Gt(()=>import("./index-cAYLU9lu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.Navbar})));function lU(e){return J.jsx(De.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 Pd={exports:{}},Cd={},Md={exports:{}},Dd={};/**
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}),dP=e},{reportAllCha
71
71
  Ephemeral address: ${X}
72
72
  Expiration: ${Y.toISOString()}`}e.Authenticator={validateSignature:p,isValidAuthChain:f,createEIP1271MessageHash:_,createSimpleAuthChain:R,createAuthChain:w,initializeAuthChain:O,signPayload:h,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:T,ownerAddress:v,getEphemeralMessage:m};const b=async(X,Y)=>({nextAuthority:Y.payload});e.SIGNER_VALIDATOR=b;const A=async(X,Y)=>{if(!Y.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const L=(0,o.recoverAddressFromEthSignature)(Y.signature,Y.payload),D=X.toLocaleLowerCase(),$=L.toLocaleLowerCase();if(D===$)return{nextAuthority:Y.payload};throw new Error(`Invalid signer address. Expected: ${D}. Actual: ${$}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=A;const P=async(X,Y,L)=>{if(!Y.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:G}=F(Y.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(G>N){const j=(0,o.recoverAddressFromEthSignature)(Y.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: ${G}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=P;const q=async(X,Y,L)=>{if(!Y.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:G}=F(Y.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(G>N&&await se(L==null?void 0:L.provider,X,D,Y.signature,N))return{nextAuthority:$};throw new Error(`Ephemeral key expired. Expiration: ${G}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=q;const K=async(X,Y,L)=>{if(!Y.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,Y.payload,Y.signature,L.dateToValidateExpirationInMillis))return{nextAuthority:Y.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=K;const V=async(X,Y)=>({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 Y=X.replace(/\r/g,""),L=Y.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 G=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:Y,ephemeralAddress:G,expiration:j}}e.parseEmphemeralPayload=F;async function ce(X,Y,L,D){const $=_(Y),G=(0,a.hexToBytes)(L);let N;try{N=(0,a.bytesToHex)(await X.isValidSignature($,G,D))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const j=(0,o.createEthereumMessageHash)(Y);try{N=(0,a.bytesToHex)(await X.isValidSignature(j,G,D))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function se(X,Y,L,D,$){if(!X)throw new Error("Missing provider");const G=new a.default(X),N=await(0,s.SignatureValidator)(G,Y);let j=await ce(N,L,D);if(j)return!0;const Z=new u.default(G);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 V}}})(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(JC(),e),r(HG(),e),r(XC(),e)})(Ci)),Ci}var GG=VG(),xi={},Wr={},al={exports:{}},sl={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})(sl,sl.exports)),sl.exports}var ol={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})(ol,ol.exports)),ol.exports}var ul={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})(ul,ul.exports)),ul.exports}var cl={exports:{}},ll={exports:{}},Yw;function QC(){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})(ll,ll.exports)),ll.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(QC());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})(cl,cl.exports)),cl.exports}var dl={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})(dl,dl.exports)),dl.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(QC());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 v={}.toString.call(h).slice(8,-1);return v==="Object"&&h.constructor&&(v=h.constructor.name),v==="Map"||v==="Set"?Array.from(h):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?p(h,T):void 0}}function p(h,T){(T==null||T>h.length)&&(T=h.length);for(var v=0,m=Array(T);v<T;v++)m[v]=h[v];return m}function f(h,T){var v=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(v!=null){var m,b,A,P,q=[],K=!0,V=!1;try{if(A=(v=v.call(h)).next,T!==0)for(;!(K=(m=A.call(v)).done)&&(q.push(m.value),q.length!==T);K=!0);}catch(W){V=!0,b=W}finally{try{if(!K&&v.return!=null&&(P=v.return(),Object(P)!==P))return}finally{if(V)throw b}}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 v,m,b,A,P,q,K,V;K=h.split("#"),h=K.shift(),K=h.split("?"),h=K.shift();var W=h.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,v=le.toLowerCase(),T.require_valid_protocol&&T.protocols.indexOf(v)===-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("/"),Y=X===-1?se:se.substring(0,X),L=Y.indexOf("@");if(L!==-1){var D=Y.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,G=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(G&&!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(K=h.split("/"),h=K.shift(),h===""&&!T.require_host)return!0;if(K=h.split("@"),K.length>1){if(T.disallow_auth||K[0]===""||(m=K.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=K.join("@"),q=null,V=null;var Ie=A.match(w);if(Ie?(b="",V=Ie[1],q=Ie[2]||null):(K=A.split(":"),b=K.shift(),K.length&&(q=K.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)(b,T.host_whitelist):b===""&&!T.require_host?!0:!(!(0,s.default)(b)&&!(0,a.default)(b,T)&&(!V||!(0,s.default)(V,6))||(b=b||V,T.host_blacklist&&(0,n.default)(b,T.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(al,al.exports)),al.exports}var ny={},Jw;function ZC(){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()}`}})(ny)),ny}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=ZC(),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 v=a;let m=null;const b=new Promise((A,P)=>{m=({data:q})=>{!q||q.target!==t.SINGLE_SIGN_ON_TARGET||q.id!==v||(q.error?P(new Error(q.error)):A(q))},window.addEventListener("message",m)});w.postMessage((0,t.createMessage)({id:v,action:O,...h}),s);try{return await(T?Promise.race([b,new Promise((A,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),T))]):b)}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(ZC(),e)})(xi)),xi}var Wg=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(tM(n))return n}return null}var eA={},bn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(bn||(bn={}));function eM(){return Object.values(bn)}function tM(e){return eM().includes(e)}function fl(e){if(tM(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${eM().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?fl(t):r?fl(r):n?fl(n):i?fl(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 hl=="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 rM(){return(await Gt(async()=>{const{connection:e}=await import("./index-BOh--8gO.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 WD(e.provider),n=r.getSigner();let i=Wg.localStorageGetIdentity(t);if(!i){const a=YD.createRandom();i=await GG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:VE(a.publicKey),privateKey:VE(a.privateKey)},W3,s=>n.signMessage(s)),Wg.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 rM()).tryPreviousConnection();return!t.account||!Wg.localStorageGetIdentity(t.account.toLowerCase())?null:await Y3(t)}catch{return null}}async function X3(){try{await(await rM()).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 $o(e){return Math.round(e*10)/100}function lE(e){return!e.tokenId}function c6(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:$o(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:lE(e)}}function l6(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:$o(n.priceCredits)})),value_credits:t,value_usd:$o(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 d6(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 Yg=null;function u4(e){Yg=e}function nA(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Yg)try{Yg(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 El=null;const nM=e=>e?`${aA}:${e.toLowerCase()}`:aA;function sA(e){var t;try{const r=localStorage.getItem(nM(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(nM(El),JSON.stringify(e))}catch{}}const Dl=Is(e=>({items:sA(El),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=>{El=t?t.toLowerCase():null,e({items:sA(El)})}})),uA="shop:followed-creators:v1",y4=200;let dE=null;const iM=e=>e?`${uA}:${e.toLowerCase()}`:uA;function cA(){try{const e=localStorage.getItem(iM(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(iM(dE),JSON.stringify(e))}catch{}}const xg=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()})}})),iy="shop:signing_in",Rs=Is(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(iy,"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),xg.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),xg.getState().reloadFor(t.address),t4(t.address,{sign_in_method:tA(t.providerType)});let r=!1;try{r=sessionStorage.getItem(iy)==="1",r&&sessionStorage.removeItem(iy)}catch{}r&&ci("Shop Signed In",{method:tA(t.providerType),is_new_user:i4(t.address)})}})),g4=Nt.peerUrl;function fE(e){return $l({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={},ay={},dA;function aM(){return dA||(dA=1,Object.defineProperty(ay,"__esModule",{value:!0})),ay}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 og=="object"&&og)||e(typeof Js=="object"&&Js)||(function(){return this})()||Function("return this")(),Js}var sy,mA;function Ra(){return mA||(mA=1,sy=function(e){try{return!!e()}catch{return!0}}),sy}var oy,hA;function od(){if(hA)return oy;hA=1;var e=Ra();return oy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),oy}var uy,yA;function _4(){if(yA)return uy;yA=1;var e=od(),t=Function.prototype,r=t.apply,n=t.call;return uy=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),uy}var cy,gA;function ws(){if(gA)return cy;gA=1;var e=od(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return cy=e?n:function(i){return function(){return r.apply(i,arguments)}},cy}var ly,_A;function sM(){if(_A)return ly;_A=1;var e=ws(),t=e({}.toString),r=e("".slice);return ly=function(n){return r(t(n),8,-1)},ly}var dy,EA;function oM(){if(EA)return dy;EA=1;var e=sM(),t=ws();return dy=function(r){if(e(r)==="Function")return t(r)},dy}var fy,vA;function wa(){if(vA)return fy;vA=1;var e=typeof document=="object"&&document.all;return fy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},fy}var py={},my,bA;function ru(){if(bA)return my;bA=1;var e=Ra();return my=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),my}var hy,TA;function pE(){if(TA)return hy;TA=1;var e=od(),t=Function.prototype.call;return hy=e?t.bind(t):function(){return t.apply(t,arguments)},hy}var yy={},SA;function E4(){if(SA)return yy;SA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return yy.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,yy}var gy,IA;function uM(){return IA||(IA=1,gy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),gy}var _y,RA;function v4(){if(RA)return _y;RA=1;var e=ws(),t=Ra(),r=sM(),n=Object,i=e("".split);return _y=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,_y}var Ey,wA;function cM(){return wA||(wA=1,Ey=function(e){return e==null}),Ey}var vy,AA;function lM(){if(AA)return vy;AA=1;var e=cM(),t=TypeError;return vy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},vy}var by,OA;function b4(){if(OA)return by;OA=1;var e=v4(),t=lM();return by=function(r){return e(t(r))},by}var Ty,NA;function ud(){if(NA)return Ty;NA=1;var e=wa();return Ty=function(t){return typeof t=="object"?t!==null:e(t)},Ty}var Sy,PA;function dM(){return PA||(PA=1,Sy={}),Sy}var Iy,CA;function T4(){if(CA)return Iy;CA=1;var e=dM(),t=an(),r=wa(),n=function(i){return r(i)?i:void 0};return Iy=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Iy}var Ry,MA;function S4(){if(MA)return Ry;MA=1;var e=ws();return Ry=e({}.isPrototypeOf),Ry}var wy,DA;function I4(){if(DA)return wy;DA=1;var e=an(),t=e.navigator,r=t&&t.userAgent;return wy=r?String(r):"",wy}var Ay,jA;function R4(){if(jA)return Ay;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]))),Ay=o,Ay}var Oy,LA;function fM(){if(LA)return Oy;LA=1;var e=R4(),t=Ra(),r=an(),n=r.String;return Oy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Oy}var Ny,$A;function pM(){if($A)return Ny;$A=1;var e=fM();return Ny=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ny}var Py,qA;function mM(){if(qA)return Py;qA=1;var e=T4(),t=wa(),r=S4(),n=pM(),i=Object;return Py=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Py}var Cy,BA;function w4(){if(BA)return Cy;BA=1;var e=String;return Cy=function(t){try{return e(t)}catch{return"Object"}},Cy}var My,kA;function hM(){if(kA)return My;kA=1;var e=wa(),t=w4(),r=TypeError;return My=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},My}var Dy,UA;function A4(){if(UA)return Dy;UA=1;var e=hM(),t=cM();return Dy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Dy}var jy,FA;function O4(){if(FA)return jy;FA=1;var e=pE(),t=wa(),r=ud(),n=TypeError;return jy=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")},jy}var Ly={exports:{}},$y,HA;function N4(){return HA||(HA=1,$y=!0),$y}var qy,VA;function P4(){if(VA)return qy;VA=1;var e=an(),t=Object.defineProperty;return qy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},qy}var GA;function C4(){if(GA)return Ly.exports;GA=1;var e=N4(),t=an(),r=P4(),n="__core-js_shared__",i=Ly.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"}),Ly.exports}var By,zA;function M4(){if(zA)return By;zA=1;var e=C4();return By=function(t,r){return e[t]||(e[t]=r||{})},By}var ky,WA;function D4(){if(WA)return ky;WA=1;var e=lM(),t=Object;return ky=function(r){return t(e(r))},ky}var Uy,YA;function mE(){if(YA)return Uy;YA=1;var e=ws(),t=D4(),r=e({}.hasOwnProperty);return Uy=Object.hasOwn||function(i,a){return r(t(i),a)},Uy}var Fy,xA;function j4(){if(xA)return Fy;xA=1;var e=ws(),t=0,r=Math.random(),n=e(1.1.toString);return Fy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Fy}var Hy,KA;function L4(){if(KA)return Hy;KA=1;var e=an(),t=M4(),r=mE(),n=j4(),i=fM(),a=pM(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return Hy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Hy}var Vy,XA;function $4(){if(XA)return Vy;XA=1;var e=pE(),t=ud(),r=mM(),n=A4(),i=O4(),a=L4(),s=TypeError,o=a("toPrimitive");return Vy=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)},Vy}var Gy,JA;function yM(){if(JA)return Gy;JA=1;var e=$4(),t=mM();return Gy=function(r){var n=e(r,"string");return t(n)?n:n+""},Gy}var zy,QA;function q4(){if(QA)return zy;QA=1;var e=an(),t=ud(),r=e.document,n=t(r)&&t(r.createElement);return zy=function(i){return n?r.createElement(i):{}},zy}var Wy,ZA;function gM(){if(ZA)return Wy;ZA=1;var e=ru(),t=Ra(),r=q4();return Wy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Wy}var eO;function B4(){if(eO)return py;eO=1;var e=ru(),t=pE(),r=E4(),n=uM(),i=b4(),a=yM(),s=mE(),o=gM(),u=Object.getOwnPropertyDescriptor;return py.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])},py}var Yy,tO;function k4(){if(tO)return Yy;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 Yy=n,Yy}var xy,rO;function U4(){if(rO)return xy;rO=1;var e=oM(),t=hM(),r=od(),n=e(e.bind);return xy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},xy}var Ky={},Xy,nO;function F4(){if(nO)return Xy;nO=1;var e=ru(),t=Ra();return Xy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Xy}var Jy,iO;function H4(){if(iO)return Jy;iO=1;var e=ud(),t=String,r=TypeError;return Jy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Jy}var aO;function V4(){if(aO)return Ky;aO=1;var e=ru(),t=gM(),r=F4(),n=H4(),i=yM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Ky.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},Ky}var Qy,sO;function G4(){if(sO)return Qy;sO=1;var e=ru(),t=V4(),r=uM();return Qy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Qy}var Zy,oO;function z4(){if(oO)return Zy;oO=1;var e=an(),t=_4(),r=oM(),n=wa(),i=B4().f,a=k4(),s=dM(),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 Zy=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,v,m,b,A,P,q,K,V,W;for(A in p)v=a(_?A:f+(R?".":"#")+A,d.forced),m=!v&&O&&l(O,A),q=h[A],m&&(d.dontCallGetSet?(W=i(O,A),K=W&&W.value):K=O[A]),P=m&&K?K:p[A],!(!v&&!w&&typeof q==typeof P)&&(d.bind&&m?V=o(P,e):d.wrap&&m?V=c(P):w&&n(P)?V=r(P):V=P,(d.sham||P&&P.sham||q&&q.sham)&&u(V,"sham",!0),u(h,A,V),w&&(b=f+"Prototype",l(s,b)||u(s,b,{}),u(s[b],A,P),d.real&&T&&(v||!T[A])&&u(T,A,P)))},Zy}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 eg,cO;function Y4(){return cO||(cO=1,W4(),eg=an()),eg}var tg,lO;function x4(){if(lO)return tg;lO=1;var e=Y4();return tg=e,tg}var dO;function _M(){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 EM(){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=JC(),r=_M(),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),v=[d,p,h,T].join(":").toLowerCase(),m=0,b=t.Authenticator.signPayload(c,v);try{for(var A=e(b),P=A.next();!P.done;P=A.next()){var q=P.value;O.set(n+m,JSON.stringify(q)),m++}}catch(K){R={error:K}}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 vM(){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(EM()),i=_M();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),v=new l(p),m=o(_,p.method||"GET",T.pathname,R||{});return m.forEach(function(b,A){v.headers.set(A,b)}),c(v)}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(aM(),e);var i=vM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=EM();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(aM(),e),r(K4(),e);var i=n(vM());e.default=(0,i.default)()})(Dn)),Dn}var J4=X4();const cd=WO(J4);async function Q4(e,t){const r=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await cd(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 f6(e,t,r){const n=`${Nt.creditsServerUrl}/credits/authorize`,i=await cd(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 p6(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 cd(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 m6(e,t){if(t.length===0)return 0;const r=`${Nt.creditsServerUrl}/credits/authorize/cancel`,n=await cd(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 h6(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 $l({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>Z4(e.address,e.identity)})}const tz=e=>$o(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:$o(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 y6(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=De.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return De.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(Tl,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var Kg=function(e,t){return Kg=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])},Kg(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");Kg(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 bM(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 TM(e,t){return function(r,n){t(r,n,e)}}function SM(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 IM(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 RM(e){return typeof e=="symbol"?e:"".concat(e)}function wM(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 AM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function OM(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 NM(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 ld=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 PM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&ld(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 CM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hE(arguments[t]));return e}function MM(){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 DM(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 jM(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 LM(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 $M(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},Xg=function(e){return Xg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Xg(e)};function qM(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Xg(e),n=0;n<r.length;n++)r[n]!=="default"&&ld(t,e,r[n]);return nz(t,e),t}function BM(e){return e&&e.__esModule?e:{default:e}}function kM(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 UM(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 FM(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 HM(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 VM(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 GM(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:bM,__param:TM,__esDecorate:SM,__runInitializers:IM,__propKey:RM,__setFunctionName:wM,__metadata:AM,__awaiter:OM,__generator:NM,__createBinding:ld,__exportStar:PM,__values:jl,__read:hE,__spread:CM,__spreadArrays:MM,__spreadArray:er,__await:fs,__asyncGenerator:DM,__asyncDelegator:jM,__asyncValues:LM,__makeTemplateObject:$M,__importStar:qM,__importDefault:BM,__classPrivateFieldGet:kM,__classPrivateFieldSet:UM,__classPrivateFieldIn:FM,__addDisposableResource:HM,__disposeResources:VM,__rewriteRelativeImportExtension:GM},g6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:HM,get __assign(){return qe},__asyncDelegator:jM,__asyncGenerator:DM,__asyncValues:LM,__await:fs,__awaiter:OM,__classPrivateFieldGet:kM,__classPrivateFieldIn:FM,__classPrivateFieldSet:UM,__createBinding:ld,__decorate:bM,__disposeResources:VM,__esDecorate:SM,__exportStar:PM,__extends:Mr,__generator:NM,__importDefault:BM,__importStar:qM,__makeTemplateObject:$M,__metadata:AM,__param:TM,__propKey:RM,__read:hE,__rest:As,__rewriteRelativeImportExtension:GM,__runInitializers:IM,__setFunctionName:wM,__spread:CM,__spreadArray:er,__spreadArrays:MM,__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 zM(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 WM(e,t,r,n,i){return r.bind(t,e,n,i)}function uz(e,t){var r=e.length===1?oz:zM;return WM(e,this,r,t.cache.create(),t.serializer)}function cz(e,t){return WM(e,this,zM,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 YM(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 xM(e){return e.type===Dt.number}function KM(e){return e.type===Dt.date}function XM(e){return e.type===Dt.time}function JM(e){return e.type===Dt.select}function QM(e){return e.type===Dt.plural}function pz(e){return e.type===Dt.pound}function ZM(e){return e.type===Dt.tag}function eD(e){return!!(e&&typeof e=="object"&&e.type===ps.number)}function Jg(e){return!!(e&&typeof e=="object"&&e.type===ps.dateTime)}var tD=/[ \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,rD=/^(@+)?(\+|#+)?[rs]?$/g,Ez=/(\*)(0+)|(#+)(0+)|(0+)/g,nD=/^(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(rD,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 iD(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)),!nD.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function EO(e){var t={},r=iD(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(nD.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(rD.test(i.stem)){t=qe(qe({},t),_O(i.stem));continue}var s=iD(i.stem);s&&(t=qe(qe({},t),s));var o=vz(i.stem);o&&(t=qe(qe({},t),o))}return t}var pl={"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=pl[n||""]||pl[r||""]||pl["".concat(r,"-001")]||pl["001"];return i[0]}var rg,Iz=new RegExp("^".concat(tD.source,"*")),Rz=new RegExp("".concat(tD.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},Qg=!0;try{var jz=sD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qg=((rg=jz.exec("a"))===null||rg===void 0?void 0:rg[0])==="a"}catch{Qg=!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},Zg=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},aD=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 sD(e,t){return new RegExp(e,t)}var e_;if(Qg){var TO=sD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");e_=function(t,r){var n;TO.lastIndex=r;var i=TO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else e_=function(t,r){for(var n=[];;){var i=aD(t,r);if(i===void 0||oD(i)||Uz(i))break;n.push(i),r+=i>=65536?2:1}return Zg.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&&t_(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()||!t_(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 Zg.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(),Zg(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=e_(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 v=this.parseIdentifierIfPossible(),m=0;if(o!=="select"&&v.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(),v=this.parseIdentifierIfPossible(),m=d.val}var b=this.tryParsePluralOrSelectOptions(t,o,r,v);if(b.err)return b;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=ct(i,this.clonePosition());return o==="select"?{val:{type:Dt.select,value:n,options:bO(b.val),location:A},err:null}:{val:{type:Dt.plural,value:n,options:bO(b.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=aD(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()&&oD(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 t_(e){return e>=97&&e<=122||e>=65&&e<=90}function Bz(e){return t_(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 oD(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 r_(e){e.forEach(function(t){if(delete t.location,JM(t)||QM(t))for(var r in t.options)delete t.options[r].location,r_(t.options[r].value);else xM(t)&&eD(t.style)||(KM(t)||XM(t))&&Jg(t.style)?delete t.style.location:ZM(t)&&r_(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||r_(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 uD(e){return typeof e=="function"}function vl(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(KM(c)){var f=typeof c.style=="string"?n.date[c.style]:Jg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(XM(c)){var f=typeof c.style=="string"?n.time[c.style]:Jg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(xM(c)){var f=typeof c.style=="string"?n.number[c.style]:eD(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(ZM(c)){var _=c.children,R=c.value,w=i[R];if(!uD(w))throw new Hz(R,"function",s);var O=vl(_,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(JM(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,vl(T.value,t,r,n,i));continue}if(QM(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 v={}.toString.call(h).slice(8,-1);return v==="Object"&&h.constructor&&(v=h.constructor.name),v==="Map"||v==="Set"?Array.from(h):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?p(h,T):void 0}}function p(h,T){(T==null||T>h.length)&&(T=h.length);for(var v=0,m=Array(T);v<T;v++)m[v]=h[v];return m}function f(h,T){var v=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(v!=null){var m,b,A,P,q=[],K=!0,V=!1;try{if(A=(v=v.call(h)).next,T!==0)for(;!(K=(m=A.call(v)).done)&&(q.push(m.value),q.length!==T);K=!0);}catch(W){V=!0,b=W}finally{try{if(!K&&v.return!=null&&(P=v.return(),Object(P)!==P))return}finally{if(V)throw b}}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 v,m,b,A,P,q,K,V;K=h.split("#"),h=K.shift(),K=h.split("?"),h=K.shift();var W=h.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,v=le.toLowerCase(),T.require_valid_protocol&&T.protocols.indexOf(v)===-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("/"),Y=X===-1?se:se.substring(0,X),L=Y.indexOf("@");if(L!==-1){var D=Y.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,G=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(G&&!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(K=h.split("/"),h=K.shift(),h===""&&!T.require_host)return!0;if(K=h.split("@"),K.length>1){if(T.disallow_auth||K[0]===""||(m=K.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=K.join("@"),q=null,V=null;var Ie=A.match(w);if(Ie?(b="",V=Ie[1],q=Ie[2]||null):(K=A.split(":"),b=K.shift(),K.length&&(q=K.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)(b,T.host_whitelist):b===""&&!T.require_host?!0:!(!(0,s.default)(b)&&!(0,a.default)(b,T)&&(!V||!(0,s.default)(V,6))||(b=b||V,T.host_blacklist&&(0,n.default)(b,T.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(al,al.exports)),al.exports}var ny={},Jw;function ZC(){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()}`}})(ny)),ny}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=ZC(),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 v=a;let m=null;const b=new Promise((A,P)=>{m=({data:q})=>{!q||q.target!==t.SINGLE_SIGN_ON_TARGET||q.id!==v||(q.error?P(new Error(q.error)):A(q))},window.addEventListener("message",m)});w.postMessage((0,t.createMessage)({id:v,action:O,...h}),s);try{return await(T?Promise.race([b,new Promise((A,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),T))]):b)}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(ZC(),e)})(xi)),xi}var Wg=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(tM(n))return n}return null}var eA={},bn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(bn||(bn={}));function eM(){return Object.values(bn)}function tM(e){return eM().includes(e)}function fl(e){if(tM(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${eM().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?fl(t):r?fl(r):n?fl(n):i?fl(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 hl=="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 rM(){return(await Gt(async()=>{const{connection:e}=await import("./index-DuEggWVN.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 WD(e.provider),n=r.getSigner();let i=Wg.localStorageGetIdentity(t);if(!i){const a=YD.createRandom();i=await GG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:VE(a.publicKey),privateKey:VE(a.privateKey)},W3,s=>n.signMessage(s)),Wg.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 rM()).tryPreviousConnection();return!t.account||!Wg.localStorageGetIdentity(t.account.toLowerCase())?null:await Y3(t)}catch{return null}}async function X3(){try{await(await rM()).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 $o(e){return Math.round(e*10)/100}function lE(e){return!e.tokenId}function c6(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:$o(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:lE(e)}}function l6(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:$o(n.priceCredits)})),value_credits:t,value_usd:$o(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 d6(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 Yg=null;function u4(e){Yg=e}function nA(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Yg)try{Yg(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 El=null;const nM=e=>e?`${aA}:${e.toLowerCase()}`:aA;function sA(e){var t;try{const r=localStorage.getItem(nM(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(nM(El),JSON.stringify(e))}catch{}}const Dl=Is(e=>({items:sA(El),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=>{El=t?t.toLowerCase():null,e({items:sA(El)})}})),uA="shop:followed-creators:v1",y4=200;let dE=null;const iM=e=>e?`${uA}:${e.toLowerCase()}`:uA;function cA(){try{const e=localStorage.getItem(iM(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(iM(dE),JSON.stringify(e))}catch{}}const xg=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()})}})),iy="shop:signing_in",Rs=Is(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(iy,"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),xg.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),xg.getState().reloadFor(t.address),t4(t.address,{sign_in_method:tA(t.providerType)});let r=!1;try{r=sessionStorage.getItem(iy)==="1",r&&sessionStorage.removeItem(iy)}catch{}r&&ci("Shop Signed In",{method:tA(t.providerType),is_new_user:i4(t.address)})}})),g4=Nt.peerUrl;function fE(e){return $l({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={},ay={},dA;function aM(){return dA||(dA=1,Object.defineProperty(ay,"__esModule",{value:!0})),ay}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 og=="object"&&og)||e(typeof Js=="object"&&Js)||(function(){return this})()||Function("return this")(),Js}var sy,mA;function Ra(){return mA||(mA=1,sy=function(e){try{return!!e()}catch{return!0}}),sy}var oy,hA;function od(){if(hA)return oy;hA=1;var e=Ra();return oy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),oy}var uy,yA;function _4(){if(yA)return uy;yA=1;var e=od(),t=Function.prototype,r=t.apply,n=t.call;return uy=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),uy}var cy,gA;function ws(){if(gA)return cy;gA=1;var e=od(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return cy=e?n:function(i){return function(){return r.apply(i,arguments)}},cy}var ly,_A;function sM(){if(_A)return ly;_A=1;var e=ws(),t=e({}.toString),r=e("".slice);return ly=function(n){return r(t(n),8,-1)},ly}var dy,EA;function oM(){if(EA)return dy;EA=1;var e=sM(),t=ws();return dy=function(r){if(e(r)==="Function")return t(r)},dy}var fy,vA;function wa(){if(vA)return fy;vA=1;var e=typeof document=="object"&&document.all;return fy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},fy}var py={},my,bA;function ru(){if(bA)return my;bA=1;var e=Ra();return my=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),my}var hy,TA;function pE(){if(TA)return hy;TA=1;var e=od(),t=Function.prototype.call;return hy=e?t.bind(t):function(){return t.apply(t,arguments)},hy}var yy={},SA;function E4(){if(SA)return yy;SA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return yy.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,yy}var gy,IA;function uM(){return IA||(IA=1,gy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),gy}var _y,RA;function v4(){if(RA)return _y;RA=1;var e=ws(),t=Ra(),r=sM(),n=Object,i=e("".split);return _y=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,_y}var Ey,wA;function cM(){return wA||(wA=1,Ey=function(e){return e==null}),Ey}var vy,AA;function lM(){if(AA)return vy;AA=1;var e=cM(),t=TypeError;return vy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},vy}var by,OA;function b4(){if(OA)return by;OA=1;var e=v4(),t=lM();return by=function(r){return e(t(r))},by}var Ty,NA;function ud(){if(NA)return Ty;NA=1;var e=wa();return Ty=function(t){return typeof t=="object"?t!==null:e(t)},Ty}var Sy,PA;function dM(){return PA||(PA=1,Sy={}),Sy}var Iy,CA;function T4(){if(CA)return Iy;CA=1;var e=dM(),t=an(),r=wa(),n=function(i){return r(i)?i:void 0};return Iy=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},Iy}var Ry,MA;function S4(){if(MA)return Ry;MA=1;var e=ws();return Ry=e({}.isPrototypeOf),Ry}var wy,DA;function I4(){if(DA)return wy;DA=1;var e=an(),t=e.navigator,r=t&&t.userAgent;return wy=r?String(r):"",wy}var Ay,jA;function R4(){if(jA)return Ay;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]))),Ay=o,Ay}var Oy,LA;function fM(){if(LA)return Oy;LA=1;var e=R4(),t=Ra(),r=an(),n=r.String;return Oy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Oy}var Ny,$A;function pM(){if($A)return Ny;$A=1;var e=fM();return Ny=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ny}var Py,qA;function mM(){if(qA)return Py;qA=1;var e=T4(),t=wa(),r=S4(),n=pM(),i=Object;return Py=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Py}var Cy,BA;function w4(){if(BA)return Cy;BA=1;var e=String;return Cy=function(t){try{return e(t)}catch{return"Object"}},Cy}var My,kA;function hM(){if(kA)return My;kA=1;var e=wa(),t=w4(),r=TypeError;return My=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},My}var Dy,UA;function A4(){if(UA)return Dy;UA=1;var e=hM(),t=cM();return Dy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Dy}var jy,FA;function O4(){if(FA)return jy;FA=1;var e=pE(),t=wa(),r=ud(),n=TypeError;return jy=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")},jy}var Ly={exports:{}},$y,HA;function N4(){return HA||(HA=1,$y=!0),$y}var qy,VA;function P4(){if(VA)return qy;VA=1;var e=an(),t=Object.defineProperty;return qy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},qy}var GA;function C4(){if(GA)return Ly.exports;GA=1;var e=N4(),t=an(),r=P4(),n="__core-js_shared__",i=Ly.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"}),Ly.exports}var By,zA;function M4(){if(zA)return By;zA=1;var e=C4();return By=function(t,r){return e[t]||(e[t]=r||{})},By}var ky,WA;function D4(){if(WA)return ky;WA=1;var e=lM(),t=Object;return ky=function(r){return t(e(r))},ky}var Uy,YA;function mE(){if(YA)return Uy;YA=1;var e=ws(),t=D4(),r=e({}.hasOwnProperty);return Uy=Object.hasOwn||function(i,a){return r(t(i),a)},Uy}var Fy,xA;function j4(){if(xA)return Fy;xA=1;var e=ws(),t=0,r=Math.random(),n=e(1.1.toString);return Fy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Fy}var Hy,KA;function L4(){if(KA)return Hy;KA=1;var e=an(),t=M4(),r=mE(),n=j4(),i=fM(),a=pM(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return Hy=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},Hy}var Vy,XA;function $4(){if(XA)return Vy;XA=1;var e=pE(),t=ud(),r=mM(),n=A4(),i=O4(),a=L4(),s=TypeError,o=a("toPrimitive");return Vy=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)},Vy}var Gy,JA;function yM(){if(JA)return Gy;JA=1;var e=$4(),t=mM();return Gy=function(r){var n=e(r,"string");return t(n)?n:n+""},Gy}var zy,QA;function q4(){if(QA)return zy;QA=1;var e=an(),t=ud(),r=e.document,n=t(r)&&t(r.createElement);return zy=function(i){return n?r.createElement(i):{}},zy}var Wy,ZA;function gM(){if(ZA)return Wy;ZA=1;var e=ru(),t=Ra(),r=q4();return Wy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Wy}var eO;function B4(){if(eO)return py;eO=1;var e=ru(),t=pE(),r=E4(),n=uM(),i=b4(),a=yM(),s=mE(),o=gM(),u=Object.getOwnPropertyDescriptor;return py.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])},py}var Yy,tO;function k4(){if(tO)return Yy;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 Yy=n,Yy}var xy,rO;function U4(){if(rO)return xy;rO=1;var e=oM(),t=hM(),r=od(),n=e(e.bind);return xy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},xy}var Ky={},Xy,nO;function F4(){if(nO)return Xy;nO=1;var e=ru(),t=Ra();return Xy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Xy}var Jy,iO;function H4(){if(iO)return Jy;iO=1;var e=ud(),t=String,r=TypeError;return Jy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Jy}var aO;function V4(){if(aO)return Ky;aO=1;var e=ru(),t=gM(),r=F4(),n=H4(),i=yM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Ky.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},Ky}var Qy,sO;function G4(){if(sO)return Qy;sO=1;var e=ru(),t=V4(),r=uM();return Qy=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Qy}var Zy,oO;function z4(){if(oO)return Zy;oO=1;var e=an(),t=_4(),r=oM(),n=wa(),i=B4().f,a=k4(),s=dM(),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 Zy=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,v,m,b,A,P,q,K,V,W;for(A in p)v=a(_?A:f+(R?".":"#")+A,d.forced),m=!v&&O&&l(O,A),q=h[A],m&&(d.dontCallGetSet?(W=i(O,A),K=W&&W.value):K=O[A]),P=m&&K?K:p[A],!(!v&&!w&&typeof q==typeof P)&&(d.bind&&m?V=o(P,e):d.wrap&&m?V=c(P):w&&n(P)?V=r(P):V=P,(d.sham||P&&P.sham||q&&q.sham)&&u(V,"sham",!0),u(h,A,V),w&&(b=f+"Prototype",l(s,b)||u(s,b,{}),u(s[b],A,P),d.real&&T&&(v||!T[A])&&u(T,A,P)))},Zy}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 eg,cO;function Y4(){return cO||(cO=1,W4(),eg=an()),eg}var tg,lO;function x4(){if(lO)return tg;lO=1;var e=Y4();return tg=e,tg}var dO;function _M(){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 EM(){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=JC(),r=_M(),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),v=[d,p,h,T].join(":").toLowerCase(),m=0,b=t.Authenticator.signPayload(c,v);try{for(var A=e(b),P=A.next();!P.done;P=A.next()){var q=P.value;O.set(n+m,JSON.stringify(q)),m++}}catch(K){R={error:K}}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 vM(){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(EM()),i=_M();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),v=new l(p),m=o(_,p.method||"GET",T.pathname,R||{});return m.forEach(function(b,A){v.headers.set(A,b)}),c(v)}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(aM(),e);var i=vM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=EM();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(aM(),e),r(K4(),e);var i=n(vM());e.default=(0,i.default)()})(Dn)),Dn}var J4=X4();const cd=WO(J4);async function Q4(e,t){const r=`${Nt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await cd(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 f6(e,t,r){const n=`${Nt.creditsServerUrl}/credits/authorize`,i=await cd(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 p6(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 cd(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 m6(e,t){if(t.length===0)return 0;const r=`${Nt.creditsServerUrl}/credits/authorize/cancel`,n=await cd(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 h6(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 $l({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>Z4(e.address,e.identity)})}const tz=e=>$o(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:$o(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 y6(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=De.useRef(null),a=e.reduce((s,o)=>s+o.priceCredits,0);return De.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(Tl,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var Kg=function(e,t){return Kg=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])},Kg(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");Kg(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 bM(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 TM(e,t){return function(r,n){t(r,n,e)}}function SM(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 IM(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 RM(e){return typeof e=="symbol"?e:"".concat(e)}function wM(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 AM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function OM(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 NM(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 ld=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 PM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&ld(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 CM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hE(arguments[t]));return e}function MM(){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 DM(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 jM(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 LM(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 $M(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},Xg=function(e){return Xg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Xg(e)};function qM(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Xg(e),n=0;n<r.length;n++)r[n]!=="default"&&ld(t,e,r[n]);return nz(t,e),t}function BM(e){return e&&e.__esModule?e:{default:e}}function kM(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 UM(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 FM(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 HM(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 VM(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 GM(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:bM,__param:TM,__esDecorate:SM,__runInitializers:IM,__propKey:RM,__setFunctionName:wM,__metadata:AM,__awaiter:OM,__generator:NM,__createBinding:ld,__exportStar:PM,__values:jl,__read:hE,__spread:CM,__spreadArrays:MM,__spreadArray:er,__await:fs,__asyncGenerator:DM,__asyncDelegator:jM,__asyncValues:LM,__makeTemplateObject:$M,__importStar:qM,__importDefault:BM,__classPrivateFieldGet:kM,__classPrivateFieldSet:UM,__classPrivateFieldIn:FM,__addDisposableResource:HM,__disposeResources:VM,__rewriteRelativeImportExtension:GM},g6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:HM,get __assign(){return qe},__asyncDelegator:jM,__asyncGenerator:DM,__asyncValues:LM,__await:fs,__awaiter:OM,__classPrivateFieldGet:kM,__classPrivateFieldIn:FM,__classPrivateFieldSet:UM,__createBinding:ld,__decorate:bM,__disposeResources:VM,__esDecorate:SM,__exportStar:PM,__extends:Mr,__generator:NM,__importDefault:BM,__importStar:qM,__makeTemplateObject:$M,__metadata:AM,__param:TM,__propKey:RM,__read:hE,__rest:As,__rewriteRelativeImportExtension:GM,__runInitializers:IM,__setFunctionName:wM,__spread:CM,__spreadArray:er,__spreadArrays:MM,__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 zM(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 WM(e,t,r,n,i){return r.bind(t,e,n,i)}function uz(e,t){var r=e.length===1?oz:zM;return WM(e,this,r,t.cache.create(),t.serializer)}function cz(e,t){return WM(e,this,zM,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 YM(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 xM(e){return e.type===Dt.number}function KM(e){return e.type===Dt.date}function XM(e){return e.type===Dt.time}function JM(e){return e.type===Dt.select}function QM(e){return e.type===Dt.plural}function pz(e){return e.type===Dt.pound}function ZM(e){return e.type===Dt.tag}function eD(e){return!!(e&&typeof e=="object"&&e.type===ps.number)}function Jg(e){return!!(e&&typeof e=="object"&&e.type===ps.dateTime)}var tD=/[ \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,rD=/^(@+)?(\+|#+)?[rs]?$/g,Ez=/(\*)(0+)|(#+)(0+)|(0+)/g,nD=/^(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(rD,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 iD(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)),!nD.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function EO(e){var t={},r=iD(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(nD.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(rD.test(i.stem)){t=qe(qe({},t),_O(i.stem));continue}var s=iD(i.stem);s&&(t=qe(qe({},t),s));var o=vz(i.stem);o&&(t=qe(qe({},t),o))}return t}var pl={"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=pl[n||""]||pl[r||""]||pl["".concat(r,"-001")]||pl["001"];return i[0]}var rg,Iz=new RegExp("^".concat(tD.source,"*")),Rz=new RegExp("".concat(tD.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},Qg=!0;try{var jz=sD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Qg=((rg=jz.exec("a"))===null||rg===void 0?void 0:rg[0])==="a"}catch{Qg=!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},Zg=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},aD=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 sD(e,t){return new RegExp(e,t)}var e_;if(Qg){var TO=sD("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");e_=function(t,r){var n;TO.lastIndex=r;var i=TO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else e_=function(t,r){for(var n=[];;){var i=aD(t,r);if(i===void 0||oD(i)||Uz(i))break;n.push(i),r+=i>=65536?2:1}return Zg.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&&t_(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()||!t_(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 Zg.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(),Zg(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=e_(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 v=this.parseIdentifierIfPossible(),m=0;if(o!=="select"&&v.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(),v=this.parseIdentifierIfPossible(),m=d.val}var b=this.tryParsePluralOrSelectOptions(t,o,r,v);if(b.err)return b;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=ct(i,this.clonePosition());return o==="select"?{val:{type:Dt.select,value:n,options:bO(b.val),location:A},err:null}:{val:{type:Dt.plural,value:n,options:bO(b.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=aD(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()&&oD(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 t_(e){return e>=97&&e<=122||e>=65&&e<=90}function Bz(e){return t_(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 oD(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 r_(e){e.forEach(function(t){if(delete t.location,JM(t)||QM(t))for(var r in t.options)delete t.options[r].location,r_(t.options[r].value);else xM(t)&&eD(t.style)||(KM(t)||XM(t))&&Jg(t.style)?delete t.style.location:ZM(t)&&r_(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||r_(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 uD(e){return typeof e=="function"}function vl(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(KM(c)){var f=typeof c.style=="string"?n.date[c.style]:Jg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(XM(c)){var f=typeof c.style=="string"?n.time[c.style]:Jg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,f).format(p)});continue}if(xM(c)){var f=typeof c.style=="string"?n.number[c.style]:eD(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(ZM(c)){var _=c.children,R=c.value,w=i[R];if(!uD(w))throw new Hz(R,"function",s);var O=vl(_,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(JM(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,vl(T.value,t,r,n,i));continue}if(QM(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 v=r.getPluralRules(t,{type:c.pluralType}).select(p-(c.offset||0));T=c.options[v]||c.options.other}if(!T)throw new SO(c.value,p,Object.keys(c.options),s);o.push.apply(o,vl(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 ng(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:ng(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:ng(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:ng(e.pluralRules),strategy:yr.variadic})}}var cD=(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 vl(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 nu=(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 mD(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 mD(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 mD(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({},lD),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:n_.bind(null,n,r),$t:n_.bind(null,n,r),formatList:c8.bind(null,n,r.getListFormat),formatListToParts:pD.bind(null,n,r.getListFormat),formatDisplayName:s8.bind(null,n,r.getDisplayNames)})}function b8(e){YM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var T8=qe(qe({},lD),{textComponent:De.Fragment});function S8(e){return function(t){return e(De.Children.toArray(t))}}var _E=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=De.createContext(null)):De.createContext(null);_E.Consumer;var I8=_E.Provider,R8=I8,w8=_E;function hD(){var e=De.useContext(w8);return b8(e),e}var i_;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(i_||(i_={}));var a_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(a_||(a_={}));function yD(e){var t=function(r){var n=hD(),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=a_[e],t}function iu(e){var t=function(r){var n=hD(),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||De.Fragment;return De.createElement(u,null,o)};return t.displayName=i_[e],t}function gD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=uD(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=gD(n),o=n_.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?De.Children.toArray(o):o},A8=function(e,t){var r=e.defaultRichTextElements,n=As(e,["defaultRichTextElements"]),i=gD(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)})};iu("formatDate");iu("formatTime");iu("formatNumber");iu("formatList");iu("formatDisplayName");yD("formatDate");yD("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},bl=["en","es"];function s_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?s_(i,a,r):r[a]=String(i)}return r}const $8={en:s_(C8),es:s_(L8)},q8=dD(),ag={};function EE(e){return ag[e]||(ag[e]=A8({locale:e,defaultLocale:"en",messages:$8[e],onError:()=>{}},q8)),ag[e]}let _D=EE("en");function B8(e){_D=EE(e)}function Yr(e,t){return _D.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=Ll(),[d,p]=De.useState(""),f=De.useRef();De.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)}))})),_6={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 De.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=De.lazy(()=>Gt(()=>import("./index-ByV68lm4.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(De.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 o_(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||o_(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=De.lazy(()=>Gt(()=>import("./AnimatedBackground-Cc5-QGDb.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=Ll(),a=Rs(m=>{var b;return(b=m.session)==null?void 0:b.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]=De.useState(()=>PO(r,d)),[_,R]=De.useState(!1);De.useEffect(()=>{e&&f(PO(r,d))},[e,d]),De.useEffect(()=>{const m=new Set(r.map(b=>b.id));f(b=>{const A=new Set([...b].filter(P=>m.has(P)));return A.size===b.size?b:A})},[r]);const w=De.useMemo(()=>J8(r),[r]),O=De.useMemo(()=>Q8(r,p,d),[r,p,d]),h=r.reduce((m,b)=>m+b.priceCredits,0),T=O.join(",");De.useEffect(()=>{R(!1)},[T,c]);const v=De.useRef(!1);return De.useEffect(()=>{if(!e){v.current=!1;return}v.current||(v.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]),De.useEffect(()=>{if(!e)return;const m=b=>{b.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(De.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 b=ua(m),A=b&&!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:!b||A,onChange:()=>f(K=>X8(K,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-${b?K8(m):"item"} fitting-row__slot-ico`,title:b?CO(ms(m)):"Emote",role:"img","aria-label":b?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(o_(m)[0])} body shape`,children:[NO(o_(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 ED="shop:locale";function tW(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&bl.includes(t))return t;const r=localStorage.getItem(ED);if(r&&bl.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&bl.includes(n))return n}catch{}return"en"}const u_=Is(e=>({locale:tW(),setLocale:t=>{try{localStorage.setItem(ED,t)}catch{}e({locale:t})}})),rW=De.lazy(()=>Gt(()=>import("./ShopFooterInner-3pUyqjin.js"),__vite__mapDeps([17,1,5,6,14,11,4,3,7])));function nW(){const e=u_(r=>r.locale),t=u_(r=>r.setLocale);return J.jsx("div",{className:"shop-footer",children:J.jsx(De.Suspense,{fallback:null,children:J.jsx(rW,{locale:e,onChange:r=>{bl.includes(r)&&t(r)}})})})}function iW(){const[e,t]=De.useState(!1);return De.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);De.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 vD(e){if(!e)return 0;try{return Math.ceil(Number(xO(e))*10)}catch{return 0}}function E6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function v6(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 b6(e){const{listings:t}=await fd({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 bD(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 fd(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 T6(e,t){const{listings:r}=await fd({contractAddress:e,itemId:t,first:1});return r[0]?bD(r[0]):null}async function oW({first:e=100,...t}={}){const{listings:r,total:n}=await fd({...t,first:e});return{items:r.map(bD),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 S6({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 I6(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?vD(l.order.price):void 0,tradeId:(_=l.order)==null?void 0:_.tradeId}}),total:o}}const cW="dcl:marketplace";async function R6(e,t){const{TradeService:r}=await Gt(async()=>{const{TradeService:i}=await import("./TradeService-BCo0uCl4.js");return{TradeService:i}},__vite__mapDeps([18,7,1,19,2,8]));return new r(cW,Nt.marketplaceServerUrl,()=>t).addTrade(e)}async function TD(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 w6(e){var u,l;let t;try{t=await TD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=vD(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 A6(e,t){var i;const{listings:r}=await fd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?TD(n):null}function dW(e,t){return!t||!e.creator?!1:lE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function O6(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({address:e,className:t,linkToProfile:r}){var u,l;const n=Ll(),{data:i}=fE(e);if(!e)return null;const a=(i==null?void 0:i.name)||fW(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=J.jsxs(J.Fragment,{children:[s?J.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):J.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),J.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?J.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):J.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}const sg="#a09ba8";function MO(e){if(!e)return sg;try{return Jr.Rarity.getColor(e.toLowerCase())||sg}catch{return sg}}function mW(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 hW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function yW(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 gW(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 _W({endsAt:e,className:t}){const[r,n]=De.useState(()=>Io(e));De.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=gW(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 EW(e){const[,t]=De.useState(0);return De.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]),hW(e)}const vW=120,bW=250;function TW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function SE(e){const{item:t}=e,r=e.mode==="market",[n,i]=De.useState(!1),[a,s]=De.useState(!1),o=De.useRef(),u=De.useRef(),l=Kr(V=>V.add),c=Kr(V=>V.items.some(W=>W.id===t.id)),d=Rs(V=>{var W;return(W=V.session)==null?void 0:W.address}),p=dW(t,d),f=Dl(V=>V.toggle),_=Dl(V=>!!V.items[t.id]),R=Ll(),w=!!t.contractAddress&&!!t.itemId,O=t.tokenId??t.itemId,h=!r&&!!t.contractAddress&&!!O;function T(){h&&R(`/item/${t.contractAddress}/${O}`,{state:{item:t,tradeId:t.tradeId}})}function v(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),vW)}function m(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function b(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),bW)}const A=TW(t.gender),P=EW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),q=!r&&P,K=q?yW(t.compareAtCredits,t.priceCredits):0;return J.jsxs("article",{className:`card${n?" card--hover":""}`,style:h?{cursor:"pointer"}:void 0,onMouseEnter:v,onMouseLeave:m,onClick:T,role:h?"link":void 0,tabIndex:h?0:void 0,onKeyDown:h?V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),T())}:void 0,children:[J.jsxs("div",{className:"card__media",children:[q?J.jsxs("span",{className:"card__sale-badge",children:["SALE",K>0?` -${K}%`:""]}):null,J.jsx("button",{className:`card__fav${_?" is-on":""}`,onClick:V=>{V.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&&w?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:b})}),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(pW,{address:t.creator,className:"card__creator",linkToProfile:!0}):J.jsx("div",{className:"card__creator",children:" "})]}),n?r&&e.mode==="market"?J.jsx("button",{className:"card__cart",onClick:V=>{V.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:V=>{V.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"]}):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"})]}):q?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(_W,{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:mW(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,A?J.jsx("span",{className:"chip chip--icon",children:A}):null]})]})]})]})}function SW(e){if(!e)return 0;try{return Math.ceil(Number(xO(e))*10)}catch{return 0}}function IW(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 SD(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:SW(e.price??e.minPrice),gender:IW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function N6(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.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(SD);return{items:o,total:s??r+o.length}}async function RW(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.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(SD);return{items:o,total:s??r+o.length}}const wW=8,AW=8,OW=12;function NW(){const t=xg(i=>i.followed).slice(0,wW),{data:r=[],isLoading:n}=$l({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>RW(a,{first:AW}).then(s=>s.items).catch(()=>[])));return PW(i).filter(a=>a.priceCredits>0).slice(0,OW)}});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 PW(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 ID="shop:recently-viewed",RD=12;function wD(){try{const e=localStorage.getItem(ID);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,RD):[]}catch{return[]}}function P6(e){if(e!=null&&e.id)try{const t=[e,...wD().filter(r=>r.id!==e.id)].slice(0,RD);localStorage.setItem(ID,JSON.stringify(t))}catch{}}function CW({excludeId:e}){const t=De.useMemo(()=>wD().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(Tl,{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 MW(){const{data:e,isLoading:t}=$l({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(Tl,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),J.jsx(NW,{}),J.jsx(CW,{}),t||r.length>0?J.jsxs(J.Fragment,{children:[J.jsx(jO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?J.jsx(jO,{title:"New Creations",items:r.slice(6,18),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(Tl,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const DW={"/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"},jW=De.lazy(()=>Gt(()=>import("./Assets-CaQZ2Wzw.js"),__vite__mapDeps([20,1,21,22,23,24,7])).then(e=>({default:e.Assets}))),LW=De.lazy(()=>Gt(()=>import("./Market-B1kIKAmZ.js"),__vite__mapDeps([25,1,26,19,7,21,22,23,27,28,24])).then(e=>({default:e.Market}))),$W=De.lazy(()=>Gt(()=>import("./ItemDetail-CsBI2dF7.js"),__vite__mapDeps([29,1,27,19,7,28,30])).then(e=>({default:e.ItemDetail}))),qW=De.lazy(()=>Gt(()=>import("./Collection-DhQJ9kbP.js"),__vite__mapDeps([31,1,32,33,22,23,24,7])).then(e=>({default:e.Collection}))),BW=De.lazy(()=>Gt(()=>import("./Creator-ErezNZns.js"),__vite__mapDeps([34,1,32,33,22,23,24,7])).then(e=>({default:e.Creator}))),kW=De.lazy(()=>Gt(()=>import("./MyAssets-McXf6f5G.js"),__vite__mapDeps([35,1,36,27,19,7,26,37,23,24,38])).then(e=>({default:e.MyAssets}))),UW=De.lazy(()=>Gt(()=>import("./MyFavorites-YQFL7DHi.js"),__vite__mapDeps([39,1,23,7])).then(e=>({default:e.MyFavorites}))),FW=De.lazy(()=>Gt(()=>import("./MyPurchases-CDvEv1SQ.js"),__vite__mapDeps([40,1,23,24,7])).then(e=>({default:e.MyPurchases}))),HW=De.lazy(()=>Gt(()=>import("./ImportListings-D3UgVsA8.js"),__vite__mapDeps([41,1,36,27,19,7,26,37,42])).then(e=>({default:e.ImportListings}))),VW=De.lazy(()=>Gt(()=>import("./Cart-BmW__EQ9.js"),__vite__mapDeps([43,1,27,19,7,28])).then(e=>({default:e.Cart}))),GW=De.lazy(()=>Gt(()=>import("./GetCredits-BVbgdWpD.js"),__vite__mapDeps([44,1,12,5,7])).then(e=>({default:e.GetCredits}))),zW=De.lazy(()=>Gt(()=>import("./Success-Jv6s2J-D.js"),__vite__mapDeps([45,1,37,7])).then(e=>({default:e.Success}))),WW=De.lazy(()=>Gt(()=>import("./NotFound-DD_EZO3L.js"),__vite__mapDeps([46,1,7])).then(e=>({default:e.NotFound})));function YW(){return J.jsx("div",{className:"page-loading","aria-busy":"true",children:J.jsx("span",{className:"spinner","aria-hidden":!0})})}function xW(){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 KW(){aW();const e=FD();return De.useEffect(()=>{o4()},[]),De.useEffect(()=>{const t=e.pathname,r=DW[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(xW,{}),children:J.jsx(De.Suspense,{fallback:J.jsx(YW,{}),children:J.jsxs(HD,{children:[J.jsx(dr,{path:"/",element:J.jsx(VD,{to:"/overview",replace:!0})}),J.jsx(dr,{path:"/overview",element:J.jsx(MW,{})}),J.jsx(dr,{path:"/assets",element:J.jsx(jW,{})}),J.jsx(dr,{path:"/market",element:J.jsx(LW,{})}),J.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:J.jsx($W,{})}),J.jsx(dr,{path:"/collection/:contractAddress",element:J.jsx(qW,{})}),J.jsx(dr,{path:"/creator/:address",element:J.jsx(BW,{})}),J.jsx(dr,{path:"/my-assets",element:J.jsx(kW,{})}),J.jsx(dr,{path:"/my-favorites",element:J.jsx(UW,{})}),J.jsx(dr,{path:"/my-purchases",element:J.jsx(FW,{})}),J.jsx(dr,{path:"/import",element:J.jsx(HW,{})}),J.jsx(dr,{path:"/cart",element:J.jsx(VW,{})}),J.jsx(dr,{path:"/credits",element:J.jsx(GW,{})}),J.jsx(dr,{path:"/success",element:J.jsx(zW,{})}),J.jsx(dr,{path:"*",element:J.jsx(WW,{})})]})})})}),J.jsx(Cl,{fallback:J.jsx(J.Fragment,{}),children:J.jsx(nW,{})})]})}function XW({children:e}){const t=u_(r=>r.locale);return B8(t),J.jsx(R8,{value:EE(t),children:e},t)}m4();const JW=new _j({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),QW=["localhost","127.0.0.1"].includes(window.location.hostname),ZW=QW?void 0:"/shop";GD.createRoot(document.getElementById("root")).render(J.jsx(YO.StrictMode,{children:J.jsx(vj,{client:JW,children:J.jsx(XW,{children:J.jsx(zD,{basename:ZW,children:J.jsx(KW,{})})})})}));export{NO as $,SE as A,oW as B,pW as C,Jr as D,en as E,v0 as F,xg as G,RW as H,_6 as I,z8 as J,y6 as K,S6 as L,a6 as M,i6 as N,Cj as O,n6 as P,dj as Q,cd as R,h6 as S,r3 as T,bn as U,fE as V,vE as W,bE as X,W8 as Y,o_ as Z,Gt as _,Rs as a,EW as a0,c6 as a1,P6 as a2,dW as a3,yW as a4,_W as a5,T6 as a6,v6 as a7,I6 as a8,b6 as a9,tn as aa,cH as ab,J4 as ac,eu as ad,Q_ as ae,g6 as af,F_ as ag,KP as ah,XP as ai,qH as aj,TH as ak,p6 as b,$l as c,Un as d,w6 as e,N6 as f,TD as g,Nt as h,Kr as i,ez as j,Ej as k,ds as l,ci as m,$o as n,A6 as o,R6 as p,O6 as q,f6 as r,l6 as s,Yr as t,Dl as u,d6 as v,nA as w,a4 as x,m6 as y,E6 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({},lD),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:n_.bind(null,n,r),$t:n_.bind(null,n,r),formatList:c8.bind(null,n,r.getListFormat),formatListToParts:pD.bind(null,n,r.getListFormat),formatDisplayName:s8.bind(null,n,r.getDisplayNames)})}function b8(e){YM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var T8=qe(qe({},lD),{textComponent:De.Fragment});function S8(e){return function(t){return e(De.Children.toArray(t))}}var _E=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=De.createContext(null)):De.createContext(null);_E.Consumer;var I8=_E.Provider,R8=I8,w8=_E;function hD(){var e=De.useContext(w8);return b8(e),e}var i_;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(i_||(i_={}));var a_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(a_||(a_={}));function yD(e){var t=function(r){var n=hD(),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=a_[e],t}function iu(e){var t=function(r){var n=hD(),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||De.Fragment;return De.createElement(u,null,o)};return t.displayName=i_[e],t}function gD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=uD(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=gD(n),o=n_.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?De.Children.toArray(o):o},A8=function(e,t){var r=e.defaultRichTextElements,n=As(e,["defaultRichTextElements"]),i=gD(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)})};iu("formatDate");iu("formatTime");iu("formatNumber");iu("formatList");iu("formatDisplayName");yD("formatDate");yD("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},bl=["en","es"];function s_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?s_(i,a,r):r[a]=String(i)}return r}const $8={en:s_(C8),es:s_(L8)},q8=dD(),ag={};function EE(e){return ag[e]||(ag[e]=A8({locale:e,defaultLocale:"en",messages:$8[e],onError:()=>{}},q8)),ag[e]}let _D=EE("en");function B8(e){_D=EE(e)}function Yr(e,t){return _D.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=Ll(),[d,p]=De.useState(""),f=De.useRef();De.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)}))})),_6={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 De.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=De.lazy(()=>Gt(()=>import("./index-DmGr1b-6.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(De.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 o_(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||o_(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=De.lazy(()=>Gt(()=>import("./AnimatedBackground-B12_GM9W.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=Ll(),a=Rs(m=>{var b;return(b=m.session)==null?void 0:b.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]=De.useState(()=>PO(r,d)),[_,R]=De.useState(!1);De.useEffect(()=>{e&&f(PO(r,d))},[e,d]),De.useEffect(()=>{const m=new Set(r.map(b=>b.id));f(b=>{const A=new Set([...b].filter(P=>m.has(P)));return A.size===b.size?b:A})},[r]);const w=De.useMemo(()=>J8(r),[r]),O=De.useMemo(()=>Q8(r,p,d),[r,p,d]),h=r.reduce((m,b)=>m+b.priceCredits,0),T=O.join(",");De.useEffect(()=>{R(!1)},[T,c]);const v=De.useRef(!1);return De.useEffect(()=>{if(!e){v.current=!1;return}v.current||(v.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]),De.useEffect(()=>{if(!e)return;const m=b=>{b.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(De.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 b=ua(m),A=b&&!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:!b||A,onChange:()=>f(K=>X8(K,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-${b?K8(m):"item"} fitting-row__slot-ico`,title:b?CO(ms(m)):"Emote",role:"img","aria-label":b?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(o_(m)[0])} body shape`,children:[NO(o_(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 ED="shop:locale";function tW(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&bl.includes(t))return t;const r=localStorage.getItem(ED);if(r&&bl.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&bl.includes(n))return n}catch{}return"en"}const u_=Is(e=>({locale:tW(),setLocale:t=>{try{localStorage.setItem(ED,t)}catch{}e({locale:t})}})),rW=De.lazy(()=>Gt(()=>import("./ShopFooterInner-Br1cblK6.js"),__vite__mapDeps([17,1,5,6,14,11,4,3,7])));function nW(){const e=u_(r=>r.locale),t=u_(r=>r.setLocale);return J.jsx("div",{className:"shop-footer",children:J.jsx(De.Suspense,{fallback:null,children:J.jsx(rW,{locale:e,onChange:r=>{bl.includes(r)&&t(r)}})})})}function iW(){const[e,t]=De.useState(!1);return De.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);De.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 vD(e){if(!e)return 0;try{return Math.ceil(Number(xO(e))*10)}catch{return 0}}function E6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function v6(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 b6(e){const{listings:t}=await fd({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 bD(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 fd(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 T6(e,t){const{listings:r}=await fd({contractAddress:e,itemId:t,first:1});return r[0]?bD(r[0]):null}async function oW({first:e=100,...t}={}){const{listings:r,total:n}=await fd({...t,first:e});return{items:r.map(bD),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 S6({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 I6(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?vD(l.order.price):void 0,tradeId:(_=l.order)==null?void 0:_.tradeId}}),total:o}}const cW="dcl:marketplace";async function R6(e,t){const{TradeService:r}=await Gt(async()=>{const{TradeService:i}=await import("./TradeService-BXL498ZX.js");return{TradeService:i}},__vite__mapDeps([18,7,1,19,2,8]));return new r(cW,Nt.marketplaceServerUrl,()=>t).addTrade(e)}async function TD(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 w6(e){var u,l;let t;try{t=await TD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=vD(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 A6(e,t){var i;const{listings:r}=await fd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?TD(n):null}function dW(e,t){return!t||!e.creator?!1:lE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function O6(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({address:e,className:t,linkToProfile:r}){var u,l;const n=Ll(),{data:i}=fE(e);if(!e)return null;const a=(i==null?void 0:i.name)||fW(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=J.jsxs(J.Fragment,{children:[s?J.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):J.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),J.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?J.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):J.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}const sg="#a09ba8";function MO(e){if(!e)return sg;try{return Jr.Rarity.getColor(e.toLowerCase())||sg}catch{return sg}}function mW(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 hW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function yW(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 gW(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 _W({endsAt:e,className:t}){const[r,n]=De.useState(()=>Io(e));De.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=gW(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 EW(e){const[,t]=De.useState(0);return De.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]),hW(e)}const vW=120,bW=250;function TW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function SE(e){const{item:t}=e,r=e.mode==="market",[n,i]=De.useState(!1),[a,s]=De.useState(!1),o=De.useRef(),u=De.useRef(),l=Kr(V=>V.add),c=Kr(V=>V.items.some(W=>W.id===t.id)),d=Rs(V=>{var W;return(W=V.session)==null?void 0:W.address}),p=dW(t,d),f=Dl(V=>V.toggle),_=Dl(V=>!!V.items[t.id]),R=Ll(),w=!!t.contractAddress&&!!t.itemId,O=t.tokenId??t.itemId,h=!r&&!!t.contractAddress&&!!O;function T(){h&&R(`/item/${t.contractAddress}/${O}`,{state:{item:t,tradeId:t.tradeId}})}function v(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),vW)}function m(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function b(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),bW)}const A=TW(t.gender),P=EW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),q=!r&&P,K=q?yW(t.compareAtCredits,t.priceCredits):0;return J.jsxs("article",{className:`card${n?" card--hover":""}`,style:h?{cursor:"pointer"}:void 0,onMouseEnter:v,onMouseLeave:m,onClick:T,role:h?"link":void 0,tabIndex:h?0:void 0,onKeyDown:h?V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),T())}:void 0,children:[J.jsxs("div",{className:"card__media",children:[q?J.jsxs("span",{className:"card__sale-badge",children:["SALE",K>0?` -${K}%`:""]}):null,J.jsx("button",{className:`card__fav${_?" is-on":""}`,onClick:V=>{V.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&&w?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:b})}),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(pW,{address:t.creator,className:"card__creator",linkToProfile:!0}):J.jsx("div",{className:"card__creator",children:" "})]}),n?r&&e.mode==="market"?J.jsx("button",{className:"card__cart",onClick:V=>{V.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:V=>{V.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"]}):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"})]}):q?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(_W,{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:mW(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,A?J.jsx("span",{className:"chip chip--icon",children:A}):null]})]})]})]})}function SW(e){if(!e)return 0;try{return Math.ceil(Number(xO(e))*10)}catch{return 0}}function IW(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 SD(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:SW(e.price??e.minPrice),gender:IW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function N6(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.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCollectionItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(SD);return{items:o,total:s??r+o.length}}async function RW(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.nftApiUrl}/v1/items?${n.toString()}`);if(!i.ok)throw new Error(`fetchCreatorItems ${i.status}`);const{data:a,total:s}=await i.json(),o=(a??[]).map(SD);return{items:o,total:s??r+o.length}}const wW=8,AW=8,OW=12;function NW(){const t=xg(i=>i.followed).slice(0,wW),{data:r=[],isLoading:n}=$l({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>RW(a,{first:AW}).then(s=>s.items).catch(()=>[])));return PW(i).filter(a=>a.priceCredits>0).slice(0,OW)}});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 PW(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 ID="shop:recently-viewed",RD=12;function wD(){try{const e=localStorage.getItem(ID);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,RD):[]}catch{return[]}}function P6(e){if(e!=null&&e.id)try{const t=[e,...wD().filter(r=>r.id!==e.id)].slice(0,RD);localStorage.setItem(ID,JSON.stringify(t))}catch{}}function CW({excludeId:e}){const t=De.useMemo(()=>wD().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(Tl,{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 MW(){const{data:e,isLoading:t}=$l({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(Tl,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),J.jsx(NW,{}),J.jsx(CW,{}),t||r.length>0?J.jsxs(J.Fragment,{children:[J.jsx(jO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?J.jsx(jO,{title:"New Creations",items:r.slice(6,18),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(Tl,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const DW={"/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"},jW=De.lazy(()=>Gt(()=>import("./Assets-CCKhZb2a.js"),__vite__mapDeps([20,1,21,22,23,24,7])).then(e=>({default:e.Assets}))),LW=De.lazy(()=>Gt(()=>import("./Market-B-qXN4gx.js"),__vite__mapDeps([25,1,26,19,7,21,22,23,27,28,24])).then(e=>({default:e.Market}))),$W=De.lazy(()=>Gt(()=>import("./ItemDetail-B5T_k-aM.js"),__vite__mapDeps([29,1,27,19,7,28,30])).then(e=>({default:e.ItemDetail}))),qW=De.lazy(()=>Gt(()=>import("./Collection-BZICa7Eq.js"),__vite__mapDeps([31,1,32,33,22,23,24,7])).then(e=>({default:e.Collection}))),BW=De.lazy(()=>Gt(()=>import("./Creator-BGMo0uyK.js"),__vite__mapDeps([34,1,32,33,22,23,24,7])).then(e=>({default:e.Creator}))),kW=De.lazy(()=>Gt(()=>import("./MyAssets-CWuC-vC9.js"),__vite__mapDeps([35,1,36,27,19,7,26,37,23,24,38])).then(e=>({default:e.MyAssets}))),UW=De.lazy(()=>Gt(()=>import("./MyFavorites-Bzl5lDGX.js"),__vite__mapDeps([39,1,23,7])).then(e=>({default:e.MyFavorites}))),FW=De.lazy(()=>Gt(()=>import("./MyPurchases-DnT7iu9Z.js"),__vite__mapDeps([40,1,23,24,7])).then(e=>({default:e.MyPurchases}))),HW=De.lazy(()=>Gt(()=>import("./ImportListings-XTaxybSV.js"),__vite__mapDeps([41,1,36,27,19,7,26,37,42])).then(e=>({default:e.ImportListings}))),VW=De.lazy(()=>Gt(()=>import("./Cart-DR3eUWPC.js"),__vite__mapDeps([43,1,27,19,7,28])).then(e=>({default:e.Cart}))),GW=De.lazy(()=>Gt(()=>import("./GetCredits-DO1TGEVH.js"),__vite__mapDeps([44,1,12,5,7])).then(e=>({default:e.GetCredits}))),zW=De.lazy(()=>Gt(()=>import("./Success-DGD-8CMf.js"),__vite__mapDeps([45,1,37,7])).then(e=>({default:e.Success}))),WW=De.lazy(()=>Gt(()=>import("./NotFound-sMh1ahg9.js"),__vite__mapDeps([46,1,7])).then(e=>({default:e.NotFound})));function YW(){return J.jsx("div",{className:"page-loading","aria-busy":"true",children:J.jsx("span",{className:"spinner","aria-hidden":!0})})}function xW(){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 KW(){aW();const e=FD();return De.useEffect(()=>{o4()},[]),De.useEffect(()=>{const t=e.pathname,r=DW[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(xW,{}),children:J.jsx(De.Suspense,{fallback:J.jsx(YW,{}),children:J.jsxs(HD,{children:[J.jsx(dr,{path:"/",element:J.jsx(VD,{to:"/overview",replace:!0})}),J.jsx(dr,{path:"/overview",element:J.jsx(MW,{})}),J.jsx(dr,{path:"/assets",element:J.jsx(jW,{})}),J.jsx(dr,{path:"/market",element:J.jsx(LW,{})}),J.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:J.jsx($W,{})}),J.jsx(dr,{path:"/collection/:contractAddress",element:J.jsx(qW,{})}),J.jsx(dr,{path:"/creator/:address",element:J.jsx(BW,{})}),J.jsx(dr,{path:"/my-assets",element:J.jsx(kW,{})}),J.jsx(dr,{path:"/my-favorites",element:J.jsx(UW,{})}),J.jsx(dr,{path:"/my-purchases",element:J.jsx(FW,{})}),J.jsx(dr,{path:"/import",element:J.jsx(HW,{})}),J.jsx(dr,{path:"/cart",element:J.jsx(VW,{})}),J.jsx(dr,{path:"/credits",element:J.jsx(GW,{})}),J.jsx(dr,{path:"/success",element:J.jsx(zW,{})}),J.jsx(dr,{path:"*",element:J.jsx(WW,{})})]})})})}),J.jsx(Cl,{fallback:J.jsx(J.Fragment,{}),children:J.jsx(nW,{})})]})}function XW({children:e}){const t=u_(r=>r.locale);return B8(t),J.jsx(R8,{value:EE(t),children:e},t)}m4();const JW=new _j({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),QW=["localhost","127.0.0.1"].includes(window.location.hostname),ZW=QW?void 0:"/shop";GD.createRoot(document.getElementById("root")).render(J.jsx(YO.StrictMode,{children:J.jsx(vj,{client:JW,children:J.jsx(XW,{children:J.jsx(zD,{basename:ZW,children:J.jsx(KW,{})})})})}));export{NO as $,SE as A,v0 as B,pW as C,f6 as D,l6 as E,d6 as F,a4 as G,m6 as H,A6 as I,z8 as J,y6 as K,S6 as L,a6 as M,i6 as N,Cj as O,n6 as P,dj as Q,cd as R,h6 as S,r3 as T,bn as U,fE as V,vE as W,bE as X,W8 as Y,o_ as Z,Gt as _,Rs as a,EW as a0,c6 as a1,P6 as a2,dW as a3,yW as a4,_W as a5,T6 as a6,v6 as a7,I6 as a8,b6 as a9,tn as aa,cH as ab,J4 as ac,eu as ad,Q_ as ae,g6 as af,F_ as ag,KP as ah,XP as ai,qH as aj,TH as ak,p6 as b,$l as c,Un as d,w6 as e,N6 as f,TD as g,Nt as h,Jr as i,ci as j,ds as k,oW as l,xg as m,RW as n,Kr as o,R6 as p,_6 as q,en as r,O6 as s,Yr as t,Dl as u,E6 as v,ez as w,Ej as x,$o as y,nA as z};