@dcl/shop 0.1.0-28849951791.commit-e0fa315 → 0.1.0-28932549025.commit-bf7f508

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 (160) hide show
  1. package/assets/{Assets-uXzVK3Qk.js → Assets-BujUhYkv.js} +1 -1
  2. package/assets/{Cart-B_feHFWP.js → Cart-FNZ94bWY.js} +1 -1
  3. package/assets/{CircularProgress-MlGhFCHM.js → CircularProgress-ZR4J-Sbl.js} +1 -1
  4. package/assets/{Collection-HISXJvQ9.js → Collection-COER4zdn.js} +1 -1
  5. package/assets/{Creator-DckKaL-1.js → Creator-CQNwGndX.js} +1 -1
  6. package/assets/{ExchangeController-Baa0YVeA.js → ExchangeController-DYLjax0w.js} +1 -1
  7. package/assets/{GetCredits-DqKwryal.js → GetCredits-DJpx8KpO.js} +2 -2
  8. package/assets/{HelpersUtil-BVXkvMyH.js → HelpersUtil-vurw2A1z.js} +1 -1
  9. package/assets/{ImportListings-3PSkCxI9.js → ImportListings-DuqQ6Jgj.js} +1 -1
  10. package/assets/{ItemDetail-Ck5cudTI.js → ItemDetail-CQLF904x.js} +1 -1
  11. package/assets/{Market-r9wggpqR.js → Market-CdcFBQlb.js} +1 -1
  12. package/assets/{MenuItem-CTKZTFhj.js → MenuItem-C6RL1xjp.js} +1 -1
  13. package/assets/{MyAssets-DbjlwVgI.js → MyAssets-bWDlTQOG.js} +1 -1
  14. package/assets/{MyFavorites-CUJsTl4U.js → MyFavorites-DyvIdUeN.js} +1 -1
  15. package/assets/{MyPurchases-D231IumZ.js → MyPurchases-C7Lqy3R3.js} +1 -1
  16. package/assets/{NotFound-MYCYhimC.js → NotFound-DoSj3Etz.js} +1 -1
  17. package/assets/{RealCheckout-_Z3g7ZbH.js → RealCheckout-DUmY2ogs.js} +1 -1
  18. package/assets/{ShopFooterInner-gDzKrctg.js → ShopFooterInner-C54HCfML.js} +2 -2
  19. package/assets/{Success-vyQPaFjH.js → Success-ByHSUAuN.js} +1 -1
  20. package/assets/{SvgIcon-DHNKm7fg.js → SvgIcon-BqJFz3VM.js} +1 -1
  21. package/assets/{SwapController-C28NtHea.js → SwapController-D0ZmLlF0.js} +1 -1
  22. package/assets/{TradeService-CV6tm-S-.js → TradeService-Cq9Kocx0.js} +1 -1
  23. package/assets/{W3MFrameProviderSingleton-CPW2Gx43.js → W3MFrameProviderSingleton-C5A3kn4T.js} +3 -3
  24. package/assets/{WebCryptoP256-CJ8gEFrP.js → WebCryptoP256-BEHfVl9k.js} +1 -1
  25. package/assets/{basic-Cp5xCH29.js → basic-CzBqdVq_.js} +1 -1
  26. package/assets/{biconomy-DE6VN2MK.js → biconomy-D2IO7-Vh.js} +1 -1
  27. package/assets/{buy-DW_YPH6-.js → buy--mkRbwSZ.js} +1 -1
  28. package/assets/{buy-gasless-C0vjtz9e.js → buy-gasless-CRAZ_y0W.js} +1 -1
  29. package/assets/{ccip-CO-J9tPJ.js → ccip-Bbwp7Y7G.js} +1 -1
  30. package/assets/{ccip-Dw1-xWm0.js → ccip-BuXiBgVj.js} +1 -1
  31. package/assets/{collection-gU9snfSG.js → collection-DdvZ5Upq.js} +1 -1
  32. package/assets/{controller-Dp-L0bGU.js → controller-8aPhQ3Ob.js} +2 -2
  33. package/assets/{core-DOKNMejd.js → core-Zi2be1A0.js} +4 -4
  34. package/assets/{custom-DrZvVkR4.js → custom-BBhRsdoH.js} +1 -1
  35. package/assets/{data-capture-CWmntLCH.js → data-capture-D0FkuP7m.js} +1 -1
  36. package/assets/{decimals-BpJkRsKM.js → decimals-B4Wcc3nQ.js} +1 -1
  37. package/assets/decimals-CKxe6tis.js +1 -0
  38. package/assets/{detectExtension-BOrmaly3.js → detectExtension-D9Ng23Ko.js} +1 -1
  39. package/assets/{email-DTaLpEKv.js → email-BjdmVby2.js} +1 -1
  40. package/assets/{embedded-wallet-DVickMII.js → embedded-wallet-BQTVrKtU.js} +1 -1
  41. package/assets/{engine-Cyf0wDMH.js → engine-C1o0gbbJ.js} +1 -1
  42. package/assets/{estimate-l1-fee-Ci_3qNsd.js → estimate-l1-fee-DfhCFsH-.js} +1 -1
  43. package/assets/{eth_estimateGas-Bu7KbsjJ.js → eth_estimateGas-B4AoZ532.js} +1 -1
  44. package/assets/{eth_getStorageAt-gEhkd3Dl.js → eth_getStorageAt-oj3DI9vp.js} +1 -1
  45. package/assets/{eth_getTransactionCount-CZrmDIpa.js → eth_getTransactionCount-DwtP8QNs.js} +1 -1
  46. package/assets/{extractIPFS-HSGbtFdH.js → extractIPFS-CHCsIe4w.js} +1 -1
  47. package/assets/{features-CjtSZKbI.js → features-Bg16gz9q.js} +1 -1
  48. package/assets/{fetchTokenMetadata-DcoAGAFy.js → fetchTokenMetadata-2XgHwvnd.js} +2 -2
  49. package/assets/{generateUtilityClasses-DMMGtITh.js → generateUtilityClasses-0-3IDh_9.js} +1 -1
  50. package/assets/{get-ecosystem-wallet-info-GpWofI03.js → get-ecosystem-wallet-info-Dg_VVe3W.js} +1 -1
  51. package/assets/{getBalance-IAhn1Sx7.js → getBalance-B-cNdTcK.js} +1 -1
  52. package/assets/{getInstalledModules-Clea_yJr.js → getInstalledModules-ooDEftjK.js} +1 -1
  53. package/assets/{getNFT-CbT_NWLy.js → getNFT-BTBiYc0X.js} +2 -2
  54. package/assets/{getNFT-BkaCCDU5.js → getNFT-D8WYY7Pm.js} +1 -1
  55. package/assets/{hashTypedData-PYLB7hJl.js → hashTypedData-CL2XAObj.js} +1 -1
  56. package/assets/{hashTypedData-DAd66wY6.js → hashTypedData-DB0XHjNJ.js} +1 -1
  57. package/assets/{import-dVEuzimB.js → import-D9g3ITrS.js} +1 -1
  58. package/assets/{in-app-wallet-calls-l67EA4DZ.js → in-app-wallet-calls-R5shd6Fi.js} +1 -1
  59. package/assets/{index-D9XZpwfV.js → index-5JkWHUrM.js} +5 -5
  60. package/assets/{index-CAXOAo7E.js → index-BF9G9q1o.js} +1 -1
  61. package/assets/{index-o3xLbiUm.js → index-BG6yXCpy.js} +1 -1
  62. package/assets/{index-C7St4Q5o.js → index-BG7nEn_n.js} +1 -1
  63. package/assets/{index-DOLdge0g.js → index-BNJ_FqxV.js} +1 -1
  64. package/assets/{index-BuedKT8D.js → index-BaWVfLQk.js} +2 -2
  65. package/assets/{index-uzc4dT8s.js → index-Bdxb4aHX.js} +1 -1
  66. package/assets/{index-BYg62rD6.js → index-Bf3vG6Fe.js} +1 -1
  67. package/assets/{index-BjptEpaJ.js → index-BfvExgG5.js} +1 -1
  68. package/assets/{index-BVcNzXap.js → index-BgIbq-Hq.js} +1 -1
  69. package/assets/{index-B1ZF46Ko.js → index-BnIZHILN.js} +1 -1
  70. package/assets/{index-DqnX5uAR.js → index-Boi-qLQD.js} +1 -1
  71. package/assets/{index-D5JjqjjU.js → index-C3Er8dJ1.js} +1 -1
  72. package/assets/{index-CqnsV9lR.js → index-C6CfAI6n.js} +1 -1
  73. package/assets/{index-CbyAJw4-.js → index-C6cT_ct2.js} +1 -1
  74. package/assets/{index-o2j-czuk.js → index-CDjI94tN.js} +1 -1
  75. package/assets/{index-C6uhDE9h.js → index-CKyzt37E.js} +1 -1
  76. package/assets/{index-B6lLVyUf.js → index-CL60lt4Y.js} +1 -1
  77. package/assets/{index-Bl9N3aWR.js → index-C_eaXe9o.js} +1 -1
  78. package/assets/{index-D1gEge8-.js → index-C_yuHoMZ.js} +3 -3
  79. package/assets/{index-BeUILvqM.js → index-Cc0NJAc9.js} +1 -1
  80. package/assets/{index-B_NuPdf0.js → index-CpVo1fNd.js} +1 -1
  81. package/assets/{index-BKA2Kk9C.js → index-CvgWB5Zw.js} +1 -1
  82. package/assets/{index-DxWP3gak.js → index-Cxhas0sz.js} +1 -1
  83. package/assets/{index-u8nH4Rw0.js → index-D0Cb0Iaa.js} +1 -1
  84. package/assets/{index-CENUxZfv.js → index-D3m5eCUA.js} +1 -1
  85. package/assets/{index-jCrNn234.js → index-D5I71qVH.js} +1 -1
  86. package/assets/{index-DURh1PEo.js → index-D75CdLXH.js} +1 -1
  87. package/assets/{index-Bv11rzVa.js → index-D7GX501D.js} +1 -1
  88. package/assets/{index-DVcL7J_t.js → index-DIh0fc3M.js} +1 -1
  89. package/assets/{index-CdO-kfoS.js → index-DTn10Mqu.js} +1 -1
  90. package/assets/{index-a4k6LaYK.js → index-DUxnUV3Q.js} +1 -1
  91. package/assets/{index-CcsWoBJK.js → index-DdJEyPHb.js} +1 -1
  92. package/assets/{index-7rWaFD7f.js → index-DfjQtn0w.js} +1 -1
  93. package/assets/{index-CsVrdKM8.js → index-DlChflCd.js} +1 -1
  94. package/assets/{index-BWbKKFVK.js → index-DpYJN986.js} +1 -1
  95. package/assets/{index-B94ghhpu.js → index-DqRstCeb.js} +1 -1
  96. package/assets/{index-BrR0WZ0Y.js → index-DrdlDB9K.js} +1 -1
  97. package/assets/{index-Bd4x7TMP.js → index-DwnGNyGp.js} +1 -1
  98. package/assets/{index-BcZPRgUv.js → index-FCirGBM_.js} +1 -1
  99. package/assets/{index-zVvLDKBh.js → index-GW5HS0_4.js} +2 -2
  100. package/assets/{index-DnQG3NAn.js → index-HbVuspel.js} +1 -1
  101. package/assets/{index-zbujtMDB.js → index-Jse6miq3.js} +1 -1
  102. package/assets/{index-CcUfpaSP.js → index-NC6HVCA3.js} +1 -1
  103. package/assets/{index-Df6GKZpc.js → index-SdBSY4Xa.js} +2 -2
  104. package/assets/{index-B3P6BPci.js → index-Xd6CjE0W.js} +1 -1
  105. package/assets/{index-u77btqjQ.js → index-hiLdobkA.js} +1 -1
  106. package/assets/{index-rk-RtPGh.js → index-lz0XRZDG.js} +1 -1
  107. package/assets/{index-B0--HMVL.js → index-n89hCIEZ.js} +3 -3
  108. package/assets/{index-CuBAn4iR.js → index-p7adRLap.js} +1 -1
  109. package/assets/{index-Dv41StGm.js → index-ziz3gIEg.js} +1 -1
  110. package/assets/{index.es-CYMyZCD-.js → index.es-CuumqYDu.js} +1 -1
  111. package/assets/{index.es-UvEfkSna.js → index.es-DgD7GO7O.js} +4 -4
  112. package/assets/{index.es-DJUkBdGr.js → index.es-Yxjlq6zd.js} +1 -1
  113. package/assets/{localBatchGatewayRequest-C9D88kZr.js → localBatchGatewayRequest-lZjgZyn7.js} +1 -1
  114. package/assets/{mana-rate-Dx_lqKWQ.js → mana-rate-QdrODjyw.js} +1 -1
  115. package/assets/network-1fuqo2Qx.js +1 -0
  116. package/assets/{networks-KbQXXD7P.js → networks-3ZlmARgU.js} +1 -1
  117. package/assets/{onramp-iekcmGjJ.js → onramp-CTQLPprN.js} +1 -1
  118. package/assets/{openzeppelin-41206uN_.js → openzeppelin-aA2XluPa.js} +1 -1
  119. package/assets/{ownerOf-DH7SAQYs.js → ownerOf-DkHcPVzZ.js} +1 -1
  120. package/assets/{parseNft-Dy8OsAtf.js → parseNft-1qDp6y0-.js} +2 -2
  121. package/assets/{parseSignature-D9IuPuaA.js → parseSignature-BGBWeXum.js} +3 -3
  122. package/assets/{parseSignature-BiaWpR8i.js → parseSignature-CGnToxPQ.js} +1 -1
  123. package/assets/{pay-with-exchange-D0U4VJXZ.js → pay-with-exchange-B7LngNAX.js} +1 -1
  124. package/assets/{qr-overlay-35KmnL99.js → qr-overlay-DTaOArkb.js} +1 -1
  125. package/assets/{receive-D80uh9Rj.js → receive-DOYHae0f.js} +1 -1
  126. package/assets/{resolveImplementation-BuxyNBBw.js → resolveImplementation-DqZ4QayG.js} +1 -1
  127. package/assets/{rpc-CV4XQPwJ.js → rpc-PX93Gy4c.js} +1 -1
  128. package/assets/{secp256k1-Bz9G1VTq.js → secp256k1-BEY4JDTO.js} +1 -1
  129. package/assets/{secp256k1-CZj9lLpY.js → secp256k1-BW8JXBhM.js} +1 -1
  130. package/assets/{secp256k1-lf00rTSa.js → secp256k1-rPNwuesf.js} +1 -1
  131. package/assets/{send-CZjs1yZc.js → send-BQOZBDwD.js} +1 -1
  132. package/assets/{send-batch-transaction-uDBYU3an.js → send-batch-transaction-CqSg2Fsc.js} +1 -1
  133. package/assets/{send-eip712-transaction-DR18L-sh.js → send-eip712-transaction-DPHYWEKh.js} +2 -2
  134. package/assets/{send-gasless-transaction-BfuwoIYy.js → send-gasless-transaction-BMxvk2-L.js} +2 -2
  135. package/assets/{sendRawTransaction-BUgSPkVd.js → sendRawTransaction-CPTOQCrL.js} +3 -3
  136. package/assets/{serializeTransaction-Dmi33xSK.js → serializeTransaction-DpXh7QNx.js} +1 -1
  137. package/assets/{session-proposal-BOa4yxBl.js → session-proposal-CB_nntHx.js} +1 -1
  138. package/assets/{session-request-Bcaq75nd.js → session-request-1Y9YBkAc.js} +2 -2
  139. package/assets/{sha256-zMI7s0-F.js → sha256-BSyGWehj.js} +1 -1
  140. package/assets/{signing-Cvv8O8BI.js → signing-Zpl24xvH.js} +4 -4
  141. package/assets/{socials-C_Nw_-aT.js → socials-_z4unm1u.js} +1 -1
  142. package/assets/{swaps-DrEprVp5.js → swaps-DobKGzZy.js} +1 -1
  143. package/assets/{thirdweb-D3908hZR.js → thirdweb-WLE4LuQS.js} +3 -3
  144. package/assets/{totalSupply-CpI009r1.js → totalSupply-C5R5E4Nq.js} +1 -1
  145. package/assets/{transactionReceipt-CRiBJ28i.js → transactionReceipt-D4dGpNKK.js} +1 -1
  146. package/assets/{transactions-63jnvtFL.js → transactions-Cpe4fIjT.js} +1 -1
  147. package/assets/{useInfiniteGrid-xOdKaR3H.js → useInfiniteGrid-C4q3z-wd.js} +1 -1
  148. package/assets/{verifyHash-BR9R1RG0.js → verifyHash-CXrcritX.js} +1 -1
  149. package/assets/{w3m-modal-BlMrqGaw.js → w3m-modal-DkZNhAOr.js} +1 -1
  150. package/assets/{w3m-modal-lZE_ZuOa.js → w3m-modal-qj1yY37G.js} +1 -1
  151. package/assets/{wait-for-tx-receipt-Do82Sucy.js → wait-for-tx-receipt-_gfrkNCA.js} +1 -1
  152. package/assets/{wallet-kind-WAQetlRX.js → wallet-kind-BV7xRUpG.js} +1 -1
  153. package/assets/{wallets-CoP2jTeJ.js → wallets-ro2sSjkA.js} +6 -6
  154. package/assets/{web-connector-uOzuTTW_.js → web-connector-BB6hw3e8.js} +3 -3
  155. package/assets/{writeContract-D-hfmcKA.js → writeContract-ClphDpww.js} +1 -1
  156. package/assets/{zoraTestnet-BMgpy9AE.js → zoraTestnet-BZuF7DWO.js} +1 -1
  157. package/index.html +8 -8
  158. package/package.json +2 -2
  159. package/assets/decimals-D1rmvFNT.js +0 -1
  160. package/assets/network-CCTP_tzM.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CuBAn4iR.js","assets/react-4iaCnQ6n.js","assets/network-CCTP_tzM.js","assets/SvgIcon-DHNKm7fg.js","assets/generateUtilityClasses-DMMGtITh.js","assets/colors-LINLm1ux.js","assets/ethers-CU3Ctw5k.js","assets/index-zVvLDKBh.js","assets/index-CENUxZfv.js","assets/index-D3oE2u-n.js","assets/MenuItem-CTKZTFhj.js","assets/CircularProgress-MlGhFCHM.js","assets/ShopFooterInner-gDzKrctg.js","assets/TradeService-CV6tm-S-.js","assets/index-B94ghhpu.js","assets/Assets-uXzVK3Qk.js","assets/SkeletonCards-D9qg3FUs.js","assets/LoadMore-Cae84rui.js","assets/useInfiniteGrid-xOdKaR3H.js","assets/Market-r9wggpqR.js","assets/mana-rate-Dx_lqKWQ.js","assets/buy-DW_YPH6-.js","assets/buy-gasless-C0vjtz9e.js","assets/ItemDetail-Ck5cudTI.js","assets/ItemDetail-BLC5ggDg.css","assets/Collection-HISXJvQ9.js","assets/collection-gU9snfSG.js","assets/collection-Ds5shVfK.css","assets/Creator-DckKaL-1.js","assets/MyAssets-DbjlwVgI.js","assets/import-dVEuzimB.js","assets/wallet-kind-WAQetlRX.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-CUJsTl4U.js","assets/MyPurchases-D231IumZ.js","assets/ImportListings-3PSkCxI9.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-B_feHFWP.js","assets/GetCredits-DqKwryal.js","assets/Success-vyQPaFjH.js","assets/NotFound-MYCYhimC.js"])))=>i.map(i=>d[i]);
2
- var RD=Object.defineProperty;var DE=e=>{throw TypeError(e)};var wD=(e,t,r)=>t in e?RD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>wD(e,typeof t!="symbol"?t+"":t,r),gd=(e,t,r)=>t.has(e)||DE("Cannot "+r);var ue=(e,t,r)=>(gd(e,t,"read from private field"),r?r.call(e):t.get(e)),We=(e,t,r)=>t.has(e)?DE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(gd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(gd(e,t,"access private method"),r);var Gu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as De,j as Q,l as CO,g as MO,R as DO,c as ng,L as vl,a as Ml,m as xn,d as AD,n as OD,o as dr,N as ND,p as PD,B as CD}from"./react-4iaCnQ6n.js";import{g as bl,p as ml,W as MD,m as DD,h as jE,f as jO}from"./ethers-CU3Ctw5k.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 Uo=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,Ga,bO,jD=(bO=class extends Uo{constructor(){super();We(this,Qi);We(this,ei);We(this,Ga);je(this,Ga,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,Ga))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ei))==null||t.call(this),je(this,ei,void 0))}setEventListener(t){var r;je(this,Ga,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,Ga=new WeakMap,bO),i_=new jD,LD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,n_,TO,$D=(TO=class{constructor(){We(this,ti,LD);We(this,n_,!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,n_=new WeakMap,TO),Ji=new $D;function qD(e){setTimeout(e,0)}var BD=typeof window>"u"||"Deno"in globalThis;function Sr(){}function kD(e,t){return typeof e=="function"?e(t):e}function ig(e){return typeof e=="number"&&e>=0&&e!==1/0}function LO(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 LE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==a_(s,t.options))return!1}else if(!wo(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 $E(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Ro(t.options.mutationKey)!==Ro(a))return!1}else if(!wo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function a_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ro)(e)}function Ro(e){return JSON.stringify(e,(t,r)=>sg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function wo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wo(e[r],t[r])):!1}var UD=Object.prototype.hasOwnProperty;function $O(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=qE(e)&&qE(t);if(!n&&!(sg(e)&&sg(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],m=e[d],p=t[d];if(m===p){u[d]=m,(n?c<a:UD.call(e,d))&&l++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){u[d]=p;continue}const E=$O(m,p,r+1);u[d]=E,E===m&&l++}return a===o&&l===a?e:u}function ag(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 qE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sg(e){if(!BE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!BE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function BE(e){return Object.prototype.toString.call(e)==="[object Object]"}function FD(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function og(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?$O(e,t):t}function GW(e){return e}function HD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function VD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var s_=Symbol();function qO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===s_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BO(e,t){return typeof e=="function"?e(...t):!!e}function GD(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 Ao=(()=>{let e=()=>BD;return{isServer(){return e()},setIsServer(t){e=t}}})();function ug(){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 zD=qD;function WD(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=zD;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=WD(),za,ri,Wa,SO,YD=(SO=class extends Uo{constructor(){super();We(this,za,!0);We(this,ri);We(this,Wa);je(this,Wa,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,Wa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ri))==null||t.call(this),je(this,ri,void 0))}setEventListener(t){var r;je(this,Wa,t),(r=ue(this,ri))==null||r.call(this),je(this,ri,t(this.setOnline.bind(this)))}setOnline(t){ue(this,za)!==t&&(je(this,za,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,za)}},za=new WeakMap,ri=new WeakMap,Wa=new WeakMap,SO),Tl=new YD;function xD(e){return Math.min(1e3*2**e,3e4)}function kO(e){return(e??"online")==="online"?Tl.isOnline():!0}var cg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function UO(e){let t=!1,r=0,n;const i=ug(),a=()=>i.status!=="pending",s=T=>{var S;if(!a()){const A=new cg(T);m(A),(S=e.onCancel)==null||S.call(e,A)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>i_.isFocused()&&(e.networkMode==="always"||Tl.isOnline())&&e.canRun(),c=()=>kO(e.networkMode)&&e.canRun(),d=T=>{a()||(n==null||n(),i.resolve(T))},m=T=>{a()||(n==null||n(),i.reject(T))},p=()=>new Promise(T=>{var S;n=A=>{(a()||l())&&T(A)},(S=e.onPause)==null||S.call(e)}).then(()=>{var T;n=void 0,a()||(T=e.onContinue)==null||T.call(e)}),E=()=>{if(a())return;let T;const S=r===0?e.initialPromise:void 0;try{T=S??e.fn()}catch(A){T=Promise.reject(A)}Promise.resolve(T).then(d).catch(A=>{var I;if(a())return;const f=e.retry??(Ao.isServer()?0:3),_=e.retryDelay??xD,b=typeof _=="function"?_(r,A):_,h=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,A);if(t||!h){m(A);return}r++,(I=e.onFail)==null||I.call(e,r,A),FD(b).then(()=>l()?void 0:p()).then(()=>{t?m(A):E()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?E():p().then(E),i)}}var Zi,IO,FO=(IO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ig(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ao.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Zi)!==void 0&&(Ji.clearTimeout(ue(this,Zi)),je(this,Zi,void 0))}},Zi=new WeakMap,IO);function KD(e){return{onFetch:(t,r)=>{var c,d,m,p,E;const n=t.options,i=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let T=!1;const S=_=>{GD(_,()=>t.signal,()=>T=!0)},A=qO(t.options,t.fetchOptions),f=async(_,b,h)=>{if(T)return Promise.reject(t.signal.reason);if(b==null&&_.pages.length)return Promise.resolve(_);const O=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:h?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),P=await A(O),{maxPages:B}=t.options,z=h?VD:HD;return{pages:z(_.pages,P,B),pageParams:z(_.pageParams,b,B)}};if(i&&a.length){const _=i==="backward",b=_?HO:lg,h={pages:a,pageParams:s},I=b(n,h);o=await f(h,I,_)}else{const _=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:lg(n,o);if(u>0&&b==null)break;o=await f(o,b),u++}while(u<_)}return o};t.options.persister?t.fetchFn=()=>{var T,S;return(S=(T=t.options).persister)==null?void 0:S.call(T,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function lg(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 HO(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 zW(e,t){return t?lg(e,t)!=null:!1}function WW(e,t){return!t||!e.getPreviousPageParam?!1:HO(e,t)!=null}var Ya,ea,xa,jr,ta,Yt,Lo,ra,Pr,VO,jn,RO,XD=(RO=class extends FO{constructor(t){super();We(this,Pr);We(this,Ya);We(this,ea);We(this,xa);We(this,jr);We(this,ta);We(this,Yt);We(this,Lo);We(this,ra);je(this,ra,!1),je(this,Lo,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,UE(this.options)),this.state=t.state??ue(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ya)}get promise(){var t;return(t=ue(this,Yt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Lo),...t},t!=null&&t._type&&je(this,Ya,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=UE(this.options);r.data!==void 0&&(this.setState(kE(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=og(this.state.data,t,this.options);return rt(this,Pr,jn).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,jn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,Yt))==null?void 0:n.promise;return(i=ue(this,Yt))==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===s_||!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:!LO(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Yt))==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,Yt)&&(ue(this,ra)||rt(this,Pr,VO).call(this)?ue(this,Yt).cancel({revert:!0}):ue(this,Yt).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,jn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,m,p,E,T,S,A,f,_;if(this.state.fetchStatus!=="idle"&&((l=ue(this,Yt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Yt))return ue(this,Yt).continueRetry(),ue(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(h=>h.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const b=qO(this.options,r),I=(()=>{const O={client:ue(this,ta),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return je(this,ra,!1),this.options.persister?this.options.persister(b,I,this):b(I)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(b),b})(),u=ue(this,Ya)==="infinite"?KD(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,jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,Yt,UO({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof cg&&b.revert&&this.setState({...ue(this,xa),fetchStatus:"idle"}),n.abort()},onFail:(b,h)=>{rt(this,Pr,jn).call(this,{type:"failed",failureCount:b,error:h})},onPause:()=>{rt(this,Pr,jn).call(this,{type:"pause"})},onContinue:()=>{rt(this,Pr,jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,Yt).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(m=ue(this,jr).config).onSuccess)==null||p.call(m,b,this),(T=(E=ue(this,jr).config).onSettled)==null||T.call(E,b,this.state.error,this),b}catch(b){if(b instanceof cg){if(b.silent)return ue(this,Yt).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw rt(this,Pr,jn).call(this,{type:"error",error:b}),(A=(S=ue(this,jr).config).onError)==null||A.call(S,b,this),(_=(f=ue(this,jr).config).onSettled)==null||_.call(f,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ya=new WeakMap,ea=new WeakMap,xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,Yt=new WeakMap,Lo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,VO=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},jn=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,...GO(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...kE(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})})},RO);function GO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function UE(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,$o,pr,na,Ka,qn,ni,qo,Xa,Ja,ia,aa,ii,Qa,_t,Xs,dg,fg,pg,mg,hg,yg,gg,zO,wO,JD=(wO=class extends Uo{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,$o);We(this,pr);We(this,na);We(this,Ka);We(this,qn);We(this,ni);We(this,qo);We(this,Xa);We(this,Ja);We(this,ia);We(this,aa);We(this,ii);We(this,Qa,new Set);this.options=r,je(this,Tr,t),je(this,ni,null),je(this,qn,ug()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,st).addObserver(this),FE(ue(this,st),this.options)?rt(this,_t,Xs).call(this):this.updateResult(),rt(this,_t,mg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _g(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _g(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,hg).call(this),rt(this,_t,yg).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,gg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!ag(this.options,r)&&ue(this,Tr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,st),observer:this});const i=this.hasListeners();i&&HE(ue(this,st),n,this.options,r)&&rt(this,_t,Xs).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,dg).call(this);const a=rt(this,_t,fg).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,pg).call(this,a)}getOptimisticResult(t){const r=ue(this,Tr).getQueryCache().build(ue(this,Tr),t),n=this.createResult(r,t);return ZD(this,n)&&(je(this,pr,n),je(this,Ka,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,qn).status==="pending"&&ue(this,qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,Qa).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,Xs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,pr)))}createResult(t,r){var B;const n=ue(this,st),i=this.options,a=ue(this,pr),s=ue(this,na),o=ue(this,Ka),l=t!==n?t.state:ue(this,$o),{state:c}=t;let d={...c},m=!1,p;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&FE(t,r),W=z&&HE(t,n,r,i);(Y||W)&&(d={...d,...GO(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:T,status:S}=d;p=d.data;let A=!1;if(r.placeholderData!==void 0&&p===void 0&&S==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,A=!0):z=typeof r.placeholderData=="function"?r.placeholderData((B=ue(this,Ja))==null?void 0:B.state.data,ue(this,Ja)):r.placeholderData,z!==void 0&&(S="success",p=og(a==null?void 0:a.data,z,r),m=!0)}if(r.select&&p!==void 0&&!A)if(a&&p===(s==null?void 0:s.data)&&r.select===ue(this,qo))p=ue(this,Xa);else try{je(this,qo,r.select),p=r.select(p),p=og(a==null?void 0:a.data,p,r),je(this,Xa,p),je(this,ni,null)}catch(z){je(this,ni,z)}ue(this,ni)&&(E=ue(this,ni),p=ue(this,Xa),T=Date.now(),S="error");const f=d.fetchStatus==="fetching",_=S==="pending",b=S==="error",h=_&&f,I=p!==void 0,P={status:S,fetchStatus:d.fetchStatus,isPending:_,isSuccess:S==="success",isError:b,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:T,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:f,isRefetching:f&&!_,isLoadingError:b&&!I,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:b&&I,isStale:o_(t,r),refetch:this.refetch,promise:ue(this,qn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,Y=P.status==="error"&&!z,W=ce=>{Y?ce.reject(P.error):z&&ce.resolve(P.data)},U=()=>{const ce=je(this,qn,P.promise=ug());W(ce)},F=ue(this,qn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(Y||P.data!==F.value)&&U();break;case"rejected":(!Y||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=ue(this,pr),r=this.createResult(ue(this,st),this.options);if(je(this,na,ue(this,st).state),je(this,Ka,this.options),ue(this,na).data!==void 0&&je(this,Ja,ue(this,st)),ag(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,Qa).size)return!0;const s=new Set(a??ue(this,Qa));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,zO).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,mg).call(this)}},Tr=new WeakMap,st=new WeakMap,$o=new WeakMap,pr=new WeakMap,na=new WeakMap,Ka=new WeakMap,qn=new WeakMap,ni=new WeakMap,qo=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,ia=new WeakMap,aa=new WeakMap,ii=new WeakMap,Qa=new WeakMap,_t=new WeakSet,Xs=function(t){rt(this,_t,gg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},dg=function(){rt(this,_t,hg).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Ao.isServer()||ue(this,pr).isStale||!ig(t))return;const n=LO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},fg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},pg=function(t){rt(this,_t,yg).call(this),je(this,ii,t),!(Ao.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!ig(ue(this,ii))||ue(this,ii)===0)&&je(this,aa,Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||i_.isFocused())&&rt(this,_t,Xs).call(this)},ue(this,ii)))},mg=function(){rt(this,_t,dg).call(this),rt(this,_t,pg).call(this,rt(this,_t,fg).call(this))},hg=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},yg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},gg=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,$o,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},zO=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"})})},wO);function QD(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function FE(e,t){return QD(e,t)||e.state.data!==void 0&&_g(e,t,t.refetchOnMount)}function _g(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&&o_(e,t)}return!1}function HE(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&o_(e,r)}function o_(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function ZD(e,t){return!ag(e.getCurrentResult(),t)}var Bo,mn,ur,sa,hn,Jn,AO,ej=(AO=class extends FO{constructor(t){super();We(this,hn);We(this,Bo);We(this,mn);We(this,ur);We(this,sa);je(this,Bo,t.client),this.mutationId=t.mutationId,je(this,ur,t.mutationCache),je(this,mn,[]),this.state=t.state||tj(),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,mn).includes(t)||(ue(this,mn).push(t),this.clearGcTimeout(),ue(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,mn,ue(this,mn).filter(r=>r!==t)),this.scheduleGc(),ue(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,mn).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,m,p,E,T,S,A,f,_,b,h,I,O;const r=()=>{rt(this,hn,Jn).call(this,{type:"continue"})},n={client:ue(this,Bo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,UO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,B)=>{rt(this,hn,Jn).call(this,{type:"failed",failureCount:P,error:B})},onPause:()=>{rt(this,hn,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,hn,Jn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,ur).config.onMutate&&await ue(this,ur).config.onMutate(t,this,n);const B=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));B!==this.state.context&&rt(this,hn,Jn).call(this,{type:"pending",context:B,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((p=(m=ue(this,ur).config).onSettled)==null?void 0:p.call(m,P,null,this.state.variables,this.state.context,this,n)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,P,null,t,this.state.context,n)),rt(this,hn,Jn).call(this,{type:"success",data:P}),P}catch(P){try{await((A=(S=ue(this,ur).config).onError)==null?void 0:A.call(S,P,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((_=(f=this.options).onError)==null?void 0:_.call(f,P,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((h=(b=ue(this,ur).config).onSettled)==null?void 0:h.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((O=(I=this.options).onSettled)==null?void 0:O.call(I,void 0,P,t,this.state.context,n))}catch(B){Promise.reject(B)}throw rt(this,hn,Jn).call(this,{type:"error",error:P}),P}finally{ue(this,ur).runNext(this)}}},Bo=new WeakMap,mn=new WeakMap,ur=new WeakMap,sa=new WeakMap,hn=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,mn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,ur).notify({mutation:this,type:"updated",action:t})})},AO);function tj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,xr,ko,OO,rj=(OO=class extends Uo{constructor(t={}){super();We(this,Bn);We(this,xr);We(this,ko);this.config=t,je(this,Bn,new Set),je(this,xr,new Map),je(this,ko,0)}build(t,r,n){const i=new ej({client:t,mutationCache:this,mutationId:++Gu(this,ko)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,Bn).add(t);const r=zu(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,Bn).delete(t)){const r=zu(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=zu(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=zu(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,Bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,Bn).clear(),ue(this,xr).clear()})}getAll(){return Array.from(ue(this,Bn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$E(r,n))}findAll(t={}){return this.getAll().filter(r=>$E(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))))}},Bn=new WeakMap,xr=new WeakMap,ko=new WeakMap,OO);function zu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var yn,NO,nj=(NO=class extends Uo{constructor(t={}){super();We(this,yn);this.config=t,je(this,yn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??a_(i,r);let s=this.get(a);return s||(s=new XD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,yn).has(t.queryHash)||(ue(this,yn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,yn).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,yn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,yn).get(t)}getAll(){return[...ue(this,yn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>LE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>LE(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()})})}},yn=new WeakMap,NO),Bt,ai,si,Za,es,oi,ts,rs,PO,ij=(PO=class{constructor(e={}){We(this,Bt);We(this,ai);We(this,si);We(this,Za);We(this,es);We(this,oi);We(this,ts);We(this,rs);je(this,Bt,e.queryCache||new nj),je(this,ai,e.mutationCache||new rj),je(this,si,e.defaultOptions||{}),je(this,Za,new Map),je(this,es,new Map),je(this,oi,0)}mount(){Gu(this,oi)._++,ue(this,oi)===1&&(je(this,ts,i_.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onFocus())})),je(this,rs,Tl.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onOnline())})))}unmount(){var e,t;Gu(this,oi)._--,ue(this,oi)===0&&((e=ue(this,ts))==null||e.call(this),je(this,ts,void 0),(t=ue(this,rs))==null||t.call(this),je(this,rs,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=kD(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 Tl.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,Za).set(Ro(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,Za).values()],r={};return t.forEach(n=>{wo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,es).set(Ro(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,es).values()],r={};return t.forEach(n=>{wo(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=a_(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===s_&&(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,Za=new WeakMap,es=new WeakMap,oi=new WeakMap,ts=new WeakMap,rs=new WeakMap,PO),WO=De.createContext(void 0),aj=e=>{const t=De.useContext(WO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sj=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Q.jsx(WO.Provider,{value:e,children:t})),YO=De.createContext(!1),oj=()=>De.useContext(YO);YO.Provider;function uj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cj=De.createContext(uj()),lj=()=>De.useContext(cj),dj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?BO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},fj=e=>{De.useEffect(()=>{e.clearReset()},[e])},pj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||BO(r,[e.error,n])),mj=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))}},hj=(e,t)=>e.isLoading&&e.isFetching&&!t,yj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,VE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function gj(e,t,r){var p,E,T,S;const n=oj(),i=lj(),a=aj(),s=a.defaultQueryOptions(e);(E=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||E.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,mj(s),dj(s,i,o),fj(i);const l=!a.getQueryCache().get(s.queryHash),[c]=De.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),m=!n&&u;if(De.useSyncExternalStore(De.useCallback(A=>{const f=m?c.subscribe(Zt.batchCalls(A)):Sr;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),De.useEffect(()=>{c.setOptions(s)},[s,c]),yj(s,d))throw VE(s,c,i);if(pj({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((S=(T=a.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||S.call(T,s,d),s.experimental_prefetchInRender&&!Ao.isServer()&&hj(d,n)){const A=l?VE(s,c,i):o==null?void 0:o.promise;A==null||A.catch(Sr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Dl(e,t){return gj(e,JD)}const _j="modulepreload",Ej=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28849951791.commit-e0fa315/"+e},GE={},xt=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=Ej(l),l in GE)return;GE[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":_j,c||(m.as="script"),m.crossOrigin="",m.href=l,u&&m.setAttribute("nonce",u),document.head.appendChild(m),c)return new Promise((p,E)=>{m.addEventListener("load",p),m.addEventListener("error",()=>E(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)})},xO=Object.prototype.toString;function u_(e){switch(xO.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Un(e,Error)}}function ps(e,t){return xO.call(e)===`[object ${t}]`}function c_(e){return ps(e,"ErrorEvent")}function zE(e){return ps(e,"DOMError")}function vj(e){return ps(e,"DOMException")}function En(e){return ps(e,"String")}function l_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function d_(e){return e===null||l_(e)||typeof e!="object"&&typeof e!="function"}function ca(e){return ps(e,"Object")}function jl(e){return typeof Event<"u"&&Un(e,Event)}function bj(e){return typeof Element<"u"&&Un(e,Element)}function Tj(e){return ps(e,"RegExp")}function ms(e){return!!(e&&e.then&&typeof e.then=="function")}function Sj(e){return ca(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function KO(e){return typeof e=="number"&&e!==e}function Un(e,t){try{return e instanceof t}catch{return!1}}function XO(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 WE(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{XO(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Ij(e,t,r=!1){return En(e)?Tj(t)?t.test(e):En(t)?r?e===t:e.includes(t):!1:!1}function Fo(e,t=[],r=!1){return t.some(n=>Ij(e,n,r))}function Rj(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!Un(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=wj(Eg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Eg(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(Un(n[i],Error)){YE(s,o);const l=e(t,n[i]),c=u.length;xE(l,i,c,o),u=Eg(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Un(l,Error)){YE(s,o);const d=e(t,l),m=u.length;xE(d,`errors[${c}]`,m,o),u=Eg(e,t,r,l,i,[d,...u],d,m)}}),u}function YE(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 xE(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 wj(e,t){return e.map(r=>(r.value&&(r.value=Ua(r.value,t)),r))}function Wu(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&Wu(globalThis)||typeof window=="object"&&Wu(window)||typeof self=="object"&&Wu(self)||typeof bl=="object"&&Wu(bl)||(function(){return this})()||{};function f_(){return ot}function Ll(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Fa=f_(),Aj=80;function ns(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||Aj;for(;r&&a++<n&&(l=Oj(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 Oj(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&&En(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 Nj(){try{return Fa.document.location.href}catch{return""}}function Pj(e){return Fa.document&&Fa.document.querySelector?Fa.document.querySelector(e):null}function JO(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 hs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Cj="Sentry Logger ",vg=["debug","info","warn","error","log","assert","trace"],Sl={};function Ho(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Sl);n.forEach(i=>{const a=Sl[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Mj(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return hs?vg.forEach(r=>{t[r]=(...n)=>{e&&Ho(()=>{ot.console[r](`${Cj}[${r}]:`,...n)})}}):vg.forEach(r=>{t[r]=()=>{}}),t}const Re=Mj(),Dj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function jj(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 Lj(e){const t=Dj.exec(e);if(!t){Ho(()=>{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 QO({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function QO(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $j(e){if(!hs)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+$/)?jj(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 ZO(e){const t=typeof e=="string"?Lj(e):QO(e);if(!(!t||!$j(t)))return t}class gn 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"&&eN(i,n),e[t]=i}function la(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{hs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function eN(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,la(e,"__sentry_original__",t)}catch{}}function p_(e){return e.__sentry_original__}function qj(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function tN(e){if(u_(e))return{message:e.message,name:e.name,stack:e.stack,...XE(e)};if(jl(e)){const t={type:e.type,target:KE(e.target),currentTarget:KE(e.currentTarget),...XE(e)};return typeof CustomEvent<"u"&&Un(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function KE(e){try{return bj(e)?ns(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function XE(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 Bj(e,t=40){const r=Object.keys(tN(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 bg(e,new Map)}function bg(e,t){if(kj(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]=bg(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(bg(i,t))}),n}return e}function kj(e){if(!ca(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const rN=50,JE=/\(error: (.*)\)/,QE=/captureMessage|captureException/;function nN(...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-p7adRLap.js","assets/react-4iaCnQ6n.js","assets/network-1fuqo2Qx.js","assets/SvgIcon-BqJFz3VM.js","assets/generateUtilityClasses-0-3IDh_9.js","assets/colors-LINLm1ux.js","assets/ethers-CU3Ctw5k.js","assets/index-GW5HS0_4.js","assets/index-D3m5eCUA.js","assets/index-D3oE2u-n.js","assets/MenuItem-C6RL1xjp.js","assets/CircularProgress-ZR4J-Sbl.js","assets/ShopFooterInner-C54HCfML.js","assets/TradeService-Cq9Kocx0.js","assets/index-DqRstCeb.js","assets/Assets-BujUhYkv.js","assets/SkeletonCards-D9qg3FUs.js","assets/LoadMore-Cae84rui.js","assets/useInfiniteGrid-C4q3z-wd.js","assets/Market-CdcFBQlb.js","assets/mana-rate-QdrODjyw.js","assets/buy--mkRbwSZ.js","assets/buy-gasless-CRAZ_y0W.js","assets/ItemDetail-CQLF904x.js","assets/ItemDetail-BLC5ggDg.css","assets/Collection-COER4zdn.js","assets/collection-DdvZ5Upq.js","assets/collection-Ds5shVfK.css","assets/Creator-CQNwGndX.js","assets/MyAssets-bWDlTQOG.js","assets/import-D9g3ITrS.js","assets/wallet-kind-BV7xRUpG.js","assets/MyAssets-BjiqkBzd.css","assets/MyFavorites-DyvIdUeN.js","assets/MyPurchases-C7Lqy3R3.js","assets/ImportListings-DuqQ6Jgj.js","assets/ImportListings-Cdx3om4x.css","assets/Cart-FNZ94bWY.js","assets/GetCredits-DJpx8KpO.js","assets/Success-ByHSUAuN.js","assets/NotFound-DoSj3Etz.js"])))=>i.map(i=>d[i]);
2
+ var RD=Object.defineProperty;var DE=e=>{throw TypeError(e)};var wD=(e,t,r)=>t in e?RD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Yn=(e,t,r)=>wD(e,typeof t!="symbol"?t+"":t,r),gd=(e,t,r)=>t.has(e)||DE("Cannot "+r);var ue=(e,t,r)=>(gd(e,t,"read from private field"),r?r.call(e):t.get(e)),We=(e,t,r)=>t.has(e)?DE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),je=(e,t,r,n)=>(gd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(gd(e,t,"access private method"),r);var Gu=(e,t,r,n)=>({set _(i){je(e,t,i,r)},get _(){return ue(e,t,n)}});import{r as De,j as Q,l as CO,g as MO,R as DO,c as ng,L as vl,a as Ml,m as xn,d as AD,n as OD,o as dr,N as ND,p as PD,B as CD}from"./react-4iaCnQ6n.js";import{g as bl,p as ml,W as MD,m as DD,h as jE,f as jO}from"./ethers-CU3Ctw5k.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 Uo=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,Ga,bO,jD=(bO=class extends Uo{constructor(){super();We(this,Qi);We(this,ei);We(this,Ga);je(this,Ga,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,Ga))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ei))==null||t.call(this),je(this,ei,void 0))}setEventListener(t){var r;je(this,Ga,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,Ga=new WeakMap,bO),i_=new jD,LD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,n_,TO,$D=(TO=class{constructor(){We(this,ti,LD);We(this,n_,!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,n_=new WeakMap,TO),Ji=new $D;function qD(e){setTimeout(e,0)}var BD=typeof window>"u"||"Deno"in globalThis;function Sr(){}function kD(e,t){return typeof e=="function"?e(t):e}function ig(e){return typeof e=="number"&&e>=0&&e!==1/0}function LO(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 LE(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==a_(s,t.options))return!1}else if(!wo(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 $E(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(Ro(t.options.mutationKey)!==Ro(a))return!1}else if(!wo(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function a_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ro)(e)}function Ro(e){return JSON.stringify(e,(t,r)=>sg(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function wo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>wo(e[r],t[r])):!1}var UD=Object.prototype.hasOwnProperty;function $O(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=qE(e)&&qE(t);if(!n&&!(sg(e)&&sg(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],m=e[d],p=t[d];if(m===p){u[d]=m,(n?c<a:UD.call(e,d))&&l++;continue}if(m===null||p===null||typeof m!="object"||typeof p!="object"){u[d]=p;continue}const E=$O(m,p,r+1);u[d]=E,E===m&&l++}return a===o&&l===a?e:u}function ag(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 qE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sg(e){if(!BE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!BE(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function BE(e){return Object.prototype.toString.call(e)==="[object Object]"}function FD(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function og(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?$O(e,t):t}function WW(e){return e}function HD(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function VD(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var s_=Symbol();function qO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===s_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function BO(e,t){return typeof e=="function"?e(...t):!!e}function GD(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 Ao=(()=>{let e=()=>BD;return{isServer(){return e()},setIsServer(t){e=t}}})();function ug(){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 zD=qD;function WD(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=zD;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=WD(),za,ri,Wa,SO,YD=(SO=class extends Uo{constructor(){super();We(this,za,!0);We(this,ri);We(this,Wa);je(this,Wa,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,Wa))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,ri))==null||t.call(this),je(this,ri,void 0))}setEventListener(t){var r;je(this,Wa,t),(r=ue(this,ri))==null||r.call(this),je(this,ri,t(this.setOnline.bind(this)))}setOnline(t){ue(this,za)!==t&&(je(this,za,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return ue(this,za)}},za=new WeakMap,ri=new WeakMap,Wa=new WeakMap,SO),Tl=new YD;function xD(e){return Math.min(1e3*2**e,3e4)}function kO(e){return(e??"online")==="online"?Tl.isOnline():!0}var cg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function UO(e){let t=!1,r=0,n;const i=ug(),a=()=>i.status!=="pending",s=T=>{var S;if(!a()){const A=new cg(T);m(A),(S=e.onCancel)==null||S.call(e,A)}},o=()=>{t=!0},u=()=>{t=!1},l=()=>i_.isFocused()&&(e.networkMode==="always"||Tl.isOnline())&&e.canRun(),c=()=>kO(e.networkMode)&&e.canRun(),d=T=>{a()||(n==null||n(),i.resolve(T))},m=T=>{a()||(n==null||n(),i.reject(T))},p=()=>new Promise(T=>{var S;n=A=>{(a()||l())&&T(A)},(S=e.onPause)==null||S.call(e)}).then(()=>{var T;n=void 0,a()||(T=e.onContinue)==null||T.call(e)}),E=()=>{if(a())return;let T;const S=r===0?e.initialPromise:void 0;try{T=S??e.fn()}catch(A){T=Promise.reject(A)}Promise.resolve(T).then(d).catch(A=>{var I;if(a())return;const f=e.retry??(Ao.isServer()?0:3),_=e.retryDelay??xD,b=typeof _=="function"?_(r,A):_,h=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,A);if(t||!h){m(A);return}r++,(I=e.onFail)==null||I.call(e,r,A),FD(b).then(()=>l()?void 0:p()).then(()=>{t?m(A):E()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:o,continueRetry:u,canStart:c,start:()=>(c()?E():p().then(E),i)}}var Zi,IO,FO=(IO=class{constructor(){We(this,Zi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ig(this.gcTime)&&je(this,Zi,Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ao.isServer()?1/0:300*1e3))}clearGcTimeout(){ue(this,Zi)!==void 0&&(Ji.clearTimeout(ue(this,Zi)),je(this,Zi,void 0))}},Zi=new WeakMap,IO);function KD(e){return{onFetch:(t,r)=>{var c,d,m,p,E;const n=t.options,i=(m=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((E=t.state.data)==null?void 0:E.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const l=async()=>{let T=!1;const S=_=>{GD(_,()=>t.signal,()=>T=!0)},A=qO(t.options,t.fetchOptions),f=async(_,b,h)=>{if(T)return Promise.reject(t.signal.reason);if(b==null&&_.pages.length)return Promise.resolve(_);const O=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:b,direction:h?"backward":"forward",meta:t.options.meta};return S(Y),Y})(),P=await A(O),{maxPages:B}=t.options,z=h?VD:HD;return{pages:z(_.pages,P,B),pageParams:z(_.pageParams,b,B)}};if(i&&a.length){const _=i==="backward",b=_?HO:lg,h={pages:a,pageParams:s},I=b(n,h);o=await f(h,I,_)}else{const _=e??a.length;do{const b=u===0?s[0]??n.initialPageParam:lg(n,o);if(u>0&&b==null)break;o=await f(o,b),u++}while(u<_)}return o};t.options.persister?t.fetchFn=()=>{var T,S;return(S=(T=t.options).persister)==null?void 0:S.call(T,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=l}}}function lg(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 HO(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 YW(e,t){return t?lg(e,t)!=null:!1}function xW(e,t){return!t||!e.getPreviousPageParam?!1:HO(e,t)!=null}var Ya,ea,xa,jr,ta,Yt,Lo,ra,Pr,VO,jn,RO,XD=(RO=class extends FO{constructor(t){super();We(this,Pr);We(this,Ya);We(this,ea);We(this,xa);We(this,jr);We(this,ta);We(this,Yt);We(this,Lo);We(this,ra);je(this,ra,!1),je(this,Lo,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,UE(this.options)),this.state=t.state??ue(this,ea),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,Ya)}get promise(){var t;return(t=ue(this,Yt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Lo),...t},t!=null&&t._type&&je(this,Ya,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=UE(this.options);r.data!==void 0&&(this.setState(kE(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=og(this.state.data,t,this.options);return rt(this,Pr,jn).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,jn).call(this,{type:"setState",state:t})}cancel(t){var n,i;const r=(n=ue(this,Yt))==null?void 0:n.promise;return(i=ue(this,Yt))==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===s_||!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:!LO(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=ue(this,Yt))==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,Yt)&&(ue(this,ra)||rt(this,Pr,VO).call(this)?ue(this,Yt).cancel({revert:!0}):ue(this,Yt).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,jn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,d,m,p,E,T,S,A,f,_;if(this.state.fetchStatus!=="idle"&&((l=ue(this,Yt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Yt))return ue(this,Yt).continueRetry(),ue(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(h=>h.options.queryFn);b&&this.setOptions(b.options)}const n=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(je(this,ra,!0),n.signal)})},a=()=>{const b=qO(this.options,r),I=(()=>{const O={client:ue(this,ta),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return je(this,ra,!1),this.options.persister?this.options.persister(b,I,this):b(I)},o=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:ue(this,ta),state:this.state,fetchFn:a};return i(b),b})(),u=ue(this,Ya)==="infinite"?KD(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,jn).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),je(this,Yt,UO({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:b=>{b instanceof cg&&b.revert&&this.setState({...ue(this,xa),fetchStatus:"idle"}),n.abort()},onFail:(b,h)=>{rt(this,Pr,jn).call(this,{type:"failed",failureCount:b,error:h})},onPause:()=>{rt(this,Pr,jn).call(this,{type:"pause"})},onContinue:()=>{rt(this,Pr,jn).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const b=await ue(this,Yt).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(p=(m=ue(this,jr).config).onSuccess)==null||p.call(m,b,this),(T=(E=ue(this,jr).config).onSettled)==null||T.call(E,b,this.state.error,this),b}catch(b){if(b instanceof cg){if(b.silent)return ue(this,Yt).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw rt(this,Pr,jn).call(this,{type:"error",error:b}),(A=(S=ue(this,jr).config).onError)==null||A.call(S,b,this),(_=(f=ue(this,jr).config).onSettled)==null||_.call(f,this.state.data,b,this),b}finally{this.scheduleGc()}}},Ya=new WeakMap,ea=new WeakMap,xa=new WeakMap,jr=new WeakMap,ta=new WeakMap,Yt=new WeakMap,Lo=new WeakMap,ra=new WeakMap,Pr=new WeakSet,VO=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},jn=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,...GO(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...kE(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})})},RO);function GO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function UE(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,$o,pr,na,Ka,qn,ni,qo,Xa,Ja,ia,aa,ii,Qa,_t,Xs,dg,fg,pg,mg,hg,yg,gg,zO,wO,JD=(wO=class extends Uo{constructor(t,r){super();We(this,_t);We(this,Tr);We(this,st);We(this,$o);We(this,pr);We(this,na);We(this,Ka);We(this,qn);We(this,ni);We(this,qo);We(this,Xa);We(this,Ja);We(this,ia);We(this,aa);We(this,ii);We(this,Qa,new Set);this.options=r,je(this,Tr,t),je(this,ni,null),je(this,qn,ug()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,st).addObserver(this),FE(ue(this,st),this.options)?rt(this,_t,Xs).call(this):this.updateResult(),rt(this,_t,mg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _g(ue(this,st),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _g(ue(this,st),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,_t,hg).call(this),rt(this,_t,yg).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,gg).call(this),ue(this,st).setOptions(this.options),r._defaulted&&!ag(this.options,r)&&ue(this,Tr).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,st),observer:this});const i=this.hasListeners();i&&HE(ue(this,st),n,this.options,r)&&rt(this,_t,Xs).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,dg).call(this);const a=rt(this,_t,fg).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,pg).call(this,a)}getOptimisticResult(t){const r=ue(this,Tr).getQueryCache().build(ue(this,Tr),t),n=this.createResult(r,t);return ZD(this,n)&&(je(this,pr,n),je(this,Ka,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,qn).status==="pending"&&ue(this,qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){ue(this,Qa).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,Xs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,pr)))}createResult(t,r){var B;const n=ue(this,st),i=this.options,a=ue(this,pr),s=ue(this,na),o=ue(this,Ka),l=t!==n?t.state:ue(this,$o),{state:c}=t;let d={...c},m=!1,p;if(r._optimisticResults){const z=this.hasListeners(),Y=!z&&FE(t,r),W=z&&HE(t,n,r,i);(Y||W)&&(d={...d,...GO(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:E,errorUpdatedAt:T,status:S}=d;p=d.data;let A=!1;if(r.placeholderData!==void 0&&p===void 0&&S==="pending"){let z;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(z=a.data,A=!0):z=typeof r.placeholderData=="function"?r.placeholderData((B=ue(this,Ja))==null?void 0:B.state.data,ue(this,Ja)):r.placeholderData,z!==void 0&&(S="success",p=og(a==null?void 0:a.data,z,r),m=!0)}if(r.select&&p!==void 0&&!A)if(a&&p===(s==null?void 0:s.data)&&r.select===ue(this,qo))p=ue(this,Xa);else try{je(this,qo,r.select),p=r.select(p),p=og(a==null?void 0:a.data,p,r),je(this,Xa,p),je(this,ni,null)}catch(z){je(this,ni,z)}ue(this,ni)&&(E=ue(this,ni),p=ue(this,Xa),T=Date.now(),S="error");const f=d.fetchStatus==="fetching",_=S==="pending",b=S==="error",h=_&&f,I=p!==void 0,P={status:S,fetchStatus:d.fetchStatus,isPending:_,isSuccess:S==="success",isError:b,isInitialLoading:h,isLoading:h,data:p,dataUpdatedAt:d.dataUpdatedAt,error:E,errorUpdatedAt:T,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:f,isRefetching:f&&!_,isLoadingError:b&&!I,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:b&&I,isStale:o_(t,r),refetch:this.refetch,promise:ue(this,qn),isEnabled:Cr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,Y=P.status==="error"&&!z,W=ce=>{Y?ce.reject(P.error):z&&ce.resolve(P.data)},U=()=>{const ce=je(this,qn,P.promise=ug());W(ce)},F=ue(this,qn);switch(F.status){case"pending":t.queryHash===n.queryHash&&W(F);break;case"fulfilled":(Y||P.data!==F.value)&&U();break;case"rejected":(!Y||P.error!==F.reason)&&U();break}}return P}updateResult(){const t=ue(this,pr),r=this.createResult(ue(this,st),this.options);if(je(this,na,ue(this,st).state),je(this,Ka,this.options),ue(this,na).data!==void 0&&je(this,Ja,ue(this,st)),ag(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,Qa).size)return!0;const s=new Set(a??ue(this,Qa));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,zO).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,_t,mg).call(this)}},Tr=new WeakMap,st=new WeakMap,$o=new WeakMap,pr=new WeakMap,na=new WeakMap,Ka=new WeakMap,qn=new WeakMap,ni=new WeakMap,qo=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,ia=new WeakMap,aa=new WeakMap,ii=new WeakMap,Qa=new WeakMap,_t=new WeakSet,Xs=function(t){rt(this,_t,gg).call(this);let r=ue(this,st).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},dg=function(){rt(this,_t,hg).call(this);const t=ui(this.options.staleTime,ue(this,st));if(Ao.isServer()||ue(this,pr).isStale||!ig(t))return;const n=LO(ue(this,pr).dataUpdatedAt,t)+1;je(this,ia,Ji.setTimeout(()=>{ue(this,pr).isStale||this.updateResult()},n))},fg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,st)):this.options.refetchInterval)??!1},pg=function(t){rt(this,_t,yg).call(this),je(this,ii,t),!(Ao.isServer()||Cr(this.options.enabled,ue(this,st))===!1||!ig(ue(this,ii))||ue(this,ii)===0)&&je(this,aa,Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||i_.isFocused())&&rt(this,_t,Xs).call(this)},ue(this,ii)))},mg=function(){rt(this,_t,dg).call(this),rt(this,_t,pg).call(this,rt(this,_t,fg).call(this))},hg=function(){ue(this,ia)!==void 0&&(Ji.clearTimeout(ue(this,ia)),je(this,ia,void 0))},yg=function(){ue(this,aa)!==void 0&&(Ji.clearInterval(ue(this,aa)),je(this,aa,void 0))},gg=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,$o,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},zO=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"})})},wO);function QD(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Cr(t.retryOnMount,e)===!1)}function FE(e,t){return QD(e,t)||e.state.data!==void 0&&_g(e,t,t.refetchOnMount)}function _g(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&&o_(e,t)}return!1}function HE(e,t,r,n){return(e!==t||Cr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&o_(e,r)}function o_(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function ZD(e,t){return!ag(e.getCurrentResult(),t)}var Bo,mn,ur,sa,hn,Jn,AO,ej=(AO=class extends FO{constructor(t){super();We(this,hn);We(this,Bo);We(this,mn);We(this,ur);We(this,sa);je(this,Bo,t.client),this.mutationId=t.mutationId,je(this,ur,t.mutationCache),je(this,mn,[]),this.state=t.state||tj(),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,mn).includes(t)||(ue(this,mn).push(t),this.clearGcTimeout(),ue(this,ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,mn,ue(this,mn).filter(r=>r!==t)),this.scheduleGc(),ue(this,ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,mn).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,m,p,E,T,S,A,f,_,b,h,I,O;const r=()=>{rt(this,hn,Jn).call(this,{type:"continue"})},n={client:ue(this,Bo),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,sa,UO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(P,B)=>{rt(this,hn,Jn).call(this,{type:"failed",failureCount:P,error:B})},onPause:()=>{rt(this,hn,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,hn,Jn).call(this,{type:"pending",variables:t,isPaused:a}),ue(this,ur).config.onMutate&&await ue(this,ur).config.onMutate(t,this,n);const B=await((o=(s=this.options).onMutate)==null?void 0:o.call(s,t,n));B!==this.state.context&&rt(this,hn,Jn).call(this,{type:"pending",context:B,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((p=(m=ue(this,ur).config).onSettled)==null?void 0:p.call(m,P,null,this.state.variables,this.state.context,this,n)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,P,null,t,this.state.context,n)),rt(this,hn,Jn).call(this,{type:"success",data:P}),P}catch(P){try{await((A=(S=ue(this,ur).config).onError)==null?void 0:A.call(S,P,t,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((_=(f=this.options).onError)==null?void 0:_.call(f,P,t,this.state.context,n))}catch(B){Promise.reject(B)}try{await((h=(b=ue(this,ur).config).onSettled)==null?void 0:h.call(b,void 0,P,this.state.variables,this.state.context,this,n))}catch(B){Promise.reject(B)}try{await((O=(I=this.options).onSettled)==null?void 0:O.call(I,void 0,P,t,this.state.context,n))}catch(B){Promise.reject(B)}throw rt(this,hn,Jn).call(this,{type:"error",error:P}),P}finally{ue(this,ur).runNext(this)}}},Bo=new WeakMap,mn=new WeakMap,ur=new WeakMap,sa=new WeakMap,hn=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,mn).forEach(n=>{n.onMutationUpdate(t)}),ue(this,ur).notify({mutation:this,type:"updated",action:t})})},AO);function tj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,xr,ko,OO,rj=(OO=class extends Uo{constructor(t={}){super();We(this,Bn);We(this,xr);We(this,ko);this.config=t,je(this,Bn,new Set),je(this,xr,new Map),je(this,ko,0)}build(t,r,n){const i=new ej({client:t,mutationCache:this,mutationId:++Gu(this,ko)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){ue(this,Bn).add(t);const r=zu(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,Bn).delete(t)){const r=zu(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=zu(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=zu(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,Bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,Bn).clear(),ue(this,xr).clear()})}getAll(){return Array.from(ue(this,Bn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>$E(r,n))}findAll(t={}){return this.getAll().filter(r=>$E(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))))}},Bn=new WeakMap,xr=new WeakMap,ko=new WeakMap,OO);function zu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var yn,NO,nj=(NO=class extends Uo{constructor(t={}){super();We(this,yn);this.config=t,je(this,yn,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??a_(i,r);let s=this.get(a);return s||(s=new XD({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){ue(this,yn).has(t.queryHash)||(ue(this,yn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=ue(this,yn).get(t.queryHash);r&&(t.destroy(),r===t&&ue(this,yn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Zt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,yn).get(t)}getAll(){return[...ue(this,yn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>LE(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>LE(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()})})}},yn=new WeakMap,NO),Bt,ai,si,Za,es,oi,ts,rs,PO,ij=(PO=class{constructor(e={}){We(this,Bt);We(this,ai);We(this,si);We(this,Za);We(this,es);We(this,oi);We(this,ts);We(this,rs);je(this,Bt,e.queryCache||new nj),je(this,ai,e.mutationCache||new rj),je(this,si,e.defaultOptions||{}),je(this,Za,new Map),je(this,es,new Map),je(this,oi,0)}mount(){Gu(this,oi)._++,ue(this,oi)===1&&(je(this,ts,i_.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onFocus())})),je(this,rs,Tl.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Bt).onOnline())})))}unmount(){var e,t;Gu(this,oi)._--,ue(this,oi)===0&&((e=ue(this,ts))==null||e.call(this),je(this,ts,void 0),(t=ue(this,rs))==null||t.call(this),je(this,rs,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=kD(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 Tl.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,Za).set(Ro(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,Za).values()],r={};return t.forEach(n=>{wo(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){ue(this,es).set(Ro(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,es).values()],r={};return t.forEach(n=>{wo(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=a_(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===s_&&(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,Za=new WeakMap,es=new WeakMap,oi=new WeakMap,ts=new WeakMap,rs=new WeakMap,PO),WO=De.createContext(void 0),aj=e=>{const t=De.useContext(WO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sj=({client:e,children:t})=>(De.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Q.jsx(WO.Provider,{value:e,children:t})),YO=De.createContext(!1),oj=()=>De.useContext(YO);YO.Provider;function uj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cj=De.createContext(uj()),lj=()=>De.useContext(cj),dj=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?BO(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},fj=e=>{De.useEffect(()=>{e.clearReset()},[e])},pj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||BO(r,[e.error,n])),mj=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))}},hj=(e,t)=>e.isLoading&&e.isFetching&&!t,yj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,VE=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function gj(e,t,r){var p,E,T,S;const n=oj(),i=lj(),a=aj(),s=a.defaultQueryOptions(e);(E=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||E.call(p,s);const o=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=n?"isRestoring":u?"optimistic":void 0,mj(s),dj(s,i,o),fj(i);const l=!a.getQueryCache().get(s.queryHash),[c]=De.useState(()=>new t(a,s)),d=c.getOptimisticResult(s),m=!n&&u;if(De.useSyncExternalStore(De.useCallback(A=>{const f=m?c.subscribe(Zt.batchCalls(A)):Sr;return c.updateResult(),f},[c,m]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),De.useEffect(()=>{c.setOptions(s)},[s,c]),yj(s,d))throw VE(s,c,i);if(pj({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:o,suspense:s.suspense}))throw d.error;if((S=(T=a.getDefaultOptions().queries)==null?void 0:T._experimental_afterQuery)==null||S.call(T,s,d),s.experimental_prefetchInRender&&!Ao.isServer()&&hj(d,n)){const A=l?VE(s,c,i):o==null?void 0:o.promise;A==null||A.catch(Sr).finally(()=>{c.updateResult()})}return s.notifyOnChangeProps?d:c.trackResult(d)}function Dl(e,t){return gj(e,JD)}const _j="modulepreload",Ej=function(e){return"https://cdn.decentraland.org/@dcl/shop/0.1.0-28932549025.commit-bf7f508/"+e},GE={},xt=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=Ej(l),l in GE)return;GE[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":_j,c||(m.as="script"),m.crossOrigin="",m.href=l,u&&m.setAttribute("nonce",u),document.head.appendChild(m),c)return new Promise((p,E)=>{m.addEventListener("load",p),m.addEventListener("error",()=>E(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)})},xO=Object.prototype.toString;function u_(e){switch(xO.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Un(e,Error)}}function ps(e,t){return xO.call(e)===`[object ${t}]`}function c_(e){return ps(e,"ErrorEvent")}function zE(e){return ps(e,"DOMError")}function vj(e){return ps(e,"DOMException")}function En(e){return ps(e,"String")}function l_(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function d_(e){return e===null||l_(e)||typeof e!="object"&&typeof e!="function"}function ca(e){return ps(e,"Object")}function jl(e){return typeof Event<"u"&&Un(e,Event)}function bj(e){return typeof Element<"u"&&Un(e,Element)}function Tj(e){return ps(e,"RegExp")}function ms(e){return!!(e&&e.then&&typeof e.then=="function")}function Sj(e){return ca(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function KO(e){return typeof e=="number"&&e!==e}function Un(e,t){try{return e instanceof t}catch{return!1}}function XO(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 WE(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const i=e[n];try{XO(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Ij(e,t,r=!1){return En(e)?Tj(t)?t.test(e):En(t)?r?e===t:e.includes(t):!1:!1}function Fo(e,t=[],r=!1){return t.some(n=>Ij(e,n,r))}function Rj(e,t,r=250,n,i,a,s){if(!a.exception||!a.exception.values||!s||!Un(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=wj(Eg(e,t,i,s.originalException,n,a.exception.values,o,0),r))}function Eg(e,t,r,n,i,a,s,o){if(a.length>=r+1)return a;let u=[...a];if(Un(n[i],Error)){YE(s,o);const l=e(t,n[i]),c=u.length;xE(l,i,c,o),u=Eg(e,t,r,n[i],i,[l,...u],l,c)}return Array.isArray(n.errors)&&n.errors.forEach((l,c)=>{if(Un(l,Error)){YE(s,o);const d=e(t,l),m=u.length;xE(d,`errors[${c}]`,m,o),u=Eg(e,t,r,l,i,[d,...u],d,m)}}),u}function YE(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 xE(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 wj(e,t){return e.map(r=>(r.value&&(r.value=Ua(r.value,t)),r))}function Wu(e){return e&&e.Math==Math?e:void 0}const ot=typeof globalThis=="object"&&Wu(globalThis)||typeof window=="object"&&Wu(window)||typeof self=="object"&&Wu(self)||typeof bl=="object"&&Wu(bl)||(function(){return this})()||{};function f_(){return ot}function Ll(e,t,r){const n=r||ot,i=n.__SENTRY__=n.__SENTRY__||{};return i[e]||(i[e]=t())}const Fa=f_(),Aj=80;function ns(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||Aj;for(;r&&a++<n&&(l=Oj(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 Oj(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&&En(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 Nj(){try{return Fa.document.location.href}catch{return""}}function Pj(e){return Fa.document&&Fa.document.querySelector?Fa.document.querySelector(e):null}function JO(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 hs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Cj="Sentry Logger ",vg=["debug","info","warn","error","log","assert","trace"],Sl={};function Ho(e){if(!("console"in ot))return e();const t=ot.console,r={},n=Object.keys(Sl);n.forEach(i=>{const a=Sl[i];r[i]=t[i],t[i]=a});try{return e()}finally{n.forEach(i=>{t[i]=r[i]})}}function Mj(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return hs?vg.forEach(r=>{t[r]=(...n)=>{e&&Ho(()=>{ot.console[r](`${Cj}[${r}]:`,...n)})}}):vg.forEach(r=>{t[r]=()=>{}}),t}const Re=Mj(),Dj=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function jj(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 Lj(e){const t=Dj.exec(e);if(!t){Ho(()=>{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 QO({host:a,pass:i,path:u,projectId:l,port:s,protocol:r,publicKey:n})}function QO(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $j(e){if(!hs)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+$/)?jj(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 ZO(e){const t=typeof e=="string"?Lj(e):QO(e);if(!(!t||!$j(t)))return t}class gn 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"&&eN(i,n),e[t]=i}function la(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{hs&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function eN(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,la(e,"__sentry_original__",t)}catch{}}function p_(e){return e.__sentry_original__}function qj(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function tN(e){if(u_(e))return{message:e.message,name:e.name,stack:e.stack,...XE(e)};if(jl(e)){const t={type:e.type,target:KE(e.target),currentTarget:KE(e.currentTarget),...XE(e)};return typeof CustomEvent<"u"&&Un(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function KE(e){try{return bj(e)?ns(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function XE(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 Bj(e,t=40){const r=Object.keys(tN(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 bg(e,new Map)}function bg(e,t){if(kj(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]=bg(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(bg(i,t))}),n}return e}function kj(e){if(!ca(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const rN=50,JE=/\(error: (.*)\)/,QE=/captureMessage|captureException/;function nN(...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=JE.test(o)?o.replace(JE,"$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>=rN)break}}return Fj(i)}}function Uj(e){return Array.isArray(e)?nN(...e):e}function Fj(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),QE.test(t[t.length-1].function||"")&&(t.pop(),QE.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,rN).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const _d="<anonymous>";function Fn(e){try{return!e||typeof e!="function"?_d:e.name||_d}catch{return _d}}const hl={},ZE={};function ya(e,t){hl[e]=hl[e]||[],hl[e].push(t)}function ga(e,t){ZE[e]||(t(),ZE[e]=!0)}function Xr(e,t){const r=e&&hl[e];if(r)for(const n of r)try{n(t)}catch(i){hs&&Re.error(`Error while triggering instrumentation handler.
4
4
  Type: ${e}
5
5
  Name: ${Fn(n)}
@@ -31,7 +31,7 @@ Error:`,i)}}function Gq(){return Oq(e=>{bs("cls",{metric:e}),JN=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 Bv;function Vk(){if(Bv)return gt;Bv=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,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function _(h){if(typeof h=="object"&&h!==null){var I=h.$$typeof;switch(I){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case E:case p:case s:return h;default:return I}}case r:return I}}}function b(h){return _(h)===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=E,gt.Memo=p,gt.Portal=r,gt.Profiler=a,gt.StrictMode=i,gt.Suspense=d,gt.isAsyncMode=function(h){return b(h)||_(h)===u},gt.isConcurrentMode=b,gt.isContextConsumer=function(h){return _(h)===o},gt.isContextProvider=function(h){return _(h)===s},gt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},gt.isForwardRef=function(h){return _(h)===c},gt.isFragment=function(h){return _(h)===n},gt.isLazy=function(h){return _(h)===E},gt.isMemo=function(h){return _(h)===p},gt.isPortal=function(h){return _(h)===r},gt.isProfiler=function(h){return _(h)===a},gt.isStrictMode=function(h){return _(h)===i},gt.isSuspense=function(h){return _(h)===d},gt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===E||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===S||h.$$typeof===A||h.$$typeof===f||h.$$typeof===T)},gt.typeOf=_,gt}var kv;function Gk(){return kv||(kv=1,Rd.exports=Vk()),Rd.exports}var wd,Uv;function zk(){if(Uv)return wd;Uv=1;var e=Gk(),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(E){return e.isMemo(E)?i:a[E.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(E,T,S){if(typeof T!="string"){if(m){var A=d(T);A&&A!==m&&p(E,A,S)}var f=u(T);l&&(f=f.concat(l(T)));for(var _=s(E),b=s(T),h=0;h<f.length;++h){var I=f[h];if(!r[I]&&!(S&&S[I])&&!(b&&b[I])&&!(_&&_[I])){var O=c(T,I);try{o(E,I,O)}catch{}}}}return E}return wd=p,wd}zk();const Wk=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yk(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Fv={componentStack:null,error:null,eventId:null};function xk(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 Nl extends De.Component{constructor(t){super(t),Nl.prototype.__init.call(this),this.state=Fv,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&&qv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;_N(o=>{if(Yk(De.version)&&u_(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,xk(t,l)}n&&n(o,t,r);const u=E_(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&qv({...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(Fv)}}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&&Wk&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const Kk=De.lazy(()=>xt(()=>import("./index-CuBAn4iR.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.Navbar})));function Xk(e){return Q.jsx(De.Suspense,{fallback:Q.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:Q.jsx(Kk,{...e})})}const Jk={},Hv=e=>{let t;const r=new Set,n=(c,d)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const p=t;t=d??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(E=>E(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(Jk?"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},Qk=e=>e?Hv(e):Hv;var Ad={exports:{}},Od={},Nd={exports:{}},Pd={};/**
34
+ */var Bv;function Vk(){if(Bv)return gt;Bv=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,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,A=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function _(h){if(typeof h=="object"&&h!==null){var I=h.$$typeof;switch(I){case t:switch(h=h.type,h){case u:case l:case n:case a:case i:case d:return h;default:switch(h=h&&h.$$typeof,h){case o:case c:case E:case p:case s:return h;default:return I}}case r:return I}}}function b(h){return _(h)===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=E,gt.Memo=p,gt.Portal=r,gt.Profiler=a,gt.StrictMode=i,gt.Suspense=d,gt.isAsyncMode=function(h){return b(h)||_(h)===u},gt.isConcurrentMode=b,gt.isContextConsumer=function(h){return _(h)===o},gt.isContextProvider=function(h){return _(h)===s},gt.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},gt.isForwardRef=function(h){return _(h)===c},gt.isFragment=function(h){return _(h)===n},gt.isLazy=function(h){return _(h)===E},gt.isMemo=function(h){return _(h)===p},gt.isPortal=function(h){return _(h)===r},gt.isProfiler=function(h){return _(h)===a},gt.isStrictMode=function(h){return _(h)===i},gt.isSuspense=function(h){return _(h)===d},gt.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===l||h===a||h===i||h===d||h===m||typeof h=="object"&&h!==null&&(h.$$typeof===E||h.$$typeof===p||h.$$typeof===s||h.$$typeof===o||h.$$typeof===c||h.$$typeof===S||h.$$typeof===A||h.$$typeof===f||h.$$typeof===T)},gt.typeOf=_,gt}var kv;function Gk(){return kv||(kv=1,Rd.exports=Vk()),Rd.exports}var wd,Uv;function zk(){if(Uv)return wd;Uv=1;var e=Gk(),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(E){return e.isMemo(E)?i:a[E.$$typeof]||t}var o=Object.defineProperty,u=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;function p(E,T,S){if(typeof T!="string"){if(m){var A=d(T);A&&A!==m&&p(E,A,S)}var f=u(T);l&&(f=f.concat(l(T)));for(var _=s(E),b=s(T),h=0;h<f.length;++h){var I=f[h];if(!r[I]&&!(S&&S[I])&&!(b&&b[I])&&!(_&&_[I])){var O=c(T,I);try{o(E,I,O)}catch{}}}}return E}return wd=p,wd}zk();const Wk=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Yk(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}const Fv={componentStack:null,error:null,eventId:null};function xk(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 Nl extends De.Component{constructor(t){super(t),Nl.prototype.__init.call(this),this.state=Fv,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&&qv({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:r}){const{beforeCapture:n,onError:i,showDialog:a,dialogOptions:s}=this.props;_N(o=>{if(Yk(De.version)&&u_(t)){const l=new Error(t.message);l.name=`React ErrorBoundary ${t.name}`,l.stack=r,xk(t,l)}n&&n(o,t,r);const u=E_(t,{captureContext:{contexts:{react:{componentStack:r}}},mechanism:{handled:!!this.props.fallback}});i&&i(t,r,u),a&&(this._lastEventId=u,this._openFallbackReportDialog&&qv({...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(Fv)}}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&&Wk&&Re.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}const Kk=De.lazy(()=>xt(()=>import("./index-p7adRLap.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.Navbar})));function Xk(e){return Q.jsx(De.Suspense,{fallback:Q.jsx("div",{className:"topnav-skeleton","aria-hidden":!0}),children:Q.jsx(Kk,{...e})})}const Jk={},Hv=e=>{let t;const r=new Set,n=(c,d)=>{const m=typeof c=="function"?c(t):c;if(!Object.is(m,t)){const p=t;t=d??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(E=>E(t,p))}},i=()=>t,u={setState:n,getState:i,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(Jk?"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},Qk=e=>e?Hv(e):Hv;var Ad={exports:{}},Od={},Nd={exports:{}},Pd={};/**
35
35
  * @license React
36
36
  * use-sync-external-store-shim.production.js
37
37
  *
@@ -71,7 +71,7 @@ Error:`,i)}}function Gq(){return Oq(e=>{bs("cls",{metric:e}),JN=e},{reportAllCha
71
71
  Ephemeral address: ${X}
72
72
  Expiration: ${x.toISOString()}`}e.Authenticator={validateSignature:m,isValidAuthChain:p,createEIP1271MessageHash:E,createSimpleAuthChain:T,createAuthChain:S,initializeAuthChain:A,signPayload:f,createEthereumMessageHash:e.createEthereumMessageHash,createSignature:_,ownerAddress:b,getEphemeralMessage:h};const I=async(X,x)=>({nextAuthority:x.payload});e.SIGNER_VALIDATOR=I;const O=async(X,x)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const L=(0,o.recoverAddressFromEthSignature)(x.signature,x.payload),D=X.toLocaleLowerCase(),$=L.toLocaleLowerCase();if(D===$)return{nextAuthority:x.payload};throw new Error(`Invalid signer address. Expected: ${D}. Actual: ${$}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=O;const P=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:V}=F(x.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(V>N){const j=(0,o.recoverAddressFromEthSignature)(x.signature,D),Z=X.toLocaleLowerCase(),Ee=j.toLocaleLowerCase();if(Z===Ee)return{nextAuthority:$};throw new Error(`Invalid signer address. Expected: ${Z}. Actual: ${Ee}`)}throw new Error(`Ephemeral key expired. Expiration: ${V}. Test: ${N}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=P;const B=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:D,ephemeralAddress:$,expiration:V}=F(x.payload),N=(L==null?void 0:L.dateToValidateExpirationInMillis)||Date.now();if(V>N&&await se(L==null?void 0:L.provider,X,D,x.signature,N))return{nextAuthority:$};throw new Error(`Ephemeral key expired. Expiration: ${V}. Test: ${N}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=B;const z=async(X,x,L)=>{if(!x.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(!L)throw new Error("Missing validation options for 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await se(L.provider,X,x.payload,x.signature,L.dateToValidateExpirationInMillis))return{nextAuthority:x.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=z;const Y=async(X,x)=>({error:"Error Validator."});function W(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}function U(X){return X.length===d?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}function F(X){const x=X.replace(/\r/g,""),L=x.split(`
73
73
  `),D="Ephemeral address: ",$="Expiration: ";if(L.length<3||!L[1].startsWith(D)||!L[2].startsWith($))throw new Error(`Invalid ephemeral payload. Expected 3 lines with "${D}" on line 2 and "${$}" on line 3.`);const V=L[1].substring(D.length),N=L[2].substring($.length),j=Date.parse(N);if(Number.isNaN(j))throw new Error(`Invalid expiration date in ephemeral payload: "${N}"`);return{message:x,ephemeralAddress:V,expiration:j}}e.parseEmphemeralPayload=F;async function ce(X,x,L,D){const $=E(x),V=(0,a.hexToBytes)(L);let N;try{N=(0,a.bytesToHex)(await X.isValidSignature($,V,D))}catch{}if(N===e.ERC1654_MAGIC_VALUE)return!0;const j=(0,o.createEthereumMessageHash)(x);try{N=(0,a.bytesToHex)(await X.isValidSignature(j,V,D))}catch{}return N===e.ERC1654_MAGIC_VALUE}async function se(X,x,L,D,$){if(!X)throw new Error("Missing provider");const V=new a.default(X),N=await(0,s.SignatureValidator)(V,x);let j=await ce(N,L,D);if(j)return!0;const Z=new u.default(V);try{const{block:Ee}=await Z.getDate($,!1);if(j=await ce(N,L,D,Ee),j)return!0}catch(Ee){const _e=Ee instanceof Error?Ee.message:String(Ee);throw new Error(`Invalid validation. Error: ${_e}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${j}`)}function ne(X){switch(X){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return Y}}})(Hr)),Hr}var Cn={},Dw;function OG(){return Dw||(Dw=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.AUTH_METADATA_HEADER=Cn.AUTH_TIMESTAMP_HEADER=Cn.AUTH_CHAIN_HEADER_PREFIX=void 0,Cn.AUTH_CHAIN_HEADER_PREFIX="x-identity-auth-chain-",Cn.AUTH_TIMESTAMP_HEADER="x-identity-timestamp",Cn.AUTH_METADATA_HEADER="x-identity-metadata"),Cn}var jw;function NG(){return jw||(jw=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(qC(),e),r(OG(),e),r($C(),e)})(Ci)),Ci}var PG=NG(),xi={},Wr={},nl={exports:{}},il={exports:{}},Lw;function rE(){return Lw||(Lw=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})(il,il.exports)),il.exports}var al={exports:{}},$w;function CG(){return $w||($w=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})(al,al.exports)),al.exports}var sl={exports:{}},qw;function MG(){return qw||(qw=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})(sl,sl.exports)),sl.exports}var ol={exports:{}},ul={exports:{}},Bw;function BC(){return Bw||(Bw=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})(ul,ul.exports)),ul.exports}var kw;function DG(){return kw||(kw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=i(rE()),n=i(BC());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})(ol,ol.exports)),ol.exports}var cl={exports:{}},Uw;function jG(){return Uw||(Uw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var r=n(rE());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(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},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 m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,r.default)(d);var p=(i(m)==="object"?m.version:arguments[1])||"";return p?p.toString()==="4"?o.test(d):p.toString()==="6"?l.test(d):!1:c(d,{version:4})||c(d,{version:6})}e.exports=t.default,e.exports.default=t.default})(cl,cl.exports)),cl.exports}var Fw;function LG(){return Fw||(Fw=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=A;var r=u(rE()),n=u(CG()),i=u(MG()),a=u(DG()),s=u(jG()),o=u(BC());function u(f){return f&&f.__esModule?f:{default:f}}function l(f,_){return E(f)||p(f,_)||d(f,_)||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(f,_){if(f){if(typeof f=="string")return m(f,_);var b={}.toString.call(f).slice(8,-1);return b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set"?Array.from(f):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?m(f,_):void 0}}function m(f,_){(_==null||_>f.length)&&(_=f.length);for(var b=0,h=Array(_);b<_;b++)h[b]=f[b];return h}function p(f,_){var b=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(b!=null){var h,I,O,P,B=[],z=!0,Y=!1;try{if(O=(b=b.call(f)).next,_!==0)for(;!(z=(h=O.call(b)).done)&&(B.push(h.value),B.length!==_);z=!0);}catch(W){Y=!0,I=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw I}}return B}}function E(f){if(Array.isArray(f))return f}var T={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},S=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(f,_){if((0,r.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(_=(0,o.default)(_,T),_.validate_length&&f.length>_.max_allowed_length)||!_.allow_fragments&&(0,i.default)(f,"#")||!_.allow_query_components&&((0,i.default)(f,"?")||(0,i.default)(f,"&")))return!1;var b,h,I,O,P,B,z,Y;z=f.split("#"),f=z.shift(),z=f.split("?"),f=z.shift();var W=f.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),_.require_valid_protocol&&_.protocols.indexOf(b)===-1?!1:f.substring(W[0].length)};if(W){var ce=W[1],se=f.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(f=F(ce),f===!1)return!1}else{var X=se.indexOf("/"),x=X===-1?se:se.substring(0,X),L=x.indexOf("@");if(L!==-1){var D=x.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,V=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(V&&!N){if(_.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}else{var j=/^[0-9]/.test(se);if(j){if(_.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}}}else if(_.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!U&&!_.allow_protocol_relative_urls)return!1;f=f.slice(2)}if(f==="")return!1;if(z=f.split("/"),f=z.shift(),f===""&&!_.require_host)return!0;if(z=f.split("@"),z.length>1){if(_.disallow_auth||z[0]===""||(h=z.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var Z=h.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}O=z.join("@"),B=null,Y=null;var Ie=O.match(S);if(Ie?(I="",Y=Ie[1],B=Ie[2]||null):(z=O.split(":"),I=z.shift(),z.length&&(B=z.join(":"))),B!==null&&B.length>0){if(P=parseInt(B,10),!/^[0-9]+$/.test(B)||P<=0||P>65535)return!1}else if(_.require_port)return!1;return _.host_whitelist?(0,n.default)(I,_.host_whitelist):I===""&&!_.require_host?!0:!(!(0,s.default)(I)&&!(0,a.default)(I,_)&&(!Y||!(0,s.default)(Y,6))||(I=I||Y,_.host_blacklist&&(0,n.default)(I,_.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(nl,nl.exports)),nl.exports}var ey={},Hw;function kC(){return Hw||(Hw=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()}`}})(ey)),ey}var Vw;function $G(){if(Vw)return Wr;Vw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.clearIdentity=Wr.storeIdentity=Wr.getIdentity=Wr.init=void 0;const e=LG(),t=kC(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(S,A={}){if(!(0,e.default)(S,{...o,...A}))throw new Error(`Invalid url: ${S}`);if(s)throw new Error("Already initialized");const f=document.createElement("iframe");f.id=r,f.src=S,f.style.width="0",f.style.height="0",f.style.border="none",f.style.position="absolute",document.body.appendChild(f),s=S}Wr.init=u;async function l(S){let A;try{A=(await p(await m(),t.Action.GET,{user:S})).identity??null}catch(f){T(f),A=(0,t.localStorageGetIdentity)(S)}return A}Wr.getIdentity=l;async function c(S,A){try{await p(await m(),t.Action.STORE,{user:S,identity:A})}catch(f){T(f),(0,t.localStorageStoreIdentity)(S,A)}}Wr.storeIdentity=c;async function d(S){try{await p(await m(),t.Action.CLEAR,{user:S})}catch(A){T(A),(0,t.localStorageClearIdentity)(S)}}Wr.clearIdentity=d;async function m(){if(!s)throw new Error("Not initialized");for(let S=0;S<i;S++){const A=document.getElementById(r),f=A==null?void 0:A.contentWindow;if(!f){await E(n);continue}try{await p(f,t.Action.PING,{},n)}catch{continue}return f}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(S,A,f,_=0){a++;const b=a;let h=null;const I=new Promise((O,P)=>{h=({data:B})=>{!B||B.target!==t.SINGLE_SIGN_ON_TARGET||B.id!==b||(B.error?P(new Error(B.error)):O(B))},window.addEventListener("message",h)});S.postMessage((0,t.createMessage)({id:b,action:A,...f}),s);try{return await(_?Promise.race([I,new Promise((O,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),_))]):I)}catch(O){throw O}finally{h&&window.removeEventListener("message",h)}}function E(S){return new Promise(A=>setTimeout(A,S))}function T(S){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",S.message)}return Wr}var Gw;function qG(){return Gw||(Gw=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($G(),e),r(kC(),e)})(xi)),xi}var Hg=qG();function BG(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?vn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?vn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?vn.DEVELOPMENT:null}function kG(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(FC(n))return n}return null}var zw={},vn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(vn||(vn={}));function UC(){return Object.values(vn)}function FC(e){return UC().includes(e)}function ll(e){if(FC(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${UC().map(t=>`"${t}"`).join(", ")}.`)}function UG(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?ll(t):r?ll(r):n?ll(n):i?ll(i):vn.PRODUCTION}function FG(e){if(typeof window<"u"){const r=kG(window.location);if(r)return r;const n=BG(window.location);if(n)return n}return UG(typeof e>"u"&&typeof ml=="object"&&typeof zw=="object"?zw:e)}function HG(e,t){const r=FG(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 VG="development",GG="80002",zG="https://marketplace-api.decentraland.zone",WG="https://marketplace-api.decentraland.zone",YG="/auth",xG="https://rpc.decentraland.org/amoy",KG="https://credits.decentraland.zone",XG="https://builder-api.decentraland.zone",JG="https://peer.decentraland.zone",QG="",ZG="",e3="",t3="",r3={ENVIRONMENT:VG,CHAIN_ID:GG,MARKETPLACE_SERVER_URL:zG,NFT_API_URL:WG,AUTH_URL:YG,RPC_URL:xG,CREDITS_SERVER_URL:KG,BUILDER_SERVER_URL:XG,PEER_URL:JG,SHOP_SERVER_URL:QG,STRIPE_PUBLISHABLE_KEY:ZG,SEGMENT_WRITE_KEY:e3,SENTRY_DSN:t3},n3="staging",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="production",_3="137",E3="https://marketplace-api.decentraland.org",v3="https://marketplace-api.decentraland.org",b3="/auth",T3="https://rpc.decentraland.org/polygon",S3="https://credits.decentraland.org",I3="https://builder-api.decentraland.org",R3="https://peer.decentraland.org",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={},Nr=HG({[vn.DEVELOPMENT]:r3,[vn.STAGING]:y3,[vn.PRODUCTION]:P3},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),or=C3,Dt={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"}`},M3=744*60;async function HC(){return(await xt(async()=>{const{connection:e}=await import("./index-zVvLDKBh.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([7,1]))).connection}async function D3(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new MD(e.provider),n=r.getSigner();let i=Hg.localStorageGetIdentity(t);if(!i){const a=DD.createRandom();i=await PG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:jE(a.publicKey),privateKey:jE(a.privateKey)},M3,s=>n.signMessage(s)),Hg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function j3(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Dt.authUrl}/login?redirectTo=${e}`)}async function L3(){try{const t=await(await HC()).tryPreviousConnection();return!t.account||!Hg.localStorageGetIdentity(t.account.toLowerCase())?null:await D3(t)}catch{return null}}async function $3(){try{await(await HC()).disconnect()}catch{}}const q3=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,B3=Dt.chainId===80002?"amoy":"polygon",k3=Dt.chainId===80002?"dev":"prod";function VC(){return window.analytics}function U3(){let e=null;try{e=Ss.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:q3,network:B3,app_env:k3}}function ci(e,t={}){const r={...U3(),...t},n=VC();n&&n.track(e,r)}function F3(e,t={}){const r=VC();r&&r.identify(e.toLowerCase(),t)}function H3(e){ci("Shop Viewed Page",{page:e})}function Ww(e){return e===Hn.ProviderType.MAGIC||e===Hn.ProviderType.MAGIC_TEST?"magic":"wallet"}function V3(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function Do(e){return Math.round(e*10)/100}function nE(e){return!e.tokenId}function XW(e){return{item_id:e.itemId??null,contract_address:e.contractAddress,token_id:e.tokenId??null,trade_id:e.tradeId??null,price_credits:e.priceCredits,price_usd:Do(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:nE(e)}}function JW(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(nE);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:Do(n.priceCredits)})),value_credits:t,value_usd:Do(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function G3(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 QW(e){return G3(e)==="user_rejected"}function z3(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 Yw=!1;function W3(){if(Yw)return;Yw=!0;const e=Dt.segmentWriteKey;e&&z3(e)}let Vg=null;function Y3(e){Vg=e}function xw(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Vg)try{Vg(e,t)}catch{}}const x3=/0x[a-fA-F0-9]{130}\b/g,K3=/0x[a-fA-F0-9]{64}\b/g,X3=/(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,J3=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function xs(e){return e.replace(x3,"<signature>").replace(X3,"<secret>").replace(K3,"<hex32>")}function Q3(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(J3.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=xs(n[i]))}};return t(e.tags),t(e.extra),e}let Kw=!1;function Z3(){if(Kw)return;const e=Dt.sentryDsn;if(!e)return;Kw=!0,Hk({dsn:e,environment:Dt.sentryEnvironment,release:Dt.sentryRelease,integrations:[new NB],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:Q3});const t=e4();t&&QL({id:t}),Y3((r,n)=>E_(r,{extra:n}))}function e4(){var e;try{return((e=Ss.getState().session)==null?void 0:e.address)??null}catch{return null}}const ty="shop:signing_in",Ss=Ts(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(ty,"1")}catch{}j3()},disconnect:async()=>{ci("Shop Signed Out");try{await $3()}catch(t){xw(t,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let t;try{t=await L3()}catch(n){xw(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),F3(t.address,{sign_in_method:Ww(t.providerType)});let r=!1;try{r=sessionStorage.getItem(ty)==="1",r&&sessionStorage.removeItem(ty)}catch{}r&&ci("Shop Signed In",{method:Ww(t.providerType),is_new_user:V3(t.address)})}})),t4=Dt.peerUrl;function iE(e){return Dl({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${t4}/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 Mn={},ry={},Xw;function GC(){return Xw||(Xw=1,Object.defineProperty(ry,"__esModule",{value:!0})),ry}var Dn={},fn={},La={},Ki={},Jw={},Ks,Qw;function nn(){if(Qw)return Ks;Qw=1;var e=function(t){return t&&t.Math===Math&&t};return Ks=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ng=="object"&&ng)||e(typeof Ks=="object"&&Ks)||(function(){return this})()||Function("return this")(),Ks}var ny,Zw;function Ra(){return Zw||(Zw=1,ny=function(e){try{return!!e()}catch{return!0}}),ny}var iy,eA;function id(){if(eA)return iy;eA=1;var e=Ra();return iy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),iy}var ay,tA;function r4(){if(tA)return ay;tA=1;var e=id(),t=Function.prototype,r=t.apply,n=t.call;return ay=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ay}var sy,rA;function Is(){if(rA)return sy;rA=1;var e=id(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return sy=e?n:function(i){return function(){return r.apply(i,arguments)}},sy}var oy,nA;function zC(){if(nA)return oy;nA=1;var e=Is(),t=e({}.toString),r=e("".slice);return oy=function(n){return r(t(n),8,-1)},oy}var uy,iA;function WC(){if(iA)return uy;iA=1;var e=zC(),t=Is();return uy=function(r){if(e(r)==="Function")return t(r)},uy}var cy,aA;function wa(){if(aA)return cy;aA=1;var e=typeof document=="object"&&document.all;return cy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},cy}var ly={},dy,sA;function eu(){if(sA)return dy;sA=1;var e=Ra();return dy=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),dy}var fy,oA;function aE(){if(oA)return fy;oA=1;var e=id(),t=Function.prototype.call;return fy=e?t.bind(t):function(){return t.apply(t,arguments)},fy}var py={},uA;function n4(){if(uA)return py;uA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return py.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,py}var my,cA;function YC(){return cA||(cA=1,my=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),my}var hy,lA;function i4(){if(lA)return hy;lA=1;var e=Is(),t=Ra(),r=zC(),n=Object,i=e("".split);return hy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,hy}var yy,dA;function xC(){return dA||(dA=1,yy=function(e){return e==null}),yy}var gy,fA;function KC(){if(fA)return gy;fA=1;var e=xC(),t=TypeError;return gy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},gy}var _y,pA;function a4(){if(pA)return _y;pA=1;var e=i4(),t=KC();return _y=function(r){return e(t(r))},_y}var Ey,mA;function ad(){if(mA)return Ey;mA=1;var e=wa();return Ey=function(t){return typeof t=="object"?t!==null:e(t)},Ey}var vy,hA;function XC(){return hA||(hA=1,vy={}),vy}var by,yA;function s4(){if(yA)return by;yA=1;var e=XC(),t=nn(),r=wa(),n=function(i){return r(i)?i:void 0};return by=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},by}var Ty,gA;function o4(){if(gA)return Ty;gA=1;var e=Is();return Ty=e({}.isPrototypeOf),Ty}var Sy,_A;function u4(){if(_A)return Sy;_A=1;var e=nn(),t=e.navigator,r=t&&t.userAgent;return Sy=r?String(r):"",Sy}var Iy,EA;function c4(){if(EA)return Iy;EA=1;var e=nn(),t=u4(),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]))),Iy=o,Iy}var Ry,vA;function JC(){if(vA)return Ry;vA=1;var e=c4(),t=Ra(),r=nn(),n=r.String;return Ry=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ry}var wy,bA;function QC(){if(bA)return wy;bA=1;var e=JC();return wy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wy}var Ay,TA;function ZC(){if(TA)return Ay;TA=1;var e=s4(),t=wa(),r=o4(),n=QC(),i=Object;return Ay=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Ay}var Oy,SA;function l4(){if(SA)return Oy;SA=1;var e=String;return Oy=function(t){try{return e(t)}catch{return"Object"}},Oy}var Ny,IA;function eM(){if(IA)return Ny;IA=1;var e=wa(),t=l4(),r=TypeError;return Ny=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Ny}var Py,RA;function d4(){if(RA)return Py;RA=1;var e=eM(),t=xC();return Py=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Py}var Cy,wA;function f4(){if(wA)return Cy;wA=1;var e=aE(),t=wa(),r=ad(),n=TypeError;return Cy=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")},Cy}var My={exports:{}},Dy,AA;function p4(){return AA||(AA=1,Dy=!0),Dy}var jy,OA;function m4(){if(OA)return jy;OA=1;var e=nn(),t=Object.defineProperty;return jy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},jy}var NA;function h4(){if(NA)return My.exports;NA=1;var e=p4(),t=nn(),r=m4(),n="__core-js_shared__",i=My.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"}),My.exports}var Ly,PA;function y4(){if(PA)return Ly;PA=1;var e=h4();return Ly=function(t,r){return e[t]||(e[t]=r||{})},Ly}var $y,CA;function g4(){if(CA)return $y;CA=1;var e=KC(),t=Object;return $y=function(r){return t(e(r))},$y}var qy,MA;function sE(){if(MA)return qy;MA=1;var e=Is(),t=g4(),r=e({}.hasOwnProperty);return qy=Object.hasOwn||function(i,a){return r(t(i),a)},qy}var By,DA;function _4(){if(DA)return By;DA=1;var e=Is(),t=0,r=Math.random(),n=e(1.1.toString);return By=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},By}var ky,jA;function E4(){if(jA)return ky;jA=1;var e=nn(),t=y4(),r=sE(),n=_4(),i=JC(),a=QC(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return ky=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},ky}var Uy,LA;function v4(){if(LA)return Uy;LA=1;var e=aE(),t=ad(),r=ZC(),n=d4(),i=f4(),a=E4(),s=TypeError,o=a("toPrimitive");return Uy=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)},Uy}var Fy,$A;function tM(){if($A)return Fy;$A=1;var e=v4(),t=ZC();return Fy=function(r){var n=e(r,"string");return t(n)?n:n+""},Fy}var Hy,qA;function b4(){if(qA)return Hy;qA=1;var e=nn(),t=ad(),r=e.document,n=t(r)&&t(r.createElement);return Hy=function(i){return n?r.createElement(i):{}},Hy}var Vy,BA;function rM(){if(BA)return Vy;BA=1;var e=eu(),t=Ra(),r=b4();return Vy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Vy}var kA;function T4(){if(kA)return ly;kA=1;var e=eu(),t=aE(),r=n4(),n=YC(),i=a4(),a=tM(),s=sE(),o=rM(),u=Object.getOwnPropertyDescriptor;return ly.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])},ly}var Gy,UA;function S4(){if(UA)return Gy;UA=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 Gy=n,Gy}var zy,FA;function I4(){if(FA)return zy;FA=1;var e=WC(),t=eM(),r=id(),n=e(e.bind);return zy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},zy}var Wy={},Yy,HA;function R4(){if(HA)return Yy;HA=1;var e=eu(),t=Ra();return Yy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Yy}var xy,VA;function w4(){if(VA)return xy;VA=1;var e=ad(),t=String,r=TypeError;return xy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},xy}var GA;function A4(){if(GA)return Wy;GA=1;var e=eu(),t=rM(),r=R4(),n=w4(),i=tM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Wy.f=e?r?function(m,p,E){if(n(m),p=i(p),n(E),typeof m=="function"&&p==="prototype"&&"value"in E&&c in E&&!E[c]){var T=o(m,p);T&&T[c]&&(m[p]=E.value,E={configurable:l in E?E[l]:T[l],enumerable:u in E?E[u]:T[u],writable:!1})}return s(m,p,E)}:s:function(m,p,E){if(n(m),p=i(p),n(E),t)try{return s(m,p,E)}catch{}if("get"in E||"set"in E)throw new a("Accessors not supported");return"value"in E&&(m[p]=E.value),m},Wy}var Ky,zA;function O4(){if(zA)return Ky;zA=1;var e=eu(),t=A4(),r=YC();return Ky=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Ky}var Xy,WA;function N4(){if(WA)return Xy;WA=1;var e=nn(),t=r4(),r=WC(),n=wa(),i=T4().f,a=S4(),s=XC(),o=I4(),u=O4(),l=sE(),c=function(d){var m=function(p,E,T){if(this instanceof m){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,E)}return new d(p,E,T)}return t(d,this,arguments)};return m.prototype=d.prototype,m};return Xy=function(d,m){var p=d.target,E=d.global,T=d.stat,S=d.proto,A=E?e:T?e[p]:e[p]&&e[p].prototype,f=E?s:s[p]||u(s,p,{})[p],_=f.prototype,b,h,I,O,P,B,z,Y,W;for(O in m)b=a(E?O:p+(T?".":"#")+O,d.forced),h=!b&&A&&l(A,O),B=f[O],h&&(d.dontCallGetSet?(W=i(A,O),z=W&&W.value):z=A[O]),P=h&&z?z:m[O],!(!b&&!S&&typeof B==typeof P)&&(d.bind&&h?Y=o(P,e):d.wrap&&h?Y=c(P):S&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||B&&B.sham)&&u(Y,"sham",!0),u(f,O,Y),S&&(I=p+"Prototype",l(s,I)||u(s,I,{}),u(s[I],O,P),d.real&&_&&(b||!_[O])&&u(_,O,P)))},Xy}var YA;function P4(){if(YA)return Jw;YA=1;var e=N4(),t=nn();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),Jw}var Jy,xA;function C4(){return xA||(xA=1,P4(),Jy=nn()),Jy}var Qy,KA;function M4(){if(KA)return Qy;KA=1;var e=C4();return Qy=e,Qy}var XA;function nM(){if(XA)return Ki;XA=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(M4());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 JA;function iM(){if(JA)return La;JA=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=qC(),r=nM(),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,m,p,E){var T,S,A=new u(E),f=String(Date.now()),_=JSON.stringify(p),b=[d,m,f,_].join(":").toLowerCase(),h=0,I=t.Authenticator.signPayload(c,b);try{for(var O=e(I),P=O.next();!P.done;P=O.next()){var B=P.value;A.set(n+h,JSON.stringify(B)),h++}}catch(z){T={error:z}}finally{try{P&&!P.done&&(S=O.return)&&S.call(O)}finally{if(T)throw T.error}}return A.set(i,f),A.set(a,_),A}}return La.default=s,La}var QA;function aM(){if(QA)return fn;QA=1;var e=fn&&fn.__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=fn&&fn.__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=fn&&fn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(fn,"__esModule",{value:!0});var n=r(iM()),i=nM();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(m,p){if(p&&p.identity){var E=p.identity,T=p.metadata,S=t(p,["identity","metadata"]);if(typeof m=="string"||m instanceof u||globalThis.URL&&m instanceof globalThis.URL){var A=typeof m=="string"?new u(m):m,f=new l(A.toString(),e(e({},S),{headers:o(E,p.method||"GET",A.pathname,T||{},S==null?void 0:S.headers)}));return c(f)}var _=new u(m.url),b=new l(m),h=o(E,m.method||"GET",_.pathname,T||{});return h.forEach(function(I,O){b.headers.set(O,I)}),c(b)}return c(m,p)}}return fn.default=a,fn}var ZA;function D4(){return ZA||(ZA=1,(function(e){var t=Dn&&Dn.__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=Dn&&Dn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=Dn&&Dn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(GC(),e);var i=aM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=iM();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(Dn)),Dn}var eO;function j4(){return eO||(eO=1,(function(e){var t=Mn&&Mn.__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=Mn&&Mn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=Mn&&Mn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(GC(),e),r(D4(),e);var i=n(aM());e.default=(0,i.default)()})(Mn)),Mn}var L4=j4();const sd=MO(L4);async function $4(e,t){const r=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await sd(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function q4(e,t){const{usd:r}=await $4(e,t);return r??{balanceCents:0,credits:0}}async function ZW(e,t,r){const n=`${Dt.creditsServerUrl}/credits/authorize`,i=await sd(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 e6(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=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await sd(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 t6(e,t){if(t.length===0)return 0;const r=`${Dt.creditsServerUrl}/credits/authorize/cancel`,n=await sd(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 r6(e,t=1e3){const r=await fetch(`${Dt.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 B4(e){return Dl({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>q4(e.address,e.identity)})}const k4=e=>Do(e.reduce((t,r)=>t+r.priceCredits,0)),Kr=Ts((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:Do(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:k4(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})})),cs={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function n6(e){return`${e} ${e===1?cs.nameSingular:cs.name}`}function kn({className:e}){return Q.jsx("span",{className:`ico ${cs.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function U4(){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:Q.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[Q.jsxs("div",{className:"cart-pop__head",children:[Q.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),Q.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>Q.jsxs("div",{className:"cart-pop__row",children:[Q.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?Q.jsx("img",{src:s.thumbnail,alt:s.name}):null}),Q.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),Q.jsxs("div",{className:"cart-pop__price",children:[Q.jsx(kn,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),Q.jsxs("div",{className:"cart-pop__foot",children:[Q.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",Q.jsxs("strong",{children:[Q.jsx(kn,{className:"ccy-mark"})," ",a]})]}),Q.jsxs("div",{className:"cart-pop__actions",children:[Q.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),Q.jsx(vl,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var Gg=function(e,t){return Gg=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])},Gg(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");Gg(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 Rs(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 sM(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 oM(e,t){return function(r,n){t(r,n,e)}}function uM(e,t,r,n,i,a){function s(A){if(A!==void 0&&typeof A!="function")throw new TypeError("Function expected");return A}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,m=!1,p=r.length-1;p>=0;p--){var E={};for(var T in n)E[T]=T==="access"?{}:n[T];for(var T in n.access)E.access[T]=n.access[T];E.addInitializer=function(A){if(m)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(A||null))};var S=(0,r[p])(o==="accessor"?{get:c.get,set:c.set}:c[u],E);if(o==="accessor"){if(S===void 0)continue;if(S===null||typeof S!="object")throw new TypeError("Object expected");(d=s(S.get))&&(c.get=d),(d=s(S.set))&&(c.set=d),(d=s(S.init))&&i.unshift(d)}else(d=s(S))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),m=!0}function cM(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 lM(e){return typeof e=="symbol"?e:"".concat(e)}function dM(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 fM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function pM(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 mM(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 od=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 hM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&od(t,e,r)}function Cl(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 oE(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 yM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(oE(arguments[t]));return e}function gM(){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 ls(e){return this instanceof ls?(this.v=e,this):new ls(e)}function _M(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(p){return function(E){return Promise.resolve(E).then(p,d)}}function o(p,E){n[p]&&(i[p]=function(T){return new Promise(function(S,A){a.push([p,T,S,A])>1||u(p,T)})},E&&(i[p]=E(i[p])))}function u(p,E){try{l(n[p](E))}catch(T){m(a[0][3],T)}}function l(p){p.value instanceof ls?Promise.resolve(p.value.v).then(c,d):m(a[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function m(p,E){p(E),a.shift(),a.length&&u(a[0][0],a[0][1])}}function EM(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:ls(e[i](s)),done:!1}:a?a(s):s}:a}}function vM(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 Cl=="function"?Cl(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 bM(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F4=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},zg=function(e){return zg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},zg(e)};function TM(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=zg(e),n=0;n<r.length;n++)r[n]!=="default"&&od(t,e,r[n]);return F4(t,e),t}function SM(e){return e&&e.__esModule?e:{default:e}}function IM(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 RM(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 wM(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 AM(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 H4=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 OM(e){function t(a){e.error=e.hasError?new H4(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 NM(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 V4={__extends:Mr,__assign:qe,__rest:Rs,__decorate:sM,__param:oM,__esDecorate:uM,__runInitializers:cM,__propKey:lM,__setFunctionName:dM,__metadata:fM,__awaiter:pM,__generator:mM,__createBinding:od,__exportStar:hM,__values:Cl,__read:oE,__spread:yM,__spreadArrays:gM,__spreadArray:er,__await:ls,__asyncGenerator:_M,__asyncDelegator:EM,__asyncValues:vM,__makeTemplateObject:bM,__importStar:TM,__importDefault:SM,__classPrivateFieldGet:IM,__classPrivateFieldSet:RM,__classPrivateFieldIn:wM,__addDisposableResource:AM,__disposeResources:OM,__rewriteRelativeImportExtension:NM},i6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:AM,get __assign(){return qe},__asyncDelegator:EM,__asyncGenerator:_M,__asyncValues:vM,__await:ls,__awaiter:pM,__classPrivateFieldGet:IM,__classPrivateFieldIn:wM,__classPrivateFieldSet:RM,__createBinding:od,__decorate:sM,__disposeResources:OM,__esDecorate:uM,__exportStar:hM,__extends:Mr,__generator:mM,__importDefault:SM,__importStar:TM,__makeTemplateObject:bM,__metadata:fM,__param:oM,__propKey:lM,__read:oE,__rest:Rs,__rewriteRelativeImportExtension:NM,__runInitializers:cM,__setFunctionName:dM,__spread:yM,__spreadArray:er,__spreadArrays:gM,__values:Cl,default:V4},Symbol.toStringTag,{value:"Module"}));function hr(e,t){var r=t&&t.cache?t.cache:K4,n=t&&t.serializer?t.serializer:x4,i=t&&t.strategy?t.strategy:W4;return i(e,{cache:r,serializer:n})}function G4(e){return e==null||typeof e=="number"||typeof e=="boolean"}function z4(e,t,r,n){var i=G4(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function PM(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 CM(e,t,r,n,i){return r.bind(t,e,n,i)}function W4(e,t){var r=e.length===1?z4:PM;return CM(e,this,r,t.cache.create(),t.serializer)}function Y4(e,t){return CM(e,this,PM,t.cache.create(),t.serializer)}var x4=function(){return JSON.stringify(arguments)};function uE(){this.cache=Object.create(null)}uE.prototype.get=function(e){return this.cache[e]};uE.prototype.set=function(e,t){this.cache[e]=t};var K4={create:function(){return new uE}},yr={variadic:Y4};function MM(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 Mt;(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"})(Mt||(Mt={}));var ds;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ds||(ds={}));function tO(e){return e.type===Mt.literal}function X4(e){return e.type===Mt.argument}function DM(e){return e.type===Mt.number}function jM(e){return e.type===Mt.date}function LM(e){return e.type===Mt.time}function $M(e){return e.type===Mt.select}function qM(e){return e.type===Mt.plural}function J4(e){return e.type===Mt.pound}function BM(e){return e.type===Mt.tag}function kM(e){return!!(e&&typeof e=="object"&&e.type===ds.number)}function Wg(e){return!!(e&&typeof e=="object"&&e.type===ds.dateTime)}var UM=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Q4=/(?:[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 Z4(e){var t={};return e.replace(Q4,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 ez=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function tz(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ez).filter(function(m){return m.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 rz(e){return e.replace(/^(.*?)-/,"")}var rO=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,FM=/^(@+)?(\+|#+)?[rs]?$/g,nz=/(\*)(0+)|(#+)(0+)|(0+)/g,HM=/^(0+)$/;function nO(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(FM,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 VM(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 iz(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)),!HM.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function iO(e){var t={},r=VM(e);return r||t}function az(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=rz(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),iO(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),iO(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(nz,function(u,l,c,d,m,p){if(l)t.minimumIntegerDigits=c.length;else{if(d&&m)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(HM.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(rO.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(rO,function(u,l,c,d,m,p){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&p?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+p.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),nO(a)));continue}if(FM.test(i.stem)){t=qe(qe({},t),nO(i.stem));continue}var s=VM(i.stem);s&&(t=qe(qe({},t),s));var o=iz(i.stem);o&&(t=qe(qe({},t),o))}return t}var dl={"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 sz(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=oz(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 oz(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=dl[n||""]||dl[r||""]||dl["".concat(r,"-001")]||dl["001"];return i[0]}var Zy,uz=new RegExp("^".concat(UM.source,"*")),cz=new RegExp("".concat(UM.source,"*$"));function ct(e,t){return{start:e,end:t}}var lz=!!String.prototype.startsWith&&"_a".startsWith("a",1),dz=!!String.fromCodePoint,fz=!!Object.fromEntries,pz=!!String.prototype.codePointAt,mz=!!String.prototype.trimStart,hz=!!String.prototype.trimEnd,yz=!!Number.isSafeInteger,gz=yz?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Yg=!0;try{var _z=zM("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yg=((Zy=_z.exec("a"))===null||Zy===void 0?void 0:Zy[0])==="a"}catch{Yg=!1}var aO=lz?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},xg=dz?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},sO=fz?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},GM=pz?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}},Ez=mz?function(t){return t.trimStart()}:function(t){return t.replace(uz,"")},vz=hz?function(t){return t.trimEnd()}:function(t){return t.replace(cz,"")};function zM(e,t){return new RegExp(e,t)}var Kg;if(Yg){var oO=zM("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Kg=function(t,r){var n;oO.lastIndex=r;var i=oO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Kg=function(t,r){for(var n=[];;){var i=GM(t,r);if(i===void 0||WM(i)||Iz(i))break;n.push(i),r+=i>=65536?2:1}return xg.apply(void 0,n)};var bz=(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:Mt.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&&Xg(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:Mt.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()||!Xg(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:Mt.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()&&Sz(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:Mt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Tz(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 xg.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(),xg(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:Mt.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=Kg(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 m=vz(d.val);if(m.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var p=ct(c,this.clonePosition());l={style:m,styleLocation:p}}var E=this.tryParseArgumentClose(i);if(E.err)return E;var T=ct(i,this.clonePosition());if(l&&aO(l==null?void 0:l.style,"::",0)){var S=Ez(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(S,l.styleLocation);return d.err?d:{val:{type:Mt.number,value:n,location:T,style:d.val},err:null}}else{if(S.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,T);var A=S;this.locale&&(A=sz(S,this.locale));var m={type:ds.dateTime,pattern:A,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Z4(A):{}},f=o==="date"?Mt.date:Mt.time;return{val:{type:f,value:n,location:T,style:m},err:null}}}return{val:{type:o==="number"?Mt.number:o==="date"?Mt.date:Mt.time,value:n,location:T,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(_,qe({},_)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),h=0;if(o!=="select"&&b.value==="offset"){if(!this.bumpIf(":"))return this.error(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,at.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),b=this.parseIdentifierIfPossible(),h=d.val}var I=this.tryParsePluralOrSelectOptions(t,o,r,b);if(I.err)return I;var E=this.tryParseArgumentClose(i);if(E.err)return E;var O=ct(i,this.clonePosition());return o==="select"?{val:{type:Mt.select,value:n,options:sO(I.val),location:O},err:null}:{val:{type:Mt.plural,value:n,options:sO(I.val),offset:h,pluralType:o==="plural"?"cardinal":"ordinal",location:O},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=tz(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:ds.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?az(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 m=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;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 p=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 E=this.parseMessage(t+1,r,n);if(E.err)return E;var T=this.tryParseArgumentClose(p);if(T.err)return T;o.push([l,{value:E.val,location:ct(p,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,gz(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=GM(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(aO(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()&&WM(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 Xg(e){return e>=97&&e<=122||e>=65&&e<=90}function Tz(e){return Xg(e)||e===47}function Sz(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 WM(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Iz(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 Jg(e){e.forEach(function(t){if(delete t.location,$M(t)||qM(t))for(var r in t.options)delete t.options[r].location,Jg(t.options[r].value);else DM(t)&&kM(t.style)||(jM(t)||LM(t))&&Wg(t.style)?delete t.style.location:BM(t)&&Jg(t.children)})}function Rz(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new bz(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||Jg(r.val),r.val}var bn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(bn||(bn={}));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),uO=(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('", "'),'"'),bn.INVALID_VALUE,a)||this}return t})(di),wz=(function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),bn.INVALID_VALUE,i)||this}return t})(di),Az=(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,'"'),bn.MISSING_VALUE,n)||this}return t})(di),mr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(mr||(mr={}));function Oz(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 YM(e){return typeof e=="function"}function _l(e,t,r,n,i,a,s){if(e.length===1&&tO(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(tO(c)){o.push({type:mr.literal,value:c.value});continue}if(J4(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 Az(d,s);var m=i[d];if(X4(c)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?mr.literal:mr.object,value:m});continue}if(jM(c)){var p=typeof c.style=="string"?n.date[c.style]:Wg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(LM(c)){var p=typeof c.style=="string"?n.time[c.style]:Wg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(DM(c)){var p=typeof c.style=="string"?n.number[c.style]:kM(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(m=m*(p.scale||1)),o.push({type:mr.literal,value:r.getNumberFormat(t,p).format(m)});continue}if(BM(c)){var E=c.children,T=c.value,S=i[T];if(!YM(S))throw new wz(T,"function",s);var A=_l(E,t,r,n,i,a),f=S(A.map(function(h){return h.value}));Array.isArray(f)||(f=[f]),o.push.apply(o,f.map(function(h){return{type:typeof h=="string"?mr.literal:mr.object,value:h}}))}if($M(c)){var _=c.options[m]||c.options.other;if(!_)throw new uO(c.value,m,Object.keys(c.options),s);o.push.apply(o,_l(_.value,t,r,n,i));continue}if(qM(c)){var _=c.options["=".concat(m)];if(!_){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(f,_){if(f){if(typeof f=="string")return m(f,_);var b={}.toString.call(f).slice(8,-1);return b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set"?Array.from(f):b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b)?m(f,_):void 0}}function m(f,_){(_==null||_>f.length)&&(_=f.length);for(var b=0,h=Array(_);b<_;b++)h[b]=f[b];return h}function p(f,_){var b=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(b!=null){var h,I,O,P,B=[],z=!0,Y=!1;try{if(O=(b=b.call(f)).next,_!==0)for(;!(z=(h=O.call(b)).done)&&(B.push(h.value),B.length!==_);z=!0);}catch(W){Y=!0,I=W}finally{try{if(!z&&b.return!=null&&(P=b.return(),Object(P)!==P))return}finally{if(Y)throw I}}return B}}function E(f){if(Array.isArray(f))return f}var T={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},S=/^\[([^\]]+)\](?::([0-9]+))?$/;function A(f,_){if((0,r.default)(f),!f||/[\s<>]/.test(f)||f.indexOf("mailto:")===0||(_=(0,o.default)(_,T),_.validate_length&&f.length>_.max_allowed_length)||!_.allow_fragments&&(0,i.default)(f,"#")||!_.allow_query_components&&((0,i.default)(f,"?")||(0,i.default)(f,"&")))return!1;var b,h,I,O,P,B,z,Y;z=f.split("#"),f=z.shift(),z=f.split("?"),f=z.shift();var W=f.match(/^([a-z][a-z0-9+\-.]*):/i),U=!1,F=function(le){return U=!0,b=le.toLowerCase(),_.require_valid_protocol&&_.protocols.indexOf(b)===-1?!1:f.substring(W[0].length)};if(W){var ce=W[1],se=f.substring(W[0].length),ne=se.slice(0,2)==="//";if(ne){if(f=F(ce),f===!1)return!1}else{var X=se.indexOf("/"),x=X===-1?se:se.substring(0,X),L=x.indexOf("@");if(L!==-1){var D=x.substring(0,L),$=/^[a-zA-Z0-9\-_.%:]*$/,V=$.test(D),N=/%[0-9a-fA-F]{2}/.test(D);if(V&&!N){if(_.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}else{var j=/^[0-9]/.test(se);if(j){if(_.require_protocol)return!1}else if(f=F(ce),f===!1)return!1}}}else if(_.require_protocol)return!1;if(f.slice(0,2)==="//"){if(!U&&!_.allow_protocol_relative_urls)return!1;f=f.slice(2)}if(f==="")return!1;if(z=f.split("/"),f=z.shift(),f===""&&!_.require_host)return!0;if(z=f.split("@"),z.length>1){if(_.disallow_auth||z[0]===""||(h=z.shift(),h.indexOf(":")>=0&&h.split(":").length>2))return!1;var Z=h.split(":"),Ee=l(Z,2),_e=Ee[0],Se=Ee[1];if(_e===""&&Se==="")return!1}O=z.join("@"),B=null,Y=null;var Ie=O.match(S);if(Ie?(I="",Y=Ie[1],B=Ie[2]||null):(z=O.split(":"),I=z.shift(),z.length&&(B=z.join(":"))),B!==null&&B.length>0){if(P=parseInt(B,10),!/^[0-9]+$/.test(B)||P<=0||P>65535)return!1}else if(_.require_port)return!1;return _.host_whitelist?(0,n.default)(I,_.host_whitelist):I===""&&!_.require_host?!0:!(!(0,s.default)(I)&&!(0,a.default)(I,_)&&(!Y||!(0,s.default)(Y,6))||(I=I||Y,_.host_blacklist&&(0,n.default)(I,_.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(nl,nl.exports)),nl.exports}var ey={},Hw;function kC(){return Hw||(Hw=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()}`}})(ey)),ey}var Vw;function $G(){if(Vw)return Wr;Vw=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.clearIdentity=Wr.storeIdentity=Wr.getIdentity=Wr.init=void 0;const e=LG(),t=kC(),r=t.SINGLE_SIGN_ON_TARGET,n=500,i=5;let a=0,s="";const o={protocols:["https"],require_protocol:!0};function u(S,A={}){if(!(0,e.default)(S,{...o,...A}))throw new Error(`Invalid url: ${S}`);if(s)throw new Error("Already initialized");const f=document.createElement("iframe");f.id=r,f.src=S,f.style.width="0",f.style.height="0",f.style.border="none",f.style.position="absolute",document.body.appendChild(f),s=S}Wr.init=u;async function l(S){let A;try{A=(await p(await m(),t.Action.GET,{user:S})).identity??null}catch(f){T(f),A=(0,t.localStorageGetIdentity)(S)}return A}Wr.getIdentity=l;async function c(S,A){try{await p(await m(),t.Action.STORE,{user:S,identity:A})}catch(f){T(f),(0,t.localStorageStoreIdentity)(S,A)}}Wr.storeIdentity=c;async function d(S){try{await p(await m(),t.Action.CLEAR,{user:S})}catch(A){T(A),(0,t.localStorageClearIdentity)(S)}}Wr.clearIdentity=d;async function m(){if(!s)throw new Error("Not initialized");for(let S=0;S<i;S++){const A=document.getElementById(r),f=A==null?void 0:A.contentWindow;if(!f){await E(n);continue}try{await p(f,t.Action.PING,{},n)}catch{continue}return f}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function p(S,A,f,_=0){a++;const b=a;let h=null;const I=new Promise((O,P)=>{h=({data:B})=>{!B||B.target!==t.SINGLE_SIGN_ON_TARGET||B.id!==b||(B.error?P(new Error(B.error)):O(B))},window.addEventListener("message",h)});S.postMessage((0,t.createMessage)({id:b,action:A,...f}),s);try{return await(_?Promise.race([I,new Promise((O,P)=>setTimeout(()=>P(new Error("Did not receive a response in time")),_))]):I)}catch(O){throw O}finally{h&&window.removeEventListener("message",h)}}function E(S){return new Promise(A=>setTimeout(A,S))}function T(S){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",S.message)}return Wr}var Gw;function qG(){return Gw||(Gw=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($G(),e),r(kC(),e)})(xi)),xi}var Hg=qG();function BG(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?vn.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?vn.STAGING:t.endsWith(".io")||t.endsWith(".zone")?vn.DEVELOPMENT:null}function kG(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(FC(n))return n}return null}var zw={},vn;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(vn||(vn={}));function UC(){return Object.values(vn)}function FC(e){return UC().includes(e)}function ll(e){if(FC(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${UC().map(t=>`"${t}"`).join(", ")}.`)}function UG(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?ll(t):r?ll(r):n?ll(n):i?ll(i):vn.PRODUCTION}function FG(e){if(typeof window<"u"){const r=kG(window.location);if(r)return r;const n=BG(window.location);if(n)return n}return UG(typeof e>"u"&&typeof ml=="object"&&typeof zw=="object"?zw:e)}function HG(e,t){const r=FG(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 VG="development",GG="80002",zG="https://marketplace-api.decentraland.zone",WG="https://marketplace-api.decentraland.zone",YG="/auth",xG="https://rpc.decentraland.org/amoy",KG="https://credits.decentraland.zone",XG="https://builder-api.decentraland.zone",JG="https://peer.decentraland.zone",QG="",ZG="",e3="",t3="",r3={ENVIRONMENT:VG,CHAIN_ID:GG,MARKETPLACE_SERVER_URL:zG,NFT_API_URL:WG,AUTH_URL:YG,RPC_URL:xG,CREDITS_SERVER_URL:KG,BUILDER_SERVER_URL:XG,PEER_URL:JG,SHOP_SERVER_URL:QG,STRIPE_PUBLISHABLE_KEY:ZG,SEGMENT_WRITE_KEY:e3,SENTRY_DSN:t3},n3="staging",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="production",_3="137",E3="https://marketplace-api.decentraland.org",v3="https://marketplace-api.decentraland.org",b3="/auth",T3="https://rpc.decentraland.org/polygon",S3="https://credits.decentraland.org",I3="https://builder-api.decentraland.org",R3="https://peer.decentraland.org",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={},Nr=HG({[vn.DEVELOPMENT]:r3,[vn.STAGING]:y3,[vn.PRODUCTION]:P3},{systemEnvVariables:{VITE_DCL_DEFAULT_ENV:"dev"}}),or=C3,Dt={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"}`},M3=744*60;async function HC(){return(await xt(async()=>{const{connection:e}=await import("./index-GW5HS0_4.js").then(t=>t.i);return{connection:e}},__vite__mapDeps([7,1]))).connection}async function D3(e){if(!e.account)throw new Error("No account returned by the wallet");const t=e.account.toLowerCase(),r=new MD(e.provider),n=r.getSigner();let i=Hg.localStorageGetIdentity(t);if(!i){const a=DD.createRandom();i=await PG.Authenticator.initializeAuthChain(t,{address:a.address,publicKey:jE(a.publicKey),privateKey:jE(a.privateKey)},M3,s=>n.signMessage(s)),Hg.localStorageStoreIdentity(t,i)}return{address:t,chainId:e.chainId,signer:n,web3Provider:r,identity:i,providerType:e.providerType}}function j3(){const e=encodeURIComponent(window.location.href);window.location.replace(`${Dt.authUrl}/login?redirectTo=${e}`)}async function L3(){try{const t=await(await HC()).tryPreviousConnection();return!t.account||!Hg.localStorageGetIdentity(t.account.toLowerCase())?null:await D3(t)}catch{return null}}async function $3(){try{await(await HC()).disconnect()}catch{}}const q3=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`s-${String(performance.now())}`,B3=Dt.chainId===80002?"amoy":"polygon",k3=Dt.chainId===80002?"dev":"prod";function VC(){return window.analytics}function U3(){let e=null;try{e=Ss.getState().session}catch{e=null}return{address:(e==null?void 0:e.address)??null,is_signed_in:!!e,session_id:q3,network:B3,app_env:k3}}function ci(e,t={}){const r={...U3(),...t},n=VC();n&&n.track(e,r)}function F3(e,t={}){const r=VC();r&&r.identify(e.toLowerCase(),t)}function H3(e){ci("Shop Viewed Page",{page:e})}function Ww(e){return e===Hn.ProviderType.MAGIC||e===Hn.ProviderType.MAGIC_TEST?"magic":"wallet"}function V3(e){const t=`shop:seen:${e.toLowerCase()}`;try{return localStorage.getItem(t)?!1:(localStorage.setItem(t,"1"),!0)}catch{return!1}}function Do(e){return Math.round(e*10)/100}function nE(e){return!e.tokenId}function QW(e){return{item_id:e.itemId??null,contract_address:e.contractAddress,token_id:e.tokenId??null,trade_id:e.tradeId??null,price_credits:e.priceCredits,price_usd:Do(e.priceCredits),rarity:e.rarity,creator:e.creator||null,is_primary:nE(e)}}function ZW(e){const t=e.reduce((n,i)=>n+i.priceCredits,0),r=e.some(nE);return{items:e.map(n=>({item_id:n.itemId??null,contract_address:n.contractAddress,token_id:n.tokenId??null,price_usd:Do(n.priceCredits)})),value_credits:t,value_usd:Do(t),purchase_type:r?"item":"nft_resale",is_primary:r}}function G3(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 e6(e){return G3(e)==="user_rejected"}function z3(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 Yw=!1;function W3(){if(Yw)return;Yw=!0;const e=Dt.segmentWriteKey;e&&z3(e)}let Vg=null;function Y3(e){Vg=e}function xw(e,t={}){const r=typeof t.flow=="string"?`error in ${t.flow}`:"error";if(console.error(`[shop] ${r}`,e,t),Vg)try{Vg(e,t)}catch{}}const x3=/0x[a-fA-F0-9]{130}\b/g,K3=/0x[a-fA-F0-9]{64}\b/g,X3=/(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,J3=/(signature|private|identity|authchain|auth_chain|ephemeral|token|secret|password|cookie|authorization)/i;function xs(e){return e.replace(x3,"<signature>").replace(X3,"<secret>").replace(K3,"<hex32>")}function Q3(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(J3.test(i)){delete n[i];continue}typeof n[i]=="string"&&(n[i]=xs(n[i]))}};return t(e.tags),t(e.extra),e}let Kw=!1;function Z3(){if(Kw)return;const e=Dt.sentryDsn;if(!e)return;Kw=!0,Hk({dsn:e,environment:Dt.sentryEnvironment,release:Dt.sentryRelease,integrations:[new NB],tracesSampleRate:.01,sendDefaultPii:!1,ignoreErrors:[/user rejected/i,/user denied/i,"ResizeObserver loop limit exceeded"],beforeSend:Q3});const t=e4();t&&QL({id:t}),Y3((r,n)=>E_(r,{extra:n}))}function e4(){var e;try{return((e=Ss.getState().session)==null?void 0:e.address)??null}catch{return null}}const ty="shop:signing_in",Ss=Ts(e=>({session:null,connecting:!1,error:null,signIn:()=>{try{sessionStorage.setItem(ty,"1")}catch{}j3()},disconnect:async()=>{ci("Shop Signed Out");try{await $3()}catch(t){xw(t,{flow:"wallet",step:"disconnect"})}e({session:null})},restore:async()=>{let t;try{t=await L3()}catch(n){xw(n,{flow:"wallet",step:"restore"});return}if(!t)return;e({session:t}),F3(t.address,{sign_in_method:Ww(t.providerType)});let r=!1;try{r=sessionStorage.getItem(ty)==="1",r&&sessionStorage.removeItem(ty)}catch{}r&&ci("Shop Signed In",{method:Ww(t.providerType),is_new_user:V3(t.address)})}})),t4=Dt.peerUrl;function iE(e){return Dl({queryKey:["profile",e],enabled:!!e,staleTime:5*6e4,queryFn:async()=>{var n;const t=await fetch(`${t4}/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 Mn={},ry={},Xw;function GC(){return Xw||(Xw=1,Object.defineProperty(ry,"__esModule",{value:!0})),ry}var Dn={},fn={},La={},Ki={},Jw={},Ks,Qw;function nn(){if(Qw)return Ks;Qw=1;var e=function(t){return t&&t.Math===Math&&t};return Ks=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ng=="object"&&ng)||e(typeof Ks=="object"&&Ks)||(function(){return this})()||Function("return this")(),Ks}var ny,Zw;function Ra(){return Zw||(Zw=1,ny=function(e){try{return!!e()}catch{return!0}}),ny}var iy,eA;function id(){if(eA)return iy;eA=1;var e=Ra();return iy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),iy}var ay,tA;function r4(){if(tA)return ay;tA=1;var e=id(),t=Function.prototype,r=t.apply,n=t.call;return ay=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),ay}var sy,rA;function Is(){if(rA)return sy;rA=1;var e=id(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return sy=e?n:function(i){return function(){return r.apply(i,arguments)}},sy}var oy,nA;function zC(){if(nA)return oy;nA=1;var e=Is(),t=e({}.toString),r=e("".slice);return oy=function(n){return r(t(n),8,-1)},oy}var uy,iA;function WC(){if(iA)return uy;iA=1;var e=zC(),t=Is();return uy=function(r){if(e(r)==="Function")return t(r)},uy}var cy,aA;function wa(){if(aA)return cy;aA=1;var e=typeof document=="object"&&document.all;return cy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},cy}var ly={},dy,sA;function eu(){if(sA)return dy;sA=1;var e=Ra();return dy=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),dy}var fy,oA;function aE(){if(oA)return fy;oA=1;var e=id(),t=Function.prototype.call;return fy=e?t.bind(t):function(){return t.apply(t,arguments)},fy}var py={},uA;function n4(){if(uA)return py;uA=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return py.f=r?function(i){var a=t(this,i);return!!a&&a.enumerable}:e,py}var my,cA;function YC(){return cA||(cA=1,my=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),my}var hy,lA;function i4(){if(lA)return hy;lA=1;var e=Is(),t=Ra(),r=zC(),n=Object,i=e("".split);return hy=t(function(){return!n("z").propertyIsEnumerable(0)})?function(a){return r(a)==="String"?i(a,""):n(a)}:n,hy}var yy,dA;function xC(){return dA||(dA=1,yy=function(e){return e==null}),yy}var gy,fA;function KC(){if(fA)return gy;fA=1;var e=xC(),t=TypeError;return gy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},gy}var _y,pA;function a4(){if(pA)return _y;pA=1;var e=i4(),t=KC();return _y=function(r){return e(t(r))},_y}var Ey,mA;function ad(){if(mA)return Ey;mA=1;var e=wa();return Ey=function(t){return typeof t=="object"?t!==null:e(t)},Ey}var vy,hA;function XC(){return hA||(hA=1,vy={}),vy}var by,yA;function s4(){if(yA)return by;yA=1;var e=XC(),t=nn(),r=wa(),n=function(i){return r(i)?i:void 0};return by=function(i,a){return arguments.length<2?n(e[i])||n(t[i]):e[i]&&e[i][a]||t[i]&&t[i][a]},by}var Ty,gA;function o4(){if(gA)return Ty;gA=1;var e=Is();return Ty=e({}.isPrototypeOf),Ty}var Sy,_A;function u4(){if(_A)return Sy;_A=1;var e=nn(),t=e.navigator,r=t&&t.userAgent;return Sy=r?String(r):"",Sy}var Iy,EA;function c4(){if(EA)return Iy;EA=1;var e=nn(),t=u4(),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]))),Iy=o,Iy}var Ry,vA;function JC(){if(vA)return Ry;vA=1;var e=c4(),t=Ra(),r=nn(),n=r.String;return Ry=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ry}var wy,bA;function QC(){if(bA)return wy;bA=1;var e=JC();return wy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wy}var Ay,TA;function ZC(){if(TA)return Ay;TA=1;var e=s4(),t=wa(),r=o4(),n=QC(),i=Object;return Ay=n?function(a){return typeof a=="symbol"}:function(a){var s=e("Symbol");return t(s)&&r(s.prototype,i(a))},Ay}var Oy,SA;function l4(){if(SA)return Oy;SA=1;var e=String;return Oy=function(t){try{return e(t)}catch{return"Object"}},Oy}var Ny,IA;function eM(){if(IA)return Ny;IA=1;var e=wa(),t=l4(),r=TypeError;return Ny=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Ny}var Py,RA;function d4(){if(RA)return Py;RA=1;var e=eM(),t=xC();return Py=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Py}var Cy,wA;function f4(){if(wA)return Cy;wA=1;var e=aE(),t=wa(),r=ad(),n=TypeError;return Cy=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")},Cy}var My={exports:{}},Dy,AA;function p4(){return AA||(AA=1,Dy=!0),Dy}var jy,OA;function m4(){if(OA)return jy;OA=1;var e=nn(),t=Object.defineProperty;return jy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},jy}var NA;function h4(){if(NA)return My.exports;NA=1;var e=p4(),t=nn(),r=m4(),n="__core-js_shared__",i=My.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"}),My.exports}var Ly,PA;function y4(){if(PA)return Ly;PA=1;var e=h4();return Ly=function(t,r){return e[t]||(e[t]=r||{})},Ly}var $y,CA;function g4(){if(CA)return $y;CA=1;var e=KC(),t=Object;return $y=function(r){return t(e(r))},$y}var qy,MA;function sE(){if(MA)return qy;MA=1;var e=Is(),t=g4(),r=e({}.hasOwnProperty);return qy=Object.hasOwn||function(i,a){return r(t(i),a)},qy}var By,DA;function _4(){if(DA)return By;DA=1;var e=Is(),t=0,r=Math.random(),n=e(1.1.toString);return By=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},By}var ky,jA;function E4(){if(jA)return ky;jA=1;var e=nn(),t=y4(),r=sE(),n=_4(),i=JC(),a=QC(),s=e.Symbol,o=t("wks"),u=a?s.for||s:s&&s.withoutSetter||n;return ky=function(l){return r(o,l)||(o[l]=i&&r(s,l)?s[l]:u("Symbol."+l)),o[l]},ky}var Uy,LA;function v4(){if(LA)return Uy;LA=1;var e=aE(),t=ad(),r=ZC(),n=d4(),i=f4(),a=E4(),s=TypeError,o=a("toPrimitive");return Uy=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)},Uy}var Fy,$A;function tM(){if($A)return Fy;$A=1;var e=v4(),t=ZC();return Fy=function(r){var n=e(r,"string");return t(n)?n:n+""},Fy}var Hy,qA;function b4(){if(qA)return Hy;qA=1;var e=nn(),t=ad(),r=e.document,n=t(r)&&t(r.createElement);return Hy=function(i){return n?r.createElement(i):{}},Hy}var Vy,BA;function rM(){if(BA)return Vy;BA=1;var e=eu(),t=Ra(),r=b4();return Vy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Vy}var kA;function T4(){if(kA)return ly;kA=1;var e=eu(),t=aE(),r=n4(),n=YC(),i=a4(),a=tM(),s=sE(),o=rM(),u=Object.getOwnPropertyDescriptor;return ly.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])},ly}var Gy,UA;function S4(){if(UA)return Gy;UA=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 Gy=n,Gy}var zy,FA;function I4(){if(FA)return zy;FA=1;var e=WC(),t=eM(),r=id(),n=e(e.bind);return zy=function(i,a){return t(i),a===void 0?i:r?n(i,a):function(){return i.apply(a,arguments)}},zy}var Wy={},Yy,HA;function R4(){if(HA)return Yy;HA=1;var e=eu(),t=Ra();return Yy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Yy}var xy,VA;function w4(){if(VA)return xy;VA=1;var e=ad(),t=String,r=TypeError;return xy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},xy}var GA;function A4(){if(GA)return Wy;GA=1;var e=eu(),t=rM(),r=R4(),n=w4(),i=tM(),a=TypeError,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Wy.f=e?r?function(m,p,E){if(n(m),p=i(p),n(E),typeof m=="function"&&p==="prototype"&&"value"in E&&c in E&&!E[c]){var T=o(m,p);T&&T[c]&&(m[p]=E.value,E={configurable:l in E?E[l]:T[l],enumerable:u in E?E[u]:T[u],writable:!1})}return s(m,p,E)}:s:function(m,p,E){if(n(m),p=i(p),n(E),t)try{return s(m,p,E)}catch{}if("get"in E||"set"in E)throw new a("Accessors not supported");return"value"in E&&(m[p]=E.value),m},Wy}var Ky,zA;function O4(){if(zA)return Ky;zA=1;var e=eu(),t=A4(),r=YC();return Ky=e?function(n,i,a){return t.f(n,i,r(1,a))}:function(n,i,a){return n[i]=a,n},Ky}var Xy,WA;function N4(){if(WA)return Xy;WA=1;var e=nn(),t=r4(),r=WC(),n=wa(),i=T4().f,a=S4(),s=XC(),o=I4(),u=O4(),l=sE(),c=function(d){var m=function(p,E,T){if(this instanceof m){switch(arguments.length){case 0:return new d;case 1:return new d(p);case 2:return new d(p,E)}return new d(p,E,T)}return t(d,this,arguments)};return m.prototype=d.prototype,m};return Xy=function(d,m){var p=d.target,E=d.global,T=d.stat,S=d.proto,A=E?e:T?e[p]:e[p]&&e[p].prototype,f=E?s:s[p]||u(s,p,{})[p],_=f.prototype,b,h,I,O,P,B,z,Y,W;for(O in m)b=a(E?O:p+(T?".":"#")+O,d.forced),h=!b&&A&&l(A,O),B=f[O],h&&(d.dontCallGetSet?(W=i(A,O),z=W&&W.value):z=A[O]),P=h&&z?z:m[O],!(!b&&!S&&typeof B==typeof P)&&(d.bind&&h?Y=o(P,e):d.wrap&&h?Y=c(P):S&&n(P)?Y=r(P):Y=P,(d.sham||P&&P.sham||B&&B.sham)&&u(Y,"sham",!0),u(f,O,Y),S&&(I=p+"Prototype",l(s,I)||u(s,I,{}),u(s[I],O,P),d.real&&_&&(b||!_[O])&&u(_,O,P)))},Xy}var YA;function P4(){if(YA)return Jw;YA=1;var e=N4(),t=nn();return e({global:!0,forced:t.globalThis!==t},{globalThis:t}),Jw}var Jy,xA;function C4(){return xA||(xA=1,P4(),Jy=nn()),Jy}var Qy,KA;function M4(){if(KA)return Qy;KA=1;var e=C4();return Qy=e,Qy}var XA;function nM(){if(XA)return Ki;XA=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(M4());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 JA;function iM(){if(JA)return La;JA=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=qC(),r=nM(),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,m,p,E){var T,S,A=new u(E),f=String(Date.now()),_=JSON.stringify(p),b=[d,m,f,_].join(":").toLowerCase(),h=0,I=t.Authenticator.signPayload(c,b);try{for(var O=e(I),P=O.next();!P.done;P=O.next()){var B=P.value;A.set(n+h,JSON.stringify(B)),h++}}catch(z){T={error:z}}finally{try{P&&!P.done&&(S=O.return)&&S.call(O)}finally{if(T)throw T.error}}return A.set(i,f),A.set(a,_),A}}return La.default=s,La}var QA;function aM(){if(QA)return fn;QA=1;var e=fn&&fn.__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=fn&&fn.__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=fn&&fn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(fn,"__esModule",{value:!0});var n=r(iM()),i=nM();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(m,p){if(p&&p.identity){var E=p.identity,T=p.metadata,S=t(p,["identity","metadata"]);if(typeof m=="string"||m instanceof u||globalThis.URL&&m instanceof globalThis.URL){var A=typeof m=="string"?new u(m):m,f=new l(A.toString(),e(e({},S),{headers:o(E,p.method||"GET",A.pathname,T||{},S==null?void 0:S.headers)}));return c(f)}var _=new u(m.url),b=new l(m),h=o(E,m.method||"GET",_.pathname,T||{});return h.forEach(function(I,O){b.headers.set(O,I)}),c(b)}return c(m,p)}}return fn.default=a,fn}var ZA;function D4(){return ZA||(ZA=1,(function(e){var t=Dn&&Dn.__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=Dn&&Dn.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&t(o,s,u)},n=Dn&&Dn.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.signedHeaderFactory=e.signedFetchFactory=void 0,r(GC(),e);var i=aM();Object.defineProperty(e,"signedFetchFactory",{enumerable:!0,get:function(){return n(i).default}});var a=iM();Object.defineProperty(e,"signedHeaderFactory",{enumerable:!0,get:function(){return n(a).default}})})(Dn)),Dn}var eO;function j4(){return eO||(eO=1,(function(e){var t=Mn&&Mn.__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=Mn&&Mn.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,a,o)},n=Mn&&Mn.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),r(GC(),e),r(D4(),e);var i=n(aM());e.default=(0,i.default)()})(Mn)),Mn}var L4=j4();const sd=MO(L4);async function $4(e,t){const r=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/credits`,n=await sd(r,{method:"GET",identity:t,metadata:{}});if(!n.ok)throw new Error(`getUserCredits ${n.status}: ${await n.text()}`);return n.json()}async function q4(e,t){const{usd:r}=await $4(e,t);return r??{balanceCents:0,credits:0}}async function t6(e,t,r){const n=`${Dt.creditsServerUrl}/credits/authorize`,i=await sd(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 r6(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=`${Dt.creditsServerUrl}/users/${e.toLowerCase()}/purchases${i?`?${i}`:""}`,s=await sd(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 n6(e,t){if(t.length===0)return 0;const r=`${Dt.creditsServerUrl}/credits/authorize/cancel`,n=await sd(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 i6(e,t=1e3){const r=await fetch(`${Dt.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 B4(e){return Dl({queryKey:["usd-balance",e==null?void 0:e.address],enabled:!!e,staleTime:3e4,queryFn:async()=>q4(e.address,e.identity)})}const k4=e=>Do(e.reduce((t,r)=>t+r.priceCredits,0)),Kr=Ts((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:Do(r.priceCredits),is_primary:!r.tokenId,source:n,cart_size:a.length,cart_value_usd:k4(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})})),cs={name:"credits",nameSingular:"credit",symbol:"◈",iconClass:"ico-credits"};function a6(e){return`${e} ${e===1?cs.nameSingular:cs.name}`}function kn({className:e}){return Q.jsx("span",{className:`ico ${cs.iconClass}${e?` ${e}`:""}`,"aria-hidden":!0})}function U4(){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:Q.jsxs("div",{className:"cart-pop",ref:i,role:"dialog","aria-label":"Cart",children:[Q.jsxs("div",{className:"cart-pop__head",children:[Q.jsx("span",{className:"ico ico-cart","aria-hidden":!0})," Added to cart"]}),Q.jsx("div",{className:"cart-pop__list",children:e.slice(-4).map(s=>Q.jsxs("div",{className:"cart-pop__row",children:[Q.jsx("div",{className:"cart-pop__thumb",children:s.thumbnail?Q.jsx("img",{src:s.thumbnail,alt:s.name}):null}),Q.jsx("div",{className:"cart-pop__name",title:s.name,children:s.name}),Q.jsxs("div",{className:"cart-pop__price",children:[Q.jsx(kn,{className:"ccy-mark"})," ",s.priceCredits]})]},s.id))}),Q.jsxs("div",{className:"cart-pop__foot",children:[Q.jsxs("span",{className:"cart-pop__total",children:[e.length," item",e.length>1?"s":""," · ",Q.jsxs("strong",{children:[Q.jsx(kn,{className:"ccy-mark"})," ",a]})]}),Q.jsxs("div",{className:"cart-pop__actions",children:[Q.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>n(!0),children:"Try on"}),Q.jsx(vl,{className:"btn btn--purple btn--sm",to:"/cart",onClick:()=>r(!1),children:"Checkout"})]})]})]})}var Gg=function(e,t){return Gg=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])},Gg(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");Gg(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 Rs(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 sM(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 oM(e,t){return function(r,n){t(r,n,e)}}function uM(e,t,r,n,i,a){function s(A){if(A!==void 0&&typeof A!="function")throw new TypeError("Function expected");return A}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,m=!1,p=r.length-1;p>=0;p--){var E={};for(var T in n)E[T]=T==="access"?{}:n[T];for(var T in n.access)E.access[T]=n.access[T];E.addInitializer=function(A){if(m)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(A||null))};var S=(0,r[p])(o==="accessor"?{get:c.get,set:c.set}:c[u],E);if(o==="accessor"){if(S===void 0)continue;if(S===null||typeof S!="object")throw new TypeError("Object expected");(d=s(S.get))&&(c.get=d),(d=s(S.set))&&(c.set=d),(d=s(S.init))&&i.unshift(d)}else(d=s(S))&&(o==="field"?i.unshift(d):c[u]=d)}l&&Object.defineProperty(l,n.name,c),m=!0}function cM(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 lM(e){return typeof e=="symbol"?e:"".concat(e)}function dM(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 fM(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function pM(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 mM(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 od=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 hM(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&od(t,e,r)}function Cl(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 oE(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 yM(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(oE(arguments[t]));return e}function gM(){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 ls(e){return this instanceof ls?(this.v=e,this):new ls(e)}function _M(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(p){return function(E){return Promise.resolve(E).then(p,d)}}function o(p,E){n[p]&&(i[p]=function(T){return new Promise(function(S,A){a.push([p,T,S,A])>1||u(p,T)})},E&&(i[p]=E(i[p])))}function u(p,E){try{l(n[p](E))}catch(T){m(a[0][3],T)}}function l(p){p.value instanceof ls?Promise.resolve(p.value.v).then(c,d):m(a[0][2],p)}function c(p){u("next",p)}function d(p){u("throw",p)}function m(p,E){p(E),a.shift(),a.length&&u(a[0][0],a[0][1])}}function EM(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:ls(e[i](s)),done:!1}:a?a(s):s}:a}}function vM(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 Cl=="function"?Cl(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 bM(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F4=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},zg=function(e){return zg=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},zg(e)};function TM(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=zg(e),n=0;n<r.length;n++)r[n]!=="default"&&od(t,e,r[n]);return F4(t,e),t}function SM(e){return e&&e.__esModule?e:{default:e}}function IM(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 RM(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 wM(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 AM(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 H4=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 OM(e){function t(a){e.error=e.hasError?new H4(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 NM(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 V4={__extends:Mr,__assign:qe,__rest:Rs,__decorate:sM,__param:oM,__esDecorate:uM,__runInitializers:cM,__propKey:lM,__setFunctionName:dM,__metadata:fM,__awaiter:pM,__generator:mM,__createBinding:od,__exportStar:hM,__values:Cl,__read:oE,__spread:yM,__spreadArrays:gM,__spreadArray:er,__await:ls,__asyncGenerator:_M,__asyncDelegator:EM,__asyncValues:vM,__makeTemplateObject:bM,__importStar:TM,__importDefault:SM,__classPrivateFieldGet:IM,__classPrivateFieldSet:RM,__classPrivateFieldIn:wM,__addDisposableResource:AM,__disposeResources:OM,__rewriteRelativeImportExtension:NM},s6=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:AM,get __assign(){return qe},__asyncDelegator:EM,__asyncGenerator:_M,__asyncValues:vM,__await:ls,__awaiter:pM,__classPrivateFieldGet:IM,__classPrivateFieldIn:wM,__classPrivateFieldSet:RM,__createBinding:od,__decorate:sM,__disposeResources:OM,__esDecorate:uM,__exportStar:hM,__extends:Mr,__generator:mM,__importDefault:SM,__importStar:TM,__makeTemplateObject:bM,__metadata:fM,__param:oM,__propKey:lM,__read:oE,__rest:Rs,__rewriteRelativeImportExtension:NM,__runInitializers:cM,__setFunctionName:dM,__spread:yM,__spreadArray:er,__spreadArrays:gM,__values:Cl,default:V4},Symbol.toStringTag,{value:"Module"}));function hr(e,t){var r=t&&t.cache?t.cache:K4,n=t&&t.serializer?t.serializer:x4,i=t&&t.strategy?t.strategy:W4;return i(e,{cache:r,serializer:n})}function G4(e){return e==null||typeof e=="number"||typeof e=="boolean"}function z4(e,t,r,n){var i=G4(n)?n:r(n),a=t.get(i);return typeof a>"u"&&(a=e.call(this,n),t.set(i,a)),a}function PM(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 CM(e,t,r,n,i){return r.bind(t,e,n,i)}function W4(e,t){var r=e.length===1?z4:PM;return CM(e,this,r,t.cache.create(),t.serializer)}function Y4(e,t){return CM(e,this,PM,t.cache.create(),t.serializer)}var x4=function(){return JSON.stringify(arguments)};function uE(){this.cache=Object.create(null)}uE.prototype.get=function(e){return this.cache[e]};uE.prototype.set=function(e,t){this.cache[e]=t};var K4={create:function(){return new uE}},yr={variadic:Y4};function MM(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 Mt;(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"})(Mt||(Mt={}));var ds;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ds||(ds={}));function tO(e){return e.type===Mt.literal}function X4(e){return e.type===Mt.argument}function DM(e){return e.type===Mt.number}function jM(e){return e.type===Mt.date}function LM(e){return e.type===Mt.time}function $M(e){return e.type===Mt.select}function qM(e){return e.type===Mt.plural}function J4(e){return e.type===Mt.pound}function BM(e){return e.type===Mt.tag}function kM(e){return!!(e&&typeof e=="object"&&e.type===ds.number)}function Wg(e){return!!(e&&typeof e=="object"&&e.type===ds.dateTime)}var UM=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Q4=/(?:[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 Z4(e){var t={};return e.replace(Q4,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 ez=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function tz(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ez).filter(function(m){return m.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 rz(e){return e.replace(/^(.*?)-/,"")}var rO=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,FM=/^(@+)?(\+|#+)?[rs]?$/g,nz=/(\*)(0+)|(#+)(0+)|(0+)/g,HM=/^(0+)$/;function nO(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(FM,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 VM(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 iz(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)),!HM.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function iO(e){var t={},r=VM(e);return r||t}function az(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=rz(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),iO(l))},{}));continue;case"engineering":t=qe(qe(qe({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return qe(qe({},u),iO(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(nz,function(u,l,c,d,m,p){if(l)t.minimumIntegerDigits=c.length;else{if(d&&m)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(HM.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(rO.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(rO,function(u,l,c,d,m,p){return c==="*"?t.minimumFractionDigits=l.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&p?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+p.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),nO(a)));continue}if(FM.test(i.stem)){t=qe(qe({},t),nO(i.stem));continue}var s=VM(i.stem);s&&(t=qe(qe({},t),s));var o=iz(i.stem);o&&(t=qe(qe({},t),o))}return t}var dl={"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 sz(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=oz(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 oz(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=dl[n||""]||dl[r||""]||dl["".concat(r,"-001")]||dl["001"];return i[0]}var Zy,uz=new RegExp("^".concat(UM.source,"*")),cz=new RegExp("".concat(UM.source,"*$"));function ct(e,t){return{start:e,end:t}}var lz=!!String.prototype.startsWith&&"_a".startsWith("a",1),dz=!!String.fromCodePoint,fz=!!Object.fromEntries,pz=!!String.prototype.codePointAt,mz=!!String.prototype.trimStart,hz=!!String.prototype.trimEnd,yz=!!Number.isSafeInteger,gz=yz?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Yg=!0;try{var _z=zM("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yg=((Zy=_z.exec("a"))===null||Zy===void 0?void 0:Zy[0])==="a"}catch{Yg=!1}var aO=lz?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},xg=dz?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},sO=fz?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},GM=pz?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}},Ez=mz?function(t){return t.trimStart()}:function(t){return t.replace(uz,"")},vz=hz?function(t){return t.trimEnd()}:function(t){return t.replace(cz,"")};function zM(e,t){return new RegExp(e,t)}var Kg;if(Yg){var oO=zM("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Kg=function(t,r){var n;oO.lastIndex=r;var i=oO.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Kg=function(t,r){for(var n=[];;){var i=GM(t,r);if(i===void 0||WM(i)||Iz(i))break;n.push(i),r+=i>=65536?2:1}return xg.apply(void 0,n)};var bz=(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:Mt.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&&Xg(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:Mt.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()||!Xg(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:Mt.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()&&Sz(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:Mt.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Tz(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 xg.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(),xg(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:Mt.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=Kg(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 m=vz(d.val);if(m.length===0)return this.error(at.EXPECT_ARGUMENT_STYLE,ct(this.clonePosition(),this.clonePosition()));var p=ct(c,this.clonePosition());l={style:m,styleLocation:p}}var E=this.tryParseArgumentClose(i);if(E.err)return E;var T=ct(i,this.clonePosition());if(l&&aO(l==null?void 0:l.style,"::",0)){var S=Ez(l.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(S,l.styleLocation);return d.err?d:{val:{type:Mt.number,value:n,location:T,style:d.val},err:null}}else{if(S.length===0)return this.error(at.EXPECT_DATE_TIME_SKELETON,T);var A=S;this.locale&&(A=sz(S,this.locale));var m={type:ds.dateTime,pattern:A,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Z4(A):{}},f=o==="date"?Mt.date:Mt.time;return{val:{type:f,value:n,location:T,style:m},err:null}}}return{val:{type:o==="number"?Mt.number:o==="date"?Mt.date:Mt.time,value:n,location:T,style:(a=l==null?void 0:l.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(at.EXPECT_SELECT_ARGUMENT_OPTIONS,ct(_,qe({},_)));this.bumpSpace();var b=this.parseIdentifierIfPossible(),h=0;if(o!=="select"&&b.value==="offset"){if(!this.bumpIf(":"))return this.error(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,at.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),b=this.parseIdentifierIfPossible(),h=d.val}var I=this.tryParsePluralOrSelectOptions(t,o,r,b);if(I.err)return I;var E=this.tryParseArgumentClose(i);if(E.err)return E;var O=ct(i,this.clonePosition());return o==="select"?{val:{type:Mt.select,value:n,options:sO(I.val),location:O},err:null}:{val:{type:Mt.plural,value:n,options:sO(I.val),offset:h,pluralType:o==="plural"?"cardinal":"ordinal",location:O},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=tz(t)}catch{return this.error(at.INVALID_NUMBER_SKELETON,r)}return{val:{type:ds.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?az(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 m=this.tryParseDecimalInteger(at.EXPECT_PLURAL_ARGUMENT_SELECTOR,at.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;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 p=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 E=this.parseMessage(t+1,r,n);if(E.err)return E;var T=this.tryParseArgumentClose(p);if(T.err)return T;o.push([l,{value:E.val,location:ct(p,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,gz(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=GM(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(aO(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()&&WM(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 Xg(e){return e>=97&&e<=122||e>=65&&e<=90}function Tz(e){return Xg(e)||e===47}function Sz(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 WM(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Iz(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 Jg(e){e.forEach(function(t){if(delete t.location,$M(t)||qM(t))for(var r in t.options)delete t.options[r].location,Jg(t.options[r].value);else DM(t)&&kM(t.style)||(jM(t)||LM(t))&&Wg(t.style)?delete t.style.location:BM(t)&&Jg(t.children)})}function Rz(e,t){t===void 0&&(t={}),t=qe({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new bz(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||Jg(r.val),r.val}var bn;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(bn||(bn={}));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),uO=(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('", "'),'"'),bn.INVALID_VALUE,a)||this}return t})(di),wz=(function(e){Mr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),bn.INVALID_VALUE,i)||this}return t})(di),Az=(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,'"'),bn.MISSING_VALUE,n)||this}return t})(di),mr;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(mr||(mr={}));function Oz(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 YM(e){return typeof e=="function"}function _l(e,t,r,n,i,a,s){if(e.length===1&&tO(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(tO(c)){o.push({type:mr.literal,value:c.value});continue}if(J4(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 Az(d,s);var m=i[d];if(X4(c)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),o.push({type:typeof m=="string"?mr.literal:mr.object,value:m});continue}if(jM(c)){var p=typeof c.style=="string"?n.date[c.style]:Wg(c.style)?c.style.parsedOptions:void 0;o.push({type:mr.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(LM(c)){var p=typeof c.style=="string"?n.time[c.style]:Wg(c.style)?c.style.parsedOptions:n.time.medium;o.push({type:mr.literal,value:r.getDateTimeFormat(t,p).format(m)});continue}if(DM(c)){var p=typeof c.style=="string"?n.number[c.style]:kM(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(m=m*(p.scale||1)),o.push({type:mr.literal,value:r.getNumberFormat(t,p).format(m)});continue}if(BM(c)){var E=c.children,T=c.value,S=i[T];if(!YM(S))throw new wz(T,"function",s);var A=_l(E,t,r,n,i,a),f=S(A.map(function(h){return h.value}));Array.isArray(f)||(f=[f]),o.push.apply(o,f.map(function(h){return{type:typeof h=="string"?mr.literal:mr.object,value:h}}))}if($M(c)){var _=c.options[m]||c.options.other;if(!_)throw new uO(c.value,m,Object.keys(c.options),s);o.push.apply(o,_l(_.value,t,r,n,i));continue}if(qM(c)){var _=c.options["=".concat(m)];if(!_){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
  `,bn.MISSING_INTL_API,s);var b=r.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));_=c.options[b]||c.options.other}if(!_)throw new uO(c.value,m,Object.keys(c.options),s);o.push.apply(o,_l(_.value,t,r,n,i,m-(c.offset||0)));continue}}return Oz(o)}function Nz(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 Pz(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Nz(e[n],t[n]),r},qe({},e)):e}function eg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Cz(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:eg(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:eg(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:eg(e.pluralRules),strategy:yr.variadic})}}var xM=(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,m){return!d.length||m.type!==mr.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return _l(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=Rs(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=Pz(e.formats,n),this.formatters=i&&i.formatters||Cz(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=Rz,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 tu=(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
  `,bn.MISSING_INTL_API));try{return Jz(e,t,i).format(r,n)}catch(s){e.onError(new qr("Error formatting relative time.",e.locale,s))}return String(r)}var Zz=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function ZM(e,t,r){var n=e.locale,i=e.formats,a=e.onError;r===void 0&&(r={});var s=r.format,o=s&&cE(i,"number",s,a)||{},u=Aa(r,Zz,o);return t(n,u)}function e8(e,t,r,n){n===void 0&&(n={});try{return ZM(e,t,n).format(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return String(r)}function t8(e,t,r,n){n===void 0&&(n={});try{return ZM(e,t,n).formatToParts(r)}catch(i){e.onError(new qr("Error formatting number.",e.locale,i))}return[]}function r8(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function n8(e){e.onWarn&&e.defaultRichTextElements&&r8(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 i8(e,t){var r=qz(t),n=qe(qe({},KM),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new cO('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 cO('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 Dz('"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"),n8(n),qe(qe({},n),{formatters:r,formatNumber:e8.bind(null,n,r.getNumberFormat),formatNumberToParts:t8.bind(null,n,r.getNumberFormat),formatRelativeTime:Qz.bind(null,n,r.getRelativeTimeFormat),formatDate:Bz.bind(null,n,r.getDateTimeFormat),formatDateToParts:Fz.bind(null,n,r.getDateTimeFormat),formatTime:kz.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:Uz.bind(null,n,r.getDateTimeFormat),formatTimeToParts:Hz.bind(null,n,r.getDateTimeFormat),formatPlural:Kz.bind(null,n,r.getPluralRules),formatMessage:Qg.bind(null,n,r),$t:Qg.bind(null,n,r),formatList:Yz.bind(null,n,r.getListFormat),formatListToParts:QM.bind(null,n,r.getListFormat),formatDisplayName:Gz.bind(null,n,r.getDisplayNames)})}function a8(e){MM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var s8=qe(qe({},KM),{textComponent:De.Fragment});function o8(e){return function(t){return e(De.Children.toArray(t))}}var lE=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=De.createContext(null)):De.createContext(null);lE.Consumer;var u8=lE.Provider,c8=u8,l8=lE;function eD(){var e=De.useContext(l8);return a8(e),e}var Zg;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Zg||(Zg={}));var e_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(e_||(e_={}));function tD(e){var t=function(r){var n=eD(),i=r.value,a=r.children,s=Rs(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=e_[e],t}function ru(e){var t=function(r){var n=eD(),i=r.value,a=r.children,s=Rs(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=Zg[e],t}function rD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=YM(n)?o8(n):n,t},{})}var pO=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=rD(n),o=Qg.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?De.Children.toArray(o):o},d8=function(e,t){var r=e.defaultRichTextElements,n=Rs(e,["defaultRichTextElements"]),i=rD(r),a=i8(qe(qe(qe({},s8),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:pO.bind(null,s,a.formatters),$t:pO.bind(null,s,a.formatters)})};ru("formatDate");ru("formatTime");ru("formatNumber");ru("formatList");ru("formatDisplayName");tD("formatDate");tD("formatTime");const f8={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"},p8={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"},m8={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},h8={nav:f8,notFound:p8,cart:m8},y8={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"},g8={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},_8={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},E8={nav:y8,notFound:g8,cart:_8},El=["en","es"];function t_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?t_(i,a,r):r[a]=String(i)}return r}const v8={en:t_(h8),es:t_(E8)},b8=XM(),rg={};function dE(e){return rg[e]||(rg[e]=d8({locale:e,defaultLocale:"en",messages:v8[e],onError:()=>{}},b8)),rg[e]}let nD=dE("en");function T8(e){nD=dE(e)}function Yr(e,t){return nD.formatMessage({id:e},t)}function S8(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Ss(),a=e==null?void 0:e.address,{data:s,isLoading:o}=iE(a),{data:u}=B4(e),l=Kr(S=>S.items.length),c=Ml(),[d,m]=De.useState(""),p=De.useRef();De.useEffect(()=>{i()},[i]);function E(S){c(S.trim()?`/assets?q=${encodeURIComponent(S.trim())}`:"/assets",{replace:!0})}function T(S){m(S),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>E(S),300)}return Q.jsxs(Q.Fragment,{children:[Q.jsx(Xk,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),Q.jsxs("div",{className:"subnav",children:[Q.jsxs("nav",{className:"subnav__tabs",children:[Q.jsx(xn,{to:"/overview",children:Yr("nav.overview")}),Q.jsx(xn,{to:"/assets",children:Yr("nav.collectibles")}),Q.jsx(xn,{to:"/market",children:Yr("nav.market")}),Q.jsx(xn,{to:"/my-assets",children:Yr("nav.myAssets")}),Q.jsx(xn,{to:"/my-favorites",children:Yr("nav.myFavorites")}),e?Q.jsx(xn,{to:"/my-purchases",children:Yr("nav.myPurchases")}):null]}),Q.jsxs("div",{className:"subnav__search",children:[Q.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),Q.jsx("input",{value:d,"aria-label":Yr("nav.searchAria"),placeholder:Yr("nav.searchPlaceholder"),onChange:S=>T(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(p.current&&clearTimeout(p.current),E(d))}})]}),e?Q.jsxs("span",{className:"subnav__balance",title:Yr("nav.yourBalance",{currency:cs.name}),children:[Q.jsx(kn,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,Q.jsxs(xn,{to:"/credits",className:"subnav__credits",children:[Q.jsx(kn,{className:"subnav__credits-ico"}),Yr("nav.getCredits",{currency:cs.name})]}),Q.jsxs("div",{className:"subnav__cart-wrap",children:[Q.jsxs(xn,{to:"/cart",className:"subnav__cart","aria-label":Yr("nav.cart"),children:[Q.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?Q.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),Q.jsx(U4,{})]})]})]})}let I8=0;const Io=Ts(e=>({toasts:[],push:t=>{const r=++I8;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),a6={success:e=>Io.getState().push({message:e,kind:"success"}),error:e=>Io.getState().push({message:e,kind:"error"}),info:e=>Io.getState().push({message:e,kind:"info"})},R8={success:"✓",error:"!",info:"i"};function w8({t:e}){const t=Io(r=>r.dismiss);return De.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),Q.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[Q.jsx("span",{className:"toast__icon","aria-hidden":!0,children:R8[e.kind]}),Q.jsx("span",{className:"toast__msg",children:e.message})]})}function A8(){const e=Io(t=>t.toasts);return e.length===0?null:Q.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>Q.jsx(w8,{t},t.id))})}const O8=De.lazy(()=>xt(()=>import("./index-CENUxZfv.js"),__vite__mapDeps([8,1,9,6,3,4,10,11])).then(e=>({default:e.WearablePreview})));function fE(e){return Q.jsx(De.Suspense,{fallback:null,children:Q.jsx(O8,{...e})})}function N8(e){return e.itemId?`urn:decentraland:${Dt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function ua(e){return e.category!=="emote"}function fs(e){return ua(e)?e.wearableCategory??`unknown:${e.id}`:null}const P8=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function C8(e){if(!ua(e))return"item";const t=e.wearableCategory;return t?P8.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function mO(e){const t=new Set,r=new Set;for(const n of e){const i=fs(n);i==null||r.has(i)||(r.add(i),t.add(n.id))}return t}function M8(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=fs(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&fs(a)===i&&n.delete(a.id);return n.add(t.id),n}function D8(e){const t=new Map;for(const n of e){const i=fs(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 j8(e,t){const r=[];for(const n of e){if(!t.has(n.id)||!ua(n))continue;const i=N8(n);i&&r.push(i)}return r}function hO(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function L8(){const e=Kr(_=>_.fittingOpen),t=Kr(_=>_.setFittingOpen),r=Kr(_=>_.items),n=Kr(_=>_.remove),i=Ml(),a=Ss(_=>{var b;return(b=_.session)==null?void 0:b.address}),{data:s,isFetched:o}=iE(a),u=!a||o,l=a&&s?a:"default",[c,d]=De.useState(()=>mO(r)),[m,p]=De.useState(!1);De.useEffect(()=>{e&&d(mO(r))},[e]),De.useEffect(()=>{const _=new Set(r.map(b=>b.id));d(b=>{const h=new Set([...b].filter(I=>_.has(I)));return h.size===b.size?b:h})},[r]);const E=De.useMemo(()=>D8(r),[r]),T=De.useMemo(()=>j8(r,c),[r,c]),S=r.reduce((_,b)=>_+b.priceCredits,0),A=T.join(",");De.useEffect(()=>{p(!1)},[A,l]);const f=De.useRef(!1);return De.useEffect(()=>{if(!e){f.current=!1;return}f.current||(f.current=!0,ci("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(ua).length,emotes:r.filter(_=>!ua(_)).length,cart_value_credits:S}))},[e,r,S]),De.useEffect(()=>{if(!e)return;const _=b=>{b.key==="Escape"&&t(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[e,t]),!e||r.length===0?null:Q.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[Q.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),Q.jsxs("div",{className:"fitting__panel",children:[Q.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),Q.jsx("div",{className:"fitting__stage",children:u?T.length>0?Q.jsxs(Q.Fragment,{children:[Q.jsx(fE,{profile:l,urns:T,type:Hn.PreviewType.AVATAR,emote:Hn.PreviewEmote.FASHION,background:"ecebed",disableFadeEffect:!0,dev:Dt.chainId===80002,onLoad:()=>p(!0)},l),m?null:Q.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:Q.jsx("span",{className:"fitting__spinner"})})]}):Q.jsxs("div",{className:"fitting__empty-stage",children:[Q.jsx("p",{children:"Nothing on right now."}),Q.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):Q.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:Q.jsx("span",{className:"fitting__spinner"})})}),Q.jsxs("div",{className:"fitting__side",children:[Q.jsxs("div",{className:"fitting__head",children:[Q.jsx("h2",{className:"fitting__title",children:"Fitting room"}),Q.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),Q.jsx("div",{className:"fitting__items",children:r.map(_=>{const b=ua(_),h=c.has(_.id),I=E.has(_.id);return Q.jsxs("div",{className:`fitting-row${h?" is-on":""}`,children:[Q.jsxs("label",{className:"fitting-row__toggle",children:[Q.jsx("input",{type:"checkbox",checked:h,disabled:!b,onChange:()=>d(O=>M8(O,_,r))}),Q.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),Q.jsx("div",{className:"fitting-row__thumb",children:_.thumbnail?Q.jsx("img",{src:_.thumbnail,alt:_.name}):null}),Q.jsxs("div",{className:"fitting-row__info",children:[Q.jsx("div",{className:"fitting-row__name",title:_.name,children:_.name}),Q.jsxs("div",{className:"fitting-row__meta",children:[Q.jsx("span",{className:`ico ico-slot-${b?C8(_):"item"} fitting-row__slot-ico`,title:b?hO(fs(_)):"Emote",role:"img","aria-label":b?hO(fs(_)):"Emote"}),I?Q.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null]})]}),Q.jsxs("div",{className:"fitting-row__price",children:[Q.jsx(kn,{className:"fitting-row__diamond"}),_.priceCredits]}),Q.jsx("button",{className:"fitting-row__remove",onClick:()=>n(_.id),"aria-label":`Remove ${_.name} from cart`,title:"Remove",children:Q.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},_.id)})}),Q.jsxs("div",{className:"fitting__foot",children:[Q.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",Q.jsxs("strong",{children:[cs.symbol," ",S]})]}),Q.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const iD="shop:locale";function $8(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&El.includes(t))return t;const r=localStorage.getItem(iD);if(r&&El.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&El.includes(n))return n}catch{}return"en"}const r_=Ts(e=>({locale:$8(),setLocale:t=>{try{localStorage.setItem(iD,t)}catch{}e({locale:t})}})),q8=De.lazy(()=>xt(()=>import("./ShopFooterInner-gDzKrctg.js"),__vite__mapDeps([12,1,4,5,10,3,6])));function B8(){const e=r_(r=>r.locale),t=r_(r=>r.setLocale);return Q.jsx("div",{className:"shop-footer",children:Q.jsx(De.Suspense,{fallback:null,children:Q.jsx(q8,{locale:e,onChange:r=>{El.includes(r)&&t(r)}})})})}function k8(){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?Q.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:Q.jsx(fE,{id:"preview-warmer",profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function U8(){const e=Ss(t=>t.session);De.useEffect(()=>{if(!e||e.providerType!==Hn.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 pE=`${Dt.nftApiUrl}/v1`;function aD(e){if(!e)return 0;try{return Math.ceil(Number(jO(e))*10)}catch{return 0}}function s6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function o6(e){const{listings:t}=await cd({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 F8(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${pE}/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 sD(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 cd(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(`${Dt.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 u6(e,t){const{listings:r}=await cd({contractAddress:e,itemId:t,first:1});return r[0]?sD(r[0]):null}async function H8({first:e=100,...t}={}){const{listings:r,total:n}=await cd({...t,first:e});return{items:r.map(sD),total:n}}function V8(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??Dt.chainId,createdAt:e.createdAt??0}}async function c6({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(`${Dt.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(V8),total:i.total??a.length}}async function l6(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(`${pE}/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,m,p,E;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)??((p=(m=l.nft.data)==null?void 0:m.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?aD(l.order.price):void 0,tradeId:(E=l.order)==null?void 0:E.tradeId}}),total:o}}const G8="dcl:marketplace";async function d6(e,t){const{TradeService:r}=await xt(async()=>{const{TradeService:i}=await import("./TradeService-CV6tm-S-.js");return{TradeService:i}},__vite__mapDeps([13,6,1,14,2,7]));return new r(G8,Dt.marketplaceServerUrl,()=>t).addTrade(e)}async function oD(e){const t=await fetch(`${Dt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function z8(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${pE}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function f6(e){var u,l;let t;try{t=await oD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=aD(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)===Hn.TradeAssetType.COLLECTION_ITEM){const c=await z8(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 F8(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 p6(e,t){var i;const{listings:r}=await cd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?oD(n):null}const W8={};function Y8(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const s=u=>u===null?null:JSON.parse(u,void 0),o=(a=r.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const jo=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return jo(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return jo(n)(r)}}}},x8=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,A)=>({...A,...S}),...t},s=!1;const o=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...S)},n,i);const c=jo(a.serialize),d=()=>{const S=a.partialize({...n()});let A;const f=c({state:S,version:a.version}).then(_=>l.setItem(a.name,_)).catch(_=>{A=_});if(A)throw A;return f},m=i.setState;i.setState=(S,A)=>{m(S,A),d()};const p=e((...S)=>{r(...S),d()},n,i);let E;const T=()=>{var S;if(!l)return;s=!1,o.forEach(f=>f(n()));const A=((S=a.onRehydrateStorage)==null?void 0:S.call(a,n()))||void 0;return jo(l.getItem.bind(l))(a.name).then(f=>{if(f)return a.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return a.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var _;return E=a.merge(f,(_=n())!=null?_:p),r(E,!0),d()}).then(()=>{A==null||A(E,void 0),s=!0,u.forEach(f=>f(E))}).catch(f=>{A==null||A(void 0,f)})};return i.persist={setOptions:S=>{a={...a,...S},S.getStorage&&(l=S.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:S=>(o.add(S),()=>{o.delete(S)}),onFinishHydration:S=>(u.add(S),()=>{u.delete(S)})},T(),E||p},K8=(e,t)=>(r,n,i)=>{let a={storage:Y8(()=>localStorage),partialize:T=>T,version:0,merge:(T,S)=>({...S,...T}),...t},s=!1;const o=new Set,u=new Set;let l=a.storage;if(!l)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...T)},n,i);const c=()=>{const T=a.partialize({...n()});return l.setItem(a.name,{state:T,version:a.version})},d=i.setState;i.setState=(T,S)=>{d(T,S),c()};const m=e((...T)=>{r(...T),c()},n,i);i.getInitialState=()=>m;let p;const E=()=>{var T,S;if(!l)return;s=!1,o.forEach(f=>{var _;return f((_=n())!=null?_:m)});const A=((S=a.onRehydrateStorage)==null?void 0:S.call(a,(T=n())!=null?T:m))||void 0;return jo(l.getItem.bind(l))(a.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return[!0,a.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var _;const[b,h]=f;if(p=a.merge(h,(_=n())!=null?_:m),r(p,!0),b)return c()}).then(()=>{A==null||A(p,void 0),p=n(),s=!0,u.forEach(f=>f(p))}).catch(f=>{A==null||A(void 0,f)})};return i.persist={setOptions:T=>{a={...a,...T},T.storage&&(l=T.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>E(),hasHydrated:()=>s,onHydrate:T=>(o.add(T),()=>{o.delete(T)}),onFinishHydration:T=>(u.add(T),()=>{u.delete(T)})},a.skipHydration||E(),p||m},X8=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((W8?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),x8(e,t)):K8(e,t),J8=X8,yO=Ts()(J8(e=>({items:{},toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],{items:n}})}),{name:"shop-favorites"}));function Q8(e,t){return!t||!e.creator?!1:nE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function m6(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function Z8(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function eW({address:e,className:t,linkToProfile:r}){var u,l;const n=Ml(),{data:i}=iE(e);if(!e)return null;const a=(i==null?void 0:i.name)||Z8(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=Q.jsxs(Q.Fragment,{children:[s?Q.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):Q.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),Q.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?Q.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):Q.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}function gO(e){if(!e)return"#a09ba8";try{return Hn.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function tW(e){const t=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 rW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function nW(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 pl(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function iW(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 _O(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function aW({endsAt:e,className:t}){const[r,n]=De.useState(()=>pl(e));De.useEffect(()=>{if(n(pl(e)),e==null)return;let a;const s=()=>{const u=pl(e);n(u);const l=_O(u);l>0&&(a=setTimeout(s,l))},o=_O(pl(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=iW(r);return i?Q.jsxs("span",{className:t??"sale-countdown",children:[Q.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}const sW=120,oW=250;function uW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function mE(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(z=>z.add),c=Kr(z=>z.items.some(Y=>Y.id===t.id)),d=Ss(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),m=Q8(t,d),p=yO(z=>z.toggle),E=yO(z=>!!z.items[t.id]),T=Ml(),S=!!t.contractAddress&&!!t.itemId,A=t.tokenId??t.itemId,f=!r&&!!t.contractAddress&&!!A;function _(){f&&T(`/item/${t.contractAddress}/${A}`,{state:{item:t,tradeId:t.tradeId}})}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),sW)}function h(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function I(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),oW)}const O=uW(t.gender),P=!r&&rW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),B=P?nW(t.compareAtCredits,t.priceCredits):0;return Q.jsxs("article",{className:`card${n?" card--hover":""}`,style:f?{cursor:"pointer"}:void 0,onMouseEnter:b,onMouseLeave:h,onClick:_,role:f?"link":void 0,tabIndex:f?0:void 0,onKeyDown:f?z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),_())}:void 0,children:[Q.jsxs("div",{className:"card__media",children:[P?Q.jsxs("span",{className:"card__sale-badge",children:["SALE",B>0?` -${B}%`:""]}):null,Q.jsx("button",{className:`card__fav${E?" is-on":""}`,onClick:z=>{z.stopPropagation(),p(t)},"aria-label":E?"Remove from favorites":"Add to favorites",children:Q.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?Q.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&S?Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:Q.jsx(fE,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:Hn.PreviewType.AVATAR,emote:t.category==="emote"?void 0:Hn.PreviewEmote.FASHION,dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:I})}),Q.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:Q.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),Q.jsxs("div",{className:"card__body",children:[Q.jsxs("div",{className:"card__desc",children:[Q.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?Q.jsx(eW,{address:t.creator,className:"card__creator",linkToProfile:!0}):Q.jsx("div",{className:"card__creator",children:" "})]}),n?r&&e.mode==="market"?Q.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):Q.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),m||l(t,"grid")},disabled:c||m,children:[m?null:Q.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),m?"Your item":c?"In cart":"Add to cart"]}):Q.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?Q.jsxs("div",{className:"card__price card__price--market",children:[Q.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),Q.jsx(kn,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,Q.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?Q.jsxs("div",{className:"card__price card__price--sale",children:[Q.jsxs("span",{className:"card__price-now",children:[Q.jsx(kn,{className:"card__diamond"}),t.priceCredits]}),Q.jsxs("span",{className:"card__price-was",children:[Q.jsx(kn,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),Q.jsx(aW,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):Q.jsxs("div",{className:"card__price",children:[Q.jsx(kn,{className:"card__diamond"}),t.priceCredits]}),Q.jsxs("div",{className:"card__chips",children:[Q.jsx("span",{className:"chip chip--rarity",style:{background:gO(t.rarity),color:tW(gO(t.rarity))},children:t.rarity}),t.category==="wearable"?Q.jsx("span",{className:"chip chip--icon",children:Q.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,O?Q.jsx("span",{className:"chip chip--icon",children:O}):null]})]})]})]})}function cW(e){if(!e)return 0;try{return Math.ceil(Number(jO(e))*10)}catch{return 0}}function lW(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 uD(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:cW(e.price??e.minPrice),gender:lW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function h6(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(uD);return{items:o,total:s??r+o.length}}async function dW(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(uD);return{items:o,total:s??r+o.length}}const cD="shop:followed-creators:v1",fW=200;function pW(){try{const e=localStorage.getItem(cD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function EO(e){try{localStorage.setItem(cD,JSON.stringify(e))}catch{}}const mW=Ts((e,t)=>({followed:pW(),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,fW);EO(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);EO(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)})),hW=8,yW=8,gW=12;function _W(){const t=mW(i=>i.followed).slice(0,hW),{data:r=[],isLoading:n}=Dl({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>dW(a,{first:yW}).then(s=>s.items).catch(()=>[])));return EW(i).filter(a=>a.priceCredits>0).slice(0,gW)}});return t.length===0||!n&&r.length===0?null:Q.jsxs("section",{className:"row",children:[Q.jsx("div",{className:"row__head",children:Q.jsx("h2",{className:"row__title",children:"From creators you follow"})}),Q.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>Q.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>Q.jsx(mE,{item:i},i.id))})]})}function EW(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 lD="shop:recently-viewed",dD=12;function fD(){try{const e=localStorage.getItem(lD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,dD):[]}catch{return[]}}function y6(e){if(e!=null&&e.id)try{const t=[e,...fD().filter(r=>r.id!==e.id)].slice(0,dD);localStorage.setItem(lD,JSON.stringify(t))}catch{}}function vW({excludeId:e}){const t=De.useMemo(()=>fD().filter(r=>r.id!==e),[e]);return t.length===0?null:Q.jsxs("section",{className:"row",children:[Q.jsx("div",{className:"row__head",children:Q.jsx("h2",{className:"row__title",children:"Recently viewed"})}),Q.jsx("div",{className:"row__track",children:t.map(r=>Q.jsx(mE,{item:r},r.id))})]})}function vO({title:e,items:t,loading:r}){return Q.jsxs("section",{className:"row",children:[Q.jsxs("div",{className:"row__head",children:[Q.jsx("h2",{className:"row__title",children:e}),Q.jsxs(vl,{className:"row__viewall",to:"/assets",children:["View all ",Q.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),Q.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>Q.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>Q.jsx(mE,{item:n},n.id))})]})}function bW(){const{data:e,isLoading:t}=Dl({queryKey:["overview-listings"],queryFn:()=>H8({first:24})}),r=(e==null?void 0:e.items)??[];return Q.jsxs("div",{className:"overview",children:[Q.jsx("section",{className:"hero",children:Q.jsxs("div",{className:"hero__inner",children:[Q.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),Q.jsx(vl,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),Q.jsx(_W,{}),Q.jsx(vW,{}),t||r.length>0?Q.jsxs(Q.Fragment,{children:[Q.jsx(vO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?Q.jsx(vO,{title:"New Creations",items:r.slice(6,18),loading:!1}):null]}):Q.jsxs("div",{className:"overview__empty",children:[Q.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),Q.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),Q.jsx(vl,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const TW={"/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"},SW=De.lazy(()=>xt(()=>import("./Assets-uXzVK3Qk.js"),__vite__mapDeps([15,1,16,17,18,6])).then(e=>({default:e.Assets}))),IW=De.lazy(()=>xt(()=>import("./Market-r9wggpqR.js"),__vite__mapDeps([19,1,20,14,6,16,17,21,22,18])).then(e=>({default:e.Market}))),RW=De.lazy(()=>xt(()=>import("./ItemDetail-Ck5cudTI.js"),__vite__mapDeps([23,1,21,14,6,22,24])).then(e=>({default:e.ItemDetail}))),wW=De.lazy(()=>xt(()=>import("./Collection-HISXJvQ9.js"),__vite__mapDeps([25,1,26,27,16,17,18,6])).then(e=>({default:e.Collection}))),AW=De.lazy(()=>xt(()=>import("./Creator-DckKaL-1.js"),__vite__mapDeps([28,1,26,27,16,17,18,6])).then(e=>({default:e.Creator}))),OW=De.lazy(()=>xt(()=>import("./MyAssets-DbjlwVgI.js"),__vite__mapDeps([29,1,30,21,14,6,20,31,17,18,32])).then(e=>({default:e.MyAssets}))),NW=De.lazy(()=>xt(()=>import("./MyFavorites-CUJsTl4U.js"),__vite__mapDeps([33,1,17,6])).then(e=>({default:e.MyFavorites}))),PW=De.lazy(()=>xt(()=>import("./MyPurchases-D231IumZ.js"),__vite__mapDeps([34,1,17,18,6])).then(e=>({default:e.MyPurchases}))),CW=De.lazy(()=>xt(()=>import("./ImportListings-3PSkCxI9.js"),__vite__mapDeps([35,1,30,21,14,6,20,31,36])).then(e=>({default:e.ImportListings}))),MW=De.lazy(()=>xt(()=>import("./Cart-B_feHFWP.js"),__vite__mapDeps([37,1,21,14,6,22])).then(e=>({default:e.Cart}))),DW=De.lazy(()=>xt(()=>import("./GetCredits-DqKwryal.js"),__vite__mapDeps([38,1,11,4,6])).then(e=>({default:e.GetCredits}))),jW=De.lazy(()=>xt(()=>import("./Success-vyQPaFjH.js"),__vite__mapDeps([39,1,31,6])).then(e=>({default:e.Success}))),LW=De.lazy(()=>xt(()=>import("./NotFound-MYCYhimC.js"),__vite__mapDeps([40,1,6])).then(e=>({default:e.NotFound})));function $W(){return Q.jsx("div",{className:"page-loading","aria-busy":"true",children:Q.jsx("span",{className:"spinner","aria-hidden":!0})})}function qW(){return Q.jsxs("div",{className:"overview__empty",children:[Q.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),Q.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),Q.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function BW(){U8();const e=AD();return De.useEffect(()=>{W3()},[]),De.useEffect(()=>{const t=e.pathname,r=TW[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");H3(r)},[e.pathname]),Q.jsxs(Q.Fragment,{children:[Q.jsx(A8,{}),Q.jsx(k8,{}),Q.jsx(L8,{}),Q.jsx(S8,{}),Q.jsx("main",{className:"page",children:Q.jsx(Nl,{fallback:Q.jsx(qW,{}),children:Q.jsx(De.Suspense,{fallback:Q.jsx($W,{}),children:Q.jsxs(OD,{children:[Q.jsx(dr,{path:"/",element:Q.jsx(ND,{to:"/overview",replace:!0})}),Q.jsx(dr,{path:"/overview",element:Q.jsx(bW,{})}),Q.jsx(dr,{path:"/assets",element:Q.jsx(SW,{})}),Q.jsx(dr,{path:"/market",element:Q.jsx(IW,{})}),Q.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:Q.jsx(RW,{})}),Q.jsx(dr,{path:"/collection/:contractAddress",element:Q.jsx(wW,{})}),Q.jsx(dr,{path:"/creator/:address",element:Q.jsx(AW,{})}),Q.jsx(dr,{path:"/my-assets",element:Q.jsx(OW,{})}),Q.jsx(dr,{path:"/my-favorites",element:Q.jsx(NW,{})}),Q.jsx(dr,{path:"/my-purchases",element:Q.jsx(PW,{})}),Q.jsx(dr,{path:"/import",element:Q.jsx(CW,{})}),Q.jsx(dr,{path:"/cart",element:Q.jsx(MW,{})}),Q.jsx(dr,{path:"/credits",element:Q.jsx(DW,{})}),Q.jsx(dr,{path:"/success",element:Q.jsx(jW,{})}),Q.jsx(dr,{path:"*",element:Q.jsx(LW,{})})]})})})}),Q.jsx(Nl,{fallback:Q.jsx(Q.Fragment,{}),children:Q.jsx(B8,{})})]})}function kW({children:e}){const t=r_(r=>r.locale);return T8(t),Q.jsx(c8,{value:dE(t),children:e},t)}Z3();const UW=new ij({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});PD.createRoot(document.getElementById("root")).render(Q.jsx(DO.StrictMode,{children:Q.jsx(sj,{client:UW,children:Q.jsx(kW,{children:Q.jsx(CD,{children:Q.jsx(BW,{})})})})}));export{aW as $,mE as A,H8 as B,eW as C,Hn as D,Zr as E,d0 as F,mW as G,dW as H,a6 as I,N8 as J,n6 as K,c6 as L,WW as M,zW as N,gj as O,GW as P,JD as Q,sd as R,r6 as S,iE as T,XW as U,y6 as V,fE as W,rW as X,Q8 as Y,nW as Z,xt as _,Ss as a,u6 as a0,l6 as a1,o6 as a2,HG as a3,vn as a4,en as a5,KF as a6,L4 as a7,Qo as a8,W_ as a9,SH as aa,uH as ab,i6 as ac,L_ as ad,LP as ae,$P as af,e6 as b,Dl as c,kn as d,f6 as e,h6 as f,oD as g,Dt as h,Kr as i,B4 as j,aj as k,cs as l,ci as m,Do as n,p6 as o,d6 as p,m6 as q,ZW as r,JW as s,Yr as t,yO as u,QW as v,xw as w,G3 as x,t6 as y,s6 as z};
95
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function i8(e,t){var r=qz(t),n=qe(qe({},KM),e),i=n.locale,a=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new cO('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 cO('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 Dz('"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"),n8(n),qe(qe({},n),{formatters:r,formatNumber:e8.bind(null,n,r.getNumberFormat),formatNumberToParts:t8.bind(null,n,r.getNumberFormat),formatRelativeTime:Qz.bind(null,n,r.getRelativeTimeFormat),formatDate:Bz.bind(null,n,r.getDateTimeFormat),formatDateToParts:Fz.bind(null,n,r.getDateTimeFormat),formatTime:kz.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:Uz.bind(null,n,r.getDateTimeFormat),formatTimeToParts:Hz.bind(null,n,r.getDateTimeFormat),formatPlural:Kz.bind(null,n,r.getPluralRules),formatMessage:Qg.bind(null,n,r),$t:Qg.bind(null,n,r),formatList:Yz.bind(null,n,r.getListFormat),formatListToParts:QM.bind(null,n,r.getListFormat),formatDisplayName:Gz.bind(null,n,r.getDisplayNames)})}function a8(e){MM(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var s8=qe(qe({},KM),{textComponent:De.Fragment});function o8(e){return function(t){return e(De.Children.toArray(t))}}var lE=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=De.createContext(null)):De.createContext(null);lE.Consumer;var u8=lE.Provider,c8=u8,l8=lE;function eD(){var e=De.useContext(l8);return a8(e),e}var Zg;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Zg||(Zg={}));var e_;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(e_||(e_={}));function tD(e){var t=function(r){var n=eD(),i=r.value,a=r.children,s=Rs(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=e_[e],t}function ru(e){var t=function(r){var n=eD(),i=r.value,a=r.children,s=Rs(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=Zg[e],t}function rD(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=YM(n)?o8(n):n,t},{})}var pO=function(e,t,r,n){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=rD(n),o=Qg.apply(void 0,er([e,t,r,s],i,!1));return Array.isArray(o)?De.Children.toArray(o):o},d8=function(e,t){var r=e.defaultRichTextElements,n=Rs(e,["defaultRichTextElements"]),i=rD(r),a=i8(qe(qe(qe({},s8),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:pO.bind(null,s,a.formatters),$t:pO.bind(null,s,a.formatters)})};ru("formatDate");ru("formatTime");ru("formatNumber");ru("formatList");ru("formatDisplayName");tD("formatDate");tD("formatTime");const f8={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"},p8={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"},m8={empty:{title:"Your cart is empty",body:"Find something you love and it’ll show up here.",cta:"Browse Collectibles"}},h8={nav:f8,notFound:p8,cart:m8},y8={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"},g8={title:"Página no encontrada",body:"La página que buscás no está acá. Volvamos a la tienda.",cta:"Ver coleccionables"},_8={empty:{title:"Tu carrito está vacío",body:"Encontrá algo que te guste y va a aparecer acá.",cta:"Ver coleccionables"}},E8={nav:y8,notFound:g8,cart:_8},El=["en","es"];function t_(e,t="",r={}){for(const[n,i]of Object.entries(e)){const a=t?`${t}.${n}`:n;i&&typeof i=="object"&&!Array.isArray(i)?t_(i,a,r):r[a]=String(i)}return r}const v8={en:t_(h8),es:t_(E8)},b8=XM(),rg={};function dE(e){return rg[e]||(rg[e]=d8({locale:e,defaultLocale:"en",messages:v8[e],onError:()=>{}},b8)),rg[e]}let nD=dE("en");function T8(e){nD=dE(e)}function Yr(e,t){return nD.formatMessage({id:e},t)}function S8(){const{session:e,connecting:t,signIn:r,disconnect:n,restore:i}=Ss(),a=e==null?void 0:e.address,{data:s,isLoading:o}=iE(a),{data:u}=B4(e),l=Kr(S=>S.items.length),c=Ml(),[d,m]=De.useState(""),p=De.useRef();De.useEffect(()=>{i()},[i]);function E(S){c(S.trim()?`/assets?q=${encodeURIComponent(S.trim())}`:"/assets",{replace:!0})}function T(S){m(S),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>E(S),300)}return Q.jsxs(Q.Fragment,{children:[Q.jsx(Xk,{activePage:"shop",isSignedIn:!!e,isSigningIn:t,isLoadingProfile:!!e&&o,address:a,avatar:s,onClickSignIn:()=>r(),onClickSignOut:()=>void n()}),Q.jsxs("div",{className:"subnav",children:[Q.jsxs("nav",{className:"subnav__tabs",children:[Q.jsx(xn,{to:"/overview",children:Yr("nav.overview")}),Q.jsx(xn,{to:"/assets",children:Yr("nav.collectibles")}),Q.jsx(xn,{to:"/market",children:Yr("nav.market")}),Q.jsx(xn,{to:"/my-assets",children:Yr("nav.myAssets")}),Q.jsx(xn,{to:"/my-favorites",children:Yr("nav.myFavorites")}),e?Q.jsx(xn,{to:"/my-purchases",children:Yr("nav.myPurchases")}):null]}),Q.jsxs("div",{className:"subnav__search",children:[Q.jsx("span",{className:"ico ico-search subnav__search-ico","aria-hidden":!0}),Q.jsx("input",{value:d,"aria-label":Yr("nav.searchAria"),placeholder:Yr("nav.searchPlaceholder"),onChange:S=>T(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(p.current&&clearTimeout(p.current),E(d))}})]}),e?Q.jsxs("span",{className:"subnav__balance",title:Yr("nav.yourBalance",{currency:cs.name}),children:[Q.jsx(kn,{className:"subnav__balance-ico"}),(u==null?void 0:u.credits)??0]}):null,Q.jsxs(xn,{to:"/credits",className:"subnav__credits",children:[Q.jsx(kn,{className:"subnav__credits-ico"}),Yr("nav.getCredits",{currency:cs.name})]}),Q.jsxs("div",{className:"subnav__cart-wrap",children:[Q.jsxs(xn,{to:"/cart",className:"subnav__cart","aria-label":Yr("nav.cart"),children:[Q.jsx("span",{className:"ico ico-cart","aria-hidden":!0}),l>0?Q.jsx("span",{className:"subnav__cart-badge",children:l}):null]}),Q.jsx(U4,{})]})]})]})}let I8=0;const Io=Ts(e=>({toasts:[],push:t=>{const r=++I8;return e(n=>({toasts:[...n.toasts,{...t,id:r}]})),r},dismiss:t=>e(r=>({toasts:r.toasts.filter(n=>n.id!==t)}))})),o6={success:e=>Io.getState().push({message:e,kind:"success"}),error:e=>Io.getState().push({message:e,kind:"error"}),info:e=>Io.getState().push({message:e,kind:"info"})},R8={success:"✓",error:"!",info:"i"};function w8({t:e}){const t=Io(r=>r.dismiss);return De.useEffect(()=>{const r=setTimeout(()=>t(e.id),4500);return()=>clearTimeout(r)},[e.id,t]),Q.jsxs("div",{className:`toast toast--${e.kind}`,role:e.kind==="error"?"alert":"status",onClick:()=>t(e.id),children:[Q.jsx("span",{className:"toast__icon","aria-hidden":!0,children:R8[e.kind]}),Q.jsx("span",{className:"toast__msg",children:e.message})]})}function A8(){const e=Io(t=>t.toasts);return e.length===0?null:Q.jsx("div",{className:"toaster","aria-live":"polite",children:e.map(t=>Q.jsx(w8,{t},t.id))})}const O8=De.lazy(()=>xt(()=>import("./index-D3m5eCUA.js"),__vite__mapDeps([8,1,9,6,3,4,10,11])).then(e=>({default:e.WearablePreview})));function fE(e){return Q.jsx(De.Suspense,{fallback:null,children:Q.jsx(O8,{...e})})}function N8(e){return e.itemId?`urn:decentraland:${Dt.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function ua(e){return e.category!=="emote"}function fs(e){return ua(e)?e.wearableCategory??`unknown:${e.id}`:null}const P8=new Set(["hat","helmet","mask","tiara","top_head","hair","facial_hair","eyewear","earring","eyes","eyebrows","mouth"]);function C8(e){if(!ua(e))return"item";const t=e.wearableCategory;return t?P8.has(t)?"head":t==="upper_body"?"upper":t==="lower_body"?"lower":t==="feet"?"feet":t==="hands"||t==="hands_wear"?"hands":"item":"item"}function mO(e){const t=new Set,r=new Set;for(const n of e){const i=fs(n);i==null||r.has(i)||(r.add(i),t.add(n.id))}return t}function M8(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=fs(t);if(i!=null)for(const a of r)a.id!==t.id&&n.has(a.id)&&fs(a)===i&&n.delete(a.id);return n.add(t.id),n}function D8(e){const t=new Map;for(const n of e){const i=fs(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 j8(e,t){const r=[];for(const n of e){if(!t.has(n.id)||!ua(n))continue;const i=N8(n);i&&r.push(i)}return r}function hO(e){return!e||e.startsWith("unknown:")?"Wearable":e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g," ")}function L8(){const e=Kr(_=>_.fittingOpen),t=Kr(_=>_.setFittingOpen),r=Kr(_=>_.items),n=Kr(_=>_.remove),i=Ml(),a=Ss(_=>{var b;return(b=_.session)==null?void 0:b.address}),{data:s,isFetched:o}=iE(a),u=!a||o,l=a&&s?a:"default",[c,d]=De.useState(()=>mO(r)),[m,p]=De.useState(!1);De.useEffect(()=>{e&&d(mO(r))},[e]),De.useEffect(()=>{const _=new Set(r.map(b=>b.id));d(b=>{const h=new Set([...b].filter(I=>_.has(I)));return h.size===b.size?b:h})},[r]);const E=De.useMemo(()=>D8(r),[r]),T=De.useMemo(()=>j8(r,c),[r,c]),S=r.reduce((_,b)=>_+b.priceCredits,0),A=T.join(",");De.useEffect(()=>{p(!1)},[A,l]);const f=De.useRef(!1);return De.useEffect(()=>{if(!e){f.current=!1;return}f.current||(f.current=!0,ci("Shop Tried On Outfit",{cart_size:r.length,wearables:r.filter(ua).length,emotes:r.filter(_=>!ua(_)).length,cart_value_credits:S}))},[e,r,S]),De.useEffect(()=>{if(!e)return;const _=b=>{b.key==="Escape"&&t(!1)};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[e,t]),!e||r.length===0?null:Q.jsxs("div",{className:"fitting",role:"dialog","aria-modal":"true","aria-label":"Fitting room",children:[Q.jsx("div",{className:"fitting__scrim",onClick:()=>t(!1)}),Q.jsxs("div",{className:"fitting__panel",children:[Q.jsx("button",{className:"fitting__close",onClick:()=>t(!1),"aria-label":"Close",children:"×"}),Q.jsx("div",{className:"fitting__stage",children:u?T.length>0?Q.jsxs(Q.Fragment,{children:[Q.jsx(fE,{profile:l,urns:T,type:Hn.PreviewType.AVATAR,emote:Hn.PreviewEmote.FASHION,background:"ecebed",disableFadeEffect:!0,dev:Dt.chainId===80002,onLoad:()=>p(!0)},l),m?null:Q.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:Q.jsx("span",{className:"fitting__spinner"})})]}):Q.jsxs("div",{className:"fitting__empty-stage",children:[Q.jsx("p",{children:"Nothing on right now."}),Q.jsx("p",{className:"muted",children:"Turn on an item from the list to try it."})]}):Q.jsx("div",{className:"fitting__loading","aria-hidden":!0,children:Q.jsx("span",{className:"fitting__spinner"})})}),Q.jsxs("div",{className:"fitting__side",children:[Q.jsxs("div",{className:"fitting__head",children:[Q.jsx("h2",{className:"fitting__title",children:"Fitting room"}),Q.jsx("p",{className:"fitting__sub muted",children:"Mix and match your cart. Turn items on and off to see the look."})]}),Q.jsx("div",{className:"fitting__items",children:r.map(_=>{const b=ua(_),h=c.has(_.id),I=E.has(_.id);return Q.jsxs("div",{className:`fitting-row${h?" is-on":""}`,children:[Q.jsxs("label",{className:"fitting-row__toggle",children:[Q.jsx("input",{type:"checkbox",checked:h,disabled:!b,onChange:()=>d(O=>M8(O,_,r))}),Q.jsx("span",{className:"fitting-row__box","aria-hidden":!0})]}),Q.jsx("div",{className:"fitting-row__thumb",children:_.thumbnail?Q.jsx("img",{src:_.thumbnail,alt:_.name}):null}),Q.jsxs("div",{className:"fitting-row__info",children:[Q.jsx("div",{className:"fitting-row__name",title:_.name,children:_.name}),Q.jsxs("div",{className:"fitting-row__meta",children:[Q.jsx("span",{className:`ico ico-slot-${b?C8(_):"item"} fitting-row__slot-ico`,title:b?hO(fs(_)):"Emote",role:"img","aria-label":b?hO(fs(_)):"Emote"}),I?Q.jsx("span",{className:"fitting-row__conflict",title:"Only one item per slot can be worn",children:"1 per slot"}):null]})]}),Q.jsxs("div",{className:"fitting-row__price",children:[Q.jsx(kn,{className:"fitting-row__diamond"}),_.priceCredits]}),Q.jsx("button",{className:"fitting-row__remove",onClick:()=>n(_.id),"aria-label":`Remove ${_.name} from cart`,title:"Remove",children:Q.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},_.id)})}),Q.jsxs("div",{className:"fitting__foot",children:[Q.jsxs("div",{className:"fitting__total",children:[r.length," item",r.length>1?"s":""," · ",Q.jsxs("strong",{children:[cs.symbol," ",S]})]}),Q.jsx("button",{className:"btn btn--purple fitting__checkout",onClick:()=>{t(!1),i("/cart")},children:"Checkout"})]})]})]})]})}const iD="shop:locale";function $8(){var e;try{const t=new URLSearchParams(window.location.search).get("lang");if(t&&El.includes(t))return t;const r=localStorage.getItem(iD);if(r&&El.includes(r))return r;const n=(e=navigator.language)==null?void 0:e.slice(0,2);if(n&&El.includes(n))return n}catch{}return"en"}const r_=Ts(e=>({locale:$8(),setLocale:t=>{try{localStorage.setItem(iD,t)}catch{}e({locale:t})}})),q8=De.lazy(()=>xt(()=>import("./ShopFooterInner-C54HCfML.js"),__vite__mapDeps([12,1,4,5,10,3,6])));function B8(){const e=r_(r=>r.locale),t=r_(r=>r.setLocale);return Q.jsx("div",{className:"shop-footer",children:Q.jsx(De.Suspense,{fallback:null,children:Q.jsx(q8,{locale:e,onChange:r=>{El.includes(r)&&t(r)}})})})}function k8(){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?Q.jsx("div",{"aria-hidden":!0,style:{position:"fixed",left:-9999,top:-9999,width:2,height:2,opacity:0,overflow:"hidden",pointerEvents:"none"},children:Q.jsx(fE,{id:"preview-warmer",profile:"default",dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0})}):null}function U8(){const e=Ss(t=>t.session);De.useEffect(()=>{if(!e||e.providerType!==Hn.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 pE=`${Dt.nftApiUrl}/v1`;function aD(e){if(!e)return 0;try{return Math.ceil(Number(jO(e))*10)}catch{return 0}}function u6(e){if(!e)return 0;try{const t=BigInt(e),r=10n**16n;return Number((t+r-1n)/r)}catch{return 0}}async function c6(e){const{listings:t}=await cd({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 F8(e,t){var a;const r=new URLSearchParams({contractAddress:e,tokenId:t,first:"1"}),n=await fetch(`${pE}/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 sD(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 cd(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(`${Dt.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 l6(e,t){const{listings:r}=await cd({contractAddress:e,itemId:t,first:1});return r[0]?sD(r[0]):null}async function H8({first:e=100,...t}={}){const{listings:r,total:n}=await cd({...t,first:e});return{items:r.map(sD),total:n}}function V8(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??Dt.chainId,createdAt:e.createdAt??0}}async function d6({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(`${Dt.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(V8),total:i.total??a.length}}async function f6(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(`${pE}/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,m,p,E;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)??((p=(m=l.nft.data)==null?void 0:m.emote)==null?void 0:p.rarity),network:l.nft.network,chainId:l.nft.chainId,isOnSale:l.order!=null,listingPrice:l.order?aD(l.order.price):void 0,tradeId:(E=l.order)==null?void 0:E.tradeId}}),total:o}}const G8="dcl:marketplace";async function p6(e,t){const{TradeService:r}=await xt(async()=>{const{TradeService:i}=await import("./TradeService-Cq9Kocx0.js");return{TradeService:i}},__vite__mapDeps([13,6,1,14,2,7]));return new r(G8,Dt.marketplaceServerUrl,()=>t).addTrade(e)}async function oD(e){const t=await fetch(`${Dt.marketplaceServerUrl}/v1/trades/${e}`);if(!t.ok)throw new Error(`fetchTrade ${t.status}`);const r=await t.json();return r.data??r}async function z8(e,t){const r=new URLSearchParams({contractAddress:e,itemId:t,first:"1"}),n=await fetch(`${pE}/items?${r.toString()}`);if(!n.ok)return null;const{data:i}=await n.json();return(i==null?void 0:i[0])??null}async function m6(e){var u,l;let t;try{t=await oD(e)}catch{return null}const r=(u=t.sent)==null?void 0:u[0],n=(l=t.received)==null?void 0:l[0],i=aD(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)===Hn.TradeAssetType.COLLECTION_ITEM){const c=await z8(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 F8(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 h6(e,t){var i;const{listings:r}=await cd({contractAddress:e,itemId:t,first:1}),n=(i=r[0])==null?void 0:i.tradeId;return n?oD(n):null}const W8={};function Y8(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var a;const s=u=>u===null?null:JSON.parse(u,void 0),o=(a=r.getItem(i))!=null?a:null;return o instanceof Promise?o.then(s):s(o)},setItem:(i,a)=>r.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>r.removeItem(i)}}const jo=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return jo(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return jo(n)(r)}}}},x8=(e,t)=>(r,n,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,A)=>({...A,...S}),...t},s=!1;const o=new Set,u=new Set;let l;try{l=a.getStorage()}catch{}if(!l)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...S)},n,i);const c=jo(a.serialize),d=()=>{const S=a.partialize({...n()});let A;const f=c({state:S,version:a.version}).then(_=>l.setItem(a.name,_)).catch(_=>{A=_});if(A)throw A;return f},m=i.setState;i.setState=(S,A)=>{m(S,A),d()};const p=e((...S)=>{r(...S),d()},n,i);let E;const T=()=>{var S;if(!l)return;s=!1,o.forEach(f=>f(n()));const A=((S=a.onRehydrateStorage)==null?void 0:S.call(a,n()))||void 0;return jo(l.getItem.bind(l))(a.name).then(f=>{if(f)return a.deserialize(f)}).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return a.migrate(f.state,f.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return f.state}).then(f=>{var _;return E=a.merge(f,(_=n())!=null?_:p),r(E,!0),d()}).then(()=>{A==null||A(E,void 0),s=!0,u.forEach(f=>f(E))}).catch(f=>{A==null||A(void 0,f)})};return i.persist={setOptions:S=>{a={...a,...S},S.getStorage&&(l=S.getStorage())},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:S=>(o.add(S),()=>{o.delete(S)}),onFinishHydration:S=>(u.add(S),()=>{u.delete(S)})},T(),E||p},K8=(e,t)=>(r,n,i)=>{let a={storage:Y8(()=>localStorage),partialize:T=>T,version:0,merge:(T,S)=>({...S,...T}),...t},s=!1;const o=new Set,u=new Set;let l=a.storage;if(!l)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...T)},n,i);const c=()=>{const T=a.partialize({...n()});return l.setItem(a.name,{state:T,version:a.version})},d=i.setState;i.setState=(T,S)=>{d(T,S),c()};const m=e((...T)=>{r(...T),c()},n,i);i.getInitialState=()=>m;let p;const E=()=>{var T,S;if(!l)return;s=!1,o.forEach(f=>{var _;return f((_=n())!=null?_:m)});const A=((S=a.onRehydrateStorage)==null?void 0:S.call(a,(T=n())!=null?T:m))||void 0;return jo(l.getItem.bind(l))(a.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==a.version){if(a.migrate)return[!0,a.migrate(f.state,f.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var _;const[b,h]=f;if(p=a.merge(h,(_=n())!=null?_:m),r(p,!0),b)return c()}).then(()=>{A==null||A(p,void 0),p=n(),s=!0,u.forEach(f=>f(p))}).catch(f=>{A==null||A(void 0,f)})};return i.persist={setOptions:T=>{a={...a,...T},T.storage&&(l=T.storage)},clearStorage:()=>{l==null||l.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>E(),hasHydrated:()=>s,onHydrate:T=>(o.add(T),()=>{o.delete(T)}),onFinishHydration:T=>(u.add(T),()=>{u.delete(T)})},a.skipHydration||E(),p||m},X8=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((W8?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),x8(e,t)):K8(e,t),J8=X8,yO=Ts()(J8(e=>({items:{},toggle:t=>e(r=>{const n={...r.items};return n[t.id]?delete n[t.id]:n[t.id]=t,{items:n}}),remove:t=>e(r=>{const n={...r.items};return delete n[t],{items:n}})}),{name:"shop-favorites"}));function Q8(e,t){return!t||!e.creator?!1:nE(e)&&e.creator.toLowerCase()===t.toLowerCase()}function y6(e,t){return!!e.signer&&!!t&&e.signer.toLowerCase()===t.toLowerCase()}function Z8(e){return/^0x[a-fA-F0-9]{40}$/.test(e)?`${e.slice(0,6)}…${e.slice(-4)}`:e}function eW({address:e,className:t,linkToProfile:r}){var u,l;const n=Ml(),{data:i}=iE(e);if(!e)return null;const a=(i==null?void 0:i.name)||Z8(e),s=(l=(u=i==null?void 0:i.avatar)==null?void 0:u.snapshots)==null?void 0:l.face256,o=Q.jsxs(Q.Fragment,{children:[s?Q.jsx("img",{className:"creator__ava",src:s,alt:"",loading:"lazy"}):Q.jsx("span",{className:"creator__ava creator__ava--ph","aria-hidden":!0}),Q.jsxs("span",{className:"creator__name",children:["By ",a]})]});return r?Q.jsx("button",{className:`creator creator--link${t?` ${t}`:""}`,title:`View ${a}`,onClick:c=>{c.stopPropagation(),n(`/creator/${e}`)},children:o}):Q.jsx("span",{className:`creator${t?` ${t}`:""}`,children:o})}function gO(e){if(!e)return"#a09ba8";try{return Hn.Rarity.getColor(e.toLowerCase())}catch{return"#a09ba8"}}function tW(e){const t=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 rW(e,t=Date.now()){const{priceCredits:r,compareAtCredits:n,saleEndsAt:i}=e;return!(n==null||!(n>r)||i!=null&&i<=t)}function nW(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 pl(e,t=Date.now()){return e==null?1/0:Math.max(0,e-t)}function iW(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 _O(e){return!isFinite(e)||e<=0?0:e<36e5?1e3:6e4}function aW({endsAt:e,className:t}){const[r,n]=De.useState(()=>pl(e));De.useEffect(()=>{if(n(pl(e)),e==null)return;let a;const s=()=>{const u=pl(e);n(u);const l=_O(u);l>0&&(a=setTimeout(s,l))},o=_O(pl(e));return o>0&&(a=setTimeout(s,o)),()=>clearTimeout(a)},[e]);const i=iW(r);return i?Q.jsxs("span",{className:t??"sale-countdown",children:[Q.jsx("span",{className:"ico ico-clock sale-countdown__ico","aria-hidden":!0}),i]}):null}const sW=120,oW=250;function uW(e){return e==="male"?"♂":e==="female"?"♀":e==="unisex"?"⚥":""}function mE(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(z=>z.add),c=Kr(z=>z.items.some(Y=>Y.id===t.id)),d=Ss(z=>{var Y;return(Y=z.session)==null?void 0:Y.address}),m=Q8(t,d),p=yO(z=>z.toggle),E=yO(z=>!!z.items[t.id]),T=Ml(),S=!!t.contractAddress&&!!t.itemId,A=t.tokenId??t.itemId,f=!r&&!!t.contractAddress&&!!A;function _(){f&&T(`/item/${t.contractAddress}/${A}`,{state:{item:t,tradeId:t.tradeId}})}function b(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),s(!1),o.current=setTimeout(()=>i(!0),sW)}function h(){o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),i(!1),s(!1)}function I(){u.current&&clearTimeout(u.current),u.current=setTimeout(()=>s(!0),oW)}const O=uW(t.gender),P=!r&&rW({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),B=P?nW(t.compareAtCredits,t.priceCredits):0;return Q.jsxs("article",{className:`card${n?" card--hover":""}`,style:f?{cursor:"pointer"}:void 0,onMouseEnter:b,onMouseLeave:h,onClick:_,role:f?"link":void 0,tabIndex:f?0:void 0,onKeyDown:f?z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),_())}:void 0,children:[Q.jsxs("div",{className:"card__media",children:[P?Q.jsxs("span",{className:"card__sale-badge",children:["SALE",B>0?` -${B}%`:""]}):null,Q.jsx("button",{className:`card__fav${E?" is-on":""}`,onClick:z=>{z.stopPropagation(),p(t)},"aria-label":E?"Remove from favorites":"Add to favorites",children:Q.jsx("span",{className:"ico ico-heart","aria-hidden":!0})}),t.thumbnail?Q.jsx("img",{className:`card__img${n&&a?" card__img--hidden":""}`,src:t.thumbnail,alt:t.name,loading:"lazy"}):null,n&&S?Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:`card__preview${a?" is-ready":""}`,children:Q.jsx(fE,{contractAddress:t.contractAddress,itemId:t.itemId??void 0,profile:"default",type:t.category==="emote"?void 0:Hn.PreviewType.AVATAR,emote:t.category==="emote"?void 0:Hn.PreviewEmote.FASHION,dev:Dt.chainId===80002,disableBackground:!0,disableFadeEffect:!0,onLoad:I})}),Q.jsx("span",{className:"card__preview-shield","aria-hidden":!0}),a?null:Q.jsx("span",{className:"card__loadbar","aria-hidden":!0})]}):null]}),Q.jsxs("div",{className:"card__body",children:[Q.jsxs("div",{className:"card__desc",children:[Q.jsx("div",{className:"card__name",title:t.name,children:t.name}),t.creator?Q.jsx(eW,{address:t.creator,className:"card__creator",linkToProfile:!0}):Q.jsx("div",{className:"card__creator",children:" "})]}),n?r&&e.mode==="market"?Q.jsx("button",{className:"card__cart",onClick:z=>{z.stopPropagation(),e.onBuyNow(t)},disabled:e.marketPriceCredits==null,children:e.marketPriceCredits==null?"Unavailable":"Buy now"}):Q.jsxs("button",{className:`card__cart${c?" is-in":""}`,onClick:z=>{z.stopPropagation(),m||l(t,"grid")},disabled:c||m,children:[m?null:Q.jsx("span",{className:"ico ico-cart-solid card__cart-ico","aria-hidden":!0}),m?"Your item":c?"In cart":"Add to cart"]}):Q.jsxs("div",{className:"card__meta",children:[r&&e.mode==="market"?Q.jsxs("div",{className:"card__price card__price--market",children:[Q.jsx("span",{className:"card__approx","aria-hidden":!0,children:"≈"}),Q.jsx(kn,{className:"card__diamond"}),e.marketPriceCredits==null?"—":e.marketPriceCredits,Q.jsx("span",{className:"chip card__market-chip",children:"Market price"})]}):P?Q.jsxs("div",{className:"card__price card__price--sale",children:[Q.jsxs("span",{className:"card__price-now",children:[Q.jsx(kn,{className:"card__diamond"}),t.priceCredits]}),Q.jsxs("span",{className:"card__price-was",children:[Q.jsx(kn,{className:"card__diamond card__diamond--was"}),t.compareAtCredits]}),Q.jsx(aW,{endsAt:t.saleEndsAt,className:"card__countdown"})]}):Q.jsxs("div",{className:"card__price",children:[Q.jsx(kn,{className:"card__diamond"}),t.priceCredits]}),Q.jsxs("div",{className:"card__chips",children:[Q.jsx("span",{className:"chip chip--rarity",style:{background:gO(t.rarity),color:tW(gO(t.rarity))},children:t.rarity}),t.category==="wearable"?Q.jsx("span",{className:"chip chip--icon",children:Q.jsx("span",{className:"ico ico-eyewear","aria-hidden":!0})}):null,O?Q.jsx("span",{className:"chip chip--icon",children:O}):null]})]})]})]})}function cW(e){if(!e)return 0;try{return Math.ceil(Number(jO(e))*10)}catch{return 0}}function lW(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 uD(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:cW(e.price??e.minPrice),gender:lW((s=(a=e.data)==null?void 0:a.wearable)==null?void 0:s.bodyShapes)}}async function g6(e,{first:t=20,skip:r=0}={}){const n=new URLSearchParams({contractAddress:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(uD);return{items:o,total:s??r+o.length}}async function dW(e,{first:t=60,skip:r=0}={}){const n=new URLSearchParams({creator:e,first:String(t),skip:String(r),includeSocialEmotes:"false"}),i=await fetch(`${Dt.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(uD);return{items:o,total:s??r+o.length}}const cD="shop:followed-creators:v1",fW=200;function pW(){try{const e=localStorage.getItem(cD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(r=>typeof r=="string"):[]}catch{return[]}}function EO(e){try{localStorage.setItem(cD,JSON.stringify(e))}catch{}}const mW=Ts((e,t)=>({followed:pW(),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,fW);EO(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);EO(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)})),hW=8,yW=8,gW=12;function _W(){const t=mW(i=>i.followed).slice(0,hW),{data:r=[],isLoading:n}=Dl({queryKey:["followed-creators-row",t.join(",")],enabled:t.length>0,queryFn:async()=>{const i=await Promise.all(t.map(a=>dW(a,{first:yW}).then(s=>s.items).catch(()=>[])));return EW(i).filter(a=>a.priceCredits>0).slice(0,gW)}});return t.length===0||!n&&r.length===0?null:Q.jsxs("section",{className:"row",children:[Q.jsx("div",{className:"row__head",children:Q.jsx("h2",{className:"row__title",children:"From creators you follow"})}),Q.jsx("div",{className:"row__track",children:n?Array.from({length:6}).map((i,a)=>Q.jsx("div",{className:"card card--skeleton"},a)):r.map(i=>Q.jsx(mE,{item:i},i.id))})]})}function EW(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 lD="shop:recently-viewed",dD=12;function fD(){try{const e=localStorage.getItem(lD);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(0,dD):[]}catch{return[]}}function _6(e){if(e!=null&&e.id)try{const t=[e,...fD().filter(r=>r.id!==e.id)].slice(0,dD);localStorage.setItem(lD,JSON.stringify(t))}catch{}}function vW({excludeId:e}){const t=De.useMemo(()=>fD().filter(r=>r.id!==e),[e]);return t.length===0?null:Q.jsxs("section",{className:"row",children:[Q.jsx("div",{className:"row__head",children:Q.jsx("h2",{className:"row__title",children:"Recently viewed"})}),Q.jsx("div",{className:"row__track",children:t.map(r=>Q.jsx(mE,{item:r},r.id))})]})}function vO({title:e,items:t,loading:r}){return Q.jsxs("section",{className:"row",children:[Q.jsxs("div",{className:"row__head",children:[Q.jsx("h2",{className:"row__title",children:e}),Q.jsxs(vl,{className:"row__viewall",to:"/assets",children:["View all ",Q.jsx("span",{className:"ico ico-viewall","aria-hidden":!0})]})]}),Q.jsx("div",{className:"row__track",children:r?Array.from({length:6}).map((n,i)=>Q.jsx("div",{className:"card card--skeleton"},i)):t.map(n=>Q.jsx(mE,{item:n},n.id))})]})}function bW(){const{data:e,isLoading:t}=Dl({queryKey:["overview-listings"],queryFn:()=>H8({first:24})}),r=(e==null?void 0:e.items)??[];return Q.jsxs("div",{className:"overview",children:[Q.jsx("section",{className:"hero",children:Q.jsxs("div",{className:"hero__inner",children:[Q.jsx("h1",{className:"hero__title",children:"FASHION WEEK OUTFITS"}),Q.jsx(vl,{className:"btn btn--purple",to:"/assets",children:"EXPLORE COLLECTION"})]})}),Q.jsx(_W,{}),Q.jsx(vW,{}),t||r.length>0?Q.jsxs(Q.Fragment,{children:[Q.jsx(vO,{title:"Featured",items:r.slice(0,12),loading:t}),r.length>6?Q.jsx(vO,{title:"New Creations",items:r.slice(6,18),loading:!1}):null]}):Q.jsxs("div",{className:"overview__empty",children:[Q.jsx("p",{className:"overview__empty-title",children:"New drops are on the way"}),Q.jsx("p",{className:"muted",children:"There are no items on sale right now — check back soon."}),Q.jsx(vl,{className:"btn btn--purple",to:"/assets",children:"Browse Collectibles"})]})]})}const TW={"/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"},SW=De.lazy(()=>xt(()=>import("./Assets-BujUhYkv.js"),__vite__mapDeps([15,1,16,17,18,6])).then(e=>({default:e.Assets}))),IW=De.lazy(()=>xt(()=>import("./Market-CdcFBQlb.js"),__vite__mapDeps([19,1,20,14,6,16,17,21,22,18])).then(e=>({default:e.Market}))),RW=De.lazy(()=>xt(()=>import("./ItemDetail-CQLF904x.js"),__vite__mapDeps([23,1,21,14,6,22,24])).then(e=>({default:e.ItemDetail}))),wW=De.lazy(()=>xt(()=>import("./Collection-COER4zdn.js"),__vite__mapDeps([25,1,26,27,16,17,18,6])).then(e=>({default:e.Collection}))),AW=De.lazy(()=>xt(()=>import("./Creator-CQNwGndX.js"),__vite__mapDeps([28,1,26,27,16,17,18,6])).then(e=>({default:e.Creator}))),OW=De.lazy(()=>xt(()=>import("./MyAssets-bWDlTQOG.js"),__vite__mapDeps([29,1,30,21,14,6,20,31,17,18,32])).then(e=>({default:e.MyAssets}))),NW=De.lazy(()=>xt(()=>import("./MyFavorites-DyvIdUeN.js"),__vite__mapDeps([33,1,17,6])).then(e=>({default:e.MyFavorites}))),PW=De.lazy(()=>xt(()=>import("./MyPurchases-C7Lqy3R3.js"),__vite__mapDeps([34,1,17,18,6])).then(e=>({default:e.MyPurchases}))),CW=De.lazy(()=>xt(()=>import("./ImportListings-DuqQ6Jgj.js"),__vite__mapDeps([35,1,30,21,14,6,20,31,36])).then(e=>({default:e.ImportListings}))),MW=De.lazy(()=>xt(()=>import("./Cart-FNZ94bWY.js"),__vite__mapDeps([37,1,21,14,6,22])).then(e=>({default:e.Cart}))),DW=De.lazy(()=>xt(()=>import("./GetCredits-DJpx8KpO.js"),__vite__mapDeps([38,1,11,4,6])).then(e=>({default:e.GetCredits}))),jW=De.lazy(()=>xt(()=>import("./Success-ByHSUAuN.js"),__vite__mapDeps([39,1,31,6])).then(e=>({default:e.Success}))),LW=De.lazy(()=>xt(()=>import("./NotFound-DoSj3Etz.js"),__vite__mapDeps([40,1,6])).then(e=>({default:e.NotFound})));function $W(){return Q.jsx("div",{className:"page-loading","aria-busy":"true",children:Q.jsx("span",{className:"spinner","aria-hidden":!0})})}function qW(){return Q.jsxs("div",{className:"overview__empty",children:[Q.jsx("p",{className:"overview__empty-title",children:"Something went wrong"}),Q.jsx("p",{className:"muted",children:"This page hit an unexpected error. Try reloading."}),Q.jsx("button",{className:"btn btn--purple",onClick:()=>window.location.reload(),children:"Reload"})]})}function BW(){U8();const e=AD();return De.useEffect(()=>{W3()},[]),De.useEffect(()=>{const t=e.pathname,r=TW[t]??(t.startsWith("/item/")?"item":t.startsWith("/collection/")?"collection":t.startsWith("/creator/")?"creator":"other");H3(r)},[e.pathname]),Q.jsxs(Q.Fragment,{children:[Q.jsx(A8,{}),Q.jsx(k8,{}),Q.jsx(L8,{}),Q.jsx(S8,{}),Q.jsx("main",{className:"page",children:Q.jsx(Nl,{fallback:Q.jsx(qW,{}),children:Q.jsx(De.Suspense,{fallback:Q.jsx($W,{}),children:Q.jsxs(OD,{children:[Q.jsx(dr,{path:"/",element:Q.jsx(ND,{to:"/overview",replace:!0})}),Q.jsx(dr,{path:"/overview",element:Q.jsx(bW,{})}),Q.jsx(dr,{path:"/assets",element:Q.jsx(SW,{})}),Q.jsx(dr,{path:"/market",element:Q.jsx(IW,{})}),Q.jsx(dr,{path:"/item/:contractAddress/:tokenId",element:Q.jsx(RW,{})}),Q.jsx(dr,{path:"/collection/:contractAddress",element:Q.jsx(wW,{})}),Q.jsx(dr,{path:"/creator/:address",element:Q.jsx(AW,{})}),Q.jsx(dr,{path:"/my-assets",element:Q.jsx(OW,{})}),Q.jsx(dr,{path:"/my-favorites",element:Q.jsx(NW,{})}),Q.jsx(dr,{path:"/my-purchases",element:Q.jsx(PW,{})}),Q.jsx(dr,{path:"/import",element:Q.jsx(CW,{})}),Q.jsx(dr,{path:"/cart",element:Q.jsx(MW,{})}),Q.jsx(dr,{path:"/credits",element:Q.jsx(DW,{})}),Q.jsx(dr,{path:"/success",element:Q.jsx(jW,{})}),Q.jsx(dr,{path:"*",element:Q.jsx(LW,{})})]})})})}),Q.jsx(Nl,{fallback:Q.jsx(Q.Fragment,{}),children:Q.jsx(B8,{})})]})}function kW({children:e}){const t=r_(r=>r.locale);return T8(t),Q.jsx(c8,{value:dE(t),children:e},t)}Z3();const UW=new ij({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),FW=["localhost","127.0.0.1"].includes(window.location.hostname),HW=FW?void 0:"/shop";PD.createRoot(document.getElementById("root")).render(Q.jsx(DO.StrictMode,{children:Q.jsx(sj,{client:UW,children:Q.jsx(kW,{children:Q.jsx(CD,{basename:HW,children:Q.jsx(BW,{})})})})}));export{aW as $,mE as A,H8 as B,eW as C,Hn as D,Zr as E,d0 as F,mW as G,dW as H,o6 as I,N8 as J,a6 as K,d6 as L,xW as M,YW as N,gj as O,WW as P,JD as Q,sd as R,i6 as S,iE as T,QW as U,_6 as V,fE as W,rW as X,Q8 as Y,nW as Z,xt as _,Ss as a,l6 as a0,f6 as a1,c6 as a2,HG as a3,vn as a4,en as a5,KF as a6,L4 as a7,Qo as a8,W_ as a9,SH as aa,uH as ab,s6 as ac,L_ as ad,LP as ae,$P as af,r6 as b,Dl as c,kn as d,m6 as e,g6 as f,oD as g,Dt as h,Kr as i,B4 as j,aj as k,cs as l,ci as m,Do as n,h6 as o,p6 as p,y6 as q,t6 as r,ZW as s,Yr as t,yO as u,e6 as v,xw as w,G3 as x,n6 as y,u6 as z};