@dcl/shop 1.0.2-31052895262.commit-852a48e → 1.0.2-31055297774.commit-b808071

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 (177) hide show
  1. package/_assets/{Activity-DGZ-mXms.js → Activity-BGVAnqbp.js} +3 -3
  2. package/_assets/{AnimatedBackground-C3jcFwq0.js → AnimatedBackground-BacIzfr9.js} +1 -1
  3. package/_assets/Assets-Bs3sIn09.js +865 -0
  4. package/_assets/{Assets.styles-CvPqLOcq.js → Assets.styles-CkO8eYMZ.js} +1 -1
  5. package/_assets/{Authorizations-jzbbaUAD.js → Authorizations-CLC0gP2S.js} +1 -1
  6. package/_assets/Cart-CfbLgf8G.js +706 -0
  7. package/_assets/{CircularProgress-cuHxf0ip.js → CircularProgress-1YXgiQtT.js} +1 -1
  8. package/_assets/{Collection-Md8enBni.js → Collection-DKA_h7HO.js} +1 -1
  9. package/_assets/{CollectionCarousel-BZ9VGSqk.js → CollectionCarousel-COMBJtj4.js} +2 -2
  10. package/_assets/{Confetti-DuVf36TU.js → Confetti-BSUE6v15.js} +1 -1
  11. package/_assets/{Creator-hDyAahaP.js → Creator-Chfg4XCW.js} +1 -1
  12. package/_assets/{ErrorNotice-CpzaINDp.js → ErrorNotice-aOead5te.js} +1 -1
  13. package/_assets/{ExchangeController-DpbPjUjy.js → ExchangeController-D9wO5y3j.js} +1 -1
  14. package/_assets/{Faq-BUYQS5Yg.js → Faq-BUcIgNDP.js} +1 -1
  15. package/_assets/{GetCredits-Dsek3JiE.js → GetCredits-BLECOB-N.js} +1 -1
  16. package/_assets/{Grow-X0Ne1pBn.js → Grow-zqUJtnL7.js} +1 -1
  17. package/_assets/{HelpersUtil-Bi86GTpA.js → HelpersUtil-BrmwLkkp.js} +1 -1
  18. package/_assets/{ItemDetail-BF3emobd.js → ItemDetail-B2vKg-9Z.js} +1 -1
  19. package/_assets/LazyEmoteControls-DnvyzyyY.js +2 -0
  20. package/_assets/{LoadMore-CDj7T1ob.js → LoadMore-Cy9OoEJz.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-2-TKgLU_.js → ManaPricingBanner.styles-B9-hTa3D.js} +1 -1
  22. package/_assets/{MyAssets-QnA4lEJ8.js → MyAssets-CHgc1ZcI.js} +1 -1
  23. package/_assets/{MyFavorites-Ce_DJD6L.js → MyFavorites-DWo1mliw.js} +1 -1
  24. package/_assets/{NotFound-DNIHZmyf.js → NotFound-CIGIbTGI.js} +1 -1
  25. package/_assets/{NotificationsBell-Nn-SXPLK.js → NotificationsBell-Cg5PqU4H.js} +1 -1
  26. package/_assets/{OutfitDetail-DCHy98Hi.js → OutfitDetail-DF87HN6H.js} +1 -1
  27. package/_assets/{OutfitPreview-CUS95D_x.js → OutfitPreview-IPt5zFQ2.js} +1 -1
  28. package/_assets/{OutfitStudio-aSAoR4HA.js → OutfitStudio-DHyzlXbm.js} +1 -1
  29. package/_assets/{StoreSettings-DiMVFZgZ.js → StoreSettings-SFcLGWm7.js} +1 -1
  30. package/_assets/{Success-jfWiSdEu.js → Success-B_ZedKxN.js} +1 -1
  31. package/_assets/{SwapController-DoFSEHsa.js → SwapController-DEl6q4-5.js} +1 -1
  32. package/_assets/{Tooltip-BHnzTazD.js → Tooltip-CfAbMWhJ.js} +1 -1
  33. package/_assets/{TradeService-C0NipIZn.js → TradeService-DCGCUpYo.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-CwpXOgIQ.js → W3MFrameProviderSingleton-BEUP6hLZ.js} +3 -3
  35. package/_assets/{WebCryptoP256-BnKXMflq.js → WebCryptoP256-2ShtCeVF.js} +1 -1
  36. package/_assets/{authorizations-DEcupBPo.js → authorizations-B17B7Njo.js} +1 -1
  37. package/_assets/{basic-lP3AB9Ds.js → basic-Dr3bEQfu.js} +1 -1
  38. package/_assets/{biconomy-C-ct_5zO.js → biconomy-3Y8X7VlC.js} +1 -1
  39. package/_assets/{builder-B14LBhrP.js → builder-jjuFCu3k.js} +1 -1
  40. package/_assets/{buy-gasless-BvfggP8z.js → buy-gasless-DoSh-tFa.js} +1 -1
  41. package/_assets/{buy-trAUveHY.js → buy-wdud8pnf.js} +1 -1
  42. package/_assets/{categories-B-4mQuOo.js → categories-DGIg36Oc.js} +42 -33
  43. package/_assets/{ccip-DFol-Mw_.js → ccip-BKrghWQj.js} +1 -1
  44. package/_assets/{ccip-BtdEeII5.js → ccip-CXCfMVYe.js} +1 -1
  45. package/_assets/{collectionPage.styles-BoNhm0q9.js → collectionPage.styles-DwFPJPce.js} +1 -1
  46. package/_assets/{controller-Cvmnd9FR.js → controller-DdgkWKgL.js} +2 -2
  47. package/_assets/{core-BGOS8Vkj.js → core-C8S2mN1s.js} +4 -4
  48. package/_assets/{createSvgIcon-DlmZAkTf.js → createSvgIcon-Cg8ZliIm.js} +1 -1
  49. package/_assets/{custom-1f9Saf9C.js → custom-X9wHG9wg.js} +1 -1
  50. package/_assets/{data-capture-pwU-d8Zc.js → data-capture-BgPNXS18.js} +1 -1
  51. package/_assets/{email-CyzuVFS-.js → email-BGdZRw8p.js} +1 -1
  52. package/_assets/{embedded-wallet-BMpXZKet.js → embedded-wallet-CqIU9APg.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-NGeP76Jh.js → emotion-styled.browser.esm-DZbIWeAZ.js} +1 -1
  54. package/_assets/{engine-D92AnA2I.js → engine-CBG8_pF-.js} +1 -1
  55. package/_assets/{errors-P4q2uMTj.js → errors-BruxKfZB.js} +1 -1
  56. package/_assets/{estimate-l1-fee-AZJE4IJx.js → estimate-l1-fee-k3exg7PR.js} +1 -1
  57. package/_assets/{execute-A1s_AfoI.js → execute-RjH3kC63.js} +2 -2
  58. package/_assets/{features-yFMw2C_b.js → features-BnDZm8if.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-BNCr3nIU.js → fetchTokenMetadata-CdUuHqIj.js} +2 -2
  60. package/_assets/{field.styles-DdzMTl2U.js → field.styles-l0zobCFG.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-Cuapnn6w.js → get-ecosystem-wallet-info-DALoL3Hc.js} +1 -1
  62. package/_assets/{getBalance-33JjRdT-.js → getBalance-CefhuKko.js} +1 -1
  63. package/_assets/{getNFT-CeIGNk1t.js → getNFT-D-L5zgdP.js} +1 -1
  64. package/_assets/{getNFT-Dc8Zoktc.js → getNFT-nev9rcin.js} +1 -1
  65. package/_assets/{grid.styles-BVAfZH9d.js → grid.styles-DhFwhKRo.js} +1 -1
  66. package/_assets/{hashTypedData-ClF550ii.js → hashTypedData-BEKwcmlS.js} +1 -1
  67. package/_assets/{hashTypedData-BI_qLgpk.js → hashTypedData-li6aoa3o.js} +1 -1
  68. package/_assets/{in-app-IMqWX5w3.js → in-app-DUJu2O6v.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-D28OgJBV.js → in-app-wallet-calls-C9Jxi05O.js} +1 -1
  70. package/_assets/{index-HO7zaJr3.js → index-1--tLqz8.js} +1 -1
  71. package/_assets/{index-DmwGYyA6.js → index-1nKs4-Ix.js} +1 -1
  72. package/_assets/{index-DvtzpEWf.js → index-1wf8L6YU.js} +1 -1
  73. package/_assets/{index-DCpnuNiH.js → index-3PUZ8U0R.js} +3 -3
  74. package/_assets/{index-CWsynp2S.js → index-3_UdO-zA.js} +1 -1
  75. package/_assets/{index-MeK6oqsY.js → index-5uftLGuI.js} +3 -3
  76. package/_assets/{index-Ca6LO_0E.js → index-AKUvJK7K.js} +1 -1
  77. package/_assets/{index-DaMeAJwI.js → index-B2O7gZoQ.js} +1 -1
  78. package/_assets/{index-DzY7gWbC.js → index-BAyG95nG.js} +1 -1
  79. package/_assets/{index-DzcwPF0k.js → index-BBNLswz5.js} +1 -1
  80. package/_assets/{index-CjVlg_ij.js → index-BOgrc04A.js} +1 -1
  81. package/_assets/{index-Gs4d2-qN.js → index-BXykQ7Kr.js} +1 -1
  82. package/_assets/{index-CVUCfXzO.js → index-BfqVu35d.js} +1 -1
  83. package/_assets/{index-Dk20w-uy.js → index-Bl-qZqD6.js} +1 -1
  84. package/_assets/{index-BqZqaY5z.js → index-BlmfBcG1.js} +1 -1
  85. package/_assets/{index-Kns0OFjG.js → index-BwjISY1Q.js} +1 -1
  86. package/_assets/{index-D7YnCl7k.js → index-C2_mL_dX.js} +1 -1
  87. package/_assets/{index-BTZO350o.js → index-C7AFAxAx.js} +1 -1
  88. package/_assets/{index-xqoVGYPN.js → index-CE124P9G.js} +1 -1
  89. package/_assets/{index-Wsttg38W.js → index-CFEHIoaL.js} +1 -1
  90. package/_assets/{index-DQviSCTm.js → index-CTfBCyyR.js} +307 -307
  91. package/_assets/{index-BLFF0NHi.js → index-CV1_E3wb.js} +1 -1
  92. package/_assets/{index-EiBC_pER.js → index-CVqec2h5.js} +1 -1
  93. package/_assets/{index-0LerOTOY.js → index-ChBwA1h2.js} +1 -1
  94. package/_assets/{index-ldtPIzgS.js → index-CkF3QZy9.js} +1 -1
  95. package/_assets/{index-Cf2xeiyh.js → index-CpjzOH1b.js} +1 -1
  96. package/_assets/{index-BEPtt75d.js → index-Ctoo8CLR.js} +1 -1
  97. package/_assets/{index-Jd5wS2_W.js → index-CvPkDtGf.js} +3 -3
  98. package/_assets/{index-DZ7BtjyQ.js → index-D-wVNkf3.js} +2 -2
  99. package/_assets/{index-DwOkMBNF.js → index-DAnXL5-b.js} +1 -1
  100. package/_assets/{index-DOaCKKeZ.js → index-DDLK5XSq.js} +1 -1
  101. package/_assets/{index-DLRZpMeB.js → index-DU9MjygG.js} +1 -1
  102. package/_assets/{index-C8Zpmnsc.js → index-DWiRe-sp.js} +1 -1
  103. package/_assets/{index-DRvbYyi1.js → index-DXWzE47h.js} +1 -1
  104. package/_assets/{index-BwR7pNQI.js → index-Dar3bPlr.js} +2 -2
  105. package/_assets/{index-B8_b5nI1.js → index-DbrCcWJ3.js} +1 -1
  106. package/_assets/{index-CVRDdT6f.js → index-Dd4KtrAw.js} +1 -1
  107. package/_assets/{index-B_N4LlXM.js → index-DecRfVMx.js} +1 -1
  108. package/_assets/{index-PHuDthQo.js → index-DjqUHVKK.js} +1 -1
  109. package/_assets/{index-CLpXjPIc.js → index-DoVK9CTx.js} +1 -1
  110. package/_assets/{index-Jgi3Xb2T.js → index-DrWim4p_.js} +1 -1
  111. package/_assets/{index-q_qBhVFS.js → index-HaAGk4bQ.js} +1 -1
  112. package/_assets/{index-ByveYL58.js → index-JG0FDNiP.js} +1 -1
  113. package/_assets/{index-C5QPiEmS.js → index-WSwhnTRZ.js} +1 -1
  114. package/_assets/{index-DflzaABE.js → index-Xuxrb8Q0.js} +1 -1
  115. package/_assets/{index--vv-nHpu.js → index-d570G5B7.js} +1 -1
  116. package/_assets/{index-DA7H3bS8.js → index-dr6fXYBx.js} +1 -1
  117. package/_assets/{index-DxZOV_4P.js → index-n49vue3k.js} +1 -1
  118. package/_assets/{index-D-Ocn1C7.js → index-syneNMGM.js} +1 -1
  119. package/_assets/{index-Cf69P7ib.js → index-vQ65olfe.js} +1 -1
  120. package/_assets/{index-Bf5mTow0.js → index-z7leYudl.js} +2 -2
  121. package/_assets/{index-0R9ie-VV.js → index-zDqeLkyG.js} +1 -1
  122. package/_assets/{index.es-C7UUY2el.js → index.es-CE2sG7i4.js} +1 -1
  123. package/_assets/{index.es-LJpoxZ4b.js → index.es-DbgkC7jp.js} +1 -1
  124. package/_assets/{index.es-0kgBeR5R.js → index.es-yWYRmppU.js} +4 -4
  125. package/_assets/{localBatchGatewayRequest-UBHbrA8u.js → localBatchGatewayRequest-VK-lqBeb.js} +1 -1
  126. package/_assets/name-verified-oGwQ3ntb.svg +25 -0
  127. package/_assets/{networks-D6-schbP.js → networks-DlOv_Jl5.js} +1 -1
  128. package/_assets/{onramp-CgtK4a61.js → onramp-15oxC79b.js} +1 -1
  129. package/_assets/{openzeppelin-D_OvD756.js → openzeppelin-BpuVaBDh.js} +1 -1
  130. package/_assets/{parseNft-BZXH5NiZ.js → parseNft-D06uX5gG.js} +2 -2
  131. package/_assets/{parseSignature-CTnPq_Ek.js → parseSignature-CnSs3XPr.js} +3 -3
  132. package/_assets/{parseSignature-DKT-EGts.js → parseSignature-DGgCDYUH.js} +1 -1
  133. package/_assets/{passkeys-CyzO8nju.js → passkeys-B8jZMST_.js} +1 -1
  134. package/_assets/{pay-with-exchange-lZpNuH7u.js → pay-with-exchange-DzV0qz9m.js} +1 -1
  135. package/_assets/{qr-overlay-B9KzNXTQ.js → qr-overlay-FhG6DCeK.js} +1 -1
  136. package/_assets/{receive-BLccmIhG.js → receive-Bf8iJtVw.js} +1 -1
  137. package/_assets/{resolveImplementation-BiDrULOr.js → resolveImplementation-DdV3P3Xk.js} +1 -1
  138. package/_assets/{rpc-CoUubnQM.js → rpc-BZX60R_2.js} +1 -1
  139. package/_assets/{secp256k1-CwUppbFV.js → secp256k1-BLNizqyz.js} +1 -1
  140. package/_assets/{secp256k1-DxIHwh9a.js → secp256k1-BpFoXgJs.js} +1 -1
  141. package/_assets/{secp256k1-DdopplT1.js → secp256k1-ChfCRMNj.js} +1 -1
  142. package/_assets/{send-AdMt9Zwt.js → send-CE26RsoC.js} +1 -1
  143. package/_assets/{send-batch-transaction-D2RzhWYr.js → send-batch-transaction-CdcLTVn2.js} +1 -1
  144. package/_assets/{send-eip712-transaction-BCAUvz1G.js → send-eip712-transaction-DFbUyBnM.js} +2 -2
  145. package/_assets/{send-gasless-transaction-BelZrSQz.js → send-gasless-transaction-IULoS1Vn.js} +2 -2
  146. package/_assets/{send-transaction-DZg1PUVN.js → send-transaction-vCrIjEYg.js} +2 -2
  147. package/_assets/{sendMetaTransaction-DxU-UCCS.js → sendMetaTransaction-C5CWJOs0.js} +1 -1
  148. package/_assets/{sendRawTransaction-BRLVrUYL.js → sendRawTransaction-BnXA-t5g.js} +3 -3
  149. package/_assets/{serializeTransaction-69WfIaDI.js → serializeTransaction-BuP136Wz.js} +1 -1
  150. package/_assets/{session-proposal-DkIhLDdd.js → session-proposal-CnATfxsE.js} +1 -1
  151. package/_assets/{session-request-D8zU4aGN.js → session-request-PJjSNFhP.js} +2 -2
  152. package/_assets/{signing-OFfK1_ok.js → signing-DVSxcG9z.js} +3 -3
  153. package/_assets/{skeleton.styles-DmMFOsLY.js → skeleton.styles-CLtTv572.js} +1 -1
  154. package/_assets/{socials-BmRfwnA7.js → socials-Bf2bVkOp.js} +1 -1
  155. package/_assets/{styled-BV7LpRqS.js → styled-DUDTxrNz.js} +1 -1
  156. package/_assets/{swaps-Bu1wVKR5.js → swaps-CfzGwDGN.js} +1 -1
  157. package/_assets/{thirdweb-CIR-AUwR.js → thirdweb-fPfEaf4k.js} +3 -3
  158. package/_assets/{to-serializable-transaction-C1gKyX4i.js → to-serializable-transaction-DXr6jbkS.js} +2 -2
  159. package/_assets/{transactionReceipt-DNgbt99R.js → transactionReceipt-eQP54mTE.js} +1 -1
  160. package/_assets/{transactions-LaMRjybO.js → transactions-CGh5C6RL.js} +1 -1
  161. package/_assets/{useCreditPacks-DLZNSnNT.js → useCreditPacks-CasKnCD5.js} +1 -1
  162. package/_assets/{useImportable-uKG9iVze.js → useImportable-SR1m5Hwh.js} +1 -1
  163. package/_assets/{useInfiniteGrid-huqFOyLP.js → useInfiniteGrid-Cy1tipbK.js} +1 -1
  164. package/_assets/{useTheme-C-SsvzzD.js → useTheme-BvkrK9YA.js} +1 -1
  165. package/_assets/{verifyHash--r2a-NGL.js → verifyHash-Bi_3pzoI.js} +1 -1
  166. package/_assets/{w3m-modal-COsXM4V6.js → w3m-modal-D57uPD-0.js} +1 -1
  167. package/_assets/{w3m-modal-D8HxwWON.js → w3m-modal-DAkUUjAI.js} +1 -1
  168. package/_assets/{wait-for-tx-receipt-BEqL9vD6.js → wait-for-tx-receipt-ByVNtVUa.js} +1 -1
  169. package/_assets/{wallets-CvuFBu-W.js → wallets-DHJBT8N-.js} +5 -5
  170. package/_assets/{web-connector-dATS4bZ0.js → web-connector-zzH3rfgh.js} +3 -3
  171. package/_assets/{writeContract-D4GxpWDJ.js → writeContract-BeuidFa5.js} +1 -1
  172. package/_assets/{zoraTestnet-CiZKAyit.js → zoraTestnet-D4oN56a_.js} +1 -1
  173. package/index.html +11 -11
  174. package/package.json +2 -2
  175. package/_assets/Assets-CE2lpr6t.js +0 -801
  176. package/_assets/Cart-DTACE-Xl.js +0 -707
  177. package/_assets/LazyEmoteControls-B-dLGOoH.js +0 -2
@@ -0,0 +1,865 @@
1
+ import{b as Fe,r as w,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-DGIg36Oc.js";import{c as L,r as tt,bo as nt,bp as st,aC as it,a as ot,s,t,o as Ie,be as rt,A as at,L as xe,b as n,y as lt,I as E,z as F,b$ as Y,bd as ct,$ as J,bt as dt,bs as pt,x as Ae,ap as Ne,n as Le,q as ht,an as xt,ar as ke,as as G,aI as ft,bM as mt}from"./index-CTfBCyyR.js";import{g as ut,h as gt,i as bt,j as yt,k as wt,C as jt,l as vt,o as Ct,m as $t,n as kt,M as St,u as Tt,E as Et,v as _t,p as Rt,q as Mt,r as zt,s as Ft,t as It}from"./Assets.styles-CkO8eYMZ.js";import{L as At}from"./LoadMore-Cy9OoEJz.js";import{u as Nt}from"./useInfiniteGrid-Cy1tipbK.js";import{E as Lt}from"./ErrorNotice-aOead5te.js";import{d as Pt}from"./dcl-schemas-CmtP3U6y.js";import{s as Wt,G as Bt,w as Ht,S as Ut}from"./buy-gasless-DoSh-tFa.js";import{s as Ot,k as Gt}from"./buy-wdud8pnf.js";import{f as Dt}from"./errors-BruxKfZB.js";import{J as qt,C as Zt,B as fe}from"./ethers-BDpbhgX6.js";import{n as Vt}from"./Tooltip-CfAbMWhJ.js";import{G as Kt}from"./grid.styles-DhFwhKRo.js";import"./skeleton.styles-CLtTv572.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-B17B7Njo.js";import"./sendMetaTransaction-C5CWJOs0.js";function D(i){const r=i.source??"item",l=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${r}:${l}`}const P="100000000000000000000",Pe=2,X=15,Qt=/^[a-zA-Z0-9]+$/;function Se(i){const r=i.trim();return r.length===0?{ok:!1,reason:"empty"}:Qt.test(r)?r.length<Pe?{ok:!1,reason:"too-short"}:r.length>X?{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,X)}const Xt=["function available(string _subdomain) view returns (bool)"],Te={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return L.chainId===Number(Pt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(i,r={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Zt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${i}") on ${l}`);const p=await d.available(i);if((c=r.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${p}`),p?"available":"taken"}const tn="https://app.across.to/api";class me extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return it(P,i)}async function sn(i,r,l={}){var c;const x=l.chainId??L.chainId,h=l.provider??"across",d=`${L.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(r)}&chainId=${x}&provider=${h}`,p=await ot(d,{method:"GET",identity:i,metadata:{}});if(!p.ok){let a;try{a=(c=await p.json())==null?void 0:c.code}catch{}throw a==="ROUTE_COST_TOO_HIGH"?new me:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function on(i,r){const l=fe.from(i.availableAmount),h=fe.from(P).sub(l);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:r.externalCall.target,selector:r.externalCall.selector,data:r.externalCall.data,expiresAt:r.externalCall.expiresAt,salt:r.externalCall.salt},customExternalCallSignature:r.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:P}}async function rn(i,r={}){const l=tn,x=r.intervalMs??1e4,h=r.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let p=0;p<h;p++){try{const c=await fetch(`${l}/deposit/status?originChainId=137&depositTxHash=${i}`);if(c.ok){const a=await c.json(),f=(a.status??"pending").toLowerCase(),g=a.fillTx??a.fillTxnRef??null,u=a.actionsSucceeded!==!1;if(f==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:u};if(f==="refunded"||f==="expired")return{status:f,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:u}}}catch{}p<h-1&&await new Promise(c=>setTimeout(c,x))}return d}async function an(i){const{name:r,identity:l,signer:x}=i,h=i.chainId??L.chainId,d=i.provider??"across",p=(i.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:r,buyer:p,chainId:h,provider:d});try{const f=await tt(h),g=nn(f);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:f});const u=await sn(l,r,{chainId:h,provider:d});console.info("[names] step 2/6 route fetched",{target:u.externalCall.target,selector:u.externalCall.selector,provider:u.provider,quoteId:u.quoteId});const v=await nt(l,g);if(c=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),fe.from(v.maxCreditedValue).lt(P))throw new Error("Credit under-sized for the name price");const j=on(v.credit,u);let m;try{m=await Wt({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Bt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ht(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await rn(m,i.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(f){if(console.error("[names] register failed — raw error:",f,{name:r,buyer:p,originConfirmed:a}),f instanceof Ut)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof me)throw f;const g=new Error(Dt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln="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",cn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31055297774.commit-b808071/_assets/name-verified-oGwQ3ntb.svg",dn="#34fee6",pn=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
+ `,hn=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
+ `,ee=s.div`
24
+ display: flex;
25
+ align-items: flex-start;
26
+ justify-content: space-between;
27
+ gap: 12px;
28
+ `,te=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
+ `,ne=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
+ `,se=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
+ `,ie=s.hr`
73
+ border: 0;
74
+ border-top: 1px solid ${t.colors.line};
75
+ margin: 16px 0;
76
+ `,oe=s.div`
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 16px;
80
+ `,xn=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
+ `,fn=s.img`
94
+ display: block;
95
+ width: 47px;
96
+ height: 47px;
97
+ `,mn=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: ${dn};
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
+ `,un=s.img`
119
+ flex: none;
120
+ display: block;
121
+ width: 14px;
122
+ height: 14px;
123
+ `,Ee=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
+ `,ae=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
+ `,le=s.div`
155
+ font-family: ${t.font.sans};
156
+ font-size: 14px;
157
+ color: ${t.colors.muted2};
158
+ `,ce=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
+ `,gn=s.div`
174
+ margin-top: 16px;
175
+ padding: 16px;
176
+ border-radius: 12px;
177
+ background: #f2e7fc;
178
+ `,bn=s.div`
179
+ font-family: ${t.font.sans};
180
+ font-weight: 700;
181
+ font-size: 16px;
182
+ color: ${t.colors.text};
183
+ `,yn=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
+ b {
191
+ font-weight: 700;
192
+ color: ${t.colors.brandViolet};
193
+ }
194
+ `,wn=s.label`
195
+ display: flex;
196
+ align-items: center;
197
+ gap: 8px;
198
+ padding: 12px 14px;
199
+ background: ${t.colors.white};
200
+ border: 1px solid ${t.colors.text};
201
+ border-radius: 10px;
202
+ cursor: text;
203
+
204
+ &:focus-within {
205
+ border-color: ${t.colors.magenta};
206
+ }
207
+ `,jn=s.span`
208
+ flex: none;
209
+ font-family: ${t.font.sans};
210
+ font-size: 18px;
211
+ color: ${t.colors.muted2};
212
+ `,vn=s.input`
213
+ flex: 0 1 auto;
214
+ min-width: 0;
215
+ border: 0;
216
+ outline: none;
217
+ background: transparent;
218
+ font-family: ${t.font.sans};
219
+ font-size: 16px;
220
+ font-weight: 600;
221
+ color: ${t.colors.text};
222
+
223
+ &::placeholder {
224
+ color: ${t.colors.muted2};
225
+ font-weight: 400;
226
+ }
227
+ `,Cn=s.span`
228
+ flex: none;
229
+ font-family: ${t.font.sans};
230
+ font-size: 16px;
231
+ color: ${t.colors.muted2};
232
+ `,_e=s.button`
233
+ margin-top: 16px;
234
+ width: 100%;
235
+ height: 52px;
236
+ border: 0;
237
+ border-radius: 12px;
238
+ cursor: pointer;
239
+ background: ${t.gradients.amethyst};
240
+ color: ${t.colors.softWhite};
241
+ font-family: ${t.font.sans};
242
+ font-weight: 600;
243
+ font-size: 15px;
244
+ letter-spacing: 0.46px;
245
+ text-transform: uppercase;
246
+
247
+ &:hover:not(:disabled) {
248
+ filter: brightness(1.06);
249
+ }
250
+ &:focus-visible {
251
+ outline: 2px solid ${t.colors.accent};
252
+ outline-offset: 2px;
253
+ }
254
+ &:disabled {
255
+ cursor: not-allowed;
256
+ background: #ddc7ec;
257
+ color: #f4ecfa;
258
+ }
259
+ `,$n=s.div`
260
+ display: flex;
261
+ flex-direction: column;
262
+ align-items: flex-start;
263
+ gap: 20px;
264
+ padding: 32px 0 8px;
265
+ `,kn=s.img`
266
+ align-self: center;
267
+ width: 56px;
268
+ height: 56px;
269
+ `,Sn=s.div`
270
+ font-family: ${t.font.sans};
271
+ font-weight: 700;
272
+ font-size: 18px;
273
+ color: ${t.colors.text};
274
+ `,Tn=s.div`
275
+ display: flex;
276
+ align-items: center;
277
+ gap: 12px;
278
+ width: 100%;
279
+ `,En=s.div`
280
+ flex: 1;
281
+ height: 8px;
282
+ border-radius: 999px;
283
+ background: ${t.colors.chip};
284
+ overflow: hidden;
285
+
286
+ span {
287
+ display: block;
288
+ height: 100%;
289
+ width: 40%;
290
+ border-radius: 999px;
291
+ background: ${t.gradients.amethyst};
292
+ animation: nameProgress 1.1s ease-in-out infinite;
293
+ }
294
+
295
+ @keyframes nameProgress {
296
+ 0% {
297
+ transform: translateX(-100%);
298
+ }
299
+ 100% {
300
+ transform: translateX(320%);
301
+ }
302
+ }
303
+ `,_n=s.span`
304
+ flex: none;
305
+ font-family: ${t.font.sans};
306
+ font-size: 14px;
307
+ color: ${t.colors.muted};
308
+ `,Rn=s.div`
309
+ display: flex;
310
+ flex-direction: column;
311
+ align-items: center;
312
+ gap: 16px;
313
+ padding: 24px;
314
+ border-radius: 12px;
315
+ background: #e2f5ea;
316
+ text-align: center;
317
+ `,Mn=s.div`
318
+ display: grid;
319
+ place-items: center;
320
+ width: 56px;
321
+ height: 56px;
322
+ border-radius: 50%;
323
+ background: ${t.colors.ok};
324
+ color: ${t.colors.white};
325
+
326
+ .ico {
327
+ width: 30px;
328
+ height: 30px;
329
+ }
330
+ `,zn=s.p`
331
+ margin: 0;
332
+ font-family: ${t.font.sans};
333
+ font-size: 16px;
334
+ line-height: 1.4;
335
+ color: ${t.colors.text};
336
+
337
+ b {
338
+ font-weight: 700;
339
+ }
340
+ `,Re=s.div`
341
+ display: flex;
342
+ gap: 16px;
343
+ margin-top: 20px;
344
+
345
+ ${t.media.maxWidth("mobile")} {
346
+ flex-direction: column;
347
+ }
348
+ `,Me=s.button`
349
+ flex: 1;
350
+ height: 48px;
351
+ border: 1px solid ${t.colors.accent};
352
+ border-radius: 8px;
353
+ background: ${t.colors.white};
354
+ color: ${t.colors.accent};
355
+ cursor: pointer;
356
+ font-family: ${t.font.sans};
357
+ font-weight: 600;
358
+ font-size: 13px;
359
+ letter-spacing: 0.46px;
360
+ text-transform: uppercase;
361
+
362
+ &:hover {
363
+ background: rgba(105, 31, 169, 0.06);
364
+ }
365
+ &:focus-visible {
366
+ outline: 2px solid ${t.colors.accent};
367
+ outline-offset: 2px;
368
+ }
369
+ `,Fn=s.a`
370
+ flex: 1;
371
+ display: inline-flex;
372
+ align-items: center;
373
+ justify-content: center;
374
+ height: 48px;
375
+ border-radius: 8px;
376
+ background: ${t.colors.dclRed};
377
+ color: ${t.colors.softWhite};
378
+ cursor: pointer;
379
+ text-decoration: none;
380
+ font-family: ${t.font.sans};
381
+ font-weight: 600;
382
+ font-size: 13px;
383
+ letter-spacing: 0.46px;
384
+ text-transform: uppercase;
385
+
386
+ &:hover {
387
+ filter: brightness(1.05);
388
+ }
389
+ &:focus-visible {
390
+ outline: 2px solid ${t.colors.accent};
391
+ outline-offset: 2px;
392
+ }
393
+ `,de=s.div`
394
+ display: flex;
395
+ align-items: flex-start;
396
+ gap: 12px;
397
+ padding: 16px;
398
+ margin-top: 8px;
399
+ border-radius: 12px;
400
+ background: rgba(255, 45, 85, 0.1);
401
+ font-family: ${t.font.sans};
402
+ font-size: 14px;
403
+ line-height: 1.5;
404
+ color: ${t.colors.text};
405
+
406
+ .ico {
407
+ width: 22px;
408
+ height: 22px;
409
+ flex: none;
410
+ color: ${t.colors.dclRed};
411
+ }
412
+
413
+ /**
414
+ * Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
415
+ * reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
416
+ * all of which would contradict themselves rendered in the red error treatment.
417
+ */
418
+ &[data-tone='info'] {
419
+ background: ${t.colors.panel};
420
+
421
+ .ico {
422
+ color: ${t.colors.accent};
423
+ }
424
+ }
425
+ `;function In({name:i,priceCredits:r,onClose:l}){const{session:x}=Ie(),{data:h,isError:d}=rt(x),p=at(),c=Fe(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),C=a==="completing",$=r!=null?xe(r):"—",k=r==null,T=h==null?void 0:h.credits,I=r!=null&&T!=null?r-T:0,S=I>0,A=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:xe(I)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!C&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[C,l]);async function W(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:i,identity:x.identity,signer:x.signer});J("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:r??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){J(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof me?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const B=a!=="success"&&a!=="pending",M=lt(x==null?void 0:x.providerType);return e.jsx(pn,{onClick:C?void 0:l,role:"presentation",children:e.jsxs(hn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[B&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:a==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ne,{onClick:l,disabled:C,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:v})]}),e.jsx(_e,{onClick:()=>f("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(gn,{children:[e.jsx(bn,{children:n("names.confirmTitle")}),e.jsx(yn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${An(i)}</b>`})}}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:"@"}),e.jsx(vn,{value:g,onChange:y=>u(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(Cn,{children:".dcl.eth"})]})]}),A?e.jsxs(de,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:A})]}):null,e.jsx(_e,{onClick:()=>void W(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs($n,{children:[e.jsx(kn,{src:ct,alt:"",width:56,height:56}),e.jsx(Sn,{children:M?n("names.confirming"):n("names.completing")}),e.jsxs(Tn,{children:[e.jsx(En,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(_n,{children:"1/1"})]})]}),a==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.pendingHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(de,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsx(Ee,{"aria-hidden":!0,children:"@"}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsx(Re,{children:e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")})})]}),a==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ee,{children:[e.jsx(te,{children:n("names.successHeaderTitle")}),e.jsx(ne,{onClick:l,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(F,{})," ",Y(h,d)]}),e.jsx(ie,{}),e.jsxs(Rn,{children:[e.jsx(Mn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(zn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(oe,{style:{marginTop:20},children:[e.jsxs(xn,{"data-testid":"name-success-tile",children:[e.jsx(fn,{src:ln,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(mn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(un,{src:cn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(re,{children:[e.jsxs(ae,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(le,{children:n("names.subtitle")})]}),e.jsxs(ce,{children:[e.jsx(F,{}),$]})]}),e.jsxs(Re,{children:[e.jsx(Me,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Fn,{href:L.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function An(i){return i.replace(/[&<>"']/g,r=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[r])}const Nn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31055297774.commit-b808071/_assets/identity-B4DXDuJP.webp",Ln="https://cdn.decentraland.org/@dcl/shop/1.0.2-31055297774.commit-b808071/_assets/world-B-9aPlxu.webp",Pn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31055297774.commit-b808071/_assets/invite-BfwIhP2C.webp",Wn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31055297774.commit-b808071/_assets/governance-DnazlIjy.webp",Bn=s.div`
426
+ width: 100%;
427
+ min-width: 0;
428
+ `,Hn=s.nav`
429
+ display: flex;
430
+ align-items: center;
431
+ gap: 6px;
432
+ margin: 4px 0 16px;
433
+ font-family: ${t.font.sans};
434
+ font-size: 12px;
435
+ line-height: 1;
436
+ color: ${t.colors.muted};
437
+ `,Un=s.button`
438
+ border: 0;
439
+ background: none;
440
+ padding: 0;
441
+ cursor: pointer;
442
+ font: inherit;
443
+ color: ${t.colors.muted};
444
+
445
+ &:hover {
446
+ text-decoration: underline;
447
+ }
448
+ &:focus-visible {
449
+ outline: 2px solid ${t.colors.accent};
450
+ outline-offset: 2px;
451
+ }
452
+ `,On=s.span`
453
+ font-weight: 700;
454
+ color: ${t.colors.muted};
455
+ `,Gn=s.div`
456
+ display: flex;
457
+ flex-direction: column;
458
+ gap: 48px;
459
+ padding-bottom: 48px;
460
+ background: #ecdbfd;
461
+ border-radius: ${t.radius.banner};
462
+ overflow: hidden;
463
+
464
+ ${t.media.maxWidth("mobile")} {
465
+ gap: 32px;
466
+ padding-bottom: 32px;
467
+ }
468
+ `,Dn=s.div`
469
+ position: relative;
470
+ border-radius: ${t.radius.banner};
471
+ overflow: hidden;
472
+ padding: 88px 48px;
473
+ display: flex;
474
+ flex-direction: column;
475
+ align-items: center;
476
+ gap: 48px;
477
+ text-align: center;
478
+ background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
479
+
480
+ ${t.media.maxWidth("mobile")} {
481
+ padding: 40px 20px;
482
+ gap: 28px;
483
+ }
484
+ `,qn=s.div`
485
+ display: flex;
486
+ flex-direction: column;
487
+ align-items: center;
488
+ gap: 12px;
489
+ `,Zn=s.h1`
490
+ margin: 0;
491
+ font-family: ${t.font.sans};
492
+ font-weight: 600;
493
+ font-size: 40px;
494
+ line-height: 1.167;
495
+ color: ${t.colors.white};
496
+
497
+ ${t.media.maxWidth("mobile")} {
498
+ font-size: 26px;
499
+ }
500
+ `,Vn=s.p`
501
+ margin: 0;
502
+ max-width: 760px;
503
+ font-family: ${t.font.sans};
504
+ font-weight: 500;
505
+ font-size: 24px;
506
+ line-height: 1.334;
507
+ color: #ecebed;
508
+
509
+ ${t.media.maxWidth("mobile")} {
510
+ font-size: 16px;
511
+ }
512
+ `,Kn=s.div`
513
+ width: min(785px, 100%);
514
+ display: flex;
515
+ flex-direction: column;
516
+ gap: 12px;
517
+ `,Qn=s.div`
518
+ position: relative;
519
+ `,Jn=s("div",Vt("invalid"))`
520
+ display: flex;
521
+ align-items: center;
522
+ gap: 8px;
523
+ padding: 8px 8px 8px 16px;
524
+ background: ${t.colors.softWhite};
525
+ border: 1.5px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.line};
526
+ border-radius: 20px;
527
+
528
+ &:focus-within {
529
+ border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
530
+ }
531
+
532
+ ${t.media.maxWidth("mobile")} {
533
+ border-radius: 16px;
534
+ }
535
+ `,Xn=s.span`
536
+ position: absolute;
537
+ left: -9999px;
538
+ top: 0;
539
+ visibility: hidden;
540
+ pointer-events: none;
541
+ white-space: pre;
542
+ font-family: ${t.font.sans};
543
+ font-size: 20px;
544
+ font-weight: 600;
545
+ line-height: 1.6;
546
+
547
+ ${t.media.maxWidth("mobile")} {
548
+ font-size: 16px;
549
+ }
550
+ `,Yn=s.div`
551
+ position: absolute;
552
+ top: calc(100% + 8px);
553
+ left: 0;
554
+ right: 0;
555
+ z-index: 2;
556
+ display: flex;
557
+ align-items: center;
558
+ gap: 8px;
559
+ padding: 8px 12px;
560
+ border-radius: 8px;
561
+ background: #ffcdd4;
562
+ color: #ec303a;
563
+ font-family: ${t.font.sans};
564
+ font-size: 14px;
565
+ font-weight: 500;
566
+ line-height: 1.2;
567
+ text-align: left;
568
+
569
+ ${t.media.maxWidth("mobile")} {
570
+ position: static;
571
+ margin-top: 8px;
572
+ align-items: flex-start;
573
+ flex-wrap: wrap;
574
+ }
575
+ `,es=s.a`
576
+ display: inline-flex;
577
+ align-items: center;
578
+ gap: 2px;
579
+ margin-left: auto;
580
+ color: #ec303a;
581
+ font-weight: 600;
582
+ text-decoration: underline;
583
+ text-transform: uppercase;
584
+ white-space: nowrap;
585
+
586
+ ${t.media.maxWidth("mobile")} {
587
+ margin-left: 0;
588
+ }
589
+ `,ts=s.label`
590
+ flex: 1;
591
+ min-width: 0;
592
+ display: flex;
593
+ align-items: center;
594
+ gap: 0;
595
+ cursor: text;
596
+ overflow: hidden;
597
+ `,ns=s.span`
598
+ flex: none;
599
+ margin-right: 8px;
600
+ font-family: ${t.font.sans};
601
+ font-size: 26px;
602
+ font-weight: 500;
603
+ line-height: 1;
604
+ color: ${t.colors.muted2};
605
+
606
+ ${t.media.maxWidth("mobile")} {
607
+ font-size: 20px;
608
+ }
609
+ `,ss=s.input`
610
+ flex: 0 1 auto;
611
+ min-width: 0;
612
+ max-width: 100%;
613
+ border: 0;
614
+ outline: none;
615
+ background: transparent;
616
+ font-family: ${t.font.sans};
617
+ font-size: 20px;
618
+ font-weight: 600;
619
+ line-height: 1.6;
620
+ color: ${t.colors.text};
621
+ padding: 0;
622
+
623
+ &::placeholder {
624
+ color: ${t.colors.muted1};
625
+ font-weight: 400;
626
+ }
627
+
628
+ ${t.media.maxWidth("mobile")} {
629
+ font-size: 16px;
630
+ }
631
+ `,is=s.span`
632
+ flex: none;
633
+ margin-left: 2px;
634
+ /* Not selectable: it is the fixed part of the address, not something the reader typed. */
635
+ user-select: none;
636
+ -webkit-user-select: none;
637
+ font-family: ${t.font.sans};
638
+ font-size: 20px;
639
+ font-weight: 400;
640
+ line-height: 1.6;
641
+ color: ${t.colors.muted1};
642
+
643
+ ${t.media.maxWidth("mobile")} {
644
+ font-size: 16px;
645
+ }
646
+ `,os=s.span`
647
+ flex: none;
648
+ font-family: ${t.font.sans};
649
+ font-size: 13px;
650
+ color: ${t.colors.muted2};
651
+ white-space: nowrap;
652
+ `,We=s.button`
653
+ flex: none;
654
+ display: inline-flex;
655
+ align-items: center;
656
+ justify-content: center;
657
+ gap: 8px;
658
+ height: 52px;
659
+ padding: 0 24px;
660
+ border: 0;
661
+ border-radius: 12px;
662
+ cursor: pointer;
663
+ background: ${t.gradients.cerise};
664
+ color: ${t.colors.softWhite};
665
+ font-family: ${t.font.sans};
666
+ font-weight: 600;
667
+ font-size: 15px;
668
+ letter-spacing: 0.46px;
669
+ line-height: 24px;
670
+ text-transform: uppercase;
671
+
672
+ &:hover:not(:disabled) {
673
+ filter: brightness(1.05);
674
+ }
675
+ &:focus-visible {
676
+ outline: 2px solid ${t.colors.white};
677
+ outline-offset: 2px;
678
+ }
679
+ &:disabled {
680
+ cursor: not-allowed;
681
+ background: #e7c8e9;
682
+ color: #fbe9fb;
683
+ }
684
+
685
+ ${t.media.maxWidth("mobile")} {
686
+ display: none;
687
+ }
688
+ `,rs=s(We)`
689
+ display: none;
690
+
691
+ ${t.media.maxWidth("mobile")} {
692
+ display: inline-flex;
693
+ width: 100%;
694
+ height: 48px;
695
+ border-radius: 12px;
696
+ }
697
+ `,as=s.span`
698
+ display: inline-flex;
699
+ align-items: center;
700
+ gap: 4px;
701
+ font-weight: 600;
702
+
703
+ .ico {
704
+ width: 16px;
705
+ height: 16px;
706
+ }
707
+ `,ls=s.div`
708
+ display: flex;
709
+ align-items: center;
710
+ gap: 8px;
711
+ padding: 8px 14px;
712
+ border-radius: 8px;
713
+ font-family: ${t.font.sans};
714
+ font-size: 13px;
715
+ font-weight: 500;
716
+ text-align: left;
717
+
718
+ 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)"};
719
+ color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
720
+
721
+ .ico {
722
+ width: 16px;
723
+ height: 16px;
724
+ flex: none;
725
+ }
726
+ `,pe=s(ls)`
727
+ position: absolute;
728
+ top: calc(100% + 8px);
729
+ left: 0;
730
+ right: 0;
731
+ z-index: 2;
732
+
733
+ /* Static on mobile, as TakenBanner is: the claim button sits below InputWrap there, so anything
734
+ floating out of the input lands on top of it. */
735
+ ${t.media.maxWidth("mobile")} {
736
+ position: static;
737
+ margin-top: 8px;
738
+ }
739
+ `,cs=s.section`
740
+ display: flex;
741
+ flex-direction: column;
742
+ gap: 48px;
743
+ padding: 0 48px;
744
+
745
+ ${t.media.maxWidth("mobile")} {
746
+ gap: 32px;
747
+ padding: 0 20px;
748
+ }
749
+ `,ds=s.div`
750
+ display: flex;
751
+ flex-direction: column;
752
+ align-items: center;
753
+ gap: 24px;
754
+ `,ps=s.h2`
755
+ margin: 0;
756
+ text-align: center;
757
+ font-family: ${t.font.sans};
758
+ font-weight: 600;
759
+ font-size: 32px;
760
+ line-height: 1.167;
761
+ color: ${t.colors.text2};
762
+
763
+ ${t.media.maxWidth("mobile")} {
764
+ font-size: 22px;
765
+ }
766
+ `,hs=s.p`
767
+ margin: 0;
768
+ max-width: 907px;
769
+ text-align: center;
770
+ font-family: ${t.font.sans};
771
+ font-weight: 400;
772
+ font-size: 20px;
773
+ line-height: 1.57;
774
+ color: ${t.colors.text};
775
+
776
+ ${t.media.maxWidth("mobile")} {
777
+ font-size: 16px;
778
+ }
779
+ `,xs=s.div`
780
+ display: grid;
781
+ grid-template-columns: repeat(4, 1fr);
782
+ gap: 24px;
783
+ align-items: stretch;
784
+
785
+ ${t.media.maxWidth("lg")} {
786
+ grid-template-columns: repeat(2, 1fr);
787
+ }
788
+ ${t.media.maxWidth("mobile")} {
789
+ grid-template-columns: 1fr;
790
+ }
791
+ `,q=s.article`
792
+ min-width: 0;
793
+ display: flex;
794
+ flex-direction: column;
795
+ background: ${t.colors.white};
796
+ box-shadow: 0 0 0 0.25px ${t.colors.muted2};
797
+ border-radius: ${t.radius.card};
798
+ overflow: hidden;
799
+
800
+ /* Forced colours drop decorative shadows. Outline rather than border: it survives there and, like the
801
+ shadow, takes no layout, so the artwork still reaches the corner. */
802
+ @media (forced-colors: active) {
803
+ outline: 1px solid CanvasText;
804
+ }
805
+ `,Z=s.img`
806
+ display: block;
807
+ width: 100%;
808
+ aspect-ratio: 388 / 235;
809
+ object-fit: cover;
810
+ `,V=s.div`
811
+ flex: 1;
812
+ display: flex;
813
+ flex-direction: column;
814
+ gap: 6px;
815
+ padding: 12px 16px;
816
+ `,K=s.h3`
817
+ margin: 0;
818
+ font-family: ${t.font.sans};
819
+ font-weight: 700;
820
+ font-size: 20px;
821
+ line-height: 1.57;
822
+ text-transform: uppercase;
823
+ color: ${t.colors.text};
824
+ `,Q=s.p`
825
+ margin: 0;
826
+ font-family: ${t.font.sans};
827
+ font-weight: 400;
828
+ font-size: 14px;
829
+ line-height: 1.57;
830
+ color: ${t.colors.text};
831
+ `,fs=s.span`
832
+ font-weight: 600;
833
+ color: ${t.colors.accent};
834
+ `,ze=s.a`
835
+ display: inline-flex;
836
+ align-items: center;
837
+ gap: 2px;
838
+ margin-top: auto;
839
+ font-family: ${t.font.sans};
840
+ font-weight: 500;
841
+ font-size: 14px;
842
+ line-height: 30px;
843
+ color: ${t.colors.accent};
844
+ text-decoration: underline;
845
+
846
+ &:focus-visible {
847
+ outline: 2px solid ${t.colors.accent};
848
+ outline-offset: 2px;
849
+ }
850
+
851
+ .ico {
852
+ width: 13px;
853
+ height: 13px;
854
+ }
855
+ `,ms=s.span`
856
+ position: absolute;
857
+ width: 1px;
858
+ height: 1px;
859
+ padding: 0;
860
+ margin: -1px;
861
+ overflow: hidden;
862
+ clip: rect(0, 0, 0, 0);
863
+ white-space: nowrap;
864
+ border: 0;
865
+ `,us="https://docs.decentraland.org/creator/worlds/about/",gs="https://governance.decentraland.org";function bs(i){const r=typeof window<"u"?window.location.hostname:"";return`${r.endsWith("decentraland.org")?"https://decentraland.org":r.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function ys({onBack:i}){Ae({title:n("seo.names.title"),description:n("seo.names.description")});const{session:r,signIn:l}=Ie(),{data:x}=Ne(),h=x?Le(P,x):null,[d,p]=w.useState(""),[c,a]=w.useState("idle"),[f,g]=w.useState(!1),u=w.useRef(null),[v,j]=w.useState(void 0);w.useLayoutEffect(()=>{u.current&&j(u.current.offsetWidth)},[d]),w.useEffect(()=>{if(!Se(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const T=new AbortController,I=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:T.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(I),T.abort()}},[d]);const m=Se(d),b=m.ok&&(c==="available"||c==="error");function C(){if(b){if(!r){l();return}g(!0)}}const $=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(as,{children:[e.jsx(F,{}),xe(h)]}):null]});return e.jsxs(Bn,{"data-testid":"names-page",children:[e.jsxs(Hn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Un,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(On,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Gn,{children:[e.jsxs(Dn,{children:[e.jsxs(qn,{children:[e.jsx(Zn,{children:n("names.heroTitle")}),e.jsx(Vn,{children:n("names.heroSubtitle")})]}),e.jsxs(Kn,{children:[e.jsxs(Qn,{"data-testid":"names-input-wrap",children:[e.jsxs(Jn,{invalid:c==="taken",children:[e.jsxs(ts,{children:[e.jsx(ns,{"aria-hidden":!0,children:"@"}),e.jsx(ss,{value:d,onChange:k=>p(Jt(k.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:X,style:{width:v!=null?`${v}px`:void 0}}),e.jsx(Xn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(is,{children:n("names.suffix")})]}),d.length>0?e.jsxs(os,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(We,{onClick:C,disabled:!b,"data-testid":"names-claim",children:$})]}),c==="taken"?e.jsxs(Yn,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(es,{href:bs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(pe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(pe,{tone:"muted",role:"status",children:n("names.tooShort",{min:Pe})}):null]}),e.jsx(rs,{onClick:C,disabled:!b,children:$}),e.jsx(ms,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(cs,{children:[e.jsxs(ds,{children:[e.jsx(ps,{children:n("names.whyTitle")}),e.jsx(hs,{children:n("names.whyIntro")})]}),e.jsxs(xs,{children:[e.jsxs(q,{children:[e.jsx(Z,{src:Nn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(Q,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Ln,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(Q,{children:[n("names.why2")," ",e.jsx(fs,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:us,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Pn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(Q,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(Z,{src:Wn,alt:""}),e.jsxs(V,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(Q,{children:n("names.why4")}),e.jsxs(ze,{href:gs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(In,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const ws="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",he=48,js=["all","on_sale","not_for_sale"];function Us(){const[i]=Ke(),r=Fe(),l=(i.get("q")??"").trim().toLowerCase(),x=(i.get("q")??"").trim();Ae({title:x?n("seo.collectibles.searchTitle",{query:x}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=w.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[d,p]=Qe(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=js.includes(d.status)?d.status:"on_sale";Je(`${j}:${c??""}`);const[b,C]=w.useState(!1);w.useEffect(()=>{if(!b)return;const o=O=>{O.key==="Escape"&&C(!1)};document.addEventListener("keydown",o);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=z}},[b]);const $=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,T=g&&!Number.isNaN(Number(g))?Number(g):void 0,I=ht(),S=c?et[c]:void 0,A=($e.find(o=>o.key===v)??$e[0]).server,W={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:T,search:l||void 0,sortBy:A,isSmart:u||void 0,onSale:!0,listingType:I?void 0:"primary"},B={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:A,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:M,total:y,isLoading:_,isPlaceholderData:R,error:ue,hasNextPage:Be,isFetchingNextPage:ge,isFetchNextPageError:He,fetchNextPage:Ue}=Nt($?["shop-items",W]:["catalog-items",B],o=>$?ft({...W,first:he,skip:o}):mt({...B,first:he,skip:o}),{enabled:j!=="names"}),H=y,{data:be,isError:Oe,isPending:Ge}=Ne(),De=o=>be&&o.manaWei?Le(o.manaWei,be):null,qe=$&&Ge&&M.some(o=>o.source==="legacy"),ye=_||R||qe,Ze=_?15:Math.min(Math.max(M.length,1),he),we=w.useRef(null);w.useEffect(()=>{_||R||!l||we.current===l||(we.current=l,J("Shop Searched",{query:l,result_count:H}))},[l,_,R,H]);const U=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const o=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:T,sort:v,status:m,smart:u});if(U.current==="__init__"||U.current===o){U.current=o;return}U.current=o,J("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:T??null,status:m,smart:u,sort:v},result_count:H})},[j,c,a,k,T,v,m,u,_,R,H]);function je(o){p({category:o,subCategory:null})}function ve(o){p({status:o})}function Ce(o){p({rarities:a.includes(o)?a.filter(z=>z!==o):[...a,o]})}function Ve(){p(h)}const N=[];(k!=null||T!=null)&&N.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Xe)a.includes(o)&&N.push({key:`rarity-${o}`,label:xt(o),onRemove:()=>Ce(o)});return u&&N.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&N.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>ve("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>C(!1),"aria-hidden":!0}):null,e.jsxs(bt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(yt,{children:[e.jsx(wt,{children:n("assets.filters")}),e.jsx(jt,{onClick:()=>C(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx(Ct,{category:j,subCategory:c,onCategory:je,onSub:o=>p({subCategory:o}),priceMin:f,priceMax:g,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:a,onToggleRarity:Ce,status:m,onStatus:ve,smart:u,onSmart:o=>p({smart:o})})}),e.jsx($t,{children:e.jsx(kt,{type:"button",onClick:()=>C(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ys,{onBack:()=>je("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:o=>p({sort:o}),total:y,loading:_||R,query:l,onOpenFilters:()=>C(!0),chips:N,onClearChips:Ve}),Oe&&$&&M.some(o=>o.source==="legacy")?e.jsx(Tt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ue?e.jsx(Lt,{message:n("assets.loadError"),testId:"browse-error"}):null,!ye&&M.length===0&&!ue?e.jsxs(Et,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:ws,alt:""}),e.jsxs(Rt,{children:[e.jsx(Mt,{children:n("assets.empty.title")}),e.jsx(zt,{children:x?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:x}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ft,{children:e.jsx(It,{type:"button",onClick:()=>r("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:ye?e.jsx(ke,{count:Ze}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!$)return e.jsx(G,{item:o,mode:"view"},D(o));const z=o;if(z.source!=="legacy")return e.jsx(G,{item:o},D(o));const O=De(z);return O==null?e.jsx(G,{item:o,mode:"view"},D(o)):e.jsx(G,{item:{...z,priceCredits:O}},D(o))}),ge?e.jsx(ke,{count:6}):null]})}),e.jsx(At,{hasNextPage:Be,isFetching:ge,isError:He,onLoadMore:()=>void Ue()})]})]})})]})}export{Us as Assets};