@dcl/shop 0.1.0-30846189899.commit-4a8ddfb → 0.1.0-30897342413.commit-036e931

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 (173) hide show
  1. package/_assets/{Activity--xIML69z.js → Activity-DUBRQnWV.js} +1 -1
  2. package/_assets/{AnimatedBackground-COxl8338.js → AnimatedBackground-CmAZhAYA.js} +1 -1
  3. package/_assets/Assets-NRrjcYA5.js +800 -0
  4. package/_assets/{Assets.styles-C4uc13ku.js → Assets.styles-3wC-xeWp.js} +1 -1
  5. package/_assets/{Authorizations-BNvzVxCi.js → Authorizations-aNMRQo6Q.js} +1 -1
  6. package/_assets/{Cart-0pIyJIoa.js → Cart-zIOhAh9c.js} +2 -2
  7. package/_assets/{CircularProgress-BtTBZv-J.js → CircularProgress-LjKPNQUw.js} +1 -1
  8. package/_assets/{Collection-CoFyHo3H.js → Collection-C46Ze7ov.js} +1 -1
  9. package/_assets/{CollectionCarousel-D_-sxfGs.js → CollectionCarousel-B71TAj46.js} +1 -1
  10. package/_assets/{Creator-Bz_W5s1y.js → Creator-D7kFPPn9.js} +1 -1
  11. package/_assets/{ErrorNotice-Cx0COdAr.js → ErrorNotice-DNbl0Lx6.js} +1 -1
  12. package/_assets/{ExchangeController-DmhQDrPJ.js → ExchangeController-B1JcnenY.js} +1 -1
  13. package/_assets/{GetCredits-DoV0Rnfd.js → GetCredits-BLKTlUHn.js} +1 -1
  14. package/_assets/{HelpersUtil-CPZu5R17.js → HelpersUtil-B004FVhm.js} +1 -1
  15. package/_assets/{ImportListings-ev2izkxg.js → ImportListings-CyzEyfcm.js} +1 -1
  16. package/_assets/{ItemDetail-C2cicWV9.js → ItemDetail-apY0RKkT.js} +3 -3
  17. package/_assets/{LoadMore-ConDrtOT.js → LoadMore-CvF1ryR6.js} +1 -1
  18. package/_assets/{MenuList-DlDqrk3u.js → MenuList-BmbNiqyv.js} +1 -1
  19. package/_assets/{MyAssets-DkOhTUsa.js → MyAssets-ClsL7CoM.js} +1 -1
  20. package/_assets/{MyFavorites-Ckuq227S.js → MyFavorites-VWLNpe0r.js} +1 -1
  21. package/_assets/{NotFound-B9xruk4f.js → NotFound-DQHwDF1N.js} +1 -1
  22. package/_assets/{NotificationsBell-CtRATM4e.js → NotificationsBell-C5ky0lqZ.js} +1 -1
  23. package/_assets/{StoreSettings-CjoFpkP5.js → StoreSettings-CgbxKhUS.js} +1 -1
  24. package/_assets/{Success-BacGrGKk.js → Success-C_SNXVeS.js} +1 -1
  25. package/_assets/{SwapController-BHGG_Epq.js → SwapController-DjUyjCYK.js} +1 -1
  26. package/_assets/{Tooltip-DWPneKP_.js → Tooltip-VDc8mbHU.js} +1 -1
  27. package/_assets/{TradeService-Cgcgxq0A.js → TradeService-T7Ac3zPB.js} +1 -1
  28. package/_assets/{W3MFrameProviderSingleton-w-RSM5AL.js → W3MFrameProviderSingleton-BGLSOpiV.js} +3 -3
  29. package/_assets/{WebCryptoP256-CLVtgMXf.js → WebCryptoP256-D7qVD_y0.js} +1 -1
  30. package/_assets/{authorizations-epxR5pjl.js → authorizations-BTC_bFln.js} +1 -1
  31. package/_assets/{basic-BgrqP-TA.js → basic-8iVIK2Fo.js} +1 -1
  32. package/_assets/{biconomy-Bv1UCxcF.js → biconomy-BreMnkVT.js} +1 -1
  33. package/_assets/{browseLayout.styles-ChD_QYf4.js → browseLayout.styles-De0FGl5x.js} +1 -1
  34. package/_assets/{builder-BY1-lATK.js → builder-C4njBf3q.js} +1 -1
  35. package/_assets/{buy-gasless-CwH-UbWq.js → buy-gasless-aqj0tOF3.js} +1 -1
  36. package/_assets/{buy-BI5VTk92.js → buy-myGa3uAa.js} +1 -1
  37. package/_assets/{categories-CeBHtq1-.js → categories-A3Tq54j-.js} +1 -1
  38. package/_assets/{ccip-DILsZUfP.js → ccip-BeYige_y.js} +1 -1
  39. package/_assets/{ccip-Bm7ioRrH.js → ccip-NXlbV8_q.js} +1 -1
  40. package/_assets/{clsx-BcR9gED7.js → clsx-BETN9X51.js} +1 -1
  41. package/_assets/{controller-D3R-xyiE.js → controller-DL4fylV8.js} +2 -2
  42. package/_assets/{core-Ce4ORvRb.js → core-D8ptIKw3.js} +4 -4
  43. package/_assets/{createSvgIcon-CIqvD8A3.js → createSvgIcon-sbUQV66i.js} +1 -1
  44. package/_assets/{custom-J02AwXNB.js → custom-BgXN6B3q.js} +1 -1
  45. package/_assets/{data-capture-98wGTR7Y.js → data-capture-C-JR2KzF.js} +1 -1
  46. package/_assets/{email-AkcBNJmx.js → email-DpFveLJ0.js} +1 -1
  47. package/_assets/{embedded-wallet-C1FwO5au.js → embedded-wallet-C2gUO5wT.js} +1 -1
  48. package/_assets/{emotion-styled.browser.esm-Bk3DOklv.js → emotion-styled.browser.esm-DH8Xabrh.js} +1 -1
  49. package/_assets/{engine-CpeXNQNG.js → engine-5oCjjcrK.js} +1 -1
  50. package/_assets/{errors-CQ3rltSg.js → errors-DqL59l4z.js} +1 -1
  51. package/_assets/{estimate-l1-fee-D4EobY0t.js → estimate-l1-fee-BujsJkmp.js} +1 -1
  52. package/_assets/{execute-CoTzdWPI.js → execute-BvpVcytD.js} +2 -2
  53. package/_assets/{features-BwG-URCN.js → features-hynqqeoJ.js} +1 -1
  54. package/_assets/{fetchTokenMetadata-BkvrDuzW.js → fetchTokenMetadata-BnJnLsZ6.js} +2 -2
  55. package/_assets/{get-ecosystem-wallet-info-DBSebSs5.js → get-ecosystem-wallet-info-DQdOd1yi.js} +1 -1
  56. package/_assets/{getBalance-W1kDcffZ.js → getBalance-x0HlsVC8.js} +1 -1
  57. package/_assets/{getNFT-BgKBStfZ.js → getNFT-BmIGxF2X.js} +1 -1
  58. package/_assets/{getNFT-B5NiXJ-r.js → getNFT-U6fW1c3o.js} +1 -1
  59. package/_assets/{getThemeProps-D9MV0ore.js → getThemeProps-BzsYMuYq.js} +1 -1
  60. package/_assets/{grid.styles-BdBYqxJR.js → grid.styles-B36wgJRU.js} +1 -1
  61. package/_assets/{hashTypedData-BxxK8aGQ.js → hashTypedData-BtyGAAso.js} +1 -1
  62. package/_assets/{hashTypedData-Cm-awrYD.js → hashTypedData-D5cKiuOe.js} +1 -1
  63. package/_assets/{import-B25CKzlS.js → import-Da0nCdcK.js} +1 -1
  64. package/_assets/{in-app-NAdj5lCP.js → in-app-tkTqoTeW.js} +1 -1
  65. package/_assets/{in-app-wallet-calls-CpzGycsr.js → in-app-wallet-calls-Dyb8JyC6.js} +1 -1
  66. package/_assets/{index-DKk1pc3n.js → index--n_fMjyX.js} +1 -1
  67. package/_assets/{index-BKSkru-M.js → index-8AINMf2V.js} +1 -1
  68. package/_assets/{index-wz8PBj21.js → index-B-ELrI2-.js} +1 -1
  69. package/_assets/{index-C1yjSclR.js → index-B6RSvfuU.js} +1 -1
  70. package/_assets/{index-D16mzzVn.js → index-BCMTVfZb.js} +1 -1
  71. package/_assets/{index-BKICMIZT.js → index-BGOR7uqp.js} +1 -1
  72. package/_assets/{index-C3O2judC.js → index-BJaBIZon.js} +2 -2
  73. package/_assets/{index-6hzc-GnS.js → index-BJhXMkl3.js} +2 -2
  74. package/_assets/{index-CZuVkoLd.js → index-BNnslvoC.js} +1 -1
  75. package/_assets/{index-CA1pdiTI.js → index-BSfKLWot.js} +1 -1
  76. package/_assets/{index-9v3H5hPY.js → index-BX7nt43X.js} +1 -1
  77. package/_assets/{index-EiC_Szof.js → index-B_EmM_OX.js} +1 -1
  78. package/_assets/{index-CTdrJ4oL.js → index-BarS2mgL.js} +1 -1
  79. package/_assets/{index-ChmcTLu_.js → index-Beqa_Gje.js} +1 -1
  80. package/_assets/{index-HY0POgHw.js → index-Bg9_Rb37.js} +1 -1
  81. package/_assets/{index-CFIryEo0.js → index-BnaX4TbU.js} +1 -1
  82. package/_assets/{index-DwQ9zfke.js → index-BrAm6VBC.js} +1 -1
  83. package/_assets/{index-D8iklv7s.js → index-ByCGiKUv.js} +1 -1
  84. package/_assets/{index-B9MT_MB9.js → index-C184oxsV.js} +1 -1
  85. package/_assets/{index-FuqC8LCi.js → index-C3EyLY1t.js} +1 -1
  86. package/_assets/{index-DpTSanxf.js → index-C7Dd_OFn.js} +1 -1
  87. package/_assets/{index-NyoHQ3Hg.js → index-CCOhxr4Y.js} +3 -3
  88. package/_assets/{index-BLbPcDXT.js → index-CPOONJNk.js} +1 -1
  89. package/_assets/{index-C532fyTR.js → index-CZuEgdES.js} +1 -1
  90. package/_assets/{index-CS5vL3nz.js → index-Cd7uOoEN.js} +1 -1
  91. package/_assets/{index-Dy2g978X.js → index-CnNlT6GN.js} +1 -1
  92. package/_assets/{index-BHI32oX_.js → index-D05mgWf9.js} +1 -1
  93. package/_assets/{index-BKc1lwsO.js → index-D8MKf1c9.js} +1 -1
  94. package/_assets/{index-Dz1OuWp5.js → index-DCH4Sk36.js} +1 -1
  95. package/_assets/{index-DKPPTRpY.js → index-DFUj2qC_.js} +1 -1
  96. package/_assets/{index-kSY8zCTD.js → index-DI_IjAcF.js} +11 -11
  97. package/_assets/{index-BQ9B8U3w.js → index-D_k1yIWZ.js} +1 -1
  98. package/_assets/{index-DrnGHRKJ.js → index-Dc05m3c2.js} +1 -1
  99. package/_assets/{index-DPLsz-9z.js → index-DeajtqZQ.js} +1 -1
  100. package/_assets/{index-CjYcxJyk.js → index-Dent5zap.js} +1 -1
  101. package/_assets/{index-CF64rl6y.js → index-DfFeZ6Vp.js} +1 -1
  102. package/_assets/{index-CHT5h1YD.js → index-DheZlekn.js} +3 -3
  103. package/_assets/{index-DgX6c0uG.js → index-DxM-to32.js} +3 -3
  104. package/_assets/{index-BVrE4quq.js → index-DxM-zc2w.js} +1 -1
  105. package/_assets/{index-BxqE_v_k.js → index-Dya8ahcx.js} +1 -1
  106. package/_assets/{index-Du4gkBvR.js → index-FsUhf4jJ.js} +1 -1
  107. package/_assets/{index-BtwgxwHq.js → index-HLQrRyOg.js} +1 -1
  108. package/_assets/{index-CQUKp9s3.js → index-Nj11N1Vp.js} +1 -1
  109. package/_assets/{index-DC1fq39A.js → index-Sc6q1Ecn.js} +1 -1
  110. package/_assets/{index-DRU29mYR.js → index-UHqRfL2i.js} +1 -1
  111. package/_assets/{index-AqK03-LB.js → index-VL-eJTDX.js} +1 -1
  112. package/_assets/{index-BDNkhDJO.js → index-VOzIxfGw.js} +1 -1
  113. package/_assets/{index-CVd-CvyB.js → index-hdy1vdaF.js} +1 -1
  114. package/_assets/{index-B0tCillH.js → index-mSffj-0T.js} +2 -2
  115. package/_assets/{index-B6PcqfHB.js → index-rT-FK12h.js} +1 -1
  116. package/_assets/{index-K3GpFcMv.js → index-uIjOgtMi.js} +1 -1
  117. package/_assets/{index.es-BBVPisv6.js → index.es-Ca2F0FMx.js} +4 -4
  118. package/_assets/{index.es-Da5RZk4t.js → index.es-DIF91egA.js} +1 -1
  119. package/_assets/{index.es-DiRhFFGQ.js → index.es-creG5doh.js} +1 -1
  120. package/_assets/{localBatchGatewayRequest-C-p2tm05.js → localBatchGatewayRequest-DsmOioor.js} +1 -1
  121. package/_assets/{mana-convert-D1hsZ2E6.js → mana-convert-CTsfw0Op.js} +1 -1
  122. package/_assets/{mana-rate-Bnci-S8V.js → mana-rate-BxYQ9xUU.js} +1 -1
  123. package/_assets/{networks-BJU6f_cY.js → networks-cAv5X6o3.js} +1 -1
  124. package/_assets/{onramp-Bzzm06hv.js → onramp-g7sfARS-.js} +1 -1
  125. package/_assets/{openzeppelin-DFiLpFgH.js → openzeppelin-BCr3n-Wo.js} +1 -1
  126. package/_assets/{parseNft-CCbTEGwV.js → parseNft-BhL_ChhV.js} +2 -2
  127. package/_assets/{parseSignature-DD99BMNb.js → parseSignature--tz_iwev.js} +3 -3
  128. package/_assets/{parseSignature-BOSKOro2.js → parseSignature-DvfiZIZV.js} +1 -1
  129. package/_assets/{passkeys-92GO4_AS.js → passkeys-Bvs56mq5.js} +1 -1
  130. package/_assets/{pay-with-exchange-DX-xSLr7.js → pay-with-exchange-XkI8_OCE.js} +1 -1
  131. package/_assets/{qr-overlay-eh8MTm5X.js → qr-overlay-Bk2XZPWy.js} +1 -1
  132. package/_assets/{receive-gG18LKlB.js → receive-BMeT0Lz-.js} +1 -1
  133. package/_assets/{resolveImplementation-D1geF9pd.js → resolveImplementation-Bx83F7NY.js} +1 -1
  134. package/_assets/{rpc-BrRB7NAj.js → rpc-DbNw9jL1.js} +1 -1
  135. package/_assets/{secp256k1-BG1vt8D2.js → secp256k1-BEusWpwQ.js} +1 -1
  136. package/_assets/{secp256k1-C_5KB_ss.js → secp256k1-gVzAYZdt.js} +1 -1
  137. package/_assets/{secp256k1-DX1MiMfj.js → secp256k1-k_sy808b.js} +1 -1
  138. package/_assets/{send-HdWX4Vf8.js → send-CXMx0Ee3.js} +1 -1
  139. package/_assets/{send-batch-transaction--UYo-MfS.js → send-batch-transaction-CDuCIKM-.js} +1 -1
  140. package/_assets/{send-eip712-transaction-ylAy9C9V.js → send-eip712-transaction-BeDgEcMv.js} +2 -2
  141. package/_assets/{send-gasless-transaction-D8jV3JY1.js → send-gasless-transaction-B3NobiIc.js} +2 -2
  142. package/_assets/{send-transaction-A8da-F-0.js → send-transaction-SAvzY1Zv.js} +2 -2
  143. package/_assets/{sendMetaTransaction-DwwWcytG.js → sendMetaTransaction-BLHMOdHq.js} +1 -1
  144. package/_assets/{sendRawTransaction-CRteP_VF.js → sendRawTransaction-DEpVlnFQ.js} +3 -3
  145. package/_assets/{serializeTransaction-CP2suneH.js → serializeTransaction-BeikLUOw.js} +1 -1
  146. package/_assets/{session-proposal-BEwyn_1a.js → session-proposal-CXFPx6Nc.js} +1 -1
  147. package/_assets/{session-request-D98_vJeF.js → session-request-yTpVxJp5.js} +2 -2
  148. package/_assets/{signing-ByWEzda7.js → signing-ClnsTXrn.js} +3 -3
  149. package/_assets/{socials-Dw9x9jIa.js → socials-vhiZxWBx.js} +1 -1
  150. package/_assets/{swaps-Cg4ubSW8.js → swaps-BYey02hd.js} +1 -1
  151. package/_assets/{thirdweb-B5eOPxT2.js → thirdweb-M2_jjUS_.js} +3 -3
  152. package/_assets/{to-serializable-transaction-Bug9hdHL.js → to-serializable-transaction-BTD2tsYD.js} +2 -2
  153. package/_assets/{trade-encoding-D1HYs4M1.js → trade-encoding-BVlmzFE-.js} +1 -1
  154. package/_assets/{transactionReceipt-BCGTxm9P.js → transactionReceipt-OZUBm-CR.js} +1 -1
  155. package/_assets/{transactions-BjCUlQJE.js → transactions-CHSrtQ-4.js} +1 -1
  156. package/_assets/{useCreditPacks-DGRmK8hf.js → useCreditPacks-DkU8BJEb.js} +1 -1
  157. package/_assets/{useInfiniteGrid-CY-Kev2J.js → useInfiniteGrid-NfDPHWXi.js} +1 -1
  158. package/_assets/useManaRate-BV_Xzv0_.js +1 -0
  159. package/_assets/{useSecondarySales-CiIhx9_Z.js → useSecondarySales-Caon2E63.js} +1 -1
  160. package/_assets/{useStore-DUeF63tD.js → useStore-TorFHABK.js} +1 -1
  161. package/_assets/{useTheme-Cvhw021z.js → useTheme-D346drKA.js} +1 -1
  162. package/_assets/{verifyHash-C9OKo_wr.js → verifyHash-C_z3J9Yf.js} +1 -1
  163. package/_assets/{w3m-modal-Du_9ZBUK.js → w3m-modal-BCtgJ1Ma.js} +1 -1
  164. package/_assets/{w3m-modal-CPyeblNY.js → w3m-modal-DyyYMui-.js} +1 -1
  165. package/_assets/{wait-for-tx-receipt-DpR9zAvK.js → wait-for-tx-receipt-SA_Mo0zv.js} +1 -1
  166. package/_assets/{wallets-BrL616p3.js → wallets-CiVaPBHB.js} +5 -5
  167. package/_assets/{web-connector-RgfFD4s5.js → web-connector-Cc9dNw1Y.js} +3 -3
  168. package/_assets/{writeContract-BndPP9zt.js → writeContract-BSMHcTCt.js} +1 -1
  169. package/_assets/{zoraTestnet-Dfh7-p3m.js → zoraTestnet-CftGmIvi.js} +1 -1
  170. package/index.html +11 -11
  171. package/package.json +2 -2
  172. package/_assets/Assets-DeYwJmco.js +0 -787
  173. package/_assets/useManaRate-CXdHjXW7.js +0 -1
@@ -0,0 +1,800 @@
1
+ import{b as We,r as f,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av as Qe,aw as Xe,d as Ye,s,t,n as Be,al as et,D as tt,K as ge,e as n,y as nt,I as S,z as M,aT as ne,aj as st,ar as Y,az as ot,ay as it,m as Fe,o as rt,S as Te,A as q,aU as at,aV as lt}from"./index-DI_IjAcF.js";import{u as ct}from"./useSecondarySales-Caon2E63.js";import{a as dt,m as Le}from"./mana-convert-CTsfw0Op.js";import{u as Ue}from"./useManaRate-BV_Xzv0_.js";import{g as pt,h as ht,i as xt,j as mt,k as ft,C as ut,l as gt,o as bt,m as yt,n as wt,M as jt,p as vt,E as $t,q as Ct,r as kt,s as St,t as Et,u as Rt,v as Tt}from"./Assets.styles-3wC-xeWp.js";import{c as _e,R as _t,F as zt,S as It}from"./categories-A3Tq54j-.js";import{L as At}from"./LoadMore-CvF1ryR6.js";import{u as Nt}from"./useInfiniteGrid-NfDPHWXi.js";import{E as Mt}from"./ErrorNotice-DNbl0Lx6.js";import{d as Pt}from"./dcl-schemas-BICTSpB5.js";import{s as Wt,G as Bt,w as Ft,S as Lt}from"./buy-gasless-aqj0tOF3.js";import{s as Ut}from"./buy-myGa3uAa.js";import{i as Ht}from"./trade-encoding-BVlmzFE-.js";import{r as Ot}from"./mana-rate-BxYQ9xUU.js";import{f as Dt}from"./errors-DqL59l4z.js";import{J as Gt,C as qt,B as be}from"./ethers-CXBJm_wN.js";import{n as Vt}from"./Tooltip-VDc8mbHU.js";import{G as Kt}from"./grid.styles-B36wgJRU.js";import"./sentry-B35L1FdR.js";import"./intl-CBcMB1D2.js";import"./authorizations-BTC_bFln.js";import"./sendMetaTransaction-BLHMOdHq.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,Zt=/^[a-zA-Z0-9]+$/;function ze(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:Zt.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 Jt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Qt=["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 Xt(){return F.chainId===Number(Pt.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function Yt(o,i={}){var p;const{rpc:a,address:h}=Xt(),l=new Gt(a),d=new qt(h,Qt,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 en="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 tn(o){return dt(L,o)}async function nn(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 Ye(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 sn(o,i){const a=be.from(o.availableAmount),l=be.from(L).sub(a);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Ht(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 on(o,i={}){const a=en,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 rn(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 Ot(l),g=tn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await nn(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 Qe(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=sn(j.credit,w);let m;try{m=await Wt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Bt))throw b;m=await Ut(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ft(m),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await on(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 Lt)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Xe(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 an=s.div`
2
+ position: fixed;
3
+ inset: 0;
4
+ z-index: 10000;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ padding: 16px;
9
+ background: rgba(22, 21, 24, 0.55);
10
+ `,ln=s.div`
11
+ width: 560px;
12
+ max-width: 100%;
13
+ max-height: 92vh;
14
+ overflow-y: auto;
15
+ background: ${t.colors.white};
16
+ border-radius: 16px;
17
+ padding: 20px 24px 24px;
18
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
19
+
20
+ ${t.media.maxWidth("mobile")} {
21
+ padding: 16px;
22
+ }
23
+ `,se=s.div`
24
+ display: flex;
25
+ align-items: flex-start;
26
+ justify-content: space-between;
27
+ gap: 12px;
28
+ `,oe=s.h2`
29
+ margin: 0;
30
+ font-family: ${t.font.sans};
31
+ font-weight: 700;
32
+ font-size: 22px;
33
+ line-height: 1.2;
34
+ color: ${t.colors.text};
35
+ `,ie=s.button`
36
+ flex: none;
37
+ display: grid;
38
+ place-items: center;
39
+ width: 28px;
40
+ height: 28px;
41
+ border: 0;
42
+ background: none;
43
+ cursor: pointer;
44
+ color: ${t.colors.text};
45
+
46
+ .ico {
47
+ width: 18px;
48
+ height: 18px;
49
+ }
50
+ &:disabled {
51
+ opacity: 0.4;
52
+ cursor: default;
53
+ }
54
+ &:focus-visible {
55
+ outline: 2px solid ${t.colors.accent};
56
+ outline-offset: 2px;
57
+ }
58
+ `,re=s.div`
59
+ display: flex;
60
+ align-items: center;
61
+ gap: 6px;
62
+ margin-top: 4px;
63
+ font-family: ${t.font.sans};
64
+ font-size: 14px;
65
+ color: ${t.colors.text2};
66
+
67
+ .ico {
68
+ width: 16px;
69
+ height: 16px;
70
+ color: ${t.colors.brandViolet};
71
+ }
72
+ `,ae=s.hr`
73
+ border: 0;
74
+ border-top: 1px solid ${t.colors.line};
75
+ margin: 16px 0;
76
+ `,le=s.div`
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 16px;
80
+ `,ce=s.div`
81
+ flex: none;
82
+ display: grid;
83
+ place-items: center;
84
+ width: 56px;
85
+ height: 56px;
86
+ border-radius: 10px;
87
+ background: ${t.gradients.amethyst};
88
+ color: ${t.colors.white};
89
+
90
+ .ico {
91
+ width: 30px;
92
+ height: 30px;
93
+ }
94
+ `,de=s.div`
95
+ flex: 1;
96
+ min-width: 0;
97
+ `,pe=s.div`
98
+ font-family: ${t.font.sans};
99
+ font-weight: 700;
100
+ font-size: 20px;
101
+ line-height: 1.3;
102
+ color: ${t.colors.text};
103
+ overflow: hidden;
104
+ text-overflow: ellipsis;
105
+ white-space: nowrap;
106
+
107
+ span {
108
+ font-weight: 400;
109
+ color: ${t.colors.muted2};
110
+ }
111
+ `,he=s.div`
112
+ font-family: ${t.font.sans};
113
+ font-size: 14px;
114
+ color: ${t.colors.muted2};
115
+ `,xe=s.div`
116
+ flex: none;
117
+ display: flex;
118
+ align-items: center;
119
+ gap: 6px;
120
+ font-family: ${t.font.sans};
121
+ font-weight: 600;
122
+ font-size: 24px;
123
+ color: ${t.colors.text};
124
+
125
+ .ico {
126
+ width: 22px;
127
+ height: 22px;
128
+ color: ${t.colors.brandViolet};
129
+ }
130
+ `,cn=s.div`
131
+ margin-top: 16px;
132
+ padding: 16px;
133
+ border-radius: 12px;
134
+ background: #f2e7fc;
135
+ `,dn=s.div`
136
+ font-family: ${t.font.sans};
137
+ font-weight: 700;
138
+ font-size: 16px;
139
+ color: ${t.colors.text};
140
+ `,pn=s.p`
141
+ margin: 8px 0 16px;
142
+ font-family: ${t.font.sans};
143
+ font-size: 14px;
144
+ line-height: 1.5;
145
+ color: ${t.colors.text2};
146
+
147
+ b {
148
+ font-weight: 700;
149
+ color: ${t.colors.brandViolet};
150
+ }
151
+ `,hn=s.label`
152
+ display: flex;
153
+ align-items: center;
154
+ gap: 8px;
155
+ padding: 12px 14px;
156
+ background: ${t.colors.white};
157
+ border: 1px solid ${t.colors.text};
158
+ border-radius: 10px;
159
+ cursor: text;
160
+
161
+ &:focus-within {
162
+ border-color: ${t.colors.magenta};
163
+ }
164
+ `,xn=s.span`
165
+ flex: none;
166
+ font-family: ${t.font.sans};
167
+ font-size: 18px;
168
+ color: ${t.colors.muted2};
169
+ `,mn=s.input`
170
+ flex: 0 1 auto;
171
+ min-width: 0;
172
+ border: 0;
173
+ outline: none;
174
+ background: transparent;
175
+ font-family: ${t.font.sans};
176
+ font-size: 16px;
177
+ font-weight: 600;
178
+ color: ${t.colors.text};
179
+
180
+ &::placeholder {
181
+ color: ${t.colors.muted2};
182
+ font-weight: 400;
183
+ }
184
+ `,fn=s.span`
185
+ flex: none;
186
+ font-family: ${t.font.sans};
187
+ font-size: 16px;
188
+ color: ${t.colors.muted2};
189
+ `,Ae=s.button`
190
+ margin-top: 16px;
191
+ width: 100%;
192
+ height: 52px;
193
+ border: 0;
194
+ border-radius: 12px;
195
+ cursor: pointer;
196
+ background: ${t.gradients.amethyst};
197
+ color: ${t.colors.softWhite};
198
+ font-family: ${t.font.sans};
199
+ font-weight: 600;
200
+ font-size: 15px;
201
+ letter-spacing: 0.46px;
202
+ text-transform: uppercase;
203
+
204
+ &:hover:not(:disabled) {
205
+ filter: brightness(1.06);
206
+ }
207
+ &:focus-visible {
208
+ outline: 2px solid ${t.colors.accent};
209
+ outline-offset: 2px;
210
+ }
211
+ &:disabled {
212
+ cursor: not-allowed;
213
+ background: #ddc7ec;
214
+ color: #f4ecfa;
215
+ }
216
+ `,un=s.div`
217
+ display: flex;
218
+ flex-direction: column;
219
+ align-items: flex-start;
220
+ gap: 20px;
221
+ padding: 32px 0 8px;
222
+ `,gn=s.img`
223
+ align-self: center;
224
+ width: 56px;
225
+ height: 56px;
226
+ `,bn=s.div`
227
+ font-family: ${t.font.sans};
228
+ font-weight: 700;
229
+ font-size: 18px;
230
+ color: ${t.colors.text};
231
+ `,yn=s.div`
232
+ display: flex;
233
+ align-items: center;
234
+ gap: 12px;
235
+ width: 100%;
236
+ `,wn=s.div`
237
+ flex: 1;
238
+ height: 8px;
239
+ border-radius: 999px;
240
+ background: ${t.colors.chip};
241
+ overflow: hidden;
242
+
243
+ span {
244
+ display: block;
245
+ height: 100%;
246
+ width: 40%;
247
+ border-radius: 999px;
248
+ background: ${t.gradients.amethyst};
249
+ animation: nameProgress 1.1s ease-in-out infinite;
250
+ }
251
+
252
+ @keyframes nameProgress {
253
+ 0% {
254
+ transform: translateX(-100%);
255
+ }
256
+ 100% {
257
+ transform: translateX(320%);
258
+ }
259
+ }
260
+ `,jn=s.span`
261
+ flex: none;
262
+ font-family: ${t.font.sans};
263
+ font-size: 14px;
264
+ color: ${t.colors.muted};
265
+ `,vn=s.div`
266
+ display: flex;
267
+ flex-direction: column;
268
+ align-items: center;
269
+ gap: 16px;
270
+ padding: 24px;
271
+ border-radius: 12px;
272
+ background: #e2f5ea;
273
+ text-align: center;
274
+ `,$n=s.div`
275
+ display: grid;
276
+ place-items: center;
277
+ width: 56px;
278
+ height: 56px;
279
+ border-radius: 50%;
280
+ background: ${t.colors.ok};
281
+ color: ${t.colors.white};
282
+
283
+ .ico {
284
+ width: 30px;
285
+ height: 30px;
286
+ }
287
+ `,Cn=s.p`
288
+ margin: 0;
289
+ font-family: ${t.font.sans};
290
+ font-size: 16px;
291
+ line-height: 1.4;
292
+ color: ${t.colors.text};
293
+
294
+ b {
295
+ font-weight: 700;
296
+ }
297
+ `,Ne=s.div`
298
+ display: flex;
299
+ gap: 16px;
300
+ margin-top: 20px;
301
+
302
+ ${t.media.maxWidth("mobile")} {
303
+ flex-direction: column;
304
+ }
305
+ `,Me=s.button`
306
+ flex: 1;
307
+ height: 48px;
308
+ border: 1px solid ${t.colors.accent};
309
+ border-radius: 8px;
310
+ background: ${t.colors.white};
311
+ color: ${t.colors.accent};
312
+ cursor: pointer;
313
+ font-family: ${t.font.sans};
314
+ font-weight: 600;
315
+ font-size: 13px;
316
+ letter-spacing: 0.46px;
317
+ text-transform: uppercase;
318
+
319
+ &:hover {
320
+ background: rgba(105, 31, 169, 0.06);
321
+ }
322
+ &:focus-visible {
323
+ outline: 2px solid ${t.colors.accent};
324
+ outline-offset: 2px;
325
+ }
326
+ `,kn=s.a`
327
+ flex: 1;
328
+ display: inline-flex;
329
+ align-items: center;
330
+ justify-content: center;
331
+ height: 48px;
332
+ border-radius: 8px;
333
+ background: ${t.colors.dclRed};
334
+ color: ${t.colors.softWhite};
335
+ cursor: pointer;
336
+ text-decoration: none;
337
+ font-family: ${t.font.sans};
338
+ font-weight: 600;
339
+ font-size: 13px;
340
+ letter-spacing: 0.46px;
341
+ text-transform: uppercase;
342
+
343
+ &:hover {
344
+ filter: brightness(1.05);
345
+ }
346
+ &:focus-visible {
347
+ outline: 2px solid ${t.colors.accent};
348
+ outline-offset: 2px;
349
+ }
350
+ `,me=s.div`
351
+ display: flex;
352
+ align-items: flex-start;
353
+ gap: 12px;
354
+ padding: 16px;
355
+ margin-top: 8px;
356
+ border-radius: 12px;
357
+ background: rgba(255, 45, 85, 0.1);
358
+ font-family: ${t.font.sans};
359
+ font-size: 14px;
360
+ line-height: 1.5;
361
+ color: ${t.colors.text};
362
+
363
+ .ico {
364
+ width: 22px;
365
+ height: 22px;
366
+ flex: none;
367
+ color: ${t.colors.dclRed};
368
+ }
369
+
370
+ /**
371
+ * Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
372
+ * reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
373
+ * all of which would contradict themselves rendered in the red error treatment.
374
+ */
375
+ &[data-tone='info'] {
376
+ background: ${t.colors.panel};
377
+
378
+ .ico {
379
+ color: ${t.colors.accent};
380
+ }
381
+ }
382
+ `;function Sn({name:o,priceCredits:i,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=et(h),x=tt(),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,_=l==null?void 0:l.credits,R=i!=null&&_!=null?i-_: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 rn({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(it(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{m.current=!1}}}const A=r!=="success"&&r!=="pending",te=nt(h==null?void 0:h.providerType);return e.jsx(an,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(ln,{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(cn,{children:[e.jsx(dn,{children:n("names.confirmTitle")}),e.jsx(pn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${En(o)}</b>`})}}),e.jsxs(hn,{children:[e.jsx(xn,{"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(fn,{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(un,{children:[e.jsx(gn,{src:st,alt:"",width:56,height:56}),e.jsx(bn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(yn,{children:[e.jsx(wn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(jn,{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-assets")},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(vn,{children:[e.jsx($n,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(Cn,{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-assets")},children:n("names.myItems")}),e.jsx(kn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function En(o){return o.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}const Rn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/world-B-9aPlxu.webp",_n="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/governance-DnazlIjy.webp",In=s.div`
383
+ width: 100%;
384
+ min-width: 0;
385
+ `,An=s.nav`
386
+ display: flex;
387
+ align-items: center;
388
+ gap: 6px;
389
+ margin: 4px 0 16px;
390
+ font-family: ${t.font.sans};
391
+ font-size: 12px;
392
+ line-height: 1;
393
+ color: ${t.colors.muted};
394
+ `,Nn=s.button`
395
+ border: 0;
396
+ background: none;
397
+ padding: 0;
398
+ cursor: pointer;
399
+ font: inherit;
400
+ color: ${t.colors.muted};
401
+
402
+ &:hover {
403
+ text-decoration: underline;
404
+ }
405
+ &:focus-visible {
406
+ outline: 2px solid ${t.colors.accent};
407
+ outline-offset: 2px;
408
+ }
409
+ `,Mn=s.span`
410
+ font-weight: 700;
411
+ color: ${t.colors.muted};
412
+ `,Pn=s.div`
413
+ display: flex;
414
+ flex-direction: column;
415
+ gap: 48px;
416
+ padding-bottom: 48px;
417
+ background: #ecdbfd;
418
+ border-radius: ${t.radius.banner};
419
+ overflow: hidden;
420
+
421
+ ${t.media.maxWidth("mobile")} {
422
+ gap: 32px;
423
+ padding-bottom: 32px;
424
+ }
425
+ `,Wn=s.div`
426
+ position: relative;
427
+ border-radius: ${t.radius.banner};
428
+ overflow: hidden;
429
+ padding: 88px 48px;
430
+ display: flex;
431
+ flex-direction: column;
432
+ align-items: center;
433
+ gap: 48px;
434
+ text-align: center;
435
+ background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
436
+
437
+ ${t.media.maxWidth("mobile")} {
438
+ padding: 40px 20px;
439
+ gap: 28px;
440
+ }
441
+ `,Bn=s.div`
442
+ display: flex;
443
+ flex-direction: column;
444
+ align-items: center;
445
+ gap: 12px;
446
+ `,Fn=s.h1`
447
+ margin: 0;
448
+ font-family: ${t.font.sans};
449
+ font-weight: 600;
450
+ font-size: 40px;
451
+ line-height: 1.167;
452
+ color: ${t.colors.white};
453
+
454
+ ${t.media.maxWidth("mobile")} {
455
+ font-size: 26px;
456
+ }
457
+ `,Ln=s.p`
458
+ margin: 0;
459
+ max-width: 760px;
460
+ font-family: ${t.font.sans};
461
+ font-weight: 500;
462
+ font-size: 24px;
463
+ line-height: 1.334;
464
+ color: #ecebed;
465
+
466
+ ${t.media.maxWidth("mobile")} {
467
+ font-size: 16px;
468
+ }
469
+ `,Un=s.div`
470
+ width: min(785px, 100%);
471
+ display: flex;
472
+ flex-direction: column;
473
+ gap: 12px;
474
+ `,Hn=s.div`
475
+ position: relative;
476
+ `,On=s("div",Vt("invalid"))`
477
+ display: flex;
478
+ align-items: center;
479
+ gap: 8px;
480
+ padding: 8px 8px 8px 16px;
481
+ background: ${t.colors.softWhite};
482
+ border: 1.5px solid ${({invalid:o})=>o?t.colors.dclRed:t.colors.line};
483
+ border-radius: 20px;
484
+
485
+ &:focus-within {
486
+ border-color: ${({invalid:o})=>o?t.colors.dclRed:t.colors.magenta};
487
+ }
488
+
489
+ ${t.media.maxWidth("mobile")} {
490
+ border-radius: 16px;
491
+ }
492
+ `,Dn=s.span`
493
+ position: absolute;
494
+ left: -9999px;
495
+ top: 0;
496
+ visibility: hidden;
497
+ pointer-events: none;
498
+ white-space: pre;
499
+ font-family: ${t.font.sans};
500
+ font-size: 20px;
501
+ font-weight: 600;
502
+ line-height: 1.6;
503
+
504
+ ${t.media.maxWidth("mobile")} {
505
+ font-size: 16px;
506
+ }
507
+ `,Gn=s.div`
508
+ position: absolute;
509
+ top: calc(100% + 8px);
510
+ left: 0;
511
+ right: 0;
512
+ z-index: 2;
513
+ display: flex;
514
+ align-items: center;
515
+ gap: 8px;
516
+ padding: 8px 12px;
517
+ border-radius: 8px;
518
+ background: #ffcdd4;
519
+ color: #ec303a;
520
+ font-family: ${t.font.sans};
521
+ font-size: 14px;
522
+ font-weight: 500;
523
+ line-height: 1.2;
524
+ text-align: left;
525
+
526
+ ${t.media.maxWidth("mobile")} {
527
+ position: static;
528
+ margin-top: 8px;
529
+ align-items: flex-start;
530
+ flex-wrap: wrap;
531
+ }
532
+ `,qn=s.a`
533
+ display: inline-flex;
534
+ align-items: center;
535
+ gap: 2px;
536
+ margin-left: auto;
537
+ color: #ec303a;
538
+ font-weight: 600;
539
+ text-decoration: underline;
540
+ text-transform: uppercase;
541
+ white-space: nowrap;
542
+
543
+ ${t.media.maxWidth("mobile")} {
544
+ margin-left: 0;
545
+ }
546
+ `,Vn=s.label`
547
+ flex: 1;
548
+ min-width: 0;
549
+ display: flex;
550
+ align-items: center;
551
+ gap: 0;
552
+ cursor: text;
553
+ overflow: hidden;
554
+ `,Kn=s.span`
555
+ flex: none;
556
+ margin-right: 8px;
557
+ font-family: ${t.font.sans};
558
+ font-size: 26px;
559
+ font-weight: 500;
560
+ line-height: 1;
561
+ color: ${t.colors.muted2};
562
+
563
+ ${t.media.maxWidth("mobile")} {
564
+ font-size: 20px;
565
+ }
566
+ `,Zn=s.input`
567
+ flex: 0 1 auto;
568
+ min-width: 0;
569
+ max-width: 100%;
570
+ border: 0;
571
+ outline: none;
572
+ background: transparent;
573
+ font-family: ${t.font.sans};
574
+ font-size: 20px;
575
+ font-weight: 600;
576
+ line-height: 1.6;
577
+ color: ${t.colors.text};
578
+ padding: 0;
579
+
580
+ &::placeholder {
581
+ color: ${t.colors.muted1};
582
+ font-weight: 400;
583
+ }
584
+
585
+ ${t.media.maxWidth("mobile")} {
586
+ font-size: 16px;
587
+ }
588
+ `,Jn=s.span`
589
+ flex: none;
590
+ margin-left: 2px;
591
+ font-family: ${t.font.sans};
592
+ font-size: 20px;
593
+ font-weight: 400;
594
+ line-height: 1.6;
595
+ color: ${t.colors.muted1};
596
+
597
+ ${t.media.maxWidth("mobile")} {
598
+ font-size: 16px;
599
+ }
600
+ `,Qn=s.span`
601
+ flex: none;
602
+ font-family: ${t.font.sans};
603
+ font-size: 13px;
604
+ color: ${t.colors.muted2};
605
+ white-space: nowrap;
606
+ `,Oe=s.button`
607
+ flex: none;
608
+ display: inline-flex;
609
+ align-items: center;
610
+ justify-content: center;
611
+ gap: 8px;
612
+ height: 52px;
613
+ padding: 0 24px;
614
+ border: 0;
615
+ border-radius: 12px;
616
+ cursor: pointer;
617
+ background: ${t.gradients.cerise};
618
+ color: ${t.colors.softWhite};
619
+ font-family: ${t.font.sans};
620
+ font-weight: 600;
621
+ font-size: 15px;
622
+ letter-spacing: 0.46px;
623
+ line-height: 24px;
624
+ text-transform: uppercase;
625
+
626
+ &:hover:not(:disabled) {
627
+ filter: brightness(1.05);
628
+ }
629
+ &:focus-visible {
630
+ outline: 2px solid ${t.colors.white};
631
+ outline-offset: 2px;
632
+ }
633
+ &:disabled {
634
+ cursor: not-allowed;
635
+ background: #e7c8e9;
636
+ color: #fbe9fb;
637
+ }
638
+
639
+ ${t.media.maxWidth("mobile")} {
640
+ display: none;
641
+ }
642
+ `,Xn=s(Oe)`
643
+ display: none;
644
+
645
+ ${t.media.maxWidth("mobile")} {
646
+ display: inline-flex;
647
+ width: 100%;
648
+ height: 48px;
649
+ border-radius: 12px;
650
+ }
651
+ `,Yn=s.span`
652
+ display: inline-flex;
653
+ align-items: center;
654
+ gap: 4px;
655
+ font-weight: 600;
656
+
657
+ .ico {
658
+ width: 16px;
659
+ height: 16px;
660
+ }
661
+ `,fe=s.div`
662
+ display: flex;
663
+ align-items: center;
664
+ gap: 8px;
665
+ padding: 8px 14px;
666
+ border-radius: 8px;
667
+ font-family: ${t.font.sans};
668
+ font-size: 13px;
669
+ font-weight: 500;
670
+ text-align: left;
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"};
674
+
675
+ .ico {
676
+ width: 16px;
677
+ height: 16px;
678
+ flex: none;
679
+ }
680
+ `,es=s.section`
681
+ display: flex;
682
+ flex-direction: column;
683
+ gap: 48px;
684
+ padding: 0 48px;
685
+
686
+ ${t.media.maxWidth("mobile")} {
687
+ gap: 32px;
688
+ padding: 0 20px;
689
+ }
690
+ `,ts=s.div`
691
+ display: flex;
692
+ flex-direction: column;
693
+ align-items: center;
694
+ gap: 24px;
695
+ `,ns=s.h2`
696
+ margin: 0;
697
+ text-align: center;
698
+ font-family: ${t.font.sans};
699
+ font-weight: 600;
700
+ font-size: 32px;
701
+ line-height: 1.167;
702
+ color: ${t.colors.text2};
703
+
704
+ ${t.media.maxWidth("mobile")} {
705
+ font-size: 22px;
706
+ }
707
+ `,ss=s.p`
708
+ margin: 0;
709
+ max-width: 907px;
710
+ text-align: center;
711
+ font-family: ${t.font.sans};
712
+ font-weight: 400;
713
+ font-size: 20px;
714
+ line-height: 1.57;
715
+ color: ${t.colors.text};
716
+
717
+ ${t.media.maxWidth("mobile")} {
718
+ font-size: 16px;
719
+ }
720
+ `,os=s.div`
721
+ display: grid;
722
+ grid-template-columns: repeat(4, 1fr);
723
+ gap: 24px;
724
+ align-items: stretch;
725
+
726
+ ${t.media.maxWidth("lg")} {
727
+ grid-template-columns: repeat(2, 1fr);
728
+ }
729
+ ${t.media.maxWidth("mobile")} {
730
+ grid-template-columns: 1fr;
731
+ }
732
+ `,K=s.article`
733
+ min-width: 0;
734
+ display: flex;
735
+ flex-direction: column;
736
+ background: ${t.colors.white};
737
+ border: 0.25px solid ${t.colors.muted2};
738
+ border-radius: ${t.radius.card};
739
+ overflow: hidden;
740
+ `,Z=s.img`
741
+ display: block;
742
+ width: 100%;
743
+ aspect-ratio: 388 / 235;
744
+ object-fit: cover;
745
+ `,J=s.div`
746
+ flex: 1;
747
+ display: flex;
748
+ flex-direction: column;
749
+ gap: 6px;
750
+ padding: 12px 16px;
751
+ `,Q=s.h3`
752
+ margin: 0;
753
+ font-family: ${t.font.sans};
754
+ font-weight: 700;
755
+ font-size: 20px;
756
+ line-height: 1.57;
757
+ text-transform: uppercase;
758
+ color: ${t.colors.text};
759
+ `,X=s.p`
760
+ margin: 0;
761
+ font-family: ${t.font.sans};
762
+ font-weight: 400;
763
+ font-size: 14px;
764
+ line-height: 1.57;
765
+ color: ${t.colors.text};
766
+ `,is=s.span`
767
+ font-weight: 600;
768
+ color: ${t.colors.accent};
769
+ `,Pe=s.a`
770
+ display: inline-flex;
771
+ align-items: center;
772
+ gap: 2px;
773
+ margin-top: auto;
774
+ font-family: ${t.font.sans};
775
+ font-weight: 500;
776
+ font-size: 14px;
777
+ line-height: 30px;
778
+ color: ${t.colors.accent};
779
+ text-decoration: underline;
780
+
781
+ &:focus-visible {
782
+ outline: 2px solid ${t.colors.accent};
783
+ outline-offset: 2px;
784
+ }
785
+
786
+ .ico {
787
+ width: 13px;
788
+ height: 13px;
789
+ }
790
+ `,rs=s.span`
791
+ position: absolute;
792
+ width: 1px;
793
+ height: 1px;
794
+ padding: 0;
795
+ margin: -1px;
796
+ overflow: hidden;
797
+ clip: rect(0, 0, 0, 0);
798
+ white-space: nowrap;
799
+ border: 0;
800
+ `,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(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 ds({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 _=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await Yt(d,{signal:_.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),_.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(Yn,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:o,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Mn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:p==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Zn,{value:d,onChange:C=>x(Jt(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(Jn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Qn,{"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(Gn,{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(qn,{href:cs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{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(rs,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(K,{children:[e.jsx(Z,{src:Rn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(Z,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(is,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:as,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(Z,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(Z,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(Sn,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const ps="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]=Je(),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,_]=f.useState("newest"),[R,$]=f.useState(!1);f.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=T}},[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=ct(),y=x?It[x]:void 0,U=(_e.find(c=>c.key===C)??_e[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:De,isFetchingNextPage:$e,fetchNextPage:Ge}=Nt(z?["shop-items",H]:["catalog-items",we],c=>z?at({...H,first:ue,skip:c}):lt({...we,first:ue,skip:c}),{enabled:l!=="names"}),D=je,Ce=N||P,qe=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ve}=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:D}))},[a,N,P,D]);const G=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(G.current==="__init__"||G.current===c){G.current=c;return}G.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:D})},[l,x,r,I,A,C,m,v,N,P,D]);function Ee(c){d(c),p(null)}function Re(c){u(T=>T.includes(c)?T.filter(W=>W!==c):[...T,c])}function Ze(){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 _t)r.includes(c)&&B.push({key:`rarity-${c}`,label:rt(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(pt,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(ht,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(xt,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(mt,{children:[e.jsx(ft,{children:n("assets.filters")}),e.jsx(ut,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(gt,{children:e.jsx(bt,{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(yt,{children:e.jsx(wt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(jt,{children:l==="names"?e.jsx(ds,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(zt,{sort:C,onSort:_,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Ze}),Ve&&z&&O.some(c=>c.source==="legacy")?e.jsx(vt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Mt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs($t,{"data-testid":"browse-empty",children:[e.jsx(Ct,{src:ps,alt:""}),e.jsxs(kt,{children:[e.jsx(St,{children:n("assets.empty.title")}),e.jsx(Et,{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(Rt,{children:e.jsx(Tt,{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(Te,{count:qe}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const T=c;if(T.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(T);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{...T,priceCredits:W}},V(c))}),$e?e.jsx(Te,{count:6}):null]})}),e.jsx(At,{hasNextPage:De,isFetching:$e,onLoadMore:()=>void Ge()})]})]})})]})}export{Ms as Assets};