@dcl/shop 1.3.1-31191620721.commit-720133f → 1.3.1-31191682385.commit-b61dc4f

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 (175) hide show
  1. package/_assets/{Activity-BQp9zB9c.js → Activity-B_l3S0lb.js} +3 -3
  2. package/_assets/{AnimatedBackground-1gk7Tb_5.js → AnimatedBackground-DuhJWXI1.js} +1 -1
  3. package/_assets/{Assets-inqUytf_.js → Assets-CNlA1oFv.js} +5 -5
  4. package/_assets/{Assets.styles-CLQKfUGn.js → Assets.styles-o3ITauMT.js} +1 -1
  5. package/_assets/{Authorizations-D-evM_QJ.js → Authorizations-BeBMjIyB.js} +1 -1
  6. package/_assets/{Cart-C9zn36Vt.js → Cart-CD2lfleM.js} +1 -1
  7. package/_assets/{CircularProgress-A5aHIFTM.js → CircularProgress-dn_FyOER.js} +1 -1
  8. package/_assets/{Collection-BkS4RGzJ.js → Collection-C7R_FzbK.js} +1 -1
  9. package/_assets/{CollectionCarousel-BR7iuprt.js → CollectionCarousel-CT9bwSTH.js} +126 -84
  10. package/_assets/{Confetti-DqCpqSGh.js → Confetti-CoP5-e4k.js} +1 -1
  11. package/_assets/{Creator-DdbvRhiH.js → Creator-UajhgRZS.js} +1 -1
  12. package/_assets/{ErrorNotice-ZO3VddUA.js → ErrorNotice-C0G5qWzo.js} +1 -1
  13. package/_assets/{ExchangeController-DukmAekv.js → ExchangeController-COvuIfdo.js} +1 -1
  14. package/_assets/{Faq-CZP7_2cD.js → Faq-DNITaJGZ.js} +1 -1
  15. package/_assets/{GetCredits-MGdIwIFh.js → GetCredits-BXA3_C5P.js} +1 -1
  16. package/_assets/{Grow-DpPpV3nQ.js → Grow-BQjry54P.js} +1 -1
  17. package/_assets/{HelpersUtil-DF0OmzDm.js → HelpersUtil-DOHD_0p5.js} +1 -1
  18. package/_assets/{ItemDetail-CFBZLMJU.js → ItemDetail-BShi_a0Y.js} +2 -2
  19. package/_assets/LazyEmoteControls-AphOuHQz.js +2 -0
  20. package/_assets/{LoadMore-CQIEBXEe.js → LoadMore-CuEUCjRg.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-BL6Fe7uT.js → ManaPricingBanner.styles-COkmJnom.js} +1 -1
  22. package/_assets/{MyAssets-jUHoolRc.js → MyAssets-Bi6l3K4d.js} +2 -2
  23. package/_assets/{MyFavorites-Cz0Ab5C3.js → MyFavorites-WgTcR_lz.js} +1 -1
  24. package/_assets/{NotFound-C3E5SE63.js → NotFound-D311dCZJ.js} +1 -1
  25. package/_assets/{NotificationsBell-DwoBklTb.js → NotificationsBell-CY3CW4C6.js} +1 -1
  26. package/_assets/{OutfitDetail-CvBkv60C.js → OutfitDetail-DqGwmKsm.js} +1 -1
  27. package/_assets/{OutfitPreview-CBQqwJ67.js → OutfitPreview-FeO3-fef.js} +1 -1
  28. package/_assets/{OutfitStudio-a65hPBij.js → OutfitStudio-CUGqRP3F.js} +1 -1
  29. package/_assets/{StoreSettings-Dxk9HXHu.js → StoreSettings-kjlaWUnu.js} +1 -1
  30. package/_assets/{Success-tDKzwkOC.js → Success-C5FXjcLJ.js} +1 -1
  31. package/_assets/{SwapController-BqD3xiuU.js → SwapController-DzdK5g3n.js} +1 -1
  32. package/_assets/{Tooltip-CvreJNab.js → Tooltip-CaglQe4p.js} +1 -1
  33. package/_assets/{TradeService-BzK-QMtc.js → TradeService-C51CBXXB.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-CXX6NkJL.js → W3MFrameProviderSingleton-DdqmAkVg.js} +3 -3
  35. package/_assets/{WebCryptoP256-Dszr90Pd.js → WebCryptoP256-B8NxfggH.js} +1 -1
  36. package/_assets/{authorizations-tHY3fIO5.js → authorizations-C2XcFris.js} +1 -1
  37. package/_assets/{basic-CzQlZy6T.js → basic-COmTei_A.js} +1 -1
  38. package/_assets/{biconomy-C9DVv0MO.js → biconomy-DTOnLn-e.js} +1 -1
  39. package/_assets/{builder-BkVXiD6h.js → builder-CZT_aNgl.js} +1 -1
  40. package/_assets/{buy-D15s0U5R.js → buy-D2J4xdFU.js} +1 -1
  41. package/_assets/{buy-gasless-DmLq_ESf.js → buy-gasless-DXZhAZul.js} +1 -1
  42. package/_assets/{categories-gDlRucVv.js → categories-CXp3c1O6.js} +1 -1
  43. package/_assets/{ccip-Dzc99LwL.js → ccip-ssHPmWgf.js} +1 -1
  44. package/_assets/{ccip-bGy4ERXT.js → ccip-u9aTnVSi.js} +1 -1
  45. package/_assets/{collectionPage.styles-C4IUHz6N.js → collectionPage.styles-BYlcGAC5.js} +6 -6
  46. package/_assets/{controller-bNuDj-sG.js → controller-BAQ7MSIz.js} +2 -2
  47. package/_assets/{core-z3Fmal0m.js → core-Bj6TGGmC.js} +4 -4
  48. package/_assets/{createSvgIcon-BsbTxAyP.js → createSvgIcon-C_ptnlwI.js} +1 -1
  49. package/_assets/{custom-D0pEXNMH.js → custom-DhZeTGx9.js} +1 -1
  50. package/_assets/{data-capture-Dip44U7J.js → data-capture-Bw9VfiIX.js} +1 -1
  51. package/_assets/{email-BuVFjeyS.js → email-aYs6NJG4.js} +1 -1
  52. package/_assets/{embedded-wallet-BW8sqIAA.js → embedded-wallet-Du89blmt.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-W2WZr0Ft.js → emotion-styled.browser.esm-7iI5MQ9s.js} +1 -1
  54. package/_assets/{engine-BmnT6CfB.js → engine-CDmunHUA.js} +1 -1
  55. package/_assets/{errors-QU1ZKsgr.js → errors-CwhExOnR.js} +1 -1
  56. package/_assets/{estimate-l1-fee-GYuqvmRU.js → estimate-l1-fee-DGEo-qa8.js} +1 -1
  57. package/_assets/{execute-BVzDLJKt.js → execute-DEAHKtIX.js} +2 -2
  58. package/_assets/{features-xcuE2K-G.js → features-BBwgk4Ks.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-D-cGrRJi.js → fetchTokenMetadata-41ucP_Gs.js} +2 -2
  60. package/_assets/{field.styles-D166p6oG.js → field.styles-CMTqm8XT.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-BjfLkiDk.js → get-ecosystem-wallet-info-DPKRmY8M.js} +1 -1
  62. package/_assets/{getBalance-CvIYNcSa.js → getBalance-Dif8tIk4.js} +1 -1
  63. package/_assets/{getNFT-KdIpONGr.js → getNFT-1pTPryrB.js} +1 -1
  64. package/_assets/{getNFT-BHwsrgSu.js → getNFT-tQYuD-0f.js} +1 -1
  65. package/_assets/{grid.styles-BCyzN-Pc.js → grid.styles-BCdYXc8S.js} +1 -1
  66. package/_assets/{hashTypedData-DOa1wxQA.js → hashTypedData-BMPizOCT.js} +1 -1
  67. package/_assets/{hashTypedData-dAuA3uO1.js → hashTypedData-DOSmOliP.js} +1 -1
  68. package/_assets/{in-app-Vkd-5Wa3.js → in-app-2oBOulp3.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-CdJklwgr.js → in-app-wallet-calls-BmiOqy8w.js} +1 -1
  70. package/_assets/{index-BnoUb6oZ.js → index-0ae65IXz.js} +1 -1
  71. package/_assets/{index-C0C-mFEA.js → index-3Ft7vVmQ.js} +1 -1
  72. package/_assets/{index-DA9zyrHQ.js → index-5HC5J6x-.js} +1 -1
  73. package/_assets/{index-Vpo54xYi.js → index-B6B1fvIc.js} +1 -1
  74. package/_assets/{index-C1B0Gkbl.js → index-BMRilxGK.js} +2 -2
  75. package/_assets/{index-BusO331-.js → index-BNahBa6g.js} +1 -1
  76. package/_assets/{index-48RRNXVh.js → index-BRZIBb8-.js} +1 -1
  77. package/_assets/{index-CIH4mDH4.js → index-BSBtzqEU.js} +2 -2
  78. package/_assets/{index-DBG7zV9T.js → index-B_6nZxVq.js} +1 -1
  79. package/_assets/{index-C6MIgQz4.js → index-Bp2qDqMJ.js} +1 -1
  80. package/_assets/{index-Dyxgs6tH.js → index-BpUokvwW.js} +1 -1
  81. package/_assets/{index-lzXNQebE.js → index-BpZWPGJy.js} +1 -1
  82. package/_assets/{index-WqT-VMXi.js → index-BsgxGadm.js} +1 -1
  83. package/_assets/{index-B-SZ4oKw.js → index-BzgyB7Vj.js} +1 -1
  84. package/_assets/{index-BIPY6esA.js → index-C-B_kVJr.js} +1 -1
  85. package/_assets/{index-DBwWJ13U.js → index-C6zFjlGI.js} +1 -1
  86. package/_assets/{index-Bxe28Q3l.js → index-CBvsGOvJ.js} +1 -1
  87. package/_assets/{index-DjQVPpbt.js → index-CFCyEG1i.js} +1 -1
  88. package/_assets/{index-BC0P8UDZ.js → index-CHFZviOg.js} +1 -1
  89. package/_assets/{index-jBILDCGu.js → index-COCflAYI.js} +1 -1
  90. package/_assets/{index-BcClhtlx.js → index-CTxcIBLf.js} +2 -2
  91. package/_assets/{index-C4PfxjwS.js → index-CVV5XjqI.js} +1 -1
  92. package/_assets/{index-CsJapBAz.js → index-Cfmxj1CQ.js} +1 -1
  93. package/_assets/{index-Brlax_z3.js → index-Cm--i_zM.js} +1 -1
  94. package/_assets/{index-YO9YHqy5.js → index-CtrfnjYH.js} +1 -1
  95. package/_assets/{index-BooiKZ4y.js → index-D2xwx2CV.js} +1 -1
  96. package/_assets/{index-5LEllUgg.js → index-D8Zy3Mui.js} +1 -1
  97. package/_assets/{index-BG5saEE6.js → index-DCg5FbqY.js} +11 -11
  98. package/_assets/{index-CjgJGKFm.js → index-DDrhThY2.js} +1 -1
  99. package/_assets/{index-VNMDwvJZ.js → index-DEWNRs55.js} +1 -1
  100. package/_assets/{index-BzDEKkhm.js → index-DLWcfhTU.js} +1 -1
  101. package/_assets/{index-joI_e-qB.js → index-DNcWD6cz.js} +1 -1
  102. package/_assets/{index-CiyuHW1D.js → index-DOtw2cqV.js} +1 -1
  103. package/_assets/{index-khD6dteL.js → index-DP241JAT.js} +1 -1
  104. package/_assets/{index-hdxRUFOH.js → index-DRu-ezMP.js} +1 -1
  105. package/_assets/{index-wqmFpJCC.js → index-DX7iu41C.js} +1 -1
  106. package/_assets/{index-BV-dSC8Q.js → index-DXilYAje.js} +3 -3
  107. package/_assets/{index-DVTAk_4l.js → index-DYHFtYOn.js} +3 -3
  108. package/_assets/{index-C2Dmw2y2.js → index-DYZyT8y3.js} +1 -1
  109. package/_assets/{index-D4GsidCb.js → index-DfZraWfH.js} +3 -3
  110. package/_assets/{index-Ct39zsAv.js → index-DnVShTJI.js} +1 -1
  111. package/_assets/{index-Dh3h6qwJ.js → index-Dvio79mx.js} +1 -1
  112. package/_assets/{index-CjplTBs8.js → index-DxKBR2sg.js} +1 -1
  113. package/_assets/{index-DZJGA9sn.js → index-DxYGR_bb.js} +1 -1
  114. package/_assets/{index-BSE_jyBb.js → index-GPDV8KQf.js} +1 -1
  115. package/_assets/{index-LYRoqykZ.js → index-LTLbqlJU.js} +1 -1
  116. package/_assets/{index-DgK1L9o3.js → index-XJWjntsX.js} +1 -1
  117. package/_assets/{index-D_9hGXGo.js → index-_RYmCLAc.js} +1 -1
  118. package/_assets/{index-CubHbtST.js → index-bt66cjbg.js} +1 -1
  119. package/_assets/{index-CV0k525o.js → index-c5p2VvDH.js} +1 -1
  120. package/_assets/{index-BtKeAS4U.js → index-lD6G-yto.js} +1 -1
  121. package/_assets/{index-Ca-3H4tc.js → index-m_DrAs2i.js} +1 -1
  122. package/_assets/{index.es-TB6Pdbr6.js → index.es-BnqQlFOf.js} +4 -4
  123. package/_assets/{index.es-DMyaDgPn.js → index.es-CMfocea_.js} +1 -1
  124. package/_assets/{index.es-s8ulJ0vH.js → index.es-Cb8F3w9N.js} +1 -1
  125. package/_assets/{localBatchGatewayRequest-Cb2OUlxF.js → localBatchGatewayRequest-CwW-ScCx.js} +1 -1
  126. package/_assets/{networks-DP5N-9q0.js → networks-BvK4lGLf.js} +1 -1
  127. package/_assets/{onramp-D_IiF06P.js → onramp-CRjoHhS6.js} +1 -1
  128. package/_assets/{openzeppelin-DQb0B1gc.js → openzeppelin-BDFPE10K.js} +1 -1
  129. package/_assets/{parseNft-BXnxR2DY.js → parseNft-DLw7HgEB.js} +2 -2
  130. package/_assets/{parseSignature-BHwvxKmK.js → parseSignature-BJFS2vrb.js} +3 -3
  131. package/_assets/{parseSignature-D6PfB-m3.js → parseSignature-OebhNeeq.js} +1 -1
  132. package/_assets/{passkeys-B3PSpp8R.js → passkeys-BsE9CTNy.js} +1 -1
  133. package/_assets/{pay-with-exchange-DclkyJuD.js → pay-with-exchange-0sZ81P6g.js} +1 -1
  134. package/_assets/{qr-overlay-mE8cLXwy.js → qr-overlay-CACiZH9n.js} +1 -1
  135. package/_assets/{receive--vr3pkwu.js → receive-BcCNfRAG.js} +1 -1
  136. package/_assets/{resolveImplementation-CkV0Br2Q.js → resolveImplementation-rkIwivs2.js} +1 -1
  137. package/_assets/{rpc-Bo8dCOeA.js → rpc-BJGVKdu_.js} +1 -1
  138. package/_assets/{secp256k1-BemYjp6e.js → secp256k1-ByR_y_KV.js} +1 -1
  139. package/_assets/{secp256k1-CoJWrMaq.js → secp256k1-_NPe3_tk.js} +1 -1
  140. package/_assets/{secp256k1-D_IXzkrW.js → secp256k1-ookzyCJq.js} +1 -1
  141. package/_assets/{send-batch-transaction-Dmmn7XYZ.js → send-batch-transaction-2_uU6Kxp.js} +1 -1
  142. package/_assets/{send-eip712-transaction-Blu7_doG.js → send-eip712-transaction-B2ALeJg8.js} +2 -2
  143. package/_assets/{send-gasless-transaction-BQqBwT8Q.js → send-gasless-transaction-DUCO4VkA.js} +2 -2
  144. package/_assets/{send-psiY7VdC.js → send-qTCae84e.js} +1 -1
  145. package/_assets/{send-transaction-Ry2e-C1a.js → send-transaction-DwmC6GHr.js} +2 -2
  146. package/_assets/{sendMetaTransaction-Dk8-17lF.js → sendMetaTransaction-Bs_mS_PM.js} +1 -1
  147. package/_assets/{sendRawTransaction-CR95nEOD.js → sendRawTransaction-DMyeSj-O.js} +3 -3
  148. package/_assets/{serializeTransaction-C8fOu7Uj.js → serializeTransaction-B46ekkRO.js} +1 -1
  149. package/_assets/{session-proposal-CfcD16EU.js → session-proposal-CihthfGj.js} +1 -1
  150. package/_assets/{session-request-Btflur8z.js → session-request-ChY_zmtp.js} +2 -2
  151. package/_assets/{signing-RYCivcYo.js → signing-DnzPp1LH.js} +3 -3
  152. package/_assets/{skeleton.styles-CV7fqHt3.js → skeleton.styles-DLM-pTFu.js} +1 -1
  153. package/_assets/{socials-i3gKdi6C.js → socials-iSUyLEuO.js} +1 -1
  154. package/_assets/{styled-DgOOcess.js → styled-BTQUnOe9.js} +1 -1
  155. package/_assets/{swaps-D-dNMnWG.js → swaps-DG1CYsom.js} +1 -1
  156. package/_assets/{thirdweb-RwyfzX2g.js → thirdweb-B9Hwq14j.js} +3 -3
  157. package/_assets/{to-serializable-transaction-B0dWSkXr.js → to-serializable-transaction-DCVAO4ip.js} +2 -2
  158. package/_assets/{transactionReceipt-B7m8-bO3.js → transactionReceipt-B_0bvfKE.js} +1 -1
  159. package/_assets/{transactions-DgH8v_XM.js → transactions-Czd1wrXY.js} +1 -1
  160. package/_assets/{useCreditPacks-vgB1sZNv.js → useCreditPacks-HpuBP-AH.js} +1 -1
  161. package/_assets/{useImportable-Dyukx66c.js → useImportable-CpMEruPm.js} +1 -1
  162. package/_assets/{useInfiniteGrid-CPmv8ezG.js → useInfiniteGrid-C2RUwZT1.js} +1 -1
  163. package/_assets/{useStore-DuwkQdft.js → useStore-fHlJJ0gI.js} +1 -1
  164. package/_assets/{useTheme-BxV5MAYV.js → useTheme-DKi7wYE-.js} +1 -1
  165. package/_assets/{verifyHash-CG9JVJuP.js → verifyHash-CauMulxX.js} +1 -1
  166. package/_assets/{w3m-modal-D5IA0mZQ.js → w3m-modal-Cv396tvJ.js} +1 -1
  167. package/_assets/{w3m-modal-CwgxcOGH.js → w3m-modal-KS1F19gd.js} +1 -1
  168. package/_assets/{wait-for-tx-receipt-ygDC8-Lg.js → wait-for-tx-receipt-Bpp3xMIw.js} +1 -1
  169. package/_assets/{wallets-2mt8pecQ.js → wallets-DeRxBeUM.js} +5 -5
  170. package/_assets/{web-connector-B3MiLEZD.js → web-connector-nprYOrsP.js} +3 -3
  171. package/_assets/{writeContract-C0oLGDl4.js → writeContract-C0Ce5aYY.js} +1 -1
  172. package/_assets/{zoraTestnet-DutpD1cF.js → zoraTestnet-FzXxeC7P.js} +1 -1
  173. package/index.html +11 -11
  174. package/package.json +2 -2
  175. package/_assets/LazyEmoteControls-DHNXGhhi.js +0 -2
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-Bxe28Q3l.js","_assets/react-BYHuwl8r.js","_assets/index-BG5saEE6.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-l2QjlKjX.css","_assets/useImportable-Dyukx66c.js","_assets/buy-D15s0U5R.js","_assets/authorizations-tHY3fIO5.js","_assets/sendMetaTransaction-Dk8-17lF.js","_assets/ManaPricingBanner.styles-BL6Fe7uT.js","_assets/Faq-CZP7_2cD.js","_assets/field.styles-D166p6oG.js"])))=>i.map(i=>d[i]);
2
- import{q as It,bF as At,v as z,l as A,bG as $t,t as s,s as l,x as Lt,B as Et,y as Pt,b as c,an as Tt,I as $,bH as et,bI as it,bJ as Nt,_ as St,A as P,bK as Ct,D as Ft,aF as O,L as Dt,bL as Mt,F as Ht,bM as qt,bN as W}from"./index-BG5saEE6.js";import{r as g,u as Rt,j as e,L as rt,e as zt}from"./react-BYHuwl8r.js";import{u as Ot}from"./useImportable-Dyukx66c.js";import{L as Wt}from"./LoadMore-CQIEBXEe.js";import{u as L}from"./useInfiniteGrid-CPmv8ezG.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-D15s0U5R.js";import"./authorizations-tHY3fIO5.js";import"./sendMetaTransaction-Dk8-17lF.js";const _t=15e3;function Gt(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=_t}function Bt(t){const n=[...t].sort((i,r)=>r.createdAt-i.createdAt),a=[];for(const i of n){const r=a[a.length-1];r&&Gt(r[r.length-1],i)?r.push(i):a.push([i])}return a.map(i=>{var r;return{id:((r=i.find(o=>o.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Kt(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Kt(t){return t.some(n=>n.status==="PENDING")?"PENDING":t.some(n=>n.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ut(t){return t==="SETTLED"?"SETTLED":t==="EXPIRED"?"FAILED":"PENDING"}function Qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function Xt(t){const n=[],a=new Map;for(const i of t){const r=Qt(i);if(!r){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(r);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(r,h),n.push(h)}return n}function Vt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?It(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Yt(t){return t.status!=="EXPIRED"||!!t.submittedTxHash}function Jt(t){const a=Bt(t.purchases.filter(Yt)).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=t.sales.map(d=>{const x=Vt(d,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(t.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),o=new Set(t.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(d=>!o.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...a,...i,...r,...h].sort((d,x)=>x.createdAt-d.createdAt||(d.id<x.id?-1:1))}function Zt(t,n){return n==="all"?t:n==="sales"?t.filter(a=>a.kind==="sale"):t.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ct=t=>t.trim().toLowerCase();function te(t){const n=new Map;for(const a of t??[]){const i=ct(a.txHash??"");if(!i)continue;const r=n.get(i);r?r.push(a):n.set(i,[a])}return n}function ee(t,n,a=Date.now()){const i=n.txHash?t.get(ct(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?ie(i[0].netCents):null,o=i.filter(d=>!d.available&&d.availableAt>a);if(o.length===0)return{kind:"credited",credits:r};const h=o.reduce((d,x)=>Math.max(d,x.availableAt),0);return{kind:"pending",credits:r,availableAt:h}}function ie(t){return At(t)}function ne(){const t=z(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:n,isLoading:a}=A({queryKey:["listing-count",t],queryFn:()=>$t({creator:t,onSale:!0,first:1}),enabled:!!t,staleTime:5*6e4});return{count:n==null?void 0:n.total,isLoading:a}}const se="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/credits-product-vs4Q6u6l.svg",_=Lt`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-CBvsGOvJ.js","_assets/react-BYHuwl8r.js","_assets/index-DCg5FbqY.js","_assets/dcl-schemas-CmtP3U6y.js","_assets/sentry-Dx-KuLV3.js","_assets/ethers-BDpbhgX6.js","_assets/intl-CBcMB1D2.js","_assets/index-l2QjlKjX.css","_assets/useImportable-CpMEruPm.js","_assets/buy-D2J4xdFU.js","_assets/authorizations-C2XcFris.js","_assets/sendMetaTransaction-Bs_mS_PM.js","_assets/ManaPricingBanner.styles-COkmJnom.js","_assets/Faq-DNITaJGZ.js","_assets/field.styles-CMTqm8XT.js"])))=>i.map(i=>d[i]);
2
+ import{q as It,bF as At,v as z,l as A,bG as $t,t as s,s as l,x as Lt,B as Et,y as Pt,b as c,an as Tt,I as $,bH as et,bI as it,bJ as Nt,_ as St,A as P,bK as Ct,D as Ft,aF as O,L as Dt,bL as Mt,F as Ht,bM as qt,bN as W}from"./index-DCg5FbqY.js";import{r as g,u as Rt,j as e,L as rt,e as zt}from"./react-BYHuwl8r.js";import{u as Ot}from"./useImportable-CpMEruPm.js";import{L as Wt}from"./LoadMore-CuEUCjRg.js";import{u as L}from"./useInfiniteGrid-C2RUwZT1.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./buy-D2J4xdFU.js";import"./authorizations-C2XcFris.js";import"./sendMetaTransaction-Bs_mS_PM.js";const _t=15e3;function Gt(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=_t}function Bt(t){const n=[...t].sort((i,r)=>r.createdAt-i.createdAt),a=[];for(const i of n){const r=a[a.length-1];r&&Gt(r[r.length-1],i)?r.push(i):a.push([i])}return a.map(i=>{var r;return{id:((r=i.find(o=>o.txHash))==null?void 0:r.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(o=>o.createdAt)),status:Kt(i),totalCredits:i.reduce((o,h)=>o+h.credits,0),lines:i}})}function Kt(t){return t.some(n=>n.status==="PENDING")?"PENDING":t.some(n=>n.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ut(t){return t==="SETTLED"?"SETTLED":t==="EXPIRED"?"FAILED":"PENDING"}function Qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function Xt(t){const n=[],a=new Map;for(const i of t){const r=Qt(i);if(!r){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const o=a.get(r);if(o){o.quantity+=1,o.credits+=i.credits;continue}const h={key:r,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};a.set(r,h),n.push(h)}return n}function Vt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?It(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Yt(t){return t.status!=="EXPIRED"||!!t.submittedTxHash}function Jt(t){const a=Bt(t.purchases.filter(Yt)).map(d=>({kind:"purchase",id:`purchase:${d.id}`,createdAt:d.createdAt,order:d})),i=t.sales.map(d=>{const x=Vt(d,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),r=(t.creditOrders??[]).filter(d=>d.status!=="failed"&&d.status!=="abandoned").map(d=>({kind:"credit",id:`credit:${d.id}`,createdAt:d.createdAt,order:d})),o=new Set(t.purchases.filter(d=>d.txHash).map(d=>d.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(d=>!o.has(d.txHash.toLowerCase())).map(d=>({kind:"mana-purchase",id:`mana-purchase:${d.id}`,createdAt:d.createdAt,sale:d}));return[...a,...i,...r,...h].sort((d,x)=>x.createdAt-d.createdAt||(d.id<x.id?-1:1))}function Zt(t,n){return n==="all"?t:n==="sales"?t.filter(a=>a.kind==="sale"):t.filter(a=>a.kind==="purchase"||a.kind==="credit"||a.kind==="mana-purchase")}const ct=t=>t.trim().toLowerCase();function te(t){const n=new Map;for(const a of t??[]){const i=ct(a.txHash??"");if(!i)continue;const r=n.get(i);r?r.push(a):n.set(i,[a])}return n}function ee(t,n,a=Date.now()){const i=n.txHash?t.get(ct(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const r=i.length===1?ie(i[0].netCents):null,o=i.filter(d=>!d.available&&d.availableAt>a);if(o.length===0)return{kind:"credited",credits:r};const h=o.reduce((d,x)=>Math.max(d,x.availableAt),0);return{kind:"pending",credits:r,availableAt:h}}function ie(t){return At(t)}function ne(){const t=z(i=>{var r;return(r=i.session)==null?void 0:r.address}),{data:n,isLoading:a}=A({queryKey:["listing-count",t],queryFn:()=>$t({creator:t,onSale:!0,first:1}),enabled:!!t,staleTime:5*6e4});return{count:n==null?void 0:n.total,isLoading:a}}const se="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/credits-product-vs4Q6u6l.svg",_=Lt`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,ae=l.section`
@@ -375,4 +375,4 @@ import{q as It,bF as At,v as z,l as A,bG as $t,t as s,s as l,x as Lt,B as Et,y a
375
375
  color: ${s.colors.softWhite};
376
376
  `,be=l(Et)`
377
377
  margin-top: 12px;
378
- `,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-Bxe28Q3l.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.ImportListings}))),E=24,ve=["all","purchases","sales"],q="section",at="listings",R="view",je="migrate";function I(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function mt(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function gt({children:t}){const n=g.useRef(null),[a,i]=g.useState(null),r=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return e.jsxs(xe,{ref:n,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[t,a?zt.createPortal(e.jsx(me,{style:{top:a.top,left:a.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function ke({item:t}){const n=!!t.contractAddress&&!!t.itemId,a=!!t.tradeId||n,{data:i,isLoading:r}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?qt(t.tradeId):W(t.contractAddress,{itemId:t.itemId}),enabled:a,staleTime:5*6e4}),o=a&&r,h=(i==null?void 0:i.name)??c("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",x=O({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=e.jsxs(e.Fragment,{children:[o?e.jsx(K,{}):e.jsx(B,{children:d?e.jsx("img",{src:d,alt:h}):e.jsx($,{name:"cart",size:20})}),e.jsxs(U,{children:[o?e.jsx(X,{}):e.jsx(Q,{title:h,children:h}),t.quantity>1?e.jsx(V,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(fe,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(Y,{to:x,"data-link":"true",children:f}):e.jsx(H,{children:f})}function we({order:t}){const n=Xt(t.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ut(t.status),r=i==="SETTLED"?c("activity.completed"):i==="FAILED"?c("activity.failed"):c("activity.processing");return e.jsxs(T,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:a})]})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":i,children:r}),e.jsxs(k,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),i==="FAILED"?e.jsx(ge,{children:c("activity.purchaseFailedNote")}):null,e.jsx(G,{children:n.map(o=>e.jsx(ke,{item:o},o.key))})]})}function Ie({sale:t}){const{data:n,isLoading:a}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??c("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",o=O({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[a?e.jsx(K,{}):e.jsx(B,{children:r?e.jsx("img",{src:r,alt:i}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[a?e.jsx(X,{}):e.jsx(Q,{title:i,children:i}),e.jsx(V,{children:c("activity.boughtFrom",{account:xt(t.seller)})})]})]});return e.jsxs(T,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.paidWithMana")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),e.jsxs(k,{children:[mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]})]})]}),e.jsx(G,{children:o?e.jsx(Y,{to:o,"data-link":"true",children:h}):e.jsx(H,{children:h})})]})}function Ae({sale:t,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),r=(a==null?void 0:a.name)??c("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=O({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,d=e.jsxs(e.Fragment,{children:[i?e.jsx(K,{}):e.jsx(B,{children:o?e.jsx("img",{src:o,alt:r}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[i?e.jsx(X,{}):e.jsx(Q,{title:r,children:r}),e.jsxs(V,{children:[c("activity.soldTo",{account:xt(t.counterparty)}),n.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return e.jsxs(T,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.saleLabel")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),n.kind==="direct"?e.jsxs(k,{"data-kind":"income",children:["+",mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]}):n.credits!==null?e.jsxs(k,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",Dt(n.credits)]}):e.jsx(k,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),e.jsx(G,{children:h?e.jsx(Y,{to:h,"data-link":"true",children:d}):e.jsx(H,{children:d})})]})}function $e({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,a=Ct(t.status),i=a==="SETTLED"?c("activity.completed"):a==="FAILED"?c("activity.failed"):a==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=z(p=>p.session),o=Ft(),[h,d]=g.useState(!1),x=t.status==="initiated"&&!!r;async function f(){if(!(!r||h)){d(!0);try{const p=await Mt(t.id,r.identity);if(p){window.location.href=p;return}Ht.info(c("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})}finally{d(!1)}}}return e.jsx(T,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(he,{children:e.jsx("img",{src:se,alt:"","aria-hidden":!0})}),e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:n})]})]}),e.jsxs(D,{children:[x?e.jsx(pe,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?c("activity.resuming"):c("activity.resume")}):null,e.jsx(M,{"data-status":a,children:i}),e.jsxs(k,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Le({filter:t}){const n={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(ut,{children:[e.jsx($,{name:n.icon,size:40,color:s.colors.muted2}),e.jsx(ht,{children:n.title}),e.jsx(pt,{children:n.body}),t!=="sales"?e.jsx(be,{as:rt,to:"/items",variant:"white",children:c("notFound.cta")}):null]})}function Oe(){const{session:t}=z(),[n,a]=g.useState("all"),[i,r]=Rt(),o=i.get(q)===at||i.get(R)===je;Pt({title:o?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:h}=Ot(),{count:d}=ne(),f=h!==void 0&&d!==void 0&&(h>0||d>0||o),p=!!t&&!o&&n!=="sales",m=!!t&&!o&&n!=="purchases",b=L(["purchases",t==null?void 0:t.address],u=>Nt(t.address,t.identity,{first:E,skip:u}),{enabled:p}),y=L(["sales",t==null?void 0:t.address],u=>et(t.address,{role:"seller",first:E,skip:u}),{enabled:m}),v=L(["credit-orders",t==null?void 0:t.address],u=>it(t.address,t.identity,{first:E,skip:u}),{enabled:p}),j=L(["mana-purchases",t==null?void 0:t.address],u=>et(t.address,{role:"buyer",first:E,skip:u}),{enabled:p}),{data:J}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>it(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ft=g.useMemo(()=>te(J),[J]),{data:bt}=Tt(m);if(!t)return e.jsxs(ut,{children:[e.jsx($,{name:"clock",size:40,color:s.colors.muted2}),e.jsx(ht,{children:c("activity.signInTitle")}),e.jsx(pt,{children:c("activity.signInBody")})]});const Z=Zt(Jt({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:bt}),n),yt=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,tt=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,vt=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function jt(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function kt(u){if(a(u),!o)return;const w=new URLSearchParams(i);w.delete(q),w.delete(R),r(w,{replace:!0})}function wt(){const u=new URLSearchParams(i);u.set(q,at),u.delete(R),r(u,{replace:!0})}return e.jsxs(ae,{children:[e.jsx(re,{children:e.jsx(oe,{children:c("nav.activity")})}),e.jsxs(ce,{role:"tablist","aria-label":c("nav.activity"),children:[ve.map(u=>e.jsx(dt,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>kt(u),children:c(`activity.filter.${u}`)},u)),f?e.jsxs(de,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?c("activity.migrate.chipAria",{count:h}):void 0,onClick:wt,children:[c("activity.migrate.chip"),h?e.jsx(le,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?e.jsx(g.Suspense,{fallback:e.jsx(ue,{"aria-busy":"true"}),children:e.jsx(ye,{})}):yt?e.jsx(nt,{children:Array.from({length:5}).map((u,w)=>e.jsx(st,{},w))}):Z.length===0?e.jsx(Le,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[Z.map(u=>u.kind==="purchase"?e.jsx(we,{order:u.order},u.id):u.kind==="credit"?e.jsx($e,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ie,{sale:u.sale},u.id):e.jsx(Ae,{sale:u.sale,payout:ee(ft,u.sale)},u.id)),tt?e.jsx(st,{}):null]}),e.jsx(Wt,{hasNextPage:vt,isFetching:tt,onLoadMore:jt})]})]})}export{Oe as Activity};
378
+ `,Y=H.withComponent(rt),ye=g.lazy(()=>St(()=>import("./index-CBvsGOvJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(t=>({default:t.ImportListings}))),E=24,ve=["all","purchases","sales"],q="section",at="listings",R="view",je="migrate";function I(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function xt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function mt(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function gt({children:t}){const n=g.useRef(null),[a,i]=g.useState(null),r=()=>{var h;const o=(h=n.current)==null?void 0:h.getBoundingClientRect();o&&i({top:o.bottom+8,left:o.left+o.width/2})};return e.jsxs(xe,{ref:n,tabIndex:0,onMouseEnter:r,onMouseLeave:()=>i(null),onFocus:r,onBlur:()=>i(null),children:[t,a?zt.createPortal(e.jsx(me,{style:{top:a.top,left:a.left},role:"tooltip",children:c("activity.polygonMana")}),document.body):null]})}function ke({item:t}){const n=!!t.contractAddress&&!!t.itemId,a=!!t.tradeId||n,{data:i,isLoading:r}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?qt(t.tradeId):W(t.contractAddress,{itemId:t.itemId}),enabled:a,staleTime:5*6e4}),o=a&&r,h=(i==null?void 0:i.name)??c("activity.itemFallback"),d=(i==null?void 0:i.thumbnail)??"",x=O({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=e.jsxs(e.Fragment,{children:[o?e.jsx(K,{}):e.jsx(B,{children:d?e.jsx("img",{src:d,alt:h}):e.jsx($,{name:"cart",size:20})}),e.jsxs(U,{children:[o?e.jsx(X,{}):e.jsx(Q,{title:h,children:h}),t.quantity>1?e.jsx(V,{children:c("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(fe,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(Y,{to:x,"data-link":"true",children:f}):e.jsx(H,{children:f})}function we({order:t}){const n=Xt(t.lines),a=n.reduce((o,h)=>o+h.quantity,0),i=Ut(t.status),r=i==="SETTLED"?c("activity.completed"):i==="FAILED"?c("activity.failed"):c("activity.processing");return e.jsxs(T,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.purchaseLabel")," · ",c("activity.itemCount",{count:a})]})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":i,children:r}),e.jsxs(k,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),i==="FAILED"?e.jsx(ge,{children:c("activity.purchaseFailedNote")}):null,e.jsx(G,{children:n.map(o=>e.jsx(ke,{item:o},o.key))})]})}function Ie({sale:t}){const{data:n,isLoading:a}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??c("activity.itemFallback"),r=(n==null?void 0:n.thumbnail)??"",o=O({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[a?e.jsx(K,{}):e.jsx(B,{children:r?e.jsx("img",{src:r,alt:i}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[a?e.jsx(X,{}):e.jsx(Q,{title:i,children:i}),e.jsx(V,{children:c("activity.boughtFrom",{account:xt(t.seller)})})]})]});return e.jsxs(T,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.paidWithMana")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":"SETTLED",children:c("activity.completed")}),e.jsxs(k,{children:[mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]})]})]}),e.jsx(G,{children:o?e.jsx(Y,{to:o,"data-link":"true",children:h}):e.jsx(H,{children:h})})]})}function Ae({sale:t,payout:n}){const{data:a,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>W(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),r=(a==null?void 0:a.name)??c("activity.itemFallback"),o=(a==null?void 0:a.thumbnail)??"",h=O({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,d=e.jsxs(e.Fragment,{children:[i?e.jsx(K,{}):e.jsx(B,{children:o?e.jsx("img",{src:o,alt:r}):e.jsx($,{name:"offer",size:20})}),e.jsxs(U,{children:[i?e.jsx(X,{}):e.jsx(Q,{title:r,children:r}),e.jsxs(V,{children:[c("activity.soldTo",{account:xt(t.counterparty)}),n.kind==="pending"?` · ${c("activity.payoutPendingOn",{date:I(n.availableAt)})}`:""]})]})]});return e.jsxs(T,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsx(F,{children:c("activity.saleLabel")})]}),e.jsxs(D,{children:[e.jsx(M,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?c("activity.payoutPending"):c("activity.sold")}),n.kind==="direct"?e.jsxs(k,{"data-kind":"income",children:["+",mt(t.manaWei)," ",e.jsx(gt,{children:e.jsx(lt,{src:ot,alt:"MANA"})})]}):n.credits!==null?e.jsxs(k,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",Dt(n.credits)]}):e.jsx(k,{"data-kind":"income",children:c("activity.payoutCredited")})]})]}),e.jsx(G,{children:h?e.jsx(Y,{to:h,"data-link":"true",children:d}):e.jsx(H,{children:d})})]})}function $e({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,a=Ct(t.status),i=a==="SETTLED"?c("activity.completed"):a==="FAILED"?c("activity.failed"):a==="UNFINISHED"?c("activity.unfinished"):c("activity.processing"),r=z(p=>p.session),o=Ft(),[h,d]=g.useState(!1),x=t.status==="initiated"&&!!r;async function f(){if(!(!r||h)){d(!0);try{const p=await Mt(t.id,r.identity);if(p){window.location.href=p;return}Ht.info(c("activity.resumeExpired")),o.invalidateQueries({queryKey:["credit-orders"]})}finally{d(!1)}}}return e.jsx(T,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(he,{children:e.jsx("img",{src:se,alt:"","aria-hidden":!0})}),e.jsxs(S,{children:[e.jsx(C,{children:I(t.createdAt)}),e.jsxs(F,{children:[c("activity.creditPurchaseLabel")," · ",c("activity.creditPaid",{usd:n})]})]}),e.jsxs(D,{children:[x?e.jsx(pe,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?c("activity.resuming"):c("activity.resume")}):null,e.jsx(M,{"data-status":a,children:i}),e.jsxs(k,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Le({filter:t}){const n={all:{icon:"clock",title:c("activity.emptyAllTitle"),body:c("activity.emptyAllBody")},purchases:{icon:"cart",title:c("activity.emptyPurchasesTitle"),body:c("activity.emptyPurchasesBody")},sales:{icon:"offer",title:c("activity.emptySalesTitle"),body:c("activity.emptySalesBody")}}[t];return e.jsxs(ut,{children:[e.jsx($,{name:n.icon,size:40,color:s.colors.muted2}),e.jsx(ht,{children:n.title}),e.jsx(pt,{children:n.body}),t!=="sales"?e.jsx(be,{as:rt,to:"/items",variant:"white",children:c("notFound.cta")}):null]})}function Oe(){const{session:t}=z(),[n,a]=g.useState("all"),[i,r]=Rt(),o=i.get(q)===at||i.get(R)===je;Pt({title:o?c("seo.import.title"):c("nav.activity"),noindex:!0});const{count:h}=Ot(),{count:d}=ne(),f=h!==void 0&&d!==void 0&&(h>0||d>0||o),p=!!t&&!o&&n!=="sales",m=!!t&&!o&&n!=="purchases",b=L(["purchases",t==null?void 0:t.address],u=>Nt(t.address,t.identity,{first:E,skip:u}),{enabled:p}),y=L(["sales",t==null?void 0:t.address],u=>et(t.address,{role:"seller",first:E,skip:u}),{enabled:m}),v=L(["credit-orders",t==null?void 0:t.address],u=>it(t.address,t.identity,{first:E,skip:u}),{enabled:p}),j=L(["mana-purchases",t==null?void 0:t.address],u=>et(t.address,{role:"buyer",first:E,skip:u}),{enabled:p}),{data:J}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>it(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:m,staleTime:6e4}),ft=g.useMemo(()=>te(J),[J]),{data:bt}=Tt(m);if(!t)return e.jsxs(ut,{children:[e.jsx($,{name:"clock",size:40,color:s.colors.muted2}),e.jsx(ht,{children:c("activity.signInTitle")}),e.jsx(pt,{children:c("activity.signInBody")})]});const Z=Zt(Jt({purchases:p?b.items:[],sales:m?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:bt}),n),yt=p&&(b.isLoading||v.isLoading||j.isLoading)||m&&y.isLoading,tt=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||m&&y.isFetchingNextPage,vt=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||m&&y.hasNextPage;function jt(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),m&&y.hasNextPage&&y.fetchNextPage()}function kt(u){if(a(u),!o)return;const w=new URLSearchParams(i);w.delete(q),w.delete(R),r(w,{replace:!0})}function wt(){const u=new URLSearchParams(i);u.set(q,at),u.delete(R),r(u,{replace:!0})}return e.jsxs(ae,{children:[e.jsx(re,{children:e.jsx(oe,{children:c("nav.activity")})}),e.jsxs(ce,{role:"tablist","aria-label":c("nav.activity"),children:[ve.map(u=>e.jsx(dt,{type:"button",role:"tab","aria-selected":!o&&n===u,"data-active":!o&&n===u,"data-testid":`activity-filter-${u}`,onClick:()=>kt(u),children:c(`activity.filter.${u}`)},u)),f?e.jsxs(de,{type:"button",role:"tab","aria-selected":o,"data-active":o,"data-testid":"activity-filter-migrate","aria-label":h?c("activity.migrate.chipAria",{count:h}):void 0,onClick:wt,children:[c("activity.migrate.chip"),h?e.jsx(le,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),o?e.jsx(g.Suspense,{fallback:e.jsx(ue,{"aria-busy":"true"}),children:e.jsx(ye,{})}):yt?e.jsx(nt,{children:Array.from({length:5}).map((u,w)=>e.jsx(st,{},w))}):Z.length===0?e.jsx(Le,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[Z.map(u=>u.kind==="purchase"?e.jsx(we,{order:u.order},u.id):u.kind==="credit"?e.jsx($e,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ie,{sale:u.sale},u.id):e.jsx(Ae,{sale:u.sale,payout:ee(ft,u.sale)},u.id)),tt?e.jsx(st,{}):null]}),e.jsx(Wt,{hasNextPage:vt,isFetching:tt,onLoadMore:jt})]})]})}export{Oe as Activity};
@@ -1,4 +1,4 @@
1
- import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-BG5saEE6.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
1
+ import{r as u,j as m}from"./react-BYHuwl8r.js";import{s as d}from"./index-DCg5FbqY.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const P="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/custom-welcome-background-BxlFQma9.webp",L="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/DCL_LogoPattern-BryBPc3d.png",D=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -1,4 +1,4 @@
1
- import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}from"./useUrlFilters-DH-gxdfV.js";import{u as tt,S as Le,R as nt,F as st,e as it}from"./categories-gDlRucVv.js";import{c as O,r as ot,aK as at,aL as rt,aR as lt,a as ct,l as dt,ch as ht,ci as pt,s,t,v as Be,aA as ft,D as mt,L as ge,b as n,z as ut,I as S,A as P,cj as ie,ax as xt,Z as ne,aP as gt,aO as yt,y as Pe,an as He,q as Ue,w as bt,ac as wt,ap as Te,aq as V,aZ as Ct,bD as vt}from"./index-BG5saEE6.js";import{R as jt,S as $t,a as kt,D as St,b as Et,C as Lt,c as Tt,F as Rt,d as _t,e as Mt,M as Ft,u as At,g as Nt,v as It,E as zt,h as Wt,f as Bt,i as Pt,j as Ht}from"./Assets.styles-CLQKfUGn.js";import{L as Ut}from"./LoadMore-CQIEBXEe.js";import{u as Ot}from"./useInfiniteGrid-CPmv8ezG.js";import{E as Gt}from"./ErrorNotice-ZO3VddUA.js";import{d as Dt}from"./dcl-schemas-CmtP3U6y.js";import{s as Zt,G as qt,w as Vt,S as Kt}from"./buy-gasless-DmLq_ESf.js";import{s as Qt,j as Jt}from"./buy-D15s0U5R.js";import{f as Xt}from"./errors-QU1ZKsgr.js";import{J as Yt,C as en,B as ye}from"./ethers-BDpbhgX6.js";import{n as tn}from"./Tooltip-CvreJNab.js";import{G as nn}from"./grid.styles-BCyzN-Pc.js";import"./skeleton.styles-CV7fqHt3.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-tHY3fIO5.js";import"./sendMetaTransaction-Dk8-17lF.js";function K(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const G="100000000000000000000",Oe=2,se=15,sn=/^[a-zA-Z0-9]+$/;function Re(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:sn.test(a)?a.length<Oe?{ok:!1,reason:"too-short"}:a.length>se?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function on(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,se)}const an=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return O.chainId===Number(Dt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function ln(i,a={}){var m;const{rpc:o,address:h}=rn(),p=new Yt(o),x=new en(h,an,p);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${o}`);const l=await x.available(i);if((m=a.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${l}`),l?"available":"taken"}const cn="https://app.across.to/api";class Ce extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class be extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class we extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function dn(i){return lt(G,i)}async function hn(i,a,o={}){var m;const h=o.chainId??O.chainId,p=o.provider??"across",x=`${O.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${h}&provider=${p}`,l=await ct(x,{method:"GET",identity:i,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new Ce:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function pn(i,a){const o=ye.from(i.availableAmount),p=ye.from(G).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Jt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:p.isNegative()?"0":p.toString(),maxCreditedValue:G}}async function fn(i,a={}){const o=cn,h=a.intervalMs??1e4,p=a.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<p;l++){try{const m=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(m.ok){const c=await m.json(),d=(c.status??"pending").toLowerCase(),w=c.fillTx??c.fillTxnRef??null,y=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(d==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(d==="refunded"||d==="expired")return{status:d,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}l<p-1&&await new Promise(m=>setTimeout(m,h))}return x}async function mn(i){const{name:a,identity:o,signer:h}=i,p=i.chainId??O.chainId,x=i.provider??"across",l=(i.beneficiary??await h.getAddress()).toLowerCase();let m=null,c="unconfirmed";console.info("[names] register start",{name:a,buyer:l,chainId:p,provider:x});try{const d=await ot(p),w=dn(d);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:d});const y=await hn(o,a,{chainId:p,provider:x});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const j=await at(o,w);if(m=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),ye.from(j.maxCreditedValue).lt(G))throw new Error("Credit under-sized for the name price");const v=pn(j.credit,y);let g;try{g=await Zt({chainId:p,buyer:l,signer:h,args:v})}catch(b){if(!(b instanceof qt))throw b;if(b.reason==="relayer-unreachable"){c="unobservable";const $=new we;throw $.cause=b,$}g=await Qt(p,v,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await Vt(g),c="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),x==="across"){const b=await fn(g,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new be;return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(d){if(console.error("[names] register failed — raw error:",d,{name:a,buyer:l,originState:c}),d instanceof Kt)return{status:"pending",originTxHash:d.txHash};if(m&&c==="unconfirmed"&&await rt(o,[m]).catch(()=>{}),d instanceof Ce||d instanceof be||d instanceof we)throw d;const w=new Error(Xt(d,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=d,w}}function un(){const{data:i}=dt({queryKey:["feature-flag","shop-names"],queryFn:()=>ht(pt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return i===!0}const xn=60,gn=700,yn=25;function bn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:xn});a[a.length-1]={text:i,delay:gn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:yn});return a}function wn(i){return i.flatMap(bn)}function Cn(i,a){const o=u.useMemo(()=>wn(i),[i]),[h,p]=u.useState(0);return u.useEffect(()=>{if(!a||o.length===0)return;const x=setTimeout(()=>p(l=>(l+1)%o.length),o[h%o.length].delay);return()=>clearTimeout(x)},[h,a,o]),!a||o.length===0?"":o[h%o.length].text}const vn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",jn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/name-verified-oGwQ3ntb.svg",$n="#34fee6",kn=s.div`
1
+ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}from"./useUrlFilters-DH-gxdfV.js";import{u as tt,S as Le,R as nt,F as st,e as it}from"./categories-CXp3c1O6.js";import{c as O,r as ot,aK as at,aL as rt,aR as lt,a as ct,l as dt,ch as ht,ci as pt,s,t,v as Be,aA as ft,D as mt,L as ge,b as n,z as ut,I as S,A as P,cj as ie,ax as xt,Z as ne,aP as gt,aO as bt,y as Pe,an as He,q as Ue,w as yt,ac as wt,ap as Te,aq as V,aZ as Ct,bD as vt}from"./index-DCg5FbqY.js";import{R as jt,S as $t,a as kt,D as St,b as Et,C as Lt,c as Tt,F as Rt,d as _t,e as Mt,M as Ft,u as At,g as Nt,v as It,E as zt,h as Wt,f as Bt,i as Pt,j as Ht}from"./Assets.styles-o3ITauMT.js";import{L as Ut}from"./LoadMore-CuEUCjRg.js";import{u as Ot}from"./useInfiniteGrid-C2RUwZT1.js";import{E as Gt}from"./ErrorNotice-C0G5qWzo.js";import{d as Dt}from"./dcl-schemas-CmtP3U6y.js";import{s as Zt,G as qt,w as Vt,S as Kt}from"./buy-gasless-DXZhAZul.js";import{s as Qt,j as Jt}from"./buy-D2J4xdFU.js";import{f as Xt}from"./errors-CwhExOnR.js";import{J as Yt,C as en,B as be}from"./ethers-BDpbhgX6.js";import{n as tn}from"./Tooltip-CaglQe4p.js";import{G as nn}from"./grid.styles-BCdYXc8S.js";import"./skeleton.styles-DLM-pTFu.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-C2XcFris.js";import"./sendMetaTransaction-Bs_mS_PM.js";function K(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const G="100000000000000000000",Oe=2,se=15,sn=/^[a-zA-Z0-9]+$/;function Re(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:sn.test(a)?a.length<Oe?{ok:!1,reason:"too-short"}:a.length>se?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function on(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,se)}const an=["function available(string _subdomain) view returns (bool)"],_e={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return O.chainId===Number(Dt.ChainId.MATIC_MAINNET)?_e.mainnet:_e.sepolia}async function ln(i,a={}){var m;const{rpc:o,address:h}=rn(),p=new Yt(o),x=new en(h,an,p);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${o}`);const l=await x.available(i);if((m=a.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${l}`),l?"available":"taken"}const cn="https://app.across.to/api";class Ce extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class ye extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class we extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function dn(i){return lt(G,i)}async function hn(i,a,o={}){var m;const h=o.chainId??O.chainId,p=o.provider??"across",x=`${O.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${h}&provider=${p}`,l=await ct(x,{method:"GET",identity:i,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new Ce:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function pn(i,a){const o=be.from(i.availableAmount),p=be.from(G).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Jt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:p.isNegative()?"0":p.toString(),maxCreditedValue:G}}async function fn(i,a={}){const o=cn,h=a.intervalMs??1e4,p=a.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<p;l++){try{const m=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(m.ok){const c=await m.json(),d=(c.status??"pending").toLowerCase(),w=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(d==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:b};if(d==="refunded"||d==="expired")return{status:d,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:w,actionsSucceeded:b}}}catch{}l<p-1&&await new Promise(m=>setTimeout(m,h))}return x}async function mn(i){const{name:a,identity:o,signer:h}=i,p=i.chainId??O.chainId,x=i.provider??"across",l=(i.beneficiary??await h.getAddress()).toLowerCase();let m=null,c="unconfirmed";console.info("[names] register start",{name:a,buyer:l,chainId:p,provider:x});try{const d=await ot(p),w=dn(d);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:d});const b=await hn(o,a,{chainId:p,provider:x});console.info("[names] step 2/6 route fetched",{target:b.externalCall.target,selector:b.externalCall.selector,provider:b.provider,quoteId:b.quoteId});const j=await at(o,w);if(m=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(G))throw new Error("Credit under-sized for the name price");const v=pn(j.credit,b);let g;try{g=await Zt({chainId:p,buyer:l,signer:h,args:v})}catch(y){if(!(y instanceof qt))throw y;if(y.reason==="relayer-unreachable"){c="unobservable";const $=new we;throw $.cause=y,$}g=await Qt(p,v,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await Vt(g),c="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),x==="across"){const y=await fn(g,i.acrossPoll);if(console.info("[names] step 6/6 across status",y),y.status==="pending")return{status:"pending",originTxHash:g};if(y.status==="filled"&&y.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(y.status!=="filled"||y.actionsSucceeded!==!0)throw new ye;return{status:"registered",originTxHash:g,destinationTxHash:y.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(d){if(console.error("[names] register failed — raw error:",d,{name:a,buyer:l,originState:c}),d instanceof Kt)return{status:"pending",originTxHash:d.txHash};if(m&&c==="unconfirmed"&&await rt(o,[m]).catch(()=>{}),d instanceof Ce||d instanceof ye||d instanceof we)throw d;const w=new Error(Xt(d,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=d,w}}function un(){const{data:i}=dt({queryKey:["feature-flag","shop-names"],queryFn:()=>ht(pt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return i===!0}const xn=60,gn=700,bn=25;function yn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:xn});a[a.length-1]={text:i,delay:gn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:bn});return a}function wn(i){return i.flatMap(yn)}function Cn(i,a){const o=u.useMemo(()=>wn(i),[i]),[h,p]=u.useState(0);return u.useEffect(()=>{if(!a||o.length===0)return;const x=setTimeout(()=>p(l=>(l+1)%o.length),o[h%o.length].delay);return()=>clearTimeout(x)},[h,a,o]),!a||o.length===0?"":o[h%o.length].text}const vn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",jn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/name-verified-oGwQ3ntb.svg",$n="#34fee6",kn=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -432,7 +432,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
432
432
  color: ${t.colors.accent};
433
433
  }
434
434
  }
435
- `;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=mt(),m=We(),[c,d]=u.useState("confirm"),[w,y]=u.useState(""),[j,v]=u.useState(null),[g,b]=u.useState(!1),$=u.useRef(!1),_=w.trim().toLowerCase()===i.toLowerCase(),T=c==="completing",k=a!=null?ge(a):"—",F=a==null,N=p==null?void 0:p.credits,z=a!=null&&N!=null?a-N:0,M=z>0,I=F?n("names.priceUnavailable"):M?n("names.insufficientCredits",{credits:ge(z)}):null;u.useEffect(()=>{const f=L=>{L.key==="Escape"&&!T&&o()};document.addEventListener("keydown",f);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=C}},[T,o]);async function R(){if(!(!h||!_||F||M||$.current)){$.current=!0,d("completing"),v(null);try{const f=await mn({name:i,identity:h.identity,signer:h.signer});ne("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:f.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),d(f.status==="registered"?"success":"pending")}catch(f){ne(yt(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(f),purchase_type:"name"});const C=f instanceof be,L=f instanceof we;v(f instanceof Ce?n("names.errorRouteCost"):C?n("names.errorNotRegistered"):L?n("names.errorSettlementUnknown"):(f==null?void 0:f.message)||n("names.errorGeneric")),b(C||L),d("error")}finally{$.current=!1}}}const H=c!=="success"&&c!=="pending",E=ut(h==null?void 0:h.providerType);return e.jsx(kn,{onClick:T?void 0:o,role:"presentation",children:e.jsxs(Sn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:f=>f.stopPropagation(),children:[H&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(re,{onClick:o,disabled:T,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(xe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),g?e.jsx(ue,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(ue,{onClick:()=>d("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{children:n("names.confirmTitle")}),e.jsx(Fn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:w,onChange:f=>y(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),I?e.jsxs(xe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:I})]}):null,e.jsx(ue,{onClick:()=>void R(),disabled:!_||!h||F||M,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Bn,{src:xt,alt:"",width:56,height:56}),e.jsx(Pn,{children:E?n("names.confirming"):n("names.completing")}),e.jsxs(Hn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{children:"1/1"})]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.pendingHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(xe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsx(Fe,{children:e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.successHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(Zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsxs(En,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:vn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Tn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(Rn,{src:jn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsxs(Fe,{children:[e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:O.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(i){return i.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[a])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191620721.commit-720133f/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=s.div`
435
+ `;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=mt(),m=We(),[c,d]=u.useState("confirm"),[w,b]=u.useState(""),[j,v]=u.useState(null),[g,y]=u.useState(!1),$=u.useRef(!1),_=w.trim().toLowerCase()===i.toLowerCase(),T=c==="completing",k=a!=null?ge(a):"—",F=a==null,N=p==null?void 0:p.credits,z=a!=null&&N!=null?a-N:0,M=z>0,I=F?n("names.priceUnavailable"):M?n("names.insufficientCredits",{credits:ge(z)}):null;u.useEffect(()=>{const f=L=>{L.key==="Escape"&&!T&&o()};document.addEventListener("keydown",f);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=C}},[T,o]);async function R(){if(!(!h||!_||F||M||$.current)){$.current=!0,d("completing"),v(null);try{const f=await mn({name:i,identity:h.identity,signer:h.signer});ne("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:f.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),d(f.status==="registered"?"success":"pending")}catch(f){ne(bt(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(f),purchase_type:"name"});const C=f instanceof ye,L=f instanceof we;v(f instanceof Ce?n("names.errorRouteCost"):C?n("names.errorNotRegistered"):L?n("names.errorSettlementUnknown"):(f==null?void 0:f.message)||n("names.errorGeneric")),y(C||L),d("error")}finally{$.current=!1}}}const H=c!=="success"&&c!=="pending",E=ut(h==null?void 0:h.providerType);return e.jsx(kn,{onClick:T?void 0:o,role:"presentation",children:e.jsxs(Sn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:f=>f.stopPropagation(),children:[H&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(re,{onClick:o,disabled:T,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(xe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),g?e.jsx(ue,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(ue,{onClick:()=>d("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{children:n("names.confirmTitle")}),e.jsx(Fn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:w,onChange:f=>b(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),I?e.jsxs(xe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:I})]}):null,e.jsx(ue,{onClick:()=>void R(),disabled:!_||!h||F||M,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Bn,{src:xt,alt:"",width:56,height:56}),e.jsx(Pn,{children:E?n("names.confirming"):n("names.completing")}),e.jsxs(Hn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{children:"1/1"})]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.pendingHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(xe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsx(Fe,{children:e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.successHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(Zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsxs(En,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:vn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Tn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(Rn,{src:jn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(me,{children:[e.jsx(P,{}),k]})]}),e.jsxs(Fe,{children:[e.jsx(Ae,{onClick:()=>{o(),m("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:O.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(i){return i.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[a])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.3.1-31191682385.commit-b61dc4f/_assets/invite-icon-Bz6lCTuB.svg",Yn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",es=s.div`
436
436
  width: 100%;
437
437
  min-width: 0;
438
438
  `,ts=s.nav`
@@ -647,7 +647,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
647
647
  ${t.media.maxWidth("mobile")} {
648
648
  font-size: 16px;
649
649
  }
650
- `,ys=s.span`
650
+ `,bs=s.span`
651
651
  flex: none;
652
652
  /* Flush against the name: "yourname.dcl.eth" has to read as one address, and at 20px even a couple of
653
653
  pixels here look like a space someone typed by mistake. */
@@ -664,7 +664,7 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
664
664
  ${t.media.maxWidth("mobile")} {
665
665
  font-size: 16px;
666
666
  }
667
- `,bs=s.span`
667
+ `,ys=s.span`
668
668
  flex: none;
669
669
  font-family: ${t.font.sans};
670
670
  font-size: 14px;
@@ -892,4 +892,4 @@ import{r as u,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}fr
892
892
  clip: rect(0, 0, 0, 0);
893
893
  white-space: nowrap;
894
894
  border: 0;
895
- `,_s="https://docs.decentraland.org/creator/worlds/about/",Ms="https://governance.decentraland.org";function Ie(i){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function Fs({onBack:i}){Pe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Be(),h=un(),{data:p}=He(),x=p?Ue(G,p):null,[l,m]=u.useState(""),[c,d]=u.useState("idle"),[w,y]=u.useState(!1),[j,v]=u.useState(!1),[g,b]=u.useState(()=>{var C;return typeof window<"u"&&!!((C=window.matchMedia)!=null&&C.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var W;const C=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-reduced-motion: reduce)");if(!C)return;const L=A=>b(A.matches);return C.addEventListener("change",L),()=>C.removeEventListener("change",L)},[]);const $=n("names.placeholderExamples"),_=u.useMemo(()=>$.split(",").map(C=>C.trim()).filter(Boolean),[$]),k=Cn(_,!j&&!l&&!g)||n("names.inputPlaceholder"),F=u.useRef(null),[N,z]=u.useState(void 0);u.useLayoutEffect(()=>{F.current&&z(F.current.getBoundingClientRect().width)},[l,k]),u.useEffect(()=>{if(!Re(l).ok){d(l.length===0?"idle":"invalid");return}d("checking");const L=new AbortController,W=setTimeout(()=>{(async()=>{try{const A=await ln(l,{signal:L.signal});d(A)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(W),L.abort()}},[l]);const M=Re(l),I=M.ok&&(c==="available"||c==="error"),R=h&&I,H=!h&&I;function E(){if(R){if(!a){o();return}y(!0)}}const f=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(Cs,{children:[e.jsx(P,{}),ge(x)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(as,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(us,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:C=>m(on(C.target.value)),placeholder:k,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:se,onFocus:()=>v(!0),style:{width:N!=null?`${N}px`:void 0}}),e.jsx(ps,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||k}),e.jsx(ys,{children:n("names.suffix")})]}),l.length>0?e.jsxs(bs,{"aria-hidden":!0,children:[l.length,"/",se]}):null,e.jsx(De,{onClick:E,disabled:!R,"data-testid":"names-claim",children:f})]}),c==="taken"?e.jsxs(fs,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(ms,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Q,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):H?e.jsxs(Q,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!M.ok&&M.reason==="too-short"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.tooShort",{min:Oe})}):null]}),e.jsx(ws,{onClick:E,disabled:!R,children:f}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ls,{children:[e.jsxs(J,{children:[e.jsx(X,{src:Qn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why1Title")}),e.jsx(te,{children:n("names.why1")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Jn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why2Title")}),e.jsxs(te,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Ne,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Xn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why3Title")}),e.jsx(te,{children:n("names.why3")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Yn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why4Title")}),e.jsx(te,{children:n("names.why4")}),e.jsxs(Ne,{href:Ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),w?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>y(!1)}):null]})}const As="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ze=48,Ns=["all","on_sale","not_for_sale"];function ni(){const[i]=Ye(),a=We(),o=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Pe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const p=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[x,l]=et(p),{subCategory:m,rarities:c,priceMin:d,priceMax:w,smart:y,sort:j}=x,v=x.category,g=Ns.includes(x.status)?x.status:"on_sale";tt(`${v}:${m??""}`);const[b,$]=u.useState(!1);u.useEffect(()=>{if(!b)return;const r=q=>{q.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=B}},[b]);const _=g==="on_sale",T=d&&!Number.isNaN(Number(d))?Number(d):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,F=bt(),N=m?it[m]:void 0,z=(Le.find(r=>r.key===j)??Le[0]).server,M={category:v,rarities:c.length?c:void 0,wearableCategories:N,minPriceCredits:T,maxPriceCredits:k,search:o||void 0,sortBy:z,isSmart:y||void 0,onSale:!0,listingType:F?void 0:"primary"},I={category:v,rarities:c.length?c:void 0,wearableCategories:N,search:o||void 0,sortBy:z,isWearableSmart:y||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:R,total:H,isLoading:E,isPlaceholderData:f,error:C,hasNextPage:L,isFetchingNextPage:W,isFetchNextPageError:A,fetchNextPage:Ze}=Ot(_?["shop-items",M]:["catalog-items",I],r=>_?Ct({...M,first:ze,skip:r}):vt({...I,first:ze,skip:r}),{enabled:v!=="names"}),D=H,{data:ve,isError:qe,isPending:Ve}=He(),Ke=r=>ve&&r.manaWei?Ue(r.manaWei,ve):null,Qe=_&&Ve&&R.some(r=>r.source==="legacy"),je=E||f||Qe,Je=E?15:Math.max(R.length,1),$e=u.useRef(null);u.useEffect(()=>{E||f||!o||$e.current===o||($e.current=o,ne("Shop Searched",{query:o,result_count:D}))},[o,E,f,D]);const Z=u.useRef("__init__");u.useEffect(()=>{if(E||f)return;const r=JSON.stringify({category:v,subCategory:m,rarities:c,min:T,max:k,sort:j,status:g,smart:y});if(Z.current==="__init__"||Z.current===r){Z.current=r;return}Z.current=r,ne("Shop Applied Filter",{filters:{category:v,sub_category:m,rarities:c,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:y,sort:j},result_count:D})},[v,m,c,T,k,j,g,y,E,f,D]);function ke(r){l({category:r,subCategory:null})}function Se(r){l({status:r})}function Ee(r){l({rarities:c.includes(r)?c.filter(B=>B!==r):[...c,r]})}function Xe(){l(p)}const U=[];(T!=null||k!=null)&&U.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of nt)c.includes(r)&&U.push({key:`rarity-${r}`,label:wt(r),onRemove:()=>Ee(r)});return y&&U.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),g!=="on_sale"&&U.push({key:"status",label:g==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Se("on_sale")}),e.jsxs(jt,{"data-testid":"browse",children:[v!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx($t,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(kt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.filters")}),e.jsx(Lt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Tt,{children:e.jsx(Rt,{category:v,subCategory:m,onCategory:ke,onSub:r=>l({subCategory:r}),priceMin:d,priceMax:w,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Ee,status:g,onStatus:Se,smart:y,onSmart:r=>l({smart:r})})}),e.jsx(_t,{children:e.jsx(Mt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ft,{children:v==="names"?e.jsx(Fs,{onBack:()=>ke("all")}):e.jsxs(e.Fragment,{children:[e.jsx(st,{sort:j,onSort:r=>l({sort:r}),total:H,loading:E||f,query:o,onOpenFilters:()=>$(!0),chips:U,onClearChips:Xe}),qe&&_&&R.some(r=>r.source==="legacy")?e.jsx(At,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,C?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!je&&R.length===0&&!C?e.jsxs(Nt,{"data-testid":"browse-empty",children:[e.jsx(It,{src:As,alt:""}),e.jsxs(zt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Bt,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Ht,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(nn,{"data-testid":"grid",children:je?e.jsx(Te,{count:Je}):e.jsxs(e.Fragment,{children:[R.map(r=>{if(!_)return e.jsx(V,{item:r,mode:"view"},K(r));const B=r;if(B.source!=="legacy")return e.jsx(V,{item:r},K(r));const q=Ke(B);return q==null?e.jsx(V,{item:r,mode:"view"},K(r)):e.jsx(V,{item:{...B,priceCredits:q}},K(r))}),W?e.jsx(Te,{count:6}):null]})}),e.jsx(Ut,{hasNextPage:L,isFetching:W,isError:A,onLoadMore:()=>void Ze()})]})]})})]})}export{ni as Assets};
895
+ `,_s="https://docs.decentraland.org/creator/worlds/about/",Ms="https://governance.decentraland.org";function Ie(i){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function Fs({onBack:i}){Pe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Be(),h=un(),{data:p}=He(),x=p?Ue(G,p):null,[l,m]=u.useState(""),[c,d]=u.useState("idle"),[w,b]=u.useState(!1),[j,v]=u.useState(!1),[g,y]=u.useState(()=>{var C;return typeof window<"u"&&!!((C=window.matchMedia)!=null&&C.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var W;const C=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-reduced-motion: reduce)");if(!C)return;const L=A=>y(A.matches);return C.addEventListener("change",L),()=>C.removeEventListener("change",L)},[]);const $=n("names.placeholderExamples"),_=u.useMemo(()=>$.split(",").map(C=>C.trim()).filter(Boolean),[$]),k=Cn(_,!j&&!l&&!g)||n("names.inputPlaceholder"),F=u.useRef(null),[N,z]=u.useState(void 0);u.useLayoutEffect(()=>{F.current&&z(F.current.getBoundingClientRect().width)},[l,k]),u.useEffect(()=>{if(!Re(l).ok){d(l.length===0?"idle":"invalid");return}d("checking");const L=new AbortController,W=setTimeout(()=>{(async()=>{try{const A=await ln(l,{signal:L.signal});d(A)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(W),L.abort()}},[l]);const M=Re(l),I=M.ok&&(c==="available"||c==="error"),R=h&&I,H=!h&&I;function E(){if(R){if(!a){o();return}b(!0)}}const f=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(Cs,{children:[e.jsx(P,{}),ge(x)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(as,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(us,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:C=>m(on(C.target.value)),placeholder:k,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:se,onFocus:()=>v(!0),style:{width:N!=null?`${N}px`:void 0}}),e.jsx(ps,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||k}),e.jsx(bs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(ys,{"aria-hidden":!0,children:[l.length,"/",se]}):null,e.jsx(De,{onClick:E,disabled:!R,"data-testid":"names-claim",children:f})]}),c==="taken"?e.jsxs(fs,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(ms,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Q,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):H?e.jsxs(Q,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:Ie(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!M.ok&&M.reason==="too-short"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.tooShort",{min:Oe})}):null]}),e.jsx(ws,{onClick:E,disabled:!R,children:f}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ls,{children:[e.jsxs(J,{children:[e.jsx(X,{src:Qn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why1Title")}),e.jsx(te,{children:n("names.why1")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Jn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why2Title")}),e.jsxs(te,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Ne,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Xn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why3Title")}),e.jsx(te,{children:n("names.why3")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Yn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why4Title")}),e.jsx(te,{children:n("names.why4")}),e.jsxs(Ne,{href:Ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),w?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>b(!1)}):null]})}const As="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ze=48,Ns=["all","on_sale","not_for_sale"];function ni(){const[i]=Ye(),a=We(),o=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Pe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const p=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[x,l]=et(p),{subCategory:m,rarities:c,priceMin:d,priceMax:w,smart:b,sort:j}=x,v=x.category,g=Ns.includes(x.status)?x.status:"on_sale";tt(`${v}:${m??""}`);const[y,$]=u.useState(!1);u.useEffect(()=>{if(!y)return;const r=q=>{q.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=B}},[y]);const _=g==="on_sale",T=d&&!Number.isNaN(Number(d))?Number(d):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,F=yt(),N=m?it[m]:void 0,z=(Le.find(r=>r.key===j)??Le[0]).server,M={category:v,rarities:c.length?c:void 0,wearableCategories:N,minPriceCredits:T,maxPriceCredits:k,search:o||void 0,sortBy:z,isSmart:b||void 0,onSale:!0,listingType:F?void 0:"primary"},I={category:v,rarities:c.length?c:void 0,wearableCategories:N,search:o||void 0,sortBy:z,isWearableSmart:b||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:R,total:H,isLoading:E,isPlaceholderData:f,error:C,hasNextPage:L,isFetchingNextPage:W,isFetchNextPageError:A,fetchNextPage:Ze}=Ot(_?["shop-items",M]:["catalog-items",I],r=>_?Ct({...M,first:ze,skip:r}):vt({...I,first:ze,skip:r}),{enabled:v!=="names"}),D=H,{data:ve,isError:qe,isPending:Ve}=He(),Ke=r=>ve&&r.manaWei?Ue(r.manaWei,ve):null,Qe=_&&Ve&&R.some(r=>r.source==="legacy"),je=E||f||Qe,Je=E?15:Math.max(R.length,1),$e=u.useRef(null);u.useEffect(()=>{E||f||!o||$e.current===o||($e.current=o,ne("Shop Searched",{query:o,result_count:D}))},[o,E,f,D]);const Z=u.useRef("__init__");u.useEffect(()=>{if(E||f)return;const r=JSON.stringify({category:v,subCategory:m,rarities:c,min:T,max:k,sort:j,status:g,smart:b});if(Z.current==="__init__"||Z.current===r){Z.current=r;return}Z.current=r,ne("Shop Applied Filter",{filters:{category:v,sub_category:m,rarities:c,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:b,sort:j},result_count:D})},[v,m,c,T,k,j,g,b,E,f,D]);function ke(r){l({category:r,subCategory:null})}function Se(r){l({status:r})}function Ee(r){l({rarities:c.includes(r)?c.filter(B=>B!==r):[...c,r]})}function Xe(){l(p)}const U=[];(T!=null||k!=null)&&U.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of nt)c.includes(r)&&U.push({key:`rarity-${r}`,label:wt(r),onRemove:()=>Ee(r)});return b&&U.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),g!=="on_sale"&&U.push({key:"status",label:g==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Se("on_sale")}),e.jsxs(jt,{"data-testid":"browse",children:[v!=="names"&&e.jsxs(e.Fragment,{children:[y?e.jsx($t,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(kt,{"data-open":y||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.filters")}),e.jsx(Lt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Tt,{children:e.jsx(Rt,{category:v,subCategory:m,onCategory:ke,onSub:r=>l({subCategory:r}),priceMin:d,priceMax:w,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Ee,status:g,onStatus:Se,smart:b,onSmart:r=>l({smart:r})})}),e.jsx(_t,{children:e.jsx(Mt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ft,{children:v==="names"?e.jsx(Fs,{onBack:()=>ke("all")}):e.jsxs(e.Fragment,{children:[e.jsx(st,{sort:j,onSort:r=>l({sort:r}),total:H,loading:E||f,query:o,onOpenFilters:()=>$(!0),chips:U,onClearChips:Xe}),qe&&_&&R.some(r=>r.source==="legacy")?e.jsx(At,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,C?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!je&&R.length===0&&!C?e.jsxs(Nt,{"data-testid":"browse-empty",children:[e.jsx(It,{src:As,alt:""}),e.jsxs(zt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Bt,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Ht,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(nn,{"data-testid":"grid",children:je?e.jsx(Te,{count:Je}):e.jsxs(e.Fragment,{children:[R.map(r=>{if(!_)return e.jsx(V,{item:r,mode:"view"},K(r));const B=r;if(B.source!=="legacy")return e.jsx(V,{item:r},K(r));const q=Ke(B);return q==null?e.jsx(V,{item:r,mode:"view"},K(r)):e.jsx(V,{item:{...B,priceCredits:q}},K(r))}),W?e.jsx(Te,{count:6}):null]})}),e.jsx(Ut,{hasNextPage:L,isFetching:W,isError:A,onLoadMore:()=>void Ze()})]})]})})]})}export{ni as Assets};
@@ -1,4 +1,4 @@
1
- import{r as b,j as o}from"./react-BYHuwl8r.js";import{C as oe,R as B,a as je,b as We}from"./categories-gDlRucVv.js";import{n as c,T as Re}from"./Tooltip-CvreJNab.js";import{s as t,t as e,I as T,b as a,ac as K,C as U}from"./index-BG5saEE6.js";const f=1e5,y=900,g=90,R=g*2,ie=y/g,ne=f-y,Y=100;function G(i){const s=Math.max(0,Math.min(Math.round(i),R));if(s<=g)return s*ie;const p=y+(s-g)/g*ne;return Math.round(p/Y)*Y}function M(i){const s=Math.max(0,Math.min(i,f));return s<=y?Math.round(s/ie):g+Math.round((s-y)/ne*g)}function q(i){return M(i)/R*100}const Te=t.div`
1
+ import{r as b,j as o}from"./react-BYHuwl8r.js";import{C as oe,R as B,a as je,b as We}from"./categories-CXp3c1O6.js";import{n as c,T as Re}from"./Tooltip-CaglQe4p.js";import{s as t,t as e,I as T,b as a,ac as K,C as U}from"./index-DCg5FbqY.js";const f=1e5,y=900,g=90,R=g*2,ie=y/g,ne=f-y,Y=100;function G(i){const s=Math.max(0,Math.min(Math.round(i),R));if(s<=g)return s*ie;const p=y+(s-g)/g*ne;return Math.round(p/Y)*Y}function M(i){const s=Math.max(0,Math.min(i,f));return s<=y?Math.round(s/ie):g+Math.round((s-y)/ne*g)}function q(i){return M(i)/R*100}const Te=t.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,x as N,y as P,b as e,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,k as Z,G as J,H as E}from"./index-BG5saEE6.js";import{c as U,d as V,b as Y,e as tt,s as it,a as et}from"./authorizations-tHY3fIO5.js";import{f as ot}from"./builder-BkVXiD6h.js";import{m as at}from"./mana-matic-C4e1sNO3.js";import{f as nt}from"./errors-QU1ZKsgr.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Dk8-17lF.js";const st=N`
1
+ import{j as i,L as _,r as F}from"./react-BYHuwl8r.js";import{t as o,s as n,B as G,x as N,y as P,b as e,v as B,z as O,I as z,A as K,l as w,D as H,c as Q,E as X,F as A,k as Z,G as J,H as E}from"./index-DCg5FbqY.js";import{c as U,d as V,b as Y,e as tt,s as it,a as et}from"./authorizations-C2XcFris.js";import{f as ot}from"./builder-CZT_aNgl.js";import{m as at}from"./mana-matic-C4e1sNO3.js";import{f as nt}from"./errors-CwhExOnR.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Bs_mS_PM.js";const st=N`
2
2
  to { transform: rotate(360deg); }
3
3
  `,rt=N`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{j as e,L as We,r as M,b as sa,a as na}from"./react-BYHuwl8r.js";import{t as de,s as i,b as s,L as le,ax as ia,ay as ze,az as ra,J as oa,I as O,A as Tt,K as Le,y as ca,X as H,am as ot,v as la,w as da,l as ua,aA as ha,D as pa,aB as ga,an as ma,aC as xa,aD as ct,aE as fa,aF as ya,z as ba,aG as lt,Z as V,aH as dt,aI as va,k as ae,r as wa,c as ut,aJ as Ca,C as ja,aK as ht,aL as Ee,aM as ka,aN as fe,aO as ye,aP as pt,g as gt,f as mt,aQ as $a}from"./index-BG5saEE6.js";import{M as Sa,S as Ma,C as Ta,H as Ia,a as Pa,T as Aa,X as za,b as Ea,B as Ra,c as Ba,d as xt,e as qa,f as Ce,P as It,m as _a,g as Fa,h as Wa,i as La,j as Ka,k as Pt,l as je,L as Na,n as Qa,o as ft,p as yt,W as Ua,q as Ga,r as Ha,s as Oa,A as Da,t as Va,u as Ja,v as Xa,w as Ya,x as Za,y as es,z as ts,D as as,E as ss,F as ns,G as is,I as rs,J as os,K as cs,N as ls,O as ds,Q as Re,R as us,U as hs,V as ps,Y as gs,Z as bt,_ as vt,$ as ms,a0 as xs,a1 as fs,a2 as ys,a3 as wt,a4 as bs}from"./CollectionCarousel-BR7iuprt.js";import{f as vs,h as ws,a as Cs,n as js,i as ks,A as $s}from"./authorizations-tHY3fIO5.js";import{g as Ss,h as Be,p as Ms}from"./buy-D15s0U5R.js";import{b as Ts,w as Is,S as Ct,G as Ps}from"./buy-gasless-DmLq_ESf.js";import{u as As,M as zs,R as be,r as Es,c as Rs,p as jt,a as qe}from"./useCreditPacks-vgB1sZNv.js";import{i as Bs,a as qs}from"./errors-QU1ZKsgr.js";import{E as _s}from"./ErrorNotice-ZO3VddUA.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Dk8-17lF.js";const{colors:se,radius:Fs}=de,Ws=i.div`
1
+ import{j as e,L as We,r as M,b as sa,a as na}from"./react-BYHuwl8r.js";import{t as de,s as i,b as s,L as le,ax as ia,ay as ze,az as ra,J as oa,I as O,A as Tt,K as Le,y as ca,X as H,am as ot,v as la,w as da,l as ua,aA as ha,D as pa,aB as ga,an as ma,aC as xa,aD as ct,aE as fa,aF as ya,z as ba,aG as lt,Z as V,aH as dt,aI as va,k as ae,r as wa,c as ut,aJ as Ca,C as ja,aK as ht,aL as Ee,aM as ka,aN as fe,aO as ye,aP as pt,g as gt,f as mt,aQ as $a}from"./index-DCg5FbqY.js";import{M as Sa,S as Ma,C as Ta,H as Ia,a as Pa,T as Aa,X as za,b as Ea,B as Ra,c as Ba,d as xt,e as qa,f as Ce,P as It,m as _a,g as Fa,h as Wa,i as La,j as Ka,k as Pt,l as je,L as Na,n as Qa,o as ft,p as yt,W as Ua,q as Ga,r as Ha,s as Oa,A as Da,t as Va,u as Ja,v as Xa,w as Ya,x as Za,y as es,z as ts,D as as,E as ss,F as ns,G as is,I as rs,J as os,K as cs,N as ls,O as ds,Q as Re,R as us,U as hs,V as ps,Y as gs,Z as bt,_ as vt,$ as ms,a0 as xs,a1 as fs,a2 as ys,a3 as wt,a4 as bs}from"./CollectionCarousel-CT9bwSTH.js";import{f as vs,h as ws,a as Cs,n as js,i as ks,A as $s}from"./authorizations-C2XcFris.js";import{g as Ss,h as Be,p as Ms}from"./buy-D2J4xdFU.js";import{b as Ts,w as Is,S as Ct,G as Ps}from"./buy-gasless-DXZhAZul.js";import{u as As,M as zs,R as be,r as Es,c as Rs,p as jt,a as qe}from"./useCreditPacks-HpuBP-AH.js";import{i as Bs,a as qs}from"./errors-CwhExOnR.js";import{E as _s}from"./ErrorNotice-C0G5qWzo.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-Bs_mS_PM.js";const{colors:se,radius:Fs}=de,Ws=i.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-BG5saEE6.js";import{r as w,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-DgOOcess.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
1
+ import{ai as N,aj as U,ak as o,al as n,K as D,x as M}from"./index-DCg5FbqY.js";import{r as w,j as g}from"./react-BYHuwl8r.js";import{g as z,a as E,c as I,b as K}from"./clsx-WwvpwSg0.js";import{s as v}from"./styled-BTQUnOe9.js";function F(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-BG5saEE6.js";import{E as xe}from"./ErrorNotice-ZO3VddUA.js";import{d as me,P as he,C as ge,a as ue,b as be}from"./collectionPage.styles-C4IUHz6N.js";import{u as fe}from"./useStore-DuwkQdft.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-gDlRucVv.js";import{L as Se}from"./LoadMore-CQIEBXEe.js";import{u as Pe}from"./useInfiniteGrid-CPmv8ezG.js";import{G as Ae}from"./grid.styles-BCyzN-Pc.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-CV7fqHt3.js";const Me=s.section`
1
+ import{j as e,r as h,d as J,b as X}from"./react-BYHuwl8r.js";import{t as b,s,a1 as ee,E as z,bu as te,bv as ae,I as oe,b as a,c as ie,k as re,l as se,y as ne,C as ce,ap as F,aq as le,bw as de,bx as pe}from"./index-DCg5FbqY.js";import{E as xe}from"./ErrorNotice-C0G5qWzo.js";import{d as me,P as he,C as ge,a as ue,b as be}from"./collectionPage.styles-BYlcGAC5.js";import{u as fe}from"./useStore-fHlJJ0gI.js";import{u as ve,S as W,a as ye,F as je,c as Ce,P as we,d as $e,H as ke,e as Ne}from"./categories-CXp3c1O6.js";import{L as Se}from"./LoadMore-CuEUCjRg.js";import{u as Pe}from"./useInfiniteGrid-C2RUwZT1.js";import{G as Ae}from"./grid.styles-BCdYXc8S.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./skeleton.styles-DLM-pTFu.js";const Me=s.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;