@dcl/shop 1.0.2-31061952187.commit-8d8b09e → 1.0.2-31093320960.commit-a66fdac

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 (190) hide show
  1. package/_assets/{Activity-D_fQdZon.js → Activity-BZYV865P.js} +29 -29
  2. package/_assets/{AnimatedBackground-C9W4RBcZ.js → AnimatedBackground-C_gdl0Ga.js} +1 -1
  3. package/_assets/Assets-D6xTxE6H.js +892 -0
  4. package/_assets/{Assets.styles-BBWJCcMx.js → Assets.styles-C2Y2OMju.js} +80 -72
  5. package/_assets/{Authorizations-DVwQ95Ww.js → Authorizations-Dyl-2_Wx.js} +1 -1
  6. package/_assets/Cart-q1C0b7B0.js +706 -0
  7. package/_assets/{CircularProgress-D09608yv.js → CircularProgress-DfC_DW6J.js} +1 -1
  8. package/_assets/{Collection-DllncUVv.js → Collection-CikwxEA2.js} +11 -11
  9. package/_assets/{CollectionCarousel-B9HmGuVb.js → CollectionCarousel-CW99ees-.js} +182 -126
  10. package/_assets/{Confetti-Dl6FT7nL.js → Confetti-D-f5Qezh.js} +1 -1
  11. package/_assets/Creator-sxuxQmmv.js +307 -0
  12. package/_assets/{ErrorNotice-OUNK486K.js → ErrorNotice-D_MmJHjd.js} +1 -1
  13. package/_assets/{ExchangeController-Cp3qbfAM.js → ExchangeController-5e1qfrC7.js} +1 -1
  14. package/_assets/{Faq-DXtTtsuA.js → Faq-CZWOMrti.js} +1 -1
  15. package/_assets/{GetCredits-BhRNCaTG.js → GetCredits-EPpLyZrC.js} +19 -12
  16. package/_assets/{Grow-DXdR0gI9.js → Grow-CJcrEIIk.js} +1 -1
  17. package/_assets/{HelpersUtil-rQp5uDAx.js → HelpersUtil-D4FO24BM.js} +1 -1
  18. package/_assets/ItemDetail-Daqpqudw.js +3552 -0
  19. package/_assets/JumpInIcon-CfzbSVBF.js +1 -0
  20. package/_assets/LazyEmoteControls-CynuOxLa.js +2 -0
  21. package/_assets/{LoadMore-jSNRJiwZ.js → LoadMore-BcR7LuW8.js} +1 -1
  22. package/_assets/{ManaPricingBanner.styles-vDUAKLLe.js → ManaPricingBanner.styles-b_tWuH2r.js} +2 -2
  23. package/_assets/MyAssets-CY3P4YpT.js +396 -0
  24. package/_assets/{MyFavorites-BLrz2vwY.js → MyFavorites-2J4ivx_A.js} +20 -17
  25. package/_assets/{NotFound-DP4nosOd.js → NotFound-B9SvSXoT.js} +1 -1
  26. package/_assets/{NotificationsBell-ARziPv8W.js → NotificationsBell-DDd4PHL_.js} +1 -1
  27. package/_assets/{OutfitDetail-CLmuEgB3.js → OutfitDetail-DfQD1uwS.js} +12 -9
  28. package/_assets/{OutfitPreview-PWdXvCaE.js → OutfitPreview-B8wqKe4G.js} +1 -1
  29. package/_assets/{OutfitStudio-Cx3Xm6ff.js → OutfitStudio-C8kgT_Q1.js} +46 -46
  30. package/_assets/{StoreSettings-BQtEgWRm.js → StoreSettings-BszakGpI.js} +21 -21
  31. package/_assets/Success-BlrhZwie.js +353 -0
  32. package/_assets/{SwapController-Bf58lQ6b.js → SwapController-CtdE4CSE.js} +1 -1
  33. package/_assets/{Tooltip-BDmKiALz.js → Tooltip-D92iGFCG.js} +1 -1
  34. package/_assets/{TradeService-Yecm1OxI.js → TradeService-CDrDGVbQ.js} +1 -1
  35. package/_assets/{W3MFrameProviderSingleton-BQyeyr-U.js → W3MFrameProviderSingleton-ChXXI6YZ.js} +3 -3
  36. package/_assets/{WebCryptoP256-Ou_F2OJp.js → WebCryptoP256-D8s1Qscb.js} +1 -1
  37. package/_assets/{authorizations-B3AvOvOm.js → authorizations-qnGN3xsk.js} +1 -1
  38. package/_assets/{basic-DTDRwam-.js → basic-DhSHVZRT.js} +1 -1
  39. package/_assets/{biconomy-DaLi1O64.js → biconomy-ClBW5VwG.js} +1 -1
  40. package/_assets/{builder-DxumJmKw.js → builder-CL5pdg21.js} +1 -1
  41. package/_assets/{buy-BHkfYJLe.js → buy-B-DDln2Y.js} +1 -1
  42. package/_assets/{buy-gasless-BfTEWjT9.js → buy-gasless-C_BmhnE7.js} +1 -1
  43. package/_assets/{categories-D23W_J-A.js → categories-B8yCTSzR.js} +73 -58
  44. package/_assets/{ccip-qhHiv1gU.js → ccip-CJEnBLGM.js} +1 -1
  45. package/_assets/{ccip-DGVhZCZ4.js → ccip-DQfkaCht.js} +1 -1
  46. package/_assets/collectionPage.styles-CcRhgEaw.js +32 -0
  47. package/_assets/{controller-DGtmLk4f.js → controller-JXbdlxZp.js} +2 -2
  48. package/_assets/{core-BAqS3vu7.js → core-BSxLBlxi.js} +4 -4
  49. package/_assets/{createSvgIcon-Bm9nxGqG.js → createSvgIcon-yVJuzYrn.js} +2 -2
  50. package/_assets/{custom-MaGTnz7S.js → custom-B3uMWhu7.js} +1 -1
  51. package/_assets/{data-capture-5Vi1cyBa.js → data-capture-B-nbrWqF.js} +1 -1
  52. package/_assets/{email-BG6hRXMo.js → email-CVdda8uU.js} +1 -1
  53. package/_assets/{embedded-wallet-CfnknCH8.js → embedded-wallet-Y6M29Es7.js} +1 -1
  54. package/_assets/{emotion-styled.browser.esm-CoxAZUrJ.js → emotion-styled.browser.esm-BF1qb2R0.js} +1 -1
  55. package/_assets/{engine-nQGCV50K.js → engine-fjR5dIp4.js} +1 -1
  56. package/_assets/{errors-DZ_QWsza.js → errors-B_JuFrfU.js} +1 -1
  57. package/_assets/{estimate-l1-fee-CVpJ9ym5.js → estimate-l1-fee-B1LOd6k3.js} +1 -1
  58. package/_assets/{execute-DFvUDrLY.js → execute-BXynqqjh.js} +2 -2
  59. package/_assets/{features-BXUedULM.js → features-Czbv6jQA.js} +1 -1
  60. package/_assets/{fetchTokenMetadata-CkQcnzmO.js → fetchTokenMetadata-BuR7htwA.js} +2 -2
  61. package/_assets/{field.styles-PE4ZasC2.js → field.styles-DFDRX2tk.js} +1 -1
  62. package/_assets/{get-ecosystem-wallet-info-CRLH8I6C.js → get-ecosystem-wallet-info-C8Jcr_V9.js} +1 -1
  63. package/_assets/{getBalance-CiV48JsZ.js → getBalance-sCJcvWYJ.js} +1 -1
  64. package/_assets/{getNFT-CV3N9TTA.js → getNFT-Vt2rJ26d.js} +1 -1
  65. package/_assets/{getNFT-C3ucNb89.js → getNFT-mOXdmQiA.js} +1 -1
  66. package/_assets/{grid.styles-hOZTJ80g.js → grid.styles-CX_shgZ5.js} +1 -1
  67. package/_assets/{hashTypedData-BtF2J233.js → hashTypedData-CN02HuAO.js} +1 -1
  68. package/_assets/{hashTypedData-gTABcRB5.js → hashTypedData-LiZBeYpJ.js} +1 -1
  69. package/_assets/identity-icon-C8yAW_Gq.svg +8 -0
  70. package/_assets/{in-app-CSDr4Blb.js → in-app-Di-YguDK.js} +1 -1
  71. package/_assets/{in-app-wallet-calls-Crivl9zc.js → in-app-wallet-calls-DeaYPRmI.js} +1 -1
  72. package/_assets/{index-CvwosU6Y.js → index-8YFhojLT.js} +1 -1
  73. package/_assets/{index-BTDIKmoC.js → index-94LcKPqN.js} +1 -1
  74. package/_assets/{index-CHf7lsmp.js → index-B5pEWwvB.js} +1 -1
  75. package/_assets/{index-D5eMvKb_.js → index-BJXNRLkE.js} +1 -1
  76. package/_assets/{index-ItjVcw1b.js → index-BKaw3xHY.js} +1 -1
  77. package/_assets/{index-Bs4LvV4K.js → index-BKtPMRlC.js} +2 -2
  78. package/_assets/{index-S0X-BG2b.js → index-BKwIRP5b.js} +1 -1
  79. package/_assets/{index-C0pcaEQl.js → index-BPg5Mvmb.js} +1 -1
  80. package/_assets/{index-CwRTjZPC.js → index-BRQ9Wcma.js} +3 -3
  81. package/_assets/{index-DKHMu0o3.js → index-BVxFsPRO.js} +1 -1
  82. package/_assets/{index-CyRHowbs.js → index-BanfPpYD.js} +1 -1
  83. package/_assets/{index-KWEbYeSY.js → index-Bf_azgOs.js} +1 -1
  84. package/_assets/{index-HAEoS9R6.js → index-BgNzVgyj.js} +1 -1
  85. package/_assets/{index-BniGBCAO.js → index-Bk3rNDtD.js} +1 -1
  86. package/_assets/{index-Dp2641E3.js → index-BkZn7ynX.js} +1 -1
  87. package/_assets/{index-C5Evg5sh.js → index-Bl852CQj.js} +1 -1
  88. package/_assets/{index-DkV5TYom.js → index-Bm_zAXvq.js} +1 -1
  89. package/_assets/{index-CHolIX6U.js → index-BsJj67OU.js} +1 -1
  90. package/_assets/{index-hKv-BpxY.js → index-BuWzyRcz.js} +1 -1
  91. package/_assets/{index-CKUuopSw.js → index-BwmnMTdg.js} +526 -451
  92. package/_assets/{index-BBbwMaBz.js → index-Bz4Oae-5.js} +1 -1
  93. package/_assets/{index-DSuiX4WG.js → index-BzBhg1fo.js} +1 -1
  94. package/_assets/{index-DnJJn52L.js → index-C0C9VUse.js} +1 -1
  95. package/_assets/{index-CmY0V0eX.js → index-C3CEKm2j.js} +1 -1
  96. package/_assets/{index-DdmULNRk.js → index-C6AA1Xf7.js} +2 -2
  97. package/_assets/{index-CkGO7qOd.js → index-CBhJLill.js} +1 -1
  98. package/_assets/{index-DLFQdlEW.js → index-CF-t9R4v.js} +1 -1
  99. package/_assets/{index-BNBzDf6z.js → index-CahHjkxT.js} +1 -1
  100. package/_assets/{index-Cf-gi-Qq.js → index-CcCpGfgd.js} +1 -1
  101. package/_assets/{index-UyXkCiLs.js → index-CdZzuE8e.js} +1 -1
  102. package/_assets/{index-DjTNPtj2.js → index-CfP1fkI_.js} +1 -1
  103. package/_assets/{index-Dh85kccn.js → index-Cleyy_0q.js} +1 -1
  104. package/_assets/{index-DwX-9Zo4.js → index-CnCeem_J.js} +1 -1
  105. package/_assets/{index-ClUPCoEW.js → index-D6OOP-51.js} +1 -1
  106. package/_assets/{index-BYP7oMPZ.css → index-DB6GvbxL.css} +1 -1
  107. package/_assets/{index-DXRL-4ld.js → index-DDJ7sdXv.js} +1 -1
  108. package/_assets/{index-CS27am7J.js → index-DJpl6Nbn.js} +1 -1
  109. package/_assets/{index-DKdQUEzy.js → index-DNNPYfed.js} +1 -1
  110. package/_assets/{index-9x1mGBeU.js → index-DQzE_-yq.js} +1 -1
  111. package/_assets/{index-DgOiZShm.js → index-DULGD4d2.js} +1 -1
  112. package/_assets/{index-C7hpB9s1.js → index-DaSPxwNy.js} +3 -3
  113. package/_assets/{index-DoGz07sk.js → index-DjW0J8pD.js} +1 -1
  114. package/_assets/{index-9_4ZEs3N.js → index-DjYBUAnI.js} +1 -1
  115. package/_assets/{index-CGBg3yUz.js → index-DlFosNf0.js} +5 -5
  116. package/_assets/{index-D7LYoLo4.js → index-Dm6Y9ZbQ.js} +1 -1
  117. package/_assets/{index-EKmmXx1j.js → index-Dr4f9K-t.js} +1 -1
  118. package/_assets/{index-qGMuaBIs.js → index-FT6agMXk.js} +1 -1
  119. package/_assets/{index-1oceTWwb.js → index-IvNZzfoI.js} +3 -3
  120. package/_assets/{index-C23D_vyT.js → index-N1bohwEM.js} +1 -1
  121. package/_assets/{index-D769FdFr.js → index-OQab0-JQ.js} +1 -1
  122. package/_assets/{index-wRmEiTlP.js → index-rEZ_4IFC.js} +2 -2
  123. package/_assets/{index-Bg_gOSx_.js → index-sFhq_-vF.js} +1 -1
  124. package/_assets/{index-DY1xBku2.js → index-tLIN_GkS.js} +1 -1
  125. package/_assets/{index.es-g_bB-nFv.js → index.es-CAHIM3qD.js} +1 -1
  126. package/_assets/{index.es-DnMGDxtr.js → index.es-DAZuzUm7.js} +1 -1
  127. package/_assets/{index.es-wpL2Ycto.js → index.es-Dwz0IUN6.js} +4 -4
  128. package/_assets/invite-icon-Bz6lCTuB.svg +11 -0
  129. package/_assets/{localBatchGatewayRequest-DtELSHiE.js → localBatchGatewayRequest-CmvuTHFj.js} +1 -1
  130. package/_assets/{networks-ZmRqsvV6.js → networks-DxoGDzHE.js} +1 -1
  131. package/_assets/{onramp-Bffl3qa3.js → onramp-DUHkYtuW.js} +1 -1
  132. package/_assets/{openzeppelin-BmH-LNci.js → openzeppelin-sla19LMh.js} +1 -1
  133. package/_assets/{parseNft-PSjb4qKi.js → parseNft-UEsMFiqe.js} +2 -2
  134. package/_assets/{parseSignature-IigTmAp7.js → parseSignature-BhyKODlU.js} +1 -1
  135. package/_assets/{parseSignature-D947kFfv.js → parseSignature-CPQ4376G.js} +3 -3
  136. package/_assets/{passkeys-BsJVcpuM.js → passkeys-wDVu6yuN.js} +1 -1
  137. package/_assets/{pay-with-exchange-CU_HZd9F.js → pay-with-exchange-CWK-Ssp3.js} +1 -1
  138. package/_assets/{qr-overlay-EMShc5uE.js → qr-overlay-BNEHuGJ4.js} +1 -1
  139. package/_assets/{receive-CO6WElZa.js → receive-BWFbKioL.js} +1 -1
  140. package/_assets/{resolveImplementation-CUngPhAv.js → resolveImplementation-DgfhwMlM.js} +1 -1
  141. package/_assets/{rpc-BqH_VMy9.js → rpc-BqdwSpX8.js} +1 -1
  142. package/_assets/{secp256k1-D7kpLshE.js → secp256k1-BBK7GqHS.js} +1 -1
  143. package/_assets/{secp256k1-CTsmRKJj.js → secp256k1-C-W8I-Zy.js} +1 -1
  144. package/_assets/{secp256k1-DneM3aYG.js → secp256k1-DREcXm38.js} +1 -1
  145. package/_assets/{send-DnwW2LgN.js → send-CHzkLWPr.js} +1 -1
  146. package/_assets/{send-batch-transaction-BgJnfEM8.js → send-batch-transaction-5BgfAaSR.js} +1 -1
  147. package/_assets/{send-eip712-transaction-Cw3ykz5y.js → send-eip712-transaction-D_wCG6QA.js} +2 -2
  148. package/_assets/{send-gasless-transaction-BjGhnCwR.js → send-gasless-transaction-tLadnb9y.js} +2 -2
  149. package/_assets/{send-transaction-COKVeGfk.js → send-transaction-D3DYgONV.js} +2 -2
  150. package/_assets/{sendMetaTransaction-Bp3kwdLJ.js → sendMetaTransaction-Uawte2uP.js} +1 -1
  151. package/_assets/{sendRawTransaction-eVli2oE3.js → sendRawTransaction-yrJJjJuj.js} +3 -3
  152. package/_assets/{serializeTransaction-CIM9i_-w.js → serializeTransaction-DbAjRO35.js} +1 -1
  153. package/_assets/{session-proposal-KGl_Ah2b.js → session-proposal-tovuipdf.js} +1 -1
  154. package/_assets/{session-request-VAEXTksW.js → session-request-CJx8_Nqv.js} +2 -2
  155. package/_assets/{signing-Cgx49_1X.js → signing-DIdv4EGK.js} +3 -3
  156. package/_assets/{skeleton.styles-BXNXDWEi.js → skeleton.styles-JTH6hNy6.js} +1 -1
  157. package/_assets/{socials-oKAOeF-k.js → socials-BMAR0gR_.js} +1 -1
  158. package/_assets/{styled-pD_2hanx.js → styled-Dfg0i8eX.js} +1 -1
  159. package/_assets/{swaps-BcAY_D99.js → swaps-BGa4ySw5.js} +1 -1
  160. package/_assets/{thirdweb-ChAqWFCO.js → thirdweb-Bf4Axk_U.js} +3 -3
  161. package/_assets/{to-serializable-transaction-D9qGbcrS.js → to-serializable-transaction-DRJLaygN.js} +2 -2
  162. package/_assets/{transactionReceipt-BMw52z-f.js → transactionReceipt-Bhig9TGy.js} +1 -1
  163. package/_assets/{transactions-CeENvGIt.js → transactions-CCUXYIeH.js} +1 -1
  164. package/_assets/{useCreditPacks-BcavayJ3.js → useCreditPacks-D8rMiOb_.js} +1 -1
  165. package/_assets/{useImportable-CqnIvzif.js → useImportable-CNQfbBw8.js} +1 -1
  166. package/_assets/{useInfiniteGrid-BjEQAabI.js → useInfiniteGrid-BADHIu6F.js} +1 -1
  167. package/_assets/{useTheme-BnnteKI4.js → useTheme-DBV2Tqy3.js} +1 -1
  168. package/_assets/{verifyHash-CuRmy06R.js → verifyHash-Cdp-LdrE.js} +1 -1
  169. package/_assets/{w3m-modal-BvOCJx7k.js → w3m-modal-BxSlR5wP.js} +1 -1
  170. package/_assets/{w3m-modal-CkBFH4cA.js → w3m-modal-CIDOCqB8.js} +1 -1
  171. package/_assets/{wait-for-tx-receipt-B2KaPYJT.js → wait-for-tx-receipt-C9B0C6I6.js} +1 -1
  172. package/_assets/{wallets-CpXU08d2.js → wallets-wYcTf8sk.js} +5 -5
  173. package/_assets/{web-connector-BHRkWbB9.js → web-connector-DC2N7iZ9.js} +3 -3
  174. package/_assets/world-icon-6xQ-PmmW.svg +7 -0
  175. package/_assets/{writeContract-DNDGvg0r.js → writeContract-EKs-5iav.js} +1 -1
  176. package/_assets/{zoraTestnet-CCn01jlp.js → zoraTestnet-DPmpNXvV.js} +1 -1
  177. package/index.html +11 -11
  178. package/package.json +2 -2
  179. package/_assets/Assets-CvZql_4R.js +0 -866
  180. package/_assets/Cart-CBLHJRVj.js +0 -706
  181. package/_assets/Creator-BreBnKPX.js +0 -305
  182. package/_assets/ItemDetail-clRbfaLQ.js +0 -3551
  183. package/_assets/LazyEmoteControls-B7UYn8xk.js +0 -2
  184. package/_assets/MyAssets-CsWhc-qa.js +0 -381
  185. package/_assets/Success-BWfI3_Mu.js +0 -280
  186. package/_assets/collectionPage.styles-CoEdrsfq.js +0 -49
  187. package/_assets/governance-DnazlIjy.webp +0 -0
  188. package/_assets/identity-B4DXDuJP.webp +0 -0
  189. package/_assets/invite-BfwIhP2C.webp +0 -0
  190. package/_assets/world-B-9aPlxu.webp +0 -0
@@ -0,0 +1,892 @@
1
+ import{r as u,b as Fe,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Qe}from"./useUrlFilters-DH-gxdfV.js";import{u as Je,S as $e,R as Xe,F as Ye,e as et}from"./categories-B8yCTSzR.js";import{c as P,r as tt,aJ as nt,aK as st,aR as it,a as ot,s,t,o as Ie,az as at,A as rt,L as xe,b as n,y as lt,I as T,z as W,cm as ee,ax as ct,Z as X,aO as dt,aN as ht,x as Ae,an as ze,n as Ne,q as pt,ac as ft,ap as ke,aq as Z,aX as xt,bK as mt}from"./index-BwmnMTdg.js";import{g as ut,h as gt,i as yt,j as bt,k as wt,C as Ct,l as vt,o as jt,m as $t,n as kt,M as St,u as Et,q as Tt,v as Lt,E as Rt,r as Mt,p as _t,s as Ft,t as It}from"./Assets.styles-C2Y2OMju.js";import{L as At}from"./LoadMore-BcR7LuW8.js";import{u as zt}from"./useInfiniteGrid-BADHIu6F.js";import{E as Nt}from"./ErrorNotice-D_MmJHjd.js";import{d as Wt}from"./dcl-schemas-CmtP3U6y.js";import{s as Bt,G as Pt,w as Ht,S as Ot}from"./buy-gasless-C_BmhnE7.js";import{s as Ut,k as Gt}from"./buy-B-DDln2Y.js";import{f as Zt}from"./errors-B_JuFrfU.js";import{J as qt,C as Dt,B as me}from"./ethers-BDpbhgX6.js";import{n as Vt}from"./Tooltip-D92iGFCG.js";import{G as Kt}from"./grid.styles-CX_shgZ5.js";import"./skeleton.styles-JTH6hNy6.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-qnGN3xsk.js";import"./sendMetaTransaction-Uawte2uP.js";function q(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const H="100000000000000000000",We=2,Y=15,Qt=/^[a-zA-Z0-9]+$/;function Se(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:Qt.test(a)?a.length<We?{ok:!1,reason:"too-short"}:a.length>Y?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Jt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,Y)}const Xt=["function available(string _subdomain) view returns (bool)"],Ee={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return P.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Ee.mainnet:Ee.sepolia}async function en(i,a={}){var h;const{rpc:o,address:p}=Yt(),f=new qt(o),c=new Dt(p,Xt,f);console.info(`[names] availability check → DCLRegistrar(${p}).available("${i}") on ${o}`);const d=await c.available(i);if((h=a.signal)!=null&&h.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${d}`),d?"available":"taken"}const tn="https://app.across.to/api";class ue extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return it(H,i)}async function sn(i,a,o={}){var h;const p=o.chainId??P.chainId,f=o.provider??"across",c=`${P.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${p}&provider=${f}`,d=await ot(c,{method:"GET",identity:i,metadata:{}});if(!d.ok){let l;try{l=(h=await d.json())==null?void 0:h.code}catch{}throw l==="ROUTE_COST_TOO_HIGH"?new ue:new Error(`fetchNameCreditRoute ${d.status}`)}return d.json()}function on(i,a){const o=me.from(i.availableAmount),f=me.from(H).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:f.isNegative()?"0":f.toString(),maxCreditedValue:H}}async function an(i,a={}){const o=tn,p=a.intervalMs??1e4,f=a.maxAttempts??60;let c={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let d=0;d<f;d++){try{const h=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(h.ok){const l=await h.json(),m=(l.status??"pending").toLowerCase(),y=l.fillTx??l.fillTxnRef??null,b=l.actionsSucceeded!==!1;if(m==="filled")return{status:"filled",destinationTxHash:y,actionsSucceeded:b};if(m==="refunded"||m==="expired")return{status:m,destinationTxHash:null,actionsSucceeded:!1};c={status:"pending",destinationTxHash:y,actionsSucceeded:b}}}catch{}d<f-1&&await new Promise(h=>setTimeout(h,p))}return c}async function rn(i){const{name:a,identity:o,signer:p}=i,f=i.chainId??P.chainId,c=i.provider??"across",d=(i.beneficiary??await p.getAddress()).toLowerCase();let h=null,l=!1;console.info("[names] register start",{name:a,buyer:d,chainId:f,provider:c});try{const m=await tt(f),y=nn(m);console.info("[names] step 1/6 sized reservation",{usdCents:y,manaRate:m});const b=await sn(o,a,{chainId:f,provider:c});console.info("[names] step 2/6 route fetched",{target:b.externalCall.target,selector:b.externalCall.selector,provider:b.provider,quoteId:b.quoteId});const v=await nt(o,y);if(h=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),me.from(v.maxCreditedValue).lt(H))throw new Error("Credit under-sized for the name price");const C=on(v.credit,b);let g;try{g=await Bt({chainId:f,buyer:d,signer:p,args:C})}catch(w){if(!(w instanceof Pt))throw w;g=await Ut(f,C,p)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await Ht(g),l=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),c==="across"){const w=await an(g,i.acrossPoll);if(console.info("[names] step 6/6 across status",w),w.status==="pending")return{status:"pending",originTxHash:g};if(w.status!=="filled"||!w.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:g,destinationTxHash:w.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(m){if(console.error("[names] register failed — raw error:",m,{name:a,buyer:d,originConfirmed:l}),m instanceof Ot)return{status:"pending",originTxHash:m.txHash};if(h&&!l&&await st(o,[h]).catch(()=>{}),m instanceof ue)throw m;const y=new Error(Zt(m,"Couldn't register the name. Please try again.",{sale:!0}));throw y.cause=m,y}}const ln=60,cn=700,dn=25;function hn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:ln});a[a.length-1]={text:i,delay:cn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:dn});return a}function pn(i){return i.flatMap(hn)}function fn(i,a){const o=u.useMemo(()=>pn(i),[i]),[p,f]=u.useState(0);return u.useEffect(()=>{if(!a||o.length===0)return;const c=setTimeout(()=>f(d=>(d+1)%o.length),o[p%o.length].delay);return()=>clearTimeout(c)},[p,a,o]),!a||o.length===0?"":o[p%o.length].text}const xn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",mn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31093320960.commit-a66fdac/_assets/name-verified-oGwQ3ntb.svg",un="#34fee6",gn=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
+ `,yn=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
+ `,te=s.div`
24
+ display: flex;
25
+ align-items: flex-start;
26
+ justify-content: space-between;
27
+ gap: 12px;
28
+ `,ne=s.h2`
29
+ margin: 0;
30
+ font-family: ${t.font.sans};
31
+ font-weight: 700;
32
+ font-size: 20px;
33
+ line-height: 1.6;
34
+ color: ${t.colors.text};
35
+ `,se=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
+ `,ie=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
+ `,oe=s.hr`
73
+ border: 0;
74
+ border-top: 1px solid ${t.colors.line};
75
+ margin: 16px 0;
76
+ `,ae=s.div`
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 16px;
80
+ `,bn=s.div`
81
+ flex: none;
82
+ display: flex;
83
+ flex-direction: column;
84
+ align-items: center;
85
+ justify-content: center;
86
+ gap: 12px;
87
+ width: 137px;
88
+ height: 137px;
89
+ padding: 20px 0;
90
+ border-radius: 12px;
91
+ overflow: hidden;
92
+ background: ${t.gradients.amethyst};
93
+ `,wn=s.img`
94
+ display: block;
95
+ width: 47px;
96
+ height: 47px;
97
+ `,Cn=s.span`
98
+ display: inline-flex;
99
+ align-items: center;
100
+ gap: 2px;
101
+ max-width: 100%;
102
+ padding: 0 8px;
103
+ font-family: ${t.font.sans};
104
+ font-size: 18px;
105
+ font-weight: 600;
106
+ /* The design's cyan — it has to read against the purple, which the body text colour would not. */
107
+ color: ${un};
108
+ white-space: nowrap;
109
+ overflow: hidden;
110
+
111
+ /* Truncation belongs on the flex item, not this box: text-overflow is inert on a flex container, and
112
+ the zero min-width is what lets the name shrink instead of pushing the tick out. */
113
+ > span {
114
+ min-width: 0;
115
+ overflow: hidden;
116
+ text-overflow: ellipsis;
117
+ }
118
+ `,vn=s.img`
119
+ flex: none;
120
+ display: block;
121
+ width: 14px;
122
+ height: 14px;
123
+ `,Te=s.div`
124
+ flex: none;
125
+ display: grid;
126
+ place-items: center;
127
+ width: 56px;
128
+ height: 56px;
129
+ border-radius: 10px;
130
+ background: ${t.gradients.amethyst};
131
+ color: ${t.colors.white};
132
+
133
+ .ico {
134
+ width: 30px;
135
+ height: 30px;
136
+ }
137
+ `,re=s.div`
138
+ flex: 1;
139
+ min-width: 0;
140
+ `,le=s.div`
141
+ font-family: ${t.font.sans};
142
+ font-weight: 700;
143
+ font-size: 20px;
144
+ line-height: 1.3;
145
+ color: ${t.colors.text};
146
+ overflow: hidden;
147
+ text-overflow: ellipsis;
148
+ white-space: nowrap;
149
+
150
+ span {
151
+ font-weight: 400;
152
+ color: ${t.colors.muted2};
153
+ }
154
+ `,ce=s.div`
155
+ font-family: ${t.font.sans};
156
+ font-size: 14px;
157
+ color: ${t.colors.muted2};
158
+ `,de=s.div`
159
+ flex: none;
160
+ display: flex;
161
+ align-items: center;
162
+ gap: 6px;
163
+ font-family: ${t.font.sans};
164
+ font-weight: 600;
165
+ font-size: 24px;
166
+ color: ${t.colors.text};
167
+
168
+ .ico {
169
+ width: 22px;
170
+ height: 22px;
171
+ color: ${t.colors.brandViolet};
172
+ }
173
+ `,jn=s.div`
174
+ margin-top: 16px;
175
+ padding: 16px;
176
+ border-radius: 12px;
177
+ background: ${t.colors.promptLilac};
178
+ `,$n=s.div`
179
+ font-family: ${t.font.sans};
180
+ font-weight: 700;
181
+ font-size: 16px;
182
+ color: ${t.colors.text};
183
+ `,kn=s.p`
184
+ margin: 8px 0 16px;
185
+ font-family: ${t.font.sans};
186
+ font-size: 14px;
187
+ line-height: 1.5;
188
+ color: ${t.colors.text2};
189
+
190
+ /* The chosen NAME is filled with the gradient the design runs through it (1356:335140), not a flat
191
+ violet — background-clip is the only way to paint a text run with one. */
192
+ b {
193
+ font-weight: 700;
194
+ background: linear-gradient(180deg, ${t.colors.dclRed}, ${t.colors.magenta});
195
+ background-clip: text;
196
+ -webkit-background-clip: text;
197
+ color: transparent;
198
+ }
199
+ `,Sn=s.label`
200
+ display: flex;
201
+ align-items: center;
202
+ gap: 8px;
203
+ padding: 12px 14px;
204
+ background: ${t.colors.softWhite};
205
+ /* A hairline in Gray 2, not a full pixel of soft-black: this field sits INSIDE the lilac panel and
206
+ the heavier edge made it read as the modal's primary control (Figma 1356:335172). */
207
+ border: 0.5px solid ${t.colors.muted};
208
+ border-radius: 8px;
209
+ cursor: text;
210
+
211
+ &:focus-within {
212
+ border-color: ${t.colors.magenta};
213
+ }
214
+ `,En=s.span`
215
+ flex: none;
216
+ font-family: ${t.font.sans};
217
+ font-size: 18px;
218
+ color: ${t.colors.muted2};
219
+ `,Tn=s.input`
220
+ flex: 0 1 auto;
221
+ min-width: 0;
222
+ border: 0;
223
+ outline: none;
224
+ background: transparent;
225
+ font-family: ${t.font.sans};
226
+ font-size: 16px;
227
+ font-weight: 600;
228
+ color: ${t.colors.text};
229
+
230
+ &::placeholder {
231
+ color: ${t.colors.muted2};
232
+ font-weight: 400;
233
+ }
234
+ `,Ln=s.span`
235
+ flex: none;
236
+ font-family: ${t.font.sans};
237
+ font-size: 16px;
238
+ color: ${t.colors.muted2};
239
+ `,Le=s.button`
240
+ margin-top: 16px;
241
+ width: 100%;
242
+ height: 46px;
243
+ border: 0;
244
+ border-radius: 12px;
245
+ cursor: pointer;
246
+ background: ${t.gradients.buyBtn};
247
+ color: ${t.colors.softWhite};
248
+ font-family: ${t.font.sans};
249
+ font-weight: 600;
250
+ font-size: 15px;
251
+ letter-spacing: 0.46px;
252
+ text-transform: uppercase;
253
+ transition: background-image 0.15s ease;
254
+
255
+ /* Both ends stay on background-IMAGE: a gradient cannot interpolate to a plain colour, so swapping
256
+ the shorthand instead blanks the button for the length of the transition. */
257
+ &:hover:not(:disabled),
258
+ &:active:not(:disabled) {
259
+ background-image: linear-gradient(${t.colors.dclRed}, ${t.colors.dclRed});
260
+ }
261
+ &:focus-visible {
262
+ outline: 2px solid ${t.colors.accent};
263
+ outline-offset: 2px;
264
+ }
265
+ &:disabled {
266
+ cursor: not-allowed;
267
+ opacity: 0.5;
268
+ }
269
+ `,Rn=s.div`
270
+ display: flex;
271
+ flex-direction: column;
272
+ align-items: flex-start;
273
+ gap: 20px;
274
+ padding: 32px 0 8px;
275
+ `,Mn=s.img`
276
+ align-self: center;
277
+ width: 56px;
278
+ height: 56px;
279
+ `,_n=s.div`
280
+ font-family: ${t.font.sans};
281
+ font-weight: 700;
282
+ font-size: 18px;
283
+ color: ${t.colors.text};
284
+ `,Fn=s.div`
285
+ display: flex;
286
+ align-items: center;
287
+ gap: 12px;
288
+ width: 100%;
289
+ `,In=s.div`
290
+ flex: 1;
291
+ height: 8px;
292
+ border-radius: 999px;
293
+ background: ${t.colors.chip};
294
+ overflow: hidden;
295
+
296
+ span {
297
+ display: block;
298
+ height: 100%;
299
+ width: 40%;
300
+ border-radius: 999px;
301
+ background: ${t.gradients.amethyst};
302
+ animation: nameProgress 1.1s ease-in-out infinite;
303
+ }
304
+
305
+ @keyframes nameProgress {
306
+ 0% {
307
+ transform: translateX(-100%);
308
+ }
309
+ 100% {
310
+ transform: translateX(320%);
311
+ }
312
+ }
313
+ `,An=s.span`
314
+ flex: none;
315
+ font-family: ${t.font.sans};
316
+ font-size: 14px;
317
+ color: ${t.colors.muted};
318
+ `,zn=s.div`
319
+ display: flex;
320
+ flex-direction: column;
321
+ align-items: center;
322
+ gap: 16px;
323
+ padding: 24px;
324
+ border-radius: 12px;
325
+ background: #e2f5ea;
326
+ text-align: center;
327
+ `,Nn=s.div`
328
+ display: grid;
329
+ place-items: center;
330
+ width: 56px;
331
+ height: 56px;
332
+ border-radius: 50%;
333
+ background: ${t.colors.ok};
334
+ color: ${t.colors.white};
335
+
336
+ .ico {
337
+ width: 30px;
338
+ height: 30px;
339
+ }
340
+ `,Wn=s.p`
341
+ margin: 0;
342
+ font-family: ${t.font.sans};
343
+ font-size: 16px;
344
+ line-height: 1.4;
345
+ color: ${t.colors.text};
346
+
347
+ b {
348
+ font-weight: 700;
349
+ }
350
+ `,Re=s.div`
351
+ display: flex;
352
+ gap: 16px;
353
+ margin-top: 20px;
354
+
355
+ ${t.media.maxWidth("mobile")} {
356
+ flex-direction: column;
357
+ }
358
+ `,Me=s.button`
359
+ flex: 1;
360
+ height: 48px;
361
+ border: 1px solid ${t.colors.accent};
362
+ border-radius: 8px;
363
+ background: ${t.colors.white};
364
+ color: ${t.colors.accent};
365
+ cursor: pointer;
366
+ font-family: ${t.font.sans};
367
+ font-weight: 600;
368
+ font-size: 13px;
369
+ letter-spacing: 0.46px;
370
+ text-transform: uppercase;
371
+
372
+ &:hover {
373
+ background: rgba(105, 31, 169, 0.06);
374
+ }
375
+ &:focus-visible {
376
+ outline: 2px solid ${t.colors.accent};
377
+ outline-offset: 2px;
378
+ }
379
+ `,Bn=s.a`
380
+ flex: 1;
381
+ display: inline-flex;
382
+ align-items: center;
383
+ justify-content: center;
384
+ height: 48px;
385
+ border-radius: 8px;
386
+ background: ${t.colors.dclRed};
387
+ color: ${t.colors.softWhite};
388
+ cursor: pointer;
389
+ text-decoration: none;
390
+ font-family: ${t.font.sans};
391
+ font-weight: 600;
392
+ font-size: 13px;
393
+ letter-spacing: 0.46px;
394
+ text-transform: uppercase;
395
+
396
+ &:hover {
397
+ filter: brightness(1.05);
398
+ }
399
+ &:focus-visible {
400
+ outline: 2px solid ${t.colors.accent};
401
+ outline-offset: 2px;
402
+ }
403
+ `,he=s.div`
404
+ display: flex;
405
+ align-items: flex-start;
406
+ gap: 12px;
407
+ padding: 16px;
408
+ margin-top: 8px;
409
+ border-radius: 12px;
410
+ background: rgba(255, 45, 85, 0.1);
411
+ font-family: ${t.font.sans};
412
+ font-size: 14px;
413
+ line-height: 1.5;
414
+ color: ${t.colors.text};
415
+
416
+ .ico {
417
+ width: 22px;
418
+ height: 22px;
419
+ flex: none;
420
+ color: ${t.colors.dclRed};
421
+ }
422
+
423
+ /**
424
+ * Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
425
+ * reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
426
+ * all of which would contradict themselves rendered in the red error treatment.
427
+ */
428
+ &[data-tone='info'] {
429
+ background: ${t.colors.panel};
430
+
431
+ .ico {
432
+ color: ${t.colors.accent};
433
+ }
434
+ }
435
+ `;function Pn({name:i,priceCredits:a,onClose:o}){const{session:p}=Ie(),{data:f,isError:c}=at(p),d=rt(),h=Fe(),[l,m]=u.useState("confirm"),[y,b]=u.useState(""),[v,C]=u.useState(null),g=u.useRef(!1),w=y.trim().toLowerCase()===i.toLowerCase(),S=l==="completing",L=a!=null?xe(a):"—",$=a==null,E=f==null?void 0:f.credits,A=a!=null&&E!=null?a-E:0,F=A>0,_=$?n("names.priceUnavailable"):F?n("names.insufficientCredits",{credits:xe(A)}):null;u.useEffect(()=>{const x=k=>{k.key==="Escape"&&!S&&o()};document.addEventListener("keydown",x);const j=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",x),document.body.style.overflow=j}},[S,o]);async function I(){if(!(!p||!w||$||F||g.current)){g.current=!0,m("completing"),C(null);try{const x=await rn({name:i,identity:p.identity,signer:p.signer});X("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:x.status}),d.invalidateQueries({queryKey:["usd-balance"]}),d.invalidateQueries({queryKey:["my-assets"]}),m(x.status==="registered"?"success":"pending")}catch(x){X(ht(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(x),purchase_type:"name"}),C(x instanceof ue?n("names.errorRouteCost"):(x==null?void 0:x.message)||n("names.errorGeneric")),m("error")}finally{g.current=!1}}}const z=l!=="success"&&l!=="pending",R=lt(p==null?void 0:p.providerType);return e.jsx(gn,{onClick:S?void 0:o,role:"presentation",children:e.jsxs(yn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:x=>x.stopPropagation(),children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs(te,{children:[e.jsx(ne,{children:l==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(se,{onClick:o,disabled:S,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(ie,{children:[n("names.myCreditsBalance")," ",e.jsx(W,{})," ",ee(f,c)]}),e.jsx(oe,{})]}),(l==="confirm"||l==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ae,{children:[e.jsx(Te,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(le,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(W,{}),L]})]}),l==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(he,{children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(Le,{onClick:()=>m("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(jn,{children:[e.jsx($n,{children:n("names.confirmTitle")}),e.jsx(kn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Hn(i)}</b>`})}}),e.jsxs(Sn,{children:[e.jsx(En,{"aria-hidden":!0,children:"@"}),e.jsx(Tn,{value:y,onChange:x=>b(x.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(y.length,8)}ch`}}),e.jsx(Ln,{children:".dcl.eth"})]})]}),_?e.jsxs(he,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:_})]}):null,e.jsx(Le,{onClick:()=>void I(),disabled:!w||!p||$||F,children:n("names.buyCta")})]})]}),l==="completing"&&e.jsxs(Rn,{children:[e.jsx(Mn,{src:ct,alt:"",width:56,height:56}),e.jsx(_n,{children:R?n("names.confirming"):n("names.completing")}),e.jsxs(Fn,{children:[e.jsx(In,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(An,{children:"1/1"})]})]}),l==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(te,{children:[e.jsx(ne,{children:n("names.pendingHeaderTitle")}),e.jsx(se,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(ie,{children:[n("names.myCreditsBalance")," ",e.jsx(W,{})," ",ee(f,c)]}),e.jsx(oe,{}),e.jsxs(he,{"data-tone":"info",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(ae,{style:{marginTop:20},children:[e.jsx(Te,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(le,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(W,{}),L]})]}),e.jsx(Re,{children:e.jsx(Me,{onClick:()=>{o(),h("/my-items")},children:n("names.myItems")})})]}),l==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(te,{children:[e.jsx(ne,{children:n("names.successHeaderTitle")}),e.jsx(se,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(ie,{children:[n("names.myCreditsBalance")," ",e.jsx(W,{})," ",ee(f,c)]}),e.jsx(oe,{}),e.jsxs(zn,{children:[e.jsx(Nn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(Wn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ae,{style:{marginTop:20},children:[e.jsxs(bn,{"data-testid":"name-success-tile",children:[e.jsx(wn,{src:xn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Cn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(vn,{src:mn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(re,{children:[e.jsxs(le,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(W,{}),L]})]}),e.jsxs(Re,{children:[e.jsx(Me,{onClick:()=>{o(),h("/my-items")},children:n("names.myItems")}),e.jsx(Bn,{href:P.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Hn(i){return i.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[a])}const On="https://cdn.decentraland.org/@dcl/shop/1.0.2-31093320960.commit-a66fdac/_assets/identity-icon-C8yAW_Gq.svg",Un="https://cdn.decentraland.org/@dcl/shop/1.0.2-31093320960.commit-a66fdac/_assets/world-icon-6xQ-PmmW.svg",Gn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31093320960.commit-a66fdac/_assets/invite-icon-Bz6lCTuB.svg",Zn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",qn=s.div`
436
+ width: 100%;
437
+ min-width: 0;
438
+ `,Dn=s.nav`
439
+ display: flex;
440
+ align-items: center;
441
+ gap: 6px;
442
+ margin: 4px 0 16px;
443
+ font-family: ${t.font.sans};
444
+ font-size: 12px;
445
+ line-height: 1;
446
+ color: ${t.colors.gray4};
447
+ `,Vn=s.button`
448
+ border: 0;
449
+ background: none;
450
+ padding: 0;
451
+ cursor: pointer;
452
+ font: inherit;
453
+ color: ${t.colors.gray4};
454
+
455
+ &:hover {
456
+ color: ${t.colors.white};
457
+ text-decoration: underline;
458
+ }
459
+ &:focus-visible {
460
+ outline: 2px solid ${t.colors.white};
461
+ outline-offset: 2px;
462
+ }
463
+ `,Kn=s.span`
464
+ font-weight: 700;
465
+ color: ${t.colors.softWhite};
466
+ `,Qn=s.div`
467
+ display: flex;
468
+ flex-direction: column;
469
+ gap: 48px;
470
+ padding-bottom: 48px;
471
+
472
+ ${t.media.maxWidth("mobile")} {
473
+ gap: 32px;
474
+ padding-bottom: 32px;
475
+ }
476
+ `,Jn=s.div`
477
+ position: relative;
478
+ border: 1px solid ${t.colors.magenta};
479
+ border-radius: 24px;
480
+ overflow: hidden;
481
+ padding: 88px 48px;
482
+ display: flex;
483
+ flex-direction: column;
484
+ align-items: center;
485
+ gap: 48px;
486
+ text-align: center;
487
+ background: ${t.colors.overlay};
488
+
489
+ ${t.media.maxWidth("mobile")} {
490
+ padding: 40px 20px;
491
+ gap: 28px;
492
+ }
493
+ `,Xn=s.div`
494
+ display: flex;
495
+ flex-direction: column;
496
+ align-items: center;
497
+ gap: 12px;
498
+ `,Yn=s.h1`
499
+ margin: 0;
500
+ font-family: ${t.font.sans};
501
+ font-weight: 600;
502
+ font-size: 40px;
503
+ line-height: 1.167;
504
+ color: ${t.colors.white};
505
+
506
+ ${t.media.maxWidth("mobile")} {
507
+ font-size: 26px;
508
+ }
509
+ `,es=s.p`
510
+ margin: 0;
511
+ max-width: 760px;
512
+ font-family: ${t.font.sans};
513
+ font-weight: 500;
514
+ font-size: 24px;
515
+ line-height: 1.334;
516
+ color: #ecebed;
517
+
518
+ ${t.media.maxWidth("mobile")} {
519
+ font-size: 16px;
520
+ }
521
+ `,ts=s.div`
522
+ width: min(785px, 100%);
523
+ display: flex;
524
+ flex-direction: column;
525
+ gap: 12px;
526
+ `,ns=s.div`
527
+ position: relative;
528
+ `,ss=s("div",Vt("invalid"))`
529
+ display: flex;
530
+ align-items: center;
531
+ gap: 8px;
532
+ padding: 8px 8px 8px 16px;
533
+ background: ${t.colors.softWhite};
534
+ /* Figma 1368:349148 gives the field a 3px Orange edge — it is the page's one input, and the design
535
+ leans on that weight to carry it. Red only when what has been typed cannot be claimed. */
536
+ border: 3px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.orange};
537
+ border-radius: 20px;
538
+
539
+ &:focus-within {
540
+ border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
541
+ }
542
+
543
+ ${t.media.maxWidth("mobile")} {
544
+ border-radius: 16px;
545
+ }
546
+ `,is=s.span`
547
+ position: absolute;
548
+ left: -9999px;
549
+ top: 0;
550
+ visibility: hidden;
551
+ pointer-events: none;
552
+ white-space: pre;
553
+ font-family: ${t.font.sans};
554
+ font-size: 20px;
555
+ font-weight: 600;
556
+ line-height: 1.6;
557
+
558
+ /* An empty field paints the PLACEHOLDER, which is lighter than a typed value — so the mirror has to
559
+ be lighter too. Measuring the placeholder at the value's weight made the box a few pixels wider
560
+ than the text in it, and ".dcl.eth" sat that far off the end of the word. */
561
+ &[data-placeholder] {
562
+ font-weight: 400;
563
+ }
564
+
565
+ ${t.media.maxWidth("mobile")} {
566
+ font-size: 16px;
567
+ }
568
+ `,os=s.div`
569
+ position: absolute;
570
+ top: calc(100% + 8px);
571
+ left: 0;
572
+ right: 0;
573
+ z-index: 2;
574
+ display: flex;
575
+ align-items: center;
576
+ gap: 8px;
577
+ padding: 8px 12px;
578
+ border-radius: 8px;
579
+ background: #ffcdd4;
580
+ color: #ec303a;
581
+ font-family: ${t.font.sans};
582
+ font-size: 14px;
583
+ font-weight: 500;
584
+ line-height: 1.2;
585
+ text-align: left;
586
+
587
+ ${t.media.maxWidth("mobile")} {
588
+ position: static;
589
+ margin-top: 8px;
590
+ align-items: flex-start;
591
+ flex-wrap: wrap;
592
+ }
593
+ `,as=s.a`
594
+ display: inline-flex;
595
+ align-items: center;
596
+ gap: 2px;
597
+ margin-left: auto;
598
+ color: #ec303a;
599
+ font-weight: 600;
600
+ text-decoration: underline;
601
+ text-transform: uppercase;
602
+ white-space: nowrap;
603
+
604
+ ${t.media.maxWidth("mobile")} {
605
+ margin-left: 0;
606
+ }
607
+ `,rs=s.label`
608
+ flex: 1;
609
+ min-width: 0;
610
+ display: flex;
611
+ align-items: center;
612
+ gap: 0;
613
+ cursor: text;
614
+ overflow: hidden;
615
+ `,ls=s.span`
616
+ flex: none;
617
+ margin-right: 8px;
618
+ font-family: ${t.font.sans};
619
+ font-size: 26px;
620
+ font-weight: 500;
621
+ line-height: 1;
622
+ color: ${t.colors.muted2};
623
+
624
+ ${t.media.maxWidth("mobile")} {
625
+ font-size: 20px;
626
+ }
627
+ `,cs=s.input`
628
+ flex: 0 1 auto;
629
+ min-width: 0;
630
+ max-width: 100%;
631
+ border: 0;
632
+ outline: none;
633
+ background: transparent;
634
+ font-family: ${t.font.sans};
635
+ font-size: 20px;
636
+ font-weight: 600;
637
+ line-height: 1.6;
638
+ color: ${t.colors.text};
639
+ padding: 0;
640
+
641
+ &::placeholder {
642
+ color: ${t.colors.muted1};
643
+ font-weight: 400;
644
+ }
645
+
646
+ ${t.media.maxWidth("mobile")} {
647
+ font-size: 16px;
648
+ }
649
+ `,ds=s.span`
650
+ flex: none;
651
+ /* Flush against the name: "yourname.dcl.eth" has to read as one address, and at 20px even a couple of
652
+ pixels here look like a space someone typed by mistake. */
653
+ margin-left: 0;
654
+ /* Not selectable: it is the fixed part of the address, not something the reader typed. */
655
+ user-select: none;
656
+ -webkit-user-select: none;
657
+ font-family: ${t.font.sans};
658
+ font-size: 20px;
659
+ font-weight: 400;
660
+ line-height: 1.6;
661
+ color: ${t.colors.muted1};
662
+
663
+ ${t.media.maxWidth("mobile")} {
664
+ font-size: 16px;
665
+ }
666
+ `,hs=s.span`
667
+ flex: none;
668
+ font-family: ${t.font.sans};
669
+ font-size: 14px;
670
+ line-height: 1.43;
671
+ color: ${t.colors.muted2};
672
+ white-space: nowrap;
673
+ `,Be=s.button`
674
+ flex: none;
675
+ display: inline-flex;
676
+ align-items: center;
677
+ justify-content: center;
678
+ gap: 8px;
679
+ height: 52px;
680
+ padding: 0 24px;
681
+ border: 0;
682
+ border-radius: 12px;
683
+ cursor: pointer;
684
+ background: ${t.gradients.buyBtn};
685
+ color: ${t.colors.softWhite};
686
+ font-family: ${t.font.sans};
687
+ font-weight: 600;
688
+ font-size: 15px;
689
+ letter-spacing: 0.46px;
690
+ line-height: 24px;
691
+ text-transform: uppercase;
692
+ transition: background-image 0.15s ease;
693
+
694
+ /* Both ends stay on background-IMAGE: a gradient cannot interpolate to a plain colour, so swapping
695
+ the background shorthand instead blanks the button for the length of the transition. */
696
+ &:hover:not(:disabled),
697
+ &:active:not(:disabled) {
698
+ background-image: linear-gradient(${t.colors.dclRed}, ${t.colors.dclRed});
699
+ }
700
+ &:focus-visible {
701
+ outline: 2px solid ${t.colors.white};
702
+ outline-offset: 2px;
703
+ }
704
+ &:disabled {
705
+ cursor: not-allowed;
706
+ opacity: 0.5;
707
+ }
708
+
709
+ ${t.media.maxWidth("mobile")} {
710
+ display: none;
711
+ }
712
+ `,ps=s(Be)`
713
+ display: none;
714
+
715
+ ${t.media.maxWidth("mobile")} {
716
+ display: inline-flex;
717
+ width: 100%;
718
+ height: 48px;
719
+ border-radius: 12px;
720
+ }
721
+ `,fs=s.span`
722
+ display: inline-flex;
723
+ align-items: center;
724
+ gap: 4px;
725
+ font-size: 18px;
726
+ font-weight: 600;
727
+
728
+ .ico {
729
+ width: 13.26px;
730
+ height: 14px;
731
+ }
732
+ `,xs=s.div`
733
+ display: flex;
734
+ align-items: center;
735
+ gap: 8px;
736
+ padding: 8px 14px;
737
+ border-radius: 8px;
738
+ font-family: ${t.font.sans};
739
+ font-size: 13px;
740
+ font-weight: 500;
741
+ text-align: left;
742
+
743
+ 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)"};
744
+ color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
745
+
746
+ .ico {
747
+ width: 16px;
748
+ height: 16px;
749
+ flex: none;
750
+ }
751
+ `,pe=s(xs)`
752
+ position: absolute;
753
+ top: calc(100% + 8px);
754
+ left: 0;
755
+ right: 0;
756
+ z-index: 2;
757
+
758
+ /* Static on mobile, as TakenBanner is: the claim button sits below InputWrap there, so anything
759
+ floating out of the input lands on top of it. */
760
+ ${t.media.maxWidth("mobile")} {
761
+ position: static;
762
+ margin-top: 8px;
763
+ }
764
+ `,ms=s.section`
765
+ display: flex;
766
+ flex-direction: column;
767
+ gap: 48px;
768
+ padding: 0 48px;
769
+
770
+ ${t.media.maxWidth("mobile")} {
771
+ gap: 32px;
772
+ padding: 0 20px;
773
+ }
774
+ `,us=s.div`
775
+ display: flex;
776
+ flex-direction: column;
777
+ align-items: center;
778
+ gap: 24px;
779
+ `,gs=s.h2`
780
+ margin: 0;
781
+ text-align: center;
782
+ font-family: ${t.font.sans};
783
+ font-weight: 600;
784
+ font-size: 32px;
785
+ line-height: 1.167;
786
+ color: ${t.colors.white};
787
+
788
+ ${t.media.maxWidth("mobile")} {
789
+ font-size: 22px;
790
+ }
791
+ `,ys=s.p`
792
+ margin: 0;
793
+ max-width: 907px;
794
+ text-align: center;
795
+ font-family: ${t.font.sans};
796
+ font-weight: 400;
797
+ font-size: 20px;
798
+ line-height: 1.57;
799
+ color: ${t.colors.gray4};
800
+
801
+ ${t.media.maxWidth("mobile")} {
802
+ font-size: 16px;
803
+ }
804
+ `,bs=s.div`
805
+ display: grid;
806
+ grid-template-columns: repeat(4, 1fr);
807
+ gap: 24px;
808
+ align-items: stretch;
809
+
810
+ ${t.media.maxWidth("lg")} {
811
+ grid-template-columns: repeat(2, 1fr);
812
+ }
813
+ ${t.media.maxWidth("mobile")} {
814
+ grid-template-columns: 1fr;
815
+ }
816
+ `,D=s.article`
817
+ min-width: 0;
818
+ display: flex;
819
+ flex-direction: column;
820
+ gap: 32px;
821
+ padding: 24px;
822
+ background: ${t.colors.overlay};
823
+ border-radius: 24px;
824
+
825
+ @media (forced-colors: active) {
826
+ outline: 1px solid CanvasText;
827
+ }
828
+
829
+ ${t.media.maxWidth("mobile")} {
830
+ gap: 20px;
831
+ padding: 20px;
832
+ }
833
+ `,V=s.img`
834
+ display: block;
835
+ align-self: flex-start;
836
+ height: 55px;
837
+ width: auto;
838
+ `,K=s.div`
839
+ flex: 1;
840
+ display: flex;
841
+ flex-direction: column;
842
+ gap: 12px;
843
+ `,Q=s.h3`
844
+ margin: 0;
845
+ font-family: ${t.font.sans};
846
+ font-weight: 700;
847
+ font-size: 20px;
848
+ line-height: 1.57;
849
+ text-transform: uppercase;
850
+ color: ${t.colors.white};
851
+ `,J=s.p`
852
+ margin: 0;
853
+ font-family: ${t.font.sans};
854
+ font-weight: 400;
855
+ font-size: 14px;
856
+ line-height: 1.57;
857
+ color: ${t.colors.media};
858
+ `,ws=s.span`
859
+ font-weight: 700;
860
+ color: ${t.colors.white};
861
+ `,_e=s.a`
862
+ display: inline-flex;
863
+ align-items: center;
864
+ gap: 2px;
865
+ margin-top: auto;
866
+ font-family: ${t.font.sans};
867
+ font-weight: 500;
868
+ font-size: 14px;
869
+ line-height: 30px;
870
+ color: ${t.colors.softWhite};
871
+ text-decoration: underline;
872
+
873
+ &:focus-visible {
874
+ outline: 2px solid ${t.colors.softWhite};
875
+ outline-offset: 2px;
876
+ }
877
+
878
+ .ico {
879
+ width: 13px;
880
+ height: 13px;
881
+ }
882
+ `,Cs=s.span`
883
+ position: absolute;
884
+ width: 1px;
885
+ height: 1px;
886
+ padding: 0;
887
+ margin: -1px;
888
+ overflow: hidden;
889
+ clip: rect(0, 0, 0, 0);
890
+ white-space: nowrap;
891
+ border: 0;
892
+ `,vs="https://docs.decentraland.org/creator/worlds/about/",js="https://governance.decentraland.org";function $s(i){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ks({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Ie(),{data:p}=ze(),f=p?Ne(H,p):null,[c,d]=u.useState(""),[h,l]=u.useState("idle"),[m,y]=u.useState(!1),[b,v]=u.useState(!1),[C,g]=u.useState(()=>{var x;return typeof window<"u"&&!!((x=window.matchMedia)!=null&&x.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var k;const x=(k=window.matchMedia)==null?void 0:k.call(window,"(prefers-reduced-motion: reduce)");if(!x)return;const j=M=>g(M.matches);return x.addEventListener("change",j),()=>x.removeEventListener("change",j)},[]);const w=n("names.placeholderExamples"),S=u.useMemo(()=>w.split(",").map(x=>x.trim()).filter(Boolean),[w]),$=fn(S,!b&&!c&&!C)||n("names.inputPlaceholder"),E=u.useRef(null),[A,F]=u.useState(void 0);u.useLayoutEffect(()=>{E.current&&F(E.current.getBoundingClientRect().width)},[c,$]),u.useEffect(()=>{if(!Se(c).ok){l(c.length===0?"idle":"invalid");return}l("checking");const j=new AbortController,k=setTimeout(()=>{(async()=>{try{const M=await en(c,{signal:j.signal});l(M)}catch(M){if((M==null?void 0:M.name)==="AbortError")return;l("error")}})()},400);return()=>{clearTimeout(k),j.abort()}},[c]);const _=Se(c),I=_.ok&&(h==="available"||h==="error");function z(){if(I){if(!a){o();return}y(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),f!=null?e.jsxs(fs,{children:[e.jsx(W,{}),xe(f)]}):null]});return e.jsxs(qn,{"data-testid":"names-page",children:[e.jsxs(Dn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Vn,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Kn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Qn,{children:[e.jsxs(Jn,{children:[e.jsxs(Xn,{children:[e.jsx(Yn,{children:n("names.heroTitle")}),e.jsx(es,{children:n("names.heroSubtitle")})]}),e.jsxs(ts,{children:[e.jsxs(ns,{"data-testid":"names-input-wrap",children:[e.jsxs(ss,{invalid:h==="taken",children:[e.jsxs(rs,{children:[e.jsx(ls,{"aria-hidden":!0,children:"@"}),e.jsx(cs,{value:c,onChange:x=>d(Jt(x.target.value)),placeholder:$,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:Y,onFocus:()=>v(!0),style:{width:A!=null?`${A}px`:void 0}}),e.jsx(is,{ref:E,"aria-hidden":!0,"data-placeholder":!c||void 0,children:c||$}),e.jsx(ds,{children:n("names.suffix")})]}),c.length>0?e.jsxs(hs,{"aria-hidden":!0,children:[c.length,"/",Y]}):null,e.jsx(Be,{onClick:z,disabled:!I,"data-testid":"names-claim",children:R})]}),h==="taken"?e.jsxs(os,{role:"status","data-testid":"names-taken",children:[e.jsx(T,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(as,{href:$s(c),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,h==="checking"?e.jsx(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):h==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):h==="invalid"&&!_.ok&&_.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:We})}):null]}),e.jsx(ps,{onClick:z,disabled:!I,children:R}),e.jsx(Cs,{role:"status","aria-live":"polite",children:h==="available"?n("names.available",{name:c}):""})]})]}),e.jsxs(ms,{children:[e.jsxs(us,{children:[e.jsx(gs,{children:n("names.whyTitle")}),e.jsx(ys,{children:n("names.whyIntro")})]}),e.jsxs(bs,{children:[e.jsxs(D,{children:[e.jsx(V,{src:On,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(J,{children:n("names.why1")})]})]}),e.jsxs(D,{children:[e.jsx(V,{src:Un,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(J,{children:[n("names.why2")," ",e.jsx(ws,{children:n("names.why2Address")})]}),e.jsxs(_e,{href:vs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(D,{children:[e.jsx(V,{src:Gn,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(J,{children:n("names.why3")})]})]}),e.jsxs(D,{children:[e.jsx(V,{src:Zn,alt:""}),e.jsxs(K,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(_e,{href:js,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),m?e.jsx(Pn,{name:c,priceCredits:f,onClose:()=>y(!1)}):null]})}const Ss="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",fe=48,Es=["all","on_sale","not_for_sale"];function Vs(){const[i]=Ke(),a=Fe(),o=(i.get("q")??"").trim().toLowerCase(),p=(i.get("q")??"").trim();Ae({title:p?n("seo.collectibles.searchTitle",{query:p}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const f=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[c,d]=Qe(f),{subCategory:h,rarities:l,priceMin:m,priceMax:y,smart:b,sort:v}=c,C=c.category,g=Es.includes(c.status)?c.status:"on_sale";Je(`${C}:${h??""}`);const[w,S]=u.useState(!1);u.useEffect(()=>{if(!w)return;const r=G=>{G.key==="Escape"&&S(!1)};document.addEventListener("keydown",r);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=N}},[w]);const L=g==="on_sale",$=m&&!Number.isNaN(Number(m))?Number(m):void 0,E=y&&!Number.isNaN(Number(y))?Number(y):void 0,A=pt(),F=h?et[h]:void 0,_=($e.find(r=>r.key===v)??$e[0]).server,I={category:C,rarities:l.length?l:void 0,wearableCategories:F,minPriceCredits:$,maxPriceCredits:E,search:o||void 0,sortBy:_,isSmart:b||void 0,onSale:!0,listingType:A?void 0:"primary"},z={category:C,rarities:l.length?l:void 0,wearableCategories:F,search:o||void 0,sortBy:_,isWearableSmart:b||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:R,total:x,isLoading:j,isPlaceholderData:k,error:M,hasNextPage:Pe,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Oe}=zt(L?["shop-items",I]:["catalog-items",z],r=>L?xt({...I,first:fe,skip:r}):mt({...z,first:fe,skip:r}),{enabled:C!=="names"}),O=x,{data:ye,isError:Ue,isPending:Ge}=ze(),Ze=r=>ye&&r.manaWei?Ne(r.manaWei,ye):null,qe=L&&Ge&&R.some(r=>r.source==="legacy"),be=j||k||qe,De=j?15:Math.min(Math.max(R.length,1),fe),we=u.useRef(null);u.useEffect(()=>{j||k||!o||we.current===o||(we.current=o,X("Shop Searched",{query:o,result_count:O}))},[o,j,k,O]);const U=u.useRef("__init__");u.useEffect(()=>{if(j||k)return;const r=JSON.stringify({category:C,subCategory:h,rarities:l,min:$,max:E,sort:v,status:g,smart:b});if(U.current==="__init__"||U.current===r){U.current=r;return}U.current=r,X("Shop Applied Filter",{filters:{category:C,sub_category:h,rarities:l,min_price_credits:$??null,max_price_credits:E??null,status:g,smart:b,sort:v},result_count:O})},[C,h,l,$,E,v,g,b,j,k,O]);function Ce(r){d({category:r,subCategory:null})}function ve(r){d({status:r})}function je(r){d({rarities:l.includes(r)?l.filter(N=>N!==r):[...l,r]})}function Ve(){d(f)}const B=[];($!=null||E!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{d({priceMin:"",priceMax:""})}});for(const r of Xe)l.includes(r)&&B.push({key:`rarity-${r}`,label:ft(r),onRemove:()=>je(r)});return b&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>d({smart:!1})}),g!=="on_sale"&&B.push({key:"status",label:g==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[C!=="names"&&e.jsxs(e.Fragment,{children:[w?e.jsx(gt,{onClick:()=>S(!1),"aria-hidden":!0}):null,e.jsxs(yt,{"data-open":w||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(bt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(Ct,{onClick:()=>S(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(jt,{category:C,subCategory:h,onCategory:Ce,onSub:r=>d({subCategory:r}),priceMin:m,priceMax:y,onPriceMin:r=>d({priceMin:r}),onPriceMax:r=>d({priceMax:r}),rarities:l,onToggleRarity:je,status:g,onStatus:ve,smart:b,onSmart:r=>d({smart:r})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>S(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:C==="names"?e.jsx(ks,{onBack:()=>Ce("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:r=>d({sort:r}),total:x,loading:j||k,query:o,onOpenFilters:()=>S(!0),chips:B,onClearChips:Ve}),Ue&&L&&R.some(r=>r.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,M?e.jsx(Nt,{message:n("assets.loadError"),testId:"browse-error"}):null,!be&&R.length===0&&!M?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(Lt,{src:Ss,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(_t,{children:p?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:p}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ft,{children:e.jsx(It,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:be?e.jsx(ke,{count:De}):e.jsxs(e.Fragment,{children:[R.map(r=>{if(!L)return e.jsx(Z,{item:r,mode:"view"},q(r));const N=r;if(N.source!=="legacy")return e.jsx(Z,{item:r},q(r));const G=Ze(N);return G==null?e.jsx(Z,{item:r,mode:"view"},q(r)):e.jsx(Z,{item:{...N,priceCredits:G}},q(r))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Pe,isFetching:ge,isError:He,onLoadMore:()=>void Oe()})]})]})})]})}export{Vs as Assets};