@dcl/shop 0.5.1-30934281711.commit-71d435d → 0.5.1-30936490891.commit-42e2634

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 (181) hide show
  1. package/_assets/Activity-CIJJTSUp.js +336 -0
  2. package/_assets/{AnimatedBackground-COSG1YHZ.js → AnimatedBackground-Bv2erZC5.js} +1 -1
  3. package/_assets/{Assets-hxHJCxJp.js → Assets-BoR-QJY6.js} +15 -15
  4. package/_assets/{Assets.styles-CqHMtvn6.js → Assets.styles-BePHQ_QA.js} +1 -1
  5. package/_assets/{Authorizations-Z_3XHseF.js → Authorizations-BCA1IImf.js} +3 -3
  6. package/_assets/{Cart-Csx5bd_E.js → Cart-DTe7zox3.js} +6 -6
  7. package/_assets/{CircularProgress-CxdmiPfO.js → CircularProgress-DzeFXlov.js} +1 -1
  8. package/_assets/{Collection-CCy2cdeV.js → Collection-DHHXSeak.js} +6 -6
  9. package/_assets/{CollectionCarousel-CKFxOqjb.js → CollectionCarousel-Orp4rJm9.js} +7 -7
  10. package/_assets/{Creator-plYQGi53.js → Creator-AMjYkiKe.js} +9 -9
  11. package/_assets/{ErrorNotice-C-nXSZqX.js → ErrorNotice-I9zAvGEr.js} +1 -1
  12. package/_assets/{ExchangeController-DY7abnKb.js → ExchangeController-B-TJWUiW.js} +1 -1
  13. package/_assets/{GetCredits-TNPm_zAt.js → GetCredits-BNkvpwnR.js} +7 -7
  14. package/_assets/{HelpersUtil-DxyZBMvo.js → HelpersUtil-ylN16m8a.js} +1 -1
  15. package/_assets/{ItemDetail-CuLGfIRL.js → ItemDetail-k2BANQ0W.js} +6 -6
  16. package/_assets/{LoadMore-yAi8vsa6.js → LoadMore-DPVuoR5W.js} +1 -1
  17. package/_assets/ManaPricingBanner.styles-nRVCJe8Y.js +74 -0
  18. package/_assets/{MenuList-CtnltPtJ.js → MenuList-yS83NC0F.js} +1 -1
  19. package/_assets/MyAssets-Ds0TK1z5.js +381 -0
  20. package/_assets/{MyFavorites-DvP0qwpm.js → MyFavorites-CDmtpdZP.js} +2 -2
  21. package/_assets/{NotFound-BfV911SO.js → NotFound-CVe0kC-t.js} +1 -1
  22. package/_assets/{NotificationsBell-LBfk_tmW.js → NotificationsBell-Fprokx0Q.js} +1 -1
  23. package/_assets/{OutfitDetail-CUGDW7tY.js → OutfitDetail-CdEsz8A4.js} +10 -10
  24. package/_assets/{OutfitPreview-BbEqr4QU.js → OutfitPreview-Y1WhUQaY.js} +2 -2
  25. package/_assets/{OutfitStudio-C7sSmIlF.js → OutfitStudio-B9G6xI3H.js} +11 -11
  26. package/_assets/{StoreSettings-CPNAijT4.js → StoreSettings-RMqF_ccU.js} +9 -9
  27. package/_assets/{Success-CoreUida.js → Success-rJNIKLQ6.js} +6 -6
  28. package/_assets/{SwapController-CEnoFZxK.js → SwapController-CgtlXeu5.js} +1 -1
  29. package/_assets/{Tooltip-D2z-c3xY.js → Tooltip-D1Bg11IA.js} +1 -1
  30. package/_assets/{TradeService-C0WM0IK5.js → TradeService-BhQmC5tm.js} +1 -1
  31. package/_assets/{W3MFrameProviderSingleton-DHADoYvF.js → W3MFrameProviderSingleton-D-orryVV.js} +3 -3
  32. package/_assets/{WebCryptoP256-D3CAJ1hZ.js → WebCryptoP256-Ckj1TqYw.js} +1 -1
  33. package/_assets/{authorizations-DKmCykqz.js → authorizations-vn6dbOqY.js} +1 -1
  34. package/_assets/{basic-CEhjKQJL.js → basic-D2f8I1xA.js} +1 -1
  35. package/_assets/{biconomy-BykCCfMc.js → biconomy-BZAxWDGN.js} +1 -1
  36. package/_assets/{browseLayout.styles-BrABo9Hf.js → browseLayout.styles-BYrLBkl5.js} +4 -4
  37. package/_assets/{builder-BkXoi_6e.js → builder-DT_IucDZ.js} +1 -1
  38. package/_assets/{buy-gasless-CGeqOHtJ.js → buy-gasless-DP35z8wI.js} +1 -1
  39. package/_assets/buy-k-76F4x2.js +1 -0
  40. package/_assets/{categories-2xUKydml.js → categories-_gS0pssw.js} +1 -1
  41. package/_assets/{ccip-BlVvJTli.js → ccip-B4KLf1_A.js} +1 -1
  42. package/_assets/{ccip-CADVZTOO.js → ccip-skuYIwjJ.js} +1 -1
  43. package/_assets/{clsx-CqnJSHSW.js → clsx-BtU7gPvo.js} +1 -1
  44. package/_assets/{controller-BP8z62yr.js → controller-BkNCBo5Z.js} +2 -2
  45. package/_assets/{core-CI5jAIo9.js → core-NV0Q-IPg.js} +4 -4
  46. package/_assets/{createSvgIcon-C_0Xv0NV.js → createSvgIcon-ONkmiYB6.js} +1 -1
  47. package/_assets/{custom-iCYkgXy_.js → custom-B2TqKkEi.js} +1 -1
  48. package/_assets/{data-capture-Bvpb1Gue.js → data-capture-ubD-gh1z.js} +1 -1
  49. package/_assets/{email-DGY8FmZr.js → email-yk5CxwkK.js} +1 -1
  50. package/_assets/{embedded-wallet-DGdykNIW.js → embedded-wallet-Sdgu7IIM.js} +1 -1
  51. package/_assets/{emotion-styled.browser.esm-BcV8HqIx.js → emotion-styled.browser.esm-Bi-gHJrz.js} +1 -1
  52. package/_assets/{engine-CG5_hJfk.js → engine-tdlero6P.js} +1 -1
  53. package/_assets/{errors-N8U87ba-.js → errors-WsZgWksO.js} +1 -1
  54. package/_assets/{estimate-l1-fee-BOQxb4ii.js → estimate-l1-fee-CyMpT0rk.js} +1 -1
  55. package/_assets/{execute-fo7nVUhk.js → execute-C4cl9W-o.js} +2 -2
  56. package/_assets/{features-Dg1ILYcD.js → features-CZqcLmC4.js} +1 -1
  57. package/_assets/{fetchTokenMetadata-WWZG1mk5.js → fetchTokenMetadata-CS5UBL6x.js} +2 -2
  58. package/_assets/{field.styles-D-WXHTOH.js → field.styles-CJlWBLbF.js} +1 -1
  59. package/_assets/{get-ecosystem-wallet-info-CImjdvym.js → get-ecosystem-wallet-info-07JzLM0i.js} +1 -1
  60. package/_assets/{getBalance-CRQfFcYC.js → getBalance-DL9ADD0u.js} +1 -1
  61. package/_assets/{getNFT-D3KLRabb.js → getNFT-D17z9oKn.js} +1 -1
  62. package/_assets/{getNFT-B2PC0-g2.js → getNFT-DoaFm4AC.js} +1 -1
  63. package/_assets/{getThemeProps-DmYVP8OC.js → getThemeProps-Cl72yIFf.js} +1 -1
  64. package/_assets/{grid.styles-wzi16hJ0.js → grid.styles-BZnnDTVu.js} +1 -1
  65. package/_assets/{hashTypedData-BDhBKMw7.js → hashTypedData-CrsUYWGu.js} +1 -1
  66. package/_assets/{hashTypedData-7f24Qmm1.js → hashTypedData-wJwJpwvj.js} +1 -1
  67. package/_assets/{in-app-Dw1uWQch.js → in-app-Btz7IDiL.js} +1 -1
  68. package/_assets/{in-app-wallet-calls-Ced-Hk1u.js → in-app-wallet-calls-DP3IphiJ.js} +1 -1
  69. package/_assets/{index-miM7OoYW.js → index-639jix5x.js} +1 -1
  70. package/_assets/{index-Bv6jRoUh.js → index-7BMeGSgL.js} +1 -1
  71. package/_assets/{index-HcU1BZGi.js → index-8SWxdM-1.js} +1 -1
  72. package/_assets/{index-BSJOsaoy.js → index-B59Gh8B7.js} +1 -1
  73. package/_assets/{index-DGhB3WMs.js → index-B5UKanqd.js} +1 -1
  74. package/_assets/{index-Dh2nN1pf.js → index-BE-fLnWc.js} +1 -1
  75. package/_assets/{index-C0tjFuh4.js → index-BM3ki5xD.js} +1 -1
  76. package/_assets/{index-B1-7yuu3.js → index-BQimjtyT.js} +3 -3
  77. package/_assets/{index-cgof2fbB.js → index-BVdlPUJG.js} +1 -1
  78. package/_assets/{index-BUZJwPmQ.js → index-BYbz0Puw.js} +1 -1
  79. package/_assets/{index-Bbu6XUqy.js → index-BbQMVOsy.js} +3 -3
  80. package/_assets/{index-B1l_Uvp9.js → index-BeQhSahz.js} +1 -1
  81. package/_assets/{index-Bkg0Qrp6.js → index-Bi_Apm6j.js} +1 -1
  82. package/_assets/{index-D3jBjpLf.js → index-BlQcf37-.js} +1 -1
  83. package/_assets/{index-Nu_iUU26.js → index-BtwYGrhd.js} +1 -1
  84. package/_assets/{index-BQE1lbNd.js → index-BxzWlq1h.js} +1 -1
  85. package/_assets/{index-DRMZKNFH.js → index-C0xJOFUc.js} +1 -1
  86. package/_assets/{index-BRAjDYmB.js → index-C1Z_9GsV.js} +1 -1
  87. package/_assets/{index-Drfl98A2.js → index-C45bHTUp.js} +1 -1
  88. package/_assets/{index-DyghLCFO.js → index-C7KsfPUz.js} +1 -1
  89. package/_assets/{index-DfnFAWTr.js → index-CBXYUzDZ.js} +2 -2
  90. package/_assets/{index-B0rKW0gc.js → index-CFksIzM4.js} +1 -1
  91. package/_assets/{index-DDu4b2rq.js → index-CL530K8Y.js} +1 -1
  92. package/_assets/{index-CRdySivd.js → index-CMFliAhY.js} +1 -1
  93. package/_assets/{index-uh1KT2cw.js → index-CPdKHNCF.js} +1 -1
  94. package/_assets/{index-CFw8nBxU.js → index-CQQrdcNQ.js} +1 -1
  95. package/_assets/{index-C53xszMs.js → index-CZF0PGAb.js} +1 -1
  96. package/_assets/{index-B_dncyHS.js → index-CbHNXAwv.js} +2 -2
  97. package/_assets/{index-DQsiee3b.js → index-Ci8PIdRp.js} +1 -1
  98. package/_assets/{index-CBpSiNz5.js → index-ClHp2_nl.js} +1 -1
  99. package/_assets/{index-DpqAhSTM.js → index-CrWSaqPI.js} +1 -1
  100. package/_assets/{index-BPGvNzFI.js → index-CtASwK4E.js} +1 -1
  101. package/_assets/{index-x992Sn-f.js → index-CtaCRDRI.js} +1 -1
  102. package/_assets/{index-DHYMCRcr.js → index-Cxty1u3d.js} +1 -1
  103. package/_assets/{index-lG7DN5xF.js → index-CzghBU6C.js} +1 -1
  104. package/_assets/{index-_SEhAywg.js → index-D4hVVIWp.js} +1 -1
  105. package/_assets/{index-BCvO08kk.js → index-DJ-CxX91.js} +1 -1
  106. package/_assets/{index-BD0M18Fj.js → index-DKnXZSeg.js} +1 -1
  107. package/_assets/{index-CiM8C2LD.js → index-DQM4pVOP.js} +1 -1
  108. package/_assets/{index-DLdGvRZQ.js → index-DcebaGnX.js} +1 -1
  109. package/_assets/{index-DFzINjaK.js → index-DimCwX0M.js} +1 -1
  110. package/_assets/{index-B3Hj28R0.js → index-DjltGmXq.js} +1 -1
  111. package/_assets/{index-DaLiUn8r.js → index-Dlg6tqPP.js} +1 -1
  112. package/_assets/{index-BpZz3bw9.js → index-DpOehH6H.js} +3 -3
  113. package/_assets/{index-Da1IWtza.js → index-Dy5Vw1H0.js} +91 -91
  114. package/_assets/{index-WEZnjywW.js → index-EECYRahm.js} +1 -1
  115. package/_assets/index-EheyvR55.js +472 -0
  116. package/_assets/{index-BiDNavgD.js → index-IsmxguMZ.js} +1 -1
  117. package/_assets/{index-D0Aqcjc0.js → index-O4FksRMn.js} +1 -1
  118. package/_assets/{index-BKjuIcZ1.js → index-grgWjFlo.js} +1 -1
  119. package/_assets/{index-BxR8fKca.js → index-m00Y2hq4.js} +1 -1
  120. package/_assets/{index-CgIgZ8TZ.js → index-nNKO8ftl.js} +2 -2
  121. package/_assets/{index.es-4XDsATwL.js → index.es-BzqwGWTI.js} +4 -4
  122. package/_assets/{index.es-DSpyirS0.js → index.es-KzvQwqfO.js} +1 -1
  123. package/_assets/{index.es-teXV_ogJ.js → index.es-StMi_Ya4.js} +1 -1
  124. package/_assets/{localBatchGatewayRequest-DeyVc56J.js → localBatchGatewayRequest-DQGGi_PU.js} +1 -1
  125. package/_assets/{mana-convert-DnJmYgcw.js → mana-convert-D_y2vjtn.js} +1 -1
  126. package/_assets/{networks-1b8NsW4Y.js → networks-DDcMYhGU.js} +1 -1
  127. package/_assets/{onramp-hTLhj5ti.js → onramp-CBdambV_.js} +1 -1
  128. package/_assets/{openzeppelin-BJlHJFSk.js → openzeppelin-DSxwqs4i.js} +1 -1
  129. package/_assets/{parseNft-DkIiwdC7.js → parseNft-DHPQc0OX.js} +2 -2
  130. package/_assets/{parseSignature-DQwihZkm.js → parseSignature-CGumShnk.js} +1 -1
  131. package/_assets/{parseSignature-CvH9K2oI.js → parseSignature-DJF5siOG.js} +3 -3
  132. package/_assets/{passkeys-IvY3Iqv-.js → passkeys-C9h38bzo.js} +1 -1
  133. package/_assets/{pay-with-exchange-BdHjrEQV.js → pay-with-exchange-CdWIlkYG.js} +1 -1
  134. package/_assets/{qr-overlay-BYsKakQ3.js → qr-overlay-DfYnP7zW.js} +1 -1
  135. package/_assets/{receive-YK_fd_CU.js → receive-BDPZr_50.js} +1 -1
  136. package/_assets/{resolveImplementation-DPilssBn.js → resolveImplementation-1IibNw8J.js} +1 -1
  137. package/_assets/{rpc-Sc56-gmm.js → rpc-Be4cuLO-.js} +1 -1
  138. package/_assets/{secp256k1-D_5VBkHj.js → secp256k1-C2A9iNFQ.js} +1 -1
  139. package/_assets/{secp256k1-Cc4QlgFt.js → secp256k1-CBaRftLy.js} +1 -1
  140. package/_assets/{secp256k1-mkhJYubv.js → secp256k1-CfSstl_L.js} +1 -1
  141. package/_assets/{send-DeNQyeKY.js → send-DpFdmYN7.js} +1 -1
  142. package/_assets/{send-batch-transaction-DNMKl7ky.js → send-batch-transaction-Bfap8p0Z.js} +1 -1
  143. package/_assets/{send-eip712-transaction-CDu2CS-m.js → send-eip712-transaction-Ca7s6qzX.js} +2 -2
  144. package/_assets/{send-gasless-transaction-BfQQxuNb.js → send-gasless-transaction-DPOigmTX.js} +2 -2
  145. package/_assets/{send-transaction-egO16iDc.js → send-transaction-D2BNOa_n.js} +2 -2
  146. package/_assets/{sendMetaTransaction-kBil2Ej7.js → sendMetaTransaction-feJSI2TG.js} +1 -1
  147. package/_assets/{sendRawTransaction-8z5-lN6F.js → sendRawTransaction-B-XApuqY.js} +3 -3
  148. package/_assets/{serializeTransaction-D2h63c4_.js → serializeTransaction-I8okodGI.js} +1 -1
  149. package/_assets/{session-proposal-DW2kA8O7.js → session-proposal-DvL8lvR_.js} +1 -1
  150. package/_assets/{session-request-CPMpN15W.js → session-request-BXYdMjrw.js} +2 -2
  151. package/_assets/{signing-DPwEu2UU.js → signing-DT63E54M.js} +3 -3
  152. package/_assets/{socials-CBKa2AOj.js → socials-ClcK9a8P.js} +1 -1
  153. package/_assets/{swaps-xpOfH90g.js → swaps-C0ufdoJC.js} +1 -1
  154. package/_assets/{thirdweb-DzBPyGMD.js → thirdweb-B50LsjvD.js} +3 -3
  155. package/_assets/{to-serializable-transaction-Cq1PN1aZ.js → to-serializable-transaction-D0wz5egz.js} +2 -2
  156. package/_assets/{trade-encoding-4xiglK48.js → trade-encoding-SVWWPYXU.js} +1 -1
  157. package/_assets/{transactionReceipt-Bx1LFZ2X.js → transactionReceipt-BW33bMK1.js} +1 -1
  158. package/_assets/{transactions-ncGplKHW.js → transactions-Dydjvljn.js} +1 -1
  159. package/_assets/{useCreditPacks-BElseyte.js → useCreditPacks-BFQph8eD.js} +1 -1
  160. package/_assets/useImportable-BP4DqZ-f.js +1 -0
  161. package/_assets/{useInfiniteGrid-RdlgtcqE.js → useInfiniteGrid-Dz6b_PHh.js} +1 -1
  162. package/_assets/useManaRate-CfhYfW7C.js +1 -0
  163. package/_assets/{useStore-C66JN0w6.js → useStore-ff9cCCX6.js} +1 -1
  164. package/_assets/{useTheme-DO99UzMT.js → useTheme-BzWpoSXD.js} +1 -1
  165. package/_assets/{verifyHash-DdYLeP97.js → verifyHash-6ZvXkv0_.js} +1 -1
  166. package/_assets/{w3m-modal-CD6HTrJ3.js → w3m-modal-B5LvO_YQ.js} +1 -1
  167. package/_assets/{w3m-modal-C0b4AnQ3.js → w3m-modal-BI6MOh7J.js} +1 -1
  168. package/_assets/{wait-for-tx-receipt-CYCUuRY7.js → wait-for-tx-receipt-B6htZpEq.js} +1 -1
  169. package/_assets/{wallets-B_igN3zv.js → wallets-cwZJIsw-.js} +5 -5
  170. package/_assets/{web-connector-DtLrUYHU.js → web-connector-BMBh8mIE.js} +3 -3
  171. package/_assets/{writeContract-CvTh4kpk.js → writeContract-C3lGbTIC.js} +1 -1
  172. package/_assets/{zoraTestnet-vikR0D9L.js → zoraTestnet-Dvb_L0a4.js} +1 -1
  173. package/index.html +11 -11
  174. package/package.json +2 -2
  175. package/_assets/Activity-DbEcN_ip.js +0 -291
  176. package/_assets/ImportListings-BJ0q3u26.js +0 -472
  177. package/_assets/ManaPricingBanner.styles-ByRxQdOU.js +0 -74
  178. package/_assets/MyAssets-CkgpQXbD.js +0 -381
  179. package/_assets/buy-DKJg2rHj.js +0 -1
  180. package/_assets/mana-rate-CC5D3Meh.js +0 -1
  181. package/_assets/useManaRate-DAwFZ75M.js +0 -1
@@ -0,0 +1,336 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-EheyvR55.js","_assets/react-DehiWSvs.js","_assets/index-Dy5Vw1H0.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-Dr9BTjb7.js","_assets/ethers-CtNGBird.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-BP4DqZ-f.js","_assets/buy-k-76F4x2.js","_assets/mana-convert-D_y2vjtn.js","_assets/authorizations-vn6dbOqY.js","_assets/sendMetaTransaction-feJSI2TG.js","_assets/trade-encoding-SVWWPYXU.js","_assets/ManaPricingBanner.styles-nRVCJe8Y.js","_assets/field.styles-CJlWBLbF.js"])))=>i.map(i=>d[i]);
2
+ import{bn as bt,s as u,t as n,o as yt,B as vt,n as jt,q as kt,b as d,u as A,I as k,bo as Z,bp as J,bq as wt,_ as It,w as P,br as $t,b3 as q,ar as At,bs as Pt,bt as z}from"./index-Dy5Vw1H0.js";import{r as y,e as Lt,j as e,L as et,a as Nt}from"./react-DehiWSvs.js";import{m as Et}from"./mana-convert-D_y2vjtn.js";import{u as Tt}from"./useManaRate-CfhYfW7C.js";import{u as Ct}from"./useImportable-BP4DqZ-f.js";import{L as St}from"./LoadMore-DPVuoR5W.js";import{u as I}from"./useInfiniteGrid-Dz6b_PHh.js";import{m as it}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-k-76F4x2.js";import"./authorizations-vn6dbOqY.js";import"./sendMetaTransaction-feJSI2TG.js";import"./trade-encoding-SVWWPYXU.js";const Ft=15e3;function Mt(t,a){return t.txHash&&a.txHash?t.txHash===a.txHash:t.txHash||a.txHash?!1:t.status===a.status&&Math.abs(t.createdAt-a.createdAt)<=Ft}function Dt(t){const a=[...t].sort((i,c)=>c.createdAt-i.createdAt),s=[];for(const i of a){const c=s[s.length-1];c&&Mt(c[c.length-1],i)?c.push(i):s.push([i])}return s.map(i=>{var c;return{id:((c=i.find(r=>r.txHash))==null?void 0:c.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(r=>r.createdAt)),status:i.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((r,h)=>r+h.credits,0),lines:i}})}function qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function zt(t){const a=[],s=new Map;for(const i of t){const c=qt(i);if(!c){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const r=s.get(c);if(r){r.quantity+=1,r.credits+=i.credits;continue}const h={key:c,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(c,h),a.push(h)}return a}function Ht(t,a){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:a?Et(t.manaWei,a):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Ot(t){const s=Dt(t.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=t.sales.map(o=>{const p=Ht(o,t.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),c=(t.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),r=new Set(t.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(o=>!r.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...s,...i,...c,...h].sort((o,p)=>p.createdAt-o.createdAt||(o.id<p.id?-1:1))}function Rt(t,a){return a==="all"?t:a==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const at=t=>t.trim().toLowerCase();function Wt(t){const a=new Map;for(const s of t??[]){const i=at(s.txHash??"");if(!i)continue;const c=a.get(i);c?c.push(s):a.set(i,[s])}return a}function _t(t,a,s=Date.now()){const i=a.txHash?t.get(at(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const c=i.length===1?Bt(i[0].netCents):null,r=i.filter(o=>!o.available&&o.availableAt>s);if(r.length===0)return{kind:"credited",credits:c};const h=r.reduce((o,p)=>Math.max(o,p.availableAt),0);return{kind:"pending",credits:c,availableAt:h}}function Bt(t){return bt(t)}const Gt="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/credits-product-vs4Q6u6l.svg",H=yt`
3
+ 0% { background-position: 200% 0; }
4
+ 100% { background-position: -200% 0; }
5
+ `,Ut=u.section`
6
+ width: 100%;
7
+ min-width: 0;
8
+ min-height: 60vh;
9
+ /* Centre the whole column — heading, tabs and cards as ONE block — so the feed isn't parked against
10
+ the left edge of a wide page. Centring only the list would leave the heading orphaned from it. */
11
+ max-width: 760px;
12
+ margin-inline: auto;
13
+
14
+ /* The migration tool's row (thumbnail + name + a 144px price field) does not survive the feed's
15
+ column: squeezed to 760px the price field lands on its own line on a desktop. Widening the whole
16
+ column keeps heading, chips and panel as one block, which is the point of the constraint above. */
17
+ &[data-view='migrate'] {
18
+ max-width: 1003px;
19
+ }
20
+ `,Kt=u.div`
21
+ display: flex;
22
+ align-items: baseline;
23
+ gap: 12px;
24
+ margin-bottom: 20px;
25
+ `,Vt=u.h1`
26
+ font-family: ${n.font.sans};
27
+ margin: 0;
28
+ `;u.span`
29
+ color: ${n.colors.muted};
30
+ font-size: 14px;
31
+ `;const Qt=u.div`
32
+ display: flex;
33
+ gap: 8px;
34
+ margin-bottom: 20px;
35
+ flex-wrap: wrap;
36
+ `,nt=u.button`
37
+ appearance: none;
38
+ border: 1px solid ${n.colors.line};
39
+ background: ${n.colors.white};
40
+ color: ${n.colors.text};
41
+ font-family: ${n.font.sans};
42
+ font-size: 14px;
43
+ font-weight: 600;
44
+ padding: 8px 16px;
45
+ min-height: 40px;
46
+ border-radius: ${n.radius.pill};
47
+ cursor: pointer;
48
+ transition:
49
+ background 0.15s,
50
+ border-color 0.15s,
51
+ color 0.15s;
52
+
53
+ &:hover {
54
+ background: ${n.colors.media};
55
+ }
56
+ &:focus-visible {
57
+ outline: 2px solid ${n.colors.accent};
58
+ outline-offset: 2px;
59
+ }
60
+ &[data-active='true'] {
61
+ background: ${n.colors.accent};
62
+ border-color: ${n.colors.accent};
63
+ color: ${n.colors.white};
64
+ }
65
+ `,Xt=u(nt)`
66
+ display: inline-flex;
67
+ align-items: center;
68
+ gap: 8px;
69
+ border-color: transparent;
70
+ background: ${n.colors.promptLilac};
71
+ color: ${n.colors.accent};
72
+
73
+ &:hover {
74
+ background: ${n.colors.rarityBg};
75
+ }
76
+ &[data-active='true'] {
77
+ background: ${n.colors.accent};
78
+ border-color: ${n.colors.accent};
79
+ color: ${n.colors.white};
80
+ }
81
+ /* Violet-on-violet once the chip fills, so the badge inverts. Reached by test id rather than by
82
+ interpolating the styled def, which throws under vitest (see CLAUDE.md). */
83
+ &[data-active='true'] [data-testid='activity-migrate-count'] {
84
+ background: ${n.colors.white};
85
+ color: ${n.colors.accent};
86
+ }
87
+ `,Zt=u.span`
88
+ flex: none;
89
+ display: grid;
90
+ place-items: center;
91
+ min-width: 20px;
92
+ height: 20px;
93
+ padding: 0 6px;
94
+ border-radius: ${n.radius.pill};
95
+ background: ${n.colors.brandViolet};
96
+ font-weight: 600;
97
+ font-size: 12px;
98
+ line-height: 1.6;
99
+ color: ${n.colors.white};
100
+ `,Jt=u.div`
101
+ min-height: 60vh;
102
+ `,Y=u.div`
103
+ display: flex;
104
+ flex-direction: column;
105
+ gap: 16px;
106
+ `,L=u.div`
107
+ background: ${n.colors.white};
108
+ border: 1px solid ${n.colors.line};
109
+ border-radius: 16px;
110
+ overflow: hidden;
111
+ `,N=u.div`
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: space-between;
115
+ gap: 12px;
116
+ padding: 14px 18px;
117
+ background: ${n.colors.softWhite};
118
+ border-bottom: 1px solid ${n.colors.line};
119
+
120
+ ${n.media.maxWidth("mobile")} {
121
+ flex-wrap: wrap;
122
+ }
123
+ `,E=u.div`
124
+ display: flex;
125
+ flex-direction: column;
126
+ gap: 2px;
127
+ min-width: 0;
128
+ `,T=u.span`
129
+ font-weight: 700;
130
+ color: ${n.colors.text};
131
+ `,C=u.span`
132
+ font-size: 13px;
133
+ color: ${n.colors.muted};
134
+ `,S=u.div`
135
+ display: flex;
136
+ align-items: center;
137
+ gap: 14px;
138
+ /* Pin to the right regardless of how many elements sit on the left (the credit-purchase card adds a
139
+ leading thumbnail, giving the head three children instead of two). */
140
+ margin-left: auto;
141
+ `,Yt=u.div`
142
+ flex: 0 0 auto;
143
+ width: 52px;
144
+ height: 52px;
145
+ border-radius: 10px;
146
+ background: ${n.colors.media};
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+
151
+ img {
152
+ width: 30px;
153
+ height: 30px;
154
+ display: block;
155
+ }
156
+ `,F=u.span`
157
+ font-size: 11px;
158
+ font-weight: 700;
159
+ text-transform: uppercase;
160
+ letter-spacing: 0.03em;
161
+ padding: 4px 10px;
162
+ border-radius: ${n.radius.pill};
163
+ white-space: nowrap;
164
+
165
+ &[data-status='SETTLED'] {
166
+ background: rgba(30, 166, 114, 0.14);
167
+ color: ${n.colors.okStrong};
168
+ }
169
+ &[data-status='PENDING'] {
170
+ background: rgba(245, 166, 35, 0.16);
171
+ color: #b5790a;
172
+ }
173
+ &[data-status='SOLD'] {
174
+ background: rgba(103, 58, 183, 0.14);
175
+ color: ${n.colors.accent};
176
+ }
177
+ &[data-status='FAILED'] {
178
+ background: rgba(214, 61, 61, 0.14);
179
+ color: #b02a2a;
180
+ }
181
+ `,v=u.div`
182
+ display: flex;
183
+ align-items: center;
184
+ gap: 5px;
185
+ font-weight: 800;
186
+ color: ${n.colors.text};
187
+ white-space: nowrap;
188
+
189
+ .ccy-mark {
190
+ width: 16px;
191
+ height: 16px;
192
+ }
193
+
194
+ // Money received (a sale) reads as income in the shop's success green.
195
+ &[data-kind='income'] {
196
+ color: ${n.colors.okStrong};
197
+ }
198
+ `,st=u.img`
199
+ width: 16px;
200
+ height: 16px;
201
+ vertical-align: -0.15em;
202
+ `,te=u.span`
203
+ display: inline-flex;
204
+ align-items: center;
205
+ cursor: pointer;
206
+ `,ee=u.span`
207
+ position: fixed;
208
+ transform: translateX(-50%);
209
+ padding: 6px 8px;
210
+ border-radius: 6px;
211
+ background: #16141a;
212
+ color: ${n.colors.white};
213
+ font-size: 12px;
214
+ font-weight: 600;
215
+ line-height: 1;
216
+ white-space: nowrap;
217
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
218
+ pointer-events: none;
219
+ z-index: 9999;
220
+ `,O=u.div`
221
+ display: flex;
222
+ flex-direction: column;
223
+ `,M=u.div`
224
+ display: grid;
225
+ grid-template-columns: 52px 1fr auto;
226
+ align-items: center;
227
+ gap: 14px;
228
+ padding: 12px 18px;
229
+ text-decoration: none;
230
+ color: inherit;
231
+
232
+ & + & {
233
+ border-top: 1px solid ${n.colors.line};
234
+ }
235
+
236
+ &[data-link='true'] {
237
+ transition: background 0.15s;
238
+ }
239
+ &[data-link='true']:hover {
240
+ background: ${n.colors.media};
241
+ }
242
+ &[data-link='true']:focus-visible {
243
+ outline: 2px solid ${n.colors.accent};
244
+ outline-offset: -2px;
245
+ }
246
+ `,R=u.div`
247
+ width: 52px;
248
+ height: 52px;
249
+ border-radius: 10px;
250
+ background: ${n.colors.media};
251
+ overflow: hidden;
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: center;
255
+ color: ${n.colors.muted2};
256
+
257
+ img {
258
+ width: 100%;
259
+ height: 100%;
260
+ object-fit: contain;
261
+ }
262
+ `,W=u.div`
263
+ width: 52px;
264
+ height: 52px;
265
+ border-radius: 10px;
266
+ background: linear-gradient(100deg, ${n.colors.media} 30%, ${n.colors.panel} 50%, ${n.colors.media} 70%);
267
+ background-size: 200% 100%;
268
+ animation: ${H} 1.3s infinite linear;
269
+
270
+ @media (prefers-reduced-motion: reduce) {
271
+ animation: none;
272
+ }
273
+ `,_=u.div`
274
+ min-width: 0;
275
+ display: flex;
276
+ flex-direction: column;
277
+ gap: 2px;
278
+ `,B=u.span`
279
+ font-weight: 700;
280
+ white-space: nowrap;
281
+ overflow: hidden;
282
+ text-overflow: ellipsis;
283
+ `,G=u.span`
284
+ display: inline-block;
285
+ width: 140px;
286
+ max-width: 60%;
287
+ height: 12px;
288
+ border-radius: 6px;
289
+ background: linear-gradient(100deg, ${n.colors.media} 30%, ${n.colors.panel} 50%, ${n.colors.media} 70%);
290
+ background-size: 200% 100%;
291
+ animation: ${H} 1.3s infinite linear;
292
+
293
+ @media (prefers-reduced-motion: reduce) {
294
+ animation: none;
295
+ }
296
+ `,U=u.span`
297
+ font-size: 13px;
298
+ color: ${n.colors.muted};
299
+ `,ie=u.div`
300
+ display: flex;
301
+ align-items: center;
302
+ gap: 4px;
303
+ font-weight: 700;
304
+ color: ${n.colors.text};
305
+ white-space: nowrap;
306
+
307
+ .ccy-mark {
308
+ width: 14px;
309
+ height: 14px;
310
+ }
311
+ `,tt=u.div`
312
+ height: 132px;
313
+ border-radius: 16px;
314
+ border: 1px solid transparent;
315
+ background: linear-gradient(100deg, ${n.colors.media} 30%, ${n.colors.panel} 50%, ${n.colors.media} 70%);
316
+ background-size: 200% 100%;
317
+ animation: ${H} 1.3s infinite linear;
318
+
319
+ @media (prefers-reduced-motion: reduce) {
320
+ animation: none;
321
+ }
322
+ `,rt=u.div`
323
+ display: flex;
324
+ flex-direction: column;
325
+ align-items: center;
326
+ gap: 8px;
327
+ text-align: center;
328
+ padding: 90px 20px;
329
+ min-height: 50vh;
330
+ `,ot=u.p`
331
+ font-size: 22px;
332
+ font-weight: 700;
333
+ margin: 6px 0 0;
334
+ `,ae=u(vt)`
335
+ margin-top: 12px;
336
+ `,K=M.withComponent(et),ne=y.lazy(()=>It(()=>import("./index-EheyvR55.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(t=>({default:t.ImportListings}))),$=24,se=["all","purchases","sales"],D="migrate";function j(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ct(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function dt(t){const a=Number(t)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function lt({children:t}){const a=y.useRef(null),[s,i]=y.useState(null),c=()=>{var h;const r=(h=a.current)==null?void 0:h.getBoundingClientRect();r&&i({top:r.bottom+8,left:r.left+r.width/2})};return e.jsxs(te,{ref:a,tabIndex:0,onMouseEnter:c,onMouseLeave:()=>i(null),onFocus:c,onBlur:()=>i(null),children:[t,s?Nt.createPortal(e.jsx(ee,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function re({item:t}){const a=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||a,{data:i,isLoading:c}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Pt(t.tradeId):z(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),r=s&&c,h=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",p=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,m=e.jsxs(e.Fragment,{children:[r?e.jsx(W,{}):e.jsx(R,{children:o?e.jsx("img",{src:o,alt:h}):e.jsx(k,{name:"cart",size:20})}),e.jsxs(_,{children:[r?e.jsx(G,{}):e.jsx(B,{title:h,children:h}),t.quantity>1?e.jsx(U,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(ie,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return p?e.jsx(K,{to:p,"data-link":"true",children:m}):e.jsx(M,{children:m})}function oe({order:t}){const a=zt(t.lines),s=a.reduce((i,c)=>i+c.quantity,0);return e.jsxs(L,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(v,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(O,{children:a.map(i=>e.jsx(re,{item:i},i.key))})]})}function ce({sale:t}){const{data:a,isLoading:s}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),c=(a==null?void 0:a.thumbnail)??"",r=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(W,{}):e.jsx(R,{children:c?e.jsx("img",{src:c,alt:i}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[s?e.jsx(G,{}):e.jsx(B,{title:i,children:i}),e.jsx(U,{children:d("activity.boughtFrom",{account:ct(t.seller)})})]})]});return e.jsxs(L,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.paidWithMana")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(v,{children:[dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]})]})]}),e.jsx(O,{children:r?e.jsx(K,{to:r,"data-link":"true",children:h}):e.jsx(M,{children:h})})]})}function de({sale:t,payout:a}){const{data:s,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),c=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,o=e.jsxs(e.Fragment,{children:[i?e.jsx(W,{}):e.jsx(R,{children:r?e.jsx("img",{src:r,alt:c}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[i?e.jsx(G,{}):e.jsx(B,{title:c,children:c}),e.jsxs(U,{children:[d("activity.soldTo",{account:ct(t.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:j(a.availableAt)})}`:""]})]})]});return e.jsxs(L,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.saleLabel")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?e.jsxs(v,{"data-kind":"income",children:["+",dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]}):a.credits!==null?e.jsxs(v,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",At(a.credits)]}):e.jsx(v,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(O,{children:h?e.jsx(K,{to:h,"data-link":"true",children:o}):e.jsx(M,{children:o})})]})}function le({order:t}){const a=`$${(t.usdCents/100).toFixed(2)}`,s=$t(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(L,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(Yt,{children:e.jsx("img",{src:Gt,alt:"","aria-hidden":!0})}),e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":s,children:i}),e.jsxs(v,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function ue({filter:t}){const a={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(rt,{children:[e.jsx(k,{name:a.icon,size:40,color:n.colors.muted2}),e.jsx(ot,{children:a.title}),e.jsx("p",{className:"muted",children:a.body}),t!=="sales"?e.jsx(ae,{as:et,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Le(){const{session:t}=jt(),[a,s]=y.useState("all"),[i,c]=Lt(),r=i.get("view")===D;kt({title:r?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:h}=Ct(),o=h!==void 0&&(h>0||r),p=!!t&&!r&&a!=="sales",m=!!t&&!r&&a!=="purchases",x=I(["purchases",t==null?void 0:t.address],l=>wt(t.address,t.identity,{first:$,skip:l}),{enabled:p}),g=I(["sales",t==null?void 0:t.address],l=>Z(t.address,{role:"seller",first:$,skip:l}),{enabled:m}),f=I(["credit-orders",t==null?void 0:t.address],l=>J(t.address,t.identity,{first:$,skip:l}),{enabled:p}),b=I(["mana-purchases",t==null?void 0:t.address],l=>Z(t.address,{role:"buyer",first:$,skip:l}),{enabled:p}),{data:V}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>J(t.address,t.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ut=y.useMemo(()=>Wt(V),[V]),{data:ht}=Tt(m);if(!t)return e.jsxs(rt,{children:[e.jsx(k,{name:"clock",size:40,color:n.colors.muted2}),e.jsx(ot,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Q=Rt(Ot({purchases:p?x.items:[],sales:m?g.items:[],creditOrders:p?f.items:[],manaPurchases:p?b.items:[],rate:ht}),a),pt=p&&(x.isLoading||f.isLoading||b.isLoading)||m&&g.isLoading,X=p&&(x.isFetchingNextPage||f.isFetchingNextPage||b.isFetchingNextPage)||m&&g.isFetchingNextPage,mt=p&&(x.hasNextPage||f.hasNextPage||b.hasNextPage)||m&&g.hasNextPage;function xt(){p&&x.hasNextPage&&x.fetchNextPage(),p&&f.hasNextPage&&f.fetchNextPage(),p&&b.hasNextPage&&b.fetchNextPage(),m&&g.hasNextPage&&g.fetchNextPage()}function gt(l){if(s(l),!r)return;const w=new URLSearchParams(i);w.delete("view"),c(w,{replace:!0})}function ft(){const l=new URLSearchParams(i);l.set("view",D),c(l,{replace:!0})}return e.jsxs(Ut,{"data-view":r?D:"feed",children:[e.jsx(Kt,{children:e.jsx(Vt,{children:d("nav.activity")})}),e.jsxs(Qt,{role:"tablist","aria-label":d("nav.activity"),children:[se.map(l=>e.jsx(nt,{type:"button",role:"tab","aria-selected":!r&&a===l,"data-active":!r&&a===l,"data-testid":`activity-filter-${l}`,onClick:()=>gt(l),children:d(`activity.filter.${l}`)},l)),o?e.jsxs(Xt,{type:"button",role:"tab","aria-selected":r,"data-active":r,"data-testid":"activity-filter-migrate","aria-label":h?d("activity.migrate.chipAria",{count:h}):void 0,onClick:ft,children:[d("activity.migrate.chip"),h?e.jsx(Zt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),r?e.jsx(y.Suspense,{fallback:e.jsx(Jt,{"aria-busy":"true"}),children:e.jsx(ne,{})}):pt?e.jsx(Y,{children:Array.from({length:5}).map((l,w)=>e.jsx(tt,{},w))}):Q.length===0?e.jsx(ue,{filter:a}):e.jsxs(e.Fragment,{children:[e.jsxs(Y,{children:[Q.map(l=>l.kind==="purchase"?e.jsx(oe,{order:l.order},l.id):l.kind==="credit"?e.jsx(le,{order:l.order},l.id):l.kind==="mana-purchase"?e.jsx(ce,{sale:l.sale},l.id):e.jsx(de,{sale:l.sale,payout:_t(ut,l.sale)},l.id)),X?e.jsx(tt,{}):null]}),e.jsx(St,{hasNextPage:mt,isFetching:X,onLoadMore:xt})]})]})}export{Le as Activity};
@@ -1,4 +1,4 @@
1
- import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-Da1IWtza.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.5.1-30934281711.commit-71d435d/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.5.1-30934281711.commit-71d435d/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-Dy5Vw1H0.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -1,4 +1,4 @@
1
- import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,q as nt,ao as ge,b as n,o as st,I as S,p as M,bw as ne,a_ as ot,O as Y,bc as it,bb as rt,m as Fe,aa as at,ac as _e,ad as q,aq as lt,bx as ct}from"./index-Da1IWtza.js";import{s as dt,u as pt}from"./buy-DKJg2rHj.js";import{m as ht,a as Le}from"./mana-convert-DnJmYgcw.js";import{u as Ue}from"./useManaRate-DAwFZ75M.js";import{g as xt,h as mt,i as ft,j as ut,k as gt,C as bt,l as yt,o as wt,m as jt,n as vt,M as $t,p as Ct,E as kt,q as St,r as Et,s as Rt,t as _t,u as Tt,v as zt}from"./Assets.styles-CqHMtvn6.js";import{S as Te,R as It,F as At,e as Nt}from"./categories-2xUKydml.js";import{L as Mt}from"./LoadMore-yAi8vsa6.js";import{u as Pt}from"./useInfiniteGrid-RdlgtcqE.js";import{E as Wt}from"./ErrorNotice-C-nXSZqX.js";import{d as Bt}from"./dcl-schemas-Dr9BTjb7.js";import{s as Ft,G as Lt,w as Ut,S as Ht}from"./buy-gasless-CGeqOHtJ.js";import{i as Ot}from"./trade-encoding-4xiglK48.js";import{r as Gt}from"./mana-rate-CC5D3Meh.js";import{f as Dt}from"./errors-N8U87ba-.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-D2z-c3xY.js";import{G as Kt}from"./grid.styles-wzi16hJ0.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-DKmCykqz.js";import"./sendMetaTransaction-kBil2Ej7.js";function V(o){const i=o.source??"item",a=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:Jt.test(i)?i.length<He?{ok:!1,reason:"too-short"}:i.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Bt.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(o,i={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${o}") on ${a}`);const x=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(o){return ht(L,o)}async function sn(o,i,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:o,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(o,i){const a=be.from(o.availableAmount),l=be.from(L).sub(a);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Ot(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(o,i={}){const a=tn,h=i.intervalMs??1e4,l=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(o){const{name:i,identity:a,signer:h}=o,l=o.chainId??F.chainId,d=o.provider??"across",x=(o.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:d});try{const u=await Gt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,i,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let m;try{m=await Ft({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Lt))throw b;m=await dt(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ut(m),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await rn(m,o.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:x,originConfirmed:r}),u instanceof Ht)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
1
+ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,x as nt,ar as ge,b as n,v as st,I as S,w as M,bw as ne,a_ as it,R as Y,bc as ot,bb as rt,q as Fe,ad as at,af as _e,ag as q,at as lt,bx as ct}from"./index-Dy5Vw1H0.js";import{r as dt,s as pt,u as ht}from"./buy-k-76F4x2.js";import{a as xt,m as Le}from"./mana-convert-D_y2vjtn.js";import{u as Ue}from"./useManaRate-CfhYfW7C.js";import{g as ft,h as mt,i as ut,j as gt,k as bt,C as yt,l as wt,o as jt,m as vt,n as $t,M as Ct,p as kt,E as St,q as Et,r as Rt,s as _t,t as Tt,u as zt,v as It}from"./Assets.styles-BePHQ_QA.js";import{S as Te,R as At,F as Nt,e as Mt}from"./categories-_gS0pssw.js";import{L as Pt}from"./LoadMore-DPVuoR5W.js";import{u as Wt}from"./useInfiniteGrid-Dz6b_PHh.js";import{E as Bt}from"./ErrorNotice-I9zAvGEr.js";import{d as Ft}from"./dcl-schemas-Dr9BTjb7.js";import{s as Lt,G as Ut,w as Ht,S as Ot}from"./buy-gasless-DP35z8wI.js";import{i as Gt}from"./trade-encoding-SVWWPYXU.js";import{f as Dt}from"./errors-WsZgWksO.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-D1Bg11IA.js";import{G as Kt}from"./grid.styles-BZnnDTVu.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-vn6dbOqY.js";import"./sendMetaTransaction-feJSI2TG.js";function V(i){const o=i.source??"item",a=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(i){const o=i.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<He?{ok:!1,reason:"too-short"}:o.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Ft.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(i,o={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${a}`);const x=await d.available(i);if((p=o.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return xt(L,i)}async function sn(i,o,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:i,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(i,o){const a=be.from(i.availableAmount),l=be.from(L).sub(a);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(i,o={}){const a=tn,h=o.intervalMs??1e4,l=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${i}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(i){const{name:o,identity:a,signer:h}=i,l=i.chainId??F.chainId,d=i.provider??"across",x=(i.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:o,buyer:x,chainId:l,provider:d});try{const u=await dt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,o,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Lt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ut))throw b;f=await pt(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ht(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:o,buyer:x,originConfirmed:r}),u instanceof Ot)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -25,14 +25,14 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
25
25
  align-items: flex-start;
26
26
  justify-content: space-between;
27
27
  gap: 12px;
28
- `,oe=s.h2`
28
+ `,ie=s.h2`
29
29
  margin: 0;
30
30
  font-family: ${t.font.sans};
31
31
  font-weight: 700;
32
32
  font-size: 22px;
33
33
  line-height: 1.2;
34
34
  color: ${t.colors.text};
35
- `,ie=s.button`
35
+ `,oe=s.button`
36
36
  flex: none;
37
37
  display: grid;
38
38
  place-items: center;
@@ -161,12 +161,12 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
161
161
  &:focus-within {
162
162
  border-color: ${t.colors.magenta};
163
163
  }
164
- `,mn=s.span`
164
+ `,fn=s.span`
165
165
  flex: none;
166
166
  font-family: ${t.font.sans};
167
167
  font-size: 18px;
168
168
  color: ${t.colors.muted2};
169
- `,fn=s.input`
169
+ `,mn=s.input`
170
170
  flex: 0 1 auto;
171
171
  min-width: 0;
172
172
  border: 0;
@@ -347,7 +347,7 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
347
347
  outline: 2px solid ${t.colors.accent};
348
348
  outline-offset: 2px;
349
349
  }
350
- `,me=s.div`
350
+ `,fe=s.div`
351
351
  display: flex;
352
352
  align-items: flex-start;
353
353
  gap: 12px;
@@ -379,7 +379,7 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
379
379
  color: ${t.colors.accent};
380
380
  }
381
381
  }
382
- `;function En({name:o,priceCredits:i,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=f.useState("confirm"),[g,w]=f.useState(""),[j,k]=f.useState(null),m=f.useRef(!1),b=g.trim().toLowerCase()===o.toLowerCase(),v=r==="completing",E=i!=null?ge(i):"—",C=i==null,T=l==null?void 0:l.credits,R=i!=null&&T!=null?i-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;f.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||m.current)){m.current=!0,u("completing"),k(null);try{const y=await an({name:o,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:it(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{m.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(me,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(o)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(me,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ot,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(me,{"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(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(o){return o.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-30934281711.commit-71d435d/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30934281711.commit-71d435d/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30934281711.commit-71d435d/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.5.1-30934281711.commit-71d435d/_assets/governance-DnazlIjy.webp",An=s.div`
382
+ `;function En({name:i,priceCredits:o,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),v=r==="completing",E=o!=null?ge(o):"—",C=o==null,T=l==null?void 0:l.credits,R=o!=null&&T!=null?o-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:i,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(oe,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(i)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:it,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.pendingHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"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(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.successHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(i){return i.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/governance-DnazlIjy.webp",An=s.div`
383
383
  width: 100%;
384
384
  min-width: 0;
385
385
  `,Nn=s.nav`
@@ -479,11 +479,11 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
479
479
  gap: 8px;
480
480
  padding: 8px 8px 8px 16px;
481
481
  background: ${t.colors.softWhite};
482
- border: 1.5px solid ${({invalid:o})=>o?t.colors.dclRed:t.colors.line};
482
+ border: 1.5px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.line};
483
483
  border-radius: 20px;
484
484
 
485
485
  &:focus-within {
486
- border-color: ${({invalid:o})=>o?t.colors.dclRed:t.colors.magenta};
486
+ border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
487
487
  }
488
488
 
489
489
  ${t.media.maxWidth("mobile")} {
@@ -658,7 +658,7 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
658
658
  width: 16px;
659
659
  height: 16px;
660
660
  }
661
- `,fe=s.div`
661
+ `,me=s.div`
662
662
  display: flex;
663
663
  align-items: center;
664
664
  gap: 8px;
@@ -669,8 +669,8 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
669
669
  font-weight: 500;
670
670
  text-align: left;
671
671
 
672
- background: ${({tone:o})=>o==="error"?"rgba(255, 45, 85, 0.12)":o==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
673
- color: ${({tone:o})=>o==="error"?t.colors.dclRed:o==="ok"?"#0f7a4f":"#ecebed"};
672
+ background: ${({tone:i})=>i==="error"?"rgba(255, 45, 85, 0.12)":i==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
673
+ color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
674
674
 
675
675
  .ico {
676
676
  width: 16px;
@@ -704,7 +704,7 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
704
704
  ${t.media.maxWidth("mobile")} {
705
705
  font-size: 22px;
706
706
  }
707
- `,os=s.p`
707
+ `,is=s.p`
708
708
  margin: 0;
709
709
  max-width: 907px;
710
710
  text-align: center;
@@ -717,7 +717,7 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
717
717
  ${t.media.maxWidth("mobile")} {
718
718
  font-size: 16px;
719
719
  }
720
- `,is=s.div`
720
+ `,os=s.div`
721
721
  display: grid;
722
722
  grid-template-columns: repeat(4, 1fr);
723
723
  gap: 24px;
@@ -797,4 +797,4 @@ import{d as We,r as f,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
797
797
  clip: rect(0, 0, 0, 0);
798
798
  white-space: nowrap;
799
799
  border: 0;
800
- `,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(o){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(o)}`}function ps({onBack:o}){Fe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:a}=Be(),{data:h}=Ue(),l=h?Le(L,h):null,[d,x]=f.useState(""),[p,r]=f.useState("idle"),[u,g]=f.useState(!1),w=f.useRef(null),[j,k]=f.useState(void 0);f.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[d]),f.useEffect(()=>{if(!ze(d).ok){r(d.length===0?"idle":"invalid");return}r("checking");const T=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await en(d,{signal:T.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),T.abort()}},[d]);const m=ze(d),b=m.ok&&(p==="available"||p==="error");function v(){if(b){if(!i){a();return}g(!0)}}const E=e.jsxs(e.Fragment,{children:[n("names.claim"),l!=null?e.jsxs(es,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Nn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:o,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{invalid:p==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:C=>x(Qt(C.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ee,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",ee]}):null,e.jsx(Oe,{onClick:v,disabled:!b,"data-testid":"names-claim",children:E})]}),p==="taken"?e.jsxs(qn,{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(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:v,disabled:!b,children:E}),p==="checking"?e.jsx(fe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):p==="error"?e.jsx(fe,{tone:"muted",role:"status",children:n("names.checkError")}):p==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(fe,{tone:"muted",role:"status",children:n("names.tooShort",{min:He})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(os,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(Z,{children:[e.jsx(K,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:In,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(En,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const hs="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",ue=48;function Ms(){const[o]=Qe(),i=We(),a=(o.get("q")??"").trim().toLowerCase(),h=(o.get("q")??"").trim();Fe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const[l,d]=f.useState("wearable"),[x,p]=f.useState(null),[r,u]=f.useState([]),[g,w]=f.useState(""),[j,k]=f.useState(""),[m,b]=f.useState("on_sale"),[v,E]=f.useState(!1),[C,T]=f.useState("newest"),[R,$]=f.useState(!1);f.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=_}},[R]);const z=m==="on_sale",I=g&&!Number.isNaN(Number(g))?Number(g):void 0,A=j&&!Number.isNaN(Number(j))?Number(j):void 0,te=pt(),y=x?Nt[x]:void 0,U=(Te.find(c=>c.key===C)??Te[0]).server,H={category:l,rarities:r.length?r:void 0,wearableCategories:y,minPriceCredits:I,maxPriceCredits:A,search:a||void 0,sortBy:U,isSmart:v||void 0,onSale:!0,listingType:te?void 0:"primary"},we={category:l,rarities:r.length?r:void 0,wearableCategories:y,search:a||void 0,sortBy:U,isWearableSmart:v||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:O,total:je,isLoading:N,isPlaceholderData:P,error:ve,hasNextPage:Ge,isFetchingNextPage:$e,isFetchNextPageError:De,fetchNextPage:qe}=Pt(z?["shop-items",H]:["catalog-items",we],c=>z?lt({...H,first:ue,skip:c}):ct({...we,first:ue,skip:c}),{enabled:l!=="names"}),G=je,Ce=N||P,Ve=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ze}=Ue(),Ke=c=>ke&&c.manaWei?Le(c.manaWei,ke):null,Se=f.useRef(null);f.useEffect(()=>{N||P||!a||Se.current===a||(Se.current=a,Y("Shop Searched",{query:a,result_count:G}))},[a,N,P,G]);const D=f.useRef("__init__");f.useEffect(()=>{if(N||P)return;const c=JSON.stringify({category:l,subCategory:x,rarities:r,min:I,max:A,sort:C,status:m,smart:v});if(D.current==="__init__"||D.current===c){D.current=c;return}D.current=c,Y("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:r,min_price_credits:I??null,max_price_credits:A??null,status:m,smart:v,sort:C},result_count:G})},[l,x,r,I,A,C,m,v,N,P,G]);function Ee(c){d(c),p(null)}function Re(c){u(_=>_.includes(c)?_.filter(W=>W!==c):[..._,c])}function Je(){d("wearable"),p(null),u([]),w(""),k(""),b("on_sale"),E(!1)}const B=[];(I!=null||A!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{w(""),k("")}});for(const c of It)r.includes(c)&&B.push({key:`rarity-${c}`,label:at(c),onRemove:()=>Re(c)});return v&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>E(!1)}),m!=="on_sale"&&B.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(xt,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(mt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ft,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ut,{children:[e.jsx(gt,{children:n("assets.filters")}),e.jsx(bt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(yt,{children:e.jsx(wt,{category:l,subCategory:x,onCategory:Ee,onSub:p,priceMin:g,priceMax:j,onPriceMin:w,onPriceMax:k,rarities:r,onToggleRarity:Re,status:m,onStatus:b,smart:v,onSmart:E})}),e.jsx(jt,{children:e.jsx(vt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx($t,{children:l==="names"?e.jsx(ps,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(At,{sort:C,onSort:T,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Je}),Ze&&z&&O.some(c=>c.source==="legacy")?e.jsx(Ct,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs(kt,{"data-testid":"browse-empty",children:[e.jsx(St,{src:hs,alt:""}),e.jsxs(Et,{children:[e.jsx(Rt,{children:n("assets.empty.title")}),e.jsx(_t,{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(Tt,{children:e.jsx(zt,{type:"button",onClick:()=>i("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:Ce?e.jsx(_e,{count:Ve}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const _=c;if(_.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(_);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{..._,priceCredits:W}},V(c))}),$e?e.jsx(_e,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:Ge,isFetching:$e,isError:De,onLoadMore:()=>void qe()})]})]})})]})}export{Ms as Assets};
800
+ `,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(i){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ps({onBack:i}){Fe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=Be(),{data:h}=Ue(),l=h?Le(L,h):null,[d,x]=m.useState(""),[p,r]=m.useState("idle"),[u,g]=m.useState(!1),w=m.useRef(null),[j,k]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ze(d).ok){r(d.length===0?"idle":"invalid");return}r("checking");const T=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await en(d,{signal:T.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),T.abort()}},[d]);const f=ze(d),b=f.ok&&(p==="available"||p==="error");function v(){if(b){if(!o){a();return}g(!0)}}const E=e.jsxs(e.Fragment,{children:[n("names.claim"),l!=null?e.jsxs(es,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Nn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{invalid:p==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:C=>x(Qt(C.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ee,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",ee]}):null,e.jsx(Oe,{onClick:v,disabled:!b,"data-testid":"names-claim",children:E})]}),p==="taken"?e.jsxs(qn,{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(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:v,disabled:!b,children:E}),p==="checking"?e.jsx(me,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):p==="error"?e.jsx(me,{tone:"muted",role:"status",children:n("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(me,{tone:"muted",role:"status",children:n("names.tooShort",{min:He})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(is,{children:n("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(Z,{children:[e.jsx(K,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:In,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(En,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const hs="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",ue=48;function Ns(){const[i]=Qe(),o=We(),a=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Fe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const[l,d]=m.useState("wearable"),[x,p]=m.useState(null),[r,u]=m.useState([]),[g,w]=m.useState(""),[j,k]=m.useState(""),[f,b]=m.useState("on_sale"),[v,E]=m.useState(!1),[C,T]=m.useState("newest"),[R,$]=m.useState(!1);m.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=_}},[R]);const z=f==="on_sale",I=g&&!Number.isNaN(Number(g))?Number(g):void 0,A=j&&!Number.isNaN(Number(j))?Number(j):void 0,te=ht(),y=x?Mt[x]:void 0,U=(Te.find(c=>c.key===C)??Te[0]).server,H={category:l,rarities:r.length?r:void 0,wearableCategories:y,minPriceCredits:I,maxPriceCredits:A,search:a||void 0,sortBy:U,isSmart:v||void 0,onSale:!0,listingType:te?void 0:"primary"},we={category:l,rarities:r.length?r:void 0,wearableCategories:y,search:a||void 0,sortBy:U,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:O,total:je,isLoading:N,isPlaceholderData:P,error:ve,hasNextPage:Ge,isFetchingNextPage:$e,isFetchNextPageError:De,fetchNextPage:qe}=Wt(z?["shop-items",H]:["catalog-items",we],c=>z?lt({...H,first:ue,skip:c}):ct({...we,first:ue,skip:c}),{enabled:l!=="names"}),G=je,Ce=N||P,Ve=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ze}=Ue(),Ke=c=>ke&&c.manaWei?Le(c.manaWei,ke):null,Se=m.useRef(null);m.useEffect(()=>{N||P||!a||Se.current===a||(Se.current=a,Y("Shop Searched",{query:a,result_count:G}))},[a,N,P,G]);const D=m.useRef("__init__");m.useEffect(()=>{if(N||P)return;const c=JSON.stringify({category:l,subCategory:x,rarities:r,min:I,max:A,sort:C,status:f,smart:v});if(D.current==="__init__"||D.current===c){D.current=c;return}D.current=c,Y("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:r,min_price_credits:I??null,max_price_credits:A??null,status:f,smart:v,sort:C},result_count:G})},[l,x,r,I,A,C,f,v,N,P,G]);function Ee(c){d(c),p(null)}function Re(c){u(_=>_.includes(c)?_.filter(W=>W!==c):[..._,c])}function Je(){d("wearable"),p(null),u([]),w(""),k(""),b("on_sale"),E(!1)}const B=[];(I!=null||A!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{w(""),k("")}});for(const c of At)r.includes(c)&&B.push({key:`rarity-${c}`,label:at(c),onRemove:()=>Re(c)});return v&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>E(!1)}),f!=="on_sale"&&B.push({key:"status",label:f==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(ft,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(mt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(ut,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(gt,{children:[e.jsx(bt,{children:n("assets.filters")}),e.jsx(yt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(wt,{children:e.jsx(jt,{category:l,subCategory:x,onCategory:Ee,onSub:p,priceMin:g,priceMax:j,onPriceMin:w,onPriceMax:k,rarities:r,onToggleRarity:Re,status:f,onStatus:b,smart:v,onSmart:E})}),e.jsx(vt,{children:e.jsx($t,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ct,{children:l==="names"?e.jsx(ps,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(Nt,{sort:C,onSort:T,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Je}),Ze&&z&&O.some(c=>c.source==="legacy")?e.jsx(kt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Bt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs(St,{"data-testid":"browse-empty",children:[e.jsx(Et,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(_t,{children:n("assets.empty.title")}),e.jsx(Tt,{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(zt,{children:e.jsx(It,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:Ce?e.jsx(_e,{count:Ve}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const _=c;if(_.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(_);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{..._,priceCredits:W}},V(c))}),$e?e.jsx(_e,{count:6}):null]})}),e.jsx(Pt,{hasNextPage:Ge,isFetching:$e,isError:De,onLoadMore:()=>void qe()})]})]})})]})}export{Ns as Assets};
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-2xUKydml.js";import{n as c,T as se}from"./Tooltip-D2z-c3xY.js";import{t as e,s as o,I as g,b as s,aa as ae,d as v}from"./index-Da1IWtza.js";const re=o.div`
1
+ import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-_gS0pssw.js";import{n as c,T as se}from"./Tooltip-D1Bg11IA.js";import{t as e,s as o,I as g,b as s,ad as ae,C as v}from"./index-Dy5Vw1H0.js";const re=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;