@dcl/shop 1.0.2-31053112537.commit-2eeb02b → 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.
- package/_assets/{Activity-CT4EXTT1.js → Activity-BGVAnqbp.js} +3 -3
- package/_assets/{AnimatedBackground-wyzu1j63.js → AnimatedBackground-BacIzfr9.js} +2 -2
- package/_assets/Assets-Bs3sIn09.js +865 -0
- package/_assets/{Assets.styles-De3LV6PK.js → Assets.styles-CkO8eYMZ.js} +1 -1
- package/_assets/{Authorizations-Erxm3Fyz.js → Authorizations-CLC0gP2S.js} +1 -1
- package/_assets/{Cart-DJkaXf-4.js → Cart-CfbLgf8G.js} +2 -2
- package/_assets/{CircularProgress-CdQvdQq6.js → CircularProgress-1YXgiQtT.js} +1 -1
- package/_assets/{Collection-CJV4xLye.js → Collection-DKA_h7HO.js} +1 -1
- package/_assets/{CollectionCarousel-CvMsq3XH.js → CollectionCarousel-COMBJtj4.js} +1 -1
- package/_assets/{Confetti-BH2iBIUi.js → Confetti-BSUE6v15.js} +1 -1
- package/_assets/{Creator-Cyy5FpL2.js → Creator-Chfg4XCW.js} +1 -1
- package/_assets/{ErrorNotice-h0GUcJEu.js → ErrorNotice-aOead5te.js} +1 -1
- package/_assets/{ExchangeController-B3cP_vUc.js → ExchangeController-D9wO5y3j.js} +1 -1
- package/_assets/{Faq-CKehqHI0.js → Faq-BUcIgNDP.js} +1 -1
- package/_assets/{GetCredits-DdkULwKp.js → GetCredits-BLECOB-N.js} +1 -1
- package/_assets/{Grow-BV4Iorxj.js → Grow-zqUJtnL7.js} +1 -1
- package/_assets/{HelpersUtil-CU-9vHU7.js → HelpersUtil-BrmwLkkp.js} +1 -1
- package/_assets/{ItemDetail-BAqZB6Be.js → ItemDetail-B2vKg-9Z.js} +1 -1
- package/_assets/LazyEmoteControls-DnvyzyyY.js +2 -0
- package/_assets/{LoadMore-D4fnHonl.js → LoadMore-Cy9OoEJz.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-YVCL83wQ.js → ManaPricingBanner.styles-B9-hTa3D.js} +1 -1
- package/_assets/{MyAssets-DeZdrOao.js → MyAssets-CHgc1ZcI.js} +1 -1
- package/_assets/{MyFavorites-Jhmw64Z-.js → MyFavorites-DWo1mliw.js} +1 -1
- package/_assets/{NotFound-BV0gWDmk.js → NotFound-CIGIbTGI.js} +1 -1
- package/_assets/{NotificationsBell-CbzYe18m.js → NotificationsBell-Cg5PqU4H.js} +1 -1
- package/_assets/{OutfitDetail-mnH36Arv.js → OutfitDetail-DF87HN6H.js} +1 -1
- package/_assets/{OutfitPreview-DEQlnmtN.js → OutfitPreview-IPt5zFQ2.js} +1 -1
- package/_assets/{OutfitStudio-DlMQxDuE.js → OutfitStudio-DHyzlXbm.js} +1 -1
- package/_assets/{StoreSettings-DXQD9Iiv.js → StoreSettings-SFcLGWm7.js} +1 -1
- package/_assets/{Success-Duo1gCiQ.js → Success-B_ZedKxN.js} +1 -1
- package/_assets/{SwapController-CJtBte7L.js → SwapController-DEl6q4-5.js} +1 -1
- package/_assets/{Tooltip-H89dNdoQ.js → Tooltip-CfAbMWhJ.js} +1 -1
- package/_assets/{TradeService-BcEoCIV7.js → TradeService-DCGCUpYo.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-CZuJfgAC.js → W3MFrameProviderSingleton-BEUP6hLZ.js} +3 -3
- package/_assets/{WebCryptoP256-BQ90tDtY.js → WebCryptoP256-2ShtCeVF.js} +1 -1
- package/_assets/{authorizations-GLPsQqiP.js → authorizations-B17B7Njo.js} +1 -1
- package/_assets/{basic-kk_TRFwe.js → basic-Dr3bEQfu.js} +1 -1
- package/_assets/{biconomy-D-XcBmzY.js → biconomy-3Y8X7VlC.js} +1 -1
- package/_assets/{builder-Dn0-qNG1.js → builder-jjuFCu3k.js} +1 -1
- package/_assets/{buy-gasless-cVGUwJcn.js → buy-gasless-DoSh-tFa.js} +1 -1
- package/_assets/{buy-C36PZNHt.js → buy-wdud8pnf.js} +1 -1
- package/_assets/{categories-l2OqZN_F.js → categories-DGIg36Oc.js} +1 -1
- package/_assets/{ccip-DTvzkPzd.js → ccip-BKrghWQj.js} +1 -1
- package/_assets/{ccip-BkPpUcVC.js → ccip-CXCfMVYe.js} +1 -1
- package/_assets/{collectionPage.styles-BP7gMOku.js → collectionPage.styles-DwFPJPce.js} +1 -1
- package/_assets/{controller-Cm3hwM7G.js → controller-DdgkWKgL.js} +2 -2
- package/_assets/{core-DtQ_ZTXW.js → core-C8S2mN1s.js} +4 -4
- package/_assets/{createSvgIcon-DTfKYyFY.js → createSvgIcon-Cg8ZliIm.js} +1 -1
- package/_assets/{custom-dDX_uBau.js → custom-X9wHG9wg.js} +1 -1
- package/_assets/{data-capture-BHgEiKBs.js → data-capture-BgPNXS18.js} +1 -1
- package/_assets/{email-D-4NGs1z.js → email-BGdZRw8p.js} +1 -1
- package/_assets/{embedded-wallet-BQg7nplX.js → embedded-wallet-CqIU9APg.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DKFf4xqI.js → emotion-styled.browser.esm-DZbIWeAZ.js} +1 -1
- package/_assets/{engine-9w9_00su.js → engine-CBG8_pF-.js} +1 -1
- package/_assets/{errors-DAy3n3Fl.js → errors-BruxKfZB.js} +1 -1
- package/_assets/{estimate-l1-fee-CMUFNeJj.js → estimate-l1-fee-k3exg7PR.js} +1 -1
- package/_assets/{execute-DmyMuEbq.js → execute-RjH3kC63.js} +2 -2
- package/_assets/{features-dYRaytuv.js → features-BnDZm8if.js} +1 -1
- package/_assets/{fetchTokenMetadata-B7vrevS4.js → fetchTokenMetadata-CdUuHqIj.js} +2 -2
- package/_assets/{field.styles-DxW4rsbZ.js → field.styles-l0zobCFG.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-D-zi5D-3.js → get-ecosystem-wallet-info-DALoL3Hc.js} +1 -1
- package/_assets/{getBalance-03ROSZOz.js → getBalance-CefhuKko.js} +1 -1
- package/_assets/{getNFT-BZ5HS1py.js → getNFT-D-L5zgdP.js} +1 -1
- package/_assets/{getNFT-CGrmS4cn.js → getNFT-nev9rcin.js} +1 -1
- package/_assets/{grid.styles-VdW_5pS8.js → grid.styles-DhFwhKRo.js} +1 -1
- package/_assets/{hashTypedData-D0grmu7Q.js → hashTypedData-BEKwcmlS.js} +1 -1
- package/_assets/{hashTypedData-DWrpUT7F.js → hashTypedData-li6aoa3o.js} +1 -1
- package/_assets/{in-app-Fd-r2Pt9.js → in-app-DUJu2O6v.js} +1 -1
- package/_assets/{in-app-wallet-calls-US6STGvk.js → in-app-wallet-calls-C9Jxi05O.js} +1 -1
- package/_assets/{index-BGWFa_3t.js → index-1--tLqz8.js} +1 -1
- package/_assets/{index-DIEYvaFA.js → index-1nKs4-Ix.js} +1 -1
- package/_assets/{index-BfrU5ARr.js → index-1wf8L6YU.js} +1 -1
- package/_assets/{index-Bw5aGSBt.js → index-3PUZ8U0R.js} +3 -3
- package/_assets/{index-CTFDcqvg.js → index-3_UdO-zA.js} +1 -1
- package/_assets/{index-_VGZGU-r.js → index-5uftLGuI.js} +3 -3
- package/_assets/{index-GGunchuI.js → index-AKUvJK7K.js} +1 -1
- package/_assets/{index-DmohqnOc.js → index-B2O7gZoQ.js} +1 -1
- package/_assets/{index-CHrjSjdy.js → index-BAyG95nG.js} +1 -1
- package/_assets/{index-Cji3FYAQ.js → index-BBNLswz5.js} +1 -1
- package/_assets/{index-D90sT5TF.js → index-BOgrc04A.js} +1 -1
- package/_assets/{index-D_RGYDYj.js → index-BXykQ7Kr.js} +1 -1
- package/_assets/{index-mHYk9Ana.js → index-BfqVu35d.js} +1 -1
- package/_assets/{index-DZE8IM2d.js → index-Bl-qZqD6.js} +1 -1
- package/_assets/{index-DlOXAhkq.js → index-BlmfBcG1.js} +1 -1
- package/_assets/{index-vO2jCoJA.js → index-BwjISY1Q.js} +1 -1
- package/_assets/{index-b59UUC3O.js → index-C2_mL_dX.js} +1 -1
- package/_assets/{index-DMqWpF7F.js → index-C7AFAxAx.js} +1 -1
- package/_assets/{index-DR22dJ1f.js → index-CE124P9G.js} +1 -1
- package/_assets/{index-prmd5qIM.js → index-CFEHIoaL.js} +1 -1
- package/_assets/{index-CpgH80QO.js → index-CTfBCyyR.js} +11 -11
- package/_assets/{index-CYelE7gc.js → index-CV1_E3wb.js} +1 -1
- package/_assets/{index-DGVpcWzu.js → index-CVqec2h5.js} +1 -1
- package/_assets/{index-D6hB217e.js → index-ChBwA1h2.js} +1 -1
- package/_assets/{index-DM21W4eU.js → index-CkF3QZy9.js} +1 -1
- package/_assets/{index-BXAhg_WL.js → index-CpjzOH1b.js} +1 -1
- package/_assets/{index-Csv3ZE7U.js → index-Ctoo8CLR.js} +1 -1
- package/_assets/{index-C9g5jnkn.js → index-CvPkDtGf.js} +3 -3
- package/_assets/{index-C6snVc74.js → index-D-wVNkf3.js} +2 -2
- package/_assets/{index-Desa5DLU.js → index-DAnXL5-b.js} +1 -1
- package/_assets/{index-C9qZGyVn.js → index-DDLK5XSq.js} +1 -1
- package/_assets/{index-E6MYA_qz.js → index-DU9MjygG.js} +1 -1
- package/_assets/{index-BOqWivx2.js → index-DWiRe-sp.js} +1 -1
- package/_assets/{index-DCty_Nzt.js → index-DXWzE47h.js} +1 -1
- package/_assets/{index-BLhzIl8l.js → index-Dar3bPlr.js} +2 -2
- package/_assets/{index-B4OCkrkj.js → index-DbrCcWJ3.js} +1 -1
- package/_assets/{index-YtrNc4_U.js → index-Dd4KtrAw.js} +1 -1
- package/_assets/{index-CBa9KvFL.js → index-DecRfVMx.js} +1 -1
- package/_assets/{index-Dctqjcot.js → index-DjqUHVKK.js} +1 -1
- package/_assets/{index-ojnKZ8lo.js → index-DoVK9CTx.js} +1 -1
- package/_assets/{index-Ck66rPGl.js → index-DrWim4p_.js} +1 -1
- package/_assets/{index-WGFd54XN.js → index-HaAGk4bQ.js} +1 -1
- package/_assets/{index-D-lui3ze.js → index-JG0FDNiP.js} +1 -1
- package/_assets/{index-0ctogS4p.js → index-WSwhnTRZ.js} +1 -1
- package/_assets/{index-CzuJbwKM.js → index-Xuxrb8Q0.js} +1 -1
- package/_assets/{index-CUnVy-2F.js → index-d570G5B7.js} +1 -1
- package/_assets/{index-3M7Oc88-.js → index-dr6fXYBx.js} +1 -1
- package/_assets/{index-Y3vrFRTZ.js → index-n49vue3k.js} +1 -1
- package/_assets/{index-9wBxZvS3.js → index-syneNMGM.js} +1 -1
- package/_assets/{index-CvEQ-uxw.js → index-vQ65olfe.js} +1 -1
- package/_assets/{index-DpfgsZS7.js → index-z7leYudl.js} +2 -2
- package/_assets/{index-DXEO_tM8.js → index-zDqeLkyG.js} +1 -1
- package/_assets/{index.es-iNKw5JYV.js → index.es-CE2sG7i4.js} +1 -1
- package/_assets/{index.es-CM-7pdUr.js → index.es-DbgkC7jp.js} +1 -1
- package/_assets/{index.es-C_PIRdls.js → index.es-yWYRmppU.js} +4 -4
- package/_assets/{localBatchGatewayRequest-CvrWva1S.js → localBatchGatewayRequest-VK-lqBeb.js} +1 -1
- package/_assets/name-verified-oGwQ3ntb.svg +25 -0
- package/_assets/{networks-DxxML95J.js → networks-DlOv_Jl5.js} +1 -1
- package/_assets/{onramp-DlmUl4wC.js → onramp-15oxC79b.js} +1 -1
- package/_assets/{openzeppelin-oRjzN4zB.js → openzeppelin-BpuVaBDh.js} +1 -1
- package/_assets/{parseNft-B1VtTOpw.js → parseNft-D06uX5gG.js} +2 -2
- package/_assets/{parseSignature-D_U2MhSK.js → parseSignature-CnSs3XPr.js} +3 -3
- package/_assets/{parseSignature-CiDHU6Nz.js → parseSignature-DGgCDYUH.js} +1 -1
- package/_assets/{passkeys-C4nRLQjw.js → passkeys-B8jZMST_.js} +1 -1
- package/_assets/{pay-with-exchange-DjjSaX9l.js → pay-with-exchange-DzV0qz9m.js} +1 -1
- package/_assets/{qr-overlay-D6ySLpj4.js → qr-overlay-FhG6DCeK.js} +1 -1
- package/_assets/{receive-BmTDhzFh.js → receive-Bf8iJtVw.js} +1 -1
- package/_assets/{resolveImplementation-C8betaeH.js → resolveImplementation-DdV3P3Xk.js} +1 -1
- package/_assets/{rpc-BIRrsCrS.js → rpc-BZX60R_2.js} +1 -1
- package/_assets/{secp256k1-BKrO94JQ.js → secp256k1-BLNizqyz.js} +1 -1
- package/_assets/{secp256k1-BKzdJAUQ.js → secp256k1-BpFoXgJs.js} +1 -1
- package/_assets/{secp256k1-ChWI25jO.js → secp256k1-ChfCRMNj.js} +1 -1
- package/_assets/{send-DkppUNQD.js → send-CE26RsoC.js} +1 -1
- package/_assets/{send-batch-transaction-BT57-cdv.js → send-batch-transaction-CdcLTVn2.js} +1 -1
- package/_assets/{send-eip712-transaction-DzyYzWbO.js → send-eip712-transaction-DFbUyBnM.js} +2 -2
- package/_assets/{send-gasless-transaction-CEY__cC5.js → send-gasless-transaction-IULoS1Vn.js} +2 -2
- package/_assets/{send-transaction-BUcSoRKJ.js → send-transaction-vCrIjEYg.js} +2 -2
- package/_assets/{sendMetaTransaction-ZsFc6TYS.js → sendMetaTransaction-C5CWJOs0.js} +1 -1
- package/_assets/{sendRawTransaction-RwVbISDi.js → sendRawTransaction-BnXA-t5g.js} +3 -3
- package/_assets/{serializeTransaction-D7Ih8-j7.js → serializeTransaction-BuP136Wz.js} +1 -1
- package/_assets/{session-proposal-BDnKkUie.js → session-proposal-CnATfxsE.js} +1 -1
- package/_assets/{session-request-maNMGkDh.js → session-request-PJjSNFhP.js} +2 -2
- package/_assets/{signing-O4ufWRe8.js → signing-DVSxcG9z.js} +3 -3
- package/_assets/{skeleton.styles-B5G3DoRu.js → skeleton.styles-CLtTv572.js} +1 -1
- package/_assets/{socials-DgrJfl24.js → socials-Bf2bVkOp.js} +1 -1
- package/_assets/{styled-CzuG2SF7.js → styled-DUDTxrNz.js} +1 -1
- package/_assets/{swaps-CEuJEeBK.js → swaps-CfzGwDGN.js} +1 -1
- package/_assets/{thirdweb-CWMxyfTR.js → thirdweb-fPfEaf4k.js} +3 -3
- package/_assets/{to-serializable-transaction-eILRk2uK.js → to-serializable-transaction-DXr6jbkS.js} +2 -2
- package/_assets/{transactionReceipt-YxHkhYmR.js → transactionReceipt-eQP54mTE.js} +1 -1
- package/_assets/{transactions-DFikge11.js → transactions-CGh5C6RL.js} +1 -1
- package/_assets/{useCreditPacks-CPiiIVbF.js → useCreditPacks-CasKnCD5.js} +1 -1
- package/_assets/{useImportable-BhPYUErM.js → useImportable-SR1m5Hwh.js} +1 -1
- package/_assets/{useInfiniteGrid-DmIgZTT1.js → useInfiniteGrid-Cy1tipbK.js} +1 -1
- package/_assets/{useTheme-DnWPXYyn.js → useTheme-BvkrK9YA.js} +1 -1
- package/_assets/{verifyHash-BCo8j0IO.js → verifyHash-Bi_3pzoI.js} +1 -1
- package/_assets/{w3m-modal-Dyp8brdF.js → w3m-modal-D57uPD-0.js} +1 -1
- package/_assets/{w3m-modal-D7JdGvOC.js → w3m-modal-DAkUUjAI.js} +1 -1
- package/_assets/{wait-for-tx-receipt-ITlfousv.js → wait-for-tx-receipt-ByVNtVUa.js} +1 -1
- package/_assets/{wallets-DoMl3uKp.js → wallets-DHJBT8N-.js} +5 -5
- package/_assets/{web-connector-uCJIkgMa.js → web-connector-zzH3rfgh.js} +3 -3
- package/_assets/{writeContract-DMg_Cu_T.js → writeContract-BeuidFa5.js} +1 -1
- package/_assets/{zoraTestnet-CzhulMA0.js → zoraTestnet-D4oN56a_.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Assets-DFjWkvAj.js +0 -801
- package/_assets/LazyEmoteControls-Dsz7X5iX.js +0 -2
|
@@ -1,801 +0,0 @@
|
|
|
1
|
-
import{b as Ae,r as w,j as e,u as Ke}from"./react-BYHuwl8r.js";import{u as Je}from"./useUrlFilters-DH-gxdfV.js";import{u as Qe,S as ke,R as Xe,F as Ye,e as et}from"./categories-l2OqZN_F.js";import{c as W,r as tt,bo as nt,bp as st,aC as rt,a as it,s,t,o as Me,be as ot,A as at,L as fe,b as n,y as lt,I as T,z as A,b$ as Y,bd as ct,$ as Q,bt as dt,bs as pt,x as Ne,ap as Pe,n as We,q as ht,an as xt,ar as Se,as as D,aI as ft,bM as mt}from"./index-CpgH80QO.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 $t,m as Ct,n as kt,M as St,u as Et,E as Tt,v as _t,p as Rt,q as It,r as zt,s as At,t as Mt}from"./Assets.styles-De3LV6PK.js";import{L as Nt}from"./LoadMore-D4fnHonl.js";import{u as Pt}from"./useInfiniteGrid-DmIgZTT1.js";import{E as Wt}from"./ErrorNotice-h0GUcJEu.js";import{d as Bt}from"./dcl-schemas-CmtP3U6y.js";import{s as Ft,G as Lt,w as Ut,S as Ht}from"./buy-gasless-cVGUwJcn.js";import{s as Ot,k as Dt}from"./buy-C36PZNHt.js";import{f as Gt}from"./errors-DAy3n3Fl.js";import{J as qt,C as Vt,B as me}from"./ethers-BDpbhgX6.js";import{n as Zt}from"./Tooltip-H89dNdoQ.js";import{G as Kt}from"./grid.styles-VdW_5pS8.js";import"./skeleton.styles-B5G3DoRu.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-GLPsQqiP.js";import"./sendMetaTransaction-ZsFc6TYS.js";function G(r){const o=r.source??"item",l=r.tradeId||`${r.contractAddress}-${r.tokenId??r.itemId??""}`;return`${o}:${l}`}const B="100000000000000000000",Be=2,X=15,Jt=/^[a-zA-Z0-9]+$/;function Ee(r){const o=r.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<Be?{ok:!1,reason:"too-short"}:o.length>X?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(r){return r.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 W.chainId===Number(Bt.ChainId.MATIC_MAINNET)?Te.mainnet:Te.sepolia}async function en(r,o={}){var c;const{rpc:l,address:x}=Yt(),h=new qt(l),d=new Vt(x,Xt,h);console.info(`[names] availability check → DCLRegistrar(${x}).available("${r}") on ${l}`);const p=await d.available(r);if((c=o.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${r}" available=${p}`),p?"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(r){return rt(B,r)}async function sn(r,o,l={}){var c;const x=l.chainId??W.chainId,h=l.provider??"across",d=`${W.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${x}&provider=${h}`,p=await it(d,{method:"GET",identity:r,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 ue:new Error(`fetchNameCreditRoute ${p.status}`)}return p.json()}function rn(r,o){const l=me.from(r.availableAmount),h=me.from(B).sub(l);return{credits:[{value:r.amount,expiresAt:Number(r.expiresAt),salt:Dt(r.id)}],creditsSignatures:[r.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:B}}async function on(r,o={}){const l=tn,x=o.intervalMs??1e4,h=o.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=${r}`);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(r){const{name:o,identity:l,signer:x}=r,h=r.chainId??W.chainId,d=r.provider??"across",p=(r.beneficiary??await x.getAddress()).toLowerCase();let c=null,a=!1;console.info("[names] register start",{name:o,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,o,{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}),me.from(v.maxCreditedValue).lt(B))throw new Error("Credit under-sized for the name price");const j=rn(v.credit,u);let m;try{m=await Ft({chainId:h,buyer:p,signer:x,args:j})}catch(b){if(!(b instanceof Lt))throw b;m=await Ot(h,j,x)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Ut(m),a=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await on(m,r.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:o,buyer:p,originConfirmed:a}),f instanceof Ht)return{status:"pending",originTxHash:f.txHash};if(c&&!a&&await st(l,[c]).catch(()=>{}),f instanceof ue)throw f;const g=new Error(Gt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=f,g}}const ln=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
|
-
`,cn=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
|
-
`,re=s.hr`
|
|
73
|
-
border: 0;
|
|
74
|
-
border-top: 1px solid ${t.colors.line};
|
|
75
|
-
margin: 16px 0;
|
|
76
|
-
`,ie=s.div`
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
gap: 16px;
|
|
80
|
-
`,oe=s.div`
|
|
81
|
-
flex: none;
|
|
82
|
-
display: grid;
|
|
83
|
-
place-items: center;
|
|
84
|
-
width: 56px;
|
|
85
|
-
height: 56px;
|
|
86
|
-
border-radius: 10px;
|
|
87
|
-
background: ${t.gradients.amethyst};
|
|
88
|
-
color: ${t.colors.white};
|
|
89
|
-
|
|
90
|
-
.ico {
|
|
91
|
-
width: 30px;
|
|
92
|
-
height: 30px;
|
|
93
|
-
}
|
|
94
|
-
`,ae=s.div`
|
|
95
|
-
flex: 1;
|
|
96
|
-
min-width: 0;
|
|
97
|
-
`,le=s.div`
|
|
98
|
-
font-family: ${t.font.sans};
|
|
99
|
-
font-weight: 700;
|
|
100
|
-
font-size: 20px;
|
|
101
|
-
line-height: 1.3;
|
|
102
|
-
color: ${t.colors.text};
|
|
103
|
-
overflow: hidden;
|
|
104
|
-
text-overflow: ellipsis;
|
|
105
|
-
white-space: nowrap;
|
|
106
|
-
|
|
107
|
-
span {
|
|
108
|
-
font-weight: 400;
|
|
109
|
-
color: ${t.colors.muted2};
|
|
110
|
-
}
|
|
111
|
-
`,ce=s.div`
|
|
112
|
-
font-family: ${t.font.sans};
|
|
113
|
-
font-size: 14px;
|
|
114
|
-
color: ${t.colors.muted2};
|
|
115
|
-
`,de=s.div`
|
|
116
|
-
flex: none;
|
|
117
|
-
display: flex;
|
|
118
|
-
align-items: center;
|
|
119
|
-
gap: 6px;
|
|
120
|
-
font-family: ${t.font.sans};
|
|
121
|
-
font-weight: 600;
|
|
122
|
-
font-size: 24px;
|
|
123
|
-
color: ${t.colors.text};
|
|
124
|
-
|
|
125
|
-
.ico {
|
|
126
|
-
width: 22px;
|
|
127
|
-
height: 22px;
|
|
128
|
-
color: ${t.colors.brandViolet};
|
|
129
|
-
}
|
|
130
|
-
`,dn=s.div`
|
|
131
|
-
margin-top: 16px;
|
|
132
|
-
padding: 16px;
|
|
133
|
-
border-radius: 12px;
|
|
134
|
-
background: #f2e7fc;
|
|
135
|
-
`,pn=s.div`
|
|
136
|
-
font-family: ${t.font.sans};
|
|
137
|
-
font-weight: 700;
|
|
138
|
-
font-size: 16px;
|
|
139
|
-
color: ${t.colors.text};
|
|
140
|
-
`,hn=s.p`
|
|
141
|
-
margin: 8px 0 16px;
|
|
142
|
-
font-family: ${t.font.sans};
|
|
143
|
-
font-size: 14px;
|
|
144
|
-
line-height: 1.5;
|
|
145
|
-
color: ${t.colors.text2};
|
|
146
|
-
|
|
147
|
-
b {
|
|
148
|
-
font-weight: 700;
|
|
149
|
-
color: ${t.colors.brandViolet};
|
|
150
|
-
}
|
|
151
|
-
`,xn=s.label`
|
|
152
|
-
display: flex;
|
|
153
|
-
align-items: center;
|
|
154
|
-
gap: 8px;
|
|
155
|
-
padding: 12px 14px;
|
|
156
|
-
background: ${t.colors.white};
|
|
157
|
-
border: 1px solid ${t.colors.text};
|
|
158
|
-
border-radius: 10px;
|
|
159
|
-
cursor: text;
|
|
160
|
-
|
|
161
|
-
&:focus-within {
|
|
162
|
-
border-color: ${t.colors.magenta};
|
|
163
|
-
}
|
|
164
|
-
`,fn=s.span`
|
|
165
|
-
flex: none;
|
|
166
|
-
font-family: ${t.font.sans};
|
|
167
|
-
font-size: 18px;
|
|
168
|
-
color: ${t.colors.muted2};
|
|
169
|
-
`,mn=s.input`
|
|
170
|
-
flex: 0 1 auto;
|
|
171
|
-
min-width: 0;
|
|
172
|
-
border: 0;
|
|
173
|
-
outline: none;
|
|
174
|
-
background: transparent;
|
|
175
|
-
font-family: ${t.font.sans};
|
|
176
|
-
font-size: 16px;
|
|
177
|
-
font-weight: 600;
|
|
178
|
-
color: ${t.colors.text};
|
|
179
|
-
|
|
180
|
-
&::placeholder {
|
|
181
|
-
color: ${t.colors.muted2};
|
|
182
|
-
font-weight: 400;
|
|
183
|
-
}
|
|
184
|
-
`,un=s.span`
|
|
185
|
-
flex: none;
|
|
186
|
-
font-family: ${t.font.sans};
|
|
187
|
-
font-size: 16px;
|
|
188
|
-
color: ${t.colors.muted2};
|
|
189
|
-
`,_e=s.button`
|
|
190
|
-
margin-top: 16px;
|
|
191
|
-
width: 100%;
|
|
192
|
-
height: 52px;
|
|
193
|
-
border: 0;
|
|
194
|
-
border-radius: 12px;
|
|
195
|
-
cursor: pointer;
|
|
196
|
-
background: ${t.gradients.amethyst};
|
|
197
|
-
color: ${t.colors.softWhite};
|
|
198
|
-
font-family: ${t.font.sans};
|
|
199
|
-
font-weight: 600;
|
|
200
|
-
font-size: 15px;
|
|
201
|
-
letter-spacing: 0.46px;
|
|
202
|
-
text-transform: uppercase;
|
|
203
|
-
|
|
204
|
-
&:hover:not(:disabled) {
|
|
205
|
-
filter: brightness(1.06);
|
|
206
|
-
}
|
|
207
|
-
&:focus-visible {
|
|
208
|
-
outline: 2px solid ${t.colors.accent};
|
|
209
|
-
outline-offset: 2px;
|
|
210
|
-
}
|
|
211
|
-
&:disabled {
|
|
212
|
-
cursor: not-allowed;
|
|
213
|
-
background: #ddc7ec;
|
|
214
|
-
color: #f4ecfa;
|
|
215
|
-
}
|
|
216
|
-
`,gn=s.div`
|
|
217
|
-
display: flex;
|
|
218
|
-
flex-direction: column;
|
|
219
|
-
align-items: flex-start;
|
|
220
|
-
gap: 20px;
|
|
221
|
-
padding: 32px 0 8px;
|
|
222
|
-
`,bn=s.img`
|
|
223
|
-
align-self: center;
|
|
224
|
-
width: 56px;
|
|
225
|
-
height: 56px;
|
|
226
|
-
`,yn=s.div`
|
|
227
|
-
font-family: ${t.font.sans};
|
|
228
|
-
font-weight: 700;
|
|
229
|
-
font-size: 18px;
|
|
230
|
-
color: ${t.colors.text};
|
|
231
|
-
`,wn=s.div`
|
|
232
|
-
display: flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
gap: 12px;
|
|
235
|
-
width: 100%;
|
|
236
|
-
`,jn=s.div`
|
|
237
|
-
flex: 1;
|
|
238
|
-
height: 8px;
|
|
239
|
-
border-radius: 999px;
|
|
240
|
-
background: ${t.colors.chip};
|
|
241
|
-
overflow: hidden;
|
|
242
|
-
|
|
243
|
-
span {
|
|
244
|
-
display: block;
|
|
245
|
-
height: 100%;
|
|
246
|
-
width: 40%;
|
|
247
|
-
border-radius: 999px;
|
|
248
|
-
background: ${t.gradients.amethyst};
|
|
249
|
-
animation: nameProgress 1.1s ease-in-out infinite;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
@keyframes nameProgress {
|
|
253
|
-
0% {
|
|
254
|
-
transform: translateX(-100%);
|
|
255
|
-
}
|
|
256
|
-
100% {
|
|
257
|
-
transform: translateX(320%);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
`,vn=s.span`
|
|
261
|
-
flex: none;
|
|
262
|
-
font-family: ${t.font.sans};
|
|
263
|
-
font-size: 14px;
|
|
264
|
-
color: ${t.colors.muted};
|
|
265
|
-
`,$n=s.div`
|
|
266
|
-
display: flex;
|
|
267
|
-
flex-direction: column;
|
|
268
|
-
align-items: center;
|
|
269
|
-
gap: 16px;
|
|
270
|
-
padding: 24px;
|
|
271
|
-
border-radius: 12px;
|
|
272
|
-
background: #e2f5ea;
|
|
273
|
-
text-align: center;
|
|
274
|
-
`,Cn=s.div`
|
|
275
|
-
display: grid;
|
|
276
|
-
place-items: center;
|
|
277
|
-
width: 56px;
|
|
278
|
-
height: 56px;
|
|
279
|
-
border-radius: 50%;
|
|
280
|
-
background: ${t.colors.ok};
|
|
281
|
-
color: ${t.colors.white};
|
|
282
|
-
|
|
283
|
-
.ico {
|
|
284
|
-
width: 30px;
|
|
285
|
-
height: 30px;
|
|
286
|
-
}
|
|
287
|
-
`,kn=s.p`
|
|
288
|
-
margin: 0;
|
|
289
|
-
font-family: ${t.font.sans};
|
|
290
|
-
font-size: 16px;
|
|
291
|
-
line-height: 1.4;
|
|
292
|
-
color: ${t.colors.text};
|
|
293
|
-
|
|
294
|
-
b {
|
|
295
|
-
font-weight: 700;
|
|
296
|
-
}
|
|
297
|
-
`,Re=s.div`
|
|
298
|
-
display: flex;
|
|
299
|
-
gap: 16px;
|
|
300
|
-
margin-top: 20px;
|
|
301
|
-
|
|
302
|
-
${t.media.maxWidth("mobile")} {
|
|
303
|
-
flex-direction: column;
|
|
304
|
-
}
|
|
305
|
-
`,Ie=s.button`
|
|
306
|
-
flex: 1;
|
|
307
|
-
height: 48px;
|
|
308
|
-
border: 1px solid ${t.colors.accent};
|
|
309
|
-
border-radius: 8px;
|
|
310
|
-
background: ${t.colors.white};
|
|
311
|
-
color: ${t.colors.accent};
|
|
312
|
-
cursor: pointer;
|
|
313
|
-
font-family: ${t.font.sans};
|
|
314
|
-
font-weight: 600;
|
|
315
|
-
font-size: 13px;
|
|
316
|
-
letter-spacing: 0.46px;
|
|
317
|
-
text-transform: uppercase;
|
|
318
|
-
|
|
319
|
-
&:hover {
|
|
320
|
-
background: rgba(105, 31, 169, 0.06);
|
|
321
|
-
}
|
|
322
|
-
&:focus-visible {
|
|
323
|
-
outline: 2px solid ${t.colors.accent};
|
|
324
|
-
outline-offset: 2px;
|
|
325
|
-
}
|
|
326
|
-
`,Sn=s.a`
|
|
327
|
-
flex: 1;
|
|
328
|
-
display: inline-flex;
|
|
329
|
-
align-items: center;
|
|
330
|
-
justify-content: center;
|
|
331
|
-
height: 48px;
|
|
332
|
-
border-radius: 8px;
|
|
333
|
-
background: ${t.colors.dclRed};
|
|
334
|
-
color: ${t.colors.softWhite};
|
|
335
|
-
cursor: pointer;
|
|
336
|
-
text-decoration: none;
|
|
337
|
-
font-family: ${t.font.sans};
|
|
338
|
-
font-weight: 600;
|
|
339
|
-
font-size: 13px;
|
|
340
|
-
letter-spacing: 0.46px;
|
|
341
|
-
text-transform: uppercase;
|
|
342
|
-
|
|
343
|
-
&:hover {
|
|
344
|
-
filter: brightness(1.05);
|
|
345
|
-
}
|
|
346
|
-
&:focus-visible {
|
|
347
|
-
outline: 2px solid ${t.colors.accent};
|
|
348
|
-
outline-offset: 2px;
|
|
349
|
-
}
|
|
350
|
-
`,pe=s.div`
|
|
351
|
-
display: flex;
|
|
352
|
-
align-items: flex-start;
|
|
353
|
-
gap: 12px;
|
|
354
|
-
padding: 16px;
|
|
355
|
-
margin-top: 8px;
|
|
356
|
-
border-radius: 12px;
|
|
357
|
-
background: rgba(255, 45, 85, 0.1);
|
|
358
|
-
font-family: ${t.font.sans};
|
|
359
|
-
font-size: 14px;
|
|
360
|
-
line-height: 1.5;
|
|
361
|
-
color: ${t.colors.text};
|
|
362
|
-
|
|
363
|
-
.ico {
|
|
364
|
-
width: 22px;
|
|
365
|
-
height: 22px;
|
|
366
|
-
flex: none;
|
|
367
|
-
color: ${t.colors.dclRed};
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
|
|
372
|
-
* reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
|
|
373
|
-
* all of which would contradict themselves rendered in the red error treatment.
|
|
374
|
-
*/
|
|
375
|
-
&[data-tone='info'] {
|
|
376
|
-
background: ${t.colors.panel};
|
|
377
|
-
|
|
378
|
-
.ico {
|
|
379
|
-
color: ${t.colors.accent};
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
`;function En({name:r,priceCredits:o,onClose:l}){const{session:x}=Me(),{data:h,isError:d}=ot(x),p=at(),c=Ae(),[a,f]=w.useState("confirm"),[g,u]=w.useState(""),[v,j]=w.useState(null),m=w.useRef(!1),b=g.trim().toLowerCase()===r.toLowerCase(),$=a==="completing",C=o!=null?fe(o):"—",k=o==null,E=h==null?void 0:h.credits,M=o!=null&&E!=null?o-E:0,S=M>0,N=k?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:fe(M)}):null;w.useEffect(()=>{const y=R=>{R.key==="Escape"&&!$&&l()};document.addEventListener("keydown",y);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=_}},[$,l]);async function F(){if(!(!x||!b||k||S||m.current)){m.current=!0,f("completing"),j(null);try{const y=await an({name:r,identity:x.identity,signer:x.signer});Q("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),p.invalidateQueries({queryKey:["usd-balance"]}),p.invalidateQueries({queryKey:["my-assets"]}),f(y.status==="registered"?"success":"pending")}catch(y){Q(pt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:dt(y),purchase_type:"name"}),j(y instanceof ue?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),f("error")}finally{m.current=!1}}}const L=a!=="success"&&a!=="pending",I=lt(x==null?void 0:x.providerType);return e.jsx(ln,{onClick:$?void 0:l,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[L&&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:$,"aria-label":n("buyModal.close"),children:e.jsx(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{})]}),(a==="confirm"||a==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),a==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(pe,{children:[e.jsx(T,{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(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Tn(r)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{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(un,{children:".dcl.eth"})]})]}),N?e.jsxs(pe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(T,{name:"info","aria-hidden":!0}),e.jsx("span",{children:N})]}):null,e.jsx(_e,{onClick:()=>void F(),disabled:!b||!x||k||S,children:n("names.buyCta")})]})]}),a==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ct,alt:"",width:56,height:56}),e.jsx(yn,{children:I?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),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(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs(pe,{"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(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsx(Re,{children:e.jsx(Ie,{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(T,{name:"close"})})]}),e.jsxs(se,{children:[n("names.myCreditsBalance")," ",e.jsx(A,{})," ",Y(h,d)]}),e.jsx(re,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(T,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(ie,{style:{marginTop:20},children:[e.jsx(oe,{"aria-hidden":!0,children:"@"}),e.jsxs(ae,{children:[e.jsxs(le,{children:[r,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ce,{children:n("names.subtitle")})]}),e.jsxs(de,{children:[e.jsx(A,{}),C]})]}),e.jsxs(Re,{children:[e.jsx(Ie,{onClick:()=>{l(),c("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:W.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Tn(r){return r.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/1.0.2-31053112537.commit-2eeb02b/_assets/identity-B4DXDuJP.webp",Rn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31053112537.commit-2eeb02b/_assets/world-B-9aPlxu.webp",In="https://cdn.decentraland.org/@dcl/shop/1.0.2-31053112537.commit-2eeb02b/_assets/invite-BfwIhP2C.webp",zn="https://cdn.decentraland.org/@dcl/shop/1.0.2-31053112537.commit-2eeb02b/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
|
-
width: 100%;
|
|
384
|
-
min-width: 0;
|
|
385
|
-
`,Mn=s.nav`
|
|
386
|
-
display: flex;
|
|
387
|
-
align-items: center;
|
|
388
|
-
gap: 6px;
|
|
389
|
-
margin: 4px 0 16px;
|
|
390
|
-
font-family: ${t.font.sans};
|
|
391
|
-
font-size: 12px;
|
|
392
|
-
line-height: 1;
|
|
393
|
-
color: ${t.colors.muted};
|
|
394
|
-
`,Nn=s.button`
|
|
395
|
-
border: 0;
|
|
396
|
-
background: none;
|
|
397
|
-
padding: 0;
|
|
398
|
-
cursor: pointer;
|
|
399
|
-
font: inherit;
|
|
400
|
-
color: ${t.colors.muted};
|
|
401
|
-
|
|
402
|
-
&:hover {
|
|
403
|
-
text-decoration: underline;
|
|
404
|
-
}
|
|
405
|
-
&:focus-visible {
|
|
406
|
-
outline: 2px solid ${t.colors.accent};
|
|
407
|
-
outline-offset: 2px;
|
|
408
|
-
}
|
|
409
|
-
`,Pn=s.span`
|
|
410
|
-
font-weight: 700;
|
|
411
|
-
color: ${t.colors.muted};
|
|
412
|
-
`,Wn=s.div`
|
|
413
|
-
display: flex;
|
|
414
|
-
flex-direction: column;
|
|
415
|
-
gap: 48px;
|
|
416
|
-
padding-bottom: 48px;
|
|
417
|
-
background: #ecdbfd;
|
|
418
|
-
border-radius: ${t.radius.banner};
|
|
419
|
-
overflow: hidden;
|
|
420
|
-
|
|
421
|
-
${t.media.maxWidth("mobile")} {
|
|
422
|
-
gap: 32px;
|
|
423
|
-
padding-bottom: 32px;
|
|
424
|
-
}
|
|
425
|
-
`,Bn=s.div`
|
|
426
|
-
position: relative;
|
|
427
|
-
border-radius: ${t.radius.banner};
|
|
428
|
-
overflow: hidden;
|
|
429
|
-
padding: 88px 48px;
|
|
430
|
-
display: flex;
|
|
431
|
-
flex-direction: column;
|
|
432
|
-
align-items: center;
|
|
433
|
-
gap: 48px;
|
|
434
|
-
text-align: center;
|
|
435
|
-
background: radial-gradient(120% 95% at 50% 118%, #d13bd6 0%, #a026b0 28%, #6a1b9c 58%, #4a1173 100%);
|
|
436
|
-
|
|
437
|
-
${t.media.maxWidth("mobile")} {
|
|
438
|
-
padding: 40px 20px;
|
|
439
|
-
gap: 28px;
|
|
440
|
-
}
|
|
441
|
-
`,Fn=s.div`
|
|
442
|
-
display: flex;
|
|
443
|
-
flex-direction: column;
|
|
444
|
-
align-items: center;
|
|
445
|
-
gap: 12px;
|
|
446
|
-
`,Ln=s.h1`
|
|
447
|
-
margin: 0;
|
|
448
|
-
font-family: ${t.font.sans};
|
|
449
|
-
font-weight: 600;
|
|
450
|
-
font-size: 40px;
|
|
451
|
-
line-height: 1.167;
|
|
452
|
-
color: ${t.colors.white};
|
|
453
|
-
|
|
454
|
-
${t.media.maxWidth("mobile")} {
|
|
455
|
-
font-size: 26px;
|
|
456
|
-
}
|
|
457
|
-
`,Un=s.p`
|
|
458
|
-
margin: 0;
|
|
459
|
-
max-width: 760px;
|
|
460
|
-
font-family: ${t.font.sans};
|
|
461
|
-
font-weight: 500;
|
|
462
|
-
font-size: 24px;
|
|
463
|
-
line-height: 1.334;
|
|
464
|
-
color: #ecebed;
|
|
465
|
-
|
|
466
|
-
${t.media.maxWidth("mobile")} {
|
|
467
|
-
font-size: 16px;
|
|
468
|
-
}
|
|
469
|
-
`,Hn=s.div`
|
|
470
|
-
width: min(785px, 100%);
|
|
471
|
-
display: flex;
|
|
472
|
-
flex-direction: column;
|
|
473
|
-
gap: 12px;
|
|
474
|
-
`,On=s.div`
|
|
475
|
-
position: relative;
|
|
476
|
-
`,Dn=s("div",Zt("invalid"))`
|
|
477
|
-
display: flex;
|
|
478
|
-
align-items: center;
|
|
479
|
-
gap: 8px;
|
|
480
|
-
padding: 8px 8px 8px 16px;
|
|
481
|
-
background: ${t.colors.softWhite};
|
|
482
|
-
border: 1.5px solid ${({invalid:r})=>r?t.colors.dclRed:t.colors.line};
|
|
483
|
-
border-radius: 20px;
|
|
484
|
-
|
|
485
|
-
&:focus-within {
|
|
486
|
-
border-color: ${({invalid:r})=>r?t.colors.dclRed:t.colors.magenta};
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
${t.media.maxWidth("mobile")} {
|
|
490
|
-
border-radius: 16px;
|
|
491
|
-
}
|
|
492
|
-
`,Gn=s.span`
|
|
493
|
-
position: absolute;
|
|
494
|
-
left: -9999px;
|
|
495
|
-
top: 0;
|
|
496
|
-
visibility: hidden;
|
|
497
|
-
pointer-events: none;
|
|
498
|
-
white-space: pre;
|
|
499
|
-
font-family: ${t.font.sans};
|
|
500
|
-
font-size: 20px;
|
|
501
|
-
font-weight: 600;
|
|
502
|
-
line-height: 1.6;
|
|
503
|
-
|
|
504
|
-
${t.media.maxWidth("mobile")} {
|
|
505
|
-
font-size: 16px;
|
|
506
|
-
}
|
|
507
|
-
`,qn=s.div`
|
|
508
|
-
position: absolute;
|
|
509
|
-
top: calc(100% + 8px);
|
|
510
|
-
left: 0;
|
|
511
|
-
right: 0;
|
|
512
|
-
z-index: 2;
|
|
513
|
-
display: flex;
|
|
514
|
-
align-items: center;
|
|
515
|
-
gap: 8px;
|
|
516
|
-
padding: 8px 12px;
|
|
517
|
-
border-radius: 8px;
|
|
518
|
-
background: #ffcdd4;
|
|
519
|
-
color: #ec303a;
|
|
520
|
-
font-family: ${t.font.sans};
|
|
521
|
-
font-size: 14px;
|
|
522
|
-
font-weight: 500;
|
|
523
|
-
line-height: 1.2;
|
|
524
|
-
text-align: left;
|
|
525
|
-
|
|
526
|
-
${t.media.maxWidth("mobile")} {
|
|
527
|
-
position: static;
|
|
528
|
-
margin-top: 8px;
|
|
529
|
-
align-items: flex-start;
|
|
530
|
-
flex-wrap: wrap;
|
|
531
|
-
}
|
|
532
|
-
`,Vn=s.a`
|
|
533
|
-
display: inline-flex;
|
|
534
|
-
align-items: center;
|
|
535
|
-
gap: 2px;
|
|
536
|
-
margin-left: auto;
|
|
537
|
-
color: #ec303a;
|
|
538
|
-
font-weight: 600;
|
|
539
|
-
text-decoration: underline;
|
|
540
|
-
text-transform: uppercase;
|
|
541
|
-
white-space: nowrap;
|
|
542
|
-
|
|
543
|
-
${t.media.maxWidth("mobile")} {
|
|
544
|
-
margin-left: 0;
|
|
545
|
-
}
|
|
546
|
-
`,Zn=s.label`
|
|
547
|
-
flex: 1;
|
|
548
|
-
min-width: 0;
|
|
549
|
-
display: flex;
|
|
550
|
-
align-items: center;
|
|
551
|
-
gap: 0;
|
|
552
|
-
cursor: text;
|
|
553
|
-
overflow: hidden;
|
|
554
|
-
`,Kn=s.span`
|
|
555
|
-
flex: none;
|
|
556
|
-
margin-right: 8px;
|
|
557
|
-
font-family: ${t.font.sans};
|
|
558
|
-
font-size: 26px;
|
|
559
|
-
font-weight: 500;
|
|
560
|
-
line-height: 1;
|
|
561
|
-
color: ${t.colors.muted2};
|
|
562
|
-
|
|
563
|
-
${t.media.maxWidth("mobile")} {
|
|
564
|
-
font-size: 20px;
|
|
565
|
-
}
|
|
566
|
-
`,Jn=s.input`
|
|
567
|
-
flex: 0 1 auto;
|
|
568
|
-
min-width: 0;
|
|
569
|
-
max-width: 100%;
|
|
570
|
-
border: 0;
|
|
571
|
-
outline: none;
|
|
572
|
-
background: transparent;
|
|
573
|
-
font-family: ${t.font.sans};
|
|
574
|
-
font-size: 20px;
|
|
575
|
-
font-weight: 600;
|
|
576
|
-
line-height: 1.6;
|
|
577
|
-
color: ${t.colors.text};
|
|
578
|
-
padding: 0;
|
|
579
|
-
|
|
580
|
-
&::placeholder {
|
|
581
|
-
color: ${t.colors.muted1};
|
|
582
|
-
font-weight: 400;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
${t.media.maxWidth("mobile")} {
|
|
586
|
-
font-size: 16px;
|
|
587
|
-
}
|
|
588
|
-
`,Qn=s.span`
|
|
589
|
-
flex: none;
|
|
590
|
-
margin-left: 2px;
|
|
591
|
-
font-family: ${t.font.sans};
|
|
592
|
-
font-size: 20px;
|
|
593
|
-
font-weight: 400;
|
|
594
|
-
line-height: 1.6;
|
|
595
|
-
color: ${t.colors.muted1};
|
|
596
|
-
|
|
597
|
-
${t.media.maxWidth("mobile")} {
|
|
598
|
-
font-size: 16px;
|
|
599
|
-
}
|
|
600
|
-
`,Xn=s.span`
|
|
601
|
-
flex: none;
|
|
602
|
-
font-family: ${t.font.sans};
|
|
603
|
-
font-size: 13px;
|
|
604
|
-
color: ${t.colors.muted2};
|
|
605
|
-
white-space: nowrap;
|
|
606
|
-
`,Fe=s.button`
|
|
607
|
-
flex: none;
|
|
608
|
-
display: inline-flex;
|
|
609
|
-
align-items: center;
|
|
610
|
-
justify-content: center;
|
|
611
|
-
gap: 8px;
|
|
612
|
-
height: 52px;
|
|
613
|
-
padding: 0 24px;
|
|
614
|
-
border: 0;
|
|
615
|
-
border-radius: 12px;
|
|
616
|
-
cursor: pointer;
|
|
617
|
-
background: ${t.gradients.cerise};
|
|
618
|
-
color: ${t.colors.softWhite};
|
|
619
|
-
font-family: ${t.font.sans};
|
|
620
|
-
font-weight: 600;
|
|
621
|
-
font-size: 15px;
|
|
622
|
-
letter-spacing: 0.46px;
|
|
623
|
-
line-height: 24px;
|
|
624
|
-
text-transform: uppercase;
|
|
625
|
-
|
|
626
|
-
&:hover:not(:disabled) {
|
|
627
|
-
filter: brightness(1.05);
|
|
628
|
-
}
|
|
629
|
-
&:focus-visible {
|
|
630
|
-
outline: 2px solid ${t.colors.white};
|
|
631
|
-
outline-offset: 2px;
|
|
632
|
-
}
|
|
633
|
-
&:disabled {
|
|
634
|
-
cursor: not-allowed;
|
|
635
|
-
background: #e7c8e9;
|
|
636
|
-
color: #fbe9fb;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
${t.media.maxWidth("mobile")} {
|
|
640
|
-
display: none;
|
|
641
|
-
}
|
|
642
|
-
`,Yn=s(Fe)`
|
|
643
|
-
display: none;
|
|
644
|
-
|
|
645
|
-
${t.media.maxWidth("mobile")} {
|
|
646
|
-
display: inline-flex;
|
|
647
|
-
width: 100%;
|
|
648
|
-
height: 48px;
|
|
649
|
-
border-radius: 12px;
|
|
650
|
-
}
|
|
651
|
-
`,es=s.span`
|
|
652
|
-
display: inline-flex;
|
|
653
|
-
align-items: center;
|
|
654
|
-
gap: 4px;
|
|
655
|
-
font-weight: 600;
|
|
656
|
-
|
|
657
|
-
.ico {
|
|
658
|
-
width: 16px;
|
|
659
|
-
height: 16px;
|
|
660
|
-
}
|
|
661
|
-
`,he=s.div`
|
|
662
|
-
display: flex;
|
|
663
|
-
align-items: center;
|
|
664
|
-
gap: 8px;
|
|
665
|
-
padding: 8px 14px;
|
|
666
|
-
border-radius: 8px;
|
|
667
|
-
font-family: ${t.font.sans};
|
|
668
|
-
font-size: 13px;
|
|
669
|
-
font-weight: 500;
|
|
670
|
-
text-align: left;
|
|
671
|
-
|
|
672
|
-
background: ${({tone:r})=>r==="error"?"rgba(255, 45, 85, 0.12)":r==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
|
|
673
|
-
color: ${({tone:r})=>r==="error"?t.colors.dclRed:r==="ok"?"#0f7a4f":"#ecebed"};
|
|
674
|
-
|
|
675
|
-
.ico {
|
|
676
|
-
width: 16px;
|
|
677
|
-
height: 16px;
|
|
678
|
-
flex: none;
|
|
679
|
-
}
|
|
680
|
-
`,ts=s.section`
|
|
681
|
-
display: flex;
|
|
682
|
-
flex-direction: column;
|
|
683
|
-
gap: 48px;
|
|
684
|
-
padding: 0 48px;
|
|
685
|
-
|
|
686
|
-
${t.media.maxWidth("mobile")} {
|
|
687
|
-
gap: 32px;
|
|
688
|
-
padding: 0 20px;
|
|
689
|
-
}
|
|
690
|
-
`,ns=s.div`
|
|
691
|
-
display: flex;
|
|
692
|
-
flex-direction: column;
|
|
693
|
-
align-items: center;
|
|
694
|
-
gap: 24px;
|
|
695
|
-
`,ss=s.h2`
|
|
696
|
-
margin: 0;
|
|
697
|
-
text-align: center;
|
|
698
|
-
font-family: ${t.font.sans};
|
|
699
|
-
font-weight: 600;
|
|
700
|
-
font-size: 32px;
|
|
701
|
-
line-height: 1.167;
|
|
702
|
-
color: ${t.colors.text2};
|
|
703
|
-
|
|
704
|
-
${t.media.maxWidth("mobile")} {
|
|
705
|
-
font-size: 22px;
|
|
706
|
-
}
|
|
707
|
-
`,rs=s.p`
|
|
708
|
-
margin: 0;
|
|
709
|
-
max-width: 907px;
|
|
710
|
-
text-align: center;
|
|
711
|
-
font-family: ${t.font.sans};
|
|
712
|
-
font-weight: 400;
|
|
713
|
-
font-size: 20px;
|
|
714
|
-
line-height: 1.57;
|
|
715
|
-
color: ${t.colors.text};
|
|
716
|
-
|
|
717
|
-
${t.media.maxWidth("mobile")} {
|
|
718
|
-
font-size: 16px;
|
|
719
|
-
}
|
|
720
|
-
`,is=s.div`
|
|
721
|
-
display: grid;
|
|
722
|
-
grid-template-columns: repeat(4, 1fr);
|
|
723
|
-
gap: 24px;
|
|
724
|
-
align-items: stretch;
|
|
725
|
-
|
|
726
|
-
${t.media.maxWidth("lg")} {
|
|
727
|
-
grid-template-columns: repeat(2, 1fr);
|
|
728
|
-
}
|
|
729
|
-
${t.media.maxWidth("mobile")} {
|
|
730
|
-
grid-template-columns: 1fr;
|
|
731
|
-
}
|
|
732
|
-
`,q=s.article`
|
|
733
|
-
min-width: 0;
|
|
734
|
-
display: flex;
|
|
735
|
-
flex-direction: column;
|
|
736
|
-
background: ${t.colors.white};
|
|
737
|
-
border: 0.25px solid ${t.colors.muted2};
|
|
738
|
-
border-radius: ${t.radius.card};
|
|
739
|
-
overflow: hidden;
|
|
740
|
-
`,V=s.img`
|
|
741
|
-
display: block;
|
|
742
|
-
width: calc(100% + 0.5px);
|
|
743
|
-
margin: -0.25px -0.25px 0;
|
|
744
|
-
aspect-ratio: 388 / 235;
|
|
745
|
-
object-fit: cover;
|
|
746
|
-
`,Z=s.div`
|
|
747
|
-
flex: 1;
|
|
748
|
-
display: flex;
|
|
749
|
-
flex-direction: column;
|
|
750
|
-
gap: 6px;
|
|
751
|
-
padding: 12px 16px;
|
|
752
|
-
`,K=s.h3`
|
|
753
|
-
margin: 0;
|
|
754
|
-
font-family: ${t.font.sans};
|
|
755
|
-
font-weight: 700;
|
|
756
|
-
font-size: 20px;
|
|
757
|
-
line-height: 1.57;
|
|
758
|
-
text-transform: uppercase;
|
|
759
|
-
color: ${t.colors.text};
|
|
760
|
-
`,J=s.p`
|
|
761
|
-
margin: 0;
|
|
762
|
-
font-family: ${t.font.sans};
|
|
763
|
-
font-weight: 400;
|
|
764
|
-
font-size: 14px;
|
|
765
|
-
line-height: 1.57;
|
|
766
|
-
color: ${t.colors.text};
|
|
767
|
-
`,os=s.span`
|
|
768
|
-
font-weight: 600;
|
|
769
|
-
color: ${t.colors.accent};
|
|
770
|
-
`,ze=s.a`
|
|
771
|
-
display: inline-flex;
|
|
772
|
-
align-items: center;
|
|
773
|
-
gap: 2px;
|
|
774
|
-
margin-top: auto;
|
|
775
|
-
font-family: ${t.font.sans};
|
|
776
|
-
font-weight: 500;
|
|
777
|
-
font-size: 14px;
|
|
778
|
-
line-height: 30px;
|
|
779
|
-
color: ${t.colors.accent};
|
|
780
|
-
text-decoration: underline;
|
|
781
|
-
|
|
782
|
-
&:focus-visible {
|
|
783
|
-
outline: 2px solid ${t.colors.accent};
|
|
784
|
-
outline-offset: 2px;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
.ico {
|
|
788
|
-
width: 13px;
|
|
789
|
-
height: 13px;
|
|
790
|
-
}
|
|
791
|
-
`,as=s.span`
|
|
792
|
-
position: absolute;
|
|
793
|
-
width: 1px;
|
|
794
|
-
height: 1px;
|
|
795
|
-
padding: 0;
|
|
796
|
-
margin: -1px;
|
|
797
|
-
overflow: hidden;
|
|
798
|
-
clip: rect(0, 0, 0, 0);
|
|
799
|
-
white-space: nowrap;
|
|
800
|
-
border: 0;
|
|
801
|
-
`,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(r){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(r)}`}function ps({onBack:r}){Ne({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:l}=Me(),{data:x}=Pe(),h=x?We(B,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(!Ee(d).ok){a(d.length===0?"idle":"invalid");return}a("checking");const E=new AbortController,M=setTimeout(()=>{(async()=>{try{const S=await en(d,{signal:E.signal});a(S)}catch(S){if((S==null?void 0:S.name)==="AbortError")return;a("error")}})()},400);return()=>{clearTimeout(M),E.abort()}},[d]);const m=Ee(d),b=m.ok&&(c==="available"||c==="error");function $(){if(b){if(!o){l();return}g(!0)}}const C=e.jsxs(e.Fragment,{children:[n("names.claim"),h!=null?e.jsxs(es,{children:[e.jsx(A,{}),fe(h)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Mn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:r,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Dn,{invalid:c==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:k=>p(Qt(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(Gn,{ref:u,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",X]}):null,e.jsx(Fe,{onClick:$,disabled:!b,"data-testid":"names-claim",children:C})]}),c==="taken"?e.jsxs(qn,{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(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(T,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:$,disabled:!b,children:C}),c==="checking"?e.jsx(he,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):c==="error"?e.jsx(he,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(he,{tone:"muted",role:"status",children:n("names.tooShort",{min:Be})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(rs,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(q,{children:[e.jsx(V,{src:_n,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why1Title")}),e.jsx(J,{children:n("names.why1")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:Rn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why2Title")}),e.jsxs(J,{children:[n("names.why2")," ",e.jsx(os,{children:n("names.why2Address")})]}),e.jsxs(ze,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:In,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why3Title")}),e.jsx(J,{children:n("names.why3")})]})]}),e.jsxs(q,{children:[e.jsx(V,{src:zn,alt:""}),e.jsxs(Z,{children:[e.jsx(K,{children:n("names.why4Title")}),e.jsx(J,{children:n("names.why4")}),e.jsxs(ze,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(T,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(En,{name:d,priceCredits:h,onClose:()=>g(!1)}):null]})}const hs="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",xe=48,xs=["all","on_sale","not_for_sale"];function Ms(){const[r]=Ke(),o=Ae(),l=(r.get("q")??"").trim().toLowerCase(),x=(r.get("q")??"").trim();Ne({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]=Je(h),{subCategory:c,rarities:a,priceMin:f,priceMax:g,smart:u,sort:v}=d,j=d.category,m=xs.includes(d.status)?d.status:"on_sale";Qe(`${j}:${c??""}`);const[b,$]=w.useState(!1);w.useEffect(()=>{if(!b)return;const i=O=>{O.key==="Escape"&&$(!1)};document.addEventListener("keydown",i);const z=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=z}},[b]);const C=m==="on_sale",k=f&&!Number.isNaN(Number(f))?Number(f):void 0,E=g&&!Number.isNaN(Number(g))?Number(g):void 0,M=ht(),S=c?et[c]:void 0,N=(ke.find(i=>i.key===v)??ke[0]).server,F={category:j,rarities:a.length?a:void 0,wearableCategories:S,minPriceCredits:k,maxPriceCredits:E,search:l||void 0,sortBy:N,isSmart:u||void 0,onSale:!0,listingType:M?void 0:"primary"},L={category:j,rarities:a.length?a:void 0,wearableCategories:S,search:l||void 0,sortBy:N,isWearableSmart:u||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:I,total:y,isLoading:_,isPlaceholderData:R,error:ge,hasNextPage:Le,isFetchingNextPage:be,isFetchNextPageError:Ue,fetchNextPage:He}=Pt(C?["shop-items",F]:["catalog-items",L],i=>C?ft({...F,first:xe,skip:i}):mt({...L,first:xe,skip:i}),{enabled:j!=="names"}),U=y,{data:ye,isError:Oe,isPending:De}=Pe(),Ge=i=>ye&&i.manaWei?We(i.manaWei,ye):null,qe=C&&De&&I.some(i=>i.source==="legacy"),we=_||R||qe,Ve=_?15:Math.min(Math.max(I.length,1),xe),je=w.useRef(null);w.useEffect(()=>{_||R||!l||je.current===l||(je.current=l,Q("Shop Searched",{query:l,result_count:U}))},[l,_,R,U]);const H=w.useRef("__init__");w.useEffect(()=>{if(_||R)return;const i=JSON.stringify({category:j,subCategory:c,rarities:a,min:k,max:E,sort:v,status:m,smart:u});if(H.current==="__init__"||H.current===i){H.current=i;return}H.current=i,Q("Shop Applied Filter",{filters:{category:j,sub_category:c,rarities:a,min_price_credits:k??null,max_price_credits:E??null,status:m,smart:u,sort:v},result_count:U})},[j,c,a,k,E,v,m,u,_,R,U]);function ve(i){p({category:i,subCategory:null})}function $e(i){p({status:i})}function Ce(i){p({rarities:a.includes(i)?a.filter(z=>z!==i):[...a,i]})}function Ze(){p(h)}const P=[];(k!=null||E!=null)&&P.push({key:"price",label:n("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const i of Xe)a.includes(i)&&P.push({key:`rarity-${i}`,label:xt(i),onRemove:()=>Ce(i)});return u&&P.push({key:"smart",label:n("filter.smart"),onRemove:()=>p({smart:!1})}),m!=="on_sale"&&P.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>$e("on_sale")}),e.jsxs(ut,{"data-testid":"browse",children:[j!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(gt,{onClick:()=>$(!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:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(vt,{children:e.jsx($t,{category:j,subCategory:c,onCategory:ve,onSub:i=>p({subCategory:i}),priceMin:f,priceMax:g,onPriceMin:i=>p({priceMin:i}),onPriceMax:i=>p({priceMax:i}),rarities:a,onToggleRarity:Ce,status:m,onStatus:$e,smart:u,onSmart:i=>p({smart:i})})}),e.jsx(Ct,{children:e.jsx(kt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(St,{children:j==="names"?e.jsx(ps,{onBack:()=>ve("all")}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{sort:v,onSort:i=>p({sort:i}),total:y,loading:_||R,query:l,onOpenFilters:()=>$(!0),chips:P,onClearChips:Ze}),Oe&&C&&I.some(i=>i.source==="legacy")?e.jsx(Et,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ge?e.jsx(Wt,{message:n("assets.loadError"),testId:"browse-error"}):null,!we&&I.length===0&&!ge?e.jsxs(Tt,{"data-testid":"browse-empty",children:[e.jsx(_t,{src:hs,alt:""}),e.jsxs(Rt,{children:[e.jsx(It,{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(At,{children:e.jsx(Mt,{type:"button",onClick:()=>o("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:we?e.jsx(Se,{count:Ve}):e.jsxs(e.Fragment,{children:[I.map(i=>{if(!C)return e.jsx(D,{item:i,mode:"view"},G(i));const z=i;if(z.source!=="legacy")return e.jsx(D,{item:i},G(i));const O=Ge(z);return O==null?e.jsx(D,{item:i,mode:"view"},G(i)):e.jsx(D,{item:{...z,priceCredits:O}},G(i))}),be?e.jsx(Se,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Le,isFetching:be,isError:Ue,onLoadMore:()=>void He()})]})]})})]})}export{Ms as Assets};
|